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.
1239 lines
2.6 MiB
1239 lines
2.6 MiB
(self.webpackChunk=self.webpackChunk||[]).push([[5382],{88540:function(){"use strict"},42271:function(){"use strict"},15547:function(Dn,jn){"use strict";jn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},71584:function(){"use strict";function Dn(fe,z,te,se){te===void 0&&(te=0),se===void 0&&(se=1/0),this._name=fe,this._defaultValue=z,this._minimum=te,this._maximum=se}Object.defineProperty(Dn.prototype,"name",{get:function(){return this._name},set:function(fe){if(typeof fe!="string"||fe==="")throw new Error("Shape name must be a valid string.");this._name=fe}}),Object.defineProperty(Dn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(fe){if(typeof fe!="number"||isNaN(fe))throw new Error("The default value must be a real number, not: "+fe);this._defaultValue=fe}}),Object.defineProperty(Dn.prototype,"minimum",{get:function(){return this._minimum},set:function(fe){if(typeof fe!="number"||isNaN(fe))throw new Error("Minimum must be a real number, not: "+fe);this._minimum=fe}}),Object.defineProperty(Dn.prototype,"maximum",{get:function(){return this._maximum},set:function(fe){if(typeof fe!="number"||isNaN(fe))throw new Error("Maximum must be a real number, not: "+fe);this._maximum=fe}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(fe,z){var te=go.Shape._FigureParameters[fe];return te?te[z]:null},go.Shape.setFigureParameter=function(fe,z,te){if(!(te instanceof Dn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+te);if(te.defaultValue<te.minimum||te.defaultValue>te.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+te.defaultValue);var se=go.Shape._FigureParameters[fe];se||(se=[],go.Shape._FigureParameters[fe]=se),se[z]=te};var jn=[];function pt(fe,z){var te=jn.pop();return te===void 0?new go.Point(fe,z):(te.x=fe,te.y=z,te)}function at(){var fe=jn.pop();return fe===void 0?new go.Point:fe}function Ut(fe){jn.push(fe)}function oe(fe,z,te,se,ie,le,ce,pe,xe){xe||(xe=new go.Point);var je=fe-te,De=ie-ce,Fe=NaN,Te=NaN;if(je===0)if(De===0)fe===te&&(Fe=fe,Te=z);else{var Me=(le-pe)/De,Be=le-Me*ie;Fe=fe,Te=Me*Fe+Be}else if(De===0){var Ue=(z-se)/je,Ye=z-Ue*fe;Fe=ie,Te=Ue*Fe+Ye}else{var Ue=(z-se)/je,Me=(le-pe)/De,Ye=z-Ue*fe,Be=le-Me*ie;Fe=(Be-Ye)/(Ue-Me),Te=Ue*Fe+Ye}return xe.x=Fe,xe.y=Te,xe}function He(fe,z,te,se,ie,le,ce,pe,xe,je,De,Fe,Te,Me){var Be=1-xe,Ue=xe,Ye=fe*Be+te*Ue,Ve=z*Be+se*Ue,Ze=te*Be+ie*Ue,ot=se*Be+le*Ue,lt=ie*Be+ce*Ue,ft=le*Be+pe*Ue,St=Ye*Be+Ze*Ue,qe=Ve*Be+ot*Ue,rt=Ze*Be+lt*Ue,wt=ot*Be+ft*Ue,Ct=St*Be+rt*Ue,bt=qe*Be+wt*Ue;je.x=Ye,je.y=Ve,De.x=St,De.y=qe,Fe.x=Ct,Fe.y=bt,Te.x=rt,Te.y=wt,Me.x=lt,Me.y=ft}var Re=new go.Spot(.156,.156),de=new go.Spot(.844,.844),ve=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Dn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=5),se=Math.min(se,z/3),se=Math.min(se,te/3);var ie=se*ve,le=new go.Geometry().add(new go.PathFigure(se,0,!0).add(new go.PathSegment(go.PathSegment.Line,z-se,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,se,z-ie,0,z,ie)).add(new go.PathSegment(go.PathSegment.Line,z,te-se)).add(new go.PathSegment(go.PathSegment.Bezier,z-se,te,z,te-ie,z-ie,te)).add(new go.PathSegment(go.PathSegment.Line,se,te)).add(new go.PathSegment(go.PathSegment.Bezier,0,te-se,ie,te,0,te-ie)).add(new go.PathSegment(go.PathSegment.Line,0,se)).add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,ie,ie,0).close()));return ie>1&&(le.spot1=new go.Spot(0,0,ie,ie),le.spot2=new go.Spot(1,1,-ie,-ie)),le}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,te).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(z,te).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,z,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(z,te).add(new go.PathSegment(go.PathSegment.Line,0,te)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.5*z,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.5*z,te)).add(new go.PathSegment(go.PathSegment.Line,z,.5*te).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(fe,z,te){var se=new go.Geometry(go.Geometry.Line);return se.startX=0,se.startY=te/2,se.endX=z,se.endY=te/2,se}),go.Shape.defineFigureGenerator("LineV",function(fe,z,te){var se=new go.Geometry(go.Geometry.Line);return se.startX=z/2,se.startY=0,se.endX=z/2,se.endY=te,se}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,te/2,!1).add(new go.PathSegment(go.PathSegment.Line,z,te/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,te)))}),go.Shape.defineFigureGenerator("XLine",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)))}),go.Shape.defineFigureGenerator("LineRight",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.25*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.25*z,te)))}),go.Shape.defineFigureGenerator("LineDown",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,.25*te,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.75*te)).add(new go.PathSegment(go.PathSegment.Line,z,.25*te)))}),go.Shape.defineFigureGenerator("LineLeft",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.75*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.75*z,te)))}),go.Shape.defineFigureGenerator("LineUp",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,.75*te,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.25*te)).add(new go.PathSegment(go.PathSegment.Line,z,.75*te)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(fe,z,te){var se=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(se*z,(1-se)*te,!1).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,se*te)).add(new go.PathSegment(go.PathSegment.Move,se*z,se*te)).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,(1-se)*te)).add(new go.PathSegment(go.PathSegment.Move,0,te/2)).add(new go.PathSegment(go.PathSegment.Line,z,te/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,te)))}),go.Shape.defineFigureGenerator("CircleLine",function(fe,z,te){var se=z/2,ie=new go.Geometry().add(new go.PathFigure(z,z/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close()));return ie.spot1=Re,ie.spot2=de,ie.defaultStretch=go.GraphObject.Uniform,ie}),go.Shape.defineFigureGenerator("Line1",function(fe,z,te){var se=new go.Geometry(go.Geometry.Line);return se.startX=0,se.startY=0,se.endX=z,se.endY=te,se}),go.Shape.defineFigureGenerator("Line2",function(fe,z,te){var se=new go.Geometry(go.Geometry.Line);return se.startX=z,se.startY=0,se.endX=0,se.endY=te,se}),go.Shape.defineFigureGenerator("Curve1",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,te,ve*z,0,z,(1-ve)*te)))}),go.Shape.defineFigureGenerator("Curve2",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,te,0,ve*te,(1-ve)*z,te)))}),go.Shape.defineFigureGenerator("Curve3",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,te,z,ve*te,ve*z,te)))}),go.Shape.defineFigureGenerator("Curve4",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,te,(1-ve)*z,0,0,(1-ve)*te)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(z,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,te).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Dn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)?se=.1:se<-1?se=-1:se>1&&(se=1);var ie=Math.abs(se)*z;if(se===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=te,le}else{var le=new go.Geometry;return se>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,ie,te).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Dn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)?se=10:se<-z?se=-z:se>z&&(se=z);var ie=Math.abs(se);if(se===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=te,le}else{var le=new go.Geometry;return se>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,ie,te).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.setFigureParameter("Trapezoid1",0,new Dn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)?se=.2:se<.5?se=-.5:se>.5&&(se=.5);var ie=Math.abs(se)*z;if(se===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=te,le}else{var le=new go.Geometry;return se>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,te)).add(new go.PathSegment(go.PathSegment.Line,ie,te).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Dn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)?se=20:se<-z?se=-z/2:se>z&&(se=z/2);var ie=Math.abs(se);if(se===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=te,le}else{var le=new go.Geometry;return se>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,te)).add(new go.PathSegment(go.PathSegment.Line,ie,te).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.setFigureParameter("ManualOperation",0,new Dn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)?se=10:se<-z?se=-z/2:se>z&&(se=z/2);var ie=Math.abs(se);if(se===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=te,le}else{var le=new go.Geometry;return se>0?le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,te)).add(new go.PathSegment(go.PathSegment.Line,ie,te).close())):le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}});var Ee=[];function ke(){var fe=Ee.pop();return fe===void 0?[]:fe}function Se(fe){fe.length=0,Ee.push(fe)}function Ae(fe){for(var z=ke(),te=.5,se=.5,ie=Math.PI*1.5,le=0,ce=0;ce<fe;ce++)le=2*Math.PI/fe*ce+ie,z[ce]=new go.Point(se+te*Math.cos(le),se+te*Math.sin(le));return z.push(z[0]),z}function me(fe){var z=Pe(fe),te=ke();te[0]=z[0];for(var se=1,ie=1;se<z.length;se+=2,ie+=3)te[ie]=z[se],te[ie+1]=z[se],te[ie+2]=z[se+1];return Se(z),te}function Pe(fe){for(var z=Ae(fe),te=ke(),se=Math.floor(z.length/2),ie=z.length-1,le=fe%2===0?2:1,ce=0;ce<ie;ce++){var pe=z[ce],xe=z[ce+1],je=z[(se+ce-1)%ie],De=z[(se+ce+le)%ie];te[ce*2]=pe,te[ce*2+1]=oe(pe.x,pe.y,je.x,je.y,xe.x,xe.y,De.x,De.y,new go.Point)}return te[te.length]=te[0],Se(z),te}go.Shape.defineFigureGenerator("Pentagon",function(fe,z,te){var se=Ae(5),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<5;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.2,.22),ie.spot2=new go.Spot(.8,.9),ie}),go.Shape.defineFigureGenerator("Hexagon",function(fe,z,te){var se=Ae(6),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<6;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.07,.25),ie.spot2=new go.Spot(.93,.75),ie}),go.Shape.defineFigureGenerator("Heptagon",function(fe,z,te){var se=Ae(7),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<7;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.2,.15),ie.spot2=new go.Spot(.8,.85),ie}),go.Shape.defineFigureGenerator("Octagon",function(fe,z,te){var se=Ae(8),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<8;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.15,.15),ie.spot2=new go.Spot(.85,.85),ie}),go.Shape.defineFigureGenerator("Nonagon",function(fe,z,te){var se=Ae(9),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<9;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.17,.13),ie.spot2=new go.Spot(.82,.82),ie}),go.Shape.defineFigureGenerator("Decagon",function(fe,z,te){var se=Ae(10),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<10;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("Dodecagon",function(fe,z,te){var se=Ae(12),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<12;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("FivePointedStar",function(fe,z,te){var se=Pe(5),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<10;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.266,.333),ie.spot2=new go.Spot(.733,.733),ie}),go.Shape.defineFigureGenerator("SixPointedStar",function(fe,z,te){var se=Pe(6),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<12;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.17,.25),ie.spot2=new go.Spot(.83,.75),ie}),go.Shape.defineFigureGenerator("SevenPointedStar",function(fe,z,te){var se=Pe(7),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<14;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("EightPointedStar",function(fe,z,te){var se=Pe(8),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<16;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.25,.25),ie.spot2=new go.Spot(.75,.75),ie}),go.Shape.defineFigureGenerator("NinePointedStar",function(fe,z,te){var se=Pe(9),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<18;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("TenPointedStar",function(fe,z,te){var se=Pe(10),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<20;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.281,.261),ie.spot2=new go.Spot(.723,.748),ie}),go.Shape.defineFigureGenerator("FivePointedBurst",function(fe,z,te){var se=me(5),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<se.length;ce+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[ce+2].x*z,se[ce+2].y*te,se[ce].x*z,se[ce].y*te,se[ce+1].x*z,se[ce+1].y*te));return le.segments.last().close(),Se(se),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("SixPointedBurst",function(fe,z,te){var se=me(6),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<se.length;ce+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[ce+2].x*z,se[ce+2].y*te,se[ce].x*z,se[ce].y*te,se[ce+1].x*z,se[ce+1].y*te));return le.segments.last().close(),Se(se),ie.spot1=new go.Spot(.17,.222),ie.spot2=new go.Spot(.833,.777),ie}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(fe,z,te){var se=me(7),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<se.length;ce+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[ce+2].x*z,se[ce+2].y*te,se[ce].x*z,se[ce].y*te,se[ce+1].x*z,se[ce+1].y*te));return le.segments.last().close(),Se(se),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("EightPointedBurst",function(fe,z,te){var se=me(8),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<se.length;ce+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[ce+2].x*z,se[ce+2].y*te,se[ce].x*z,se[ce].y*te,se[ce+1].x*z,se[ce+1].y*te));return le.segments.last().close(),Se(se),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("NinePointedBurst",function(fe,z,te){var se=me(9),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<se.length;ce+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[ce+2].x*z,se[ce+2].y*te,se[ce].x*z,se[ce].y*te,se[ce+1].x*z,se[ce+1].y*te));return le.segments.last().close(),Se(se),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("TenPointedBurst",function(fe,z,te){var se=me(10),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<se.length;ce+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[ce+2].x*z,se[ce+2].y*te,se[ce].x*z,se[ce].y*te,se[ce+1].x*z,se[ce+1].y*te));return le.segments.last().close(),Se(se),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.setFigureParameter("FramedRectangle",0,new Dn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Dn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(fe,z,te){var se=fe?fe.parameter1:NaN,ie=fe?fe.parameter2:NaN;isNaN(se)&&(se=8),isNaN(ie)&&(ie=8);var le=new go.Geometry,ce=new go.PathFigure(0,0,!0);return le.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se<z/2&&ie<te/2&&(ce.add(new go.PathSegment(go.PathSegment.Move,se,ie)),ce.add(new go.PathSegment(go.PathSegment.Line,se,te-ie)),ce.add(new go.PathSegment(go.PathSegment.Line,z-se,te-ie)),ce.add(new go.PathSegment(go.PathSegment.Line,z-se,ie).close())),le.setSpots(0,0,1,1,se,ie,-se,-ie),le}),go.Shape.setFigureParameter("Ring",0,new Dn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=8);var ie=z/2,le=new go.Geometry,ce=new go.PathFigure(z,z/2,!0);le.add(ce),ce.add(new go.PathSegment(go.PathSegment.Arc,0,360,ie,ie,ie,ie).close());var pe=Math.max(ie-se,0);return pe>0&&(ce.add(new go.PathSegment(go.PathSegment.Move,z/2+pe,z/2)),ce.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ie,ie,pe,pe).close())),le.spot1=Re,le.spot2=de,le.defaultStretch=go.GraphObject.Uniform,le}),go.Shape.defineFigureGenerator("Cloud",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.08034461*z,.1944299*te,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*z,.05349299*te,-.09239631*z,.07836421*te,.1406031*z,-.0542823*te)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*z,.074219*te,.2450511*z,-.00697547*te,.3776197*z,-.01112067*te)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*z,.07004196*te,.4539471*z,0,.6066018*z,-.02526587*te)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*z,.08370865*te,.6914277*z,-.01904177*te,.8921095*z,-.01220843*te)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*z,.3194596*te,1.036446*z,.04105738*te,1.020377*z,.3022052*te)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*z,.562044*te,1.04448*z,.360238*te,.992256*z,.5219009*te)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*z,.8217117*te,1.032337*z,.5771781*te,1.018411*z,.8120651*te)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*z,.9156953*te,1.028411*z,.9571472*te,.8556702*z,1.052487*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*z,.9310455*te,.7431877*z,1.009325*te,.5624123*z,1.021761*te)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*z,.9344623*te,.4820677*z,1.031761*te,.3030112*z,1.002796*te)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.870098*te,.2329994*z,1.01518*te,.03213784*z,1.01518*te)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*z,.6545475*te,-.02812061*z,.9032597*te,-.01205169*z,.6835638*te)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*z,.4265613*te,-.01812061*z,.6089503*te,-.00606892*z,.4555777*te)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.1944299*te,-.01606892*z,.3892545*te,-.01205169*z,.1944299*te))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(fe,z,te){var se=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(se*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,se*te)).add(new go.PathSegment(go.PathSegment.Line,z,(1-se)*te)).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,te)).add(new go.PathSegment(go.PathSegment.Line,se*z,te)).add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*te)).add(new go.PathSegment(go.PathSegment.Line,0,se*te).close())).setSpots(se/2,se/2,1-se/2,1-se/2)}),go.Shape.setFigureParameter("Pie",0,new Dn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Dn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(fe,z,te){var se=fe?fe.parameter1:NaN,ie=fe?fe.parameter2:NaN;isNaN(se)&&(se=0),isNaN(ie)&&(ie=315);var le=se%360;le<0&&(le+=360);var ce=ie%360,pe=Math.min(z,te)/2;return new go.Geometry().add(new go.PathFigure(pe,pe).add(new go.PathSegment(go.PathSegment.Arc,le,ce,pe,pe,pe,pe).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(fe,z,te){var se=ve/Math.SQRT2*.5,ie=Math.SQRT2/2,le=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(z,te,!0).add(new go.PathSegment(go.PathSegment.Bezier,ie*z,le*te,z,(1-se)*te,(ie+se)*z,(le+se)*te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Dn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=30);var ie=Math.min(se,z)/2,le=z/2,ce=te/2;return new go.Geometry().add(new go.PathFigure(le-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+ie,0)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ce-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ce-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,te)).add(new go.PathSegment(go.PathSegment.Line,le-ie,te)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ce-ie)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ce-ie).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Dn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=10);var ie=Math.min(se,z)/2,le=z/2,ce=te/2;return new go.Geometry().add(new go.PathFigure(le-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+ie,0)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ce-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ce-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,te)).add(new go.PathSegment(go.PathSegment.Line,le-ie,te)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ce-ie)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ce-ie).close()))}),go.Shape.setFigureParameter("ThickX",0,new Dn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(fe,z,te){var se=fe?fe.parameter1:NaN;if((isNaN(se)||se<0)&&(se=30),z===0||te===0){var ie=new go.Geometry(go.Geometry.Rectangle);return ie.startX=0,ie.startY=0,ie.endX=z,ie.endY=te,ie}else{var le=z/2,ce=te/2,pe=Math.atan2(te,z),xe=se-Math.min(Math.cos(pe)*se/2,le),je=se-Math.min(Math.sin(pe)*se/2,ce),ie=new go.Geometry,De=new go.PathFigure(xe,0,!0);return ie.add(De),De.add(new go.PathSegment(go.PathSegment.Line,le,.2*te)),De.add(new go.PathSegment(go.PathSegment.Line,z-xe,0)),De.add(new go.PathSegment(go.PathSegment.Line,z,je)),De.add(new go.PathSegment(go.PathSegment.Line,.8*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,z,te-je)),De.add(new go.PathSegment(go.PathSegment.Line,z-xe,te)),De.add(new go.PathSegment(go.PathSegment.Line,le,.8*te)),De.add(new go.PathSegment(go.PathSegment.Line,xe,te)),De.add(new go.PathSegment(go.PathSegment.Line,0,te-je)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,0,je).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new Dn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=10);var ie=new go.Geometry,le=new go.PathFigure(.1*z,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,.1*te)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.9*te)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*te).close()),ie}),go.Shape.setFigureParameter("SquareIBeam",0,new Dn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.2);var ie=new go.Geometry,le=new go.PathFigure(0,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,se*te)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+se/2)*z,se*te)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+se/2)*z,(1-se)*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,(1-se)*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-se/2)*z,(1-se)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-se/2)*z,se*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,se*te).close()),ie}),go.Shape.setFigureParameter("RoundedIBeam",0,new Dn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.5);var ie=new go.Geometry,le=new go.PathFigure(0,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,te,Math.abs(1-se)*z,.25*te,Math.abs(1-se)*z,.75*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,se*z,.75*te,se*z,.25*te).close()),ie}),go.Shape.defineFigureGenerator("HalfEllipse",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,ve*z,0,z,(.5-ve/2)*te)).add(new go.PathSegment(go.PathSegment.Bezier,0,te,z,(.5+ve/2)*te,ve*z,te).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,te,z,0,z,te)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*z,.75*te,.5*z,.25*te).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.5*z,te,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*te,.1*z,.8*te,0,.5*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*te,0,0,.45*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,.3*te,.55*z,0,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,.5*te,.9*z,.8*te).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.5*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*z,.01*te)).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,.6*z,.2*te,z,.25*te)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.7*te,z,.8*te,.6*z,.8*te)).add(new go.PathSegment(go.PathSegment.Bezier,.75*z,te,.5*z,.75*te,.55*z,.95*te)).add(new go.PathSegment(go.PathSegment.Line,.25*z,te)).add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.7*te,.45*z,.95*te,.5*z,.75*te)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.4*z,.8*te,0,.8*te)).add(new go.PathSegment(go.PathSegment.Bezier,.49*z,.01*te,0,.25*te,.4*z,.2*te).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.4*z,.6*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.15*z,te,.5*z,.75*te,.45*z,.95*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.6*te,.55*z,.95*te,.5*z,.75*te));var le=.2,ce=.3,pe=0,xe=le*ve;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ce)*z,(.5+le+pe)*te,(.5-le+ce)*z,(.5+xe+pe)*te,(.5-xe+ce)*z,(.5+le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ce)*z,(.5+pe)*te,(.5+xe+ce)*z,(.5+le+pe)*te,(.5+le+ce)*z,(.5+xe+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ce)*z,(.5-le+pe)*te,(1-.5+le+ce)*z,(.5-xe+pe)*te,(.5+xe+ce)*z,(.5-le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*te,(.5-xe+ce)*z,(.5-le+pe)*te,(.5-le+ce+.05)*z,(.5-xe+pe-.02)*te)),le=.2,ce=0,pe=-.3,xe=le*ve,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ce)*z,(.5+pe)*te,(.5+xe+ce)*z,(.5+le+pe)*te,(.5+le+ce)*z,(.5+xe+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ce)*z,(.5-le+pe)*te,(1-.5+le+ce)*z,(.5-xe+pe)*te,(.5+xe+ce)*z,(.5-le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ce)*z,(.5+pe)*te,(.5-xe+ce)*z,(.5-le+pe)*te,(.5-le+ce)*z,(.5-xe+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-xe+ce)*z,(.5+le+pe)*te,(.5-le+ce)*z,(.5+xe+pe)*te,(.5-xe+ce)*z,(.5+le+pe)*te)),le=.2,ce=-.3,pe=0,xe=le*ve,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ce)*z,(.5-le+pe)*te,(1-.5+le+ce-.05)*z,(.5-xe+pe-.02)*te,(.5+xe+ce)*z,(.5-le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ce)*z,(.5+pe)*te,(.5-xe+ce)*z,(.5-le+pe)*te,(.5-le+ce)*z,(.5-xe+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ce)*z,(.5+le+pe)*te,(.5-le+ce)*z,(.5+xe+pe)*te,(.5-xe+ce)*z,(.5+le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*te,(.5+xe+ce)*z,(.5+le+pe)*te,(.5+le+ce)*z,(.5+xe+pe)*te).close()),se.setSpots(.06,.33,.93,.68),se}),go.Shape.defineFigureGenerator("YinYang",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*.5,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*.5,z*.5,z*.5,z*.5)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,-180,z*.5,z*.75,z*.25,z*.25)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,z*.5,z*.25,z*.25,z*.25));var le=.1,ce=.5,pe=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(ce+le)*z,pe*te)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*ce,te*pe,le*z,le*z).close()),ie=new go.PathFigure(z*.5,0,!1),se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*.5,z*.5,z*.5,z*.5)),pe=.75,ie=new go.PathFigure((ce+le)*z,pe*te,!0),se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*ce,te*pe,le*z,le*z).close()),se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Peace",function(fe,z,te){var se=.8535533905932737,ie=.5*z,le=.5*te;return new go.Geometry().add(new go.PathFigure(ie,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,ie,le,ie,le)).add(new go.PathSegment(go.PathSegment.Line,ie,te)).add(new go.PathSegment(go.PathSegment.Move,ie,le)).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,se*te)).add(new go.PathSegment(go.PathSegment.Move,ie,le)).add(new go.PathSegment(go.PathSegment.Line,se*z,se*te)))}),go.Shape.defineFigureGenerator("NotAllowed",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=.5,ce=.5,pe=.5,xe=new go.PathFigure(ce*z,(pe-le)*te);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-le)*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),le=.4,ie=ve*.4;var je=at(),De=at(),Fe=at(),Te=at();He(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.42,je,De,Fe,Te,Te);var Me=at(),Be=at(),Ue=at();He(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.58,Te,Te,Ue,Me,Be);var Ye=at(),Ve=at(),Ze=at();He(ce,pe+le,ce-ie,pe+le,ce-le,pe+ie,ce-le,pe,.42,Ye,Ve,Ze,Te,Te);var ot=at(),lt=at(),ft=at();return He(ce,pe+le,ce-ie,pe+le,ce-le,pe+ie,ce-le,pe,.58,Te,Te,ft,ot,lt),xe.add(new go.PathSegment(go.PathSegment.Move,ft.x*z,ft.y*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,ot.x*z,ot.y*te,lt.x*z,lt.y*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*z,Fe.y*te,je.x*z,je.y*te,De.x*z,De.y*te)),xe.add(new go.PathSegment(go.PathSegment.Line,ft.x*z,ft.y*te).close()),xe.add(new go.PathSegment(go.PathSegment.Move,Ze.x*z,Ze.y*te)),xe.add(new go.PathSegment(go.PathSegment.Line,Ue.x*z,Ue.y*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,Me.x*z,Me.y*te,Be.x*z,Be.y*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,Ze.x*z,Ze.y*te,Ye.x*z,Ye.y*te,Ve.x*z,Ve.y*te).close()),Ut(je),Ut(De),Ut(Fe),Ut(Te),Ut(Me),Ut(Be),Ut(Ue),Ut(Ye),Ut(Ve),Ut(Ze),Ut(ot),Ut(lt),Ut(ft),se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Fragile",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*z,0)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.15*te)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.25*te)).add(new go.PathSegment(go.PathSegment.Line,.29*z,.33*te)).add(new go.PathSegment(go.PathSegment.Line,.35*z,.25*te)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.15*te)).add(new go.PathSegment(go.PathSegment.Line,.4*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.5*te,z,.25*te,.75*z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.7*z,te)).add(new go.PathSegment(go.PathSegment.Line,.3*z,te)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*te)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.5*te,0,.25*te).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Dn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=30),se>z&&(se=z);var ie=(z-se)/2,le=ie+se;return new go.Geometry().add(new go.PathFigure(le,.5*te).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te)).add(new go.PathSegment(go.PathSegment.Line,ie,.5*te)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,.55*te).add(new go.PathSegment(go.PathSegment.Line,.6*z,0)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.45*te)).add(new go.PathSegment(go.PathSegment.Line,z,.45*te)).add(new go.PathSegment(go.PathSegment.Line,.4*z,te)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.55*te).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(fe,z,te){var se=new go.Geometry,ie=ve*.4,le=.4,ce=.5,pe=.5,xe=at(),je=at(),De=at(),Fe=at(),Te=new go.PathFigure((ce-le)*z,pe*te,!1);se.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te)),He(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.44,De,Fe,je,xe,xe),Te.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te));var Me=pt(je.x,je.y);He(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.56,xe,xe,je,De,Fe);var Be=pt(je.x,je.y);Te.add(new go.PathSegment(go.PathSegment.Line,(Me.x*.1+.95*.9)*z,Me.y*.1*te)),Te.add(new go.PathSegment(go.PathSegment.Line,.85*z,Me.y*.1*te)),Te.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),Te.add(new go.PathSegment(go.PathSegment.Line,z,0)),Te.add(new go.PathSegment(go.PathSegment.Line,z,.15*te)),Te.add(new go.PathSegment(go.PathSegment.Line,(Be.x*.1+.9)*z,.15*te)),Te.add(new go.PathSegment(go.PathSegment.Line,(Be.x*.1+.9)*z,(Be.y*.1+.05*.9)*te)),Te.add(new go.PathSegment(go.PathSegment.Line,Be.x*z,Be.y*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te)),le=.35,ie=ve*.35;var Ue=new go.PathFigure(ce*z,(pe-le)*te,!1);se.add(Ue),Ue.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),Ue.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te)),Ue.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),Ue.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-le)*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te));var Ye=new go.PathFigure((ce-le)*z,pe*te,!1);return se.add(Ye),Ut(xe),Ut(je),Ut(De),Ut(Fe),Ut(Me),Ut(Be),se.spot1=new go.Spot(.202,.257),se.spot2=new go.Spot(.792,.739),se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("GenderFemale",function(fe,z,te){var se=new go.Geometry,ie=.375,le=0,ce=-.125,pe=ie*ve,xe=new go.PathFigure((.525+le)*z,(.5+ie+ce)*te,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+ce)*te,(.5+pe+le)*z,(.5+ie+ce)*te,(.5+ie+le)*z,(.5+pe+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+ce)*te,(1-.5+ie+le)*z,(.5-pe+ce)*te,(.5+pe+le)*z,(.5-ie+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ce)*te,(.5-pe+le)*z,(.5-ie+ce)*te,(.5-ie+le)*z,(.5-pe+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.475+le)*z,(.5+ie+ce)*te,(.5-ie+le)*z,(.5+pe+ce)*te,(.5-pe+le)*z,(.5+ie+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.475*z,.85*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.425*z,.85*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.425*z,.9*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.475*z,.9*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.475*z,te)),xe.add(new go.PathSegment(go.PathSegment.Line,.525*z,te)),xe.add(new go.PathSegment(go.PathSegment.Line,.525*z,.9*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.575*z,.9*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.575*z,.85*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*te).close()),ie=.325,le=0,ce=-.125,pe=ie*ve;var xe=new go.PathFigure((1-.5+ie+le)*z,(.5+ce)*te,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5+ie+ce)*te,(.5+ie+le)*z,(.5+pe+ce)*te,(.5+pe+le)*z,(.5+ie+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ce)*te,(.5-pe+le)*z,(.5+ie+ce)*te,(.5-ie+le)*z,(.5+pe+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+ce)*te,(.5-ie+le)*z,(.5-pe+ce)*te,(.5-pe+le)*z,(.5-ie+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+ce)*te,(.5+pe+le)*z,(.5-ie+ce)*te,(1-.5+ie+le)*z,(.5-pe+ce)*te));var xe=new go.PathFigure((.525+le)*z,(.5+ie+ce)*te,!1);return se.add(xe),se.spot1=new go.Spot(.232,.136),se.spot2=new go.Spot(.682,.611),se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("LogicImplies",function(fe,z,te){var se=fe?fe.parameter1:NaN;return isNaN(se)&&(se=.2),new go.Geometry().add(new go.PathFigure((1-se)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,te)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,z,.5*te))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(fe,z,te){var se=fe?fe.parameter1:NaN;return isNaN(se)&&(se=.2),new go.Geometry().add(new go.PathFigure((1-se)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,te)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Move,se*z,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,se*z,te))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)))}),go.Shape.defineFigureGenerator("LogicAnd",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,te))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,te)).add(new go.PathSegment(go.PathSegment.Line,z,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(fe,z,te){var se=new go.Geometry().add(new go.PathFigure(.5*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,te)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*z,.5*te,.5*z,.5*te)));return se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("LogicTruth",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,te)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Move,.5*z,te)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Move,z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te)))}),go.Shape.defineFigureGenerator("LogicForAll",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,te)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*te))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Move,0,te)).add(new go.PathSegment(go.PathSegment.Line,z,te))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(fe,z,te){var se=.5;return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,0,se*te)).add(new go.PathSegment(go.PathSegment.Arc,180,180,se*z,se*te,se*z,se*te)).add(new go.PathSegment(go.PathSegment.Line,z,te))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(fe,z,te){var se=.5;return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,se*te)).add(new go.PathSegment(go.PathSegment.Arc,0,180,se*z,se*te,se*z,se*te)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Dn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Dn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.3);var ie=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=.3);var le=(1-se)*z,ce=(.5-ie/2)*te,pe=(.5+ie/2)*te,xe=new go.Geometry,je=new go.PathFigure(0,ce,!0);xe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le,ce)),je.add(new go.PathSegment(go.PathSegment.Line,le,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),je.add(new go.PathSegment(go.PathSegment.Line,le,te)),je.add(new go.PathSegment(go.PathSegment.Line,le,pe)),je.add(new go.PathSegment(go.PathSegment.Line,0,pe).close()),xe.spot1=new go.Spot(0,ce/te);var De=oe(0,pe/te,1,pe/te,le/z,1,1,.5,at());return xe.spot2=new go.Spot(De.x,De.y),Ut(De),xe}),go.Shape.setFigureParameter("Arrow2",0,new Dn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Dn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=30),se>z&&(se=z);var ie=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=30),ie=Math.min(ie,te/2);var le=z-se,ce=(te-ie)/2,pe=ce+ie,xe=new go.Geometry,je=new go.PathFigure(0,ce,!0);xe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le,ce)),je.add(new go.PathSegment(go.PathSegment.Line,le,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),je.add(new go.PathSegment(go.PathSegment.Line,le,te)),je.add(new go.PathSegment(go.PathSegment.Line,le,pe)),je.add(new go.PathSegment(go.PathSegment.Line,0,pe).close()),xe.spot1=new go.Spot(0,ce/te);var De=oe(0,pe/te,1,pe/te,le/z,1,1,.5,at());return xe.spot2=new go.Spot(De.x,De.y),Ut(De),xe}),go.Shape.defineFigureGenerator("Chevron",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te).close()),se}),go.Shape.defineFigureGenerator("DoubleArrow",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.214*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,1*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.786*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,1*te).close()),se}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Dn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.3);var ie=(.5-se/2)*te,le=(.5+se/2)*te,ce=new go.Geometry,pe=new go.PathFigure(z,.5*te,!0);ce.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close());var xe=oe(0,.5,.3,0,0,ie/te,.1,ie/te,at());return ce.spot1=new go.Spot(xe.x,xe.y),xe=oe(.7,1,1,.5,0,le/te,1,le/te,xe),ce.spot2=new go.Spot(xe.x,xe.y),Ut(xe),ce}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Dn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Dn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=40);var ie=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(te-se)/2,ce=le+se,pe=(te-ie)/2,xe=pe+ie;(se>te||ie>te)&&(ie>se?(se=se*te/ie,le=(te-se)/2,ce=le+se,pe=0,xe=te):(le=0,ce=te,pe=0,xe=te));var je=new go.Geometry,De=new go.PathFigure(z,.5*te,!0);je.add(De),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,xe)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,xe)),De.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,pe)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,pe).close());var Fe=oe(0,.5,.3,pe/te,0,le/te,1,le/te,at());return je.spot1=new go.Spot(Fe.x,Fe.y),Fe=oe(.7,xe/te,1,.5,0,ce/te,1,ce/te,Fe),je.spot2=new go.Spot(Fe.x,Fe.y),Ut(Fe),je}),go.Shape.setFigureParameter("IBeamArrow",0,new Dn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.3);var ie=(.5-se/2)*te,le=(.5+se/2)*te,ce=new go.Geometry,pe=new go.PathFigure(z,.5*te,!0);ce.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ce.spot1=new go.Spot(0,ie/te);var xe=oe(.7,1,1,.5,0,le/te,1,le/te,at());return ce.spot2=new go.Spot(xe.x,xe.y),Ut(xe),ce}),go.Shape.setFigureParameter("IBeamArrow2",0,new Dn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Dn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=40);var ie=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(te-se)/2,ce=le+se,pe=(te-ie)/2,xe=pe+ie;(se>te||ie>te)&&(ie>se?(se=se*te/ie,le=(te-se)/2,ce=le+se,pe=0,xe=te):(le=0,ce=te,pe=0,xe=te));var je=new go.Geometry,De=new go.PathFigure(z,.5*te,!0);je.add(De),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,xe)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,xe)),De.add(new go.PathSegment(go.PathSegment.Line,0,xe)),De.add(new go.PathSegment(go.PathSegment.Line,0,pe)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,pe)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,pe).close()),je.spot1=new go.Spot(0,le/te);var Fe=oe(.7,xe/te,1,.5,0,ce/te,1,ce/te,at());return je.spot2=new go.Spot(Fe.x,Fe.y),Ut(Fe),je}),go.Shape.setFigureParameter("Pointer",0,new Dn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.1);var ie=new go.Geometry,le=new go.PathFigure(z,.5*te,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,se*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),ie.spot1=new go.Spot(se,.35);var ce=oe(.2,.65,1,.65,0,1,1,.5,at());return ie.spot2=new go.Spot(ce.x,ce.y),Ut(ce),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new Dn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.3);var ie=new go.Geometry,le=new go.PathFigure(z,.5*te,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,se*z,.75*te,se*z,.25*te).close()),ie.spot1=new go.Spot(se,.35);var ce=oe(0,.65,1,.65,0,1,1,.5,at());return ie.spot2=new go.Spot(ce.x,ce.y),Ut(ce),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new Dn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.4);var ie=(.5-se/2)*te,le=(.5+se/2)*te,ce=new go.Geometry,pe=new go.PathFigure(z,.5*te,!0);ce.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,0,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ce.spot1=new go.Spot(.2,.3);var xe=oe(.7,1,1,.5,0,le/te,1,le/te,at());return ce.spot2=new go.Spot(xe.x,xe.y),Ut(xe),ce}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Dn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=50);var ie=(te-se)/2,le=ie+se;se>te&&(ie=0,le=te);var ce=new go.Geometry,pe=new go.PathFigure(z,.5*te,!0);ce.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,0,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ce.spot1=new go.Spot(.2,ie/te);var xe=oe(.7,1,1,.5,0,le/te,1,le/te,at());return ce.spot2=new go.Spot(xe.x,xe.y),Ut(xe),ce}),go.Shape.setFigureParameter("SquareArrow",0,new Dn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.7);var ie=new go.Geometry,le=new go.PathFigure(z,.5*te,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,se*z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,se*z,0).close()),ie.spot1=go.Spot.TopLeft,ie.spot2=new go.Spot(se,1),ie}),go.Shape.defineFigureGenerator("Cone1",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=ve*.1,ce=new go.PathFigure(0,.9*te,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,(.9+le)*te,(.5+ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-ie)*z,te,0,(.9+le)*te).close()),se.spot1=new go.Spot(.25,.5),se.spot2=new go.Spot(.75,.97),se}),go.Shape.defineFigureGenerator("Cone2",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.9*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*te,(1-.85/.9)*z,te,.85/.9*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.9*te).close());var le=new go.PathFigure(0,.9*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*te,(1-.85/.9)*z,.8*te,.85/.9*z,.8*te)),se.spot1=new go.Spot(.25,.5),se.spot2=new go.Spot(.75,.82),se}),go.Shape.defineFigureGenerator("Cube1",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.15*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*te).close());var le=new go.PathFigure(.5*z,te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.15*te)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.15*te)),se.spot1=new go.Spot(0,.3),se.spot2=new go.Spot(.5,.85),se}),go.Shape.defineFigureGenerator("Cube2",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.3*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0).close());var le=new go.PathFigure(0,.3*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,.7*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,te)),se.spot1=new go.Spot(0,.3),se.spot2=new go.Spot(.7,1),se}),go.Shape.defineFigureGenerator("Cylinder1",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=5),se=Math.min(se,te/3);var ie=new go.Geometry,le=ve*.5,ce=new go.PathFigure(0,se,!0);ie.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,ve*se,(.5-le)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,1*z,se,(.5+le)*z,0,1*z,ve*se)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te-se)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*te,1*z,te-ve*se,(.5+le)*z,1*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,te-se,(.5-le)*z,1*te,0,te-ve*se)),ce.add(new go.PathSegment(go.PathSegment.Line,0,se));var pe=new go.PathFigure(z,se,!1);return ie.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*se,1*z,2*se-ve*se,(.5+le)*z,2*se)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,se,(.5-le)*z,2*se,0,2*se-ve*se)),ie.spot1=new go.Spot(0,0,0,2*se),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=5),se=Math.min(se,te/3);var ie=new go.Geometry,le=ve*.5,ce=new go.PathFigure(0,te-se,!0);ie.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,0,se)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,ve*se,(.5-le)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,se,(.5+le)*z,0,z,ve*se)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te-se)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,te-ve*se,(.5+le)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,te-se,(.5-le)*z,te,0,te-ve*se));var pe=new go.PathFigure(0,te-se,!1);return ie.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te-2*se,0,te-se-ve*se,(.5-le)*z,te-2*se)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z,te-se,(.5+le)*z,te-2*se,z,te-se-ve*se)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,0,-2*se),ie}),go.Shape.defineFigureGenerator("Cylinder3",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=5),se=Math.min(se,z/3);var ie=new go.Geometry,le=ve*.5,ce=new go.PathFigure(se,0,!0);ie.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z-se,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,z-ve*se,0,z,(.5-le)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z-se,te,z,(.5+le)*te,z-ve*se,te)),ce.add(new go.PathSegment(go.PathSegment.Line,se,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,ve*se,te,0,(.5+le)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,(.5-le)*te,ve*se,0));var pe=new go.PathFigure(se,0,!1);return ie.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,2*se,.5*te,se+ve*se,0,2*se,(.5-le)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,se,te,2*se,(.5+le)*te,se+ve*se,te)),ie.spot1=new go.Spot(0,0,2*se,0),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder4",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=5),se=Math.min(se,z/3);var ie=new go.Geometry,le=ve*.5,ce=new go.PathFigure(z-se,0,!0);ie.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,z-ve*se,0,z,(.5-le)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z-se,te,z,(.5+le)*te,z-ve*se,te)),ce.add(new go.PathSegment(go.PathSegment.Line,se,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,ve*se,te,0,(.5+le)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,(.5-le)*te,ve*se,0)),ce.add(new go.PathSegment(go.PathSegment.Line,z-se,0));var pe=new go.PathFigure(z-se,0,!1);return ie.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-2*se,.5*te,z-se-ve*se,0,z-2*se,(.5-le)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-se,te,z-2*se,(.5+le)*te,z-se-ve*se,te)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,-2*se,0),ie}),go.Shape.defineFigureGenerator("Prism1",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.25*z,.25*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var le=new go.PathFigure(.25*z,.25*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),se.spot1=new go.Spot(.408,.172),se.spot2=new go.Spot(.833,.662),se}),go.Shape.defineFigureGenerator("Prism2",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.25*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var le=new go.PathFigure(0,te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),le.add(new go.PathSegment(go.PathSegment.Move,0,.25*te)),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*te)),se.spot1=new go.Spot(.25,.5),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("Pyramid1",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*te).close());var le=new go.PathFigure(.5*z,0,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),se.spot1=new go.Spot(.25,.367),se.spot2=new go.Spot(.75,.875),se}),go.Shape.defineFigureGenerator("Pyramid2",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*te).close());var le=new go.PathFigure(.5*z,0,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.85*te)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.85*te)),se.spot1=new go.Spot(.25,.367),se.spot2=new go.Spot(.75,.875),se}),go.Shape.defineFigureGenerator("Actor",function(fe,z,te){var se=new go.Geometry,ie=.2,le=.1,ce=ve*ie,pe=ve*le,xe=.5,je=.1,De=new go.PathFigure(xe*z,(je+le)*te,!0);se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe-ie)*z,je*te,(xe-ce)*z,(je+le)*te,(xe-ie)*z,(je+pe)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-le)*te,(xe-ie)*z,(je-pe)*te,(xe-ce)*z,(je-le)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe+ie)*z,je*te,(xe+ce)*z,(je-le)*te,(xe+ie)*z,(je-pe)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je+le)*te,(xe+ie)*z,(je+pe)*te,(xe+ce)*z,(je+le)*te));var Fe=.05,Te=ve*Fe;xe=.05,je=.25;var Me=new go.PathFigure(.5*z,.2*te,!0);return se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*te)),xe=.95,je=.25,Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe+Fe)*z,je*te,(xe+Te)*z,(je-Fe)*te,(xe+Fe)*z,(je-Te)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,z,.6*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*te)),Fe=.025,Te=ve*Fe,xe=.825,je=.35,Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-Fe)*te,(xe+Fe)*z,(je-Te)*te,(xe+Te)*z,(je-Fe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*z,je*te,(xe-Te)*z,(je-Fe)*te,(xe-Fe)*z,(je-Te)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.8*z,te)),Me.add(new go.PathSegment(go.PathSegment.Line,.55*z,te)),Me.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*te)),Fe=.05,Te=ve*Fe,xe=.5,je=.7,Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-Fe)*te,(xe+Fe)*z,(je-Te)*te,(xe+Te)*z,(je-Fe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*z,je*te,(xe-Te)*z,(je-Fe)*te,(xe-Fe)*z,(je-Te)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.45*z,te)),Me.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),Me.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*te)),Fe=.025,Te=ve*Fe,xe=.175,je=.35,Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-Fe)*te,(xe+Fe)*z,(je-Te)*te,(xe+Te)*z,(je-Fe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*z,je*te,(xe-Te)*z,(je-Fe)*te,(xe-Fe)*z,(je-Te)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*te)),Me.add(new go.PathSegment(go.PathSegment.Line,0,.6*te)),Me.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),Fe=.05,Te=ve*Fe,xe=.05,je=.25,Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-Fe)*te,(xe-Fe)*z,(je-Te)*te,(xe-Te)*z,(je-Fe)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*te)),se.spot1=new go.Spot(.2,.2),se.spot2=new go.Spot(.8,.65),se}),go.Shape.setFigureParameter("Card",0,new Dn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.2);var ie=new go.Geometry,le=new go.PathFigure(z,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,se*te)),le.add(new go.PathSegment(go.PathSegment.Line,se*z,0).close()),ie.spot1=new go.Spot(0,se),ie.spot2=go.Spot.BottomRight,ie}),go.Shape.defineFigureGenerator("Collate",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,.5*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te));var le=new go.PathFigure(.5*z,.5*te,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),se.spot1=new go.Spot(.25,0),se.spot2=new go.Spot(.75,.25),se}),go.Shape.defineFigureGenerator("CreateRequest",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ce=new go.PathFigure(0,ie*te,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,ie*te)),ce.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*te)),se}),go.Shape.defineFigureGenerator("Database",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=ve*.1,ce=new go.PathFigure(z,.1*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,(.9+le)*te,(.5+ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-ie)*z,te,0,(.9+le)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*te,(.5-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*te,(.5+ie)*z,0,z,(.1-le)*te));var pe=new go.PathFigure(z,.1*te,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*te,z,(.1+le)*te,(.5+ie)*z,.2*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*te,(.5-ie)*z,.2*te,0,(.1+le)*te)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.2*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*te,z,(.2+le)*te,(.5+ie)*z,.3*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*te,(.5-ie)*z,.3*te,0,(.2+le)*te)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.3*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*te,z,(.3+le)*te,(.5+ie)*z,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*te,(.5-ie)*z,.4*te,0,(.3+le)*te)),se.spot1=new go.Spot(0,.4),se.spot2=new go.Spot(1,.9),se}),go.Shape.defineFigureGenerator("DataStorage",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,te,z,0,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.9*te,.25*z,.1*te).close()),se.spot1=new go.Spot(.226,0),se.spot2=new go.Spot(.81,1),se}),go.Shape.defineFigureGenerator("DiskStorage",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=ve*.1,ce=new go.PathFigure(z,.1*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,(.9+le)*te,(.5+ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-ie)*z,te,0,(.9+le)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*te,(.5-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*te,(.5+ie)*z,0,z,(.1-le)*te));var pe=new go.PathFigure(z,.1*te,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*te,z,(.1+le)*te,(.5+ie)*z,.2*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*te,(.5-ie)*z,.2*te,0,(.1+le)*te)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.2*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*te,z,(.2+le)*te,(.5+ie)*z,.3*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*te,(.5-ie)*z,.3*te,0,(.2+le)*te)),se.spot1=new go.Spot(0,.3),se.spot2=new go.Spot(1,.9),se}),go.Shape.defineFigureGenerator("Display",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,te,z,0,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te).close()),se.spot1=new go.Spot(.25,0),se.spot2=new go.Spot(.75,1),se}),go.Shape.defineFigureGenerator("DividedEvent",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)?ie=.2:ie<.15&&(ie=.15);var le=ve*.2,ce=new go.PathFigure(0,.2*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-le)*te,(.2-le)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*te,(.8+le)*z,0,z,(.2-le)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,.8*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,te,z,(.8+le)*te,(.8+le)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*te,(.2-le)*z,te,0,(.8+le)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,.2*te));var pe=new go.PathFigure(0,ie*te,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,ie*te)),se}),go.Shape.defineFigureGenerator("DividedProcess",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;(isNaN(ie)||ie<.1)&&(ie=.1);var le=new go.PathFigure(0,0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ce=new go.PathFigure(0,ie*te,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,ie*te)),se}),go.Shape.defineFigureGenerator("Document",function(fe,z,te){var se=new go.Geometry;te=te/.8;var ie=new go.PathFigure(0,.7*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.5*z,.4*te,.5*z,te).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(1,.6),se}),go.Shape.defineFigureGenerator("ExternalOrganization",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;(isNaN(ie)||ie<.2)&&(ie=.2);var le=new go.PathFigure(0,0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ce=new go.PathFigure(ie*z,0,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,0,ie*te)),ce.add(new go.PathSegment(go.PathSegment.Move,z,ie*te)),ce.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,ie*z,te)),ce.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*te)),se}),go.Shape.defineFigureGenerator("ExternalProcess",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te).close());var le=new go.PathFigure(.1*z,.4*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Move,.9*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Move,.6*z,.1*te)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.1*te)),le.add(new go.PathSegment(go.PathSegment.Move,.4*z,.9*te)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.9*te)),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("File",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var le=new go.PathFigure(.75*z,0,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),se.spot1=new go.Spot(0,.25),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Interrupt",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z,.5*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te));var le=new go.PathFigure(z,.5*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,te));var ce=new go.PathFigure(z,.5*te,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.spot1=new go.Spot(0,.25),se.spot2=new go.Spot(.5,.75),se}),go.Shape.defineFigureGenerator("InternalStorage",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN,le=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.1);var ce=new go.PathFigure(0,0,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var pe=new go.PathFigure(ie*z,0,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ie*z,te)),pe.add(new go.PathSegment(go.PathSegment.Move,0,le*te)),pe.add(new go.PathSegment(go.PathSegment.Line,z,le*te)),se}),go.Shape.defineFigureGenerator("Junction",function(fe,z,te){var se=new go.Geometry,ie=1/Math.SQRT2,le=(1-1/Math.SQRT2)/2,ce=ve*.5,pe=.5,xe=new go.PathFigure(z,pe*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,te,z,(pe+ce)*te,(pe+ce)*z,te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,pe*te,(pe-ce)*z,te,0,(pe+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,0,0,(pe-ce)*te,(pe-ce)*z,0)),xe.add(new go.PathSegment(go.PathSegment.Bezier,z,pe*te,(pe+ce)*z,0,z,(pe-ce)*te));var je=new go.PathFigure((le+ie)*z,(le+ie)*te,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le*z,le*te)),je.add(new go.PathSegment(go.PathSegment.Move,le*z,(le+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Line,(le+ie)*z,le*te)),se}),go.Shape.defineFigureGenerator("LinedDocument",function(fe,z,te){var se=new go.Geometry;te=te/.8;var ie=new go.PathFigure(0,.7*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.5*z,.4*te,.5*z,te).close());var le=new go.PathFigure(.1*z,0,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.75*te)),se.spot1=new go.Spot(.1,0),se.spot2=new go.Spot(1,.6),se}),go.Shape.defineFigureGenerator("LoopLimit",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te).close()),se.spot1=new go.Spot(0,.25),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("MagneticTape",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=.5,ce=new go.PathFigure(.5*z,te,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,le*te,(le-ie)*z,te,0,(le+ie)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*te,(le-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,le*te,(le+ie)*z,0,z,(le-ie)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,(le+.1)*z,.9*te,z,(le+ie)*te,(le+ie)*z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.8),se}),go.Shape.defineFigureGenerator("ManualInput",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*te).close()),se.spot1=new go.Spot(0,.25),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("MessageFromUser",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.7);var le=new go.PathFigure(0,0,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,ie*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se.spot1=go.Spot.TopLeft,se}),go.Shape.defineFigureGenerator("MicroformProcessing",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(0,0,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ie*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,(1-ie)*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se}),go.Shape.defineFigureGenerator("MicroformRecording",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se.spot1=new go.Spot(0,.25),se.spot2=new go.Spot(1,.75),se}),go.Shape.defineFigureGenerator("MultiDocument",function(fe,z,te){var se=new go.Geometry;te=te/.8;var ie=new go.PathFigure(z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.44*te,.96*z,.47*te,.93*z,.45*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.54*te,.86*z,.57*te,.83*z,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.4*z,.4*te,.4*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0).close());var le=new go.PathFigure(.1*z,.2*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.54*te)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*te)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*te)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.44*te)),se.spot1=new go.Spot(0,.25),se.spot2=new go.Spot(.8,.77),se}),go.Shape.defineFigureGenerator("MultiProcess",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.1*z,.1*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*te).close());var le=new go.PathFigure(.2*z,.1*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*te)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*te)),le.add(new go.PathSegment(go.PathSegment.Move,.1*z,.2*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*te)),se.spot1=new go.Spot(0,.2),se.spot2=new go.Spot(.8,1),se}),go.Shape.defineFigureGenerator("OfflineStorage",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=1-ie,ce=new go.PathFigure(0,0,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,te).close());var pe=new go.PathFigure(.5*ie*z,ie*te,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,(1-.5*ie)*z,ie*te)),se}),go.Shape.defineFigureGenerator("OffPageConnector",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(.75,1),se}),go.Shape.defineFigureGenerator("Or",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=.5,ce=new go.PathFigure(z,le*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,te,z,(le+ie)*te,(le+ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,le*te,(le-ie)*z,te,0,(le+ie)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*te,(le-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,le*te,(le+ie)*z,0,z,(le-ie)*te));var pe=new go.PathFigure(z,.5*te,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.5*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),se}),go.Shape.defineFigureGenerator("PaperTape",function(fe,z,te){var se=new go.Geometry;te=te/.8;var ie=new go.PathFigure(0,.7*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.3*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.3*te,.5*z,.6*te,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.5*z,.4*te,.5*z,te).close()),se.spot1=new go.Spot(0,.49),se.spot2=new go.Spot(1,.75),se}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN,le=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.3);var ce=new go.PathFigure(0,0,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,.5*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN,le=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.3);var ce=new go.PathFigure(0,0,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ce.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se}),go.Shape.defineFigureGenerator("Procedure",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ce=new go.PathFigure((1-ie)*z,0,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Move,ie*z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,ie*z,te)),se}),go.Shape.defineFigureGenerator("Process",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ce=new go.PathFigure(ie*z,0,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,ie*z,te)),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Sort",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te).close());var le=new go.PathFigure(0,.5*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.5),se}),go.Shape.defineFigureGenerator("Start",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(ie*z,0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*te,.25*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*te,.25*z,.5*te));var ce=new go.PathFigure(ie*z,0,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,ie*z,te)),ce.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,te)),se.spot1=new go.Spot(ie,0),se.spot2=new go.Spot(1-ie,1),se}),go.Shape.defineFigureGenerator("Terminator",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*te,.25*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*te,.25*z,.5*te)),se.spot1=new go.Spot(.23,0),se.spot2=new go.Spot(.77,1),se}),go.Shape.defineFigureGenerator("TransmittalTape",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,(1-ie)*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-ie)*te).close()),se.spot1=go.Spot.TopLeft,se}),go.Shape.defineFigureGenerator("AndGate",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=new go.PathFigure(0,0,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,(.5+ie)*z,0,z,(.5-ie)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,(.5+ie)*te,(.5+ie)*z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(.55,1),se}),go.Shape.defineFigureGenerator("Buffer",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se.spot1=new go.Spot(0,.25),se.spot2=new go.Spot(.5,.75),se}),go.Shape.defineFigureGenerator("Clock",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=.5,ce=new go.PathFigure(z,le*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,te,z,(le+ie)*te,(le+ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,le*te,(le-ie)*z,te,0,(le+ie)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*te,(le-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,le*te,(le+ie)*z,0,z,(le-ie)*te));var pe=new go.PathFigure(z,le*te,!1);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,le*te));var xe=new go.PathFigure(.8*z,.75*te,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,.8*z,.25*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.6*z,.25*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.6*z,.75*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.4*z,.75*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.4*z,.25*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.25*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.75*te)),se}),go.Shape.defineFigureGenerator("Ground",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.3*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,te)),se}),go.Shape.defineFigureGenerator("Inverter",function(fe,z,te){var se=new go.Geometry,ie=ve*.1,le=.1,ce=.9,pe=.5,xe=new go.PathFigure(.8*z,.5*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,0,te)),xe.add(new go.PathSegment(go.PathSegment.Line,0,0)),xe.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*te));var je=new go.PathFigure((ce+le)*z,pe*te,!0);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,(ce+ie)*z,(pe-le)*te,(ce+le)*z,(pe-ie)*te)),se.spot1=new go.Spot(0,.25),se.spot2=new go.Spot(.4,.75),se}),go.Shape.defineFigureGenerator("NandGate",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=ve*.4,ce=ve*.1,pe=.1,xe=.9,je=.5,De=new go.PathFigure(.8*z,.5*te,!0);se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,te,.8*z,(.5+le)*te,(.4+ie)*z,te)),De.add(new go.PathSegment(go.PathSegment.Line,0,te)),De.add(new go.PathSegment(go.PathSegment.Line,0,0)),De.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),De.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*te,(.4+ie)*z,0,.8*z,(.5-le)*te));var Fe=new go.PathFigure((xe+pe)*z,je*te,!0);return se.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je+pe)*te,(xe+pe)*z,(je+ce)*te,(xe+ce)*z,(je+pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z,je*te,(xe-ce)*z,(je+pe)*te,(xe-pe)*z,(je+ce)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-pe)*te,(xe-pe)*z,(je-ce)*te,(xe-ce)*z,(je-pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z,je*te,(xe+ce)*z,(je-pe)*te,(xe+pe)*z,(je-ce)*te)),se.spot1=new go.Spot(0,.05),se.spot2=new go.Spot(.55,.95),se}),go.Shape.defineFigureGenerator("NorGate",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*ie,ce=0,pe=.5,xe=new go.PathFigure(.8*z,.5*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.7*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*te,.25*z,.25*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*te,(ce+le)*z,(pe-ie)*te,.7*z,(pe-le)*te)),ie=.1,le=ve*.1,ce=.9,pe=.5;var je=new go.PathFigure((ce-ie)*z,pe*te,!0);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ce-ie)*z,pe*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te)),se.spot1=new go.Spot(.2,.25),se.spot2=new go.Spot(.6,.75),se}),go.Shape.defineFigureGenerator("OrGate",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*ie,ce=0,pe=.5,xe=new go.PathFigure(0,0,!0);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,(ce+le+le)*z,(pe-ie)*te,.8*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.8*z,(pe+le)*te,(ce+le+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*te,.25*z,.25*te).close()),se.spot1=new go.Spot(.2,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("XnorGate",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*ie,ce=.2,pe=.5,xe=new go.PathFigure(.1*z,0,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,te,.35*z,.25*te,.35*z,.75*te));var je=new go.PathFigure(.8*z,.5*te,!0);se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,te,.7*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*te,.45*z,.25*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*te,(ce+le)*z,(pe-ie)*te,.7*z,(pe-le)*te)),ie=.1,le=ve*.1,ce=.9,pe=.5;var De=new go.PathFigure((ce-ie)*z,pe*te,!0);return se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ce-ie)*z,pe*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te)),se.spot1=new go.Spot(.4,.25),se.spot2=new go.Spot(.65,.75),se}),go.Shape.defineFigureGenerator("XorGate",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*ie,ce=.2,pe=.5,xe=new go.PathFigure(.1*z,0,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,te,.35*z,.25*te,.35*z,.75*te));var je=new go.PathFigure(.2*z,0,!0);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,(ce+le)*z,(pe-ie)*te,.9*z,(pe-le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,te,.9*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*te,.45*z,.25*te).close()),se.spot1=new go.Spot(.4,.25),se.spot2=new go.Spot(.8,.75),se}),go.Shape.defineFigureGenerator("Capacitor",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),se}),go.Shape.defineFigureGenerator("Resistor",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*te)),se}),go.Shape.defineFigureGenerator("Inductor",function(fe,z,te){var se=new go.Geometry,ie=ve*.1,le=.1,ce=.1,pe=.5,xe=new go.PathFigure((ce-ie*.5)*z,te,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,0,(ce-ie)*z,te,(ce-le)*z,0)),ce=.3,xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,te,(ce+le)*z,0,(ce+ie)*z,te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,0,(ce-ie)*z,te,(ce-le)*z,0)),ce=.5,xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,te,(ce+le)*z,0,(ce+ie)*z,te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,0,(ce-ie)*z,te,(ce-le)*z,0)),ce=.7,xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,te,(ce+le)*z,0,(ce+ie)*z,te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,0,(ce-ie)*z,te,(ce-le)*z,0)),ce=.9,xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie*.5)*z,te,(ce+le)*z,0,(ce+ie)*z,te)),se}),go.Shape.defineFigureGenerator("ACvoltageSource",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=.5,ce=.5,pe=.5,xe=new go.PathFigure((ce-le)*z,pe*te,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,(ce+ie)*z,(pe-le)*te,(ce+le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Move,(ce-le+.1)*z,pe*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le-.1)*z,pe*te,ce*z,(pe-le)*te,ce*z,(pe+le)*te)),se}),go.Shape.defineFigureGenerator("DCvoltageSource",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.75*te,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),se}),go.Shape.defineFigureGenerator("Diode",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),se.spot1=new go.Spot(0,.25),se.spot2=new go.Spot(.5,.75),se}),go.Shape.defineFigureGenerator("Wifi",function(fe,z,te){var se=new go.Geometry,ie=z,le=te;z=z*.38,te=te*.6;var ce=ve*.8,pe=.8,xe=0,je=.5,De=(ie-z)/2,Fe=(le-te)/2,Te=new go.PathFigure(xe*z+De,(je+pe)*te+Fe,!0);se.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z+De,je*te+Fe,(xe-ce)*z+De,(je+pe)*te+Fe,(xe-pe)*z+De,(je+ce)*te+Fe)),Te.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe-pe)*z+De,(je-ce)*te+Fe,(xe-ce)*z+De,(je-pe)*te+Fe)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe+ce*.5)*z+De,je*te+Fe,xe*z+De,(je-pe)*te+Fe,(xe-pe+ce*.5)*z+De,(je-ce)*te+Fe)),Te.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe-pe+ce*.5)*z+De,(je+ce)*te+Fe,xe*z+De,(je+pe)*te+Fe).close()),ce=ve*.4,pe=.4,xe=.2,je=.5;var Me=new go.PathFigure(xe*z+De,(je+pe)*te+Fe,!0);se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z+De,je*te+Fe,(xe-ce)*z+De,(je+pe)*te+Fe,(xe-pe)*z+De,(je+ce)*te+Fe)),Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe-pe)*z+De,(je-ce)*te+Fe,(xe-ce)*z+De,(je-pe)*te+Fe)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe+ce*.5)*z+De,je*te+Fe,xe*z+De,(je-pe)*te+Fe,(xe-pe+ce*.5)*z+De,(je-ce)*te+Fe)),Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe-pe+ce*.5)*z+De,(je+ce)*te+Fe,xe*z+De,(je+pe)*te+Fe).close()),ce=ve*.2,pe=.2,xe=.5,je=.5;var Be=new go.PathFigure((xe-pe)*z+De,je*te+Fe,!0);se.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe-pe)*z+De,(je-ce)*te+Fe,(xe-ce)*z+De,(je-pe)*te+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z+De,je*te+Fe,(xe+ce)*z+De,(je-pe)*te+Fe,(xe+pe)*z+De,(je-ce)*te+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe+pe)*z+De,(je+ce)*te+Fe,(xe+ce)*z+De,(je+pe)*te+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z+De,je*te+Fe,(xe-ce)*z+De,(je+pe)*te+Fe,(xe-pe)*z+De,(je+ce)*te+Fe)),ce=ve*.4,pe=.4,xe=.8,je=.5;var Ue=new go.PathFigure(xe*z+De,(je-pe)*te+Fe,!0);se.add(Ue),Ue.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z+De,je*te+Fe,(xe+ce)*z+De,(je-pe)*te+Fe,(xe+pe)*z+De,(je-ce)*te+Fe)),Ue.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe+pe)*z+De,(je+ce)*te+Fe,(xe+ce)*z+De,(je+pe)*te+Fe)),Ue.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe-ce*.5)*z+De,je*te+Fe,xe*z+De,(je+pe)*te+Fe,(xe+pe-ce*.5)*z+De,(je+ce)*te+Fe)),Ue.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe+pe-ce*.5)*z+De,(je-ce)*te+Fe,xe*z+De,(je-pe)*te+Fe).close()),ce=ve*.8,pe=.8,xe=1,je=.5;var Ye=new go.PathFigure(xe*z+De,(je-pe)*te+Fe,!0);return se.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z+De,je*te+Fe,(xe+ce)*z+De,(je-pe)*te+Fe,(xe+pe)*z+De,(je-ce)*te+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe+pe)*z+De,(je+ce)*te+Fe,(xe+ce)*z+De,(je+pe)*te+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe-ce*.5)*z+De,je*te+Fe,xe*z+De,(je+pe)*te+Fe,(xe+pe-ce*.5)*z+De,(je+ce)*te+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe+pe-ce*.5)*z+De,(je-ce)*te+Fe,xe*z+De,(je-pe)*te+Fe).close()),se}),go.Shape.defineFigureGenerator("Email",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,0,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.54*te)),le.add(new go.PathSegment(go.PathSegment.Move,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.54*te)),se}),go.Shape.defineFigureGenerator("Ethernet",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.35*z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,0).close());var le=new go.PathFigure(.1*z,te,!0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,te)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,te).close());var ce=new go.PathFigure(.6*z,te,!0,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.9*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.6*z,te).close());var pe=new go.PathFigure(0,.5*te,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.25*z,.6*te)),se}),go.Shape.defineFigureGenerator("Power",function(fe,z,te){var se=new go.Geometry,ie=ve*.4,le=.4,ce=.5,pe=.5,xe=at(),je=at(),De=at(),Fe=at();He(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.5,xe,xe,je,De,Fe);var Te=pt(je.x,je.y),Me=new go.PathFigure(je.x*z,je.y*te,!0);se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te)),He(ce-le,pe,ce-le,pe-ie,ce-ie,pe-le,ce,pe-le,.5,De,Fe,je,xe,xe),Me.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te)),ie=ve*.3,le=.3,He(ce-le,pe,ce-le,pe-ie,ce-ie,pe-le,ce,pe-le,.5,De,Fe,je,xe,xe),Me.add(new go.PathSegment(go.PathSegment.Line,je.x*z,je.y*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,Fe.x*z,Fe.y*te,De.x*z,De.y*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),He(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.5,xe,xe,je,De,Fe),Me.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*te,Fe.x*z,Fe.y*te,De.x*z,De.y*te).close());var Me=new go.PathFigure(.45*z,0,!0);return se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),Ut(xe),Ut(je),Ut(De),Ut(Fe),Ut(Te),se.spot1=new go.Spot(.25,.45),se.spot2=new go.Spot(.75,.8),se}),go.Shape.defineFigureGenerator("Fallout",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te/2,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,180,360,z/2,te/2,z/2,te/2));function le(ce,pe,xe){ce.add(new go.PathSegment(go.PathSegment.Move,(.3+pe)*z,(.8+xe)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,(.5+pe)*z,(.5+xe)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,(.1+pe)*z,(.5+xe)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,(.3+pe)*z,(.8+xe)*te).close())}return le(ie,0,0),le(ie,.4,0),le(ie,.2,-.3),se}),go.Shape.defineFigureGenerator("IrritationHazard",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.2*z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*te).close()),se.spot1=new go.Spot(.3,.3),se.spot2=new go.Spot(.7,.7),se}),go.Shape.defineFigureGenerator("ElectricalHazard",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.37*z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.11*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.04*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.49*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.37*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.63*z,.86*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.91*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,.78*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.44*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.56*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.68*te).close()),se}),go.Shape.defineFigureGenerator("FireHazard",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.1*z,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.29*z,0,-.25*z,.63*te,.45*z,.44*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.51*z,.42*te,.48*z,.17*te,.54*z,.35*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.59*z,.18*te,.59*z,.29*te,.58*z,.28*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,.6*te,.8*z,.34*te,.88*z,.43*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.88*z,.31*te,.87*z,.48*te,.88*z,.43*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,te,1.17*z,.76*te,.82*z,.8*te).close()),se.spot1=new go.Spot(.07,.445),se.spot2=new go.Spot(.884,.958),se}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(fe,z,te){var se=new go.Geometry,ie=.5,le=0,ce=0,pe=ie*ve,xe=.4*Math.SQRT2/2+.5,je=.5-.5*Math.SQRT2/2,De=1,Fe=.5,Te=.5,Me=0,Be=new go.PathFigure(xe*z,(1-je)*te,!1);return se.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,De*z,Fe*te,De*z,.7*te,De*z,Fe*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Te+le)*z,(Me+le)*te,(.5+ie+le)*z,(.5-pe+le)*te,(.5+pe+le)*z,(.5-ie+le)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ce)*te,(.5-pe+le)*z,(.5-ie+ce)*te,(.5-ie+le)*z,(.5-pe+ce)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.35+le)*z,.9*te,(.5-ie+le)*z,(.5+pe+ce)*te,(.5-pe+le)*z,.9*te)),Be.add(new go.PathSegment(go.PathSegment.Move,(.25+le)*z,.8*te)),Be.add(new go.PathSegment(go.PathSegment.Line,(.35+le)*z,.9*te)),Be.add(new go.PathSegment(go.PathSegment.Line,(.2+le)*z,.95*te)),se}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),se}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Move,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),se}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);se.add(ie);var le=new go.PathFigure(z,te,!1);se.add(le);var ce=new go.PathFigure(0,.5*te,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*te,.2*z,.35*te,.3*z,.35*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,.7*z,.65*te,.8*z,.65*te)),se}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te).close()),se}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.2*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*te).close());var ie=new go.PathFigure(0,.2*te,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*te)),se}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.7*z,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,0,.6*z,.5*te,0,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,te,.4*z,.5*te,z,.5*te).close());var le=new go.PathFigure(.45*z,.73*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.73*te)),le.add(new go.PathSegment(go.PathSegment.Move,.38*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,.63*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Move,.31*z,.27*te)),le.add(new go.PathSegment(go.PathSegment.Line,.56*z,.27*te)),se}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);se.add(ie);var le=new go.PathFigure(.335*z,(1-.555)*te,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.68*te,(1-.12)*z,.46*te,(1-.02)*z,.54*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.68*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.335*z,(1-.555)*te,.02*z,.54*te,.12*z,.46*te)),le.add(new go.PathSegment(go.PathSegment.Line,.365*z,(1-.595)*te));var ce=.5-.285,pe=.5,xe=ce,je=Math.PI/4,De=4*(1-Math.cos(je))/(3*Math.sin(je)),Fe=De*.5,Te=ce,Me=ce,Be=De*Te,Ue=De*Me;le.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Te)*z,xe*te,(pe-(Be+Te)/2)*z,(xe+(Me+Ue)/2)*te,(pe-Te)*z,(xe+Ue)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,(xe-Me)*te,(pe-Te)*z,(xe-Ue)*te,(pe-Be)*z,(xe-Me)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Te)*z,xe*te,(pe+Be)*z,(xe-Me)*te,(pe+Te)*z,(xe-Ue)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*te,(pe+Te)*z,(xe+Ue)*te,(pe+(Be+Te)/2)*z,(xe+(Me+Ue)/2)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*z,(1-.595)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*te)),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*te));var Ye=new go.PathFigure(.2*z,te,!1);se.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*te));var Ve=new go.PathFigure(.8*z,te,!1);return se.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*te)),se}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.1*z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,te).close());var le=new go.PathFigure(.2*z,.2*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*te)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.8*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*te)),se}),go.Shape.defineFigureGenerator("BpmnEventError",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.5*te).close()),se}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);se.add(ie);var le=new go.PathFigure(z,te,!1);se.add(le);var ce=new go.PathFigure(.1*z,te,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,.9*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te).close()),se}),go.Shape.defineFigureGenerator("Caution",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.05*z,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.8*te,0,te,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.1*te,.5*z,0,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.95*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,te,z,te,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,te));var le=.05;return ie.add(new go.PathSegment(go.PathSegment.Move,(.5-le)*z,.875*te)),ie.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*z,.875*te,le*z,le*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.325*te,.575*z,.725*te,.625*z,.375*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.75*te,.375*z,.375*te,.425*z,.725*te)),se}),go.Shape.defineFigureGenerator("Recycle",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.45*z,.95*te,!1);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.95*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.185*z,.85*te,.17*z,.95*te,.15*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.235*z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.625*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.275*z,.45*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.45*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.575*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1875*z,.95*te,0,.675*te,0,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.45*z,.95*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.775*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.22*z,.775*te));var le=new go.PathFigure(.475*z,.2*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,.225*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Line,.275*z,.175*te)),le.add(new go.PathSegment(go.PathSegment.Line,.325*z,.05*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.05*te,.35*z,0,.375*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.575*z,.375*te)),le.add(new go.PathSegment(go.PathSegment.Line,.525*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.475*te)),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.315*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.32*te)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.05*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,0,.65*z,.05*te,.625*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.38*z,.0105*te));var ce=new go.PathFigure(.675*z,.575*te,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,.775*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*te,z,.8*te,z,.85*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.65*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,.775*te)),ce.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.775*z,.775*te)),se}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*.5,ce=new go.PathFigure(z,ie*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,te,z,(ie+le)*te,(ie+le)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,ie*te,(ie-le)*z,te,0,(ie+le)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,0,0,(ie-le)*te,(ie-le)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,ie*te,(ie+le)*z,0,z,(ie-le)*te));var pe=new go.PathFigure(ie*z,0,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ie*z,.15*te)),pe.add(new go.PathSegment(go.PathSegment.Move,ie*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,ie*z,.85*te)),pe.add(new go.PathSegment(go.PathSegment.Move,0,ie*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.15*z,ie*te)),pe.add(new go.PathSegment(go.PathSegment.Move,z,ie*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.85*z,ie*te)),pe.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*te)),pe.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.78*z,.54*te)),se}),go.Shape.defineFigureGenerator("Package",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.15*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var le=new go.PathFigure(0,.15*te,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.15*te).close()),se.spot1=new go.Spot(0,.1),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Class",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*te).close());var ce=new go.PathFigure(0,.5*te,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,.5*te).close()),se}),go.Shape.defineFigureGenerator("Component",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te).close());var le=new go.PathFigure(0,.2*te,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.2*te)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.2*te).close());var ce=new go.PathFigure(0,.6*te,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,.6*te).close()),se}),go.Shape.defineFigureGenerator("Boat Shipment",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.15*z,.6*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*te));var le=new go.PathFigure(.15*z,.6*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*te)),se}),go.Shape.defineFigureGenerator("Customer/Supplier",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.33*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.33*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te).close()),se}),go.Shape.defineFigureGenerator("Workcell",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se}),go.Shape.defineFigureGenerator("Supermarket",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.33*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*te)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.33*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.66*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.66*te)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.66*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),se}),go.Shape.defineFigureGenerator("TruckShipment",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(z,.8*te,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.8*te).close());var ce=.1,pe=ve*.1,xe=.2,je=.9,De=new go.PathFigure((xe-ce)*z,je*te,!0);se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-ce)*te,(xe-ce)*z,(je-pe)*te,(xe-pe)*z,(je-ce)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe+ce)*z,je*te,(xe+pe)*z,(je-ce)*te,(xe+ce)*z,(je-pe)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je+ce)*te,(xe+ce)*z,(je+pe)*te,(xe+pe)*z,(je+ce)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe-ce)*z,je*te,(xe-pe)*z,(je+ce)*te,(xe-ce)*z,(je+pe)*te).close()),ce=.1,pe=ve*.1,xe=.8,je=.9;var Fe=new go.PathFigure((xe-ce)*z,je*te,!0);return se.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-ce)*te,(xe-ce)*z,(je-pe)*te,(xe-pe)*z,(je-ce)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe+ce)*z,je*te,(xe+pe)*z,(je-ce)*te,(xe+ce)*z,(je-pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je+ce)*te,(xe+ce)*z,(je+pe)*te,(xe+pe)*z,(je+ce)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe-ce)*z,je*te,(xe-pe)*z,(je+ce)*te,(xe-ce)*z,(je+pe)*te).close()),se}),go.Shape.defineFigureGenerator("KanbanPost",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.2*z,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,te)),se}),go.Shape.defineFigureGenerator("Forklift",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0));var le=new go.PathFigure(0,.5*te,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var ce=new go.PathFigure(.5*z,.8*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*te));var pe=new go.PathFigure(.5*z,.7*te,!1);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,.7*te));var xe=.1,je=ve*.1,De=.1,Fe=.9,Te=new go.PathFigure((De-xe)*z,Fe*te,!0);se.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe-xe)*te,(De-xe)*z,(Fe-je)*te,(De-je)*z,(Fe-xe)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(De+xe)*z,Fe*te,(De+je)*z,(Fe-xe)*te,(De+xe)*z,(Fe-je)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe+xe)*te,(De+xe)*z,(Fe+je)*te,(De+je)*z,(Fe+xe)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(De-xe)*z,Fe*te,(De-je)*z,(Fe+xe)*te,(De-xe)*z,(Fe+je)*te)),xe=.1,je=ve*.1,De=.4,Fe=.9;var Me=new go.PathFigure((De-xe)*z,Fe*te,!0);return se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe-xe)*te,(De-xe)*z,(Fe-je)*te,(De-je)*z,(Fe-xe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(De+xe)*z,Fe*te,(De+je)*z,(Fe-xe)*te,(De+xe)*z,(Fe-je)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe+xe)*te,(De+xe)*z,(Fe+je)*te,(De+je)*z,(Fe+xe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(De-xe)*z,Fe*te,(De-je)*z,(Fe+xe)*te,(De-xe)*z,(Fe+je)*te)),se}),go.Shape.defineFigureGenerator("RailShipment",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.1*z,.4*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.4*te).close());var le=new go.PathFigure(.45*z,.7*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*te));var ce=new go.PathFigure(.55*z,.4*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*te).close());var De=.05,Fe=ve*.05,Te=.175,Me=.95,pe=new go.PathFigure((Te-De)*z,Me*te,!0);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me-De)*te,(Te-De)*z,(Me-Fe)*te,(Te-Fe)*z,(Me-De)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Me*te,(Te+Fe)*z,(Me-De)*te,(Te+De)*z,(Me-Fe)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me+De)*te,(Te+De)*z,(Me+Fe)*te,(Te+Fe)*z,(Me+De)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Me*te,(Te-Fe)*z,(Me+De)*te,(Te-De)*z,(Me+Fe)*te));var De=.05,Fe=ve*.05,Te=.375,Me=.95,xe=new go.PathFigure((Te-De)*z,Me*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me-De)*te,(Te-De)*z,(Me-Fe)*te,(Te-Fe)*z,(Me-De)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Me*te,(Te+Fe)*z,(Me-De)*te,(Te+De)*z,(Me-Fe)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me+De)*te,(Te+De)*z,(Me+Fe)*te,(Te+Fe)*z,(Me+De)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Me*te,(Te-Fe)*z,(Me+De)*te,(Te-De)*z,(Me+Fe)*te));var De=.05,Fe=ve*.05,Te=.625,Me=.95,je=new go.PathFigure((Te-De)*z,Me*te,!0);se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me-De)*te,(Te-De)*z,(Me-Fe)*te,(Te-Fe)*z,(Me-De)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Me*te,(Te+Fe)*z,(Me-De)*te,(Te+De)*z,(Me-Fe)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me+De)*te,(Te+De)*z,(Me+Fe)*te,(Te+Fe)*z,(Me+De)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Me*te,(Te-Fe)*z,(Me+De)*te,(Te-De)*z,(Me+Fe)*te));var De=.05,Fe=ve*.05,Te=.825,Me=.95,Be=new go.PathFigure((Te-De)*z,Me*te,!0);se.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me-De)*te,(Te-De)*z,(Me-Fe)*te,(Te-Fe)*z,(Me-De)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Me*te,(Te+Fe)*z,(Me-De)*te,(Te+De)*z,(Me-Fe)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me+De)*te,(Te+De)*z,(Me+Fe)*te,(Te+Fe)*z,(Me+De)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Me*te,(Te-Fe)*z,(Me+De)*te,(Te-De)*z,(Me+Fe)*te).close());var Ue=new go.PathFigure(0,te,!1);return se.add(Ue),Ue.add(new go.PathSegment(go.PathSegment.Line,z,te).close()),se}),go.Shape.defineFigureGenerator("Warehouse",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*te).close());var ce=new go.PathFigure(.15*z,te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.4*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,.15*z,te).close());var pe=.05,xe=ve*.05,je=.35,De=.775,Fe=new go.PathFigure((je-pe)*z,De*te,!0);return se.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(De-pe)*te,(je-pe)*z,(De-xe)*te,(je-xe)*z,(De-pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(je+pe)*z,De*te,(je+xe)*z,(De-pe)*te,(je+pe)*z,(De-xe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(De+pe)*te,(je+pe)*z,(De+xe)*te,(je+xe)*z,(De+pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(je-pe)*z,De*te,(je-xe)*z,(De+pe)*te,(je-pe)*z,(De+xe)*te).close()),se}),go.Shape.defineFigureGenerator("ControlCenter",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.1*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*te).close()),se}),go.Shape.defineFigureGenerator("Bluetooth",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.75*te,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),se}),go.Shape.defineFigureGenerator("Bookmark",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*te)),se}),go.Shape.defineFigureGenerator("Bookmark",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*te)),se}),go.Shape.defineFigureGenerator("Globe",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,.75*z,0,z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,.75*te,.75*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.25*z,te,0,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,.25*te,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,.15*z,.25*te,.15*z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.85*z,.75*te,.85*z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.15*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.15*te,.35*z,.3*te,.65*z,.3*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.85*te,.35*z,.7*te,.65*z,.7*te)),se}),go.Shape.defineFigureGenerator("Wave",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.25*te,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.25*te,.1*z,0,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.25*te,.425*z,.5*te,.575*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.25*te,.8*z,0,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.75*te,.1*z,.5*te,.2*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.75*te,.425*z,te,.575*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.75*te,.8*z,.5*te,.9*z,.5*te)),se}),go.Shape.defineFigureGenerator("Operator",function(fe,z,te){var se=new go.Geometry,ie=.3,le=ve*.3,ce=.5,pe=.7,xe=new go.PathFigure((ce-ie)*z,pe*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce-ie)*z,pe*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te));var je=new go.PathFigure(0,.7*te,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*te,0,0,z,0)),se}),go.Shape.defineFigureGenerator("TripleFanBlades",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*te,.65*z,.3*te,.65*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.35*z,.5*te,.35*z,.3*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.3*z,.6*te,.1*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*te,.2*z,te,.35*z,.95*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,te,.7*z,.6*te,.9*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*te,.8*z,te,.65*z,.95*te)),se}),go.Shape.defineFigureGenerator("CentrifugalPump",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,0,.075*te,0,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,te,0,te,.4*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.4*te,.8*z,te,.85*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),se}),go.Shape.defineFigureGenerator("Battery",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.1*te));var le=new go.PathFigure(0,.6*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Move,0,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*te)),se}),go.Shape.defineFigureGenerator("Delete",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*.5,ce=.5,pe=.5,xe=new go.PathFigure((ce-ie)*z,pe*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce-ie)*z,pe*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te));var je=new go.PathFigure(.15*z,.5*te,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*te)),se}),go.Shape.defineFigureGenerator("Flag",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.1*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.1*te,.15*z,0,.35*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*te,.65*z,.2*te,.85*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*te,.85*z,.6*te,.65*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.35*z,.4*te,.15*z,.4*te).close()),se}),go.Shape.defineFigureGenerator("Help",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*.5,ce=.5,pe=.5,xe=new go.PathFigure((ce-ie)*z,pe*te,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce-ie)*z,pe*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te).close()),ie=.05,le=ve*.05,ce=.5,pe=.8;var je=new go.PathFigure((ce-ie)*z,pe*te,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ce-ie)*z,pe*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te).close()),je.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*te)),je.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*te,.75*z,.475*te,.75*z,.225*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.35*te,.4*z,.2*te,.3*z,.25*te)),se}),go.Shape.defineFigureGenerator("Location",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.5*z,te,!0).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.975*z,.025*te,.5*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*z,.5*te,.5*z,0,.025*z,.025*te).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*te)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*z,.3*te,.1*z,.1*te).close()))}),go.Shape.defineFigureGenerator("Lock",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var le=new go.PathFigure(.2*z,.5*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*te,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.3*te)),se}),go.Shape.defineFigureGenerator("Unlocked",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var le=new go.PathFigure(.2*z,.5*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*te,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.35*te)),se}),go.Shape.defineFigureGenerator("Gear",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.9375*z,.56246875*te,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.4375*te)).add(new go.PathSegment(go.PathSegment.Line,.80621875*z,.4375*te)).add(new go.PathSegment(go.PathSegment.Bezier,.763*z,.3316875*te,.79840625*z,.39915625*te,.7834375*z,.3635*te)).add(new go.PathSegment(go.PathSegment.Line,.8566875*z,.23796875*te)).add(new go.PathSegment(go.PathSegment.Line,.76825*z,.14959375*te)).add(new go.PathSegment(go.PathSegment.Line,.67596875*z,.24184375*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*z,.19378125*te,.64228125*z,.2188125*te,.603875*z,.2021875*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.0625*te)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.0625*te)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.19378125*te)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*z,.239375*te,.39759375*z,.20190625*te,.36053125*z,.2176875*te)).add(new go.PathSegment(go.PathSegment.Line,.2379375*z,.14959375*te)).add(new go.PathSegment(go.PathSegment.Line,.14953125*z,.2379375*te)).add(new go.PathSegment(go.PathSegment.Line,.23934375*z,.3278125*te)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*z,.4375*te,.21765625*z,.36059375*te,.201875*z,.397625*te)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.4375*te)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.5625*te)).add(new go.PathSegment(go.PathSegment.Line,.1938125*z,.5625*te)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*z,.67596875*te,.20221875*z,.603875*te,.21884375*z,.64228125*te)).add(new go.PathSegment(go.PathSegment.Line,.1495625*z,.76825*te)).add(new go.PathSegment(go.PathSegment.Line,.238*z,.8566875*te)).add(new go.PathSegment(go.PathSegment.Line,.3316875*z,.76296875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*z,.80621875*te,.36353125*z,.78340625*te,.3991875*z,.79840625*te)).add(new go.PathSegment(go.PathSegment.Line,.43753125*z,.9375*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.9375*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.80621875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*z,.760625*te,.602375*z,.79809375*te,.63946875*z,.78234375*te)).add(new go.PathSegment(go.PathSegment.Line,.76828125*z,.8566875*te)).add(new go.PathSegment(go.PathSegment.Line,.85671875*z,.76825*te)).add(new go.PathSegment(go.PathSegment.Line,.76065625*z,.67221875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*z,.56246875*te,.78234375*z,.63940625*te,.798125*z,.602375*te)).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.56246875*te).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.6*te)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*z,.5*te,.1*z,.1*te).close()))}),go.Shape.defineFigureGenerator("Hand",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.3*te,0,.375*te,.05*z,.325*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.075*te,.3*z,.225*te,.4*z,.175*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.525*z,.075*te,.46*z,.05*te,.525*z,.05*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.4*te,.525*z,.275*te,.475*z,.325*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.55*te,z,.4*te,z,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.425*z,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.7*te,.675*z,.55*te,.675*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.575*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,.85*te,.65*z,.7*te,.65*z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.535*z,te,.61*z,.85*te,.61*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,.435*z,te,0,te).close()),se}),go.Shape.defineFigureGenerator("Map",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.2*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*te)),se}),go.Shape.defineFigureGenerator("Eject",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te*.7)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.7).close());var le=new go.PathFigure(0,te*.6,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close()),se}),go.Shape.defineFigureGenerator("Pencil",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*te)).add(new go.PathSegment(go.PathSegment.Line,z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.9*z,te)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*te).close()))}),go.Shape.defineFigureGenerator("Building",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*1,te*1,!1);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,te*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,te*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,te*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,te*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te*.85).close());var le=new go.PathFigure(.126*z,.85*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.126*z,.45*te)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.45*te)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.85*te).close());var ce=new go.PathFigure(.402*z,.85*te,!1);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.598*z,.85*te).close());var pe=new go.PathFigure(.678*z,.85*te,!1);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.874*z,.85*te).close());var xe=new go.PathFigure(.5*z,.1*te,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*z,.3*te)),xe.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*z,.3*te).close()),se}),go.Shape.defineFigureGenerator("Staircase",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te*1,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,te*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,te*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,te*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,te*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.95).close()),se}),go.Shape.defineFigureGenerator("5Bars",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te*1,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,te*(1-.184)).close());var le=new go.PathFigure(z*.204,te,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.204,te*(1-.184))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,te*(1-.184*2))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,te*1).close());var ce=new go.PathFigure(z*.408,te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*.408,te*(1-.184*2))),ce.add(new go.PathSegment(go.PathSegment.Line,z*.592,te*(1-.184*3))),ce.add(new go.PathSegment(go.PathSegment.Line,z*.592,te*1).close());var pe=new go.PathFigure(z*.612,te,!0);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.612,te*(1-.184*3))),pe.add(new go.PathSegment(go.PathSegment.Line,z*.796,te*(1-.184*4))),pe.add(new go.PathSegment(go.PathSegment.Line,z*.796,te*1).close());var xe=new go.PathFigure(z*.816,te,!0);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,z*.816,te*(1-.184*4))),xe.add(new go.PathSegment(go.PathSegment.Line,z*1,te*(1-.184*5))),xe.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1).close()),se}),go.Shape.defineFigureGenerator("PC",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,0).close());var le=new go.PathFigure(z*.055,.07*te,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.07)),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.055,te*.1).close());var ce=new go.PathFigure(z*.055,.13*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.13)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.16)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.055,te*.16).close());var pe=new go.PathFigure(z*.055,.18*te,!0);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.18)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.21)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.055,te*.21).close());var xe=new go.PathFigure(z*1,0,!0);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,z*.4,0)),xe.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.65)),xe.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.65).close()),se}),go.Shape.defineFigureGenerator("Plane",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.55*z,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.475*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.35*z,.525*te,0,.4*te,.225*z,.45*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.475*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.35*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.325*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.325*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.2*te,.975*z,0,z,.08*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.45*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.95*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.55*z,te).close()),se}),go.Shape.defineFigureGenerator("Key",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*1,te*.5,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.35*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.35*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.35*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,.575*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.6*te).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.17*z,.425*te)),ie.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*z,.5*te,.075*z,.075*te).close()),se}),go.Shape.defineFigureGenerator("FilmTape",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*0,z*.3,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1));var le=new go.PathFigure(0,0,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*1,te*0)),le.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*1,z*.3,z*.055)),le.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1));var ce=new go.PathFigure(z*.11,te*.1,!1);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),te*.1)),ce.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),te*.8)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.11,te*.8).close());var pe=new go.PathFigure(z*(.11+.24133333*1+.028*1),te*.1,!1);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),te*.1)),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),te*.8)),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*1),te*.8).close());var xe=new go.PathFigure(z*(.11+.24133333*2+.028*2),te*.1,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),te*.1)),xe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),te*.8)),xe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*2),te*.8).close()),se}),go.Shape.defineFigureGenerator("FloppyDisk",function(fe,z,te){var se=new go.Geometry,ie=8,le=ie*ve,ce=new go.PathFigure(ie,0,!1);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),ce.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.14)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te-ie)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,te,z,te-le,z-le,te)),ce.add(new go.PathSegment(go.PathSegment.Line,ie,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,te-ie,le,te,0,te-le)),ce.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ce.add(new go.PathSegment(go.PathSegment.Bezier,ie,0,0,le,le,0).close());var pe=new go.PathFigure(z*.83,0,!1);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.83,te*.3)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,te*.3)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,te*0).close());var xe=new go.PathFigure(z*.83,te*1,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,z*.83,te*.5)),xe.add(new go.PathSegment(go.PathSegment.Line,z*.17,te*.5)),xe.add(new go.PathSegment(go.PathSegment.Line,z*.17,te*1).close());var je=new go.PathFigure(z*.78,te*.05,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.05)),je.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.25)),je.add(new go.PathSegment(go.PathSegment.Line,z*.78,te*.25).close()),se}),go.Shape.defineFigureGenerator("SpeechBubble",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=15),se=Math.min(se,z/3),se=Math.min(se,te/3);var ie=se*ve,le=te*.8,ce=new go.Geometry,pe=new go.PathFigure(se,0,!0);return ce.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z-se,0)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z,se,z-ie,0,z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,z,le-se)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-se,le,z,le-ie,z-ie,le)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.7,le)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.7,te)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.55,le)),pe.add(new go.PathSegment(go.PathSegment.Line,se,le)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,le-se,ie,le,0,le-ie)),pe.add(new go.PathSegment(go.PathSegment.Line,0,se)),pe.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,ie,ie,0).close()),ie>1?(ce.spot1=new go.Spot(0,0,ie,ie),ce.spot2=new go.Spot(1,.8,-ie,-ie)):(ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(1,.8)),ce}),go.Shape.defineFigureGenerator("Repeat",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*0,te*.45,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,te*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,te*.45).close());var le=new go.PathFigure(z*1,te*.55,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,te*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,te*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.35,te*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*.55).close()),se}),go.Shape.defineFigureGenerator("Windows",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close()).add(new go.PathSegment(go.PathSegment.Move,.4*z,.4*te)).add(new go.PathSegment(go.PathSegment.Line,.4*z,.8*te)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*te)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*te).close()).add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*te)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.6*te)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.6*te)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.1*te).close()).add(new go.PathSegment(go.PathSegment.Move,.1*z,.6*te)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te).close()))}),go.Shape.defineFigureGenerator("Terminal",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*0,te*.1,!1);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,te*.9).close());var le=new go.PathFigure(z*.1,te*.2,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,te*.25)),le.add(new go.PathSegment(go.PathSegment.Line,z*.22,te*.285)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,te*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,te*.37)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,te*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,te*.25).close());var ce=new go.PathFigure(z*.28,te*.37,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.37)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.41)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.28,te*.41).close()),se}),go.Shape.defineFigureGenerator("Beaker",function(fe,z,te){var se=new go.Geometry,ie=15,le=ie*ve,ce=new go.PathFigure(z*.62,te*.475,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,te-ie)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,te,z,te-le,z-le,te)),ce.add(new go.PathSegment(go.PathSegment.Line,ie,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,te-ie,le,te,0,te-le)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.38,te*.475)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.38,te*.03)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.36,te*0)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.64,te*0)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.62,te*.03).close()),le>1?(se.spot1=new go.Spot(0,0,le,le),se.spot2=new go.Spot(1,1,-le,-le)):(se.spot1=go.Spot.TopLeft,se.spot2=go.Spot.BottomRight),se}),go.Shape.defineFigureGenerator("Download",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*0,te*1,!0);se.add(ie);var le=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,te*(1-le)).close());var ce=new go.PathFigure(z*.4,te*0,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.44)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.26,te*.44)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*.66)),ce.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),te*.44)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.44)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*0).close()),se}),go.Shape.defineFigureGenerator("Bin",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*0,te*1,!0);se.add(ie);var le=.1/.3;return ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,te*(1-le)).close()),se}),go.Shape.defineFigureGenerator("Upload",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*0,te*1,!0);se.add(ie);var le=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,te*(1-le)).close());var ce=new go.PathFigure(z*.5,te*0,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*.26,te*.25)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.25)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.63)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.63)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.25)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.74,te*.25).close()),se}),go.Shape.defineFigureGenerator("EmptyDrink",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*.15,te*0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,te*1).close()),se}),go.Shape.defineFigureGenerator("Drink",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*.15,te*0,!1);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,te*1).close());var le=new go.PathFigure(z*.235,te*.28,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.765,te*.28)),le.add(new go.PathSegment(go.PathSegment.Line,z*.655,te*.97)),le.add(new go.PathSegment(go.PathSegment.Line,z*.345,te*.97).close()),se}),go.Shape.defineFigureGenerator("4Arrows",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*.5,te*0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,te*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,te*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,te*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,te*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,te*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,te*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,te*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,te*.25).close()),se}),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")},91e3: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 Dn={},jn="5.0",pt={},at=null,Ut=!1,oe=!1,He=null,Re=!1,de=null,ve=null,Ee=0;Ee<arguments.length;Ee++){var ke=arguments[Ee];if(ke!==null)switch(typeof ke){case"number":jn=ke.toFixed(1);break;case"string":ke.match(new RegExp("^[0-9]\\.[0-9]+$"))?jn=ke:He=ke;break;case"object":typeof ke.is3D!="undefined"?at=ke:pt=ke;break;case"boolean":Ut=ke,oe=!0;break}}at===null&&(at={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},pt.material_id!==void 0&&!oe&&(Ut=!0)),He!==null&&pt.id===void 0&&(pt.id=He);var Se="",Ae="",me=!1,Pe=null,fe=null,z=null,te=!1,se=null,ie=null,le=null,ce=null,pe=null;pt.height!==void 0&&(pt.height=Math.round(pt.height)),pt.width!==void 0&&(pt.width=Math.round(pt.width));var xe=function(ct){return parseFloat(ct)>4?parseFloat(ct):5};Dn.setHTML5Codebase=function(ct,xt){ve=ct,wt(ct,xt)},Dn.setJavaCodebase=Dn.setJavaCodebaseVersion=Dn.isCompiledInstalled=Dn.setPreCompiledScriptPath=Dn.setPreCompiledResourcePath=function(){},Dn.setHTML5CodebaseVersion=function(ct,xt){var dt=parseFloat(ct);if(dt!==NaN&&dt<5){console.log("The GeoGebra HTML5 codebase version "+dt+" is deprecated. Using version latest instead.");return}de=ct,rt(ct,xt)},Dn.getHTML5CodebaseVersion=function(){return fe},Dn.getParameters=function(){return pt},Dn.setFontsCSSURL=function(ct){ce=ct},Dn.setGiacJSURL=function(ct){},Dn.setJNLPFile=function(ct){Se=ct},Dn.setJNLPBaseDir=function(ct){},Dn.inject=function(){function ct(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var xt="auto",dt=pt.id,Mt,yt=!1,Dt=0;Dt<arguments.length;Dt++){var mt=arguments[Dt];typeof mt=="string"?(mt=mt.toLowerCase(),mt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?xt=mt:dt=arguments[Dt]):typeof mt=="boolean"?yt=mt:mt instanceof HTMLElement&&(Mt=mt)}vt();function vt(){if(!Re){setTimeout(vt,200);return}xt=St(xt);var et=Mt||document.getElementById(dt);if(!et){console.log("possibly bug on ajax loading? ");return}if(Dn.removeExistingApplet(et,!1),pt.width===void 0&&et.clientWidth&&(pt.width=et.clientWidth),pt.height===void 0&&et.clientHeight&&(pt.height=et.clientHeight),!(pt.width&&pt.height)&&xt==="html5"&&(delete pt.width,delete pt.height),Pe=xt,xt==="screenshot")Ve(et,pt);else{var We=!1;pt.hasOwnProperty("playButton")&&pt.playButton||pt.hasOwnProperty("clickToLoad")&&pt.clickToLoad?We=!0:pt.hasOwnProperty("playButtonAutoDecide")&&pt.playButtonAutoDecide&&(We=(!je()||ct())&&De()),We?(Pe="screenshot",ot(et,pt,yt,xt)):Ye(et,pt,yt)}}};function je(){try{return window.self!==window.top}catch(ct){return!0}}function De(){return pt.hasOwnProperty("screenshotGenerator")&&pt.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Dn.getViews=function(){return at},Dn.isJavaInstalled=function(){return!1};var Fe=function(ct){var xt=function(Dt){var mt=JSON.parse(Dt),vt=function(we){return we.type=="G"||we.type=="E"},et=mt.elements?mt.elements.filter(vt)[0]:mt;if(!et||!et.url){dt();return}pt.fileName=et.url,Te(et.settings||{}),at.is3D=!0;var We="https://www.geogebra.org/images/";Dn.setPreviewImage(se||et.previewUrl,We+"GeoGebra_loading.png",We+"applet_play.png"),ct()},dt=function(){pt.onError&&pt.onError(),Ct("Error: Fetching material (id "+pt.material_id+") failed.",pt)},Mt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",yt="/materials/"+pt.material_id+"?scope=basic";Me("https://"+Mt+"/api/proxy.php?path="+encodeURIComponent(yt),xt,dt)};function Te(ct){var xt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(dt){ct[dt]=!!ct[dt]}),xt.forEach(function(dt){pt[dt]===void 0&&ct[dt]!==void 0&&(pt[dt]=ct[dt])}),pt.showToolBarHelp===void 0&&(pt.showToolBarHelp=pt.showToolBar)}function Me(ct,xt,dt){var Mt=new XMLHttpRequest;Mt.open("GET",ct),Mt.onload=function(){xt(Mt.responseText)},Mt.onerror=dt,Mt.send()}Dn.isHTML5Installed=function(){return!0},Dn.getLoadedAppletType=function(){return Pe},Dn.setPreviewImage=function(ct,xt,dt){se=ct,ie=xt,le=dt},Dn.removeExistingApplet=function(ct,xt){var dt;typeof ct=="string"&&(ct=document.getElementById(ct)),Pe=null;var Mt=null;for(dt=0;dt<ct.childNodes.length;dt++){var yt=ct.childNodes[dt],Dt=yt.className;Dt==="applet_screenshot"?xt?(yt.style.display="block",Pe="screenshot"):yt.style.display="none":Dt!=="applet_scaler prerender"&&(ct.removeChild(yt),Mt=Dt&&Dt.indexOf("appletParameters")!=-1?yt.id:null,dt--)}var mt=pt.id!==void 0?pt.id:Mt,vt=window[mt];vt&&typeof vt.getBase64=="function"&&(vt.remove(),window[mt]=null)},Dn.refreshHitPoints=function(){if(xe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ct=Dn.getAppletObject();return ct&&typeof ct.recalculateEnvironments=="function"?(ct.recalculateEnvironments(),!0):!1},Dn.startAnimation=function(){var ct=Dn.getAppletObject();return ct&&typeof ct.startAnimation=="function"?(ct.startAnimation(),!0):!1},Dn.stopAnimation=function(){var ct=Dn.getAppletObject();return ct&&typeof ct.stopAnimation=="function"?(ct.stopAnimation(),!0):!1},Dn.getAppletObject=function(){var ct=pt.id!==void 0?pt.id:"ggbApplet";return window[ct]},Dn.resize=function(){};var Be=function(ct,xt,dt){var Mt=document.createElement("param");Mt.setAttribute("name",xt),Mt.setAttribute("value",dt),ct.appendChild(Mt)},Ue=function(ct){return ct&&ct!=="false"},Ye=function(ct,xt,dt){xe(fe)<=4.2&&(dt=!0);var Mt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==fe||ggbHTML5LoadedCodebaseIsWebSimple&&!te)&&(Mt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var yt=document.createElement("div");yt.classList.add("appletParameters","notranslate");var Dt=xt.width,mt=xt.height;if(xt.disableAutoScale=xt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():xt.disableAutoScale,xt.width!==void 0)if(xe(fe)<=4.4)Ue(xt.showToolBar)&&(xt.height-=7),Ue(xt.showAlgebraInput)&&(xt.height-=37),xt.width<605&&Ue(xt.showToolBar)&&(xt.width=605,Dt=605);else{var vt=100;(Ue(xt.showToolBar)||Ue(xt.showMenuBar))&&(xt.hasOwnProperty("customToolBar")&&(xt.customToolbar=xt.customToolBar),vt=Ue(xt.showMenuBar)?245:155),Dt<vt&&(xt.width=vt,Dt=vt)}yt.style.border="none",yt.style.display="inline-block";for(var et in xt)xt.hasOwnProperty(et)&&et!=="appletOnLoad"&&yt.setAttribute("data-param-"+et,xt[et]);ce&&yt.setAttribute("data-param-fontscssurl",ce),Dn.resize=function(){GGBAppletUtils.responsiveResize(ct,xt)},window.addEventListener("resize",function(Et){Dn.resize()});var We=typeof xt.appletOnLoad=="function"?xt.appletOnLoad:function(){};if(!dt&&xt.width!==void 0){xt.hasOwnProperty("showSplash")||yt.setAttribute("data-param-showSplash","false");var we=ct.querySelector(".applet_scaler.prerender"),Ne=we!==null;if(Ne)var Xe=we.querySelector(".ggb_preview");else{var Xe=ft(Dt,mt,xt.borderColor,!1);we=document.createElement("div"),we.className="applet_scaler",we.style.position="relative",we.style.display="block",we.style.width=Dt+"px",we.style.height=mt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(we,"66%"),xe(fe)>=5?(xt.appletOnLoad=function(Et){var Ft=ct.querySelector(".ggb_preview");Ft&&Ft.parentNode.removeChild(Ft),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(we),window.GGBT_wsf_view&&$(window).trigger("resize"),We(Et)},Ne||we.appendChild(Xe)):yt.appendChild(Xe),we.appendChild(yt),Ne||ct.appendChild(we),setTimeout(function(){Dn.resize()},1)}else{var nt=document.createElement("div");nt.className="applet_scaler",nt.style.position="relative",nt.style.display="block",nt.appendChild(yt),ct.appendChild(nt),xt.appletOnLoad=function(Et){Dn.resize(),We(Et)}}function Ie(Et,Ft){Ft&&typeof Ft.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Et,Ft.appletOnLoad):renderGGBElement(Et),Ct("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Ft)}function _e(Et,Ft){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Et,params:Ft}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(qt){Ie(qt.article,qt.params)}),html5AppletsToProcess=null)},xe(fe)<5&&(Et.className+=" geogebraweb")):Ie(Et,Ft)}if(Mt){scriptLoadStarted=!0;for(var Ge=0;Ge<yt.childNodes.length;Ge++){var tt=yt.childNodes[Ge].tagName;tt==="TABLE"&&(yt.removeChild(yt.childNodes[Ge]),Ge--)}if(ggbHTML5LoadedScript!==null){var ht=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');ht!=null&&ht.parentNode.removeChild(ht)}var ut=document.createElement("script"),Ot=function(){_e(yt,xt)};ut.src=Ae+z,ggbHTML5LoadedCodebaseIsWebSimple=te,ggbHTML5LoadedCodebaseVersion=fe,ggbHTML5LoadedScript=ut.src,Ct("GeoGebra HTML5 codebase loaded: '"+Ae+"'.",xt),!ve&&(!de||de=="5.0")?(te?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Ot()):Ae.requirejs?__webpack_require__.e(245).then(function(){var Et=[__webpack_require__(40245)];Ot.apply(null,Et)}.bind(this)).catch(__webpack_require__.oe):(ut.onload=Ot,ct.appendChild(ut))}else _e(yt,xt);xt.height=mt,xt.width=Dt},Ve=function(ct,xt,dt){var Mt=ft(xt.width,xt.height,xt.borderColor,dt),yt=document.createElement("div");yt.style.position="relative",yt.style.display="block",yt.style.width=xt.width+"px",yt.style.height=xt.height+"px",yt.className="applet_screenshot applet_scaler"+(dt?" applet_screenshot_play":""),yt.appendChild(Mt);var Dt=GGBAppletUtils.getScale(xt,ct,dt);dt?(ct.appendChild(lt()),window.GGBT_wsf_view||(ct.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(yt,"66%"),ct.appendChild(yt),Dt!==1&&!isNaN(Dt)&&(GGBAppletUtils.scaleElement(yt,Dt),yt.style.width=xt.width+"px",yt.style.height=xt.height+"px",yt.parentNode.style.width=xt.width*Dt+"px",yt.parentNode.style.height=xt.height*Dt+"px"),Dn.resize=function(){Ze(ct,Mt,yt,dt)},window.addEventListener("resize",function(mt){Dn.resize()}),Dn.resize()};function Ze(ct,xt,dt,Mt){if(ct.contains(xt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ct.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ct)}var yt=GGBAppletUtils.getScale(pt,ct,Mt);dt.parentNode!==null&&(!isNaN(yt)&&yt!==1?(GGBAppletUtils.scaleElement(dt,yt),dt.parentNode.style.width=pt.width*yt+"px",dt.parentNode.style.height=pt.height*yt+"px"):(GGBAppletUtils.scaleElement(dt,1),dt.parentNode.style.width=pt.width+"px",dt.parentNode.style.height=pt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(ct),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Dn.onExitFullscreen=function(ct,xt){xt.appendChild(ct)};var ot=function(ct,xt,dt,Mt){Ve(ct,xt,!0);for(var yt=function(){var vt=[];for(mt=0;mt<ct.childNodes.length;mt++)vt.push(ct.childNodes[mt]);if(window.GGBT_wsf_view){var et=window.GGBT_wsf_view.renderFullScreen(ct,xt.id),We=document.getElementById("fullscreencontainer"),we=jQuery(ct).find(".fullscreencontent");we.length>0?(et.remove(),we.attr("id","fullscreencontent").show(),jQuery(We).append(we),window.dispatchEvent(new Event("resize"))):Ye(et,xt,!1),window.GGBT_wsf_view.launchFullScreen(We)}else Pe=Mt,Ye(ct,xt,!1);if(!window.GGBT_wsf_view)for(mt=0;mt<vt.length;mt++)ct.removeChild(vt[mt])},Dt=ct.getElementsByClassName("ggb_preview_play"),mt=0;mt<Dt.length;mt++)Dt[mt].addEventListener("click",yt,!1),Dt[mt].addEventListener("ontouchstart",yt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(ct),De()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},lt=function(){var ct=document.createElement("div");if(ct.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var xt='.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");}',dt=document.createElement("style");dt.styleSheet?dt.styleSheet.cssText=xt:dt.appendChild(document.createTextNode(xt)),document.getElementsByTagName("head")[0].appendChild(dt)}return ct},ft=function(ct,xt,dt,Mt){var yt=document.createElement("div");yt.className="ggb_preview",yt.style.position="absolute",yt.style.zIndex="90",yt.style.width=ct-2+"px",yt.style.height=xt-2+"px",yt.style.top="0px",yt.style.left="0px",yt.style.overflow="hidden",yt.style.backgroundColor="white";var Dt="lightgrey";dt!==void 0&&(dt==="none"?Dt="transparent":Dt=dt),yt.style.border="1px solid "+Dt;var mt=document.createElement("img");if(mt.style.position="relative",mt.style.zIndex="1000",mt.style.top="-1px",mt.style.left="-1px",se!==null&&mt.setAttribute("src",se),mt.style.opacity=.7,ie!==null){var vt,et,We;if(!Mt){vt=document.createElement("img"),vt.style.position="absolute",vt.style.zIndex="1001",vt.style.opacity=1,mt.style.opacity=.3,et=360,et>ct/4*3&&(et=ct/4*3),We=et/5.8,vt.setAttribute("src",ie),vt.setAttribute("width",et),vt.setAttribute("height",We);var we=(ct-et)/2,Ne=(xt-We)/2;vt.style.left=we+"px",vt.style.top=Ne+"px",yt.appendChild(vt)}}return yt.appendChild(mt),yt},St=function(ct){return ct=ct.toLowerCase(),ct==="html5"||ct==="screenshot"?ct:"html5"},qe=["web","webSimple","web3d","tablet","tablet3d","phone"],rt=function(ct,xt){if(fe=ct,xt){wt(fe,!0);return}var dt=!Ut;if(dt){var Mt=xe(fe);!isNaN(Mt)&&Mt<4.4&&(dt=!1)}var yt,Dt;window.location.protocol.substr(0,4)==="http"?yt=window.location.protocol:yt="http:";var mt=fe.indexOf("//");mt>0?Dt=fe:mt===0?Dt=yt+fe:Dt="https://www.geogebra.org/apps/5.2.814.0/";for(var vt in qe)if(fe.slice(qe[vt].length*-1)===qe[vt]||fe.slice((qe[vt].length+1)*-1)===qe[vt]+"/"){wt(Dt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&dt&&!at.is3D&&!at.AV&&!at.SV&&!at.CV&&!at.EV2&&!at.CP&&!at.PC&&!at.DA&&!at.FI&&!at.PV&&!Ue(pt.showToolBar)&&!Ue(pt.showMenuBar)&&!Ue(pt.showAlgebraInput)&&!Ue(pt.enableRightClick)&&(!pt.appName||pt.appName=="classic")?Dt+="webSimple/":Dt+="web3d/",wt(Dt,!1)},wt=function(ct,xt){if(ct.requirejs){Ae=ct;return}ct.slice(-1)!=="/"&&(ct+="/"),Ae=ct,xt===null&&(xt=ct.indexOf("http")===-1),me=xt,z="web.nocache.js",te=!1;var dt=Ae.split("/");dt.length>1&&(!xt&&dt[dt.length-2]==="webSimple"?(z="webSimple.nocache.js",te=!0):qe.indexOf(dt[dt.length-2])>=0&&(z=dt[dt.length-2]+".nocache.js")),dt=ct.split("/"),fe=dt[dt.length-3],fe.substr(0,4)==="test"?fe=fe.substr(4,1)+"."+fe.substr(5,1):(fe.substr(0,3)==="war"||fe.substr(0,4)==="beta")&&(fe="5.0");var Mt=parseFloat(fe);Mt!==NaN&&Mt<5&&ct.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Mt+" is deprecated. Using version latest instead."),rt("5.0",xt))},Ct=function(ct,xt){window.console&&window.console.log&&(!xt||typeof xt.showLogging=="undefined"||xt.showLogging&&xt.showLogging!=="false")&&console.log(ct)};pt.material_id!==void 0?Fe(bt):bt();function bt(){var ct=jn;de!==null?ct=de:parseFloat(ct)<5&&(ct="5.0"),rt(ct,!1),ve!==null&&wt(ve,me),Re=!0}return Dn},GGBAppletUtils=function(){"use strict";function Dn(){return window.GGBT_wsf_edit!==void 0}function jn(Re,de){de!=1?(Re.style.transformOrigin="0% 0% 0px",Re.style.webkitTransformOrigin="0% 0% 0px",Re.style.transform="scale("+de+","+de+")",Re.style.webkitTransform="scale("+de+","+de+")",Re.style.maxWidth="initial",Re.querySelector(".ggb_preview")!==null&&(Re.querySelector(".ggb_preview").style.maxWidth="initial"),Re.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Re.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Re.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Re.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Re.style.transform="none",Re.style.webkitTransform="none")}function pt(Re,de,ve,Ee,ke,Se){var Ae=null;if(Se!=null&&Se!="")for(var me=Re.parentNode;me!=null;)if((" "+me.className+" ").indexOf(" "+Se+" ")>-1){Ae=me;break}else me=me.parentNode;var Pe=0,fe=0,z=0,te=0,se=0,ie=0,le=0;if(Ae)Pe=Ae.offsetWidth,fe=Math.max(Ee?Ae.offsetWidth:0,Ae.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Pe=Math.min(window.innerWidth,document.documentElement.clientWidth),fe=Math.min(window.innerHeight,document.documentElement.clientHeight),z=Pe):(Pe=window.innerWidth,fe=window.innerHeight,z=window.innerWidth),Re){var ce=Re.getBoundingClientRect();ce.left>0&&ce.left<=Pe&&(ke===void 0||!ke)&&(document.dir==="rtl"?(se=Pe-ce.width-ce.left,ie=z<=480?10:30):(ie=ce.left,se=z<=480?10:30),te=ie+se)}if(Re&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var pe=Re.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(te=40,le=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(te=0,le=40)}}return Re&&((ve===void 0||!ve)&&de>0&&de+te<Pe?Pe=de:Pe-=te,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ve===void 0||!ve)&&(fe-=le)),{width:Pe,height:fe}}function at(Re,de,ve,Ee,ke){if(Re.isScreenshoGenerator)return 1;var Se=Ee!==void 0&&Ee,Ae=Re.noScaleMargin!=null&&Re.noScaleMargin,me=function(pe){return pe&&pe!=="false"},Pe=me(Re.autoHeight),fe=pt(de,Re.width,ve,Pe,Se&&window.GGBT_wsf_view||Ae,ke),z=parseInt(fe.width),te=Re.width,se=Re.height;if(te===void 0){var ie=de.querySelector(".appletParameters");ie&&(te=ie.offsetWidth,se=ie.offsetHeight)}var le=z/te,ce=Se?1:fe.height/se;return ve!==void 0&&!ve&&(le=Math.min(1,le),ce=Math.min(1,ce)),Math.min(le,ce)}function Ut(Re,de,ve){var Ee=1,ke,Se=!1;if(Re.hasOwnProperty("allowUpscale")&&(Se=Re.allowUpscale),Re.hasOwnProperty("scale")&&(Ee=parseFloat(Re.scale),(isNaN(Ee)||Ee===null||Ee===0)&&(Ee=1),Ee>1&&(Se=!0)),de&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Se=!0),!(Re.hasOwnProperty("disableAutoScale")&&Re.disableAutoScale))ke=at(Re,de,Se,ve,Re.scaleContainerClass);else return Ee;return Se&&(!Re.hasOwnProperty("scale")||Ee===1)?ke:Math.min(Ee,ke)}function oe(Re){var de=Math.min(window.innerWidth,document.documentElement.clientWidth),ve=Math.min(window.innerHeight,document.documentElement.clientHeight),Ee=Re.getBoundingClientRect(),ke=(de-Ee.width)/2,Se=(ve-Ee.height)/2;Se<0&&(Se=0),Re.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ke<40?Re.style.left="40px":Re.style.left=ke+"px",Re.style.top=Se+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Se<40?Re.style.top="40px":Re.style.top=Se+"px",Re.style.left=ke+"px")}function He(Re,de){var ve=Re.querySelector(".appletParameters");if(ve){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(de.id!==ve.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Re)}if(ve.parentElement&&/fullscreen/.test(ve.parentElement.className))return;var Ee=Ut(de,Re);Dn()&&ve.setAttribute("data-param-scale",Ee);for(var ke=null,Se=0;Se<Re.childNodes.length;Se++)if(Re.childNodes[Se].className!==void 0&&Re.childNodes[Se].className.match(/^applet_scaler/)){ke=Re.childNodes[Se];break}if(ke!==null&&ke.querySelector(".noscale")!==null)return;var Ae=de.id!==void 0?de.id:"ggbApplet",me=window[Ae];(me==null||!me.recalculateEnvironments)&&ke!==null&&!ke.className.match(/fullscreen/)&&(ke.parentNode.style.transform="",!isNaN(Ee)&&Ee!==1?(ke.parentNode.style.width=de.width*Ee+"px",ke.parentNode.style.height=de.height*Ee+"px",jn(ke,Ee)):(jn(ke,1),ke.parentNode.style.width=de.width+"px",ke.parentNode.style.height=de.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&oe(Re),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ve).parents(".content-added-content"))}}return{responsiveResize:He,isFlexibleWorksheetEditor:Dn,positionCenter:oe,getScale:Ut,scaleElement:jn}}();__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 Dn=n.location.search;return Dn.indexOf(J)!=-1||Dn.indexOf(K)!=-1}function q(Dn,jn){}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(Dn){var jn=s[L].bindings;s[L].bindings=function(){for(var pt=jn?jn():{},at=Dn[webModule.__softPermutationId],Ut=O;Ut<at.length;Ut++){var oe=at[Ut];pt[oe[O]]=oe[P]}return pt}};var t;function u(){return v(),t}function v(){if(!t){var Dn=o.createElement(Q);if(Dn.id=L,Dn.style.cssText=R+S,Dn.tabIndex=-1,o.body.appendChild(Dn),t=Dn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var jn=document.compatMode==U?V:W;t.write(jn+X),t.close()}}}function w(Dn){function jn(at){function Ut(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var oe=Ut();if(oe){at();return}function He(){if(!oe){if(!Ut())return;oe=!0,at(),o.removeEventListener&&o.removeEventListener(Z,He,!1),Re&&clearInterval(Re)}}o.addEventListener&&o.addEventListener(Z,He,!1);var Re=setInterval(function(){He()},$)}function pt(at){var Ut=u(),oe=Ut.body,He=Ut.createElement(_);He.language=ab,He.crossOrigin=W,He.src=at,webModule.__errFn&&(He.onerror=function(){webModule.__errFn(L,new Error(bb+at))}),oe.appendChild(He)}jn(function(){pt(Dn)})}webModule.__startLoadingFragment=function(Dn){return C(Dn)},webModule.__installRunAsyncCode=function(Dn){var jn=u(),pt=jn.body,at=jn.createElement(_);at.language=ab,at.text=Dn,pt.appendChild(at),pt.removeChild(at)};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(Dn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Dn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Dn){var jn=c[Dn];return jn==null?null:jn},r=d,webModule.__errFn=e}function B(){function Dn(Re){var de=Re.lastIndexOf(rb);de==-1&&(de=Re.length);var ve=Re.indexOf(sb);ve==-1&&(ve=Re.length);var Ee=Re.lastIndexOf(tb,Math.min(ve,de));return Ee>=O?Re.substring(O,Ee+P):W}function jn(Re){if(!Re.match(/^\w+:\/\//)){var de=o.createElement(ub);de.src=Re+vb,Re=Dn(de.src)}return Re}function pt(){var Re=__gwt_getMetaProperty(wb);return Re!=null?Re:W}function at(){for(var Re=o.getElementsByTagName(_),de=O;de<Re.length;++de)if(Re[de].src.indexOf(xb)!=-1)return Dn(Re[de].src);return W}function Ut(){var Re=o.getElementsByTagName(yb);return Re.length>O?Re[Re.length-P].href:W}function oe(){var Re=o.location;return Re.href==Re.protocol+zb+Re.host+Re.pathname+Re.search+Re.hash}var He=pt();return He==W&&(He=at()),He==W&&(He=Ut()),He==W&&oe()&&(He=Dn(o.location.href)),He=jn(He),He}function C(Dn){return Dn.match(/^\//)||Dn.match(/^[a-zA-Z]+:\/\//)?Dn:webModule.__moduleBase+Dn}function D(){var Dn=[],jn=O,pt=[],at=[];function Ut(Re){var de=at[Re](),ve=pt[Re];if(de in ve)return de;var Ee=[];for(var ke in ve)Ee[ve[ke]]=ke;throw r&&r(Re,Ee,de),null}if(__gwt_isKnownPropertyValue=function(Re,de){return de in pt[Re]},webModule.__getPropMap=function(){var Re={};for(var de in pt)pt.hasOwnProperty(de)&&(Re[de]=Ut(de));return Re},webModule.__computePropValue=Ut,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var oe;try{oe=Cb;var He=oe.indexOf(Db);He!=-1&&(jn=parseInt(oe.substring(He+P),$),oe=oe.substring(O,He))}catch(Re){}return webModule.__softPermutationId=jn,C(oe+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})()},55322:function(Dn,jn,pt){"use strict";pt.d(jn,{Ax:function(){return He},Ds:function(){return Re},KI:function(){return ve},SI:function(){return oe},f1:function(){return Ut}});var at=pt(12242);function Ut(Ee){let ke=!0;if(Ee.length>0){for(let Se=0;Se<Ee.length;Se++)if(Ee[Se].compile_success==0||!Ee[Se].compile_success){ke=!1;break}}else ke=!1;return ke}function oe(Ee,ke=""){let Se=[];for(let Ae=0;Ae<Ee.length;Ae++){let me=Ee[Ae],Pe=ke?`${ke}/${me.name}`:`${me.name}`;Se.push({title:me.name,type:me.type,isLeaf:me.type!=="tree",key:Pe})}return Se}function He(Ee,ke,Se){for(let Ae=0;Ae<Ee.length;Ae++){let me=Ee[Ae];if(me.key===ke){me.children=Se;break}me.children&&He(me.children,ke,Se)}return Ee}function Re(Ee,ke,Se){let Ae;return function(){let me=this,Pe=arguments,fe=function(){Ae=null,Se||Ee.apply(me,Pe)},z=Se&&!Ae;clearTimeout(Ae),Ae=setTimeout(fe,ke),z&&Ee.apply(me,Pe)}}const de=!0,ve=at.Z.API_SERVER},25138:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return Ae}});var at=pt(59301),Ut={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},oe=pt(92310),He=pt.n(oe),Re=pt(29787),de=pt(2859),ve=pt(24092),Ee=pt(59895),ke=(me,Pe,fe)=>new Promise((z,te)=>{var se=ce=>{try{le(fe.next(ce))}catch(pe){te(pe)}},ie=ce=>{try{le(fe.throw(ce))}catch(pe){te(pe)}},le=ce=>ce.done?z(ce.value):Promise.resolve(ce.value).then(se,ie);le((fe=fe.apply(me,Pe)).next())}),Ae=({data:me,className:Pe,fullWidth:fe,style:z={},onClose:te,onOk:se,showFullTools:ie,noAssociationId:le})=>{const ce=(0,at.useRef)(null),pe=(0,at.useRef)(null),xe=(0,at.useRef)(null),je=(0,at.useRef)(null),[De,Fe]=(0,at.useState)(!1),[Te,Me]=(0,at.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,at.useEffect)(()=>(xe.current||(xe.current=document.createElement("style"),document.head.appendChild(xe.current)),me!=null&&me.visible?(document.body.setAttribute("data-custom","y-hidden"),xe.current.innerHTML=" html { overflow-y: hidden; }",me!=null&&me.src&&Be()):(document.body.removeAttribute("data-custom"),xe.current&&(document.head.removeChild(xe.current),xe.current=null)),()=>{document.body.removeAttribute("data-custom"),xe.current&&(document.head.removeChild(xe.current),xe.current=null)}),[me==null?void 0:me.visible]);const Be=()=>ke(void 0,null,function*(){Fe(!0),Me("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ze=yield(0,Ee.ZJ)(me==null?void 0:me.src);ce.current.src="",ce.current.src=Ze,ce.current.onload=function(){Ve()},Fe(!1),Me("")}),Ue=Ze=>ke(void 0,null,function*(){Fe(!0),Me("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ot=yield(0,ve.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:me.title,file:Ze.dataUrl}});ot!=null&&ot.id&&!le?(yield(0,ve.ZP)(`/api/attachments/${me.id}/add_subitem.json`,{method:"post",body:{subitem_id:ot==null?void 0:ot.id,settings:JSON.stringify(Ze.state)}})).status===0&&se():ot!=null&&ot.id&&se(ot),Fe(!1),Me("")}),Ye=()=>{const Ze=document.querySelector('a[href="https://markerjs.com/"]');Ze&&Ze.parentNode&&(Ze.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(lt=>{const ft=document.querySelector(lt.name);ft&&ft.setAttribute("title",lt.title)})},Ve=()=>{pe.current=new de.hP(ce.current),pe.current.targetRoot=je.current,pe.current.addEventListener("render",Ue),pe.current.addEventListener("beforeclose",te),ie&&(pe.current.availableMarkerTypes=pe.current.ALL_MARKER_TYPES,pe.current.uiStyleSettings.redoButtonVisible=!0,pe.current.uiStyleSettings.notesButtonVisible=!0,pe.current.uiStyleSettings.zoomButtonVisible=!0,pe.current.uiStyleSettings.zoomOutButtonVisible=!0,pe.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=pe.current.uiStyleSettings,pe.current.show(),me!=null&&me.snapshotData&&pe.current.restoreState(me.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ye()},300)};return at.createElement(at.Fragment,null,(me==null?void 0:me.visible)&&at.createElement(Re.Z,{spinning:De,tip:Te,style:{position:"absolute",width:"100vw"}},at.createElement("div",{ref:je,className:He()(Ut.imageDimensions,Pe,fe?Ut.fullWidth:""),style:z},at.createElement("img",{className:Ut.img,ref:ce}))))}},88831:function(Dn,jn,pt){"use strict";var at=pt(59301),Ut=pt(77019),oe=pt(5269),He=pt(20554),Re=pt(99571),de=pt(79074),ve=pt(15547),Ee=pt(48136),ke=pt(59301);const Se=(0,at.forwardRef)(({callback:Ae,showSaveButton:me,value:Pe=""},fe)=>{const z=(0,at.useRef)(),te=[{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 "}]}]}],se=[{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}`}]}]}],ie=pe=>{z.current.setValue(z.current.getValue()+" "+pe.value+" ")},le=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ke.createElement(Ut.Z,{className:ve.Z.lists,gutter:[10,10]},te.map((pe,xe)=>ke.createElement(oe.Z,{flex:"110px",className:ve.Z.item},ke.createElement("div",null,ke.createElement(de.Z,{value:`$$${pe.value}$$`}),pe.name),ke.createElement("div",{className:ve.Z.children},pe.children.map((je,De)=>ke.createElement("div",{key:De},ke.createElement("h1",null,je.name),ke.createElement(Ut.Z,{gutter:[10,10]},je.data.map((Fe,Te)=>ke.createElement(oe.Z,{key:Te,onClick:()=>ie(Fe),className:ve.Z.diamond},ke.createElement(de.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ke.createElement(Ut.Z,{className:ve.Z.lists,gutter:[10,10]},se.map((pe,xe)=>ke.createElement(oe.Z,{flex:"110px",className:ve.Z.item},ke.createElement("div",null,ke.createElement(de.Z,{value:"`$$"+pe.value+"$$`"}),pe.name),ke.createElement("div",{className:ve.Z.children},pe.children.map((je,De)=>ke.createElement("div",{key:De},je.name&&ke.createElement("h1",null,je.name),ke.createElement(Ut.Z,{gutter:[10,10]},je.data.map((Fe,Te)=>ke.createElement(oe.Z,{key:Te,onClick:()=>ie(Fe),className:ve.Z.diamond},ke.createElement(de.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))}],ce=()=>{var pe=document.createElement("div");pe.innerHTML=z.current.getValue();var xe=pe.innerText;return Ae&&Ae(xe),xe};return(0,at.useImperativeHandle)(fe,()=>({getData:ce})),ke.createElement("div",{className:ve.Z.mathWrap},ke.createElement(He.default,{defaultActiveKey:"1",items:le}),ke.createElement("math-field",{locale:"zh_cn",className:ve.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:z,style:{width:800,marginTop:30,fontSize:18}},Pe||""),me&&ke.createElement("div",{className:ve.Z.button},ke.createElement(Re.ZP,{size:"large",onClick:ce,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});jn.Z=Se},12635:function(Dn,jn,pt){"use strict";var at=pt(59301),Ut=pt(93314),oe=pt(99571),He=Object.defineProperty,Re=Object.defineProperties,de=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,Se=(fe,z,te)=>z in fe?He(fe,z,{enumerable:!0,configurable:!0,writable:!0,value:te}):fe[z]=te,Ae=(fe,z)=>{for(var te in z||(z={}))Ee.call(z,te)&&Se(fe,te,z[te]);if(ve)for(var te of ve(z))ke.call(z,te)&&Se(fe,te,z[te]);return fe},me=(fe,z)=>Re(fe,de(z));const Pe=({img:fe,buttonProps:z={},styles:te={},customText:se,ButtonText:ie,ButtonClick:le,Buttonclass:ce,ButtonTwo:pe,imgStyles:xe,loading:je=!1,className:De=""})=>at.createElement("section",{className:`tc animated fadeIn ${De}`,style:Ae({color:"#999",margin:"100px auto",visibility:je?"hidden":"visible"},te)},at.createElement("img",{src:fe||Ut,style:me(Ae({},xe),{pointerEvents:"none",userSelect:"none"})}),at.createElement("p",{className:"mt20 font14"},se||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&at.createElement(oe.ZP,Ae({className:ce,onClick:le},z),ie),pe&&pe);jn.Z=Pe},6311:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return ce}});var at=pt(59301),Ut={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},oe=pt(99571),He=pt(70557),Re=pt(89081),de=pt(25399),ve=pt(59895),Ee=pt(76011),ke=pt(12635),Se=pt(12242),Ae=pt(65789),me=pt(59301),Pe=Object.defineProperty,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,se=(pe,xe,je)=>xe in pe?Pe(pe,xe,{enumerable:!0,configurable:!0,writable:!0,value:je}):pe[xe]=je,ie=(pe,xe)=>{for(var je in xe||(xe={}))z.call(xe,je)&&se(pe,je,xe[je]);if(fe)for(var je of fe(xe))te.call(xe,je)&&se(pe,je,xe[je]);return pe},le=(pe,xe,je)=>new Promise((De,Fe)=>{var Te=Ue=>{try{Be(je.next(Ue))}catch(Ye){Fe(Ye)}},Me=Ue=>{try{Be(je.throw(Ue))}catch(Ye){Fe(Ye)}},Be=Ue=>Ue.done?De(Ue.value):Promise.resolve(Ue.value).then(Te,Me);Be((je=je.apply(pe,xe)).next())}),ce=({editOffice:pe="view",data:xe,theme:je,type:De,filename:Fe,monacoEditor:Te,className:Me,style:Be,close:Ue,onClose:Ye,hasMask:Ve,disabledDownload:Ze,onImgDimensions:ot,showNodata:lt,recordInfo:ft})=>{const[St,qe]=(0,at.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[rt,wt]=(0,at.useState)(""),[Ct,bt]=(0,at.useState)(),ct=window.ENV==="build"?"/react/build":"",xt=location.host.startsWith("localhost")?Se.Z.PROXY_SERVER:Se.Z.API_SERVER,Mt=10*(1024*1024),yt=(0,at.useRef)();xe!=null&&xe.startsWith("/api")&&De!=="txt"&&(xe=Se.Z.API_SERVER+xe);const Dt=We=>We.substring(We.lastIndexOf("/")+1).split(".").pop();Fe&&Te&&(Te.filename=Fe),(0,at.useEffect)(()=>{var We,we;const Ne=(we=(We=document.cookie)==null?void 0:We.replace(/\s/g,""))==null?void 0:we.split(";");Ne==null||Ne.map(Xe=>{let nt=Xe.split("=");nt[0]==="_educoder_session"&&wt(nt[1])})},[]),(0,at.useEffect)(()=>{De==="office"&&(xe.indexOf("bigfilescdn.")>-1||xe.indexOf("bigfiles1")>-1?bt({url:xe,fileType:Dt(xe),model:xe.indexOf("model=edit")?"edit":"view"}):mt())},[De,xe]);const mt=()=>le(void 0,null,function*(){console.log("data:",xe);let We=xe;xe.startsWith("http")||(We=location.origin+We);let we=new URL(We).pathname.split("/").pop();const Ne=yield(0,Ee.gJ)({attachment_id:we});Ne.url=xt+Ne.url,bt(Ne)}),vt=()=>{if(xe.startsWith("http")||xe.startsWith("blob:")){et();return}(0,ve.Sv)(Fe||"educoder",xe,Fe)},et=()=>{ft&&(0,Ae.fc)({id:ft==null?void 0:ft.id,watch_type:1,course_id:ft==null?void 0:ft.course_id}),(0,ve.Nd)(Fe||"educoder",decodeURIComponent(xe))};return me.createElement("div",{style:ie({},Be||{}),className:`${Ve&&Ut.bgBlack} ${De?Ut.wrp:"hide"}`},Ue&&me.createElement("div",{className:Ut.close,ref:yt},!!ot&&me.createElement(de.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>yt.current},me.createElement("span",{onClick:()=>{Ye(),ot()}},me.createElement("i",{className:"icon-yulanpizhu"}))),!Ze&&me.createElement(de.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>yt.current},me.createElement("span",{onClick:et},me.createElement("i",{className:"icon-quxiaozhiding"}))),me.createElement(de.Z,{title:"\u5173\u95ED",getPopupContainer:()=>yt.current},me.createElement("span",{className:"",onClick:Ye},me.createElement("i",{className:"icon-guanbi1"})))),me.createElement("div",{className:`${Ut[Me]} ${Me} ${Ut.monaco} ${De==="txt"?"show":"hide"}`},De==="txt"&&me.createElement(me.Fragment,null,me.createElement(Re.ZP,ie({},Te)))),De==="audio"&&me.createElement("audio",{src:`${(xe==null?void 0:xe.indexOf("http://"))>-1||(xe==null?void 0:xe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${xe}`,autoPlay:!0}),De==="video"&&me.createElement(me.Fragment,null,(xe==null?void 0:xe.indexOf("http"))>-1?me.createElement("video",{controls:!0,src:`${xe}`,autoPlay:!0}):me.createElement("video",{controls:!0,src:`data:video/mp4;base64,${xe}`,autoPlay:!0})),De==="office"&&Ct&&me.createElement("iframe",{src:`${ct}/office.html?key=${Ct.key}&url=${btoa(Ct.url)}&callbackUrl=${xt+(Ct.callbackUrl||"")}&fileType=${Ct.fileType}&title=${Ct.title||""}&model=${pe}&officeServer=${Se.Z.ONLYOFFICE}&disabledDownload=${!!Ze}`}),De==="html"&&me.createElement("iframe",{src:xe+"&disposition=inline"}),De==="pdf"&&me.createElement("iframe",{src:`${ct}/js/pdfview/index.html?filename=${Fe||"educoder.pdf"}&url=${encodeURIComponent(xe)}&disabledDownload=${!!Ze}`}),De==="image"&&me.createElement("img",{src:`${(xe==null?void 0:xe.indexOf("http://"))>-1||(xe==null?void 0:xe.indexOf("https://"))>-1?"":"data:image/png;base64,"}${xe}`}),(De==="other"||De==="download")&&me.createElement(me.Fragment,null,lt?me.createElement(ke.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:me.createElement(oe.ZP,{icon:me.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:vt,disabled:Ze},"\u4E0B\u8F7D")}):me.createElement(oe.ZP,{type:"primary",size:"middle",onClick:vt,disabled:Ze},me.createElement(He.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},79074:function(Dn,jn,pt){"use strict";pt.d(jn,{z:function(){return De},Z:function(){return Fe}});var at=pt(59301),Ut=pt(53122),oe=pt(49405),He=pt(64018),Re=pt(79710),de=pt(12242),ve=pt(59895),Ee=pt(15342),ke=pt(1012),Se=pt(6311),Ae=pt(59301),Pe=({html:Te})=>{const Me=(0,at.useRef)(null),Be=(0,at.useRef)(null),Ue=`.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,at.useEffect)(()=>{const Ye=Me.current.attachShadow({mode:"open"});Be.current=document.createElement("div"),Be.current.className="markdown-body",Be.current.innerHTML=Te,Ye.appendChild(Be.current);const Ve=document.createElement("style");return Ve.textContent=Ue,Ye.appendChild(Ve),()=>{Ye.innerHTML=""}},[]),(0,at.useEffect)(()=>{Be.current&&(Be.current.innerHTML=Te)},[Te]),Ae.createElement("div",{ref:Me})},fe=Object.defineProperty,z=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,ie=(Te,Me,Be)=>Me in Te?fe(Te,Me,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Te[Me]=Be,le=(Te,Me)=>{for(var Be in Me||(Me={}))te.call(Me,Be)&&ie(Te,Be,Me[Be]);if(z)for(var Be of z(Me))se.call(Me,Be)&&ie(Te,Be,Me[Be]);return Te};const ce="@\u2581\u2581@",pe="@\u2581@",xe=/<pre[^>]*>/g;function je(Te){let Me=document.createElement("div");return Me.innerHTML=Te,Me.childNodes.length===0?"":Me.childNodes[0].nodeValue}const De=(Te,Me)=>{Te=Te||"";const Be=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ue=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ye=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ve=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Me?Te.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Be,(Ze,ot,lt,ft,St,qe,rt)=>{const wt=ot||ft||qe,Ct=lt||St||rt||"?";return de.Z.API_SERVER+"/api/attachments/"+wt+Ct+"&t="+(0,ve.Jn)(wt,Date.now())+(Ze.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Te=Te.replace(Ve,(Ze,ot,lt,ft,St,qe,rt)=>{const wt=ot||ft||qe,Ct=lt||St||rt||"?";return de.Z.API_SERVER+"/attachments/download/"+wt+Ct+"&t="+(0,ve.Jn)(wt,Date.now())+(Ze.indexOf(")")>-1?")":"&")}).replace(Be,(Ze,ot,lt,ft,St,qe,rt)=>{const wt=ot||ft||qe,Ct=lt||St||rt||"?";return de.Z.API_SERVER+"/api/attachments/"+wt+Ct+"&t="+(0,ve.Jn)(wt,Date.now())+(Ze.indexOf(")")>-1?")":"&")}).replace(Ue,(Ze,ot,lt,ft,St)=>{const qe=ot||ft,rt=lt||St||"";return'"'+de.Z.API_SERVER+"/api/attachments/"+qe+rt+qe+rt+"&t="+(0,ve.Jn)(qe,Date.now())}).replace(Ye,(Ze,ot,lt,ft,St)=>{const qe=ot||ft,rt=lt||St||"";return"("+de.Z.API_SERVER+"/files/uploads/"+qe+rt+qe+rt+"&t="+(0,ve.Jn)(qe,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,`
|
|
`),Te)};var Fe=({value:Te="",className:Me,showTextOnly:Be,showLines:Ue,style:Ye={},stylesPrev:Ve={},highlightKeywords:Ze,showProgramFill:ot,isProgramFill:lt,disabledFill:ft=!1,programFillValue:St,onFillChange:qe=Ct=>{},onFillBlur:rt=()=>{},onFillFocus:wt=()=>{}})=>{let Ct=String(Te);const[bt,ct]=(0,at.useState)(""),[xt,dt]=(0,at.useState)("office"),[Mt,yt]=(0,at.useState)([]),Dt=(0,at.useRef)("a"+(0,ke.Z)()),mt={},vt=(ut,Ot,Et)=>{const Ft=document.createElement(ut===pe?"input":"textarea");Ft.style.width="100%",Ft.style.height=ut===pe?"40px":"151px",Ft.rows=5,Ft.spellcheck=!1,Ft.name="edu-program-fill",Ft.placeholder="\u8BF7\u8F93\u5165",Ft.dataset.id=Ot;const qt=Object.keys(mt).length;return mt[qt]=Ft,`<span class="edu-program-fill-wrap ${ut===pe?"":"show"}" style="width:${ut===pe?"400px":"100%"}" title=${Et||""}><span>${Ft.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function et(ut){return ut=ut.replace(/!\[.*?\]\(.*?\)/g,""),ut=ut.replace(/\[.*?\]\(.*?\)/g,""),ut=ut.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),ut=ut.replace(/<embed.*?>/g,""),ut=ut.replace(/<img.*?>/g,""),ut=ut.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),ut=ut.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),ut=ut.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),ut=ut.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),ut}const We=ut=>ut.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ot,Et){let Ft=Et.replace(/(\n|\r)/g,"").split("}"),qt=[];return Ft.map(Xt=>{Xt!=""&&qt.push(`.${Dt.current} ${Xt}`)}),`<style>${qt.join("}")}</style>`}),we=(0,at.useMemo)(()=>{try{const Ft=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,qt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Xt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Kt=/\(\/attachments\/download\//g;Ct=Ct.replace(Kt,"("+de.Z.API_SERVER+"/attachments/download/").replace(Ft,"("+de.Z.API_SERVER+"/api/attachments/").replace(qt,'"'+de.Z.API_SERVER+"/api/attachments/").replace(Xt,'"'+de.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(Ft){}if(ot){let Ft=-1;return Ct=Ct.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(qt,Xt,Kt){var Vt;return++Ft,vt(qt,Ft,(Vt=St==null?void 0:St[Ft])==null?void 0:Vt.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${We(Ct||"")}</pre>`}let ut=We(Ct);ut=(0,oe.ZP)(ut);const Ot=(0,oe.ez)();Ct.match(/\[TOC\]/)&&(ut=ut.replace("<p>[TOC]</p>",(0,oe.Qv)()),(0,oe.Iy)()),ut=ut.replace(/(__special_katext_id_\d+__)/g,(Ft,qt)=>{const{type:Xt,expression:Kt}=Ot[qt];return(0,Ee.renderToString)(je(Kt)||"",{displayMode:Xt==="block",throwOnError:!1,output:"html"})}),ut=ut.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,oe.AL)();const Et=document.createElement("div");if(Et.innerHTML=ut,Be)return Et.innerText;if(Ze){const Ft=Ze.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ie(Et,Ft),Et.innerHTML}return setTimeout(()=>tt(),500),Et.innerHTML},[Ct,Ze]);(0,at.useEffect)(()=>{_e.current&&_e.current.querySelectorAll(["input","textarea"]).forEach(Ot=>{Ot.oninput=Ne,Ot.onblur=Xe,Ot.onfocus=nt})},[Mt]),(0,at.useEffect)(()=>{var ut,Ot,Et,Ft,qt;if(St!=null&&St.length)try{const Xt=_e.current.querySelectorAll(".edu-program-fill-score"),Kt=_e.current.querySelectorAll('[name="edu-program-fill"]');for(const[Vt,hn]of Kt.entries())hn.value=((ut=St==null?void 0:St[Vt])==null?void 0:ut.value)||"",((Ot=St==null?void 0:St[Vt])==null?void 0:Ot.type)==="warning"?hn.className="program-fill-warning":((Et=St==null?void 0:St[Vt])==null?void 0:Et.type)==="success"?hn.className="program-fill-success":hn.className="";for(const[Vt,hn]of Xt.entries())hn.innerHTML=(Ft=St==null?void 0:St[Vt])!=null&&Ft.score?`${(qt=St==null?void 0:St[Vt])==null?void 0:qt.score}\u5206`:"";yt(St)}catch(Xt){console.log(Xt,"error")}},[St]);const Ne=ut=>{Mt[ut.target.dataset.id]=Mt[ut.target.dataset.id]||{},Mt[ut.target.dataset.id].value=ut.target.value,yt([...Mt]),qe(Mt,ut.target.dataset.id)},Xe=ut=>{Mt[ut.target.dataset.id]=Mt[ut.target.dataset.id]||{},Mt[ut.target.dataset.id].value=ut.target.value,yt([...Mt]),rt(Mt,ut.target.dataset.id)},nt=ut=>{Mt[ut.target.dataset.id]=Mt[ut.target.dataset.id]||{},Mt[ut.target.dataset.id].value=ut.target.value,yt([...Mt]),wt(Mt,ut.target.dataset.id)};function Ie(ut,Ot){return ut.childNodes.forEach(Et=>{var Ft;if(Et.childNodes.length>0)Ie(Et,Ot);else if(Et.nodeName!=="IMG")if(Et.innerHTML)Et.innerHTML=(Ft=Et.innerHTML)==null?void 0:Ft.replace(new RegExp(Ot,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const qt=document.createElement("span");qt.innerHTML=Et.textContent.replace(new RegExp(Ot,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Et.replaceWith(qt)}})}const _e=(0,at.useRef)();oe.jb.WebkitLineClamp=Ue,Ue&&(Ye=le(le({},Ye),oe.jb));function Ge(ut){let Ot=ut.target;if(Ot.tagName.toUpperCase()==="A"){let Et=Ot.getAttribute("href");if(Et.indexOf("office")>-1)ut.preventDefault(),ct(Et),dt("office");else if(Et.indexOf("application/pdf")>-1)ut.preventDefault(),ct(Et),dt("pdf");else if(Et.indexOf("text/html")>-1)ut.preventDefault(),ct(Et),dt("html");else if(Et.startsWith("#")){ut.preventDefault();let Ft=document.getElementById(Et.replace("#",""));Ft&&Ft.scrollIntoView(!0)}}}const tt=()=>{var ut;const Ot=(ut=_e.current)==null?void 0:ut.querySelectorAll("video");Ot==null||Ot.forEach(Et=>{if(Et.oncontextmenu=()=>!1,Et.src.indexOf(".m3u8")>-1&&!Et.canPlayType("application/vnd.apple.mpegurl")){if(Re.ZP.isSupported()){var Ft=new Re.ZP;Ft.loadSource(Et.src),Ft.attachMedia(Et)}}})};(0,at.useEffect)(()=>{if(_e.current&&we&&we.match(xe)&&window.PR.prettyPrint(),_e.current)return _e.current.addEventListener("click",Ge),()=>{var ut;(ut=_e.current)==null||ut.removeEventListener("click",Ge),(0,oe.AL)(),(0,oe.Iy)()}},[we,_e.current,Ge]),(0,at.useEffect)(()=>{var ut;const Ot=Et=>{Et.preventDefault(),Et.clipboardData.setData("text",window.getSelection().toString())};return(ut=_e.current)==null||ut.addEventListener("copy",Ot),()=>{var Et;(Et=_e.current)==null||Et.removeEventListener("copy",Ot)}},[_e.current]);const ht=ut=>/<style[\s\S]*?>/i.test(ut||"");return at.createElement(at.Fragment,null,Be&&at.createElement("div",{ref:_e},we),!Be&&!ht(we)&&at.createElement("div",{ref:_e,style:le({},Ye),className:`${Me||""} ${ft?"disabled-fill":""} markdown-body ${Dt.current}`,dangerouslySetInnerHTML:{__html:we}}),!Be&&ht(we)&&at.createElement(Pe,{html:we}),at.createElement(Se.Z,{close:!0,data:bt,type:bt!=null&&bt.length?xt:"",style:le({},Ve),onClose:()=>ct("")}))}},76131:function(Dn,jn,pt){"use strict";pt.d(jn,{cT:function(){return Te},pe:function(){return je}});var at=pt(59301),Ut=pt(14566),oe=pt(6767),He=pt(24092),Re=pt(28209),de=pt.n(Re),ve=pt(1012),Ee=pt(71570),ke=pt(47257),Se=pt.n(ke),Ae=Object.defineProperty,me=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,se=(Be,Ue,Ye)=>Ue in Be?Ae(Be,Ue,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Be[Ue]=Ye,ie=(Be,Ue)=>{for(var Ye in Ue||(Ue={}))z.call(Ue,Ye)&&se(Be,Ye,Ue[Ye]);if(fe)for(var Ye of fe(Ue))te.call(Ue,Ye)&&se(Be,Ye,Ue[Ye]);return Be},le=(Be,Ue)=>me(Be,Pe(Ue)),ce=(Be,Ue)=>{var Ye={};for(var Ve in Be)z.call(Be,Ve)&&Ue.indexOf(Ve)<0&&(Ye[Ve]=Be[Ve]);if(Be!=null&&fe)for(var Ve of fe(Be))Ue.indexOf(Ve)<0&&te.call(Be,Ve)&&(Ye[Ve]=Be[Ve]);return Ye},pe=(Be,Ue,Ye)=>new Promise((Ve,Ze)=>{var ot=St=>{try{ft(Ye.next(St))}catch(qe){Ze(qe)}},lt=St=>{try{ft(Ye.throw(St))}catch(qe){Ze(qe)}},ft=St=>St.done?Ve(St.value):Promise.resolve(St.value).then(ot,lt);ft((Ye=Ye.apply(Be,Ue)).next())});const{Dragger:xe}=Ut.default,je=Be=>{const Ue="bf3c199c2470cb477d907b1e0917c17b",Ye="5183666c72eec9e4";var Ve=de().enc.Utf8.parse(Ue);let Ze=de().enc.Utf8.parse(Ye);var ot=de().AES.decrypt(Be,Ve,{iv:Ze,mode:de().mode.CBC});return ot.toString(de().enc.Utf8)};let De;const Fe=Be=>pe(void 0,[Be],function*({identifier:Ue,oldFilename:Ye,newFilename:Ve}){var Ze,ot,lt,ft,St,qe;const rt=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});rt.data=JSON.parse(je(rt.data));const wt=new OSS({endpoint:(Ze=rt==null?void 0:rt.data)==null?void 0:Ze.end_point,region:(ot=rt==null?void 0:rt.data)==null?void 0:ot.region,accessKeyId:(lt=rt==null?void 0:rt.data)==null?void 0:lt.access_key_id,accessKeySecret:(ft=rt==null?void 0:rt.data)==null?void 0:ft.access_key_secret,bucket:(St=rt==null?void 0:rt.data)==null?void 0:St.bucket,stsToken:(qe=rt==null?void 0:rt.data)==null?void 0:qe.security_token});return new Promise((Ct,bt)=>{console.log(11111,`${Ue}/${Ye}`,`${Ue}/${Ve}`,rt.data),wt.copy(`/${Ue}/${Ye}`,`/${Ue}/${Ve}`).then(ct=>{console.log("\u62F7\u8D1D\u6210\u529F",ct)}).catch(ct=>{console.log(ct)})})}),Te=(Be,Ue,Ye)=>pe(void 0,null,function*(){var Ve,Ze,ot,lt,ft,St;Ue.file_name=Be.name;const qe=yield(0,He.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",je(qe.data)),qe.data=JSON.parse(je(qe.data));const rt=Be.name.split(".");rt.pop();const wt=Ue.realFileName?rt.join(""):(0,ve.Z)(),Ct=new(Se())({endpoint:(Ve=qe==null?void 0:qe.data)==null?void 0:Ve.end_point,region:(Ze=qe==null?void 0:qe.data)==null?void 0:Ze.region,accessKeyId:(ot=qe==null?void 0:qe.data)==null?void 0:ot.access_key_id,accessKeySecret:(lt=qe==null?void 0:qe.data)==null?void 0:lt.access_key_secret,bucket:(ft=qe==null?void 0:qe.data)==null?void 0:ft.bucket,stsToken:(St=qe==null?void 0:qe.data)==null?void 0:St.security_token});return new Promise((bt,ct)=>{var xt;Ct.multipartUpload(`${wt}`,new Blob([Be],{type:Be.type}),le(ie({timeout:200*1e3,partSize:102400},Ye),{callback:{url:(xt=qe==null?void 0:qe.data)==null?void 0:xt.callback_url,host:qe==null?void 0:qe.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,He.rz)(Ue)}})).then(function(dt){var Mt;Be.response=(Mt=dt.data)==null?void 0:Mt.data,bt(dt==null?void 0:dt.data)}).catch(function(dt){ct(dt),console.log("err:",dt)})})}),Me=Be=>{var Ue=Be,{user:Ye,cancelUpload:Ve}=Ue,Ze=ce(Ue,["user","cancelUpload"]);const[ot,lt]=(0,at.useState)([]);let[ft,St]=(0,at.useState)();const qe={onRemove:wt=>{lt([...ot.filter(Ct=>Ct.name!==wt.name)]),Ze.onChange(ot.filter(Ct=>Ct.name!==wt.name))},disabled:Ze.disabled,multiple:!0,fileList:ot==null?void 0:ot.map(wt=>wt.file),customRequest:()=>{},beforeUpload:wt=>pe(void 0,null,function*(){let Ct=Ze.maxSize||1073741824;if(ot.filter(bt=>bt.name===wt.name).length){oe.ZP.info(`${wt.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(wt==null?void 0:wt.size)>Ct?(oe.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${Ct/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(ot.push({name:wt.name,file:wt}),lt([...ot]),Ze.onChange(ot),!1)})},rt=(wt,Ct)=>pe(void 0,null,function*(){var bt,ct,xt,dt,Mt,yt;Ct.file_name=wt.name;const Dt=wt.name,mt=yield(0,He.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(mt.data=JSON.parse(je(mt.data)),(mt==null?void 0:mt.status)!==0){ot[ot.findIndex(We=>We.name===Dt)].status="error",ot[ot.findIndex(We=>We.name===Dt)].file.status="error",Ze.onChange(ot),oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}ft=new(Se())({endpoint:(bt=mt==null?void 0:mt.data)==null?void 0:bt.end_point,region:(ct=mt==null?void 0:mt.data)==null?void 0:ct.region,accessKeyId:(xt=mt==null?void 0:mt.data)==null?void 0:xt.access_key_id,accessKeySecret:(dt=mt==null?void 0:mt.data)==null?void 0:dt.access_key_secret,bucket:(Mt=mt==null?void 0:mt.data)==null?void 0:Mt.bucket,stsToken:(yt=mt==null?void 0:mt.data)==null?void 0:yt.security_token}),console.log(wt,"file"),St(ft);const vt=wt.name.split(".");vt.pop();const et=Dt.indexOf(".")>-1?Ct.realFileName?vt.join("."):(0,ve.Z)():Dt;return new Promise((We,we)=>{var Ne;try{ft.multipartUpload(`${Ze.identifier}/${et}${Dt.indexOf(".")>-1?"."+Dt.split(".").pop():""}`,new Blob([wt.file],{type:wt.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Xe,nt,Ie)=>{try{console.log("\u8FDB\u5EA6",Xe,nt,Ie);const _e=ot.findIndex(Ge=>Ge.name===Dt);ot[_e].file.percent=Xe*100,ot[_e].tempCheckpoint=nt,lt([...ot])}catch(_e){}},checkpoint:ot[ot.findIndex(Xe=>Xe.name===Dt)].tempCheckpoint,callback:{customValue:{id:Dt+""},url:(Ne=mt==null?void 0:mt.data)==null?void 0:Ne.callback_url,host:mt==null?void 0:mt.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,He.rz)(Ct)}}).then(function(Xe){var nt,Ie,_e;const Ge=ot.findIndex(ht=>ht.name===Dt);let tt="done";if(((nt=Xe.data)==null?void 0:nt.status)===0){wt.response=(Ie=Xe.data)==null?void 0:Ie.data;const ht=ot.findIndex(ut=>ut.name===Dt);ot[ht].status="done",ot[ht].file.status="done"}else oe.ZP.warning((_e=Xe.data)==null?void 0:_e.message),tt="error";ot[Ge].status=tt,ot[Ge].file.status=tt,Ze.onChange(ot),We(Xe==null?void 0:Xe.data)}).catch(function(Xe){ot[ot.findIndex(nt=>nt.name===Dt)].status="error",ot[ot.findIndex(nt=>nt.name===Dt)].file.status="error",oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),lt([...ot]),Ze.onChange(ot),we(Xe),console.log("err:",Xe)})}catch(Xe){}})});return(0,at.useEffect)(()=>{ot.every(wt=>wt==="done"||wt==="error")&&Ze.onComplete(ot)},[ot]),(0,at.useEffect)(()=>{Ve&&(ft==null||ft.cancel())},[Ve]),(0,at.useEffect)(()=>{Ze.uploading&&ot.map(wt=>pe(void 0,null,function*(){var Ct;if((!wt.status||wt.status==="error")&&!Ve){wt.status="uploading",wt.file.status="uploading";const bt=yield rt(wt,{login:(Ct=Ye==null?void 0:Ye.userInfo)==null?void 0:Ct.login,container_type:Ze.container_type,container_id:Ze.container_id,description:Ze.description,realFileName:Ze.realFileName})}}))},[Ze.uploading]),at.createElement(xe,le(ie({},qe),{height:Ze.height,className:Ze.className}),at.createElement("p",{className:"ant-upload-hint"},Ze.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};jn.ZP=(0,Ee.connect)(({loading:Be,globalSetting:Ue,user:Ye})=>({globalSetting:Ue,loading:Be.models.competitions,user:Ye}))(Me)},77531:function(Dn,jn,pt){"use strict";pt.d(jn,{h:function(){return pe}});var at=pt(59301),Ut=pt(82326),oe=pt(28284),He=pt(99571),Re=pt(89780),de=pt.n(Re),ve=pt(88540),Ee=pt(42271),ke=Object.defineProperty,Se=Object.defineProperties,Ae=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,z=(xe,je,De)=>je in xe?ke(xe,je,{enumerable:!0,configurable:!0,writable:!0,value:De}):xe[je]=De,te=(xe,je)=>{for(var De in je||(je={}))Pe.call(je,De)&&z(xe,De,je[De]);if(me)for(var De of me(je))fe.call(je,De)&&z(xe,De,je[De]);return xe},se=(xe,je)=>Se(xe,Ae(je));const ie=Ut.default.Option,le={labelCol:{span:4},wrapperCol:{span:20}},ce={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"]};jn.Z=({callback:xe,onCancel:je})=>{const[De,Fe]=(0,at.useState)("python");function Te(Be){Fe(ce[Be][1])}function Me(Be){xe(Be)}return at.createElement(oe.default,se(te({},le),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Me,style:{width:500}}),at.createElement(oe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},at.createElement(Ut.default,{getPopupContainer:Be=>Be.parentNode,onChange:Te},Object.keys(ce).map(Be=>at.createElement(ie,{key:Be,value:Be},ce[Be][0])))),at.createElement(oe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},at.createElement(pe,{mode:De})),at.createElement("div",{className:"flex-container flex-end"},at.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),at.createElement(He.ZP,{type:"ghost",onClick:je},"\u53D6\u6D88")))};function pe({value:xe,onChange:je,mode:De,options:Fe={}}){const Te=(0,at.useRef)(),[Me,Be]=(0,at.useState)();return(0,at.useEffect)(()=>{if(Me){let Ue=function(Ye){const Ve=Ye.getValue();je&&je(Ve)};return Me.on("change",Ue),()=>{Me.off("change",Ue)}}},[Me,je]),(0,at.useEffect)(()=>{Me&&Me.setOption("mode",De)},[Me,De]),(0,at.useEffect)(()=>{Me&&(xe!==Me.getValue()||xe==="")&&setTimeout(()=>{Me.setValue(xe||"")},300)},[Me,xe]),(0,at.useEffect)(()=>{if(Te.current&&!Me){const Ue=de().fromTextArea(Te.current,te({mode:De,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Fe));Be(Ue)}},[Te.current,Me]),at.createElement("div",{className:"my-codemirror-container"},at.createElement("textarea",{ref:Te}))}},19565:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return Kn}});var at=pt(59301),Ut=pt(89780),oe=pt.n(Ut),He=pt(76374),Re=pt(88540),de=pt(6313),ve=pt(25717),Ee=pt(99498),ke=pt(25419),Se=pt(67549),Ae=pt(79074),me=({value:Qt="",className:Wt,showTextOnly:zt,showLines:Nn,style:Vn={}})=>{const vr=(0,at.useMemo)(()=>"",[Qt]);return at.createElement(at.Fragment,null,at.createElement("div",{dangerouslySetInnerHTML:{__html:vr}}))},Pe=pt(59301),fe=Object.defineProperty,z=Object.defineProperties,te=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,ce=(Qt,Wt,zt)=>Wt in Qt?fe(Qt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:zt}):Qt[Wt]=zt,pe=(Qt,Wt)=>{for(var zt in Wt||(Wt={}))ie.call(Wt,zt)&&ce(Qt,zt,Wt[zt]);if(se)for(var zt of se(Wt))le.call(Wt,zt)&&ce(Qt,zt,Wt[zt]);return Qt},xe=(Qt,Wt)=>z(Qt,te(Wt));let je=[{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 De({onActionCallback:Qt,title:Wt,icon:zt,actionName:Nn,className:Vn="",children:vr}){function yn(){Qt(Nn)}return Pe.createElement("a",{title:Wt,className:Vn,onClick:yn},Pe.createElement("i",{className:`${zt}`}),vr)}var Fe=({watch:Qt,showNullButton:Wt,showNullProgramButton:zt,onActionCallback:Nn,fullScreen:Vn,insertTemp:vr,hidetoolBar:yn,extraUse:zn})=>{const Ht=[...je,{title:`${Qt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Qt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Pe.createElement("ul",{className:"markdown-toolbar-container"},!yn&&Ht.map((Yt,qn)=>Pe.createElement("li",{key:qn},Yt.actionName?Pe.createElement(De,xe(pe({},Yt),{onActionCallback:Nn})):Pe.createElement("span",{className:"v-line"}))),Wt?Pe.createElement("li",null,Pe.createElement(De,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Nn},Pe.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,zt?Pe.createElement(Pe.Fragment,null,Pe.createElement("li",null,Pe.createElement(De,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Nn},Pe.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),Pe.createElement("li",null,Pe.createElement(De,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Nn},Pe.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,vr&&Pe.createElement("li",null,Pe.createElement(De,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${vr}`,onActionCallback:Nn},Pe.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),zn&&Pe.createElement("li",null,zn),Pe.createElement("li",{className:"btn-full-screen"},Pe.createElement(De,{icon:`${Vn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Vn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Nn})))},Te=pt(52272),Me=pt(28284),Be=pt(37568),Ue=pt(99571),Ye=Object.defineProperty,Ve=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,St=(Qt,Wt,zt)=>Wt in Qt?Ye(Qt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:zt}):Qt[Wt]=zt,qe=(Qt,Wt)=>{for(var zt in Wt||(Wt={}))lt.call(Wt,zt)&&St(Qt,zt,Wt[zt]);if(ot)for(var zt of ot(Wt))ft.call(Wt,zt)&&St(Qt,zt,Wt[zt]);return Qt},rt=(Qt,Wt)=>Ve(Qt,Ze(Wt));const wt={labelCol:{span:4},wrapperCol:{span:20}};var Ct=({callback:Qt,onCancel:Wt})=>{function zt(Nn){Qt(Nn)}return at.createElement(Me.default,rt(qe({},wt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:zt,style:{width:500}}),at.createElement(Me.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},at.createElement(Be.default,null)),at.createElement(Me.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},at.createElement(Be.default,null)),at.createElement("div",{className:"flex-container flex-end"},at.createElement(Ue.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),at.createElement(Ue.ZP,{type:"ghost",onClick:Wt},"\u53D6\u6D88")))},bt=pt(77531),ct=pt(24141),xt=pt(62957),dt=pt(77019),Mt=pt(25138),yt=pt(59301),Dt=({callback:Qt,onCancel:Wt})=>{const zt=document.createElement("canvas"),Nn=zt.getContext("2d");zt.width=1e3,zt.height=800,Nn.fillStyle="#ffffff",Nn.fillRect(0,0,zt.width,zt.height);const Vn=zt.toDataURL("image/png");return yt.createElement(xt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},yt.createElement(dt.Z,{style:{height:"100vh"}},yt.createElement(Mt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Vn,visible:!0,title:String(Date.now())},onOk:vr=>{Qt({src:vr.url})},onClose:Wt})))},mt=pt(12378);function vt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(vt,go.CommandHandler),vt.prototype.canAlignSelection=function(){var Qt=this.diagram;return!(Qt===null||Qt.isReadOnly||Qt.isModelReadOnly||Qt.selection.count<2)},vt.prototype.alignLeft=function(){var Qt=this.diagram;Qt.startTransaction("aligning left");var Wt=1/0;Qt.selection.each(function(zt){zt instanceof go.Link||(Wt=Math.min(zt.position.x,Wt))}),Qt.selection.each(function(zt){zt instanceof go.Link||zt.move(new go.Point(Wt,zt.position.y))}),Qt.commitTransaction("aligning left")},vt.prototype.alignRight=function(){var Qt=this.diagram;Qt.startTransaction("aligning right");var Wt=-1/0;Qt.selection.each(function(zt){if(!(zt instanceof go.Link)){var Nn=zt.actualBounds.x+zt.actualBounds.width;Wt=Math.max(Nn,Wt)}}),Qt.selection.each(function(zt){zt instanceof go.Link||zt.move(new go.Point(Wt-zt.actualBounds.width,zt.position.y))}),Qt.commitTransaction("aligning right")},vt.prototype.alignTop=function(){var Qt=this.diagram;Qt.startTransaction("alignTop");var Wt=1/0;Qt.selection.each(function(zt){zt instanceof go.Link||(Wt=Math.min(zt.position.y,Wt))}),Qt.selection.each(function(zt){zt instanceof go.Link||zt.move(new go.Point(zt.position.x,Wt))}),Qt.commitTransaction("alignTop")},vt.prototype.alignBottom=function(){var Qt=this.diagram;Qt.startTransaction("aligning bottom");var Wt=-1/0;Qt.selection.each(function(zt){if(!(zt instanceof go.Link)){var Nn=zt.actualBounds.y+zt.actualBounds.height;Wt=Math.max(Nn,Wt)}}),Qt.selection.each(function(zt){zt instanceof go.Link||zt.move(new go.Point(zt.actualBounds.x,Wt-zt.actualBounds.height))}),Qt.commitTransaction("aligning bottom")},vt.prototype.alignCenterX=function(){var Qt=this.diagram,Wt=Qt.selection.first();if(Wt){Qt.startTransaction("aligning Center X");var zt=Wt.actualBounds.x+Wt.actualBounds.width/2;Qt.selection.each(function(Nn){Nn instanceof go.Link||Nn.move(new go.Point(zt-Nn.actualBounds.width/2,Nn.actualBounds.y))}),Qt.commitTransaction("aligning Center X")}},vt.prototype.alignCenterY=function(){var Qt=this.diagram,Wt=Qt.selection.first();if(Wt){Qt.startTransaction("aligning Center Y");var zt=Wt.actualBounds.y+Wt.actualBounds.height/2;Qt.selection.each(function(Nn){Nn instanceof go.Link||Nn.move(new go.Point(Nn.actualBounds.x,zt-Nn.actualBounds.height/2))}),Qt.commitTransaction("aligning Center Y")}},vt.prototype.alignColumn=function(Qt){var Wt=this.diagram;Wt.startTransaction("align Column"),Qt===void 0&&(Qt=0),Qt=parseFloat(Qt);var zt=new Array;Wt.selection.each(function(zn){zn instanceof go.Link||zt.push(zn)});for(var Nn=0;Nn<zt.length-1;Nn++){var Vn=zt[Nn],vr=Vn.actualBounds.y+Vn.actualBounds.height+Qt,yn=zt[Nn+1];yn.move(new go.Point(Vn.actualBounds.x,vr))}Wt.commitTransaction("align Column")},vt.prototype.alignRow=function(Qt){Qt===void 0&&(Qt=0),Qt=parseFloat(Qt);var Wt=this.diagram;Wt.startTransaction("align Row");var zt=new Array;Wt.selection.each(function(zn){zn instanceof go.Link||zt.push(zn)});for(var Nn=0;Nn<zt.length-1;Nn++){var Vn=zt[Nn],vr=Vn.actualBounds.x+Vn.actualBounds.width+Qt,yn=zt[Nn+1];yn.move(new go.Point(vr,Vn.actualBounds.y))}Wt.commitTransaction("align Row")},vt.prototype.canRotate=function(Qt){var Wt=this.diagram;return!(Wt===null||Wt.isReadOnly||Wt.isModelReadOnly||Wt.selection.count<1)},vt.prototype.rotate=function(Qt){Qt===void 0&&(Qt=90);var Wt=this.diagram;Wt.startTransaction("rotate "+Qt.toString());var Wt=this.diagram;Wt.selection.each(function(zt){zt instanceof go.Link||zt instanceof go.Group||(zt.angle+=Qt)}),Wt.commitTransaction("rotate "+Qt.toString())},vt.prototype.pullToFront=function(){var Qt=this.diagram;Qt.startTransaction("pullToFront");var Wt=new go.Map;Qt.selection.each(function(zt){Wt.set(zt.layer,0)}),Wt.iteratorKeys.each(function(zt){var Nn=0;zt.parts.each(function(Vn){if(!Vn.isSelected){var vr=Vn.zOrder;isNaN(vr)?Vn.zOrder=0:Nn=Math.max(Nn,vr)}}),Wt.set(zt,Nn)}),Qt.selection.each(function(zt){vt._assignZOrder(zt,Wt.get(zt.layer)+1)}),Qt.commitTransaction("pullToFront")},vt.prototype.pushToBack=function(){var Qt=this.diagram;Qt.startTransaction("pushToBack");var Wt=new go.Map;Qt.selection.each(function(zt){Wt.set(zt.layer,0)}),Wt.iteratorKeys.each(function(zt){var Nn=0;zt.parts.each(function(Vn){if(!Vn.isSelected){var vr=Vn.zOrder;isNaN(vr)?Vn.zOrder=0:Nn=Math.min(Nn,vr)}}),Wt.set(zt,Nn)}),Qt.selection.each(function(zt){vt._assignZOrder(zt,Wt.get(zt.layer)-1-vt._findGroupDepth(zt))}),Qt.commitTransaction("pushToBack")},vt._assignZOrder=function(Qt,Wt,zt){zt===void 0&&(zt=Qt),Qt.layer===zt.layer&&(Qt.zOrder=Wt),Qt instanceof go.Group&&Qt.memberParts.each(function(Nn){vt._assignZOrder(Nn,Wt+1,zt)})},vt._findGroupDepth=function(Qt){if(Qt instanceof go.Group){var Wt=0;return Qt.memberParts.each(function(zt){Wt=Math.max(Wt,vt._findGroupDepth(zt))}),Wt+1}else return 0},vt.prototype.doKeyDown=function(){var Qt=this.diagram;if(Qt!==null){var Wt=Qt.lastInput;if(Wt.key==="Up"||Wt.key==="Down"||Wt.key==="Left"||Wt.key==="Right"){var zt=this.arrowKeyBehavior;if(zt==="none")return;if(zt==="select"){this._arrowKeySelect();return}else if(zt==="move"){this._arrowKeyMove();return}else if(zt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},vt.prototype._getAllParts=function(){var Qt=new Array;return this.diagram.nodes.each(function(Wt){Qt.push(Wt)}),this.diagram.parts.each(function(Wt){Qt.push(Wt)}),Qt},vt.prototype._arrowKeyMove=function(){var Qt=this.diagram,Wt=Qt.lastInput,zt=0,Nn=0;if(Wt.control||Wt.meta)zt=1,Nn=1;else if(Qt.grid!==null){var Vn=Qt.grid.gridCellSize;Nn=Vn.width,zt=Vn.height}Qt.startTransaction("arrowKeyMove"),Qt.selection.each(function(vr){Wt.key==="Up"?vr.move(new go.Point(vr.actualBounds.x,vr.actualBounds.y-zt)):Wt.key==="Down"?vr.move(new go.Point(vr.actualBounds.x,vr.actualBounds.y+zt)):Wt.key==="Left"?vr.move(new go.Point(vr.actualBounds.x-Nn,vr.actualBounds.y)):Wt.key==="Right"&&vr.move(new go.Point(vr.actualBounds.x+Nn,vr.actualBounds.y))}),Qt.commitTransaction("arrowKeyMove")},vt.prototype._arrowKeySelect=function(){var Qt=this.diagram,Wt=Qt.lastInput,zt=null;Wt.key==="Up"?zt=this._findNearestPartTowards(270):Wt.key==="Down"?zt=this._findNearestPartTowards(90):Wt.key==="Left"?zt=this._findNearestPartTowards(180):Wt.key==="Right"&&(zt=this._findNearestPartTowards(0)),zt!==null&&(Wt.shift?zt.isSelected=!0:Wt.control||Wt.meta?zt.isSelected=!zt.isSelected:Qt.select(zt))},vt.prototype._findNearestPartTowards=function(Qt){var Wt=this.diagram.selection.first();if(Wt===null)return null;for(var zt=Wt.actualBounds.center,Nn=this._getAllParts(),Vn=1/0,vr=Wt,yn=0;yn<Nn.length;yn++){var zn=Nn[yn];if(zn!==Wt&&zn.canSelect()){var Ht=zn.actualBounds.center,Yt=zt.directionPoint(Ht),qn=this._angleCloseness(Yt,Qt);if(qn<=45){var jt=zt.distanceSquaredPoint(Ht);jt*=1+Math.sin(qn*Math.PI/180),jt<Vn&&(Vn=jt,vr=zn)}}}return vr},vt.prototype._angleCloseness=function(Qt,Wt){return Math.min(Math.abs(Wt-Qt),Math.min(Math.abs(Wt+360-Qt),Math.abs(Wt-360-Qt)))},vt.prototype._arrowKeyTree=function(){var Qt=this.diagram,Wt=Qt.selection.first();if(Wt instanceof go.Node){var zt=Qt.lastInput;if(zt.key==="Right"){if(!Wt.isTreeLeaf)if(!Wt.isTreeExpanded)Qt.commandHandler.canExpandTree(Wt)&&Qt.commandHandler.expandTree(Wt);else{var Nn=this._sortTreeChildrenByY(Wt).first();Nn!==null&&Qt.select(Nn)}}else if(zt.key==="Left")if(!Wt.isTreeLeaf&&Wt.isTreeExpanded)Qt.commandHandler.canCollapseTree(Wt)&&Qt.commandHandler.collapseTree(Wt);else{var Vn=Wt.findTreeParentNode();Vn!==null&&Qt.select(Vn)}else if(zt.key==="Up"){var Vn=Wt.findTreeParentNode();if(Vn!==null){var vr=this._sortTreeChildrenByY(Vn),yn=vr.indexOf(Wt);if(yn>0){for(var zn=vr.elt(yn-1);zn!==null&&zn.isTreeExpanded&&!zn.isTreeLeaf;){var Ht=this._sortTreeChildrenByY(zn);zn=Ht.last()}zn!==null&&Qt.select(zn)}else Qt.select(Vn)}}else if(zt.key==="Down")if(Wt.isTreeExpanded&&!Wt.isTreeLeaf){var Nn=this._sortTreeChildrenByY(Wt).first();Nn!==null&&Qt.select(Nn)}else for(;Wt!==null;){var Vn=Wt.findTreeParentNode();if(Vn===null)break;var vr=this._sortTreeChildrenByY(Vn),yn=vr.indexOf(Wt);if(yn<vr.length-1){Qt.select(vr.elt(yn+1));break}else Wt=Vn}var Yt=Qt.selection.first();Yt!==null&&Qt.scrollToRect(Yt.actualBounds)}},vt.prototype._sortTreeChildrenByY=function(Qt){var Wt=new go.List().addAll(Qt.findTreeChildrenNodes());return Wt.sort(function(zt,Nn){var Vn=zt.location,vr=Nn.location;return Vn.y<vr.y?-1:Vn.y>vr.y?1:Vn.x<vr.x?-1:Vn.x>vr.x?1:0}),Wt},vt.prototype.copyToClipboard=function(Qt){go.CommandHandler.prototype.copyToClipboard.call(this,Qt),this._lastPasteOffset.set(this.pasteOffset)},vt.prototype.pasteFromClipboard=function(){var Qt=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Qt,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Qt},Object.defineProperty(vt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Qt){if(Qt!=="move"&&Qt!=="select"&&Qt!=="scroll"&&Qt!=="tree"&&Qt!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Qt);this._arrowKeyBehavior=Qt}}),Object.defineProperty(vt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Qt){if(!(Qt instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Qt);this._pasteOffset.set(Qt)}});var et=vt,We=pt(71584),we=pt(5269),Ne=pt(24092),Xe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},nt=pt(69669),Ie=pt(59301),_e=(Qt,Wt,zt)=>new Promise((Nn,Vn)=>{var vr=Ht=>{try{zn(zt.next(Ht))}catch(Yt){Vn(Yt)}},yn=Ht=>{try{zn(zt.throw(Ht))}catch(Yt){Vn(Yt)}},zn=Ht=>Ht.done?Nn(Ht.value):Promise.resolve(Ht.value).then(vr,yn);zn((zt=zt.apply(Qt,Wt)).next())});function Ge({onCancel:Qt,callback:Wt}){let zt=(0,at.useRef)(),Nn=(0,at.useRef)(),Vn=(0,at.useRef)(),vr=(0,at.useRef)(!1);const yn=(0,at.useRef)(!1),[zn,Ht]=(0,at.useState)(0);function Yt(){const jt=mt.bx.make,un={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"};zt.current=new mt.S0(Nn.current,{padding:20,grid:jt(mt.s_,"Grid",jt(mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),jt(mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Qn=>{var or=Qn.diagram.commandHandler.addTopLevelParts(Qn.diagram.selection,!0);or||Qn.diagram.currentTool.doCancel()},commandHandler:jt(et),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Qn=>{var or=Qn.subject;or.location=or.location.copy().snapToGridPoint(Qn.diagram.grid.gridOrigin,Qn.diagram.grid.gridCellSize),setTimeout(()=>{Qn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Qn=>{var or=Qn.subject;setTimeout(()=>{Qn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Qn=>{var or=Qn.parameter.part;or.invalidateConnectedLinks();var yr=Qn.subject;Qn.diagram.toolManager.linkingTool.isForwards?yr.toNode.invalidateConnectedLinks():yr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),zt.current.nodeTemplate=jt(mt.NB,"Auto",{locationSpot:mt.z6.Center,locationObjectName:"SHAPE",desiredSize:new mt.$u(120,60),minSize:new mt.$u(40,40),resizable:!0,resizeCellSize:new mt.$u(10,10),rotatable:!0},new mt.KX("location","loc",mt.E9.parse).makeTwoWay(mt.E9.stringify),new mt.KX("desiredSize","size",mt.$u.parse).makeTwoWay(mt.$u.stringify),jt(mt.bn,{name:"SHAPE",fill:un.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:mt.z6.AllSides,toSpot:mt.z6.AllSides},new mt.KX("figure"),new mt.KX("fill"),new mt.KX("stroke","borderColor"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),jt(mt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),jt(mt.al,{margin:1,textAlign:"center",overflow:mt.al.OverflowEllipsis,editable:!0},new mt.KX("text").makeTwoWay(),new mt.KX("stroke","color"))),zt.current.nodeTemplate.toolTip=jt("ToolTip",jt(mt.s_,"Vertical",{maxSize:new mt.$u(200,NaN)},jt(mt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new mt.KX("text")),jt(mt.al,{font:"10pt sans-serif",textAlign:"center"},new mt.KX("text","details"))));function An(Qn,or){var yr=(br,Ar)=>{br.handled=!0,br.diagram.model.commit(ri=>{var Yr=Ar.part.adornedPart,Jr=new mt.E9().setRectSpot(Yr.actualBounds,Qn);Jr.subtract(Yr.location),Jr.scale(2,2),Jr.x+=Math.sign(Jr.x)*130,Jr.y+=Math.sign(Jr.y)*130,Jr.add(Yr.location),Jr.snapToGridPoint(br.diagram.grid.gridOrigin,br.diagram.grid.gridCellSize);var sr=ri.copyNodeData(Yr.data);ri.setGroupKeyForNodeData(sr,ri.getGroupKeyForNodeData(Yr.data)),ri.addNodeData(sr);var rn={from:Yr.key,to:ri.getKeyForNodeData(sr)};ri.addLinkData(rn);var nr=br.diagram.findNodeForData(sr);nr.location=Jr,br.diagram.select(nr),setTimeout(()=>{br.diagram.commandHandler.editTextBlock()},20)})};return jt(mt.bn,{figure:or,alignment:Qn,alignmentFocus:Qn.opposite(),width:Qn.equals(mt.z6.Top)||Qn.equals(mt.z6.Bottom)?25:18,height:Qn.equals(mt.z6.Top)||Qn.equals(mt.z6.Bottom)?18:25,fill:"orange",stroke:un.white,strokeWidth:4,mouseEnter:(br,Ar)=>Ar.fill="dodgerblue",mouseLeave:(br,Ar)=>Ar.fill="orange",isActionable:!0,click:yr,contextClick:yr})}function Yn(Qn){return jt(mt.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:(or,yr)=>yr.fill="dodgerblue",mouseLeave:(or,yr)=>yr.fill="orange",click:(or,yr)=>{or.diagram.commandHandler.showContextMenu(yr.part.adornedPart)}},Qn||{})}zt.current.nodeTemplate.selectionAdornmentTemplate=jt(mt.uz,"Spot",jt(mt.Vm,{padding:10}),An(mt.z6.Top,"TriangleUp"),An(mt.z6.Left,"TriangleLeft"),An(mt.z6.Right,"TriangleRight"),An(mt.z6.Bottom,"TriangleDown"),Yn({alignment:new mt.z6(.75,0)}));function ln(Qn,or){return(yr,br)=>{yr.handled=!0,yr.diagram.model.commit(Ar=>{Ar.set(br.part.adornedPart.data,Qn,or)})}}function fn(Qn,or){return or||(or="color"),jt(mt.bn,{width:16,height:16,stroke:"lightgray",fill:Qn,margin:1,background:"transparent",mouseEnter:(yr,br)=>br.stroke="dodgerblue",mouseLeave:(yr,br)=>br.stroke="lightgray",click:ln(or,Qn),contextClick:ln(or,Qn)})}function Hn(){return[jt("ContextMenuButton",jt(mt.s_,"Horizontal",fn(un.white,"fill"),fn(un.beige,"fill"),fn(un.extralightblue,"fill"),fn(un.extralightred,"fill"))),jt("ContextMenuButton",jt(mt.s_,"Horizontal",fn(un.lightgray,"fill"),fn(un.lightgreen,"fill"),fn(un.lightblue,"fill"),fn(un.lightred,"fill")))]}function tr(){return[jt("ContextMenuButton",jt(mt.s_,"Horizontal",fn(un.black),fn(un.green),fn(un.blue),fn(un.red))),jt("ContextMenuButton",jt(mt.s_,"Horizontal",fn(un.white),fn(un.magenta),fn(un.purple),fn(un.orange)))]}function Zn(Qn,or){return or||(or="thickness"),jt(mt.bn,"LineH",{width:16,height:16,strokeWidth:Qn,margin:1,background:"transparent",mouseEnter:(yr,br)=>br.background="dodgerblue",mouseLeave:(yr,br)=>br.background="transparent",click:ln(or,Qn),contextClick:ln(or,Qn)})}function ir(Qn,or){return or||(or="dash"),jt(mt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Qn,margin:1,background:"transparent",mouseEnter:(yr,br)=>br.background="dodgerblue",mouseLeave:(yr,br)=>br.background="transparent",click:ln(or,Qn),contextClick:ln(or,Qn)})}function Un(){return[jt("ContextMenuButton",jt(mt.s_,"Horizontal",Zn(1),Zn(2),Zn(3),Zn(4))),jt("ContextMenuButton",jt(mt.s_,"Horizontal",ir(null),ir([2,4]),ir([4,4])))]}function dr(Qn,or){return or||(or="figure"),jt(mt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Qn,margin:1,background:"transparent",mouseEnter:(yr,br)=>br.fill="dodgerblue",mouseLeave:(yr,br)=>br.fill="lightgray",click:ln(or,Qn),contextClick:ln(or,Qn)})}zt.current.nodeTemplate.contextMenu=jt("ContextMenu",jt("ContextMenuButton",jt(mt.s_,"Horizontal",dr("Rectangle"),dr("RoundedRectangle"),dr("Ellipse"),dr("Diamond"))),jt("ContextMenuButton",jt(mt.s_,"Horizontal",dr("Parallelogram2"),dr("ManualOperation"),dr("Procedure"),dr("Cylinder1"))),jt("ContextMenuButton",jt(mt.s_,"Horizontal",dr("Terminator"),dr("CreateRequest"),dr("Document"),dr("TriangleDown"))),Hn(),tr(),Un()),zt.current.groupTemplate=jt(mt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:mt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Qn,or)=>{var yr=or.addMembers(or.diagram.selection,!0);yr||or.diagram.currentTool.doCancel()},avoidable:!1},new mt.KX("location","loc",mt.E9.parse).makeTwoWay(mt.E9.stringify),jt(mt.s_,"Auto",{name:"BODY"},jt(mt.bn,{parameter1:10,fill:un.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:mt.z6.AllSides,toSpot:mt.z6.AllSides},new mt.KX("fill"),new mt.KX("stroke","color"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),jt(mt.Vm,{background:"transparent",margin:20})),jt(mt.al,{alignment:mt.z6.Top,alignmentFocus:mt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new mt.KX("text"),new mt.KX("stroke","color"))),zt.current.groupTemplate.selectionAdornmentTemplate=jt(mt.uz,"Spot",jt(mt.s_,"Auto",jt(mt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),jt(mt.Vm,{margin:1.5})),Yn({alignment:mt.z6.TopRight,alignmentFocus:mt.z6.BottomRight})),zt.current.groupTemplate.contextMenu=jt("ContextMenu",Hn(),tr(),Un()),zt.current.linkTemplate=jt(mt.rU,{layerName:"Foreground",routing:mt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new mt.KX("fromSpot","fromSpot",mt.z6.parse),new mt.KX("toSpot","toSpot",mt.z6.parse),new mt.KX("fromShortLength","dir",Qn=>Qn>=1?10:0),new mt.KX("toShortLength","dir",Qn=>Qn>=1?10:0),new mt.KX("points").makeTwoWay(),jt(mt.bn,{strokeWidth:2},new mt.KX("stroke","color"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),jt(mt.bn,{segmentIndex:0,segmentOffset:new mt.E9(15,0),segmentOrientation:mt.rU.OrientAlong,alignmentFocus:mt.z6.Right,figure:"circle",width:10,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",Qn=>Qn===1)),jt(mt.bn,{segmentIndex:-1,segmentOffset:new mt.E9(-10,6),segmentOrientation:mt.rU.OrientPlus90,alignmentFocus:mt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",Qn=>Qn>=1),new mt.KX("width","thickness",Qn=>7+3*Qn),new mt.KX("height","thickness",Qn=>7+3*Qn),new mt.KX("segmentOffset","thickness",Qn=>new mt.E9(-15,4+1.5*Qn))),jt(mt.bn,{segmentIndex:0,segmentOffset:new mt.E9(15,-6),segmentOrientation:mt.rU.OrientMinus90,alignmentFocus:mt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",Qn=>Qn===2),new mt.KX("width","thickness",Qn=>7+3*Qn),new mt.KX("height","thickness",Qn=>7+3*Qn),new mt.KX("segmentOffset","thickness",Qn=>new mt.E9(-15,4+1.5*Qn))),jt(mt.al,{alignmentFocus:new mt.z6(0,1,-4,0),editable:!0},new mt.KX("text").makeTwoWay(),new mt.KX("stroke","color"))),zt.current.linkTemplate.selectionAdornmentTemplate=jt(mt.uz,jt(mt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Fr(2)},new mt.KX("pathPattern","thickness",Fr)),Yn({alignmentFocus:new mt.z6(0,0,-6,-4)}));function Fr(Qn){return jt(mt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Qn+4).toString()+" H3"})}function Nr(Qn){var or="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Qn===0?or="M0 0 M16 16 M0 8 L16 8":Qn===2&&(or="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),jt(mt.bn,{geometryString:or,margin:2,background:"transparent",mouseEnter:(yr,br)=>br.background="dodgerblue",mouseLeave:(yr,br)=>br.background="transparent",click:ln("dir",Qn),contextClick:ln("dir",Qn)})}function Rr(Qn){var or=(yr,br)=>{yr.handled=!0,yr.diagram.model.commit(Ar=>{var ri=br.part.adornedPart;Ar.set(ri.data,Qn?"toSpot":"fromSpot",mt.z6.stringify(mt.z6.AllSides)),(Qn?ri.toNode:ri.fromNode).invalidateConnectedLinks()})};return jt(mt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(yr,br)=>br.background="dodgerblue",mouseLeave:(yr,br)=>br.background="transparent",click:or,contextClick:or})}function gn(Qn,or){var yr=0,br=mt.z6.RightSide;Qn.equals(mt.z6.Top)?(yr=270,br=mt.z6.TopSide):Qn.equals(mt.z6.Left)?(yr=180,br=mt.z6.LeftSide):Qn.equals(mt.z6.Bottom)&&(yr=90,br=mt.z6.BottomSide),or||(yr-=180);var Ar=(ri,Yr)=>{ri.handled=!0,ri.diagram.model.commit(Jr=>{var sr=Yr.part.adornedPart;Jr.set(sr.data,or?"toSpot":"fromSpot",mt.z6.stringify(br)),(or?sr.toNode:sr.fromNode).invalidateConnectedLinks()})};return jt(mt.bn,{alignment:Qn,alignmentFocus:Qn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:yr,background:"transparent",mouseEnter:(ri,Yr)=>Yr.background="dodgerblue",mouseLeave:(ri,Yr)=>Yr.background="transparent",click:Ar,contextClick:Ar})}zt.current.linkTemplate.contextMenu=jt("ContextMenu",tr(),Un(),jt("ContextMenuButton",jt(mt.s_,"Horizontal",Nr(0),Nr(1),Nr(2))),jt("ContextMenuButton",jt(mt.s_,"Horizontal",jt(mt.s_,"Spot",Rr(!1),gn(mt.z6.Top,!1),gn(mt.z6.Left,!1),gn(mt.z6.Right,!1),gn(mt.z6.Bottom,!1)),jt(mt.s_,"Spot",{margin:new mt.Zt(0,0,0,2)},Rr(!0),gn(mt.z6.Top,!0),gn(mt.z6.Left,!0),gn(mt.z6.Right,!0),gn(mt.z6.Bottom,!0)))));const Fi=`{ "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 ti=["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 Mi(Qn){return console.log("shapeName:",Qn),ti.indexOf(Qn)>=0}var an=new mt.YI(Vn.current,{maxSelectionCount:1,linkTemplate:jt(mt.rU,{locationSpot:mt.z6.Center,selectionAdornmentTemplate:jt(mt.uz,"Link",{locationSpot:mt.z6.Center},jt(mt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),jt(mt.bn,{toArrow:"Standard",stroke:null}))},{routing:mt.rU.AvoidsNodes,curve:mt.rU.JumpOver,corner:5,toShortLength:4},new mt.KX("points"),jt(mt.bn,{isPanelMain:!0,strokeWidth:2}),jt(mt.bn,{toArrow:"Standard",stroke:null})),model:new mt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...mt.bn.getFigureGenerators().toArray().map(Qn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Qn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return zt.current.addDiagramListener("TextEdited",function(Qn){var or;const yr=Qn.subject.part;var br=(or=document.activeElement)==null?void 0:or.value;typeof br=="string"&&br.trim()===""&&zt.current.model.commit(function(Ar){Ar.set(yr.data,"text","\u672A\u547D\u540D"),zt.current.commandHandler.stopCommand()},"increment")}),an.nodeTemplate=jt(mt.NB,"Auto",{locationSpot:mt.z6.Center},new mt.KX("location","location",mt.E9.parse).makeTwoWay(mt.E9.stringify),jt(mt.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 mt.KX("stroke").makeTwoWay(),new mt.KX("fill").makeTwoWay(),new mt.KX("figure")),jt(mt.al,{margin:new mt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new mt.$u(16,16),maxSize:new mt.$u(10,NaN),textAlign:"center",editable:!0},new mt.KX("key").makeTwoWay())),setTimeout(()=>{zt.current.grid=jt(mt.s_,"Grid",jt(mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),jt(mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),zt.current.grid.visible=!0,zt.current.grid.gridCellStroke="darkgray",zt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=zt.current,zt.current}const qn=()=>_e(this,null,function*(){var jt,un=zt.current.makeImage();const An=yield(0,Ne.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:un.src,file_data:JSON.stringify({login:(jt=(0,nt.eY)())==null?void 0:jt.login,data:JSON.parse(zt.current.model.toJson())})}});Wt({src:An.url})});return(0,at.useEffect)(()=>(setTimeout(()=>{Yt()},500),Ht(zn+1),()=>{zt.current=null}),[]),Ie.createElement("div",{ref:yn,className:"body-overflow-initial"},Ie.createElement(xt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!zn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Ie.createElement(dt.Z,null,Ie.createElement(we.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ie.createElement(we.Z,{onClick:()=>{var jt,un,An=zt.current.selection.first();if(vr.current=!vr.current,document.activeElement&&An){let Yn=(un=(jt=document.activeElement)==null?void 0:jt.value)==null?void 0:un.trim();typeof Yn=="string"&&zt.current.model.commit(function(ln){ln.set(An.data,"text",Yn||"\u672A\u547D\u540D"),zt.current.commandHandler.stopCommand()},"increment")}Ht(zn+1)}},Ie.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Qt},Ie.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:vr.current?"none":"block"},className:Xe.flowChartWrp},Ie.createElement("div",{style:{display:"flex",height:"100%"}},Ie.createElement("div",{style:{width:"300px",height:"100%"}},Ie.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Ie.createElement("div",{style:{height:"calc(100% - 50px)"},className:Xe.myPaletteDiv,ref:Vn})),Ie.createElement("div",{style:{flex:1,position:"relative"}},Ie.createElement("div",{ref:Nn,style:{height:"80vh"}}))),Ie.createElement("div",{className:"tr"},Ie.createElement(Ue.ZP,{size:"large",onClick:qn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var tt=Ge,ht=pt(47889),ut=pt(71051);const Ot=ht.ZP.Group,Et={margin:"0 8px"};var Ft=({callback:Qt,onCancel:Wt})=>{function zt(Nn){Qt(Nn)}return at.createElement(Me.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:zt},at.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},at.createElement("span",{style:Et},"\u5355\u5143\u683C\u6570\uFF1A"),at.createElement("span",{style:Et},"\u884C\u6570"),at.createElement(Me.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},at.createElement(ut.Z,null)),at.createElement("span",{style:Et},"\u5217\u6570"),at.createElement(Me.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},at.createElement(ut.Z,null))),at.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},at.createElement("span",{style:Et},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),at.createElement(Me.default.Item,{name:"align"},at.createElement(Ot,null,at.createElement(ht.ZP,{value:"default"},at.createElement("i",{className:"fa fa-align-justify"})),at.createElement(ht.ZP,{value:"left"},at.createElement("i",{className:"fa fa-align-left"})),at.createElement(ht.ZP,{value:"center"},at.createElement("i",{className:"fa fa-align-center"})),at.createElement(ht.ZP,{value:"right"},at.createElement("i",{className:"fa fa-align-right"}))))),at.createElement("div",{className:"flex-container flex-end"},at.createElement(Ue.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),at.createElement(Ue.ZP,{type:"ghost",onClick:Wt},"\u53D6\u6D88")))},qt=pt(71411),Xt=pt(91e3),Kt=pt.n(Xt),hn=(0,at.forwardRef)(({use3d:Qt,width:Wt,height:zt,callback:Nn,showSaveButton:Vn},vr)=>{const yn=(0,at.useRef)(),zn=(0,at.useRef)(),[Ht,Yt]=(0,at.useState)(!1),qn=(0,at.useRef)({id:yn,appName:"graphing",width:Wt||1e3,height:zt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,at.useEffect)(()=>{zn.current=new(Kt())(qn.current,!0),window.onload=function(){zn.current.inject("applet_container")}},[]);const jt=()=>{var un=window.ggbApplet.getPNGBase64(1,!0,72);return Nn&&Nn(un),un};return(0,at.useEffect)(()=>{qn.current.appName=Ht?"3D":"graphing",zn.current.inject("applet_container")},[Ht]),(0,at.useEffect)(()=>{Yt(Qt)},[Qt]),(0,at.useImperativeHandle)(vr,()=>({getImgData:jt})),at.createElement(at.Fragment,null,at.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:yn}),at.createElement(dt.Z,{align:"middle"},at.createElement(we.Z,{flex:1},at.createElement(qt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Ht,onChange:un=>Yt(un)})),at.createElement(we.Z,null,at.createElement(Ue.ZP,{size:"large",onClick:jt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),on=pt(88831),cn=pt(6767);const Sn="link",Cn="upload-image",kn="add-flowchart",In="draw-image",_r="add-flowchart",xr="code-block",qr="add-table",er="------------",si={default:er,left:`:${er}`,center:`:${er}:`,right:`${er}:`};var ei=pt(23206);function vi(){}let Li=0;const Pi=1e4,Xr="\u2581",mi="@\u2581\u2581@",Qe="@\u2581@",ii=`
|
|
**\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`,Tr=["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 wr(Qt){return/^\d+$/.test(Qt)?`${Qt}px`:Qt}const kr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Hi={[kr+"-B"]:"bold",[kr+"-I"]:"italic"},pr={[Sn]:"\u6DFB\u52A0\u94FE\u63A5",[xr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Cn]:"\u6DFB\u52A0\u56FE\u7247",[In]:"\u6DFB\u52A0\u753B\u56FE",[kn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[qr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Kn=({defaultValue:Qt="",onChange:Wt,width:zt="100%",height:Nn=400,miniToolbar:Vn=!1,isFocus:vr=!1,watch:yn,insertTemp:zn,mode:Ht="markdown",id:Yt="markdown-editor-id",showResizeBar:qn=!1,noStorage:jt=!1,showNullButton:un=!1,showNullProgramButton:An=!1,hidetoolBar:Yn=!1,fullScreen:ln=!1,onBlur:fn,onCMBeforeChange:Hn,onFullScreen:tr,className:Zn="",disablePaste:ir=!1,disabled:Un=!1,disabledFill:dr=!1,placeholder:Fr="",values:Nr="",extraUse:Rr})=>{const[gn,Fi]=(0,at.useState)(null),[ti,Mi]=(0,at.useState)(Qt),[an,Qn]=(0,at.useState)(yn),[or,yr]=(0,at.useState)(ln),[br,Ar]=(0,at.useState)(""),[ri,Yr]=(0,at.useState)(0),[Jr,sr]=(0,at.useState)(Nn),[rn,nr]=(0,at.useState)(!1),[sn,hr]=(0,at.useState)(0),[Pr,zr]=(0,at.useState)(0),Ri=(0,at.useRef)(),Oi=(0,at.useRef)(),Si=(0,at.useRef)(),Di=(0,at.useRef)();(0,at.useEffect)(()=>{const mr=window.scrollY||window.pageYOffset;Mi(Nr),gn==null||gn.setValue(Nr),window.scrollTo(0,mr)},[Nr]),(0,at.useEffect)(()=>{tr==null||tr(or)},[or]),(0,at.useEffect)(()=>{if(Ri.current){let mr=function(vn,fr){var Or;if(ir){fr.preventDefault();return}const oi=fr.clipboardData;if(oi){const Qr=oi.types.toString(),ui=oi.items;if(Qr==="Files"||oi.types.indexOf("Files")>-1){if(fr.preventDefault(),Ht=="stex")return;try{let di=ui[1];((Or=ui[0])==null?void 0:Or.kind)==="file"&&(di=ui[0]);const hi=di.getAsFile(),_i=hi.name.split(".").pop();(0,ct.I)(hi,zi=>{var mo,$t,yi;zi.id?((mo=hi==null?void 0:hi.type)==null?void 0:mo.indexOf("image"))>-1?lr.replaceSelection(`<img width="100%" src="/api/attachments/${zi.id}?type=${zi.content_type})" alt="" />`):(($t=hi==null?void 0:hi.type)==null?void 0:$t.indexOf("video"))>-1?lr.replaceSelection(`<video width="100%" controls src="/api/attachments/${zi.id}"></video>`):((yi=hi==null?void 0:hi.type)==null?void 0:yi.indexOf("pdf"))>-1?lr.replaceSelection(`<a href="/api/attachments/${zi.id}?type=${hi.type}&disposition=inline" target="_blank">${hi.name}</a>`):Tr.includes(_i)?lr.replaceSelection(`<a href="/api/attachments/${zi.id}?type=office&disposition=inline" target="_blank">${hi.name}</a>`):lr.replaceSelection(`[${hi.name}](/api/attachments/${zi.id}?type=${zi.content_type})`):(zi==null?void 0:zi.status)===401&&(document.location.href="/user/login")})}catch(di){cn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const lr=oe().fromTextArea(Ri.current,{mode:Ht,lineNumbers:!Vn,lineWrapping:!0,value:Qt,autoCloseTags:!0,autoCloseBrackets:!0});return lr.on("keyup",function(vn,fr){fr.keyCode===8&&(vn.getValue()==""?lr.setOption("placeholder",Fr):lr.setOption("placeholder",null))}),lr.on("keydown",function(vn,fr){if(fr.keyCode===8){var Or=pn(vn);Or&&fr.preventDefault()}}),vr&&lr.focus(),lr.on("paste",mr),Un&&lr.on("beforeChange",function(vn,fr){(fr.origin==="paste"||fr.origin==="+input")&&fr.cancel()}),Fi(lr),()=>{lr.off("paste",mr)}}},[]);const en=(0,at.useCallback)(()=>{if(Oi.current)try{}catch(mr){console.log(mr,"---- to set md editor body height")}},[Jr,Oi,or]);(0,at.useEffect)(()=>{function mr(){let lr=new He.Z(vn=>{for(let fr of vn)(fr.target.offsetHeight>0||fr.target.offsetWidth>0)&&(en(),gn.setSize("100%","100%"),gn.refresh())});return lr.observe(Ri.current.parentElement),lr}if(gn){const lr=mr();return()=>{var vn,fr;(vn=Ri.current)!=null&&vn.parentElement&&lr.unobserve((fr=Ri.current)==null?void 0:fr.parentElement)}}},[gn,en]),(0,at.useEffect)(()=>{if(gn){let mr=[];for(const[lr,vn]of Object.entries(Hi)){let fr={[lr]:()=>{tn(vn)}};mr.push(fr),gn.addKeyMap(fr)}return()=>{for(let lr of mr)gn.removeKeyMap(lr)}}},[gn]),(0,at.useEffect)(()=>{ln!==or&&yr(ln)},[ln]),(0,ei.Z)(()=>{if(!jt&&ri>0){let mr=new Date().getTime(),lr=window.sessionStorage.getItem(Yt);mr>=ri+Pi&&(!lr||lr!==ti)&&(window.sessionStorage.setItem(Yt,ti),nr(!0))}},Pi),(0,at.useEffect)(()=>{Qn(yn)},[gn,yn]),(0,at.useEffect)(()=>{gn&&vr&&gn.focus()},[gn,vr]),(0,at.useEffect)(()=>{if(an&&gn){let mr=function(vn){let fr=vn.target;if(Di.current){let Or=fr.scrollTop/fr.scrollHeight;Di.current.scrollTop=Di.current.scrollHeight*Or}};const lr=gn.getScrollerElement();return lr.addEventListener("scroll",mr),()=>{lr.removeEventListener("scroll",mr)}}},[gn,an]),(0,at.useEffect)(()=>{if(gn&&Hn){let mr=function(lr,vn){Hn(lr,vn)};return gn.on("beforeChange",mr),()=>{gn.off("beforeChange",mr)}}},[gn,Hn]),(0,at.useEffect)(()=>{if(gn&&fn){let mr=function(){fn(gn.getValue())};return gn.on("blur",mr),()=>{gn.off("blur",mr)}}},[gn,fn]);function pn(mr,lr){var vn=mr.getDoc(),fr=vn.getCursor(),Or=vn.getLine(fr.line),oi=Or.charAt(fr.ch-1),Qr=Or.lastIndexOf("@\u2581@",fr.ch),ui=Or.lastIndexOf("@\u2581\u2581@",fr.ch),di=Qr>ui?Qr:ui,hi=Qr>ui?3:4;if(mi.indexOf(oi)===-1)return null;if(console.log("change1:",lr,mr,Or,fr,di,Qr,ui,oi),di>=0&&fr.ch-di<5){var _i=di+hi;return vn.replaceRange("",{line:fr.line,ch:di},{line:fr.line,ch:_i}),{line:fr.line,ch:_i}}return null}(0,at.useEffect)(()=>{if(gn){let mr=function(lr,vn){const fr=lr.getValue();Mi(fr),Yr(new Date().getTime()),lr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Wt&&(An?Wt(fr,Rn(fr)):Wt(fr))};return gn.on("change",mr),()=>{gn.off("change",mr)}}},[gn,Wt]),(0,at.useEffect)(()=>{if(gn)if(Qt==null)gn.setValue(""),Mi("");else{const mr=window.scrollY||window.pageYOffset;Qt!==gn.getValue()&&(gn.setValue(Qt),Mi(Qt),gn.setCursor(Un?1:gn.lineCount(),0),window.scrollTo(0,mr))}},[gn,Qt]);const tn=(0,at.useCallback)(mr=>{const lr=gn.getCursor(),vn=gn.getSelection();let fr=vn.split(`
|
|
`);switch(mr){case"bold":return gn.replaceSelection("**"+vn+"**"),vn===""&&gn.setCursor(lr.line,lr.ch+2),gn.focus();case"italic":return gn.replaceSelection("*"+vn+"*"),vn===""&&gn.setCursor(lr.line,lr.ch+1),gn.focus();case"code":return gn.replaceSelection("`"+vn+"`"),vn===""&&gn.setCursor(lr.line,lr.ch+1),gn.focus();case"inline-latex":return Ar("inline-latex"),gn.focus();case"latex":return gn.replaceSelection("```latex\n"+vn+"\n```"),gn.setCursor(lr.line+1,vn.length+1),gn.focus();case"line-break":return gn.replaceSelection(`<br/>
|
|
`),gn.focus();case"list-ul":return vn===""?gn.replaceSelection("- "+vn):gn.replaceSelection(fr.map(Or=>Or===""?"":`- ${Or}`).join(`
|
|
`)),gn.focus();case"list-ol":return vn===""?gn.replaceSelection("1. "+vn):gn.replaceSelection(fr.map((Or,oi)=>Or===""?"":`${oi+1}. ${Or}`).join(`
|
|
`)),gn.focus();case"add-null-ch":return vn===""&&gn.setCursor(lr.line,lr.ch),gn.replaceSelection(Xr),gn.focus();case"add-signal":return vn===""&&gn.setCursor(lr.line,lr.ch),gn.replaceSelection(Qe),gn.focus();case"add-multiple":return vn===""&&gn.setCursor(lr.line,lr.ch),gn.replaceSelection(mi),gn.focus();case"inster-template-1":return vn===""&&gn.setCursor(lr.line,lr.ch),gn.replaceSelection(ii),gn.focus();case"eraser":return gn.setValue(""),gn.focus();case"trigger-watch":return Qn(!an),gn.focus();case"trigger-full-screen":return yr(!or),gn.focus();case Sn:Ar(Sn);return;case xr:Ar(xr);return;case Cn:Ar(Cn);return;case In:Ar(In);return;case"maths-latex":Ar("maths-latex");return;case kn:Ar(kn);return;case qr:Ar(qr);return;default:throw new Error}},[gn,an,or]),st=(0,at.useCallback)((mr,lr)=>{var vn,fr,Or,oi,Qr,ui;switch(Ar(""),br){case Sn:const{title:mo,link:$t}=mr;return gn.replaceSelection(`[${mo}](${$t})`),gn.focus();case xr:const{language:yi,content:Ti}=mr;return gn.replaceSelection(["```"+yi,Ti,"```"].join(`
|
|
`)),gn.focus();case"maths-latex":for(var di=atob(mr),hi=new Uint8Array(di.length),_i=0;_i<di.length;_i++)hi[_i]=di.charCodeAt(_i);var zi=new Blob([hi],{type:"image/png"});(0,ct.I)(zi,Ao=>{Ao.id?gn.replaceSelection(``):(Ao==null?void 0:Ao.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":gn.replaceSelection("`$$"+mr+"$$`");break;case Cn:case In:case _r:const{src:Vr,alt:Ci}=mr,Hr=lr,eo=(Or=(fr=(vn=Hr==null?void 0:Hr.name)==null?void 0:vn.split("."))==null?void 0:fr.pop)==null?void 0:Or.call(fr);return((oi=Hr==null?void 0:Hr.type)==null?void 0:oi.indexOf("image"))>-1||!(Hr!=null&&Hr.type)?Hr!=null&&Hr.align||Hr!=null&&Hr.width?gn.replaceSelection(`<p style="text-align:${Hr.align||"initial"}"><img width="${Hr.width?Hr.width+"%":"initial"}" src="${Vr}" alt="${Ci||""}" /></p>`):gn.replaceSelection(`<img width="100%" src="${Vr}" alt="${Ci||""}" />`):((Qr=Hr==null?void 0:Hr.type)==null?void 0:Qr.indexOf("video"))>-1?gn.replaceSelection(`<video width="100%" controls src="${Vr}"></video>`):((ui=Hr==null?void 0:Hr.type)==null?void 0:ui.indexOf("pdf"))>-1?gn.replaceSelection(`<a href="${Vr}?type=${Hr.type}&disposition=inline" target="_blank">${Hr.name}</a>`):Tr.includes(eo)?gn.replaceSelection(`<a href="${Vr}?type=office&disposition=inline" target="_blank">${Hr.name}</a>`):gn.replaceSelection(`[${Hr.name}](${Vr})`),gn.focus();case qr:const{row:Gi,col:xi,align:qi}=mr;let ga=`
|
|
`;for(let Ao=0;Ao<Gi;Ao++){let Aa=[],ma=[];for(let Gr=0;Gr<xi;Gr++)Ao===1&&ma.push(si[qi]),Aa.push(" ");Ao===1&&(ga+=`| ${ma.join(" | ")} |
|
|
`),ga+=`| ${Aa.join(xi===1?"":" | ")} |
|
|
`}return gn.replaceSelection(ga+`
|
|
`),gn.focus();default:throw new Error}},[gn,br]),Bn=(0,at.useMemo)(()=>{switch(br){case Sn:return at.createElement(Ct,{callback:st,onCancel:Pn});case xr:return at.createElement(bt.Z,{callback:st,onCancel:Pn});case Cn:return at.createElement(ct.Z,{callback:st,onCancel:Pn});case kn:return at.createElement(tt,{callback:st,onCancel:Pn});case qr:return at.createElement(Ft,{callback:st,onCancel:Pn});case"maths-latex":return at.createElement(hn,{showSaveButton:!0,callback:st});case"inline-latex":return at.createElement(on.Z,{showSaveButton:!0,callback:st});default:return null}},[br]);function Pn(){Ar("")}(0,at.useEffect)(()=>{if(Si.current){let mr=function(Qr){Or=!0,oi=Qr.pageY},lr=function(){Or=!1},vn=function(Qr){if(Or){let ui=Qr.pageY-oi;ui<0&&(ui=0),ui>300&&(ui=300);let di=Nn+ui+"px";sr(di)}},fr=Si.current,Or=!1,oi=0;return fr.addEventListener("mousedown",mr),document.addEventListener("mousemove",vn),document.addEventListener("mouseup",lr),()=>{fr.removeEventListener("mousedown",mr),document.removeEventListener("mousemove",vn),document.removeEventListener("mouseup",lr)}}},[gn,Si]),(0,at.useEffect)(()=>{sr(Nn)},[Nn]);const Fn=wr(zt),Jn=wr(Jr),ar={width:Fn,height:Jn},wn=(0,at.useMemo)(()=>{if(ri){let mr=new Date(ri),lr=mr.getHours(),vn=mr.getMinutes(),fr=mr.getSeconds();return lr=lr<10?"0"+lr:lr,vn=vn<10?"0"+vn:vn,fr=fr<10?"0"+fr:fr,`${lr}:${vn}:${fr}`}return 0},[ri]),Rn=mr=>{const lr=[];if(An){let vn=-1;mr=mr.replace(/(@▁▁@|@▁@)/g,function(fr,Or,oi){lr.push({multiLine:fr!==Qe})})}return lr};function Gn(){window.sessionStorage.removeItem(Yt),nr(!1),Yr(0)}function Wn(){nr(!1),Yr(0),gn.setValue(window.sessionStorage.getItem(Yt))}(0,at.useEffect)(()=>{pr[br]&&br!==In&&br!==kn&&setTimeout(()=>{const mr=document.getElementsByClassName("markdown-popup-form")[0],lr=window.innerWidth/2-mr.offsetWidth/2,vn=window.innerHeight/2-mr.offsetHeight/2;hr(lr),zr(vn)},0)},[br]);const Xn=mr=>{mr.preventDefault();const lr=mr.clientX-sn,vn=mr.clientY-Pr;document.body.onmousemove=fr=>{let Or=fr.clientX-lr,oi=fr.clientY-vn;const Qr=document.getElementsByClassName("markdown-popup-form")[0],ui=window.innerWidth-Qr.offsetWidth,di=window.innerHeight-Qr.offsetHeight;Or=Math.max(0,Math.min(Or,ui)),oi=Math.max(0,Math.min(oi,di)),Lr(fr.clientX,fr.clientY,lr,vn)&&(hr(Or),zr(oi))},document.body.onmouseup=function(){document.body.onmousemove=null}},Lr=(mr,lr,vn,fr)=>{const Or=document.body.clientHeight,oi=document.body.clientWidth;return mr<20&&vn>mr||mr>oi-20&&vn<mr||lr<20&&fr>lr||lr>Or-20&&fr<lr?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return at.createElement(at.Fragment,null,at.createElement("div",{className:"markdown-editor-wrapper",ref:Oi},at.createElement("div",{className:`markdown-editor-container ${Zn} ${an?"on-preview":""} ${Vn?"mini":""} ${or?"full-screen":""}`,style:ar},at.createElement(Fe,{insertTemp:zn,watch:an,fullScreen:or,showNullButton:un,showNullProgramButton:An,onActionCallback:tn,hidetoolBar:Yn,extraUse:Rr}),at.createElement("div",{className:"markdown-editor-body"},at.createElement("div",{className:"codemirror-container"},at.createElement("textarea",{ref:Ri,placeholder:Fr})),an?at.createElement("div",{ref:Di,className:"preview-container"},Ht==="stex"&&at.createElement(me,{value:ti}),Ht!=="stex"&&at.createElement(Ae.Z,{disabledFill:dr,showProgramFill:An,value:ti})):null))),qn?at.createElement("a",{ref:Si,className:"editor-resize"}):null,br===In&&at.createElement(Dt,{callback:st,onCancel:Pn}),br===kn&&at.createElement(tt,{callback:st,onCancel:Pn}),at.createElement(Te.Z,null,pr[br]&&br!==In&&br!==kn?at.createElement(xt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:sn,top:Pr},title:at.createElement("div",{style:{cursor:"move"},onMouseDown:Xn},pr[br]),open:!0,onCancel:Pn,footer:null,destroyOnClose:!0,width:br===kn?"1200px":null,height:br===kn?"80vh":null,className:"markdown-popup-form"},Bn):null))}},24141:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return je},I:function(){return Fe}});var at=pt(28284),Ut=pt(6767),oe=pt(37568),He=pt(77736),Re=pt(71051),de=pt(47889),ve=pt(99571),Ee=pt(55322),ke=pt(59301),Se=pt(59301),Ae=Object.defineProperty,me=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,se=(Te,Me,Be)=>Me in Te?Ae(Te,Me,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Te[Me]=Be,ie=(Te,Me)=>{for(var Be in Me||(Me={}))z.call(Me,Be)&&se(Te,Be,Me[Be]);if(fe)for(var Be of fe(Me))te.call(Me,Be)&&se(Te,Be,Me[Be]);return Te},le=(Te,Me)=>me(Te,Pe(Me));const{useForm:ce}=at.default,pe={width:280,marginRight:10},xe={labelCol:{span:5},wrapperCol:{span:19}};var je=({callback:Te,onCancel:Me})=>{const[Be]=ce();let Ue=(0,ke.useRef)();function Ye(ot){Ue.current.width=Be.getFieldValue("width"),Ue.current.align=Be.getFieldValue("align"),Te(ot,Ue.current)}function Ve(ot,lt){if(ot.status===-1){Ut.ZP.error(ot.message);return}Be.setFieldsValue({src:`/api/attachments/${ot.id}`,type:lt.type})}function Ze(ot){let lt=ot.target.files[0];Ue.current=lt,Fe(lt,Ve)}return Se.createElement(at.default,le(ie({form:Be},xe),{className:"upload-image-panel",onFinish:Ye,style:{width:470,overflow:"hidden"}}),Se.createElement(at.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Se.createElement("div",{className:"flex-container"},Se.createElement(at.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Se.createElement(oe.default,{style:pe})),Se.createElement(De,{onFileChange:Ze}))),Se.createElement(at.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Se.createElement(oe.default,{style:{width:264}})),Se.createElement(at.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Se.createElement(He.Z,null,Se.createElement(at.default.Item,{name:"width",style:{margin:0}},Se.createElement(Re.Z,{style:{width:264}})),Se.createElement("span",{className:"ml8"},"%"))),Se.createElement(at.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Se.createElement(de.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),Se.createElement("aside",null,Se.createElement(at.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Se.createElement(ve.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Se.createElement(ve.ZP,{type:"default",onClick:Me},"\u53D6\u6D88"))))};function De({onFileChange:Te}){return Se.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Se.createElement("input",{type:"file",onChange:Te}))}function Fe(Te,Me){if(!Te)throw new String("\u6CA1\u6709\u6587\u4EF6");let Be=new FormData;Be.append("editormd-image-file",Te),Be.append("file_param_name","editormd-image-file"),Be.append("byxhr","true");var Ue=new window.XMLHttpRequest;Ue.withCredentials=!0,Ue.addEventListener("load",function(Ye){Me(JSON.parse(Ye.target.responseText),Te)},!1),Ue.addEventListener("error",function(Ye){console.error(Ye)},!1),Ue.open("POST",`${Ee.KI}/api/attachments.json`),Ue.send(Be)}},52272:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return oe}});var at=pt(59301),Ut=pt(4676);class oe extends at.Component{constructor(Re){super(Re);const de=window.document;this.node=de.createElement("div"),de.body.appendChild(this.node)}render(){const{children:Re}=this.props;return(0,Ut.createPortal)(Re,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},89081:function(Dn,jn,pt){"use strict";pt.d(jn,{SV:function(){return _e},ZP:function(){return Ie}});var at=pt(59301),Ut=pt(76374);const oe={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"]},He={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"]},Re={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(`
|
|
`)}]},de={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(`
|
|
`)}]},ve={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 Ee=pt(53184),ke=pt.n(Ee),Se=Object.defineProperty,Ae=Object.defineProperties,me=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(Ge,tt,ht)=>tt in Ge?Se(Ge,tt,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[tt]=ht,se=(Ge,tt)=>{for(var ht in tt||(tt={}))fe.call(tt,ht)&&te(Ge,ht,tt[ht]);if(Pe)for(var ht of Pe(tt))z.call(tt,ht)&&te(Ge,ht,tt[ht]);return Ge},ie=(Ge,tt)=>Ae(Ge,me(tt)),le=(Ge,tt,ht)=>new Promise((ut,Ot)=>{var Et=Xt=>{try{qt(ht.next(Xt))}catch(Kt){Ot(Kt)}},Ft=Xt=>{try{qt(ht.throw(Xt))}catch(Kt){Ot(Kt)}},qt=Xt=>Xt.done?ut(Xt.value):Promise.resolve(Xt.value).then(Et,Ft);qt((ht=ht.apply(Ge,tt)).next())});const ce={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},pe=(Ge,tt)=>tt.map(ht=>({label:ht,kind:Ge.languages.CompletionItemKind.Keyword,insertText:ht})),xe=Ge=>Object.keys(ce.tables).map(tt=>({label:tt,kind:Ge.languages.CompletionItemKind.Variable,insertText:tt})),je=(Ge,tt)=>{const ht=ce.tables[Ge];return ht?ht.map(ut=>({label:ut,kind:tt.languages.CompletionItemKind.Field,insertText:ut})):[]};function De(Ge,tt,ht,ut,Ot){let Et=tt.getWordUntilPosition(ht),Ft={startLineNumber:ht.lineNumber,endLineNumber:ht.lineNumber,startColumn:Et.startColumn,endColumn:Et.endColumn},qt=ut.map(Xt=>({label:Xt,kind:Ge.languages.CompletionItemKind.Keyword,insertText:Xt,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ft}));return Ot.map(Xt=>{qt.push(ie(se({},Xt),{range:Ft}))}),qt}var Fe=Ge=>{ce.languages.map(Ot=>(Ge.languages.registerDocumentFormattingEditProvider(Ot,{provideDocumentFormattingEdits(Et,Ft,qt){return le(this,null,function*(){const Xt=ke()(Et.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:Et.getFullModelRange(),text:Xt}]})}}),Ot));const tt=Re.quickKey.map(Ot=>({label:Ot.label,kind:Ge.languages.CompletionItemKind.Method,insertText:Ot.content,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ht=de.quickKey.map(Ot=>({label:Ot.label,kind:Ge.languages.CompletionItemKind.Method,insertText:Ot.content,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ut=He.quickKey.map(Ot=>({label:Ot.label,kind:Ge.languages.CompletionItemKind.Method,insertText:Ot.content,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Ge.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ot,Et){var Ft=Ot.getWordUntilPosition(Et),qt={startLineNumber:Et.lineNumber,endLineNumber:Et.lineNumber,startColumn:Ft.startColumn,endColumn:Ft.endColumn},Xt=Ot.getLineContent(Et.lineNumber).substring(Ft.startColumn-2,Ft.endColumn);return{suggestions:[...Re.keywords.map(Kt=>({label:Kt,kind:Ge.languages.CompletionItemKind.Function,documentation:Kt,insertText:Kt,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt})),...Re.quickKey.map(Kt=>({label:Kt.label,kind:Ge.languages.CompletionItemKind.Function,documentation:Kt.content,insertText:Xt.startsWith("#")?Kt.content.replace(/#/,""):Kt.content,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt}))]}}}),Ge.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ot,Et){var Ft=Ot.getWordUntilPosition(Et),qt={startLineNumber:Et.lineNumber,endLineNumber:Et.lineNumber,startColumn:Ft.startColumn,endColumn:Ft.endColumn};return{suggestions:[...oe.keywords.map(Xt=>({label:Xt,kind:Ge.languages.CompletionItemKind.Function,documentation:Xt,insertText:Xt,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt}))]}}}),Ge.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ot,Et){var Ft=Ot.getWordUntilPosition(Et),qt={startLineNumber:Et.lineNumber,endLineNumber:Et.lineNumber,startColumn:Ft.startColumn,endColumn:Ft.endColumn},Xt=Ot.getLineContent(Et.lineNumber).substring(Ft.startColumn-2,Ft.endColumn);return{suggestions:[...He.keywords.map(Kt=>({label:Kt,kind:Ge.languages.CompletionItemKind.Function,documentation:Kt,insertText:Kt,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt})),...He.quickKey.map(Kt=>({label:Kt.label,kind:Ge.languages.CompletionItemKind.Function,documentation:Kt.content,insertText:Xt.startsWith("#")?Kt.content.replace(/#/,""):Kt.content,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt}))]}}}),Ge.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Ot,Et){var Ft=Ot.getWordUntilPosition(Et),qt={startLineNumber:Et.lineNumber,endLineNumber:Et.lineNumber,startColumn:Ft.startColumn,endColumn:Ft.endColumn},Xt=Ot.getLineContent(Et.lineNumber).substring(Ft.startColumn-2,Ft.endColumn);return{suggestions:[...ve.keywords.map(Kt=>({label:Kt,kind:Ge.languages.CompletionItemKind.Function,documentation:Kt,insertText:Kt,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt})),...ve.quickKey.map(Kt=>({label:Kt.label,kind:Ge.languages.CompletionItemKind.Function,documentation:Kt.content,insertText:Xt.startsWith("#")?Kt.content.replace(/#/,""):Kt.content,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt}))]}}}),Ge.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ot,Et){var Ft=Ot.getWordUntilPosition(Et),qt={startLineNumber:Et.lineNumber,endLineNumber:Et.lineNumber,startColumn:Ft.startColumn,endColumn:Ft.endColumn},Xt=Ot.getLineContent(Et.lineNumber).substring(Ft.startColumn-2,Ft.endColumn);return{suggestions:[...de.keywords.map(Kt=>({label:Kt,kind:Ge.languages.CompletionItemKind.Function,documentation:Kt,insertText:Kt,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt})),...de.quickKey.map(Kt=>({label:Kt.label,kind:Ge.languages.CompletionItemKind.Function,documentation:Kt.content,insertText:Xt.startsWith("#")?Kt.content.replace(/#/,""):Kt.content,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt}))]}}})};const Te="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Me=Object.defineProperty,Be=(Ge,tt,ht)=>tt in Ge?Me(Ge,tt,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[tt]=ht,Ue=(Ge,tt,ht)=>Be(Ge,typeof tt!="symbol"?tt+"":tt,ht);const Ye=class mx{constructor(tt,ht,ut){this.placeholder=tt,this.editor=ht,this.monaco=ut,ht.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mx.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)}};Ue(Ye,"ID","editor.widget.placeholderHint");var Ze=Ye,ot=pt(96236),lt=pt(6767),ft=pt(25399),St=pt(89392),qe=pt(16448),rt=pt(56102),wt=Object.defineProperty,Ct=Object.defineProperties,bt=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,Mt=(Ge,tt,ht)=>tt in Ge?wt(Ge,tt,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ge[tt]=ht,yt=(Ge,tt)=>{for(var ht in tt||(tt={}))xt.call(tt,ht)&&Mt(Ge,ht,tt[ht]);if(ct)for(var ht of ct(tt))dt.call(tt,ht)&&Mt(Ge,ht,tt[ht]);return Ge},Dt=(Ge,tt)=>Ct(Ge,bt(tt)),mt=(Ge,tt)=>{var ht={};for(var ut in Ge)xt.call(Ge,ut)&&tt.indexOf(ut)<0&&(ht[ut]=Ge[ut]);if(Ge!=null&&ct)for(var ut of ct(Ge))tt.indexOf(ut)<0&&dt.call(Ge,ut)&&(ht[ut]=Ge[ut]);return ht},vt=(Ge,tt,ht)=>new Promise((ut,Ot)=>{var Et=Xt=>{try{qt(ht.next(Xt))}catch(Kt){Ot(Kt)}},Ft=Xt=>{try{qt(ht.throw(Xt))}catch(Kt){Ot(Kt)}},qt=Xt=>Xt.done?ut(Xt.value):Promise.resolve(Xt.value).then(Et,Ft);qt((ht=ht.apply(Ge,tt)).next())});function et(Ge){return/^\d+$/.test(Ge)?`${Ge}px`:Ge}function We(){}let we=!1;const Ne={"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 Xe(Ge=[]){let tt=Ge;if(Array.isArray(Ge)){for(let ht=0;ht<Ge.length;ht++){let ut=Ne[Ge[ht]];if(ut)return ut}return tt[0]}return Ne[tt]||tt}let nt=null;var Ie=Ge=>{var tt=Ge,{width:ht="100%",height:ut="100%",value:Ot,language:Et="javascript",style:Ft={},options:qt={},overrideServices:Xt={},theme:Kt="vs-dark",onEditBlur:Vt,isCopy:hn=!1,onSave:on,autoHeight:cn=!1,forbidCopy:Sn=!1,onChange:Cn=We,editorDidMount:kn=We,onFocus:In=We,onBreakPoint:_r=We,breakPointValue:xr=[],filename:qr="educoder.txt",errorLine:er,errorContent:si="",highlightLine:ei,openBreakPoint:vi=!1,placeholder:Li="",showMiniMap:Pi=!0}=tt,Xr=mt(tt,["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 mi=(0,at.useRef)(),Qe=(0,at.useRef)({}),ii=(0,at.useRef)(),Tr=(0,at.useRef)(),wr=(0,at.useRef)([]),Er=(0,at.useRef)(!1),kr=(0,at.useRef)(),Hi=(0,at.useRef)(),pr=(0,at.useRef)(!1),[Kn,Qt]=(0,at.useState)(!1);function Wt(){let fn;return mi.current&&(fn=new Ut.Z(Hn=>{for(let tr of Hn)(tr.target.offsetHeight>0||tr.target.offsetWidth>0)&&Qe.current.instance.layout()}),fn.observe(mi.current)),fn}function zt(){lt.ZP.warning({content:decodeURIComponent(Te),key:"monaco-editor-tip"})}const Nn=()=>{let fn=Qe.current.instance;if(Ot!=null&&fn&&Kn){const Hn=fn.getModel();Hn&&Ot!==Hn.getValue()&&(we=!0,Hn.setValue(Ot),fn.layout(),we=!1)}};(0,at.useEffect)(()=>{const fn=qe.Z.subscribe("formatDocument",Hn=>{var tr;let Zn=Qe.current.instance;(tr=Zn==null?void 0:Zn.getAction)==null||tr.call(Zn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Hn=>{Cn(Hn)},fn},[]),(0,at.useEffect)(()=>{var fn;let Hn=Qe.current.instance;Tr.current&&clearTimeout(Tr.current),Tr.current=setTimeout(()=>{Nn()},500),Ot&&(Ot!=null&&Ot.length)&&((fn=Hn==null?void 0:Hn.updateOptions)==null||fn.call(Hn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ot.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ot,Kn,Qe.current]),(0,at.useEffect)(()=>{if(er&&Qe.current&&Qe.current.instance){let Hn=Qe.current.instance;Hn.changeViewZones(function(tr){var Zn=document.createElement("div");Zn.style.padding="10px 20px",Zn.style.width="calc(100% - 20px)",Zn.className="my-error-line-wrp",Zn.innerHTML=si,tr.addZone({afterLineNumber:er||11,heightInLines:3,domNode:Zn})});var fn={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}};Hn.addOverlayWidget(fn),Hn.revealPositionInCenter({lineNumber:20,column:1})}},[er,Qe.current,Kn]);const Vn=(fn="",Hn)=>{if(!fn||fn.trim()==="")return!0;const Zn=Qe.current.instance.getModel().getLineTokens(Hn);let ir=!1;for(let Un=0;Un<2;Un++)Zn.getStandardTokenType(Un)===1&&(ir=!0);return ir};(0,at.useEffect)(()=>{var fn;const Hn=(fn=Qe.current)==null?void 0:fn.instance;if(Hn&&Kn&&Sn){const tr=Hn.onDidBlurEditorWidget(()=>{pr.current=!1}),Zn=Hn.onDidFocusEditorText(()=>{pr.current=!0});return()=>{tr.dispose(),Zn.dispose()}}},[Qe.current,Kn,Sn]),(0,at.useEffect)(()=>{var fn;if((fn=Qe.current)!=null&&fn.instance&&Kn&&vi){let Hn=Qe.current.instance,tr=Hn.getModel();if(!tr)return;(()=>{var an;let Qn=[],or=[];const yr=tr.getAllDecorations();for(let Ar of yr)Ar.options.className==="highlighted-line"&&(Qn.push((an=Ar==null?void 0:Ar.range)==null?void 0:an.startLineNumber),or.push(Ar==null?void 0:Ar.id));if(ei===Qn[0])return;tr.deltaDecorations(or,[]);const br=tr.getLineCount();ei&&ei<=br&&(Hn.deltaDecorations([],[{range:new nt.Range(ei,1,ei,tr.getLineMaxColumn(ei)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Hn.revealLineInCenter(ei))})();const ir=(an=!1)=>{var Qn;let or=[],yr=[];const br=tr.getAllDecorations();for(let Ar of br)Ar.options.linesDecorationsClassName==="breakpoints-select"&&(or.push((Qn=Ar==null?void 0:Ar.range)==null?void 0:Qn.startLineNumber),yr.push(Ar==null?void 0:Ar.id));if(an)return{lines:or,ids:yr};_r(or)},Un=an=>vt(void 0,null,function*(){let Qn={range:new nt.Range(an,1,an,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield tr.deltaDecorations([],[Qn]),ir()}),dr=an=>vt(void 0,null,function*(){let Qn=[];const or=Hn.getLineDecorations(an);for(let yr of or)yr.options.linesDecorationsClassName==="breakpoints-select"&&Qn.push(yr.id);yield tr.deltaDecorations(Qn,[]),ir()}),Fr=an=>{let Qn=Hn.getLineDecorations(an);for(let or of Qn)if(or.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,St.isEqual)(xr,ir(!0).lines)){tr.deltaDecorations(ir(!0).ids,[]);const an=xr.map(Qn=>({range:new nt.Range(Qn,1,Qn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));tr.deltaDecorations([],an)}const Nr=Hn.onDidChangeModelContent(an=>{let Qn=Hn.getPosition();if(Qn){let or=Qn.lineNumber;clearTimeout(Hi.current),Hi.current=setTimeout(()=>{Vn(tr.getLineContent(or),or)?dr(or):Fr(or)?(dr(or),Un(or)):ir()},100)}}),Rr=Hn.onMouseDown(an=>{var Qn,or,yr;if(an.target.detail&&((yr=(or=(Qn=an.target)==null?void 0:Qn.element)==null?void 0:or.className)!=null&&yr.includes("line-numbers"))){let br=an.target.position.lineNumber;if(Vn(tr.getLineContent(br),br))return;Fr(br)?dr(br):Un(br)}}),gn=an=>{let Qn={range:new nt.Range(an,1,an,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};wr.current=Hn.deltaDecorations(wr.current,[Qn])},Fi=()=>{wr.current=Hn.deltaDecorations(wr.current,[])},ti=Hn.onMouseMove(an=>{var Qn,or,yr;if(Fi(),an.target.detail&&((yr=(or=(Qn=an.target)==null?void 0:Qn.element)==null?void 0:or.className)!=null&&yr.includes("line-numbers"))){let br=an.target.position.lineNumber;if(Vn(tr.getLineContent(br),br))return;gn(br)}}),Mi=Hn.onMouseLeave(()=>{Fi()});return()=>{Nr.dispose(),Rr.dispose(),ti.dispose(),Mi.dispose()}}},[Qe.current,Kn,xr,ei,vi,Et]),(0,at.useEffect)(()=>{var fn;(fn=Qe.current)!=null&&fn.instance&&vi&&Qe.current.instance.setPosition({lineNumber:0,column:0})},[ei]);function vr(){let fn=Qe.current.instance;if(fn){const Hn=fn.getSelection(),tr=Qe.current.pastePos||{},Zn=new nt.Range(tr.startLineNumber||Hn.endLineNumber,tr.startColumn||Hn.endColumn,tr.endLineNumber||Hn.endLineNumber,tr.endColumn||Hn.endColumn);setTimeout(()=>{fn.executeEdits("",[{range:Zn,text:""}])},300)}}function yn(fn){(window.navigator.platform.match("Mac")?fn.metaKey:fn.ctrlKey)&&fn.keyCode==83&&(fn.preventDefault(),on())}const zn=()=>{if(cn&&Qe.current.instance){const fn=Qe.current.instance.getContentHeight();Yn(fn<ut?ut:fn)}else Yn(ut)};function Ht(fn){var Hn=document.createEvent("MouseEvents");Hn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),fn.dispatchEvent(Hn)}const Yt=fn=>{if(!pr.current)return;const{keyCode:Hn,ctrlKey:tr,metaKey:Zn,target:ir,type:Un}=fn;return(Un==="paste"||(Hn===67||Hn===86)&&(Zn||tr))&&ir.nodeName==="TEXTAREA"&&(zt(),fn.preventDefault()),!1};function qn(fn,Hn){var tr=window.URL||window.webkitURL||window,Zn=new Blob([Hn]),ir=document.createElementNS("http://www.w3.org/1999/xhtml","a");ir.href=tr.createObjectURL(Zn),ir.download=fn,Ht(ir)}(0,at.useEffect)(()=>{zn()},[zn]),(0,at.useEffect)(()=>{mi.current&&!Kn&&Promise.all([pt.e(8909),pt.e(7960)]).then(pt.bind(pt,71448)).then(fn=>{try{nt=fn,Qe.current.instance=nt.editor.create(mi.current,{value:Ot,language:Xe(Et),theme:Kt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Pi||!1}},Xt);const Hn=Qe.current.instance;let ir=[...ot.BH._menuItems].find(Nr=>Nr[0]._debugName=="EditorContext")[1],Un=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],dr=(Nr,Rr)=>{var gn,Fi;let ti=Nr._first;do Rr.includes((Fi=(gn=ti.element)==null?void 0:gn.command)==null?void 0:Fi.id)&&Nr._remove(ti);while(ti=ti.next)};if(kn(Hn,nt),setTimeout(()=>{zn(),Qe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{qn(qr||"educoder.txt",Hn.getValue())}})},500),Qe.current.subscription=Hn.onDidChangeModelContent(Nr=>{Er.current?clearTimeout(kr.current):(zn(),Cn(Hn.getValue(),Nr)),kr.current=setTimeout(()=>{Er.current=!1},500)}),window.Monaco||Fe(nt,Xe(Et)),Sn&&(dr(ir,Un),mi.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Yt),window.removeEventListener("paste",Yt),window.addEventListener("keydown",Yt),window.addEventListener("paste",Yt)),window.Monaco=nt,Vt&&Hn.onDidBlurEditorWidget(()=>{Vt(Hn.getValue())}),In&&Hn.onDidFocusEditorText(()=>{In(Hn.getValue())}),Sn)try{Hn.onDidPaste(Nr=>{const Rr=Hn.getSelection(),gn=Qe.current.pastePos||{},Fi=new nt.Range(gn.startLineNumber||Rr.endLineNumber,gn.startColumn||Rr.endColumn,gn.endLineNumber||Rr.endLineNumber,gn.endColumn||Rr.endColumn);Hn.executeEdits("",[{range:Nr.range,text:""}])})}catch(Nr){}let Fr=Wt();return Li&&typeof Li=="string"&&new Ze(Li,Hn,nt),Qt(!0),()=>{const Nr=Qe.current.instance;Nr.dispose();const Rr=Nr.getModel();Rr&&Rr.dispose(),Qe.current.subscription&&Qe.current.subscription.dispose(),Fr.unobserve(mi.current)}}catch(Hn){}})},[]),(0,at.useEffect)(()=>{if(Qe.current.instance&&Kn)return document.addEventListener("keydown",yn,!1),()=>{document.removeEventListener("keydown",yn)}},[on,Kn]),(0,at.useEffect)(()=>{let fn=Qe.current.instance;if(fn&&Kn){let Hn=Xe(Et);nt.editor.setModelLanguage(fn.getModel(),Hn)}},[Et,Kn]),(0,at.useEffect)(()=>{Qe.current.instance&&Kn&&nt.editor.setTheme(Kt)},[Kt,Kn]),(0,at.useEffect)(()=>{let fn=Qe.current.instance;ii.current=qt,fn&&Kn&&(fn.updateOptions(yt({},qt)),setTimeout(()=>{fn.getModel().updateOptions(yt({},qt))},200))},[JSON.stringify(qt),Kn]),(0,at.useEffect)(()=>{let fn=Qe.current.instance;fn&&Kn&&fn.layout()},[ht,ut,Kn]);const[jt,un]=(0,at.useState)(et(ht)),[An,Yn]=(0,at.useState)(et(ut)),ln=Dt(yt({},Ft),{width:jt,height:An,position:"relative"});return at.createElement("div",{className:"my-monaco-editor",ref:mi,style:ln},hn&&at.createElement(rt.CopyToClipboard,{text:Ot,onCopy:()=>lt.ZP.success("\u590D\u5236\u6210\u529F")},at.createElement(ft.Z,{title:"\u590D\u5236\u4EE3\u7801"},at.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},at.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function _e({width:Ge="100%",height:tt="100%",original:ht,modified:ut,language:Ot,options:Et={}}){const Ft=(0,at.useRef)(),[qt,Xt]=(0,at.useState)(null);function Kt(cn){let Sn;return Ft.current&&(Sn=new Ut.Z(Cn=>{for(let kn of Cn)(kn.target.offsetHeight>0||kn.target.offsetWidth>0)&&cn.layout()}),Sn.observe(Ft.current)),Sn}(0,at.useEffect)(()=>(Ft.current&&Promise.all([pt.e(8909),pt.e(9404)]).then(pt.bind(pt,2550)).then(cn=>{nt=cn;const Sn=nt.editor.createDiffEditor(Ft.current,Dt(yt({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},Et),{wordWrap:!0}));Xt(Sn);let Cn=Kt(Sn);return()=>{Sn.dispose();const kn=Sn.getModel();kn&&kn.dispose(),Cn.unobserve(Ft.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,at.useEffect)(()=>{qt&&qt.setModel({original:nt.editor.createModel(ht,Ot),modified:nt.editor.createModel(ut,Ot)})},[ht,ut,Ot,qt]);const Vt=et(Ge),hn=et(tt),on={width:Vt,height:hn};return at.createElement("div",{className:"my-diff-editor",ref:Ft,style:on})}},46133:function(Dn,jn,pt){"use strict";pt.d(jn,{jL:function(){return Re},w9:function(){return xt},QD:function(){return Cn},cQ:function(){return rt},op:function(){return Kt},O5:function(){return Hi},_b:function(){return er},t7:function(){return ie},Gi:function(){return vt},YG:function(){return Dt},qp:function(){return Ae},vr:function(){return _r},qE:function(){return on},Je:function(){return pe},wb:function(){return ot},cq:function(){return nt},tp:function(){return fe}});var at=pt(59301),Ut={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},oe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",Re=({dataSource:pr=[],img:Kn,imgWidth:Qt=346,title:Wt,sunTitle:zt,bannerExtraContent:Nn})=>at.createElement("div",{className:Ut.banner},at.createElement("div",{className:Ut.content},at.createElement("aside",null,at.createElement("p",null,at.createElement("b",null,Wt),at.createElement("span",null,zt)),pr.length>0&&at.createElement("div",{className:Ut.btns},pr.map((Vn,vr)=>at.createElement("div",{key:vr,onClick:Vn.click},Vn.name,Vn.sign?at.createElement("img",{src:oe,width:39}):null))),Nn),Kn&&at.createElement("img",{style:{marginTop:33,marginRight:38},src:Kn,width:Qt}))),de={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},ve=pt(92310),Ee=pt.n(ve),ke=pt(89392),Ae=({dataSource:pr=[],value:Kn,onChange:Qt,onTitleChange:Wt,className:zt,title:Nn,titleWidth:Vn=41,style:vr={},fontColor:yn="#6A7283",showCount:zn})=>{const[Ht,Yt]=(0,at.useState)(0),[qn,jt]=(0,at.useState)(!1),un=(0,at.useRef)(null),An=(0,at.useRef)(null);return(0,at.useEffect)(()=>{var Yn;pr.length!==0&&(((Yn=un==null?void 0:un.current)==null?void 0:Yn.clientHeight)>97?Yt(1):Yt(0)),pr.length===0&&Yt(0),jt(!1)},[pr]),at.createElement("div",{className:Ee()(de.row,zt),style:vr},at.createElement("div",{onClick:(0,ke.throttle)(()=>Wt==null?void 0:Wt(),2e3),style:{width:Vn,marginTop:qn?12:4},className:`${de.title} ${Wt?"current":""}`},Nn),at.createElement("div",{className:qn?`${de.tagsWrap} ${de.tagsBorderWrap}`:de.tagsWrap},at.createElement("div",{className:de.bar,ref:An,style:Ht>0?{height:Ht===1?97:"auto",overflow:Ht===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},at.createElement("div",{className:de.tag,ref:un},pr==null?void 0:pr.map(Yn=>at.createElement("span",{onClick:()=>Qt(Yn.id),key:Yn.id,style:{color:yn},className:Kn===Yn.id?de.active:""},at.createElement("span",{title:Yn.name,className:de.name},Yn.name),!!zn&&at.createElement("span",{className:de.num},Yn.count))))),!!Ht&&at.createElement(at.Fragment,null,Ht===1?at.createElement("div",{onClick:()=>{var Yn;Yt(2),((Yn=un==null?void 0:un.current)==null?void 0:Yn.clientHeight)>245?jt(!0):jt(!1)},className:de.action},"\u5C55\u5F00",at.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):at.createElement("div",{onClick:()=>{An.current.scrollTop=0,Yt(1),jt(!1)},className:de.action},"\u6536\u8D77",at.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},me={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},fe=({dataSource:pr=[],value:Kn,onChange:Qt,className:Wt,style:zt={}})=>at.createElement("div",{style:zt,className:Ee()(me.tabs,Wt)},pr.map(Nn=>at.createElement("span",{onClick:()=>Qt(Nn.id),className:Kn===Nn.id?me.active:"",key:Nn.id},Nn.name))),z={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},te=pt(37568),ie=({dataSource:pr=[],value:Kn="",onChange:Qt,onInputChange:Wt=()=>{},className:zt,style:Nn={},placeholder:Vn,allowClear:vr=!1})=>{var yn;const[zn,Ht]=(0,at.useState)(""),[Yt,qn]=(0,at.useState)("");(0,at.useEffect)(()=>{var An;let Yn=Kn;(An=JSON.stringify(Kn))!=null&&An.includes("{")&&(Ht(Kn.id),Yn=Kn.value||"");try{qn(decodeURIComponent(Yn||""))}catch(ln){qn(decodeURIComponent(Yn||""))}},[Kn]);const jt=()=>{Qt(encodeURIComponent(Yt),zn||null)},un=An=>{An!==zn&&(Ht(An),Qt(encodeURIComponent(Yt),An))};return at.createElement("div",{className:Ee()(z.input,zt),style:Nn},!!pr.length&&at.createElement("div",{className:z.dropdown},at.createElement("div",{className:z.text},(yn=pr.find(An=>An.id===zn))==null?void 0:yn.name,at.createElement("i",{className:"iconfont icon-zhankai4"}),at.createElement("b",{className:z.b1}),at.createElement("b",{className:z.b2})),at.createElement("div",{className:z.menu},pr.map((An,Yn)=>at.createElement("div",{key:Yn,onClick:()=>un(An.id)},An.name)))),at.createElement(te.default,{onPressEnter:jt,value:Yt,onChange:An=>{qn(An.target.value),Wt(encodeURIComponent(An.target.value),zn||null)},bordered:!1,placeholder:Vn}),at.createElement("i",{onClick:jt,className:"iconfont icon-sousuo9 font14 pl10 current"}))},le={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},pe=({value:pr,onChange:Kn,className:Qt,total:Wt,pageSize:zt,style:Nn={}})=>{const Vn=pr<2,vr=pr>=Math.ceil(Wt/zt);return Wt<=zt?at.createElement(at.Fragment,null):at.createElement("div",{className:Ee()(le.quickPager,Qt),style:Nn},at.createElement("div",{onClick:()=>{Vn||Kn(pr-1,"prev")},className:Vn?le.disabled:""},"\u4E0A\u4E00\u9875"),at.createElement("div",{onClick:()=>{vr||Kn(pr+1,"next")},className:vr?le.disabled:""},"\u4E0B\u4E00\u9875"))},xe={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},je=pt(29787),De=pt(25399),Fe=pt(58018),Te=pt(12242),Me=pt(59895),Be=pt(96908),Ue=pt(57177),Ye=pt(81378),Ve=pt(12635),ot=({className:pr,dataSource:Kn=[],col:Qt=4,right:Wt,bottom:zt=23,precision:Nn=0,wrapWidth:Vn=1200,trackEventItems:vr,loading:yn})=>{const zn=Math.floor((Vn-(Qt-1)*Wt)/Qt);return at.createElement(je.Z,{spinning:yn},at.createElement("div",{className:Ee()(xe.list,pr)},!!Kn.length&&Kn.map((Ht,Yt)=>{const{name:qn,id:jt,identifier:un,power:An,cover_image_id:Yn,pic:ln}=Ht;return at.createElement("div",{className:xe.wrap,key:jt,style:{width:zn,marginRight:(1+Yt)%Qt===0?0:Wt+Nn,marginBottom:zt}},at.createElement("a",{target:"_blank",href:`/shixuns/${un}/challenges`,className:xe.li,onClick:fn=>{fn.preventDefault(),vr&&(0,Me.L9)([vr]),An&&(0,Me.xg)(`/shixuns/${un}/challenges`)}},at.createElement("div",{className:xe.img},at.createElement("img",{className:xe.cover,src:`${ln}`}),Ht.is_jupyter&&at.createElement("img",{className:xe.sign,src:Be}),Ht.is_jupyter_lab&&at.createElement("img",{className:xe.sign,src:Ue}),Ht.is_unity_3d&&at.createElement("img",{className:xe.sign,src:Ye})),at.createElement("div",{className:xe.name},at.createElement(De.Z,{title:qn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},at.createElement("span",{className:xe.e},qn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),at.createElement("div",{className:xe.tags},at.createElement(De.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},at.createElement("span",null,at.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),at.createElement("span",null,Ht.challenges_count))),!!Ht.myshixuns_count&&at.createElement(De.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},at.createElement("span",null,at.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),at.createElement("span",null,Ht.myshixuns_count))),at.createElement(De.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},at.createElement("span",null,at.createElement("span",null,Ht.level))),at.createElement("div",{className:xe.rate},at.createElement(Fe.Z,{allowHalf:!0,disabled:!0,defaultValue:Ht.score_info}),at.createElement("span",null,"\xA0",Ht.score_info?`${Ht.score_info}\u5206`:"5\u5206")))),!An&&at.createElement("div",{className:xe.lockWrap},at.createElement("img",{src:`${Te.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),at.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Kn.length&&at.createElement(Ve.Z,null)))},lt={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},ft=pt(69669),St=pt(59301),rt=({className:pr,dataSource:Kn=[],col:Qt=4,right:Wt,bottom:zt=23,precision:Nn=0,wrapWidth:Vn=1200,trackEventItems:vr,loading:yn,onRemove:zn=()=>{},isCurrent:Ht=!0,showAlias:Yt=!1})=>{const qn=Math.floor((Vn-(Qt-1)*Wt)/Qt),jt=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return St.createElement(je.Z,{spinning:yn},St.createElement("div",{className:Ee()(lt.list,pr)},!!(Kn!=null&&Kn.length)&&(Kn==null?void 0:Kn.map((un,An)=>{var Yn;const{name:ln,id:fn,identifier:Hn,featured:tr,school_name:Zn,image_url:ir,excellent:Un,is_plan:dr}=un;return St.createElement("div",{key:fn,className:lt.wrap,style:{width:qn,marginRight:(1+An)%Qt===0?0:Wt+Nn,marginBottom:zt}},St.createElement("a",{className:lt.li,onClick:Fr=>{Fr.preventDefault(),Fr.stopPropagation(),vr&&(0,Me.L9)([vr]),(0,Me.xg)(`/paths/${Hn}`)}},St.createElement("div",{className:lt.img},St.createElement("img",{className:lt.cover,src:`${ir}`}),Ht&&(0,ft.bg)()&&(un==null?void 0:un.studying)&&St.createElement("div",{className:`${lt.movebq} user-path-items`,onClick:Fr=>{Fr.stopPropagation(),zn(un)}},St.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),St.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Yn=un==null?void 0:un.subject_tags)==null?void 0:Yn.map((Fr,Nr)=>{var Rr,gn;if(Nr===0){const ti=(Rr=jt.find(Mi=>Mi.name==Fr))==null?void 0:Rr.swimg;return St.createElement("img",{className:lt.sign,src:ti,style:{left:"-4px"}})}const Fi=(gn=jt.find(ti=>ti.name==Fr))==null?void 0:gn.ptimg;return St.createElement("img",{className:lt.sign,src:Fi,style:{left:`${48+52*(Nr-1)+2*Nr}px`}})}),St.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(un==null?void 0:un.excellent)&&St.createElement("div",{className:lt.bq},"\u5F00\u653E\u8BFE\u7A0B"))),St.createElement("div",{className:lt.name},St.createElement(De.Z,{title:Yt&&(un!=null&&un.excellent_alias_name)?St.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${ln}`,St.createElement("br",null),St.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${un==null?void 0:un.excellent_alias_name}`)):ln},St.createElement("span",{className:lt.e},Yt&&(un==null?void 0:un.excellent_alias_name)||ln))),St.createElement(De.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Zn}`},St.createElement("div",{className:lt.unit},St.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Zn)),St.createElement("div",{className:lt.tags},St.createElement("div",null,St.createElement(De.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},St.createElement("span",null,St.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),St.createElement("span",null,un.stages_count))),St.createElement(De.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},St.createElement("span",null,St.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),St.createElement("span",null,un.members_count)))))))})),!Kn.length&&St.createElement(Ve.Z,null)))},wt={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},Ct="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",bt=pt(59301),xt=({className:pr,dataSource:Kn=[],col:Qt=4,right:Wt,bottom:zt=23,precision:Nn=0,wrapWidth:Vn=1200,trackEventItems:vr,loading:yn,handleVery:zn=()=>!0})=>{const Ht=Math.floor((Vn-(Qt-1)*Wt)/Qt);return bt.createElement(je.Z,{spinning:yn},bt.createElement("div",{className:Ee()(wt.list,pr)},!!Kn.length&&Kn.map((Yt,qn)=>{const{subject_identifier:jt,id:un,identifier:An,power:Yn}=Yt,ln=Yt.is_public!=0&&Yt.is_public;return bt.createElement("div",{className:wt.wrap,key:un,style:{width:Ht,marginRight:(1+qn)%Qt===0?0:Wt+Nn,marginBottom:zt}},bt.createElement("a",{className:wt.li,onClick:fn=>{fn.preventDefault(),zn(Yt==null?void 0:Yt.first_category_url)&&(vr&&(0,Me.L9)([vr]),(0,Me.xg)(Yt.first_category_url))}},bt.createElement("div",{className:wt.top},bt.createElement(De.Z,{title:Yt.name},bt.createElement("div",{className:wt.name},Yt.name)),bt.createElement("img",{className:wt.img,src:Te.Z.IMG_SERVER+"/images/"+Yt.avatar_url}),bt.createElement("div",{className:wt.text,title:Yt.creator},Yt.creator),jt&&bt.createElement("div",{className:wt.btns},bt.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),bt.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),ln&&bt.createElement("div",{className:wt.sign},"\u516C\u5F00")),bt.createElement("div",{className:wt.bottom},Yt.visits>0&&bt.createElement(De.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-liulanyan"}),bt.createElement("span",null,Yt.visits))),Yt.course_members_count>0&&bt.createElement(De.Z,{title:"\u6210\u5458",placement:"bottom"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-chengyuan"}),Yt.course_members_count)),Yt.tasks_count>0&&bt.createElement(De.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-zuoye"}),Yt.tasks_count)),Yt.is_end?bt.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):bt.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Yt.is_accessible&&bt.createElement("div",{className:wt.lockWrap},bt.createElement("img",{src:`${Te.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),bt.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Kn.length&&bt.createElement(Ve.Z,null)))},dt={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Mt=pt(71570),Dt=({dataSource:pr=[],value:Kn,onChange:Qt,className:Wt,style:zt={},tabBarExtraContent:Nn})=>at.createElement("div",{className:Ee()(dt.tabs,Wt),style:zt},at.createElement("div",{className:dt.tabsWrap},pr.map((Vn,vr)=>!(Vn!=null&&Vn.hide)&&at.createElement("aside",{className:dt.tab,onClick:()=>{Qt(Vn.id),Vn.link&&Mt.history.push(Vn.link)},key:vr},at.createElement("div",{className:Kn===Vn.id?dt.active:""},Vn.name),(Vn==null?void 0:Vn.resetCount)==null&&(Vn==null?void 0:Vn.total)!==void 0&&at.createElement("span",null,"\uFF08",Vn==null?void 0:Vn.total,"\uFF09"),(Vn==null?void 0:Vn.resetCount)!==void 0&&(Vn==null?void 0:Vn.total)!==void 0&&at.createElement(De.Z,{title:(Vn==null?void 0:Vn.tip)!=null?Vn==null?void 0:Vn.tip:""},at.createElement("span",{style:{color:"#9096A3"}},"\uFF08",at.createElement("span",{style:{color:"#000"}},Vn==null?void 0:Vn.resetCount),"/",at.createElement("span",null,Vn==null?void 0:Vn.total),"\uFF09"))))),at.createElement("div",{className:dt.tabBar},Nn)),vt=({className:pr,style:Kn={},children:Qt})=>at.createElement("div",{className:Ee()(pr),style:Kn},Qt),et={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},We=pt(75727),we=pt(93041);const Ne=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var nt=({sortValue:pr,dropValue:Kn,className:Qt,onSort:Wt,onDrop:zt,dataSource:Nn=Ne})=>{var Vn;return at.createElement("div",{className:Ee()(et.orderWrap,Qt)},at.createElement(We.Z,{dropdownRender:()=>at.createElement(we.default,null,Nn.map((vr,yn)=>at.createElement(we.default.Item,{key:yn,onClick:()=>zt(vr.id)},vr.name)))},at.createElement("span",{className:et.orderTextWrap},(Vn=Nn.find(vr=>Kn===vr.id))==null?void 0:Vn.name)),at.createElement("span",{className:et.orderIconWrap},at.createElement("span",{className:et.orderAsc},at.createElement("i",{className:pr==="asc"?`iconfont icon-sanjiaoxing-up font12 ${et.cursorPointer} ${et.active}`:`iconfont icon-sanjiaoxing-up font12 ${et.cursorPointer}`,onClick:()=>Wt(pr==="asc"?"desc":"asc")})),at.createElement("span",{className:et.orderDesc},at.createElement("i",{className:pr==="desc"?`iconfont icon-sanjiaoxing-down font12 ${et.cursorPointer} ${et.active}`:`iconfont icon-sanjiaoxing-down font12 ${et.cursorPointer}`,onClick:()=>Wt(pr==="asc"?"desc":"asc")}))))},Ie={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},_e=pt(99571),Ge=Object.defineProperty,tt=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,Ot=(pr,Kn,Qt)=>Kn in pr?Ge(pr,Kn,{enumerable:!0,configurable:!0,writable:!0,value:Qt}):pr[Kn]=Qt,Et=(pr,Kn)=>{for(var Qt in Kn||(Kn={}))ht.call(Kn,Qt)&&Ot(pr,Qt,Kn[Qt]);if(tt)for(var Qt of tt(Kn))ut.call(Kn,Qt)&&Ot(pr,Qt,Kn[Qt]);return pr},Ft=(pr,Kn)=>{var Qt={};for(var Wt in pr)ht.call(pr,Wt)&&Kn.indexOf(Wt)<0&&(Qt[Wt]=pr[Wt]);if(pr!=null&&tt)for(var Wt of tt(pr))Kn.indexOf(Wt)<0&&ut.call(pr,Wt)&&(Qt[Wt]=pr[Wt]);return Qt},qt=(pr,Kn,Qt)=>new Promise((Wt,zt)=>{var Nn=yn=>{try{vr(Qt.next(yn))}catch(zn){zt(zn)}},Vn=yn=>{try{vr(Qt.throw(yn))}catch(zn){zt(zn)}},vr=yn=>yn.done?Wt(yn.value):Promise.resolve(yn.value).then(Nn,Vn);vr((Qt=Qt.apply(pr,Kn)).next())}),Kt=pr=>{var Kn=pr,{className:Qt,style:Wt,children:zt,loading:Nn=!1,openLoading:Vn,onClick:vr=()=>{},size:yn="middle",shape:zn="round"}=Kn,Ht=Ft(Kn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Yt,qn]=(0,at.useState)(!1);return at.createElement(_e.ZP,Et({onClick:(0,ke.throttle)(jt=>qt(void 0,null,function*(){Vn&&qn(!0);try{yield vr(jt)}catch(un){console.log("error",un)}Vn&&qn(!1)}),2e3,{leading:!0,trailing:!1}),className:Ee()(Ie.btn,Ie[`${yn}-${zn}`],Qt),style:Wt,size:yn,shape:zn,loading:Yt||Nn},Ht),zt)},Vt={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},on=({className:pr,style:Kn,children:Qt=null,onClick:Wt,title:zt})=>at.createElement("div",{className:Ee()(Vt.head,pr),style:Kn},at.createElement("span",{className:"primary-hover",onClick:Wt},at.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),at.createElement("b",{title:zt},zt),at.createElement("div",{className:Vt.node},Qt)),cn={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},Cn=({confirmShow:pr=!0,confirmTitle:Kn,confirmClick:Qt,cancelShow:Wt=!0,cancelTitle:zt,cancelClick:Nn,className:Vn,style:vr,confirmLoading:yn=!1})=>at.createElement("div",{className:Ee()(cn.btns,Vn),style:vr},pr&&at.createElement(_e.ZP,{loading:yn,onClick:Qt,type:"primary",className:cn.confirm},Kn),Wt&&at.createElement(_e.ZP,{onClick:Nn,className:cn.cancel},zt)),kn={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},_r=({className:pr,style:Kn={},LeftContent:Qt,children:Wt,RightContent:zt})=>at.createElement("div",{className:Ee()(kn.fixedBottom,pr),style:Kn},at.createElement("div",{className:kn.wrap},at.createElement("div",{className:kn.left},Qt),at.createElement("div",{className:kn.center},Wt),at.createElement("div",{className:kn.right},zt))),xr={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},er=({className:pr,style:Kn={},dataSource:Qt=[]})=>at.createElement("div",{className:Ee()(xr.crumbs,pr),style:Kn},Qt.map((Wt,zt)=>zt<Qt.length-1?at.createElement(at.Fragment,{key:zt},Wt.path||Wt.onClick?at.createElement("span",{className:xr.hover,onClick:Wt!=null&&Wt.onClick?Wt.onClick:()=>Mt.history.push(Wt.path)},Wt.name):at.createElement("span",null,Wt.name),at.createElement("span",null,"\xA0",">","\xA0")):at.createElement("span",{key:zt,style:{color:"#5F6368"}},Wt.name))),si=pt(11938),ei=Object.defineProperty,vi=Object.defineProperties,Li=Object.getOwnPropertyDescriptors,Pi=Object.getOwnPropertySymbols,Xr=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable,Qe=(pr,Kn,Qt)=>Kn in pr?ei(pr,Kn,{enumerable:!0,configurable:!0,writable:!0,value:Qt}):pr[Kn]=Qt,ii=(pr,Kn)=>{for(var Qt in Kn||(Kn={}))Xr.call(Kn,Qt)&&Qe(pr,Qt,Kn[Qt]);if(Pi)for(var Qt of Pi(Kn))mi.call(Kn,Qt)&&Qe(pr,Qt,Kn[Qt]);return pr},Tr=(pr,Kn)=>vi(pr,Li(Kn)),wr=(pr,Kn)=>{var Qt={};for(var Wt in pr)Xr.call(pr,Wt)&&Kn.indexOf(Wt)<0&&(Qt[Wt]=pr[Wt]);if(pr!=null&&Pi)for(var Wt of Pi(pr))Kn.indexOf(Wt)<0&&mi.call(pr,Wt)&&(Qt[Wt]=pr[Wt]);return Qt};const{Countdown:Er}=si.default;var Hi=pr=>{var Kn=pr,{onChange:Qt}=Kn,Wt=wr(Kn,["onChange"]);const[zt,Nn]=(0,at.useState)(null);(0,at.useEffect)(()=>{typeof zt=="number"&&zt>=0&&Qt(zt)},[zt]);const Vn=vr=>{const yn=Math.floor(vr/1e3);Nn(yn)};return at.createElement(Er,Tr(ii({},Wt),{onChange:Vn}))}},23206:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return Ut}});var at=pt(59301);function Ut(oe,He){const Re=(0,at.useRef)();(0,at.useEffect)(()=>{Re.current=oe}),(0,at.useEffect)(()=>{function de(){Re.current()}if(He!==null){let ve=setInterval(de,He);return()=>clearInterval(ve)}},[He])}},81576:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return Ze}});var at=pt(59301),Ut=pt(37568),oe=pt(28284),He=pt(6767),Re=pt(62957),de=pt(29787),ve=pt(14566),Ee=pt(25399),ke=pt(60242),Se=pt(47889),Ae={flex_box_center:"flex_box_center___SntrE",flex_space_between:"flex_space_between___g4tse",flex_box_vertical_center:"flex_box_vertical_center___ooGcI",flex_box_center_end:"flex_box_center_end___UM2Cs",flex_box_column:"flex_box_column___vRGBc",prompt:"prompt___a_aRk",box:"box___X84XK",row:"row___wofpN",icon:"icon___ixIOQ"},me=pt(24092),Pe=pt(59895),fe=pt(76131),z=pt(1012),te=pt(47257),se=pt.n(te),ie=pt(57503),le=pt(46133),ce=pt(69669),pe=pt(71570),xe=pt(59301),je=Object.defineProperty,De=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Me=(ot,lt,ft)=>lt in ot?je(ot,lt,{enumerable:!0,configurable:!0,writable:!0,value:ft}):ot[lt]=ft,Be=(ot,lt)=>{for(var ft in lt||(lt={}))Fe.call(lt,ft)&&Me(ot,ft,lt[ft]);if(De)for(var ft of De(lt))Te.call(lt,ft)&&Me(ot,ft,lt[ft]);return ot},Ue=(ot,lt,ft)=>new Promise((St,qe)=>{var rt=bt=>{try{Ct(ft.next(bt))}catch(ct){qe(ct)}},wt=bt=>{try{Ct(ft.throw(bt))}catch(ct){qe(ct)}},Ct=bt=>bt.done?St(bt.value):Promise.resolve(bt.value).then(rt,wt);Ct((ft=ft.apply(ot,lt)).next())});const Ye=Ut.default.TextArea,Ve=({dataSetInfo:ot,attachmentInfo:lt,visible:ft,user:St,dispatch:qe,onClose:rt=()=>{},onSuccess:wt=()=>{}})=>{var Ct,bt;const[ct,xt]=(0,at.useState)([]),[dt,Mt]=(0,at.useState)(!1),[yt,Dt]=(0,at.useState)(!1),[mt]=oe.default.useForm(),[vt,et]=(0,at.useState)([]),[We,we]=(0,at.useState)({}),Ne=(0,at.useRef)([]);(0,at.useEffect)(()=>{if(ft){if(ot){const{title:Et,is_public:Ft,desc:qt,attachments:Xt,data_set_tags:Kt}=ot||{},Vt=Xt.map(on=>({id:String(Math.random()).slice(-6),name:on.title,response:{attachment_id:on.id},size:on.size,description:on.description||"",percent:100,status:"done"}));xt(Vt),et(Kt);const hn={title:Et,is_public:Ft,desc:qt};mt.setFieldsValue(hn)}if(lt){const Et=lt.map(Ft=>({id:String(Math.random()).slice(-6),name:Ft.title,response:{attachment_id:Ft.id},size:Ft.size,description:Ft.description||"",percent:100,status:"done"}));xt(Et)}Xe()}},[ft]),(0,at.useEffect)(()=>{Ne.current=ct},[ct]),(0,at.useEffect)(()=>{ct!=null&&ct.length?mt.setFields([{name:"attachments",errors:[]}]):mt.setFields([{name:"attachments",errors:["\u6570\u636E\u96C6\u4E0D\u80FD\u4E3A\u7A7A"]}])},[ct.length]),(0,at.useEffect)(()=>{vt!=null&&vt.length?mt.setFields([{name:"tag_ids",errors:[]}]):mt.setFields([{name:"tag_ids",errors:["\u6570\u636E\u96C6\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A"]}])},[vt.length]);const Xe=()=>Ue(void 0,null,function*(){Dt(!0);const Et=yield(0,me.ZP)("/api/data_sets/extra_info.jsoin",{method:"get"});Et.status===0&&(we(Et==null?void 0:Et.data),Dt(!1))}),nt={multiple:!0,withCredentials:!0,showUploadList:!1,beforeUpload:Et=>Ue(void 0,null,function*(){var Ft,qt,Xt,Kt,Vt,hn;if(((Kt=(Xt=(qt=(Ft=Et.name)==null?void 0:Ft.split("."))==null?void 0:qt.slice(0,-1))==null?void 0:Xt.join("."))==null?void 0:Kt.length)>60)return He.ZP.warning(`\u300A${Et.name}\u300B\u6587\u4EF6\u540D\u79F0\u8FC7\u957F\uFF0C\u65E0\u6CD5\u4E0A\u4F20`),Promise.reject();if([...We.data_set_filenames,...Ne.current.map(In=>In.name)].includes(Et.name))return He.ZP.warning(`\u300A${Et.name}\u300B\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`),Promise.reject();const cn=Et.size/1024/1024/1024;let Sn=We==null?void 0:We.data_sets_filesize;if(Ne.current.forEach(In=>{Sn+=In==null?void 0:In.size}),Sn=Sn/1024/1024/1024,(0,ce.Ny)()){if(cn>50)return He.ZP.warning(`\u300A${Et.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\u5927\u5C0F\u9650\u5236(50GB)`),Promise.reject()}else if(cn>2)return He.ZP.warning(`\u300A${Et.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\u5927\u5C0F\u9650\u5236(2GB)`),Promise.reject();if(Sn+cn>((Vt=St==null?void 0:St.userInfo)==null?void 0:Vt.cloud_space)&&!(We!=null&&We.current_user_no_limit))return He.ZP.warning(`\u300A${Et.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u50A8\u5B58\u7A7A\u95F4\u5927\u5C0F\u9650\u5236(${(hn=St==null?void 0:St.userInfo)==null?void 0:hn.cloud_space}GB)`),Promise.reject();const kn={id:String(Math.random()).slice(-6),name:Et.name,size:Et.size,file:Et,description:"",percent:0,status:"uploading"};return Ge(kn,{login:We==null?void 0:We.login,container_type:"DataSet",container_id:null,description:"",realFileName:!1}),xt(In=>[...In,kn]),Promise.reject()})},Ie=Et=>Ue(void 0,null,function*(){var Ft,qt,Xt;const Kt=Ne.current.find(Vt=>Vt.name===Et.name);(Ft=Kt==null?void 0:Kt.response)!=null&&Ft.attachment_id&&(yield(0,me.ZP)("/api/data_sets/single_destroy_files.json",{method:"delete",body:{attachment_id:(qt=Kt==null?void 0:Kt.response)==null?void 0:qt.attachment_id}})),Kt!=null&&Kt.client&&((Xt=Kt==null?void 0:Kt.client)==null||Xt.cancel()),xt(Vt=>Vt.filter(hn=>hn.name!==Et.name))}),_e=()=>{var Et;(Et=Ne.current)==null||Et.forEach(Ft=>{var qt;Ft!=null&&Ft.client&&((qt=Ft==null?void 0:Ft.client)==null||qt.cancel())})};console.log(ct,"fileList1");const Ge=(Et,Ft)=>Ue(void 0,null,function*(){var qt,Xt,Kt,Vt,hn,on,cn,Sn,Cn;Ft.file_name=Et.name;const kn=Et.name,In=yield(0,me.ZP)("/api/buckets/get_data_set_token.json",{method:"get"});if((In==null?void 0:In.status)!==0){xt(er=>(er[er.findIndex(si=>si.name===kn)].status="error",[...er])),He.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}In.data=JSON.parse((0,fe.pe)(In.data));const _r=new(se())({endpoint:(qt=In==null?void 0:In.data)==null?void 0:qt.end_point,region:(Xt=In==null?void 0:In.data)==null?void 0:Xt.region,accessKeyId:(Kt=In==null?void 0:In.data)==null?void 0:Kt.access_key_id,accessKeySecret:(Vt=In==null?void 0:In.data)==null?void 0:Vt.access_key_secret,bucket:(hn=In==null?void 0:In.data)==null?void 0:hn.bucket,stsToken:(on=In==null?void 0:In.data)==null?void 0:on.security_token}),xr=Et.name.split(".");xr.pop();const qr=Ft.realFileName?xr.join("."):(0,z.Z)();_r.multipartUpload(`datasets/${Ft==null?void 0:Ft.login}/${qr}${kn.indexOf(".")>-1?"."+kn.split(".").pop():""}`,new Blob([Et.file],{type:Et.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(er,si,ei)=>{console.log("\u8FDB\u5EA6",er,si,ei),xt(vi=>{const Li=vi.findIndex(Pi=>Pi.name===kn);return vi[Li].client=_r,vi[Li].percent=er*100,vi[Li].checkpoint=si,[...vi]})},checkpoint:(Sn=Ne.current[(cn=Ne.current)==null?void 0:cn.findIndex(er=>er.name===kn)])==null?void 0:Sn.checkpoint,callback:{customValue:{id:kn+""},url:(Cn=In==null?void 0:In.data)==null?void 0:Cn.callback_url,host:In==null?void 0:In.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,me.rz)(Ft)}}).then(function(er){xt(si=>{var ei,vi,Li;const Pi=si.findIndex(mi=>mi.name===kn);let Xr="done";return((ei=er.data)==null?void 0:ei.status)===0?si[Pi].response=(vi=er.data)==null?void 0:vi.data:(He.ZP.warning((Li=er.data)==null?void 0:Li.message),Xr="error"),si[Pi].status=Xr,[...si]})}).catch(function(er){console.log("\u63A5\u53E3\u9519\u8BEF\uFF1A",er),(er==null?void 0:er.name)!=="cancel"&&xt(si=>{const ei=si.findIndex(vi=>vi.name===kn);return si[ei].status="error",[...si]})})}),tt=Et=>(Et=Et||"",Et=String(Et),Et=Et.replace(/\s+/g,""),Et),ht=()=>Ue(void 0,null,function*(){var Et;const Ft=mt.getFieldsValue(),{title:qt,is_public:Xt,desc:Kt}=Ft,Vt=[];if(tt(qt)||Vt.push({name:"title",errors:["\u6570\u636E\u96C6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"]}),ct!=null&&ct.length||Vt.push({name:"attachments",errors:["\u6570\u636E\u96C6\u4E0D\u80FD\u4E3A\u7A7A"]}),vt!=null&&vt.length||Vt.push({name:"tag_ids",errors:["\u6570\u636E\u96C6\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A"]}),Vt.length){mt.setFields(Vt);return}const hn=ct.map(Sn=>{var Cn;return{attachment_id:(Cn=Sn.response)==null?void 0:Cn.attachment_id,description:Sn.description}});Mt(!0);const on={title:Ft.title,attachments:hn,tag_ids:vt.map(Sn=>Sn.id),is_public:Xt,desc:Kt};let cn;ot?cn=yield(0,me.ZP)(`/api/data_sets/${ot==null?void 0:ot.id}.json`,{method:"put",body:on}):cn=yield(0,me.ZP)("/api/data_sets.json",{method:"post",body:on}),cn.status===0&&(He.ZP.success("\u64CD\u4F5C\u6210\u529F"),wt((Et=cn==null?void 0:cn.data)==null?void 0:Et.data_set_id),qe({type:"user/getUserInfo"})),Mt(!1)}),ut=Et=>{et(Et)},Ot=ct.some(Et=>Et.status==="uploading");return console.log("fileList",ct),xe.createElement(Re.default,{destroyOnClose:!0,confirmLoading:dt,bodyStyle:{paddingLeft:16,paddingTop:20},okButtonProps:{disabled:Ot},title:ot?"\u7F16\u8F91\u6570\u636E\u96C6":"\u521B\u5EFA\u6570\u636E\u96C6",width:660,onCancel:()=>{if(Ot){Re.default.confirm({title:"\u5173\u95ED\u5F39\u6846\u63D0\u793A",content:"\u6709\u6587\u4EF6\u672A\u4E0A\u4F20\uFF0C\u662F\u5426\u786E\u5B9A\u79BB\u5F00\uFF1F",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:()=>{rt()}});return}rt()},okText:"\u786E\u5B9A",onOk:ht,open:ft,afterClose:()=>{xt([]),et([]),Mt(!1),Dt(!1),_e(),mt.resetFields()}},xe.createElement(de.Z,{spinning:yt},!(We!=null&&We.current_user_no_limit)&&!yt&&xe.createElement("div",{className:Ae.prompt},xe.createElement("i",{className:"icon icon-tishi11 font12 mr10"}),"\u6E29\u99A8\u63D0\u793A:\u5E73\u53F0\u4E3A\u7528\u6237\u63D0\u4F9B\u4E86",xe.createElement("span",{style:{color:"#3061D0",margin:"0 5px"}},(Ct=St==null?void 0:St.userInfo)==null?void 0:Ct.cloud_space,"GB"),"\u7684\u6570\u636E\u96C6\u5B58\u50A8\u7A7A\u95F4\uFF0C\u60A8\u76EE\u524D\u5DF2\u4F7F\u7528\u4E86",xe.createElement("span",{style:{color:"#FF9D18",margin:"0 5px"}},((We==null?void 0:We.data_sets_filesize)/(1024*1024*1024)).toFixed(2),"GB")),xe.createElement(oe.default,{form:mt,colon:!1,labelCol:{span:4},wrapperCol:{span:20},size:"large"},xe.createElement(oe.default.Item,{label:"\u6570\u636E\u96C6\u540D\u79F0",name:"title",rules:[{required:!0,message:"\u6570\u636E\u96C6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"}]},xe.createElement(Ut.default,{placeholder:"\u8BF7\u8F93\u5165\u6570\u636E\u96C6\u540D\u79F0",showCount:!0,maxLength:60})),xe.createElement(oe.default.Item,{style:{marginBottom:0},name:"attachments",label:"\u4E0A\u4F20\u6570\u636E\u96C6",rules:[{required:!0,message:"\u6570\u636E\u96C6\u4E0D\u80FD\u4E3A\u7A7A"}]},xe.createElement("div",{style:{position:"relative"}},xe.createElement(ve.default,Be({},nt),xe.createElement(le.op,{style:{borderRadius:2}},xe.createElement("i",{className:"icon-shangchuan3 mr5 font14"}),"\u4E0A\u4F20\u6587\u4EF6")),xe.createElement("div",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px",position:"absolute",left:"115px",top:"-2px"}},xe.createElement("div",null,"1.\u5355\u4E2A\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7",(0,ce.Ny)()?50:2,"G"),xe.createElement("div",null,"2.",We!=null&&We.current_user_no_limit?"":`\u4E2A\u4EBA\u4E0A\u4F20\u603B\u4F53\u79EF\u4E0D\u8D85\u8FC7${(bt=St==null?void 0:St.userInfo)==null?void 0:bt.cloud_space}GB\uFF0C`,"\u6587\u4EF6\u540D\u4E0D\u8D85\u8FC760\u5B57")))),xe.createElement("div",{className:Ae.box},ct.map(Et=>xe.createElement("div",{key:Et.id,className:Ae.row},xe.createElement("div",{className:Ae.icon},Et.status==="done"&&xe.createElement("i",{className:"iconfont icon-wancheng",style:{color:"#19CB70"}}),Et.status==="error"&&xe.createElement("i",{className:"iconfont icon-cuowu",style:{color:"#E30000",marginLeft:1,fontSize:13}})),xe.createElement("div",{style:{width:176}},xe.createElement(Ee.Z,{title:Et==null?void 0:Et.name},xe.createElement("div",{style:{color:Et.status==="error"?"#E30000":"#3061D0",textDecoration:"underline"}},(0,Pe.tP)(Et==null?void 0:Et.name,9))),Et.status==="uploading"&&xe.createElement(ke.Z,{strokeColor:"#3061D0",trailColor:"rgba(144, 150, 163, 0.1)",percent:Et.percent,showInfo:!1,size:[168,4]})),xe.createElement("i",{onClick:()=>Ie(Et),className:"iconfont icon-shanchu14 font14 ml20 mr20",style:{cursor:"pointer",color:"#F65160"}}),xe.createElement(Ut.default,{value:Et.description,onChange:Ft=>{xt(qt=>{const Xt=qt.findIndex(Kt=>Kt.name===Et.name);return qt[Xt].description=Ft.target.value,[...qt]})},placeholder:"\u5907\u6CE8\u8BF4\u660E",showCount:!0,maxLength:255,style:{width:"286px"}})))),xe.createElement(oe.default.Item,{label:"\u6807\u7B7E",name:"tag_ids",rules:[{required:!0,message:"\u6570\u636E\u96C6\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A"}]},xe.createElement(ie.Z,{isTagsValue:!0,width:"514",selectWidth:"514",placeholder:"\u6DFB\u52A0\u6807\u7B7E",getDataSet:ut,tags:vt})),xe.createElement(oe.default.Item,{initialValue:0,label:"\u662F\u5426\u516C\u5F00",name:"is_public",rules:[{required:!0}]},xe.createElement(Se.ZP.Group,null,xe.createElement(Se.ZP,{value:1},"\u662F"),xe.createElement(Se.ZP,{value:0},"\u5426"))),xe.createElement("div",{style:{position:"relative",left:"100px",top:"-20px",width:"400px",color:"#9096A3",fontSize:"12px"}},"\u516C\u5F00\u9700\u8981\u7BA1\u7406\u5458\u5BA1\u6838\u901A\u8FC7\u540E\u53EF\u88AB\u5176\u4ED6\u7528\u6237\u8BBF\u95EE"),xe.createElement(oe.default.Item,{label:"\u7B80\u4ECB\u6458\u8981",name:"desc",style:{marginBottom:0}},xe.createElement(Ye,{placeholder:"\u6B64\u6570\u636E\u96C6\u4E3B\u8981\u5305\u542B\u4EC0\u4E48\u5185\u5BB9\uFF0C\u53EF\u4EE5\u7528\u6765\u505A\u4EC0\u4E48\uFF1F"})))))};var Ze=(0,pe.connect)(({user:ot,dispatch:lt})=>({user:ot,dispatch:lt}))(Ve)},14426:function(Dn,jn,pt){"use strict";pt.r(jn),pt.d(jn,{default:function(){return Tr}});var at=pt(59301),Ut=pt(71570),oe=pt(29787),He=pt(91882),Re=pt(25399),de=pt(62957),ve=pt(62673),Ee=pt(6767),ke=pt(75727),Se=pt(47889),Ae=pt(54172),me={flex_box_center:"flex_box_center___eNs_C",flex_space_between:"flex_space_between___oJc0d",flex_box_vertical_center:"flex_box_vertical_center___MoDEY",flex_box_center_end:"flex_box_center_end___BtlAV",flex_box_column:"flex_box_column___nUGZ8",bg:"bg___kj21E",wrap:"wrap___TtbC8",leftContent:"leftContent___FGaJd",header:"header___kobCa",headerBack:"headerBack___TI5PF",title:"title___B5Aew",time:"time___Ab938",introduction:"introduction___JKUBJ",from:"from___WId6_",bottom:"bottom___Expju",user_img:"user_img___igguI",user_name:"user_name___xNcx6",tags_name:"tags_name___xhTee",buttonList:"buttonList___ayDi1",buttonItem:"buttonItem___p_BX_",rightContent:"rightContent___XTwKA",share:"share___o0Kxt",publicStyle:"publicStyle___I8HuS",more:"more___ZQSDV",collectStyle:"collectStyle___FwPiJ",collectActiveStyle:"collectActiveStyle___vbqkD",content:"content___dl660",addTypeRadio:"addTypeRadio___iEl2Y",addBtn:"addBtn___SYc61",shixunTooltip:"shixunTooltip___krR3m",pageStyle:"pageStyle___UXmCF",pageCan:"pageCan___yNiQI",pageUnCan:"pageUnCan___M1D84",dropList:"dropList___KP6TZ",dropName:"dropName___hgrPU"},Pe=pt(12242),fe={flex_box_center:"flex_box_center___Kaphe",flex_space_between:"flex_space_between___dzJWD",flex_box_vertical_center:"flex_box_vertical_center___iwu7i",flex_box_center_end:"flex_box_center_end___izksF",flex_box_column:"flex_box_column___ntJPh",content:"content___gDHym",addTypeRadio:"addTypeRadio___oUKH0",introduceNoData:"introduceNoData___iILly",introduceAdd:"introduceAdd___v9keU",introduceText:"introduceText___iTf1W",introduceButton:"introduceButton___bwZMR",close:"close___csBZw",submit:"submit___SQ6af",introduceContent:"introduceContent___Yad8G",introduceTitle:"introduceTitle___DfmXh",introContentWrap:"introContentWrap___bmjAL",action:"action___DPbIq",fileTable:"fileTable___xqsXc",addBtn:"addBtn___em6e3",wrap:"wrap___Q3aN8",colorBlue:"colorBlue____HNqk",repeatedName:"repeatedName___RIjaL",row:"row___ngnyh",icon:"icon___fQvup"},z=pt(19565),te=pt(79074),se=pt(28284),ie=pt(37568),le=pt(14566),ce=pt(60242),pe=pt(3406),xe=pt(61186),je=pt.n(xe),De=pt(59895),Fe=pt(79809),Te=pt(24092),Me=pt(47257),Be=pt.n(Me),Ue=pt(76131),Ye=pt(1012),Ve=pt(69669),Ze=pt(59301),ot=Object.defineProperty,lt=Object.defineProperties,ft=Object.getOwnPropertyDescriptors,St=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,wt=(wr,Er,kr)=>Er in wr?ot(wr,Er,{enumerable:!0,configurable:!0,writable:!0,value:kr}):wr[Er]=kr,Ct=(wr,Er)=>{for(var kr in Er||(Er={}))qe.call(Er,kr)&&wt(wr,kr,Er[kr]);if(St)for(var kr of St(Er))rt.call(Er,kr)&&wt(wr,kr,Er[kr]);return wr},bt=(wr,Er)=>lt(wr,ft(Er)),ct=(wr,Er,kr)=>new Promise((Hi,pr)=>{var Kn=zt=>{try{Wt(kr.next(zt))}catch(Nn){pr(Nn)}},Qt=zt=>{try{Wt(kr.throw(zt))}catch(Nn){pr(Nn)}},Wt=zt=>zt.done?Hi(zt.value):Promise.resolve(zt.value).then(Kn,Qt);Wt((kr=kr.apply(wr,Er)).next())});const xt=({polls:wr,globalSetting:Er,loading:kr,dispatch:Hi,user:pr,dataSetInfo:Kn,indexType:Qt,getInfo:Wt})=>{const zt=(0,Ut.useParams)(),[Nn,Vn]=(0,at.useState)(!1),[vr,yn]=(0,at.useState)(0),zn=(0,at.useRef)(null),Ht=(0,at.useRef)(null),[Yt,qn]=(0,at.useState)(""),[jt,un]=(0,at.useState)(""),[An]=se.default.useForm(),[Yn,ln]=(0,at.useState)([]),fn=(0,at.useRef)([]),[Hn,tr]=(0,at.useState)(!1),[Zn,ir]=(0,at.useState)(!1),[Un,dr]=(0,at.useState)(""),Fr=Yn.some(sr=>sr.status==="uploading"),[Nr,Rr]=(0,at.useState)(!1),[gn,Fi]=(0,at.useState)([]),[ti,Mi]=(0,at.useState)(!1),[an,Qn]=(0,at.useState)(0),[or,yr]=(0,at.useState)({page:1,limit:10,type:"",id:""}),br=(sr,rn)=>ct(void 0,null,function*(){Mi(!0);const nr=yield(0,pe.iw)({container_type:sr||(or==null?void 0:or.type),container_id:rn||(or==null?void 0:or.id),page:or.page,limit:or.limit});Fi(nr==null?void 0:nr.data),Qn(nr==null?void 0:nr.total_count),Mi(!1)});(0,at.useEffect)(()=>{var sr;((sr=zn==null?void 0:zn.current)==null?void 0:sr.clientHeight)>80?yn(1):yn(0)},[Yt]),(0,at.useEffect)(()=>{fn.current=Yn},[Yn]),(0,at.useEffect)(()=>{qn(Kn==null?void 0:Kn.introduce),un(Kn==null?void 0:Kn.introduce)},[Kn==null?void 0:Kn.introduce]);const Ar={multiple:!1,withCredentials:!0,showUploadList:!1,fileList:Yn==null?void 0:Yn.map(sr=>sr.file),beforeUpload:sr=>ct(void 0,null,function*(){var rn,nr,sn,hr,Pr;if(((hr=(sn=(nr=(rn=sr.name)==null?void 0:rn.split("."))==null?void 0:nr.slice(0,-1))==null?void 0:sn.join("."))==null?void 0:hr.length)>60)return Ee.ZP.warning(`\u300A${sr.name}\u300B\u6587\u4EF6\u540D\u79F0\u8FC7\u957F\uFF0C\u65E0\u6CD5\u4E0A\u4F20`),Promise.reject();if([...fn.current.map(Si=>Si.name)].includes(sr.name))return Ee.ZP.warning(`\u300A${sr.name}\u300B\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`),Promise.reject();if(sr.size/1024/1024/1024>2)return Ee.ZP.warning(`\u300A${sr.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\u5927\u5C0F\u9650\u5236(2GB)`),Promise.reject();const Oi={id:String(Math.random()).slice(-6),name:sr.name,size:sr.size,file:sr,description:"",percent:0,status:"uploading"};return Jr(Oi,{login:(Pr=pr==null?void 0:pr.userInfo)==null?void 0:Pr.login,container_type:"DataSet",container_id:null,description:"",realFileName:!1}),ln(Si=>[...Si,Oi]),Promise.reject()})},ri=sr=>ct(void 0,null,function*(){var rn,nr,sn;const hr=fn.current.find(Pr=>Pr.name===sr.name);(rn=hr==null?void 0:hr.response)!=null&&rn.attachment_id&&(yield(0,Te.ZP)("/api/data_sets/single_destroy_files.json",{method:"delete",body:{attachment_id:(nr=hr==null?void 0:hr.response)==null?void 0:nr.attachment_id}})),hr!=null&&hr.client&&((sn=hr==null?void 0:hr.client)==null||sn.cancel()),ln(Pr=>Pr.filter(zr=>zr.name!==sr.name))}),Yr=()=>{var sr;(sr=fn.current)==null||sr.forEach(rn=>{var nr;rn!=null&&rn.client&&((nr=rn==null?void 0:rn.client)==null||nr.cancel())})},Jr=(sr,rn)=>ct(void 0,null,function*(){var nr,sn,hr,Pr,zr,Ri,Oi,Si,Di;rn.file_name=sr.name;const en=sr.name,pn=yield(0,Te.ZP)("/api/buckets/get_data_set_token.json",{method:"get"});if((pn==null?void 0:pn.status)!==0){ln(Pn=>(Pn[Pn.findIndex(Fn=>Fn.name===en)].status="error",[...Pn])),Ee.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}pn.data=JSON.parse((0,Ue.pe)(pn.data));const tn=new(Be())({endpoint:(nr=pn==null?void 0:pn.data)==null?void 0:nr.end_point,region:(sn=pn==null?void 0:pn.data)==null?void 0:sn.region,accessKeyId:(hr=pn==null?void 0:pn.data)==null?void 0:hr.access_key_id,accessKeySecret:(Pr=pn==null?void 0:pn.data)==null?void 0:Pr.access_key_secret,bucket:(zr=pn==null?void 0:pn.data)==null?void 0:zr.bucket,stsToken:(Ri=pn==null?void 0:pn.data)==null?void 0:Ri.security_token}),st=sr.name.split(".");st.pop();const Bn=rn.realFileName?st.join("."):(0,Ye.Z)();tn.multipartUpload(`datasets/${rn==null?void 0:rn.login}/${Bn}${en.indexOf(".")>-1?"."+en.split(".").pop():""}`,new Blob([sr.file],{type:sr.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Pn,Fn,Jn)=>{console.log("\u8FDB\u5EA6",Pn,Fn,Jn),console.log("client--",tn),ln(ar=>{const wn=ar.findIndex(Rn=>Rn.name===en);return wn!==-1&&(ar[wn].client=tn,ar[wn].percent=Pn*100,ar[wn].checkpoint=Fn),[...ar]})},checkpoint:(Si=fn.current[(Oi=fn.current)==null?void 0:Oi.findIndex(Pn=>Pn.name===en)])==null?void 0:Si.checkpoint,callback:{customValue:{id:en+""},url:(Di=pn==null?void 0:pn.data)==null?void 0:Di.callback_url,host:pn==null?void 0:pn.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Te.rz)(rn)}}).then(function(Pn){ln(Fn=>{var Jn,ar,wn;const Rn=Fn.findIndex(Wn=>Wn.name===en);let Gn="done";return Rn!==-1&&(((Jn=Pn.data)==null?void 0:Jn.status)===0?Fn[Rn].response=(ar=Pn.data)==null?void 0:ar.data:(Ee.ZP.warning((wn=Pn.data)==null?void 0:wn.message),Gn="error"),Fn[Rn].status=Gn),[...Fn]})}).catch(function(Pn){console.log("\u63A5\u53E3\u9519\u8BEF\uFF1A",Pn),(Pn==null?void 0:Pn.name)!=="cancel"&&ln(Fn=>{const Jn=Fn.findIndex(ar=>ar.name===en);return Jn!==-1&&(Fn[Jn].status="error"),[...Fn]})})});return Ze.createElement("div",{className:fe.content},!Nn&&!Yt&&Qt&&Ze.createElement("div",{className:fe.introduceNoData,onClick:()=>{Vn(!0)}},Ze.createElement("div",{className:fe.introduceAdd},Ze.createElement("i",{className:"icon icon-tianjia4 mr5 font12"})," \u6DFB\u52A0\u6570\u636E\u96C6\u4ECB\u7ECD"),Ze.createElement("div",{className:fe.introduceText},"\u8BA9\u4F60\u7684\u6570\u636E\u96C6\u66F4\u53D7\u6B22\u8FCE")),!Nn&&Yt&&Ze.createElement("div",{className:fe.introduceContent},Ze.createElement("div",{className:fe.introduceTitle},"\u6570\u636E\u96C6\u4ECB\u7ECD",Qt&&Ze.createElement("i",{className:"icon icon-bianji9 font14 ml10",style:{color:"#3061D0",cursor:"pointer"},onClick:()=>{Vn(!0)}})),Ze.createElement("div",{className:fe.introContentWrap},Ze.createElement("div",null,Ze.createElement("div",{ref:Ht,style:vr>0?{height:vr===1?80:"auto",overflow:vr===1?"hidden":"auto"}:{paddingRight:0}},Ze.createElement("div",{ref:zn},Ze.createElement(te.Z,{value:Yt,style:{fontSize:"14px"}}))),!!vr&&Ze.createElement(at.Fragment,null,vr===1?Ze.createElement("div",{onClick:()=>{yn(2)},className:fe.action},"\u5C55\u5F00",Ze.createElement("i",{className:"iconfont icon-zhankaixiaojiantou",style:{fontSize:"10px",marginLeft:"3px"}})):Ze.createElement("div",{onClick:()=>{yn(1)},className:fe.action},"\u6536\u8D77",Ze.createElement("i",{className:"iconfont icon-shouqixiaojiantou",style:{fontSize:"10px",marginLeft:"3px"}})))))),Nn&&Ze.createElement("div",{style:{marginTop:"30px"}},Ze.createElement(z.Z,{watch:!0,onChange:sr=>{un(sr)},defaultValue:jt,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u5185\u5BB9\uFF0C\u6700\u591A5000\u4E2A\u5B57\u7B26"}),Ze.createElement("div",{className:fe.introduceButton},Ze.createElement("div",{className:fe.close,onClick:sr=>{sr.stopPropagation(),Vn(!1)}},"\u53D6\u6D88"),Ze.createElement("div",{className:fe.submit,onClick:sr=>{sr.stopPropagation(),(0,pe.R2)({id:zt==null?void 0:zt.id,introduce:jt}).then(rn=>{(rn==null?void 0:rn.status)==0&&(Ee.ZP.success("\u64CD\u4F5C\u6210\u529F"),Vn(!1),Wt(!0))})}},"\u786E\u8BA4"))),Ze.createElement("div",{className:fe.fileTable},Ze.createElement("div",null,"\u6587\u4EF6\u5217\u8868"),Qt&&Ze.createElement("div",{className:fe.addBtn,onClick:()=>{tr(!0)}},"\u4E0A\u4F20\u6587\u4EF6")),Ze.createElement(Ae.default,{dataSource:Kn==null?void 0:Kn.attachments,pagination:!1,style:{marginTop:"20px"},scroll:{y:300},columns:[{title:"\u6587\u4EF6",align:"left",width:400,dataIndex:"title",ellipsis:!0},{title:"\u5907\u6CE8",align:"left",dataIndex:"description",ellipsis:!0},{title:"\u521B\u5EFA\u65F6\u95F4",align:"left",ellipsis:!0,dataIndex:"created_on",render:sr=>Ze.createElement("span",{style:{color:"#666666"}},sr?je()(sr).format("YYYY-MM-DD"):"--")},{title:"\u6587\u4EF6\u5927\u5C0F",align:"left",dataIndex:"filesize",ellipsis:!0},{title:"\u4E0B\u8F7D\u6570",align:"center",dataIndex:"downloads",ellipsis:!0,render:(sr,rn)=>Ze.createElement("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:()=>ct(void 0,null,function*(){var nr;((0,Ve.Ny)()||((nr=pr==null?void 0:pr.userInfo)==null?void 0:nr.login)==="mfflo3p2e")&&(Rr(!0),or.type=rn==null?void 0:rn.container_type,or.id=rn==null?void 0:rn.container_id,or.page=1,or.limit=10,yr(Ct({},or)),yield br(rn==null?void 0:rn.container_type,rn==null?void 0:rn.container_id))})},sr||"0")},{title:"\u64CD\u4F5C",align:"right",dataIndex:"role",width:Qt?130:60,render:(sr,rn,nr)=>Ze.createElement("span",{style:{color:"#3061D0"}},Ze.createElement("div",{style:{display:"flex"}},Ze.createElement("div",{style:{marginRight:"10px",color:"#3061D0",cursor:"pointer"},onClick:()=>ct(void 0,null,function*(){yield(0,De.Nd)(rn.title,rn==null?void 0:rn.download_url),yield(0,pe.SG)({id:rn==null?void 0:rn.id}),Wt()})},"\u4E0B\u8F7D"),Qt&&Ze.createElement("div",{style:{marginRight:"10px",color:"#3061D0",cursor:"pointer"},onClick:()=>{var sn,hr,Pr,zr;let Ri=(hr=rn==null?void 0:rn.title)==null?void 0:hr.substring(((sn=rn==null?void 0:rn.title)==null?void 0:sn.lastIndexOf("."))+1);An.setFieldsValue({title:(zr=rn==null?void 0:rn.title)==null?void 0:zr.substring(0,(Pr=rn==null?void 0:rn.title)==null?void 0:Pr.lastIndexOf(".")),description:rn==null?void 0:rn.description}),de.default.confirm({icon:null,title:"\u7F16\u8F91",width:700,centered:!0,content:Ze.createElement("div",null,Ze.createElement(se.default,{form:An,colon:!1,labelCol:{span:3},style:{marginBottom:"-20px"},wrapperCol:{span:21}},Ze.createElement(se.default.Item,{label:"\u6587\u4EF6\u540D\u79F0",name:"title",rules:[{required:!0,message:"\u5FC5\u586B\u9879"}]},Ze.createElement(ie.default,{placeholder:"\u6587\u4EF6\u540D\u79F0\u6700\u591A\u53EF\u8F93\u5165255\u5B57",size:"large",suffix:Ze.createElement("span",null,".",Ri)})),Ze.createElement(se.default.Item,{label:"\u5907\u6CE8",name:"description"},Ze.createElement(Fe.Z,{placeholder:"\u5907\u6CE8\u8BF4\u660E\uFF0C\u6700\u591A255\u5B57",size:"large"})))),onOk:()=>ct(void 0,null,function*(){yield An.validateFields(),(0,pe.A0)({id:zt==null?void 0:zt.id,attachment_id:rn.id,filename:An.getFieldValue("title")+"."+Ri,description:An.getFieldValue("description")}).then(Oi=>{(Oi==null?void 0:Oi.status)==0&&(Ee.ZP.success("\u7F16\u8F91\u6210\u529F"),Wt())})})})}},"\u7F16\u8F91"),Qt&&Ze.createElement("div",{style:{color:"#9096A3",cursor:"pointer"},onClick:()=>{de.default.confirm({icon:null,centered:!0,title:"\u63D0\u793A",content:"\u5220\u9664\u6570\u636E\u96C6\u4E0D\u4F1A\u5F71\u54CD\u5230\u5F15\u7528\u8BE5\u6570\u636E\u96C6\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4F46\u5220\u9664\u540E\u6570\u636E\u5C06\u4E0D\u53EF\u6062\u590D\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664",onOk:()=>ct(void 0,null,function*(){(0,pe.Il)({attachment_id:rn==null?void 0:rn.id}).then(sn=>{(sn==null?void 0:sn.status)==0&&(Ee.ZP.success("\u5220\u9664\u6210\u529F"),Hi({type:"user/getUserInfo"}),Wt(!0))})})})}},"\u5220\u9664")))}]}),Ze.createElement(de.default,{centered:!0,keyboard:!1,maskClosable:!1,destroyOnClose:!0,open:Hn,title:"\u4E0A\u4F20\u6587\u4EF6",okButtonProps:{loading:Zn,disabled:Fr},width:"1000px",onOk:()=>ct(void 0,null,function*(){const sr=Yn.map(nr=>{var sn;return{attachment_id:(sn=nr.response)==null?void 0:sn.attachment_id,description:Un}});if(Yn.length===0){Ee.ZP.info("\u8BF7\u5148\u4E0A\u4F20\u6587\u4EF6\uFF01");return}ir(!0);const rn=yield(0,Te.ZP)(`/api/data_sets/${zt==null?void 0:zt.id}/upload_attachments.json`,{method:"post",body:{attachments:sr}});(rn==null?void 0:rn.status)==0&&(Ee.ZP.success("\u4E0A\u4F20\u6210\u529F\uFF01"),Wt(),tr(!1),Hi({type:"user/getUserInfo"})),ir(!1)}),onCancel:()=>{if(Fr){de.default.confirm({title:"\u5173\u95ED\u5F39\u6846\u63D0\u793A",content:"\u6709\u6587\u4EF6\u672A\u4E0A\u4F20\uFF0C\u662F\u5426\u786E\u5B9A\u79BB\u5F00\uFF1F",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:()=>{tr(!1)}});return}tr(!1)},afterClose:()=>{ln([]),dr(""),ir(!1),Yr()}},Ze.createElement("div",{className:fe.wrap},Ze.createElement("div",{className:"mb10"},Ze.createElement("span",{style:{color:"#ff4d4f",marginRight:"5px"}},"*"),"\u9009\u62E9\u6587\u4EF6 ",Ze.createElement("span",{className:"c-light-black"},"(\u5355\u4E2A\u6587\u4EF6\u4E0D\u8D85\u8FC72GB)")),Ze.createElement("div",null,Ze.createElement(le.default.Dragger,bt(Ct({},Ar),{height:300}),Ze.createElement("div",null,Ze.createElement("i",{className:`iconfont icon-shangchuan font50 ${fe.colorBlue}`})),Ze.createElement("div",{className:"font14 mt30"},"\u62D6\u62FD\u6587\u4EF6\u6216",Ze.createElement("span",{className:`${fe.colorBlue} ml5`},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))),Ze.createElement("div",{className:fe.box},Yn.map(sr=>Ze.createElement("div",{key:sr.id,className:fe.row},Ze.createElement("div",{style:{display:"flex",alignItems:"center"}},Ze.createElement("div",{className:fe.icon},sr.status==="done"&&Ze.createElement("i",{className:"iconfont icon-wancheng",style:{color:"#19CB70"}}),sr.status==="error"&&Ze.createElement("i",{className:"iconfont icon-cuowu",style:{color:"#E30000",marginLeft:1,fontSize:13}})),Ze.createElement("div",{style:{flex:1}},Ze.createElement(Re.Z,{title:sr==null?void 0:sr.name},Ze.createElement("div",{style:{width:"100%",color:sr.status==="error"?"#E30000":"#3061D0",textDecoration:"underline"}},(0,De.tP)(sr==null?void 0:sr.name,9))),sr.status==="uploading"&&Ze.createElement(ce.Z,{strokeColor:"#3061D0",trailColor:"rgba(144, 150, 163, 0.1)",percent:sr.percent,showInfo:!1,style:{width:"900px"}}))),Ze.createElement("i",{onClick:()=>ri(sr),className:"iconfont icon-shanchu14 font14 ml20",style:{cursor:"pointer",color:"#F65160"}})))),Ze.createElement("div",{style:{marginTop:"20px"}},"\u5907\u6CE8\uFF1A"),Ze.createElement("div",null,Ze.createElement(ie.default,{allowClear:!0,value:Un,onChange:sr=>{dr(sr.target.value)},bordered:!1,showCount:!0,maxLength:255,placeholder:"\u8BF7\u586B\u5199\u5907\u6CE8\u4FE1\u606F"})))),Ze.createElement(de.default,{centered:!0,keyboard:!1,maskClosable:!1,destroyOnClose:!0,open:Nr,title:"\u4E0B\u8F7D\u4FE1\u606F",width:"730px",onCancel:()=>{Rr(!1)},footer:null},Ze.createElement("div",null,Ze.createElement(Ae.default,{dataSource:gn,scroll:{y:47*6},className:"mt10 mb10",loading:ti,pagination:{total:an||0,onChange:(sr,rn)=>ct(void 0,null,function*(){or.page=sr,or.limit=rn,yr(Ct({},or)),yield br()}),onShowSizeChange:(sr,rn)=>ct(void 0,null,function*(){or.page=1,or.limit=rn,yr(Ct({},or)),yield br()}),current:or==null?void 0:or.page,pageSize:or==null?void 0:or.limit,showTotal:sr=>Ze.createElement(Ze.Fragment,null,"\u5171",Ze.createElement("span",{className:"ml5 mr5",style:{color:"#3061d0"}},sr),"\u6761\u6570\u636E")},columns:[{title:"\u67E5\u770B\u4EBA",align:"left",width:150,dataIndex:"real_name",ellipsis:!0,render:sr=>Ze.createElement("span",null,sr||"--")},{title:"\u5355\u4F4D",align:"left",width:260,ellipsis:!0,dataIndex:"school_name",render:sr=>Ze.createElement("span",null,sr||"--")},{title:"\u90E8\u95E8",align:"left",width:150,ellipsis:!0,dataIndex:"department_name",render:sr=>Ze.createElement("span",null,sr||"--")},{title:"\u67E5\u770B\u65F6\u95F4",dataIndex:"created_at",ellipsis:!0,render:sr=>Ze.createElement("span",{style:{color:"#666666"}},sr?je()(sr).format("YYYY-MM-DD"):"--")}]}))))};var dt=(0,Ut.connect)(({polls:wr,loading:Er,user:kr,globalSetting:Hi})=>({polls:wr,globalSetting:Hi,user:kr,loading:Er.effects}))(xt),Mt=pt(26227),yt=pt(77019),Dt=pt(5269),mt=pt(99571),vt={flex_box_center:"flex_box_center___kjELP",flex_space_between:"flex_space_between___IoBKu",flex_box_vertical_center:"flex_box_vertical_center___NuujF",flex_box_center_end:"flex_box_center_end___Kc5UK",flex_box_column:"flex_box_column___ebFBu",reply:"reply___xDf2z",replyList:"replyList___zMH5f",comment:"comment___qHsYF",content:"content___vTju0",commentItem:"commentItem___aGdcc",commentParItem:"commentParItem___XkqkQ",submitStyle:"submitStyle___RwXx8"},et=pt(86496),We=pt(59301),we=Object.defineProperty,Ne=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Ge=(wr,Er,kr)=>Er in wr?we(wr,Er,{enumerable:!0,configurable:!0,writable:!0,value:kr}):wr[Er]=kr,tt=(wr,Er)=>{for(var kr in Er||(Er={}))Ie.call(Er,kr)&&Ge(wr,kr,Er[kr]);if(nt)for(var kr of nt(Er))_e.call(Er,kr)&&Ge(wr,kr,Er[kr]);return wr},ht=(wr,Er)=>Ne(wr,Xe(Er)),ut=(wr,Er,kr)=>new Promise((Hi,pr)=>{var Kn=zt=>{try{Wt(kr.next(zt))}catch(Nn){pr(Nn)}},Qt=zt=>{try{Wt(kr.throw(zt))}catch(Nn){pr(Nn)}},Wt=zt=>zt.done?Hi(zt.value):Promise.resolve(zt.value).then(Kn,Qt);Wt((kr=kr.apply(wr,Er)).next())});je().locale("ZH-cn");function Ot({user:wr,vlist:Er=[],dispatch:kr,params:Hi,id:pr,memo_replies:Kn,forumsDetail:Qt}){return We.createElement("aside",{className:vt.comment},Er.map(function(Wt,zt){var Nn,Vn;return We.createElement(yt.Z,{key:zt,className:vt.commentItem},We.createElement(Dt.Z,{span:24},We.createElement(yt.Z,null,We.createElement(Dt.Z,{flex:"1"},We.createElement("a",{href:`/users/${Wt.user_login}`,target:"_blank",style:{color:"#9096A3",fontSize:"12px"}},Wt==null?void 0:Wt.username),We.createElement("span",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px"}},Wt.time)),(Wt.can_delete||Wt.user_id===((Nn=wr.userInfo)==null?void 0:Nn.user_id)||Wt.user_login===((Vn=wr.userInfo)==null?void 0:Vn.login))&&We.createElement(Dt.Z,{className:"forums-comment-delete",style:{display:"none"}},We.createElement(Re.Z,{title:"\u5220\u9664"},We.createElement(Mt.Z,{className:"current",onClick:()=>{de.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:We.createElement("div",{className:"font16 tc"},"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"),onOk:()=>ut(this,null,function*(){const vr=yield(0,et.sW)({id:Wt.id,memo_type:"data_set"}),yn=Kn.find(zn=>zn.id===pr).children.filter(zn=>zn.id!==Wt.id);Kn.find(zn=>zn.id===pr).children=yn,kr({type:"forumsDetail/setForumsDetailData",payload:ht(tt({},Qt.forumsDetailData),{memo_replies:[...Kn],memo_type:"data_set"})})})})}}))))),We.createElement(Dt.Z,null,We.createElement(te.Z,{value:Wt.content,style:{color:"#232B40",fontSize:"14px"}})))}))}var Et=Ot,Ft=pt(59301),qt=Object.defineProperty,Xt=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,Vt=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,on=Object.prototype.propertyIsEnumerable,cn=(wr,Er,kr)=>Er in wr?qt(wr,Er,{enumerable:!0,configurable:!0,writable:!0,value:kr}):wr[Er]=kr,Sn=(wr,Er)=>{for(var kr in Er||(Er={}))hn.call(Er,kr)&&cn(wr,kr,Er[kr]);if(Vt)for(var kr of Vt(Er))on.call(Er,kr)&&cn(wr,kr,Er[kr]);return wr},Cn=(wr,Er)=>Xt(wr,Kt(Er)),kn=(wr,Er,kr)=>new Promise((Hi,pr)=>{var Kn=zt=>{try{Wt(kr.next(zt))}catch(Nn){pr(Nn)}},Qt=zt=>{try{Wt(kr.throw(zt))}catch(Nn){pr(Nn)}},Wt=zt=>zt.done?Hi(zt.value):Promise.resolve(zt.value).then(Kn,Qt);Wt((kr=kr.apply(wr,Er)).next())});je().locale("ZH-cn");const In=({user:wr,forumsDetail:Er,globalSetting:kr,loading:Hi,dispatch:pr,handleClick:Kn,memoId:Qt},Wt)=>{const{memo:zt,memo_replies:Nn}=Er.forumsDetailData||{},Vn=(0,Ut.useParams)(),[vr,yn]=(0,at.useState)(""),[zn,Ht]=(0,at.useState)(""),[Yt,qn]=(0,at.useState)(-1),[jt,un]=(0,at.useState)(!1),[An,Yn]=(0,at.useState)(!1),[ln,fn]=(0,at.useState)(1);(0,at.useEffect)(()=>{un((zt==null?void 0:zt.reply_for_memo_count)>10)},[zt==null?void 0:zt.reply_for_memo_count]),(0,at.useEffect)(()=>{pr({type:"forumsDetail/getForumsDetailData",payload:{id:Qt,memo_type:"data_set"}})},[]);const Hn=()=>kn(void 0,null,function*(){var Zn;const ir=ln+1;fn(ir);const Un=yield(0,et.z5)({id:Qt,page:ir,memo_type:"data_set"});Un!=null&&Un.memo_replies&&(pr({type:"forumsDetail/setForumsDetailData",payload:Cn(Sn({},Er.forumsDetailData),{memo_replies:[...Nn,...Un.memo_replies]})}),un(((Zn=Un.memo_replies)==null?void 0:Zn.length)===10))}),tr=Zn=>{var ir,Un,dr,Fr;return Cn(Sn({},Zn),{image_url:(ir=wr.userInfo)==null?void 0:ir.image_url,children:[],user_id:(Un=wr.userInfo)==null?void 0:Un.user_id,user_login:(dr=wr.userInfo)==null?void 0:dr.login,username:(Fr=wr.userInfo)==null?void 0:Fr.username,time:`${(0,De.li)((new Date().getTime()-new Date(Zn.created_at).getTime())/1e3)}\u524D`})};return Ft.createElement("section",{className:vt.wrap},!!(Nn!=null&&Nn.length)&&Ft.createElement("aside",{className:vt.content},Ft.createElement("aside",{className:vt.replyList},Nn==null?void 0:Nn.map(function(Zn,ir){var Un,dr,Fr;return Ft.createElement(yt.Z,{gutter:[12,12],key:ir},Ft.createElement(Dt.Z,{flex:"40px"},Ft.createElement("a",{href:`/users/${Zn.user_login}`,target:"_blank"},Ft.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",width:"46",height:"46",src:`${Pe.Z.IMG_SERVER}/images/${Zn==null?void 0:Zn.image_url}`}))),Ft.createElement(Dt.Z,{flex:"1"},Ft.createElement(yt.Z,{align:"middle",className:vt.commentParItem},Ft.createElement(Dt.Z,{span:24},Ft.createElement(yt.Z,null,Ft.createElement(Dt.Z,{flex:"1"},Ft.createElement("a",{href:`/users/${Zn.user_login}`,target:"_blank"},Ft.createElement("span",{style:{color:"#9096A3",fontSize:"12px"}},Zn==null?void 0:Zn.username)),Ft.createElement("span",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px"}},Zn.time)),(Zn.can_delete||Zn.user_id===((Un=wr.userInfo)==null?void 0:Un.user_id)||Zn.user_login===((dr=wr.userInfo)==null?void 0:dr.login))&&Ft.createElement(Dt.Z,{className:"forums-comment-par-delete",style:{display:"none"}},Ft.createElement(Re.Z,{title:"\u5220\u9664"},Ft.createElement(Mt.Z,{className:"current",onClick:()=>{de.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Ft.createElement("div",{className:"font16 tc"},"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"),onOk:()=>kn(this,null,function*(){const Nr=yield(0,et.sW)({id:Zn.id,memo_type:"data_set"}),Rr=Nn.filter(gn=>gn.id!==Zn.id);pr({type:"forumsDetail/setForumsDetailData",payload:Cn(Sn({},Er.forumsDetailData),{memo_replies:[...Rr],memo_type:"data_set"})})})})}}))))),Ft.createElement(Dt.Z,{span:24,style:{marginTop:"5px"}},Ft.createElement("div",{onClick:Kn},Ft.createElement(te.Z,{value:Zn.content,style:{color:"#232B40",fontSize:"14px"}}))),!!((Fr=Zn==null?void 0:Zn.children)!=null&&Fr.length)&&Ft.createElement(Et,{user:wr,id:Zn==null?void 0:Zn.id,vlist:Zn==null?void 0:Zn.children,dispatch:pr,params:Vn,memo_replies:Nn,forumsDetail:Er}),Ft.createElement(Dt.Z,{span:24,className:"mt5 c-light-black"},Yt===ir?Ft.createElement("aside",null,Ft.createElement(z.Z,{onChange:Nr=>{Ht(Nr)},height:150,isFocus:!0,placeholder:"\u6211\u8981\u56DE\u590D..."}),Ft.createElement(yt.Z,null,Ft.createElement(Dt.Z,{span:24,className:"tr"},Ft.createElement(mt.ZP,{type:"primary",size:"middle",onClick:()=>kn(this,null,function*(){if(zn==="")Ee.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const Nr=yield(0,et.ts)({parent_id:Zn.id,content:zn,memo_type:"data_set"});Ht(null),Nr&&(qn(-1),Nn.find(Rr=>Rr.id===Nr.parent_id).children.push(tr(Nr)),pr({type:"forumsDetail/setForumsDetailData",payload:Cn(Sn({},Er.forumsDetailData),{memo:Cn(Sn({},zt),{reply_for_memo_count:(zt==null?void 0:zt.reply_for_memo_count)+1}),memo_replies:[...Nn],memo_type:"data_set"})}))}})},"\u53D1\u9001")))):Ft.createElement("div",{className:"tr",style:{textAlign:"left"}},Ft.createElement("span",{className:"iconfont icon-xiaopinglun mr30 current font14",onClick:()=>qn(ir)}),Ft.createElement(Re.Z,{title:Zn.user_praise?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},Ft.createElement("span",{className:Zn.user_praise?"c-orange":"c-gery-888"},Ft.createElement("i",{className:"iconfont icon-dianzan4 mr5 current font14",onClick:()=>kn(this,null,function*(){const Nr=yield(0,et.vL)({id:Zn.id,container_type:"Memo",type:Zn.user_praise?0:1,memo_type:"data_set"});(Nr==null?void 0:Nr.praise_count)>=0&&(Nn.find(Rr=>Rr.id===Zn.id).user_praise=!Zn.user_praise,Nn.find(Rr=>Rr.id===Zn.id).praise_count=Nr==null?void 0:Nr.praise_count,pr({type:"forumsDetail/setForumsDetailData",payload:Cn(Sn({},Er.forumsDetailData),{memo_replies:[...Nn],memo_type:"data_set"})}))})}),Zn.praise_count>0?Zn.praise_count:"")))))))}))),jt&&Ft.createElement("aside",{className:"bg-white pb20",style:{display:"flex",justifyContent:"center",marginTop:"20px"}},Ft.createElement(yt.Z,{justify:"space-between"},Ft.createElement(Dt.Z,null),Ft.createElement(Dt.Z,null,jt&&Ft.createElement("a",{style:{color:"#3061D0",fontSize:"14px"},onClick:Hn},"\u67E5\u770B\u66F4\u591A\u8BC4\u8BBA",Ft.createElement("i",{className:"icon icon-zhankaixiaojiantou ",style:{fontSize:"10px",marginLeft:"3px"}}))))),Ft.createElement("aside",{className:vt.reply},Ft.createElement(z.Z,{onBlur:()=>Yn(!1),isFocus:An,defaultValue:vr,id:"writeForumsReviewId",onChange:Zn=>{yn(Zn)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Ft.createElement(yt.Z,null,Ft.createElement(Dt.Z,{flex:"1"}),Ft.createElement(Dt.Z,null,Ft.createElement("div",{className:vt.submitStyle,style:{width:"60px",height:"32px",textAlign:"center"},onClick:()=>kn(void 0,null,function*(){if(vr==="")Ee.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const Zn=yield(0,et.ts)({parent_id:zt==null?void 0:zt.id,content:vr,memo_type:"data_set"});yn(null),Zn&&pr({type:"forumsDetail/setForumsDetailData",payload:Cn(Sn({},Er.forumsDetailData),{memo:Cn(Sn({},zt),{reply_for_memo_count:(zt==null?void 0:zt.reply_for_memo_count)+1}),memo_replies:[tr(Zn),...Nn],memo_type:"data_set"})})}})},"\u53D1\u9001")))))};var _r=(0,Ut.connect)(({user:wr,forumsDetail:Er,loading:kr,globalSetting:Hi})=>({user:wr,forumsDetail:Er,globalSetting:Hi,loading:kr.models.forumsDetail}),null,null,{forwardRef:!0})((0,at.forwardRef)(In)),xr=pt(46133),qr=pt(81576),er=pt(59301),si=Object.defineProperty,ei=Object.getOwnPropertySymbols,vi=Object.prototype.hasOwnProperty,Li=Object.prototype.propertyIsEnumerable,Pi=(wr,Er,kr)=>Er in wr?si(wr,Er,{enumerable:!0,configurable:!0,writable:!0,value:kr}):wr[Er]=kr,Xr=(wr,Er)=>{for(var kr in Er||(Er={}))vi.call(Er,kr)&&Pi(wr,kr,Er[kr]);if(ei)for(var kr of ei(Er))Li.call(Er,kr)&&Pi(wr,kr,Er[kr]);return wr},mi=(wr,Er,kr)=>new Promise((Hi,pr)=>{var Kn=zt=>{try{Wt(kr.next(zt))}catch(Nn){pr(Nn)}},Qt=zt=>{try{Wt(kr.throw(zt))}catch(Nn){pr(Nn)}},Wt=zt=>zt.done?Hi(zt.value):Promise.resolve(zt.value).then(Kn,Qt);Wt((kr=kr.apply(wr,Er)).next())});let Qe={public:"\u516C\u5F00\u6570\u636E\u96C6",mine:"\u6211\u7684\u6570\u636E\u96C6",share:"\u56E2\u961F\u5171\u4EAB",collect:"\u6211\u6536\u85CF\u7684"};const ii=({polls:wr,globalSetting:Er,loading:kr,dispatch:Hi,user:pr})=>{var Kn,Qt,Wt;const zt=(0,Ut.useParams)(),[Nn]=(0,Ut.useSearchParams)(),[Vn,vr]=(0,at.useState)(!1),[yn,zn]=(0,at.useState)(1),[Ht,Yt]=(0,at.useState)(null),[qn,jt]=(0,at.useState)(""),[un,An]=(0,at.useState)(),[Yn,ln]=(0,at.useState)(1),[fn,Hn]=(0,at.useState)(1),tr=(0,at.useRef)([]),[Zn,ir]=(0,at.useState)([]),[Un,dr]=(0,at.useState)(!1),[Fr,Nr]=(0,at.useState)(!1),[Rr,gn]=(0,at.useState)(!1),[Fi,ti]=(0,at.useState)([]),[Mi,an]=(0,at.useState)(!1),[Qn,or]=(0,at.useState)(0),[yr,br]=(0,at.useState)({page:1,limit:10}),Ar=()=>mi(void 0,null,function*(){an(!0);const nr=yield(0,pe.iw)({container_type:Ht==null?void 0:Ht.container_type,container_id:Ht==null?void 0:Ht.container_id,page:yr==null?void 0:yr.page,limit:yr==null?void 0:yr.limit});(nr==null?void 0:nr.status)==0&&(ti(nr==null?void 0:nr.data),or(nr==null?void 0:nr.total_count),an(!1))});(0,at.useEffect)(()=>{Jr(),(0,Te.ZP)("/api/teach_group_shares.json",{method:"get"}).then(nr=>{(nr==null?void 0:nr.status)==0&&ir(nr==null?void 0:nr.groups)})},[]),(0,at.useEffect)(()=>{yn==2&&Yr()},[yn,Yn]);const ri=(nr,sn)=>(nr=Math.max(nr,0),sn=Math.max(sn,1),Math.ceil(nr/sn)),Yr=()=>{(0,pe.Ce)({id:zt==null?void 0:zt.id,page:Yn,limit:16}).then(nr=>{var sn,hr;(nr==null?void 0:nr.status)==0&&(An((sn=nr==null?void 0:nr.data)==null?void 0:sn.shixuns),Hn(ri((hr=nr==null?void 0:nr.data)==null?void 0:hr.count,16)))})},Jr=(nr=!1)=>{Nr(!0),(0,pe.Ru)(zt==null?void 0:zt.id).then(sn=>{var hr,Pr;(sn==null?void 0:sn.status)==0&&(Yt(sn==null?void 0:sn.data),vr((0,Ve.Ny)()||((hr=sn==null?void 0:sn.data)==null?void 0:hr.is_creator)),tr.current=(Pr=sn==null?void 0:sn.data)==null?void 0:Pr.share_group_ids,nr&&jt(new Date),Nr(!1))})},sr=()=>{dr(!1)},rn=()=>{Jr(),dr(!1)};return er.createElement(oe.Z,{spinning:Fr},er.createElement("section",{className:me.bg},Ht&&er.createElement(er.Fragment,null,er.createElement("div",{className:"edu-container"},er.createElement("aside",{className:"mt10"},er.createElement(He.Z,{separator:">"},er.createElement(He.Z.Item,null,er.createElement(Ut.Link,{to:"/dataset"},"\u6570\u636E\u96C6")),er.createElement(He.Z.Item,null,er.createElement(Ut.Link,{to:`/dataset?tabId=${Nn.get("tabId")}`},Qe[Nn.get("tabId")])),er.createElement(He.Z.Item,null,Ht==null?void 0:Ht.title))),er.createElement("aside",{className:me.wrap},er.createElement("div",{className:me.leftContent,style:{width:Vn?"78%":"87%"}},er.createElement("div",{className:me.header},er.createElement("div",{className:me.headerBack,onClick:()=>{Ut.history.push(`/dataset?tabId=${Nn.get("tabId")}`)}},er.createElement("i",{className:"iconfont icon-fanhui4 ",style:{fontSize:"10px",margin:"0 3px 0 5px"}}),"\u8FD4\u56DE"),er.createElement("div",{className:me.title},Ht==null?void 0:Ht.title),er.createElement("div",{className:me.time},Ht==null?void 0:Ht.create_at)),er.createElement("div",{className:me.introduction},Ht==null?void 0:Ht.desc),er.createElement("div",{className:me.bottom},((Kn=Ht==null?void 0:Ht.user_info)==null?void 0:Kn.image_url)&&er.createElement("img",{className:me.user_img,alt:"\u7528\u6237\u5934\u50CF",src:`${Pe.Z.IMG_SERVER}/images/${(Qt=Ht==null?void 0:Ht.user_info)==null?void 0:Qt.image_url}`}),er.createElement("div",{className:me.user_name},Ht==null?void 0:Ht.user_info_name),(Wt=Ht==null?void 0:Ht.data_set_tags)==null?void 0:Wt.map((nr,sn)=>{var hr;return sn<3?er.createElement("div",{key:sn,className:me.tags_name},nr==null?void 0:nr.tag_name):sn==3?er.createElement(Re.Z,{key:sn,title:(hr=Ht==null?void 0:Ht.data_set_tags)==null?void 0:hr.map((Pr,zr)=>{var Ri;if(zr>2)return(Pr==null?void 0:Pr.tag_name)+(zr===((Ri=Ht==null?void 0:Ht.data_set_tags)==null?void 0:Ri.length)-1?"":"\u3001")}).join("")},er.createElement("div",{key:sn,className:me.tags_name},"...")):null}),er.createElement("div",{className:me.buttonList},er.createElement(Re.Z,{title:`\u5F15\u7528\u6570\uFF1A${Ht==null?void 0:Ht.used_count}`},er.createElement("div",{className:`${me.buttonItem} current`},er.createElement("i",{className:"iconfont icon-yinyong font12 mr5"}),Ht==null?void 0:Ht.used_count)),er.createElement(Re.Z,{title:`\u6D4F\u89C8\u6570\uFF1A${Ht==null?void 0:Ht.visited_count}`},er.createElement("div",{className:`${me.buttonItem} current`,onClick:()=>mi(void 0,null,function*(){var nr;((0,Ve.Ny)()||((nr=pr==null?void 0:pr.userInfo)==null?void 0:nr.login)==="mfflo3p2e")&&(gn(!0),yr.page=1,yr.limit=10,br(Xr({},yr)),yield Ar())})},er.createElement("i",{className:"iconfont icon-chakanrenshu font12 mr5"}),Ht==null?void 0:Ht.visited_count)),er.createElement(Re.Z,{title:`\u8BC4\u8BBA\u6570\uFF1A${Ht==null?void 0:Ht.comment_count}`},er.createElement("div",{className:`${me.buttonItem} current`},er.createElement("i",{className:"iconfont icon-xiaopinglun font12 mr5"}),Ht==null?void 0:Ht.comment_count))))),er.createElement("div",{className:me.rightContent,style:{width:Vn?"22%":"13%"}},Vn?er.createElement("div",{style:{display:"flex",marginLeft:"auto"}},er.createElement("div",{className:me.share,onClick:()=>mi(void 0,null,function*(){de.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u5171\u4EAB\u81F3\u6559\u7814\u56E2\u961F",maskClosable:!0,icon:null,content:er.createElement("div",{className:`font14 ${me.overflow}`},er.createElement("div",{className:me.tips},"\u63D0\u793A\uFF1A\u5171\u4EAB\u540E\u7684\u6570\u636E\u96C6\u652F\u6301\u56E2\u961F\u6210\u5458\u8FDB\u884C\u7F16\u8F91\uFF0C\u5982\u9700\u64A4\u9500\u672C\u6570\u636E\u96C6\u5BF9\u9009\u4E2D\u6559\u7814\u56E2\u961F\u7684\u5206\u4EAB\uFF0C\u53D6\u6D88\u9009\u4E2D\u5E76\u786E\u5B9A\u5373\u53EF\u3002"),er.createElement(ve.default.Group,{style:{marginTop:"10px"},defaultValue:Ht==null?void 0:Ht.share_group_ids,onChange:nr=>{tr.current=nr}},Zn==null?void 0:Zn.map(nr=>er.createElement(ve.default,{key:nr==null?void 0:nr.group_id,value:nr==null?void 0:nr.group_id},nr==null?void 0:nr.name)))),onOk:()=>{(0,pe.l5)({ids:[Ht==null?void 0:Ht.id],clazz:"DataSet",group_ids:tr.current}).then(nr=>{(nr==null?void 0:nr.status)==0&&(Ee.ZP.success("\u5171\u4EAB\u6210\u529F"),Jr())})}})})},"\u5171\u4EAB"),er.createElement("div",{className:me.publicStyle,onClick:()=>{de.default.confirm({centered:!0,okText:"\u786E\u5B9A",icon:null,cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:(Ht==null?void 0:Ht.public_status)==0?"\u7533\u8BF7\u516C\u5F00\u9700\u8981\u5F85\u5E73\u53F0\u7BA1\u7406\u5458\u5BA1\u6838\u901A\u8FC7\u540E\uFF0C\u81EA\u52A8\u516C\u5F00":(Ht==null?void 0:Ht.public_status)==1?"\u53D6\u6D88\u516C\u5F00\u540E\uFF0C\u5176\u4ED6\u7528\u6237\u5C06\u4E0D\u53EF\u89C1\uFF0C\u540C\u65F6\u518D\u6B21\u516C\u5F00\u9700\u8981\u91CD\u65B0\u8FDB\u884C\u7533\u8BF7":"\u64A4\u9500\u7533\u8BF7\u516C\u5F00\u540E\uFF0C\u7533\u8BF7\u8BB0\u5F55\u5C06\u5220\u9664\uFF0C\u5982\u9700\u516C\u5F00\u8BF7\u518D\u6B21\u7533\u8BF7",onOk:()=>mi(void 0,null,function*(){let nr;switch(Ht==null?void 0:Ht.public_status){case 0:nr=(0,pe.To)(Ht==null?void 0:Ht.id);break;case 1:nr=(0,pe.a6)(Ht==null?void 0:Ht.id);break;case 2:nr=(0,pe.Dx)(Ht==null?void 0:Ht.id);break;default:return}nr.then(sn=>{(sn==null?void 0:sn.status)===0&&(Ee.ZP.success("\u64CD\u4F5C\u6210\u529F"),Jr())})})})}},(Ht==null?void 0:Ht.public_status)==0?"\u7533\u8BF7\u516C\u5F00":(Ht==null?void 0:Ht.public_status)==1?"\u53D6\u6D88\u516C\u5F00":"\u64A4\u9500\u7533\u8BF7\u516C\u5F00"),er.createElement(ke.Z,{menu:{items:[{label:er.createElement("div",null,"\u7F16\u8F91"),key:"4",onClick:()=>{dr(!0)}},{label:er.createElement("div",{onClick:()=>{de.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,content:"\u5220\u9664\u6570\u636E\u96C6\u4E2D\u7684\u6587\u4EF6\u4E0D\u4F1A\u5F71\u54CD\u5230\u5F15\u7528\u8BE5\u6570\u636E\u96C6\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4F46\u5220\u9664\u540E\u6570\u636E\u5C06\u4E0D\u53EF\u6062\u590D\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664",onOk(){return mi(this,null,function*(){(0,pe.pP)(Ht==null?void 0:Ht.id).then(nr=>{(nr==null?void 0:nr.status)==0&&(Ee.ZP.success("\u5220\u9664\u6210\u529F"),Ut.history.push("/dataset"))})})}})}},"\u5220\u9664"),key:"5"}]}},er.createElement("div",{className:me.more},er.createElement("i",{className:"iconfont icon-gengduo6 font12"})))):er.createElement("div",{className:Ht!=null&&Ht.current_user_is_collect?me.collectActiveStyle:me.collectStyle,onClick:()=>{let nr;Ht!=null&&Ht.current_user_is_collect?nr=(0,pe.R9)({container_id:Ht==null?void 0:Ht.id,container_type:"DataSet"}):nr=(0,pe.nW)({container_id:Ht==null?void 0:Ht.id,container_type:"DataSet"}),nr.then(sn=>{(sn==null?void 0:sn.status)===0&&Jr()})}},er.createElement("i",{className:"iconfont icon-shoucang4 font12"})," ",Ht==null?void 0:Ht.collect_count))),er.createElement("div",{className:me.content},er.createElement("div",{style:{display:"flex",alignItems:"center"}},er.createElement(Se.ZP.Group,{className:me.addTypeRadio,optionType:"button",options:[{label:"\u8BE6\u60C5",value:1},{label:"\u5B9E\u8DF5\u9879\u76EE",value:2},{label:"\u8BA8\u8BBA",value:3}],onChange:nr=>{var sn;zn((sn=nr==null?void 0:nr.target)==null?void 0:sn.value)},value:yn}),er.createElement("div",{className:me.addBtn,onClick:()=>{window.open(`/shixuns/new?dataSetId=${zt==null?void 0:zt.id}`)}},"\u521B\u5EFA\u5B9E\u8DF5\u9879\u76EE")),yn==1&&er.createElement(dt,{dataSetInfo:Ht,getInfo:Jr,key:qn,indexType:Vn}),yn==2&&er.createElement("div",null,er.createElement("div",{className:me.shixunTooltip},er.createElement("i",{className:"icon icon-tishi11 font12 mr10"}),"\u6E29\u99A8\u63D0\u793A\uFF1A\u4EC5\u5C55\u793A\u5F15\u7528\u8BE5\u6570\u636E\u96C6\u4E14\u516C\u5F00\u7684\u5B9E\u8DF5\u9879\u76EE"),er.createElement(xr.wb,{dataSource:un,right:23,col:4,precision:1,loading:!1,wrapWidth:1140,trackEventItems:["\u5B9E\u8DF5\u9879\u76EE","\u9996\u9875","\u5B9E\u8BAD\u5217\u8868\u67E5\u770B\u8BE6\u60C5"]}),fn>1&&er.createElement("div",{className:me.pageStyle},er.createElement("div",{className:Yn==1?me.pageUnCan:me.pageCan,style:{marginRight:"10px"},onClick:()=>{Yn>1&&ln(Yn-1)}},"\u4E0A\u4E00\u9875"),er.createElement("div",{className:Yn==fn?me.pageUnCan:me.pageCan,style:{marginLeft:"10px"},onClick:()=>{Yn<fn&&ln(Yn+1)}},"\u4E0B\u4E00\u9875"))),yn==3&&er.createElement(_r,{memoId:Ht==null?void 0:Ht.memo_id})))),er.createElement(qr.Z,{dataSetInfo:Ht,visible:Un,onClose:sr,onSuccess:rn}),er.createElement(de.default,{centered:!0,keyboard:!1,maskClosable:!1,destroyOnClose:!0,open:Rr,title:"\u6D4F\u89C8\u4FE1\u606F",width:"730px",onCancel:()=>{gn(!1)},footer:null},er.createElement("div",null,er.createElement(Ae.default,{dataSource:Fi,loading:Mi,className:"mt10 mb10",scroll:{y:47*6},pagination:{total:Qn||0,onChange:(nr,sn)=>{yr.page=nr,yr.limit=sn,br(Xr({},yr)),Ar()},current:yr==null?void 0:yr.page,pageSize:yr==null?void 0:yr.limit,showTotal:nr=>er.createElement(er.Fragment,null,"\u5171",er.createElement("span",{className:"ml5 mr5",style:{color:"#3061d0"}},nr),"\u6761\u6570\u636E")},columns:[{title:"\u67E5\u770B\u4EBA",align:"left",width:150,dataIndex:"real_name",ellipsis:!0,render:nr=>er.createElement("span",null,nr||"--")},{title:"\u5355\u4F4D",align:"left",width:260,ellipsis:!0,dataIndex:"school_name",render:nr=>er.createElement("span",null,nr||"--")},{title:"\u90E8\u95E8",align:"left",width:150,ellipsis:!0,dataIndex:"department_name",render:nr=>er.createElement("span",null,nr||"--")},{title:"\u67E5\u770B\u65F6\u95F4",dataIndex:"created_at",ellipsis:!0,render:nr=>er.createElement("span",{style:{color:"#666666"}},nr?je()(nr).format("YYYY-MM-DD"):"--")}]})))))};var Tr=(0,Ut.connect)(({polls:wr,loading:Er,user:kr,globalSetting:Hi})=>({polls:wr,globalSetting:Hi,user:kr,loading:Er.effects}))(ii)},57503:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return Ae}});var at=pt(59301),Ut=pt(71570),oe=pt(82326),He=pt(29787),Re=pt(6767),de={flex_box_center:"flex_box_center___OmLFa",flex_space_between:"flex_space_between___Pwqhp",flex_box_vertical_center:"flex_box_vertical_center___UJzms",flex_box_center_end:"flex_box_center_end___qMu25",flex_box_column:"flex_box_column___AimtA",selectList:"selectList___hGJUN",selectHeader:"selectHeader___HxdBZ",selectContent:"selectContent___oWjby",contentTitle:"contentTitle___xlVyW",contentTags:"contentTags___BGCLU",tagName:"tagName___MIGDL",tagNameActive:"tagNameActive___JCRev",activeStyle:"activeStyle___FvXnt",activeLabel:"activeLabel___RzW9T",activeValue:"activeValue___qxoch",activeItem:"activeItem___NfFjA",activeClose:"activeClose___Su7dS",activeSubmit:"activeSubmit___gjhQA"},ve=pt(3406),Ee=pt(59301),ke=(me,Pe,fe)=>new Promise((z,te)=>{var se=ce=>{try{le(fe.next(ce))}catch(pe){te(pe)}},ie=ce=>{try{le(fe.throw(ce))}catch(pe){te(pe)}},le=ce=>ce.done?z(ce.value):Promise.resolve(ce.value).then(se,ie);le((fe=fe.apply(me,Pe)).next())});const Se=({user:me,width:Pe,selectWidth:fe,tags:z,getDataSet:te,placeholder:se="\u5168\u90E8\u6807\u7B7E",isTagsValue:ie=!1})=>{const[le,ce]=(0,at.useState)([]),[pe,xe]=(0,at.useState)([]),[je,De]=(0,at.useState)(!1),Fe=(0,at.useRef)(null);(0,at.useEffect)(()=>{Te()},[]);const Te=()=>ke(void 0,null,function*(){De(!0),yield(0,ve.bj)({}).then(Be=>{(Be==null?void 0:Be.status)==0&&ce(Be==null?void 0:Be.data)}),De(!1)}),Me=z==null?void 0:z.map(Be=>Be.tag_name).join("\u3001");return Ee.createElement(oe.default,{onFocus:()=>{xe(z)},ref:Fe,style:{width:fe?fe+"px":300},placeholder:(z==null?void 0:z.length)>0?ie?Ee.createElement("span",{className:"c-grey-333"},Me):`\u5DF2\u9009\u4E2D${z==null?void 0:z.length}\u4E2A\u6807\u7B7E`:se,size:"large",dropdownStyle:{width:Pe+"px",zIndex:1e3},className:de.selectStyle,dropdownRender:()=>Ee.createElement("div",{className:de.selectList,style:{width:Pe+"px"}},Ee.createElement("div",{className:de.selectHeader},"\u8BF7\u9009\u62E91\uFF5E5\u4E2A\u6807\u7B7E"),Ee.createElement(He.Z,{spinning:je},Ee.createElement("div",{className:de.selectContent},le==null?void 0:le.map((Be,Ue)=>{var Ye;return Ee.createElement("aside",{key:Ue},Ee.createElement("div",{className:de.contentTitle,style:{marginTop:Ue>0?"20px":"0"}},Be==null?void 0:Be.tag_type_cn),Ee.createElement("div",{className:de.contentTags},(Ye=Be==null?void 0:Be.child)==null?void 0:Ye.map((Ve,Ze)=>{var ot;return Ee.createElement("div",{key:Ze,className:(ot=pe==null?void 0:pe.map(lt=>lt==null?void 0:lt.id))!=null&&ot.includes(Ve==null?void 0:Ve.id)?de.tagNameActive:de.tagName,onClick:()=>{var lt;(lt=pe==null?void 0:pe.map(ft=>ft==null?void 0:ft.id))!=null&<.includes(Ve==null?void 0:Ve.id)?xe(pe.filter(ft=>(ft==null?void 0:ft.id)!=(Ve==null?void 0:Ve.id))):(pe==null?void 0:pe.length)<5?xe([...pe,Ve]):Re.ZP.warning("\u6700\u591A\u53EF\u9009\u62E95\u4E2A\u6807\u7B7E")}},Ve==null?void 0:Ve.tag_name)})))}))),Ee.createElement("div",{className:de.activeStyle},Ee.createElement("div",{className:de.activeLabel},"\u5DF2\u9009\u6807\u7B7E:"),Ee.createElement("div",{className:de.activeValue,style:{width:Pe-120+"px"}},pe==null?void 0:pe.map((Be,Ue)=>Ee.createElement("div",{key:Ue,className:de.activeItem},Be==null?void 0:Be.tag_name,Ee.createElement("i",{className:"iconfont icon-guanbi11 ml5 mr5",style:{fontSize:"10px",cursor:"pointer"},onClick:()=>{xe(pe.filter(Ye=>(Ye==null?void 0:Ye.id)!==(Be==null?void 0:Be.id)))}}))))),Ee.createElement("div",{style:{display:"flex",marginBottom:"20px"}},Ee.createElement("div",{className:de.activeClose,onClick:Be=>{Be.stopPropagation(),te([...z]),xe([]),setTimeout(()=>{Fe.current&&Fe.current.blur()},10)}},"\u53D6\u6D88"),Ee.createElement("div",{className:de.activeSubmit,onClick:Be=>{Be.stopPropagation(),te([...pe]),xe([]),setTimeout(()=>{Fe.current&&Fe.current.blur()},10)}},"\u786E\u8BA4")))})};var Ae=(0,Ut.connect)(({user:me})=>({user:me}))(Se)},3406:function(Dn,jn,pt){"use strict";pt.d(jn,{A0:function(){return je},Ce:function(){return ie},Dx:function(){return me},Il:function(){return xe},R2:function(){return se},R9:function(){return z},Ru:function(){return te},SG:function(){return Fe},To:function(){return Ae},_S:function(){return Se},a6:function(){return Pe},bj:function(){return ke},iw:function(){return De},l5:function(){return pe},nW:function(){return fe},pP:function(){return ce},pi:function(){return le}});var at=pt(24092),Ut=Object.defineProperty,oe=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,de=(Te,Me,Be)=>Me in Te?Ut(Te,Me,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Te[Me]=Be,ve=(Te,Me)=>{for(var Be in Me||(Me={}))He.call(Me,Be)&&de(Te,Be,Me[Be]);if(oe)for(var Be of oe(Me))Re.call(Me,Be)&&de(Te,Be,Me[Be]);return Te},Ee=(Te,Me,Be)=>new Promise((Ue,Ye)=>{var Ve=lt=>{try{ot(Be.next(lt))}catch(ft){Ye(ft)}},Ze=lt=>{try{ot(Be.throw(lt))}catch(ft){Ye(ft)}},ot=lt=>lt.done?Ue(lt.value):Promise.resolve(lt.value).then(Ve,Ze);ot((Be=Be.apply(Te,Me)).next())});function ke(Te){return Ee(this,null,function*(){return(0,at.ZP)("/api/data_sets/tags.json",{method:"get",params:ve({},Te)})})}function Se(Te){return Ee(this,null,function*(){return(0,at.ZP)("/api/data_sets.json",{method:"get",params:ve({},Te)})})}function Ae(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/data_sets/${Te}/apply_public.json`,{method:"post"})})}function me(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/data_sets/${Te}/revoke_apply_public.json`,{method:"post"})})}function Pe(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/data_sets/${Te}/cancel_public.json`,{method:"post"})})}function fe(Te){return Ee(this,null,function*(){return(0,at.ZP)("/api/collections.json",{method:"post",body:ve({},Te)})})}function z(Te){return Ee(this,null,function*(){return(0,at.ZP)("/api/collections/cancel.json",{method:"delete",body:ve({},Te)})})}function te(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/data_sets/${Te}.json`,{method:"get"})})}function se(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/data_sets/${Te==null?void 0:Te.id}/edit_introduce.json`,{method:"put",body:ve({},Te)})})}function ie(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/data_sets/${Te==null?void 0:Te.id}/used_shixuns.json`,{method:"get",params:ve({},Te)})})}function le(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/shixuns/${Te}/data_sets_list.json`,{method:"get"})})}function ce(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/data_sets/${Te}/delete.json`,{method:"delete"})})}function pe(Te){return Ee(this,null,function*(){return(0,at.ZP)("/api/teach_group_shares.json",{method:"post",body:ve({},Te)})})}function xe(Te){return Ee(this,null,function*(){return(0,at.ZP)("/api/data_sets/single_destroy_files.json",{method:"delete",body:ve({},Te)})})}function je(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/data_sets/${Te==null?void 0:Te.id}/edit_file_info.json`,{method:"put",body:ve({},Te)})})}function De(Te){return Ee(this,null,function*(){return(0,at.ZP)("/api/visit_logs.json",{method:"get",params:ve({},Te)})})}function Fe(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/attachments/${Te==null?void 0:Te.id}/update_download.json`,{method:"get"})})}},49405:function(Dn,jn,pt){"use strict";pt.d(jn,{AL:function(){return pe},Iy:function(){return Ae},Qv:function(){return fe},ez:function(){return ce},jb:function(){return me}});var at=pt(32834),Ut=pt.n(at),oe=pt(11690),He=pt.n(oe);let Re=1;function de(Te,Me){const Be=Te.match(/^(\s+)(?:```)/);if(Be===null)return Me;const Ue=Be[1];return Me.split(`
|
|
`).map(Ye=>{const Ve=Ye.match(/^\s+/);if(Ve===null)return Ye;const[Ze]=Ve;return Ze.length>=Ue.length?Ye.slice(Ue.length):Ye}).join(`
|
|
`)}let ve=[],Ee=["<ul>"];const ke=new(Ut()).Renderer,Se=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ae(){ve.length=0,Ee=["<ul>"]}const me={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Pe(Te,Me,Be,Ue){if(Me>=Te.length||Te[Me].level<=Be)return Me;var Ye=Te[Me];Ue.push("<li><a href='#"+Re+Ye.anchor+"'>"+Ye.text+"</a>"),Me++;var Ve=[];return Me=Pe(Te,Me,Ye.level,Ve),Ve.length>0&&(Ue.push("<ul>"),Ve.forEach(function(Ze){Ue.push(Ze)}),Ue.push("</ul>")),Ue.push("</li>"),Me=Pe(Te,Me,Be,Ue),Me}function fe(){return Pe(ve,0,0,Ee),Ee.push("</ul>"),Ee.join("")}const z={heading(Te){const Me=Se.exec(Te);if(Re+=1,Me)return{type:"heading",raw:Me[0],depth:Me[1].length,text:Me[2]}},fences(Te){const Me=this.rules.block.fences.exec(Te);if(Me){const Be=Me[0];let Ue=de(Be,Me[3]||"");const Ye=Me[2]?Me[2].trim():Me[2];if(["latex","katex","math"].indexOf(Ye)>=0){const Ve=ie(),Ze=Ue;Ue=Ve,le[Ve]={type:"block",expression:Ze}}return{type:"code",raw:Be,lang:Ye,text:Ue}}}},te=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let se=0;const ie=()=>`__special_katext_id_${se++}__`;let le={};function ce(){return le}function pe(){se=0,le={}}function xe(Te){return Te=Te.replace(te,(Me,Be)=>{const Ue=ie();return le[Ue]={type:"inline",expression:Be},Ue}),Te}const je=ke.listitem;ke.listitem=function(Te){return je(xe(Te))};const De=ke.paragraph;ke.paragraph=function(Te){return De(xe(Te))};const Fe=ke.tablecell;ke.tablecell=function(Te,Me){return Fe(xe(Te),Me)},ke.code=function(Te,Me,Be){const Ue=(Me||"").match(/\S*/)[0];return Ue?["latex","katex","math"].indexOf(Ue)>=0?`<p class='editormd-tex'>${Te}</p>`:`<pre class="prettyprint linenums"><code class="language-${Me}">${Be?Te:(0,oe.escape)(Te,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(Be?Te:(0,oe.escape)(Te,!0))+"</code></pre>"},ke.heading=function(Te,Me,Be){let Ue=this.options.headerPrefix+Be.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ve.push({anchor:Ue,level:Me,text:Te}),"<h"+Me+' id="'+Re+Ue+'">'+Te+"</h"+Me+">"},Ut().setOptions({silent:!0,gfm:!0,pedantic:!1}),Ut().use({tokenizer:z,renderer:ke}),jn.ZP=Ut()},47257:function(Dn){(function(jn){(function(pt){if(1)Dn.exports=pt();else var at})(function(){var pt,at,Ut;return function(){function oe(He,Re,de){function ve(Se,Ae){if(!Re[Se]){if(!He[Se]){var me=void 0;if(!Ae&&me)return require(Se,!0);if(Ee)return Ee(Se,!0);var Pe=new Error("Cannot find module '"+Se+"'");throw Pe.code="MODULE_NOT_FOUND",Pe}var fe=Re[Se]={exports:{}};He[Se][0].call(fe.exports,function(z){var te=He[Se][1][z];return ve(te||z)},fe,fe.exports,oe,He,Re,de)}return Re[Se].exports}for(var Ee=void 0,ke=0;ke<de.length;ke++)ve(de[ke]);return ve}return oe}()({1:[function(oe,He,Re){"use strict";var de=oe("./browser/client");de.Buffer=oe("buffer").Buffer,de.urllib=oe("../shims/xhr"),de.version=oe("./browser/version").version,He.exports=de},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.slice.js");var ke=oe("assert"),Se=oe("../common/utils/checkBucketName"),Ae=Se.checkBucketName,me=Re;function Pe(z){return Array.isArray?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"}function fe(z){return z?Pe(z)?z:[z]:[]}me.useBucket=function(te){return Ae(te),this.options.bucket=te,this},me.setBucket=function(te){return Ae(te),this.options.bucket=te,this},me.getBucket=function(){return this.options.bucket},me.deleteBucket=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ce=this._bucketRequestParams("DELETE",ie,"",le),je.next=3,this.request(ce);case 3:if(pe=je.sent,!(pe.status===200||pe.status===204)){je.next=6;break}return je.abrupt("return",{res:pe.res});case 6:return je.next=8,this.requestError(pe);case 8:throw je.sent;case 9:case"end":return je.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.putBucketACL=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le,ce){var pe,xe;return ve.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return pe=this._bucketRequestParams("PUT",ie,"acl",ce),pe.headers={"x-oss-acl":le},pe.successStatuses=[200],De.next=5,this.request(pe);case 5:return xe=De.sent,De.abrupt("return",{bucket:xe.headers.location&&xe.headers.location.substring(1)||null,res:xe.res});case 7:case"end":return De.stop()}},se,this)}));function te(se,ie,le){return z.apply(this,arguments)}return te}(),me.getBucketACL=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ce=this._bucketRequestParams("GET",ie,"acl",le),ce.successStatuses=[200],ce.xmlResponse=!0,je.next=5,this.request(ce);case 5:return pe=je.sent,je.abrupt("return",{acl:pe.data.AccessControlList.Grant,owner:{id:pe.data.Owner.ID,displayName:pe.data.Owner.DisplayName},res:pe.res});case 7:case"end":return je.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.putBucketLogging=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le,ce){var pe,xe,je;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return pe=this._bucketRequestParams("PUT",ie,"logging",ce),xe=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<BucketLoggingStatus>
|
|
<LoggingEnabled>
|
|
<TargetBucket>`.concat(ie,`</TargetBucket>
|
|
`),le&&(xe+="<TargetPrefix>".concat(le,`</TargetPrefix>
|
|
`)),xe+=`</LoggingEnabled>
|
|
</BucketLoggingStatus>`,pe.content=xe,pe.mime="xml",pe.successStatuses=[200],Fe.next=9,this.request(pe);case 9:return je=Fe.sent,Fe.abrupt("return",{res:je.res});case 11:case"end":return Fe.stop()}},se,this)}));function te(se,ie,le){return z.apply(this,arguments)}return te}(),me.getBucketLogging=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe,xe;return ve.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return ce=this._bucketRequestParams("GET",ie,"logging",le),ce.successStatuses=[200],ce.xmlResponse=!0,De.next=5,this.request(ce);case 5:return pe=De.sent,xe=pe.data.LoggingEnabled,De.abrupt("return",{enable:!!xe,prefix:xe&&xe.TargetPrefix||null,res:pe.res});case 8:case"end":return De.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.deleteBucketLogging=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ce=this._bucketRequestParams("DELETE",ie,"logging",le),ce.successStatuses=[204,200],je.next=4,this.request(ce);case 4:return pe=je.sent,je.abrupt("return",{res:pe.res});case 6:case"end":return je.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.putBucketCORS=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le,ce){var pe,xe,je,De,Fe,Te,Me,Be,Ue,Ye;return ve.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:for(le=le||[],ke(le.length,"rules is required"),le.forEach(function(ot){ke(ot.allowedOrigin,"allowedOrigin is required"),ke(ot.allowedMethod,"allowedMethod is required")}),pe=this._bucketRequestParams("PUT",ie,"cors",ce),xe=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CORSConfiguration>`,je=function(lt){xe+="<AllowedOrigin>".concat(lt,"</AllowedOrigin>")},De=function(lt){xe+="<AllowedMethod>".concat(lt,"</AllowedMethod>")},Fe=function(lt){xe+="<AllowedHeader>".concat(lt,"</AllowedHeader>")},Te=function(lt){xe+="<ExposeHeader>".concat(lt,"</ExposeHeader>")},Me=0,Be=le.length;Me<Be;Me++)Ue=le[Me],xe+="<CORSRule>",fe(Ue.allowedOrigin).forEach(je),fe(Ue.allowedMethod).forEach(De),fe(Ue.allowedHeader).forEach(Fe),fe(Ue.exposeHeader).forEach(Te),Ue.maxAgeSeconds&&(xe+="<MaxAgeSeconds>".concat(Ue.maxAgeSeconds,"</MaxAgeSeconds>")),xe+="</CORSRule>";return xe+="</CORSConfiguration>",pe.content=xe,pe.mime="xml",pe.successStatuses=[200],Ze.next=16,this.request(pe);case 16:return Ye=Ze.sent,Ze.abrupt("return",{res:Ye.res});case 18:case"end":return Ze.stop()}},se,this)}));function te(se,ie,le){return z.apply(this,arguments)}return te}(),me.getBucketCORS=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe,xe,je;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return ce=this._bucketRequestParams("GET",ie,"cors",le),ce.successStatuses=[200],ce.xmlResponse=!0,Fe.next=5,this.request(ce);case 5:return pe=Fe.sent,xe=[],pe.data&&pe.data.CORSRule&&(je=pe.data.CORSRule,Pe(je)||(je=[je]),je.forEach(function(Te){var Me={};Object.keys(Te).forEach(function(Be){Me[Be.slice(0,1).toLowerCase()+Be.slice(1,Be.length)]=Te[Be]}),xe.push(Me)})),Fe.abrupt("return",{rules:xe,res:pe.res});case 9:case"end":return Fe.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.deleteBucketCORS=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ce=this._bucketRequestParams("DELETE",ie,"cors",le),ce.successStatuses=[204],je.next=4,this.request(ce);case 4:return pe=je.sent,je.abrupt("return",{res:pe.res});case 6:case"end":return je.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.putBucketReferer=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le,ce,pe){var xe,je,De,Fe;return ve.default.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(xe=this._bucketRequestParams("PUT",ie,"referer",pe),je=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<RefererConfiguration>
|
|
`,je+=" <AllowEmptyReferer>".concat(le?"true":"false",`</AllowEmptyReferer>
|
|
`),ce&&ce.length>0){for(je+=` <RefererList>
|
|
`,De=0;De<ce.length;De++)je+=" <Referer>".concat(ce[De],`</Referer>
|
|
`);je+=` </RefererList>
|
|
`}else je+=` <RefererList />
|
|
`;return je+="</RefererConfiguration>",xe.content=je,xe.mime="xml",xe.successStatuses=[200],Me.next=10,this.request(xe);case 10:return Fe=Me.sent,Me.abrupt("return",{res:Fe.res});case 12:case"end":return Me.stop()}},se,this)}));function te(se,ie,le,ce){return z.apply(this,arguments)}return te}(),me.getBucketReferer=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe,xe;return ve.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return ce=this._bucketRequestParams("GET",ie,"referer",le),ce.successStatuses=[200],ce.xmlResponse=!0,De.next=5,this.request(ce);case 5:return pe=De.sent,xe=pe.data.RefererList.Referer||null,xe&&(Pe(xe)||(xe=[xe])),De.abrupt("return",{allowEmpty:pe.data.AllowEmptyReferer==="true",referers:xe,res:pe.res});case 9:case"end":return De.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.deleteBucketReferer=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){return ve.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return pe.next=2,this.putBucketReferer(ie,!0,null,le);case 2:return pe.abrupt("return",pe.sent);case 3:case"end":return pe.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me._bucketRequestParams=function(te,se,ie,le){return{method:te,bucket:se,subres:ie,timeout:le&&le.timeout,ctx:le&&le.ctx}}},{"../common/utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,assert:82,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],3:[function(oe,He,Re){(function(de,ve){(function(){"use strict";var Ee=oe("@babel/runtime/helpers/interopRequireDefault"),ke=Ee(oe("@babel/runtime/regenerator")),Se=Ee(oe("@babel/runtime/helpers/asyncToGenerator"));oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.symbol.js"),oe("core-js/modules/es.symbol.description.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.to-string.js");var Ae=oe("debug")("ali-oss"),me=oe("xml2js"),Pe=oe("agentkeepalive"),fe=oe("merge-descriptors"),z=oe("platform"),te=oe("utility"),se=oe("urllib"),ie=oe("./version"),le=oe("bowser"),ce=oe("../common/signUtils"),pe=oe("../common/client/initOptions"),xe=oe("../common/utils/createRequest"),je=xe.createRequest,De=oe("../common/utils/encoder"),Fe=De.encoder,Te=oe("../common/client/getReqUrl"),Me=Te.getReqUrl,Be=oe("../common/utils/setSTSToken"),Ue=Be.setSTSToken,Ye=oe("../common/utils/retry"),Ve=Ye.retry,Ze=oe("../common/utils/isFunction"),ot=Ze.isFunction,lt=new Pe;function ft(){var bt=z.name,ct=z.version;bt&&bt.toLowerCase&&bt.toLowerCase()==="ie"&&ct.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function St(){return location&&location.protocol==="https:"}function qe(bt,ct){if(ft(),!(this instanceof qe))return new qe(bt,ct);bt&&bt.inited?this.options=bt:this.options=qe.initOptions(bt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=se,this.agent=this.options.agent||lt),this.ctx=ct,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}He.exports=qe,qe.initOptions=function(ct){ct.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var xt=Object.assign({secure:St(),useFetch:!1},ct);return pe(xt)};var rt=qe.prototype;rt.debug=Ae,fe(rt,oe("./object")),fe(rt,oe("./bucket")),fe(rt,oe("../common/bucket/getBucketWebsite")),fe(rt,oe("../common/bucket/putBucketWebsite")),fe(rt,oe("../common/bucket/deleteBucketWebsite")),fe(rt,oe("../common/bucket/getBucketLifecycle")),fe(rt,oe("../common/bucket/putBucketLifecycle")),fe(rt,oe("../common/bucket/deleteBucketLifecycle")),fe(rt,oe("../common/bucket/putBucketVersioning")),fe(rt,oe("../common/bucket/getBucketVersioning")),fe(rt,oe("../common/bucket/getBucketInventory")),fe(rt,oe("../common/bucket/deleteBucketInventory")),fe(rt,oe("../common/bucket/listBucketInventory")),fe(rt,oe("../common/bucket/putBucketInventory")),fe(rt,oe("../common/bucket/abortBucketWorm")),fe(rt,oe("../common/bucket/completeBucketWorm")),fe(rt,oe("../common/bucket/extendBucketWorm")),fe(rt,oe("../common/bucket/getBucketWorm")),fe(rt,oe("../common/bucket/initiateBucketWorm")),fe(rt,oe("./managed-upload")),fe(rt,oe("../common/multipart-copy")),fe(rt,oe("../common/multipart")),fe(rt,oe("../common/parallel")),rt.signature=function(ct){return this.debug("authorization stringToSign: %s",ct,"info"),ce.computeSignature(this.options.accessKeySecret,ct,this.options.headerEncoding)},rt._getReqUrl=Me,rt.authorization=function(ct,xt,dt,Mt){var yt=ce.buildCanonicalString(ct.toUpperCase(),xt,{headers:Mt,parameters:dt});return ce.authorization(this.options.accessKeyId,this.options.accessKeySecret,yt,this.options.headerEncoding)},rt.request=function(){var bt=(0,Se.default)(ke.default.mark(function ct(xt){var dt=this;return ke.default.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:if(!this.options.retryMax){yt.next=6;break}return yt.next=3,Ve(wt.bind(this),this.options.retryMax,{errorHandler:function(mt){var vt=function(We){if(xt.stream)return!1;var we=[-1,-2].includes(We.status),Ne=dt.options.requestErrorRetryHandle||function(){return!0};return we&&Ne(We)};return!!vt(mt)}})(xt);case 3:return yt.abrupt("return",yt.sent);case 6:return yt.abrupt("return",wt.call(this,xt));case 7:case"end":return yt.stop()}},ct,this)}));return function(ct){return bt.apply(this,arguments)}}();function wt(bt){return Ct.apply(this,arguments)}function Ct(){return Ct=(0,Se.default)(ke.default.mark(function bt(ct){var xt,dt,Mt,yt,Dt,mt;return ke.default.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:if(!(this.options.stsToken&&ot(this.options.refreshSTSToken))){et.next=3;break}return et.next=3,Ue.call(this);case 3:return xt=je.call(this,ct),this.options.useFetch||(xt.params.mode="disable-fetch"),yt=!!ct.stream,et.prev=6,et.next=9,this.urllib.request(xt.url,xt.params);case 9:dt=et.sent,this.debug("response %s %s, got %s, headers: %j",ct.method,xt.url,dt.status,dt.headers,"info"),et.next=16;break;case 13:et.prev=13,et.t0=et.catch(6),Mt=et.t0;case 16:if(!(dt&&ct.successStatuses&&ct.successStatuses.indexOf(dt.status)===-1)){et.next=28;break}return et.next=19,this.requestError(dt);case 19:if(Dt=et.sent,!(Dt.code==="RequestTimeTooSkewed"&&!yt)){et.next=25;break}return this.options.amendTimeSkewed=+new Date(Dt.serverTime)-new Date,et.next=24,this.request(ct);case 24:return et.abrupt("return",et.sent);case 25:Dt.params=ct,et.next=32;break;case 28:if(!Mt){et.next=32;break}return et.next=31,this.requestError(Mt);case 31:Dt=et.sent;case 32:if(!Dt){et.next=34;break}throw Dt;case 34:if(!ct.xmlResponse){et.next=39;break}return et.next=37,this.parseXML(dt.data);case 37:mt=et.sent,dt.data=mt;case 39:return et.abrupt("return",dt);case 40:case"end":return et.stop()}},bt,this,[[6,13]])})),Ct.apply(this,arguments)}rt._getResource=function(ct){var xt="/";return ct.bucket&&(xt+="".concat(ct.bucket,"/")),ct.object&&(xt+=Fe(ct.object,this.options.headerEncoding)),xt},rt._escape=function(ct){return te.encodeURIComponent(ct).replace(/%2F/g,"/")},rt._getUserAgent=function(){var ct=ve&&ve.browser?"js":"nodejs",xt="aliyun-sdk-".concat(ct,"/").concat(ie.version),dt=z.description;return!dt&&ve&&(dt="Node.js ".concat(ve.version.slice(1)," on ").concat(ve.platform," ").concat(ve.arch)),this._checkUserAgent("".concat(xt," ").concat(dt))},rt._checkUserAgent=function(ct){var xt=ct.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return xt},rt.checkBrowserAndVersion=function(ct,xt){return le.name===ct&&le.version.split(".")[0]===xt},rt.parseXML=function(ct){return new Promise(function(xt,dt){de.isBuffer(ct)&&(ct=ct.toString()),me.parseString(ct,{explicitRoot:!1,explicitArray:!1},function(Mt,yt){Mt?dt(Mt):xt(yt)})})},rt.requestError=function(){var bt=(0,Se.default)(ke.default.mark(function xt(dt){var Mt,yt,Dt,mt;return ke.default.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:if(Mt=null,!(!dt.data||!dt.data.length)){et.next=5;break}dt.status===-1||dt.status===-2?(Mt=new Error(dt.message),Mt.name=dt.name,Mt.status=dt.status,Mt.code=dt.name):(dt.status===404?(Mt=new Error("Object not exists"),Mt.name="NoSuchKeyError",Mt.status=404,Mt.code="NoSuchKey"):dt.status===412?(Mt=new Error("Pre condition failed"),Mt.name="PreconditionFailedError",Mt.status=412,Mt.code="PreconditionFailed"):(Mt=new Error("Unknow error, status: ".concat(dt.status)),Mt.name="UnknownError",Mt.status=dt.status),Mt.requestId=dt.headers["x-oss-request-id"],Mt.host=""),et.next=32;break;case 5:return yt=String(dt.data),this.debug("request response error data: %s",yt,"error"),et.prev=7,et.next=10,this.parseXML(yt);case 10:if(et.t0=et.sent,et.t0){et.next=13;break}et.t0={};case 13:Dt=et.t0,et.next=23;break;case 16:return et.prev=16,et.t1=et.catch(7),this.debug(yt,"error"),et.t1.message+=`
|
|
raw xml: `.concat(yt),et.t1.status=dt.status,et.t1.requestId=dt.headers["x-oss-request-id"],et.abrupt("return",et.t1);case 23:mt=Dt.Message||"unknow request error, status: ".concat(dt.status),Dt.Condition&&(mt+=" (condition: ".concat(Dt.Condition,")")),Mt=new Error(mt),Mt.name=Dt.Code?"".concat(Dt.Code,"Error"):"UnknownError",Mt.status=dt.status,Mt.code=Dt.Code,Mt.requestId=Dt.RequestId,Mt.hostId=Dt.HostId,Mt.serverTime=Dt.ServerTime;case 32:return this.debug("generate error %j",Mt,"error"),et.abrupt("return",Mt);case 34:case"end":return et.stop()}},xt,this,[[7,16]])}));function ct(xt){return bt.apply(this,arguments)}return ct}()}).call(this)}).call(this,{isBuffer:oe("../../node_modules/is-buffer/index.js")},oe("_process"))},{"../../node_modules/is-buffer/index.js":366,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":49,"../common/signUtils":50,"../common/utils/createRequest":56,"../common/utils/encoder":59,"../common/utils/isFunction":68,"../common/utils/retry":74,"../common/utils/setSTSToken":76,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,agentkeepalive:81,bowser:88,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.split.js":307,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.js":313,debug:465,"merge-descriptors":372,platform:379,urllib:475,utility:474,xml2js:426}],4:[function(oe,He,Re){(function(de){(function(){"use strict";var ve=oe("@babel/runtime/helpers/interopRequireDefault"),Ee=ve(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.typed-array.uint8-array.js"),oe("core-js/modules/es.typed-array.copy-within.js"),oe("core-js/modules/es.typed-array.every.js"),oe("core-js/modules/es.typed-array.fill.js"),oe("core-js/modules/es.typed-array.filter.js"),oe("core-js/modules/es.typed-array.find.js"),oe("core-js/modules/es.typed-array.find-index.js"),oe("core-js/modules/es.typed-array.for-each.js"),oe("core-js/modules/es.typed-array.includes.js"),oe("core-js/modules/es.typed-array.index-of.js"),oe("core-js/modules/es.typed-array.iterator.js"),oe("core-js/modules/es.typed-array.join.js"),oe("core-js/modules/es.typed-array.last-index-of.js"),oe("core-js/modules/es.typed-array.map.js"),oe("core-js/modules/es.typed-array.reduce.js"),oe("core-js/modules/es.typed-array.reduce-right.js"),oe("core-js/modules/es.typed-array.reverse.js"),oe("core-js/modules/es.typed-array.set.js"),oe("core-js/modules/es.typed-array.slice.js"),oe("core-js/modules/es.typed-array.some.js"),oe("core-js/modules/es.typed-array.sort.js"),oe("core-js/modules/es.typed-array.subarray.js"),oe("core-js/modules/es.typed-array.to-locale-string.js"),oe("core-js/modules/es.typed-array.to-string.js");var ke=ve(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("util"),Ae=oe("path"),me=oe("mime"),Pe=oe("copy-to"),fe=oe("../common/utils/isBlob"),z=fe.isBlob,te=oe("../common/utils/isFile"),se=te.isFile,ie=oe("../common/utils/isBuffer"),le=ie.isBuffer,ce=Re;ce.multipartUpload=function(){var Fe=(0,ke.default)(Ee.default.mark(function Me(Be,Ue){var Ye,Ve,Ze,ot,lt,ft,St,qe,rt,wt=arguments;return Ee.default.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(Ye=wt.length>2&&wt[2]!==void 0?wt[2]:{},this.resetCancelFlag(),Ye.disabledMD5=Ye.disabledMD5===void 0?!0:!!Ye.disabledMD5,!(Ye.checkpoint&&Ye.checkpoint.uploadId)){bt.next=8;break}return Ue&&se(Ue)&&(Ye.checkpoint.file=Ue),bt.next=7,this._resumeMultipart(Ye.checkpoint,Ye);case 7:return bt.abrupt("return",bt.sent);case 8:return Ve=102400,Ye.mime||(se(Ue)?Ye.mime=me.getType(Ae.extname(Ue.name)):z(Ue)?Ye.mime=Ue.type:le(Ue)?Ye.mime="":Ye.mime=me.getType(Ae.extname(Ue))),Ye.headers=Ye.headers||{},this._convertMetaToHeaders(Ye.meta,Ye.headers),bt.next=14,this._getFileSize(Ue);case 14:if(Ze=bt.sent,!(Ze<Ve)){bt.next=26;break}return Ye.contentLength=Ze,bt.next=19,this.put(Be,Ue,Ye);case 19:if(ot=bt.sent,!(Ye&&Ye.progress)){bt.next=23;break}return bt.next=23,Ye.progress(1);case 23:return lt={res:ot.res,bucket:this.options.bucket,name:Be,etag:ot.res.headers.etag},(Ye.headers&&Ye.headers["x-oss-callback"]||Ye.callback)&&(lt.data=ot.data),bt.abrupt("return",lt);case 26:if(!(Ye.partSize&&parseInt(Ye.partSize,10)!==Ye.partSize)){bt.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Ye.partSize&&Ye.partSize<Ve)){bt.next=30;break}throw new Error("partSize must not be smaller than ".concat(Ve));case 30:return bt.next=32,this.initMultipartUpload(Be,Ye);case 32:if(ft=bt.sent,St=ft.uploadId,qe=this._getPartSize(Ze,Ye.partSize),rt={file:Ue,name:Be,fileSize:Ze,partSize:qe,uploadId:St,doneParts:[]},!(Ye&&Ye.progress)){bt.next=39;break}return bt.next=39,Ye.progress(0,rt,ft.res);case 39:return bt.next=41,this._resumeMultipart(rt,Ye);case 41:return bt.abrupt("return",bt.sent);case 42:case"end":return bt.stop()}},Me,this)}));function Te(Me,Be){return Fe.apply(this,arguments)}return Te}(),ce._resumeMultipart=function(){var Fe=(0,ke.default)(Ee.default.mark(function Me(Be,Ue){var Ye,Ve,Ze,ot,lt,ft,St,qe,rt,wt,Ct,bt,ct,xt,dt,Mt,yt,Dt,mt;return Ee.default.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:if(Ye=this,!this.isCancel()){et.next=3;break}throw this._makeCancelEvent();case 3:return Ve=Be.file,Ze=Be.fileSize,ot=Be.partSize,lt=Be.uploadId,ft=Be.doneParts,St=Be.name,qe=[],ft.length>0&&Pe(ft).to(qe),rt=this._divideParts(Ze,ot),wt=rt.length,Ct=!1,bt=function(we,Ne){return new Promise(function(){var Xe=(0,ke.default)(Ee.default.mark(function nt(Ie,_e){var Ge,tt,ht,ut,Ot;return Ee.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(Ft.prev=0,we.isCancel()){Ft.next=29;break}return Ge=rt[Ne-1],Ft.next=5,we._createBuffer(Ve,Ge.start,Ge.end);case 5:return tt=Ft.sent,ht={content:tt,size:Ge.end-Ge.start},Ft.prev=7,Ft.next=10,we._uploadPart(St,lt,Ne,ht,Ue);case 10:ut=Ft.sent,Ft.next=18;break;case 13:if(Ft.prev=13,Ft.t0=Ft.catch(7),Ft.t0.status!==404){Ft.next=17;break}throw we._makeAbortEvent();case 17:throw Ft.t0;case 18:if(!(!we.isCancel()&&!Ct)){Ft.next=26;break}if(Be.doneParts.push({number:Ne,etag:ut.res.headers.etag}),!Ue.progress){Ft.next=23;break}return Ft.next=23,Ue.progress(ft.length/(wt+1),Be,ut.res);case 23:Ie({number:Ne,etag:ut.res.headers.etag}),Ft.next=27;break;case 26:Ie();case 27:Ft.next=30;break;case 29:Ie();case 30:Ft.next=41;break;case 32:Ft.prev=32,Ft.t1=Ft.catch(0),Ot=new Error,Ot.name=Ft.t1.name,Ot.message=Ft.t1.message,Ot.stack=Ft.t1.stack,Ot.partNum=Ne,Pe(Ft.t1).to(Ot),_e(Ot);case 41:case"end":return Ft.stop()}},nt,null,[[0,32],[7,13]])}));return function(nt,Ie){return Xe.apply(this,arguments)}}())},ct=Array.from(new Array(wt),function(We,we){return we+1}),xt=qe.map(function(We){return We.number}),dt=ct.filter(function(We){return xt.indexOf(We)<0}),Mt=5,yt=Ue.parallel||Mt,et.next=17,this._parallel(dt,yt,function(We){return new Promise(function(we,Ne){bt(Ye,We).then(function(Xe){Xe&&qe.push(Xe),we()}).catch(function(Xe){Ne(Xe)})})});case 17:if(Dt=et.sent,Ct=!0,mt=Dt.find(function(We){return We.name==="abort"}),!mt){et.next=22;break}throw mt;case 22:if(!this.isCancel()){et.next=25;break}throw bt=null,this._makeCancelEvent();case 25:if(!(Dt&&Dt.length>0)){et.next=28;break}throw Dt[0].message="Failed to upload some parts with error: ".concat(Dt[0].toString()," part_num: ").concat(Dt[0].partNum),Dt[0];case 28:return et.next=30,this.completeMultipartUpload(St,lt,qe,Ue);case 30:return et.abrupt("return",et.sent);case 31:case"end":return et.stop()}},Me,this)}));function Te(Me,Be){return Fe.apply(this,arguments)}return Te}(),ce._getFileSize=function(){var Fe=(0,ke.default)(Ee.default.mark(function Me(Be){return Ee.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(!le(Be)){Ye.next=4;break}return Ye.abrupt("return",Be.length);case 4:if(!(z(Be)||se(Be))){Ye.next=6;break}return Ye.abrupt("return",Be.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return Ye.stop()}},Me)}));function Te(Me){return Fe.apply(this,arguments)}return Te}();var pe=oe("stream"),xe=pe.Readable;function je(Fe,Te){if(!(this instanceof je))return new je(Fe,Te);xe.call(this,Te),this.file=Fe,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}Se.inherits(je,xe),je.prototype.readFileAndPush=function(Te){if(this.fileBuffer)for(var Me=!0;Me&&this.fileBuffer&&this.start<this.fileBuffer.length;){var Be=this.start,Ue=Be+Te;Ue=Ue>this.fileBuffer.length?this.fileBuffer.length:Ue,this.start=Ue,Me=this.push(this.fileBuffer.slice(Be,Ue))}},je.prototype._read=function(Te){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var Me=16*1024;Te=Te||Me;var Be=this;this.reader.onload=function(Ye){Be.fileBuffer=de.from(new Uint8Array(Ye.target.result)),Be.file=null,Be.readFileAndPush(Te)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(Te)};function De(Fe){return Fe.arrayBuffer?Fe.arrayBuffer():new Promise(function(Te,Me){var Be=new FileReader;Be.onload=function(Ue){Te(Ue.target.result)},Be.onerror=function(Ue){Me(Ue)},Be.readAsArrayBuffer(Fe)})}ce._createBuffer=function(){var Fe=(0,ke.default)(Ee.default.mark(function Me(Be,Ue,Ye){var Ve,Ze;return Ee.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:if(!(z(Be)||se(Be))){lt.next=8;break}return Ve=Be.slice(Ue,Ye),lt.next=4,De(Ve);case 4:return Ze=lt.sent,lt.abrupt("return",de.from(Ze));case 8:if(!le(Be)){lt.next=12;break}return lt.abrupt("return",Be.subarray(Ue,Ye));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return lt.stop()}},Me)}));function Te(Me,Be,Ue){return Fe.apply(this,arguments)}return Te}(),ce._getPartSize=function(Te,Me){var Be=1e4,Ue=1*1024*1024;Me||(Me=Ue);var Ye=Math.ceil(Te/Be);return Me<Ye&&(Me=Ye,console.warn("partSize has been set to ".concat(Me,", because the partSize you provided causes partNumber to be greater than 10,000"))),Me},ce._divideParts=function(Te,Me){for(var Be=Math.ceil(Te/Me),Ue=[],Ye=0;Ye<Be;Ye++){var Ve=Me*Ye,Ze=Math.min(Ve+Me,Te);Ue.push({start:Ve,end:Ze})}return Ue}}).call(this)}).call(this,oe("buffer").Buffer)},{"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,buffer:90,"copy-to":94,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,mime:374,path:378,stream:398,util:419}],5:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.number.constructor.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.promise.js");var ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("fs"),Se=oe("copy-to"),Ae=oe("path"),me=oe("mime"),Pe=oe("../common/callback"),fe=oe("merge-descriptors"),z=oe("../common/utils/isBlob"),te=z.isBlob,se=oe("../common/utils/isFile"),ie=se.isFile,le=oe("../common/utils/isBuffer"),ce=le.isBuffer,pe=oe("../common/utils/obj2xml"),xe=pe.obj2xml,je=Re;je.append=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,Be,Ue){var Ye;return ve.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ue=Ue||{},Ue.position===void 0&&(Ue.position="0"),Ue.subres={append:"",position:Ue.position},Ue.method="POST",Ze.next=6,this.put(Me,Be,Ue);case 6:return Ye=Ze.sent,Ye.nextAppendPosition=Ye.res.headers["x-oss-next-append-position"],Ze.abrupt("return",Ye);case 9:case"end":return Ze.stop()}},Te,this)}));function Fe(Te,Me,Be){return De.apply(this,arguments)}return Fe}(),je.put=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,Be,Ue){var Ye,Ve,Ze,ot,lt;return ve.default.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(Ue=Ue||{},Ue.disabledMD5=Ue.disabledMD5===void 0?!0:!!Ue.disabledMD5,Ue.headers=Ue.headers||{},Me=this._objectName(Me),!ce(Be)){St.next=8;break}Ye=Be,St.next=19;break;case 8:if(!(te(Be)||ie(Be))){St.next=18;break}return Ue.mime||(ie(Be)?Ue.mime=me.getType(Ae.extname(Be.name)):Ue.mime=Be.type),St.next=12,this._createBuffer(Be,0,Be.size);case 12:return Ye=St.sent,St.next=15,this._getFileSize(Be);case 15:Ue.contentLength=St.sent,St.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(Ue.meta,Ue.headers),Ve=Ue.method||"PUT",Ze=this._objectRequestParams(Ve,Me,Ue),Pe.encodeCallback(Ze,Ue),Ze.mime=Ue.mime,Ze.disabledMD5=Ue.disabledMD5,Ze.content=Ye,Ze.successStatuses=[200],St.next=29,this.request(Ze);case 29:return ot=St.sent,lt={name:Me,url:this._objectUrl(Me),res:ot.res},Ze.headers&&Ze.headers["x-oss-callback"]&&(lt.data=JSON.parse(ot.data.toString())),St.abrupt("return",lt);case 33:case"end":return St.stop()}},Te,this)}));function Fe(Te,Me,Be){return De.apply(this,arguments)}return Fe}(),je.putStream=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,Be,Ue){var Ye,Ve,Ze,ot;return ve.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return Ue=Ue||{},Ue.headers=Ue.headers||{},Me=this._objectName(Me),Ue.contentLength?Ue.headers["Content-Length"]=Ue.contentLength:Ue.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(Ue.meta,Ue.headers),Ye=Ue.method||"PUT",Ve=this._objectRequestParams(Ye,Me,Ue),Pe.encodeCallback(Ve,Ue),Ve.mime=Ue.mime,Ve.stream=Be,Ve.successStatuses=[200],ft.next=13,this.request(Ve);case 13:return Ze=ft.sent,ot={name:Me,url:this._objectUrl(Me),res:Ze.res},Ve.headers&&Ve.headers["x-oss-callback"]&&(ot.data=JSON.parse(Ze.data.toString())),ft.abrupt("return",ot);case 17:case"end":return ft.stop()}},Te,this)}));function Fe(Te,Me,Be){return De.apply(this,arguments)}return Fe}(),fe(je,oe("../common/object/copyObject")),fe(je,oe("../common/object/getObjectTagging")),fe(je,oe("../common/object/putObjectTagging")),fe(je,oe("../common/object/deleteObjectTagging")),fe(je,oe("../common/image")),fe(je,oe("../common/object/getBucketVersions")),fe(je,oe("../common/object/getACL")),fe(je,oe("../common/object/putACL")),fe(je,oe("../common/object/head")),fe(je,oe("../common/object/delete")),fe(je,oe("../common/object/get")),fe(je,oe("../common/object/putSymlink")),fe(je,oe("../common/object/getSymlink")),fe(je,oe("../common/object/deleteMulti")),fe(je,oe("../common/object/getObjectMeta")),fe(je,oe("../common/object/getObjectUrl")),fe(je,oe("../common/object/generateObjectUrl")),fe(je,oe("../common/object/signatureUrl")),fe(je,oe("../common/object/asyncSignatureUrl")),je.putMeta=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,Be,Ue){var Ye;return ve.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ze.next=2,this.copy(Me,Me,{meta:Be||{},timeout:Ue&&Ue.timeout,ctx:Ue&&Ue.ctx});case 2:return Ye=Ze.sent,Ze.abrupt("return",Ye);case 4:case"end":return Ze.stop()}},Te,this)}));function Fe(Te,Me,Be){return De.apply(this,arguments)}return Fe}(),je.list=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,Be){var Ue,Ye,Ve,Ze,ot;return ve.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return Ue=this._objectRequestParams("GET","",Be),Ue.query=Me,Ue.xmlResponse=!0,Ue.successStatuses=[200],ft.next=6,this.request(Ue);case 6:return Ye=ft.sent,Ve=Ye.data.Contents||[],Ze=this,Ve&&(Array.isArray(Ve)||(Ve=[Ve]),Ve=Ve.map(function(St){return{name:St.Key,url:Ze._objectUrl(St.Key),lastModified:St.LastModified,etag:St.ETag,type:St.Type,size:Number(St.Size),storageClass:St.StorageClass,owner:{id:St.Owner.ID,displayName:St.Owner.DisplayName}}})),ot=Ye.data.CommonPrefixes||null,ot&&(Array.isArray(ot)||(ot=[ot]),ot=ot.map(function(St){return St.Prefix})),ft.abrupt("return",{res:Ye.res,objects:Ve,prefixes:ot,nextMarker:Ye.data.NextMarker||null,isTruncated:Ye.data.IsTruncated==="true"});case 13:case"end":return ft.stop()}},Te,this)}));function Fe(Te,Me){return De.apply(this,arguments)}return Fe}(),je.listV2=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me){var Be,Ue,Ye,Ve,Ze,ot,lt,ft=arguments;return ve.default.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return Be=ft.length>1&&ft[1]!==void 0?ft[1]:{},Ue=Me["continuation-token"]||Me.continuationToken,Ue&&(Be.subres=Object.assign({"continuation-token":Ue},Be.subres)),Ye=this._objectRequestParams("GET","",Be),Ye.query=Object.assign({"list-type":2},Me),delete Ye.query["continuation-token"],delete Ye.query.continuationToken,Ye.xmlResponse=!0,Ye.successStatuses=[200],qe.next=11,this.request(Ye);case 11:return Ve=qe.sent,Ze=Ve.data.Contents||[],ot=this,Ze&&(Array.isArray(Ze)||(Ze=[Ze]),Ze=Ze.map(function(rt){var wt=null;return rt.Owner&&(wt={id:rt.Owner.ID,displayName:rt.Owner.DisplayName}),{name:rt.Key,url:ot._objectUrl(rt.Key),lastModified:rt.LastModified,etag:rt.ETag,type:rt.Type,size:Number(rt.Size),storageClass:rt.StorageClass,owner:wt}})),lt=Ve.data.CommonPrefixes||null,lt&&(Array.isArray(lt)||(lt=[lt]),lt=lt.map(function(rt){return rt.Prefix})),qe.abrupt("return",{res:Ve.res,objects:Ze,prefixes:lt,isTruncated:Ve.data.IsTruncated==="true",keyCount:+Ve.data.KeyCount,continuationToken:Ve.data.ContinuationToken||null,nextContinuationToken:Ve.data.NextContinuationToken||null});case 18:case"end":return qe.stop()}},Te,this)}));function Fe(Te){return De.apply(this,arguments)}return Fe}(),je.restore=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me){var Be,Ue,Ye,Ve,Ze=arguments;return ve.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return Be=Ze.length>1&&Ze[1]!==void 0?Ze[1]:{type:"Archive"},Be=Be||{},Be.subres=Object.assign({restore:""},Be.subres),Be.versionId&&(Be.subres.versionId=Be.versionId),Ue=this._objectRequestParams("POST",Me,Be),Be.type==="ColdArchive"&&(Ye={RestoreRequest:{Days:Be.Days?Be.Days:2,JobParameters:{Tier:Be.JobParameters?Be.JobParameters:"Standard"}}},Ue.content=xe(Ye,{headers:!0}),Ue.mime="xml"),Ue.successStatuses=[202],lt.next=9,this.request(Ue);case 9:return Ve=lt.sent,lt.abrupt("return",{res:Ve.res});case 11:case"end":return lt.stop()}},Te,this)}));function Fe(Te){return De.apply(this,arguments)}return Fe}(),je._objectUrl=function(Fe){return this._getReqUrl({bucket:this.options.bucket,object:Fe})},je._objectRequestParams=function(Fe,Te,Me){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");Me=Me||{},Te=this._objectName(Te);var Be={object:Te,bucket:this.options.bucket,method:Fe,subres:Me&&Me.subres,timeout:Me&&Me.timeout,ctx:Me&&Me.ctx};return Me.headers&&(Be.headers={},Se(Me.headers).to(Be.headers)),Be},je._objectName=function(Fe){return Fe.replace(/^\/+/,"")},je._convertMetaToHeaders=function(Fe,Te){Fe&&Object.keys(Fe).forEach(function(Me){Te["x-oss-meta-".concat(Me)]=Fe[Me]})},je._deleteFileSafe=function(Fe){var Te=this;return new Promise(function(Me){ke.exists(Fe,function(Be){Be?ke.unlink(Fe,function(Ue){Ue&&Te.debug("unlink %j error: %s",Fe,Ue,"error"),Me()}):Me()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(oe,He,Re){"use strict";Re.version="6.18.1"},{}],7:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.abortBucketWorm=void 0;var ke=oe("../utils/checkBucketName");function Se(me,Pe){return Ae.apply(this,arguments)}function Ae(){return Ae=(0,Ee.default)(ve.default.mark(function me(Pe,fe){var z,te;return ve.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return ke.checkBucketName(Pe),z=this._bucketRequestParams("DELETE",Pe,"worm",fe),ie.next=4,this.request(z);case 4:return te=ie.sent,ie.abrupt("return",{res:te.res,status:te.status});case 6:case"end":return ie.stop()}},me,this)})),Ae.apply(this,arguments)}Re.abortBucketWorm=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.completeBucketWorm=void 0;var ke=oe("../utils/checkBucketName");function Se(me,Pe,fe){return Ae.apply(this,arguments)}function Ae(){return Ae=(0,Ee.default)(ve.default.mark(function me(Pe,fe,z){var te,se;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return ke.checkBucketName(Pe),te=this._bucketRequestParams("POST",Pe,{wormId:fe},z),le.next=4,this.request(te);case 4:return se=le.sent,le.abrupt("return",{res:se.res,status:se.status});case 6:case"end":return le.stop()}},me,this)})),Ae.apply(this,arguments)}Re.completeBucketWorm=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.deleteBucketInventory=void 0;var ke=oe("../utils/checkBucketName");function Se(me,Pe){return Ae.apply(this,arguments)}function Ae(){return Ae=(0,Ee.default)(ve.default.mark(function me(Pe,fe){var z,te,se,ie,le=arguments;return ve.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return z=le.length>2&&le[2]!==void 0?le[2]:{},te=Object.assign({inventory:"",inventoryId:fe},z.subres),ke.checkBucketName(Pe),se=this._bucketRequestParams("DELETE",Pe,te,z),se.successStatuses=[204],pe.next=7,this.request(se);case 7:return ie=pe.sent,pe.abrupt("return",{status:ie.status,res:ie.res});case 9:case"end":return pe.stop()}},me,this)})),Ae.apply(this,arguments)}Re.deleteBucketInventory=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],10:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=Re;Ae.deleteBucketLifecycle=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te){var se,ie;return ve.default.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return Se(z),se=this._bucketRequestParams("DELETE",z,"lifecycle",te),se.successStatuses=[204],ce.next=5,this.request(se);case 5:return ie=ce.sent,ce.abrupt("return",{res:ie.res});case 7:case"end":return ce.stop()}},fe,this)}));function Pe(fe,z){return me.apply(this,arguments)}return Pe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=Re;Ae.deleteBucketWebsite=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te){var se,ie;return ve.default.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return Se(z),se=this._bucketRequestParams("DELETE",z,"website",te),se.successStatuses=[204],ce.next=5,this.request(se);case 5:return ie=ce.sent,ce.abrupt("return",{res:ie.res});case 7:case"end":return ce.stop()}},fe,this)}));function Pe(fe,z){return me.apply(this,arguments)}return Pe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.extendBucketWorm=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/obj2xml");function Ae(Pe,fe,z,te){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function Pe(fe,z,te,se){var ie,le,ce;return ve.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return ke.checkBucketName(fe),ie=this._bucketRequestParams("POST",fe,{wormExtend:"",wormId:z},se),le={ExtendWormConfiguration:{RetentionPeriodInDays:te}},ie.mime="xml",ie.content=Se.obj2xml(le,{headers:!0}),ie.successStatuses=[200],xe.next=8,this.request(ie);case 8:return ce=xe.sent,xe.abrupt("return",{res:ce.res,status:ce.status});case 10:case"end":return xe.stop()}},Pe,this)})),me.apply(this,arguments)}Re.extendBucketWorm=Ae},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.getBucketInventory=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/formatInventoryConfig");function Ae(Pe,fe){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function Pe(fe,z){var te,se,ie,le,ce=arguments;return ve.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return te=ce.length>2&&ce[2]!==void 0?ce[2]:{},se=Object.assign({inventory:"",inventoryId:z},te.subres),ke.checkBucketName(fe),ie=this._bucketRequestParams("GET",fe,se,te),ie.successStatuses=[200],ie.xmlResponse=!0,xe.next=8,this.request(ie);case 8:return le=xe.sent,xe.abrupt("return",{status:le.status,res:le.res,inventory:Se.formatInventoryConfig(le.data)});case 10:case"end":return xe.stop()}},Pe,this)})),me.apply(this,arguments)}Re.getBucketInventory=Ae},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],14:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.map.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=oe("../utils/isArray"),me=Ae.isArray,Pe=oe("../utils/formatObjKey"),fe=Pe.formatObjKey,z=Re;z.getBucketLifecycle=function(){var te=(0,Ee.default)(ve.default.mark(function ie(le,ce){var pe,xe,je;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return Se(le),pe=this._bucketRequestParams("GET",le,"lifecycle",ce),pe.successStatuses=[200],pe.xmlResponse=!0,Fe.next=6,this.request(pe);case 6:return xe=Fe.sent,je=xe.data.Rule||null,je&&(me(je)||(je=[je]),je=je.map(function(Te){return Te.ID&&(Te.id=Te.ID,delete Te.ID),Te.Tag&&!me(Te.Tag)&&(Te.Tag=[Te.Tag]),fe(Te,"firstLowerCase")})),Fe.abrupt("return",{rules:je,res:xe.res});case 10:case"end":return Fe.stop()}},ie,this)}));function se(ie,le){return te.apply(this,arguments)}return se}()},{"../utils/checkBucketName":51,"../utils/formatObjKey":61,"../utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280}],15:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=Re;Ae.getBucketVersioning=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te){var se,ie,le;return ve.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return Se(z),se=this._bucketRequestParams("GET",z,"versioning",te),se.xmlResponse=!0,se.successStatuses=[200],pe.next=6,this.request(se);case 6:return ie=pe.sent,le=ie.data.Status,pe.abrupt("return",{status:ie.status,versionStatus:le,res:ie.res});case 9:case"end":return pe.stop()}},fe,this)}));function Pe(fe,z){return me.apply(this,arguments)}return Pe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=oe("../utils/isObject"),me=Ae.isObject,Pe=Re;Pe.getBucketWebsite=function(){var fe=(0,Ee.default)(ve.default.mark(function te(se,ie){var le,ce,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return Se(se),le=this._bucketRequestParams("GET",se,"website",ie),le.successStatuses=[200],le.xmlResponse=!0,je.next=6,this.request(le);case 6:return ce=je.sent,pe=[],ce.data.RoutingRules&&ce.data.RoutingRules.RoutingRule&&(me(ce.data.RoutingRules.RoutingRule)?pe=[ce.data.RoutingRules.RoutingRule]:pe=ce.data.RoutingRules.RoutingRule),je.abrupt("return",{index:ce.data.IndexDocument&&ce.data.IndexDocument.Suffix||"",supportSubDir:ce.data.IndexDocument&&ce.data.IndexDocument.SupportSubDir||"false",type:ce.data.IndexDocument&&ce.data.IndexDocument.Type,routingRules:pe,error:ce.data.ErrorDocument&&ce.data.ErrorDocument.Key||null,res:ce.res});case 10:case"end":return je.stop()}},te,this)}));function z(te,se){return fe.apply(this,arguments)}return z}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.getBucketWorm=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/dataFix");function Ae(Pe,fe){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function Pe(fe,z){var te,se;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return ke.checkBucketName(fe),te=this._bucketRequestParams("GET",fe,"worm",z),te.successStatuses=[200],te.xmlResponse=!0,le.next=6,this.request(te);case 6:return se=le.sent,Se.dataFix(se.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),le.abrupt("return",Object.assign(Object.assign({},se.data),{res:se.res,status:se.status}));case 9:case"end":return le.stop()}},Pe,this)})),me.apply(this,arguments)}Re.getBucketWorm=Ae},{"../utils/checkBucketName":51,"../utils/dataFix":57,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],18:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.initiateBucketWorm=void 0;var ke=oe("../utils/obj2xml"),Se=oe("../utils/checkBucketName");function Ae(Pe,fe,z){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function Pe(fe,z,te){var se,ie,le;return ve.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return Se.checkBucketName(fe),se=this._bucketRequestParams("POST",fe,"worm",te),ie={InitiateWormConfiguration:{RetentionPeriodInDays:z}},se.mime="xml",se.content=ke.obj2xml(ie,{headers:!0}),se.successStatuses=[200],pe.next=8,this.request(se);case 8:return le=pe.sent,pe.abrupt("return",{res:le.res,wormId:le.res.headers["x-oss-worm-id"],status:le.status});case 10:case"end":return pe.stop()}},Pe,this)})),me.apply(this,arguments)}Re.initiateBucketWorm=Ae},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.listBucketInventory=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/formatInventoryConfig");function Ae(Pe){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function Pe(fe){var z,te,se,ie,le,ce,pe,xe,je=arguments;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return z=je.length>1&&je[1]!==void 0?je[1]:{},te=z.continuationToken,se=Object.assign({inventory:""},te&&{"continuation-token":te},z.subres),ke.checkBucketName(fe),ie=this._bucketRequestParams("GET",fe,se,z),ie.successStatuses=[200],ie.xmlResponse=!0,Fe.next=9,this.request(ie);case 9:return le=Fe.sent,ce=le.data,pe=le.res,xe=le.status,Fe.abrupt("return",{isTruncated:ce.IsTruncated==="true",nextContinuationToken:ce.NextContinuationToken,inventoryList:Se.formatInventoryConfig(ce.InventoryConfiguration,!0),status:xe,res:pe});case 12:case"end":return Fe.stop()}},Pe,this)})),me.apply(this,arguments)}Re.listBucketInventory=Ae},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],20:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.concat.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.putBucketInventory=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/obj2xml");function Ae(Pe,fe){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function Pe(fe,z){var te,se,ie,le,ce,pe,xe,je,De,Fe,Te,Me=arguments;return ve.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return te=Me.length>2&&Me[2]!==void 0?Me[2]:{},se=Object.assign({inventory:"",inventoryId:z.id},te.subres),ke.checkBucketName(fe),ie=z.OSSBucketDestination,le=z.optionalFields,ce=z.includedObjectVersions,pe="acs:oss:::",xe="acs:ram::".concat(ie.accountId,":role/"),je={InventoryConfiguration:{Id:z.id,IsEnabled:z.isEnabled,Filter:{Prefix:z.prefix||""},Destination:{OSSBucketDestination:{Format:ie.format,AccountId:ie.accountId,RoleArn:"".concat(xe).concat(ie.rolename),Bucket:"".concat(pe).concat(ie.bucket),Prefix:ie.prefix||"",Encryption:ie.encryption||""}},Schedule:{Frequency:z.frequency},IncludedObjectVersions:ce,OptionalFields:{Field:(le==null?void 0:le.field)||[]}}},De=Se.obj2xml(je,{headers:!0,firstUpperCase:!0}),Fe=this._bucketRequestParams("PUT",fe,se,te),Fe.successStatuses=[200],Fe.mime="xml",Fe.content=De,Ue.next=14,this.request(Fe);case 14:return Te=Ue.sent,Ue.abrupt("return",{status:Te.status,res:Te.res});case 16:case"end":return Ue.stop()}},Pe,this)})),me.apply(this,arguments)}Re.putBucketInventory=Ae},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.array.includes.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=oe("../utils/isArray"),me=Ae.isArray,Pe=oe("../utils/deepCopy"),fe=Pe.deepCopy,z=oe("../utils/isObject"),te=z.isObject,se=oe("../utils/obj2xml"),ie=se.obj2xml,le=oe("../utils/checkObjectTag"),ce=le.checkObjectTag,pe=oe("../utils/getStrBytesCount"),xe=pe.getStrBytesCount,je=Re;je.putBucketLifecycle=function(){var Be=(0,Ee.default)(ve.default.mark(function Ye(Ve,Ze,ot){var lt,ft,St,qe,rt;return ve.default.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(Se(Ve),me(Ze)){Ct.next=3;break}throw new Error("rules must be Array");case 3:return lt=this._bucketRequestParams("PUT",Ve,"lifecycle",ot),ft=[],St={LifecycleConfiguration:{Rule:ft}},Ze.forEach(function(bt){De(bt),Me(bt),bt.id&&(bt.ID=bt.id,delete bt.id),ft.push(bt)}),qe=ie(St,{headers:!0,firstUpperCase:!0}),lt.content=qe,lt.mime="xml",lt.successStatuses=[200],Ct.next=13,this.request(lt);case 13:return rt=Ct.sent,Ct.abrupt("return",{res:rt.res});case 15:case"end":return Ct.stop()}},Ye,this)}));function Ue(Ye,Ve,Ze){return Be.apply(this,arguments)}return Ue}();function De(Be){Be.days&&(Be.expiration={days:Be.days}),Be.date&&(Be.expiration={createdBeforeDate:Be.date})}function Fe(Be,Ue){var Ye=Be.days,Ve=Be.createdBeforeDate;if(!Ye&&!Ve)throw new Error("".concat(Ue," must includes days or createdBeforeDate"));if(Ye&&!/^[1-9][0-9]*$/.test(Ye))throw new Error("days must be a positive integer");if(Ve&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(Ve))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function Te(Be){if(!me(Be)&&!te(Be))throw new Error("tag must be Object or Array");Be=te(Be)?[Be]:Be;var Ue={},Ye=fe(Be);Ye.forEach(function(Ve){Ue[Ve.key]=Ve.value}),ce(Ue)}function Me(Be){if(Be.id&&xe(Be.id)>255)throw new Error("ID is composed of 255 bytes at most");if(Be.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(Be.status))throw new Error("Status must be Enabled or Disabled");if(Be.transition){if(!["IA","Archive"].includes(Be.transition.storageClass))throw new Error("StorageClass must be IA or Archive");Fe(Be.transition,"Transition")}if(Be.expiration){if(!Be.expiration.expiredObjectDeleteMarker)Fe(Be.expiration,"Expiration");else if(Be.expiration.days||Be.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(Be.abortMultipartUpload&&Fe(Be.abortMultipartUpload,"AbortMultipartUpload"),!Be.expiration&&!Be.abortMultipartUpload&&!Be.transition&&!Be.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(Be.tag){if(Be.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");Te(Be.tag)}}},{"../utils/checkBucketName":51,"../utils/checkObjectTag":54,"../utils/deepCopy":58,"../utils/getStrBytesCount":62,"../utils/isArray":63,"../utils/isObject":70,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],22:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.includes.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=oe("../utils/obj2xml"),me=Ae.obj2xml,Pe=Re;Pe.putBucketVersioning=function(){var fe=(0,Ee.default)(ve.default.mark(function te(se,ie){var le,ce,pe,xe,je=arguments;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:if(le=je.length>2&&je[2]!==void 0?je[2]:{},Se(se),["Enabled","Suspended"].includes(ie)){Fe.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return ce=this._bucketRequestParams("PUT",se,"versioning",le),pe={VersioningConfiguration:{Status:ie}},ce.mime="xml",ce.content=me(pe,{headers:!0}),Fe.next=10,this.request(ce);case 10:return xe=Fe.sent,Fe.abrupt("return",{res:xe.res,status:xe.status});case 12:case"end":return Fe.stop()}},te,this)}));function z(te,se){return fe.apply(this,arguments)}return z}()},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277}],23:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=oe("../utils/obj2xml"),me=Ae.obj2xml,Pe=oe("../utils/isArray"),fe=Pe.isArray,z=Re;z.putBucketWebsite=function(){var te=(0,Ee.default)(ve.default.mark(function ie(le){var ce,pe,xe,je,De,Fe,Te,Me=arguments;return ve.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(ce=Me.length>1&&Me[1]!==void 0?Me[1]:{},pe=Me.length>2?Me[2]:void 0,Se(le),xe=this._bucketRequestParams("PUT",le,"website",pe),je={Suffix:ce.index||"index.html"},De={IndexDocument:je},Fe={WebsiteConfiguration:De},ce.supportSubDir&&(je.SupportSubDir=ce.supportSubDir),ce.type&&(je.Type=ce.type),ce.error&&(De.ErrorDocument={Key:ce.error}),ce.routingRules===void 0){Ue.next=14;break}if(fe(ce.routingRules)){Ue.next=13;break}throw new Error("RoutingRules must be Array");case 13:De.RoutingRules={RoutingRule:ce.routingRules};case 14:return Fe=me(Fe),xe.content=Fe,xe.mime="xml",xe.successStatuses=[200],Ue.next=20,this.request(xe);case 20:return Te=Ue.sent,Ue.abrupt("return",{res:Te.res});case 22:case"end":return Ue.stop()}},ie,this)}));function se(ie){return te.apply(this,arguments)}return se}()},{"../utils/checkBucketName":51,"../utils/isArray":63,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],24:[function(oe,He,Re){(function(de){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),Re.encodeCallback=function(Ee,ke){if(Ee.headers=Ee.headers||{},!Object.prototype.hasOwnProperty.call(Ee.headers,"x-oss-callback")&&ke.callback){var Se={callbackUrl:encodeURI(ke.callback.url),callbackBody:ke.callback.body};ke.callback.host&&(Se.callbackHost=ke.callback.host),ke.callback.contentType&&(Se.callbackBodyType=ke.callback.contentType);var Ae=de.from(JSON.stringify(Se)).toString("base64");if(Ee.headers["x-oss-callback"]=Ae,ke.callback.customValue){var me={};Object.keys(ke.callback.customValue).forEach(function(Pe){me["x:".concat(Pe)]=ke.callback.customValue[Pe].toString()}),Ee.headers["x-oss-callback-var"]=de.from(JSON.stringify(me)).toString("base64")}}}}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/web.dom-collections.for-each.js":339}],25:[function(oe,He,Re){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js");var de=function(fe){return fe&&fe.__esModule?fe:{default:fe}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.getReqUrl=void 0;var ve=de(oe("copy-to")),Ee=de(oe("url")),ke=de(oe("merge-descriptors")),Se=de(oe("is-type-of")),Ae=oe("../utils/isIP"),me=oe("../utils/checkConfigValid");function Pe(fe){var z={},te=this.options.cname;me.checkConfigValid(this.options.endpoint,"endpoint"),ve.default(this.options.endpoint,!1).to(z),fe.bucket&&!te&&!Ae.isIP(z.hostname)&&!this.options.sldEnable&&(z.host="".concat(fe.bucket,".").concat(z.host));var se="/";fe.bucket&&this.options.sldEnable&&(se+="".concat(fe.bucket,"/")),fe.object&&(se+=this._escape(fe.object).replace(/\+/g,"%2B")),z.pathname=se;var ie={};if(fe.query&&ke.default(ie,fe.query),fe.subres){var le={};Se.default.string(fe.subres)?le[fe.subres]="":Se.default.array(fe.subres)?fe.subres.forEach(function(ce){le[ce]=""}):le=fe.subres,ke.default(ie,le)}return z.query=ie,Ee.default.format(z)}Re.getReqUrl=Pe},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(oe,He,Re){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.string.trim.js");var de=oe("humanize-ms"),ve=oe("url"),Ee=oe("../utils/checkBucketName"),ke=Ee.checkBucketName,Se=oe("../utils/setRegion"),Ae=Se.setRegion,me=oe("../utils/checkConfigValid"),Pe=me.checkConfigValid;function fe(z,te){Pe(z,"endpoint");var se=ve.parse(z);if(se.protocol||(se=ve.parse("http".concat(te?"s":"","://").concat(z))),se.protocol!=="http:"&&se.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return se}He.exports=function(z){if(!z||!z.accessKeyId||!z.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");z.stsToken&&!z.refreshSTSToken&&!z.refreshSTSTokenInterval&&console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken\u3001accessKeyId\u3001accessKeySecret automatically when sts token has expired"),z.bucket&&ke(z.bucket);var te=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:6e4*5,retryMax:0},z);if(te.accessKeyId=te.accessKeyId.trim(),te.accessKeySecret=te.accessKeySecret.trim(),te.timeout&&(te.timeout=de(te.timeout)),te.endpoint)te.endpoint=fe(te.endpoint,te.secure);else if(te.region)te.endpoint=Ae(te.region,te.internal,te.secure);else throw new Error("require options.endpoint or options.region");return te.inited=!0,te}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(oe,He,Re){"use strict";var de=oe("merge-descriptors"),ve=Re;de(ve,oe("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.concat.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=oe("querystring"),me=oe("js-base64"),Pe=me.Base64.encode,fe=Re;fe.processObjectSave=function(){var te=(0,Ee.default)(ve.default.mark(function ie(le,ce,pe,xe){var je,De,Fe,Te;return ve.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return z(le,"sourceObject"),z(ce,"targetObject"),z(pe,"process"),ce=this._objectName(ce),xe&&Se(xe),je=this._objectRequestParams("POST",le,{subres:"x-oss-process"}),De=xe?",b_".concat(Pe(xe)):"",ce=Pe(ce),Fe={"x-oss-process":"".concat(pe,"|sys/saveas,o_").concat(ce).concat(De)},je.content=Ae.stringify(Fe),Be.next=12,this.request(je);case 12:return Te=Be.sent,Be.abrupt("return",{res:Te.res,status:Te.res.status});case 14:case"end":return Be.stop()}},ie,this)}));function se(ie,le,ce,pe){return te.apply(this,arguments)}return se}();function z(te,se){if(!te)throw new Error("".concat(se," is required"));if(typeof te!="string")throw new Error("".concat(se," must be String"))}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"js-base64":371,querystring:385}],29:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.regexp.to-string.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("debug")("ali-oss:multipart-copy"),Se=oe("copy-to"),Ae=Re;Ae.uploadPartCopy=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se,ie,le){var ce,pe,xe,je,De,Fe=arguments;return ve.default.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return ce=Fe.length>5&&Fe[5]!==void 0?Fe[5]:{},ce.headers=ce.headers||{},pe=ce.versionId||ce.subres&&ce.subres.versionId||null,pe?xe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey),"?versionId=").concat(pe):xe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey)),ce.headers["x-oss-copy-source"]=xe,ie&&(ce.headers["x-oss-copy-source-range"]="bytes=".concat(ie)),ce.subres={partNumber:se,uploadId:te},je=this._objectRequestParams("PUT",z,ce),je.mime=ce.mime,je.successStatuses=[200],Me.next=12,this.request(je);case 12:return De=Me.sent,Me.abrupt("return",{name:z,etag:De.res.headers.etag,res:De.res});case 14:case"end":return Me.stop()}},fe,this)}));function Pe(fe,z,te,se,ie){return me.apply(this,arguments)}return Pe}(),Ae.multipartUploadCopy=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te){var se,ie,le,ce,pe,xe,je,De,Fe,Te,Me,Be,Ue=arguments;return ve.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return se=Ue.length>2&&Ue[2]!==void 0?Ue[2]:{},this.resetCancelFlag(),ie=se.versionId,le=ie===void 0?null:ie,ce={versionId:le},Ve.next=6,this._getObjectMeta(te.sourceBucketName,te.sourceKey,ce);case 6:if(pe=Ve.sent,xe=pe.res.headers["content-length"],te.startOffset=te.startOffset||0,te.endOffset=te.endOffset||xe,!(se.checkpoint&&se.checkpoint.uploadId)){Ve.next=14;break}return Ve.next=13,this._resumeMultipartCopy(se.checkpoint,te,se);case 13:return Ve.abrupt("return",Ve.sent);case 14:if(je=102400,De=te.endOffset-te.startOffset,!(De<je)){Ve.next=18;break}throw new Error("copySize must not be smaller than ".concat(je));case 18:if(!(se.partSize&&se.partSize<je)){Ve.next=20;break}throw new Error("partSize must not be smaller than ".concat(je));case 20:return Ve.next=22,this.initMultipartUpload(z,se);case 22:if(Fe=Ve.sent,Te=Fe.uploadId,Me=this._getPartSize(De,se.partSize),Be={name:z,copySize:De,partSize:Me,uploadId:Te,doneParts:[]},!(se&&se.progress)){Ve.next=29;break}return Ve.next=29,se.progress(0,Be,Fe.res);case 29:return Ve.next=31,this._resumeMultipartCopy(Be,te,se);case 31:return Ve.abrupt("return",Ve.sent);case 32:case"end":return Ve.stop()}},fe,this)}));function Pe(fe,z){return me.apply(this,arguments)}return Pe}(),Ae._resumeMultipartCopy=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se){var ie,le,ce,pe,xe,je,De,Fe,Te,Me,Be,Ue,Ye,Ve,Ze,ot,lt,ft,St,qe,rt;return ve.default.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(!this.isCancel()){Ct.next=2;break}throw this._makeCancelEvent();case 2:if(ie=se.versionId,le=ie===void 0?null:ie,ce={versionId:le},pe=z.copySize,xe=z.partSize,je=z.uploadId,De=z.doneParts,Fe=z.name,Te=this._divideMultipartCopyParts(pe,xe,te.startOffset),Me=Te.length,Be={headers:{}},se.copyheaders&&Se(se.copyheaders).to(Be.headers),le&&Se(ce).to(Be),Ue=function(ct,xt,dt){return new Promise(function(){var Mt=(0,Ee.default)(ve.default.mark(function yt(Dt,mt){var vt,et,We;return ve.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:if(Ne.prev=0,ct.isCancel()){Ne.next=22;break}return vt=Te[xt-1],et="".concat(vt.start,"-").concat(vt.end-1),Ne.prev=4,Ne.next=7,ct.uploadPartCopy(Fe,je,xt,et,dt,Be);case 7:We=Ne.sent,Ne.next=15;break;case 10:if(Ne.prev=10,Ne.t0=Ne.catch(4),Ne.t0.status!==404){Ne.next=14;break}throw ct._makeAbortEvent();case 14:throw Ne.t0;case 15:if(ct.isCancel()){Ne.next=22;break}if(ke("content-range ".concat(We.res.headers["content-range"])),De.push({number:xt,etag:We.res.headers.etag}),z.doneParts=De,!(se&&se.progress)){Ne.next=22;break}return Ne.next=22,se.progress(De.length/Me,z,We.res);case 22:Dt(),Ne.next=29;break;case 25:Ne.prev=25,Ne.t1=Ne.catch(0),Ne.t1.partNum=xt,mt(Ne.t1);case 29:case"end":return Ne.stop()}},yt,null,[[0,25],[4,10]])}));return function(yt,Dt){return Mt.apply(this,arguments)}}())},Ye=Array.from(new Array(Me),function(bt,ct){return ct+1}),Ve=De.map(function(bt){return bt.number}),Ze=Ye.filter(function(bt){return Ve.indexOf(bt)<0}),ot=5,lt=se.parallel||ot,!(this.checkBrowserAndVersion("Internet Explorer","10")||lt===1)){Ct.next=28;break}ft=0;case 18:if(!(ft<Ze.length)){Ct.next=26;break}if(!this.isCancel()){Ct.next=21;break}throw this._makeCancelEvent();case 21:return Ct.next=23,Ue(this,Ze[ft],te);case 23:ft++,Ct.next=18;break;case 26:Ct.next=40;break;case 28:return Ct.next=30,this._parallelNode(Ze,lt,Ue,te);case 30:if(St=Ct.sent,qe=St.find(function(bt){return bt.name==="abort"}),!qe){Ct.next=34;break}throw qe;case 34:if(!this.isCancel()){Ct.next=36;break}throw this._makeCancelEvent();case 36:if(!(St&&St.length>0)){Ct.next=40;break}throw rt=St[0],rt.message="Failed to copy some parts with error: ".concat(rt.toString()," part_num: ").concat(rt.partNum),rt;case 40:return Ct.next=42,this.completeMultipartUpload(Fe,je,De,se);case 42:return Ct.abrupt("return",Ct.sent);case 43:case"end":return Ct.stop()}},fe,this)}));function Pe(fe,z,te){return me.apply(this,arguments)}return Pe}(),Ae._divideMultipartCopyParts=function(Pe,fe,z){for(var te=Math.ceil(Pe/fe),se=[],ie=0;ie<te;ie++){var le=fe*ie+z,ce=Math.min(le+fe,Pe+z);se.push({start:le,end:ce})}return se},Ae._getObjectMeta=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se){var ie,le;return ve.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return ie=this.getBucket(),this.setBucket(z),pe.next=4,this.head(te,se);case 4:return le=pe.sent,this.setBucket(ie),pe.abrupt("return",le);case 7:case"end":return pe.stop()}},fe,this)}));function Pe(fe,z,te){return me.apply(this,arguments)}return Pe}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,debug:465}],30:[function(oe,He,Re){(function(de){(function(){"use strict";var ve=oe("@babel/runtime/helpers/interopRequireDefault"),Ee=ve(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.array.sort.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js");var ke=ve(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("copy-to"),Ae=oe("./callback"),me=oe("./utils/deepCopy"),Pe=me.deepCopyWith,fe=oe("./utils/isBuffer"),z=fe.isBuffer,te=oe("./utils/omit"),se=te.omit,ie=Re;ie.listUploads=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je){var De,Fe,Te,Me;return Ee.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return je=je||{},De={},Se(je).to(De),De.subres="uploads",Fe=this._objectRequestParams("GET","",De),Fe.query=xe,Fe.xmlResponse=!0,Fe.successStatuses=[200],Ue.next=10,this.request(Fe);case 10:return Te=Ue.sent,Me=Te.data.Upload||[],Array.isArray(Me)||(Me=[Me]),Me=Me.map(function(Ye){return{name:Ye.Key,uploadId:Ye.UploadId,initiated:Ye.Initiated}}),Ue.abrupt("return",{res:Te.res,uploads:Me,bucket:Te.data.Bucket,nextKeyMarker:Te.data.NextKeyMarker,nextUploadIdMarker:Te.data.NextUploadIdMarker,isTruncated:Te.data.IsTruncated==="true"});case 15:case"end":return Ue.stop()}},pe,this)}));function ce(pe,xe){return le.apply(this,arguments)}return ce}(),ie.listParts=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De,Fe){var Te,Me,Be;return Ee.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Fe=Fe||{},Te={},Se(Fe).to(Te),Te.subres={uploadId:je},Me=this._objectRequestParams("GET",xe,Te),Me.query=De,Me.xmlResponse=!0,Me.successStatuses=[200],Ye.next=10,this.request(Me);case 10:return Be=Ye.sent,Ye.abrupt("return",{res:Be.res,uploadId:Be.data.UploadId,bucket:Be.data.Bucket,name:Be.data.Key,partNumberMarker:Be.data.PartNumberMarker,nextPartNumberMarker:Be.data.NextPartNumberMarker,maxParts:Be.data.MaxParts,isTruncated:Be.data.IsTruncated,parts:Be.data.Part||[]});case 12:case"end":return Ye.stop()}},pe,this)}));function ce(pe,xe,je,De){return le.apply(this,arguments)}return ce}(),ie.abortMultipartUpload=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De){var Fe,Te,Me;return Ee.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return this._stop(),De=De||{},Fe={},Se(De).to(Fe),Fe.subres={uploadId:je},Te=this._objectRequestParams("DELETE",xe,Fe),Te.successStatuses=[204],Ue.next=9,this.request(Te);case 9:return Me=Ue.sent,Ue.abrupt("return",{res:Me.res});case 11:case"end":return Ue.stop()}},pe,this)}));function ce(pe,xe,je){return le.apply(this,arguments)}return ce}(),ie.initMultipartUpload=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je){var De,Fe,Te;return Ee.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return je=je||{},De={},Se(je).to(De),De.headers=De.headers||{},this._convertMetaToHeaders(je.meta,De.headers),De.subres="uploads",Fe=this._objectRequestParams("POST",xe,De),Fe.mime=je.mime,Fe.xmlResponse=!0,Fe.successStatuses=[200],Be.next=12,this.request(Fe);case 12:return Te=Be.sent,Be.abrupt("return",{res:Te.res,bucket:Te.data.Bucket,name:Te.data.Key,uploadId:Te.data.UploadId});case 14:case"end":return Be.stop()}},pe,this)}));function ce(pe,xe){return le.apply(this,arguments)}return ce}(),ie.uploadPart=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De,Fe,Te,Me,Be){var Ue,Ye;return Ee.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:if(Ue={size:Me-Te},Ye=de&&de.browser,!Ye){Ze.next=8;break}return Ze.next=5,this._createBuffer(Fe,Te,Me);case 5:Ue.content=Ze.sent,Ze.next=11;break;case 8:return Ze.next=10,this._createStream(Fe,Te,Me);case 10:Ue.stream=Ze.sent;case 11:return Ze.next=13,this._uploadPart(xe,je,De,Ue,Be);case 13:return Ze.abrupt("return",Ze.sent);case 14:case"end":return Ze.stop()}},pe,this)}));function ce(pe,xe,je,De,Fe,Te,Me){return le.apply(this,arguments)}return ce}(),ie.completeMultipartUpload=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De,Fe){var Te,Me,Be,Ue,Ye,Ve,Ze,ot;return Ee.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:for(Te=De.concat().sort(function(St,qe){return St.number-qe.number}).filter(function(St,qe,rt){return!qe||St.number!==rt[qe-1].number}),Me=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CompleteMultipartUpload>
|
|
`,Be=0;Be<Te.length;Be++)Ue=Te[Be],Me+=`<Part>
|
|
`,Me+="<PartNumber>".concat(Ue.number,`</PartNumber>
|
|
`),Me+="<ETag>".concat(Ue.etag,`</ETag>
|
|
`),Me+=`</Part>
|
|
`;return Me+="</CompleteMultipartUpload>",Fe=Fe||{},Ye={},Ye=Pe(Fe,function(St){if(z(St))return null}),Ye.subres={uploadId:je},Ye.headers=se(Ye.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),Ve=this._objectRequestParams("POST",xe,Ye),Ae.encodeCallback(Ve,Ye),Ve.mime="xml",Ve.content=Me,Ve.headers&&Ve.headers["x-oss-callback"]||(Ve.xmlResponse=!0),Ve.successStatuses=[200],ft.next=17,this.request(Ve);case 17:if(Ze=ft.sent,!Fe.progress){ft.next=21;break}return ft.next=21,Fe.progress(1,null,Ze.res);case 21:return ot={res:Ze.res,bucket:Ve.bucket,name:xe,etag:Ze.res.headers.etag},Ve.headers&&Ve.headers["x-oss-callback"]&&(ot.data=JSON.parse(Ze.data.toString())),ft.abrupt("return",ot);case 24:case"end":return ft.stop()}},pe,this)}));function ce(pe,xe,je,De){return le.apply(this,arguments)}return ce}(),ie._uploadPart=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De,Fe,Te){var Me,Be,Ue,Ye;return Ee.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Te=Te||{},Me={},Se(Te).to(Me),Me.headers=Me.headers||{},Me.headers["Content-Length"]=Fe.size,Me.headers=se(Me.headers,["x-oss-server-side-encryption"]),Me.subres={partNumber:De,uploadId:je},Be=this._objectRequestParams("PUT",xe,Me),Be.mime=Me.mime,Ue=de&&de.browser,Ue?Be.content=Fe.content:Be.stream=Fe.stream,Be.successStatuses=[200],Be.disabledMD5=Te.disabledMD5,Ze.next=15,this.request(Be);case 15:if(Ye=Ze.sent,Ye.res.headers.etag){Ze.next=18;break}throw new Error(`Please set the etag of expose-headers in OSS
|
|
https://help.aliyun.com/document_detail/32069.html`);case 18:return Fe.stream&&(Fe.stream=null,Be.stream=null),Ze.abrupt("return",{name:xe,etag:Ye.res.headers.etag,res:Ye.res});case 20:case"end":return Ze.stop()}},pe,this)}));function ce(pe,xe,je,De,Fe){return le.apply(this,arguments)}return ce}()}).call(this)}).call(this,oe("_process"))},{"./callback":24,"./utils/deepCopy":58,"./utils/isBuffer":65,"./utils/omit":73,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],31:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("url"),Se=oe("utility"),Ae=oe("copy-to"),me=oe("../../common/signUtils"),Pe=oe("../utils/isIP"),fe=Pe.isIP,z=oe("../utils/setSTSToken"),te=z.setSTSToken,se=oe("../utils/isFunction"),ie=se.isFunction,le=Re;le.asyncSignatureUrl=function(){var ce=(0,Ee.default)(ve.default.mark(function xe(je,De){var Fe,Te,Me,Be,Ue;return ve.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:if(!fe(this.options.endpoint.hostname)){Ve.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(De=De||{},je=this._objectName(je),De.method=De.method||"GET",Fe=Se.timestamp()+(De.expires||1800),Te={bucket:this.options.bucket,object:je},Me=this._getResource(Te),!(this.options.stsToken&&ie(this.options.refreshSTSToken))){Ve.next=11;break}return Ve.next=11,te.call(this);case 11:return this.options.stsToken&&(De["security-token"]=this.options.stsToken),Be=me._signatureForURL(this.options.accessKeySecret,De,Me,Fe),Ue=ke.parse(this._getReqUrl(Te)),Ue.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Fe,Signature:Be.Signature},Ae(Be.subResource).to(Ue.query),Ve.abrupt("return",Ue.format());case 17:case"end":return Ve.stop()}},xe,this)}));function pe(xe,je){return ce.apply(this,arguments)}return pe}()},{"../../common/signUtils":50,"../utils/isFunction":68,"../utils/isIP":69,"../utils/setSTSToken":76,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,url:472,utility:474}],32:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js");var Ee=de(oe("@babel/runtime/helpers/typeof")),ke=de(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("../utils/checkBucketName"),Ae=Se.checkBucketName,me=Re,Pe=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];me.copy=function(){var fe=(0,ke.default)(ve.default.mark(function te(se,ie,le,ce){var pe,xe,je;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return(0,Ee.default)(le)==="object"&&(ce=le),ce=ce||{},ce.headers=ce.headers||{},Object.keys(ce.headers).forEach(function(Te){ce.headers["x-oss-copy-source-".concat(Te.toLowerCase())]=ce.headers[Te]}),(ce.meta||Object.keys(ce.headers).find(function(Te){return Pe.includes(Te.toLowerCase())}))&&(ce.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(ce.meta,ce.headers),ie=this._getSourceName(ie,le),ce.versionId&&(ie="".concat(ie,"?versionId=").concat(ce.versionId)),ce.headers["x-oss-copy-source"]=ie,pe=this._objectRequestParams("PUT",se,ce),pe.xmlResponse=!0,pe.successStatuses=[200,304],Fe.next=14,this.request(pe);case 14:return xe=Fe.sent,je=xe.data,je&&(je={etag:je.ETag,lastModified:je.LastModified}),Fe.abrupt("return",{data:je,res:xe.res});case 18:case"end":return Fe.stop()}},te,this)}));function z(te,se,ie,le){return fe.apply(this,arguments)}return z}(),me._getSourceName=function(z,te){return typeof te=="string"?z=this._objectName(z):z[0]!=="/"?te=this.options.bucket:(te=z.replace(/\/(.+?)(\/.*)/,"$1"),z=z.replace(/(\/.+?\/)(.*)/,"$2")),Ae(te),z=encodeURIComponent(z),z="/".concat(te,"/").concat(z),z}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],33:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=Re;ke.delete=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe){var fe,z,te,se=arguments;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return fe=se.length>1&&se[1]!==void 0?se[1]:{},fe.subres=Object.assign({},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),z=this._objectRequestParams("DELETE",Pe,fe),z.successStatuses=[204],le.next=7,this.request(z);case 7:return te=le.sent,le.abrupt("return",{res:te.res});case 9:case"end":return le.stop()}},me,this)}));function Ae(me){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("utility"),Se=oe("../utils/obj2xml"),Ae=Se.obj2xml,me=Re;me.deleteMulti=function(){var Pe=(0,Ee.default)(ve.default.mark(function z(te){var se,ie,le,ce,pe,xe,je,De,Fe,Te,Me,Be,Ue,Ye=arguments;return ve.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:if(se=Ye.length>1&&Ye[1]!==void 0?Ye[1]:{},ie=[],!(!te||!te.length)){Ze.next=4;break}throw new Error("names is required");case 4:for(le=0;le<te.length;le++)ce={},typeof te[le]=="string"?ce.Key=ke.escape(this._objectName(te[le])):(pe=te[le],xe=pe.key,je=pe.versionId,ce.Key=ke.escape(this._objectName(xe)),ce.VersionId=je),ie.push(ce);return De={Delete:{Quiet:!!se.quiet,Object:ie}},Fe=Ae(De,{headers:!0}),se.subres=Object.assign({delete:""},se.subres),se.versionId&&(se.subres.versionId=se.versionId),Te=this._objectRequestParams("POST","",se),Te.mime="xml",Te.content=Fe,Te.xmlResponse=!0,Te.successStatuses=[200],Ze.next=16,this.request(Te);case 16:return Me=Ze.sent,Be=Me.data,Ue=Be&&Be.Deleted||null,Ue&&(Array.isArray(Ue)||(Ue=[Ue])),Ze.abrupt("return",{res:Me.res,deleted:Ue||[]});case 21:case"end":return Ze.stop()}},z,this)}));function fe(z){return Pe.apply(this,arguments)}return fe}()},{"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,utility:474}],35:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=Re;ke.deleteObjectTagging=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe){var fe,z,te,se=arguments;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return fe=se.length>1&&se[1]!==void 0?se[1]:{},fe.subres=Object.assign({tagging:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),Pe=this._objectName(Pe),z=this._objectRequestParams("DELETE",Pe,fe),z.successStatuses=[204],le.next=8,this.request(z);case 8:return te=le.sent,le.abrupt("return",{status:te.status,res:te.res});case 10:case"end":return le.stop()}},me,this)}));function Ae(me){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(oe,He,Re){"use strict";oe("core-js/modules/es.array.concat.js");var de=oe("url"),ve=oe("../utils/isIP"),Ee=ve.isIP,ke=Re;ke.generateObjectUrl=function(Ae,me){if(Ee(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(me)me[me.length-1]!=="/"&&(me+="/");else{me=this.options.endpoint.format();var Pe=de.parse(me),fe=this.options.bucket;Pe.hostname="".concat(fe,".").concat(Pe.hostname),Pe.host="".concat(fe,".").concat(Pe.host),me=Pe.format()}return me+this._escape(this._objectName(Ae))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(oe,He,Re){(function(de){(function(){"use strict";var ve=oe("@babel/runtime/helpers/interopRequireDefault"),Ee=ve(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=ve(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("fs"),Ae=oe("is-type-of"),me=Re;me.get=function(){var Pe=(0,ke.default)(Ee.default.mark(function z(te,se){var ie,le,ce,pe,xe,je,De,Fe,Te=arguments;return Ee.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ie=Te.length>2&&Te[2]!==void 0?Te[2]:{},le=null,ce=!1,Ae.writableStream(se)?le=se:Ae.string(se)?(le=Se.createWriteStream(se),ce=!0):ie=se,ie=ie||{},pe=de&&de.browser,xe=ie.responseCacheControl===null?"":"no-cache",je=pe&&xe?{"response-cache-control":xe}:{},ie.subres=Object.assign(je,ie.subres),ie.versionId&&(ie.subres.versionId=ie.versionId),ie.process&&(ie.subres["x-oss-process"]=ie.process),Be.prev=11,Fe=this._objectRequestParams("GET",te,ie),Fe.writeStream=le,Fe.successStatuses=[200,206,304],Be.next=17,this.request(Fe);case 17:De=Be.sent,ce&&le.destroy(),Be.next=28;break;case 21:if(Be.prev=21,Be.t0=Be.catch(11),!ce){Be.next=27;break}return le.destroy(),Be.next=27,this._deleteFileSafe(se);case 27:throw Be.t0;case 28:return Be.abrupt("return",{res:De.res,content:De.data});case 29:case"end":return Be.stop()}},z,this,[[11,21]])}));function fe(z,te){return Pe.apply(this,arguments)}return fe}()}).call(this)}).call(this,oe("_process"))},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"core-js/modules/es.object.assign.js":287,fs:89,"is-type-of":466}],38:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=Re;ke.getACL=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe){var fe,z,te,se=arguments;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return fe=se.length>1&&se[1]!==void 0?se[1]:{},fe.subres=Object.assign({acl:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),Pe=this._objectName(Pe),z=this._objectRequestParams("GET",Pe,fe),z.successStatuses=[200],z.xmlResponse=!0,le.next=9,this.request(z);case 9:return te=le.sent,le.abrupt("return",{acl:te.data.AccessControlList.Grant,owner:{id:te.data.Owner.ID,displayName:te.data.Owner.DisplayName},res:te.res});case 11:case"end":return le.stop()}},me,this)}));function Ae(me){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.number.constructor.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=Re,Se=oe("../utils/isObject"),Ae=Se.isObject,me=oe("../utils/isArray"),Pe=me.isArray;ke.getBucketVersions=fe,ke.listObjectVersions=fe;function fe(){return z.apply(this,arguments)}function z(){return z=(0,Ee.default)(ve.default.mark(function ie(){var le,ce,pe,xe,je,De,Fe,Te,Me=arguments;return ve.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(le=Me.length>0&&Me[0]!==void 0?Me[0]:{},ce=Me.length>1&&Me[1]!==void 0?Me[1]:{},!(le.versionIdMarker&&le.keyMarker===void 0)){Ue.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return ce.subres=Object.assign({versions:""},ce.subres),ce.versionId&&(ce.subres.versionId=ce.versionId),pe=this._objectRequestParams("GET","",ce),pe.xmlResponse=!0,pe.successStatuses=[200],pe.query=se(le),Ue.next=12,this.request(pe);case 12:return xe=Ue.sent,je=xe.data.Version||[],De=xe.data.DeleteMarker||[],Fe=this,je&&(Array.isArray(je)||(je=[je]),je=je.map(function(Ye){return{name:Ye.Key,url:Fe._objectUrl(Ye.Key),lastModified:Ye.LastModified,isLatest:Ye.IsLatest==="true",versionId:Ye.VersionId,etag:Ye.ETag,type:Ye.Type,size:Number(Ye.Size),storageClass:Ye.StorageClass,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),De&&(Pe(De)||(De=[De]),De=De.map(function(Ye){return{name:Ye.Key,lastModified:Ye.LastModified,versionId:Ye.VersionId,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),Te=xe.data.CommonPrefixes||null,Te&&(Pe(Te)||(Te=[Te]),Te=Te.map(function(Ye){return Ye.Prefix})),Ue.abrupt("return",{res:xe.res,objects:je,deleteMarker:De,prefixes:Te,nextMarker:xe.data.NextKeyMarker||null,NextVersionIdMarker:xe.data.NextVersionIdMarker||null,nextKeyMarker:xe.data.NextKeyMarker||null,nextVersionIdMarker:xe.data.NextVersionIdMarker||null,isTruncated:xe.data.IsTruncated==="true"});case 21:case"end":return Ue.stop()}},ie,this)})),z.apply(this,arguments)}function te(ie){return ie.replace(/([A-Z])/g,"-$1").toLowerCase()}function se(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le={};return Ae(ie)&&Object.keys(ie).forEach(function(ce){le[te(ce)]=ie[ce]}),le}},{"../utils/isArray":63,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],40:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=Re;ke.getObjectMeta=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe,fe){var z,te;return ve.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return fe=fe||{},Pe=this._objectName(Pe),fe.subres=Object.assign({objectMeta:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),z=this._objectRequestParams("HEAD",Pe,fe),z.successStatuses=[200],ie.next=8,this.request(z);case 8:return te=ie.sent,ie.abrupt("return",{status:te.status,res:te.res});case 10:case"end":return ie.stop()}},me,this)}));function Ae(me,Pe){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=Re,Se=oe("../utils/isObject"),Ae=Se.isObject;ke.getObjectTagging=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z){var te,se,ie,le,ce,pe,xe=arguments;return ve.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return te=xe.length>1&&xe[1]!==void 0?xe[1]:{},te.subres=Object.assign({tagging:""},te.subres),te.versionId&&(te.subres.versionId=te.versionId),z=this._objectName(z),se=this._objectRequestParams("GET",z,te),se.successStatuses=[200],De.next=8,this.request(se);case 8:return ie=De.sent,De.next=11,this.parseXML(ie.data);case 11:return le=De.sent,ce=le.TagSet.Tag,ce=ce&&Ae(ce)?[ce]:ce||[],pe={},ce.forEach(function(Fe){pe[Fe.Key]=Fe.Value}),De.abrupt("return",{status:ie.status,res:ie.res,tag:pe});case 17:case"end":return De.stop()}},fe,this)}));function Pe(fe){return me.apply(this,arguments)}return Pe}()},{"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],42:[function(oe,He,Re){"use strict";var de=oe("../utils/isIP"),ve=de.isIP,Ee=Re;Ee.getObjectUrl=function(Se,Ae){if(ve(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return Ae?Ae[Ae.length-1]!=="/"&&(Ae+="/"):Ae=this.options.endpoint.format(),Ae+this._escape(this._objectName(Se))}},{"../utils/isIP":69}],43:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=Re;ke.getSymlink=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe){var fe,z,te,se,ie=arguments;return ve.default.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return fe=ie.length>1&&ie[1]!==void 0?ie[1]:{},fe.subres=Object.assign({symlink:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),Pe=this._objectName(Pe),z=this._objectRequestParams("GET",Pe,fe),z.successStatuses=[200],ce.next=8,this.request(z);case 8:return te=ce.sent,se=te.res.headers["x-oss-symlink-target"],ce.abrupt("return",{targetName:decodeURIComponent(se),res:te.res});case 11:case"end":return ce.stop()}},me,this)}));function Ae(me){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkEnv"),Se=ke.checkEnv,Ae=Re;Ae.head=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z){var te,se,ie,le,ce=arguments;return ve.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return te=ce.length>1&&ce[1]!==void 0?ce[1]:{},Se("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),te.subres=Object.assign({},te.subres),te.versionId&&(te.subres.versionId=te.versionId),se=this._objectRequestParams("HEAD",z,te),se.successStatuses=[200,304],xe.next=8,this.request(se);case 8:return ie=xe.sent,le={meta:null,res:ie.res,status:ie.status},ie.status===200&&Object.keys(ie.headers).forEach(function(je){je.indexOf("x-oss-meta-")===0&&(le.meta||(le.meta={}),le.meta[je.substring(11)]=ie.headers[je])}),xe.abrupt("return",le);case 12:case"end":return xe.stop()}},fe,this)}));function Pe(fe){return me.apply(this,arguments)}return Pe}()},{"../utils/checkEnv":53,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],45:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=Re;ke.putACL=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe,fe,z){var te,se;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=z||{},z.subres=Object.assign({acl:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.headers=z.headers||{},z.headers["x-oss-object-acl"]=fe,Pe=this._objectName(Pe),te=this._objectRequestParams("PUT",Pe,z),te.successStatuses=[200],le.next=10,this.request(te);case 10:return se=le.sent,le.abrupt("return",{res:se.res});case 12:case"end":return le.stop()}},me,this)}));function Ae(me,Pe,fe){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.object.keys.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/obj2xml"),Se=ke.obj2xml,Ae=oe("../utils/checkObjectTag"),me=Ae.checkObjectTag,Pe=Re;Pe.putObjectTagging=function(){var fe=(0,Ee.default)(ve.default.mark(function te(se,ie){var le,ce,pe,xe,je=arguments;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return le=je.length>2&&je[2]!==void 0?je[2]:{},me(ie),le.subres=Object.assign({tagging:""},le.subres),le.versionId&&(le.subres.versionId=le.versionId),se=this._objectName(se),ce=this._objectRequestParams("PUT",se,le),ce.successStatuses=[200],ie=Object.keys(ie).map(function(Te){return{Key:Te,Value:ie[Te]}}),pe={Tagging:{TagSet:{Tag:ie}}},ce.mime="xml",ce.content=Se(pe),Fe.next=13,this.request(ce);case 13:return xe=Fe.sent,Fe.abrupt("return",{res:xe.res,status:xe.status});case 15:case"end":return Fe.stop()}},te,this)}));function z(te,se){return fe.apply(this,arguments)}return z}()},{"../utils/checkObjectTag":54,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290}],47:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=Re;ke.putSymlink=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe,fe,z){var te,se;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=z||{},z.headers=z.headers||{},fe=this._escape(this._objectName(fe)),this._convertMetaToHeaders(z.meta,z.headers),z.headers["x-oss-symlink-target"]=fe,z.subres=Object.assign({symlink:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.storageClass&&(z.headers["x-oss-storage-class"]=z.storageClass),Pe=this._objectName(Pe),te=this._objectRequestParams("PUT",Pe,z),te.successStatuses=[200],le.next=13,this.request(te);case 13:return se=le.sent,le.abrupt("return",{res:se.res});case 15:case"end":return le.stop()}},me,this)}));function Ae(me,Pe,fe){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(oe,He,Re){"use strict";var de=oe("url"),ve=oe("utility"),Ee=oe("copy-to"),ke=oe("../../common/signUtils"),Se=oe("../utils/isIP"),Ae=Se.isIP,me=Re;me.signatureUrl=function(fe,z){if(Ae(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");z=z||{},fe=this._objectName(fe),z.method=z.method||"GET";var te=ve.timestamp()+(z.expires||1800),se={bucket:this.options.bucket,object:fe},ie=this._getResource(se);this.options.stsToken&&(z["security-token"]=this.options.stsToken);var le=ke._signatureForURL(this.options.accessKeySecret,z,ie,te),ce=de.parse(this._getReqUrl(se));return ce.query={OSSAccessKeyId:this.options.accessKeyId,Expires:te,Signature:le.Signature},Ee(le.subResource).to(ce.query),ce.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/web.dom-collections.iterator.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.function.name.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("./utils/isArray"),Se=ke.isArray,Ae=Re;Ae._parallelNode=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se,ie){var le,ce,pe,xe,je,De,Fe,Te;return ve.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:le=this,ce=[],pe=[],xe=z.length/te,je=z.length%te,De=je===0?xe:(z.length-je)/te+1,Fe=1,Te=0;case 8:if(!(Te<z.length)){Be.next=26;break}if(!le.isCancel()){Be.next=11;break}return Be.abrupt("break",26);case 11:if(ie?pe.push(se(le,z[Te],ie)):pe.push(se(le,z[Te])),!(pe.length===te||Fe===De&&Te===z.length-1)){Be.next=23;break}return Be.prev=13,Fe+=1,Be.next=17,Promise.all(pe);case 17:Be.next=22;break;case 19:Be.prev=19,Be.t0=Be.catch(13),ce.push(Be.t0);case 22:pe=[];case 23:Te++,Be.next=8;break;case 26:return Be.abrupt("return",ce);case 27:case"end":return Be.stop()}},fe,this,[[13,19]])}));function Pe(fe,z,te,se){return me.apply(this,arguments)}return Pe}(),Ae._parallel=function(Pe,fe,z){var te=this;return new Promise(function(se){var ie=[];if(fe<=0||!Pe){se(ie);return}function le(Be){return function(){if(Be===null)throw new Error("Callback was already called.");var Ue=Be;Be=null;for(var Ye=arguments.length,Ve=new Array(Ye),Ze=0;Ze<Ye;Ze++)Ve[Ze]=arguments[Ze];Ue.apply(this,Ve)}}function ce(Be){var Ue=-1,Ye=Be.length;return function(){return++Ue<Ye&&!te.isCancel()?{value:Be[Ue],key:Ue}:null}}var pe=ce(Pe),xe=!1,je=0,De=!1;function Fe(Be){je-=1,Be?(xe=!0,ie.push(Be),se(ie)):xe&&je<=0?(xe=!0,se(ie)):De||(te.isCancel()?se(ie):Me())}function Te(Be,Ue){z(Be).then(function(Ye){Ue(null,Ye)}).catch(function(Ye){Ue(Ye)})}function Me(){for(De=!0;je<fe&&!xe&&!te.isCancel();){var Be=pe();if(Be===null||ie.length>0){xe=!0,je<=0&&se(ie);return}je+=1,Te(Be.value,le(Fe))}De=!1}Me()})},Ae.cancel=function(Pe){this.options.cancelFlag=!0,Se(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(fe){if(fe.destroyed===!1){var z={name:"cancel",message:"cancel"};fe.destroy(z)}}),this.multipartUploadStreams=[],Pe&&this.abortMultipartUpload(Pe.name,Pe.uploadId,Pe.options)},Ae.isCancel=function(){return this.options.cancelFlag},Ae.resetCancelFlag=function(){this.options.cancelFlag=!1},Ae._stop=function(){this.options.cancelFlag=!0},Ae._makeCancelEvent=function(){var Pe={status:0,name:"cancel"};return Pe},Ae._makeAbortEvent=function(){var Pe={status:0,name:"abort",message:"upload task has been abort"};return Pe}},{"./utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.string.iterator.js":303,"core-js/modules/web.dom-collections.for-each.js":339,"core-js/modules/web.dom-collections.iterator.js":340}],50:[function(oe,He,Re){(function(de){(function(){"use strict";oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.array.sort.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js");var ve=oe("./../../shims/crypto/crypto.js"),Ee=oe("is-type-of"),ke=oe("./utils/lowercaseKeyHeader"),Se=ke.lowercaseKeyHeader;Re.buildCanonicalizedResource=function(me,Pe){var fe="".concat(me),z="?";if(Ee.string(Pe)&&Pe.trim()!=="")fe+=z+Pe;else if(Ee.array(Pe))Pe.sort(),fe+=z+Pe.join("&");else if(Pe){var te=function(le,ce){return le[0]>ce[0]?1:le[0]<ce[0]?-1:0},se=function(le){fe+=z+le,(Pe[le]||Pe[le]===0)&&(fe+="=".concat(Pe[le])),z="&"};Object.keys(Pe).sort(te).forEach(se)}return fe},Re.buildCanonicalString=function(me,Pe,fe,z){fe=fe||{};var te=Se(fe.headers),se="x-oss-",ie=[],le={},ce=[me.toUpperCase(),te["content-md5"]||"",te["content-type"],z||te["x-oss-date"]];return Object.keys(te).forEach(function(pe){var xe=pe.toLowerCase();xe.indexOf(se)===0&&(le[xe]=String(te[pe]).trim())}),Object.keys(le).sort().forEach(function(pe){ie.push("".concat(pe,":").concat(le[pe]))}),ce=ce.concat(ie),ce.push(this.buildCanonicalizedResource(Pe,fe.parameters)),ce.join(`
|
|
`)},Re.computeSignature=function(me,Pe){var fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",z=ve.createHmac("sha1",me);return z.update(de.from(Pe,fe)).digest("base64")},Re.authorization=function(me,Pe,fe,z){return"OSS ".concat(me,":").concat(this.computeSignature(Pe,fe,z))},Re._signatureForURL=function(me){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},fe=arguments.length>2?arguments[2]:void 0,z=arguments.length>3?arguments[3]:void 0,te=arguments.length>4?arguments[4]:void 0,se={},ie=Pe.subResource,le=ie===void 0?{}:ie;if(Pe.process){var ce="x-oss-process";le[ce]=Pe.process}if(Pe.trafficLimit){var pe="x-oss-traffic-limit";le[pe]=Pe.trafficLimit}if(Pe.response&&Object.keys(Pe.response).forEach(function(Fe){var Te="response-".concat(Fe.toLowerCase());le[Te]=Pe.response[Fe]}),Object.keys(Pe).forEach(function(Fe){var Te=Fe.toLowerCase(),Me=Pe[Fe];Te.indexOf("x-oss-")===0?se[Te]=Me:(Te.indexOf("content-md5")===0||Te.indexOf("content-type")===0)&&(se[Fe]=Me)}),Object.prototype.hasOwnProperty.call(Pe,"security-token")&&(le["security-token"]=Pe["security-token"]),Object.prototype.hasOwnProperty.call(Pe,"callback")){var xe={callbackUrl:encodeURI(Pe.callback.url),callbackBody:Pe.callback.body};if(Pe.callback.host&&(xe.callbackHost=Pe.callback.host),Pe.callback.contentType&&(xe.callbackBodyType=Pe.callback.contentType),le.callback=de.from(JSON.stringify(xe)).toString("base64"),Pe.callback.customValue){var je={};Object.keys(Pe.callback.customValue).forEach(function(Fe){je["x:".concat(Fe)]=Pe.callback.customValue[Fe]}),le["callback-var"]=de.from(JSON.stringify(je)).toString("base64")}}var De=this.buildCanonicalString(Pe.method,fe,{headers:se,parameters:le},z.toString());return{Signature:this.computeSignature(me,De,te),subResource:le}}}).call(this)}).call(this,oe("buffer").Buffer)},{"./../../shims/crypto/crypto.js":461,"./utils/lowercaseKeyHeader":71,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.trim.js":308,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466}],51:[function(oe,He,Re){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkBucketName=void 0,Re.checkBucketName=function(de){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ee=ve?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!Ee.test(de))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(oe,He,Re){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkConfigValid=void 0;var de={endpoint:ve,region:/^[a-zA-Z0-9\-_]+$/};function ve(Ee){return typeof Ee=="string"?/^[a-zA-Z0-9._:/-]+$/.test(Ee):Ee.host?/^[a-zA-Z0-9._:/-]+$/.test(Ee.host):!1}Re.checkConfigValid=function(Ee,ke){if(de[ke]){var Se=!0;if(de[ke]instanceof Function?Se=de[ke](Ee):Se=de[ke].test(Ee),!Se)throw new Error("The ".concat(ke," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(oe,He,Re){(function(de){(function(){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkEnv=void 0;function ve(Ee){de.browser&&console.warn(Ee)}Re.checkEnv=ve}).call(this)}).call(this,oe("_process"))},{_process:467}],54:[function(oe,He,Re){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.entries.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkObjectTag=void 0;var de=oe("./checkValid"),ve=de.checkValid,Ee=oe("./isObject"),ke=Ee.isObject,Se=[{validator:function(fe){if(typeof fe!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],Ae={key:[].concat(Se,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(Se,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function me(Pe){if(!ke(Pe))throw new Error("tag must be Object");var fe=Object.entries(Pe);if(fe.length>10)throw new Error("maximum of 10 tags for a object");var z=["key","value"];fe.forEach(function(te){te.forEach(function(se,ie){ve(se,Ae[z[ie]])})})}Re.checkObjectTag=me},{"./checkValid":55,"./isObject":70,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],55:[function(oe,He,Re){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkValid=void 0;function de(ve,Ee){Ee.forEach(function(ke){if(ke.validator)ke.validator(ve);else if(ke.pattern&&!ke.pattern.test(ve))throw new Error(ke.msg)})}Re.checkValid=de},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],56:[function(oe,He,Re){(function(de){(function(){"use strict";oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.concat.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.createRequest=void 0;var ve=oe("./../../../shims/crypto/crypto.js"),Ee=oe("debug")("ali-oss"),ke=oe("mime"),Se=oe("dateformat"),Ae=oe("copy-to"),me=oe("path"),Pe=oe("./encoder"),fe=Pe.encoder,z=oe("./isIP"),te=z.isIP,se=oe("./setRegion"),ie=se.setRegion,le=oe("../client/getReqUrl"),ce=le.getReqUrl,pe=oe("./isDingTalk"),xe=pe.isDingTalk;function je(Te,Me){return Te[Me]||Te[Me.toLowerCase()]}function De(Te,Me){delete Te[Me],delete Te[Me.toLowerCase()]}function Fe(Te){var Me=new Date;this.options.amendTimeSkewed&&(Me=+new Date+this.options.amendTimeSkewed);var Be={"x-oss-date":Se(Me,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(Be["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(Be["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(Be,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(Be["x-oss-security-token"]=this.options.stsToken),Ae(Te.headers).to(Be),je(Be,"Content-Type")||(Te.mime&&Te.mime.indexOf("/")>0?Be["Content-Type"]=Te.mime:xe()?Be["Content-Type"]="application/octet-stream":Be["Content-Type"]=ke.getType(Te.mime||me.extname(Te.object||""))),je(Be,"Content-Type")||De(Be,"Content-Type"),Te.content&&(Te.disabledMD5||(!Te.headers||!Te.headers["Content-MD5"]?Be["Content-MD5"]=ve.createHash("md5").update(de.from(Te.content,"utf8")).digest("base64"):Be["Content-MD5"]=Te.headers["Content-MD5"]),Be["Content-Length"]||(Be["Content-Length"]=Te.content.length));var Ue=Object.prototype.hasOwnProperty;for(var Ye in Be)Be[Ye]&&Ue.call(Be,Ye)&&(Be[Ye]=fe(String(Be[Ye]),this.options.headerEncoding));var Ve=this._getResource(Te);if(Be.authorization=this.authorization(Te.method,Ve,Te.subres,Be,this.options.headerEncoding),te(this.options.endpoint.hostname)){var Ze=this.options,ot=Ze.region,lt=Ze.internal,ft=Ze.secure,St=ie(ot,lt,ft);Be.host="".concat(Te.bucket,".").concat(St.host)}var qe=ce.bind(this)(Te);Ee("request %s %s, with headers %j, !!stream: %s",Te.method,qe,Be,!!Te.stream);var rt=Te.timeout||this.options.timeout,wt={method:Te.method,content:Te.content,stream:Te.stream,headers:Be,timeout:rt,writeStream:Te.writeStream,customResponse:Te.customResponse,ctx:Te.ctx||this.ctx};return this.agent&&(wt.agent=this.agent),this.httpsAgent&&(wt.httpsAgent=this.httpsAgent),wt.enableProxy=!!this.options.enableProxy,wt.proxy=this.options.proxy?this.options.proxy:null,{url:qe,params:wt}}Re.createRequest=Fe}).call(this)}).call(this,oe("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":461,"./encoder":59,"./isDingTalk":66,"./isIP":69,"./setRegion":75,buffer:90,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.includes.js":302,dateformat:342,debug:465,mime:374,path:378}],57:[function(oe,He,Re){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.entries.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.object.keys.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.dataFix=void 0;var de=oe("./isObject"),ve=["true","TRUE","1",1],Ee=["false","FALSE","0",0];function ke(me,Pe,fe){if(de.isObject(me)){var z=Pe.remove,te=z===void 0?[]:z,se=Pe.rename,ie=se===void 0?{}:se,le=Pe.camel,ce=le===void 0?[]:le,pe=Pe.bool,xe=pe===void 0?[]:pe,je=Pe.lowerFirst,De=je===void 0?!1:je;return te.forEach(function(Fe){return delete me[Fe]}),Object.entries(ie).forEach(function(Fe){me[Fe[0]]&&(me[Fe[1]]||(me[Fe[1]]=me[Fe[0]],delete me[Fe[0]]))}),ce.forEach(function(Fe){if(me[Fe]){var Te=Fe.replace(/^(.)/,function(Me){return Me.toLowerCase()}).replace(/-(\w)/g,function(Me,Be){return Be.toUpperCase()});me[Te]||(me[Te]=me[Fe])}}),xe.forEach(function(Fe){me[Fe]=Se(me[Fe])}),typeof fe=="function"&&fe(me),Ae(me,De),ke}}Re.dataFix=ke;function Se(me){return me?ve.includes(me)?!0:Ee.includes(me)?!1:me:!1}function Ae(me,Pe){Pe&&Object.keys(me).forEach(function(fe){var z=fe.replace(/^\w/,function(te){return te.toLowerCase()});typeof me[z]=="undefined"&&(me[z]=me[fe],delete me[fe])})}},{"./isObject":70,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],58:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js");var ve=de(oe("@babel/runtime/helpers/typeof"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.deepCopyWith=Re.deepCopy=void 0;var Ee=oe("./isBuffer");Re.deepCopy=function(ke){if(ke===null||(0,ve.default)(ke)!=="object")return ke;if(Ee.isBuffer(ke))return ke.slice();var Se=Array.isArray(ke)?[]:{};return Object.keys(ke).forEach(function(Ae){Se[Ae]=Re.deepCopy(ke[Ae])}),Se},Re.deepCopyWith=function(ke,Se){function Ae(me,Pe,fe){var z=Se(me,Pe,fe);if(z!==void 0)return z;if(me===null||(0,ve.default)(me)!=="object")return me;if(Ee.isBuffer(me))return me.slice();var te=Array.isArray(me)?[]:{};return Object.keys(me).forEach(function(se){te[se]=Ae(me[se],se,me)}),te}return Se?Ae(ke,"",null):Re.deepCopy(ke)}},{"./isBuffer":65,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],59:[function(oe,He,Re){(function(de){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.encoder=void 0;function ve(Ee){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return ke==="utf-8"?Ee:de.from(Ee).toString("latin1")}Re.encoder=ve}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(oe,He,Re){"use strict";oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.formatInventoryConfig=void 0;var de=oe("../utils/dataFix"),ve=oe("../utils/isObject"),Ee=oe("../utils/isArray"),ke=oe("../utils/formatObjKey");function Se(me){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Pe&&ve.isObject(me)&&(me=[me]),Ee.isArray(me)?me=me.map(Ae):me=Ae(me),me}Re.formatInventoryConfig=Se;function Ae(me){return de.dataFix(me,{bool:["IsEnabled"]},function(Pe){var fe,z;Pe.prefix=Pe.Filter.Prefix,delete Pe.Filter,Pe.OSSBucketDestination=Pe.Destination.OSSBucketDestination,Pe.OSSBucketDestination.rolename=Pe.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete Pe.OSSBucketDestination.RoleArn,Pe.OSSBucketDestination.bucket=Pe.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete Pe.OSSBucketDestination.Bucket,delete Pe.Destination,Pe.frequency=Pe.Schedule.Frequency,delete Pe.Schedule.Frequency,!((fe=Pe==null?void 0:Pe.OptionalFields)===null||fe===void 0)&&fe.Field&&!Ee.isArray((z=Pe.OptionalFields)===null||z===void 0?void 0:z.Field)&&(Pe.OptionalFields.Field=[Pe.OptionalFields.Field])}),me=ke.formatObjKey(me,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),me}},{"../utils/dataFix":57,"../utils/formatObjKey":61,"../utils/isArray":63,"../utils/isObject":70,"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305}],61:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js");var ve=de(oe("@babel/runtime/helpers/typeof"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.formatObjKey=void 0;function Ee(Se,Ae,me){if(Se===null||(0,ve.default)(Se)!=="object")return Se;var Pe;if(Array.isArray(Se)){Pe=[];for(var fe=0;fe<Se.length;fe++)Pe.push(Ee(Se[fe],Ae,me))}else Pe={},Object.keys(Se).forEach(function(z){Pe[ke(z,Ae,me)]=Ee(Se[z],Ae,me)});return Pe}Re.formatObjKey=Ee;function ke(Se,Ae,me){return me&&me.exclude&&me.exclude.includes(Se)||(Ae==="firstUpperCase"?Se=Se.replace(/^./,function(Pe){return Pe.toUpperCase()}):Ae==="firstLowerCase"&&(Se=Se.replace(/^./,function(Pe){return Pe.toLowerCase()}))),Se}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.includes.js":302,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],62:[function(oe,He,Re){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.getStrBytesCount=void 0;function de(ve){for(var Ee=0,ke=0;ke<ve.length;ke++){var Se=ve.charAt(ke);/^[\u00-\uff]$/.test(Se)?Ee+=1:Ee+=2}return Ee}Re.getStrBytesCount=de},{"core-js/modules/es.regexp.exec.js":300}],63:[function(oe,He,Re){"use strict";oe("core-js/modules/es.object.to-string.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.isArray=void 0,Re.isArray=function(de){return Object.prototype.toString.call(de)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(oe,He,Re){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.isBlob=void 0;function de(ve){return typeof Blob!="undefined"&&ve instanceof Blob}Re.isBlob=de},{}],65:[function(oe,He,Re){(function(de){(function(){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.isBuffer=void 0;function ve(Ee){return de.isBuffer(Ee)}Re.isBuffer=ve}).call(this)}).call(this,{isBuffer:oe("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(oe,He,Re){(function(de){(function(){"use strict";oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.isDingTalk=void 0;function ve(){return!!(de.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}Re.isDingTalk=ve}).call(this)}).call(this,oe("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(oe,He,Re){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.isFile=void 0,Re.isFile=function(de){return typeof File!="undefined"&&de instanceof File}},{}],68:[function(oe,He,Re){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.isFunction=void 0,Re.isFunction=function(de){return typeof de=="function"}},{}],69:[function(oe,He,Re){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.isIP=void 0,Re.isIP=function(de){var ve=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,Ee=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return ve.test(de)||Ee.test(de)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(oe,He,Re){"use strict";oe("core-js/modules/es.object.to-string.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.isObject=void 0,Re.isObject=function(de){return Object.prototype.toString.call(de)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(oe,He,Re){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.lowercaseKeyHeader=void 0;var de=oe("./isObject");function ve(Ee){var ke={};return de.isObject(Ee)&&Object.keys(Ee).forEach(function(Se){ke[Se.toLowerCase()]=Ee[Se]}),ke}Re.lowercaseKeyHeader=ve},{"./isObject":70,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],72:[function(oe,He,Re){"use strict";oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.obj2xml=void 0;var de=oe("./formatObjKey");function ve(ke){return Object.prototype.toString.call(ke).replace(/(.*? |])/g,"").toLowerCase()}function Ee(ke,Se){var Ae="";return Se&&Se.headers&&(Ae=`<?xml version="1.0" encoding="UTF-8"?>
|
|
`),Se&&Se.firstUpperCase&&(ke=de.formatObjKey(ke,"firstUpperCase")),ve(ke)==="object"?Object.keys(ke).forEach(function(me){ve(ke[me])!=="undefined"&&ve(ke[me])!=="null"&&(ve(ke[me])==="string"||ve(ke[me])==="number"?Ae+="<".concat(me,">").concat(ke[me],"</").concat(me,">"):ve(ke[me])==="object"?Ae+="<".concat(me,">").concat(Ee(ke[me]),"</").concat(me,">"):ve(ke[me])==="array"?Ae+=ke[me].map(function(Pe){return"<".concat(me,">").concat(Ee(Pe),"</").concat(me,">")}).join(""):Ae+="<".concat(me,">").concat(ke[me].toString(),"</").concat(me,">"))}):Ae+=ke.toString(),Ae}Re.obj2xml=Ee},{"./formatObjKey":61,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],73:[function(oe,He,Re){"use strict";oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.symbol.js"),oe("core-js/modules/es.symbol.description.js"),oe("core-js/modules/es.symbol.iterator.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/web.dom-collections.iterator.js"),oe("core-js/modules/es.object.assign.js");function de(Se,Ae){var me=typeof Symbol!="undefined"&&Se[Symbol.iterator]||Se["@@iterator"];if(!me){if(Array.isArray(Se)||(me=ve(Se))||Ae&&Se&&typeof Se.length=="number"){me&&(Se=me);var Pe=0,fe=function(){};return{s:fe,n:function(){return Pe>=Se.length?{done:!0}:{done:!1,value:Se[Pe++]}},e:function(le){throw le},f:fe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var z=!0,te=!1,se;return{s:function(){me=me.call(Se)},n:function(){var le=me.next();return z=le.done,le},e:function(le){te=!0,se=le},f:function(){try{!z&&me.return!=null&&me.return()}finally{if(te)throw se}}}}function ve(Se,Ae){if(Se){if(typeof Se=="string")return Ee(Se,Ae);var me=Object.prototype.toString.call(Se).slice(8,-1);if(me==="Object"&&Se.constructor&&(me=Se.constructor.name),me==="Map"||me==="Set")return Array.from(Se);if(me==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(me))return Ee(Se,Ae)}}function Ee(Se,Ae){(Ae==null||Ae>Se.length)&&(Ae=Se.length);for(var me=0,Pe=new Array(Ae);me<Ae;me++)Pe[me]=Se[me];return Pe}Object.defineProperty(Re,"__esModule",{value:!0}),Re.omit=void 0;function ke(Se,Ae){var me=Object.assign({},Se),Pe=de(Ae),fe;try{for(Pe.s();!(fe=Pe.n()).done;){var z=fe.value;delete me[z]}}catch(te){Pe.e(te)}finally{Pe.f()}return me}Re.omit=ke},{"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.iterator.js":312,"core-js/modules/es.symbol.js":313,"core-js/modules/web.dom-collections.iterator.js":340}],74:[function(oe,He,Re){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.retry=void 0;function de(ve,Ee){var ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Se=0,Ae=ke.retryDelay,me=Ae===void 0?500:Ae,Pe=ke.errorHandler,fe=Pe===void 0?function(){return!0}:Pe,z=function te(){for(var se=arguments.length,ie=new Array(se),le=0;le<se;le++)ie[le]=arguments[le];return new Promise(function(ce,pe){ve.apply(void 0,ie).then(function(xe){Se=0,ce(xe)}).catch(function(xe){Se<Ee&&fe(xe)?(Se++,setTimeout(function(){ce(te.apply(void 0,ie))},me)):(Se=0,pe(xe))})})};return z}Re.retry=de},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(oe,He,Re){"use strict";var de=function(Se){return Se&&Se.__esModule?Se:{default:Se}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.setRegion=void 0;var ve=de(oe("url")),Ee=oe("./checkConfigValid");function ke(Se){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Ee.checkConfigValid(Se,"region");var Pe=me?"https://":"http://",fe=Ae?"-internal.aliyuncs.com":".aliyuncs.com",z="vpc100-oss-cn-";return Se.substr(0,z.length)===z&&(fe=".aliyuncs.com"),ve.default.parse(Pe+Se+fe)}Re.setRegion=ke},{"./checkConfigValid":52,url:472}],76:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkCredentials=Re.setSTSToken=void 0;var ke=oe("./formatObjKey");function Se(){return Ae.apply(this,arguments)}function Ae(){return Ae=(0,Ee.default)(ve.default.mark(function Pe(){var fe,z;return ve.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(this.options||(this.options={}),fe=new Date,!this.stsTokenFreshTime){se.next=14;break}if(!(+fe-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){se.next=12;break}return this.stsTokenFreshTime=fe,se.next=7,this.options.refreshSTSToken();case 7:z=se.sent,z=ke.formatObjKey(z,"firstLowerCase"),z.securityToken&&(z.stsToken=z.securityToken),me(z),Object.assign(this.options,z);case 12:se.next=15;break;case 14:this.stsTokenFreshTime=fe;case 15:return se.abrupt("return",null);case 16:case"end":return se.stop()}},Pe,this)})),Ae.apply(this,arguments)}Re.setSTSToken=Se;function me(Pe){var fe=["accessKeySecret","accessKeyId","stsToken"],z=Object.keys(Pe);fe.forEach(function(te){if(!z.find(function(se){return se===te}))throw Error("refreshSTSToken must return contains ".concat(te))})}Re.checkCredentials=me},{"./formatObjKey":61,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.find.js":275,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291}],77:[function(oe,He,Re){function de(Ee,ke,Se,Ae,me,Pe,fe){try{var z=Ee[Pe](fe),te=z.value}catch(se){Se(se);return}z.done?ke(te):Promise.resolve(te).then(Ae,me)}function ve(Ee){return function(){var ke=this,Se=arguments;return new Promise(function(Ae,me){var Pe=Ee.apply(ke,Se);function fe(te){de(Pe,Ae,me,fe,z,"next",te)}function z(te){de(Pe,Ae,me,fe,z,"throw",te)}fe(void 0)})}}He.exports=ve,He.exports.__esModule=!0,He.exports.default=He.exports},{}],78:[function(oe,He,Re){function de(ve){return ve&&ve.__esModule?ve:{default:ve}}He.exports=de,He.exports.__esModule=!0,He.exports.default=He.exports},{}],79:[function(oe,He,Re){function de(ve){"@babel/helpers - typeof";return He.exports=de=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ee){return typeof Ee}:function(Ee){return Ee&&typeof Symbol=="function"&&Ee.constructor===Symbol&&Ee!==Symbol.prototype?"symbol":typeof Ee},He.exports.__esModule=!0,He.exports.default=He.exports,de(ve)}He.exports=de,He.exports.__esModule=!0,He.exports.default=He.exports},{}],80:[function(oe,He,Re){He.exports=oe("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(oe,He,Re){He.exports=de,He.exports.HttpsAgent=de;function de(){}},{}],82:[function(oe,He,Re){(function(de){(function(){"use strict";var ve=oe("object-assign");function Ee(ot,lt){if(ot===lt)return 0;for(var ft=ot.length,St=lt.length,qe=0,rt=Math.min(ft,St);qe<rt;++qe)if(ot[qe]!==lt[qe]){ft=ot[qe],St=lt[qe];break}return ft<St?-1:St<ft?1:0}function ke(ot){return de.Buffer&&typeof de.Buffer.isBuffer=="function"?de.Buffer.isBuffer(ot):!!(ot!=null&&ot._isBuffer)}var Se=oe("util/"),Ae=Object.prototype.hasOwnProperty,me=Array.prototype.slice,Pe=function(){return function(){}.name==="foo"}();function fe(ot){return Object.prototype.toString.call(ot)}function z(ot){return ke(ot)||typeof de.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(ot):ot?!!(ot instanceof DataView||ot.buffer&&ot.buffer instanceof ArrayBuffer):!1}var te=He.exports=je,se=/\s*function\s+([^\(\s]*)\s*/;function ie(ot){if(Se.isFunction(ot)){if(Pe)return ot.name;var lt=ot.toString(),ft=lt.match(se);return ft&&ft[1]}}te.AssertionError=function(lt){this.name="AssertionError",this.actual=lt.actual,this.expected=lt.expected,this.operator=lt.operator,lt.message?(this.message=lt.message,this.generatedMessage=!1):(this.message=pe(this),this.generatedMessage=!0);var ft=lt.stackStartFunction||xe;if(Error.captureStackTrace)Error.captureStackTrace(this,ft);else{var St=new Error;if(St.stack){var qe=St.stack,rt=ie(ft),wt=qe.indexOf(`
|
|
`+rt);if(wt>=0){var Ct=qe.indexOf(`
|
|
`,wt+1);qe=qe.substring(Ct+1)}this.stack=qe}}},Se.inherits(te.AssertionError,Error);function le(ot,lt){return typeof ot=="string"?ot.length<lt?ot:ot.slice(0,lt):ot}function ce(ot){if(Pe||!Se.isFunction(ot))return Se.inspect(ot);var lt=ie(ot),ft=lt?": "+lt:"";return"[Function"+ft+"]"}function pe(ot){return le(ce(ot.actual),128)+" "+ot.operator+" "+le(ce(ot.expected),128)}function xe(ot,lt,ft,St,qe){throw new te.AssertionError({message:ft,actual:ot,expected:lt,operator:St,stackStartFunction:qe})}te.fail=xe;function je(ot,lt){ot||xe(ot,!0,lt,"==",te.ok)}te.ok=je,te.equal=function(lt,ft,St){lt!=ft&&xe(lt,ft,St,"==",te.equal)},te.notEqual=function(lt,ft,St){lt==ft&&xe(lt,ft,St,"!=",te.notEqual)},te.deepEqual=function(lt,ft,St){De(lt,ft,!1)||xe(lt,ft,St,"deepEqual",te.deepEqual)},te.deepStrictEqual=function(lt,ft,St){De(lt,ft,!0)||xe(lt,ft,St,"deepStrictEqual",te.deepStrictEqual)};function De(ot,lt,ft,St){if(ot===lt)return!0;if(ke(ot)&&ke(lt))return Ee(ot,lt)===0;if(Se.isDate(ot)&&Se.isDate(lt))return ot.getTime()===lt.getTime();if(Se.isRegExp(ot)&&Se.isRegExp(lt))return ot.source===lt.source&&ot.global===lt.global&&ot.multiline===lt.multiline&&ot.lastIndex===lt.lastIndex&&ot.ignoreCase===lt.ignoreCase;if((ot===null||typeof ot!="object")&&(lt===null||typeof lt!="object"))return ft?ot===lt:ot==lt;if(z(ot)&&z(lt)&&fe(ot)===fe(lt)&&!(ot instanceof Float32Array||ot instanceof Float64Array))return Ee(new Uint8Array(ot.buffer),new Uint8Array(lt.buffer))===0;if(ke(ot)!==ke(lt))return!1;St=St||{actual:[],expected:[]};var qe=St.actual.indexOf(ot);return qe!==-1&&qe===St.expected.indexOf(lt)?!0:(St.actual.push(ot),St.expected.push(lt),Te(ot,lt,ft,St))}function Fe(ot){return Object.prototype.toString.call(ot)=="[object Arguments]"}function Te(ot,lt,ft,St){if(ot==null||lt===null||lt===void 0)return!1;if(Se.isPrimitive(ot)||Se.isPrimitive(lt))return ot===lt;if(ft&&Object.getPrototypeOf(ot)!==Object.getPrototypeOf(lt))return!1;var qe=Fe(ot),rt=Fe(lt);if(qe&&!rt||!qe&&rt)return!1;if(qe)return ot=me.call(ot),lt=me.call(lt),De(ot,lt,ft);var wt=Ze(ot),Ct=Ze(lt),bt,ct;if(wt.length!==Ct.length)return!1;for(wt.sort(),Ct.sort(),ct=wt.length-1;ct>=0;ct--)if(wt[ct]!==Ct[ct])return!1;for(ct=wt.length-1;ct>=0;ct--)if(bt=wt[ct],!De(ot[bt],lt[bt],ft,St))return!1;return!0}te.notDeepEqual=function(lt,ft,St){De(lt,ft,!1)&&xe(lt,ft,St,"notDeepEqual",te.notDeepEqual)},te.notDeepStrictEqual=Me;function Me(ot,lt,ft){De(ot,lt,!0)&&xe(ot,lt,ft,"notDeepStrictEqual",Me)}te.strictEqual=function(lt,ft,St){lt!==ft&&xe(lt,ft,St,"===",te.strictEqual)},te.notStrictEqual=function(lt,ft,St){lt===ft&&xe(lt,ft,St,"!==",te.notStrictEqual)};function Be(ot,lt){if(!ot||!lt)return!1;if(Object.prototype.toString.call(lt)=="[object RegExp]")return lt.test(ot);try{if(ot instanceof lt)return!0}catch(ft){}return Error.isPrototypeOf(lt)?!1:lt.call({},ot)===!0}function Ue(ot){var lt;try{ot()}catch(ft){lt=ft}return lt}function Ye(ot,lt,ft,St){var qe;if(typeof lt!="function")throw new TypeError('"block" argument must be a function');typeof ft=="string"&&(St=ft,ft=null),qe=Ue(lt),St=(ft&&ft.name?" ("+ft.name+").":".")+(St?" "+St:"."),ot&&!qe&&xe(qe,ft,"Missing expected exception"+St);var rt=typeof St=="string",wt=!ot&&Se.isError(qe),Ct=!ot&&qe&&!ft;if((wt&&rt&&Be(qe,ft)||Ct)&&xe(qe,ft,"Got unwanted exception"+St),ot&&qe&&ft&&!Be(qe,ft)||!ot&&qe)throw qe}te.throws=function(ot,lt,ft){Ye(!0,ot,lt,ft)},te.doesNotThrow=function(ot,lt,ft){Ye(!1,ot,lt,ft)},te.ifError=function(ot){if(ot)throw ot};function Ve(ot,lt){ot||xe(ot,!0,lt,"==",Ve)}te.strict=ve(Ve,te,{equal:te.strictEqual,deepEqual:te.deepStrictEqual,notEqual:te.notStrictEqual,notDeepEqual:te.notDeepStrictEqual}),te.strict.strict=te.strict;var Ze=Object.keys||function(ot){var lt=[];for(var ft in ot)Ae.call(ot,ft)&<.push(ft);return lt}}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(oe,He,Re){typeof Object.create=="function"?He.exports=function(ve,Ee){ve.super_=Ee,ve.prototype=Object.create(Ee.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}})}:He.exports=function(ve,Ee){ve.super_=Ee;var ke=function(){};ke.prototype=Ee.prototype,ve.prototype=new ke,ve.prototype.constructor=ve}},{}],84:[function(oe,He,Re){He.exports=function(ve){return ve&&typeof ve=="object"&&typeof ve.copy=="function"&&typeof ve.fill=="function"&&typeof ve.readUInt8=="function"}},{}],85:[function(oe,He,Re){(function(de,ve){(function(){var Ee=/%[sdj%]/g;Re.format=function(Ct){if(!Te(Ct)){for(var bt=[],ct=0;ct<arguments.length;ct++)bt.push(Ae(arguments[ct]));return bt.join(" ")}for(var ct=1,xt=arguments,dt=xt.length,Mt=String(Ct).replace(Ee,function(Dt){if(Dt==="%%")return"%";if(ct>=dt)return Dt;switch(Dt){case"%s":return String(xt[ct++]);case"%d":return Number(xt[ct++]);case"%j":try{return JSON.stringify(xt[ct++])}catch(mt){return"[Circular]"}default:return Dt}}),yt=xt[ct];ct<dt;yt=xt[++ct])je(yt)||!Ye(yt)?Mt+=" "+yt:Mt+=" "+Ae(yt);return Mt},Re.deprecate=function(Ct,bt){if(Be(ve.process))return function(){return Re.deprecate(Ct,bt).apply(this,arguments)};if(de.noDeprecation===!0)return Ct;var ct=!1;function xt(){if(!ct){if(de.throwDeprecation)throw new Error(bt);de.traceDeprecation?console.trace(bt):console.error(bt),ct=!0}return Ct.apply(this,arguments)}return xt};var ke={},Se;Re.debuglog=function(Ct){if(Be(Se)&&(Se=de.env.NODE_DEBUG||""),Ct=Ct.toUpperCase(),!ke[Ct])if(new RegExp("\\b"+Ct+"\\b","i").test(Se)){var bt=de.pid;ke[Ct]=function(){var ct=Re.format.apply(Re,arguments);console.error("%s %d: %s",Ct,bt,ct)}}else ke[Ct]=function(){};return ke[Ct]};function Ae(Ct,bt){var ct={seen:[],stylize:Pe};return arguments.length>=3&&(ct.depth=arguments[2]),arguments.length>=4&&(ct.colors=arguments[3]),xe(bt)?ct.showHidden=bt:bt&&Re._extend(ct,bt),Be(ct.showHidden)&&(ct.showHidden=!1),Be(ct.depth)&&(ct.depth=2),Be(ct.colors)&&(ct.colors=!1),Be(ct.customInspect)&&(ct.customInspect=!0),ct.colors&&(ct.stylize=me),z(ct,Ct,ct.depth)}Re.inspect=Ae,Ae.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Ae.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function me(Ct,bt){var ct=Ae.styles[bt];return ct?"\x1B["+Ae.colors[ct][0]+"m"+Ct+"\x1B["+Ae.colors[ct][1]+"m":Ct}function Pe(Ct,bt){return Ct}function fe(Ct){var bt={};return Ct.forEach(function(ct,xt){bt[ct]=!0}),bt}function z(Ct,bt,ct){if(Ct.customInspect&&bt&&ot(bt.inspect)&&bt.inspect!==Re.inspect&&!(bt.constructor&&bt.constructor.prototype===bt)){var xt=bt.inspect(ct,Ct);return Te(xt)||(xt=z(Ct,xt,ct)),xt}var dt=te(Ct,bt);if(dt)return dt;var Mt=Object.keys(bt),yt=fe(Mt);if(Ct.showHidden&&(Mt=Object.getOwnPropertyNames(bt)),Ze(bt)&&(Mt.indexOf("message")>=0||Mt.indexOf("description")>=0))return se(bt);if(Mt.length===0){if(ot(bt)){var Dt=bt.name?": "+bt.name:"";return Ct.stylize("[Function"+Dt+"]","special")}if(Ue(bt))return Ct.stylize(RegExp.prototype.toString.call(bt),"regexp");if(Ve(bt))return Ct.stylize(Date.prototype.toString.call(bt),"date");if(Ze(bt))return se(bt)}var mt="",vt=!1,et=["{","}"];if(pe(bt)&&(vt=!0,et=["[","]"]),ot(bt)){var We=bt.name?": "+bt.name:"";mt=" [Function"+We+"]"}if(Ue(bt)&&(mt=" "+RegExp.prototype.toString.call(bt)),Ve(bt)&&(mt=" "+Date.prototype.toUTCString.call(bt)),Ze(bt)&&(mt=" "+se(bt)),Mt.length===0&&(!vt||bt.length==0))return et[0]+mt+et[1];if(ct<0)return Ue(bt)?Ct.stylize(RegExp.prototype.toString.call(bt),"regexp"):Ct.stylize("[Object]","special");Ct.seen.push(bt);var we;return vt?we=ie(Ct,bt,ct,yt,Mt):we=Mt.map(function(Ne){return le(Ct,bt,ct,yt,Ne,vt)}),Ct.seen.pop(),ce(we,mt,et)}function te(Ct,bt){if(Be(bt))return Ct.stylize("undefined","undefined");if(Te(bt)){var ct="'"+JSON.stringify(bt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Ct.stylize(ct,"string")}if(Fe(bt))return Ct.stylize(""+bt,"number");if(xe(bt))return Ct.stylize(""+bt,"boolean");if(je(bt))return Ct.stylize("null","null")}function se(Ct){return"["+Error.prototype.toString.call(Ct)+"]"}function ie(Ct,bt,ct,xt,dt){for(var Mt=[],yt=0,Dt=bt.length;yt<Dt;++yt)wt(bt,String(yt))?Mt.push(le(Ct,bt,ct,xt,String(yt),!0)):Mt.push("");return dt.forEach(function(mt){mt.match(/^\d+$/)||Mt.push(le(Ct,bt,ct,xt,mt,!0))}),Mt}function le(Ct,bt,ct,xt,dt,Mt){var yt,Dt,mt;if(mt=Object.getOwnPropertyDescriptor(bt,dt)||{value:bt[dt]},mt.get?mt.set?Dt=Ct.stylize("[Getter/Setter]","special"):Dt=Ct.stylize("[Getter]","special"):mt.set&&(Dt=Ct.stylize("[Setter]","special")),wt(xt,dt)||(yt="["+dt+"]"),Dt||(Ct.seen.indexOf(mt.value)<0?(je(ct)?Dt=z(Ct,mt.value,null):Dt=z(Ct,mt.value,ct-1),Dt.indexOf(`
|
|
`)>-1&&(Mt?Dt=Dt.split(`
|
|
`).map(function(vt){return" "+vt}).join(`
|
|
`).substr(2):Dt=`
|
|
`+Dt.split(`
|
|
`).map(function(vt){return" "+vt}).join(`
|
|
`))):Dt=Ct.stylize("[Circular]","special")),Be(yt)){if(Mt&&dt.match(/^\d+$/))return Dt;yt=JSON.stringify(""+dt),yt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(yt=yt.substr(1,yt.length-2),yt=Ct.stylize(yt,"name")):(yt=yt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),yt=Ct.stylize(yt,"string"))}return yt+": "+Dt}function ce(Ct,bt,ct){var xt=0,dt=Ct.reduce(function(Mt,yt){return xt++,yt.indexOf(`
|
|
`)>=0&&xt++,Mt+yt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return dt>60?ct[0]+(bt===""?"":bt+`
|
|
`)+" "+Ct.join(`,
|
|
`)+" "+ct[1]:ct[0]+bt+" "+Ct.join(", ")+" "+ct[1]}function pe(Ct){return Array.isArray(Ct)}Re.isArray=pe;function xe(Ct){return typeof Ct=="boolean"}Re.isBoolean=xe;function je(Ct){return Ct===null}Re.isNull=je;function De(Ct){return Ct==null}Re.isNullOrUndefined=De;function Fe(Ct){return typeof Ct=="number"}Re.isNumber=Fe;function Te(Ct){return typeof Ct=="string"}Re.isString=Te;function Me(Ct){return typeof Ct=="symbol"}Re.isSymbol=Me;function Be(Ct){return Ct===void 0}Re.isUndefined=Be;function Ue(Ct){return Ye(Ct)&&ft(Ct)==="[object RegExp]"}Re.isRegExp=Ue;function Ye(Ct){return typeof Ct=="object"&&Ct!==null}Re.isObject=Ye;function Ve(Ct){return Ye(Ct)&&ft(Ct)==="[object Date]"}Re.isDate=Ve;function Ze(Ct){return Ye(Ct)&&(ft(Ct)==="[object Error]"||Ct instanceof Error)}Re.isError=Ze;function ot(Ct){return typeof Ct=="function"}Re.isFunction=ot;function lt(Ct){return Ct===null||typeof Ct=="boolean"||typeof Ct=="number"||typeof Ct=="string"||typeof Ct=="symbol"||typeof Ct=="undefined"}Re.isPrimitive=lt,Re.isBuffer=oe("./support/isBuffer");function ft(Ct){return Object.prototype.toString.call(Ct)}function St(Ct){return Ct<10?"0"+Ct.toString(10):Ct.toString(10)}var qe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rt(){var Ct=new Date,bt=[St(Ct.getHours()),St(Ct.getMinutes()),St(Ct.getSeconds())].join(":");return[Ct.getDate(),qe[Ct.getMonth()],bt].join(" ")}Re.log=function(){console.log("%s - %s",rt(),Re.format.apply(Re,arguments))},Re.inherits=oe("inherits"),Re._extend=function(Ct,bt){if(!bt||!Ye(bt))return Ct;for(var ct=Object.keys(bt),xt=ct.length;xt--;)Ct[ct[xt]]=bt[ct[xt]];return Ct};function wt(Ct,bt){return Object.prototype.hasOwnProperty.call(Ct,bt)}}).call(this)}).call(this,oe("_process"),typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(oe,He,Re){(function(de){(function(){"use strict";var ve=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],Ee=typeof globalThis=="undefined"?de:globalThis;He.exports=function(){for(var Se=[],Ae=0;Ae<ve.length;Ae++)typeof Ee[ve[Ae]]=="function"&&(Se[Se.length]=ve[Ae]);return Se}}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(oe,He,Re){"use strict";Re.byteLength=Pe,Re.toByteArray=z,Re.fromByteArray=ie;for(var de=[],ve=[],Ee=typeof Uint8Array!="undefined"?Uint8Array:Array,ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Se=0,Ae=ke.length;Se<Ae;++Se)de[Se]=ke[Se],ve[ke.charCodeAt(Se)]=Se;ve[45]=62,ve[95]=63;function me(le){var ce=le.length;if(ce%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var pe=le.indexOf("=");pe===-1&&(pe=ce);var xe=pe===ce?0:4-pe%4;return[pe,xe]}function Pe(le){var ce=me(le),pe=ce[0],xe=ce[1];return(pe+xe)*3/4-xe}function fe(le,ce,pe){return(ce+pe)*3/4-pe}function z(le){var ce,pe=me(le),xe=pe[0],je=pe[1],De=new Ee(fe(le,xe,je)),Fe=0,Te=je>0?xe-4:xe,Me;for(Me=0;Me<Te;Me+=4)ce=ve[le.charCodeAt(Me)]<<18|ve[le.charCodeAt(Me+1)]<<12|ve[le.charCodeAt(Me+2)]<<6|ve[le.charCodeAt(Me+3)],De[Fe++]=ce>>16&255,De[Fe++]=ce>>8&255,De[Fe++]=ce&255;return je===2&&(ce=ve[le.charCodeAt(Me)]<<2|ve[le.charCodeAt(Me+1)]>>4,De[Fe++]=ce&255),je===1&&(ce=ve[le.charCodeAt(Me)]<<10|ve[le.charCodeAt(Me+1)]<<4|ve[le.charCodeAt(Me+2)]>>2,De[Fe++]=ce>>8&255,De[Fe++]=ce&255),De}function te(le){return de[le>>18&63]+de[le>>12&63]+de[le>>6&63]+de[le&63]}function se(le,ce,pe){for(var xe,je=[],De=ce;De<pe;De+=3)xe=(le[De]<<16&16711680)+(le[De+1]<<8&65280)+(le[De+2]&255),je.push(te(xe));return je.join("")}function ie(le){for(var ce,pe=le.length,xe=pe%3,je=[],De=16383,Fe=0,Te=pe-xe;Fe<Te;Fe+=De)je.push(se(le,Fe,Fe+De>Te?Te:Fe+De));return xe===1?(ce=le[pe-1],je.push(de[ce>>2]+de[ce<<4&63]+"==")):xe===2&&(ce=(le[pe-2]<<8)+le[pe-1],je.push(de[ce>>10]+de[ce>>4&63]+de[ce<<2&63]+"=")),je.join("")}},{}],88:[function(oe,He,Re){(function(de,ve,Ee){typeof He!="undefined"&&He.exports?He.exports=Ee():typeof pt=="function"&&pt.amd?pt(ve,Ee):de[ve]=Ee()})(this,"bowser",function(){var de=!0;function ve(fe){function z(bt){var ct=fe.match(bt);return ct&&ct.length>1&&ct[1]||""}function te(bt){var ct=fe.match(bt);return ct&&ct.length>1&&ct[2]||""}var se=z(/(ipod|iphone|ipad)/i).toLowerCase(),ie=/like android/i.test(fe),le=!ie&&/android/i.test(fe),ce=/nexus\s*[0-6]\s*/i.test(fe),pe=!ce&&/nexus\s*[0-9]+/i.test(fe),xe=/CrOS/.test(fe),je=/silk/i.test(fe),De=/sailfish/i.test(fe),Fe=/tizen/i.test(fe),Te=/(web|hpw)(o|0)s/i.test(fe),Me=/windows phone/i.test(fe),Be=/SamsungBrowser/i.test(fe),Ue=!Me&&/windows/i.test(fe),Ye=!se&&!je&&/macintosh/i.test(fe),Ve=!le&&!De&&!Fe&&!Te&&/linux/i.test(fe),Ze=te(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),ot=z(/version\/(\d+(\.\d+)?)/i),lt=/tablet/i.test(fe)&&!/tablet pc/i.test(fe),ft=!lt&&/[^-]mobi/i.test(fe),St=/xbox/i.test(fe),qe;/opera/i.test(fe)?qe={name:"Opera",opera:de,version:ot||z(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(fe)?qe={name:"Opera",opera:de,version:z(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||ot}:/SamsungBrowser/i.test(fe)?qe={name:"Samsung Internet for Android",samsungBrowser:de,version:ot||z(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(fe)?qe={name:"NAVER Whale browser",whale:de,version:z(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(fe)?qe={name:"MZ Browser",mzbrowser:de,version:z(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(fe)?qe={name:"Opera Coast",coast:de,version:ot||z(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(fe)?qe={name:"Focus",focus:de,version:z(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(fe)?qe={name:"Yandex Browser",yandexbrowser:de,version:ot||z(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(fe)?qe={name:"UC Browser",ucbrowser:de,version:z(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(fe)?qe={name:"Maxthon",maxthon:de,version:z(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(fe)?qe={name:"Epiphany",epiphany:de,version:z(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(fe)?qe={name:"Puffin",puffin:de,version:z(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(fe)?qe={name:"Sleipnir",sleipnir:de,version:z(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(fe)?qe={name:"K-Meleon",kMeleon:de,version:z(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Me?(qe={name:"Windows Phone",osname:"Windows Phone",windowsphone:de},Ze?(qe.msedge=de,qe.version=Ze):(qe.msie=de,qe.version=z(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(fe)?qe={name:"Internet Explorer",msie:de,version:z(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:xe?qe={name:"Chrome",osname:"Chrome OS",chromeos:de,chromeBook:de,chrome:de,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(fe)?qe={name:"Microsoft Edge",msedge:de,version:Ze}:/vivaldi/i.test(fe)?qe={name:"Vivaldi",vivaldi:de,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||ot}:De?qe={name:"Sailfish",osname:"Sailfish OS",sailfish:de,version:z(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(fe)?qe={name:"SeaMonkey",seamonkey:de,version:z(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(fe)?(qe={name:"Firefox",firefox:de,version:z(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(fe)&&(qe.firefoxos=de,qe.osname="Firefox OS")):je?qe={name:"Amazon Silk",silk:de,version:z(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(fe)?qe={name:"PhantomJS",phantom:de,version:z(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(fe)?qe={name:"SlimerJS",slimer:de,version:z(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(fe)||/rim\stablet/i.test(fe)?qe={name:"BlackBerry",osname:"BlackBerry OS",blackberry:de,version:ot||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Te?(qe={name:"WebOS",osname:"WebOS",webos:de,version:ot||z(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(fe)&&(qe.touchpad=de)):/bada/i.test(fe)?qe={name:"Bada",osname:"Bada",bada:de,version:z(/dolfin\/(\d+(\.\d+)?)/i)}:Fe?qe={name:"Tizen",osname:"Tizen",tizen:de,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||ot}:/qupzilla/i.test(fe)?qe={name:"QupZilla",qupzilla:de,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||ot}:/chromium/i.test(fe)?qe={name:"Chromium",chromium:de,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||ot}:/chrome|crios|crmo/i.test(fe)?qe={name:"Chrome",chrome:de,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:le?qe={name:"Android",version:ot}:/safari|applewebkit/i.test(fe)?(qe={name:"Safari",safari:de},ot&&(qe.version=ot)):se?(qe={name:se=="iphone"?"iPhone":se=="ipad"?"iPad":"iPod"},ot&&(qe.version=ot)):/googlebot/i.test(fe)?qe={name:"Googlebot",googlebot:de,version:z(/googlebot\/(\d+(\.\d+))/i)||ot}:qe={name:z(/^(.*)\/(.*) /),version:te(/^(.*)\/(.*) /)},!qe.msedge&&/(apple)?webkit/i.test(fe)?(/(apple)?webkit\/537\.36/i.test(fe)?(qe.name=qe.name||"Blink",qe.blink=de):(qe.name=qe.name||"Webkit",qe.webkit=de),!qe.version&&ot&&(qe.version=ot)):!qe.opera&&/gecko\//i.test(fe)&&(qe.name=qe.name||"Gecko",qe.gecko=de,qe.version=qe.version||z(/gecko\/(\d+(\.\d+)?)/i)),!qe.windowsphone&&(le||qe.silk)?(qe.android=de,qe.osname="Android"):!qe.windowsphone&&se?(qe[se]=de,qe.ios=de,qe.osname="iOS"):Ye?(qe.mac=de,qe.osname="macOS"):St?(qe.xbox=de,qe.osname="Xbox"):Ue?(qe.windows=de,qe.osname="Windows"):Ve&&(qe.linux=de,qe.osname="Linux");function rt(bt){switch(bt){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var wt="";qe.windows?wt=rt(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):qe.windowsphone?wt=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):qe.mac?(wt=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),wt=wt.replace(/[_\s]/g,".")):se?(wt=z(/os (\d+([_\s]\d+)*) like mac os x/i),wt=wt.replace(/[_\s]/g,".")):le?wt=z(/android[ \/-](\d+(\.\d+)*)/i):qe.webos?wt=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):qe.blackberry?wt=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):qe.bada?wt=z(/bada\/(\d+(\.\d+)*)/i):qe.tizen&&(wt=z(/tizen[\/\s](\d+(\.\d+)*)/i)),wt&&(qe.osversion=wt);var Ct=!qe.windows&&wt.split(".")[0];return lt||pe||se=="ipad"||le&&(Ct==3||Ct>=4&&!ft)||qe.silk?qe.tablet=de:(ft||se=="iphone"||se=="ipod"||le||ce||qe.blackberry||qe.webos||qe.bada)&&(qe.mobile=de),qe.msedge||qe.msie&&qe.version>=10||qe.yandexbrowser&&qe.version>=15||qe.vivaldi&&qe.version>=1||qe.chrome&&qe.version>=20||qe.samsungBrowser&&qe.version>=4||qe.whale&&Ae([qe.version,"1.0"])===1||qe.mzbrowser&&Ae([qe.version,"6.0"])===1||qe.focus&&Ae([qe.version,"1.0"])===1||qe.firefox&&qe.version>=20||qe.safari&&qe.version>=6||qe.opera&&qe.version>=10||qe.ios&&qe.osversion&&qe.osversion.split(".")[0]>=6||qe.blackberry&&qe.version>=10.1||qe.chromium&&qe.version>=20?qe.a=de:qe.msie&&qe.version<10||qe.chrome&&qe.version<20||qe.firefox&&qe.version<20||qe.safari&&qe.version<6||qe.opera&&qe.version<10||qe.ios&&qe.osversion&&qe.osversion.split(".")[0]<6||qe.chromium&&qe.version<20?qe.c=de:qe.x=de,qe}var Ee=ve(typeof navigator!="undefined"&&navigator.userAgent||"");Ee.test=function(fe){for(var z=0;z<fe.length;++z){var te=fe[z];if(typeof te=="string"&&te in Ee)return!0}return!1};function ke(fe){return fe.split(".").length}function Se(fe,z){var te=[],se;if(Array.prototype.map)return Array.prototype.map.call(fe,z);for(se=0;se<fe.length;se++)te.push(z(fe[se]));return te}function Ae(fe){for(var z=Math.max(ke(fe[0]),ke(fe[1])),te=Se(fe,function(se){var ie=z-ke(se);return se=se+new Array(ie+1).join(".0"),Se(se.split("."),function(le){return new Array(20-le.length).join("0")+le}).reverse()});--z>=0;){if(te[0][z]>te[1][z])return 1;if(te[0][z]===te[1][z]){if(z===0)return 0}else return-1}}function me(fe,z,te){var se=Ee;typeof z=="string"&&(te=z,z=void 0),z===void 0&&(z=!1),te&&(se=ve(te));var ie=""+se.version;for(var le in fe)if(fe.hasOwnProperty(le)&&se[le]){if(typeof fe[le]!="string")throw new Error("Browser version in the minVersion map should be a string: "+le+": "+String(fe));return Ae([ie,fe[le]])<0}return z}function Pe(fe,z,te){return!me(fe,z,te)}return Ee.isUnsupportedBrowser=me,Ee.compareVersions=Ae,Ee.check=Pe,Ee._detect=ve,Ee.detect=ve,Ee})},{}],89:[function(oe,He,Re){},{}],90:[function(oe,He,Re){(function(de){(function(){"use strict";var ve=oe("base64-js"),Ee=oe("ieee754");Re.Buffer=me,Re.SlowBuffer=xe,Re.INSPECT_MAX_BYTES=50;var ke=2147483647;Re.kMaxLength=ke,me.TYPED_ARRAY_SUPPORT=Se(),!me.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Se(){try{var _e=new Uint8Array(1);return _e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},_e.foo()===42}catch(Ge){return!1}}Object.defineProperty(me.prototype,"parent",{enumerable:!0,get:function(){if(me.isBuffer(this))return this.buffer}}),Object.defineProperty(me.prototype,"offset",{enumerable:!0,get:function(){if(me.isBuffer(this))return this.byteOffset}});function Ae(_e){if(_e>ke)throw new RangeError('The value "'+_e+'" is invalid for option "size"');var Ge=new Uint8Array(_e);return Ge.__proto__=me.prototype,Ge}function me(_e,Ge,tt){if(typeof _e=="number"){if(typeof Ge=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return te(_e)}return Pe(_e,Ge,tt)}typeof Symbol!="undefined"&&Symbol.species!=null&&me[Symbol.species]===me&&Object.defineProperty(me,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),me.poolSize=8192;function Pe(_e,Ge,tt){if(typeof _e=="string")return se(_e,Ge);if(ArrayBuffer.isView(_e))return ie(_e);if(_e==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _e);if(nt(_e,ArrayBuffer)||_e&&nt(_e.buffer,ArrayBuffer))return le(_e,Ge,tt);if(typeof _e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ht=_e.valueOf&&_e.valueOf();if(ht!=null&&ht!==_e)return me.from(ht,Ge,tt);var ut=ce(_e);if(ut)return ut;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof _e[Symbol.toPrimitive]=="function")return me.from(_e[Symbol.toPrimitive]("string"),Ge,tt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _e)}me.from=function(_e,Ge,tt){return Pe(_e,Ge,tt)},me.prototype.__proto__=Uint8Array.prototype,me.__proto__=Uint8Array;function fe(_e){if(typeof _e!="number")throw new TypeError('"size" argument must be of type number');if(_e<0)throw new RangeError('The value "'+_e+'" is invalid for option "size"')}function z(_e,Ge,tt){return fe(_e),_e<=0?Ae(_e):Ge!==void 0?typeof tt=="string"?Ae(_e).fill(Ge,tt):Ae(_e).fill(Ge):Ae(_e)}me.alloc=function(_e,Ge,tt){return z(_e,Ge,tt)};function te(_e){return fe(_e),Ae(_e<0?0:pe(_e)|0)}me.allocUnsafe=function(_e){return te(_e)},me.allocUnsafeSlow=function(_e){return te(_e)};function se(_e,Ge){if((typeof Ge!="string"||Ge==="")&&(Ge="utf8"),!me.isEncoding(Ge))throw new TypeError("Unknown encoding: "+Ge);var tt=je(_e,Ge)|0,ht=Ae(tt),ut=ht.write(_e,Ge);return ut!==tt&&(ht=ht.slice(0,ut)),ht}function ie(_e){for(var Ge=_e.length<0?0:pe(_e.length)|0,tt=Ae(Ge),ht=0;ht<Ge;ht+=1)tt[ht]=_e[ht]&255;return tt}function le(_e,Ge,tt){if(Ge<0||_e.byteLength<Ge)throw new RangeError('"offset" is outside of buffer bounds');if(_e.byteLength<Ge+(tt||0))throw new RangeError('"length" is outside of buffer bounds');var ht;return Ge===void 0&&tt===void 0?ht=new Uint8Array(_e):tt===void 0?ht=new Uint8Array(_e,Ge):ht=new Uint8Array(_e,Ge,tt),ht.__proto__=me.prototype,ht}function ce(_e){if(me.isBuffer(_e)){var Ge=pe(_e.length)|0,tt=Ae(Ge);return tt.length===0||_e.copy(tt,0,0,Ge),tt}if(_e.length!==void 0)return typeof _e.length!="number"||Ie(_e.length)?Ae(0):ie(_e);if(_e.type==="Buffer"&&Array.isArray(_e.data))return ie(_e.data)}function pe(_e){if(_e>=ke)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ke.toString(16)+" bytes");return _e|0}function xe(_e){return+_e!=_e&&(_e=0),me.alloc(+_e)}me.isBuffer=function(Ge){return Ge!=null&&Ge._isBuffer===!0&&Ge!==me.prototype},me.compare=function(Ge,tt){if(nt(Ge,Uint8Array)&&(Ge=me.from(Ge,Ge.offset,Ge.byteLength)),nt(tt,Uint8Array)&&(tt=me.from(tt,tt.offset,tt.byteLength)),!me.isBuffer(Ge)||!me.isBuffer(tt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ge===tt)return 0;for(var ht=Ge.length,ut=tt.length,Ot=0,Et=Math.min(ht,ut);Ot<Et;++Ot)if(Ge[Ot]!==tt[Ot]){ht=Ge[Ot],ut=tt[Ot];break}return ht<ut?-1:ut<ht?1:0},me.isEncoding=function(Ge){switch(String(Ge).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},me.concat=function(Ge,tt){if(!Array.isArray(Ge))throw new TypeError('"list" argument must be an Array of Buffers');if(Ge.length===0)return me.alloc(0);var ht;if(tt===void 0)for(tt=0,ht=0;ht<Ge.length;++ht)tt+=Ge[ht].length;var ut=me.allocUnsafe(tt),Ot=0;for(ht=0;ht<Ge.length;++ht){var Et=Ge[ht];if(nt(Et,Uint8Array)&&(Et=me.from(Et)),!me.isBuffer(Et))throw new TypeError('"list" argument must be an Array of Buffers');Et.copy(ut,Ot),Ot+=Et.length}return ut};function je(_e,Ge){if(me.isBuffer(_e))return _e.length;if(ArrayBuffer.isView(_e)||nt(_e,ArrayBuffer))return _e.byteLength;if(typeof _e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _e);var tt=_e.length,ht=arguments.length>2&&arguments[2]===!0;if(!ht&&tt===0)return 0;for(var ut=!1;;)switch(Ge){case"ascii":case"latin1":case"binary":return tt;case"utf8":case"utf-8":return et(_e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tt*2;case"hex":return tt>>>1;case"base64":return Ne(_e).length;default:if(ut)return ht?-1:et(_e).length;Ge=(""+Ge).toLowerCase(),ut=!0}}me.byteLength=je;function De(_e,Ge,tt){var ht=!1;if((Ge===void 0||Ge<0)&&(Ge=0),Ge>this.length||((tt===void 0||tt>this.length)&&(tt=this.length),tt<=0)||(tt>>>=0,Ge>>>=0,tt<=Ge))return"";for(_e||(_e="utf8");;)switch(_e){case"hex":return Ct(this,Ge,tt);case"utf8":case"utf-8":return ft(this,Ge,tt);case"ascii":return rt(this,Ge,tt);case"latin1":case"binary":return wt(this,Ge,tt);case"base64":return lt(this,Ge,tt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bt(this,Ge,tt);default:if(ht)throw new TypeError("Unknown encoding: "+_e);_e=(_e+"").toLowerCase(),ht=!0}}me.prototype._isBuffer=!0;function Fe(_e,Ge,tt){var ht=_e[Ge];_e[Ge]=_e[tt],_e[tt]=ht}me.prototype.swap16=function(){var Ge=this.length;if(Ge%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var tt=0;tt<Ge;tt+=2)Fe(this,tt,tt+1);return this},me.prototype.swap32=function(){var Ge=this.length;if(Ge%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var tt=0;tt<Ge;tt+=4)Fe(this,tt,tt+3),Fe(this,tt+1,tt+2);return this},me.prototype.swap64=function(){var Ge=this.length;if(Ge%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var tt=0;tt<Ge;tt+=8)Fe(this,tt,tt+7),Fe(this,tt+1,tt+6),Fe(this,tt+2,tt+5),Fe(this,tt+3,tt+4);return this},me.prototype.toString=function(){var Ge=this.length;return Ge===0?"":arguments.length===0?ft(this,0,Ge):De.apply(this,arguments)},me.prototype.toLocaleString=me.prototype.toString,me.prototype.equals=function(Ge){if(!me.isBuffer(Ge))throw new TypeError("Argument must be a Buffer");return this===Ge?!0:me.compare(this,Ge)===0},me.prototype.inspect=function(){var Ge="",tt=Re.INSPECT_MAX_BYTES;return Ge=this.toString("hex",0,tt).replace(/(.{2})/g,"$1 ").trim(),this.length>tt&&(Ge+=" ... "),"<Buffer "+Ge+">"},me.prototype.compare=function(Ge,tt,ht,ut,Ot){if(nt(Ge,Uint8Array)&&(Ge=me.from(Ge,Ge.offset,Ge.byteLength)),!me.isBuffer(Ge))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ge);if(tt===void 0&&(tt=0),ht===void 0&&(ht=Ge?Ge.length:0),ut===void 0&&(ut=0),Ot===void 0&&(Ot=this.length),tt<0||ht>Ge.length||ut<0||Ot>this.length)throw new RangeError("out of range index");if(ut>=Ot&&tt>=ht)return 0;if(ut>=Ot)return-1;if(tt>=ht)return 1;if(tt>>>=0,ht>>>=0,ut>>>=0,Ot>>>=0,this===Ge)return 0;for(var Et=Ot-ut,Ft=ht-tt,qt=Math.min(Et,Ft),Xt=this.slice(ut,Ot),Kt=Ge.slice(tt,ht),Vt=0;Vt<qt;++Vt)if(Xt[Vt]!==Kt[Vt]){Et=Xt[Vt],Ft=Kt[Vt];break}return Et<Ft?-1:Ft<Et?1:0};function Te(_e,Ge,tt,ht,ut){if(_e.length===0)return-1;if(typeof tt=="string"?(ht=tt,tt=0):tt>2147483647?tt=2147483647:tt<-2147483648&&(tt=-2147483648),tt=+tt,Ie(tt)&&(tt=ut?0:_e.length-1),tt<0&&(tt=_e.length+tt),tt>=_e.length){if(ut)return-1;tt=_e.length-1}else if(tt<0)if(ut)tt=0;else return-1;if(typeof Ge=="string"&&(Ge=me.from(Ge,ht)),me.isBuffer(Ge))return Ge.length===0?-1:Me(_e,Ge,tt,ht,ut);if(typeof Ge=="number")return Ge=Ge&255,typeof Uint8Array.prototype.indexOf=="function"?ut?Uint8Array.prototype.indexOf.call(_e,Ge,tt):Uint8Array.prototype.lastIndexOf.call(_e,Ge,tt):Me(_e,[Ge],tt,ht,ut);throw new TypeError("val must be string, number or Buffer")}function Me(_e,Ge,tt,ht,ut){var Ot=1,Et=_e.length,Ft=Ge.length;if(ht!==void 0&&(ht=String(ht).toLowerCase(),ht==="ucs2"||ht==="ucs-2"||ht==="utf16le"||ht==="utf-16le")){if(_e.length<2||Ge.length<2)return-1;Ot=2,Et/=2,Ft/=2,tt/=2}function qt(on,cn){return Ot===1?on[cn]:on.readUInt16BE(cn*Ot)}var Xt;if(ut){var Kt=-1;for(Xt=tt;Xt<Et;Xt++)if(qt(_e,Xt)===qt(Ge,Kt===-1?0:Xt-Kt)){if(Kt===-1&&(Kt=Xt),Xt-Kt+1===Ft)return Kt*Ot}else Kt!==-1&&(Xt-=Xt-Kt),Kt=-1}else for(tt+Ft>Et&&(tt=Et-Ft),Xt=tt;Xt>=0;Xt--){for(var Vt=!0,hn=0;hn<Ft;hn++)if(qt(_e,Xt+hn)!==qt(Ge,hn)){Vt=!1;break}if(Vt)return Xt}return-1}me.prototype.includes=function(Ge,tt,ht){return this.indexOf(Ge,tt,ht)!==-1},me.prototype.indexOf=function(Ge,tt,ht){return Te(this,Ge,tt,ht,!0)},me.prototype.lastIndexOf=function(Ge,tt,ht){return Te(this,Ge,tt,ht,!1)};function Be(_e,Ge,tt,ht){tt=Number(tt)||0;var ut=_e.length-tt;ht?(ht=Number(ht),ht>ut&&(ht=ut)):ht=ut;var Ot=Ge.length;ht>Ot/2&&(ht=Ot/2);for(var Et=0;Et<ht;++Et){var Ft=parseInt(Ge.substr(Et*2,2),16);if(Ie(Ft))return Et;_e[tt+Et]=Ft}return Et}function Ue(_e,Ge,tt,ht){return Xe(et(Ge,_e.length-tt),_e,tt,ht)}function Ye(_e,Ge,tt,ht){return Xe(We(Ge),_e,tt,ht)}function Ve(_e,Ge,tt,ht){return Ye(_e,Ge,tt,ht)}function Ze(_e,Ge,tt,ht){return Xe(Ne(Ge),_e,tt,ht)}function ot(_e,Ge,tt,ht){return Xe(we(Ge,_e.length-tt),_e,tt,ht)}me.prototype.write=function(Ge,tt,ht,ut){if(tt===void 0)ut="utf8",ht=this.length,tt=0;else if(ht===void 0&&typeof tt=="string")ut=tt,ht=this.length,tt=0;else if(isFinite(tt))tt=tt>>>0,isFinite(ht)?(ht=ht>>>0,ut===void 0&&(ut="utf8")):(ut=ht,ht=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ot=this.length-tt;if((ht===void 0||ht>Ot)&&(ht=Ot),Ge.length>0&&(ht<0||tt<0)||tt>this.length)throw new RangeError("Attempt to write outside buffer bounds");ut||(ut="utf8");for(var Et=!1;;)switch(ut){case"hex":return Be(this,Ge,tt,ht);case"utf8":case"utf-8":return Ue(this,Ge,tt,ht);case"ascii":return Ye(this,Ge,tt,ht);case"latin1":case"binary":return Ve(this,Ge,tt,ht);case"base64":return Ze(this,Ge,tt,ht);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,Ge,tt,ht);default:if(Et)throw new TypeError("Unknown encoding: "+ut);ut=(""+ut).toLowerCase(),Et=!0}},me.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function lt(_e,Ge,tt){return Ge===0&&tt===_e.length?ve.fromByteArray(_e):ve.fromByteArray(_e.slice(Ge,tt))}function ft(_e,Ge,tt){tt=Math.min(_e.length,tt);for(var ht=[],ut=Ge;ut<tt;){var Ot=_e[ut],Et=null,Ft=Ot>239?4:Ot>223?3:Ot>191?2:1;if(ut+Ft<=tt){var qt,Xt,Kt,Vt;switch(Ft){case 1:Ot<128&&(Et=Ot);break;case 2:qt=_e[ut+1],(qt&192)===128&&(Vt=(Ot&31)<<6|qt&63,Vt>127&&(Et=Vt));break;case 3:qt=_e[ut+1],Xt=_e[ut+2],(qt&192)===128&&(Xt&192)===128&&(Vt=(Ot&15)<<12|(qt&63)<<6|Xt&63,Vt>2047&&(Vt<55296||Vt>57343)&&(Et=Vt));break;case 4:qt=_e[ut+1],Xt=_e[ut+2],Kt=_e[ut+3],(qt&192)===128&&(Xt&192)===128&&(Kt&192)===128&&(Vt=(Ot&15)<<18|(qt&63)<<12|(Xt&63)<<6|Kt&63,Vt>65535&&Vt<1114112&&(Et=Vt))}}Et===null?(Et=65533,Ft=1):Et>65535&&(Et-=65536,ht.push(Et>>>10&1023|55296),Et=56320|Et&1023),ht.push(Et),ut+=Ft}return qe(ht)}var St=4096;function qe(_e){var Ge=_e.length;if(Ge<=St)return String.fromCharCode.apply(String,_e);for(var tt="",ht=0;ht<Ge;)tt+=String.fromCharCode.apply(String,_e.slice(ht,ht+=St));return tt}function rt(_e,Ge,tt){var ht="";tt=Math.min(_e.length,tt);for(var ut=Ge;ut<tt;++ut)ht+=String.fromCharCode(_e[ut]&127);return ht}function wt(_e,Ge,tt){var ht="";tt=Math.min(_e.length,tt);for(var ut=Ge;ut<tt;++ut)ht+=String.fromCharCode(_e[ut]);return ht}function Ct(_e,Ge,tt){var ht=_e.length;(!Ge||Ge<0)&&(Ge=0),(!tt||tt<0||tt>ht)&&(tt=ht);for(var ut="",Ot=Ge;Ot<tt;++Ot)ut+=vt(_e[Ot]);return ut}function bt(_e,Ge,tt){for(var ht=_e.slice(Ge,tt),ut="",Ot=0;Ot<ht.length;Ot+=2)ut+=String.fromCharCode(ht[Ot]+ht[Ot+1]*256);return ut}me.prototype.slice=function(Ge,tt){var ht=this.length;Ge=~~Ge,tt=tt===void 0?ht:~~tt,Ge<0?(Ge+=ht,Ge<0&&(Ge=0)):Ge>ht&&(Ge=ht),tt<0?(tt+=ht,tt<0&&(tt=0)):tt>ht&&(tt=ht),tt<Ge&&(tt=Ge);var ut=this.subarray(Ge,tt);return ut.__proto__=me.prototype,ut};function ct(_e,Ge,tt){if(_e%1!==0||_e<0)throw new RangeError("offset is not uint");if(_e+Ge>tt)throw new RangeError("Trying to access beyond buffer length")}me.prototype.readUIntLE=function(Ge,tt,ht){Ge=Ge>>>0,tt=tt>>>0,ht||ct(Ge,tt,this.length);for(var ut=this[Ge],Ot=1,Et=0;++Et<tt&&(Ot*=256);)ut+=this[Ge+Et]*Ot;return ut},me.prototype.readUIntBE=function(Ge,tt,ht){Ge=Ge>>>0,tt=tt>>>0,ht||ct(Ge,tt,this.length);for(var ut=this[Ge+--tt],Ot=1;tt>0&&(Ot*=256);)ut+=this[Ge+--tt]*Ot;return ut},me.prototype.readUInt8=function(Ge,tt){return Ge=Ge>>>0,tt||ct(Ge,1,this.length),this[Ge]},me.prototype.readUInt16LE=function(Ge,tt){return Ge=Ge>>>0,tt||ct(Ge,2,this.length),this[Ge]|this[Ge+1]<<8},me.prototype.readUInt16BE=function(Ge,tt){return Ge=Ge>>>0,tt||ct(Ge,2,this.length),this[Ge]<<8|this[Ge+1]},me.prototype.readUInt32LE=function(Ge,tt){return Ge=Ge>>>0,tt||ct(Ge,4,this.length),(this[Ge]|this[Ge+1]<<8|this[Ge+2]<<16)+this[Ge+3]*16777216},me.prototype.readUInt32BE=function(Ge,tt){return Ge=Ge>>>0,tt||ct(Ge,4,this.length),this[Ge]*16777216+(this[Ge+1]<<16|this[Ge+2]<<8|this[Ge+3])},me.prototype.readIntLE=function(Ge,tt,ht){Ge=Ge>>>0,tt=tt>>>0,ht||ct(Ge,tt,this.length);for(var ut=this[Ge],Ot=1,Et=0;++Et<tt&&(Ot*=256);)ut+=this[Ge+Et]*Ot;return Ot*=128,ut>=Ot&&(ut-=Math.pow(2,8*tt)),ut},me.prototype.readIntBE=function(Ge,tt,ht){Ge=Ge>>>0,tt=tt>>>0,ht||ct(Ge,tt,this.length);for(var ut=tt,Ot=1,Et=this[Ge+--ut];ut>0&&(Ot*=256);)Et+=this[Ge+--ut]*Ot;return Ot*=128,Et>=Ot&&(Et-=Math.pow(2,8*tt)),Et},me.prototype.readInt8=function(Ge,tt){return Ge=Ge>>>0,tt||ct(Ge,1,this.length),this[Ge]&128?(255-this[Ge]+1)*-1:this[Ge]},me.prototype.readInt16LE=function(Ge,tt){Ge=Ge>>>0,tt||ct(Ge,2,this.length);var ht=this[Ge]|this[Ge+1]<<8;return ht&32768?ht|4294901760:ht},me.prototype.readInt16BE=function(Ge,tt){Ge=Ge>>>0,tt||ct(Ge,2,this.length);var ht=this[Ge+1]|this[Ge]<<8;return ht&32768?ht|4294901760:ht},me.prototype.readInt32LE=function(Ge,tt){return Ge=Ge>>>0,tt||ct(Ge,4,this.length),this[Ge]|this[Ge+1]<<8|this[Ge+2]<<16|this[Ge+3]<<24},me.prototype.readInt32BE=function(Ge,tt){return Ge=Ge>>>0,tt||ct(Ge,4,this.length),this[Ge]<<24|this[Ge+1]<<16|this[Ge+2]<<8|this[Ge+3]},me.prototype.readFloatLE=function(Ge,tt){return Ge=Ge>>>0,tt||ct(Ge,4,this.length),Ee.read(this,Ge,!0,23,4)},me.prototype.readFloatBE=function(Ge,tt){return Ge=Ge>>>0,tt||ct(Ge,4,this.length),Ee.read(this,Ge,!1,23,4)},me.prototype.readDoubleLE=function(Ge,tt){return Ge=Ge>>>0,tt||ct(Ge,8,this.length),Ee.read(this,Ge,!0,52,8)},me.prototype.readDoubleBE=function(Ge,tt){return Ge=Ge>>>0,tt||ct(Ge,8,this.length),Ee.read(this,Ge,!1,52,8)};function xt(_e,Ge,tt,ht,ut,Ot){if(!me.isBuffer(_e))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ge>ut||Ge<Ot)throw new RangeError('"value" argument is out of bounds');if(tt+ht>_e.length)throw new RangeError("Index out of range")}me.prototype.writeUIntLE=function(Ge,tt,ht,ut){if(Ge=+Ge,tt=tt>>>0,ht=ht>>>0,!ut){var Ot=Math.pow(2,8*ht)-1;xt(this,Ge,tt,ht,Ot,0)}var Et=1,Ft=0;for(this[tt]=Ge&255;++Ft<ht&&(Et*=256);)this[tt+Ft]=Ge/Et&255;return tt+ht},me.prototype.writeUIntBE=function(Ge,tt,ht,ut){if(Ge=+Ge,tt=tt>>>0,ht=ht>>>0,!ut){var Ot=Math.pow(2,8*ht)-1;xt(this,Ge,tt,ht,Ot,0)}var Et=ht-1,Ft=1;for(this[tt+Et]=Ge&255;--Et>=0&&(Ft*=256);)this[tt+Et]=Ge/Ft&255;return tt+ht},me.prototype.writeUInt8=function(Ge,tt,ht){return Ge=+Ge,tt=tt>>>0,ht||xt(this,Ge,tt,1,255,0),this[tt]=Ge&255,tt+1},me.prototype.writeUInt16LE=function(Ge,tt,ht){return Ge=+Ge,tt=tt>>>0,ht||xt(this,Ge,tt,2,65535,0),this[tt]=Ge&255,this[tt+1]=Ge>>>8,tt+2},me.prototype.writeUInt16BE=function(Ge,tt,ht){return Ge=+Ge,tt=tt>>>0,ht||xt(this,Ge,tt,2,65535,0),this[tt]=Ge>>>8,this[tt+1]=Ge&255,tt+2},me.prototype.writeUInt32LE=function(Ge,tt,ht){return Ge=+Ge,tt=tt>>>0,ht||xt(this,Ge,tt,4,4294967295,0),this[tt+3]=Ge>>>24,this[tt+2]=Ge>>>16,this[tt+1]=Ge>>>8,this[tt]=Ge&255,tt+4},me.prototype.writeUInt32BE=function(Ge,tt,ht){return Ge=+Ge,tt=tt>>>0,ht||xt(this,Ge,tt,4,4294967295,0),this[tt]=Ge>>>24,this[tt+1]=Ge>>>16,this[tt+2]=Ge>>>8,this[tt+3]=Ge&255,tt+4},me.prototype.writeIntLE=function(Ge,tt,ht,ut){if(Ge=+Ge,tt=tt>>>0,!ut){var Ot=Math.pow(2,8*ht-1);xt(this,Ge,tt,ht,Ot-1,-Ot)}var Et=0,Ft=1,qt=0;for(this[tt]=Ge&255;++Et<ht&&(Ft*=256);)Ge<0&&qt===0&&this[tt+Et-1]!==0&&(qt=1),this[tt+Et]=(Ge/Ft>>0)-qt&255;return tt+ht},me.prototype.writeIntBE=function(Ge,tt,ht,ut){if(Ge=+Ge,tt=tt>>>0,!ut){var Ot=Math.pow(2,8*ht-1);xt(this,Ge,tt,ht,Ot-1,-Ot)}var Et=ht-1,Ft=1,qt=0;for(this[tt+Et]=Ge&255;--Et>=0&&(Ft*=256);)Ge<0&&qt===0&&this[tt+Et+1]!==0&&(qt=1),this[tt+Et]=(Ge/Ft>>0)-qt&255;return tt+ht},me.prototype.writeInt8=function(Ge,tt,ht){return Ge=+Ge,tt=tt>>>0,ht||xt(this,Ge,tt,1,127,-128),Ge<0&&(Ge=255+Ge+1),this[tt]=Ge&255,tt+1},me.prototype.writeInt16LE=function(Ge,tt,ht){return Ge=+Ge,tt=tt>>>0,ht||xt(this,Ge,tt,2,32767,-32768),this[tt]=Ge&255,this[tt+1]=Ge>>>8,tt+2},me.prototype.writeInt16BE=function(Ge,tt,ht){return Ge=+Ge,tt=tt>>>0,ht||xt(this,Ge,tt,2,32767,-32768),this[tt]=Ge>>>8,this[tt+1]=Ge&255,tt+2},me.prototype.writeInt32LE=function(Ge,tt,ht){return Ge=+Ge,tt=tt>>>0,ht||xt(this,Ge,tt,4,2147483647,-2147483648),this[tt]=Ge&255,this[tt+1]=Ge>>>8,this[tt+2]=Ge>>>16,this[tt+3]=Ge>>>24,tt+4},me.prototype.writeInt32BE=function(Ge,tt,ht){return Ge=+Ge,tt=tt>>>0,ht||xt(this,Ge,tt,4,2147483647,-2147483648),Ge<0&&(Ge=4294967295+Ge+1),this[tt]=Ge>>>24,this[tt+1]=Ge>>>16,this[tt+2]=Ge>>>8,this[tt+3]=Ge&255,tt+4};function dt(_e,Ge,tt,ht,ut,Ot){if(tt+ht>_e.length)throw new RangeError("Index out of range");if(tt<0)throw new RangeError("Index out of range")}function Mt(_e,Ge,tt,ht,ut){return Ge=+Ge,tt=tt>>>0,ut||dt(_e,Ge,tt,4,34028234663852886e22,-34028234663852886e22),Ee.write(_e,Ge,tt,ht,23,4),tt+4}me.prototype.writeFloatLE=function(Ge,tt,ht){return Mt(this,Ge,tt,!0,ht)},me.prototype.writeFloatBE=function(Ge,tt,ht){return Mt(this,Ge,tt,!1,ht)};function yt(_e,Ge,tt,ht,ut){return Ge=+Ge,tt=tt>>>0,ut||dt(_e,Ge,tt,8,17976931348623157e292,-17976931348623157e292),Ee.write(_e,Ge,tt,ht,52,8),tt+8}me.prototype.writeDoubleLE=function(Ge,tt,ht){return yt(this,Ge,tt,!0,ht)},me.prototype.writeDoubleBE=function(Ge,tt,ht){return yt(this,Ge,tt,!1,ht)},me.prototype.copy=function(Ge,tt,ht,ut){if(!me.isBuffer(Ge))throw new TypeError("argument should be a Buffer");if(ht||(ht=0),!ut&&ut!==0&&(ut=this.length),tt>=Ge.length&&(tt=Ge.length),tt||(tt=0),ut>0&&ut<ht&&(ut=ht),ut===ht||Ge.length===0||this.length===0)return 0;if(tt<0)throw new RangeError("targetStart out of bounds");if(ht<0||ht>=this.length)throw new RangeError("Index out of range");if(ut<0)throw new RangeError("sourceEnd out of bounds");ut>this.length&&(ut=this.length),Ge.length-tt<ut-ht&&(ut=Ge.length-tt+ht);var Ot=ut-ht;if(this===Ge&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(tt,ht,ut);else if(this===Ge&&ht<tt&&tt<ut)for(var Et=Ot-1;Et>=0;--Et)Ge[Et+tt]=this[Et+ht];else Uint8Array.prototype.set.call(Ge,this.subarray(ht,ut),tt);return Ot},me.prototype.fill=function(Ge,tt,ht,ut){if(typeof Ge=="string"){if(typeof tt=="string"?(ut=tt,tt=0,ht=this.length):typeof ht=="string"&&(ut=ht,ht=this.length),ut!==void 0&&typeof ut!="string")throw new TypeError("encoding must be a string");if(typeof ut=="string"&&!me.isEncoding(ut))throw new TypeError("Unknown encoding: "+ut);if(Ge.length===1){var Ot=Ge.charCodeAt(0);(ut==="utf8"&&Ot<128||ut==="latin1")&&(Ge=Ot)}}else typeof Ge=="number"&&(Ge=Ge&255);if(tt<0||this.length<tt||this.length<ht)throw new RangeError("Out of range index");if(ht<=tt)return this;tt=tt>>>0,ht=ht===void 0?this.length:ht>>>0,Ge||(Ge=0);var Et;if(typeof Ge=="number")for(Et=tt;Et<ht;++Et)this[Et]=Ge;else{var Ft=me.isBuffer(Ge)?Ge:me.from(Ge,ut),qt=Ft.length;if(qt===0)throw new TypeError('The value "'+Ge+'" is invalid for argument "value"');for(Et=0;Et<ht-tt;++Et)this[Et+tt]=Ft[Et%qt]}return this};var Dt=/[^+/0-9A-Za-z-_]/g;function mt(_e){if(_e=_e.split("=")[0],_e=_e.trim().replace(Dt,""),_e.length<2)return"";for(;_e.length%4!==0;)_e=_e+"=";return _e}function vt(_e){return _e<16?"0"+_e.toString(16):_e.toString(16)}function et(_e,Ge){Ge=Ge||1/0;for(var tt,ht=_e.length,ut=null,Ot=[],Et=0;Et<ht;++Et){if(tt=_e.charCodeAt(Et),tt>55295&&tt<57344){if(!ut){if(tt>56319){(Ge-=3)>-1&&Ot.push(239,191,189);continue}else if(Et+1===ht){(Ge-=3)>-1&&Ot.push(239,191,189);continue}ut=tt;continue}if(tt<56320){(Ge-=3)>-1&&Ot.push(239,191,189),ut=tt;continue}tt=(ut-55296<<10|tt-56320)+65536}else ut&&(Ge-=3)>-1&&Ot.push(239,191,189);if(ut=null,tt<128){if((Ge-=1)<0)break;Ot.push(tt)}else if(tt<2048){if((Ge-=2)<0)break;Ot.push(tt>>6|192,tt&63|128)}else if(tt<65536){if((Ge-=3)<0)break;Ot.push(tt>>12|224,tt>>6&63|128,tt&63|128)}else if(tt<1114112){if((Ge-=4)<0)break;Ot.push(tt>>18|240,tt>>12&63|128,tt>>6&63|128,tt&63|128)}else throw new Error("Invalid code point")}return Ot}function We(_e){for(var Ge=[],tt=0;tt<_e.length;++tt)Ge.push(_e.charCodeAt(tt)&255);return Ge}function we(_e,Ge){for(var tt,ht,ut,Ot=[],Et=0;Et<_e.length&&!((Ge-=2)<0);++Et)tt=_e.charCodeAt(Et),ht=tt>>8,ut=tt%256,Ot.push(ut),Ot.push(ht);return Ot}function Ne(_e){return ve.toByteArray(mt(_e))}function Xe(_e,Ge,tt,ht){for(var ut=0;ut<ht&&!(ut+tt>=Ge.length||ut>=_e.length);++ut)Ge[ut+tt]=_e[ut];return ut}function nt(_e,Ge){return _e instanceof Ge||_e!=null&&_e.constructor!=null&&_e.constructor.name!=null&&_e.constructor.name===Ge.name}function Ie(_e){return _e!==_e}}).call(this)}).call(this,oe("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(oe,He,Re){He.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],92:[function(oe,He,Re){"use strict";var de=oe("get-intrinsic"),ve=oe("./"),Ee=ve(de("String.prototype.indexOf"));He.exports=function(Se,Ae){var me=de(Se,!!Ae);return typeof me=="function"&&Ee(Se,".prototype.")>-1?ve(me):me}},{"./":93,"get-intrinsic":348}],93:[function(oe,He,Re){"use strict";var de=oe("function-bind"),ve=oe("get-intrinsic"),Ee=ve("%Function.prototype.apply%"),ke=ve("%Function.prototype.call%"),Se=ve("%Reflect.apply%",!0)||de.call(ke,Ee),Ae=ve("%Object.getOwnPropertyDescriptor%",!0),me=ve("%Object.defineProperty%",!0),Pe=ve("%Math.max%");if(me)try{me({},"a",{value:1})}catch(z){me=null}He.exports=function(te){var se=Se(de,ke,arguments);if(Ae&&me){var ie=Ae(se,"length");ie.configurable&&me(se,"length",{value:1+Pe(0,te.length-(arguments.length-1))})}return se};var fe=function(){return Se(de,Ee,arguments)};me?me(He.exports,"apply",{value:fe}):He.exports.apply=fe},{"function-bind":347,"get-intrinsic":348}],94:[function(oe,He,Re){"use strict";var de=Array.prototype.slice;He.exports=ve;function ve(ke,Se){if(!(this instanceof ve))return new ve(ke,Se);this.src=ke,this._withAccess=Se}ve.prototype.withAccess=function(ke){return this._withAccess=ke!==!1,this},ve.prototype.pick=function(ke){return Array.isArray(ke)||(ke=de.call(arguments)),ke.length&&(this.keys=ke),this},ve.prototype.to=function(ke){if(ke=ke||{},!this.src)return ke;var Se=this.keys||Object.keys(this.src);if(!this._withAccess){for(var Ae=0;Ae<Se.length;Ae++)me=Se[Ae],ke[me]===void 0&&(ke[me]=this.src[me]);return ke}for(var Ae=0;Ae<Se.length;Ae++){var me=Se[Ae];if(Ee(ke,me)){var Pe=this.src.__lookupGetter__(me),fe=this.src.__lookupSetter__(me);Pe&&ke.__defineGetter__(me,Pe),fe&&ke.__defineSetter__(me,fe),!Pe&&!fe&&(ke[me]=this.src[me])}}return ke},ve.prototype.toCover=function(ke){for(var Se=this.keys||Object.keys(this.src),Ae=0;Ae<Se.length;Ae++){var me=Se[Ae];delete ke[me];var Pe=this.src.__lookupGetter__(me),fe=this.src.__lookupSetter__(me);Pe&&ke.__defineGetter__(me,Pe),fe&&ke.__defineSetter__(me,fe),!Pe&&!fe&&(ke[me]=this.src[me])}},ve.prototype.override=ve.prototype.toCover,ve.prototype.and=function(ke){var Se={};return this.to(Se),this.src=ke,this.to(Se),this.src=Se,this};function Ee(ke,Se){return ke[Se]===void 0&&ke.__lookupGetter__(Se)===void 0&&ke.__lookupSetter__(Se)===void 0}},{}],95:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=oe("../internals/try-to-string"),ke=de.TypeError;He.exports=function(Se){if(ve(Se))return Se;throw ke(Ee(Se)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/is-constructor"),Ee=oe("../internals/try-to-string"),ke=de.TypeError;He.exports=function(Se){if(ve(Se))return Se;throw ke(Ee(Se)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=de.String,ke=de.TypeError;He.exports=function(Se){if(typeof Se=="object"||ve(Se))return Se;throw ke("Can't set "+Ee(Se)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(oe,He,Re){var de=oe("../internals/well-known-symbol"),ve=oe("../internals/object-create"),Ee=oe("../internals/object-define-property"),ke=de("unscopables"),Se=Array.prototype;Se[ke]==null&&Ee.f(Se,ke,{configurable:!0,value:ve(null)}),He.exports=function(Ae){Se[ke][Ae]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(oe,He,Re){"use strict";var de=oe("../internals/string-multibyte").charAt;He.exports=function(ve,Ee,ke){return Ee+(ke?de(ve,Ee).length:1)}},{"../internals/string-multibyte":239}],100:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/object-is-prototype-of"),Ee=de.TypeError;He.exports=function(ke,Se){if(ve(Se,ke))return ke;throw Ee("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/is-object"),Ee=de.String,ke=de.TypeError;He.exports=function(Se){if(ve(Se))return Se;throw ke(Ee(Se)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(oe,He,Re){He.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-native"),ve=oe("../internals/descriptors"),Ee=oe("../internals/global"),ke=oe("../internals/is-callable"),Se=oe("../internals/is-object"),Ae=oe("../internals/has-own-property"),me=oe("../internals/classof"),Pe=oe("../internals/try-to-string"),fe=oe("../internals/create-non-enumerable-property"),z=oe("../internals/redefine"),te=oe("../internals/object-define-property").f,se=oe("../internals/object-is-prototype-of"),ie=oe("../internals/object-get-prototype-of"),le=oe("../internals/object-set-prototype-of"),ce=oe("../internals/well-known-symbol"),pe=oe("../internals/uid"),xe=Ee.Int8Array,je=xe&&xe.prototype,De=Ee.Uint8ClampedArray,Fe=De&&De.prototype,Te=xe&&ie(xe),Me=je&&ie(je),Be=Object.prototype,Ue=Ee.TypeError,Ye=ce("toStringTag"),Ve=pe("TYPED_ARRAY_TAG"),Ze=pe("TYPED_ARRAY_CONSTRUCTOR"),ot=de&&!!le&&me(Ee.opera)!=="Opera",lt=!1,ft,St,qe,rt={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},wt={BigInt64Array:8,BigUint64Array:8},Ct=function(Dt){if(!Se(Dt))return!1;var mt=me(Dt);return mt==="DataView"||Ae(rt,mt)||Ae(wt,mt)},bt=function(yt){if(!Se(yt))return!1;var Dt=me(yt);return Ae(rt,Dt)||Ae(wt,Dt)},ct=function(yt){if(bt(yt))return yt;throw Ue("Target is not a typed array")},xt=function(yt){if(ke(yt)&&(!le||se(Te,yt)))return yt;throw Ue(Pe(yt)+" is not a typed array constructor")},dt=function(yt,Dt,mt,vt){if(ve){if(mt)for(var et in rt){var We=Ee[et];if(We&&Ae(We.prototype,yt))try{delete We.prototype[yt]}catch(we){try{We.prototype[yt]=Dt}catch(Ne){}}}(!Me[yt]||mt)&&z(Me,yt,mt?Dt:ot&&je[yt]||Dt,vt)}},Mt=function(yt,Dt,mt){var vt,et;if(ve){if(le){if(mt){for(vt in rt)if(et=Ee[vt],et&&Ae(et,yt))try{delete et[yt]}catch(We){}}if(!Te[yt]||mt)try{return z(Te,yt,mt?Dt:ot&&Te[yt]||Dt)}catch(We){}else return}for(vt in rt)et=Ee[vt],et&&(!et[yt]||mt)&&z(et,yt,Dt)}};for(ft in rt)St=Ee[ft],qe=St&&St.prototype,qe?fe(qe,Ze,St):ot=!1;for(ft in wt)St=Ee[ft],qe=St&&St.prototype,qe&&fe(qe,Ze,St);if((!ot||!ke(Te)||Te===Function.prototype)&&(Te=function(){throw Ue("Incorrect invocation")},ot))for(ft in rt)Ee[ft]&&le(Ee[ft],Te);if((!ot||!Me||Me===Be)&&(Me=Te.prototype,ot))for(ft in rt)Ee[ft]&&le(Ee[ft].prototype,Me);if(ot&&ie(Fe)!==Me&&le(Fe,Me),ve&&!Ae(Me,Ye)){lt=!0,te(Me,Ye,{get:function(){return Se(this)?this[Ve]:void 0}});for(ft in rt)Ee[ft]&&fe(Ee[ft],Ve,ft)}He.exports={NATIVE_ARRAY_BUFFER_VIEWS:ot,TYPED_ARRAY_CONSTRUCTOR:Ze,TYPED_ARRAY_TAG:lt&&Ve,aTypedArray:ct,aTypedArrayConstructor:xt,exportTypedArrayMethod:dt,exportTypedArrayStaticMethod:Mt,isView:Ct,isTypedArray:bt,TypedArray:Te,TypedArrayPrototype:Me}},{"../internals/array-buffer-native":102,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-define-property":198,"../internals/object-get-prototype-of":203,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/try-to-string":257,"../internals/uid":263,"../internals/well-known-symbol":268}],104:[function(oe,He,Re){"use strict";var de=oe("../internals/global"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/descriptors"),ke=oe("../internals/array-buffer-native"),Se=oe("../internals/function-name"),Ae=oe("../internals/create-non-enumerable-property"),me=oe("../internals/redefine-all"),Pe=oe("../internals/fails"),fe=oe("../internals/an-instance"),z=oe("../internals/to-integer-or-infinity"),te=oe("../internals/to-length"),se=oe("../internals/to-index"),ie=oe("../internals/ieee754"),le=oe("../internals/object-get-prototype-of"),ce=oe("../internals/object-set-prototype-of"),pe=oe("../internals/object-get-own-property-names").f,xe=oe("../internals/object-define-property").f,je=oe("../internals/array-fill"),De=oe("../internals/array-slice-simple"),Fe=oe("../internals/set-to-string-tag"),Te=oe("../internals/internal-state"),Me=Se.PROPER,Be=Se.CONFIGURABLE,Ue=Te.get,Ye=Te.set,Ve="ArrayBuffer",Ze="DataView",ot="prototype",lt="Wrong length",ft="Wrong index",St=de[Ve],qe=St,rt=qe&&qe[ot],wt=de[Ze],Ct=wt&&wt[ot],bt=Object.prototype,ct=de.Array,xt=de.RangeError,dt=ve(je),Mt=ve([].reverse),yt=ie.pack,Dt=ie.unpack,mt=function(Et){return[Et&255]},vt=function(Et){return[Et&255,Et>>8&255]},et=function(Et){return[Et&255,Et>>8&255,Et>>16&255,Et>>24&255]},We=function(Et){return Et[3]<<24|Et[2]<<16|Et[1]<<8|Et[0]},we=function(Et){return yt(Et,23,4)},Ne=function(Et){return yt(Et,52,8)},Xe=function(Et,Ft){xe(Et[ot],Ft,{get:function(){return Ue(this)[Ft]}})},nt=function(Et,Ft,qt,Xt){var Kt=se(qt),Vt=Ue(Et);if(Kt+Ft>Vt.byteLength)throw xt(ft);var hn=Ue(Vt.buffer).bytes,on=Kt+Vt.byteOffset,cn=De(hn,on,on+Ft);return Xt?cn:Mt(cn)},Ie=function(Et,Ft,qt,Xt,Kt,Vt){var hn=se(qt),on=Ue(Et);if(hn+Ft>on.byteLength)throw xt(ft);for(var cn=Ue(on.buffer).bytes,Sn=hn+on.byteOffset,Cn=Xt(+Kt),kn=0;kn<Ft;kn++)cn[Sn+kn]=Cn[Vt?kn:Ft-kn-1]};if(!ke)qe=function(Ft){fe(this,rt);var qt=se(Ft);Ye(this,{bytes:dt(ct(qt),0),byteLength:qt}),Ee||(this.byteLength=qt)},rt=qe[ot],wt=function(Ft,qt,Xt){fe(this,Ct),fe(Ft,rt);var Kt=Ue(Ft).byteLength,Vt=z(qt);if(Vt<0||Vt>Kt)throw xt("Wrong offset");if(Xt=Xt===void 0?Kt-Vt:te(Xt),Vt+Xt>Kt)throw xt(lt);Ye(this,{buffer:Ft,byteLength:Xt,byteOffset:Vt}),Ee||(this.buffer=Ft,this.byteLength=Xt,this.byteOffset=Vt)},Ct=wt[ot],Ee&&(Xe(qe,"byteLength"),Xe(wt,"buffer"),Xe(wt,"byteLength"),Xe(wt,"byteOffset")),me(Ct,{getInt8:function(Ft){return nt(this,1,Ft)[0]<<24>>24},getUint8:function(Ft){return nt(this,1,Ft)[0]},getInt16:function(Ft){var qt=nt(this,2,Ft,arguments.length>1?arguments[1]:void 0);return(qt[1]<<8|qt[0])<<16>>16},getUint16:function(Ft){var qt=nt(this,2,Ft,arguments.length>1?arguments[1]:void 0);return qt[1]<<8|qt[0]},getInt32:function(Ft){return We(nt(this,4,Ft,arguments.length>1?arguments[1]:void 0))},getUint32:function(Ft){return We(nt(this,4,Ft,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Ft){return Dt(nt(this,4,Ft,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Ft){return Dt(nt(this,8,Ft,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Ft,qt){Ie(this,1,Ft,mt,qt)},setUint8:function(Ft,qt){Ie(this,1,Ft,mt,qt)},setInt16:function(Ft,qt){Ie(this,2,Ft,vt,qt,arguments.length>2?arguments[2]:void 0)},setUint16:function(Ft,qt){Ie(this,2,Ft,vt,qt,arguments.length>2?arguments[2]:void 0)},setInt32:function(Ft,qt){Ie(this,4,Ft,et,qt,arguments.length>2?arguments[2]:void 0)},setUint32:function(Ft,qt){Ie(this,4,Ft,et,qt,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Ft,qt){Ie(this,4,Ft,we,qt,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Ft,qt){Ie(this,8,Ft,Ne,qt,arguments.length>2?arguments[2]:void 0)}});else{var _e=Me&&St.name!==Ve;if(!Pe(function(){St(1)})||!Pe(function(){new St(-1)})||Pe(function(){return new St,new St(1.5),new St(NaN),_e&&!Be})){qe=function(Ft){return fe(this,rt),new St(se(Ft))},qe[ot]=rt;for(var Ge=pe(St),tt=0,ht;Ge.length>tt;)(ht=Ge[tt++])in qe||Ae(qe,ht,St[ht]);rt.constructor=qe}else _e&&Be&&Ae(St,"name",Ve);ce&&le(Ct)!==bt&&ce(Ct,bt);var ut=new wt(new qe(2)),Ot=ve(Ct.setInt8);ut.setInt8(0,2147483648),ut.setInt8(1,2147483649),(ut.getInt8(0)||!ut.getInt8(1))&&me(Ct,{setInt8:function(Ft,qt){Ot(this,Ft,qt<<24>>24)},setUint8:function(Ft,qt){Ot(this,Ft,qt<<24>>24)}},{unsafe:!0})}Fe(qe,Ve),Fe(wt,Ze),He.exports={ArrayBuffer:qe,DataView:wt}},{"../internals/an-instance":100,"../internals/array-buffer-native":102,"../internals/array-fill":106,"../internals/array-slice-simple":116,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/ieee754":169,"../internals/internal-state":173,"../internals/object-define-property":198,"../internals/object-get-own-property-names":201,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine-all":221,"../internals/set-to-string-tag":234,"../internals/to-index":246,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],105:[function(oe,He,Re){"use strict";var de=oe("../internals/to-object"),ve=oe("../internals/to-absolute-index"),Ee=oe("../internals/length-of-array-like"),ke=Math.min;He.exports=[].copyWithin||function(Ae,me){var Pe=de(this),fe=Ee(Pe),z=ve(Ae,fe),te=ve(me,fe),se=arguments.length>2?arguments[2]:void 0,ie=ke((se===void 0?fe:ve(se,fe))-te,fe-z),le=1;for(te<z&&z<te+ie&&(le=-1,te+=ie-1,z+=ie-1);ie-- >0;)te in Pe?Pe[z]=Pe[te]:delete Pe[z],z+=le,te+=le;return Pe}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(oe,He,Re){"use strict";var de=oe("../internals/to-object"),ve=oe("../internals/to-absolute-index"),Ee=oe("../internals/length-of-array-like");He.exports=function(Se){for(var Ae=de(this),me=Ee(Ae),Pe=arguments.length,fe=ve(Pe>1?arguments[1]:void 0,me),z=Pe>2?arguments[2]:void 0,te=z===void 0?me:ve(z,me);te>fe;)Ae[fe++]=Se;return Ae}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(oe,He,Re){"use strict";var de=oe("../internals/array-iteration").forEach,ve=oe("../internals/array-method-is-strict"),Ee=ve("forEach");He.exports=Ee?[].forEach:function(Se){return de(this,Se,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(oe,He,Re){var de=oe("../internals/length-of-array-like");He.exports=function(ve,Ee){for(var ke=0,Se=de(Ee),Ae=new ve(Se);Se>ke;)Ae[ke]=Ee[ke++];return Ae}},{"../internals/length-of-array-like":188}],109:[function(oe,He,Re){"use strict";var de=oe("../internals/global"),ve=oe("../internals/function-bind-context"),Ee=oe("../internals/function-call"),ke=oe("../internals/to-object"),Se=oe("../internals/call-with-safe-iteration-closing"),Ae=oe("../internals/is-array-iterator-method"),me=oe("../internals/is-constructor"),Pe=oe("../internals/length-of-array-like"),fe=oe("../internals/create-property"),z=oe("../internals/get-iterator"),te=oe("../internals/get-iterator-method"),se=de.Array;He.exports=function(le){var ce=ke(le),pe=me(this),xe=arguments.length,je=xe>1?arguments[1]:void 0,De=je!==void 0;De&&(je=ve(je,xe>2?arguments[2]:void 0));var Fe=te(ce),Te=0,Me,Be,Ue,Ye,Ve,Ze;if(Fe&&!(this==se&&Ae(Fe)))for(Ye=z(ce,Fe),Ve=Ye.next,Be=pe?new this:[];!(Ue=Ee(Ve,Ye)).done;Te++)Ze=De?Se(Ye,je,[Ue.value,Te],!0):Ue.value,fe(Be,Te,Ze);else for(Me=Pe(ce),Be=pe?new this(Me):se(Me);Me>Te;Te++)Ze=De?je(ce[Te],Te):ce[Te],fe(Be,Te,Ze);return Be.length=Te,Be}},{"../internals/call-with-safe-iteration-closing":121,"../internals/create-property":131,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/is-constructor":177,"../internals/length-of-array-like":188,"../internals/to-object":250}],110:[function(oe,He,Re){var de=oe("../internals/to-indexed-object"),ve=oe("../internals/to-absolute-index"),Ee=oe("../internals/length-of-array-like"),ke=function(Se){return function(Ae,me,Pe){var fe=de(Ae),z=Ee(fe),te=ve(Pe,z),se;if(Se&&me!=me){for(;z>te;)if(se=fe[te++],se!=se)return!0}else for(;z>te;te++)if((Se||te in fe)&&fe[te]===me)return Se||te||0;return!Se&&-1}};He.exports={includes:ke(!0),indexOf:ke(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(oe,He,Re){var de=oe("../internals/function-bind-context"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/indexed-object"),ke=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Ae=oe("../internals/array-species-create"),me=ve([].push),Pe=function(fe){var z=fe==1,te=fe==2,se=fe==3,ie=fe==4,le=fe==6,ce=fe==7,pe=fe==5||le;return function(xe,je,De,Fe){for(var Te=ke(xe),Me=Ee(Te),Be=de(je,De),Ue=Se(Me),Ye=0,Ve=Fe||Ae,Ze=z?Ve(xe,Ue):te||ce?Ve(xe,0):void 0,ot,lt;Ue>Ye;Ye++)if((pe||Ye in Me)&&(ot=Me[Ye],lt=Be(ot,Ye,Te),fe))if(z)Ze[Ye]=lt;else if(lt)switch(fe){case 3:return!0;case 5:return ot;case 6:return Ye;case 2:me(Ze,ot)}else switch(fe){case 4:return!1;case 7:me(Ze,ot)}return le?-1:se||ie?ie:Ze}};He.exports={forEach:Pe(0),map:Pe(1),filter:Pe(2),some:Pe(3),every:Pe(4),find:Pe(5),findIndex:Pe(6),filterReject:Pe(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(oe,He,Re){"use strict";var de=oe("../internals/function-apply"),ve=oe("../internals/to-indexed-object"),Ee=oe("../internals/to-integer-or-infinity"),ke=oe("../internals/length-of-array-like"),Se=oe("../internals/array-method-is-strict"),Ae=Math.min,me=[].lastIndexOf,Pe=!!me&&1/[1].lastIndexOf(1,-0)<0,fe=Se("lastIndexOf"),z=Pe||!fe;He.exports=z?function(se){if(Pe)return de(me,this,arguments)||0;var ie=ve(this),le=ke(ie),ce=le-1;for(arguments.length>1&&(ce=Ae(ce,Ee(arguments[1]))),ce<0&&(ce=le+ce);ce>=0;ce--)if(ce in ie&&ie[ce]===se)return ce||0;return-1}:me},{"../internals/array-method-is-strict":114,"../internals/function-apply":152,"../internals/length-of-array-like":188,"../internals/to-indexed-object":247,"../internals/to-integer-or-infinity":248}],113:[function(oe,He,Re){var de=oe("../internals/fails"),ve=oe("../internals/well-known-symbol"),Ee=oe("../internals/engine-v8-version"),ke=ve("species");He.exports=function(Se){return Ee>=51||!de(function(){var Ae=[],me=Ae.constructor={};return me[ke]=function(){return{foo:1}},Ae[Se](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(oe,He,Re){"use strict";var de=oe("../internals/fails");He.exports=function(ve,Ee){var ke=[][ve];return!!ke&&de(function(){ke.call(null,Ee||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/a-callable"),Ee=oe("../internals/to-object"),ke=oe("../internals/indexed-object"),Se=oe("../internals/length-of-array-like"),Ae=de.TypeError,me=function(Pe){return function(fe,z,te,se){ve(z);var ie=Ee(fe),le=ke(ie),ce=Se(ie),pe=Pe?ce-1:0,xe=Pe?-1:1;if(te<2)for(;;){if(pe in le){se=le[pe],pe+=xe;break}if(pe+=xe,Pe?pe<0:ce<=pe)throw Ae("Reduce of empty array with no initial value")}for(;Pe?pe>=0:ce>pe;pe+=xe)pe in le&&(se=z(se,le[pe],pe,ie));return se}};He.exports={left:me(!1),right:me(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/to-absolute-index"),Ee=oe("../internals/length-of-array-like"),ke=oe("../internals/create-property"),Se=de.Array,Ae=Math.max;He.exports=function(me,Pe,fe){for(var z=Ee(me),te=ve(Pe,z),se=ve(fe===void 0?z:fe,z),ie=Se(Ae(se-te,0)),le=0;te<se;te++,le++)ke(ie,le,me[te]);return ie.length=le,ie}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this");He.exports=de([].slice)},{"../internals/function-uncurry-this":157}],118:[function(oe,He,Re){var de=oe("../internals/array-slice-simple"),ve=Math.floor,Ee=function(Ae,me){var Pe=Ae.length,fe=ve(Pe/2);return Pe<8?ke(Ae,me):Se(Ae,Ee(de(Ae,0,fe),me),Ee(de(Ae,fe),me),me)},ke=function(Ae,me){for(var Pe=Ae.length,fe=1,z,te;fe<Pe;){for(te=fe,z=Ae[fe];te&&me(Ae[te-1],z)>0;)Ae[te]=Ae[--te];te!==fe++&&(Ae[te]=z)}return Ae},Se=function(Ae,me,Pe,fe){for(var z=me.length,te=Pe.length,se=0,ie=0;se<z||ie<te;)Ae[se+ie]=se<z&&ie<te?fe(me[se],Pe[ie])<=0?me[se++]:Pe[ie++]:se<z?me[se++]:Pe[ie++];return Ae};He.exports=Ee},{"../internals/array-slice-simple":116}],119:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/is-array"),Ee=oe("../internals/is-constructor"),ke=oe("../internals/is-object"),Se=oe("../internals/well-known-symbol"),Ae=Se("species"),me=de.Array;He.exports=function(Pe){var fe;return ve(Pe)&&(fe=Pe.constructor,Ee(fe)&&(fe===me||ve(fe.prototype))?fe=void 0:ke(fe)&&(fe=fe[Ae],fe===null&&(fe=void 0))),fe===void 0?me:fe}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(oe,He,Re){var de=oe("../internals/array-species-constructor");He.exports=function(ve,Ee){return new(de(ve))(Ee===0?0:Ee)}},{"../internals/array-species-constructor":119}],121:[function(oe,He,Re){var de=oe("../internals/an-object"),ve=oe("../internals/iterator-close");He.exports=function(Ee,ke,Se,Ae){try{return Ae?ke(de(Se)[0],Se[1]):ke(Se)}catch(me){ve(Ee,"throw",me)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(oe,He,Re){var de=oe("../internals/well-known-symbol"),ve=de("iterator"),Ee=!1;try{var ke=0,Se={next:function(){return{done:!!ke++}},return:function(){Ee=!0}};Se[ve]=function(){return this},Array.from(Se,function(){throw 2})}catch(Ae){}He.exports=function(Ae,me){if(!me&&!Ee)return!1;var Pe=!1;try{var fe={};fe[ve]=function(){return{next:function(){return{done:Pe=!0}}}},Ae(fe)}catch(z){}return Pe}},{"../internals/well-known-symbol":268}],123:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this"),ve=de({}.toString),Ee=de("".slice);He.exports=function(ke){return Ee(ve(ke),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/to-string-tag-support"),Ee=oe("../internals/is-callable"),ke=oe("../internals/classof-raw"),Se=oe("../internals/well-known-symbol"),Ae=Se("toStringTag"),me=de.Object,Pe=ke(function(){return arguments}())=="Arguments",fe=function(z,te){try{return z[te]}catch(se){}};He.exports=ve?ke:function(z){var te,se,ie;return z===void 0?"Undefined":z===null?"Null":typeof(se=fe(te=me(z),Ae))=="string"?se:Pe?ke(te):(ie=ke(te))=="Object"&&Ee(te.callee)?"Arguments":ie}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(oe,He,Re){var de=oe("../internals/has-own-property"),ve=oe("../internals/own-keys"),Ee=oe("../internals/object-get-own-property-descriptor"),ke=oe("../internals/object-define-property");He.exports=function(Se,Ae,me){for(var Pe=ve(Ae),fe=ke.f,z=Ee.f,te=0;te<Pe.length;te++){var se=Pe[te];!de(Se,se)&&!(me&&de(me,se))&&fe(Se,se,z(Ae,se))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(oe,He,Re){var de=oe("../internals/well-known-symbol"),ve=de("match");He.exports=function(Ee){var ke=/./;try{"/./"[Ee](ke)}catch(Se){try{return ke[ve]=!1,"/./"[Ee](ke)}catch(Ae){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(oe,He,Re){var de=oe("../internals/fails");He.exports=!de(function(){function ve(){}return ve.prototype.constructor=null,Object.getPrototypeOf(new ve)!==ve.prototype})},{"../internals/fails":150}],128:[function(oe,He,Re){"use strict";var de=oe("../internals/iterators-core").IteratorPrototype,ve=oe("../internals/object-create"),Ee=oe("../internals/create-property-descriptor"),ke=oe("../internals/set-to-string-tag"),Se=oe("../internals/iterators"),Ae=function(){return this};He.exports=function(me,Pe,fe,z){var te=Pe+" Iterator";return me.prototype=ve(de,{next:Ee(+!z,fe)}),ke(me,te,!1,!0),Se[te]=Ae,me}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(oe,He,Re){var de=oe("../internals/descriptors"),ve=oe("../internals/object-define-property"),Ee=oe("../internals/create-property-descriptor");He.exports=de?function(ke,Se,Ae){return ve.f(ke,Se,Ee(1,Ae))}:function(ke,Se,Ae){return ke[Se]=Ae,ke}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(oe,He,Re){He.exports=function(de,ve){return{enumerable:!(de&1),configurable:!(de&2),writable:!(de&4),value:ve}}},{}],131:[function(oe,He,Re){"use strict";var de=oe("../internals/to-property-key"),ve=oe("../internals/object-define-property"),Ee=oe("../internals/create-property-descriptor");He.exports=function(ke,Se,Ae){var me=de(Se);me in ke?ve.f(ke,me,Ee(0,Ae)):ke[me]=Ae}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-call"),Ee=oe("../internals/is-pure"),ke=oe("../internals/function-name"),Se=oe("../internals/is-callable"),Ae=oe("../internals/create-iterator-constructor"),me=oe("../internals/object-get-prototype-of"),Pe=oe("../internals/object-set-prototype-of"),fe=oe("../internals/set-to-string-tag"),z=oe("../internals/create-non-enumerable-property"),te=oe("../internals/redefine"),se=oe("../internals/well-known-symbol"),ie=oe("../internals/iterators"),le=oe("../internals/iterators-core"),ce=ke.PROPER,pe=ke.CONFIGURABLE,xe=le.IteratorPrototype,je=le.BUGGY_SAFARI_ITERATORS,De=se("iterator"),Fe="keys",Te="values",Me="entries",Be=function(){return this};He.exports=function(Ue,Ye,Ve,Ze,ot,lt,ft){Ae(Ve,Ye,Ze);var St=function(yt){if(yt===ot&&bt)return bt;if(!je&&yt in wt)return wt[yt];switch(yt){case Fe:return function(){return new Ve(this,yt)};case Te:return function(){return new Ve(this,yt)};case Me:return function(){return new Ve(this,yt)}}return function(){return new Ve(this)}},qe=Ye+" Iterator",rt=!1,wt=Ue.prototype,Ct=wt[De]||wt["@@iterator"]||ot&&wt[ot],bt=!je&&Ct||St(ot),ct=Ye=="Array"&&wt.entries||Ct,xt,dt,Mt;if(ct&&(xt=me(ct.call(new Ue)),xt!==Object.prototype&&xt.next&&(!Ee&&me(xt)!==xe&&(Pe?Pe(xt,xe):Se(xt[De])||te(xt,De,Be)),fe(xt,qe,!0,!0),Ee&&(ie[qe]=Be))),ce&&ot==Te&&Ct&&Ct.name!==Te&&(!Ee&&pe?z(wt,"name",Te):(rt=!0,bt=function(){return ve(Ct,this)})),ot)if(dt={values:St(Te),keys:lt?bt:St(Fe),entries:St(Me)},ft)for(Mt in dt)(je||rt||!(Mt in wt))&&te(wt,Mt,dt[Mt]);else de({target:Ye,proto:!0,forced:je||rt},dt);return(!Ee||ft)&&wt[De]!==bt&&te(wt,De,bt,{name:ot}),ie[Ye]=bt,dt}},{"../internals/create-iterator-constructor":128,"../internals/create-non-enumerable-property":129,"../internals/export":149,"../internals/function-call":155,"../internals/function-name":156,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/well-known-symbol":268}],133:[function(oe,He,Re){var de=oe("../internals/path"),ve=oe("../internals/has-own-property"),Ee=oe("../internals/well-known-symbol-wrapped"),ke=oe("../internals/object-define-property").f;He.exports=function(Se){var Ae=de.Symbol||(de.Symbol={});ve(Ae,Se)||ke(Ae,Se,{value:Ee.f(Se)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(oe,He,Re){var de=oe("../internals/fails");He.exports=!de(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/is-object"),Ee=de.document,ke=ve(Ee)&&ve(Ee.createElement);He.exports=function(Se){return ke?Ee.createElement(Se):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(oe,He,Re){He.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],137:[function(oe,He,Re){var de=oe("../internals/document-create-element"),ve=de("span").classList,Ee=ve&&ve.constructor&&ve.constructor.prototype;He.exports=Ee===Object.prototype?void 0:Ee},{"../internals/document-create-element":135}],138:[function(oe,He,Re){var de=oe("../internals/engine-user-agent"),ve=de.match(/firefox\/(\d+)/i);He.exports=!!ve&&+ve[1]},{"../internals/engine-user-agent":145}],139:[function(oe,He,Re){He.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(oe,He,Re){var de=oe("../internals/engine-user-agent");He.exports=/MSIE|Trident/.test(de)},{"../internals/engine-user-agent":145}],141:[function(oe,He,Re){var de=oe("../internals/engine-user-agent"),ve=oe("../internals/global");He.exports=/ipad|iphone|ipod/i.test(de)&&ve.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(oe,He,Re){var de=oe("../internals/engine-user-agent");He.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(de)},{"../internals/engine-user-agent":145}],143:[function(oe,He,Re){var de=oe("../internals/classof-raw"),ve=oe("../internals/global");He.exports=de(ve.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(oe,He,Re){var de=oe("../internals/engine-user-agent");He.exports=/web0s(?!.*chrome)/i.test(de)},{"../internals/engine-user-agent":145}],145:[function(oe,He,Re){var de=oe("../internals/get-built-in");He.exports=de("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/engine-user-agent"),Ee=de.process,ke=de.Deno,Se=Ee&&Ee.versions||ke&&ke.version,Ae=Se&&Se.v8,me,Pe;Ae&&(me=Ae.split("."),Pe=me[0]>0&&me[0]<4?1:+(me[0]+me[1])),!Pe&&ve&&(me=ve.match(/Edge\/(\d+)/),(!me||me[1]>=74)&&(me=ve.match(/Chrome\/(\d+)/),me&&(Pe=+me[1]))),He.exports=Pe},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(oe,He,Re){var de=oe("../internals/engine-user-agent"),ve=de.match(/AppleWebKit\/(\d+)\./);He.exports=!!ve&&+ve[1]},{"../internals/engine-user-agent":145}],148:[function(oe,He,Re){He.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/object-get-own-property-descriptor").f,Ee=oe("../internals/create-non-enumerable-property"),ke=oe("../internals/redefine"),Se=oe("../internals/set-global"),Ae=oe("../internals/copy-constructor-properties"),me=oe("../internals/is-forced");He.exports=function(Pe,fe){var z=Pe.target,te=Pe.global,se=Pe.stat,ie,le,ce,pe,xe,je;if(te?le=de:se?le=de[z]||Se(z,{}):le=(de[z]||{}).prototype,le)for(ce in fe){if(xe=fe[ce],Pe.noTargetGet?(je=ve(le,ce),pe=je&&je.value):pe=le[ce],ie=me(te?ce:z+(se?".":"#")+ce,Pe.forced),!ie&&pe!==void 0){if(typeof xe==typeof pe)continue;Ae(xe,pe)}(Pe.sham||pe&&pe.sham)&&Ee(xe,"sham",!0),ke(le,ce,xe,Pe)}}},{"../internals/copy-constructor-properties":125,"../internals/create-non-enumerable-property":129,"../internals/global":163,"../internals/is-forced":178,"../internals/object-get-own-property-descriptor":199,"../internals/redefine":222,"../internals/set-global":232}],150:[function(oe,He,Re){He.exports=function(de){try{return!!de()}catch(ve){return!0}}},{}],151:[function(oe,He,Re){"use strict";oe("../modules/es.regexp.exec");var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/redefine"),Ee=oe("../internals/regexp-exec"),ke=oe("../internals/fails"),Se=oe("../internals/well-known-symbol"),Ae=oe("../internals/create-non-enumerable-property"),me=Se("species"),Pe=RegExp.prototype;He.exports=function(fe,z,te,se){var ie=Se(fe),le=!ke(function(){var je={};return je[ie]=function(){return 7},""[fe](je)!=7}),ce=le&&!ke(function(){var je=!1,De=/a/;return fe==="split"&&(De={},De.constructor={},De.constructor[me]=function(){return De},De.flags="",De[ie]=/./[ie]),De.exec=function(){return je=!0,null},De[ie](""),!je});if(!le||!ce||te){var pe=de(/./[ie]),xe=z(ie,""[fe],function(je,De,Fe,Te,Me){var Be=de(je),Ue=De.exec;return Ue===Ee||Ue===Pe.exec?le&&!Me?{done:!0,value:pe(De,Fe,Te)}:{done:!0,value:Be(Fe,De,Te)}:{done:!1}});ve(String.prototype,fe,xe[0]),ve(Pe,ie,xe[1])}se&&Ae(Pe[ie],"sham",!0)}},{"../internals/create-non-enumerable-property":129,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/redefine":222,"../internals/regexp-exec":224,"../internals/well-known-symbol":268,"../modules/es.regexp.exec":300}],152:[function(oe,He,Re){var de=oe("../internals/function-bind-native"),ve=Function.prototype,Ee=ve.apply,ke=ve.call;He.exports=typeof Reflect=="object"&&Reflect.apply||(de?ke.bind(Ee):function(){return ke.apply(Ee,arguments)})},{"../internals/function-bind-native":154}],153:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/a-callable"),Ee=oe("../internals/function-bind-native"),ke=de(de.bind);He.exports=function(Se,Ae){return ve(Se),Ae===void 0?Se:Ee?ke(Se,Ae):function(){return Se.apply(Ae,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(oe,He,Re){var de=oe("../internals/fails");He.exports=!de(function(){var ve=function(){}.bind();return typeof ve!="function"||ve.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(oe,He,Re){var de=oe("../internals/function-bind-native"),ve=Function.prototype.call;He.exports=de?ve.bind(ve):function(){return ve.apply(ve,arguments)}},{"../internals/function-bind-native":154}],156:[function(oe,He,Re){var de=oe("../internals/descriptors"),ve=oe("../internals/has-own-property"),Ee=Function.prototype,ke=de&&Object.getOwnPropertyDescriptor,Se=ve(Ee,"name"),Ae=Se&&function(){}.name==="something",me=Se&&(!de||de&&ke(Ee,"name").configurable);He.exports={EXISTS:Se,PROPER:Ae,CONFIGURABLE:me}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(oe,He,Re){var de=oe("../internals/function-bind-native"),ve=Function.prototype,Ee=ve.bind,ke=ve.call,Se=de&&Ee.bind(ke,ke);He.exports=de?function(Ae){return Ae&&Se(Ae)}:function(Ae){return Ae&&function(){return ke.apply(Ae,arguments)}}},{"../internals/function-bind-native":154}],158:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=function(ke){return ve(ke)?ke:void 0};He.exports=function(ke,Se){return arguments.length<2?Ee(de[ke]):de[ke]&&de[ke][Se]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(oe,He,Re){var de=oe("../internals/classof"),ve=oe("../internals/get-method"),Ee=oe("../internals/iterators"),ke=oe("../internals/well-known-symbol"),Se=ke("iterator");He.exports=function(Ae){if(Ae!=null)return ve(Ae,Se)||ve(Ae,"@@iterator")||Ee[de(Ae)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/function-call"),Ee=oe("../internals/a-callable"),ke=oe("../internals/an-object"),Se=oe("../internals/try-to-string"),Ae=oe("../internals/get-iterator-method"),me=de.TypeError;He.exports=function(Pe,fe){var z=arguments.length<2?Ae(Pe):fe;if(Ee(z))return ke(ve(z,Pe));throw me(Se(Pe)+" is not iterable")}},{"../internals/a-callable":95,"../internals/an-object":101,"../internals/function-call":155,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/try-to-string":257}],161:[function(oe,He,Re){var de=oe("../internals/a-callable");He.exports=function(ve,Ee){var ke=ve[Ee];return ke==null?void 0:de(ke)}},{"../internals/a-callable":95}],162:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/to-object"),Ee=Math.floor,ke=de("".charAt),Se=de("".replace),Ae=de("".slice),me=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Pe=/\$([$&'`]|\d{1,2})/g;He.exports=function(fe,z,te,se,ie,le){var ce=te+fe.length,pe=se.length,xe=Pe;return ie!==void 0&&(ie=ve(ie),xe=me),Se(le,xe,function(je,De){var Fe;switch(ke(De,0)){case"$":return"$";case"&":return fe;case"`":return Ae(z,0,te);case"'":return Ae(z,ce);case"<":Fe=ie[Ae(De,1,-1)];break;default:var Te=+De;if(Te===0)return je;if(Te>pe){var Me=Ee(Te/10);return Me===0?je:Me<=pe?se[Me-1]===void 0?ke(De,1):se[Me-1]+ke(De,1):je}Fe=se[Te-1]}return Fe===void 0?"":Fe})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(oe,He,Re){(function(de){(function(){var ve=function(Ee){return Ee&&Ee.Math==Math&&Ee};He.exports=ve(typeof globalThis=="object"&&globalThis)||ve(typeof window=="object"&&window)||ve(typeof self=="object"&&self)||ve(typeof de=="object"&&de)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/to-object"),Ee=de({}.hasOwnProperty);He.exports=Object.hasOwn||function(Se,Ae){return Ee(ve(Se),Ae)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(oe,He,Re){He.exports={}},{}],166:[function(oe,He,Re){var de=oe("../internals/global");He.exports=function(ve,Ee){var ke=de.console;ke&&ke.error&&(arguments.length==1?ke.error(ve):ke.error(ve,Ee))}},{"../internals/global":163}],167:[function(oe,He,Re){var de=oe("../internals/get-built-in");He.exports=de("document","documentElement")},{"../internals/get-built-in":158}],168:[function(oe,He,Re){var de=oe("../internals/descriptors"),ve=oe("../internals/fails"),Ee=oe("../internals/document-create-element");He.exports=!de&&!ve(function(){return Object.defineProperty(Ee("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(oe,He,Re){var de=oe("../internals/global"),ve=de.Array,Ee=Math.abs,ke=Math.pow,Se=Math.floor,Ae=Math.log,me=Math.LN2,Pe=function(z,te,se){var ie=ve(se),le=se*8-te-1,ce=(1<<le)-1,pe=ce>>1,xe=te===23?ke(2,-24)-ke(2,-77):0,je=z<0||z===0&&1/z<0?1:0,De=0,Fe,Te,Me;for(z=Ee(z),z!=z||z===1/0?(Te=z!=z?1:0,Fe=ce):(Fe=Se(Ae(z)/me),Me=ke(2,-Fe),z*Me<1&&(Fe--,Me*=2),Fe+pe>=1?z+=xe/Me:z+=xe*ke(2,1-pe),z*Me>=2&&(Fe++,Me/=2),Fe+pe>=ce?(Te=0,Fe=ce):Fe+pe>=1?(Te=(z*Me-1)*ke(2,te),Fe=Fe+pe):(Te=z*ke(2,pe-1)*ke(2,te),Fe=0));te>=8;)ie[De++]=Te&255,Te/=256,te-=8;for(Fe=Fe<<te|Te,le+=te;le>0;)ie[De++]=Fe&255,Fe/=256,le-=8;return ie[--De]|=je*128,ie},fe=function(z,te){var se=z.length,ie=se*8-te-1,le=(1<<ie)-1,ce=le>>1,pe=ie-7,xe=se-1,je=z[xe--],De=je&127,Fe;for(je>>=7;pe>0;)De=De*256+z[xe--],pe-=8;for(Fe=De&(1<<-pe)-1,De>>=-pe,pe+=te;pe>0;)Fe=Fe*256+z[xe--],pe-=8;if(De===0)De=1-ce;else{if(De===le)return Fe?NaN:je?-1/0:1/0;Fe=Fe+ke(2,te),De=De-ce}return(je?-1:1)*Fe*ke(2,De-te)};He.exports={pack:Pe,unpack:fe}},{"../internals/global":163}],170:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/fails"),ke=oe("../internals/classof-raw"),Se=de.Object,Ae=ve("".split);He.exports=Ee(function(){return!Se("z").propertyIsEnumerable(0)})?function(me){return ke(me)=="String"?Ae(me,""):Se(me)}:Se},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(oe,He,Re){var de=oe("../internals/is-callable"),ve=oe("../internals/is-object"),Ee=oe("../internals/object-set-prototype-of");He.exports=function(ke,Se,Ae){var me,Pe;return Ee&&de(me=Se.constructor)&&me!==Ae&&ve(Pe=me.prototype)&&Pe!==Ae.prototype&&Ee(ke,Pe),ke}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/is-callable"),Ee=oe("../internals/shared-store"),ke=de(Function.toString);ve(Ee.inspectSource)||(Ee.inspectSource=function(Se){return ke(Se)}),He.exports=Ee.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(oe,He,Re){var de=oe("../internals/native-weak-map"),ve=oe("../internals/global"),Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/is-object"),Se=oe("../internals/create-non-enumerable-property"),Ae=oe("../internals/has-own-property"),me=oe("../internals/shared-store"),Pe=oe("../internals/shared-key"),fe=oe("../internals/hidden-keys"),z="Object already initialized",te=ve.TypeError,se=ve.WeakMap,ie,le,ce,pe=function(Be){return ce(Be)?le(Be):ie(Be,{})},xe=function(Be){return function(Ue){var Ye;if(!ke(Ue)||(Ye=le(Ue)).type!==Be)throw te("Incompatible receiver, "+Be+" required");return Ye}};if(de||me.state){var je=me.state||(me.state=new se),De=Ee(je.get),Fe=Ee(je.has),Te=Ee(je.set);ie=function(Be,Ue){if(Fe(je,Be))throw new te(z);return Ue.facade=Be,Te(je,Be,Ue),Ue},le=function(Be){return De(je,Be)||{}},ce=function(Be){return Fe(je,Be)}}else{var Me=Pe("state");fe[Me]=!0,ie=function(Be,Ue){if(Ae(Be,Me))throw new te(z);return Ue.facade=Be,Se(Be,Me,Ue),Ue},le=function(Be){return Ae(Be,Me)?Be[Me]:{}},ce=function(Be){return Ae(Be,Me)}}He.exports={set:ie,get:le,has:ce,enforce:pe,getterFor:xe}},{"../internals/create-non-enumerable-property":129,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/is-object":180,"../internals/native-weak-map":192,"../internals/shared-key":235,"../internals/shared-store":236}],174:[function(oe,He,Re){var de=oe("../internals/well-known-symbol"),ve=oe("../internals/iterators"),Ee=de("iterator"),ke=Array.prototype;He.exports=function(Se){return Se!==void 0&&(ve.Array===Se||ke[Ee]===Se)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(oe,He,Re){var de=oe("../internals/classof-raw");He.exports=Array.isArray||function(Ee){return de(Ee)=="Array"}},{"../internals/classof-raw":123}],176:[function(oe,He,Re){He.exports=function(de){return typeof de=="function"}},{}],177:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/fails"),Ee=oe("../internals/is-callable"),ke=oe("../internals/classof"),Se=oe("../internals/get-built-in"),Ae=oe("../internals/inspect-source"),me=function(){},Pe=[],fe=Se("Reflect","construct"),z=/^\s*(?:class|function)\b/,te=de(z.exec),se=!z.exec(me),ie=function(pe){if(!Ee(pe))return!1;try{return fe(me,Pe,pe),!0}catch(xe){return!1}},le=function(pe){if(!Ee(pe))return!1;switch(ke(pe)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return se||!!te(z,Ae(pe))}catch(xe){return!0}};le.sham=!0,He.exports=!fe||ve(function(){var ce;return ie(ie.call)||!ie(Object)||!ie(function(){ce=!0})||ce})?le:ie},{"../internals/classof":124,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/inspect-source":172,"../internals/is-callable":176}],178:[function(oe,He,Re){var de=oe("../internals/fails"),ve=oe("../internals/is-callable"),Ee=/#|\.prototype\./,ke=function(fe,z){var te=Ae[Se(fe)];return te==Pe?!0:te==me?!1:ve(z)?de(z):!!z},Se=ke.normalize=function(fe){return String(fe).replace(Ee,".").toLowerCase()},Ae=ke.data={},me=ke.NATIVE="N",Pe=ke.POLYFILL="P";He.exports=ke},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(oe,He,Re){var de=oe("../internals/is-object"),ve=Math.floor;He.exports=Number.isInteger||function(ke){return!de(ke)&&isFinite(ke)&&ve(ke)===ke}},{"../internals/is-object":180}],180:[function(oe,He,Re){var de=oe("../internals/is-callable");He.exports=function(ve){return typeof ve=="object"?ve!==null:de(ve)}},{"../internals/is-callable":176}],181:[function(oe,He,Re){He.exports=!1},{}],182:[function(oe,He,Re){var de=oe("../internals/is-object"),ve=oe("../internals/classof-raw"),Ee=oe("../internals/well-known-symbol"),ke=Ee("match");He.exports=function(Se){var Ae;return de(Se)&&((Ae=Se[ke])!==void 0?!!Ae:ve(Se)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/get-built-in"),Ee=oe("../internals/is-callable"),ke=oe("../internals/object-is-prototype-of"),Se=oe("../internals/use-symbol-as-uid"),Ae=de.Object;He.exports=Se?function(me){return typeof me=="symbol"}:function(me){var Pe=ve("Symbol");return Ee(Pe)&&ke(Pe.prototype,Ae(me))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/function-bind-context"),Ee=oe("../internals/function-call"),ke=oe("../internals/an-object"),Se=oe("../internals/try-to-string"),Ae=oe("../internals/is-array-iterator-method"),me=oe("../internals/length-of-array-like"),Pe=oe("../internals/object-is-prototype-of"),fe=oe("../internals/get-iterator"),z=oe("../internals/get-iterator-method"),te=oe("../internals/iterator-close"),se=de.TypeError,ie=function(ce,pe){this.stopped=ce,this.result=pe},le=ie.prototype;He.exports=function(ce,pe,xe){var je=xe&&xe.that,De=!!(xe&&xe.AS_ENTRIES),Fe=!!(xe&&xe.IS_ITERATOR),Te=!!(xe&&xe.INTERRUPTED),Me=ve(pe,je),Be,Ue,Ye,Ve,Ze,ot,lt,ft=function(qe){return Be&&te(Be,"normal",qe),new ie(!0,qe)},St=function(qe){return De?(ke(qe),Te?Me(qe[0],qe[1],ft):Me(qe[0],qe[1])):Te?Me(qe,ft):Me(qe)};if(Fe)Be=ce;else{if(Ue=z(ce),!Ue)throw se(Se(ce)+" is not iterable");if(Ae(Ue)){for(Ye=0,Ve=me(ce);Ve>Ye;Ye++)if(Ze=St(ce[Ye]),Ze&&Pe(le,Ze))return Ze;return new ie(!1)}Be=fe(ce,Ue)}for(ot=Be.next;!(lt=Ee(ot,Be)).done;){try{Ze=St(lt.value)}catch(qe){te(Be,"throw",qe)}if(typeof Ze=="object"&&Ze&&Pe(le,Ze))return Ze}return new ie(!1)}},{"../internals/an-object":101,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/iterator-close":185,"../internals/length-of-array-like":188,"../internals/object-is-prototype-of":204,"../internals/try-to-string":257}],185:[function(oe,He,Re){var de=oe("../internals/function-call"),ve=oe("../internals/an-object"),Ee=oe("../internals/get-method");He.exports=function(ke,Se,Ae){var me,Pe;ve(ke);try{if(me=Ee(ke,"return"),!me){if(Se==="throw")throw Ae;return Ae}me=de(me,ke)}catch(fe){Pe=!0,me=fe}if(Se==="throw")throw Ae;if(Pe)throw me;return ve(me),Ae}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(oe,He,Re){"use strict";var de=oe("../internals/fails"),ve=oe("../internals/is-callable"),Ee=oe("../internals/object-create"),ke=oe("../internals/object-get-prototype-of"),Se=oe("../internals/redefine"),Ae=oe("../internals/well-known-symbol"),me=oe("../internals/is-pure"),Pe=Ae("iterator"),fe=!1,z,te,se;[].keys&&(se=[].keys(),"next"in se?(te=ke(ke(se)),te!==Object.prototype&&(z=te)):fe=!0);var ie=z==null||de(function(){var le={};return z[Pe].call(le)!==le});ie?z={}:me&&(z=Ee(z)),ve(z[Pe])||Se(z,Pe,function(){return this}),He.exports={IteratorPrototype:z,BUGGY_SAFARI_ITERATORS:fe}},{"../internals/fails":150,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/object-create":196,"../internals/object-get-prototype-of":203,"../internals/redefine":222,"../internals/well-known-symbol":268}],187:[function(oe,He,Re){arguments[4][165][0].apply(Re,arguments)},{dup:165}],188:[function(oe,He,Re){var de=oe("../internals/to-length");He.exports=function(ve){return de(ve.length)}},{"../internals/to-length":249}],189:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/function-bind-context"),Ee=oe("../internals/object-get-own-property-descriptor").f,ke=oe("../internals/task").set,Se=oe("../internals/engine-is-ios"),Ae=oe("../internals/engine-is-ios-pebble"),me=oe("../internals/engine-is-webos-webkit"),Pe=oe("../internals/engine-is-node"),fe=de.MutationObserver||de.WebKitMutationObserver,z=de.document,te=de.process,se=de.Promise,ie=Ee(de,"queueMicrotask"),le=ie&&ie.value,ce,pe,xe,je,De,Fe,Te,Me;le||(ce=function(){var Be,Ue;for(Pe&&(Be=te.domain)&&Be.exit();pe;){Ue=pe.fn,pe=pe.next;try{Ue()}catch(Ye){throw pe?je():xe=void 0,Ye}}xe=void 0,Be&&Be.enter()},!Se&&!Pe&&!me&&fe&&z?(De=!0,Fe=z.createTextNode(""),new fe(ce).observe(Fe,{characterData:!0}),je=function(){Fe.data=De=!De}):!Ae&&se&&se.resolve?(Te=se.resolve(void 0),Te.constructor=se,Me=ve(Te.then,Te),je=function(){Me(ce)}):Pe?je=function(){te.nextTick(ce)}:(ke=ve(ke,de),je=function(){ke(ce)})),He.exports=le||function(Be){var Ue={fn:Be,next:void 0};xe&&(xe.next=Ue),pe||(pe=Ue,je()),xe=Ue}},{"../internals/engine-is-ios":142,"../internals/engine-is-ios-pebble":141,"../internals/engine-is-node":143,"../internals/engine-is-webos-webkit":144,"../internals/function-bind-context":153,"../internals/global":163,"../internals/object-get-own-property-descriptor":199,"../internals/task":243}],190:[function(oe,He,Re){var de=oe("../internals/native-symbol");He.exports=de&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(oe,He,Re){var de=oe("../internals/engine-v8-version"),ve=oe("../internals/fails");He.exports=!!Object.getOwnPropertySymbols&&!ve(function(){var Ee=Symbol();return!String(Ee)||!(Object(Ee)instanceof Symbol)||!Symbol.sham&&de&&de<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=oe("../internals/inspect-source"),ke=de.WeakMap;He.exports=ve(ke)&&/native code/.test(Ee(ke))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(oe,He,Re){"use strict";var de=oe("../internals/a-callable"),ve=function(Ee){var ke,Se;this.promise=new Ee(function(Ae,me){if(ke!==void 0||Se!==void 0)throw TypeError("Bad Promise constructor");ke=Ae,Se=me}),this.resolve=de(ke),this.reject=de(Se)};He.exports.f=function(Ee){return new ve(Ee)}},{"../internals/a-callable":95}],194:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/is-regexp"),Ee=de.TypeError;He.exports=function(ke){if(ve(ke))throw Ee("The method doesn't accept regular expressions");return ke}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(oe,He,Re){"use strict";var de=oe("../internals/descriptors"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/function-call"),ke=oe("../internals/fails"),Se=oe("../internals/object-keys"),Ae=oe("../internals/object-get-own-property-symbols"),me=oe("../internals/object-property-is-enumerable"),Pe=oe("../internals/to-object"),fe=oe("../internals/indexed-object"),z=Object.assign,te=Object.defineProperty,se=ve([].concat);He.exports=!z||ke(function(){if(de&&z({b:1},z(te({},"a",{enumerable:!0,get:function(){te(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var ie={},le={},ce=Symbol(),pe="abcdefghijklmnopqrst";return ie[ce]=7,pe.split("").forEach(function(xe){le[xe]=xe}),z({},ie)[ce]!=7||Se(z({},le)).join("")!=pe})?function(le,ce){for(var pe=Pe(le),xe=arguments.length,je=1,De=Ae.f,Fe=me.f;xe>je;)for(var Te=fe(arguments[je++]),Me=De?se(Se(Te),De(Te)):Se(Te),Be=Me.length,Ue=0,Ye;Be>Ue;)Ye=Me[Ue++],(!de||Ee(Fe,Te,Ye))&&(pe[Ye]=Te[Ye]);return pe}:z},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/object-get-own-property-symbols":202,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-object":250}],196:[function(oe,He,Re){var de=oe("../internals/an-object"),ve=oe("../internals/object-define-properties"),Ee=oe("../internals/enum-bug-keys"),ke=oe("../internals/hidden-keys"),Se=oe("../internals/html"),Ae=oe("../internals/document-create-element"),me=oe("../internals/shared-key"),Pe=">",fe="<",z="prototype",te="script",se=me("IE_PROTO"),ie=function(){},le=function(De){return fe+te+Pe+De+fe+"/"+te+Pe},ce=function(De){De.write(le("")),De.close();var Fe=De.parentWindow.Object;return De=null,Fe},pe=function(){var De=Ae("iframe"),Fe="java"+te+":",Te;return De.style.display="none",Se.appendChild(De),De.src=String(Fe),Te=De.contentWindow.document,Te.open(),Te.write(le("document.F=Object")),Te.close(),Te.F},xe,je=function(){try{xe=new ActiveXObject("htmlfile")}catch(Fe){}je=typeof document!="undefined"?document.domain&&xe?ce(xe):pe():ce(xe);for(var De=Ee.length;De--;)delete je[z][Ee[De]];return je()};ke[se]=!0,He.exports=Object.create||function(Fe,Te){var Me;return Fe!==null?(ie[z]=de(Fe),Me=new ie,ie[z]=null,Me[se]=Fe):Me=je(),Te===void 0?Me:ve.f(Me,Te)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(oe,He,Re){var de=oe("../internals/descriptors"),ve=oe("../internals/v8-prototype-define-bug"),Ee=oe("../internals/object-define-property"),ke=oe("../internals/an-object"),Se=oe("../internals/to-indexed-object"),Ae=oe("../internals/object-keys");Re.f=de&&!ve?Object.defineProperties:function(Pe,fe){ke(Pe);for(var z=Se(fe),te=Ae(fe),se=te.length,ie=0,le;se>ie;)Ee.f(Pe,le=te[ie++],z[le]);return Pe}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/descriptors"),Ee=oe("../internals/ie8-dom-define"),ke=oe("../internals/v8-prototype-define-bug"),Se=oe("../internals/an-object"),Ae=oe("../internals/to-property-key"),me=de.TypeError,Pe=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,z="enumerable",te="configurable",se="writable";Re.f=ve?ke?function(le,ce,pe){if(Se(le),ce=Ae(ce),Se(pe),typeof le=="function"&&ce==="prototype"&&"value"in pe&&se in pe&&!pe[se]){var xe=fe(le,ce);xe&&xe[se]&&(le[ce]=pe.value,pe={configurable:te in pe?pe[te]:xe[te],enumerable:z in pe?pe[z]:xe[z],writable:!1})}return Pe(le,ce,pe)}:Pe:function(le,ce,pe){if(Se(le),ce=Ae(ce),Se(pe),Ee)try{return Pe(le,ce,pe)}catch(xe){}if("get"in pe||"set"in pe)throw me("Accessors not supported");return"value"in pe&&(le[ce]=pe.value),le}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/global":163,"../internals/ie8-dom-define":168,"../internals/to-property-key":254,"../internals/v8-prototype-define-bug":265}],199:[function(oe,He,Re){var de=oe("../internals/descriptors"),ve=oe("../internals/function-call"),Ee=oe("../internals/object-property-is-enumerable"),ke=oe("../internals/create-property-descriptor"),Se=oe("../internals/to-indexed-object"),Ae=oe("../internals/to-property-key"),me=oe("../internals/has-own-property"),Pe=oe("../internals/ie8-dom-define"),fe=Object.getOwnPropertyDescriptor;Re.f=de?fe:function(te,se){if(te=Se(te),se=Ae(se),Pe)try{return fe(te,se)}catch(ie){}if(me(te,se))return ke(!ve(Ee.f,te,se),te[se])}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/function-call":155,"../internals/has-own-property":164,"../internals/ie8-dom-define":168,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247,"../internals/to-property-key":254}],200:[function(oe,He,Re){var de=oe("../internals/classof-raw"),ve=oe("../internals/to-indexed-object"),Ee=oe("../internals/object-get-own-property-names").f,ke=oe("../internals/array-slice-simple"),Se=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ae=function(me){try{return Ee(me)}catch(Pe){return ke(Se)}};He.exports.f=function(Pe){return Se&&de(Pe)=="Window"?Ae(Pe):Ee(ve(Pe))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(oe,He,Re){var de=oe("../internals/object-keys-internal"),ve=oe("../internals/enum-bug-keys"),Ee=ve.concat("length","prototype");Re.f=Object.getOwnPropertyNames||function(Se){return de(Se,Ee)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(oe,He,Re){Re.f=Object.getOwnPropertySymbols},{}],203:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/has-own-property"),Ee=oe("../internals/is-callable"),ke=oe("../internals/to-object"),Se=oe("../internals/shared-key"),Ae=oe("../internals/correct-prototype-getter"),me=Se("IE_PROTO"),Pe=de.Object,fe=Pe.prototype;He.exports=Ae?Pe.getPrototypeOf:function(z){var te=ke(z);if(ve(te,me))return te[me];var se=te.constructor;return Ee(se)&&te instanceof se?se.prototype:te instanceof Pe?fe:null}},{"../internals/correct-prototype-getter":127,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/shared-key":235,"../internals/to-object":250}],204:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this");He.exports=de({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/has-own-property"),Ee=oe("../internals/to-indexed-object"),ke=oe("../internals/array-includes").indexOf,Se=oe("../internals/hidden-keys"),Ae=de([].push);He.exports=function(me,Pe){var fe=Ee(me),z=0,te=[],se;for(se in fe)!ve(Se,se)&&ve(fe,se)&&Ae(te,se);for(;Pe.length>z;)ve(fe,se=Pe[z++])&&(~ke(te,se)||Ae(te,se));return te}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(oe,He,Re){var de=oe("../internals/object-keys-internal"),ve=oe("../internals/enum-bug-keys");He.exports=Object.keys||function(ke){return de(ke,ve)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(oe,He,Re){"use strict";var de={}.propertyIsEnumerable,ve=Object.getOwnPropertyDescriptor,Ee=ve&&!de.call({1:2},1);Re.f=Ee?function(Se){var Ae=ve(this,Se);return!!Ae&&Ae.enumerable}:de},{}],208:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/an-object"),Ee=oe("../internals/a-possible-prototype");He.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var ke=!1,Se={},Ae;try{Ae=de(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),Ae(Se,[]),ke=Se instanceof Array}catch(me){}return function(Pe,fe){return ve(Pe),Ee(fe),ke?Ae(Pe,fe):Pe.__proto__=fe,Pe}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(oe,He,Re){var de=oe("../internals/descriptors"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/object-keys"),ke=oe("../internals/to-indexed-object"),Se=oe("../internals/object-property-is-enumerable").f,Ae=ve(Se),me=ve([].push),Pe=function(fe){return function(z){for(var te=ke(z),se=Ee(te),ie=se.length,le=0,ce=[],pe;ie>le;)pe=se[le++],(!de||Ae(te,pe))&&me(ce,fe?[pe,te[pe]]:te[pe]);return ce}};He.exports={entries:Pe(!0),values:Pe(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(oe,He,Re){"use strict";var de=oe("../internals/to-string-tag-support"),ve=oe("../internals/classof");He.exports=de?{}.toString:function(){return"[object "+ve(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/function-call"),Ee=oe("../internals/is-callable"),ke=oe("../internals/is-object"),Se=de.TypeError;He.exports=function(Ae,me){var Pe,fe;if(me==="string"&&Ee(Pe=Ae.toString)&&!ke(fe=ve(Pe,Ae))||Ee(Pe=Ae.valueOf)&&!ke(fe=ve(Pe,Ae))||me!=="string"&&Ee(Pe=Ae.toString)&&!ke(fe=ve(Pe,Ae)))return fe;throw Se("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(oe,He,Re){var de=oe("../internals/get-built-in"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/object-get-own-property-names"),ke=oe("../internals/object-get-own-property-symbols"),Se=oe("../internals/an-object"),Ae=ve([].concat);He.exports=de("Reflect","ownKeys")||function(Pe){var fe=Ee.f(Se(Pe)),z=ke.f;return z?Ae(fe,z(Pe)):fe}},{"../internals/an-object":101,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-symbols":202}],213:[function(oe,He,Re){var de=oe("../internals/global");He.exports=de},{"../internals/global":163}],214:[function(oe,He,Re){He.exports=function(de){try{return{error:!1,value:de()}}catch(ve){return{error:!0,value:ve}}}},{}],215:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/promise-native-constructor"),Ee=oe("../internals/is-callable"),ke=oe("../internals/is-forced"),Se=oe("../internals/inspect-source"),Ae=oe("../internals/well-known-symbol"),me=oe("../internals/engine-is-browser"),Pe=oe("../internals/is-pure"),fe=oe("../internals/engine-v8-version"),z=ve&&ve.prototype,te=Ae("species"),se=!1,ie=Ee(de.PromiseRejectionEvent),le=ke("Promise",function(){var ce=Se(ve),pe=ce!==String(ve);if(!pe&&fe===66||Pe&&!(z.catch&&z.finally))return!0;if(fe>=51&&/native code/.test(ce))return!1;var xe=new ve(function(Fe){Fe(1)}),je=function(Fe){Fe(function(){},function(){})},De=xe.constructor={};return De[te]=je,se=xe.then(function(){})instanceof je,se?!pe&&me&&!ie:!0});He.exports={CONSTRUCTOR:le,REJECTION_EVENT:ie,SUBCLASSING:se}},{"../internals/engine-is-browser":139,"../internals/engine-v8-version":146,"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176,"../internals/is-forced":178,"../internals/is-pure":181,"../internals/promise-native-constructor":216,"../internals/well-known-symbol":268}],216:[function(oe,He,Re){var de=oe("../internals/global");He.exports=de.Promise},{"../internals/global":163}],217:[function(oe,He,Re){var de=oe("../internals/an-object"),ve=oe("../internals/is-object"),Ee=oe("../internals/new-promise-capability");He.exports=function(ke,Se){if(de(ke),ve(Se)&&Se.constructor===ke)return Se;var Ae=Ee.f(ke),me=Ae.resolve;return me(Se),Ae.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(oe,He,Re){var de=oe("../internals/promise-native-constructor"),ve=oe("../internals/check-correctness-of-iteration"),Ee=oe("../internals/promise-constructor-detection").CONSTRUCTOR;He.exports=Ee||!ve(function(ke){de.all(ke).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(oe,He,Re){var de=oe("../internals/object-define-property").f;He.exports=function(ve,Ee,ke){ke in ve||de(ve,ke,{configurable:!0,get:function(){return Ee[ke]},set:function(Se){Ee[ke]=Se}})}},{"../internals/object-define-property":198}],220:[function(oe,He,Re){var de=function(){this.head=null,this.tail=null};de.prototype={add:function(ve){var Ee={item:ve,next:null};this.head?this.tail.next=Ee:this.head=Ee,this.tail=Ee},get:function(){var ve=this.head;if(ve)return this.head=ve.next,this.tail===ve&&(this.tail=null),ve.item}},He.exports=de},{}],221:[function(oe,He,Re){var de=oe("../internals/redefine");He.exports=function(ve,Ee,ke){for(var Se in Ee)de(ve,Se,Ee[Se],ke);return ve}},{"../internals/redefine":222}],222:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=oe("../internals/has-own-property"),ke=oe("../internals/create-non-enumerable-property"),Se=oe("../internals/set-global"),Ae=oe("../internals/inspect-source"),me=oe("../internals/internal-state"),Pe=oe("../internals/function-name").CONFIGURABLE,fe=me.get,z=me.enforce,te=String(String).split("String");(He.exports=function(se,ie,le,ce){var pe=ce?!!ce.unsafe:!1,xe=ce?!!ce.enumerable:!1,je=ce?!!ce.noTargetGet:!1,De=ce&&ce.name!==void 0?ce.name:ie,Fe;if(ve(le)&&(String(De).slice(0,7)==="Symbol("&&(De="["+String(De).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ee(le,"name")||Pe&&le.name!==De)&&ke(le,"name",De),Fe=z(le),Fe.source||(Fe.source=te.join(typeof De=="string"?De:""))),se===de){xe?se[ie]=le:Se(ie,le);return}else pe?!je&&se[ie]&&(xe=!0):delete se[ie];xe?se[ie]=le:ke(se,ie,le)})(Function.prototype,"toString",function(){return ve(this)&&fe(this).source||Ae(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/function-call"),Ee=oe("../internals/an-object"),ke=oe("../internals/is-callable"),Se=oe("../internals/classof-raw"),Ae=oe("../internals/regexp-exec"),me=de.TypeError;He.exports=function(Pe,fe){var z=Pe.exec;if(ke(z)){var te=ve(z,Pe,fe);return te!==null&&Ee(te),te}if(Se(Pe)==="RegExp")return ve(Ae,Pe,fe);throw me("RegExp#exec called on incompatible receiver")}},{"../internals/an-object":101,"../internals/classof-raw":123,"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/regexp-exec":224}],224:[function(oe,He,Re){"use strict";var de=oe("../internals/function-call"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/to-string"),ke=oe("../internals/regexp-flags"),Se=oe("../internals/regexp-sticky-helpers"),Ae=oe("../internals/shared"),me=oe("../internals/object-create"),Pe=oe("../internals/internal-state").get,fe=oe("../internals/regexp-unsupported-dot-all"),z=oe("../internals/regexp-unsupported-ncg"),te=Ae("native-string-replace",String.prototype.replace),se=RegExp.prototype.exec,ie=se,le=ve("".charAt),ce=ve("".indexOf),pe=ve("".replace),xe=ve("".slice),je=function(){var Me=/a/,Be=/b*/g;return de(se,Me,"a"),de(se,Be,"a"),Me.lastIndex!==0||Be.lastIndex!==0}(),De=Se.BROKEN_CARET,Fe=/()??/.exec("")[1]!==void 0,Te=je||Fe||De||fe||z;Te&&(ie=function(Be){var Ue=this,Ye=Pe(Ue),Ve=Ee(Be),Ze=Ye.raw,ot,lt,ft,St,qe,rt,wt;if(Ze)return Ze.lastIndex=Ue.lastIndex,ot=de(ie,Ze,Ve),Ue.lastIndex=Ze.lastIndex,ot;var Ct=Ye.groups,bt=De&&Ue.sticky,ct=de(ke,Ue),xt=Ue.source,dt=0,Mt=Ve;if(bt&&(ct=pe(ct,"y",""),ce(ct,"g")===-1&&(ct+="g"),Mt=xe(Ve,Ue.lastIndex),Ue.lastIndex>0&&(!Ue.multiline||Ue.multiline&&le(Ve,Ue.lastIndex-1)!==`
|
|
`)&&(xt="(?: "+xt+")",Mt=" "+Mt,dt++),lt=new RegExp("^(?:"+xt+")",ct)),Fe&&(lt=new RegExp("^"+xt+"$(?!\\s)",ct)),je&&(ft=Ue.lastIndex),St=de(se,bt?lt:Ue,Mt),bt?St?(St.input=xe(St.input,dt),St[0]=xe(St[0],dt),St.index=Ue.lastIndex,Ue.lastIndex+=St[0].length):Ue.lastIndex=0:je&&St&&(Ue.lastIndex=Ue.global?St.index+St[0].length:ft),Fe&&St&&St.length>1&&de(te,St[0],lt,function(){for(qe=1;qe<arguments.length-2;qe++)arguments[qe]===void 0&&(St[qe]=void 0)}),St&&Ct)for(St.groups=rt=me(null),qe=0;qe<Ct.length;qe++)wt=Ct[qe],rt[wt[0]]=St[wt[1]];return St}),He.exports=ie},{"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/internal-state":173,"../internals/object-create":196,"../internals/regexp-flags":225,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/shared":237,"../internals/to-string":256}],225:[function(oe,He,Re){"use strict";var de=oe("../internals/an-object");He.exports=function(){var ve=de(this),Ee="";return ve.hasIndices&&(Ee+="d"),ve.global&&(Ee+="g"),ve.ignoreCase&&(Ee+="i"),ve.multiline&&(Ee+="m"),ve.dotAll&&(Ee+="s"),ve.unicode&&(Ee+="u"),ve.sticky&&(Ee+="y"),Ee}},{"../internals/an-object":101}],226:[function(oe,He,Re){var de=oe("../internals/function-call"),ve=oe("../internals/has-own-property"),Ee=oe("../internals/object-is-prototype-of"),ke=oe("../internals/regexp-flags"),Se=RegExp.prototype;He.exports=function(Ae){var me=Ae.flags;return me===void 0&&!("flags"in Se)&&!ve(Ae,"flags")&&Ee(Se,Ae)?de(ke,Ae):me}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(oe,He,Re){var de=oe("../internals/fails"),ve=oe("../internals/global"),Ee=ve.RegExp,ke=de(function(){var me=Ee("a","y");return me.lastIndex=2,me.exec("abcd")!=null}),Se=ke||de(function(){return!Ee("a","y").sticky}),Ae=ke||de(function(){var me=Ee("^r","gy");return me.lastIndex=2,me.exec("str")!=null});He.exports={BROKEN_CARET:Ae,MISSED_STICKY:Se,UNSUPPORTED_Y:ke}},{"../internals/fails":150,"../internals/global":163}],228:[function(oe,He,Re){var de=oe("../internals/fails"),ve=oe("../internals/global"),Ee=ve.RegExp;He.exports=de(function(){var ke=Ee(".","s");return!(ke.dotAll&&ke.exec(`
|
|
`)&&ke.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(oe,He,Re){var de=oe("../internals/fails"),ve=oe("../internals/global"),Ee=ve.RegExp;He.exports=de(function(){var ke=Ee("(?<a>b)","g");return ke.exec("b").groups.a!=="b"||"b".replace(ke,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(oe,He,Re){var de=oe("../internals/global"),ve=de.TypeError;He.exports=function(Ee){if(Ee==null)throw ve("Can't call method on "+Ee);return Ee}},{"../internals/global":163}],231:[function(oe,He,Re){He.exports=Object.is||function(ve,Ee){return ve===Ee?ve!==0||1/ve===1/Ee:ve!=ve&&Ee!=Ee}},{}],232:[function(oe,He,Re){var de=oe("../internals/global"),ve=Object.defineProperty;He.exports=function(Ee,ke){try{ve(de,Ee,{value:ke,configurable:!0,writable:!0})}catch(Se){de[Ee]=ke}return ke}},{"../internals/global":163}],233:[function(oe,He,Re){"use strict";var de=oe("../internals/get-built-in"),ve=oe("../internals/object-define-property"),Ee=oe("../internals/well-known-symbol"),ke=oe("../internals/descriptors"),Se=Ee("species");He.exports=function(Ae){var me=de(Ae),Pe=ve.f;ke&&me&&!me[Se]&&Pe(me,Se,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":134,"../internals/get-built-in":158,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],234:[function(oe,He,Re){var de=oe("../internals/object-define-property").f,ve=oe("../internals/has-own-property"),Ee=oe("../internals/well-known-symbol"),ke=Ee("toStringTag");He.exports=function(Se,Ae,me){Se&&!me&&(Se=Se.prototype),Se&&!ve(Se,ke)&&de(Se,ke,{configurable:!0,value:Ae})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(oe,He,Re){var de=oe("../internals/shared"),ve=oe("../internals/uid"),Ee=de("keys");He.exports=function(ke){return Ee[ke]||(Ee[ke]=ve(ke))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/set-global"),Ee="__core-js_shared__",ke=de[Ee]||ve(Ee,{});He.exports=ke},{"../internals/global":163,"../internals/set-global":232}],237:[function(oe,He,Re){var de=oe("../internals/is-pure"),ve=oe("../internals/shared-store");(He.exports=function(Ee,ke){return ve[Ee]||(ve[Ee]=ke!==void 0?ke:{})})("versions",[]).push({version:"3.22.1",mode:de?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":181,"../internals/shared-store":236}],238:[function(oe,He,Re){var de=oe("../internals/an-object"),ve=oe("../internals/a-constructor"),Ee=oe("../internals/well-known-symbol"),ke=Ee("species");He.exports=function(Se,Ae){var me=de(Se).constructor,Pe;return me===void 0||(Pe=de(me)[ke])==null?Ae:ve(Pe)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/to-integer-or-infinity"),Ee=oe("../internals/to-string"),ke=oe("../internals/require-object-coercible"),Se=de("".charAt),Ae=de("".charCodeAt),me=de("".slice),Pe=function(fe){return function(z,te){var se=Ee(ke(z)),ie=ve(te),le=se.length,ce,pe;return ie<0||ie>=le?fe?"":void 0:(ce=Ae(se,ie),ce<55296||ce>56319||ie+1===le||(pe=Ae(se,ie+1))<56320||pe>57343?fe?Se(se,ie):ce:fe?me(se,ie,ie+2):(ce-55296<<10)+(pe-56320)+65536)}};He.exports={codeAt:Pe(!1),charAt:Pe(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(oe,He,Re){var de=oe("../internals/function-name").PROPER,ve=oe("../internals/fails"),Ee=oe("../internals/whitespaces"),ke="\u200B\x85\u180E";He.exports=function(Se){return ve(function(){return!!Ee[Se]()||ke[Se]()!==ke||de&&Ee[Se].name!==Se})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/require-object-coercible"),Ee=oe("../internals/to-string"),ke=oe("../internals/whitespaces"),Se=de("".replace),Ae="["+ke+"]",me=RegExp("^"+Ae+Ae+"*"),Pe=RegExp(Ae+Ae+"*$"),fe=function(z){return function(te){var se=Ee(ve(te));return z&1&&(se=Se(se,me,"")),z&2&&(se=Se(se,Pe,"")),se}};He.exports={start:fe(1),end:fe(2),trim:fe(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(oe,He,Re){var de=oe("../internals/function-call"),ve=oe("../internals/get-built-in"),Ee=oe("../internals/well-known-symbol"),ke=oe("../internals/redefine");He.exports=function(){var Se=ve("Symbol"),Ae=Se&&Se.prototype,me=Ae&&Ae.valueOf,Pe=Ee("toPrimitive");Ae&&!Ae[Pe]&&ke(Ae,Pe,function(fe){return de(me,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/function-apply"),Ee=oe("../internals/function-bind-context"),ke=oe("../internals/is-callable"),Se=oe("../internals/has-own-property"),Ae=oe("../internals/fails"),me=oe("../internals/html"),Pe=oe("../internals/array-slice"),fe=oe("../internals/document-create-element"),z=oe("../internals/validate-arguments-length"),te=oe("../internals/engine-is-ios"),se=oe("../internals/engine-is-node"),ie=de.setImmediate,le=de.clearImmediate,ce=de.process,pe=de.Dispatch,xe=de.Function,je=de.MessageChannel,De=de.String,Fe=0,Te={},Me="onreadystatechange",Be,Ue,Ye,Ve;try{Be=de.location}catch(St){}var Ze=function(St){if(Se(Te,St)){var qe=Te[St];delete Te[St],qe()}},ot=function(St){return function(){Ze(St)}},lt=function(St){Ze(St.data)},ft=function(St){de.postMessage(De(St),Be.protocol+"//"+Be.host)};(!ie||!le)&&(ie=function(qe){z(arguments.length,1);var rt=ke(qe)?qe:xe(qe),wt=Pe(arguments,1);return Te[++Fe]=function(){ve(rt,void 0,wt)},Ue(Fe),Fe},le=function(qe){delete Te[qe]},se?Ue=function(St){ce.nextTick(ot(St))}:pe&&pe.now?Ue=function(St){pe.now(ot(St))}:je&&!te?(Ye=new je,Ve=Ye.port2,Ye.port1.onmessage=lt,Ue=Ee(Ve.postMessage,Ve)):de.addEventListener&&ke(de.postMessage)&&!de.importScripts&&Be&&Be.protocol!=="file:"&&!Ae(ft)?(Ue=ft,de.addEventListener("message",lt,!1)):Me in fe("script")?Ue=function(St){me.appendChild(fe("script"))[Me]=function(){me.removeChild(this),Ze(St)}}:Ue=function(St){setTimeout(ot(St),0)}),He.exports={set:ie,clear:le}},{"../internals/array-slice":117,"../internals/document-create-element":135,"../internals/engine-is-ios":142,"../internals/engine-is-node":143,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-bind-context":153,"../internals/global":163,"../internals/has-own-property":164,"../internals/html":167,"../internals/is-callable":176,"../internals/validate-arguments-length":266}],244:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this");He.exports=de(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(oe,He,Re){var de=oe("../internals/to-integer-or-infinity"),ve=Math.max,Ee=Math.min;He.exports=function(ke,Se){var Ae=de(ke);return Ae<0?ve(Ae+Se,0):Ee(Ae,Se)}},{"../internals/to-integer-or-infinity":248}],246:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/to-integer-or-infinity"),Ee=oe("../internals/to-length"),ke=de.RangeError;He.exports=function(Se){if(Se===void 0)return 0;var Ae=ve(Se),me=Ee(Ae);if(Ae!==me)throw ke("Wrong length or index");return me}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(oe,He,Re){var de=oe("../internals/indexed-object"),ve=oe("../internals/require-object-coercible");He.exports=function(Ee){return de(ve(Ee))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(oe,He,Re){var de=Math.ceil,ve=Math.floor;He.exports=function(Ee){var ke=+Ee;return ke!==ke||ke===0?0:(ke>0?ve:de)(ke)}},{}],249:[function(oe,He,Re){var de=oe("../internals/to-integer-or-infinity"),ve=Math.min;He.exports=function(Ee){return Ee>0?ve(de(Ee),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/require-object-coercible"),Ee=de.Object;He.exports=function(ke){return Ee(ve(ke))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/to-positive-integer"),Ee=de.RangeError;He.exports=function(ke,Se){var Ae=ve(ke);if(Ae%Se)throw Ee("Wrong offset");return Ae}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/to-integer-or-infinity"),Ee=de.RangeError;He.exports=function(ke){var Se=ve(ke);if(Se<0)throw Ee("The argument can't be less than 0");return Se}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/function-call"),Ee=oe("../internals/is-object"),ke=oe("../internals/is-symbol"),Se=oe("../internals/get-method"),Ae=oe("../internals/ordinary-to-primitive"),me=oe("../internals/well-known-symbol"),Pe=de.TypeError,fe=me("toPrimitive");He.exports=function(z,te){if(!Ee(z)||ke(z))return z;var se=Se(z,fe),ie;if(se){if(te===void 0&&(te="default"),ie=ve(se,z,te),!Ee(ie)||ke(ie))return ie;throw Pe("Can't convert object to primitive value")}return te===void 0&&(te="number"),Ae(z,te)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(oe,He,Re){var de=oe("../internals/to-primitive"),ve=oe("../internals/is-symbol");He.exports=function(Ee){var ke=de(Ee,"string");return ve(ke)?ke:ke+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(oe,He,Re){var de=oe("../internals/well-known-symbol"),ve=de("toStringTag"),Ee={};Ee[ve]="z",He.exports=String(Ee)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/classof"),Ee=de.String;He.exports=function(ke){if(ve(ke)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Ee(ke)}},{"../internals/classof":124,"../internals/global":163}],257:[function(oe,He,Re){var de=oe("../internals/global"),ve=de.String;He.exports=function(Ee){try{return ve(Ee)}catch(ke){return"Object"}}},{"../internals/global":163}],258:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/global"),Ee=oe("../internals/function-call"),ke=oe("../internals/descriptors"),Se=oe("../internals/typed-array-constructors-require-wrappers"),Ae=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-buffer"),Pe=oe("../internals/an-instance"),fe=oe("../internals/create-property-descriptor"),z=oe("../internals/create-non-enumerable-property"),te=oe("../internals/is-integral-number"),se=oe("../internals/to-length"),ie=oe("../internals/to-index"),le=oe("../internals/to-offset"),ce=oe("../internals/to-property-key"),pe=oe("../internals/has-own-property"),xe=oe("../internals/classof"),je=oe("../internals/is-object"),De=oe("../internals/is-symbol"),Fe=oe("../internals/object-create"),Te=oe("../internals/object-is-prototype-of"),Me=oe("../internals/object-set-prototype-of"),Be=oe("../internals/object-get-own-property-names").f,Ue=oe("../internals/typed-array-from"),Ye=oe("../internals/array-iteration").forEach,Ve=oe("../internals/set-species"),Ze=oe("../internals/object-define-property"),ot=oe("../internals/object-get-own-property-descriptor"),lt=oe("../internals/internal-state"),ft=oe("../internals/inherit-if-required"),St=lt.get,qe=lt.set,rt=Ze.f,wt=ot.f,Ct=Math.round,bt=ve.RangeError,ct=me.ArrayBuffer,xt=ct.prototype,dt=me.DataView,Mt=Ae.NATIVE_ARRAY_BUFFER_VIEWS,yt=Ae.TYPED_ARRAY_CONSTRUCTOR,Dt=Ae.TYPED_ARRAY_TAG,mt=Ae.TypedArray,vt=Ae.TypedArrayPrototype,et=Ae.aTypedArrayConstructor,We=Ae.isTypedArray,we="BYTES_PER_ELEMENT",Ne="Wrong length",Xe=function(ht,ut){et(ht);for(var Ot=0,Et=ut.length,Ft=new ht(Et);Et>Ot;)Ft[Ot]=ut[Ot++];return Ft},nt=function(ht,ut){rt(ht,ut,{get:function(){return St(this)[ut]}})},Ie=function(ht){var ut;return Te(xt,ht)||(ut=xe(ht))=="ArrayBuffer"||ut=="SharedArrayBuffer"},_e=function(ht,ut){return We(ht)&&!De(ut)&&ut in ht&&te(+ut)&&ut>=0},Ge=function(ut,Ot){return Ot=ce(Ot),_e(ut,Ot)?fe(2,ut[Ot]):wt(ut,Ot)},tt=function(ut,Ot,Et){return Ot=ce(Ot),_e(ut,Ot)&&je(Et)&&pe(Et,"value")&&!pe(Et,"get")&&!pe(Et,"set")&&!Et.configurable&&(!pe(Et,"writable")||Et.writable)&&(!pe(Et,"enumerable")||Et.enumerable)?(ut[Ot]=Et.value,ut):rt(ut,Ot,Et)};ke?(Mt||(ot.f=Ge,Ze.f=tt,nt(vt,"buffer"),nt(vt,"byteOffset"),nt(vt,"byteLength"),nt(vt,"length")),de({target:"Object",stat:!0,forced:!Mt},{getOwnPropertyDescriptor:Ge,defineProperty:tt}),He.exports=function(ht,ut,Ot){var Et=ht.match(/\d+$/)[0]/8,Ft=ht+(Ot?"Clamped":"")+"Array",qt="get"+ht,Xt="set"+ht,Kt=ve[Ft],Vt=Kt,hn=Vt&&Vt.prototype,on={},cn=function(kn,In){var _r=St(kn);return _r.view[qt](In*Et+_r.byteOffset,!0)},Sn=function(kn,In,_r){var xr=St(kn);Ot&&(_r=(_r=Ct(_r))<0?0:_r>255?255:_r&255),xr.view[Xt](In*Et+xr.byteOffset,_r,!0)},Cn=function(kn,In){rt(kn,In,{get:function(){return cn(this,In)},set:function(_r){return Sn(this,In,_r)},enumerable:!0})};Mt?Se&&(Vt=ut(function(kn,In,_r,xr){return Pe(kn,hn),ft(function(){return je(In)?Ie(In)?xr!==void 0?new Kt(In,le(_r,Et),xr):_r!==void 0?new Kt(In,le(_r,Et)):new Kt(In):We(In)?Xe(Vt,In):Ee(Ue,Vt,In):new Kt(ie(In))}(),kn,Vt)}),Me&&Me(Vt,mt),Ye(Be(Kt),function(kn){kn in Vt||z(Vt,kn,Kt[kn])}),Vt.prototype=hn):(Vt=ut(function(kn,In,_r,xr){Pe(kn,hn);var qr=0,er=0,si,ei,vi;if(!je(In))vi=ie(In),ei=vi*Et,si=new ct(ei);else if(Ie(In)){si=In,er=le(_r,Et);var Li=In.byteLength;if(xr===void 0){if(Li%Et||(ei=Li-er,ei<0))throw bt(Ne)}else if(ei=se(xr)*Et,ei+er>Li)throw bt(Ne);vi=ei/Et}else return We(In)?Xe(Vt,In):Ee(Ue,Vt,In);for(qe(kn,{buffer:si,byteOffset:er,byteLength:ei,length:vi,view:new dt(si)});qr<vi;)Cn(kn,qr++)}),Me&&Me(Vt,mt),hn=Vt.prototype=Fe(vt)),hn.constructor!==Vt&&z(hn,"constructor",Vt),z(hn,yt,Vt),Dt&&z(hn,Dt,Ft),on[Ft]=Vt,de({global:!0,forced:Vt!=Kt,sham:!Mt},on),we in Vt||z(Vt,we,Et),we in hn||z(hn,we,Et),Ve(Ft)}):He.exports=function(){}},{"../internals/an-instance":100,"../internals/array-buffer":104,"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-integral-number":179,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/object-create":196,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/set-species":233,"../internals/to-index":246,"../internals/to-length":249,"../internals/to-offset":251,"../internals/to-property-key":254,"../internals/typed-array-constructors-require-wrappers":259,"../internals/typed-array-from":261}],259:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/fails"),Ee=oe("../internals/check-correctness-of-iteration"),ke=oe("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,Se=de.ArrayBuffer,Ae=de.Int8Array;He.exports=!ke||!ve(function(){Ae(1)})||!ve(function(){new Ae(-1)})||!Ee(function(me){new Ae,new Ae(null),new Ae(1.5),new Ae(me)},!0)||ve(function(){return new Ae(new Se(2),1,void 0).length!==1})},{"../internals/array-buffer-view-core":103,"../internals/check-correctness-of-iteration":122,"../internals/fails":150,"../internals/global":163}],260:[function(oe,He,Re){var de=oe("../internals/array-from-constructor-and-list"),ve=oe("../internals/typed-array-species-constructor");He.exports=function(Ee,ke){return de(ve(Ee),ke)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(oe,He,Re){var de=oe("../internals/function-bind-context"),ve=oe("../internals/function-call"),Ee=oe("../internals/a-constructor"),ke=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Ae=oe("../internals/get-iterator"),me=oe("../internals/get-iterator-method"),Pe=oe("../internals/is-array-iterator-method"),fe=oe("../internals/array-buffer-view-core").aTypedArrayConstructor;He.exports=function(te){var se=Ee(this),ie=ke(te),le=arguments.length,ce=le>1?arguments[1]:void 0,pe=ce!==void 0,xe=me(ie),je,De,Fe,Te,Me,Be;if(xe&&!Pe(xe))for(Me=Ae(ie,xe),Be=Me.next,ie=[];!(Te=ve(Be,Me)).done;)ie.push(Te.value);for(pe&&le>2&&(ce=de(ce,arguments[2])),De=Se(ie),Fe=new(fe(se))(De),je=0;De>je;je++)Fe[je]=pe?ce(ie[je],je):ie[je];return Fe}},{"../internals/a-constructor":96,"../internals/array-buffer-view-core":103,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/is-array-iterator-method":174,"../internals/length-of-array-like":188,"../internals/to-object":250}],262:[function(oe,He,Re){var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/species-constructor"),Ee=de.TYPED_ARRAY_CONSTRUCTOR,ke=de.aTypedArrayConstructor;He.exports=function(Se){return ke(ve(Se,Se[Ee]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(oe,He,Re){var de=oe("../internals/function-uncurry-this"),ve=0,Ee=Math.random(),ke=de(1 .toString);He.exports=function(Se){return"Symbol("+(Se===void 0?"":Se)+")_"+ke(++ve+Ee,36)}},{"../internals/function-uncurry-this":157}],264:[function(oe,He,Re){var de=oe("../internals/native-symbol");He.exports=de&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(oe,He,Re){var de=oe("../internals/descriptors"),ve=oe("../internals/fails");He.exports=de&&ve(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(oe,He,Re){var de=oe("../internals/global"),ve=de.TypeError;He.exports=function(Ee,ke){if(Ee<ke)throw ve("Not enough arguments");return Ee}},{"../internals/global":163}],267:[function(oe,He,Re){var de=oe("../internals/well-known-symbol");Re.f=de},{"../internals/well-known-symbol":268}],268:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/shared"),Ee=oe("../internals/has-own-property"),ke=oe("../internals/uid"),Se=oe("../internals/native-symbol"),Ae=oe("../internals/use-symbol-as-uid"),me=ve("wks"),Pe=de.Symbol,fe=Pe&&Pe.for,z=Ae?Pe:Pe&&Pe.withoutSetter||ke;He.exports=function(te){if(!Ee(me,te)||!(Se||typeof me[te]=="string")){var se="Symbol."+te;Se&&Ee(Pe,te)?me[te]=Pe[te]:Ae&&fe?me[te]=fe(se):me[te]=z(se)}return me[te]}},{"../internals/global":163,"../internals/has-own-property":164,"../internals/native-symbol":191,"../internals/shared":237,"../internals/uid":263,"../internals/use-symbol-as-uid":264}],269:[function(oe,He,Re){He.exports=`
|
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},{}],270:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/global"),Ee=oe("../internals/array-buffer"),ke=oe("../internals/set-species"),Se="ArrayBuffer",Ae=Ee[Se],me=ve[Se];de({global:!0,forced:me!==Ae},{ArrayBuffer:Ae}),ke(Se)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/fails"),ke=oe("../internals/array-buffer"),Se=oe("../internals/an-object"),Ae=oe("../internals/to-absolute-index"),me=oe("../internals/to-length"),Pe=oe("../internals/species-constructor"),fe=ke.ArrayBuffer,z=ke.DataView,te=z.prototype,se=ve(fe.prototype.slice),ie=ve(te.getUint8),le=ve(te.setUint8),ce=Ee(function(){return!new fe(2).slice(1,void 0).byteLength});de({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:ce},{slice:function(xe,je){if(se&&je===void 0)return se(Se(this),xe);for(var De=Se(this).byteLength,Fe=Ae(xe,De),Te=Ae(je===void 0?De:je,De),Me=new(Pe(this,fe))(me(Te-Fe)),Be=new z(this),Ue=new z(Me),Ye=0;Fe<Te;)le(Ue,Ye++,ie(Be,Fe++));return Me}})},{"../internals/an-object":101,"../internals/array-buffer":104,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/species-constructor":238,"../internals/to-absolute-index":245,"../internals/to-length":249}],272:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/global"),Ee=oe("../internals/fails"),ke=oe("../internals/is-array"),Se=oe("../internals/is-object"),Ae=oe("../internals/to-object"),me=oe("../internals/length-of-array-like"),Pe=oe("../internals/create-property"),fe=oe("../internals/array-species-create"),z=oe("../internals/array-method-has-species-support"),te=oe("../internals/well-known-symbol"),se=oe("../internals/engine-v8-version"),ie=te("isConcatSpreadable"),le=9007199254740991,ce="Maximum allowed index exceeded",pe=ve.TypeError,xe=se>=51||!Ee(function(){var Te=[];return Te[ie]=!1,Te.concat()[0]!==Te}),je=z("concat"),De=function(Te){if(!Se(Te))return!1;var Me=Te[ie];return Me!==void 0?!!Me:ke(Te)},Fe=!xe||!je;de({target:"Array",proto:!0,forced:Fe},{concat:function(Me){var Be=Ae(this),Ue=fe(Be,0),Ye=0,Ve,Ze,ot,lt,ft;for(Ve=-1,ot=arguments.length;Ve<ot;Ve++)if(ft=Ve===-1?Be:arguments[Ve],De(ft)){if(lt=me(ft),Ye+lt>le)throw pe(ce);for(Ze=0;Ze<lt;Ze++,Ye++)Ze in ft&&Pe(Ue,Ye,ft[Ze])}else{if(Ye>=le)throw pe(ce);Pe(Ue,Ye++,ft)}return Ue.length=Ye,Ue}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/engine-v8-version":146,"../internals/export":149,"../internals/fails":150,"../internals/global":163,"../internals/is-array":175,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/well-known-symbol":268}],273:[function(oe,He,Re){var de=oe("../internals/export"),ve=oe("../internals/array-fill"),Ee=oe("../internals/add-to-unscopables");de({target:"Array",proto:!0},{fill:ve}),Ee("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/array-iteration").filter,Ee=oe("../internals/array-method-has-species-support"),ke=Ee("filter");de({target:"Array",proto:!0,forced:!ke},{filter:function(Ae){return ve(this,Ae,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/array-iteration").find,Ee=oe("../internals/add-to-unscopables"),ke="find",Se=!0;ke in[]&&Array(1)[ke](function(){Se=!1}),de({target:"Array",proto:!0,forced:Se},{find:function(me){return ve(this,me,arguments.length>1?arguments[1]:void 0)}}),Ee(ke)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(oe,He,Re){var de=oe("../internals/export"),ve=oe("../internals/array-from"),Ee=oe("../internals/check-correctness-of-iteration"),ke=!Ee(function(Se){Array.from(Se)});de({target:"Array",stat:!0,forced:ke},{from:ve})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/array-includes").includes,Ee=oe("../internals/add-to-unscopables");de({target:"Array",proto:!0},{includes:function(Se){return ve(this,Se,arguments.length>1?arguments[1]:void 0)}}),Ee("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(oe,He,Re){"use strict";var de=oe("../internals/to-indexed-object"),ve=oe("../internals/add-to-unscopables"),Ee=oe("../internals/iterators"),ke=oe("../internals/internal-state"),Se=oe("../internals/object-define-property").f,Ae=oe("../internals/define-iterator"),me=oe("../internals/is-pure"),Pe=oe("../internals/descriptors"),fe="Array Iterator",z=ke.set,te=ke.getterFor(fe);He.exports=Ae(Array,"Array",function(ie,le){z(this,{type:fe,target:de(ie),index:0,kind:le})},function(){var ie=te(this),le=ie.target,ce=ie.kind,pe=ie.index++;return!le||pe>=le.length?(ie.target=void 0,{value:void 0,done:!0}):ce=="keys"?{value:pe,done:!1}:ce=="values"?{value:le[pe],done:!1}:{value:[pe,le[pe]],done:!1}},"values");var se=Ee.Arguments=Ee.Array;if(ve("keys"),ve("values"),ve("entries"),!me&&Pe&&se.name!=="values")try{Se(se,"name",{value:"values"})}catch(ie){}},{"../internals/add-to-unscopables":98,"../internals/define-iterator":132,"../internals/descriptors":134,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/iterators":187,"../internals/object-define-property":198,"../internals/to-indexed-object":247}],279:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/indexed-object"),ke=oe("../internals/to-indexed-object"),Se=oe("../internals/array-method-is-strict"),Ae=ve([].join),me=Ee!=Object,Pe=Se("join",",");de({target:"Array",proto:!0,forced:me||!Pe},{join:function(z){return Ae(ke(this),z===void 0?",":z)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/array-iteration").map,Ee=oe("../internals/array-method-has-species-support"),ke=Ee("map");de({target:"Array",proto:!0,forced:!ke},{map:function(Ae){return ve(this,Ae,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/global"),Ee=oe("../internals/is-array"),ke=oe("../internals/is-constructor"),Se=oe("../internals/is-object"),Ae=oe("../internals/to-absolute-index"),me=oe("../internals/length-of-array-like"),Pe=oe("../internals/to-indexed-object"),fe=oe("../internals/create-property"),z=oe("../internals/well-known-symbol"),te=oe("../internals/array-method-has-species-support"),se=oe("../internals/array-slice"),ie=te("slice"),le=z("species"),ce=ve.Array,pe=Math.max;de({target:"Array",proto:!0,forced:!ie},{slice:function(je,De){var Fe=Pe(this),Te=me(Fe),Me=Ae(je,Te),Be=Ae(De===void 0?Te:De,Te),Ue,Ye,Ve;if(Ee(Fe)&&(Ue=Fe.constructor,ke(Ue)&&(Ue===ce||Ee(Ue.prototype))?Ue=void 0:Se(Ue)&&(Ue=Ue[le],Ue===null&&(Ue=void 0)),Ue===ce||Ue===void 0))return se(Fe,Me,Be);for(Ye=new(Ue===void 0?ce:Ue)(pe(Be-Me,0)),Ve=0;Me<Be;Me++,Ve++)Me in Fe&&fe(Ye,Ve,Fe[Me]);return Ye.length=Ve,Ye}})},{"../internals/array-method-has-species-support":113,"../internals/array-slice":117,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247,"../internals/well-known-symbol":268}],282:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/a-callable"),ke=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Ae=oe("../internals/to-string"),me=oe("../internals/fails"),Pe=oe("../internals/array-sort"),fe=oe("../internals/array-method-is-strict"),z=oe("../internals/engine-ff-version"),te=oe("../internals/engine-is-ie-or-edge"),se=oe("../internals/engine-v8-version"),ie=oe("../internals/engine-webkit-version"),le=[],ce=ve(le.sort),pe=ve(le.push),xe=me(function(){le.sort(void 0)}),je=me(function(){le.sort(null)}),De=fe("sort"),Fe=!me(function(){if(se)return se<70;if(!(z&&z>3)){if(te)return!0;if(ie)return ie<603;var Be="",Ue,Ye,Ve,Ze;for(Ue=65;Ue<76;Ue++){switch(Ye=String.fromCharCode(Ue),Ue){case 66:case 69:case 70:case 72:Ve=3;break;case 68:case 71:Ve=4;break;default:Ve=2}for(Ze=0;Ze<47;Ze++)le.push({k:Ye+Ze,v:Ve})}for(le.sort(function(ot,lt){return lt.v-ot.v}),Ze=0;Ze<le.length;Ze++)Ye=le[Ze].k.charAt(0),Be.charAt(Be.length-1)!==Ye&&(Be+=Ye);return Be!=="DGBEFHACIJK"}}),Te=xe||!je||!De||!Fe,Me=function(Be){return function(Ue,Ye){return Ye===void 0?-1:Ue===void 0?1:Be!==void 0?+Be(Ue,Ye)||0:Ae(Ue)>Ae(Ye)?1:-1}};de({target:"Array",proto:!0,forced:Te},{sort:function(Ue){Ue!==void 0&&Ee(Ue);var Ye=ke(this);if(Fe)return Ue===void 0?ce(Ye):ce(Ye,Ue);var Ve=[],Ze=Se(Ye),ot,lt;for(lt=0;lt<Ze;lt++)lt in Ye&&pe(Ve,Ye[lt]);for(Pe(Ve,Me(Ue)),ot=Ve.length,lt=0;lt<ot;)Ye[lt]=Ve[lt++];for(;lt<Ze;)delete Ye[lt++];return Ye}})},{"../internals/a-callable":95,"../internals/array-method-is-strict":114,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-string":256}],283:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/global"),Ee=oe("../internals/to-absolute-index"),ke=oe("../internals/to-integer-or-infinity"),Se=oe("../internals/length-of-array-like"),Ae=oe("../internals/to-object"),me=oe("../internals/array-species-create"),Pe=oe("../internals/create-property"),fe=oe("../internals/array-method-has-species-support"),z=fe("splice"),te=ve.TypeError,se=Math.max,ie=Math.min,le=9007199254740991,ce="Maximum allowed length exceeded";de({target:"Array",proto:!0,forced:!z},{splice:function(xe,je){var De=Ae(this),Fe=Se(De),Te=Ee(xe,Fe),Me=arguments.length,Be,Ue,Ye,Ve,Ze,ot;if(Me===0?Be=Ue=0:Me===1?(Be=0,Ue=Fe-Te):(Be=Me-2,Ue=ie(se(ke(je),0),Fe-Te)),Fe+Be-Ue>le)throw te(ce);for(Ye=me(De,Ue),Ve=0;Ve<Ue;Ve++)Ze=Te+Ve,Ze in De&&Pe(Ye,Ve,De[Ze]);if(Ye.length=Ue,Be<Ue){for(Ve=Te;Ve<Fe-Ue;Ve++)Ze=Ve+Ue,ot=Ve+Be,Ze in De?De[ot]=De[Ze]:delete De[ot];for(Ve=Fe;Ve>Fe-Ue+Be;Ve--)delete De[Ve-1]}else if(Be>Ue)for(Ve=Fe-Ue;Ve>Te;Ve--)Ze=Ve+Ue-1,ot=Ve+Be-1,Ze in De?De[ot]=De[Ze]:delete De[ot];for(Ve=0;Ve<Be;Ve++)De[Ve+Te]=arguments[Ve+2];return De.length=Fe-Ue+Be,Ye}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-integer-or-infinity":248,"../internals/to-object":250}],284:[function(oe,He,Re){var de=oe("../internals/descriptors"),ve=oe("../internals/function-name").EXISTS,Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/object-define-property").f,Se=Function.prototype,Ae=Ee(Se.toString),me=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Pe=Ee(me.exec),fe="name";de&&!ve&&ke(Se,fe,{configurable:!0,get:function(){try{return Pe(me,Ae(this))[1]}catch(z){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(oe,He,Re){var de=oe("../internals/export"),ve=oe("../internals/get-built-in"),Ee=oe("../internals/function-apply"),ke=oe("../internals/function-call"),Se=oe("../internals/function-uncurry-this"),Ae=oe("../internals/fails"),me=oe("../internals/is-array"),Pe=oe("../internals/is-callable"),fe=oe("../internals/is-object"),z=oe("../internals/is-symbol"),te=oe("../internals/array-slice"),se=oe("../internals/native-symbol"),ie=ve("JSON","stringify"),le=Se(/./.exec),ce=Se("".charAt),pe=Se("".charCodeAt),xe=Se("".replace),je=Se(1 .toString),De=/[\uD800-\uDFFF]/g,Fe=/^[\uD800-\uDBFF]$/,Te=/^[\uDC00-\uDFFF]$/,Me=!se||Ae(function(){var Ve=ve("Symbol")();return ie([Ve])!="[null]"||ie({a:Ve})!="{}"||ie(Object(Ve))!="{}"}),Be=Ae(function(){return ie("\uDF06\uD834")!=='"\\udf06\\ud834"'||ie("\uDEAD")!=='"\\udead"'}),Ue=function(Ve,Ze){var ot=te(arguments),lt=Ze;if(!(!fe(Ze)&&Ve===void 0||z(Ve)))return me(Ze)||(Ze=function(ft,St){if(Pe(lt)&&(St=ke(lt,this,ft,St)),!z(St))return St}),ot[1]=Ze,Ee(ie,null,ot)},Ye=function(Ve,Ze,ot){var lt=ce(ot,Ze-1),ft=ce(ot,Ze+1);return le(Fe,Ve)&&!le(Te,ft)||le(Te,Ve)&&!le(Fe,lt)?"\\u"+je(pe(Ve,0),16):Ve};ie&&de({target:"JSON",stat:!0,forced:Me||Be},{stringify:function(Ze,ot,lt){var ft=te(arguments),St=Ee(Me?Ue:ie,null,ft);return Be&&typeof St=="string"?xe(St,De,Ye):St}})},{"../internals/array-slice":117,"../internals/export":149,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/is-array":175,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/native-symbol":191}],286:[function(oe,He,Re){"use strict";var de=oe("../internals/descriptors"),ve=oe("../internals/global"),Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/is-forced"),Se=oe("../internals/redefine"),Ae=oe("../internals/has-own-property"),me=oe("../internals/inherit-if-required"),Pe=oe("../internals/object-is-prototype-of"),fe=oe("../internals/is-symbol"),z=oe("../internals/to-primitive"),te=oe("../internals/fails"),se=oe("../internals/object-get-own-property-names").f,ie=oe("../internals/object-get-own-property-descriptor").f,le=oe("../internals/object-define-property").f,ce=oe("../internals/this-number-value"),pe=oe("../internals/string-trim").trim,xe="Number",je=ve[xe],De=je.prototype,Fe=ve.TypeError,Te=Ee("".slice),Me=Ee("".charCodeAt),Be=function(lt){var ft=z(lt,"number");return typeof ft=="bigint"?ft:Ue(ft)},Ue=function(lt){var ft=z(lt,"number"),St,qe,rt,wt,Ct,bt,ct,xt;if(fe(ft))throw Fe("Cannot convert a Symbol value to a number");if(typeof ft=="string"&&ft.length>2){if(ft=pe(ft),St=Me(ft,0),St===43||St===45){if(qe=Me(ft,2),qe===88||qe===120)return NaN}else if(St===48){switch(Me(ft,1)){case 66:case 98:rt=2,wt=49;break;case 79:case 111:rt=8,wt=55;break;default:return+ft}for(Ct=Te(ft,2),bt=Ct.length,ct=0;ct<bt;ct++)if(xt=Me(Ct,ct),xt<48||xt>wt)return NaN;return parseInt(Ct,rt)}}return+ft};if(ke(xe,!je(" 0o1")||!je("0b1")||je("+0x1"))){for(var Ye=function(ft){var St=arguments.length<1?0:je(Be(ft)),qe=this;return Pe(De,qe)&&te(function(){ce(qe)})?me(Object(St),qe,Ye):St},Ve=de?se(je):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Ze=0,ot;Ve.length>Ze;Ze++)Ae(je,ot=Ve[Ze])&&!Ae(Ye,ot)&&le(Ye,ot,ie(je,ot));Ye.prototype=De,De.constructor=Ye,Se(ve,xe,Ye)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(oe,He,Re){var de=oe("../internals/export"),ve=oe("../internals/object-assign");de({target:"Object",stat:!0,forced:Object.assign!==ve},{assign:ve})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(oe,He,Re){var de=oe("../internals/export"),ve=oe("../internals/object-to-array").entries;de({target:"Object",stat:!0},{entries:function(ke){return ve(ke)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(oe,He,Re){var de=oe("../internals/export"),ve=oe("../internals/native-symbol"),Ee=oe("../internals/fails"),ke=oe("../internals/object-get-own-property-symbols"),Se=oe("../internals/to-object"),Ae=!ve||Ee(function(){ke.f(1)});de({target:"Object",stat:!0,forced:Ae},{getOwnPropertySymbols:function(Pe){var fe=ke.f;return fe?fe(Se(Pe)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(oe,He,Re){var de=oe("../internals/export"),ve=oe("../internals/to-object"),Ee=oe("../internals/object-keys"),ke=oe("../internals/fails"),Se=ke(function(){Ee(1)});de({target:"Object",stat:!0,forced:Se},{keys:function(me){return Ee(ve(me))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(oe,He,Re){var de=oe("../internals/to-string-tag-support"),ve=oe("../internals/redefine"),Ee=oe("../internals/object-to-string");de||ve(Object.prototype,"toString",Ee,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-call"),Ee=oe("../internals/a-callable"),ke=oe("../internals/new-promise-capability"),Se=oe("../internals/perform"),Ae=oe("../internals/iterate"),me=oe("../internals/promise-statics-incorrect-iteration");de({target:"Promise",stat:!0,forced:me},{all:function(fe){var z=this,te=ke.f(z),se=te.resolve,ie=te.reject,le=Se(function(){var ce=Ee(z.resolve),pe=[],xe=0,je=1;Ae(fe,function(De){var Fe=xe++,Te=!1;je++,ve(ce,z,De).then(function(Me){Te||(Te=!0,pe[Fe]=Me,--je||se(pe))},ie)}),--je||se(pe)});return le.error&&ie(le.value),te.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],293:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/is-pure"),Ee=oe("../internals/promise-constructor-detection").CONSTRUCTOR,ke=oe("../internals/promise-native-constructor"),Se=oe("../internals/get-built-in"),Ae=oe("../internals/is-callable"),me=oe("../internals/redefine"),Pe=ke&&ke.prototype;if(de({target:"Promise",proto:!0,forced:Ee,real:!0},{catch:function(z){return this.then(void 0,z)}}),!ve&&Ae(ke)){var fe=Se("Promise").prototype.catch;Pe.catch!==fe&&me(Pe,"catch",fe,{unsafe:!0})}},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/redefine":222}],294:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/is-pure"),Ee=oe("../internals/engine-is-node"),ke=oe("../internals/global"),Se=oe("../internals/function-call"),Ae=oe("../internals/redefine"),me=oe("../internals/redefine-all"),Pe=oe("../internals/object-set-prototype-of"),fe=oe("../internals/set-to-string-tag"),z=oe("../internals/set-species"),te=oe("../internals/a-callable"),se=oe("../internals/is-callable"),ie=oe("../internals/is-object"),le=oe("../internals/an-instance"),ce=oe("../internals/species-constructor"),pe=oe("../internals/task").set,xe=oe("../internals/microtask"),je=oe("../internals/host-report-errors"),De=oe("../internals/perform"),Fe=oe("../internals/queue"),Te=oe("../internals/internal-state"),Me=oe("../internals/promise-native-constructor"),Be=oe("../internals/promise-constructor-detection"),Ue=oe("../internals/new-promise-capability"),Ye="Promise",Ve=Be.CONSTRUCTOR,Ze=Be.REJECTION_EVENT,ot=Be.SUBCLASSING,lt=Te.getterFor(Ye),ft=Te.set,St=Me&&Me.prototype,qe=Me,rt=St,wt=ke.TypeError,Ct=ke.document,bt=ke.process,ct=Ue.f,xt=ct,dt=!!(Ct&&Ct.createEvent&&ke.dispatchEvent),Mt="unhandledrejection",yt="rejectionhandled",Dt=0,mt=1,vt=2,et=1,We=2,we,Ne,Xe,nt,Ie=function(Xt){var Kt;return ie(Xt)&&se(Kt=Xt.then)?Kt:!1},_e=function(Xt,Kt){var Vt=Kt.value,hn=Kt.state==mt,on=hn?Xt.ok:Xt.fail,cn=Xt.resolve,Sn=Xt.reject,Cn=Xt.domain,kn,In,_r;try{on?(hn||(Kt.rejection===We&&Ot(Kt),Kt.rejection=et),on===!0?kn=Vt:(Cn&&Cn.enter(),kn=on(Vt),Cn&&(Cn.exit(),_r=!0)),kn===Xt.promise?Sn(wt("Promise-chain cycle")):(In=Ie(kn))?Se(In,kn,cn,Sn):cn(kn)):Sn(Vt)}catch(xr){Cn&&!_r&&Cn.exit(),Sn(xr)}},Ge=function(Xt,Kt){Xt.notified||(Xt.notified=!0,xe(function(){for(var Vt=Xt.reactions,hn;hn=Vt.get();)_e(hn,Xt);Xt.notified=!1,Kt&&!Xt.rejection&&ht(Xt)}))},tt=function(Xt,Kt,Vt){var hn,on;dt?(hn=Ct.createEvent("Event"),hn.promise=Kt,hn.reason=Vt,hn.initEvent(Xt,!1,!0),ke.dispatchEvent(hn)):hn={promise:Kt,reason:Vt},!Ze&&(on=ke["on"+Xt])?on(hn):Xt===Mt&&je("Unhandled promise rejection",Vt)},ht=function(Xt){Se(pe,ke,function(){var Kt=Xt.facade,Vt=Xt.value,hn=ut(Xt),on;if(hn&&(on=De(function(){Ee?bt.emit("unhandledRejection",Vt,Kt):tt(Mt,Kt,Vt)}),Xt.rejection=Ee||ut(Xt)?We:et,on.error))throw on.value})},ut=function(Xt){return Xt.rejection!==et&&!Xt.parent},Ot=function(Xt){Se(pe,ke,function(){var Kt=Xt.facade;Ee?bt.emit("rejectionHandled",Kt):tt(yt,Kt,Xt.value)})},Et=function(Xt,Kt,Vt){return function(hn){Xt(Kt,hn,Vt)}},Ft=function(Xt,Kt,Vt){Xt.done||(Xt.done=!0,Vt&&(Xt=Vt),Xt.value=Kt,Xt.state=vt,Ge(Xt,!0))},qt=function(Xt,Kt,Vt){if(!Xt.done){Xt.done=!0,Vt&&(Xt=Vt);try{if(Xt.facade===Kt)throw wt("Promise can't be resolved itself");var hn=Ie(Kt);hn?xe(function(){var on={done:!1};try{Se(hn,Kt,Et(qt,on,Xt),Et(Ft,on,Xt))}catch(cn){Ft(on,cn,Xt)}}):(Xt.value=Kt,Xt.state=mt,Ge(Xt,!1))}catch(on){Ft({done:!1},on,Xt)}}};if(Ve&&(qe=function(Kt){le(this,rt),te(Kt),Se(we,this);var Vt=lt(this);try{Kt(Et(qt,Vt),Et(Ft,Vt))}catch(hn){Ft(Vt,hn)}},rt=qe.prototype,we=function(Kt){ft(this,{type:Ye,done:!1,notified:!1,parent:!1,reactions:new Fe,rejection:!1,state:Dt,value:void 0})},we.prototype=me(rt,{then:function(Kt,Vt){var hn=lt(this),on=ct(ce(this,qe));return hn.parent=!0,on.ok=se(Kt)?Kt:!0,on.fail=se(Vt)&&Vt,on.domain=Ee?bt.domain:void 0,hn.state==Dt?hn.reactions.add(on):xe(function(){_e(on,hn)}),on.promise}}),Ne=function(){var Xt=new we,Kt=lt(Xt);this.promise=Xt,this.resolve=Et(qt,Kt),this.reject=Et(Ft,Kt)},Ue.f=ct=function(Xt){return Xt===qe||Xt===Xe?new Ne(Xt):xt(Xt)},!ve&&se(Me)&&St!==Object.prototype)){nt=St.then,ot||Ae(St,"then",function(Kt,Vt){var hn=this;return new qe(function(on,cn){Se(nt,hn,on,cn)}).then(Kt,Vt)},{unsafe:!0});try{delete St.constructor}catch(Xt){}Pe&&Pe(St,rt)}de({global:!0,wrap:!0,forced:Ve},{Promise:qe}),fe(qe,Ye,!1,!0),z(Ye)},{"../internals/a-callable":95,"../internals/an-instance":100,"../internals/engine-is-node":143,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/host-report-errors":166,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-pure":181,"../internals/microtask":189,"../internals/new-promise-capability":193,"../internals/object-set-prototype-of":208,"../internals/perform":214,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/queue":220,"../internals/redefine":222,"../internals/redefine-all":221,"../internals/set-species":233,"../internals/set-to-string-tag":234,"../internals/species-constructor":238,"../internals/task":243}],295:[function(oe,He,Re){oe("../modules/es.promise.constructor"),oe("../modules/es.promise.all"),oe("../modules/es.promise.catch"),oe("../modules/es.promise.race"),oe("../modules/es.promise.reject"),oe("../modules/es.promise.resolve")},{"../modules/es.promise.all":292,"../modules/es.promise.catch":293,"../modules/es.promise.constructor":294,"../modules/es.promise.race":296,"../modules/es.promise.reject":297,"../modules/es.promise.resolve":298}],296:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-call"),Ee=oe("../internals/a-callable"),ke=oe("../internals/new-promise-capability"),Se=oe("../internals/perform"),Ae=oe("../internals/iterate"),me=oe("../internals/promise-statics-incorrect-iteration");de({target:"Promise",stat:!0,forced:me},{race:function(fe){var z=this,te=ke.f(z),se=te.reject,ie=Se(function(){var le=Ee(z.resolve);Ae(fe,function(ce){ve(le,z,ce).then(te.resolve,se)})});return ie.error&&se(ie.value),te.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],297:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-call"),Ee=oe("../internals/new-promise-capability"),ke=oe("../internals/promise-constructor-detection").CONSTRUCTOR;de({target:"Promise",stat:!0,forced:ke},{reject:function(Ae){var me=Ee.f(this);return ve(me.reject,void 0,Ae),me.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/get-built-in"),Ee=oe("../internals/is-pure"),ke=oe("../internals/promise-native-constructor"),Se=oe("../internals/promise-constructor-detection").CONSTRUCTOR,Ae=oe("../internals/promise-resolve"),me=ve("Promise"),Pe=Ee&&!Se;de({target:"Promise",stat:!0,forced:Ee||Se},{resolve:function(z){return Ae(Pe&&this===me?ke:this,z)}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/promise-resolve":217}],299:[function(oe,He,Re){var de=oe("../internals/descriptors"),ve=oe("../internals/global"),Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/is-forced"),Se=oe("../internals/inherit-if-required"),Ae=oe("../internals/create-non-enumerable-property"),me=oe("../internals/object-get-own-property-names").f,Pe=oe("../internals/object-is-prototype-of"),fe=oe("../internals/is-regexp"),z=oe("../internals/to-string"),te=oe("../internals/regexp-get-flags"),se=oe("../internals/regexp-sticky-helpers"),ie=oe("../internals/proxy-accessor"),le=oe("../internals/redefine"),ce=oe("../internals/fails"),pe=oe("../internals/has-own-property"),xe=oe("../internals/internal-state").enforce,je=oe("../internals/set-species"),De=oe("../internals/well-known-symbol"),Fe=oe("../internals/regexp-unsupported-dot-all"),Te=oe("../internals/regexp-unsupported-ncg"),Me=De("match"),Be=ve.RegExp,Ue=Be.prototype,Ye=ve.SyntaxError,Ve=Ee(Ue.exec),Ze=Ee("".charAt),ot=Ee("".replace),lt=Ee("".indexOf),ft=Ee("".slice),St=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,qe=/a/g,rt=/a/g,wt=new Be(qe)!==qe,Ct=se.MISSED_STICKY,bt=se.UNSUPPORTED_Y,ct=de&&(!wt||Ct||Fe||Te||ce(function(){return rt[Me]=!1,Be(qe)!=qe||Be(rt)==rt||Be(qe,"i")!="/a/i"})),xt=function(mt){for(var vt=mt.length,et=0,We="",we=!1,Ne;et<=vt;et++){if(Ne=Ze(mt,et),Ne==="\\"){We+=Ne+Ze(mt,++et);continue}!we&&Ne==="."?We+="[\\s\\S]":(Ne==="["?we=!0:Ne==="]"&&(we=!1),We+=Ne)}return We},dt=function(mt){for(var vt=mt.length,et=0,We="",we=[],Ne={},Xe=!1,nt=!1,Ie=0,_e="",Ge;et<=vt;et++){if(Ge=Ze(mt,et),Ge==="\\")Ge=Ge+Ze(mt,++et);else if(Ge==="]")Xe=!1;else if(!Xe)switch(!0){case Ge==="[":Xe=!0;break;case Ge==="(":Ve(St,ft(mt,et+1))&&(et+=2,nt=!0),We+=Ge,Ie++;continue;case(Ge===">"&&nt):if(_e===""||pe(Ne,_e))throw new Ye("Invalid capture group name");Ne[_e]=!0,we[we.length]=[_e,Ie],nt=!1,_e="";continue}nt?_e+=Ge:We+=Ge}return[We,we]};if(ke("RegExp",ct)){for(var Mt=function(vt,et){var We=Pe(Ue,this),we=fe(vt),Ne=et===void 0,Xe=[],nt=vt,Ie,_e,Ge,tt,ht,ut;if(!We&&we&&Ne&&vt.constructor===Mt)return vt;if((we||Pe(Ue,vt))&&(vt=vt.source,Ne&&(et=te(nt))),vt=vt===void 0?"":z(vt),et=et===void 0?"":z(et),nt=vt,Fe&&"dotAll"in qe&&(_e=!!et&<(et,"s")>-1,_e&&(et=ot(et,/s/g,""))),Ie=et,Ct&&"sticky"in qe&&(Ge=!!et&<(et,"y")>-1,Ge&&bt&&(et=ot(et,/y/g,""))),Te&&(tt=dt(vt),vt=tt[0],Xe=tt[1]),ht=Se(Be(vt,et),We?this:Ue,Mt),(_e||Ge||Xe.length)&&(ut=xe(ht),_e&&(ut.dotAll=!0,ut.raw=Mt(xt(vt),Ie)),Ge&&(ut.sticky=!0),Xe.length&&(ut.groups=Xe)),vt!==nt)try{Ae(ht,"source",nt===""?"(?:)":nt)}catch(Ot){}return ht},yt=me(Be),Dt=0;yt.length>Dt;)ie(Mt,Be,yt[Dt++]);Ue.constructor=Mt,Mt.prototype=Ue,le(ve,"RegExp",Mt)}je("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/regexp-exec");de({target:"RegExp",proto:!0,forced:/./.exec!==ve},{exec:ve})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(oe,He,Re){"use strict";var de=oe("../internals/function-name").PROPER,ve=oe("../internals/redefine"),Ee=oe("../internals/an-object"),ke=oe("../internals/to-string"),Se=oe("../internals/fails"),Ae=oe("../internals/regexp-get-flags"),me="toString",Pe=RegExp.prototype,fe=Pe[me],z=Se(function(){return fe.call({source:"a",flags:"b"})!="/a/b"}),te=de&&fe.name!=me;(z||te)&&ve(RegExp.prototype,me,function(){var ie=Ee(this),le=ke(ie.source),ce=ke(Ae(ie));return"/"+le+"/"+ce},{unsafe:!0})},{"../internals/an-object":101,"../internals/fails":150,"../internals/function-name":156,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/to-string":256}],302:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/not-a-regexp"),ke=oe("../internals/require-object-coercible"),Se=oe("../internals/to-string"),Ae=oe("../internals/correct-is-regexp-logic"),me=ve("".indexOf);de({target:"String",proto:!0,forced:!Ae("includes")},{includes:function(fe){return!!~me(Se(ke(this)),Se(Ee(fe)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":126,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/not-a-regexp":194,"../internals/require-object-coercible":230,"../internals/to-string":256}],303:[function(oe,He,Re){"use strict";var de=oe("../internals/string-multibyte").charAt,ve=oe("../internals/to-string"),Ee=oe("../internals/internal-state"),ke=oe("../internals/define-iterator"),Se="String Iterator",Ae=Ee.set,me=Ee.getterFor(Se);ke(String,"String",function(Pe){Ae(this,{type:Se,string:ve(Pe),index:0})},function(){var fe=me(this),z=fe.string,te=fe.index,se;return te>=z.length?{value:void 0,done:!0}:(se=de(z,te),fe.index+=se.length,{value:se,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(oe,He,Re){"use strict";var de=oe("../internals/function-call"),ve=oe("../internals/fix-regexp-well-known-symbol-logic"),Ee=oe("../internals/an-object"),ke=oe("../internals/to-length"),Se=oe("../internals/to-string"),Ae=oe("../internals/require-object-coercible"),me=oe("../internals/get-method"),Pe=oe("../internals/advance-string-index"),fe=oe("../internals/regexp-exec-abstract");ve("match",function(z,te,se){return[function(le){var ce=Ae(this),pe=le==null?void 0:me(le,z);return pe?de(pe,le,ce):new RegExp(le)[z](Se(ce))},function(ie){var le=Ee(this),ce=Se(ie),pe=se(te,le,ce);if(pe.done)return pe.value;if(!le.global)return fe(le,ce);var xe=le.unicode;le.lastIndex=0;for(var je=[],De=0,Fe;(Fe=fe(le,ce))!==null;){var Te=Se(Fe[0]);je[De]=Te,Te===""&&(le.lastIndex=Pe(ce,ke(le.lastIndex),xe)),De++}return De===0?null:je}]})},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-length":249,"../internals/to-string":256}],305:[function(oe,He,Re){"use strict";var de=oe("../internals/function-apply"),ve=oe("../internals/function-call"),Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/fix-regexp-well-known-symbol-logic"),Se=oe("../internals/fails"),Ae=oe("../internals/an-object"),me=oe("../internals/is-callable"),Pe=oe("../internals/to-integer-or-infinity"),fe=oe("../internals/to-length"),z=oe("../internals/to-string"),te=oe("../internals/require-object-coercible"),se=oe("../internals/advance-string-index"),ie=oe("../internals/get-method"),le=oe("../internals/get-substitution"),ce=oe("../internals/regexp-exec-abstract"),pe=oe("../internals/well-known-symbol"),xe=pe("replace"),je=Math.max,De=Math.min,Fe=Ee([].concat),Te=Ee([].push),Me=Ee("".indexOf),Be=Ee("".slice),Ue=function(ot){return ot===void 0?ot:String(ot)},Ye=function(){return"a".replace(/./,"$0")==="$0"}(),Ve=function(){return/./[xe]?/./[xe]("a","$0")==="":!1}(),Ze=!Se(function(){var ot=/./;return ot.exec=function(){var lt=[];return lt.groups={a:"7"},lt},"".replace(ot,"$<a>")!=="7"});ke("replace",function(ot,lt,ft){var St=Ve?"$":"$0";return[function(rt,wt){var Ct=te(this),bt=rt==null?void 0:ie(rt,xe);return bt?ve(bt,rt,Ct,wt):ve(lt,z(Ct),rt,wt)},function(qe,rt){var wt=Ae(this),Ct=z(qe);if(typeof rt=="string"&&Me(rt,St)===-1&&Me(rt,"$<")===-1){var bt=ft(lt,wt,Ct,rt);if(bt.done)return bt.value}var ct=me(rt);ct||(rt=z(rt));var xt=wt.global;if(xt){var dt=wt.unicode;wt.lastIndex=0}for(var Mt=[];;){var yt=ce(wt,Ct);if(yt===null||(Te(Mt,yt),!xt))break;var Dt=z(yt[0]);Dt===""&&(wt.lastIndex=se(Ct,fe(wt.lastIndex),dt))}for(var mt="",vt=0,et=0;et<Mt.length;et++){yt=Mt[et];for(var We=z(yt[0]),we=je(De(Pe(yt.index),Ct.length),0),Ne=[],Xe=1;Xe<yt.length;Xe++)Te(Ne,Ue(yt[Xe]));var nt=yt.groups;if(ct){var Ie=Fe([We],Ne,we,Ct);nt!==void 0&&Te(Ie,nt);var _e=z(de(rt,void 0,Ie))}else _e=le(We,Ct,we,Ne,nt,rt);we>=vt&&(mt+=Be(Ct,vt,we)+_e,vt=we+We.length)}return mt+Be(Ct,vt)}]},!Ze||!Ye||Ve)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/get-substitution":162,"../internals/is-callable":176,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-length":249,"../internals/to-string":256,"../internals/well-known-symbol":268}],306:[function(oe,He,Re){"use strict";var de=oe("../internals/function-call"),ve=oe("../internals/fix-regexp-well-known-symbol-logic"),Ee=oe("../internals/an-object"),ke=oe("../internals/require-object-coercible"),Se=oe("../internals/same-value"),Ae=oe("../internals/to-string"),me=oe("../internals/get-method"),Pe=oe("../internals/regexp-exec-abstract");ve("search",function(fe,z,te){return[function(ie){var le=ke(this),ce=ie==null?void 0:me(ie,fe);return ce?de(ce,ie,le):new RegExp(ie)[fe](Ae(le))},function(se){var ie=Ee(this),le=Ae(se),ce=te(z,ie,le);if(ce.done)return ce.value;var pe=ie.lastIndex;Se(pe,0)||(ie.lastIndex=0);var xe=Pe(ie,le);return Se(ie.lastIndex,pe)||(ie.lastIndex=pe),xe===null?-1:xe.index}]})},{"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/same-value":231,"../internals/to-string":256}],307:[function(oe,He,Re){"use strict";var de=oe("../internals/function-apply"),ve=oe("../internals/function-call"),Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/fix-regexp-well-known-symbol-logic"),Se=oe("../internals/is-regexp"),Ae=oe("../internals/an-object"),me=oe("../internals/require-object-coercible"),Pe=oe("../internals/species-constructor"),fe=oe("../internals/advance-string-index"),z=oe("../internals/to-length"),te=oe("../internals/to-string"),se=oe("../internals/get-method"),ie=oe("../internals/array-slice-simple"),le=oe("../internals/regexp-exec-abstract"),ce=oe("../internals/regexp-exec"),pe=oe("../internals/regexp-sticky-helpers"),xe=oe("../internals/fails"),je=pe.UNSUPPORTED_Y,De=4294967295,Fe=Math.min,Te=[].push,Me=Ee(/./.exec),Be=Ee(Te),Ue=Ee("".slice),Ye=!xe(function(){var Ve=/(?:)/,Ze=Ve.exec;Ve.exec=function(){return Ze.apply(this,arguments)};var ot="ab".split(Ve);return ot.length!==2||ot[0]!=="a"||ot[1]!=="b"});ke("split",function(Ve,Ze,ot){var lt;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?lt=function(ft,St){var qe=te(me(this)),rt=St===void 0?De:St>>>0;if(rt===0)return[];if(ft===void 0)return[qe];if(!Se(ft))return ve(Ze,qe,ft,rt);for(var wt=[],Ct=(ft.ignoreCase?"i":"")+(ft.multiline?"m":"")+(ft.unicode?"u":"")+(ft.sticky?"y":""),bt=0,ct=new RegExp(ft.source,Ct+"g"),xt,dt,Mt;(xt=ve(ce,ct,qe))&&(dt=ct.lastIndex,!(dt>bt&&(Be(wt,Ue(qe,bt,xt.index)),xt.length>1&&xt.index<qe.length&&de(Te,wt,ie(xt,1)),Mt=xt[0].length,bt=dt,wt.length>=rt)));)ct.lastIndex===xt.index&&ct.lastIndex++;return bt===qe.length?(Mt||!Me(ct,""))&&Be(wt,""):Be(wt,Ue(qe,bt)),wt.length>rt?ie(wt,0,rt):wt}:"0".split(void 0,0).length?lt=function(ft,St){return ft===void 0&&St===0?[]:ve(Ze,this,ft,St)}:lt=Ze,[function(St,qe){var rt=me(this),wt=St==null?void 0:se(St,Ve);return wt?ve(wt,St,rt,qe):ve(lt,te(rt),St,qe)},function(ft,St){var qe=Ae(this),rt=te(ft),wt=ot(lt,qe,rt,St,lt!==Ze);if(wt.done)return wt.value;var Ct=Pe(qe,RegExp),bt=qe.unicode,ct=(qe.ignoreCase?"i":"")+(qe.multiline?"m":"")+(qe.unicode?"u":"")+(je?"g":"y"),xt=new Ct(je?"^(?:"+qe.source+")":qe,ct),dt=St===void 0?De:St>>>0;if(dt===0)return[];if(rt.length===0)return le(xt,rt)===null?[rt]:[];for(var Mt=0,yt=0,Dt=[];yt<rt.length;){xt.lastIndex=je?0:yt;var mt=le(xt,je?Ue(rt,yt):rt),vt;if(mt===null||(vt=Fe(z(xt.lastIndex+(je?yt:0)),rt.length))===Mt)yt=fe(rt,yt,bt);else{if(Be(Dt,Ue(rt,Mt,yt)),Dt.length===dt)return Dt;for(var et=1;et<=mt.length-1;et++)if(Be(Dt,mt[et]),Dt.length===dt)return Dt;yt=Mt=vt}}return Be(Dt,Ue(rt,Mt)),Dt}]},!Ye,je)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/array-slice-simple":116,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/is-regexp":182,"../internals/regexp-exec":224,"../internals/regexp-exec-abstract":223,"../internals/regexp-sticky-helpers":227,"../internals/require-object-coercible":230,"../internals/species-constructor":238,"../internals/to-length":249,"../internals/to-string":256}],308:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/string-trim").trim,Ee=oe("../internals/string-trim-forced");de({target:"String",proto:!0,forced:Ee("trim")},{trim:function(){return ve(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/global"),Ee=oe("../internals/function-call"),ke=oe("../internals/function-uncurry-this"),Se=oe("../internals/is-pure"),Ae=oe("../internals/descriptors"),me=oe("../internals/native-symbol"),Pe=oe("../internals/fails"),fe=oe("../internals/has-own-property"),z=oe("../internals/object-is-prototype-of"),te=oe("../internals/an-object"),se=oe("../internals/to-indexed-object"),ie=oe("../internals/to-property-key"),le=oe("../internals/to-string"),ce=oe("../internals/create-property-descriptor"),pe=oe("../internals/object-create"),xe=oe("../internals/object-keys"),je=oe("../internals/object-get-own-property-names"),De=oe("../internals/object-get-own-property-names-external"),Fe=oe("../internals/object-get-own-property-symbols"),Te=oe("../internals/object-get-own-property-descriptor"),Me=oe("../internals/object-define-property"),Be=oe("../internals/object-define-properties"),Ue=oe("../internals/object-property-is-enumerable"),Ye=oe("../internals/redefine"),Ve=oe("../internals/shared"),Ze=oe("../internals/shared-key"),ot=oe("../internals/hidden-keys"),lt=oe("../internals/uid"),ft=oe("../internals/well-known-symbol"),St=oe("../internals/well-known-symbol-wrapped"),qe=oe("../internals/define-well-known-symbol"),rt=oe("../internals/symbol-define-to-primitive"),wt=oe("../internals/set-to-string-tag"),Ct=oe("../internals/internal-state"),bt=oe("../internals/array-iteration").forEach,ct=Ze("hidden"),xt="Symbol",dt="prototype",Mt=Ct.set,yt=Ct.getterFor(xt),Dt=Object[dt],mt=ve.Symbol,vt=mt&&mt[dt],et=ve.TypeError,We=ve.QObject,we=Te.f,Ne=Me.f,Xe=De.f,nt=Ue.f,Ie=ke([].push),_e=Ve("symbols"),Ge=Ve("op-symbols"),tt=Ve("wks"),ht=!We||!We[dt]||!We[dt].findChild,ut=Ae&&Pe(function(){return pe(Ne({},"a",{get:function(){return Ne(this,"a",{value:7}).a}})).a!=7})?function(on,cn,Sn){var Cn=we(Dt,cn);Cn&&delete Dt[cn],Ne(on,cn,Sn),Cn&&on!==Dt&&Ne(Dt,cn,Cn)}:Ne,Ot=function(on,cn){var Sn=_e[on]=pe(vt);return Mt(Sn,{type:xt,tag:on,description:cn}),Ae||(Sn.description=cn),Sn},Et=function(cn,Sn,Cn){cn===Dt&&Et(Ge,Sn,Cn),te(cn);var kn=ie(Sn);return te(Cn),fe(_e,kn)?(Cn.enumerable?(fe(cn,ct)&&cn[ct][kn]&&(cn[ct][kn]=!1),Cn=pe(Cn,{enumerable:ce(0,!1)})):(fe(cn,ct)||Ne(cn,ct,ce(1,{})),cn[ct][kn]=!0),ut(cn,kn,Cn)):Ne(cn,kn,Cn)},Ft=function(cn,Sn){te(cn);var Cn=se(Sn),kn=xe(Cn).concat(hn(Cn));return bt(kn,function(In){(!Ae||Ee(Xt,Cn,In))&&Et(cn,In,Cn[In])}),cn},qt=function(cn,Sn){return Sn===void 0?pe(cn):Ft(pe(cn),Sn)},Xt=function(cn){var Sn=ie(cn),Cn=Ee(nt,this,Sn);return this===Dt&&fe(_e,Sn)&&!fe(Ge,Sn)?!1:Cn||!fe(this,Sn)||!fe(_e,Sn)||fe(this,ct)&&this[ct][Sn]?Cn:!0},Kt=function(cn,Sn){var Cn=se(cn),kn=ie(Sn);if(!(Cn===Dt&&fe(_e,kn)&&!fe(Ge,kn))){var In=we(Cn,kn);return In&&fe(_e,kn)&&!(fe(Cn,ct)&&Cn[ct][kn])&&(In.enumerable=!0),In}},Vt=function(cn){var Sn=Xe(se(cn)),Cn=[];return bt(Sn,function(kn){!fe(_e,kn)&&!fe(ot,kn)&&Ie(Cn,kn)}),Cn},hn=function(on){var cn=on===Dt,Sn=Xe(cn?Ge:se(on)),Cn=[];return bt(Sn,function(kn){fe(_e,kn)&&(!cn||fe(Dt,kn))&&Ie(Cn,_e[kn])}),Cn};me||(mt=function(){if(z(vt,this))throw et("Symbol is not a constructor");var cn=!arguments.length||arguments[0]===void 0?void 0:le(arguments[0]),Sn=lt(cn),Cn=function(kn){this===Dt&&Ee(Cn,Ge,kn),fe(this,ct)&&fe(this[ct],Sn)&&(this[ct][Sn]=!1),ut(this,Sn,ce(1,kn))};return Ae&&ht&&ut(Dt,Sn,{configurable:!0,set:Cn}),Ot(Sn,cn)},vt=mt[dt],Ye(vt,"toString",function(){return yt(this).tag}),Ye(mt,"withoutSetter",function(on){return Ot(lt(on),on)}),Ue.f=Xt,Me.f=Et,Be.f=Ft,Te.f=Kt,je.f=De.f=Vt,Fe.f=hn,St.f=function(on){return Ot(ft(on),on)},Ae&&(Ne(vt,"description",{configurable:!0,get:function(){return yt(this).description}}),Se||Ye(Dt,"propertyIsEnumerable",Xt,{unsafe:!0}))),de({global:!0,wrap:!0,forced:!me,sham:!me},{Symbol:mt}),bt(xe(tt),function(on){qe(on)}),de({target:xt,stat:!0,forced:!me},{useSetter:function(){ht=!0},useSimple:function(){ht=!1}}),de({target:"Object",stat:!0,forced:!me,sham:!Ae},{create:qt,defineProperty:Et,defineProperties:Ft,getOwnPropertyDescriptor:Kt}),de({target:"Object",stat:!0,forced:!me},{getOwnPropertyNames:Vt}),rt(),wt(mt,xt),ot[ct]=!0},{"../internals/an-object":101,"../internals/array-iteration":111,"../internals/create-property-descriptor":130,"../internals/define-well-known-symbol":133,"../internals/descriptors":134,"../internals/export":149,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/native-symbol":191,"../internals/object-create":196,"../internals/object-define-properties":197,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-names-external":200,"../internals/object-get-own-property-symbols":202,"../internals/object-is-prototype-of":204,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/shared":237,"../internals/shared-key":235,"../internals/symbol-define-to-primitive":242,"../internals/to-indexed-object":247,"../internals/to-property-key":254,"../internals/to-string":256,"../internals/uid":263,"../internals/well-known-symbol":268,"../internals/well-known-symbol-wrapped":267}],310:[function(oe,He,Re){"use strict";var de=oe("../internals/export"),ve=oe("../internals/descriptors"),Ee=oe("../internals/global"),ke=oe("../internals/function-uncurry-this"),Se=oe("../internals/has-own-property"),Ae=oe("../internals/is-callable"),me=oe("../internals/object-is-prototype-of"),Pe=oe("../internals/to-string"),fe=oe("../internals/object-define-property").f,z=oe("../internals/copy-constructor-properties"),te=Ee.Symbol,se=te&&te.prototype;if(ve&&Ae(te)&&(!("description"in se)||te().description!==void 0)){var ie={},le=function(){var Me=arguments.length<1||arguments[0]===void 0?void 0:Pe(arguments[0]),Be=me(se,this)?new te(Me):Me===void 0?te():te(Me);return Me===""&&(ie[Be]=!0),Be};z(le,te),le.prototype=se,se.constructor=le;var ce=String(te("test"))=="Symbol(test)",pe=ke(se.toString),xe=ke(se.valueOf),je=/^Symbol\((.*)\)[^)]+$/,De=ke("".replace),Fe=ke("".slice);fe(se,"description",{configurable:!0,get:function(){var Me=xe(this),Be=pe(Me);if(Se(ie,Me))return"";var Ue=ce?Fe(Be,7,-1):De(Be,je,"$1");return Ue===""?void 0:Ue}}),de({global:!0,forced:!0},{Symbol:le})}},{"../internals/copy-constructor-properties":125,"../internals/descriptors":134,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/object-define-property":198,"../internals/object-is-prototype-of":204,"../internals/to-string":256}],311:[function(oe,He,Re){var de=oe("../internals/export"),ve=oe("../internals/get-built-in"),Ee=oe("../internals/has-own-property"),ke=oe("../internals/to-string"),Se=oe("../internals/shared"),Ae=oe("../internals/native-symbol-registry"),me=Se("string-to-symbol-registry"),Pe=Se("symbol-to-string-registry");de({target:"Symbol",stat:!0,forced:!Ae},{for:function(fe){var z=ke(fe);if(Ee(me,z))return me[z];var te=ve("Symbol")(z);return me[z]=te,Pe[te]=z,te}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/has-own-property":164,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/to-string":256}],312:[function(oe,He,Re){var de=oe("../internals/define-well-known-symbol");de("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(oe,He,Re){oe("../modules/es.symbol.constructor"),oe("../modules/es.symbol.for"),oe("../modules/es.symbol.key-for"),oe("../modules/es.json.stringify"),oe("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":285,"../modules/es.object.get-own-property-symbols":289,"../modules/es.symbol.constructor":309,"../modules/es.symbol.for":311,"../modules/es.symbol.key-for":314}],314:[function(oe,He,Re){var de=oe("../internals/export"),ve=oe("../internals/has-own-property"),Ee=oe("../internals/is-symbol"),ke=oe("../internals/try-to-string"),Se=oe("../internals/shared"),Ae=oe("../internals/native-symbol-registry"),me=Se("symbol-to-string-registry");de({target:"Symbol",stat:!0,forced:!Ae},{keyFor:function(fe){if(!Ee(fe))throw TypeError(ke(fe)+" is not a symbol");if(ve(me,fe))return me[fe]}})},{"../internals/export":149,"../internals/has-own-property":164,"../internals/is-symbol":183,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/try-to-string":257}],315:[function(oe,He,Re){"use strict";var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/array-buffer-view-core"),Ee=oe("../internals/array-copy-within"),ke=de(Ee),Se=ve.aTypedArray,Ae=ve.exportTypedArrayMethod;Ae("copyWithin",function(Pe,fe){return ke(Se(this),Pe,fe,arguments.length>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-copy-within":105,"../internals/function-uncurry-this":157}],316:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").every,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("every",function(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/function-call"),Ee=oe("../internals/array-fill"),ke=de.aTypedArray,Se=de.exportTypedArrayMethod;Se("fill",function(me){var Pe=arguments.length;return ve(Ee,ke(this),me,Pe>1?arguments[1]:void 0,Pe>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").filter,Ee=oe("../internals/typed-array-from-species-and-list"),ke=de.aTypedArray,Se=de.exportTypedArrayMethod;Se("filter",function(me){var Pe=ve(ke(this),me,arguments.length>1?arguments[1]:void 0);return Ee(this,Pe)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").findIndex,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("findIndex",function(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").find,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("find",function(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").forEach,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("forEach",function(Ae){ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-includes").includes,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("includes",function(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-includes").indexOf,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("indexOf",function(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(oe,He,Re){"use strict";var de=oe("../internals/global"),ve=oe("../internals/fails"),Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/array-buffer-view-core"),Se=oe("../modules/es.array.iterator"),Ae=oe("../internals/well-known-symbol"),me=Ae("iterator"),Pe=de.Uint8Array,fe=Ee(Se.values),z=Ee(Se.keys),te=Ee(Se.entries),se=ke.aTypedArray,ie=ke.exportTypedArrayMethod,le=Pe&&Pe.prototype,ce=!ve(function(){le[me].call([1])}),pe=!!le&&le.values&&le[me]===le.values&&le.values.name==="values",xe=function(){return fe(se(this))};ie("entries",function(){return te(se(this))},ce),ie("keys",function(){return z(se(this))},ce),ie("values",xe,ce||!pe,{name:"values"}),ie(me,xe,ce||!pe,{name:"values"})},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],325:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/function-uncurry-this"),Ee=de.aTypedArray,ke=de.exportTypedArrayMethod,Se=ve([].join);ke("join",function(me){return Se(Ee(this),me)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/function-apply"),Ee=oe("../internals/array-last-index-of"),ke=de.aTypedArray,Se=de.exportTypedArrayMethod;Se("lastIndexOf",function(me){var Pe=arguments.length;return ve(Ee,ke(this),Pe>1?[me,arguments[1]]:[me])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").map,Ee=oe("../internals/typed-array-species-constructor"),ke=de.aTypedArray,Se=de.exportTypedArrayMethod;Se("map",function(me){return ve(ke(this),me,arguments.length>1?arguments[1]:void 0,function(Pe,fe){return new(Ee(Pe))(fe)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-reduce").right,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("reduceRight",function(Ae){var me=arguments.length;return ve(Ee(this),Ae,me,me>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-reduce").left,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("reduce",function(Ae){var me=arguments.length;return ve(Ee(this),Ae,me,me>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=de.aTypedArray,Ee=de.exportTypedArrayMethod,ke=Math.floor;Ee("reverse",function(){for(var Ae=this,me=ve(Ae).length,Pe=ke(me/2),fe=0,z;fe<Pe;)z=Ae[fe],Ae[fe++]=Ae[--me],Ae[me]=z;return Ae})},{"../internals/array-buffer-view-core":103}],331:[function(oe,He,Re){"use strict";var de=oe("../internals/global"),ve=oe("../internals/function-call"),Ee=oe("../internals/array-buffer-view-core"),ke=oe("../internals/length-of-array-like"),Se=oe("../internals/to-offset"),Ae=oe("../internals/to-object"),me=oe("../internals/fails"),Pe=de.RangeError,fe=de.Int8Array,z=fe&&fe.prototype,te=z&&z.set,se=Ee.aTypedArray,ie=Ee.exportTypedArrayMethod,le=!me(function(){var pe=new Uint8ClampedArray(2);return ve(te,pe,{length:1,0:3},1),pe[1]!==3}),ce=le&&Ee.NATIVE_ARRAY_BUFFER_VIEWS&&me(function(){var pe=new fe(2);return pe.set(1),pe.set("2",1),pe[0]!==0||pe[1]!==2});ie("set",function(xe){se(this);var je=Se(arguments.length>1?arguments[1]:void 0,1),De=Ae(xe);if(le)return ve(te,this,De,je);var Fe=this.length,Te=ke(De),Me=0;if(Te+je>Fe)throw Pe("Wrong length");for(;Me<Te;)this[je+Me]=De[Me++]},!le||ce)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-call":155,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-offset":251}],332:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/typed-array-species-constructor"),Ee=oe("../internals/fails"),ke=oe("../internals/array-slice"),Se=de.aTypedArray,Ae=de.exportTypedArrayMethod,me=Ee(function(){new Int8Array(1).slice()});Ae("slice",function(fe,z){for(var te=ke(Se(this),fe,z),se=ve(this),ie=0,le=te.length,ce=new se(le);le>ie;)ce[ie]=te[ie++];return ce},me)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").some,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("some",function(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(oe,He,Re){"use strict";var de=oe("../internals/global"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/fails"),ke=oe("../internals/a-callable"),Se=oe("../internals/array-sort"),Ae=oe("../internals/array-buffer-view-core"),me=oe("../internals/engine-ff-version"),Pe=oe("../internals/engine-is-ie-or-edge"),fe=oe("../internals/engine-v8-version"),z=oe("../internals/engine-webkit-version"),te=Ae.aTypedArray,se=Ae.exportTypedArrayMethod,ie=de.Uint16Array,le=ie&&ve(ie.prototype.sort),ce=!!le&&!(Ee(function(){le(new ie(2),null)})&&Ee(function(){le(new ie(2),{})})),pe=!!le&&!Ee(function(){if(fe)return fe<74;if(me)return me<67;if(Pe)return!0;if(z)return z<602;var je=new ie(516),De=Array(516),Fe,Te;for(Fe=0;Fe<516;Fe++)Te=Fe%4,je[Fe]=515-Fe,De[Fe]=Fe-2*Te+3;for(le(je,function(Me,Be){return(Me/4|0)-(Be/4|0)}),Fe=0;Fe<516;Fe++)if(je[Fe]!==De[Fe])return!0}),xe=function(je){return function(De,Fe){return je!==void 0?+je(De,Fe)||0:Fe!==Fe?-1:De!==De?1:De===0&&Fe===0?1/De>0&&1/Fe<0?1:-1:De>Fe}};se("sort",function(De){return De!==void 0&&ke(De),pe?le(this,De):Se(te(this),xe(De))},!pe||ce)},{"../internals/a-callable":95,"../internals/array-buffer-view-core":103,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],335:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/to-length"),Ee=oe("../internals/to-absolute-index"),ke=oe("../internals/typed-array-species-constructor"),Se=de.aTypedArray,Ae=de.exportTypedArrayMethod;Ae("subarray",function(Pe,fe){var z=Se(this),te=z.length,se=Ee(Pe,te),ie=ke(z);return new ie(z.buffer,z.byteOffset+se*z.BYTES_PER_ELEMENT,ve((fe===void 0?te:Ee(fe,te))-se))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(oe,He,Re){"use strict";var de=oe("../internals/global"),ve=oe("../internals/function-apply"),Ee=oe("../internals/array-buffer-view-core"),ke=oe("../internals/fails"),Se=oe("../internals/array-slice"),Ae=de.Int8Array,me=Ee.aTypedArray,Pe=Ee.exportTypedArrayMethod,fe=[].toLocaleString,z=!!Ae&&ke(function(){fe.call(new Ae(1))}),te=ke(function(){return[1,2].toLocaleString()!=new Ae([1,2]).toLocaleString()})||!ke(function(){Ae.prototype.toLocaleString.call([1,2])});Pe("toLocaleString",function(){return ve(fe,z?Se(me(this)):me(this),Se(arguments))},te)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(oe,He,Re){"use strict";var de=oe("../internals/array-buffer-view-core").exportTypedArrayMethod,ve=oe("../internals/fails"),Ee=oe("../internals/global"),ke=oe("../internals/function-uncurry-this"),Se=Ee.Uint8Array,Ae=Se&&Se.prototype||{},me=[].toString,Pe=ke([].join);ve(function(){me.call({})})&&(me=function(){return Pe(this)});var fe=Ae.toString!=me;de("toString",me,fe)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(oe,He,Re){var de=oe("../internals/typed-array-constructor");de("Uint8",function(ve){return function(ke,Se,Ae){return ve(this,ke,Se,Ae)}})},{"../internals/typed-array-constructor":258}],339:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/dom-iterables"),Ee=oe("../internals/dom-token-list-prototype"),ke=oe("../internals/array-for-each"),Se=oe("../internals/create-non-enumerable-property"),Ae=function(Pe){if(Pe&&Pe.forEach!==ke)try{Se(Pe,"forEach",ke)}catch(fe){Pe.forEach=ke}};for(var me in ve)ve[me]&&Ae(de[me]&&de[me].prototype);Ae(Ee)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(oe,He,Re){var de=oe("../internals/global"),ve=oe("../internals/dom-iterables"),Ee=oe("../internals/dom-token-list-prototype"),ke=oe("../modules/es.array.iterator"),Se=oe("../internals/create-non-enumerable-property"),Ae=oe("../internals/well-known-symbol"),me=Ae("iterator"),Pe=Ae("toStringTag"),fe=ke.values,z=function(se,ie){if(se){if(se[me]!==fe)try{Se(se,me,fe)}catch(ce){se[me]=fe}if(se[Pe]||Se(se,Pe,ie),ve[ie]){for(var le in ke)if(se[le]!==ke[le])try{Se(se,le,ke[le])}catch(ce){se[le]=ke[le]}}}};for(var te in ve)z(de[te]&&de[te].prototype,te);z(Ee,"DOMTokenList")},{"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],341:[function(oe,He,Re){function de(pe){return Array.isArray?Array.isArray(pe):ce(pe)==="[object Array]"}Re.isArray=de;function ve(pe){return typeof pe=="boolean"}Re.isBoolean=ve;function Ee(pe){return pe===null}Re.isNull=Ee;function ke(pe){return pe==null}Re.isNullOrUndefined=ke;function Se(pe){return typeof pe=="number"}Re.isNumber=Se;function Ae(pe){return typeof pe=="string"}Re.isString=Ae;function me(pe){return typeof pe=="symbol"}Re.isSymbol=me;function Pe(pe){return pe===void 0}Re.isUndefined=Pe;function fe(pe){return ce(pe)==="[object RegExp]"}Re.isRegExp=fe;function z(pe){return typeof pe=="object"&&pe!==null}Re.isObject=z;function te(pe){return ce(pe)==="[object Date]"}Re.isDate=te;function se(pe){return ce(pe)==="[object Error]"||pe instanceof Error}Re.isError=se;function ie(pe){return typeof pe=="function"}Re.isFunction=ie;function le(pe){return pe===null||typeof pe=="boolean"||typeof pe=="number"||typeof pe=="string"||typeof pe=="symbol"||typeof pe=="undefined"}Re.isPrimitive=le,Re.isBuffer=oe("buffer").Buffer.isBuffer;function ce(pe){return Object.prototype.toString.call(pe)}},{buffer:90}],342:[function(oe,He,Re){(function(de){"use strict";var ve=function(){var me=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,Pe=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,fe=/[^-+\dA-Z]/g;return function(z,te,se,ie){if(arguments.length===1&&Ae(z)==="string"&&!/\d/.test(z)&&(te=z,z=void 0),z=z||new Date,z instanceof Date||(z=new Date(z)),isNaN(z))throw TypeError("Invalid date");te=String(ve.masks[te]||te||ve.masks.default);var le=te.slice(0,4);(le==="UTC:"||le==="GMT:")&&(te=te.slice(4),se=!0,le==="GMT:"&&(ie=!0));var ce=se?"getUTC":"get",pe=z[ce+"Date"](),xe=z[ce+"Day"](),je=z[ce+"Month"](),De=z[ce+"FullYear"](),Fe=z[ce+"Hours"](),Te=z[ce+"Minutes"](),Me=z[ce+"Seconds"](),Be=z[ce+"Milliseconds"](),Ue=se?0:z.getTimezoneOffset(),Ye=ke(z),Ve=Se(z),Ze={d:pe,dd:Ee(pe),ddd:ve.i18n.dayNames[xe],dddd:ve.i18n.dayNames[xe+7],m:je+1,mm:Ee(je+1),mmm:ve.i18n.monthNames[je],mmmm:ve.i18n.monthNames[je+12],yy:String(De).slice(2),yyyy:De,h:Fe%12||12,hh:Ee(Fe%12||12),H:Fe,HH:Ee(Fe),M:Te,MM:Ee(Te),s:Me,ss:Ee(Me),l:Ee(Be,3),L:Ee(Math.round(Be/10)),t:Fe<12?"a":"p",tt:Fe<12?"am":"pm",T:Fe<12?"A":"P",TT:Fe<12?"AM":"PM",Z:ie?"GMT":se?"UTC":(String(z).match(Pe)||[""]).pop().replace(fe,""),o:(Ue>0?"-":"+")+Ee(Math.floor(Math.abs(Ue)/60)*100+Math.abs(Ue)%60,4),S:["th","st","nd","rd"][pe%10>3?0:(pe%100-pe%10!=10)*pe%10],W:Ye,N:Ve};return te.replace(me,function(ot){return ot in Ze?Ze[ot]:ot.slice(1,ot.length-1)})}}();ve.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},ve.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function Ee(me,Pe){for(me=String(me),Pe=Pe||2;me.length<Pe;)me="0"+me;return me}function ke(me){var Pe=new Date(me.getFullYear(),me.getMonth(),me.getDate());Pe.setDate(Pe.getDate()-(Pe.getDay()+6)%7+3);var fe=new Date(Pe.getFullYear(),0,4);fe.setDate(fe.getDate()-(fe.getDay()+6)%7+3);var z=Pe.getTimezoneOffset()-fe.getTimezoneOffset();Pe.setHours(Pe.getHours()-z);var te=(Pe-fe)/(864e5*7);return 1+Math.floor(te)}function Se(me){var Pe=me.getDay();return Pe===0&&(Pe=7),Pe}function Ae(me){return me===null?"null":me===void 0?"undefined":typeof me!="object"?typeof me:Array.isArray(me)?"array":{}.toString.call(me).slice(8,-1).toLowerCase()}typeof pt=="function"&&pt.amd?pt(function(){return ve}):typeof Re=="object"?He.exports=ve:de.dateFormat=ve})(this)},{}],343:[function(oe,He,Re){"use strict";var de=/["'&<>]/;He.exports=ve;function ve(Ee){var ke=""+Ee,Se=de.exec(ke);if(!Se)return ke;var Ae,me="",Pe=0,fe=0;for(Pe=Se.index;Pe<ke.length;Pe++){switch(ke.charCodeAt(Pe)){case 34:Ae=""";break;case 38:Ae="&";break;case 39:Ae="'";break;case 60:Ae="<";break;case 62:Ae=">";break;default:continue}fe!==Pe&&(me+=ke.substring(fe,Pe)),fe=Pe+1,me+=Ae}return fe!==Pe?me+ke.substring(fe,Pe):me}},{}],344:[function(oe,He,Re){"use strict";var de=typeof Reflect=="object"?Reflect:null,ve=de&&typeof de.apply=="function"?de.apply:function(Me,Be,Ue){return Function.prototype.apply.call(Me,Be,Ue)},Ee;de&&typeof de.ownKeys=="function"?Ee=de.ownKeys:Object.getOwnPropertySymbols?Ee=function(Me){return Object.getOwnPropertyNames(Me).concat(Object.getOwnPropertySymbols(Me))}:Ee=function(Me){return Object.getOwnPropertyNames(Me)};function ke(Te){console&&console.warn&&console.warn(Te)}var Se=Number.isNaN||function(Me){return Me!==Me};function Ae(){Ae.init.call(this)}He.exports=Ae,He.exports.once=je,Ae.EventEmitter=Ae,Ae.prototype._events=void 0,Ae.prototype._eventsCount=0,Ae.prototype._maxListeners=void 0;var me=10;function Pe(Te){if(typeof Te!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Te)}Object.defineProperty(Ae,"defaultMaxListeners",{enumerable:!0,get:function(){return me},set:function(Te){if(typeof Te!="number"||Te<0||Se(Te))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+Te+".");me=Te}}),Ae.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ae.prototype.setMaxListeners=function(Me){if(typeof Me!="number"||Me<0||Se(Me))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Me+".");return this._maxListeners=Me,this};function fe(Te){return Te._maxListeners===void 0?Ae.defaultMaxListeners:Te._maxListeners}Ae.prototype.getMaxListeners=function(){return fe(this)},Ae.prototype.emit=function(Me){for(var Be=[],Ue=1;Ue<arguments.length;Ue++)Be.push(arguments[Ue]);var Ye=Me==="error",Ve=this._events;if(Ve!==void 0)Ye=Ye&&Ve.error===void 0;else if(!Ye)return!1;if(Ye){var Ze;if(Be.length>0&&(Ze=Be[0]),Ze instanceof Error)throw Ze;var ot=new Error("Unhandled error."+(Ze?" ("+Ze.message+")":""));throw ot.context=Ze,ot}var lt=Ve[Me];if(lt===void 0)return!1;if(typeof lt=="function")ve(lt,this,Be);else for(var ft=lt.length,St=ce(lt,ft),Ue=0;Ue<ft;++Ue)ve(St[Ue],this,Be);return!0};function z(Te,Me,Be,Ue){var Ye,Ve,Ze;if(Pe(Be),Ve=Te._events,Ve===void 0?(Ve=Te._events=Object.create(null),Te._eventsCount=0):(Ve.newListener!==void 0&&(Te.emit("newListener",Me,Be.listener?Be.listener:Be),Ve=Te._events),Ze=Ve[Me]),Ze===void 0)Ze=Ve[Me]=Be,++Te._eventsCount;else if(typeof Ze=="function"?Ze=Ve[Me]=Ue?[Be,Ze]:[Ze,Be]:Ue?Ze.unshift(Be):Ze.push(Be),Ye=fe(Te),Ye>0&&Ze.length>Ye&&!Ze.warned){Ze.warned=!0;var ot=new Error("Possible EventEmitter memory leak detected. "+Ze.length+" "+String(Me)+" listeners added. Use emitter.setMaxListeners() to increase limit");ot.name="MaxListenersExceededWarning",ot.emitter=Te,ot.type=Me,ot.count=Ze.length,ke(ot)}return Te}Ae.prototype.addListener=function(Me,Be){return z(this,Me,Be,!1)},Ae.prototype.on=Ae.prototype.addListener,Ae.prototype.prependListener=function(Me,Be){return z(this,Me,Be,!0)};function te(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function se(Te,Me,Be){var Ue={fired:!1,wrapFn:void 0,target:Te,type:Me,listener:Be},Ye=te.bind(Ue);return Ye.listener=Be,Ue.wrapFn=Ye,Ye}Ae.prototype.once=function(Me,Be){return Pe(Be),this.on(Me,se(this,Me,Be)),this},Ae.prototype.prependOnceListener=function(Me,Be){return Pe(Be),this.prependListener(Me,se(this,Me,Be)),this},Ae.prototype.removeListener=function(Me,Be){var Ue,Ye,Ve,Ze,ot;if(Pe(Be),Ye=this._events,Ye===void 0)return this;if(Ue=Ye[Me],Ue===void 0)return this;if(Ue===Be||Ue.listener===Be)--this._eventsCount===0?this._events=Object.create(null):(delete Ye[Me],Ye.removeListener&&this.emit("removeListener",Me,Ue.listener||Be));else if(typeof Ue!="function"){for(Ve=-1,Ze=Ue.length-1;Ze>=0;Ze--)if(Ue[Ze]===Be||Ue[Ze].listener===Be){ot=Ue[Ze].listener,Ve=Ze;break}if(Ve<0)return this;Ve===0?Ue.shift():pe(Ue,Ve),Ue.length===1&&(Ye[Me]=Ue[0]),Ye.removeListener!==void 0&&this.emit("removeListener",Me,ot||Be)}return this},Ae.prototype.off=Ae.prototype.removeListener,Ae.prototype.removeAllListeners=function(Me){var Be,Ue,Ye;if(Ue=this._events,Ue===void 0)return this;if(Ue.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Ue[Me]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Ue[Me]),this;if(arguments.length===0){var Ve=Object.keys(Ue),Ze;for(Ye=0;Ye<Ve.length;++Ye)Ze=Ve[Ye],Ze!=="removeListener"&&this.removeAllListeners(Ze);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Be=Ue[Me],typeof Be=="function")this.removeListener(Me,Be);else if(Be!==void 0)for(Ye=Be.length-1;Ye>=0;Ye--)this.removeListener(Me,Be[Ye]);return this};function ie(Te,Me,Be){var Ue=Te._events;if(Ue===void 0)return[];var Ye=Ue[Me];return Ye===void 0?[]:typeof Ye=="function"?Be?[Ye.listener||Ye]:[Ye]:Be?xe(Ye):ce(Ye,Ye.length)}Ae.prototype.listeners=function(Me){return ie(this,Me,!0)},Ae.prototype.rawListeners=function(Me){return ie(this,Me,!1)},Ae.listenerCount=function(Te,Me){return typeof Te.listenerCount=="function"?Te.listenerCount(Me):le.call(Te,Me)},Ae.prototype.listenerCount=le;function le(Te){var Me=this._events;if(Me!==void 0){var Be=Me[Te];if(typeof Be=="function")return 1;if(Be!==void 0)return Be.length}return 0}Ae.prototype.eventNames=function(){return this._eventsCount>0?Ee(this._events):[]};function ce(Te,Me){for(var Be=new Array(Me),Ue=0;Ue<Me;++Ue)Be[Ue]=Te[Ue];return Be}function pe(Te,Me){for(;Me+1<Te.length;Me++)Te[Me]=Te[Me+1];Te.pop()}function xe(Te){for(var Me=new Array(Te.length),Be=0;Be<Me.length;++Be)Me[Be]=Te[Be].listener||Te[Be];return Me}function je(Te,Me){return new Promise(function(Be,Ue){function Ye(Ze){Te.removeListener(Me,Ve),Ue(Ze)}function Ve(){typeof Te.removeListener=="function"&&Te.removeListener("error",Ye),Be([].slice.call(arguments))}Fe(Te,Me,Ve,{once:!0}),Me!=="error"&&De(Te,Ye,{once:!0})})}function De(Te,Me,Be){typeof Te.on=="function"&&Fe(Te,"error",Me,Be)}function Fe(Te,Me,Be,Ue){if(typeof Te.on=="function")Ue.once?Te.once(Me,Be):Te.on(Me,Be);else if(typeof Te.addEventListener=="function")Te.addEventListener(Me,function Ye(Ve){Ue.once&&Te.removeEventListener(Me,Ye),Be(Ve)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof Te)}},{}],345:[function(oe,He,Re){"use strict";var de=oe("is-callable"),ve=Object.prototype.toString,Ee=Object.prototype.hasOwnProperty,ke=function(fe,z,te){for(var se=0,ie=fe.length;se<ie;se++)Ee.call(fe,se)&&(te==null?z(fe[se],se,fe):z.call(te,fe[se],se,fe))},Se=function(fe,z,te){for(var se=0,ie=fe.length;se<ie;se++)te==null?z(fe.charAt(se),se,fe):z.call(te,fe.charAt(se),se,fe)},Ae=function(fe,z,te){for(var se in fe)Ee.call(fe,se)&&(te==null?z(fe[se],se,fe):z.call(te,fe[se],se,fe))},me=function(fe,z,te){if(!de(z))throw new TypeError("iterator must be a function");var se;arguments.length>=3&&(se=te),ve.call(fe)==="[object Array]"?ke(fe,z,se):typeof fe=="string"?Se(fe,z,se):Ae(fe,z,se)};He.exports=me},{"is-callable":367}],346:[function(oe,He,Re){"use strict";var de="Function.prototype.bind called on incompatible ",ve=Array.prototype.slice,Ee=Object.prototype.toString,ke="[object Function]";He.exports=function(Ae){var me=this;if(typeof me!="function"||Ee.call(me)!==ke)throw new TypeError(de+me);for(var Pe=ve.call(arguments,1),fe,z=function(){if(this instanceof fe){var ce=me.apply(this,Pe.concat(ve.call(arguments)));return Object(ce)===ce?ce:this}else return me.apply(Ae,Pe.concat(ve.call(arguments)))},te=Math.max(0,me.length-Pe.length),se=[],ie=0;ie<te;ie++)se.push("$"+ie);if(fe=Function("binder","return function ("+se.join(",")+"){ return binder.apply(this,arguments); }")(z),me.prototype){var le=function(){};le.prototype=me.prototype,fe.prototype=new le,le.prototype=null}return fe}},{}],347:[function(oe,He,Re){"use strict";var de=oe("./implementation");He.exports=Function.prototype.bind||de},{"./implementation":346}],348:[function(oe,He,Re){"use strict";var de,ve=SyntaxError,Ee=Function,ke=TypeError,Se=function(lt){try{return Ee('"use strict"; return ('+lt+").constructor;")()}catch(ft){}},Ae=Object.getOwnPropertyDescriptor;if(Ae)try{Ae({},"")}catch(lt){Ae=null}var me=function(){throw new ke},Pe=Ae?function(){try{return arguments.callee,me}catch(lt){try{return Ae(arguments,"callee").get}catch(ft){return me}}}():me,fe=oe("has-symbols")(),z=oe("has-proto")(),te=Object.getPrototypeOf||(z?function(lt){return lt.__proto__}:null),se={},ie=typeof Uint8Array=="undefined"||!te?de:te(Uint8Array),le={"%AggregateError%":typeof AggregateError=="undefined"?de:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?de:ArrayBuffer,"%ArrayIteratorPrototype%":fe&&te?te([][Symbol.iterator]()):de,"%AsyncFromSyncIteratorPrototype%":de,"%AsyncFunction%":se,"%AsyncGenerator%":se,"%AsyncGeneratorFunction%":se,"%AsyncIteratorPrototype%":se,"%Atomics%":typeof Atomics=="undefined"?de:Atomics,"%BigInt%":typeof BigInt=="undefined"?de:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?de:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?de:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?de:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?de:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?de:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?de:FinalizationRegistry,"%Function%":Ee,"%GeneratorFunction%":se,"%Int8Array%":typeof Int8Array=="undefined"?de:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?de:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?de:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":fe&&te?te(te([][Symbol.iterator]())):de,"%JSON%":typeof JSON=="object"?JSON:de,"%Map%":typeof Map=="undefined"?de:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!fe||!te?de:te(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?de:Promise,"%Proxy%":typeof Proxy=="undefined"?de:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?de:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?de:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!fe||!te?de:te(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?de:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":fe&&te?te(""[Symbol.iterator]()):de,"%Symbol%":fe?Symbol:de,"%SyntaxError%":ve,"%ThrowTypeError%":Pe,"%TypedArray%":ie,"%TypeError%":ke,"%Uint8Array%":typeof Uint8Array=="undefined"?de:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?de:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?de:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?de:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?de:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?de:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?de:WeakSet};if(te)try{null.error}catch(lt){var ce=te(te(lt));le["%Error.prototype%"]=ce}var pe=function lt(ft){var St;if(ft==="%AsyncFunction%")St=Se("async function () {}");else if(ft==="%GeneratorFunction%")St=Se("function* () {}");else if(ft==="%AsyncGeneratorFunction%")St=Se("async function* () {}");else if(ft==="%AsyncGenerator%"){var qe=lt("%AsyncGeneratorFunction%");qe&&(St=qe.prototype)}else if(ft==="%AsyncIteratorPrototype%"){var rt=lt("%AsyncGenerator%");rt&&te&&(St=te(rt.prototype))}return le[ft]=St,St},xe={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},je=oe("function-bind"),De=oe("has"),Fe=je.call(Function.call,Array.prototype.concat),Te=je.call(Function.apply,Array.prototype.splice),Me=je.call(Function.call,String.prototype.replace),Be=je.call(Function.call,String.prototype.slice),Ue=je.call(Function.call,RegExp.prototype.exec),Ye=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ve=/\\(\\)?/g,Ze=function(ft){var St=Be(ft,0,1),qe=Be(ft,-1);if(St==="%"&&qe!=="%")throw new ve("invalid intrinsic syntax, expected closing `%`");if(qe==="%"&&St!=="%")throw new ve("invalid intrinsic syntax, expected opening `%`");var rt=[];return Me(ft,Ye,function(wt,Ct,bt,ct){rt[rt.length]=bt?Me(ct,Ve,"$1"):Ct||wt}),rt},ot=function(ft,St){var qe=ft,rt;if(De(xe,qe)&&(rt=xe[qe],qe="%"+rt[0]+"%"),De(le,qe)){var wt=le[qe];if(wt===se&&(wt=pe(qe)),typeof wt=="undefined"&&!St)throw new ke("intrinsic "+ft+" exists, but is not available. Please file an issue!");return{alias:rt,name:qe,value:wt}}throw new ve("intrinsic "+ft+" does not exist!")};He.exports=function(ft,St){if(typeof ft!="string"||ft.length===0)throw new ke("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof St!="boolean")throw new ke('"allowMissing" argument must be a boolean');if(Ue(/^%?[^%]*%?$/,ft)===null)throw new ve("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var qe=Ze(ft),rt=qe.length>0?qe[0]:"",wt=ot("%"+rt+"%",St),Ct=wt.name,bt=wt.value,ct=!1,xt=wt.alias;xt&&(rt=xt[0],Te(qe,Fe([0,1],xt)));for(var dt=1,Mt=!0;dt<qe.length;dt+=1){var yt=qe[dt],Dt=Be(yt,0,1),mt=Be(yt,-1);if((Dt==='"'||Dt==="'"||Dt==="`"||mt==='"'||mt==="'"||mt==="`")&&Dt!==mt)throw new ve("property names with quotes must have matching quotes");if((yt==="constructor"||!Mt)&&(ct=!0),rt+="."+yt,Ct="%"+rt+"%",De(le,Ct))bt=le[Ct];else if(bt!=null){if(!(yt in bt)){if(!St)throw new ke("base intrinsic for "+ft+" exists, but the property is not available.");return}if(Ae&&dt+1>=qe.length){var vt=Ae(bt,yt);Mt=!!vt,Mt&&"get"in vt&&!("originalValue"in vt.get)?bt=vt.get:bt=bt[yt]}else Mt=De(bt,yt),bt=bt[yt];Mt&&!ct&&(le[Ct]=bt)}}return bt}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(oe,He,Re){"use strict";var de=oe("get-intrinsic"),ve=de("%Object.getOwnPropertyDescriptor%",!0);if(ve)try{ve([],"length")}catch(Ee){ve=null}He.exports=ve},{"get-intrinsic":348}],350:[function(oe,He,Re){"use strict";var de={foo:{}},ve=Object;He.exports=function(){return{__proto__:de}.foo===de.foo&&!({__proto__:null}instanceof ve)}},{}],351:[function(oe,He,Re){"use strict";var de=typeof Symbol!="undefined"&&Symbol,ve=oe("./shams");He.exports=function(){return typeof de!="function"||typeof Symbol!="function"||typeof de("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ve()}},{"./shams":352}],352:[function(oe,He,Re){"use strict";He.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var ve={},Ee=Symbol("test"),ke=Object(Ee);if(typeof Ee=="string"||Object.prototype.toString.call(Ee)!=="[object Symbol]"||Object.prototype.toString.call(ke)!=="[object Symbol]")return!1;var Se=42;ve[Ee]=Se;for(Ee in ve)return!1;if(typeof Object.keys=="function"&&Object.keys(ve).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(ve).length!==0)return!1;var Ae=Object.getOwnPropertySymbols(ve);if(Ae.length!==1||Ae[0]!==Ee||!Object.prototype.propertyIsEnumerable.call(ve,Ee))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var me=Object.getOwnPropertyDescriptor(ve,Ee);if(me.value!==Se||me.enumerable!==!0)return!1}return!0}},{}],353:[function(oe,He,Re){"use strict";var de=oe("has-symbols/shams");He.exports=function(){return de()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(oe,He,Re){"use strict";var de=oe("function-bind");He.exports=de.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(oe,He,Re){var de=oe("http"),ve=oe("url"),Ee=He.exports;for(var ke in de)de.hasOwnProperty(ke)&&(Ee[ke]=de[ke]);Ee.request=function(Ae,me){return Ae=Se(Ae),de.request.call(this,Ae,me)},Ee.get=function(Ae,me){return Ae=Se(Ae),de.get.call(this,Ae,me)};function Se(Ae){if(typeof Ae=="string"&&(Ae=ve.parse(Ae)),Ae.protocol||(Ae.protocol="https:"),Ae.protocol!=="https:")throw new Error('Protocol "'+Ae.protocol+'" not supported. Expected "https:"');return Ae}},{http:468,url:472}],356:[function(oe,He,Re){"use strict";var de=oe("util"),ve=oe("ms");He.exports=function(Ee){if(typeof Ee=="number")return Ee;var ke=ve(Ee);if(ke===void 0){var Se=new Error(de.format("humanize-ms(%j) result undefined",Ee));console.warn(Se.stack)}return ke}},{ms:376,util:419}],357:[function(oe,He,Re){Re.read=function(de,ve,Ee,ke,Se){var Ae,me,Pe=Se*8-ke-1,fe=(1<<Pe)-1,z=fe>>1,te=-7,se=Ee?Se-1:0,ie=Ee?-1:1,le=de[ve+se];for(se+=ie,Ae=le&(1<<-te)-1,le>>=-te,te+=Pe;te>0;Ae=Ae*256+de[ve+se],se+=ie,te-=8);for(me=Ae&(1<<-te)-1,Ae>>=-te,te+=ke;te>0;me=me*256+de[ve+se],se+=ie,te-=8);if(Ae===0)Ae=1-z;else{if(Ae===fe)return me?NaN:(le?-1:1)*(1/0);me=me+Math.pow(2,ke),Ae=Ae-z}return(le?-1:1)*me*Math.pow(2,Ae-ke)},Re.write=function(de,ve,Ee,ke,Se,Ae){var me,Pe,fe,z=Ae*8-Se-1,te=(1<<z)-1,se=te>>1,ie=Se===23?Math.pow(2,-24)-Math.pow(2,-77):0,le=ke?0:Ae-1,ce=ke?1:-1,pe=ve<0||ve===0&&1/ve<0?1:0;for(ve=Math.abs(ve),isNaN(ve)||ve===1/0?(Pe=isNaN(ve)?1:0,me=te):(me=Math.floor(Math.log(ve)/Math.LN2),ve*(fe=Math.pow(2,-me))<1&&(me--,fe*=2),me+se>=1?ve+=ie/fe:ve+=ie*Math.pow(2,1-se),ve*fe>=2&&(me++,fe/=2),me+se>=te?(Pe=0,me=te):me+se>=1?(Pe=(ve*fe-1)*Math.pow(2,Se),me=me+se):(Pe=ve*Math.pow(2,se-1)*Math.pow(2,Se),me=0));Se>=8;de[Ee+le]=Pe&255,le+=ce,Pe/=256,Se-=8);for(me=me<<Se|Pe,z+=Se;z>0;de[Ee+le]=me&255,le+=ce,me/=256,z-=8);de[Ee+le-ce]|=pe*128}},{}],358:[function(oe,He,Re){"use strict";var de=[oe("./nextTick"),oe("./queueMicrotask"),oe("./mutation.js"),oe("./messageChannel"),oe("./stateChange"),oe("./timeout")],ve,Ee,ke=-1,Se=[],Ae=!1;function me(){!ve||!Ee||(ve=!1,Ee.length?Se=Ee.concat(Se):ke=-1,Se.length&&Pe())}function Pe(){if(!ve){Ae=!1,ve=!0;for(var le=Se.length,ce=setTimeout(me);le;){for(Ee=Se,Se=[];Ee&&++ke<le;)Ee[ke].run();ke=-1,le=Se.length}Ee=null,ke=-1,ve=!1,clearTimeout(ce)}}for(var fe,z=-1,te=de.length;++z<te;)if(de[z]&&de[z].test&&de[z].test()){fe=de[z].install(Pe);break}function se(le,ce){this.fun=le,this.array=ce}se.prototype.run=function(){var le=this.fun,ce=this.array;switch(ce.length){case 0:return le();case 1:return le(ce[0]);case 2:return le(ce[0],ce[1]);case 3:return le(ce[0],ce[1],ce[2]);default:return le.apply(null,ce)}},He.exports=ie;function ie(le){var ce=new Array(arguments.length-1);if(arguments.length>1)for(var pe=1;pe<arguments.length;pe++)ce[pe-1]=arguments[pe];Se.push(new se(le,ce)),!Ae&&!ve&&(Ae=!0,fe())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(oe,He,Re){(function(de){(function(){"use strict";Re.test=function(){return de.setImmediate?!1:typeof de.MessageChannel!="undefined"},Re.install=function(ve){var Ee=new de.MessageChannel;return Ee.port1.onmessage=ve,function(){Ee.port2.postMessage(0)}}}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(oe,He,Re){(function(de){(function(){"use strict";var ve=de.MutationObserver||de.WebKitMutationObserver;Re.test=function(){return ve},Re.install=function(Ee){var ke=0,Se=new ve(Ee),Ae=de.document.createTextNode("");return Se.observe(Ae,{characterData:!0}),function(){Ae.data=ke=++ke%2}}}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(oe,He,Re){(function(de){(function(){"use strict";Re.test=function(){return typeof de.queueMicrotask=="function"},Re.install=function(ve){return function(){de.queueMicrotask(ve)}}}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(oe,He,Re){(function(de){(function(){"use strict";Re.test=function(){return"document"in de&&"onreadystatechange"in de.document.createElement("script")},Re.install=function(ve){return function(){var Ee=de.document.createElement("script");return Ee.onreadystatechange=function(){ve(),Ee.onreadystatechange=null,Ee.parentNode.removeChild(Ee),Ee=null},de.document.documentElement.appendChild(Ee),ve}}}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(oe,He,Re){"use strict";Re.test=function(){return!0},Re.install=function(de){return function(){setTimeout(de,0)}}},{}],364:[function(oe,He,Re){typeof Object.create=="function"?He.exports=function(ve,Ee){Ee&&(ve.super_=Ee,ve.prototype=Object.create(Ee.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}}))}:He.exports=function(ve,Ee){if(Ee){ve.super_=Ee;var ke=function(){};ke.prototype=Ee.prototype,ve.prototype=new ke,ve.prototype.constructor=ve}}},{}],365:[function(oe,He,Re){"use strict";var de=oe("has-tostringtag/shams")(),ve=oe("call-bind/callBound"),Ee=ve("Object.prototype.toString"),ke=function(Pe){return de&&Pe&&typeof Pe=="object"&&Symbol.toStringTag in Pe?!1:Ee(Pe)==="[object Arguments]"},Se=function(Pe){return ke(Pe)?!0:Pe!==null&&typeof Pe=="object"&&typeof Pe.length=="number"&&Pe.length>=0&&Ee(Pe)!=="[object Array]"&&Ee(Pe.callee)==="[object Function]"},Ae=function(){return ke(arguments)}();ke.isLegacyArguments=Se,He.exports=Ae?ke:Se},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(oe,He,Re){He.exports=function(Ee){return Ee!=null&&(de(Ee)||ve(Ee)||!!Ee._isBuffer)};function de(Ee){return!!Ee.constructor&&typeof Ee.constructor.isBuffer=="function"&&Ee.constructor.isBuffer(Ee)}function ve(Ee){return typeof Ee.readFloatLE=="function"&&typeof Ee.slice=="function"&&de(Ee.slice(0,0))}},{}],367:[function(oe,He,Re){"use strict";var de=Function.prototype.toString,ve=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ee,ke;if(typeof ve=="function"&&typeof Object.defineProperty=="function")try{Ee=Object.defineProperty({},"length",{get:function(){throw ke}}),ke={},ve(function(){throw 42},null,Ee)}catch(De){De!==ke&&(ve=null)}else ve=null;var Se=/^\s*class\b/,Ae=function(Fe){try{var Te=de.call(Fe);return Se.test(Te)}catch(Me){return!1}},me=function(Fe){try{return Ae(Fe)?!1:(de.call(Fe),!0)}catch(Te){return!1}},Pe=Object.prototype.toString,fe="[object Object]",z="[object Function]",te="[object GeneratorFunction]",se="[object HTMLAllCollection]",ie="[object HTML document.all class]",le="[object HTMLCollection]",ce=typeof Symbol=="function"&&!!Symbol.toStringTag,pe=!(0 in[,]),xe=function(){return!1};if(typeof document=="object"){var je=document.all;Pe.call(je)===Pe.call(document.all)&&(xe=function(Fe){if((pe||!Fe)&&(typeof Fe=="undefined"||typeof Fe=="object"))try{var Te=Pe.call(Fe);return(Te===se||Te===ie||Te===le||Te===fe)&&Fe("")==null}catch(Me){}return!1})}He.exports=ve?function(Fe){if(xe(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;try{ve(Fe,null,Ee)}catch(Te){if(Te!==ke)return!1}return!Ae(Fe)&&me(Fe)}:function(Fe){if(xe(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;if(ce)return me(Fe);if(Ae(Fe))return!1;var Te=Pe.call(Fe);return Te!==z&&Te!==te&&!/^\[object HTML/.test(Te)?!1:me(Fe)}},{}],368:[function(oe,He,Re){"use strict";var de=Object.prototype.toString,ve=Function.prototype.toString,Ee=/^\s*(?:function)?\*/,ke=oe("has-tostringtag/shams")(),Se=Object.getPrototypeOf,Ae=function(){if(!ke)return!1;try{return Function("return function*() {}")()}catch(Pe){}},me;He.exports=function(fe){if(typeof fe!="function")return!1;if(Ee.test(ve.call(fe)))return!0;if(!ke){var z=de.call(fe);return z==="[object GeneratorFunction]"}if(!Se)return!1;if(typeof me=="undefined"){var te=Ae();me=te?Se(te):!1}return Se(fe)===me}},{"has-tostringtag/shams":353}],369:[function(oe,He,Re){"use strict";var de=oe("which-typed-array");He.exports=function(Ee){return!!de(Ee)}},{"which-typed-array":420}],370:[function(oe,He,Re){var de={}.toString;He.exports=Array.isArray||function(ve){return de.call(ve)=="[object Array]"}},{}],371:[function(oe,He,Re){(function(de){(function(){(function(ve,Ee){typeof Re=="object"&&typeof He!="undefined"?He.exports=Ee(ve):typeof pt=="function"&&pt.amd?pt(Ee):Ee(ve)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof de!="undefined"?de:this,function(ve){"use strict";ve=ve||{};var Ee=ve.Base64,ke="2.6.4",Se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ae=function(ft){for(var St={},qe=0,rt=ft.length;qe<rt;qe++)St[ft.charAt(qe)]=qe;return St}(Se),me=String.fromCharCode,Pe=function(ft){if(ft.length<2){var St=ft.charCodeAt(0);return St<128?ft:St<2048?me(192|St>>>6)+me(128|St&63):me(224|St>>>12&15)+me(128|St>>>6&63)+me(128|St&63)}else{var St=65536+(ft.charCodeAt(0)-55296)*1024+(ft.charCodeAt(1)-56320);return me(240|St>>>18&7)+me(128|St>>>12&63)+me(128|St>>>6&63)+me(128|St&63)}},fe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(ft){return ft.replace(fe,Pe)},te=function(ft){var St=[0,2,1][ft.length%3],qe=ft.charCodeAt(0)<<16|(ft.length>1?ft.charCodeAt(1):0)<<8|(ft.length>2?ft.charCodeAt(2):0),rt=[Se.charAt(qe>>>18),Se.charAt(qe>>>12&63),St>=2?"=":Se.charAt(qe>>>6&63),St>=1?"=":Se.charAt(qe&63)];return rt.join("")},se=ve.btoa&&typeof ve.btoa=="function"?function(ft){return ve.btoa(ft)}:function(ft){if(ft.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ft.replace(/[\s\S]{1,3}/g,te)},ie=function(ft){return se(z(String(ft)))},le=function(ft){return ft.replace(/[+\/]/g,function(St){return St=="+"?"-":"_"}).replace(/=/g,"")},ce=function(ft,St){return St?le(ie(ft)):ie(ft)},pe=function(ft){return ce(ft,!0)},xe;ve.Uint8Array&&(xe=function(ft,St){for(var qe="",rt=0,wt=ft.length;rt<wt;rt+=3){var Ct=ft[rt],bt=ft[rt+1],ct=ft[rt+2],xt=Ct<<16|bt<<8|ct;qe+=Se.charAt(xt>>>18)+Se.charAt(xt>>>12&63)+(typeof bt!="undefined"?Se.charAt(xt>>>6&63):"=")+(typeof ct!="undefined"?Se.charAt(xt&63):"=")}return St?le(qe):qe});var je=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,De=function(ft){switch(ft.length){case 4:var St=(7&ft.charCodeAt(0))<<18|(63&ft.charCodeAt(1))<<12|(63&ft.charCodeAt(2))<<6|63&ft.charCodeAt(3),qe=St-65536;return me((qe>>>10)+55296)+me((qe&1023)+56320);case 3:return me((15&ft.charCodeAt(0))<<12|(63&ft.charCodeAt(1))<<6|63&ft.charCodeAt(2));default:return me((31&ft.charCodeAt(0))<<6|63&ft.charCodeAt(1))}},Fe=function(ft){return ft.replace(je,De)},Te=function(ft){var St=ft.length,qe=St%4,rt=(St>0?Ae[ft.charAt(0)]<<18:0)|(St>1?Ae[ft.charAt(1)]<<12:0)|(St>2?Ae[ft.charAt(2)]<<6:0)|(St>3?Ae[ft.charAt(3)]:0),wt=[me(rt>>>16),me(rt>>>8&255),me(rt&255)];return wt.length-=[0,0,2,1][qe],wt.join("")},Me=ve.atob&&typeof ve.atob=="function"?function(ft){return ve.atob(ft)}:function(ft){return ft.replace(/\S{1,4}/g,Te)},Be=function(ft){return Me(String(ft).replace(/[^A-Za-z0-9\+\/]/g,""))},Ue=function(ft){return Fe(Me(ft))},Ye=function(ft){return String(ft).replace(/[-_]/g,function(St){return St=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ve=function(ft){return Ue(Ye(ft))},Ze;ve.Uint8Array&&(Ze=function(ft){return Uint8Array.from(Be(Ye(ft)),function(St){return St.charCodeAt(0)})});var ot=function(){var ft=ve.Base64;return ve.Base64=Ee,ft};if(ve.Base64={VERSION:ke,atob:Be,btoa:se,fromBase64:Ve,toBase64:ce,utob:z,encode:ce,encodeURI:pe,btou:Fe,decode:Ve,noConflict:ot,fromUint8Array:xe,toUint8Array:Ze},typeof Object.defineProperty=="function"){var lt=function(ft){return{value:ft,enumerable:!1,writable:!0,configurable:!0}};ve.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",lt(function(){return Ve(this)})),Object.defineProperty(String.prototype,"toBase64",lt(function(ft){return ce(this,ft)})),Object.defineProperty(String.prototype,"toBase64URI",lt(function(){return ce(this,!0)}))}}return ve.Meteor&&(Base64=ve.Base64),typeof He!="undefined"&&He.exports?He.exports.Base64=ve.Base64:typeof pt=="function"&&pt.amd&&pt([],function(){return ve.Base64}),{Base64:ve.Base64}})}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(oe,He,Re){"use strict";He.exports=ve;var de=Object.prototype.hasOwnProperty;function ve(Ee,ke,Se){if(!Ee)throw new TypeError("argument dest is required");if(!ke)throw new TypeError("argument src is required");return Se===void 0&&(Se=!0),Object.getOwnPropertyNames(ke).forEach(function(me){if(!(!Se&&de.call(Ee,me))){var Pe=Object.getOwnPropertyDescriptor(ke,me);Object.defineProperty(Ee,me,Pe)}}),Ee}},{}],373:[function(oe,He,Re){"use strict";oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.regexp.constructor.js"),oe("core-js/modules/es.regexp.to-string.js");function de(){this._types=Object.create(null),this._extensions=Object.create(null);for(var ve=0;ve<arguments.length;ve++)this.define(arguments[ve]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}de.prototype.define=function(ve,Ee){for(var ke in ve){var Se=ve[ke].map(function(fe){return fe.toLowerCase()});ke=ke.toLowerCase();for(var Ae=0;Ae<Se.length;Ae++){var me=Se[Ae];if(me[0]!=="*"){if(!Ee&&me in this._types)throw new Error('Attempt to change mapping for "'+me+'" extension from "'+this._types[me]+'" to "'+ke+'". Pass `force=true` to allow this, otherwise remove "'+me+'" from the list of extensions for "'+ke+'".');this._types[me]=ke}}if(Ee||!this._extensions[ke]){var Pe=Se[0];this._extensions[ke]=Pe[0]!=="*"?Pe:Pe.substr(1)}}},de.prototype.getType=function(ve){ve=String(ve);var Ee=ve.replace(/^.*[/\\]/,"").toLowerCase(),ke=Ee.replace(/^.*\./,"").toLowerCase(),Se=Ee.length<ve.length,Ae=ke.length<Ee.length-1;return(Ae||!Se)&&this._types[ke]||null},de.prototype.getExtension=function(ve){return ve=/^\s*([^;\s]*)/.test(ve)&&RegExp.$1,ve&&this._extensions[ve.toLowerCase()]||null},He.exports=de},{"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.constructor.js":299,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305}],374:[function(oe,He,Re){"use strict";var de=oe("./Mime");He.exports=new de(oe("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(oe,He,Re){"use strict";He.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],376:[function(oe,He,Re){var de=1e3,ve=de*60,Ee=ve*60,ke=Ee*24,Se=ke*7,Ae=ke*365.25;He.exports=function(te,se){se=se||{};var ie=typeof te;if(ie==="string"&&te.length>0)return me(te);if(ie==="number"&&isFinite(te))return se.long?fe(te):Pe(te);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(te))};function me(te){if(te=String(te),!(te.length>100)){var se=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(te);if(se){var ie=parseFloat(se[1]),le=(se[2]||"ms").toLowerCase();switch(le){case"years":case"year":case"yrs":case"yr":case"y":return ie*Ae;case"weeks":case"week":case"w":return ie*Se;case"days":case"day":case"d":return ie*ke;case"hours":case"hour":case"hrs":case"hr":case"h":return ie*Ee;case"minutes":case"minute":case"mins":case"min":case"m":return ie*ve;case"seconds":case"second":case"secs":case"sec":case"s":return ie*de;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return ie;default:return}}}}function Pe(te){var se=Math.abs(te);return se>=ke?Math.round(te/ke)+"d":se>=Ee?Math.round(te/Ee)+"h":se>=ve?Math.round(te/ve)+"m":se>=de?Math.round(te/de)+"s":te+"ms"}function fe(te){var se=Math.abs(te);return se>=ke?z(te,se,ke,"day"):se>=Ee?z(te,se,Ee,"hour"):se>=ve?z(te,se,ve,"minute"):se>=de?z(te,se,de,"second"):te+" ms"}function z(te,se,ie,le){var ce=se>=ie*1.5;return Math.round(te/ie)+" "+le+(ce?"s":"")}},{}],377:[function(oe,He,Re){"use strict";var de=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;function ke(Ae){if(Ae==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Ae)}function Se(){try{if(!Object.assign)return!1;var Ae=new String("abc");if(Ae[5]="de",Object.getOwnPropertyNames(Ae)[0]==="5")return!1;for(var me={},Pe=0;Pe<10;Pe++)me["_"+String.fromCharCode(Pe)]=Pe;var fe=Object.getOwnPropertyNames(me).map(function(te){return me[te]});if(fe.join("")!=="0123456789")return!1;var z={};return"abcdefghijklmnopqrst".split("").forEach(function(te){z[te]=te}),Object.keys(Object.assign({},z)).join("")==="abcdefghijklmnopqrst"}catch(te){return!1}}He.exports=Se()?Object.assign:function(Ae,me){for(var Pe,fe=ke(Ae),z,te=1;te<arguments.length;te++){Pe=Object(arguments[te]);for(var se in Pe)ve.call(Pe,se)&&(fe[se]=Pe[se]);if(de){z=de(Pe);for(var ie=0;ie<z.length;ie++)Ee.call(Pe,z[ie])&&(fe[z[ie]]=Pe[z[ie]])}}return fe}},{}],378:[function(oe,He,Re){(function(de){(function(){"use strict";function ve(Ae){if(typeof Ae!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(Ae))}function Ee(Ae,me){for(var Pe="",fe=0,z=-1,te=0,se,ie=0;ie<=Ae.length;++ie){if(ie<Ae.length)se=Ae.charCodeAt(ie);else{if(se===47)break;se=47}if(se===47){if(!(z===ie-1||te===1))if(z!==ie-1&&te===2){if(Pe.length<2||fe!==2||Pe.charCodeAt(Pe.length-1)!==46||Pe.charCodeAt(Pe.length-2)!==46){if(Pe.length>2){var le=Pe.lastIndexOf("/");if(le!==Pe.length-1){le===-1?(Pe="",fe=0):(Pe=Pe.slice(0,le),fe=Pe.length-1-Pe.lastIndexOf("/")),z=ie,te=0;continue}}else if(Pe.length===2||Pe.length===1){Pe="",fe=0,z=ie,te=0;continue}}me&&(Pe.length>0?Pe+="/..":Pe="..",fe=2)}else Pe.length>0?Pe+="/"+Ae.slice(z+1,ie):Pe=Ae.slice(z+1,ie),fe=ie-z-1;z=ie,te=0}else se===46&&te!==-1?++te:te=-1}return Pe}function ke(Ae,me){var Pe=me.dir||me.root,fe=me.base||(me.name||"")+(me.ext||"");return Pe?Pe===me.root?Pe+fe:Pe+Ae+fe:fe}var Se={resolve:function(){for(var me="",Pe=!1,fe,z=arguments.length-1;z>=-1&&!Pe;z--){var te;z>=0?te=arguments[z]:(fe===void 0&&(fe=de.cwd()),te=fe),ve(te),te.length!==0&&(me=te+"/"+me,Pe=te.charCodeAt(0)===47)}return me=Ee(me,!Pe),Pe?me.length>0?"/"+me:"/":me.length>0?me:"."},normalize:function(me){if(ve(me),me.length===0)return".";var Pe=me.charCodeAt(0)===47,fe=me.charCodeAt(me.length-1)===47;return me=Ee(me,!Pe),me.length===0&&!Pe&&(me="."),me.length>0&&fe&&(me+="/"),Pe?"/"+me:me},isAbsolute:function(me){return ve(me),me.length>0&&me.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var me,Pe=0;Pe<arguments.length;++Pe){var fe=arguments[Pe];ve(fe),fe.length>0&&(me===void 0?me=fe:me+="/"+fe)}return me===void 0?".":Se.normalize(me)},relative:function(me,Pe){if(ve(me),ve(Pe),me===Pe||(me=Se.resolve(me),Pe=Se.resolve(Pe),me===Pe))return"";for(var fe=1;fe<me.length&&me.charCodeAt(fe)===47;++fe);for(var z=me.length,te=z-fe,se=1;se<Pe.length&&Pe.charCodeAt(se)===47;++se);for(var ie=Pe.length,le=ie-se,ce=te<le?te:le,pe=-1,xe=0;xe<=ce;++xe){if(xe===ce){if(le>ce){if(Pe.charCodeAt(se+xe)===47)return Pe.slice(se+xe+1);if(xe===0)return Pe.slice(se+xe)}else te>ce&&(me.charCodeAt(fe+xe)===47?pe=xe:xe===0&&(pe=0));break}var je=me.charCodeAt(fe+xe),De=Pe.charCodeAt(se+xe);if(je!==De)break;je===47&&(pe=xe)}var Fe="";for(xe=fe+pe+1;xe<=z;++xe)(xe===z||me.charCodeAt(xe)===47)&&(Fe.length===0?Fe+="..":Fe+="/..");return Fe.length>0?Fe+Pe.slice(se+pe):(se+=pe,Pe.charCodeAt(se)===47&&++se,Pe.slice(se))},_makeLong:function(me){return me},dirname:function(me){if(ve(me),me.length===0)return".";for(var Pe=me.charCodeAt(0),fe=Pe===47,z=-1,te=!0,se=me.length-1;se>=1;--se)if(Pe=me.charCodeAt(se),Pe===47){if(!te){z=se;break}}else te=!1;return z===-1?fe?"/":".":fe&&z===1?"//":me.slice(0,z)},basename:function(me,Pe){if(Pe!==void 0&&typeof Pe!="string")throw new TypeError('"ext" argument must be a string');ve(me);var fe=0,z=-1,te=!0,se;if(Pe!==void 0&&Pe.length>0&&Pe.length<=me.length){if(Pe.length===me.length&&Pe===me)return"";var ie=Pe.length-1,le=-1;for(se=me.length-1;se>=0;--se){var ce=me.charCodeAt(se);if(ce===47){if(!te){fe=se+1;break}}else le===-1&&(te=!1,le=se+1),ie>=0&&(ce===Pe.charCodeAt(ie)?--ie===-1&&(z=se):(ie=-1,z=le))}return fe===z?z=le:z===-1&&(z=me.length),me.slice(fe,z)}else{for(se=me.length-1;se>=0;--se)if(me.charCodeAt(se)===47){if(!te){fe=se+1;break}}else z===-1&&(te=!1,z=se+1);return z===-1?"":me.slice(fe,z)}},extname:function(me){ve(me);for(var Pe=-1,fe=0,z=-1,te=!0,se=0,ie=me.length-1;ie>=0;--ie){var le=me.charCodeAt(ie);if(le===47){if(!te){fe=ie+1;break}continue}z===-1&&(te=!1,z=ie+1),le===46?Pe===-1?Pe=ie:se!==1&&(se=1):Pe!==-1&&(se=-1)}return Pe===-1||z===-1||se===0||se===1&&Pe===z-1&&Pe===fe+1?"":me.slice(Pe,z)},format:function(me){if(me===null||typeof me!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof me);return ke("/",me)},parse:function(me){ve(me);var Pe={root:"",dir:"",base:"",ext:"",name:""};if(me.length===0)return Pe;var fe=me.charCodeAt(0),z=fe===47,te;z?(Pe.root="/",te=1):te=0;for(var se=-1,ie=0,le=-1,ce=!0,pe=me.length-1,xe=0;pe>=te;--pe){if(fe=me.charCodeAt(pe),fe===47){if(!ce){ie=pe+1;break}continue}le===-1&&(ce=!1,le=pe+1),fe===46?se===-1?se=pe:xe!==1&&(xe=1):se!==-1&&(xe=-1)}return se===-1||le===-1||xe===0||xe===1&&se===le-1&&se===ie+1?le!==-1&&(ie===0&&z?Pe.base=Pe.name=me.slice(1,le):Pe.base=Pe.name=me.slice(ie,le)):(ie===0&&z?(Pe.name=me.slice(1,se),Pe.base=me.slice(1,le)):(Pe.name=me.slice(ie,se),Pe.base=me.slice(ie,le)),Pe.ext=me.slice(se,le)),ie>0?Pe.dir=me.slice(0,ie-1):z&&(Pe.dir="/"),Pe},sep:"/",delimiter:":",win32:null,posix:null};Se.posix=Se,He.exports=Se}).call(this)}).call(this,oe("_process"))},{_process:467}],379:[function(oe,He,Re){(function(de){(function(){(function(){"use strict";var ve={function:!0,object:!0},Ee=ve[typeof window]&&window||this,ke=Ee,Se=ve[typeof Re]&&Re,Ae=ve[typeof He]&&He&&!He.nodeType&&He,me=Se&&Ae&&typeof de=="object"&&de;me&&(me.global===me||me.window===me||me.self===me)&&(Ee=me);var Pe=Math.pow(2,53)-1,fe=/\bOpera/,z=this,te=Object.prototype,se=te.hasOwnProperty,ie=te.toString;function le(Ve){return Ve=String(Ve),Ve.charAt(0).toUpperCase()+Ve.slice(1)}function ce(Ve,Ze,ot){var lt={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return Ze&&ot&&/^Win/i.test(Ve)&&!/^Windows Phone /i.test(Ve)&&(lt=lt[/[\d.]+$/.exec(Ve)])&&(Ve="Windows "+lt),Ve=String(Ve),Ze&&ot&&(Ve=Ve.replace(RegExp(Ze,"i"),ot)),Ve=xe(Ve.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),Ve}function pe(Ve,Ze){var ot=-1,lt=Ve?Ve.length:0;if(typeof lt=="number"&<>-1&<<=Pe)for(;++ot<lt;)Ze(Ve[ot],ot,Ve);else je(Ve,Ze)}function xe(Ve){return Ve=Be(Ve),/^(?:webOS|i(?:OS|P))/.test(Ve)?Ve:le(Ve)}function je(Ve,Ze){for(var ot in Ve)se.call(Ve,ot)&&Ze(Ve[ot],ot,Ve)}function De(Ve){return Ve==null?le(Ve):ie.call(Ve).slice(8,-1)}function Fe(Ve,Ze){var ot=Ve!=null?typeof Ve[Ze]:"number";return!/^(?:boolean|number|string|undefined)$/.test(ot)&&(ot=="object"?!!Ve[Ze]:!0)}function Te(Ve){return String(Ve).replace(/([ -])(?!$)/g,"$1?")}function Me(Ve,Ze){var ot=null;return pe(Ve,function(lt,ft){ot=Ze(ot,lt,ft,Ve)}),ot}function Be(Ve){return String(Ve).replace(/^ +| +$/g,"")}function Ue(Ve){var Ze=Ee,ot=Ve&&typeof Ve=="object"&&De(Ve)!="String";ot&&(Ze=Ve,Ve=null);var lt=Ze.navigator||{},ft=lt.userAgent||"";Ve||(Ve=ft);var St=ot||z==ke,qe=ot?!!lt.likeChrome:/\bChrome\b/.test(Ve)&&!/internal|\n/i.test(ie.toString()),rt="Object",wt=ot?rt:"ScriptBridgingProxyObject",Ct=ot?rt:"Environment",bt=ot&&Ze.java?"JavaPackage":De(Ze.java),ct=ot?rt:"RuntimeObject",xt=/\bJava/.test(bt)&&Ze.java,dt=xt&&De(Ze.environment)==Ct,Mt=xt?"a":"\u03B1",yt=xt?"b":"\u03B2",Dt=Ze.document||{},mt=Ze.operamini||Ze.opera,vt=fe.test(vt=ot&&mt?mt["[[Class]]"]:De(mt))?vt:mt=null,et,We=Ve,we=[],Ne=null,Xe=Ve==ft,nt=Xe&&mt&&typeof mt.version=="function"&&mt.version(),Ie,_e=Ot([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Ge=Ft(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),tt=Xt([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),ht=Et({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),ut=qt(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function Ot(on){return Me(on,function(cn,Sn){return cn||RegExp("\\b"+(Sn.pattern||Te(Sn))+"\\b","i").exec(Ve)&&(Sn.label||Sn)})}function Et(on){return Me(on,function(cn,Sn,Cn){return cn||(Sn[tt]||Sn[/^[a-z]+(?: +[a-z]+\b)*/i.exec(tt)]||RegExp("\\b"+Te(Cn)+"(?:\\b|\\w*\\d)","i").exec(Ve))&&Cn})}function Ft(on){return Me(on,function(cn,Sn){return cn||RegExp("\\b"+(Sn.pattern||Te(Sn))+"\\b","i").exec(Ve)&&(Sn.label||Sn)})}function qt(on){return Me(on,function(cn,Sn){var Cn=Sn.pattern||Te(Sn);return!cn&&(cn=RegExp("\\b"+Cn+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Ve))&&(cn=ce(cn,Cn,Sn.label||Sn)),cn})}function Xt(on){return Me(on,function(cn,Sn){var Cn=Sn.pattern||Te(Sn);return!cn&&(cn=RegExp("\\b"+Cn+" *\\d+[.\\w_]*","i").exec(Ve)||RegExp("\\b"+Cn+" *\\w+-[\\w]*","i").exec(Ve)||RegExp("\\b"+Cn+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Ve))&&((cn=String(Sn.label&&!RegExp(Cn,"i").test(Sn.label)?Sn.label:cn).split("/"))[1]&&!/[\d.]+/.test(cn[0])&&(cn[0]+=" "+cn[1]),Sn=Sn.label||Sn,cn=xe(cn[0].replace(RegExp(Cn,"i"),Sn).replace(RegExp("; *(?:"+Sn+"[_-])?","i")," ").replace(RegExp("("+Sn+")[-_.]?(\\w)","i"),"$1 $2"))),cn})}function Kt(on){return Me(on,function(cn,Sn){return cn||(RegExp(Sn+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Ve)||0)[1]||null})}function Vt(){return this.description||""}if(_e&&(_e=[_e]),/\bAndroid\b/.test(ut)&&!tt&&(et=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(Ve))&&(tt=Be(et[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),ht&&!tt?tt=Xt([ht]):ht&&tt&&(tt=tt.replace(RegExp("^("+Te(ht)+")[-_.\\s]","i"),ht+" ").replace(RegExp("^("+Te(ht)+")[-_.]?(\\w)","i"),ht+" $2")),(et=/\bGoogle TV\b/.exec(tt))&&(tt=et[0]),/\bSimulator\b/i.test(Ve)&&(tt=(tt?tt+" ":"")+"Simulator"),Ge=="Opera Mini"&&/\bOPiOS\b/.test(Ve)&&we.push("running in Turbo/Uncompressed mode"),Ge=="IE"&&/\blike iPhone OS\b/.test(Ve)?(et=Ue(Ve.replace(/like iPhone OS/,"")),ht=et.manufacturer,tt=et.product):/^iP/.test(tt)?(Ge||(Ge="Safari"),ut="iOS"+((et=/ OS ([\d_]+)/i.exec(Ve))?" "+et[1].replace(/_/g,"."):"")):Ge=="Konqueror"&&/^Linux\b/i.test(ut)?ut="Kubuntu":ht&&ht!="Google"&&(/Chrome/.test(Ge)&&!/\bMobile Safari\b/i.test(Ve)||/\bVita\b/.test(tt))||/\bAndroid\b/.test(ut)&&/^Chrome/.test(Ge)&&/\bVersion\//i.test(Ve)?(Ge="Android Browser",ut=/\bAndroid\b/.test(ut)?ut:"Android"):Ge=="Silk"?(/\bMobi/i.test(Ve)||(ut="Android",we.unshift("desktop mode")),/Accelerated *= *true/i.test(Ve)&&we.unshift("accelerated")):Ge=="UC Browser"&&/\bUCWEB\b/.test(Ve)?we.push("speed mode"):Ge=="PaleMoon"&&(et=/\bFirefox\/([\d.]+)\b/.exec(Ve))?we.push("identifying as Firefox "+et[1]):Ge=="Firefox"&&(et=/\b(Mobile|Tablet|TV)\b/i.exec(Ve))?(ut||(ut="Firefox OS"),tt||(tt=et[1])):!Ge||(et=!/\bMinefield\b/i.test(Ve)&&/\b(?:Firefox|Safari)\b/.exec(Ge))?(Ge&&!tt&&/[\/,]|^[^(]+?\)/.test(Ve.slice(Ve.indexOf(et+"/")+8))&&(Ge=null),(et=tt||ht||ut)&&(tt||ht||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(ut))&&(Ge=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(ut)?ut:et)+" Browser")):Ge=="Electron"&&(et=(/\bChrome\/([\d.]+)\b/.exec(Ve)||0)[1])&&we.push("Chromium "+et),nt||(nt=Kt(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",Te(Ge),"(?:Firefox|Minefield|NetFront)"])),(et=_e=="iCab"&&parseFloat(nt)>3&&"WebKit"||/\bOpera\b/.test(Ge)&&(/\bOPR\b/.test(Ve)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Ve)&&!/^(?:Trident|EdgeHTML)$/.test(_e)&&"WebKit"||!_e&&/\bMSIE\b/i.test(Ve)&&(ut=="Mac OS"?"Tasman":"Trident")||_e=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ge)&&"NetFront")&&(_e=[et]),Ge=="IE"&&(et=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Ve)||0)[1])?(Ge+=" Mobile",ut="Windows Phone "+(/\+$/.test(et)?et:et+".x"),we.unshift("desktop mode")):/\bWPDesktop\b/i.test(Ve)?(Ge="IE Mobile",ut="Windows Phone 8.x",we.unshift("desktop mode"),nt||(nt=(/\brv:([\d.]+)/.exec(Ve)||0)[1])):Ge!="IE"&&_e=="Trident"&&(et=/\brv:([\d.]+)/.exec(Ve))&&(Ge&&we.push("identifying as "+Ge+(nt?" "+nt:"")),Ge="IE",nt=et[1]),Xe){if(Fe(Ze,"global"))if(xt&&(et=xt.lang.System,We=et.getProperty("os.arch"),ut=ut||et.getProperty("os.name")+" "+et.getProperty("os.version")),dt){try{nt=Ze.require("ringo/engine").version.join("."),Ge="RingoJS"}catch(on){(et=Ze.system)&&et.global.system==Ze.system&&(Ge="Narwhal",ut||(ut=et[0].os||null))}Ge||(Ge="Rhino")}else typeof Ze.process=="object"&&!Ze.process.browser&&(et=Ze.process)&&(typeof et.versions=="object"&&(typeof et.versions.electron=="string"?(we.push("Node "+et.versions.node),Ge="Electron",nt=et.versions.electron):typeof et.versions.nw=="string"&&(we.push("Chromium "+nt,"Node "+et.versions.node),Ge="NW.js",nt=et.versions.nw)),Ge||(Ge="Node.js",We=et.arch,ut=et.platform,nt=/[\d.]+/.exec(et.version),nt=nt?nt[0]:null));else De(et=Ze.runtime)==wt?(Ge="Adobe AIR",ut=et.flash.system.Capabilities.os):De(et=Ze.phantom)==ct?(Ge="PhantomJS",nt=(et=et.version||null)&&et.major+"."+et.minor+"."+et.patch):typeof Dt.documentMode=="number"&&(et=/\bTrident\/(\d+)/i.exec(Ve))?(nt=[nt,Dt.documentMode],(et=+et[1]+4)!=nt[1]&&(we.push("IE "+nt[1]+" mode"),_e&&(_e[1]=""),nt[1]=et),nt=Ge=="IE"?String(nt[1].toFixed(1)):nt[0]):typeof Dt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ge)&&(we.push("masking as "+Ge+" "+nt),Ge="IE",nt="11.0",_e=["Trident"],ut="Windows");ut=ut&&xe(ut)}if(nt&&(et=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(nt)||/(?:alpha|beta)(?: ?\d)?/i.exec(Ve+";"+(Xe&<.appMinorVersion))||/\bMinefield\b/i.test(Ve)&&"a")&&(Ne=/b/i.test(et)?"beta":"alpha",nt=nt.replace(RegExp(et+"\\+?$"),"")+(Ne=="beta"?yt:Mt)+(/\d+\+?/.exec(et)||"")),Ge=="Fennec"||Ge=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(ut))Ge="Firefox Mobile";else if(Ge=="Maxthon"&&nt)nt=nt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(tt))tt=="Xbox 360"&&(ut=null),tt=="Xbox 360"&&/\bIEMobile\b/.test(Ve)&&we.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Ge)||Ge&&!tt&&!/Browser|Mobi/.test(Ge))&&(ut=="Windows CE"||/Mobi/i.test(Ve)))Ge+=" Mobile";else if(Ge=="IE"&&Xe)try{Ze.external===null&&we.unshift("platform preview")}catch(on){we.unshift("embedded")}else(/\bBlackBerry\b/.test(tt)||/\bBB10\b/.test(Ve))&&(et=(RegExp(tt.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Ve)||0)[1]||nt)?(et=[et,/BB10/.test(Ve)],ut=(et[1]?(tt=null,ht="BlackBerry"):"Device Software")+" "+et[0],nt=null):this!=je&&tt!="Wii"&&(Xe&&mt||/Opera/.test(Ge)&&/\b(?:MSIE|Firefox)\b/i.test(Ve)||Ge=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(ut)||Ge=="IE"&&(ut&&!/^Win/.test(ut)&&nt>5.5||/\bWindows XP\b/.test(ut)&&nt>8||nt==8&&!/\bTrident\b/.test(Ve)))&&!fe.test(et=Ue.call(je,Ve.replace(fe,"")+";"))&&et.name&&(et="ing as "+et.name+((et=et.version)?" "+et:""),fe.test(Ge)?(/\bIE\b/.test(et)&&ut=="Mac OS"&&(ut=null),et="identify"+et):(et="mask"+et,vt?Ge=xe(vt.replace(/([a-z])([A-Z])/g,"$1 $2")):Ge="Opera",/\bIE\b/.test(et)&&(ut=null),Xe||(nt=null)),_e=["Presto"],we.push(et));(et=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Ve)||0)[1])&&(et=[parseFloat(et.replace(/\.(\d)$/,".0$1")),et],Ge=="Safari"&&et[1].slice(-1)=="+"?(Ge="WebKit Nightly",Ne="alpha",nt=et[1].slice(0,-1)):(nt==et[1]||nt==(et[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Ve)||0)[1]))&&(nt=null),et[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(Ve)||0)[1],et[0]==537.36&&et[2]==537.36&&parseFloat(et[1])>=28&&_e=="WebKit"&&(_e=["Blink"]),!Xe||!qe&&!et[1]?(_e&&(_e[1]="like Safari"),et=(et=et[0],et<400?1:et<500?2:et<526?3:et<533?4:et<534?"4+":et<535?5:et<537?6:et<538?7:et<601?8:et<602?9:et<604?10:et<606?11:et<608?12:"12")):(_e&&(_e[1]="like Chrome"),et=et[1]||(et=et[0],et<530?1:et<532?2:et<532.05?3:et<533?4:et<534.03?5:et<534.07?6:et<534.1?7:et<534.13?8:et<534.16?9:et<534.24?10:et<534.3?11:et<535.01?12:et<535.02?"13+":et<535.07?15:et<535.11?16:et<535.19?17:et<536.05?18:et<536.1?19:et<537.01?20:et<537.11?"21+":et<537.13?23:et<537.18?24:et<537.24?25:et<537.36?26:_e!="Blink"?"27":"28")),_e&&(_e[1]+=" "+(et+=typeof et=="number"?".x":/[.+]/.test(et)?"":"+")),Ge=="Safari"&&(!nt||parseInt(nt)>45)?nt=et:Ge=="Chrome"&&/\bHeadlessChrome/i.test(Ve)&&we.unshift("headless")),Ge=="Opera"&&(et=/\bzbov|zvav$/.exec(ut))?(Ge+=" ",we.unshift("desktop mode"),et=="zvav"?(Ge+="Mini",nt=null):Ge+="Mobile",ut=ut.replace(RegExp(" *"+et+"$"),"")):Ge=="Safari"&&/\bChrome\b/.exec(_e&&_e[1])?(we.unshift("desktop mode"),Ge="Chrome Mobile",nt=null,/\bOS X\b/.test(ut)?(ht="Apple",ut="iOS 4.3+"):ut=null):/\bSRWare Iron\b/.test(Ge)&&!nt&&(nt=Kt("Chrome")),nt&&nt.indexOf(et=/[\d.]+$/.exec(ut))==0&&Ve.indexOf("/"+et+"-")>-1&&(ut=Be(ut.replace(et,""))),ut&&ut.indexOf(Ge)!=-1&&!RegExp(Ge+" OS").test(ut)&&(ut=ut.replace(RegExp(" *"+Te(Ge)+" *"),"")),_e&&!/\b(?:Avant|Nook)\b/.test(Ge)&&(/Browser|Lunascape|Maxthon/.test(Ge)||Ge!="Safari"&&/^iOS/.test(ut)&&/\bSafari\b/.test(_e[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(Ge)&&_e[1])&&(et=_e[_e.length-1])&&we.push(et),we.length&&(we=["("+we.join("; ")+")"]),ht&&tt&&tt.indexOf(ht)<0&&we.push("on "+ht),tt&&we.push((/^on /.test(we[we.length-1])?"":"on ")+tt),ut&&(et=/ ([\d.+]+)$/.exec(ut),Ie=et&&ut.charAt(ut.length-et[0].length-1)=="/",ut={architecture:32,family:et&&!Ie?ut.replace(et[0],""):ut,version:et?et[1]:null,toString:function(){var on=this.version;return this.family+(on&&!Ie?" "+on:"")+(this.architecture==64?" 64-bit":"")}}),(et=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(We))&&!/\bi686\b/i.test(We)?(ut&&(ut.architecture=64,ut.family=ut.family.replace(RegExp(" *"+et),"")),Ge&&(/\bWOW64\b/i.test(Ve)||Xe&&/\w(?:86|32)$/.test(lt.cpuClass||lt.platform)&&!/\bWin64; x64\b/i.test(Ve))&&we.unshift("32-bit")):ut&&/^OS X/.test(ut.family)&&Ge=="Chrome"&&parseFloat(nt)>=39&&(ut.architecture=64),Ve||(Ve=null);var hn={};return hn.description=Ve,hn.layout=_e&&_e[0],hn.manufacturer=ht,hn.name=Ge,hn.prerelease=Ne,hn.product=tt,hn.ua=Ve,hn.version=Ge&&nt,hn.os=ut||{architecture:null,family:null,version:null,toString:function(){return"null"}},hn.parse=Ue,hn.toString=Vt,hn.version&&we.unshift(nt),hn.name&&we.unshift(Ge),ut&&Ge&&!(ut==String(ut).split(" ")[0]&&(ut==Ge.split(" ")[0]||tt))&&we.push(tt?"("+ut+")":"on "+ut),we.length&&(hn.description=we.join(" ")),hn}var Ye=Ue();typeof pt=="function"&&typeof pt.amd=="object"&&pt.amd?(Ee.platform=Ye,pt(function(){return Ye})):Se&&Ae?je(Ye,function(Ve,Ze){Se[Ze]=Ve}):Ee.platform=Ye}).call(this)}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(oe,He,Re){(function(de){(function(){"use strict";typeof de=="undefined"||!de.version||de.version.indexOf("v0.")===0||de.version.indexOf("v1.")===0&&de.version.indexOf("v1.8.")!==0?He.exports={nextTick:ve}:He.exports=de;function ve(Ee,ke,Se,Ae){if(typeof Ee!="function")throw new TypeError('"callback" argument must be a function');var me=arguments.length,Pe,fe;switch(me){case 0:case 1:return de.nextTick(Ee);case 2:return de.nextTick(function(){Ee.call(null,ke)});case 3:return de.nextTick(function(){Ee.call(null,ke,Se)});case 4:return de.nextTick(function(){Ee.call(null,ke,Se,Ae)});default:for(Pe=new Array(me-1),fe=0;fe<Pe.length;)Pe[fe++]=arguments[fe];return de.nextTick(function(){Ee.apply(null,Pe)})}}}).call(this)}).call(this,oe("_process"))},{_process:467}],381:[function(oe,He,Re){var de=He.exports={},ve,Ee;function ke(){throw new Error("setTimeout has not been defined")}function Se(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ve=setTimeout:ve=ke}catch(pe){ve=ke}try{typeof clearTimeout=="function"?Ee=clearTimeout:Ee=Se}catch(pe){Ee=Se}})();function Ae(pe){if(ve===setTimeout)return setTimeout(pe,0);if((ve===ke||!ve)&&setTimeout)return ve=setTimeout,setTimeout(pe,0);try{return ve(pe,0)}catch(xe){try{return ve.call(null,pe,0)}catch(je){return ve.call(this,pe,0)}}}function me(pe){if(Ee===clearTimeout)return clearTimeout(pe);if((Ee===Se||!Ee)&&clearTimeout)return Ee=clearTimeout,clearTimeout(pe);try{return Ee(pe)}catch(xe){try{return Ee.call(null,pe)}catch(je){return Ee.call(this,pe)}}}var Pe=[],fe=!1,z,te=-1;function se(){!fe||!z||(fe=!1,z.length?Pe=z.concat(Pe):te=-1,Pe.length&&ie())}function ie(){if(!fe){var pe=Ae(se);fe=!0;for(var xe=Pe.length;xe;){for(z=Pe,Pe=[];++te<xe;)z&&z[te].run();te=-1,xe=Pe.length}z=null,fe=!1,me(pe)}}de.nextTick=function(pe){var xe=new Array(arguments.length-1);if(arguments.length>1)for(var je=1;je<arguments.length;je++)xe[je-1]=arguments[je];Pe.push(new le(pe,xe)),Pe.length===1&&!fe&&Ae(ie)};function le(pe,xe){this.fun=pe,this.array=xe}le.prototype.run=function(){this.fun.apply(null,this.array)},de.title="browser",de.browser=!0,de.env={},de.argv=[],de.version="",de.versions={};function ce(){}de.on=ce,de.addListener=ce,de.once=ce,de.off=ce,de.removeListener=ce,de.removeAllListeners=ce,de.emit=ce,de.prependListener=ce,de.prependOnceListener=ce,de.listeners=function(pe){return[]},de.binding=function(pe){throw new Error("process.binding is not supported")},de.cwd=function(){return"/"},de.chdir=function(pe){throw new Error("process.chdir is not supported")},de.umask=function(){return 0}},{}],382:[function(oe,He,Re){(function(de){(function(){(function(ve){var Ee=typeof Re=="object"&&Re&&!Re.nodeType&&Re,ke=typeof He=="object"&&He&&!He.nodeType&&He,Se=typeof de=="object"&&de;(Se.global===Se||Se.window===Se||Se.self===Se)&&(ve=Se);var Ae,me=2147483647,Pe=36,fe=1,z=26,te=38,se=700,ie=72,le=128,ce="-",pe=/^xn--/,xe=/[^\x20-\x7E]/,je=/[\x2E\u3002\uFF0E\uFF61]/g,De={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Fe=Pe-fe,Te=Math.floor,Me=String.fromCharCode,Be;function Ue(bt){throw new RangeError(De[bt])}function Ye(bt,ct){for(var xt=bt.length,dt=[];xt--;)dt[xt]=ct(bt[xt]);return dt}function Ve(bt,ct){var xt=bt.split("@"),dt="";xt.length>1&&(dt=xt[0]+"@",bt=xt[1]),bt=bt.replace(je,".");var Mt=bt.split("."),yt=Ye(Mt,ct).join(".");return dt+yt}function Ze(bt){for(var ct=[],xt=0,dt=bt.length,Mt,yt;xt<dt;)Mt=bt.charCodeAt(xt++),Mt>=55296&&Mt<=56319&&xt<dt?(yt=bt.charCodeAt(xt++),(yt&64512)==56320?ct.push(((Mt&1023)<<10)+(yt&1023)+65536):(ct.push(Mt),xt--)):ct.push(Mt);return ct}function ot(bt){return Ye(bt,function(ct){var xt="";return ct>65535&&(ct-=65536,xt+=Me(ct>>>10&1023|55296),ct=56320|ct&1023),xt+=Me(ct),xt}).join("")}function lt(bt){return bt-48<10?bt-22:bt-65<26?bt-65:bt-97<26?bt-97:Pe}function ft(bt,ct){return bt+22+75*(bt<26)-((ct!=0)<<5)}function St(bt,ct,xt){var dt=0;for(bt=xt?Te(bt/se):bt>>1,bt+=Te(bt/ct);bt>Fe*z>>1;dt+=Pe)bt=Te(bt/Fe);return Te(dt+(Fe+1)*bt/(bt+te))}function qe(bt){var ct=[],xt=bt.length,dt,Mt=0,yt=le,Dt=ie,mt,vt,et,We,we,Ne,Xe,nt,Ie;for(mt=bt.lastIndexOf(ce),mt<0&&(mt=0),vt=0;vt<mt;++vt)bt.charCodeAt(vt)>=128&&Ue("not-basic"),ct.push(bt.charCodeAt(vt));for(et=mt>0?mt+1:0;et<xt;){for(We=Mt,we=1,Ne=Pe;et>=xt&&Ue("invalid-input"),Xe=lt(bt.charCodeAt(et++)),(Xe>=Pe||Xe>Te((me-Mt)/we))&&Ue("overflow"),Mt+=Xe*we,nt=Ne<=Dt?fe:Ne>=Dt+z?z:Ne-Dt,!(Xe<nt);Ne+=Pe)Ie=Pe-nt,we>Te(me/Ie)&&Ue("overflow"),we*=Ie;dt=ct.length+1,Dt=St(Mt-We,dt,We==0),Te(Mt/dt)>me-yt&&Ue("overflow"),yt+=Te(Mt/dt),Mt%=dt,ct.splice(Mt++,0,yt)}return ot(ct)}function rt(bt){var ct,xt,dt,Mt,yt,Dt,mt,vt,et,We,we,Ne=[],Xe,nt,Ie,_e;for(bt=Ze(bt),Xe=bt.length,ct=le,xt=0,yt=ie,Dt=0;Dt<Xe;++Dt)we=bt[Dt],we<128&&Ne.push(Me(we));for(dt=Mt=Ne.length,Mt&&Ne.push(ce);dt<Xe;){for(mt=me,Dt=0;Dt<Xe;++Dt)we=bt[Dt],we>=ct&&we<mt&&(mt=we);for(nt=dt+1,mt-ct>Te((me-xt)/nt)&&Ue("overflow"),xt+=(mt-ct)*nt,ct=mt,Dt=0;Dt<Xe;++Dt)if(we=bt[Dt],we<ct&&++xt>me&&Ue("overflow"),we==ct){for(vt=xt,et=Pe;We=et<=yt?fe:et>=yt+z?z:et-yt,!(vt<We);et+=Pe)_e=vt-We,Ie=Pe-We,Ne.push(Me(ft(We+_e%Ie,0))),vt=Te(_e/Ie);Ne.push(Me(ft(vt,0))),yt=St(xt,nt,dt==Mt),xt=0,++dt}++xt,++ct}return Ne.join("")}function wt(bt){return Ve(bt,function(ct){return pe.test(ct)?qe(ct.slice(4).toLowerCase()):ct})}function Ct(bt){return Ve(bt,function(ct){return xe.test(ct)?"xn--"+rt(ct):ct})}if(Ae={version:"1.4.1",ucs2:{decode:Ze,encode:ot},decode:qe,encode:rt,toASCII:Ct,toUnicode:wt},typeof pt=="function"&&typeof pt.amd=="object"&&pt.amd)pt("punycode",function(){return Ae});else if(Ee&&ke)if(He.exports==Ee)ke.exports=Ae;else for(Be in Ae)Ae.hasOwnProperty(Be)&&(Ee[Be]=Ae[Be]);else ve.punycode=Ae})(this)}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(oe,He,Re){"use strict";function de(Ee,ke){return Object.prototype.hasOwnProperty.call(Ee,ke)}He.exports=function(Ee,ke,Se,Ae){ke=ke||"&",Se=Se||"=";var me={};if(typeof Ee!="string"||Ee.length===0)return me;var Pe=/\+/g;Ee=Ee.split(ke);var fe=1e3;Ae&&typeof Ae.maxKeys=="number"&&(fe=Ae.maxKeys);var z=Ee.length;fe>0&&z>fe&&(z=fe);for(var te=0;te<z;++te){var se=Ee[te].replace(Pe,"%20"),ie=se.indexOf(Se),le,ce,pe,xe;ie>=0?(le=se.substr(0,ie),ce=se.substr(ie+1)):(le=se,ce=""),pe=decodeURIComponent(le),xe=decodeURIComponent(ce),de(me,pe)?ve(me[pe])?me[pe].push(xe):me[pe]=[me[pe],xe]:me[pe]=xe}return me};var ve=Array.isArray||function(Ee){return Object.prototype.toString.call(Ee)==="[object Array]"}},{}],384:[function(oe,He,Re){"use strict";var de=function(Se){switch(typeof Se){case"string":return Se;case"boolean":return Se?"true":"false";case"number":return isFinite(Se)?Se:"";default:return""}};He.exports=function(Se,Ae,me,Pe){return Ae=Ae||"&",me=me||"=",Se===null&&(Se=void 0),typeof Se=="object"?Ee(ke(Se),function(fe){var z=encodeURIComponent(de(fe))+me;return ve(Se[fe])?Ee(Se[fe],function(te){return z+encodeURIComponent(de(te))}).join(Ae):z+encodeURIComponent(de(Se[fe]))}).join(Ae):Pe?encodeURIComponent(de(Pe))+me+encodeURIComponent(de(Se)):""};var ve=Array.isArray||function(Se){return Object.prototype.toString.call(Se)==="[object Array]"};function Ee(Se,Ae){if(Se.map)return Se.map(Ae);for(var me=[],Pe=0;Pe<Se.length;Pe++)me.push(Ae(Se[Pe],Pe));return me}var ke=Object.keys||function(Se){var Ae=[];for(var me in Se)Object.prototype.hasOwnProperty.call(Se,me)&&Ae.push(me);return Ae}},{}],385:[function(oe,He,Re){"use strict";Re.decode=Re.parse=oe("./decode"),Re.encode=Re.stringify=oe("./encode")},{"./decode":383,"./encode":384}],386:[function(oe,He,Re){"use strict";var de=oe("process-nextick-args"),ve=Object.keys||function(se){var ie=[];for(var le in se)ie.push(le);return ie};He.exports=fe;var Ee=Object.create(oe("core-util-is"));Ee.inherits=oe("inherits");var ke=oe("./_stream_readable"),Se=oe("./_stream_writable");Ee.inherits(fe,ke);for(var Ae=ve(Se.prototype),me=0;me<Ae.length;me++){var Pe=Ae[me];fe.prototype[Pe]||(fe.prototype[Pe]=Se.prototype[Pe])}function fe(se){if(!(this instanceof fe))return new fe(se);ke.call(this,se),Se.call(this,se),se&&se.readable===!1&&(this.readable=!1),se&&se.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,se&&se.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",z)}Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(){this.allowHalfOpen||this._writableState.ended||de.nextTick(te,this)}function te(se){se.end()}Object.defineProperty(fe.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(se){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=se,this._writableState.destroyed=se)}}),fe.prototype._destroy=function(se,ie){this.push(null),this.end(),de.nextTick(ie,se)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(oe,He,Re){"use strict";He.exports=Ee;var de=oe("./_stream_transform"),ve=Object.create(oe("core-util-is"));ve.inherits=oe("inherits"),ve.inherits(Ee,de);function Ee(ke){if(!(this instanceof Ee))return new Ee(ke);de.call(this,ke)}Ee.prototype._transform=function(ke,Se,Ae){Ae(null,ke)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(oe,He,Re){(function(de,ve){(function(){"use strict";var Ee=oe("process-nextick-args");He.exports=Me;var ke=oe("isarray"),Se;Me.ReadableState=Te;var Ae=oe("events").EventEmitter,me=function(we,Ne){return we.listeners(Ne).length},Pe=oe("./internal/streams/stream"),fe=oe("safe-buffer").Buffer,z=ve.Uint8Array||function(){};function te(we){return fe.from(we)}function se(we){return fe.isBuffer(we)||we instanceof z}var ie=Object.create(oe("core-util-is"));ie.inherits=oe("inherits");var le=oe("util"),ce=void 0;le&&le.debuglog?ce=le.debuglog("stream"):ce=function(){};var pe=oe("./internal/streams/BufferList"),xe=oe("./internal/streams/destroy"),je;ie.inherits(Me,Pe);var De=["error","close","destroy","pause","resume"];function Fe(we,Ne,Xe){if(typeof we.prependListener=="function")return we.prependListener(Ne,Xe);!we._events||!we._events[Ne]?we.on(Ne,Xe):ke(we._events[Ne])?we._events[Ne].unshift(Xe):we._events[Ne]=[Xe,we._events[Ne]]}function Te(we,Ne){Se=Se||oe("./_stream_duplex"),we=we||{};var Xe=Ne instanceof Se;this.objectMode=!!we.objectMode,Xe&&(this.objectMode=this.objectMode||!!we.readableObjectMode);var nt=we.highWaterMark,Ie=we.readableHighWaterMark,_e=this.objectMode?16:16*1024;nt||nt===0?this.highWaterMark=nt:Xe&&(Ie||Ie===0)?this.highWaterMark=Ie:this.highWaterMark=_e,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new pe,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=we.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,we.encoding&&(je||(je=oe("string_decoder/").StringDecoder),this.decoder=new je(we.encoding),this.encoding=we.encoding)}function Me(we){if(Se=Se||oe("./_stream_duplex"),!(this instanceof Me))return new Me(we);this._readableState=new Te(we,this),this.readable=!0,we&&(typeof we.read=="function"&&(this._read=we.read),typeof we.destroy=="function"&&(this._destroy=we.destroy)),Pe.call(this)}Object.defineProperty(Me.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(we){this._readableState&&(this._readableState.destroyed=we)}}),Me.prototype.destroy=xe.destroy,Me.prototype._undestroy=xe.undestroy,Me.prototype._destroy=function(we,Ne){this.push(null),Ne(we)},Me.prototype.push=function(we,Ne){var Xe=this._readableState,nt;return Xe.objectMode?nt=!0:typeof we=="string"&&(Ne=Ne||Xe.defaultEncoding,Ne!==Xe.encoding&&(we=fe.from(we,Ne),Ne=""),nt=!0),Be(this,we,Ne,!1,nt)},Me.prototype.unshift=function(we){return Be(this,we,null,!0,!1)};function Be(we,Ne,Xe,nt,Ie){var _e=we._readableState;if(Ne===null)_e.reading=!1,ft(we,_e);else{var Ge;Ie||(Ge=Ye(_e,Ne)),Ge?we.emit("error",Ge):_e.objectMode||Ne&&Ne.length>0?(typeof Ne!="string"&&!_e.objectMode&&Object.getPrototypeOf(Ne)!==fe.prototype&&(Ne=te(Ne)),nt?_e.endEmitted?we.emit("error",new Error("stream.unshift() after end event")):Ue(we,_e,Ne,!0):_e.ended?we.emit("error",new Error("stream.push() after EOF")):(_e.reading=!1,_e.decoder&&!Xe?(Ne=_e.decoder.write(Ne),_e.objectMode||Ne.length!==0?Ue(we,_e,Ne,!1):rt(we,_e)):Ue(we,_e,Ne,!1))):nt||(_e.reading=!1)}return Ve(_e)}function Ue(we,Ne,Xe,nt){Ne.flowing&&Ne.length===0&&!Ne.sync?(we.emit("data",Xe),we.read(0)):(Ne.length+=Ne.objectMode?1:Xe.length,nt?Ne.buffer.unshift(Xe):Ne.buffer.push(Xe),Ne.needReadable&&St(we)),rt(we,Ne)}function Ye(we,Ne){var Xe;return!se(Ne)&&typeof Ne!="string"&&Ne!==void 0&&!we.objectMode&&(Xe=new TypeError("Invalid non-string/buffer chunk")),Xe}function Ve(we){return!we.ended&&(we.needReadable||we.length<we.highWaterMark||we.length===0)}Me.prototype.isPaused=function(){return this._readableState.flowing===!1},Me.prototype.setEncoding=function(we){return je||(je=oe("string_decoder/").StringDecoder),this._readableState.decoder=new je(we),this._readableState.encoding=we,this};var Ze=8388608;function ot(we){return we>=Ze?we=Ze:(we--,we|=we>>>1,we|=we>>>2,we|=we>>>4,we|=we>>>8,we|=we>>>16,we++),we}function lt(we,Ne){return we<=0||Ne.length===0&&Ne.ended?0:Ne.objectMode?1:we!==we?Ne.flowing&&Ne.length?Ne.buffer.head.data.length:Ne.length:(we>Ne.highWaterMark&&(Ne.highWaterMark=ot(we)),we<=Ne.length?we:Ne.ended?Ne.length:(Ne.needReadable=!0,0))}Me.prototype.read=function(we){ce("read",we),we=parseInt(we,10);var Ne=this._readableState,Xe=we;if(we!==0&&(Ne.emittedReadable=!1),we===0&&Ne.needReadable&&(Ne.length>=Ne.highWaterMark||Ne.ended))return ce("read: emitReadable",Ne.length,Ne.ended),Ne.length===0&&Ne.ended?vt(this):St(this),null;if(we=lt(we,Ne),we===0&&Ne.ended)return Ne.length===0&&vt(this),null;var nt=Ne.needReadable;ce("need readable",nt),(Ne.length===0||Ne.length-we<Ne.highWaterMark)&&(nt=!0,ce("length less than watermark",nt)),Ne.ended||Ne.reading?(nt=!1,ce("reading or ended",nt)):nt&&(ce("do read"),Ne.reading=!0,Ne.sync=!0,Ne.length===0&&(Ne.needReadable=!0),this._read(Ne.highWaterMark),Ne.sync=!1,Ne.reading||(we=lt(Xe,Ne)));var Ie;return we>0?Ie=Mt(we,Ne):Ie=null,Ie===null?(Ne.needReadable=!0,we=0):Ne.length-=we,Ne.length===0&&(Ne.ended||(Ne.needReadable=!0),Xe!==we&&Ne.ended&&vt(this)),Ie!==null&&this.emit("data",Ie),Ie};function ft(we,Ne){if(!Ne.ended){if(Ne.decoder){var Xe=Ne.decoder.end();Xe&&Xe.length&&(Ne.buffer.push(Xe),Ne.length+=Ne.objectMode?1:Xe.length)}Ne.ended=!0,St(we)}}function St(we){var Ne=we._readableState;Ne.needReadable=!1,Ne.emittedReadable||(ce("emitReadable",Ne.flowing),Ne.emittedReadable=!0,Ne.sync?Ee.nextTick(qe,we):qe(we))}function qe(we){ce("emit readable"),we.emit("readable"),dt(we)}function rt(we,Ne){Ne.readingMore||(Ne.readingMore=!0,Ee.nextTick(wt,we,Ne))}function wt(we,Ne){for(var Xe=Ne.length;!Ne.reading&&!Ne.flowing&&!Ne.ended&&Ne.length<Ne.highWaterMark&&(ce("maybeReadMore read 0"),we.read(0),Xe!==Ne.length);)Xe=Ne.length;Ne.readingMore=!1}Me.prototype._read=function(we){this.emit("error",new Error("_read() is not implemented"))},Me.prototype.pipe=function(we,Ne){var Xe=this,nt=this._readableState;switch(nt.pipesCount){case 0:nt.pipes=we;break;case 1:nt.pipes=[nt.pipes,we];break;default:nt.pipes.push(we);break}nt.pipesCount+=1,ce("pipe count=%d opts=%j",nt.pipesCount,Ne);var Ie=(!Ne||Ne.end!==!1)&&we!==de.stdout&&we!==de.stderr,_e=Ie?tt:Vt;nt.endEmitted?Ee.nextTick(_e):Xe.once("end",_e),we.on("unpipe",Ge);function Ge(hn,on){ce("onunpipe"),hn===Xe&&on&&on.hasUnpiped===!1&&(on.hasUnpiped=!0,Ot())}function tt(){ce("onend"),we.end()}var ht=Ct(Xe);we.on("drain",ht);var ut=!1;function Ot(){ce("cleanup"),we.removeListener("close",Xt),we.removeListener("finish",Kt),we.removeListener("drain",ht),we.removeListener("error",qt),we.removeListener("unpipe",Ge),Xe.removeListener("end",tt),Xe.removeListener("end",Vt),Xe.removeListener("data",Ft),ut=!0,nt.awaitDrain&&(!we._writableState||we._writableState.needDrain)&&ht()}var Et=!1;Xe.on("data",Ft);function Ft(hn){ce("ondata"),Et=!1;var on=we.write(hn);on===!1&&!Et&&((nt.pipesCount===1&&nt.pipes===we||nt.pipesCount>1&&We(nt.pipes,we)!==-1)&&!ut&&(ce("false write response, pause",Xe._readableState.awaitDrain),Xe._readableState.awaitDrain++,Et=!0),Xe.pause())}function qt(hn){ce("onerror",hn),Vt(),we.removeListener("error",qt),me(we,"error")===0&&we.emit("error",hn)}Fe(we,"error",qt);function Xt(){we.removeListener("finish",Kt),Vt()}we.once("close",Xt);function Kt(){ce("onfinish"),we.removeListener("close",Xt),Vt()}we.once("finish",Kt);function Vt(){ce("unpipe"),Xe.unpipe(we)}return we.emit("pipe",Xe),nt.flowing||(ce("pipe resume"),Xe.resume()),we};function Ct(we){return function(){var Ne=we._readableState;ce("pipeOnDrain",Ne.awaitDrain),Ne.awaitDrain&&Ne.awaitDrain--,Ne.awaitDrain===0&&me(we,"data")&&(Ne.flowing=!0,dt(we))}}Me.prototype.unpipe=function(we){var Ne=this._readableState,Xe={hasUnpiped:!1};if(Ne.pipesCount===0)return this;if(Ne.pipesCount===1)return we&&we!==Ne.pipes?this:(we||(we=Ne.pipes),Ne.pipes=null,Ne.pipesCount=0,Ne.flowing=!1,we&&we.emit("unpipe",this,Xe),this);if(!we){var nt=Ne.pipes,Ie=Ne.pipesCount;Ne.pipes=null,Ne.pipesCount=0,Ne.flowing=!1;for(var _e=0;_e<Ie;_e++)nt[_e].emit("unpipe",this,Xe);return this}var Ge=We(Ne.pipes,we);return Ge===-1?this:(Ne.pipes.splice(Ge,1),Ne.pipesCount-=1,Ne.pipesCount===1&&(Ne.pipes=Ne.pipes[0]),we.emit("unpipe",this,Xe),this)},Me.prototype.on=function(we,Ne){var Xe=Pe.prototype.on.call(this,we,Ne);if(we==="data")this._readableState.flowing!==!1&&this.resume();else if(we==="readable"){var nt=this._readableState;!nt.endEmitted&&!nt.readableListening&&(nt.readableListening=nt.needReadable=!0,nt.emittedReadable=!1,nt.reading?nt.length&&St(this):Ee.nextTick(bt,this))}return Xe},Me.prototype.addListener=Me.prototype.on;function bt(we){ce("readable nexttick read 0"),we.read(0)}Me.prototype.resume=function(){var we=this._readableState;return we.flowing||(ce("resume"),we.flowing=!0,ct(this,we)),this};function ct(we,Ne){Ne.resumeScheduled||(Ne.resumeScheduled=!0,Ee.nextTick(xt,we,Ne))}function xt(we,Ne){Ne.reading||(ce("resume read 0"),we.read(0)),Ne.resumeScheduled=!1,Ne.awaitDrain=0,we.emit("resume"),dt(we),Ne.flowing&&!Ne.reading&&we.read(0)}Me.prototype.pause=function(){return ce("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ce("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function dt(we){var Ne=we._readableState;for(ce("flow",Ne.flowing);Ne.flowing&&we.read()!==null;);}Me.prototype.wrap=function(we){var Ne=this,Xe=this._readableState,nt=!1;we.on("end",function(){if(ce("wrapped end"),Xe.decoder&&!Xe.ended){var Ge=Xe.decoder.end();Ge&&Ge.length&&Ne.push(Ge)}Ne.push(null)}),we.on("data",function(Ge){if(ce("wrapped data"),Xe.decoder&&(Ge=Xe.decoder.write(Ge)),!(Xe.objectMode&&Ge==null)&&!(!Xe.objectMode&&(!Ge||!Ge.length))){var tt=Ne.push(Ge);tt||(nt=!0,we.pause())}});for(var Ie in we)this[Ie]===void 0&&typeof we[Ie]=="function"&&(this[Ie]=function(Ge){return function(){return we[Ge].apply(we,arguments)}}(Ie));for(var _e=0;_e<De.length;_e++)we.on(De[_e],this.emit.bind(this,De[_e]));return this._read=function(Ge){ce("wrapped _read",Ge),nt&&(nt=!1,we.resume())},this},Object.defineProperty(Me.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Me._fromList=Mt;function Mt(we,Ne){if(Ne.length===0)return null;var Xe;return Ne.objectMode?Xe=Ne.buffer.shift():!we||we>=Ne.length?(Ne.decoder?Xe=Ne.buffer.join(""):Ne.buffer.length===1?Xe=Ne.buffer.head.data:Xe=Ne.buffer.concat(Ne.length),Ne.buffer.clear()):Xe=yt(we,Ne.buffer,Ne.decoder),Xe}function yt(we,Ne,Xe){var nt;return we<Ne.head.data.length?(nt=Ne.head.data.slice(0,we),Ne.head.data=Ne.head.data.slice(we)):we===Ne.head.data.length?nt=Ne.shift():nt=Xe?Dt(we,Ne):mt(we,Ne),nt}function Dt(we,Ne){var Xe=Ne.head,nt=1,Ie=Xe.data;for(we-=Ie.length;Xe=Xe.next;){var _e=Xe.data,Ge=we>_e.length?_e.length:we;if(Ge===_e.length?Ie+=_e:Ie+=_e.slice(0,we),we-=Ge,we===0){Ge===_e.length?(++nt,Xe.next?Ne.head=Xe.next:Ne.head=Ne.tail=null):(Ne.head=Xe,Xe.data=_e.slice(Ge));break}++nt}return Ne.length-=nt,Ie}function mt(we,Ne){var Xe=fe.allocUnsafe(we),nt=Ne.head,Ie=1;for(nt.data.copy(Xe),we-=nt.data.length;nt=nt.next;){var _e=nt.data,Ge=we>_e.length?_e.length:we;if(_e.copy(Xe,Xe.length-we,0,Ge),we-=Ge,we===0){Ge===_e.length?(++Ie,nt.next?Ne.head=nt.next:Ne.head=Ne.tail=null):(Ne.head=nt,nt.data=_e.slice(Ge));break}++Ie}return Ne.length-=Ie,Xe}function vt(we){var Ne=we._readableState;if(Ne.length>0)throw new Error('"endReadable()" called on non-empty stream');Ne.endEmitted||(Ne.ended=!0,Ee.nextTick(et,Ne,we))}function et(we,Ne){!we.endEmitted&&we.length===0&&(we.endEmitted=!0,Ne.readable=!1,Ne.emit("end"))}function We(we,Ne){for(var Xe=0,nt=we.length;Xe<nt;Xe++)if(we[Xe]===Ne)return Xe;return-1}}).call(this)}).call(this,oe("_process"),typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":386,"./internal/streams/BufferList":391,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,events:344,inherits:364,isarray:370,"process-nextick-args":380,"safe-buffer":396,"string_decoder/":413,util:89}],389:[function(oe,He,Re){"use strict";He.exports=ke;var de=oe("./_stream_duplex"),ve=Object.create(oe("core-util-is"));ve.inherits=oe("inherits"),ve.inherits(ke,de);function Ee(me,Pe){var fe=this._transformState;fe.transforming=!1;var z=fe.writecb;if(!z)return this.emit("error",new Error("write callback called multiple times"));fe.writechunk=null,fe.writecb=null,Pe!=null&&this.push(Pe),z(me);var te=this._readableState;te.reading=!1,(te.needReadable||te.length<te.highWaterMark)&&this._read(te.highWaterMark)}function ke(me){if(!(this instanceof ke))return new ke(me);de.call(this,me),this._transformState={afterTransform:Ee.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,me&&(typeof me.transform=="function"&&(this._transform=me.transform),typeof me.flush=="function"&&(this._flush=me.flush)),this.on("prefinish",Se)}function Se(){var me=this;typeof this._flush=="function"?this._flush(function(Pe,fe){Ae(me,Pe,fe)}):Ae(this,null,null)}ke.prototype.push=function(me,Pe){return this._transformState.needTransform=!1,de.prototype.push.call(this,me,Pe)},ke.prototype._transform=function(me,Pe,fe){throw new Error("_transform() is not implemented")},ke.prototype._write=function(me,Pe,fe){var z=this._transformState;if(z.writecb=fe,z.writechunk=me,z.writeencoding=Pe,!z.transforming){var te=this._readableState;(z.needTransform||te.needReadable||te.length<te.highWaterMark)&&this._read(te.highWaterMark)}},ke.prototype._read=function(me){var Pe=this._transformState;Pe.writechunk!==null&&Pe.writecb&&!Pe.transforming?(Pe.transforming=!0,this._transform(Pe.writechunk,Pe.writeencoding,Pe.afterTransform)):Pe.needTransform=!0},ke.prototype._destroy=function(me,Pe){var fe=this;de.prototype._destroy.call(this,me,function(z){Pe(z),fe.emit("close")})};function Ae(me,Pe,fe){if(Pe)return me.emit("error",Pe);if(fe!=null&&me.push(fe),me._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(me._transformState.transforming)throw new Error("Calling transform done when still transforming");return me.push(null)}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(oe,He,Re){(function(de,ve,Ee){(function(){"use strict";var ke=oe("process-nextick-args");He.exports=Fe;function Se(xt,dt,Mt){this.chunk=xt,this.encoding=dt,this.callback=Mt,this.next=null}function Ae(xt){var dt=this;this.next=null,this.entry=null,this.finish=function(){ct(dt,xt)}}var me=!de.browser&&["v0.10","v0.9."].indexOf(de.version.slice(0,5))>-1?Ee:ke.nextTick,Pe;Fe.WritableState=je;var fe=Object.create(oe("core-util-is"));fe.inherits=oe("inherits");var z={deprecate:oe("util-deprecate")},te=oe("./internal/streams/stream"),se=oe("safe-buffer").Buffer,ie=ve.Uint8Array||function(){};function le(xt){return se.from(xt)}function ce(xt){return se.isBuffer(xt)||xt instanceof ie}var pe=oe("./internal/streams/destroy");fe.inherits(Fe,te);function xe(){}function je(xt,dt){Pe=Pe||oe("./_stream_duplex"),xt=xt||{};var Mt=dt instanceof Pe;this.objectMode=!!xt.objectMode,Mt&&(this.objectMode=this.objectMode||!!xt.writableObjectMode);var yt=xt.highWaterMark,Dt=xt.writableHighWaterMark,mt=this.objectMode?16:16*1024;yt||yt===0?this.highWaterMark=yt:Mt&&(Dt||Dt===0)?this.highWaterMark=Dt:this.highWaterMark=mt,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var vt=xt.decodeStrings===!1;this.decodeStrings=!vt,this.defaultEncoding=xt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(et){ot(dt,et)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ae(this)}je.prototype.getBuffer=function(){for(var dt=this.bufferedRequest,Mt=[];dt;)Mt.push(dt),dt=dt.next;return Mt},function(){try{Object.defineProperty(je.prototype,"buffer",{get:z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(xt){}}();var De;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(De=Function.prototype[Symbol.hasInstance],Object.defineProperty(Fe,Symbol.hasInstance,{value:function(xt){return De.call(this,xt)?!0:this!==Fe?!1:xt&&xt._writableState instanceof je}})):De=function(xt){return xt instanceof this};function Fe(xt){if(Pe=Pe||oe("./_stream_duplex"),!De.call(Fe,this)&&!(this instanceof Pe))return new Fe(xt);this._writableState=new je(xt,this),this.writable=!0,xt&&(typeof xt.write=="function"&&(this._write=xt.write),typeof xt.writev=="function"&&(this._writev=xt.writev),typeof xt.destroy=="function"&&(this._destroy=xt.destroy),typeof xt.final=="function"&&(this._final=xt.final)),te.call(this)}Fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Te(xt,dt){var Mt=new Error("write after end");xt.emit("error",Mt),ke.nextTick(dt,Mt)}function Me(xt,dt,Mt,yt){var Dt=!0,mt=!1;return Mt===null?mt=new TypeError("May not write null values to stream"):typeof Mt!="string"&&Mt!==void 0&&!dt.objectMode&&(mt=new TypeError("Invalid non-string/buffer chunk")),mt&&(xt.emit("error",mt),ke.nextTick(yt,mt),Dt=!1),Dt}Fe.prototype.write=function(xt,dt,Mt){var yt=this._writableState,Dt=!1,mt=!yt.objectMode&&ce(xt);return mt&&!se.isBuffer(xt)&&(xt=le(xt)),typeof dt=="function"&&(Mt=dt,dt=null),mt?dt="buffer":dt||(dt=yt.defaultEncoding),typeof Mt!="function"&&(Mt=xe),yt.ended?Te(this,Mt):(mt||Me(this,yt,xt,Mt))&&(yt.pendingcb++,Dt=Ue(this,yt,mt,xt,dt,Mt)),Dt},Fe.prototype.cork=function(){var xt=this._writableState;xt.corked++},Fe.prototype.uncork=function(){var xt=this._writableState;xt.corked&&(xt.corked--,!xt.writing&&!xt.corked&&!xt.finished&&!xt.bufferProcessing&&xt.bufferedRequest&&St(this,xt))},Fe.prototype.setDefaultEncoding=function(dt){if(typeof dt=="string"&&(dt=dt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((dt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+dt);return this._writableState.defaultEncoding=dt,this};function Be(xt,dt,Mt){return!xt.objectMode&&xt.decodeStrings!==!1&&typeof dt=="string"&&(dt=se.from(dt,Mt)),dt}Object.defineProperty(Fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ue(xt,dt,Mt,yt,Dt,mt){if(!Mt){var vt=Be(dt,yt,Dt);yt!==vt&&(Mt=!0,Dt="buffer",yt=vt)}var et=dt.objectMode?1:yt.length;dt.length+=et;var We=dt.length<dt.highWaterMark;if(We||(dt.needDrain=!0),dt.writing||dt.corked){var we=dt.lastBufferedRequest;dt.lastBufferedRequest={chunk:yt,encoding:Dt,isBuf:Mt,callback:mt,next:null},we?we.next=dt.lastBufferedRequest:dt.bufferedRequest=dt.lastBufferedRequest,dt.bufferedRequestCount+=1}else Ye(xt,dt,!1,et,yt,Dt,mt);return We}function Ye(xt,dt,Mt,yt,Dt,mt,vt){dt.writelen=yt,dt.writecb=vt,dt.writing=!0,dt.sync=!0,Mt?xt._writev(Dt,dt.onwrite):xt._write(Dt,mt,dt.onwrite),dt.sync=!1}function Ve(xt,dt,Mt,yt,Dt){--dt.pendingcb,Mt?(ke.nextTick(Dt,yt),ke.nextTick(Ct,xt,dt),xt._writableState.errorEmitted=!0,xt.emit("error",yt)):(Dt(yt),xt._writableState.errorEmitted=!0,xt.emit("error",yt),Ct(xt,dt))}function Ze(xt){xt.writing=!1,xt.writecb=null,xt.length-=xt.writelen,xt.writelen=0}function ot(xt,dt){var Mt=xt._writableState,yt=Mt.sync,Dt=Mt.writecb;if(Ze(Mt),dt)Ve(xt,Mt,yt,dt,Dt);else{var mt=qe(Mt);!mt&&!Mt.corked&&!Mt.bufferProcessing&&Mt.bufferedRequest&&St(xt,Mt),yt?me(lt,xt,Mt,mt,Dt):lt(xt,Mt,mt,Dt)}}function lt(xt,dt,Mt,yt){Mt||ft(xt,dt),dt.pendingcb--,yt(),Ct(xt,dt)}function ft(xt,dt){dt.length===0&&dt.needDrain&&(dt.needDrain=!1,xt.emit("drain"))}function St(xt,dt){dt.bufferProcessing=!0;var Mt=dt.bufferedRequest;if(xt._writev&&Mt&&Mt.next){var yt=dt.bufferedRequestCount,Dt=new Array(yt),mt=dt.corkedRequestsFree;mt.entry=Mt;for(var vt=0,et=!0;Mt;)Dt[vt]=Mt,Mt.isBuf||(et=!1),Mt=Mt.next,vt+=1;Dt.allBuffers=et,Ye(xt,dt,!0,dt.length,Dt,"",mt.finish),dt.pendingcb++,dt.lastBufferedRequest=null,mt.next?(dt.corkedRequestsFree=mt.next,mt.next=null):dt.corkedRequestsFree=new Ae(dt),dt.bufferedRequestCount=0}else{for(;Mt;){var We=Mt.chunk,we=Mt.encoding,Ne=Mt.callback,Xe=dt.objectMode?1:We.length;if(Ye(xt,dt,!1,Xe,We,we,Ne),Mt=Mt.next,dt.bufferedRequestCount--,dt.writing)break}Mt===null&&(dt.lastBufferedRequest=null)}dt.bufferedRequest=Mt,dt.bufferProcessing=!1}Fe.prototype._write=function(xt,dt,Mt){Mt(new Error("_write() is not implemented"))},Fe.prototype._writev=null,Fe.prototype.end=function(xt,dt,Mt){var yt=this._writableState;typeof xt=="function"?(Mt=xt,xt=null,dt=null):typeof dt=="function"&&(Mt=dt,dt=null),xt!=null&&this.write(xt,dt),yt.corked&&(yt.corked=1,this.uncork()),!yt.ending&&!yt.finished&&bt(this,yt,Mt)};function qe(xt){return xt.ending&&xt.length===0&&xt.bufferedRequest===null&&!xt.finished&&!xt.writing}function rt(xt,dt){xt._final(function(Mt){dt.pendingcb--,Mt&&xt.emit("error",Mt),dt.prefinished=!0,xt.emit("prefinish"),Ct(xt,dt)})}function wt(xt,dt){!dt.prefinished&&!dt.finalCalled&&(typeof xt._final=="function"?(dt.pendingcb++,dt.finalCalled=!0,ke.nextTick(rt,xt,dt)):(dt.prefinished=!0,xt.emit("prefinish")))}function Ct(xt,dt){var Mt=qe(dt);return Mt&&(wt(xt,dt),dt.pendingcb===0&&(dt.finished=!0,xt.emit("finish"))),Mt}function bt(xt,dt,Mt){dt.ending=!0,Ct(xt,dt),Mt&&(dt.finished?ke.nextTick(Mt):xt.once("finish",Mt)),dt.ended=!0,xt.writable=!1}function ct(xt,dt,Mt){var yt=xt.entry;for(xt.entry=null;yt;){var Dt=yt.callback;dt.pendingcb--,Dt(Mt),yt=yt.next}dt.corkedRequestsFree?dt.corkedRequestsFree.next=xt:dt.corkedRequestsFree=xt}Object.defineProperty(Fe.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(xt){this._writableState&&(this._writableState.destroyed=xt)}}),Fe.prototype.destroy=pe.destroy,Fe.prototype._undestroy=pe.undestroy,Fe.prototype._destroy=function(xt,dt){this.end(),dt(xt)}}).call(this)}).call(this,oe("_process"),typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("timers").setImmediate)},{"./_stream_duplex":386,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,inherits:364,"process-nextick-args":380,"safe-buffer":396,timers:414,"util-deprecate":416}],391:[function(oe,He,Re){"use strict";function de(Se,Ae){if(!(Se instanceof Ae))throw new TypeError("Cannot call a class as a function")}var ve=oe("safe-buffer").Buffer,Ee=oe("util");function ke(Se,Ae,me){Se.copy(Ae,me)}He.exports=function(){function Se(){de(this,Se),this.head=null,this.tail=null,this.length=0}return Se.prototype.push=function(me){var Pe={data:me,next:null};this.length>0?this.tail.next=Pe:this.head=Pe,this.tail=Pe,++this.length},Se.prototype.unshift=function(me){var Pe={data:me,next:this.head};this.length===0&&(this.tail=Pe),this.head=Pe,++this.length},Se.prototype.shift=function(){if(this.length!==0){var me=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,me}},Se.prototype.clear=function(){this.head=this.tail=null,this.length=0},Se.prototype.join=function(me){if(this.length===0)return"";for(var Pe=this.head,fe=""+Pe.data;Pe=Pe.next;)fe+=me+Pe.data;return fe},Se.prototype.concat=function(me){if(this.length===0)return ve.alloc(0);if(this.length===1)return this.head.data;for(var Pe=ve.allocUnsafe(me>>>0),fe=this.head,z=0;fe;)ke(fe.data,Pe,z),z+=fe.data.length,fe=fe.next;return Pe},Se}(),Ee&&Ee.inspect&&Ee.inspect.custom&&(He.exports.prototype[Ee.inspect.custom]=function(){var Se=Ee.inspect({length:this.length});return this.constructor.name+" "+Se})},{"safe-buffer":396,util:89}],392:[function(oe,He,Re){"use strict";var de=oe("process-nextick-args");function ve(Se,Ae){var me=this,Pe=this._readableState&&this._readableState.destroyed,fe=this._writableState&&this._writableState.destroyed;return Pe||fe?(Ae?Ae(Se):Se&&(!this._writableState||!this._writableState.errorEmitted)&&de.nextTick(ke,this,Se),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(Se||null,function(z){!Ae&&z?(de.nextTick(ke,me,z),me._writableState&&(me._writableState.errorEmitted=!0)):Ae&&Ae(z)}),this)}function Ee(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function ke(Se,Ae){Se.emit("error",Ae)}He.exports={destroy:ve,undestroy:Ee}},{"process-nextick-args":380}],393:[function(oe,He,Re){He.exports=oe("events").EventEmitter},{events:344}],394:[function(oe,He,Re){Re=He.exports=oe("./lib/_stream_readable.js"),Re.Stream=Re,Re.Readable=Re,Re.Writable=oe("./lib/_stream_writable.js"),Re.Duplex=oe("./lib/_stream_duplex.js"),Re.Transform=oe("./lib/_stream_transform.js"),Re.PassThrough=oe("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":386,"./lib/_stream_passthrough.js":387,"./lib/_stream_readable.js":388,"./lib/_stream_transform.js":389,"./lib/_stream_writable.js":390}],395:[function(oe,He,Re){var de=function(ve){"use strict";var Ee=Object.prototype,ke=Ee.hasOwnProperty,Se,Ae=typeof Symbol=="function"?Symbol:{},me=Ae.iterator||"@@iterator",Pe=Ae.asyncIterator||"@@asyncIterator",fe=Ae.toStringTag||"@@toStringTag";function z(wt,Ct,bt){return Object.defineProperty(wt,Ct,{value:bt,enumerable:!0,configurable:!0,writable:!0}),wt[Ct]}try{z({},"")}catch(wt){z=function(Ct,bt,ct){return Ct[bt]=ct}}function te(wt,Ct,bt,ct){var xt=Ct&&Ct.prototype instanceof je?Ct:je,dt=Object.create(xt.prototype),Mt=new St(ct||[]);return dt._invoke=Ze(wt,bt,Mt),dt}ve.wrap=te;function se(wt,Ct,bt){try{return{type:"normal",arg:wt.call(Ct,bt)}}catch(ct){return{type:"throw",arg:ct}}}var ie="suspendedStart",le="suspendedYield",ce="executing",pe="completed",xe={};function je(){}function De(){}function Fe(){}var Te={};z(Te,me,function(){return this});var Me=Object.getPrototypeOf,Be=Me&&Me(Me(qe([])));Be&&Be!==Ee&&ke.call(Be,me)&&(Te=Be);var Ue=Fe.prototype=je.prototype=Object.create(Te);De.prototype=Fe,z(Ue,"constructor",Fe),z(Fe,"constructor",De),De.displayName=z(Fe,fe,"GeneratorFunction");function Ye(wt){["next","throw","return"].forEach(function(Ct){z(wt,Ct,function(bt){return this._invoke(Ct,bt)})})}ve.isGeneratorFunction=function(wt){var Ct=typeof wt=="function"&&wt.constructor;return Ct?Ct===De||(Ct.displayName||Ct.name)==="GeneratorFunction":!1},ve.mark=function(wt){return Object.setPrototypeOf?Object.setPrototypeOf(wt,Fe):(wt.__proto__=Fe,z(wt,fe,"GeneratorFunction")),wt.prototype=Object.create(Ue),wt},ve.awrap=function(wt){return{__await:wt}};function Ve(wt,Ct){function bt(dt,Mt,yt,Dt){var mt=se(wt[dt],wt,Mt);if(mt.type==="throw")Dt(mt.arg);else{var vt=mt.arg,et=vt.value;return et&&typeof et=="object"&&ke.call(et,"__await")?Ct.resolve(et.__await).then(function(We){bt("next",We,yt,Dt)},function(We){bt("throw",We,yt,Dt)}):Ct.resolve(et).then(function(We){vt.value=We,yt(vt)},function(We){return bt("throw",We,yt,Dt)})}}var ct;function xt(dt,Mt){function yt(){return new Ct(function(Dt,mt){bt(dt,Mt,Dt,mt)})}return ct=ct?ct.then(yt,yt):yt()}this._invoke=xt}Ye(Ve.prototype),z(Ve.prototype,Pe,function(){return this}),ve.AsyncIterator=Ve,ve.async=function(wt,Ct,bt,ct,xt){xt===void 0&&(xt=Promise);var dt=new Ve(te(wt,Ct,bt,ct),xt);return ve.isGeneratorFunction(Ct)?dt:dt.next().then(function(Mt){return Mt.done?Mt.value:dt.next()})};function Ze(wt,Ct,bt){var ct=ie;return function(dt,Mt){if(ct===ce)throw new Error("Generator is already running");if(ct===pe){if(dt==="throw")throw Mt;return rt()}for(bt.method=dt,bt.arg=Mt;;){var yt=bt.delegate;if(yt){var Dt=ot(yt,bt);if(Dt){if(Dt===xe)continue;return Dt}}if(bt.method==="next")bt.sent=bt._sent=bt.arg;else if(bt.method==="throw"){if(ct===ie)throw ct=pe,bt.arg;bt.dispatchException(bt.arg)}else bt.method==="return"&&bt.abrupt("return",bt.arg);ct=ce;var mt=se(wt,Ct,bt);if(mt.type==="normal"){if(ct=bt.done?pe:le,mt.arg===xe)continue;return{value:mt.arg,done:bt.done}}else mt.type==="throw"&&(ct=pe,bt.method="throw",bt.arg=mt.arg)}}}function ot(wt,Ct){var bt=wt.iterator[Ct.method];if(bt===Se){if(Ct.delegate=null,Ct.method==="throw"){if(wt.iterator.return&&(Ct.method="return",Ct.arg=Se,ot(wt,Ct),Ct.method==="throw"))return xe;Ct.method="throw",Ct.arg=new TypeError("The iterator does not provide a 'throw' method")}return xe}var ct=se(bt,wt.iterator,Ct.arg);if(ct.type==="throw")return Ct.method="throw",Ct.arg=ct.arg,Ct.delegate=null,xe;var xt=ct.arg;if(!xt)return Ct.method="throw",Ct.arg=new TypeError("iterator result is not an object"),Ct.delegate=null,xe;if(xt.done)Ct[wt.resultName]=xt.value,Ct.next=wt.nextLoc,Ct.method!=="return"&&(Ct.method="next",Ct.arg=Se);else return xt;return Ct.delegate=null,xe}Ye(Ue),z(Ue,fe,"Generator"),z(Ue,me,function(){return this}),z(Ue,"toString",function(){return"[object Generator]"});function lt(wt){var Ct={tryLoc:wt[0]};1 in wt&&(Ct.catchLoc=wt[1]),2 in wt&&(Ct.finallyLoc=wt[2],Ct.afterLoc=wt[3]),this.tryEntries.push(Ct)}function ft(wt){var Ct=wt.completion||{};Ct.type="normal",delete Ct.arg,wt.completion=Ct}function St(wt){this.tryEntries=[{tryLoc:"root"}],wt.forEach(lt,this),this.reset(!0)}ve.keys=function(wt){var Ct=[];for(var bt in wt)Ct.push(bt);return Ct.reverse(),function ct(){for(;Ct.length;){var xt=Ct.pop();if(xt in wt)return ct.value=xt,ct.done=!1,ct}return ct.done=!0,ct}};function qe(wt){if(wt){var Ct=wt[me];if(Ct)return Ct.call(wt);if(typeof wt.next=="function")return wt;if(!isNaN(wt.length)){var bt=-1,ct=function xt(){for(;++bt<wt.length;)if(ke.call(wt,bt))return xt.value=wt[bt],xt.done=!1,xt;return xt.value=Se,xt.done=!0,xt};return ct.next=ct}}return{next:rt}}ve.values=qe;function rt(){return{value:Se,done:!0}}return St.prototype={constructor:St,reset:function(wt){if(this.prev=0,this.next=0,this.sent=this._sent=Se,this.done=!1,this.delegate=null,this.method="next",this.arg=Se,this.tryEntries.forEach(ft),!wt)for(var Ct in this)Ct.charAt(0)==="t"&&ke.call(this,Ct)&&!isNaN(+Ct.slice(1))&&(this[Ct]=Se)},stop:function(){this.done=!0;var wt=this.tryEntries[0],Ct=wt.completion;if(Ct.type==="throw")throw Ct.arg;return this.rval},dispatchException:function(wt){if(this.done)throw wt;var Ct=this;function bt(Dt,mt){return dt.type="throw",dt.arg=wt,Ct.next=Dt,mt&&(Ct.method="next",Ct.arg=Se),!!mt}for(var ct=this.tryEntries.length-1;ct>=0;--ct){var xt=this.tryEntries[ct],dt=xt.completion;if(xt.tryLoc==="root")return bt("end");if(xt.tryLoc<=this.prev){var Mt=ke.call(xt,"catchLoc"),yt=ke.call(xt,"finallyLoc");if(Mt&&yt){if(this.prev<xt.catchLoc)return bt(xt.catchLoc,!0);if(this.prev<xt.finallyLoc)return bt(xt.finallyLoc)}else if(Mt){if(this.prev<xt.catchLoc)return bt(xt.catchLoc,!0)}else if(yt){if(this.prev<xt.finallyLoc)return bt(xt.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(wt,Ct){for(var bt=this.tryEntries.length-1;bt>=0;--bt){var ct=this.tryEntries[bt];if(ct.tryLoc<=this.prev&&ke.call(ct,"finallyLoc")&&this.prev<ct.finallyLoc){var xt=ct;break}}xt&&(wt==="break"||wt==="continue")&&xt.tryLoc<=Ct&&Ct<=xt.finallyLoc&&(xt=null);var dt=xt?xt.completion:{};return dt.type=wt,dt.arg=Ct,xt?(this.method="next",this.next=xt.finallyLoc,xe):this.complete(dt)},complete:function(wt,Ct){if(wt.type==="throw")throw wt.arg;return wt.type==="break"||wt.type==="continue"?this.next=wt.arg:wt.type==="return"?(this.rval=this.arg=wt.arg,this.method="return",this.next="end"):wt.type==="normal"&&Ct&&(this.next=Ct),xe},finish:function(wt){for(var Ct=this.tryEntries.length-1;Ct>=0;--Ct){var bt=this.tryEntries[Ct];if(bt.finallyLoc===wt)return this.complete(bt.completion,bt.afterLoc),ft(bt),xe}},catch:function(wt){for(var Ct=this.tryEntries.length-1;Ct>=0;--Ct){var bt=this.tryEntries[Ct];if(bt.tryLoc===wt){var ct=bt.completion;if(ct.type==="throw"){var xt=ct.arg;ft(bt)}return xt}}throw new Error("illegal catch attempt")},delegateYield:function(wt,Ct,bt){return this.delegate={iterator:qe(wt),resultName:Ct,nextLoc:bt},this.method==="next"&&(this.arg=Se),xe}},ve}(typeof He=="object"?He.exports:{});try{regeneratorRuntime=de}catch(ve){typeof globalThis=="object"?globalThis.regeneratorRuntime=de:Function("r","regeneratorRuntime = r")(de)}},{}],396:[function(oe,He,Re){var de=oe("buffer"),ve=de.Buffer;function Ee(Se,Ae){for(var me in Se)Ae[me]=Se[me]}ve.from&&ve.alloc&&ve.allocUnsafe&&ve.allocUnsafeSlow?He.exports=de:(Ee(de,Re),Re.Buffer=ke);function ke(Se,Ae,me){return ve(Se,Ae,me)}Ee(ve,ke),ke.from=function(Se,Ae,me){if(typeof Se=="number")throw new TypeError("Argument must not be a number");return ve(Se,Ae,me)},ke.alloc=function(Se,Ae,me){if(typeof Se!="number")throw new TypeError("Argument must be a number");var Pe=ve(Se);return Ae!==void 0?typeof me=="string"?Pe.fill(Ae,me):Pe.fill(Ae):Pe.fill(0),Pe},ke.allocUnsafe=function(Se){if(typeof Se!="number")throw new TypeError("Argument must be a number");return ve(Se)},ke.allocUnsafeSlow=function(Se){if(typeof Se!="number")throw new TypeError("Argument must be a number");return de.SlowBuffer(Se)}},{buffer:90}],397:[function(oe,He,Re){(function(de){(function(){(function(ve){ve.parser=function(vt,et){return new ke(vt,et)},ve.SAXParser=ke,ve.SAXStream=te,ve.createStream=z,ve.MAX_BUFFER_LENGTH=64*1024;var Ee=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];ve.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function ke(vt,et){if(!(this instanceof ke))return new ke(vt,et);var We=this;Ae(We),We.q=We.c="",We.bufferCheckPosition=ve.MAX_BUFFER_LENGTH,We.opt=et||{},We.opt.lowercase=We.opt.lowercase||We.opt.lowercasetags,We.looseCase=We.opt.lowercase?"toLowerCase":"toUpperCase",We.tags=[],We.closed=We.closedRoot=We.sawRoot=!1,We.tag=We.error=null,We.strict=!!vt,We.noscript=!!(vt||We.opt.noscript),We.state=Ve.BEGIN,We.strictEntities=We.opt.strictEntities,We.ENTITIES=We.strictEntities?Object.create(ve.XML_ENTITIES):Object.create(ve.ENTITIES),We.attribList=[],We.opt.xmlns&&(We.ns=Object.create(pe)),We.trackPosition=We.opt.position!==!1,We.trackPosition&&(We.position=We.line=We.column=0),ot(We,"onready")}Object.create||(Object.create=function(vt){function et(){}et.prototype=vt;var We=new et;return We}),Object.keys||(Object.keys=function(vt){var et=[];for(var We in vt)vt.hasOwnProperty(We)&&et.push(We);return et});function Se(vt){for(var et=Math.max(ve.MAX_BUFFER_LENGTH,10),We=0,we=0,Ne=Ee.length;we<Ne;we++){var Xe=vt[Ee[we]].length;if(Xe>et)switch(Ee[we]){case"textNode":ft(vt);break;case"cdata":lt(vt,"oncdata",vt.cdata),vt.cdata="";break;case"script":lt(vt,"onscript",vt.script),vt.script="";break;default:qe(vt,"Max buffer length exceeded: "+Ee[we])}We=Math.max(We,Xe)}var nt=ve.MAX_BUFFER_LENGTH-We;vt.bufferCheckPosition=nt+vt.position}function Ae(vt){for(var et=0,We=Ee.length;et<We;et++)vt[Ee[et]]=""}function me(vt){ft(vt),vt.cdata!==""&&(lt(vt,"oncdata",vt.cdata),vt.cdata=""),vt.script!==""&&(lt(vt,"onscript",vt.script),vt.script="")}ke.prototype={end:function(){rt(this)},write:mt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){me(this)}};var Pe;try{Pe=oe("stream").Stream}catch(vt){Pe=function(){}}var fe=ve.EVENTS.filter(function(vt){return vt!=="error"&&vt!=="end"});function z(vt,et){return new te(vt,et)}function te(vt,et){if(!(this instanceof te))return new te(vt,et);Pe.apply(this),this._parser=new ke(vt,et),this.writable=!0,this.readable=!0;var We=this;this._parser.onend=function(){We.emit("end")},this._parser.onerror=function(we){We.emit("error",we),We._parser.error=null},this._decoder=null,fe.forEach(function(we){Object.defineProperty(We,"on"+we,{get:function(){return We._parser["on"+we]},set:function(Ne){if(!Ne)return We.removeAllListeners(we),We._parser["on"+we]=Ne,Ne;We.on(we,Ne)},enumerable:!0,configurable:!1})})}te.prototype=Object.create(Pe.prototype,{constructor:{value:te}}),te.prototype.write=function(vt){if(typeof de=="function"&&typeof de.isBuffer=="function"&&de.isBuffer(vt)){if(!this._decoder){var et=oe("string_decoder").StringDecoder;this._decoder=new et("utf8")}vt=this._decoder.write(vt)}return this._parser.write(vt.toString()),this.emit("data",vt),!0},te.prototype.end=function(vt){return vt&&vt.length&&this.write(vt),this._parser.end(),!0},te.prototype.on=function(vt,et){var We=this;return!We._parser["on"+vt]&&fe.indexOf(vt)!==-1&&(We._parser["on"+vt]=function(){var we=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);we.splice(0,0,vt),We.emit.apply(We,we)}),Pe.prototype.on.call(We,vt,et)};var se="[CDATA[",ie="DOCTYPE",le="http://www.w3.org/XML/1998/namespace",ce="http://www.w3.org/2000/xmlns/",pe={xml:le,xmlns:ce},xe=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,je=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,De=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Fe=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function Te(vt){return vt===" "||vt===`
|
|
`||vt==="\r"||vt===" "}function Me(vt){return vt==='"'||vt==="'"}function Be(vt){return vt===">"||Te(vt)}function Ue(vt,et){return vt.test(et)}function Ye(vt,et){return!Ue(vt,et)}var Ve=0;ve.STATE={BEGIN:Ve++,BEGIN_WHITESPACE:Ve++,TEXT:Ve++,TEXT_ENTITY:Ve++,OPEN_WAKA:Ve++,SGML_DECL:Ve++,SGML_DECL_QUOTED:Ve++,DOCTYPE:Ve++,DOCTYPE_QUOTED:Ve++,DOCTYPE_DTD:Ve++,DOCTYPE_DTD_QUOTED:Ve++,COMMENT_STARTING:Ve++,COMMENT:Ve++,COMMENT_ENDING:Ve++,COMMENT_ENDED:Ve++,CDATA:Ve++,CDATA_ENDING:Ve++,CDATA_ENDING_2:Ve++,PROC_INST:Ve++,PROC_INST_BODY:Ve++,PROC_INST_ENDING:Ve++,OPEN_TAG:Ve++,OPEN_TAG_SLASH:Ve++,ATTRIB:Ve++,ATTRIB_NAME:Ve++,ATTRIB_NAME_SAW_WHITE:Ve++,ATTRIB_VALUE:Ve++,ATTRIB_VALUE_QUOTED:Ve++,ATTRIB_VALUE_CLOSED:Ve++,ATTRIB_VALUE_UNQUOTED:Ve++,ATTRIB_VALUE_ENTITY_Q:Ve++,ATTRIB_VALUE_ENTITY_U:Ve++,CLOSE_TAG:Ve++,CLOSE_TAG_SAW_WHITE:Ve++,SCRIPT:Ve++,SCRIPT_ENDING:Ve++},ve.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},ve.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(ve.ENTITIES).forEach(function(vt){var et=ve.ENTITIES[vt],We=typeof et=="number"?String.fromCharCode(et):et;ve.ENTITIES[vt]=We});for(var Ze in ve.STATE)ve.STATE[ve.STATE[Ze]]=Ze;Ve=ve.STATE;function ot(vt,et,We){vt[et]&&vt[et](We)}function lt(vt,et,We){vt.textNode&&ft(vt),ot(vt,et,We)}function ft(vt){vt.textNode=St(vt.opt,vt.textNode),vt.textNode&&ot(vt,"ontext",vt.textNode),vt.textNode=""}function St(vt,et){return vt.trim&&(et=et.trim()),vt.normalize&&(et=et.replace(/\s+/g," ")),et}function qe(vt,et){return ft(vt),vt.trackPosition&&(et+=`
|
|
Line: `+vt.line+`
|
|
Column: `+vt.column+`
|
|
Char: `+vt.c),et=new Error(et),vt.error=et,ot(vt,"onerror",et),vt}function rt(vt){return vt.sawRoot&&!vt.closedRoot&&wt(vt,"Unclosed root tag"),vt.state!==Ve.BEGIN&&vt.state!==Ve.BEGIN_WHITESPACE&&vt.state!==Ve.TEXT&&qe(vt,"Unexpected end"),ft(vt),vt.c="",vt.closed=!0,ot(vt,"onend"),ke.call(vt,vt.strict,vt.opt),vt}function wt(vt,et){if(typeof vt!="object"||!(vt instanceof ke))throw new Error("bad call to strictFail");vt.strict&&qe(vt,et)}function Ct(vt){vt.strict||(vt.tagName=vt.tagName[vt.looseCase]());var et=vt.tags[vt.tags.length-1]||vt,We=vt.tag={name:vt.tagName,attributes:{}};vt.opt.xmlns&&(We.ns=et.ns),vt.attribList.length=0,lt(vt,"onopentagstart",We)}function bt(vt,et){var We=vt.indexOf(":"),we=We<0?["",vt]:vt.split(":"),Ne=we[0],Xe=we[1];return et&&vt==="xmlns"&&(Ne="xmlns",Xe=""),{prefix:Ne,local:Xe}}function ct(vt){if(vt.strict||(vt.attribName=vt.attribName[vt.looseCase]()),vt.attribList.indexOf(vt.attribName)!==-1||vt.tag.attributes.hasOwnProperty(vt.attribName)){vt.attribName=vt.attribValue="";return}if(vt.opt.xmlns){var et=bt(vt.attribName,!0),We=et.prefix,we=et.local;if(We==="xmlns")if(we==="xml"&&vt.attribValue!==le)wt(vt,"xml: prefix must be bound to "+le+`
|
|
Actual: `+vt.attribValue);else if(we==="xmlns"&&vt.attribValue!==ce)wt(vt,"xmlns: prefix must be bound to "+ce+`
|
|
Actual: `+vt.attribValue);else{var Ne=vt.tag,Xe=vt.tags[vt.tags.length-1]||vt;Ne.ns===Xe.ns&&(Ne.ns=Object.create(Xe.ns)),Ne.ns[we]=vt.attribValue}vt.attribList.push([vt.attribName,vt.attribValue])}else vt.tag.attributes[vt.attribName]=vt.attribValue,lt(vt,"onattribute",{name:vt.attribName,value:vt.attribValue});vt.attribName=vt.attribValue=""}function xt(vt,et){if(vt.opt.xmlns){var We=vt.tag,we=bt(vt.tagName);We.prefix=we.prefix,We.local=we.local,We.uri=We.ns[we.prefix]||"",We.prefix&&!We.uri&&(wt(vt,"Unbound namespace prefix: "+JSON.stringify(vt.tagName)),We.uri=we.prefix);var Ne=vt.tags[vt.tags.length-1]||vt;We.ns&&Ne.ns!==We.ns&&Object.keys(We.ns).forEach(function(Ft){lt(vt,"onopennamespace",{prefix:Ft,uri:We.ns[Ft]})});for(var Xe=0,nt=vt.attribList.length;Xe<nt;Xe++){var Ie=vt.attribList[Xe],_e=Ie[0],Ge=Ie[1],tt=bt(_e,!0),ht=tt.prefix,ut=tt.local,Ot=ht===""?"":We.ns[ht]||"",Et={name:_e,value:Ge,prefix:ht,local:ut,uri:Ot};ht&&ht!=="xmlns"&&!Ot&&(wt(vt,"Unbound namespace prefix: "+JSON.stringify(ht)),Et.uri=ht),vt.tag.attributes[_e]=Et,lt(vt,"onattribute",Et)}vt.attribList.length=0}vt.tag.isSelfClosing=!!et,vt.sawRoot=!0,vt.tags.push(vt.tag),lt(vt,"onopentag",vt.tag),et||(!vt.noscript&&vt.tagName.toLowerCase()==="script"?vt.state=Ve.SCRIPT:vt.state=Ve.TEXT,vt.tag=null,vt.tagName=""),vt.attribName=vt.attribValue="",vt.attribList.length=0}function dt(vt){if(!vt.tagName){wt(vt,"Weird empty close tag."),vt.textNode+="</>",vt.state=Ve.TEXT;return}if(vt.script){if(vt.tagName!=="script"){vt.script+="</"+vt.tagName+">",vt.tagName="",vt.state=Ve.SCRIPT;return}lt(vt,"onscript",vt.script),vt.script=""}var et=vt.tags.length,We=vt.tagName;vt.strict||(We=We[vt.looseCase]());for(var we=We;et--;){var Ne=vt.tags[et];if(Ne.name!==we)wt(vt,"Unexpected close tag");else break}if(et<0){wt(vt,"Unmatched closing tag: "+vt.tagName),vt.textNode+="</"+vt.tagName+">",vt.state=Ve.TEXT;return}vt.tagName=We;for(var Xe=vt.tags.length;Xe-- >et;){var nt=vt.tag=vt.tags.pop();vt.tagName=vt.tag.name,lt(vt,"onclosetag",vt.tagName);var Ie={};for(var _e in nt.ns)Ie[_e]=nt.ns[_e];var Ge=vt.tags[vt.tags.length-1]||vt;vt.opt.xmlns&&nt.ns!==Ge.ns&&Object.keys(nt.ns).forEach(function(tt){var ht=nt.ns[tt];lt(vt,"onclosenamespace",{prefix:tt,uri:ht})})}et===0&&(vt.closedRoot=!0),vt.tagName=vt.attribValue=vt.attribName="",vt.attribList.length=0,vt.state=Ve.TEXT}function Mt(vt){var et=vt.entity,We=et.toLowerCase(),we,Ne="";return vt.ENTITIES[et]?vt.ENTITIES[et]:vt.ENTITIES[We]?vt.ENTITIES[We]:(et=We,et.charAt(0)==="#"&&(et.charAt(1)==="x"?(et=et.slice(2),we=parseInt(et,16),Ne=we.toString(16)):(et=et.slice(1),we=parseInt(et,10),Ne=we.toString(10))),et=et.replace(/^0+/,""),isNaN(we)||Ne.toLowerCase()!==et?(wt(vt,"Invalid character entity"),"&"+vt.entity+";"):String.fromCodePoint(we))}function yt(vt,et){et==="<"?(vt.state=Ve.OPEN_WAKA,vt.startTagPosition=vt.position):Te(et)||(wt(vt,"Non-whitespace before first tag."),vt.textNode=et,vt.state=Ve.TEXT)}function Dt(vt,et){var We="";return et<vt.length&&(We=vt.charAt(et)),We}function mt(vt){var et=this;if(this.error)throw this.error;if(et.closed)return qe(et,"Cannot write after close. Assign an onready handler.");if(vt===null)return rt(et);typeof vt=="object"&&(vt=vt.toString());for(var We=0,we="";we=Dt(vt,We++),et.c=we,!!we;)switch(et.trackPosition&&(et.position++,we===`
|
|
`?(et.line++,et.column=0):et.column++),et.state){case Ve.BEGIN:if(et.state=Ve.BEGIN_WHITESPACE,we==="\uFEFF")continue;yt(et,we);continue;case Ve.BEGIN_WHITESPACE:yt(et,we);continue;case Ve.TEXT:if(et.sawRoot&&!et.closedRoot){for(var Ne=We-1;we&&we!=="<"&&we!=="&";)we=Dt(vt,We++),we&&et.trackPosition&&(et.position++,we===`
|
|
`?(et.line++,et.column=0):et.column++);et.textNode+=vt.substring(Ne,We-1)}we==="<"&&!(et.sawRoot&&et.closedRoot&&!et.strict)?(et.state=Ve.OPEN_WAKA,et.startTagPosition=et.position):(!Te(we)&&(!et.sawRoot||et.closedRoot)&&wt(et,"Text data outside of root node."),we==="&"?et.state=Ve.TEXT_ENTITY:et.textNode+=we);continue;case Ve.SCRIPT:we==="<"?et.state=Ve.SCRIPT_ENDING:et.script+=we;continue;case Ve.SCRIPT_ENDING:we==="/"?et.state=Ve.CLOSE_TAG:(et.script+="<"+we,et.state=Ve.SCRIPT);continue;case Ve.OPEN_WAKA:if(we==="!")et.state=Ve.SGML_DECL,et.sgmlDecl="";else if(!Te(we))if(Ue(xe,we))et.state=Ve.OPEN_TAG,et.tagName=we;else if(we==="/")et.state=Ve.CLOSE_TAG,et.tagName="";else if(we==="?")et.state=Ve.PROC_INST,et.procInstName=et.procInstBody="";else{if(wt(et,"Unencoded <"),et.startTagPosition+1<et.position){var Xe=et.position-et.startTagPosition;we=new Array(Xe).join(" ")+we}et.textNode+="<"+we,et.state=Ve.TEXT}continue;case Ve.SGML_DECL:(et.sgmlDecl+we).toUpperCase()===se?(lt(et,"onopencdata"),et.state=Ve.CDATA,et.sgmlDecl="",et.cdata=""):et.sgmlDecl+we==="--"?(et.state=Ve.COMMENT,et.comment="",et.sgmlDecl=""):(et.sgmlDecl+we).toUpperCase()===ie?(et.state=Ve.DOCTYPE,(et.doctype||et.sawRoot)&&wt(et,"Inappropriately located doctype declaration"),et.doctype="",et.sgmlDecl=""):we===">"?(lt(et,"onsgmldeclaration",et.sgmlDecl),et.sgmlDecl="",et.state=Ve.TEXT):(Me(we)&&(et.state=Ve.SGML_DECL_QUOTED),et.sgmlDecl+=we);continue;case Ve.SGML_DECL_QUOTED:we===et.q&&(et.state=Ve.SGML_DECL,et.q=""),et.sgmlDecl+=we;continue;case Ve.DOCTYPE:we===">"?(et.state=Ve.TEXT,lt(et,"ondoctype",et.doctype),et.doctype=!0):(et.doctype+=we,we==="["?et.state=Ve.DOCTYPE_DTD:Me(we)&&(et.state=Ve.DOCTYPE_QUOTED,et.q=we));continue;case Ve.DOCTYPE_QUOTED:et.doctype+=we,we===et.q&&(et.q="",et.state=Ve.DOCTYPE);continue;case Ve.DOCTYPE_DTD:et.doctype+=we,we==="]"?et.state=Ve.DOCTYPE:Me(we)&&(et.state=Ve.DOCTYPE_DTD_QUOTED,et.q=we);continue;case Ve.DOCTYPE_DTD_QUOTED:et.doctype+=we,we===et.q&&(et.state=Ve.DOCTYPE_DTD,et.q="");continue;case Ve.COMMENT:we==="-"?et.state=Ve.COMMENT_ENDING:et.comment+=we;continue;case Ve.COMMENT_ENDING:we==="-"?(et.state=Ve.COMMENT_ENDED,et.comment=St(et.opt,et.comment),et.comment&<(et,"oncomment",et.comment),et.comment=""):(et.comment+="-"+we,et.state=Ve.COMMENT);continue;case Ve.COMMENT_ENDED:we!==">"?(wt(et,"Malformed comment"),et.comment+="--"+we,et.state=Ve.COMMENT):et.state=Ve.TEXT;continue;case Ve.CDATA:we==="]"?et.state=Ve.CDATA_ENDING:et.cdata+=we;continue;case Ve.CDATA_ENDING:we==="]"?et.state=Ve.CDATA_ENDING_2:(et.cdata+="]"+we,et.state=Ve.CDATA);continue;case Ve.CDATA_ENDING_2:we===">"?(et.cdata&<(et,"oncdata",et.cdata),lt(et,"onclosecdata"),et.cdata="",et.state=Ve.TEXT):we==="]"?et.cdata+="]":(et.cdata+="]]"+we,et.state=Ve.CDATA);continue;case Ve.PROC_INST:we==="?"?et.state=Ve.PROC_INST_ENDING:Te(we)?et.state=Ve.PROC_INST_BODY:et.procInstName+=we;continue;case Ve.PROC_INST_BODY:if(!et.procInstBody&&Te(we))continue;we==="?"?et.state=Ve.PROC_INST_ENDING:et.procInstBody+=we;continue;case Ve.PROC_INST_ENDING:we===">"?(lt(et,"onprocessinginstruction",{name:et.procInstName,body:et.procInstBody}),et.procInstName=et.procInstBody="",et.state=Ve.TEXT):(et.procInstBody+="?"+we,et.state=Ve.PROC_INST_BODY);continue;case Ve.OPEN_TAG:Ue(je,we)?et.tagName+=we:(Ct(et),we===">"?xt(et):we==="/"?et.state=Ve.OPEN_TAG_SLASH:(Te(we)||wt(et,"Invalid character in tag name"),et.state=Ve.ATTRIB));continue;case Ve.OPEN_TAG_SLASH:we===">"?(xt(et,!0),dt(et)):(wt(et,"Forward-slash in opening tag not followed by >"),et.state=Ve.ATTRIB);continue;case Ve.ATTRIB:if(Te(we))continue;we===">"?xt(et):we==="/"?et.state=Ve.OPEN_TAG_SLASH:Ue(xe,we)?(et.attribName=we,et.attribValue="",et.state=Ve.ATTRIB_NAME):wt(et,"Invalid attribute name");continue;case Ve.ATTRIB_NAME:we==="="?et.state=Ve.ATTRIB_VALUE:we===">"?(wt(et,"Attribute without value"),et.attribValue=et.attribName,ct(et),xt(et)):Te(we)?et.state=Ve.ATTRIB_NAME_SAW_WHITE:Ue(je,we)?et.attribName+=we:wt(et,"Invalid attribute name");continue;case Ve.ATTRIB_NAME_SAW_WHITE:if(we==="=")et.state=Ve.ATTRIB_VALUE;else{if(Te(we))continue;wt(et,"Attribute without value"),et.tag.attributes[et.attribName]="",et.attribValue="",lt(et,"onattribute",{name:et.attribName,value:""}),et.attribName="",we===">"?xt(et):Ue(xe,we)?(et.attribName=we,et.state=Ve.ATTRIB_NAME):(wt(et,"Invalid attribute name"),et.state=Ve.ATTRIB)}continue;case Ve.ATTRIB_VALUE:if(Te(we))continue;Me(we)?(et.q=we,et.state=Ve.ATTRIB_VALUE_QUOTED):(wt(et,"Unquoted attribute value"),et.state=Ve.ATTRIB_VALUE_UNQUOTED,et.attribValue=we);continue;case Ve.ATTRIB_VALUE_QUOTED:if(we!==et.q){we==="&"?et.state=Ve.ATTRIB_VALUE_ENTITY_Q:et.attribValue+=we;continue}ct(et),et.q="",et.state=Ve.ATTRIB_VALUE_CLOSED;continue;case Ve.ATTRIB_VALUE_CLOSED:Te(we)?et.state=Ve.ATTRIB:we===">"?xt(et):we==="/"?et.state=Ve.OPEN_TAG_SLASH:Ue(xe,we)?(wt(et,"No whitespace between attributes"),et.attribName=we,et.attribValue="",et.state=Ve.ATTRIB_NAME):wt(et,"Invalid attribute name");continue;case Ve.ATTRIB_VALUE_UNQUOTED:if(!Be(we)){we==="&"?et.state=Ve.ATTRIB_VALUE_ENTITY_U:et.attribValue+=we;continue}ct(et),we===">"?xt(et):et.state=Ve.ATTRIB;continue;case Ve.CLOSE_TAG:if(et.tagName)we===">"?dt(et):Ue(je,we)?et.tagName+=we:et.script?(et.script+="</"+et.tagName,et.tagName="",et.state=Ve.SCRIPT):(Te(we)||wt(et,"Invalid tagname in closing tag"),et.state=Ve.CLOSE_TAG_SAW_WHITE);else{if(Te(we))continue;Ye(xe,we)?et.script?(et.script+="</"+we,et.state=Ve.SCRIPT):wt(et,"Invalid tagname in closing tag."):et.tagName=we}continue;case Ve.CLOSE_TAG_SAW_WHITE:if(Te(we))continue;we===">"?dt(et):wt(et,"Invalid characters in closing tag");continue;case Ve.TEXT_ENTITY:case Ve.ATTRIB_VALUE_ENTITY_Q:case Ve.ATTRIB_VALUE_ENTITY_U:var nt,Ie;switch(et.state){case Ve.TEXT_ENTITY:nt=Ve.TEXT,Ie="textNode";break;case Ve.ATTRIB_VALUE_ENTITY_Q:nt=Ve.ATTRIB_VALUE_QUOTED,Ie="attribValue";break;case Ve.ATTRIB_VALUE_ENTITY_U:nt=Ve.ATTRIB_VALUE_UNQUOTED,Ie="attribValue";break}we===";"?(et[Ie]+=Mt(et),et.entity="",et.state=nt):Ue(et.entity.length?Fe:De,we)?et.entity+=we:(wt(et,"Invalid character in entity name"),et[Ie]+="&"+et.entity+we,et.entity="",et.state=nt);continue;default:throw new Error(et,"Unknown state: "+et.state)}return et.position>=et.bufferCheckPosition&&Se(et),et}String.fromCodePoint||function(){var vt=String.fromCharCode,et=Math.floor,We=function(){var we=16384,Ne=[],Xe,nt,Ie=-1,_e=arguments.length;if(!_e)return"";for(var Ge="";++Ie<_e;){var tt=Number(arguments[Ie]);if(!isFinite(tt)||tt<0||tt>1114111||et(tt)!==tt)throw RangeError("Invalid code point: "+tt);tt<=65535?Ne.push(tt):(tt-=65536,Xe=(tt>>10)+55296,nt=tt%1024+56320,Ne.push(Xe,nt)),(Ie+1===_e||Ne.length>we)&&(Ge+=vt.apply(null,Ne),Ne.length=0)}return Ge};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:We,configurable:!0,writable:!0}):String.fromCodePoint=We}()})(typeof Re=="undefined"?this.sax={}:Re)}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(oe,He,Re){He.exports=Ee;var de=oe("events").EventEmitter,ve=oe("inherits");ve(Ee,de),Ee.Readable=oe("readable-stream/lib/_stream_readable.js"),Ee.Writable=oe("readable-stream/lib/_stream_writable.js"),Ee.Duplex=oe("readable-stream/lib/_stream_duplex.js"),Ee.Transform=oe("readable-stream/lib/_stream_transform.js"),Ee.PassThrough=oe("readable-stream/lib/_stream_passthrough.js"),Ee.finished=oe("readable-stream/lib/internal/streams/end-of-stream.js"),Ee.pipeline=oe("readable-stream/lib/internal/streams/pipeline.js"),Ee.Stream=Ee;function Ee(){de.call(this)}Ee.prototype.pipe=function(ke,Se){var Ae=this;function me(le){ke.writable&&ke.write(le)===!1&&Ae.pause&&Ae.pause()}Ae.on("data",me);function Pe(){Ae.readable&&Ae.resume&&Ae.resume()}ke.on("drain",Pe),!ke._isStdio&&(!Se||Se.end!==!1)&&(Ae.on("end",z),Ae.on("close",te));var fe=!1;function z(){fe||(fe=!0,ke.end())}function te(){fe||(fe=!0,typeof ke.destroy=="function"&&ke.destroy())}function se(le){if(ie(),de.listenerCount(this,"error")===0)throw le}Ae.on("error",se),ke.on("error",se);function ie(){Ae.removeListener("data",me),ke.removeListener("drain",Pe),Ae.removeListener("end",z),Ae.removeListener("close",te),Ae.removeListener("error",se),ke.removeListener("error",se),Ae.removeListener("end",ie),Ae.removeListener("close",ie),ke.removeListener("close",ie)}return Ae.on("end",ie),Ae.on("close",ie),ke.on("close",ie),ke.emit("pipe",Ae),ke}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(oe,He,Re){"use strict";function de(Pe,fe){Pe.prototype=Object.create(fe.prototype),Pe.prototype.constructor=Pe,Pe.__proto__=fe}var ve={};function Ee(Pe,fe,z){z||(z=Error);function te(ie,le,ce){return typeof fe=="string"?fe:fe(ie,le,ce)}var se=function(ie){de(le,ie);function le(ce,pe,xe){return ie.call(this,te(ce,pe,xe))||this}return le}(z);se.prototype.name=z.name,se.prototype.code=Pe,ve[Pe]=se}function ke(Pe,fe){if(Array.isArray(Pe)){var z=Pe.length;return Pe=Pe.map(function(te){return String(te)}),z>2?"one of ".concat(fe," ").concat(Pe.slice(0,z-1).join(", "),", or ")+Pe[z-1]:z===2?"one of ".concat(fe," ").concat(Pe[0]," or ").concat(Pe[1]):"of ".concat(fe," ").concat(Pe[0])}else return"of ".concat(fe," ").concat(String(Pe))}function Se(Pe,fe,z){return Pe.substr(!z||z<0?0:+z,fe.length)===fe}function Ae(Pe,fe,z){return(z===void 0||z>Pe.length)&&(z=Pe.length),Pe.substring(z-fe.length,z)===fe}function me(Pe,fe,z){return typeof z!="number"&&(z=0),z+fe.length>Pe.length?!1:Pe.indexOf(fe,z)!==-1}Ee("ERR_INVALID_OPT_VALUE",function(Pe,fe){return'The value "'+fe+'" is invalid for option "'+Pe+'"'},TypeError),Ee("ERR_INVALID_ARG_TYPE",function(Pe,fe,z){var te;typeof fe=="string"&&Se(fe,"not ")?(te="must not be",fe=fe.replace(/^not /,"")):te="must be";var se;if(Ae(Pe," argument"))se="The ".concat(Pe," ").concat(te," ").concat(ke(fe,"type"));else{var ie=me(Pe,".")?"property":"argument";se='The "'.concat(Pe,'" ').concat(ie," ").concat(te," ").concat(ke(fe,"type"))}return se+=". Received type ".concat(typeof z),se},TypeError),Ee("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Ee("ERR_METHOD_NOT_IMPLEMENTED",function(Pe){return"The "+Pe+" method is not implemented"}),Ee("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Ee("ERR_STREAM_DESTROYED",function(Pe){return"Cannot call "+Pe+" after a stream was destroyed"}),Ee("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Ee("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Ee("ERR_STREAM_WRITE_AFTER_END","write after end"),Ee("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Ee("ERR_UNKNOWN_ENCODING",function(Pe){return"Unknown encoding: "+Pe},TypeError),Ee("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),He.exports.codes=ve},{}],400:[function(oe,He,Re){(function(de){(function(){"use strict";var ve=Object.keys||function(te){var se=[];for(var ie in te)se.push(ie);return se};He.exports=Pe;var Ee=oe("./_stream_readable"),ke=oe("./_stream_writable");oe("inherits")(Pe,Ee);for(var Se=ve(ke.prototype),Ae=0;Ae<Se.length;Ae++){var me=Se[Ae];Pe.prototype[me]||(Pe.prototype[me]=ke.prototype[me])}function Pe(te){if(!(this instanceof Pe))return new Pe(te);Ee.call(this,te),ke.call(this,te),this.allowHalfOpen=!0,te&&(te.readable===!1&&(this.readable=!1),te.writable===!1&&(this.writable=!1),te.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",fe)))}Object.defineProperty(Pe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Pe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Pe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function fe(){this._writableState.ended||de.nextTick(z,this)}function z(te){te.end()}Object.defineProperty(Pe.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(se){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=se,this._writableState.destroyed=se)}})}).call(this)}).call(this,oe("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(oe,He,Re){"use strict";He.exports=ve;var de=oe("./_stream_transform");oe("inherits")(ve,de);function ve(Ee){if(!(this instanceof ve))return new ve(Ee);de.call(this,Ee)}ve.prototype._transform=function(Ee,ke,Se){Se(null,Ee)}},{"./_stream_transform":403,inherits:364}],402:[function(oe,He,Re){(function(de,ve){(function(){"use strict";He.exports=lt;var Ee;lt.ReadableState=ot;var ke=oe("events").EventEmitter,Se=function(_e,Ge){return _e.listeners(Ge).length},Ae=oe("./internal/streams/stream"),me=oe("buffer").Buffer,Pe=(typeof ve!="undefined"?ve:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function fe(Ie){return me.from(Ie)}function z(Ie){return me.isBuffer(Ie)||Ie instanceof Pe}var te=oe("util"),se;te&&te.debuglog?se=te.debuglog("stream"):se=function(){};var ie=oe("./internal/streams/buffer_list"),le=oe("./internal/streams/destroy"),ce=oe("./internal/streams/state"),pe=ce.getHighWaterMark,xe=oe("../errors").codes,je=xe.ERR_INVALID_ARG_TYPE,De=xe.ERR_STREAM_PUSH_AFTER_EOF,Fe=xe.ERR_METHOD_NOT_IMPLEMENTED,Te=xe.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Me,Be,Ue;oe("inherits")(lt,Ae);var Ye=le.errorOrDestroy,Ve=["error","close","destroy","pause","resume"];function Ze(Ie,_e,Ge){if(typeof Ie.prependListener=="function")return Ie.prependListener(_e,Ge);!Ie._events||!Ie._events[_e]?Ie.on(_e,Ge):Array.isArray(Ie._events[_e])?Ie._events[_e].unshift(Ge):Ie._events[_e]=[Ge,Ie._events[_e]]}function ot(Ie,_e,Ge){Ee=Ee||oe("./_stream_duplex"),Ie=Ie||{},typeof Ge!="boolean"&&(Ge=_e instanceof Ee),this.objectMode=!!Ie.objectMode,Ge&&(this.objectMode=this.objectMode||!!Ie.readableObjectMode),this.highWaterMark=pe(this,Ie,"readableHighWaterMark",Ge),this.buffer=new ie,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=Ie.emitClose!==!1,this.autoDestroy=!!Ie.autoDestroy,this.destroyed=!1,this.defaultEncoding=Ie.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Ie.encoding&&(Me||(Me=oe("string_decoder/").StringDecoder),this.decoder=new Me(Ie.encoding),this.encoding=Ie.encoding)}function lt(Ie){if(Ee=Ee||oe("./_stream_duplex"),!(this instanceof lt))return new lt(Ie);var _e=this instanceof Ee;this._readableState=new ot(Ie,this,_e),this.readable=!0,Ie&&(typeof Ie.read=="function"&&(this._read=Ie.read),typeof Ie.destroy=="function"&&(this._destroy=Ie.destroy)),Ae.call(this)}Object.defineProperty(lt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(_e){this._readableState&&(this._readableState.destroyed=_e)}}),lt.prototype.destroy=le.destroy,lt.prototype._undestroy=le.undestroy,lt.prototype._destroy=function(Ie,_e){_e(Ie)},lt.prototype.push=function(Ie,_e){var Ge=this._readableState,tt;return Ge.objectMode?tt=!0:typeof Ie=="string"&&(_e=_e||Ge.defaultEncoding,_e!==Ge.encoding&&(Ie=me.from(Ie,_e),_e=""),tt=!0),ft(this,Ie,_e,!1,tt)},lt.prototype.unshift=function(Ie){return ft(this,Ie,null,!0,!1)};function ft(Ie,_e,Ge,tt,ht){se("readableAddChunk",_e);var ut=Ie._readableState;if(_e===null)ut.reading=!1,bt(Ie,ut);else{var Ot;if(ht||(Ot=qe(ut,_e)),Ot)Ye(Ie,Ot);else if(ut.objectMode||_e&&_e.length>0)if(typeof _e!="string"&&!ut.objectMode&&Object.getPrototypeOf(_e)!==me.prototype&&(_e=fe(_e)),tt)ut.endEmitted?Ye(Ie,new Te):St(Ie,ut,_e,!0);else if(ut.ended)Ye(Ie,new De);else{if(ut.destroyed)return!1;ut.reading=!1,ut.decoder&&!Ge?(_e=ut.decoder.write(_e),ut.objectMode||_e.length!==0?St(Ie,ut,_e,!1):dt(Ie,ut)):St(Ie,ut,_e,!1)}else tt||(ut.reading=!1,dt(Ie,ut))}return!ut.ended&&(ut.length<ut.highWaterMark||ut.length===0)}function St(Ie,_e,Ge,tt){_e.flowing&&_e.length===0&&!_e.sync?(_e.awaitDrain=0,Ie.emit("data",Ge)):(_e.length+=_e.objectMode?1:Ge.length,tt?_e.buffer.unshift(Ge):_e.buffer.push(Ge),_e.needReadable&&ct(Ie)),dt(Ie,_e)}function qe(Ie,_e){var Ge;return!z(_e)&&typeof _e!="string"&&_e!==void 0&&!Ie.objectMode&&(Ge=new je("chunk",["string","Buffer","Uint8Array"],_e)),Ge}lt.prototype.isPaused=function(){return this._readableState.flowing===!1},lt.prototype.setEncoding=function(Ie){Me||(Me=oe("string_decoder/").StringDecoder);var _e=new Me(Ie);this._readableState.decoder=_e,this._readableState.encoding=this._readableState.decoder.encoding;for(var Ge=this._readableState.buffer.head,tt="";Ge!==null;)tt+=_e.write(Ge.data),Ge=Ge.next;return this._readableState.buffer.clear(),tt!==""&&this._readableState.buffer.push(tt),this._readableState.length=tt.length,this};var rt=1073741824;function wt(Ie){return Ie>=rt?Ie=rt:(Ie--,Ie|=Ie>>>1,Ie|=Ie>>>2,Ie|=Ie>>>4,Ie|=Ie>>>8,Ie|=Ie>>>16,Ie++),Ie}function Ct(Ie,_e){return Ie<=0||_e.length===0&&_e.ended?0:_e.objectMode?1:Ie!==Ie?_e.flowing&&_e.length?_e.buffer.head.data.length:_e.length:(Ie>_e.highWaterMark&&(_e.highWaterMark=wt(Ie)),Ie<=_e.length?Ie:_e.ended?_e.length:(_e.needReadable=!0,0))}lt.prototype.read=function(Ie){se("read",Ie),Ie=parseInt(Ie,10);var _e=this._readableState,Ge=Ie;if(Ie!==0&&(_e.emittedReadable=!1),Ie===0&&_e.needReadable&&((_e.highWaterMark!==0?_e.length>=_e.highWaterMark:_e.length>0)||_e.ended))return se("read: emitReadable",_e.length,_e.ended),_e.length===0&&_e.ended?Ne(this):ct(this),null;if(Ie=Ct(Ie,_e),Ie===0&&_e.ended)return _e.length===0&&Ne(this),null;var tt=_e.needReadable;se("need readable",tt),(_e.length===0||_e.length-Ie<_e.highWaterMark)&&(tt=!0,se("length less than watermark",tt)),_e.ended||_e.reading?(tt=!1,se("reading or ended",tt)):tt&&(se("do read"),_e.reading=!0,_e.sync=!0,_e.length===0&&(_e.needReadable=!0),this._read(_e.highWaterMark),_e.sync=!1,_e.reading||(Ie=Ct(Ge,_e)));var ht;return Ie>0?ht=we(Ie,_e):ht=null,ht===null?(_e.needReadable=_e.length<=_e.highWaterMark,Ie=0):(_e.length-=Ie,_e.awaitDrain=0),_e.length===0&&(_e.ended||(_e.needReadable=!0),Ge!==Ie&&_e.ended&&Ne(this)),ht!==null&&this.emit("data",ht),ht};function bt(Ie,_e){if(se("onEofChunk"),!_e.ended){if(_e.decoder){var Ge=_e.decoder.end();Ge&&Ge.length&&(_e.buffer.push(Ge),_e.length+=_e.objectMode?1:Ge.length)}_e.ended=!0,_e.sync?ct(Ie):(_e.needReadable=!1,_e.emittedReadable||(_e.emittedReadable=!0,xt(Ie)))}}function ct(Ie){var _e=Ie._readableState;se("emitReadable",_e.needReadable,_e.emittedReadable),_e.needReadable=!1,_e.emittedReadable||(se("emitReadable",_e.flowing),_e.emittedReadable=!0,de.nextTick(xt,Ie))}function xt(Ie){var _e=Ie._readableState;se("emitReadable_",_e.destroyed,_e.length,_e.ended),!_e.destroyed&&(_e.length||_e.ended)&&(Ie.emit("readable"),_e.emittedReadable=!1),_e.needReadable=!_e.flowing&&!_e.ended&&_e.length<=_e.highWaterMark,We(Ie)}function dt(Ie,_e){_e.readingMore||(_e.readingMore=!0,de.nextTick(Mt,Ie,_e))}function Mt(Ie,_e){for(;!_e.reading&&!_e.ended&&(_e.length<_e.highWaterMark||_e.flowing&&_e.length===0);){var Ge=_e.length;if(se("maybeReadMore read 0"),Ie.read(0),Ge===_e.length)break}_e.readingMore=!1}lt.prototype._read=function(Ie){Ye(this,new Fe("_read()"))},lt.prototype.pipe=function(Ie,_e){var Ge=this,tt=this._readableState;switch(tt.pipesCount){case 0:tt.pipes=Ie;break;case 1:tt.pipes=[tt.pipes,Ie];break;default:tt.pipes.push(Ie);break}tt.pipesCount+=1,se("pipe count=%d opts=%j",tt.pipesCount,_e);var ht=(!_e||_e.end!==!1)&&Ie!==de.stdout&&Ie!==de.stderr,ut=ht?Et:cn;tt.endEmitted?de.nextTick(ut):Ge.once("end",ut),Ie.on("unpipe",Ot);function Ot(Sn,Cn){se("onunpipe"),Sn===Ge&&Cn&&Cn.hasUnpiped===!1&&(Cn.hasUnpiped=!0,Xt())}function Et(){se("onend"),Ie.end()}var Ft=yt(Ge);Ie.on("drain",Ft);var qt=!1;function Xt(){se("cleanup"),Ie.removeListener("close",hn),Ie.removeListener("finish",on),Ie.removeListener("drain",Ft),Ie.removeListener("error",Vt),Ie.removeListener("unpipe",Ot),Ge.removeListener("end",Et),Ge.removeListener("end",cn),Ge.removeListener("data",Kt),qt=!0,tt.awaitDrain&&(!Ie._writableState||Ie._writableState.needDrain)&&Ft()}Ge.on("data",Kt);function Kt(Sn){se("ondata");var Cn=Ie.write(Sn);se("dest.write",Cn),Cn===!1&&((tt.pipesCount===1&&tt.pipes===Ie||tt.pipesCount>1&&nt(tt.pipes,Ie)!==-1)&&!qt&&(se("false write response, pause",tt.awaitDrain),tt.awaitDrain++),Ge.pause())}function Vt(Sn){se("onerror",Sn),cn(),Ie.removeListener("error",Vt),Se(Ie,"error")===0&&Ye(Ie,Sn)}Ze(Ie,"error",Vt);function hn(){Ie.removeListener("finish",on),cn()}Ie.once("close",hn);function on(){se("onfinish"),Ie.removeListener("close",hn),cn()}Ie.once("finish",on);function cn(){se("unpipe"),Ge.unpipe(Ie)}return Ie.emit("pipe",Ge),tt.flowing||(se("pipe resume"),Ge.resume()),Ie};function yt(Ie){return function(){var Ge=Ie._readableState;se("pipeOnDrain",Ge.awaitDrain),Ge.awaitDrain&&Ge.awaitDrain--,Ge.awaitDrain===0&&Se(Ie,"data")&&(Ge.flowing=!0,We(Ie))}}lt.prototype.unpipe=function(Ie){var _e=this._readableState,Ge={hasUnpiped:!1};if(_e.pipesCount===0)return this;if(_e.pipesCount===1)return Ie&&Ie!==_e.pipes?this:(Ie||(Ie=_e.pipes),_e.pipes=null,_e.pipesCount=0,_e.flowing=!1,Ie&&Ie.emit("unpipe",this,Ge),this);if(!Ie){var tt=_e.pipes,ht=_e.pipesCount;_e.pipes=null,_e.pipesCount=0,_e.flowing=!1;for(var ut=0;ut<ht;ut++)tt[ut].emit("unpipe",this,{hasUnpiped:!1});return this}var Ot=nt(_e.pipes,Ie);return Ot===-1?this:(_e.pipes.splice(Ot,1),_e.pipesCount-=1,_e.pipesCount===1&&(_e.pipes=_e.pipes[0]),Ie.emit("unpipe",this,Ge),this)},lt.prototype.on=function(Ie,_e){var Ge=Ae.prototype.on.call(this,Ie,_e),tt=this._readableState;return Ie==="data"?(tt.readableListening=this.listenerCount("readable")>0,tt.flowing!==!1&&this.resume()):Ie==="readable"&&!tt.endEmitted&&!tt.readableListening&&(tt.readableListening=tt.needReadable=!0,tt.flowing=!1,tt.emittedReadable=!1,se("on readable",tt.length,tt.reading),tt.length?ct(this):tt.reading||de.nextTick(mt,this)),Ge},lt.prototype.addListener=lt.prototype.on,lt.prototype.removeListener=function(Ie,_e){var Ge=Ae.prototype.removeListener.call(this,Ie,_e);return Ie==="readable"&&de.nextTick(Dt,this),Ge},lt.prototype.removeAllListeners=function(Ie){var _e=Ae.prototype.removeAllListeners.apply(this,arguments);return(Ie==="readable"||Ie===void 0)&&de.nextTick(Dt,this),_e};function Dt(Ie){var _e=Ie._readableState;_e.readableListening=Ie.listenerCount("readable")>0,_e.resumeScheduled&&!_e.paused?_e.flowing=!0:Ie.listenerCount("data")>0&&Ie.resume()}function mt(Ie){se("readable nexttick read 0"),Ie.read(0)}lt.prototype.resume=function(){var Ie=this._readableState;return Ie.flowing||(se("resume"),Ie.flowing=!Ie.readableListening,vt(this,Ie)),Ie.paused=!1,this};function vt(Ie,_e){_e.resumeScheduled||(_e.resumeScheduled=!0,de.nextTick(et,Ie,_e))}function et(Ie,_e){se("resume",_e.reading),_e.reading||Ie.read(0),_e.resumeScheduled=!1,Ie.emit("resume"),We(Ie),_e.flowing&&!_e.reading&&Ie.read(0)}lt.prototype.pause=function(){return se("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(se("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function We(Ie){var _e=Ie._readableState;for(se("flow",_e.flowing);_e.flowing&&Ie.read()!==null;);}lt.prototype.wrap=function(Ie){var _e=this,Ge=this._readableState,tt=!1;Ie.on("end",function(){if(se("wrapped end"),Ge.decoder&&!Ge.ended){var Ot=Ge.decoder.end();Ot&&Ot.length&&_e.push(Ot)}_e.push(null)}),Ie.on("data",function(Ot){if(se("wrapped data"),Ge.decoder&&(Ot=Ge.decoder.write(Ot)),!(Ge.objectMode&&Ot==null)&&!(!Ge.objectMode&&(!Ot||!Ot.length))){var Et=_e.push(Ot);Et||(tt=!0,Ie.pause())}});for(var ht in Ie)this[ht]===void 0&&typeof Ie[ht]=="function"&&(this[ht]=function(Et){return function(){return Ie[Et].apply(Ie,arguments)}}(ht));for(var ut=0;ut<Ve.length;ut++)Ie.on(Ve[ut],this.emit.bind(this,Ve[ut]));return this._read=function(Ot){se("wrapped _read",Ot),tt&&(tt=!1,Ie.resume())},this},typeof Symbol=="function"&&(lt.prototype[Symbol.asyncIterator]=function(){return Be===void 0&&(Be=oe("./internal/streams/async_iterator")),Be(this)}),Object.defineProperty(lt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(lt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(lt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(_e){this._readableState&&(this._readableState.flowing=_e)}}),lt._fromList=we,Object.defineProperty(lt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function we(Ie,_e){if(_e.length===0)return null;var Ge;return _e.objectMode?Ge=_e.buffer.shift():!Ie||Ie>=_e.length?(_e.decoder?Ge=_e.buffer.join(""):_e.buffer.length===1?Ge=_e.buffer.first():Ge=_e.buffer.concat(_e.length),_e.buffer.clear()):Ge=_e.buffer.consume(Ie,_e.decoder),Ge}function Ne(Ie){var _e=Ie._readableState;se("endReadable",_e.endEmitted),_e.endEmitted||(_e.ended=!0,de.nextTick(Xe,_e,Ie))}function Xe(Ie,_e){if(se("endReadableNT",Ie.endEmitted,Ie.length),!Ie.endEmitted&&Ie.length===0&&(Ie.endEmitted=!0,_e.readable=!1,_e.emit("end"),Ie.autoDestroy)){var Ge=_e._writableState;(!Ge||Ge.autoDestroy&&Ge.finished)&&_e.destroy()}}typeof Symbol=="function"&&(lt.from=function(Ie,_e){return Ue===void 0&&(Ue=oe("./internal/streams/from")),Ue(lt,Ie,_e)});function nt(Ie,_e){for(var Ge=0,tt=Ie.length;Ge<tt;Ge++)if(Ie[Ge]===_e)return Ge;return-1}}).call(this)}).call(this,oe("_process"),typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/async_iterator":405,"./internal/streams/buffer_list":406,"./internal/streams/destroy":407,"./internal/streams/from":409,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,events:344,inherits:364,"string_decoder/":413,util:89}],403:[function(oe,He,Re){"use strict";He.exports=Pe;var de=oe("../errors").codes,ve=de.ERR_METHOD_NOT_IMPLEMENTED,Ee=de.ERR_MULTIPLE_CALLBACK,ke=de.ERR_TRANSFORM_ALREADY_TRANSFORMING,Se=de.ERR_TRANSFORM_WITH_LENGTH_0,Ae=oe("./_stream_duplex");oe("inherits")(Pe,Ae);function me(te,se){var ie=this._transformState;ie.transforming=!1;var le=ie.writecb;if(le===null)return this.emit("error",new Ee);ie.writechunk=null,ie.writecb=null,se!=null&&this.push(se),le(te);var ce=this._readableState;ce.reading=!1,(ce.needReadable||ce.length<ce.highWaterMark)&&this._read(ce.highWaterMark)}function Pe(te){if(!(this instanceof Pe))return new Pe(te);Ae.call(this,te),this._transformState={afterTransform:me.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,te&&(typeof te.transform=="function"&&(this._transform=te.transform),typeof te.flush=="function"&&(this._flush=te.flush)),this.on("prefinish",fe)}function fe(){var te=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(se,ie){z(te,se,ie)}):z(this,null,null)}Pe.prototype.push=function(te,se){return this._transformState.needTransform=!1,Ae.prototype.push.call(this,te,se)},Pe.prototype._transform=function(te,se,ie){ie(new ve("_transform()"))},Pe.prototype._write=function(te,se,ie){var le=this._transformState;if(le.writecb=ie,le.writechunk=te,le.writeencoding=se,!le.transforming){var ce=this._readableState;(le.needTransform||ce.needReadable||ce.length<ce.highWaterMark)&&this._read(ce.highWaterMark)}},Pe.prototype._read=function(te){var se=this._transformState;se.writechunk!==null&&!se.transforming?(se.transforming=!0,this._transform(se.writechunk,se.writeencoding,se.afterTransform)):se.needTransform=!0},Pe.prototype._destroy=function(te,se){Ae.prototype._destroy.call(this,te,function(ie){se(ie)})};function z(te,se,ie){if(se)return te.emit("error",se);if(ie!=null&&te.push(ie),te._writableState.length)throw new Se;if(te._transformState.transforming)throw new ke;return te.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(oe,He,Re){(function(de,ve){(function(){"use strict";He.exports=ot;function Ee(We,we,Ne){this.chunk=We,this.encoding=we,this.callback=Ne,this.next=null}function ke(We){var we=this;this.next=null,this.entry=null,this.finish=function(){et(we,We)}}var Se;ot.WritableState=Ve;var Ae={deprecate:oe("util-deprecate")},me=oe("./internal/streams/stream"),Pe=oe("buffer").Buffer,fe=(typeof ve!="undefined"?ve:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function z(We){return Pe.from(We)}function te(We){return Pe.isBuffer(We)||We instanceof fe}var se=oe("./internal/streams/destroy"),ie=oe("./internal/streams/state"),le=ie.getHighWaterMark,ce=oe("../errors").codes,pe=ce.ERR_INVALID_ARG_TYPE,xe=ce.ERR_METHOD_NOT_IMPLEMENTED,je=ce.ERR_MULTIPLE_CALLBACK,De=ce.ERR_STREAM_CANNOT_PIPE,Fe=ce.ERR_STREAM_DESTROYED,Te=ce.ERR_STREAM_NULL_VALUES,Me=ce.ERR_STREAM_WRITE_AFTER_END,Be=ce.ERR_UNKNOWN_ENCODING,Ue=se.errorOrDestroy;oe("inherits")(ot,me);function Ye(){}function Ve(We,we,Ne){Se=Se||oe("./_stream_duplex"),We=We||{},typeof Ne!="boolean"&&(Ne=we instanceof Se),this.objectMode=!!We.objectMode,Ne&&(this.objectMode=this.objectMode||!!We.writableObjectMode),this.highWaterMark=le(this,We,"writableHighWaterMark",Ne),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Xe=We.decodeStrings===!1;this.decodeStrings=!Xe,this.defaultEncoding=We.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(nt){bt(we,nt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=We.emitClose!==!1,this.autoDestroy=!!We.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new ke(this)}Ve.prototype.getBuffer=function(){for(var we=this.bufferedRequest,Ne=[];we;)Ne.push(we),we=we.next;return Ne},function(){try{Object.defineProperty(Ve.prototype,"buffer",{get:Ae.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(We){}}();var Ze;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ze=Function.prototype[Symbol.hasInstance],Object.defineProperty(ot,Symbol.hasInstance,{value:function(we){return Ze.call(this,we)?!0:this!==ot?!1:we&&we._writableState instanceof Ve}})):Ze=function(we){return we instanceof this};function ot(We){Se=Se||oe("./_stream_duplex");var we=this instanceof Se;if(!we&&!Ze.call(ot,this))return new ot(We);this._writableState=new Ve(We,this,we),this.writable=!0,We&&(typeof We.write=="function"&&(this._write=We.write),typeof We.writev=="function"&&(this._writev=We.writev),typeof We.destroy=="function"&&(this._destroy=We.destroy),typeof We.final=="function"&&(this._final=We.final)),me.call(this)}ot.prototype.pipe=function(){Ue(this,new De)};function lt(We,we){var Ne=new Me;Ue(We,Ne),de.nextTick(we,Ne)}function ft(We,we,Ne,Xe){var nt;return Ne===null?nt=new Te:typeof Ne!="string"&&!we.objectMode&&(nt=new pe("chunk",["string","Buffer"],Ne)),nt?(Ue(We,nt),de.nextTick(Xe,nt),!1):!0}ot.prototype.write=function(We,we,Ne){var Xe=this._writableState,nt=!1,Ie=!Xe.objectMode&&te(We);return Ie&&!Pe.isBuffer(We)&&(We=z(We)),typeof we=="function"&&(Ne=we,we=null),Ie?we="buffer":we||(we=Xe.defaultEncoding),typeof Ne!="function"&&(Ne=Ye),Xe.ending?lt(this,Ne):(Ie||ft(this,Xe,We,Ne))&&(Xe.pendingcb++,nt=qe(this,Xe,Ie,We,we,Ne)),nt},ot.prototype.cork=function(){this._writableState.corked++},ot.prototype.uncork=function(){var We=this._writableState;We.corked&&(We.corked--,!We.writing&&!We.corked&&!We.bufferProcessing&&We.bufferedRequest&&dt(this,We))},ot.prototype.setDefaultEncoding=function(we){if(typeof we=="string"&&(we=we.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((we+"").toLowerCase())>-1))throw new Be(we);return this._writableState.defaultEncoding=we,this},Object.defineProperty(ot.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function St(We,we,Ne){return!We.objectMode&&We.decodeStrings!==!1&&typeof we=="string"&&(we=Pe.from(we,Ne)),we}Object.defineProperty(ot.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function qe(We,we,Ne,Xe,nt,Ie){if(!Ne){var _e=St(we,Xe,nt);Xe!==_e&&(Ne=!0,nt="buffer",Xe=_e)}var Ge=we.objectMode?1:Xe.length;we.length+=Ge;var tt=we.length<we.highWaterMark;if(tt||(we.needDrain=!0),we.writing||we.corked){var ht=we.lastBufferedRequest;we.lastBufferedRequest={chunk:Xe,encoding:nt,isBuf:Ne,callback:Ie,next:null},ht?ht.next=we.lastBufferedRequest:we.bufferedRequest=we.lastBufferedRequest,we.bufferedRequestCount+=1}else rt(We,we,!1,Ge,Xe,nt,Ie);return tt}function rt(We,we,Ne,Xe,nt,Ie,_e){we.writelen=Xe,we.writecb=_e,we.writing=!0,we.sync=!0,we.destroyed?we.onwrite(new Fe("write")):Ne?We._writev(nt,we.onwrite):We._write(nt,Ie,we.onwrite),we.sync=!1}function wt(We,we,Ne,Xe,nt){--we.pendingcb,Ne?(de.nextTick(nt,Xe),de.nextTick(mt,We,we),We._writableState.errorEmitted=!0,Ue(We,Xe)):(nt(Xe),We._writableState.errorEmitted=!0,Ue(We,Xe),mt(We,we))}function Ct(We){We.writing=!1,We.writecb=null,We.length-=We.writelen,We.writelen=0}function bt(We,we){var Ne=We._writableState,Xe=Ne.sync,nt=Ne.writecb;if(typeof nt!="function")throw new je;if(Ct(Ne),we)wt(We,Ne,Xe,we,nt);else{var Ie=Mt(Ne)||We.destroyed;!Ie&&!Ne.corked&&!Ne.bufferProcessing&&Ne.bufferedRequest&&dt(We,Ne),Xe?de.nextTick(ct,We,Ne,Ie,nt):ct(We,Ne,Ie,nt)}}function ct(We,we,Ne,Xe){Ne||xt(We,we),we.pendingcb--,Xe(),mt(We,we)}function xt(We,we){we.length===0&&we.needDrain&&(we.needDrain=!1,We.emit("drain"))}function dt(We,we){we.bufferProcessing=!0;var Ne=we.bufferedRequest;if(We._writev&&Ne&&Ne.next){var Xe=we.bufferedRequestCount,nt=new Array(Xe),Ie=we.corkedRequestsFree;Ie.entry=Ne;for(var _e=0,Ge=!0;Ne;)nt[_e]=Ne,Ne.isBuf||(Ge=!1),Ne=Ne.next,_e+=1;nt.allBuffers=Ge,rt(We,we,!0,we.length,nt,"",Ie.finish),we.pendingcb++,we.lastBufferedRequest=null,Ie.next?(we.corkedRequestsFree=Ie.next,Ie.next=null):we.corkedRequestsFree=new ke(we),we.bufferedRequestCount=0}else{for(;Ne;){var tt=Ne.chunk,ht=Ne.encoding,ut=Ne.callback,Ot=we.objectMode?1:tt.length;if(rt(We,we,!1,Ot,tt,ht,ut),Ne=Ne.next,we.bufferedRequestCount--,we.writing)break}Ne===null&&(we.lastBufferedRequest=null)}we.bufferedRequest=Ne,we.bufferProcessing=!1}ot.prototype._write=function(We,we,Ne){Ne(new xe("_write()"))},ot.prototype._writev=null,ot.prototype.end=function(We,we,Ne){var Xe=this._writableState;return typeof We=="function"?(Ne=We,We=null,we=null):typeof we=="function"&&(Ne=we,we=null),We!=null&&this.write(We,we),Xe.corked&&(Xe.corked=1,this.uncork()),Xe.ending||vt(this,Xe,Ne),this},Object.defineProperty(ot.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Mt(We){return We.ending&&We.length===0&&We.bufferedRequest===null&&!We.finished&&!We.writing}function yt(We,we){We._final(function(Ne){we.pendingcb--,Ne&&Ue(We,Ne),we.prefinished=!0,We.emit("prefinish"),mt(We,we)})}function Dt(We,we){!we.prefinished&&!we.finalCalled&&(typeof We._final=="function"&&!we.destroyed?(we.pendingcb++,we.finalCalled=!0,de.nextTick(yt,We,we)):(we.prefinished=!0,We.emit("prefinish")))}function mt(We,we){var Ne=Mt(we);if(Ne&&(Dt(We,we),we.pendingcb===0&&(we.finished=!0,We.emit("finish"),we.autoDestroy))){var Xe=We._readableState;(!Xe||Xe.autoDestroy&&Xe.endEmitted)&&We.destroy()}return Ne}function vt(We,we,Ne){we.ending=!0,mt(We,we),Ne&&(we.finished?de.nextTick(Ne):We.once("finish",Ne)),we.ended=!0,We.writable=!1}function et(We,we,Ne){var Xe=We.entry;for(We.entry=null;Xe;){var nt=Xe.callback;we.pendingcb--,nt(Ne),Xe=Xe.next}we.corkedRequestsFree.next=We}Object.defineProperty(ot.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(we){this._writableState&&(this._writableState.destroyed=we)}}),ot.prototype.destroy=se.destroy,ot.prototype._undestroy=se.undestroy,ot.prototype._destroy=function(We,we){we(We)}}).call(this)}).call(this,oe("_process"),typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/destroy":407,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,inherits:364,"util-deprecate":416}],405:[function(oe,He,Re){(function(de){(function(){"use strict";var ve;function Ee(Te,Me,Be){return Me=ke(Me),Me in Te?Object.defineProperty(Te,Me,{value:Be,enumerable:!0,configurable:!0,writable:!0}):Te[Me]=Be,Te}function ke(Te){var Me=Se(Te,"string");return typeof Me=="symbol"?Me:String(Me)}function Se(Te,Me){if(typeof Te!="object"||Te===null)return Te;var Be=Te[Symbol.toPrimitive];if(Be!==void 0){var Ue=Be.call(Te,Me||"default");if(typeof Ue!="object")return Ue;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Me==="string"?String:Number)(Te)}var Ae=oe("./end-of-stream"),me=Symbol("lastResolve"),Pe=Symbol("lastReject"),fe=Symbol("error"),z=Symbol("ended"),te=Symbol("lastPromise"),se=Symbol("handlePromise"),ie=Symbol("stream");function le(Te,Me){return{value:Te,done:Me}}function ce(Te){var Me=Te[me];if(Me!==null){var Be=Te[ie].read();Be!==null&&(Te[te]=null,Te[me]=null,Te[Pe]=null,Me(le(Be,!1)))}}function pe(Te){de.nextTick(ce,Te)}function xe(Te,Me){return function(Be,Ue){Te.then(function(){if(Me[z]){Be(le(void 0,!0));return}Me[se](Be,Ue)},Ue)}}var je=Object.getPrototypeOf(function(){}),De=Object.setPrototypeOf((ve={get stream(){return this[ie]},next:function(){var Me=this,Be=this[fe];if(Be!==null)return Promise.reject(Be);if(this[z])return Promise.resolve(le(void 0,!0));if(this[ie].destroyed)return new Promise(function(Ze,ot){de.nextTick(function(){Me[fe]?ot(Me[fe]):Ze(le(void 0,!0))})});var Ue=this[te],Ye;if(Ue)Ye=new Promise(xe(Ue,this));else{var Ve=this[ie].read();if(Ve!==null)return Promise.resolve(le(Ve,!1));Ye=new Promise(this[se])}return this[te]=Ye,Ye}},Ee(ve,Symbol.asyncIterator,function(){return this}),Ee(ve,"return",function(){var Me=this;return new Promise(function(Be,Ue){Me[ie].destroy(null,function(Ye){if(Ye){Ue(Ye);return}Be(le(void 0,!0))})})}),ve),je),Fe=function(Me){var Be,Ue=Object.create(De,(Be={},Ee(Be,ie,{value:Me,writable:!0}),Ee(Be,me,{value:null,writable:!0}),Ee(Be,Pe,{value:null,writable:!0}),Ee(Be,fe,{value:null,writable:!0}),Ee(Be,z,{value:Me._readableState.endEmitted,writable:!0}),Ee(Be,se,{value:function(Ve,Ze){var ot=Ue[ie].read();ot?(Ue[te]=null,Ue[me]=null,Ue[Pe]=null,Ve(le(ot,!1))):(Ue[me]=Ve,Ue[Pe]=Ze)},writable:!0}),Be));return Ue[te]=null,Ae(Me,function(Ye){if(Ye&&Ye.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Ve=Ue[Pe];Ve!==null&&(Ue[te]=null,Ue[me]=null,Ue[Pe]=null,Ve(Ye)),Ue[fe]=Ye;return}var Ze=Ue[me];Ze!==null&&(Ue[te]=null,Ue[me]=null,Ue[Pe]=null,Ze(le(void 0,!0))),Ue[z]=!0}),Me.on("readable",pe.bind(null,Ue)),Ue};He.exports=Fe}).call(this)}).call(this,oe("_process"))},{"./end-of-stream":408,_process:467}],406:[function(oe,He,Re){"use strict";function de(ce,pe){var xe=Object.keys(ce);if(Object.getOwnPropertySymbols){var je=Object.getOwnPropertySymbols(ce);pe&&(je=je.filter(function(De){return Object.getOwnPropertyDescriptor(ce,De).enumerable})),xe.push.apply(xe,je)}return xe}function ve(ce){for(var pe=1;pe<arguments.length;pe++){var xe=arguments[pe]!=null?arguments[pe]:{};pe%2?de(Object(xe),!0).forEach(function(je){Ee(ce,je,xe[je])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ce,Object.getOwnPropertyDescriptors(xe)):de(Object(xe)).forEach(function(je){Object.defineProperty(ce,je,Object.getOwnPropertyDescriptor(xe,je))})}return ce}function Ee(ce,pe,xe){return pe=me(pe),pe in ce?Object.defineProperty(ce,pe,{value:xe,enumerable:!0,configurable:!0,writable:!0}):ce[pe]=xe,ce}function ke(ce,pe){if(!(ce instanceof pe))throw new TypeError("Cannot call a class as a function")}function Se(ce,pe){for(var xe=0;xe<pe.length;xe++){var je=pe[xe];je.enumerable=je.enumerable||!1,je.configurable=!0,"value"in je&&(je.writable=!0),Object.defineProperty(ce,me(je.key),je)}}function Ae(ce,pe,xe){return pe&&Se(ce.prototype,pe),xe&&Se(ce,xe),Object.defineProperty(ce,"prototype",{writable:!1}),ce}function me(ce){var pe=Pe(ce,"string");return typeof pe=="symbol"?pe:String(pe)}function Pe(ce,pe){if(typeof ce!="object"||ce===null)return ce;var xe=ce[Symbol.toPrimitive];if(xe!==void 0){var je=xe.call(ce,pe||"default");if(typeof je!="object")return je;throw new TypeError("@@toPrimitive must return a primitive value.")}return(pe==="string"?String:Number)(ce)}var fe=oe("buffer"),z=fe.Buffer,te=oe("util"),se=te.inspect,ie=se&&se.custom||"inspect";function le(ce,pe,xe){z.prototype.copy.call(ce,pe,xe)}He.exports=function(){function ce(){ke(this,ce),this.head=null,this.tail=null,this.length=0}return Ae(ce,[{key:"push",value:function(xe){var je={data:xe,next:null};this.length>0?this.tail.next=je:this.head=je,this.tail=je,++this.length}},{key:"unshift",value:function(xe){var je={data:xe,next:this.head};this.length===0&&(this.tail=je),this.head=je,++this.length}},{key:"shift",value:function(){if(this.length!==0){var xe=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,xe}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(xe){if(this.length===0)return"";for(var je=this.head,De=""+je.data;je=je.next;)De+=xe+je.data;return De}},{key:"concat",value:function(xe){if(this.length===0)return z.alloc(0);for(var je=z.allocUnsafe(xe>>>0),De=this.head,Fe=0;De;)le(De.data,je,Fe),Fe+=De.data.length,De=De.next;return je}},{key:"consume",value:function(xe,je){var De;return xe<this.head.data.length?(De=this.head.data.slice(0,xe),this.head.data=this.head.data.slice(xe)):xe===this.head.data.length?De=this.shift():De=je?this._getString(xe):this._getBuffer(xe),De}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(xe){var je=this.head,De=1,Fe=je.data;for(xe-=Fe.length;je=je.next;){var Te=je.data,Me=xe>Te.length?Te.length:xe;if(Me===Te.length?Fe+=Te:Fe+=Te.slice(0,xe),xe-=Me,xe===0){Me===Te.length?(++De,je.next?this.head=je.next:this.head=this.tail=null):(this.head=je,je.data=Te.slice(Me));break}++De}return this.length-=De,Fe}},{key:"_getBuffer",value:function(xe){var je=z.allocUnsafe(xe),De=this.head,Fe=1;for(De.data.copy(je),xe-=De.data.length;De=De.next;){var Te=De.data,Me=xe>Te.length?Te.length:xe;if(Te.copy(je,je.length-xe,0,Me),xe-=Me,xe===0){Me===Te.length?(++Fe,De.next?this.head=De.next:this.head=this.tail=null):(this.head=De,De.data=Te.slice(Me));break}++Fe}return this.length-=Fe,je}},{key:ie,value:function(xe,je){return se(this,ve(ve({},je),{},{depth:0,customInspect:!1}))}}]),ce}()},{buffer:90,util:89}],407:[function(oe,He,Re){(function(de){(function(){"use strict";function ve(Pe,fe){var z=this,te=this._readableState&&this._readableState.destroyed,se=this._writableState&&this._writableState.destroyed;return te||se?(fe?fe(Pe):Pe&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,de.nextTick(Ae,this,Pe)):de.nextTick(Ae,this,Pe)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(Pe||null,function(ie){!fe&&ie?z._writableState?z._writableState.errorEmitted?de.nextTick(ke,z):(z._writableState.errorEmitted=!0,de.nextTick(Ee,z,ie)):de.nextTick(Ee,z,ie):fe?(de.nextTick(ke,z),fe(ie)):de.nextTick(ke,z)}),this)}function Ee(Pe,fe){Ae(Pe,fe),ke(Pe)}function ke(Pe){Pe._writableState&&!Pe._writableState.emitClose||Pe._readableState&&!Pe._readableState.emitClose||Pe.emit("close")}function Se(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ae(Pe,fe){Pe.emit("error",fe)}function me(Pe,fe){var z=Pe._readableState,te=Pe._writableState;z&&z.autoDestroy||te&&te.autoDestroy?Pe.destroy(fe):Pe.emit("error",fe)}He.exports={destroy:ve,undestroy:Se,errorOrDestroy:me}}).call(this)}).call(this,oe("_process"))},{_process:467}],408:[function(oe,He,Re){"use strict";var de=oe("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function ve(Ae){var me=!1;return function(){if(!me){me=!0;for(var Pe=arguments.length,fe=new Array(Pe),z=0;z<Pe;z++)fe[z]=arguments[z];Ae.apply(this,fe)}}}function Ee(){}function ke(Ae){return Ae.setHeader&&typeof Ae.abort=="function"}function Se(Ae,me,Pe){if(typeof me=="function")return Se(Ae,null,me);me||(me={}),Pe=ve(Pe||Ee);var fe=me.readable||me.readable!==!1&&Ae.readable,z=me.writable||me.writable!==!1&&Ae.writable,te=function(){Ae.writable||ie()},se=Ae._writableState&&Ae._writableState.finished,ie=function(){z=!1,se=!0,fe||Pe.call(Ae)},le=Ae._readableState&&Ae._readableState.endEmitted,ce=function(){fe=!1,le=!0,z||Pe.call(Ae)},pe=function(Fe){Pe.call(Ae,Fe)},xe=function(){var Fe;if(fe&&!le)return(!Ae._readableState||!Ae._readableState.ended)&&(Fe=new de),Pe.call(Ae,Fe);if(z&&!se)return(!Ae._writableState||!Ae._writableState.ended)&&(Fe=new de),Pe.call(Ae,Fe)},je=function(){Ae.req.on("finish",ie)};return ke(Ae)?(Ae.on("complete",ie),Ae.on("abort",xe),Ae.req?je():Ae.on("request",je)):z&&!Ae._writableState&&(Ae.on("end",te),Ae.on("close",te)),Ae.on("end",ce),Ae.on("finish",ie),me.error!==!1&&Ae.on("error",pe),Ae.on("close",xe),function(){Ae.removeListener("complete",ie),Ae.removeListener("abort",xe),Ae.removeListener("request",je),Ae.req&&Ae.req.removeListener("finish",ie),Ae.removeListener("end",te),Ae.removeListener("close",te),Ae.removeListener("finish",ie),Ae.removeListener("end",ce),Ae.removeListener("error",pe),Ae.removeListener("close",xe)}}He.exports=Se},{"../../../errors":399}],409:[function(oe,He,Re){He.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(oe,He,Re){"use strict";var de;function ve(ie){var le=!1;return function(){le||(le=!0,ie.apply(void 0,arguments))}}var Ee=oe("../../../errors").codes,ke=Ee.ERR_MISSING_ARGS,Se=Ee.ERR_STREAM_DESTROYED;function Ae(ie){if(ie)throw ie}function me(ie){return ie.setHeader&&typeof ie.abort=="function"}function Pe(ie,le,ce,pe){pe=ve(pe);var xe=!1;ie.on("close",function(){xe=!0}),de===void 0&&(de=oe("./end-of-stream")),de(ie,{readable:le,writable:ce},function(De){if(De)return pe(De);xe=!0,pe()});var je=!1;return function(De){if(!xe&&!je){if(je=!0,me(ie))return ie.abort();if(typeof ie.destroy=="function")return ie.destroy();pe(De||new Se("pipe"))}}}function fe(ie){ie()}function z(ie,le){return ie.pipe(le)}function te(ie){return!ie.length||typeof ie[ie.length-1]!="function"?Ae:ie.pop()}function se(){for(var ie=arguments.length,le=new Array(ie),ce=0;ce<ie;ce++)le[ce]=arguments[ce];var pe=te(le);if(Array.isArray(le[0])&&(le=le[0]),le.length<2)throw new ke("streams");var xe,je=le.map(function(De,Fe){var Te=Fe<le.length-1,Me=Fe>0;return Pe(De,Te,Me,function(Be){xe||(xe=Be),Be&&je.forEach(fe),!Te&&(je.forEach(fe),pe(xe))})});return le.reduce(z)}He.exports=se},{"../../../errors":399,"./end-of-stream":408}],411:[function(oe,He,Re){"use strict";var de=oe("../../../errors").codes.ERR_INVALID_OPT_VALUE;function ve(ke,Se,Ae){return ke.highWaterMark!=null?ke.highWaterMark:Se?ke[Ae]:null}function Ee(ke,Se,Ae,me){var Pe=ve(Se,me,Ae);if(Pe!=null){if(!(isFinite(Pe)&&Math.floor(Pe)===Pe)||Pe<0){var fe=me?Ae:"highWaterMark";throw new de(fe,Pe)}return Math.floor(Pe)}return ke.objectMode?16:16*1024}He.exports={getHighWaterMark:Ee}},{"../../../errors":399}],412:[function(oe,He,Re){arguments[4][393][0].apply(Re,arguments)},{dup:393,events:344}],413:[function(oe,He,Re){"use strict";var de=oe("safe-buffer").Buffer,ve=de.isEncoding||function(je){switch(je=""+je,je&&je.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Ee(je){if(!je)return"utf8";for(var De;;)switch(je){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return je;default:if(De)return;je=(""+je).toLowerCase(),De=!0}}function ke(je){var De=Ee(je);if(typeof De!="string"&&(de.isEncoding===ve||!ve(je)))throw new Error("Unknown encoding: "+je);return De||je}Re.StringDecoder=Se;function Se(je){this.encoding=ke(je);var De;switch(this.encoding){case"utf16le":this.text=se,this.end=ie,De=4;break;case"utf8":this.fillLast=fe,De=4;break;case"base64":this.text=le,this.end=ce,De=3;break;default:this.write=pe,this.end=xe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=de.allocUnsafe(De)}Se.prototype.write=function(je){if(je.length===0)return"";var De,Fe;if(this.lastNeed){if(De=this.fillLast(je),De===void 0)return"";Fe=this.lastNeed,this.lastNeed=0}else Fe=0;return Fe<je.length?De?De+this.text(je,Fe):this.text(je,Fe):De||""},Se.prototype.end=te,Se.prototype.text=z,Se.prototype.fillLast=function(je){if(this.lastNeed<=je.length)return je.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);je.copy(this.lastChar,this.lastTotal-this.lastNeed,0,je.length),this.lastNeed-=je.length};function Ae(je){return je<=127?0:je>>5===6?2:je>>4===14?3:je>>3===30?4:je>>6===2?-1:-2}function me(je,De,Fe){var Te=De.length-1;if(Te<Fe)return 0;var Me=Ae(De[Te]);return Me>=0?(Me>0&&(je.lastNeed=Me-1),Me):--Te<Fe||Me===-2?0:(Me=Ae(De[Te]),Me>=0?(Me>0&&(je.lastNeed=Me-2),Me):--Te<Fe||Me===-2?0:(Me=Ae(De[Te]),Me>=0?(Me>0&&(Me===2?Me=0:je.lastNeed=Me-3),Me):0))}function Pe(je,De,Fe){if((De[0]&192)!==128)return je.lastNeed=0,"\uFFFD";if(je.lastNeed>1&&De.length>1){if((De[1]&192)!==128)return je.lastNeed=1,"\uFFFD";if(je.lastNeed>2&&De.length>2&&(De[2]&192)!==128)return je.lastNeed=2,"\uFFFD"}}function fe(je){var De=this.lastTotal-this.lastNeed,Fe=Pe(this,je,De);if(Fe!==void 0)return Fe;if(this.lastNeed<=je.length)return je.copy(this.lastChar,De,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);je.copy(this.lastChar,De,0,je.length),this.lastNeed-=je.length}function z(je,De){var Fe=me(this,je,De);if(!this.lastNeed)return je.toString("utf8",De);this.lastTotal=Fe;var Te=je.length-(Fe-this.lastNeed);return je.copy(this.lastChar,0,Te),je.toString("utf8",De,Te)}function te(je){var De=je&&je.length?this.write(je):"";return this.lastNeed?De+"\uFFFD":De}function se(je,De){if((je.length-De)%2===0){var Fe=je.toString("utf16le",De);if(Fe){var Te=Fe.charCodeAt(Fe.length-1);if(Te>=55296&&Te<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=je[je.length-2],this.lastChar[1]=je[je.length-1],Fe.slice(0,-1)}return Fe}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=je[je.length-1],je.toString("utf16le",De,je.length-1)}function ie(je){var De=je&&je.length?this.write(je):"";if(this.lastNeed){var Fe=this.lastTotal-this.lastNeed;return De+this.lastChar.toString("utf16le",0,Fe)}return De}function le(je,De){var Fe=(je.length-De)%3;return Fe===0?je.toString("base64",De):(this.lastNeed=3-Fe,this.lastTotal=3,Fe===1?this.lastChar[0]=je[je.length-1]:(this.lastChar[0]=je[je.length-2],this.lastChar[1]=je[je.length-1]),je.toString("base64",De,je.length-Fe))}function ce(je){var De=je&&je.length?this.write(je):"";return this.lastNeed?De+this.lastChar.toString("base64",0,3-this.lastNeed):De}function pe(je){return je.toString(this.encoding)}function xe(je){return je&&je.length?this.write(je):""}},{"safe-buffer":396}],414:[function(oe,He,Re){(function(de,ve){(function(){var Ee=oe("process/browser.js").nextTick,ke=Function.prototype.apply,Se=Array.prototype.slice,Ae={},me=0;Re.setTimeout=function(){return new Pe(ke.call(setTimeout,window,arguments),clearTimeout)},Re.setInterval=function(){return new Pe(ke.call(setInterval,window,arguments),clearInterval)},Re.clearTimeout=Re.clearInterval=function(fe){fe.close()};function Pe(fe,z){this._id=fe,this._clearFn=z}Pe.prototype.unref=Pe.prototype.ref=function(){},Pe.prototype.close=function(){this._clearFn.call(window,this._id)},Re.enroll=function(fe,z){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=z},Re.unenroll=function(fe){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=-1},Re._unrefActive=Re.active=function(fe){clearTimeout(fe._idleTimeoutId);var z=fe._idleTimeout;z>=0&&(fe._idleTimeoutId=setTimeout(function(){fe._onTimeout&&fe._onTimeout()},z))},Re.setImmediate=typeof de=="function"?de:function(fe){var z=me++,te=arguments.length<2?!1:Se.call(arguments,1);return Ae[z]=!0,Ee(function(){Ae[z]&&(te?fe.apply(null,te):fe.call(null),Re.clearImmediate(z))}),z},Re.clearImmediate=typeof ve=="function"?ve:function(fe){delete Ae[fe]}}).call(this)}).call(this,oe("timers").setImmediate,oe("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(oe,He,Re){var de=oe("buffer").Buffer;He.exports=function(ve){if(ve instanceof Uint8Array){if(ve.byteOffset===0&&ve.byteLength===ve.buffer.byteLength)return ve.buffer;if(typeof ve.buffer.slice=="function")return ve.buffer.slice(ve.byteOffset,ve.byteOffset+ve.byteLength)}if(de.isBuffer(ve)){for(var Ee=new Uint8Array(ve.length),ke=ve.length,Se=0;Se<ke;Se++)Ee[Se]=ve[Se];return Ee.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(oe,He,Re){(function(de){(function(){He.exports=ve;function ve(ke,Se){if(Ee("noDeprecation"))return ke;var Ae=!1;function me(){if(!Ae){if(Ee("throwDeprecation"))throw new Error(Se);Ee("traceDeprecation")?console.trace(Se):console.warn(Se),Ae=!0}return ke.apply(this,arguments)}return me}function Ee(ke){try{if(!de.localStorage)return!1}catch(Ae){return!1}var Se=de.localStorage[ke];return Se==null?!1:String(Se).toLowerCase()==="true"}}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(oe,He,Re){arguments[4][84][0].apply(Re,arguments)},{dup:84}],418:[function(oe,He,Re){"use strict";var de=oe("is-arguments"),ve=oe("is-generator-function"),Ee=oe("which-typed-array"),ke=oe("is-typed-array");function Se(ht){return ht.call.bind(ht)}var Ae=typeof BigInt!="undefined",me=typeof Symbol!="undefined",Pe=Se(Object.prototype.toString),fe=Se(Number.prototype.valueOf),z=Se(String.prototype.valueOf),te=Se(Boolean.prototype.valueOf);if(Ae)var se=Se(BigInt.prototype.valueOf);if(me)var ie=Se(Symbol.prototype.valueOf);function le(ht,ut){if(typeof ht!="object")return!1;try{return ut(ht),!0}catch(Ot){return!1}}Re.isArgumentsObject=de,Re.isGeneratorFunction=ve,Re.isTypedArray=ke;function ce(ht){return typeof Promise!="undefined"&&ht instanceof Promise||ht!==null&&typeof ht=="object"&&typeof ht.then=="function"&&typeof ht.catch=="function"}Re.isPromise=ce;function pe(ht){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(ht):ke(ht)||dt(ht)}Re.isArrayBufferView=pe;function xe(ht){return Ee(ht)==="Uint8Array"}Re.isUint8Array=xe;function je(ht){return Ee(ht)==="Uint8ClampedArray"}Re.isUint8ClampedArray=je;function De(ht){return Ee(ht)==="Uint16Array"}Re.isUint16Array=De;function Fe(ht){return Ee(ht)==="Uint32Array"}Re.isUint32Array=Fe;function Te(ht){return Ee(ht)==="Int8Array"}Re.isInt8Array=Te;function Me(ht){return Ee(ht)==="Int16Array"}Re.isInt16Array=Me;function Be(ht){return Ee(ht)==="Int32Array"}Re.isInt32Array=Be;function Ue(ht){return Ee(ht)==="Float32Array"}Re.isFloat32Array=Ue;function Ye(ht){return Ee(ht)==="Float64Array"}Re.isFloat64Array=Ye;function Ve(ht){return Ee(ht)==="BigInt64Array"}Re.isBigInt64Array=Ve;function Ze(ht){return Ee(ht)==="BigUint64Array"}Re.isBigUint64Array=Ze;function ot(ht){return Pe(ht)==="[object Map]"}ot.working=typeof Map!="undefined"&&ot(new Map);function lt(ht){return typeof Map=="undefined"?!1:ot.working?ot(ht):ht instanceof Map}Re.isMap=lt;function ft(ht){return Pe(ht)==="[object Set]"}ft.working=typeof Set!="undefined"&&ft(new Set);function St(ht){return typeof Set=="undefined"?!1:ft.working?ft(ht):ht instanceof Set}Re.isSet=St;function qe(ht){return Pe(ht)==="[object WeakMap]"}qe.working=typeof WeakMap!="undefined"&&qe(new WeakMap);function rt(ht){return typeof WeakMap=="undefined"?!1:qe.working?qe(ht):ht instanceof WeakMap}Re.isWeakMap=rt;function wt(ht){return Pe(ht)==="[object WeakSet]"}wt.working=typeof WeakSet!="undefined"&&wt(new WeakSet);function Ct(ht){return wt(ht)}Re.isWeakSet=Ct;function bt(ht){return Pe(ht)==="[object ArrayBuffer]"}bt.working=typeof ArrayBuffer!="undefined"&&bt(new ArrayBuffer);function ct(ht){return typeof ArrayBuffer=="undefined"?!1:bt.working?bt(ht):ht instanceof ArrayBuffer}Re.isArrayBuffer=ct;function xt(ht){return Pe(ht)==="[object DataView]"}xt.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&xt(new DataView(new ArrayBuffer(1),0,1));function dt(ht){return typeof DataView=="undefined"?!1:xt.working?xt(ht):ht instanceof DataView}Re.isDataView=dt;var Mt=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function yt(ht){return Pe(ht)==="[object SharedArrayBuffer]"}function Dt(ht){return typeof Mt=="undefined"?!1:(typeof yt.working=="undefined"&&(yt.working=yt(new Mt)),yt.working?yt(ht):ht instanceof Mt)}Re.isSharedArrayBuffer=Dt;function mt(ht){return Pe(ht)==="[object AsyncFunction]"}Re.isAsyncFunction=mt;function vt(ht){return Pe(ht)==="[object Map Iterator]"}Re.isMapIterator=vt;function et(ht){return Pe(ht)==="[object Set Iterator]"}Re.isSetIterator=et;function We(ht){return Pe(ht)==="[object Generator]"}Re.isGeneratorObject=We;function we(ht){return Pe(ht)==="[object WebAssembly.Module]"}Re.isWebAssemblyCompiledModule=we;function Ne(ht){return le(ht,fe)}Re.isNumberObject=Ne;function Xe(ht){return le(ht,z)}Re.isStringObject=Xe;function nt(ht){return le(ht,te)}Re.isBooleanObject=nt;function Ie(ht){return Ae&&le(ht,se)}Re.isBigIntObject=Ie;function _e(ht){return me&&le(ht,ie)}Re.isSymbolObject=_e;function Ge(ht){return Ne(ht)||Xe(ht)||nt(ht)||Ie(ht)||_e(ht)}Re.isBoxedPrimitive=Ge;function tt(ht){return typeof Uint8Array!="undefined"&&(ct(ht)||Dt(ht))}Re.isAnyArrayBuffer=tt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ht){Object.defineProperty(Re,ht,{enumerable:!1,value:function(){throw new Error(ht+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(oe,He,Re){(function(de){(function(){var ve=Object.getOwnPropertyDescriptors||function(Mt){for(var yt=Object.keys(Mt),Dt={},mt=0;mt<yt.length;mt++)Dt[yt[mt]]=Object.getOwnPropertyDescriptor(Mt,yt[mt]);return Dt},Ee=/%[sdj%]/g;Re.format=function(dt){if(!Me(dt)){for(var Mt=[],yt=0;yt<arguments.length;yt++)Mt.push(me(arguments[yt]));return Mt.join(" ")}for(var yt=1,Dt=arguments,mt=Dt.length,vt=String(dt).replace(Ee,function(We){if(We==="%%")return"%";if(yt>=mt)return We;switch(We){case"%s":return String(Dt[yt++]);case"%d":return Number(Dt[yt++]);case"%j":try{return JSON.stringify(Dt[yt++])}catch(we){return"[Circular]"}default:return We}}),et=Dt[yt];yt<mt;et=Dt[++yt])De(et)||!Ve(et)?vt+=" "+et:vt+=" "+me(et);return vt},Re.deprecate=function(dt,Mt){if(typeof de!="undefined"&&de.noDeprecation===!0)return dt;if(typeof de=="undefined")return function(){return Re.deprecate(dt,Mt).apply(this,arguments)};var yt=!1;function Dt(){if(!yt){if(de.throwDeprecation)throw new Error(Mt);de.traceDeprecation?console.trace(Mt):console.error(Mt),yt=!0}return dt.apply(this,arguments)}return Dt};var ke={},Se=/^$/;if(de.env.NODE_DEBUG){var Ae=de.env.NODE_DEBUG;Ae=Ae.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Se=new RegExp("^"+Ae+"$","i")}Re.debuglog=function(dt){if(dt=dt.toUpperCase(),!ke[dt])if(Se.test(dt)){var Mt=de.pid;ke[dt]=function(){var yt=Re.format.apply(Re,arguments);console.error("%s %d: %s",dt,Mt,yt)}}else ke[dt]=function(){};return ke[dt]};function me(dt,Mt){var yt={seen:[],stylize:fe};return arguments.length>=3&&(yt.depth=arguments[2]),arguments.length>=4&&(yt.colors=arguments[3]),je(Mt)?yt.showHidden=Mt:Mt&&Re._extend(yt,Mt),Ue(yt.showHidden)&&(yt.showHidden=!1),Ue(yt.depth)&&(yt.depth=2),Ue(yt.colors)&&(yt.colors=!1),Ue(yt.customInspect)&&(yt.customInspect=!0),yt.colors&&(yt.stylize=Pe),te(yt,dt,yt.depth)}Re.inspect=me,me.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},me.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Pe(dt,Mt){var yt=me.styles[Mt];return yt?"\x1B["+me.colors[yt][0]+"m"+dt+"\x1B["+me.colors[yt][1]+"m":dt}function fe(dt,Mt){return dt}function z(dt){var Mt={};return dt.forEach(function(yt,Dt){Mt[yt]=!0}),Mt}function te(dt,Mt,yt){if(dt.customInspect&&Mt&<(Mt.inspect)&&Mt.inspect!==Re.inspect&&!(Mt.constructor&&Mt.constructor.prototype===Mt)){var Dt=Mt.inspect(yt,dt);return Me(Dt)||(Dt=te(dt,Dt,yt)),Dt}var mt=se(dt,Mt);if(mt)return mt;var vt=Object.keys(Mt),et=z(vt);if(dt.showHidden&&(vt=Object.getOwnPropertyNames(Mt)),ot(Mt)&&(vt.indexOf("message")>=0||vt.indexOf("description")>=0))return ie(Mt);if(vt.length===0){if(lt(Mt)){var We=Mt.name?": "+Mt.name:"";return dt.stylize("[Function"+We+"]","special")}if(Ye(Mt))return dt.stylize(RegExp.prototype.toString.call(Mt),"regexp");if(Ze(Mt))return dt.stylize(Date.prototype.toString.call(Mt),"date");if(ot(Mt))return ie(Mt)}var we="",Ne=!1,Xe=["{","}"];if(xe(Mt)&&(Ne=!0,Xe=["[","]"]),lt(Mt)){var nt=Mt.name?": "+Mt.name:"";we=" [Function"+nt+"]"}if(Ye(Mt)&&(we=" "+RegExp.prototype.toString.call(Mt)),Ze(Mt)&&(we=" "+Date.prototype.toUTCString.call(Mt)),ot(Mt)&&(we=" "+ie(Mt)),vt.length===0&&(!Ne||Mt.length==0))return Xe[0]+we+Xe[1];if(yt<0)return Ye(Mt)?dt.stylize(RegExp.prototype.toString.call(Mt),"regexp"):dt.stylize("[Object]","special");dt.seen.push(Mt);var Ie;return Ne?Ie=le(dt,Mt,yt,et,vt):Ie=vt.map(function(_e){return ce(dt,Mt,yt,et,_e,Ne)}),dt.seen.pop(),pe(Ie,we,Xe)}function se(dt,Mt){if(Ue(Mt))return dt.stylize("undefined","undefined");if(Me(Mt)){var yt="'"+JSON.stringify(Mt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return dt.stylize(yt,"string")}if(Te(Mt))return dt.stylize(""+Mt,"number");if(je(Mt))return dt.stylize(""+Mt,"boolean");if(De(Mt))return dt.stylize("null","null")}function ie(dt){return"["+Error.prototype.toString.call(dt)+"]"}function le(dt,Mt,yt,Dt,mt){for(var vt=[],et=0,We=Mt.length;et<We;++et)Ct(Mt,String(et))?vt.push(ce(dt,Mt,yt,Dt,String(et),!0)):vt.push("");return mt.forEach(function(we){we.match(/^\d+$/)||vt.push(ce(dt,Mt,yt,Dt,we,!0))}),vt}function ce(dt,Mt,yt,Dt,mt,vt){var et,We,we;if(we=Object.getOwnPropertyDescriptor(Mt,mt)||{value:Mt[mt]},we.get?we.set?We=dt.stylize("[Getter/Setter]","special"):We=dt.stylize("[Getter]","special"):we.set&&(We=dt.stylize("[Setter]","special")),Ct(Dt,mt)||(et="["+mt+"]"),We||(dt.seen.indexOf(we.value)<0?(De(yt)?We=te(dt,we.value,null):We=te(dt,we.value,yt-1),We.indexOf(`
|
|
`)>-1&&(vt?We=We.split(`
|
|
`).map(function(Ne){return" "+Ne}).join(`
|
|
`).slice(2):We=`
|
|
`+We.split(`
|
|
`).map(function(Ne){return" "+Ne}).join(`
|
|
`))):We=dt.stylize("[Circular]","special")),Ue(et)){if(vt&&mt.match(/^\d+$/))return We;et=JSON.stringify(""+mt),et.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(et=et.slice(1,-1),et=dt.stylize(et,"name")):(et=et.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),et=dt.stylize(et,"string"))}return et+": "+We}function pe(dt,Mt,yt){var Dt=0,mt=dt.reduce(function(vt,et){return Dt++,et.indexOf(`
|
|
`)>=0&&Dt++,vt+et.replace(/\u001b\[\d\d?m/g,"").length+1},0);return mt>60?yt[0]+(Mt===""?"":Mt+`
|
|
`)+" "+dt.join(`,
|
|
`)+" "+yt[1]:yt[0]+Mt+" "+dt.join(", ")+" "+yt[1]}Re.types=oe("./support/types");function xe(dt){return Array.isArray(dt)}Re.isArray=xe;function je(dt){return typeof dt=="boolean"}Re.isBoolean=je;function De(dt){return dt===null}Re.isNull=De;function Fe(dt){return dt==null}Re.isNullOrUndefined=Fe;function Te(dt){return typeof dt=="number"}Re.isNumber=Te;function Me(dt){return typeof dt=="string"}Re.isString=Me;function Be(dt){return typeof dt=="symbol"}Re.isSymbol=Be;function Ue(dt){return dt===void 0}Re.isUndefined=Ue;function Ye(dt){return Ve(dt)&&St(dt)==="[object RegExp]"}Re.isRegExp=Ye,Re.types.isRegExp=Ye;function Ve(dt){return typeof dt=="object"&&dt!==null}Re.isObject=Ve;function Ze(dt){return Ve(dt)&&St(dt)==="[object Date]"}Re.isDate=Ze,Re.types.isDate=Ze;function ot(dt){return Ve(dt)&&(St(dt)==="[object Error]"||dt instanceof Error)}Re.isError=ot,Re.types.isNativeError=ot;function lt(dt){return typeof dt=="function"}Re.isFunction=lt;function ft(dt){return dt===null||typeof dt=="boolean"||typeof dt=="number"||typeof dt=="string"||typeof dt=="symbol"||typeof dt=="undefined"}Re.isPrimitive=ft,Re.isBuffer=oe("./support/isBuffer");function St(dt){return Object.prototype.toString.call(dt)}function qe(dt){return dt<10?"0"+dt.toString(10):dt.toString(10)}var rt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function wt(){var dt=new Date,Mt=[qe(dt.getHours()),qe(dt.getMinutes()),qe(dt.getSeconds())].join(":");return[dt.getDate(),rt[dt.getMonth()],Mt].join(" ")}Re.log=function(){console.log("%s - %s",wt(),Re.format.apply(Re,arguments))},Re.inherits=oe("inherits"),Re._extend=function(dt,Mt){if(!Mt||!Ve(Mt))return dt;for(var yt=Object.keys(Mt),Dt=yt.length;Dt--;)dt[yt[Dt]]=Mt[yt[Dt]];return dt};function Ct(dt,Mt){return Object.prototype.hasOwnProperty.call(dt,Mt)}var bt=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;Re.promisify=function(Mt){if(typeof Mt!="function")throw new TypeError('The "original" argument must be of type Function');if(bt&&Mt[bt]){var yt=Mt[bt];if(typeof yt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(yt,bt,{value:yt,enumerable:!1,writable:!1,configurable:!0}),yt}function yt(){for(var Dt,mt,vt=new Promise(function(we,Ne){Dt=we,mt=Ne}),et=[],We=0;We<arguments.length;We++)et.push(arguments[We]);et.push(function(we,Ne){we?mt(we):Dt(Ne)});try{Mt.apply(this,et)}catch(we){mt(we)}return vt}return Object.setPrototypeOf(yt,Object.getPrototypeOf(Mt)),bt&&Object.defineProperty(yt,bt,{value:yt,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(yt,ve(Mt))},Re.promisify.custom=bt;function ct(dt,Mt){if(!dt){var yt=new Error("Promise was rejected with a falsy value");yt.reason=dt,dt=yt}return Mt(dt)}function xt(dt){if(typeof dt!="function")throw new TypeError('The "original" argument must be of type Function');function Mt(){for(var yt=[],Dt=0;Dt<arguments.length;Dt++)yt.push(arguments[Dt]);var mt=yt.pop();if(typeof mt!="function")throw new TypeError("The last argument must be of type Function");var vt=this,et=function(){return mt.apply(vt,arguments)};dt.apply(this,yt).then(function(We){de.nextTick(et.bind(null,null,We))},function(We){de.nextTick(ct.bind(null,We,et))})}return Object.setPrototypeOf(Mt,Object.getPrototypeOf(dt)),Object.defineProperties(Mt,ve(dt)),Mt}Re.callbackify=xt}).call(this)}).call(this,oe("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(oe,He,Re){(function(de){(function(){"use strict";var ve=oe("for-each"),Ee=oe("available-typed-arrays"),ke=oe("call-bind"),Se=oe("call-bind/callBound"),Ae=oe("gopd"),me=Se("Object.prototype.toString"),Pe=oe("has-tostringtag/shams")(),fe=typeof globalThis=="undefined"?de:globalThis,z=Ee(),te=Se("String.prototype.slice"),se=Object.getPrototypeOf,ie=Se("Array.prototype.indexOf",!0)||function(je,De){for(var Fe=0;Fe<je.length;Fe+=1)if(je[Fe]===De)return Fe;return-1},le={__proto__:null};Pe&&Ae&&se?ve(z,function(xe){var je=new fe[xe];if(Symbol.toStringTag in je){var De=se(je),Fe=Ae(De,Symbol.toStringTag);if(!Fe){var Te=se(De);Fe=Ae(Te,Symbol.toStringTag)}le["$"+xe]=ke(Fe.get)}}):ve(z,function(xe){var je=new fe[xe];le["$"+xe]=ke(je.slice)});var ce=function(je){var De=!1;return ve(le,function(Fe,Te){if(!De)try{"$"+Fe(je)===Te&&(De=te(Te,1))}catch(Me){}}),De},pe=function(je){var De=!1;return ve(le,function(Fe,Te){if(!De)try{Fe(je),De=te(Te,1)}catch(Me){}}),De};He.exports=function(je){if(!je||typeof je!="object")return!1;if(!Pe){var De=te(me(je),8,-1);return ie(z,De)>-1?De:De!=="Object"?!1:pe(je)}return Ae?ce(je):null}}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(oe,He,Re){(function(){"use strict";Re.stripBOM=function(de){return de[0]==="\uFEFF"?de.substring(1):de}}).call(this)},{}],422:[function(oe,He,Re){(function(){"use strict";var de,ve,Ee,ke,Se,Ae={}.hasOwnProperty;de=oe("xmlbuilder"),ve=oe("./defaults").defaults,ke=function(me){return typeof me=="string"&&(me.indexOf("&")>=0||me.indexOf(">")>=0||me.indexOf("<")>=0)},Se=function(me){return"<![CDATA["+Ee(me)+"]]>"},Ee=function(me){return me.replace("]]>","]]]]><![CDATA[>")},Re.Builder=function(){function me(Pe){var fe,z,te;this.options={},z=ve["0.2"];for(fe in z)Ae.call(z,fe)&&(te=z[fe],this.options[fe]=te);for(fe in Pe)Ae.call(Pe,fe)&&(te=Pe[fe],this.options[fe]=te)}return me.prototype.buildObject=function(Pe){var fe,z,te,se,ie;return fe=this.options.attrkey,z=this.options.charkey,Object.keys(Pe).length===1&&this.options.rootName===ve["0.2"].rootName?(ie=Object.keys(Pe)[0],Pe=Pe[ie]):ie=this.options.rootName,te=function(le){return function(ce,pe){var xe,je,De,Fe,Te,Me;if(typeof pe!="object")le.options.cdata&&ke(pe)?ce.raw(Se(pe)):ce.txt(pe);else if(Array.isArray(pe)){for(Fe in pe)if(Ae.call(pe,Fe)){je=pe[Fe];for(Te in je)De=je[Te],ce=te(ce.ele(Te),De).up()}}else for(Te in pe)if(Ae.call(pe,Te))if(je=pe[Te],Te===fe){if(typeof je=="object")for(xe in je)Me=je[xe],ce=ce.att(xe,Me)}else if(Te===z)le.options.cdata&&ke(je)?ce=ce.raw(Se(je)):ce=ce.txt(je);else if(Array.isArray(je))for(Fe in je)Ae.call(je,Fe)&&(De=je[Fe],typeof De=="string"?le.options.cdata&&ke(De)?ce=ce.ele(Te).raw(Se(De)).up():ce=ce.ele(Te,De).up():ce=te(ce.ele(Te),De).up());else typeof je=="object"?ce=te(ce.ele(Te),je).up():typeof je=="string"&&le.options.cdata&&ke(je)?ce=ce.ele(Te).raw(Se(je)).up():(je==null&&(je=""),ce=ce.ele(Te,je.toString()).up());return ce}}(this),se=de.create(ie,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),te(se,Pe).end(this.options.renderOpts)},me}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(oe,He,Re){(function(){Re.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],424:[function(oe,He,Re){(function(){"use strict";var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z=function(ie,le){return function(){return ie.apply(le,arguments)}},te=function(ie,le){for(var ce in le)se.call(le,ce)&&(ie[ce]=le[ce]);function pe(){this.constructor=ie}return pe.prototype=le.prototype,ie.prototype=new pe,ie.__super__=le.prototype,ie},se={}.hasOwnProperty;Pe=oe("sax"),ke=oe("events"),de=oe("./bom"),me=oe("./processors"),fe=oe("timers").setImmediate,ve=oe("./defaults").defaults,Se=function(ie){return typeof ie=="object"&&ie!=null&&Object.keys(ie).length===0},Ae=function(ie,le,ce){var pe,xe,je;for(pe=0,xe=ie.length;pe<xe;pe++)je=ie[pe],le=je(le,ce);return le},Ee=function(ie,le,ce){var pe;return pe=Object.create(null),pe.value=ce,pe.writable=!0,pe.enumerable=!0,pe.configurable=!0,Object.defineProperty(ie,le,pe)},Re.Parser=function(ie){te(le,ie);function le(ce){this.parseStringPromise=z(this.parseStringPromise,this),this.parseString=z(this.parseString,this),this.reset=z(this.reset,this),this.assignOrPush=z(this.assignOrPush,this),this.processAsync=z(this.processAsync,this);var pe,xe,je;if(!(this instanceof Re.Parser))return new Re.Parser(ce);this.options={},xe=ve["0.2"];for(pe in xe)se.call(xe,pe)&&(je=xe[pe],this.options[pe]=je);for(pe in ce)se.call(ce,pe)&&(je=ce[pe],this.options[pe]=je);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(me.normalize)),this.reset()}return le.prototype.processAsync=function(){var ce,pe;try{return this.remaining.length<=this.options.chunkSize?(ce=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(ce),this.saxParser.close()):(ce=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(ce),fe(this.processAsync))}catch(xe){if(pe=xe,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(pe)}},le.prototype.assignOrPush=function(ce,pe,xe){return pe in ce?(ce[pe]instanceof Array||Ee(ce,pe,[ce[pe]]),ce[pe].push(xe)):this.options.explicitArray?Ee(ce,pe,[xe]):Ee(ce,pe,xe)},le.prototype.reset=function(){var ce,pe,xe,je;return this.removeAllListeners(),this.saxParser=Pe.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(De){return function(Fe){if(De.saxParser.resume(),!De.saxParser.errThrown)return De.saxParser.errThrown=!0,De.emit("error",Fe)}}(this),this.saxParser.onend=function(De){return function(){if(!De.saxParser.ended)return De.saxParser.ended=!0,De.emit("end",De.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,je=[],ce=this.options.attrkey,pe=this.options.charkey,this.saxParser.onopentag=function(De){return function(Fe){var Te,Me,Be,Ue,Ye;if(Be={},Be[pe]="",!De.options.ignoreAttrs){Ye=Fe.attributes;for(Te in Ye)se.call(Ye,Te)&&(!(ce in Be)&&!De.options.mergeAttrs&&(Be[ce]={}),Me=De.options.attrValueProcessors?Ae(De.options.attrValueProcessors,Fe.attributes[Te],Te):Fe.attributes[Te],Ue=De.options.attrNameProcessors?Ae(De.options.attrNameProcessors,Te):Te,De.options.mergeAttrs?De.assignOrPush(Be,Ue,Me):Ee(Be[ce],Ue,Me))}return Be["#name"]=De.options.tagNameProcessors?Ae(De.options.tagNameProcessors,Fe.name):Fe.name,De.options.xmlns&&(Be[De.options.xmlnskey]={uri:Fe.uri,local:Fe.local}),je.push(Be)}}(this),this.saxParser.onclosetag=function(De){return function(){var Fe,Te,Me,Be,Ue,Ye,Ve,Ze,ot,lt;if(Ye=je.pop(),Ue=Ye["#name"],(!De.options.explicitChildren||!De.options.preserveChildrenOrder)&&delete Ye["#name"],Ye.cdata===!0&&(Fe=Ye.cdata,delete Ye.cdata),ot=je[je.length-1],Ye[pe].match(/^\s*$/)&&!Fe?(Te=Ye[pe],delete Ye[pe]):(De.options.trim&&(Ye[pe]=Ye[pe].trim()),De.options.normalize&&(Ye[pe]=Ye[pe].replace(/\s{2,}/g," ").trim()),Ye[pe]=De.options.valueProcessors?Ae(De.options.valueProcessors,Ye[pe],Ue):Ye[pe],Object.keys(Ye).length===1&&pe in Ye&&!De.EXPLICIT_CHARKEY&&(Ye=Ye[pe])),Se(Ye)&&(typeof De.options.emptyTag=="function"?Ye=De.options.emptyTag():Ye=De.options.emptyTag!==""?De.options.emptyTag:Te),De.options.validator!=null&&(lt="/"+function(){var ft,St,qe;for(qe=[],ft=0,St=je.length;ft<St;ft++)Be=je[ft],qe.push(Be["#name"]);return qe}().concat(Ue).join("/"),function(){var ft;try{return Ye=De.options.validator(lt,ot&&ot[Ue],Ye)}catch(St){return ft=St,De.emit("error",ft)}}()),De.options.explicitChildren&&!De.options.mergeAttrs&&typeof Ye=="object"){if(!De.options.preserveChildrenOrder)Be={},De.options.attrkey in Ye&&(Be[De.options.attrkey]=Ye[De.options.attrkey],delete Ye[De.options.attrkey]),!De.options.charsAsChildren&&De.options.charkey in Ye&&(Be[De.options.charkey]=Ye[De.options.charkey],delete Ye[De.options.charkey]),Object.getOwnPropertyNames(Ye).length>0&&(Be[De.options.childkey]=Ye),Ye=Be;else if(ot){ot[De.options.childkey]=ot[De.options.childkey]||[],Ve={};for(Me in Ye)se.call(Ye,Me)&&Ee(Ve,Me,Ye[Me]);ot[De.options.childkey].push(Ve),delete Ye["#name"],Object.keys(Ye).length===1&&pe in Ye&&!De.EXPLICIT_CHARKEY&&(Ye=Ye[pe])}}return je.length>0?De.assignOrPush(ot,Ue,Ye):(De.options.explicitRoot&&(Ze=Ye,Ye={},Ee(Ye,Ue,Ze)),De.resultObject=Ye,De.saxParser.ended=!0,De.emit("end",De.resultObject))}}(this),xe=function(De){return function(Fe){var Te,Me;if(Me=je[je.length-1],Me)return Me[pe]+=Fe,De.options.explicitChildren&&De.options.preserveChildrenOrder&&De.options.charsAsChildren&&(De.options.includeWhiteChars||Fe.replace(/\\n/g,"").trim()!=="")&&(Me[De.options.childkey]=Me[De.options.childkey]||[],Te={"#name":"__text__"},Te[pe]=Fe,De.options.normalize&&(Te[pe]=Te[pe].replace(/\s{2,}/g," ").trim()),Me[De.options.childkey].push(Te)),Me}}(this),this.saxParser.ontext=xe,this.saxParser.oncdata=function(De){return function(Fe){var Te;if(Te=xe(Fe),Te)return Te.cdata=!0}}(this)},le.prototype.parseString=function(ce,pe){var xe;pe!=null&&typeof pe=="function"&&(this.on("end",function(je){return this.reset(),pe(null,je)}),this.on("error",function(je){return this.reset(),pe(je)}));try{return ce=ce.toString(),ce.trim()===""?(this.emit("end",null),!0):(ce=de.stripBOM(ce),this.options.async?(this.remaining=ce,fe(this.processAsync),this.saxParser):this.saxParser.write(ce).close())}catch(je){if(xe=je,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw xe}else return this.emit("error",xe),this.saxParser.errThrown=!0}},le.prototype.parseStringPromise=function(ce){return new Promise(function(pe){return function(xe,je){return pe.parseString(ce,function(De,Fe){return De?je(De):xe(Fe)})}}(this))},le}(ke),Re.parseString=function(ie,le,ce){var pe,xe,je;return ce!=null?(typeof ce=="function"&&(pe=ce),typeof le=="object"&&(xe=le)):(typeof le=="function"&&(pe=le),xe={}),je=new Re.Parser(xe),je.parseString(ie,pe)},Re.parseStringPromise=function(ie,le){var ce,pe;return typeof le=="object"&&(ce=le),pe=new Re.Parser(ce),pe.parseStringPromise(ie)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(oe,He,Re){(function(){"use strict";var de;de=new RegExp(/(?!xmlns)^.*:/),Re.normalize=function(ve){return ve.toLowerCase()},Re.firstCharLowerCase=function(ve){return ve.charAt(0).toLowerCase()+ve.slice(1)},Re.stripPrefix=function(ve){return ve.replace(de,"")},Re.parseNumbers=function(ve){return isNaN(ve)||(ve=ve%1===0?parseInt(ve,10):parseFloat(ve)),ve},Re.parseBooleans=function(ve){return/^(?:true|false)$/i.test(ve)&&(ve=ve.toLowerCase()==="true"),ve}}).call(this)},{}],426:[function(oe,He,Re){(function(){"use strict";var de,ve,Ee,ke,Se=function(me,Pe){for(var fe in Pe)Ae.call(Pe,fe)&&(me[fe]=Pe[fe]);function z(){this.constructor=me}return z.prototype=Pe.prototype,me.prototype=new z,me.__super__=Pe.prototype,me},Ae={}.hasOwnProperty;ve=oe("./defaults"),de=oe("./builder"),Ee=oe("./parser"),ke=oe("./processors"),Re.defaults=ve.defaults,Re.processors=ke,Re.ValidationError=function(me){Se(Pe,me);function Pe(fe){this.message=fe}return Pe}(Error),Re.Builder=de.Builder,Re.Parser=Ee.Parser,Re.parseString=Ee.parseString,Re.parseStringPromise=Ee.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(oe,He,Re){(function(){He.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(oe,He,Re){(function(){He.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],429:[function(oe,He,Re){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe=[].slice,fe={}.hasOwnProperty;de=function(){var z,te,se,ie,le,ce;if(ce=arguments[0],le=2<=arguments.length?Pe.call(arguments,1):[],Se(Object.assign))Object.assign.apply(null,arguments);else for(z=0,se=le.length;z<se;z++)if(ie=le[z],ie!=null)for(te in ie)fe.call(ie,te)&&(ce[te]=ie[te]);return ce},Se=function(z){return!!z&&Object.prototype.toString.call(z)==="[object Function]"},Ae=function(z){var te;return!!z&&((te=typeof z)=="function"||te==="object")},Ee=function(z){return Se(Array.isArray)?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"},ke=function(z){var te;if(Ee(z))return!z.length;for(te in z)if(fe.call(z,te))return!1;return!0},me=function(z){var te,se;return Ae(z)&&(se=Object.getPrototypeOf(z))&&(te=se.constructor)&&typeof te=="function"&&te instanceof te&&Function.prototype.toString.call(te)===Function.prototype.toString.call(Object)},ve=function(z){return Se(z.valueOf)?z.valueOf():z},He.exports.assign=de,He.exports.isFunction=Se,He.exports.isObject=Ae,He.exports.isArray=Ee,He.exports.isEmpty=ke,He.exports.isPlainObject=me,He.exports.getValue=ve}).call(this)},{}],430:[function(oe,He,Re){(function(){He.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(oe,He,Re){(function(){var de,ve,Ee;de=oe("./NodeType"),Ee=oe("./XMLNode"),He.exports=ve=function(){function ke(Se,Ae,me){if(this.parent=Se,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),Ae==null)throw new Error("Missing attribute name. "+this.debugInfo(Ae));this.name=this.stringify.name(Ae),this.value=this.stringify.attValue(me),this.type=de.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(ke.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(ke.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(ke.prototype,"textContent",{get:function(){return this.value},set:function(Se){return this.value=Se||""}}),Object.defineProperty(ke.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(ke.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(ke.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(ke.prototype,"specified",{get:function(){return!0}}),ke.prototype.clone=function(){return Object.create(this)},ke.prototype.toString=function(Se){return this.options.writer.attribute(this,this.options.writer.filterOptions(Se))},ke.prototype.debugInfo=function(Se){return Se=Se||this.name,Se==null?"parent: <"+this.parent.name+">":"attribute: {"+Se+"}, parent: <"+this.parent.name+">"},ke.prototype.isEqualNode=function(Se){return!(Se.namespaceURI!==this.namespaceURI||Se.prefix!==this.prefix||Se.localName!==this.localName||Se.value!==this.value)},ke}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(oe,He,Re){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),Ee=oe("./XMLCharacterData"),He.exports=ve=function(Ae){ke(me,Ae);function me(Pe,fe){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=de.CData,this.value=this.stringify.cdata(fe)}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(Pe){return this.options.writer.cdata(this,this.options.writer.filterOptions(Pe))},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(oe,He,Re){(function(){var de,ve,Ee=function(Se,Ae){for(var me in Ae)ke.call(Ae,me)&&(Se[me]=Ae[me]);function Pe(){this.constructor=Se}return Pe.prototype=Ae.prototype,Se.prototype=new Pe,Se.__super__=Ae.prototype,Se},ke={}.hasOwnProperty;ve=oe("./XMLNode"),He.exports=de=function(Se){Ee(Ae,Se);function Ae(me){Ae.__super__.constructor.call(this,me),this.value=""}return Object.defineProperty(Ae.prototype,"data",{get:function(){return this.value},set:function(me){return this.value=me||""}}),Object.defineProperty(Ae.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(Ae.prototype,"textContent",{get:function(){return this.value},set:function(me){return this.value=me||""}}),Ae.prototype.clone=function(){return Object.create(this)},Ae.prototype.substringData=function(me,Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.appendData=function(me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.insertData=function(me,Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.deleteData=function(me,Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.replaceData=function(me,Pe,fe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.isEqualNode=function(me){return!(!Ae.__super__.isEqualNode.apply(this,arguments).isEqualNode(me)||me.data!==this.data)},Ae}(ve)}).call(this)},{"./XMLNode":450}],434:[function(oe,He,Re){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLCharacterData"),He.exports=Ee=function(Ae){ke(me,Ae);function me(Pe,fe){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=de.Comment,this.value=this.stringify.comment(fe)}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(Pe){return this.options.writer.comment(this,this.options.writer.filterOptions(Pe))},me}(ve)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(oe,He,Re){(function(){var de,ve,Ee;ve=oe("./XMLDOMErrorHandler"),Ee=oe("./XMLDOMStringList"),He.exports=de=function(){function ke(){var Se;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new ve,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Se=Object.create(this.defaultParams)}return Object.defineProperty(ke.prototype,"parameterNames",{get:function(){return new Ee(Object.keys(this.defaultParams))}}),ke.prototype.getParameter=function(Se){return this.params.hasOwnProperty(Se)?this.params[Se]:null},ke.prototype.canSetParameter=function(Se,Ae){return!0},ke.prototype.setParameter=function(Se,Ae){return Ae!=null?this.params[Se]=Ae:delete this.params[Se]},ke}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(oe,He,Re){(function(){var de;He.exports=de=function(){function ve(){}return ve.prototype.handleError=function(Ee){throw new Error(Ee)},ve}()}).call(this)},{}],437:[function(oe,He,Re){(function(){var de;He.exports=de=function(){function ve(){}return ve.prototype.hasFeature=function(Ee,ke){return!0},ve.prototype.createDocumentType=function(Ee,ke,Se){throw new Error("This DOM method is not implemented.")},ve.prototype.createDocument=function(Ee,ke,Se){throw new Error("This DOM method is not implemented.")},ve.prototype.createHTMLDocument=function(Ee){throw new Error("This DOM method is not implemented.")},ve.prototype.getFeature=function(Ee,ke){throw new Error("This DOM method is not implemented.")},ve}()}).call(this)},{}],438:[function(oe,He,Re){(function(){var de;He.exports=de=function(){function ve(Ee){this.arr=Ee||[]}return Object.defineProperty(ve.prototype,"length",{get:function(){return this.arr.length}}),ve.prototype.item=function(Ee){return this.arr[Ee]||null},ve.prototype.contains=function(Ee){return this.arr.indexOf(Ee)!==-1},ve}()}).call(this)},{}],439:[function(oe,He,Re){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),He.exports=ve=function(Ae){ke(me,Ae);function me(Pe,fe,z,te,se,ie){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(z==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(fe));if(!te)throw new Error("Missing DTD attribute type. "+this.debugInfo(fe));if(!se)throw new Error("Missing DTD attribute default. "+this.debugInfo(fe));if(se.indexOf("#")!==0&&(se="#"+se),!se.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(fe));if(ie&&!se.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(fe));this.elementName=this.stringify.name(fe),this.type=de.AttributeDeclaration,this.attributeName=this.stringify.name(z),this.attributeType=this.stringify.dtdAttType(te),ie&&(this.defaultValue=this.stringify.dtdAttDefault(ie)),this.defaultValueType=se}return me.prototype.toString=function(Pe){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(Pe))},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(oe,He,Re){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),He.exports=ve=function(Ae){ke(me,Ae);function me(Pe,fe,z){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing DTD element name. "+this.debugInfo());z||(z="(#PCDATA)"),Array.isArray(z)&&(z="("+z.join(",")+")"),this.name=this.stringify.name(fe),this.type=de.ElementDeclaration,this.value=this.stringify.dtdElementValue(z)}return me.prototype.toString=function(Pe){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(Pe))},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(oe,He,Re){(function(){var de,ve,Ee,ke,Se=function(me,Pe){for(var fe in Pe)Ae.call(Pe,fe)&&(me[fe]=Pe[fe]);function z(){this.constructor=me}return z.prototype=Pe.prototype,me.prototype=new z,me.__super__=Pe.prototype,me},Ae={}.hasOwnProperty;ke=oe("./Utility").isObject,Ee=oe("./XMLNode"),de=oe("./NodeType"),He.exports=ve=function(me){Se(Pe,me);function Pe(fe,z,te,se){if(Pe.__super__.constructor.call(this,fe),te==null)throw new Error("Missing DTD entity name. "+this.debugInfo(te));if(se==null)throw new Error("Missing DTD entity value. "+this.debugInfo(te));if(this.pe=!!z,this.name=this.stringify.name(te),this.type=de.EntityDeclaration,!ke(se))this.value=this.stringify.dtdEntityValue(se),this.internal=!0;else{if(!se.pubID&&!se.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(te));if(se.pubID&&!se.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(te));if(this.internal=!1,se.pubID!=null&&(this.pubID=this.stringify.dtdPubID(se.pubID)),se.sysID!=null&&(this.sysID=this.stringify.dtdSysID(se.sysID)),se.nData!=null&&(this.nData=this.stringify.dtdNData(se.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(te))}}return Object.defineProperty(Pe.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(Pe.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(Pe.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(Pe.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(Pe.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(Pe.prototype,"xmlVersion",{get:function(){return null}}),Pe.prototype.toString=function(fe){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(fe))},Pe}(Ee)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(oe,He,Re){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),He.exports=ve=function(Ae){ke(me,Ae);function me(Pe,fe,z){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing DTD notation name. "+this.debugInfo(fe));if(!z.pubID&&!z.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(fe));this.name=this.stringify.name(fe),this.type=de.NotationDeclaration,z.pubID!=null&&(this.pubID=this.stringify.dtdPubID(z.pubID)),z.sysID!=null&&(this.sysID=this.stringify.dtdSysID(z.sysID))}return Object.defineProperty(me.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(me.prototype,"systemId",{get:function(){return this.sysID}}),me.prototype.toString=function(Pe){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(Pe))},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(oe,He,Re){(function(){var de,ve,Ee,ke,Se=function(me,Pe){for(var fe in Pe)Ae.call(Pe,fe)&&(me[fe]=Pe[fe]);function z(){this.constructor=me}return z.prototype=Pe.prototype,me.prototype=new z,me.__super__=Pe.prototype,me},Ae={}.hasOwnProperty;ke=oe("./Utility").isObject,Ee=oe("./XMLNode"),de=oe("./NodeType"),He.exports=ve=function(me){Se(Pe,me);function Pe(fe,z,te,se){var ie;Pe.__super__.constructor.call(this,fe),ke(z)&&(ie=z,z=ie.version,te=ie.encoding,se=ie.standalone),z||(z="1.0"),this.type=de.Declaration,this.version=this.stringify.xmlVersion(z),te!=null&&(this.encoding=this.stringify.xmlEncoding(te)),se!=null&&(this.standalone=this.stringify.xmlStandalone(se))}return Pe.prototype.toString=function(fe){return this.options.writer.declaration(this,this.options.writer.filterOptions(fe))},Pe}(Ee)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(oe,He,Re){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z=function(se,ie){for(var le in ie)te.call(ie,le)&&(se[le]=ie[le]);function ce(){this.constructor=se}return ce.prototype=ie.prototype,se.prototype=new ce,se.__super__=ie.prototype,se},te={}.hasOwnProperty;fe=oe("./Utility").isObject,Pe=oe("./XMLNode"),de=oe("./NodeType"),ve=oe("./XMLDTDAttList"),ke=oe("./XMLDTDEntity"),Ee=oe("./XMLDTDElement"),Se=oe("./XMLDTDNotation"),me=oe("./XMLNamedNodeMap"),He.exports=Ae=function(se){z(ie,se);function ie(le,ce,pe){var xe,je,De,Fe,Te,Me;if(ie.__super__.constructor.call(this,le),this.type=de.DocType,le.children){for(Fe=le.children,je=0,De=Fe.length;je<De;je++)if(xe=Fe[je],xe.type===de.Element){this.name=xe.name;break}}this.documentObject=le,fe(ce)&&(Te=ce,ce=Te.pubID,pe=Te.sysID),pe==null&&(Me=[ce,pe],pe=Me[0],ce=Me[1]),ce!=null&&(this.pubID=this.stringify.dtdPubID(ce)),pe!=null&&(this.sysID=this.stringify.dtdSysID(pe))}return Object.defineProperty(ie.prototype,"entities",{get:function(){var le,ce,pe,xe,je;for(xe={},je=this.children,ce=0,pe=je.length;ce<pe;ce++)le=je[ce],le.type===de.EntityDeclaration&&!le.pe&&(xe[le.name]=le);return new me(xe)}}),Object.defineProperty(ie.prototype,"notations",{get:function(){var le,ce,pe,xe,je;for(xe={},je=this.children,ce=0,pe=je.length;ce<pe;ce++)le=je[ce],le.type===de.NotationDeclaration&&(xe[le.name]=le);return new me(xe)}}),Object.defineProperty(ie.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(ie.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(ie.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),ie.prototype.element=function(le,ce){var pe;return pe=new Ee(this,le,ce),this.children.push(pe),this},ie.prototype.attList=function(le,ce,pe,xe,je){var De;return De=new ve(this,le,ce,pe,xe,je),this.children.push(De),this},ie.prototype.entity=function(le,ce){var pe;return pe=new ke(this,!1,le,ce),this.children.push(pe),this},ie.prototype.pEntity=function(le,ce){var pe;return pe=new ke(this,!0,le,ce),this.children.push(pe),this},ie.prototype.notation=function(le,ce){var pe;return pe=new Se(this,le,ce),this.children.push(pe),this},ie.prototype.toString=function(le){return this.options.writer.docType(this,this.options.writer.filterOptions(le))},ie.prototype.ele=function(le,ce){return this.element(le,ce)},ie.prototype.att=function(le,ce,pe,xe,je){return this.attList(le,ce,pe,xe,je)},ie.prototype.ent=function(le,ce){return this.entity(le,ce)},ie.prototype.pent=function(le,ce){return this.pEntity(le,ce)},ie.prototype.not=function(le,ce){return this.notation(le,ce)},ie.prototype.up=function(){return this.root()||this.documentObject},ie.prototype.isEqualNode=function(le){return!(!ie.__super__.isEqualNode.apply(this,arguments).isEqualNode(le)||le.name!==this.name||le.publicId!==this.publicId||le.systemId!==this.systemId)},ie}(Pe)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(oe,He,Re){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe=function(te,se){for(var ie in se)z.call(se,ie)&&(te[ie]=se[ie]);function le(){this.constructor=te}return le.prototype=se.prototype,te.prototype=new le,te.__super__=se.prototype,te},z={}.hasOwnProperty;Pe=oe("./Utility").isPlainObject,Ee=oe("./XMLDOMImplementation"),ve=oe("./XMLDOMConfiguration"),Se=oe("./XMLNode"),de=oe("./NodeType"),me=oe("./XMLStringifier"),Ae=oe("./XMLStringWriter"),He.exports=ke=function(te){fe(se,te);function se(ie){se.__super__.constructor.call(this,null),this.name="#document",this.type=de.Document,this.documentURI=null,this.domConfig=new ve,ie||(ie={}),ie.writer||(ie.writer=new Ae),this.options=ie,this.stringify=new me(ie)}return Object.defineProperty(se.prototype,"implementation",{value:new Ee}),Object.defineProperty(se.prototype,"doctype",{get:function(){var ie,le,ce,pe;for(pe=this.children,le=0,ce=pe.length;le<ce;le++)if(ie=pe[le],ie.type===de.DocType)return ie;return null}}),Object.defineProperty(se.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(se.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(se.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(se.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===de.Declaration?this.children[0].encoding:null}}),Object.defineProperty(se.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===de.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(se.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===de.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(se.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(se.prototype,"origin",{get:function(){return null}}),Object.defineProperty(se.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(se.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(se.prototype,"contentType",{get:function(){return null}}),se.prototype.end=function(ie){var le;return le={},ie?Pe(ie)&&(le=ie,ie=this.options.writer):ie=this.options.writer,ie.document(this,ie.filterOptions(le))},se.prototype.toString=function(ie){return this.options.writer.document(this,this.options.writer.filterOptions(ie))},se.prototype.createElement=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createTextNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createComment=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createCDATASection=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createProcessingInstruction=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createAttribute=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createEntityReference=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.getElementsByTagName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.importNode=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createElementNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createAttributeNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.getElementsByTagNameNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.getElementById=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.adoptNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.renameNode=function(ie,le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.getElementsByClassName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createEvent=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createNodeIterator=function(ie,le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createTreeWalker=function(ie,le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},se}(Se)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(oe,He,Re){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z,te,se,ie,le,ce,pe,xe,je,De,Fe,Te,Me,Be,Ue,Ye={}.hasOwnProperty;Ue=oe("./Utility"),Me=Ue.isObject,Te=Ue.isFunction,Be=Ue.isPlainObject,Fe=Ue.getValue,de=oe("./NodeType"),se=oe("./XMLDocument"),le=oe("./XMLElement"),ke=oe("./XMLCData"),Se=oe("./XMLComment"),pe=oe("./XMLRaw"),De=oe("./XMLText"),ce=oe("./XMLProcessingInstruction"),z=oe("./XMLDeclaration"),te=oe("./XMLDocType"),Ae=oe("./XMLDTDAttList"),Pe=oe("./XMLDTDEntity"),me=oe("./XMLDTDElement"),fe=oe("./XMLDTDNotation"),Ee=oe("./XMLAttribute"),je=oe("./XMLStringifier"),xe=oe("./XMLStringWriter"),ve=oe("./WriterState"),He.exports=ie=function(){function Ve(Ze,ot,lt){var ft;this.name="?xml",this.type=de.Document,Ze||(Ze={}),ft={},Ze.writer?Be(Ze.writer)&&(ft=Ze.writer,Ze.writer=new xe):Ze.writer=new xe,this.options=Ze,this.writer=Ze.writer,this.writerOptions=this.writer.filterOptions(ft),this.stringify=new je(Ze),this.onDataCallback=ot||function(){},this.onEndCallback=lt||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Ve.prototype.createChildNode=function(Ze){var ot,lt,ft,St,qe,rt,wt,Ct;switch(Ze.type){case de.CData:this.cdata(Ze.value);break;case de.Comment:this.comment(Ze.value);break;case de.Element:ft={},wt=Ze.attribs;for(lt in wt)Ye.call(wt,lt)&&(ot=wt[lt],ft[lt]=ot.value);this.node(Ze.name,ft);break;case de.Dummy:this.dummy();break;case de.Raw:this.raw(Ze.value);break;case de.Text:this.text(Ze.value);break;case de.ProcessingInstruction:this.instruction(Ze.target,Ze.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+Ze.constructor.name)}for(Ct=Ze.children,qe=0,rt=Ct.length;qe<rt;qe++)St=Ct[qe],this.createChildNode(St),St.type===de.Element&&this.up();return this},Ve.prototype.dummy=function(){return this},Ve.prototype.node=function(Ze,ot,lt){var ft;if(Ze==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(Ze));return this.openCurrent(),Ze=Fe(Ze),ot==null&&(ot={}),ot=Fe(ot),Me(ot)||(ft=[ot,lt],lt=ft[0],ot=ft[1]),this.currentNode=new le(this,Ze,ot),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,lt!=null&&this.text(lt),this},Ve.prototype.element=function(Ze,ot,lt){var ft,St,qe,rt,wt,Ct;if(this.currentNode&&this.currentNode.type===de.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Ze)||Me(Ze)||Te(Ze))for(rt=this.options.noValidation,this.options.noValidation=!0,Ct=new se(this.options).element("TEMP_ROOT"),Ct.element(Ze),this.options.noValidation=rt,wt=Ct.children,St=0,qe=wt.length;St<qe;St++)ft=wt[St],this.createChildNode(ft),ft.type===de.Element&&this.up();else this.node(Ze,ot,lt);return this},Ve.prototype.attribute=function(Ze,ot){var lt,ft;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Ze));if(Ze!=null&&(Ze=Fe(Ze)),Me(Ze))for(lt in Ze)Ye.call(Ze,lt)&&(ft=Ze[lt],this.attribute(lt,ft));else Te(ot)&&(ot=ot.apply()),this.options.keepNullAttributes&&ot==null?this.currentNode.attribs[Ze]=new Ee(this,Ze,""):ot!=null&&(this.currentNode.attribs[Ze]=new Ee(this,Ze,ot));return this},Ve.prototype.text=function(Ze){var ot;return this.openCurrent(),ot=new De(this,Ze),this.onData(this.writer.text(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ve.prototype.cdata=function(Ze){var ot;return this.openCurrent(),ot=new ke(this,Ze),this.onData(this.writer.cdata(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ve.prototype.comment=function(Ze){var ot;return this.openCurrent(),ot=new Se(this,Ze),this.onData(this.writer.comment(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ve.prototype.raw=function(Ze){var ot;return this.openCurrent(),ot=new pe(this,Ze),this.onData(this.writer.raw(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ve.prototype.instruction=function(Ze,ot){var lt,ft,St,qe,rt;if(this.openCurrent(),Ze!=null&&(Ze=Fe(Ze)),ot!=null&&(ot=Fe(ot)),Array.isArray(Ze))for(lt=0,qe=Ze.length;lt<qe;lt++)ft=Ze[lt],this.instruction(ft);else if(Me(Ze))for(ft in Ze)Ye.call(Ze,ft)&&(St=Ze[ft],this.instruction(ft,St));else Te(ot)&&(ot=ot.apply()),rt=new ce(this,Ze,ot),this.onData(this.writer.processingInstruction(rt,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},Ve.prototype.declaration=function(Ze,ot,lt){var ft;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ft=new z(this,Ze,ot,lt),this.onData(this.writer.declaration(ft,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ve.prototype.doctype=function(Ze,ot,lt){if(this.openCurrent(),Ze==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new te(this,ot,lt),this.currentNode.rootNodeName=Ze,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Ve.prototype.dtdElement=function(Ze,ot){var lt;return this.openCurrent(),lt=new me(this,Ze,ot),this.onData(this.writer.dtdElement(lt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ve.prototype.attList=function(Ze,ot,lt,ft,St){var qe;return this.openCurrent(),qe=new Ae(this,Ze,ot,lt,ft,St),this.onData(this.writer.dtdAttList(qe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ve.prototype.entity=function(Ze,ot){var lt;return this.openCurrent(),lt=new Pe(this,!1,Ze,ot),this.onData(this.writer.dtdEntity(lt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ve.prototype.pEntity=function(Ze,ot){var lt;return this.openCurrent(),lt=new Pe(this,!0,Ze,ot),this.onData(this.writer.dtdEntity(lt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ve.prototype.notation=function(Ze,ot){var lt;return this.openCurrent(),lt=new fe(this,Ze,ot),this.onData(this.writer.dtdNotation(lt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ve.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},Ve.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Ve.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Ve.prototype.openNode=function(Ze){var ot,lt,ft,St;if(!Ze.isOpen){if(!this.root&&this.currentLevel===0&&Ze.type===de.Element&&(this.root=Ze),lt="",Ze.type===de.Element){this.writerOptions.state=ve.OpenTag,lt=this.writer.indent(Ze,this.writerOptions,this.currentLevel)+"<"+Ze.name,St=Ze.attribs;for(ft in St)Ye.call(St,ft)&&(ot=St[ft],lt+=this.writer.attribute(ot,this.writerOptions,this.currentLevel));lt+=(Ze.children?">":"/>")+this.writer.endline(Ze,this.writerOptions,this.currentLevel),this.writerOptions.state=ve.InsideTag}else this.writerOptions.state=ve.OpenTag,lt=this.writer.indent(Ze,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+Ze.rootNodeName,Ze.pubID&&Ze.sysID?lt+=' PUBLIC "'+Ze.pubID+'" "'+Ze.sysID+'"':Ze.sysID&&(lt+=' SYSTEM "'+Ze.sysID+'"'),Ze.children?(lt+=" [",this.writerOptions.state=ve.InsideTag):(this.writerOptions.state=ve.CloseTag,lt+=">"),lt+=this.writer.endline(Ze,this.writerOptions,this.currentLevel);return this.onData(lt,this.currentLevel),Ze.isOpen=!0}},Ve.prototype.closeNode=function(Ze){var ot;if(!Ze.isClosed)return ot="",this.writerOptions.state=ve.CloseTag,Ze.type===de.Element?ot=this.writer.indent(Ze,this.writerOptions,this.currentLevel)+"</"+Ze.name+">"+this.writer.endline(Ze,this.writerOptions,this.currentLevel):ot=this.writer.indent(Ze,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(Ze,this.writerOptions,this.currentLevel),this.writerOptions.state=ve.None,this.onData(ot,this.currentLevel),Ze.isClosed=!0},Ve.prototype.onData=function(Ze,ot){return this.documentStarted=!0,this.onDataCallback(Ze,ot+1)},Ve.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Ve.prototype.debugInfo=function(Ze){return Ze==null?"":"node: <"+Ze+">"},Ve.prototype.ele=function(){return this.element.apply(this,arguments)},Ve.prototype.nod=function(Ze,ot,lt){return this.node(Ze,ot,lt)},Ve.prototype.txt=function(Ze){return this.text(Ze)},Ve.prototype.dat=function(Ze){return this.cdata(Ze)},Ve.prototype.com=function(Ze){return this.comment(Ze)},Ve.prototype.ins=function(Ze,ot){return this.instruction(Ze,ot)},Ve.prototype.dec=function(Ze,ot,lt){return this.declaration(Ze,ot,lt)},Ve.prototype.dtd=function(Ze,ot,lt){return this.doctype(Ze,ot,lt)},Ve.prototype.e=function(Ze,ot,lt){return this.element(Ze,ot,lt)},Ve.prototype.n=function(Ze,ot,lt){return this.node(Ze,ot,lt)},Ve.prototype.t=function(Ze){return this.text(Ze)},Ve.prototype.d=function(Ze){return this.cdata(Ze)},Ve.prototype.c=function(Ze){return this.comment(Ze)},Ve.prototype.r=function(Ze){return this.raw(Ze)},Ve.prototype.i=function(Ze,ot){return this.instruction(Ze,ot)},Ve.prototype.att=function(){return this.currentNode&&this.currentNode.type===de.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ve.prototype.a=function(){return this.currentNode&&this.currentNode.type===de.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ve.prototype.ent=function(Ze,ot){return this.entity(Ze,ot)},Ve.prototype.pent=function(Ze,ot){return this.pEntity(Ze,ot)},Ve.prototype.not=function(Ze,ot){return this.notation(Ze,ot)},Ve}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLAttribute":431,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDocument":445,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLStringWriter":455,"./XMLStringifier":456,"./XMLText":457}],447:[function(oe,He,Re){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),He.exports=ve=function(Ae){ke(me,Ae);function me(Pe){me.__super__.constructor.call(this,Pe),this.type=de.Dummy}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(Pe){return""},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(oe,He,Re){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z=function(se,ie){for(var le in ie)te.call(ie,le)&&(se[le]=ie[le]);function ce(){this.constructor=se}return ce.prototype=ie.prototype,se.prototype=new ce,se.__super__=ie.prototype,se},te={}.hasOwnProperty;fe=oe("./Utility"),Pe=fe.isObject,me=fe.isFunction,Ae=fe.getValue,Se=oe("./XMLNode"),de=oe("./NodeType"),ve=oe("./XMLAttribute"),ke=oe("./XMLNamedNodeMap"),He.exports=Ee=function(se){z(ie,se);function ie(le,ce,pe){var xe,je,De,Fe;if(ie.__super__.constructor.call(this,le),ce==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(ce),this.type=de.Element,this.attribs={},this.schemaTypeInfo=null,pe!=null&&this.attribute(pe),le.type===de.Document&&(this.isRoot=!0,this.documentObject=le,le.rootObject=this,le.children)){for(Fe=le.children,je=0,De=Fe.length;je<De;je++)if(xe=Fe[je],xe.type===de.DocType){xe.name=this.name;break}}}return Object.defineProperty(ie.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(ie.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(ie.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(ie.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(ie.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new ke(this.attribs)),this.attributeMap}}),ie.prototype.clone=function(){var le,ce,pe,xe;pe=Object.create(this),pe.isRoot&&(pe.documentObject=null),pe.attribs={},xe=this.attribs;for(ce in xe)te.call(xe,ce)&&(le=xe[ce],pe.attribs[ce]=le.clone());return pe.children=[],this.children.forEach(function(je){var De;return De=je.clone(),De.parent=pe,pe.children.push(De)}),pe},ie.prototype.attribute=function(le,ce){var pe,xe;if(le!=null&&(le=Ae(le)),Pe(le))for(pe in le)te.call(le,pe)&&(xe=le[pe],this.attribute(pe,xe));else me(ce)&&(ce=ce.apply()),this.options.keepNullAttributes&&ce==null?this.attribs[le]=new ve(this,le,""):ce!=null&&(this.attribs[le]=new ve(this,le,ce));return this},ie.prototype.removeAttribute=function(le){var ce,pe,xe;if(le==null)throw new Error("Missing attribute name. "+this.debugInfo());if(le=Ae(le),Array.isArray(le))for(pe=0,xe=le.length;pe<xe;pe++)ce=le[pe],delete this.attribs[ce];else delete this.attribs[le];return this},ie.prototype.toString=function(le){return this.options.writer.element(this,this.options.writer.filterOptions(le))},ie.prototype.att=function(le,ce){return this.attribute(le,ce)},ie.prototype.a=function(le,ce){return this.attribute(le,ce)},ie.prototype.getAttribute=function(le){return this.attribs.hasOwnProperty(le)?this.attribs[le].value:null},ie.prototype.setAttribute=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNode=function(le){return this.attribs.hasOwnProperty(le)?this.attribs[le]:null},ie.prototype.setAttributeNode=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.removeAttributeNode=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNS=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setAttributeNS=function(le,ce,pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.removeAttributeNS=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNodeNS=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setAttributeNodeNS=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagNameNS=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.hasAttribute=function(le){return this.attribs.hasOwnProperty(le)},ie.prototype.hasAttributeNS=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setIdAttribute=function(le,ce){return this.attribs.hasOwnProperty(le)?this.attribs[le].isId:ce},ie.prototype.setIdAttributeNS=function(le,ce,pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setIdAttributeNode=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagNameNS=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByClassName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.isEqualNode=function(le){var ce,pe,xe;if(!ie.__super__.isEqualNode.apply(this,arguments).isEqualNode(le)||le.namespaceURI!==this.namespaceURI||le.prefix!==this.prefix||le.localName!==this.localName||le.attribs.length!==this.attribs.length)return!1;for(ce=pe=0,xe=this.attribs.length-1;0<=xe?pe<=xe:pe>=xe;ce=0<=xe?++pe:--pe)if(!this.attribs[ce].isEqualNode(le.attribs[ce]))return!1;return!0},ie}(Se)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(oe,He,Re){(function(){var de;He.exports=de=function(){function ve(Ee){this.nodes=Ee}return Object.defineProperty(ve.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),ve.prototype.clone=function(){return this.nodes=null},ve.prototype.getNamedItem=function(Ee){return this.nodes[Ee]},ve.prototype.setNamedItem=function(Ee){var ke;return ke=this.nodes[Ee.nodeName],this.nodes[Ee.nodeName]=Ee,ke||null},ve.prototype.removeNamedItem=function(Ee){var ke;return ke=this.nodes[Ee],delete this.nodes[Ee],ke||null},ve.prototype.item=function(Ee){return this.nodes[Object.keys(this.nodes)[Ee]]||null},ve.prototype.getNamedItemNS=function(Ee,ke){throw new Error("This DOM method is not implemented.")},ve.prototype.setNamedItemNS=function(Ee){throw new Error("This DOM method is not implemented.")},ve.prototype.removeNamedItemNS=function(Ee,ke){throw new Error("This DOM method is not implemented.")},ve}()}).call(this)},{}],450:[function(oe,He,Re){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z,te,se,ie,le,ce,pe,xe,je,De,Fe={}.hasOwnProperty;De=oe("./Utility"),je=De.isObject,xe=De.isFunction,pe=De.isEmpty,ce=De.getValue,Pe=null,Ee=null,ke=null,Se=null,Ae=null,ie=null,le=null,se=null,me=null,ve=null,te=null,fe=null,de=null,He.exports=z=function(){function Te(Me){this.parent=Me,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,Pe||(Pe=oe("./XMLElement"),Ee=oe("./XMLCData"),ke=oe("./XMLComment"),Se=oe("./XMLDeclaration"),Ae=oe("./XMLDocType"),ie=oe("./XMLRaw"),le=oe("./XMLText"),se=oe("./XMLProcessingInstruction"),me=oe("./XMLDummy"),ve=oe("./NodeType"),te=oe("./XMLNodeList"),fe=oe("./XMLNamedNodeMap"),de=oe("./DocumentPosition"))}return Object.defineProperty(Te.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(Te.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Te.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(Te.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(Te.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new te(this.children)),this.childNodeList}}),Object.defineProperty(Te.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(Te.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(Te.prototype,"previousSibling",{get:function(){var Me;return Me=this.parent.children.indexOf(this),this.parent.children[Me-1]||null}}),Object.defineProperty(Te.prototype,"nextSibling",{get:function(){var Me;return Me=this.parent.children.indexOf(this),this.parent.children[Me+1]||null}}),Object.defineProperty(Te.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(Te.prototype,"textContent",{get:function(){var Me,Be,Ue,Ye,Ve;if(this.nodeType===ve.Element||this.nodeType===ve.DocumentFragment){for(Ve="",Ye=this.children,Be=0,Ue=Ye.length;Be<Ue;Be++)Me=Ye[Be],Me.textContent&&(Ve+=Me.textContent);return Ve}else return null},set:function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Te.prototype.setParent=function(Me){var Be,Ue,Ye,Ve,Ze;for(this.parent=Me,Me&&(this.options=Me.options,this.stringify=Me.stringify),Ve=this.children,Ze=[],Ue=0,Ye=Ve.length;Ue<Ye;Ue++)Be=Ve[Ue],Ze.push(Be.setParent(this));return Ze},Te.prototype.element=function(Me,Be,Ue){var Ye,Ve,Ze,ot,lt,ft,St,qe,rt,wt,Ct;if(ft=null,Be===null&&Ue==null&&(rt=[{},null],Be=rt[0],Ue=rt[1]),Be==null&&(Be={}),Be=ce(Be),je(Be)||(wt=[Be,Ue],Ue=wt[0],Be=wt[1]),Me!=null&&(Me=ce(Me)),Array.isArray(Me))for(Ze=0,St=Me.length;Ze<St;Ze++)Ve=Me[Ze],ft=this.element(Ve);else if(xe(Me))ft=this.element(Me.apply());else if(je(Me)){for(lt in Me)if(Fe.call(Me,lt))if(Ct=Me[lt],xe(Ct)&&(Ct=Ct.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&<.indexOf(this.stringify.convertAttKey)===0)ft=this.attribute(lt.substr(this.stringify.convertAttKey.length),Ct);else if(!this.options.separateArrayItems&&Array.isArray(Ct)&&pe(Ct))ft=this.dummy();else if(je(Ct)&&pe(Ct))ft=this.element(lt);else if(!this.options.keepNullNodes&&Ct==null)ft=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(Ct))for(ot=0,qe=Ct.length;ot<qe;ot++)Ve=Ct[ot],Ye={},Ye[lt]=Ve,ft=this.element(Ye);else je(Ct)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&<.indexOf(this.stringify.convertTextKey)===0?ft=this.element(Ct):(ft=this.element(lt),ft.element(Ct)):ft=this.element(lt,Ct)}else!this.options.keepNullNodes&&Ue===null?ft=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Me.indexOf(this.stringify.convertTextKey)===0?ft=this.text(Ue):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Me.indexOf(this.stringify.convertCDataKey)===0?ft=this.cdata(Ue):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Me.indexOf(this.stringify.convertCommentKey)===0?ft=this.comment(Ue):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Me.indexOf(this.stringify.convertRawKey)===0?ft=this.raw(Ue):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Me.indexOf(this.stringify.convertPIKey)===0?ft=this.instruction(Me.substr(this.stringify.convertPIKey.length),Ue):ft=this.node(Me,Be,Ue);if(ft==null)throw new Error("Could not create any elements with: "+Me+". "+this.debugInfo());return ft},Te.prototype.insertBefore=function(Me,Be,Ue){var Ye,Ve,Ze,ot,lt;if(Me!=null&&Me.type)return Ze=Me,ot=Be,Ze.setParent(this),ot?(Ve=children.indexOf(ot),lt=children.splice(Ve),children.push(Ze),Array.prototype.push.apply(children,lt)):children.push(Ze),Ze;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Me));return Ve=this.parent.children.indexOf(this),lt=this.parent.children.splice(Ve),Ye=this.parent.element(Me,Be,Ue),Array.prototype.push.apply(this.parent.children,lt),Ye},Te.prototype.insertAfter=function(Me,Be,Ue){var Ye,Ve,Ze;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Me));return Ve=this.parent.children.indexOf(this),Ze=this.parent.children.splice(Ve+1),Ye=this.parent.element(Me,Be,Ue),Array.prototype.push.apply(this.parent.children,Ze),Ye},Te.prototype.remove=function(){var Me,Be;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return Me=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[Me,Me-Me+1].concat(Be=[])),this.parent},Te.prototype.node=function(Me,Be,Ue){var Ye,Ve;return Me!=null&&(Me=ce(Me)),Be||(Be={}),Be=ce(Be),je(Be)||(Ve=[Be,Ue],Ue=Ve[0],Be=Ve[1]),Ye=new Pe(this,Me,Be),Ue!=null&&Ye.text(Ue),this.children.push(Ye),Ye},Te.prototype.text=function(Me){var Be;return je(Me)&&this.element(Me),Be=new le(this,Me),this.children.push(Be),this},Te.prototype.cdata=function(Me){var Be;return Be=new Ee(this,Me),this.children.push(Be),this},Te.prototype.comment=function(Me){var Be;return Be=new ke(this,Me),this.children.push(Be),this},Te.prototype.commentBefore=function(Me){var Be,Ue,Ye;return Ue=this.parent.children.indexOf(this),Ye=this.parent.children.splice(Ue),Be=this.parent.comment(Me),Array.prototype.push.apply(this.parent.children,Ye),this},Te.prototype.commentAfter=function(Me){var Be,Ue,Ye;return Ue=this.parent.children.indexOf(this),Ye=this.parent.children.splice(Ue+1),Be=this.parent.comment(Me),Array.prototype.push.apply(this.parent.children,Ye),this},Te.prototype.raw=function(Me){var Be;return Be=new ie(this,Me),this.children.push(Be),this},Te.prototype.dummy=function(){var Me;return Me=new me(this),Me},Te.prototype.instruction=function(Me,Be){var Ue,Ye,Ve,Ze,ot;if(Me!=null&&(Me=ce(Me)),Be!=null&&(Be=ce(Be)),Array.isArray(Me))for(Ze=0,ot=Me.length;Ze<ot;Ze++)Ue=Me[Ze],this.instruction(Ue);else if(je(Me))for(Ue in Me)Fe.call(Me,Ue)&&(Ye=Me[Ue],this.instruction(Ue,Ye));else xe(Be)&&(Be=Be.apply()),Ve=new se(this,Me,Be),this.children.push(Ve);return this},Te.prototype.instructionBefore=function(Me,Be){var Ue,Ye,Ve;return Ye=this.parent.children.indexOf(this),Ve=this.parent.children.splice(Ye),Ue=this.parent.instruction(Me,Be),Array.prototype.push.apply(this.parent.children,Ve),this},Te.prototype.instructionAfter=function(Me,Be){var Ue,Ye,Ve;return Ye=this.parent.children.indexOf(this),Ve=this.parent.children.splice(Ye+1),Ue=this.parent.instruction(Me,Be),Array.prototype.push.apply(this.parent.children,Ve),this},Te.prototype.declaration=function(Me,Be,Ue){var Ye,Ve;return Ye=this.document(),Ve=new Se(Ye,Me,Be,Ue),Ye.children.length===0?Ye.children.unshift(Ve):Ye.children[0].type===ve.Declaration?Ye.children[0]=Ve:Ye.children.unshift(Ve),Ye.root()||Ye},Te.prototype.dtd=function(Me,Be){var Ue,Ye,Ve,Ze,ot,lt,ft,St,qe,rt;for(Ye=this.document(),Ve=new Ae(Ye,Me,Be),qe=Ye.children,Ze=ot=0,ft=qe.length;ot<ft;Ze=++ot)if(Ue=qe[Ze],Ue.type===ve.DocType)return Ye.children[Ze]=Ve,Ve;for(rt=Ye.children,Ze=lt=0,St=rt.length;lt<St;Ze=++lt)if(Ue=rt[Ze],Ue.isRoot)return Ye.children.splice(Ze,0,Ve),Ve;return Ye.children.push(Ve),Ve},Te.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},Te.prototype.root=function(){var Me;for(Me=this;Me;){if(Me.type===ve.Document)return Me.rootObject;if(Me.isRoot)return Me;Me=Me.parent}},Te.prototype.document=function(){var Me;for(Me=this;Me;){if(Me.type===ve.Document)return Me;Me=Me.parent}},Te.prototype.end=function(Me){return this.document().end(Me)},Te.prototype.prev=function(){var Me;if(Me=this.parent.children.indexOf(this),Me<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[Me-1]},Te.prototype.next=function(){var Me;if(Me=this.parent.children.indexOf(this),Me===-1||Me===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[Me+1]},Te.prototype.importDocument=function(Me){var Be;return Be=Me.root().clone(),Be.parent=this,Be.isRoot=!1,this.children.push(Be),this},Te.prototype.debugInfo=function(Me){var Be,Ue;return Me=Me||this.name,Me==null&&!((Be=this.parent)!=null&&Be.name)?"":Me==null?"parent: <"+this.parent.name+">":(Ue=this.parent)!=null&&Ue.name?"node: <"+Me+">, parent: <"+this.parent.name+">":"node: <"+Me+">"},Te.prototype.ele=function(Me,Be,Ue){return this.element(Me,Be,Ue)},Te.prototype.nod=function(Me,Be,Ue){return this.node(Me,Be,Ue)},Te.prototype.txt=function(Me){return this.text(Me)},Te.prototype.dat=function(Me){return this.cdata(Me)},Te.prototype.com=function(Me){return this.comment(Me)},Te.prototype.ins=function(Me,Be){return this.instruction(Me,Be)},Te.prototype.doc=function(){return this.document()},Te.prototype.dec=function(Me,Be,Ue){return this.declaration(Me,Be,Ue)},Te.prototype.e=function(Me,Be,Ue){return this.element(Me,Be,Ue)},Te.prototype.n=function(Me,Be,Ue){return this.node(Me,Be,Ue)},Te.prototype.t=function(Me){return this.text(Me)},Te.prototype.d=function(Me){return this.cdata(Me)},Te.prototype.c=function(Me){return this.comment(Me)},Te.prototype.r=function(Me){return this.raw(Me)},Te.prototype.i=function(Me,Be){return this.instruction(Me,Be)},Te.prototype.u=function(){return this.up()},Te.prototype.importXMLBuilder=function(Me){return this.importDocument(Me)},Te.prototype.replaceChild=function(Me,Be){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.removeChild=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.appendChild=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.hasChildNodes=function(){return this.children.length!==0},Te.prototype.cloneNode=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.isSupported=function(Me,Be){return!0},Te.prototype.hasAttributes=function(){return this.attribs.length!==0},Te.prototype.compareDocumentPosition=function(Me){var Be,Ue;return Be=this,Be===Me?0:this.document()!==Me.document()?(Ue=de.Disconnected|de.ImplementationSpecific,Math.random()<.5?Ue|=de.Preceding:Ue|=de.Following,Ue):Be.isAncestor(Me)?de.Contains|de.Preceding:Be.isDescendant(Me)?de.Contains|de.Following:Be.isPreceding(Me)?de.Preceding:de.Following},Te.prototype.isSameNode=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.lookupPrefix=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.isDefaultNamespace=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.lookupNamespaceURI=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.isEqualNode=function(Me){var Be,Ue,Ye;if(Me.nodeType!==this.nodeType||Me.children.length!==this.children.length)return!1;for(Be=Ue=0,Ye=this.children.length-1;0<=Ye?Ue<=Ye:Ue>=Ye;Be=0<=Ye?++Ue:--Ue)if(!this.children[Be].isEqualNode(Me.children[Be]))return!1;return!0},Te.prototype.getFeature=function(Me,Be){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.setUserData=function(Me,Be,Ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.getUserData=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.contains=function(Me){return Me?Me===this||this.isDescendant(Me):!1},Te.prototype.isDescendant=function(Me){var Be,Ue,Ye,Ve,Ze;for(Ze=this.children,Ye=0,Ve=Ze.length;Ye<Ve;Ye++)if(Be=Ze[Ye],Me===Be||(Ue=Be.isDescendant(Me),Ue))return!0;return!1},Te.prototype.isAncestor=function(Me){return Me.isDescendant(this)},Te.prototype.isPreceding=function(Me){var Be,Ue;return Be=this.treePosition(Me),Ue=this.treePosition(this),Be===-1||Ue===-1?!1:Be<Ue},Te.prototype.isFollowing=function(Me){var Be,Ue;return Be=this.treePosition(Me),Ue=this.treePosition(this),Be===-1||Ue===-1?!1:Be>Ue},Te.prototype.treePosition=function(Me){var Be,Ue;return Ue=0,Be=!1,this.foreachTreeNode(this.document(),function(Ye){if(Ue++,!Be&&Ye===Me)return Be=!0}),Be?Ue:-1},Te.prototype.foreachTreeNode=function(Me,Be){var Ue,Ye,Ve,Ze,ot;for(Me||(Me=this.document()),Ze=Me.children,Ye=0,Ve=Ze.length;Ye<Ve;Ye++){if(Ue=Ze[Ye],ot=Be(Ue))return ot;if(ot=this.foreachTreeNode(Ue,Be),ot)return ot}},Te}()}).call(this)},{"./DocumentPosition":427,"./NodeType":428,"./Utility":429,"./XMLCData":432,"./XMLComment":434,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLNamedNodeMap":449,"./XMLNodeList":451,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],451:[function(oe,He,Re){(function(){var de;He.exports=de=function(){function ve(Ee){this.nodes=Ee}return Object.defineProperty(ve.prototype,"length",{get:function(){return this.nodes.length||0}}),ve.prototype.clone=function(){return this.nodes=null},ve.prototype.item=function(Ee){return this.nodes[Ee]||null},ve}()}).call(this)},{}],452:[function(oe,He,Re){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLCharacterData"),He.exports=Ee=function(Ae){ke(me,Ae);function me(Pe,fe,z){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=de.ProcessingInstruction,this.target=this.stringify.insTarget(fe),this.name=this.target,z&&(this.value=this.stringify.insValue(z))}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(Pe){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(Pe))},me.prototype.isEqualNode=function(Pe){return!(!me.__super__.isEqualNode.apply(this,arguments).isEqualNode(Pe)||Pe.target!==this.target)},me}(ve)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(oe,He,Re){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLNode"),He.exports=Ee=function(Ae){ke(me,Ae);function me(Pe,fe){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=de.Raw,this.value=this.stringify.raw(fe)}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(Pe){return this.options.writer.raw(this,this.options.writer.filterOptions(Pe))},me}(ve)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(oe,He,Re){(function(){var de,ve,Ee,ke,Se=function(me,Pe){for(var fe in Pe)Ae.call(Pe,fe)&&(me[fe]=Pe[fe]);function z(){this.constructor=me}return z.prototype=Pe.prototype,me.prototype=new z,me.__super__=Pe.prototype,me},Ae={}.hasOwnProperty;de=oe("./NodeType"),ke=oe("./XMLWriterBase"),ve=oe("./WriterState"),He.exports=Ee=function(me){Se(Pe,me);function Pe(fe,z){this.stream=fe,Pe.__super__.constructor.call(this,z)}return Pe.prototype.endline=function(fe,z,te){return fe.isLastRootNode&&z.state===ve.CloseTag?"":Pe.__super__.endline.call(this,fe,z,te)},Pe.prototype.document=function(fe,z){var te,se,ie,le,ce,pe,xe,je,De;for(xe=fe.children,se=ie=0,ce=xe.length;ie<ce;se=++ie)te=xe[se],te.isLastRootNode=se===fe.children.length-1;for(z=this.filterOptions(z),je=fe.children,De=[],le=0,pe=je.length;le<pe;le++)te=je[le],De.push(this.writeChildNode(te,z,0));return De},Pe.prototype.attribute=function(fe,z,te){return this.stream.write(Pe.__super__.attribute.call(this,fe,z,te))},Pe.prototype.cdata=function(fe,z,te){return this.stream.write(Pe.__super__.cdata.call(this,fe,z,te))},Pe.prototype.comment=function(fe,z,te){return this.stream.write(Pe.__super__.comment.call(this,fe,z,te))},Pe.prototype.declaration=function(fe,z,te){return this.stream.write(Pe.__super__.declaration.call(this,fe,z,te))},Pe.prototype.docType=function(fe,z,te){var se,ie,le,ce;if(te||(te=0),this.openNode(fe,z,te),z.state=ve.OpenTag,this.stream.write(this.indent(fe,z,te)),this.stream.write("<!DOCTYPE "+fe.root().name),fe.pubID&&fe.sysID?this.stream.write(' PUBLIC "'+fe.pubID+'" "'+fe.sysID+'"'):fe.sysID&&this.stream.write(' SYSTEM "'+fe.sysID+'"'),fe.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(fe,z,te)),z.state=ve.InsideTag,ce=fe.children,ie=0,le=ce.length;ie<le;ie++)se=ce[ie],this.writeChildNode(se,z,te+1);z.state=ve.CloseTag,this.stream.write("]")}return z.state=ve.CloseTag,this.stream.write(z.spaceBeforeSlash+">"),this.stream.write(this.endline(fe,z,te)),z.state=ve.None,this.closeNode(fe,z,te)},Pe.prototype.element=function(fe,z,te){var se,ie,le,ce,pe,xe,je,De,Fe,Te;te||(te=0),this.openNode(fe,z,te),z.state=ve.OpenTag,this.stream.write(this.indent(fe,z,te)+"<"+fe.name),Fe=fe.attribs;for(je in Fe)Ae.call(Fe,je)&&(se=Fe[je],this.attribute(se,z,te));if(le=fe.children.length,ce=le===0?null:fe.children[0],le===0||fe.children.every(function(Me){return(Me.type===de.Text||Me.type===de.Raw)&&Me.value===""}))z.allowEmpty?(this.stream.write(">"),z.state=ve.CloseTag,this.stream.write("</"+fe.name+">")):(z.state=ve.CloseTag,this.stream.write(z.spaceBeforeSlash+"/>"));else if(z.pretty&&le===1&&(ce.type===de.Text||ce.type===de.Raw)&&ce.value!=null)this.stream.write(">"),z.state=ve.InsideTag,z.suppressPrettyCount++,De=!0,this.writeChildNode(ce,z,te+1),z.suppressPrettyCount--,De=!1,z.state=ve.CloseTag,this.stream.write("</"+fe.name+">");else{for(this.stream.write(">"+this.endline(fe,z,te)),z.state=ve.InsideTag,Te=fe.children,pe=0,xe=Te.length;pe<xe;pe++)ie=Te[pe],this.writeChildNode(ie,z,te+1);z.state=ve.CloseTag,this.stream.write(this.indent(fe,z,te)+"</"+fe.name+">")}return this.stream.write(this.endline(fe,z,te)),z.state=ve.None,this.closeNode(fe,z,te)},Pe.prototype.processingInstruction=function(fe,z,te){return this.stream.write(Pe.__super__.processingInstruction.call(this,fe,z,te))},Pe.prototype.raw=function(fe,z,te){return this.stream.write(Pe.__super__.raw.call(this,fe,z,te))},Pe.prototype.text=function(fe,z,te){return this.stream.write(Pe.__super__.text.call(this,fe,z,te))},Pe.prototype.dtdAttList=function(fe,z,te){return this.stream.write(Pe.__super__.dtdAttList.call(this,fe,z,te))},Pe.prototype.dtdElement=function(fe,z,te){return this.stream.write(Pe.__super__.dtdElement.call(this,fe,z,te))},Pe.prototype.dtdEntity=function(fe,z,te){return this.stream.write(Pe.__super__.dtdEntity.call(this,fe,z,te))},Pe.prototype.dtdNotation=function(fe,z,te){return this.stream.write(Pe.__super__.dtdNotation.call(this,fe,z,te))},Pe}(ke)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(oe,He,Re){(function(){var de,ve,Ee=function(Se,Ae){for(var me in Ae)ke.call(Ae,me)&&(Se[me]=Ae[me]);function Pe(){this.constructor=Se}return Pe.prototype=Ae.prototype,Se.prototype=new Pe,Se.__super__=Ae.prototype,Se},ke={}.hasOwnProperty;ve=oe("./XMLWriterBase"),He.exports=de=function(Se){Ee(Ae,Se);function Ae(me){Ae.__super__.constructor.call(this,me)}return Ae.prototype.document=function(me,Pe){var fe,z,te,se,ie;for(Pe=this.filterOptions(Pe),se="",ie=me.children,z=0,te=ie.length;z<te;z++)fe=ie[z],se+=this.writeChildNode(fe,Pe,0);return Pe.pretty&&se.slice(-Pe.newline.length)===Pe.newline&&(se=se.slice(0,-Pe.newline.length)),se},Ae}(ve)}).call(this)},{"./XMLWriterBase":458}],456:[function(oe,He,Re){(function(){var de,ve=function(ke,Se){return function(){return ke.apply(Se,arguments)}},Ee={}.hasOwnProperty;He.exports=de=function(){function ke(Se){this.assertLegalName=ve(this.assertLegalName,this),this.assertLegalChar=ve(this.assertLegalChar,this);var Ae,me,Pe;Se||(Se={}),this.options=Se,this.options.version||(this.options.version="1.0"),me=Se.stringify||{};for(Ae in me)Ee.call(me,Ae)&&(Pe=me[Ae],this[Ae]=Pe)}return ke.prototype.name=function(Se){return this.options.noValidation?Se:this.assertLegalName(""+Se||"")},ke.prototype.text=function(Se){return this.options.noValidation?Se:this.assertLegalChar(this.textEscape(""+Se||""))},ke.prototype.cdata=function(Se){return this.options.noValidation?Se:(Se=""+Se||"",Se=Se.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(Se))},ke.prototype.comment=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",Se.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+Se);return this.assertLegalChar(Se)},ke.prototype.raw=function(Se){return this.options.noValidation?Se:""+Se||""},ke.prototype.attValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(this.attEscape(Se=""+Se||""))},ke.prototype.insTarget=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.insValue=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",Se.match(/\?>/))throw new Error("Invalid processing instruction value: "+Se);return this.assertLegalChar(Se)},ke.prototype.xmlVersion=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",!Se.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+Se);return Se},ke.prototype.xmlEncoding=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",!Se.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+Se);return this.assertLegalChar(Se)},ke.prototype.xmlStandalone=function(Se){return this.options.noValidation?Se:Se?"yes":"no"},ke.prototype.dtdPubID=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdSysID=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdElementValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdAttType=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdAttDefault=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdEntityValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdNData=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.convertAttKey="@",ke.prototype.convertPIKey="?",ke.prototype.convertTextKey="#text",ke.prototype.convertCDataKey="#cdata",ke.prototype.convertCommentKey="#comment",ke.prototype.convertRawKey="#raw",ke.prototype.assertLegalChar=function(Se){var Ae,me;if(this.options.noValidation)return Se;if(Ae="",this.options.version==="1.0"){if(Ae=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,me=Se.match(Ae))throw new Error("Invalid character in string: "+Se+" at index "+me.index)}else if(this.options.version==="1.1"&&(Ae=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,me=Se.match(Ae)))throw new Error("Invalid character in string: "+Se+" at index "+me.index);return Se},ke.prototype.assertLegalName=function(Se){var Ae;if(this.options.noValidation)return Se;if(this.assertLegalChar(Se),Ae=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!Se.match(Ae))throw new Error("Invalid character in name");return Se},ke.prototype.textEscape=function(Se){var Ae;return this.options.noValidation?Se:(Ae=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(Ae,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},ke.prototype.attEscape=function(Se){var Ae;return this.options.noValidation?Se:(Ae=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(Ae,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},ke}()}).call(this)},{}],457:[function(oe,He,Re){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLCharacterData"),He.exports=Ee=function(Ae){ke(me,Ae);function me(Pe,fe){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=de.Text,this.value=this.stringify.text(fe)}return Object.defineProperty(me.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(me.prototype,"wholeText",{get:function(){var Pe,fe,z;for(z="",fe=this.previousSibling;fe;)z=fe.data+z,fe=fe.previousSibling;for(z+=this.data,Pe=this.nextSibling;Pe;)z=z+Pe.data,Pe=Pe.nextSibling;return z}}),me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(Pe){return this.options.writer.text(this,this.options.writer.filterOptions(Pe))},me.prototype.splitText=function(Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},me.prototype.replaceWholeText=function(Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},me}(ve)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(oe,He,Re){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z,te,se,ie,le,ce,pe,xe,je={}.hasOwnProperty;xe=oe("./Utility").assign,de=oe("./NodeType"),fe=oe("./XMLDeclaration"),z=oe("./XMLDocType"),Ee=oe("./XMLCData"),ke=oe("./XMLComment"),se=oe("./XMLElement"),le=oe("./XMLRaw"),ce=oe("./XMLText"),ie=oe("./XMLProcessingInstruction"),te=oe("./XMLDummy"),Se=oe("./XMLDTDAttList"),Ae=oe("./XMLDTDElement"),me=oe("./XMLDTDEntity"),Pe=oe("./XMLDTDNotation"),ve=oe("./WriterState"),He.exports=pe=function(){function De(Fe){var Te,Me,Be;Fe||(Fe={}),this.options=Fe,Me=Fe.writer||{};for(Te in Me)je.call(Me,Te)&&(Be=Me[Te],this["_"+Te]=this[Te],this[Te]=Be)}return De.prototype.filterOptions=function(Fe){var Te,Me,Be,Ue,Ye,Ve,Ze,ot;return Fe||(Fe={}),Fe=xe({},this.options,Fe),Te={writer:this},Te.pretty=Fe.pretty||!1,Te.allowEmpty=Fe.allowEmpty||!1,Te.indent=(Me=Fe.indent)!=null?Me:" ",Te.newline=(Be=Fe.newline)!=null?Be:`
|
|
`,Te.offset=(Ue=Fe.offset)!=null?Ue:0,Te.dontPrettyTextNodes=(Ye=(Ve=Fe.dontPrettyTextNodes)!=null?Ve:Fe.dontprettytextnodes)!=null?Ye:0,Te.spaceBeforeSlash=(Ze=(ot=Fe.spaceBeforeSlash)!=null?ot:Fe.spacebeforeslash)!=null?Ze:"",Te.spaceBeforeSlash===!0&&(Te.spaceBeforeSlash=" "),Te.suppressPrettyCount=0,Te.user={},Te.state=ve.None,Te},De.prototype.indent=function(Fe,Te,Me){var Be;return!Te.pretty||Te.suppressPrettyCount?"":Te.pretty&&(Be=(Me||0)+Te.offset+1,Be>0)?new Array(Be).join(Te.indent):""},De.prototype.endline=function(Fe,Te,Me){return!Te.pretty||Te.suppressPrettyCount?"":Te.newline},De.prototype.attribute=function(Fe,Te,Me){var Be;return this.openAttribute(Fe,Te,Me),Be=" "+Fe.name+'="'+Fe.value+'"',this.closeAttribute(Fe,Te,Me),Be},De.prototype.cdata=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<![CDATA[",Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+="]]>"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.comment=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!-- ",Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+=" -->"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.declaration=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<?xml",Te.state=ve.InsideTag,Be+=' version="'+Fe.version+'"',Fe.encoding!=null&&(Be+=' encoding="'+Fe.encoding+'"'),Fe.standalone!=null&&(Be+=' standalone="'+Fe.standalone+'"'),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+"?>",Be+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.docType=function(Fe,Te,Me){var Be,Ue,Ye,Ve,Ze;if(Me||(Me=0),this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Ve=this.indent(Fe,Te,Me),Ve+="<!DOCTYPE "+Fe.root().name,Fe.pubID&&Fe.sysID?Ve+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Ve+=' SYSTEM "'+Fe.sysID+'"'),Fe.children.length>0){for(Ve+=" [",Ve+=this.endline(Fe,Te,Me),Te.state=ve.InsideTag,Ze=Fe.children,Ue=0,Ye=Ze.length;Ue<Ye;Ue++)Be=Ze[Ue],Ve+=this.writeChildNode(Be,Te,Me+1);Te.state=ve.CloseTag,Ve+="]"}return Te.state=ve.CloseTag,Ve+=Te.spaceBeforeSlash+">",Ve+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Ve},De.prototype.element=function(Fe,Te,Me){var Be,Ue,Ye,Ve,Ze,ot,lt,ft,St,qe,rt,wt,Ct,bt;Me||(Me=0),qe=!1,rt="",this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,rt+=this.indent(Fe,Te,Me)+"<"+Fe.name,wt=Fe.attribs;for(St in wt)je.call(wt,St)&&(Be=wt[St],rt+=this.attribute(Be,Te,Me));if(Ye=Fe.children.length,Ve=Ye===0?null:Fe.children[0],Ye===0||Fe.children.every(function(ct){return(ct.type===de.Text||ct.type===de.Raw)&&ct.value===""}))Te.allowEmpty?(rt+=">",Te.state=ve.CloseTag,rt+="</"+Fe.name+">"+this.endline(Fe,Te,Me)):(Te.state=ve.CloseTag,rt+=Te.spaceBeforeSlash+"/>"+this.endline(Fe,Te,Me));else if(Te.pretty&&Ye===1&&(Ve.type===de.Text||Ve.type===de.Raw)&&Ve.value!=null)rt+=">",Te.state=ve.InsideTag,Te.suppressPrettyCount++,qe=!0,rt+=this.writeChildNode(Ve,Te,Me+1),Te.suppressPrettyCount--,qe=!1,Te.state=ve.CloseTag,rt+="</"+Fe.name+">"+this.endline(Fe,Te,Me);else{if(Te.dontPrettyTextNodes){for(Ct=Fe.children,Ze=0,lt=Ct.length;Ze<lt;Ze++)if(Ue=Ct[Ze],(Ue.type===de.Text||Ue.type===de.Raw)&&Ue.value!=null){Te.suppressPrettyCount++,qe=!0;break}}for(rt+=">"+this.endline(Fe,Te,Me),Te.state=ve.InsideTag,bt=Fe.children,ot=0,ft=bt.length;ot<ft;ot++)Ue=bt[ot],rt+=this.writeChildNode(Ue,Te,Me+1);Te.state=ve.CloseTag,rt+=this.indent(Fe,Te,Me)+"</"+Fe.name+">",qe&&Te.suppressPrettyCount--,rt+=this.endline(Fe,Te,Me),Te.state=ve.None}return this.closeNode(Fe,Te,Me),rt},De.prototype.writeChildNode=function(Fe,Te,Me){switch(Fe.type){case de.CData:return this.cdata(Fe,Te,Me);case de.Comment:return this.comment(Fe,Te,Me);case de.Element:return this.element(Fe,Te,Me);case de.Raw:return this.raw(Fe,Te,Me);case de.Text:return this.text(Fe,Te,Me);case de.ProcessingInstruction:return this.processingInstruction(Fe,Te,Me);case de.Dummy:return"";case de.Declaration:return this.declaration(Fe,Te,Me);case de.DocType:return this.docType(Fe,Te,Me);case de.AttributeDeclaration:return this.dtdAttList(Fe,Te,Me);case de.ElementDeclaration:return this.dtdElement(Fe,Te,Me);case de.EntityDeclaration:return this.dtdEntity(Fe,Te,Me);case de.NotationDeclaration:return this.dtdNotation(Fe,Te,Me);default:throw new Error("Unknown XML node type: "+Fe.constructor.name)}},De.prototype.processingInstruction=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<?",Te.state=ve.InsideTag,Be+=Fe.target,Fe.value&&(Be+=" "+Fe.value),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+"?>",Be+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.raw=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me),Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.text=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me),Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.dtdAttList=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!ATTLIST",Te.state=ve.InsideTag,Be+=" "+Fe.elementName+" "+Fe.attributeName+" "+Fe.attributeType,Fe.defaultValueType!=="#DEFAULT"&&(Be+=" "+Fe.defaultValueType),Fe.defaultValue&&(Be+=' "'+Fe.defaultValue+'"'),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+">"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.dtdElement=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!ELEMENT",Te.state=ve.InsideTag,Be+=" "+Fe.name+" "+Fe.value,Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+">"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.dtdEntity=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!ENTITY",Te.state=ve.InsideTag,Fe.pe&&(Be+=" %"),Be+=" "+Fe.name,Fe.value?Be+=' "'+Fe.value+'"':(Fe.pubID&&Fe.sysID?Be+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Be+=' SYSTEM "'+Fe.sysID+'"'),Fe.nData&&(Be+=" NDATA "+Fe.nData)),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+">"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.dtdNotation=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!NOTATION",Te.state=ve.InsideTag,Be+=" "+Fe.name,Fe.pubID&&Fe.sysID?Be+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.pubID?Be+=' PUBLIC "'+Fe.pubID+'"':Fe.sysID&&(Be+=' SYSTEM "'+Fe.sysID+'"'),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+">"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.openNode=function(Fe,Te,Me){},De.prototype.closeNode=function(Fe,Te,Me){},De.prototype.openAttribute=function(Fe,Te,Me){},De.prototype.closeAttribute=function(Fe,Te,Me){},De}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],459:[function(oe,He,Re){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z;z=oe("./Utility"),Pe=z.assign,fe=z.isFunction,Ee=oe("./XMLDOMImplementation"),ke=oe("./XMLDocument"),Se=oe("./XMLDocumentCB"),me=oe("./XMLStringWriter"),Ae=oe("./XMLStreamWriter"),de=oe("./NodeType"),ve=oe("./WriterState"),He.exports.create=function(te,se,ie,le){var ce,pe;if(te==null)throw new Error("Root element needs a name.");return le=Pe({},se,ie,le),ce=new ke(le),pe=ce.element(te),le.headless||(ce.declaration(le),(le.pubID!=null||le.sysID!=null)&&ce.dtd(le)),pe},He.exports.begin=function(te,se,ie){var le;return fe(te)&&(le=[te,se],se=le[0],ie=le[1],te={}),se?new Se(te,se,ie):new ke(te)},He.exports.stringWriter=function(te){return new me(te)},He.exports.streamWriter=function(te,se){return new Ae(te,se)},He.exports.implementation=new Ee,He.exports.nodeType=de,He.exports.writerState=ve}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(oe,He,Re){He.exports=ve;var de=Object.prototype.hasOwnProperty;function ve(){for(var Ee={},ke=0;ke<arguments.length;ke++){var Se=arguments[ke];for(var Ae in Se)de.call(Se,Ae)&&(Ee[Ae]=Se[Ae])}return Ee}},{}],461:[function(oe,He,Re){"use strict";oe("core-js/modules/es.array.fill.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.array.slice.js");var de=oe("buffer").Buffer,ve=oe("./sha"),Ee=oe("./md5"),ke={sha1:ve,md5:Ee},Se=64,Ae=de.alloc(Se);Ae.fill(0);function me(z,te,se){de.isBuffer(te)||(te=de.from(te)),de.isBuffer(se)||(se=de.from(se)),te.length>Se?te=z(te):te.length<Se&&(te=de.concat([te,Ae],Se));for(var ie=de.alloc(Se),le=de.alloc(Se),ce=0;ce<Se;ce++)ie[ce]=te[ce]^54,le[ce]=te[ce]^92;var pe=z(de.concat([ie,se]));return z(de.concat([le,pe]))}function Pe(z,te){z=z||"sha1";var se=ke[z],ie=[],le=0;return se||fe("algorithm:",z,"is not yet supported"),{update:function(pe){return de.isBuffer(pe)||(pe=de.from(pe)),ie.push(pe),le+=pe.length,this},digest:function(pe){var xe=de.concat(ie),je=te?me(se,te,xe):se(xe);return ie=null,pe?je.toString(pe):je}}}function fe(){var z=[].slice.call(arguments).join(" ");throw new Error([z,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
`))}Re.createHash=function(z){return Pe(z)},Re.createHmac=function(z,te){return Pe(z,te)},Re.createCredentials=function(){fe("sorry,createCredentials is not implemented yet")},Re.createCipher=function(){fe("sorry,createCipher is not implemented yet")},Re.createCipheriv=function(){fe("sorry,createCipheriv is not implemented yet")},Re.createDecipher=function(){fe("sorry,createDecipher is not implemented yet")},Re.createDecipheriv=function(){fe("sorry,createDecipheriv is not implemented yet")},Re.createSign=function(){fe("sorry,createSign is not implemented yet")},Re.createVerify=function(){fe("sorry,createVerify is not implemented yet")},Re.createDiffieHellman=function(){fe("sorry,createDiffieHellman is not implemented yet")},Re.pbkdf2=function(){fe("sorry,pbkdf2 is not implemented yet")}},{"./md5":463,"./sha":464,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],462:[function(oe,He,Re){"use strict";oe("core-js/modules/es.array.fill.js"),oe("core-js/modules/es.array.concat.js");var de=oe("buffer").Buffer,ve=4,Ee=de.alloc(ve);Ee.fill(0);var ke=8;function Se(Pe,fe){if(Pe.length%ve!==0){var z=Pe.length+(ve-Pe.length%ve);Pe=de.concat([Pe,Ee],z)}for(var te=[],se=fe?Pe.readInt32BE:Pe.readInt32LE,ie=0;ie<Pe.length;ie+=ve)te.push(se.call(Pe,ie));return te}function Ae(Pe,fe,z){for(var te=de.alloc(fe),se=z?te.writeInt32BE:te.writeInt32LE,ie=0;ie<Pe.length;ie++)se.call(te,Pe[ie],ie*4,!0);return te}function me(Pe,fe,z,te){de.isBuffer(Pe)||(Pe=de.from(Pe));var se=fe(Se(Pe,te),Pe.length*ke);return Ae(se,z,te)}He.exports={hash:me}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(oe,He,Re){"use strict";var de=oe("./helpers");function ve(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function Ee(te,se){te[se>>5]|=128<<se%32,te[(se+64>>>9<<4)+14]=se;for(var ie=1732584193,le=-271733879,ce=-1732584194,pe=271733878,xe=0;xe<te.length;xe+=16){var je=ie,De=le,Fe=ce,Te=pe;ie=Se(ie,le,ce,pe,te[xe+0],7,-680876936),pe=Se(pe,ie,le,ce,te[xe+1],12,-389564586),ce=Se(ce,pe,ie,le,te[xe+2],17,606105819),le=Se(le,ce,pe,ie,te[xe+3],22,-1044525330),ie=Se(ie,le,ce,pe,te[xe+4],7,-176418897),pe=Se(pe,ie,le,ce,te[xe+5],12,1200080426),ce=Se(ce,pe,ie,le,te[xe+6],17,-1473231341),le=Se(le,ce,pe,ie,te[xe+7],22,-45705983),ie=Se(ie,le,ce,pe,te[xe+8],7,1770035416),pe=Se(pe,ie,le,ce,te[xe+9],12,-1958414417),ce=Se(ce,pe,ie,le,te[xe+10],17,-42063),le=Se(le,ce,pe,ie,te[xe+11],22,-1990404162),ie=Se(ie,le,ce,pe,te[xe+12],7,1804603682),pe=Se(pe,ie,le,ce,te[xe+13],12,-40341101),ce=Se(ce,pe,ie,le,te[xe+14],17,-1502002290),le=Se(le,ce,pe,ie,te[xe+15],22,1236535329),ie=Ae(ie,le,ce,pe,te[xe+1],5,-165796510),pe=Ae(pe,ie,le,ce,te[xe+6],9,-1069501632),ce=Ae(ce,pe,ie,le,te[xe+11],14,643717713),le=Ae(le,ce,pe,ie,te[xe+0],20,-373897302),ie=Ae(ie,le,ce,pe,te[xe+5],5,-701558691),pe=Ae(pe,ie,le,ce,te[xe+10],9,38016083),ce=Ae(ce,pe,ie,le,te[xe+15],14,-660478335),le=Ae(le,ce,pe,ie,te[xe+4],20,-405537848),ie=Ae(ie,le,ce,pe,te[xe+9],5,568446438),pe=Ae(pe,ie,le,ce,te[xe+14],9,-1019803690),ce=Ae(ce,pe,ie,le,te[xe+3],14,-187363961),le=Ae(le,ce,pe,ie,te[xe+8],20,1163531501),ie=Ae(ie,le,ce,pe,te[xe+13],5,-1444681467),pe=Ae(pe,ie,le,ce,te[xe+2],9,-51403784),ce=Ae(ce,pe,ie,le,te[xe+7],14,1735328473),le=Ae(le,ce,pe,ie,te[xe+12],20,-1926607734),ie=me(ie,le,ce,pe,te[xe+5],4,-378558),pe=me(pe,ie,le,ce,te[xe+8],11,-2022574463),ce=me(ce,pe,ie,le,te[xe+11],16,1839030562),le=me(le,ce,pe,ie,te[xe+14],23,-35309556),ie=me(ie,le,ce,pe,te[xe+1],4,-1530992060),pe=me(pe,ie,le,ce,te[xe+4],11,1272893353),ce=me(ce,pe,ie,le,te[xe+7],16,-155497632),le=me(le,ce,pe,ie,te[xe+10],23,-1094730640),ie=me(ie,le,ce,pe,te[xe+13],4,681279174),pe=me(pe,ie,le,ce,te[xe+0],11,-358537222),ce=me(ce,pe,ie,le,te[xe+3],16,-722521979),le=me(le,ce,pe,ie,te[xe+6],23,76029189),ie=me(ie,le,ce,pe,te[xe+9],4,-640364487),pe=me(pe,ie,le,ce,te[xe+12],11,-421815835),ce=me(ce,pe,ie,le,te[xe+15],16,530742520),le=me(le,ce,pe,ie,te[xe+2],23,-995338651),ie=Pe(ie,le,ce,pe,te[xe+0],6,-198630844),pe=Pe(pe,ie,le,ce,te[xe+7],10,1126891415),ce=Pe(ce,pe,ie,le,te[xe+14],15,-1416354905),le=Pe(le,ce,pe,ie,te[xe+5],21,-57434055),ie=Pe(ie,le,ce,pe,te[xe+12],6,1700485571),pe=Pe(pe,ie,le,ce,te[xe+3],10,-1894986606),ce=Pe(ce,pe,ie,le,te[xe+10],15,-1051523),le=Pe(le,ce,pe,ie,te[xe+1],21,-2054922799),ie=Pe(ie,le,ce,pe,te[xe+8],6,1873313359),pe=Pe(pe,ie,le,ce,te[xe+15],10,-30611744),ce=Pe(ce,pe,ie,le,te[xe+6],15,-1560198380),le=Pe(le,ce,pe,ie,te[xe+13],21,1309151649),ie=Pe(ie,le,ce,pe,te[xe+4],6,-145523070),pe=Pe(pe,ie,le,ce,te[xe+11],10,-1120210379),ce=Pe(ce,pe,ie,le,te[xe+2],15,718787259),le=Pe(le,ce,pe,ie,te[xe+9],21,-343485551),ie=fe(ie,je),le=fe(le,De),ce=fe(ce,Fe),pe=fe(pe,Te)}return Array(ie,le,ce,pe)}function ke(te,se,ie,le,ce,pe){return fe(z(fe(fe(se,te),fe(le,pe)),ce),ie)}function Se(te,se,ie,le,ce,pe,xe){return ke(se&ie|~se&le,te,se,ce,pe,xe)}function Ae(te,se,ie,le,ce,pe,xe){return ke(se&le|ie&~le,te,se,ce,pe,xe)}function me(te,se,ie,le,ce,pe,xe){return ke(se^ie^le,te,se,ce,pe,xe)}function Pe(te,se,ie,le,ce,pe,xe){return ke(ie^(se|~le),te,se,ce,pe,xe)}function fe(te,se){var ie=(te&65535)+(se&65535),le=(te>>16)+(se>>16)+(ie>>16);return le<<16|ie&65535}function z(te,se){return te<<se|te>>>32-se}He.exports=function(se){return de.hash(se,Ee,16)}},{"./helpers":462}],464:[function(oe,He,Re){"use strict";var de=oe("./helpers");function ve(me,Pe){me[Pe>>5]|=128<<24-Pe%32,me[(Pe+64>>9<<4)+15]=Pe;for(var fe=Array(80),z=1732584193,te=-271733879,se=-1732584194,ie=271733878,le=-1009589776,ce=0;ce<me.length;ce+=16){for(var pe=z,xe=te,je=se,De=ie,Fe=le,Te=0;Te<80;Te++){Te<16?fe[Te]=me[ce+Te]:fe[Te]=Ae(fe[Te-3]^fe[Te-8]^fe[Te-14]^fe[Te-16],1);var Me=Se(Se(Ae(z,5),Ee(Te,te,se,ie)),Se(Se(le,fe[Te]),ke(Te)));le=ie,ie=se,se=Ae(te,30),te=z,z=Me}z=Se(z,pe),te=Se(te,xe),se=Se(se,je),ie=Se(ie,De),le=Se(le,Fe)}return Array(z,te,se,ie,le)}function Ee(me,Pe,fe,z){return me<20?Pe&fe|~Pe&z:me<40?Pe^fe^z:me<60?Pe&fe|Pe&z|fe&z:Pe^fe^z}function ke(me){return me<20?1518500249:me<40?1859775393:me<60?-1894007588:-899497514}function Se(me,Pe){var fe=(me&65535)+(Pe&65535),z=(me>>16)+(Pe>>16)+(fe>>16);return z<<16|fe&65535}function Ae(me,Pe){return me<<Pe|me>>>32-Pe}He.exports=function(Pe){return de.hash(Pe,ve,20,!0)}},{"./helpers":462}],465:[function(oe,He,Re){"use strict";He.exports=function(){return function(){}}},{}],466:[function(oe,He,Re){(function(de){(function(){"use strict";var ve=oe("@babel/runtime/helpers/interopRequireDefault"),Ee=ve(oe("@babel/runtime/helpers/typeof")),ke=oe("stream"),Se=ke.Stream,Ae=oe("../lib/common/utils/isArray"),me=Ae.isArray;He.exports.string=function(z){return typeof z=="string"},He.exports.array=me,He.exports.buffer=de.isBuffer;function Pe(fe){return fe instanceof Se}He.exports.writableStream=function(z){return Pe(z)&&typeof z._write=="function"&&(0,Ee.default)(z._writableState)==="object"}}).call(this)}).call(this,{isBuffer:oe("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":63,"../node_modules/is-buffer/index.js":366,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,stream:398}],467:[function(oe,He,Re){"use strict";var de=oe("immediate"),ve=He.exports={};ve.nextTick=de,ve.title="browser",ve.browser=!0,ve.env={},ve.argv=[],ve.version="",ve.versions={};function Ee(){}ve.on=Ee,ve.addListener=Ee,ve.once=Ee,ve.off=Ee,ve.removeListener=Ee,ve.removeAllListeners=Ee,ve.emit=Ee,ve.prependListener=Ee,ve.prependOnceListener=Ee,ve.listeners=function(ke){return[]},ve.binding=function(ke){throw new Error("process.binding is not supported")},ve.cwd=function(){return"/"},ve.chdir=function(ke){throw new Error("process.chdir is not supported")},ve.umask=function(){return 0}},{immediate:358}],468:[function(oe,He,Re){(function(de){(function(){"use strict";oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.search.js");var ve=oe("./lib/request"),Ee=oe("./lib/response"),ke=oe("xtend"),Se=oe("builtin-status-codes"),Ae=oe("url"),me=Re;me.request=function(Pe,fe){typeof Pe=="string"?Pe=Ae.parse(Pe):Pe=ke(Pe);var z=de.location.protocol.search(/^https?:$/)===-1?"http:":"",te=Pe.protocol||z,se=Pe.hostname||Pe.host,ie=Pe.port,le=Pe.path||"/";se&&se.indexOf(":")!==-1&&(se="["+se+"]"),Pe.url=(se?te+"//"+se:"")+(ie?":"+ie:"")+le,Pe.method=(Pe.method||"GET").toUpperCase(),Pe.headers=Pe.headers||{};var ce=new ve(Pe);return fe&&ce.on("response",fe),ce},me.get=function(fe,z){var te=me.request(fe,z);return te.end(),te},me.ClientRequest=ve,me.IncomingMessage=Ee.IncomingMessage,me.Agent=function(){},me.Agent.defaultMaxSockets=4,me.globalAgent=new me.Agent,me.STATUS_CODES=Se,me.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":470,"./lib/response":471,"builtin-status-codes":91,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.search.js":306,url:472,xtend:460}],469:[function(oe,He,Re){(function(de){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array-buffer.constructor.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.array.slice.js"),Re.fetch=me(de.fetch)&&me(de.ReadableStream),Re.writableStream=me(de.WritableStream),Re.abortController=me(de.AbortController),Re.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),Re.blobConstructor=!0}catch(Pe){}var ve;function Ee(){if(ve!==void 0)return ve;if(de.XMLHttpRequest){ve=new de.XMLHttpRequest;try{ve.open("GET",de.XDomainRequest?"/":"https://example.com")}catch(Pe){ve=null}}else ve=null;return ve}function ke(Pe){var fe=Ee();if(!fe)return!1;try{return fe.responseType=Pe,fe.responseType===Pe}catch(z){}return!1}var Se=typeof de.ArrayBuffer!="undefined",Ae=Se&&me(de.ArrayBuffer.prototype.slice);Re.arraybuffer=Re.fetch||Se&&ke("arraybuffer"),Re.msstream=!Re.fetch&&Ae&&ke("ms-stream"),Re.mozchunkedarraybuffer=!Re.fetch&&Se&&ke("moz-chunked-arraybuffer"),Re.overrideMimeType=Re.fetch||(Ee()?me(Ee().overrideMimeType):!1),Re.vbArray=me(de.VBArray);function me(Pe){return typeof Pe=="function"}ve=null}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"core-js/modules/es.array-buffer.constructor.js":270,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],470:[function(oe,He,Re){(function(de,ve,Ee){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js");var ke=oe("./capability"),Se=oe("inherits"),Ae=oe("./response"),me=oe("readable-stream"),Pe=oe("to-arraybuffer"),fe=Ae.IncomingMessage,z=Ae.readyStates;function te(ce,pe){return ke.fetch&&pe?"fetch":ke.mozchunkedarraybuffer?"moz-chunked-arraybuffer":ke.msstream?"ms-stream":ke.arraybuffer&&ce?"arraybuffer":ke.vbArray&&ce?"text:vbarray":"text"}var se=He.exports=function(ce){var pe=this;me.Writable.call(pe),pe._opts=ce,pe._body=[],pe._headers={},ce.auth&&pe.setHeader("Authorization","Basic "+new Ee(ce.auth).toString("base64")),Object.keys(ce.headers).forEach(function(De){pe.setHeader(De,ce.headers[De])});var xe,je=!0;if(ce.mode==="disable-fetch"||"requestTimeout"in ce&&!ke.abortController)je=!1,xe=!0;else if(ce.mode==="prefer-streaming")xe=!1;else if(ce.mode==="allow-wrong-content-type")xe=!ke.overrideMimeType;else if(!ce.mode||ce.mode==="default"||ce.mode==="prefer-fast")xe=!0;else throw new Error("Invalid value for opts.mode");pe._mode=te(xe,je),pe._fetchTimer=null,pe.on("finish",function(){pe._onFinish()})};Se(se,me.Writable),se.prototype.setHeader=function(ce,pe){var xe=this,je=ce.toLowerCase();le.indexOf(je)===-1&&(xe._headers[je]={name:ce,value:pe})},se.prototype.getHeader=function(ce){var pe=this._headers[ce.toLowerCase()];return pe?pe.value:null},se.prototype.removeHeader=function(ce){var pe=this;delete pe._headers[ce.toLowerCase()]},se.prototype._onFinish=function(){var ce=this;if(!ce._destroyed){var pe=ce._opts,xe=ce._headers,je=null;pe.method!=="GET"&&pe.method!=="HEAD"&&(ke.arraybuffer?je=Pe(Ee.concat(ce._body)):ke.blobConstructor?je=new ve.Blob(ce._body.map(function(Ue){return Pe(Ue)}),{type:(xe["content-type"]||{}).value||""}):je=Ee.concat(ce._body).toString());var De=[];if(Object.keys(xe).forEach(function(Ue){var Ye=xe[Ue].name,Ve=xe[Ue].value;Array.isArray(Ve)?Ve.forEach(function(Ze){De.push([Ye,Ze])}):De.push([Ye,Ve])}),ce._mode==="fetch"){var Fe=null,Te=null;if(ke.abortController){var Me=new AbortController;Fe=Me.signal,ce._fetchAbortController=Me,"requestTimeout"in pe&&pe.requestTimeout!==0&&(ce._fetchTimer=ve.setTimeout(function(){ce.emit("requestTimeout"),ce._fetchAbortController&&ce._fetchAbortController.abort()},pe.requestTimeout))}ve.fetch(ce._opts.url,{method:ce._opts.method,headers:De,body:je||void 0,mode:"cors",credentials:pe.withCredentials?"include":"same-origin",signal:Fe}).then(function(Ue){ce._fetchResponse=Ue,ce._connect()},function(Ue){ve.clearTimeout(ce._fetchTimer),ce._destroyed||ce.emit("error",Ue)})}else{var Be=ce._xhr=new ve.XMLHttpRequest;try{Be.open(ce._opts.method,ce._opts.url,!0)}catch(Ue){de.nextTick(function(){ce.emit("error",Ue)});return}"responseType"in Be&&(Be.responseType=ce._mode.split(":")[0]),"withCredentials"in Be&&(Be.withCredentials=!!pe.withCredentials),ce._mode==="text"&&"overrideMimeType"in Be&&Be.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in pe&&(Be.timeout=pe.requestTimeout,Be.ontimeout=function(){ce.emit("requestTimeout")}),De.forEach(function(Ue){Be.setRequestHeader(Ue[0],Ue[1])}),ce._response=null,Be.onreadystatechange=function(){switch(Be.readyState){case z.LOADING:case z.DONE:ce._onXHRProgress();break}},ce._mode==="moz-chunked-arraybuffer"&&(Be.onprogress=function(){ce._onXHRProgress()}),Be.onerror=function(){ce._destroyed||ce.emit("error",new Error("XHR error"))};try{Be.send(je)}catch(Ue){de.nextTick(function(){ce.emit("error",Ue)});return}}}};function ie(ce){try{var pe=ce.status;return pe!==null&&pe!==0}catch(xe){return!1}}se.prototype._onXHRProgress=function(){var ce=this;!ie(ce._xhr)||ce._destroyed||(ce._response||ce._connect(),ce._response._onXHRProgress())},se.prototype._connect=function(){var ce=this;ce._destroyed||(ce._response=new fe(ce._xhr,ce._fetchResponse,ce._mode,ce._fetchTimer),ce._response.on("error",function(pe){ce.emit("error",pe)}),ce.emit("response",ce._response))},se.prototype._write=function(ce,pe,xe){var je=this;je._body.push(ce),xe()},se.prototype.abort=se.prototype.destroy=function(){var ce=this;ce._destroyed=!0,ve.clearTimeout(ce._fetchTimer),ce._response&&(ce._response._destroyed=!0),ce._xhr?ce._xhr.abort():ce._fetchAbortController&&ce._fetchAbortController.abort()},se.prototype.end=function(ce,pe,xe){var je=this;typeof ce=="function"&&(xe=ce,ce=void 0),me.Writable.prototype.end.call(je,ce,pe,xe)},se.prototype.flushHeaders=function(){},se.prototype.setTimeout=function(){},se.prototype.setNoDelay=function(){},se.prototype.setSocketKeepAlive=function(){};var le=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this)}).call(this,oe("_process"),typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("buffer").Buffer)},{"./capability":469,"./response":471,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.split.js":307,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394,"to-arraybuffer":415}],471:[function(oe,He,Re){(function(de,ve,Ee){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.string.match.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.typed-array.uint8-array.js"),oe("core-js/modules/es.typed-array.copy-within.js"),oe("core-js/modules/es.typed-array.every.js"),oe("core-js/modules/es.typed-array.fill.js"),oe("core-js/modules/es.typed-array.filter.js"),oe("core-js/modules/es.typed-array.find.js"),oe("core-js/modules/es.typed-array.find-index.js"),oe("core-js/modules/es.typed-array.for-each.js"),oe("core-js/modules/es.typed-array.includes.js"),oe("core-js/modules/es.typed-array.index-of.js"),oe("core-js/modules/es.typed-array.iterator.js"),oe("core-js/modules/es.typed-array.join.js"),oe("core-js/modules/es.typed-array.last-index-of.js"),oe("core-js/modules/es.typed-array.map.js"),oe("core-js/modules/es.typed-array.reduce.js"),oe("core-js/modules/es.typed-array.reduce-right.js"),oe("core-js/modules/es.typed-array.reverse.js"),oe("core-js/modules/es.typed-array.set.js"),oe("core-js/modules/es.typed-array.slice.js"),oe("core-js/modules/es.typed-array.some.js"),oe("core-js/modules/es.typed-array.sort.js"),oe("core-js/modules/es.typed-array.subarray.js"),oe("core-js/modules/es.typed-array.to-locale-string.js"),oe("core-js/modules/es.typed-array.to-string.js"),oe("core-js/modules/es.array.slice.js");var ke=oe("./capability"),Se=oe("inherits"),Ae=oe("readable-stream"),me=Re.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},Pe=Re.IncomingMessage=function(fe,z,te,se){var ie=this;if(Ae.Readable.call(ie),ie._mode=te,ie.headers={},ie.rawHeaders=[],ie.trailers={},ie.rawTrailers=[],ie.on("end",function(){de.nextTick(function(){ie.emit("close")})}),te==="fetch"){var le=function Fe(){pe.read().then(function(Te){if(!ie._destroyed){if(Te.done){ve.clearTimeout(se),ie.push(null);return}ie.push(new Ee(Te.value)),Fe()}}).catch(function(Te){ve.clearTimeout(se),ie._destroyed||ie.emit("error",Te)})};if(ie._fetchResponse=z,ie.url=z.url,ie.statusCode=z.status,ie.statusMessage=z.statusText,z.headers.forEach(function(Fe,Te){ie.headers[Te.toLowerCase()]=Fe,ie.rawHeaders.push(Te,Fe)}),ke.writableStream){var ce=new WritableStream({write:function(Te){return new Promise(function(Me,Be){ie._destroyed?Be():ie.push(new Ee(Te))?Me():ie._resumeFetch=Me})},close:function(){ve.clearTimeout(se),ie._destroyed||ie.push(null)},abort:function(Te){ie._destroyed||ie.emit("error",Te)}});try{z.body.pipeTo(ce).catch(function(Fe){ve.clearTimeout(se),ie._destroyed||ie.emit("error",Fe)});return}catch(Fe){}}var pe=z.body.getReader();le()}else{ie._xhr=fe,ie._pos=0,ie.url=fe.responseURL,ie.statusCode=fe.status,ie.statusMessage=fe.statusText;var xe=fe.getAllResponseHeaders().split(/\r?\n/);if(xe.forEach(function(Fe){var Te=Fe.match(/^([^:]+):\s*(.*)/);if(Te){var Me=Te[1].toLowerCase();Me==="set-cookie"?(ie.headers[Me]===void 0&&(ie.headers[Me]=[]),ie.headers[Me].push(Te[2])):ie.headers[Me]!==void 0?ie.headers[Me]+=", "+Te[2]:ie.headers[Me]=Te[2],ie.rawHeaders.push(Te[1],Te[2])}}),ie._charset="x-user-defined",!ke.overrideMimeType){var je=ie.rawHeaders["mime-type"];if(je){var De=je.match(/;\s*charset=([^;])(;|$)/);De&&(ie._charset=De[1].toLowerCase())}ie._charset||(ie._charset="utf-8")}}};Se(Pe,Ae.Readable),Pe.prototype._read=function(){var fe=this,z=fe._resumeFetch;z&&(fe._resumeFetch=null,z())},Pe.prototype._onXHRProgress=function(){var fe=this,z=fe._xhr,te=null;switch(fe._mode){case"text:vbarray":if(z.readyState!==me.DONE)break;try{te=new ve.VBArray(z.responseBody).toArray()}catch(pe){}if(te!==null){fe.push(new Ee(te));break}case"text":try{te=z.responseText}catch(pe){fe._mode="text:vbarray";break}if(te.length>fe._pos){var se=te.substr(fe._pos);if(fe._charset==="x-user-defined"){for(var ie=new Ee(se.length),le=0;le<se.length;le++)ie[le]=se.charCodeAt(le)&255;fe.push(ie)}else fe.push(se,fe._charset);fe._pos=te.length}break;case"arraybuffer":if(z.readyState!==me.DONE||!z.response)break;te=z.response,fe.push(new Ee(new Uint8Array(te)));break;case"moz-chunked-arraybuffer":if(te=z.response,z.readyState!==me.LOADING||!te)break;fe.push(new Ee(new Uint8Array(te)));break;case"ms-stream":if(te=z.response,z.readyState!==me.LOADING)break;var ce=new ve.MSStreamReader;ce.onprogress=function(){ce.result.byteLength>fe._pos&&(fe.push(new Ee(new Uint8Array(ce.result.slice(fe._pos)))),fe._pos=ce.result.byteLength)},ce.onload=function(){fe.push(null)},ce.readAsArrayBuffer(te);break}fe._xhr.readyState===me.DONE&&fe._mode!=="ms-stream"&&fe.push(null)}}).call(this)}).call(this,oe("_process"),typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("buffer").Buffer)},{"./capability":469,_process:467,buffer:90,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.split.js":307,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394}],472:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/helpers/typeof"));oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.search.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.string.match.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.splice.js");var Ee=oe("punycode"),ke=oe("./util");Re.parse=Te,Re.resolve=Be,Re.resolveObject=Ue,Re.format=Me,Re.Url=Se;function Se(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Ae=/^([a-z0-9.+-]+:)/i,me=/:[0-9]*$/,Pe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,fe=["<",">",'"',"`"," ","\r",`
|
|
`," "],z=["{","}","|","\\","^","`"].concat(fe),te=["'"].concat(z),se=["%","/","?",";","#"].concat(te),ie=["/","?","#"],le=255,ce=/^[+a-z0-9A-Z_-]{0,63}$/,pe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,xe={javascript:!0,"javascript:":!0},je={javascript:!0,"javascript:":!0},De={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Fe=oe("querystring");function Te(Ye,Ve,Ze){if(Ye&&ke.isObject(Ye)&&Ye instanceof Se)return Ye;var ot=new Se;return ot.parse(Ye,Ve,Ze),ot}Se.prototype.parse=function(Ye,Ve,Ze){if(!ke.isString(Ye))throw new TypeError("Parameter 'url' must be a string, not "+(0,ve.default)(Ye));var ot=Ye.indexOf("?"),lt=ot!==-1&&ot<Ye.indexOf("#")?"?":"#",ft=Ye.split(lt),St=/\\/g;ft[0]=ft[0].replace(St,"/"),Ye=ft.join(lt);var qe=Ye;if(qe=qe.trim(),!Ze&&Ye.split("#").length===1){var rt=Pe.exec(qe);if(rt)return this.path=qe,this.href=qe,this.pathname=rt[1],rt[2]?(this.search=rt[2],Ve?this.query=Fe.parse(this.search.substr(1)):this.query=this.search.substr(1)):Ve&&(this.search="",this.query={}),this}var wt=Ae.exec(qe);if(wt){wt=wt[0];var Ct=wt.toLowerCase();this.protocol=Ct,qe=qe.substr(wt.length)}if(Ze||wt||qe.match(/^\/\/[^@\/]+@[^@\/]+/)){var bt=qe.substr(0,2)==="//";bt&&!(wt&&je[wt])&&(qe=qe.substr(2),this.slashes=!0)}if(!je[wt]&&(bt||wt&&!De[wt])){for(var ct=-1,xt=0;xt<ie.length;xt++){var dt=qe.indexOf(ie[xt]);dt!==-1&&(ct===-1||dt<ct)&&(ct=dt)}var Mt,yt;ct===-1?yt=qe.lastIndexOf("@"):yt=qe.lastIndexOf("@",ct),yt!==-1&&(Mt=qe.slice(0,yt),qe=qe.slice(yt+1),this.auth=decodeURIComponent(Mt)),ct=-1;for(var xt=0;xt<se.length;xt++){var dt=qe.indexOf(se[xt]);dt!==-1&&(ct===-1||dt<ct)&&(ct=dt)}ct===-1&&(ct=qe.length),this.host=qe.slice(0,ct),qe=qe.slice(ct),this.parseHost(),this.hostname=this.hostname||"";var Dt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Dt)for(var mt=this.hostname.split("."),xt=0,vt=mt.length;xt<vt;xt++){var et=mt[xt];if(et&&!et.match(ce)){for(var We="",we=0,Ne=et.length;we<Ne;we++)et.charCodeAt(we)>127?We+="x":We+=et[we];if(!We.match(ce)){var Xe=mt.slice(0,xt),nt=mt.slice(xt+1),Ie=et.match(pe);Ie&&(Xe.push(Ie[1]),nt.unshift(Ie[2])),nt.length&&(qe="/"+nt.join(".")+qe),this.hostname=Xe.join(".");break}}}this.hostname.length>le?this.hostname="":this.hostname=this.hostname.toLowerCase(),Dt||(this.hostname=Ee.toASCII(this.hostname));var _e=this.port?":"+this.port:"",Ge=this.hostname||"";this.host=Ge+_e,this.href+=this.host,Dt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),qe[0]!=="/"&&(qe="/"+qe))}if(!xe[Ct])for(var xt=0,vt=te.length;xt<vt;xt++){var tt=te[xt];if(qe.indexOf(tt)!==-1){var ht=encodeURIComponent(tt);ht===tt&&(ht=escape(tt)),qe=qe.split(tt).join(ht)}}var ut=qe.indexOf("#");ut!==-1&&(this.hash=qe.substr(ut),qe=qe.slice(0,ut));var Ot=qe.indexOf("?");if(Ot!==-1?(this.search=qe.substr(Ot),this.query=qe.substr(Ot+1),Ve&&(this.query=Fe.parse(this.query)),qe=qe.slice(0,Ot)):Ve&&(this.search="",this.query={}),qe&&(this.pathname=qe),De[Ct]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _e=this.pathname||"",Et=this.search||"";this.path=_e+Et}return this.href=this.format(),this};function Me(Ye){return ke.isString(Ye)&&(Ye=Te(Ye)),Ye instanceof Se?Ye.format():Se.prototype.format.call(Ye)}Se.prototype.format=function(){var Ye=this.auth||"";Ye&&(Ye=encodeURIComponent(Ye),Ye=Ye.replace(/%3A/i,":"),Ye+="@");var Ve=this.protocol||"",Ze=this.pathname||"",ot=this.hash||"",lt=!1,ft="";this.host?lt=Ye+this.host:this.hostname&&(lt=Ye+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(lt+=":"+this.port)),this.query&&ke.isObject(this.query)&&Object.keys(this.query).length&&(ft=Fe.stringify(this.query));var St=this.search||ft&&"?"+ft||"";return Ve&&Ve.substr(-1)!==":"&&(Ve+=":"),this.slashes||(!Ve||De[Ve])&<!==!1?(lt="//"+(lt||""),Ze&&Ze.charAt(0)!=="/"&&(Ze="/"+Ze)):lt||(lt=""),ot&&ot.charAt(0)!=="#"&&(ot="#"+ot),St&&St.charAt(0)!=="?"&&(St="?"+St),Ze=Ze.replace(/[?#]/g,function(qe){return encodeURIComponent(qe)}),St=St.replace("#","%23"),Ve+lt+Ze+St+ot};function Be(Ye,Ve){return Te(Ye,!1,!0).resolve(Ve)}Se.prototype.resolve=function(Ye){return this.resolveObject(Te(Ye,!1,!0)).format()};function Ue(Ye,Ve){return Ye?Te(Ye,!1,!0).resolveObject(Ve):Ve}Se.prototype.resolveObject=function(Ye){if(ke.isString(Ye)){var Ve=new Se;Ve.parse(Ye,!1,!0),Ye=Ve}for(var Ze=new Se,ot=Object.keys(this),lt=0;lt<ot.length;lt++){var ft=ot[lt];Ze[ft]=this[ft]}if(Ze.hash=Ye.hash,Ye.href==="")return Ze.href=Ze.format(),Ze;if(Ye.slashes&&!Ye.protocol){for(var St=Object.keys(Ye),qe=0;qe<St.length;qe++){var rt=St[qe];rt!=="protocol"&&(Ze[rt]=Ye[rt])}return De[Ze.protocol]&&Ze.hostname&&!Ze.pathname&&(Ze.path=Ze.pathname="/"),Ze.href=Ze.format(),Ze}if(Ye.protocol&&Ye.protocol!==Ze.protocol){if(!De[Ye.protocol]){for(var wt=Object.keys(Ye),Ct=0;Ct<wt.length;Ct++){var bt=wt[Ct];Ze[bt]=Ye[bt]}return Ze.href=Ze.format(),Ze}if(Ze.protocol=Ye.protocol,!Ye.host&&!je[Ye.protocol]){for(var vt=(Ye.pathname||"").split("/");vt.length&&!(Ye.host=vt.shift()););Ye.host||(Ye.host=""),Ye.hostname||(Ye.hostname=""),vt[0]!==""&&vt.unshift(""),vt.length<2&&vt.unshift(""),Ze.pathname=vt.join("/")}else Ze.pathname=Ye.pathname;if(Ze.search=Ye.search,Ze.query=Ye.query,Ze.host=Ye.host||"",Ze.auth=Ye.auth,Ze.hostname=Ye.hostname||Ye.host,Ze.port=Ye.port,Ze.pathname||Ze.search){var ct=Ze.pathname||"",xt=Ze.search||"";Ze.path=ct+xt}return Ze.slashes=Ze.slashes||Ye.slashes,Ze.href=Ze.format(),Ze}var dt=Ze.pathname&&Ze.pathname.charAt(0)==="/",Mt=Ye.host||Ye.pathname&&Ye.pathname.charAt(0)==="/",yt=Mt||dt||Ze.host&&Ye.pathname,Dt=yt,mt=Ze.pathname&&Ze.pathname.split("/")||[],vt=Ye.pathname&&Ye.pathname.split("/")||[],et=Ze.protocol&&!De[Ze.protocol];if(et&&(Ze.hostname="",Ze.port=null,Ze.host&&(mt[0]===""?mt[0]=Ze.host:mt.unshift(Ze.host)),Ze.host="",Ye.protocol&&(Ye.hostname=null,Ye.port=null,Ye.host&&(vt[0]===""?vt[0]=Ye.host:vt.unshift(Ye.host)),Ye.host=null),yt=yt&&(vt[0]===""||mt[0]==="")),Mt)Ze.host=Ye.host||Ye.host===""?Ye.host:Ze.host,Ze.hostname=Ye.hostname||Ye.hostname===""?Ye.hostname:Ze.hostname,Ze.search=Ye.search,Ze.query=Ye.query,mt=vt;else if(vt.length)mt||(mt=[]),mt.pop(),mt=mt.concat(vt),Ze.search=Ye.search,Ze.query=Ye.query;else if(!ke.isNullOrUndefined(Ye.search)){if(et){Ze.hostname=Ze.host=mt.shift();var We=Ze.host&&Ze.host.indexOf("@")>0?Ze.host.split("@"):!1;We&&(Ze.auth=We.shift(),Ze.host=Ze.hostname=We.shift())}return Ze.search=Ye.search,Ze.query=Ye.query,(!ke.isNull(Ze.pathname)||!ke.isNull(Ze.search))&&(Ze.path=(Ze.pathname?Ze.pathname:"")+(Ze.search?Ze.search:"")),Ze.href=Ze.format(),Ze}if(!mt.length)return Ze.pathname=null,Ze.search?Ze.path="/"+Ze.search:Ze.path=null,Ze.href=Ze.format(),Ze;for(var we=mt.slice(-1)[0],Ne=(Ze.host||Ye.host||mt.length>1)&&(we==="."||we==="..")||we==="",Xe=0,nt=mt.length;nt>=0;nt--)we=mt[nt],we==="."?mt.splice(nt,1):we===".."?(mt.splice(nt,1),Xe++):Xe&&(mt.splice(nt,1),Xe--);if(!yt&&!Dt)for(;Xe--;Xe)mt.unshift("..");yt&&mt[0]!==""&&(!mt[0]||mt[0].charAt(0)!=="/")&&mt.unshift(""),Ne&&mt.join("/").substr(-1)!=="/"&&mt.push("");var Ie=mt[0]===""||mt[0]&&mt[0].charAt(0)==="/";if(et){Ze.hostname=Ze.host=Ie?"":mt.length?mt.shift():"";var We=Ze.host&&Ze.host.indexOf("@")>0?Ze.host.split("@"):!1;We&&(Ze.auth=We.shift(),Ze.host=Ze.hostname=We.shift())}return yt=yt||Ze.host&&mt.length,yt&&!Ie&&mt.unshift(""),mt.length?Ze.pathname=mt.join("/"):(Ze.pathname=null,Ze.path=null),(!ke.isNull(Ze.pathname)||!ke.isNull(Ze.search))&&(Ze.path=(Ze.pathname?Ze.pathname:"")+(Ze.search?Ze.search:"")),Ze.auth=Ye.auth||Ze.auth,Ze.slashes=Ze.slashes||Ye.slashes,Ze.href=Ze.format(),Ze},Se.prototype.parseHost=function(){var Ye=this.host,Ve=me.exec(Ye);Ve&&(Ve=Ve[0],Ve!==":"&&(this.port=Ve.substr(1)),Ye=Ye.substr(0,Ye.length-Ve.length)),Ye&&(this.hostname=Ye)}},{"./util":473,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.array.splice.js":283,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.search.js":306,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,punycode:382,querystring:385}],473:[function(oe,He,Re){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/helpers/typeof"));He.exports={isString:function(ke){return typeof ke=="string"},isObject:function(ke){return(0,ve.default)(ke)==="object"&&ke!==null},isNull:function(ke){return ke===null},isNullOrUndefined:function(ke){return ke==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(oe,He,Re){"use strict";oe("core-js/modules/es.number.constructor.js"),Re.encodeURIComponent=function(de){try{return encodeURIComponent(de)}catch(ve){return de}},Re.escape=oe("escape-html"),Re.timestamp=function(ve){if(ve){var Ee=ve;return typeof Ee=="string"&&(Ee=Number(Ee)),String(ve).length===10&&(Ee*=1e3),new Date(Ee)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(oe,He,Re){(function(de,ve){(function(){"use strict";var Ee=oe("@babel/runtime/helpers/interopRequireDefault"),ke=Ee(oe("@babel/runtime/helpers/typeof"));oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.array.concat.js");var Se=oe("util"),Ae=oe("url"),me=oe("http"),Pe=oe("https"),fe=oe("debug")("urllib"),z=oe("humanize-ms"),te=0,se=Math.pow(2,31)-10,ie=/^https?:\/\//i;function le(je,De){return je===void 0?De:je}function ce(je){return je?je.split(";")[0].trim().toLowerCase():""}function pe(je,De){return function(Fe,Te,Me){if(Fe)return De(Fe);je({data:Te,status:Me.statusCode,headers:Me.headers,res:Me})}}Re.TIMEOUTS=[z("300s"),z("300s")];var xe=["json","text"];Re.request=function(De,Fe,Te){return arguments.length===2&&typeof Fe=="function"&&(Te=Fe,Fe=null),typeof Te=="function"?Re.requestWithCallback(De,Fe,Te):new Promise(function(Me,Be){Re.requestWithCallback(De,Fe,pe(Me,Be))})},Re.requestWithCallback=function(De,Fe,Te){if(!De||typeof De!="string"&&(0,ke.default)(De)!=="object"){var Me=Se.format("expect request url to be a string or a http request options, but got %j",De);throw new Error(Me)}arguments.length===2&&typeof Fe=="function"&&(Te=Fe,Fe=null),Fe=Fe||{},te>=se&&(te=0);var Be=++te;Fe.requestUrls=Fe.requestUrls||[];var Ue={requestId:Be,url:De,args:Fe,ctx:Fe.ctx};Fe.emitter&&Fe.emitter.emit("request",Ue),Fe.timeout=Fe.timeout||Re.TIMEOUTS,Fe.maxRedirects=Fe.maxRedirects||10,Fe.streaming=Fe.streaming||Fe.customResponse;var Ye=Date.now(),Ve;typeof De=="string"?(ie.test(De)||(De="https://"+De),Ve=Ae.parse(De)):Ve=De;var Ze=(Fe.type||Fe.method||Ve.method||"GET").toUpperCase(),ot=Ve.port||80,lt=me,ft=le(Fe.agent,Re.agent),St=Fe.fixJSONCtlChars;Ve.protocol==="https:"&&(lt=Pe,ft=le(Fe.httpsAgent,Re.httpsAgent),Ve.port||(ot=443));var qe={host:Ve.hostname||Ve.host||"localhost",path:Ve.path||"/",method:Ze,port:ot,agent:ft,headers:Fe.headers||{},lookup:Fe.lookup};Array.isArray(Fe.timeout)?qe.requestTimeout=Fe.timeout[Fe.timeout.length-1]:typeof Fe.timeout!="undefined"&&(qe.requestTimeout=Fe.timeout);var rt=Fe.auth||Ve.auth;rt&&(qe.auth=rt);var wt=Fe.content||Fe.data,Ct=Ze==="GET"||Ze==="HEAD"||Fe.dataAsQueryString;if(!Fe.content&&wt&&!(typeof wt=="string"||ve.isBuffer(wt)))if(Ct)wt=Fe.nestedQuerystring?qs.stringify(wt):querystring.stringify(wt);else{var bt=qe.headers["Content-Type"]||qe.headers["content-type"];bt||(Fe.contentType==="json"?bt="application/json":bt="application/x-www-form-urlencoded",qe.headers["Content-Type"]=bt),ce(bt)==="application/json"?wt=JSON.stringify(wt):wt=Fe.nestedQuerystring?qs.stringify(wt):querystring.stringify(wt)}Ct&&wt&&(qe.path+=(Ve.query?"&":"?")+wt,wt=null);var ct=0;if(wt){var xt=wt.length;ve.isBuffer(wt)||(xt=ve.byteLength(wt)),ct=qe.headers["Content-Length"]=xt}Fe.dataType==="json"&&(qe.headers.Accept="application/json"),typeof Fe.beforeRequest=="function"&&Fe.beforeRequest(qe);var dt=null,Mt=null,yt=null,Dt=!1,mt=!1,vt=0,et=-1,We=!1,we="",Ne="",Xe=null;Fe.timing&&(Xe={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function nt(){dt&&(clearTimeout(dt),dt=null)}function Ie(){Mt&&(clearTimeout(Mt),Mt=null)}function _e(Vt,hn,on){if(Ie(),!Te){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Be,de.pid,qe.method,De),Vt&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
stack: %s`,Date(),Be,de.pid,Vt.name,Vt.message,Vt.stack);return}var cn=Te;Te=null;var Sn={};on&&(et=on.statusCode,Sn=on.headers);var Cn=Date.now()-Ye;Xe&&(Xe.contentDownload=Cn),fe("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Cn,vt,et,qe.method,qe.host,qe.path,mt,Xe);var kn={status:et,statusCode:et,headers:Sn,size:vt,aborted:We,rt:Cn,keepAliveSocket:mt,data:hn,requestUrls:Fe.requestUrls,timing:Xe,remoteAddress:we,remotePort:Ne};if(Vt){var In="";ft&&typeof ft.getCurrentStatus=="function"&&(In=", agent status: "+JSON.stringify(ft.getCurrentStatus())),Vt.message+=", "+qe.method+" "+De+" "+et+" (connected: "+Dt+", keepalive socket: "+mt+In+`)
|
|
headers: `+JSON.stringify(Sn),Vt.data=hn,Vt.path=qe.path,Vt.status=et,Vt.headers=Sn,Vt.res=kn}cn(Vt,hn,Fe.streaming?on:kn),Fe.emitter&&(Ue.url=De,Ue.socket=Xt&&Xt.connection,Ue.options=qe,Ue.size=ct,Fe.emitter.emit("response",{requestId:Be,error:Vt,ctx:Fe.ctx,req:Ue,res:kn}))}function Ge(Vt){var hn=null;if(Fe.followRedirect&&statuses.redirect[Vt.statusCode]){Fe._followRedirectCount=(Fe._followRedirectCount||0)+1;var on=Vt.headers.location;if(!on)hn=new Error("Got statusCode "+Vt.statusCode+" but cannot resolve next location from headers"),hn.name="FollowRedirectError";else if(Fe._followRedirectCount>Fe.maxRedirects)hn=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+De),hn.name="MaxRedirectError";else{var cn=Fe.formatRedirectUrl?Fe.formatRedirectUrl(De,on):Ae.resolve(De,on);fe("Request#%d %s: `redirected` from %s to %s",Be,qe.path,De,cn),Ie(),Fe.headers&&Fe.headers.Host&&ie.test(on)&&(Fe.headers.Host=null);var Sn=Te;return Te=null,Re.requestWithCallback(cn,Fe,Sn),{redirect:!0,error:null}}}return{redirect:!1,error:hn}}Fe.gzip&&!qe.headers["Accept-Encoding"]&&!qe.headers["accept-encoding"]&&(qe.headers["Accept-Encoding"]="gzip");function tt(Vt,hn,on){var cn=Vt.headers["content-encoding"];return on(null,hn,cn)}var ht=Fe.writeStream;fe("Request#%d %s %s with headers %j, options.path: %s",Be,Ze,De,qe.headers,qe.path),Fe.requestUrls.push(De);function ut(Vt){if(Xe&&(Xe.waiting=Date.now()-Ye),fe("Request#%d %s `req response` event emit: status %d, headers: %j",Be,De,Vt.statusCode,Vt.headers),Fe.streaming){var hn=Ge(Vt);if(hn.redirect){Vt.resume();return}return hn.error?(Vt.resume(),_e(hn.error,null,Vt)):_e(null,null,Vt)}if(Vt.on("close",function(){fe("Request#%d %s: `res close` event emit, total size %d",Be,De,vt)}),Vt.on("error",function(){fe("Request#%d %s: `res error` event emit, total size %d",Be,De,vt)}),Vt.on("aborted",function(){We=!0,fe("Request#%d %s: `res aborted` event emit, total size %d",Be,De,vt)}),ht){var on=Ge(Vt);if(on.redirect){Vt.resume();return}return on.error?(Vt.resume(),ht.end(),_e(on.error,null,Vt)):(Fe.consumeWriteStream===!1?Vt.on("end",_e.bind(null,null,null,Vt)):ht.on("close",function(){fe("Request#%d %s: writeStream close event emitted",Be,De),_e(yt||null,null,Vt)}),Vt.pipe(ht))}var cn=[];Vt.on("data",function(Sn){fe("Request#%d %s: `res data` event emit, size %d",Be,De,Sn.length),vt+=Sn.length,cn.push(Sn)}),Vt.on("end",function(){var Sn=ve.concat(cn,vt);if(fe("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Be,De,vt,Vt._dumped),yt)return _e(yt,Sn,Vt);var Cn=Ge(Vt);if(Cn.error)return _e(Cn.error,Sn,Vt);Cn.redirect||tt(Vt,Sn,function(kn,In,_r){if(kn)return _e(kn,Sn,Vt);if(!_r&&xe.indexOf(Fe.dataType)>=0){try{In=decodeBodyByCharset(In,Vt)}catch(qr){return fe("decodeBodyByCharset error: %s",qr),_e(null,In,Vt)}if(Fe.dataType==="json")if(vt===0)In=null;else{var xr=parseJSON(In,St);xr.error?kn=xr.error:In=xr.data}}We&&fe("Request#%d %s: Remote socket was terminated before `response.end()` was called",Be,De),_e(kn,In,Vt)})})}var Ot,Et;Array.isArray(Fe.timeout)?(Ot=z(Fe.timeout[0]),Et=z(Fe.timeout[1])):Ot=Et=z(Fe.timeout),fe("ConnectTimeout: %d, ResponseTimeout: %d",Ot,Et);function Ft(){fe("Connect timer ticking, timeout: %d",Ot),dt=setTimeout(function(){dt=null,et===-1&&(et=-2);var Vt="Connect timeout for "+Ot+"ms",hn="ConnectionTimeoutError";Xt.socket||(hn="SocketAssignTimeoutError",Vt+=", working sockets is full"),yt=new Error(Vt),yt.name=hn,yt.requestId=Be,fe("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Be,De,yt.name,Vt,Dt),Kt()},Ot)}function qt(){fe("Response timer ticking, timeout: %d",Et),Mt=setTimeout(function(){Mt=null;var Vt="Response timeout for "+Et+"ms",hn="ResponseTimeoutError";yt=new Error(Vt),yt.name=hn,yt.requestId=Be,fe("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Be,De,yt.name,Vt,Dt),Kt()},Et)}var Xt;qe.mode=Fe.mode?Fe.mode:"";try{Xt=lt.request(qe,ut)}catch(Vt){return _e(Vt)}typeof window=="undefined"?Ft():Xt.on("requestTimeout",function(){et===-1&&(et=-2);var Vt="Connect timeout for "+Ot+"ms",hn="ConnectionTimeoutError";yt=new Error(Vt),yt.name=hn,yt.requestId=Be,Kt()});function Kt(){fe("Request#%d %s abort, connected: %s",Be,De,Dt),Xt.socket||(yt.noSocket=!0,_e(yt)),Xt.abort()}return Xe&&Xt.on("finish",function(){Xe.requestSent=Date.now()-Ye}),Xt.once("socket",function(Vt){Xe&&(Xe.queuing=Date.now()-Ye);var hn=Vt.readyState;if(hn==="opening"){Vt.once("lookup",function(on,cn,Sn){fe("Request#%d %s lookup: %s, %s, %s",Be,De,on,cn,Sn),Xe&&(Xe.dnslookup=Date.now()-Ye),cn&&(we=cn)}),Vt.once("connect",function(){Xe&&(Xe.connected=Date.now()-Ye),nt(),qt(),fe("Request#%d %s new socket connected",Be,De),Dt=!0,we||(we=Vt.remoteAddress),Ne=Vt.remotePort});return}fe("Request#%d %s reuse socket connected, readyState: %s",Be,De,hn),Dt=!0,mt=!0,we||(we=Vt.remoteAddress),Ne=Vt.remotePort,nt(),qt()}),Xt.on("error",function(Vt){(Vt.name==="Error"||Vt.name==="TypeError")&&(Vt.name=Dt?"ResponseError":"RequestError"),Vt.message+=' (req "error")',fe("Request#%d %s `req error` event emit, %s: %s",Be,De,Vt.name,Vt.message),_e(yt||Vt)}),ht&&ht.once("error",function(Vt){Vt.message+=' (writeStream "error")',yt=Vt,fe("Request#%d %s `writeStream error` event emit, %s: %s",Be,De,Vt.name,Vt.message),Kt()}),Fe.stream?(Fe.stream.pipe(Xt),Fe.stream.once("error",function(Vt){Vt.message+=' (stream "error")',yt=Vt,fe("Request#%d %s `readStream error` event emit, %s: %s",Be,De,Vt.name,Vt.message),Kt()})):Xt.end(wt),Xt.requestId=Be,Xt}}).call(this)}).call(this,oe("_process"),oe("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,debug:465,http:468,https:355,"humanize-ms":356,url:472,util:419}]},{},[1])(1)})})(window)},99498:function(Dn,jn,pt){(function(at){at(pt(89780))})(function(at){at.defineOption("placeholder","",function(Ee,ke,Se){var Ae=Se&&Se!=at.Init;if(ke&&!Ae)Ee.on("blur",Re),Ee.on("change",de),Ee.on("swapDoc",de),at.on(Ee.getInputField(),"compositionupdate",Ee.state.placeholderCompose=function(){He(Ee)}),de(Ee);else if(!ke&&Ae){Ee.off("blur",Re),Ee.off("change",de),Ee.off("swapDoc",de),at.off(Ee.getInputField(),"compositionupdate",Ee.state.placeholderCompose),Ut(Ee);var me=Ee.getWrapperElement();me.className=me.className.replace(" CodeMirror-empty","")}ke&&!Ee.hasFocus()&&Re(Ee)});function Ut(Ee){Ee.state.placeholder&&(Ee.state.placeholder.parentNode.removeChild(Ee.state.placeholder),Ee.state.placeholder=null)}function oe(Ee){Ut(Ee);var ke=Ee.state.placeholder=document.createElement("pre");ke.style.cssText="height: 0; overflow: visible",ke.style.direction=Ee.getOption("direction"),ke.className="CodeMirror-placeholder CodeMirror-line-like";var Se=Ee.getOption("placeholder");typeof Se=="string"&&(Se=document.createTextNode(Se)),ke.appendChild(Se),Ee.display.lineSpace.insertBefore(ke,Ee.display.lineSpace.firstChild)}function He(Ee){setTimeout(function(){var ke=!1,Se=Ee.getInputField();Se.nodeName=="TEXTAREA"?ke=!Se.value:Ee.lineCount()==1&&(ke=!/[^\u200b]/.test(Se.querySelector(".CodeMirror-line").textContent)),ke?oe(Ee):Ut(Ee)},20)}function Re(Ee){ve(Ee)&&oe(Ee)}function de(Ee){var ke=Ee.getWrapperElement(),Se=ve(Ee);ke.className=ke.className.replace(" CodeMirror-empty","")+(Se?" CodeMirror-empty":""),Se?oe(Ee):Ut(Ee)}function ve(Ee){return Ee.lineCount()===1&&Ee.getLine(0)===""}})},25717:function(Dn,jn,pt){(function(at){at(pt(89780))})(function(at){var Ut={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},oe=at.Pos;at.defineOption("autoCloseBrackets",!1,function(z,te,se){se&&se!=at.Init&&(z.removeKeyMap(Re),z.state.closeBrackets=null),te&&(de(He(te,"pairs")),z.state.closeBrackets=te,z.addKeyMap(Re))});function He(z,te){return te=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[te]!=null?z[te]:Ut[te]}var Re={Backspace:ke,Enter:Se};function de(z){for(var te=0;te<z.length;te++){var se=z.charAt(te),ie="'"+se+"'";Re[ie]||(Re[ie]=ve(se))}}de(Ut.pairs+"`");function ve(z){return function(te){return me(te,z)}}function Ee(z){var te=z.state.closeBrackets;if(!te||te.override)return te;var se=z.getModeAt(z.getCursor());return se.closeBrackets||te}function ke(z){var te=Ee(z);if(!te||z.getOption("disableInput"))return at.Pass;for(var se=He(te,"pairs"),ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return at.Pass;var ce=Pe(z,ie[le].head);if(!ce||se.indexOf(ce)%2!=0)return at.Pass}for(var le=ie.length-1;le>=0;le--){var pe=ie[le].head;z.replaceRange("",oe(pe.line,pe.ch-1),oe(pe.line,pe.ch+1),"+delete")}}function Se(z){var te=Ee(z),se=te&&He(te,"explode");if(!se||z.getOption("disableInput"))return at.Pass;for(var ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return at.Pass;var ce=Pe(z,ie[le].head);if(!ce||se.indexOf(ce)%2!=0)return at.Pass}z.operation(function(){var pe=z.lineSeparator()||`
|
|
`;z.replaceSelection(pe+pe,null),z.execCommand("goCharLeft"),ie=z.listSelections();for(var xe=0;xe<ie.length;xe++){var je=ie[xe].head.line;z.indentLine(je,null,!0),z.indentLine(je+1,null,!0)}})}function Ae(z){var te=at.cmpPos(z.anchor,z.head)>0;return{anchor:new oe(z.anchor.line,z.anchor.ch+(te?-1:1)),head:new oe(z.head.line,z.head.ch+(te?1:-1))}}function me(z,te){var se=Ee(z);if(!se||z.getOption("disableInput"))return at.Pass;var ie=He(se,"pairs"),le=ie.indexOf(te);if(le==-1)return at.Pass;for(var ce=He(se,"closeBefore"),pe=He(se,"triples"),xe=ie.charAt(le+1)==te,je=z.listSelections(),De=le%2==0,Fe,Te=0;Te<je.length;Te++){var Me=je[Te],Be=Me.head,Ue,Ye=z.getRange(Be,oe(Be.line,Be.ch+1));if(De&&!Me.empty())Ue="surround";else if((xe||!De)&&Ye==te)xe&&fe(z,Be)?Ue="both":pe.indexOf(te)>=0&&z.getRange(Be,oe(Be.line,Be.ch+3))==te+te+te?Ue="skipThree":Ue="skip";else if(xe&&Be.ch>1&&pe.indexOf(te)>=0&&z.getRange(oe(Be.line,Be.ch-2),Be)==te+te){if(Be.ch>2&&/\bstring/.test(z.getTokenTypeAt(oe(Be.line,Be.ch-2))))return at.Pass;Ue="addFour"}else if(xe){var Ve=Be.ch==0?" ":z.getRange(oe(Be.line,Be.ch-1),Be);if(!at.isWordChar(Ye)&&Ve!=te&&!at.isWordChar(Ve))Ue="both";else return at.Pass}else if(De&&(Ye.length===0||/\s/.test(Ye)||ce.indexOf(Ye)>-1))Ue="both";else return at.Pass;if(!Fe)Fe=Ue;else if(Fe!=Ue)return at.Pass}var Ze=le%2?ie.charAt(le-1):te,ot=le%2?te:ie.charAt(le+1);z.operation(function(){if(Fe=="skip")z.execCommand("goCharRight");else if(Fe=="skipThree")for(var lt=0;lt<3;lt++)z.execCommand("goCharRight");else if(Fe=="surround"){for(var ft=z.getSelections(),lt=0;lt<ft.length;lt++)ft[lt]=Ze+ft[lt]+ot;z.replaceSelections(ft,"around"),ft=z.listSelections().slice();for(var lt=0;lt<ft.length;lt++)ft[lt]=Ae(ft[lt]);z.setSelections(ft)}else Fe=="both"?(z.replaceSelection(Ze+ot,null),z.triggerElectric(Ze+ot),z.execCommand("goCharLeft")):Fe=="addFour"&&(z.replaceSelection(Ze+Ze+Ze+Ze,"before"),z.execCommand("goCharRight"))})}function Pe(z,te){var se=z.getRange(oe(te.line,te.ch-1),oe(te.line,te.ch+1));return se.length==2?se:null}function fe(z,te){var se=z.getTokenAt(oe(te.line,te.ch+1));return/\bstring/.test(se.type)&&se.start==te.ch&&(te.ch==0||!/\bstring/.test(z.getTokenTypeAt(te)))}})},6313:function(Dn,jn,pt){(function(at){at(pt(89780),pt(32855))})(function(at){at.defineOption("autoCloseTags",!1,function(ke,Se,Ae){if(Ae!=at.Init&&Ae&&ke.removeKeyMap("autoCloseTags"),!!Se){var me={name:"autoCloseTags"};(typeof Se!="object"||Se.whenClosing!==!1)&&(me["'/'"]=function(Pe){return de(Pe)}),(typeof Se!="object"||Se.whenOpening!==!1)&&(me["'>'"]=function(Pe){return He(Pe)}),ke.addKeyMap(me)}});var Ut=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],oe=["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 He(ke){if(ke.getOption("disableInput"))return at.Pass;for(var Se=ke.listSelections(),Ae=[],me=ke.getOption("autoCloseTags"),Pe=0;Pe<Se.length;Pe++){if(!Se[Pe].empty())return at.Pass;var fe=Se[Pe].head,z=ke.getTokenAt(fe),te=at.innerMode(ke.getMode(),z.state),se=te.state,ie=te.mode.xmlCurrentTag&&te.mode.xmlCurrentTag(se),le=ie&&ie.name;if(!le)return at.Pass;var ce=te.mode.configuration=="html",pe=typeof me=="object"&&me.dontCloseTags||ce&&Ut,xe=typeof me=="object"&&me.indentTags||ce&&oe;z.end>fe.ch&&(le=le.slice(0,le.length-z.end+fe.ch));var je=le.toLowerCase();if(!le||z.type=="string"&&(z.end!=fe.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&ie.close||z.string.indexOf("/")==fe.ch-z.start-1||pe&&ve(pe,je)>-1||Ee(ke,te.mode.xmlCurrentContext&&te.mode.xmlCurrentContext(se)||[],le,fe,!0))return at.Pass;var De=typeof me=="object"&&me.emptyTags;if(De&&ve(De,le)>-1){Ae[Pe]={text:"/>",newPos:at.Pos(fe.line,fe.ch+2)};continue}var Fe=xe&&ve(xe,je)>-1;Ae[Pe]={indent:Fe,text:">"+(Fe?`
|
|
|
|
`:"")+"</"+le+">",newPos:Fe?at.Pos(fe.line+1,0):at.Pos(fe.line,fe.ch+1)}}for(var Te=typeof me=="object"&&me.dontIndentOnAutoClose,Pe=Se.length-1;Pe>=0;Pe--){var Me=Ae[Pe];ke.replaceRange(Me.text,Se[Pe].head,Se[Pe].anchor,"+insert");var Be=ke.listSelections().slice(0);Be[Pe]={head:Me.newPos,anchor:Me.newPos},ke.setSelections(Be),!Te&&Me.indent&&(ke.indentLine(Me.newPos.line,null,!0),ke.indentLine(Me.newPos.line+1,null,!0))}}function Re(ke,Se){for(var Ae=ke.listSelections(),me=[],Pe=Se?"/":"</",fe=ke.getOption("autoCloseTags"),z=typeof fe=="object"&&fe.dontIndentOnSlash,te=0;te<Ae.length;te++){if(!Ae[te].empty())return at.Pass;var se=Ae[te].head,ie=ke.getTokenAt(se),le=at.innerMode(ke.getMode(),ie.state),ce=le.state;if(Se&&(ie.type=="string"||ie.string.charAt(0)!="<"||ie.start!=se.ch-1))return at.Pass;var pe,xe=le.mode.name!="xml"&&ke.getMode().name=="htmlmixed";if(xe&&le.mode.name=="javascript")pe=Pe+"script";else if(xe&&le.mode.name=="css")pe=Pe+"style";else{var je=le.mode.xmlCurrentContext&&le.mode.xmlCurrentContext(ce);if(!je||je.length&&Ee(ke,je,je[je.length-1],se))return at.Pass;pe=Pe+je[je.length-1]}ke.getLine(se.line).charAt(ie.end)!=">"&&(pe+=">"),me[te]=pe}if(ke.replaceSelections(me),Ae=ke.listSelections(),!z)for(var te=0;te<Ae.length;te++)(te==Ae.length-1||Ae[te].head.line<Ae[te+1].head.line)&&ke.indentLine(Ae[te].head.line)}function de(ke){return ke.getOption("disableInput")?at.Pass:Re(ke,!0)}at.commands.closeTag=function(ke){return Re(ke)};function ve(ke,Se){if(ke.indexOf)return ke.indexOf(Se);for(var Ae=0,me=ke.length;Ae<me;++Ae)if(ke[Ae]==Se)return Ae;return-1}function Ee(ke,Se,Ae,me,Pe){if(!at.scanForClosingTag)return!1;var fe=Math.min(ke.lastLine()+1,me.line+500),z=at.scanForClosingTag(ke,me,null,fe);if(!z||z.tag!=Ae)return!1;for(var te=Pe?1:0,se=Se.length-1;se>=0&&Se[se]==Ae;se--)++te;me=z.to;for(var se=1;se<te;se++){var ie=at.scanForClosingTag(ke,me,null,fe);if(!ie||ie.tag!=Ae)return!1;me=ie.to}return!0}})},32855:function(Dn,jn,pt){(function(at){at(pt(89780))})(function(at){"use strict";var Ut=at.Pos;function oe(se,ie){return se.line-ie.line||se.ch-ie.ch}var He="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",Re=He+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",de=new RegExp("<(/?)(["+He+"]["+Re+"]*)","g");function ve(se,ie,le,ce){this.line=ie,this.ch=le,this.cm=se,this.text=se.getLine(ie),this.min=ce?Math.max(ce.from,se.firstLine()):se.firstLine(),this.max=ce?Math.min(ce.to-1,se.lastLine()):se.lastLine()}function Ee(se,ie){var le=se.cm.getTokenTypeAt(Ut(se.line,ie));return le&&/\btag\b/.test(le)}function ke(se){if(!(se.line>=se.max))return se.ch=0,se.text=se.cm.getLine(++se.line),!0}function Se(se){if(!(se.line<=se.min))return se.text=se.cm.getLine(--se.line),se.ch=se.text.length,!0}function Ae(se){for(;;){var ie=se.text.indexOf(">",se.ch);if(ie==-1){if(ke(se))continue;return}if(!Ee(se,ie+1)){se.ch=ie+1;continue}var le=se.text.lastIndexOf("/",ie),ce=le>-1&&!/\S/.test(se.text.slice(le+1,ie));return se.ch=ie+1,ce?"selfClose":"regular"}}function me(se){for(;;){var ie=se.ch?se.text.lastIndexOf("<",se.ch-1):-1;if(ie==-1){if(Se(se))continue;return}if(!Ee(se,ie+1)){se.ch=ie;continue}de.lastIndex=ie,se.ch=ie;var le=de.exec(se.text);if(le&&le.index==ie)return le}}function Pe(se){for(;;){de.lastIndex=se.ch;var ie=de.exec(se.text);if(!ie){if(ke(se))continue;return}if(!Ee(se,ie.index+1)){se.ch=ie.index+1;continue}return se.ch=ie.index+ie[0].length,ie}}function fe(se){for(;;){var ie=se.ch?se.text.lastIndexOf(">",se.ch-1):-1;if(ie==-1){if(Se(se))continue;return}if(!Ee(se,ie+1)){se.ch=ie;continue}var le=se.text.lastIndexOf("/",ie),ce=le>-1&&!/\S/.test(se.text.slice(le+1,ie));return se.ch=ie+1,ce?"selfClose":"regular"}}function z(se,ie){for(var le=[];;){var ce=Pe(se),pe,xe=se.line,je=se.ch-(ce?ce[0].length:0);if(!ce||!(pe=Ae(se)))return;if(pe!="selfClose")if(ce[1]){for(var De=le.length-1;De>=0;--De)if(le[De]==ce[2]){le.length=De;break}if(De<0&&(!ie||ie==ce[2]))return{tag:ce[2],from:Ut(xe,je),to:Ut(se.line,se.ch)}}else le.push(ce[2])}}function te(se,ie){for(var le=[];;){var ce=fe(se);if(!ce)return;if(ce=="selfClose"){me(se);continue}var pe=se.line,xe=se.ch,je=me(se);if(!je)return;if(je[1])le.push(je[2]);else{for(var De=le.length-1;De>=0;--De)if(le[De]==je[2]){le.length=De;break}if(De<0&&(!ie||ie==je[2]))return{tag:je[2],from:Ut(se.line,se.ch),to:Ut(pe,xe)}}}}at.registerHelper("fold","xml",function(se,ie){for(var le=new ve(se,ie.line,0);;){var ce=Pe(le);if(!ce||le.line!=ie.line)return;var pe=Ae(le);if(!pe)return;if(!ce[1]&&pe!="selfClose"){var xe=Ut(le.line,le.ch),je=z(le,ce[2]);return je&&oe(je.from,xe)>0?{from:xe,to:je.from}:null}}}),at.findMatchingTag=function(se,ie,le){var ce=new ve(se,ie.line,ie.ch,le);if(!(ce.text.indexOf(">")==-1&&ce.text.indexOf("<")==-1)){var pe=Ae(ce),xe=pe&&Ut(ce.line,ce.ch),je=pe&&me(ce);if(!(!pe||!je||oe(ce,ie)>0)){var De={from:Ut(ce.line,ce.ch),to:xe,tag:je[2]};return pe=="selfClose"?{open:De,close:null,at:"open"}:je[1]?{open:te(ce,je[2]),close:De,at:"close"}:(ce=new ve(se,xe.line,xe.ch,le),{open:De,close:z(ce,je[2]),at:"open"})}}},at.findEnclosingTag=function(se,ie,le,ce){for(var pe=new ve(se,ie.line,ie.ch,le);;){var xe=te(pe,ce);if(!xe)break;var je=new ve(se,ie.line,ie.ch,le),De=z(je,xe.tag);if(De)return{open:xe,close:De}}},at.scanForClosingTag=function(se,ie,le,ce){var pe=new ve(se,ie.line,ie.ch,ce?{from:0,to:ce}:null);return z(pe,le)}})},89780:function(Dn){(function(jn,pt){Dn.exports=pt()})(this,function(){"use strict";var jn=navigator.userAgent,pt=navigator.platform,at=/gecko\/\d/i.test(jn),Ut=/MSIE \d/.test(jn),oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jn),He=/Edge\/(\d+)/.exec(jn),Re=Ut||oe||He,de=Re&&(Ut?document.documentMode||6:+(He||oe)[1]),ve=!He&&/WebKit\//.test(jn),Ee=ve&&/Qt\/\d+\.\d+/.test(jn),ke=!He&&/Chrome\//.test(jn),Se=/Opera\//.test(jn),Ae=/Apple Computer/.test(navigator.vendor),me=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(jn),Pe=/PhantomJS/.test(jn),fe=!He&&/AppleWebKit/.test(jn)&&/Mobile\/\w+/.test(jn),z=/Android/.test(jn),te=fe||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(jn),se=fe||/Mac/.test(pt),ie=/\bCrOS\b/.test(jn),le=/win/i.test(pt),ce=Se&&jn.match(/Version\/(\d*\.\d*)/);ce&&(ce=Number(ce[1])),ce&&ce>=15&&(Se=!1,ve=!0);var pe=se&&(Ee||Se&&(ce==null||ce<12.11)),xe=at||Re&&de>=9;function je(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var De=function(re,he){var Ce=re.className,be=je(he).exec(Ce);if(be){var Oe=Ce.slice(be.index+be[0].length);re.className=Ce.slice(0,be.index)+(Oe?be[1]+Oe:"")}};function Fe(re){for(var he=re.childNodes.length;he>0;--he)re.removeChild(re.firstChild);return re}function Te(re,he){return Fe(re).appendChild(he)}function Me(re,he,Ce,be){var Oe=document.createElement(re);if(Ce&&(Oe.className=Ce),be&&(Oe.style.cssText=be),typeof he=="string")Oe.appendChild(document.createTextNode(he));else if(he)for(var $e=0;$e<he.length;++$e)Oe.appendChild(he[$e]);return Oe}function Be(re,he,Ce,be){var Oe=Me(re,he,Ce,be);return Oe.setAttribute("role","presentation"),Oe}var Ue;document.createRange?Ue=function(re,he,Ce,be){var Oe=document.createRange();return Oe.setEnd(be||re,Ce),Oe.setStart(re,he),Oe}:Ue=function(re,he,Ce){var be=document.body.createTextRange();try{be.moveToElementText(re.parentNode)}catch(Oe){return be}return be.collapse(!0),be.moveEnd("character",Ce),be.moveStart("character",he),be};function Ye(re,he){if(he.nodeType==3&&(he=he.parentNode),re.contains)return re.contains(he);do if(he.nodeType==11&&(he=he.host),he==re)return!0;while(he=he.parentNode)}function Ve(){var re;try{re=document.activeElement}catch(he){re=document.body||null}for(;re&&re.shadowRoot&&re.shadowRoot.activeElement;)re=re.shadowRoot.activeElement;return re}function Ze(re,he){var Ce=re.className;je(he).test(Ce)||(re.className+=(Ce?" ":"")+he)}function ot(re,he){for(var Ce=re.split(" "),be=0;be<Ce.length;be++)Ce[be]&&!je(Ce[be]).test(he)&&(he+=" "+Ce[be]);return he}var lt=function(re){re.select()};fe?lt=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:Re&&(lt=function(re){try{re.select()}catch(he){}});function ft(re){var he=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,he)}}function St(re,he,Ce){he||(he={});for(var be in re)re.hasOwnProperty(be)&&(Ce!==!1||!he.hasOwnProperty(be))&&(he[be]=re[be]);return he}function qe(re,he,Ce,be,Oe){he==null&&(he=re.search(/[^\s\u00a0]/),he==-1&&(he=re.length));for(var $e=be||0,gt=Oe||0;;){var Lt=re.indexOf(" ",$e);if(Lt<0||Lt>=he)return gt+(he-$e);gt+=Lt-$e,gt+=Ce-gt%Ce,$e=Lt+1}}var rt=function(){this.id=null,this.f=null,this.time=0,this.handler=ft(this.onTimeout,this)};rt.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},rt.prototype.set=function(re,he){this.f=he;var Ce=+new Date+re;(!this.id||Ce<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,re),this.time=Ce)};function wt(re,he){for(var Ce=0;Ce<re.length;++Ce)if(re[Ce]==he)return Ce;return-1}var Ct=50,bt={toString:function(){return"CodeMirror.Pass"}},ct={scroll:!1},xt={origin:"*mouse"},dt={origin:"+move"};function Mt(re,he,Ce){for(var be=0,Oe=0;;){var $e=re.indexOf(" ",be);$e==-1&&($e=re.length);var gt=$e-be;if($e==re.length||Oe+gt>=he)return be+Math.min(gt,he-Oe);if(Oe+=$e-be,Oe+=Ce-Oe%Ce,be=$e+1,Oe>=he)return be}}var yt=[""];function Dt(re){for(;yt.length<=re;)yt.push(mt(yt)+" ");return yt[re]}function mt(re){return re[re.length-1]}function vt(re,he){for(var Ce=[],be=0;be<re.length;be++)Ce[be]=he(re[be],be);return Ce}function et(re,he,Ce){for(var be=0,Oe=Ce(he);be<re.length&&Ce(re[be])<=Oe;)be++;re.splice(be,0,he)}function We(){}function we(re,he){var Ce;return Object.create?Ce=Object.create(re):(We.prototype=re,Ce=new We),he&&St(he,Ce),Ce}var Ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Xe(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||Ne.test(re))}function nt(re,he){return he?he.source.indexOf("\\w")>-1&&Xe(re)?!0:he.test(re):Xe(re)}function Ie(re){for(var he in re)if(re.hasOwnProperty(he)&&re[he])return!1;return!0}var _e=/[\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 Ge(re){return re.charCodeAt(0)>=768&&_e.test(re)}function tt(re,he,Ce){for(;(Ce<0?he>0:he<re.length)&&Ge(re.charAt(he));)he+=Ce;return he}function ht(re,he,Ce){for(var be=he>Ce?-1:1;;){if(he==Ce)return he;var Oe=(he+Ce)/2,$e=be<0?Math.ceil(Oe):Math.floor(Oe);if($e==he)return re($e)?he:Ce;re($e)?Ce=$e:he=$e+be}}function ut(re,he,Ce,be){if(!re)return be(he,Ce,"ltr",0);for(var Oe=!1,$e=0;$e<re.length;++$e){var gt=re[$e];(gt.from<Ce&>.to>he||he==Ce&>.to==he)&&(be(Math.max(gt.from,he),Math.min(gt.to,Ce),gt.level==1?"rtl":"ltr",$e),Oe=!0)}Oe||be(he,Ce,"ltr")}var Ot=null;function Et(re,he,Ce){var be;Ot=null;for(var Oe=0;Oe<re.length;++Oe){var $e=re[Oe];if($e.from<he&&$e.to>he)return Oe;$e.to==he&&($e.from!=$e.to&&Ce=="before"?be=Oe:Ot=Oe),$e.from==he&&($e.from!=$e.to&&Ce!="before"?be=Oe:Ot=Oe)}return be!=null?be:Ot}var Ft=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",he="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Ce(It){return It<=247?re.charAt(It):1424<=It&&It<=1524?"R":1536<=It&&It<=1785?he.charAt(It-1536):1774<=It&&It<=2220?"r":8192<=It&&It<=8203?"w":It==8204?"b":"L"}var be=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Oe=/[stwN]/,$e=/[LRr]/,gt=/[Lb1n]/,Lt=/[1n]/;function kt(It,nn,_t){this.level=It,this.from=nn,this.to=_t}return function(It,nn){var _t=nn=="ltr"?"L":"R";if(It.length==0||nn=="ltr"&&!be.test(It))return!1;for(var xn=It.length,mn=[],ur=0;ur<xn;++ur)mn.push(Ce(It.charCodeAt(ur)));for(var gr=0,Cr=_t;gr<xn;++gr){var Ir=mn[gr];Ir=="m"?mn[gr]=Cr:Cr=Ir}for(var ni=0,Zr=_t;ni<xn;++ni){var ci=mn[ni];ci=="1"&&Zr=="r"?mn[ni]="n":$e.test(ci)&&(Zr=ci,ci=="r"&&(mn[ni]="R"))}for(var Ii=1,Kr=mn[0];Ii<xn-1;++Ii){var $i=mn[Ii];$i=="+"&&Kr=="1"&&mn[Ii+1]=="1"?mn[Ii]="1":$i==","&&Kr==mn[Ii+1]&&(Kr=="1"||Kr=="n")&&(mn[Ii]=Kr),Kr=$i}for(var Xo=0;Xo<xn;++Xo){var Ia=mn[Xo];if(Ia==",")mn[Xo]="N";else if(Ia=="%"){var ia=void 0;for(ia=Xo+1;ia<xn&&mn[ia]=="%";++ia);for(var Ds=Xo&&mn[Xo-1]=="!"||ia<xn&&mn[ia]=="1"?"1":"N",gs=Xo;gs<ia;++gs)mn[gs]=Ds;Xo=ia-1}}for(var La=0,Vs=_t;La<xn;++La){var ss=mn[La];Vs=="L"&&ss=="1"?mn[La]="L":$e.test(ss)&&(Vs=ss)}for(var Ma=0;Ma<xn;++Ma)if(Oe.test(mn[Ma])){var yo=void 0;for(yo=Ma+1;yo<xn&&Oe.test(mn[yo]);++yo);for(var ca=(Ma?mn[Ma-1]:_t)=="L",Za=(yo<xn?mn[yo]:_t)=="L",ls=ca==Za?ca?"L":"R":_t,Ol=Ma;Ol<yo;++Ol)mn[Ol]=ls;Ma=yo-1}for(var oa=[],Sl,pa=0;pa<xn;)if(gt.test(mn[pa])){var Af=pa;for(++pa;pa<xn&>.test(mn[pa]);++pa);oa.push(new kt(0,Af,pa))}else{var sl=pa,Zs=oa.length,Bs=nn=="rtl"?1:0;for(++pa;pa<xn&&mn[pa]!="L";++pa);for(var Bo=sl;Bo<pa;)if(Lt.test(mn[Bo])){sl<Bo&&(oa.splice(Zs,0,new kt(1,sl,Bo)),Zs+=Bs);var Xa=Bo;for(++Bo;Bo<pa&&Lt.test(mn[Bo]);++Bo);oa.splice(Zs,0,new kt(2,Xa,Bo)),Zs+=Bs,sl=Bo}else++Bo;sl<pa&&oa.splice(Zs,0,new kt(1,sl,pa))}return nn=="ltr"&&(oa[0].level==1&&(Sl=It.match(/^\s+/))&&(oa[0].from=Sl[0].length,oa.unshift(new kt(0,0,Sl[0].length))),mt(oa).level==1&&(Sl=It.match(/\s+$/))&&(mt(oa).to-=Sl[0].length,oa.push(new kt(0,xn-Sl[0].length,xn)))),nn=="rtl"?oa.reverse():oa}}();function qt(re,he){var Ce=re.order;return Ce==null&&(Ce=re.order=Ft(re.text,he)),Ce}var Xt=[],Kt=function(re,he,Ce){if(re.addEventListener)re.addEventListener(he,Ce,!1);else if(re.attachEvent)re.attachEvent("on"+he,Ce);else{var be=re._handlers||(re._handlers={});be[he]=(be[he]||Xt).concat(Ce)}};function Vt(re,he){return re._handlers&&re._handlers[he]||Xt}function hn(re,he,Ce){if(re.removeEventListener)re.removeEventListener(he,Ce,!1);else if(re.detachEvent)re.detachEvent("on"+he,Ce);else{var be=re._handlers,Oe=be&&be[he];if(Oe){var $e=wt(Oe,Ce);$e>-1&&(be[he]=Oe.slice(0,$e).concat(Oe.slice($e+1)))}}}function on(re,he){var Ce=Vt(re,he);if(Ce.length)for(var be=Array.prototype.slice.call(arguments,2),Oe=0;Oe<Ce.length;++Oe)Ce[Oe].apply(null,be)}function cn(re,he,Ce){return typeof he=="string"&&(he={type:he,preventDefault:function(){this.defaultPrevented=!0}}),on(re,Ce||he.type,re,he),xr(he)||he.codemirrorIgnore}function Sn(re){var he=re._handlers&&re._handlers.cursorActivity;if(he)for(var Ce=re.curOp.cursorActivityHandlers||(re.curOp.cursorActivityHandlers=[]),be=0;be<he.length;++be)wt(Ce,he[be])==-1&&Ce.push(he[be])}function Cn(re,he){return Vt(re,he).length>0}function kn(re){re.prototype.on=function(he,Ce){Kt(this,he,Ce)},re.prototype.off=function(he,Ce){hn(this,he,Ce)}}function In(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function _r(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function xr(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function qr(re){In(re),_r(re)}function er(re){return re.target||re.srcElement}function si(re){var he=re.which;return he==null&&(re.button&1?he=1:re.button&2?he=3:re.button&4&&(he=2)),se&&re.ctrlKey&&he==1&&(he=3),he}var ei=function(){if(Re&&de<9)return!1;var re=Me("div");return"draggable"in re||"dragDrop"in re}(),vi;function Li(re){if(vi==null){var he=Me("span","\u200B");Te(re,Me("span",[he,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(vi=he.offsetWidth<=1&&he.offsetHeight>2&&!(Re&&de<8))}var Ce=vi?Me("span","\u200B"):Me("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Ce.setAttribute("cm-text",""),Ce}var Pi;function Xr(re){if(Pi!=null)return Pi;var he=Te(re,document.createTextNode("A\u062EA")),Ce=Ue(he,0,1).getBoundingClientRect(),be=Ue(he,1,2).getBoundingClientRect();return Fe(re),!Ce||Ce.left==Ce.right?!1:Pi=be.right-Ce.right<3}var mi=`
|
|
|
|
b`.split(/\n/).length!=3?function(re){for(var he=0,Ce=[],be=re.length;he<=be;){var Oe=re.indexOf(`
|
|
`,he);Oe==-1&&(Oe=re.length);var $e=re.slice(he,re.charAt(Oe-1)=="\r"?Oe-1:Oe),gt=$e.indexOf("\r");gt!=-1?(Ce.push($e.slice(0,gt)),he+=gt+1):(Ce.push($e),he=Oe+1)}return Ce}:function(re){return re.split(/\r\n?|\n/)},Qe=window.getSelection?function(re){try{return re.selectionStart!=re.selectionEnd}catch(he){return!1}}:function(re){var he;try{he=re.ownerDocument.selection.createRange()}catch(Ce){}return!he||he.parentElement()!=re?!1:he.compareEndPoints("StartToEnd",he)!=0},ii=function(){var re=Me("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),Tr=null;function wr(re){if(Tr!=null)return Tr;var he=Te(re,Me("span","x")),Ce=he.getBoundingClientRect(),be=Ue(he,0,1).getBoundingClientRect();return Tr=Math.abs(Ce.left-be.left)>1}var Er={},kr={};function Hi(re,he){arguments.length>2&&(he.dependencies=Array.prototype.slice.call(arguments,2)),Er[re]=he}function pr(re,he){kr[re]=he}function Kn(re){if(typeof re=="string"&&kr.hasOwnProperty(re))re=kr[re];else if(re&&typeof re.name=="string"&&kr.hasOwnProperty(re.name)){var he=kr[re.name];typeof he=="string"&&(he={name:he}),re=we(he,re),re.name=he.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return Kn("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return Kn("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function Qt(re,he){he=Kn(he);var Ce=Er[he.name];if(!Ce)return Qt(re,"text/plain");var be=Ce(re,he);if(Wt.hasOwnProperty(he.name)){var Oe=Wt[he.name];for(var $e in Oe)Oe.hasOwnProperty($e)&&(be.hasOwnProperty($e)&&(be["_"+$e]=be[$e]),be[$e]=Oe[$e])}if(be.name=he.name,he.helperType&&(be.helperType=he.helperType),he.modeProps)for(var gt in he.modeProps)be[gt]=he.modeProps[gt];return be}var Wt={};function zt(re,he){var Ce=Wt.hasOwnProperty(re)?Wt[re]:Wt[re]={};St(he,Ce)}function Nn(re,he){if(he===!0)return he;if(re.copyState)return re.copyState(he);var Ce={};for(var be in he){var Oe=he[be];Oe instanceof Array&&(Oe=Oe.concat([])),Ce[be]=Oe}return Ce}function Vn(re,he){for(var Ce;re.innerMode&&(Ce=re.innerMode(he),!(!Ce||Ce.mode==re));)he=Ce.state,re=Ce.mode;return Ce||{mode:re,state:he}}function vr(re,he,Ce){return re.startState?re.startState(he,Ce):!0}var yn=function(re,he,Ce){this.pos=this.start=0,this.string=re,this.tabSize=he||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Ce};yn.prototype.eol=function(){return this.pos>=this.string.length},yn.prototype.sol=function(){return this.pos==this.lineStart},yn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},yn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},yn.prototype.eat=function(re){var he=this.string.charAt(this.pos),Ce;if(typeof re=="string"?Ce=he==re:Ce=he&&(re.test?re.test(he):re(he)),Ce)return++this.pos,he},yn.prototype.eatWhile=function(re){for(var he=this.pos;this.eat(re););return this.pos>he},yn.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},yn.prototype.skipToEnd=function(){this.pos=this.string.length},yn.prototype.skipTo=function(re){var he=this.string.indexOf(re,this.pos);if(he>-1)return this.pos=he,!0},yn.prototype.backUp=function(re){this.pos-=re},yn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},yn.prototype.indentation=function(){return qe(this.string,null,this.tabSize)-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},yn.prototype.match=function(re,he,Ce){if(typeof re=="string"){var be=function(gt){return Ce?gt.toLowerCase():gt},Oe=this.string.substr(this.pos,re.length);if(be(Oe)==be(re))return he!==!1&&(this.pos+=re.length),!0}else{var $e=this.string.slice(this.pos).match(re);return $e&&$e.index>0?null:($e&&he!==!1&&(this.pos+=$e[0].length),$e)}},yn.prototype.current=function(){return this.string.slice(this.start,this.pos)},yn.prototype.hideFirstChars=function(re,he){this.lineStart+=re;try{return he()}finally{this.lineStart-=re}},yn.prototype.lookAhead=function(re){var he=this.lineOracle;return he&&he.lookAhead(re)},yn.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function zn(re,he){if(he-=re.first,he<0||he>=re.size)throw new Error("There is no line "+(he+re.first)+" in the document.");for(var Ce=re;!Ce.lines;)for(var be=0;;++be){var Oe=Ce.children[be],$e=Oe.chunkSize();if(he<$e){Ce=Oe;break}he-=$e}return Ce.lines[he]}function Ht(re,he,Ce){var be=[],Oe=he.line;return re.iter(he.line,Ce.line+1,function($e){var gt=$e.text;Oe==Ce.line&&(gt=gt.slice(0,Ce.ch)),Oe==he.line&&(gt=gt.slice(he.ch)),be.push(gt),++Oe}),be}function Yt(re,he,Ce){var be=[];return re.iter(he,Ce,function(Oe){be.push(Oe.text)}),be}function qn(re,he){var Ce=he-re.height;if(Ce)for(var be=re;be;be=be.parent)be.height+=Ce}function jt(re){if(re.parent==null)return null;for(var he=re.parent,Ce=wt(he.lines,re),be=he.parent;be;he=be,be=be.parent)for(var Oe=0;be.children[Oe]!=he;++Oe)Ce+=be.children[Oe].chunkSize();return Ce+he.first}function un(re,he){var Ce=re.first;e:do{for(var be=0;be<re.children.length;++be){var Oe=re.children[be],$e=Oe.height;if(he<$e){re=Oe;continue e}he-=$e,Ce+=Oe.chunkSize()}return Ce}while(!re.lines);for(var gt=0;gt<re.lines.length;++gt){var Lt=re.lines[gt],kt=Lt.height;if(he<kt)break;he-=kt}return Ce+gt}function An(re,he){return he>=re.first&&he<re.first+re.size}function Yn(re,he){return String(re.lineNumberFormatter(he+re.firstLineNumber))}function ln(re,he,Ce){if(Ce===void 0&&(Ce=null),!(this instanceof ln))return new ln(re,he,Ce);this.line=re,this.ch=he,this.sticky=Ce}function fn(re,he){return re.line-he.line||re.ch-he.ch}function Hn(re,he){return re.sticky==he.sticky&&fn(re,he)==0}function tr(re){return ln(re.line,re.ch)}function Zn(re,he){return fn(re,he)<0?he:re}function ir(re,he){return fn(re,he)<0?re:he}function Un(re,he){return Math.max(re.first,Math.min(he,re.first+re.size-1))}function dr(re,he){if(he.line<re.first)return ln(re.first,0);var Ce=re.first+re.size-1;return he.line>Ce?ln(Ce,zn(re,Ce).text.length):Fr(he,zn(re,he.line).text.length)}function Fr(re,he){var Ce=re.ch;return Ce==null||Ce>he?ln(re.line,he):Ce<0?ln(re.line,0):re}function Nr(re,he){for(var Ce=[],be=0;be<he.length;be++)Ce[be]=dr(re,he[be]);return Ce}var Rr=function(re,he){this.state=re,this.lookAhead=he},gn=function(re,he,Ce,be){this.state=he,this.doc=re,this.line=Ce,this.maxLookAhead=be||0,this.baseTokens=null,this.baseTokenPos=1};gn.prototype.lookAhead=function(re){var he=this.doc.getLine(this.line+re);return he!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),he},gn.prototype.baseToken=function(re){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=re;)this.baseTokenPos+=2;var he=this.baseTokens[this.baseTokenPos+1];return{type:he&&he.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-re}},gn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},gn.fromSaved=function(re,he,Ce){return he instanceof Rr?new gn(re,Nn(re.mode,he.state),Ce,he.lookAhead):new gn(re,Nn(re.mode,he),Ce)},gn.prototype.save=function(re){var he=re!==!1?Nn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Rr(he,this.maxLookAhead):he};function Fi(re,he,Ce,be){var Oe=[re.state.modeGen],$e={};ri(re,he.text,re.doc.mode,Ce,function(It,nn){return Oe.push(It,nn)},$e,be);for(var gt=Ce.state,Lt=function(It){Ce.baseTokens=Oe;var nn=re.state.overlays[It],_t=1,xn=0;Ce.state=!0,ri(re,he.text,nn.mode,Ce,function(mn,ur){for(var gr=_t;xn<mn;){var Cr=Oe[_t];Cr>mn&&Oe.splice(_t,1,mn,Oe[_t+1],Cr),_t+=2,xn=Math.min(mn,Cr)}if(ur)if(nn.opaque)Oe.splice(gr,_t-gr,mn,"overlay "+ur),_t=gr+2;else for(;gr<_t;gr+=2){var Ir=Oe[gr+1];Oe[gr+1]=(Ir?Ir+" ":"")+"overlay "+ur}},$e),Ce.state=gt,Ce.baseTokens=null,Ce.baseTokenPos=1},kt=0;kt<re.state.overlays.length;++kt)Lt(kt);return{styles:Oe,classes:$e.bgClass||$e.textClass?$e:null}}function ti(re,he,Ce){if(!he.styles||he.styles[0]!=re.state.modeGen){var be=Mi(re,jt(he)),Oe=he.text.length>re.options.maxHighlightLength&&Nn(re.doc.mode,be.state),$e=Fi(re,he,be);Oe&&(be.state=Oe),he.stateAfter=be.save(!Oe),he.styles=$e.styles,$e.classes?he.styleClasses=$e.classes:he.styleClasses&&(he.styleClasses=null),Ce===re.doc.highlightFrontier&&(re.doc.modeFrontier=Math.max(re.doc.modeFrontier,++re.doc.highlightFrontier))}return he.styles}function Mi(re,he,Ce){var be=re.doc,Oe=re.display;if(!be.mode.startState)return new gn(be,!0,he);var $e=Yr(re,he,Ce),gt=$e>be.first&&zn(be,$e-1).stateAfter,Lt=gt?gn.fromSaved(be,gt,$e):new gn(be,vr(be.mode),$e);return be.iter($e,he,function(kt){an(re,kt.text,Lt);var It=Lt.line;kt.stateAfter=It==he-1||It%5==0||It>=Oe.viewFrom&&It<Oe.viewTo?Lt.save():null,Lt.nextLine()}),Ce&&(be.modeFrontier=Lt.line),Lt}function an(re,he,Ce,be){var Oe=re.doc.mode,$e=new yn(he,re.options.tabSize,Ce);for($e.start=$e.pos=be||0,he==""&&Qn(Oe,Ce.state);!$e.eol();)or(Oe,$e,Ce.state),$e.start=$e.pos}function Qn(re,he){if(re.blankLine)return re.blankLine(he);if(re.innerMode){var Ce=Vn(re,he);if(Ce.mode.blankLine)return Ce.mode.blankLine(Ce.state)}}function or(re,he,Ce,be){for(var Oe=0;Oe<10;Oe++){be&&(be[0]=Vn(re,Ce).mode);var $e=re.token(he,Ce);if(he.pos>he.start)return $e}throw new Error("Mode "+re.name+" failed to advance stream.")}var yr=function(re,he,Ce){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=he||null,this.state=Ce};function br(re,he,Ce,be){var Oe=re.doc,$e=Oe.mode,gt;he=dr(Oe,he);var Lt=zn(Oe,he.line),kt=Mi(re,he.line,Ce),It=new yn(Lt.text,re.options.tabSize,kt),nn;for(be&&(nn=[]);(be||It.pos<he.ch)&&!It.eol();)It.start=It.pos,gt=or($e,It,kt.state),be&&nn.push(new yr(It,gt,Nn(Oe.mode,kt.state)));return be?nn:new yr(It,gt,kt.state)}function Ar(re,he){if(re)for(;;){var Ce=re.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!Ce)break;re=re.slice(0,Ce.index)+re.slice(Ce.index+Ce[0].length);var be=Ce[1]?"bgClass":"textClass";he[be]==null?he[be]=Ce[2]:new RegExp("(?:^|\\s)"+Ce[2]+"(?:$|\\s)").test(he[be])||(he[be]+=" "+Ce[2])}return re}function ri(re,he,Ce,be,Oe,$e,gt){var Lt=Ce.flattenSpans;Lt==null&&(Lt=re.options.flattenSpans);var kt=0,It=null,nn=new yn(he,re.options.tabSize,be),_t,xn=re.options.addModeClass&&[null];for(he==""&&Ar(Qn(Ce,be.state),$e);!nn.eol();){if(nn.pos>re.options.maxHighlightLength?(Lt=!1,gt&&an(re,he,be,nn.pos),nn.pos=he.length,_t=null):_t=Ar(or(Ce,nn,be.state,xn),$e),xn){var mn=xn[0].name;mn&&(_t="m-"+(_t?mn+" "+_t:mn))}if(!Lt||It!=_t){for(;kt<nn.start;)kt=Math.min(nn.start,kt+5e3),Oe(kt,It);It=_t}nn.start=nn.pos}for(;kt<nn.pos;){var ur=Math.min(nn.pos,kt+5e3);Oe(ur,It),kt=ur}}function Yr(re,he,Ce){for(var be,Oe,$e=re.doc,gt=Ce?-1:he-(re.doc.mode.innerMode?1e3:100),Lt=he;Lt>gt;--Lt){if(Lt<=$e.first)return $e.first;var kt=zn($e,Lt-1),It=kt.stateAfter;if(It&&(!Ce||Lt+(It instanceof Rr?It.lookAhead:0)<=$e.modeFrontier))return Lt;var nn=qe(kt.text,null,re.options.tabSize);(Oe==null||be>nn)&&(Oe=Lt-1,be=nn)}return Oe}function Jr(re,he){if(re.modeFrontier=Math.min(re.modeFrontier,he),!(re.highlightFrontier<he-10)){for(var Ce=re.first,be=he-1;be>Ce;be--){var Oe=zn(re,be).stateAfter;if(Oe&&(!(Oe instanceof Rr)||be+Oe.lookAhead<he)){Ce=be+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,Ce)}}var sr=!1,rn=!1;function nr(){sr=!0}function sn(){rn=!0}function hr(re,he,Ce){this.marker=re,this.from=he,this.to=Ce}function Pr(re,he){if(re)for(var Ce=0;Ce<re.length;++Ce){var be=re[Ce];if(be.marker==he)return be}}function zr(re,he){for(var Ce,be=0;be<re.length;++be)re[be]!=he&&(Ce||(Ce=[])).push(re[be]);return Ce}function Ri(re,he){re.markedSpans=re.markedSpans?re.markedSpans.concat([he]):[he],he.marker.attachLine(re)}function Oi(re,he,Ce){var be;if(re)for(var Oe=0;Oe<re.length;++Oe){var $e=re[Oe],gt=$e.marker,Lt=$e.from==null||(gt.inclusiveLeft?$e.from<=he:$e.from<he);if(Lt||$e.from==he&>.type=="bookmark"&&(!Ce||!$e.marker.insertLeft)){var kt=$e.to==null||(gt.inclusiveRight?$e.to>=he:$e.to>he);(be||(be=[])).push(new hr(gt,$e.from,kt?null:$e.to))}}return be}function Si(re,he,Ce){var be;if(re)for(var Oe=0;Oe<re.length;++Oe){var $e=re[Oe],gt=$e.marker,Lt=$e.to==null||(gt.inclusiveRight?$e.to>=he:$e.to>he);if(Lt||$e.from==he&>.type=="bookmark"&&(!Ce||$e.marker.insertLeft)){var kt=$e.from==null||(gt.inclusiveLeft?$e.from<=he:$e.from<he);(be||(be=[])).push(new hr(gt,kt?null:$e.from-he,$e.to==null?null:$e.to-he))}}return be}function Di(re,he){if(he.full)return null;var Ce=An(re,he.from.line)&&zn(re,he.from.line).markedSpans,be=An(re,he.to.line)&&zn(re,he.to.line).markedSpans;if(!Ce&&!be)return null;var Oe=he.from.ch,$e=he.to.ch,gt=fn(he.from,he.to)==0,Lt=Oi(Ce,Oe,gt),kt=Si(be,$e,gt),It=he.text.length==1,nn=mt(he.text).length+(It?Oe:0);if(Lt)for(var _t=0;_t<Lt.length;++_t){var xn=Lt[_t];if(xn.to==null){var mn=Pr(kt,xn.marker);mn?It&&(xn.to=mn.to==null?null:mn.to+nn):xn.to=Oe}}if(kt)for(var ur=0;ur<kt.length;++ur){var gr=kt[ur];if(gr.to!=null&&(gr.to+=nn),gr.from==null){var Cr=Pr(Lt,gr.marker);Cr||(gr.from=nn,It&&(Lt||(Lt=[])).push(gr))}else gr.from+=nn,It&&(Lt||(Lt=[])).push(gr)}Lt&&(Lt=en(Lt)),kt&&kt!=Lt&&(kt=en(kt));var Ir=[Lt];if(!It){var ni=he.text.length-2,Zr;if(ni>0&&Lt)for(var ci=0;ci<Lt.length;++ci)Lt[ci].to==null&&(Zr||(Zr=[])).push(new hr(Lt[ci].marker,null,null));for(var Ii=0;Ii<ni;++Ii)Ir.push(Zr);Ir.push(kt)}return Ir}function en(re){for(var he=0;he<re.length;++he){var Ce=re[he];Ce.from!=null&&Ce.from==Ce.to&&Ce.marker.clearWhenEmpty!==!1&&re.splice(he--,1)}return re.length?re:null}function pn(re,he,Ce){var be=null;if(re.iter(he.line,Ce.line+1,function(mn){if(mn.markedSpans)for(var ur=0;ur<mn.markedSpans.length;++ur){var gr=mn.markedSpans[ur].marker;gr.readOnly&&(!be||wt(be,gr)==-1)&&(be||(be=[])).push(gr)}}),!be)return null;for(var Oe=[{from:he,to:Ce}],$e=0;$e<be.length;++$e)for(var gt=be[$e],Lt=gt.find(0),kt=0;kt<Oe.length;++kt){var It=Oe[kt];if(!(fn(It.to,Lt.from)<0||fn(It.from,Lt.to)>0)){var nn=[kt,1],_t=fn(It.from,Lt.from),xn=fn(It.to,Lt.to);(_t<0||!gt.inclusiveLeft&&!_t)&&nn.push({from:It.from,to:Lt.from}),(xn>0||!gt.inclusiveRight&&!xn)&&nn.push({from:Lt.to,to:It.to}),Oe.splice.apply(Oe,nn),kt+=nn.length-3}}return Oe}function tn(re){var he=re.markedSpans;if(he){for(var Ce=0;Ce<he.length;++Ce)he[Ce].marker.detachLine(re);re.markedSpans=null}}function st(re,he){if(he){for(var Ce=0;Ce<he.length;++Ce)he[Ce].marker.attachLine(re);re.markedSpans=he}}function Bn(re){return re.inclusiveLeft?-1:0}function Pn(re){return re.inclusiveRight?1:0}function Fn(re,he){var Ce=re.lines.length-he.lines.length;if(Ce!=0)return Ce;var be=re.find(),Oe=he.find(),$e=fn(be.from,Oe.from)||Bn(re)-Bn(he);if($e)return-$e;var gt=fn(be.to,Oe.to)||Pn(re)-Pn(he);return gt||he.id-re.id}function Jn(re,he){var Ce=rn&&re.markedSpans,be;if(Ce)for(var Oe=void 0,$e=0;$e<Ce.length;++$e)Oe=Ce[$e],Oe.marker.collapsed&&(he?Oe.from:Oe.to)==null&&(!be||Fn(be,Oe.marker)<0)&&(be=Oe.marker);return be}function ar(re){return Jn(re,!0)}function wn(re){return Jn(re,!1)}function Rn(re,he){var Ce=rn&&re.markedSpans,be;if(Ce)for(var Oe=0;Oe<Ce.length;++Oe){var $e=Ce[Oe];$e.marker.collapsed&&($e.from==null||$e.from<he)&&($e.to==null||$e.to>he)&&(!be||Fn(be,$e.marker)<0)&&(be=$e.marker)}return be}function Gn(re,he,Ce,be,Oe){var $e=zn(re,he),gt=rn&&$e.markedSpans;if(gt)for(var Lt=0;Lt<gt.length;++Lt){var kt=gt[Lt];if(kt.marker.collapsed){var It=kt.marker.find(0),nn=fn(It.from,Ce)||Bn(kt.marker)-Bn(Oe),_t=fn(It.to,be)||Pn(kt.marker)-Pn(Oe);if(!(nn>=0&&_t<=0||nn<=0&&_t>=0)&&(nn<=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?fn(It.to,Ce)>=0:fn(It.to,Ce)>0)||nn>=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?fn(It.from,be)<=0:fn(It.from,be)<0)))return!0}}}function Wn(re){for(var he;he=ar(re);)re=he.find(-1,!0).line;return re}function Xn(re){for(var he;he=wn(re);)re=he.find(1,!0).line;return re}function Lr(re){for(var he,Ce;he=wn(re);)re=he.find(1,!0).line,(Ce||(Ce=[])).push(re);return Ce}function mr(re,he){var Ce=zn(re,he),be=Wn(Ce);return Ce==be?he:jt(be)}function lr(re,he){if(he>re.lastLine())return he;var Ce=zn(re,he),be;if(!vn(re,Ce))return he;for(;be=wn(Ce);)Ce=be.find(1,!0).line;return jt(Ce)+1}function vn(re,he){var Ce=rn&&he.markedSpans;if(Ce){for(var be=void 0,Oe=0;Oe<Ce.length;++Oe)if(be=Ce[Oe],!!be.marker.collapsed){if(be.from==null)return!0;if(!be.marker.widgetNode&&be.from==0&&be.marker.inclusiveLeft&&fr(re,he,be))return!0}}}function fr(re,he,Ce){if(Ce.to==null){var be=Ce.marker.find(1,!0);return fr(re,be.line,Pr(be.line.markedSpans,Ce.marker))}if(Ce.marker.inclusiveRight&&Ce.to==he.text.length)return!0;for(var Oe=void 0,$e=0;$e<he.markedSpans.length;++$e)if(Oe=he.markedSpans[$e],Oe.marker.collapsed&&!Oe.marker.widgetNode&&Oe.from==Ce.to&&(Oe.to==null||Oe.to!=Ce.from)&&(Oe.marker.inclusiveLeft||Ce.marker.inclusiveRight)&&fr(re,he,Oe))return!0}function Or(re){re=Wn(re);for(var he=0,Ce=re.parent,be=0;be<Ce.lines.length;++be){var Oe=Ce.lines[be];if(Oe==re)break;he+=Oe.height}for(var $e=Ce.parent;$e;Ce=$e,$e=Ce.parent)for(var gt=0;gt<$e.children.length;++gt){var Lt=$e.children[gt];if(Lt==Ce)break;he+=Lt.height}return he}function oi(re){if(re.height==0)return 0;for(var he=re.text.length,Ce,be=re;Ce=ar(be);){var Oe=Ce.find(0,!0);be=Oe.from.line,he+=Oe.from.ch-Oe.to.ch}for(be=re;Ce=wn(be);){var $e=Ce.find(0,!0);he-=be.text.length-$e.from.ch,be=$e.to.line,he+=be.text.length-$e.to.ch}return he}function Qr(re){var he=re.display,Ce=re.doc;he.maxLine=zn(Ce,Ce.first),he.maxLineLength=oi(he.maxLine),he.maxLineChanged=!0,Ce.iter(function(be){var Oe=oi(be);Oe>he.maxLineLength&&(he.maxLineLength=Oe,he.maxLine=be)})}var ui=function(re,he,Ce){this.text=re,st(this,he),this.height=Ce?Ce(this):1};ui.prototype.lineNo=function(){return jt(this)},kn(ui);function di(re,he,Ce,be){re.text=he,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),tn(re),st(re,Ce);var Oe=be?be(re):1;Oe!=re.height&&qn(re,Oe)}function hi(re){re.parent=null,tn(re)}var _i={},zi={};function mo(re,he){if(!re||/^\s*$/.test(re))return null;var Ce=he.addModeClass?zi:_i;return Ce[re]||(Ce[re]=re.replace(/\S+/g,"cm-$&"))}function $t(re,he){var Ce=Be("span",null,null,ve?"padding-right: .1px":null),be={pre:Be("pre",[Ce],"CodeMirror-line"),content:Ce,col:0,pos:0,cm:re,trailingSpace:!1,splitSpaces:re.getOption("lineWrapping")};he.measure={};for(var Oe=0;Oe<=(he.rest?he.rest.length:0);Oe++){var $e=Oe?he.rest[Oe-1]:he.line,gt=void 0;be.pos=0,be.addToken=Ti,Xr(re.display.measure)&&(gt=qt($e,re.doc.direction))&&(be.addToken=Ci(be.addToken,gt)),be.map=[];var Lt=he!=re.display.externalMeasured&&jt($e);eo($e,be,ti(re,$e,Lt)),$e.styleClasses&&($e.styleClasses.bgClass&&(be.bgClass=ot($e.styleClasses.bgClass,be.bgClass||"")),$e.styleClasses.textClass&&(be.textClass=ot($e.styleClasses.textClass,be.textClass||""))),be.map.length==0&&be.map.push(0,0,be.content.appendChild(Li(re.display.measure))),Oe==0?(he.measure.map=be.map,he.measure.cache={}):((he.measure.maps||(he.measure.maps=[])).push(be.map),(he.measure.caches||(he.measure.caches=[])).push({}))}if(ve){var kt=be.content.lastChild;(/\bcm-tab\b/.test(kt.className)||kt.querySelector&&kt.querySelector(".cm-tab"))&&(be.content.className="cm-tab-wrap-hack")}return on(re,"renderLine",re,he.line,be.pre),be.pre.className&&(be.textClass=ot(be.pre.className,be.textClass||"")),be}function yi(re){var he=Me("span","\u2022","cm-invalidchar");return he.title="\\u"+re.charCodeAt(0).toString(16),he.setAttribute("aria-label",he.title),he}function Ti(re,he,Ce,be,Oe,$e,gt){if(he){var Lt=re.splitSpaces?Vr(he,re.trailingSpace):he,kt=re.cm.state.specialChars,It=!1,nn;if(!kt.test(he))re.col+=he.length,nn=document.createTextNode(Lt),re.map.push(re.pos,re.pos+he.length,nn),Re&&de<9&&(It=!0),re.pos+=he.length;else{nn=document.createDocumentFragment();for(var _t=0;;){kt.lastIndex=_t;var xn=kt.exec(he),mn=xn?xn.index-_t:he.length-_t;if(mn){var ur=document.createTextNode(Lt.slice(_t,_t+mn));Re&&de<9?nn.appendChild(Me("span",[ur])):nn.appendChild(ur),re.map.push(re.pos,re.pos+mn,ur),re.col+=mn,re.pos+=mn}if(!xn)break;_t+=mn+1;var gr=void 0;if(xn[0]==" "){var Cr=re.cm.options.tabSize,Ir=Cr-re.col%Cr;gr=nn.appendChild(Me("span",Dt(Ir),"cm-tab")),gr.setAttribute("role","presentation"),gr.setAttribute("cm-text"," "),re.col+=Ir}else xn[0]=="\r"||xn[0]==`
|
|
`?(gr=nn.appendChild(Me("span",xn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),gr.setAttribute("cm-text",xn[0]),re.col+=1):(gr=re.cm.options.specialCharPlaceholder(xn[0]),gr.setAttribute("cm-text",xn[0]),Re&&de<9?nn.appendChild(Me("span",[gr])):nn.appendChild(gr),re.col+=1);re.map.push(re.pos,re.pos+1,gr),re.pos++}}if(re.trailingSpace=Lt.charCodeAt(he.length-1)==32,Ce||be||Oe||It||$e||gt){var ni=Ce||"";be&&(ni+=be),Oe&&(ni+=Oe);var Zr=Me("span",[nn],ni,$e);if(gt)for(var ci in gt)gt.hasOwnProperty(ci)&&ci!="style"&&ci!="class"&&Zr.setAttribute(ci,gt[ci]);return re.content.appendChild(Zr)}re.content.appendChild(nn)}}function Vr(re,he){if(re.length>1&&!/ /.test(re))return re;for(var Ce=he,be="",Oe=0;Oe<re.length;Oe++){var $e=re.charAt(Oe);$e==" "&&Ce&&(Oe==re.length-1||re.charCodeAt(Oe+1)==32)&&($e="\xA0"),be+=$e,Ce=$e==" "}return be}function Ci(re,he){return function(Ce,be,Oe,$e,gt,Lt,kt){Oe=Oe?Oe+" cm-force-border":"cm-force-border";for(var It=Ce.pos,nn=It+be.length;;){for(var _t=void 0,xn=0;xn<he.length&&(_t=he[xn],!(_t.to>It&&_t.from<=It));xn++);if(_t.to>=nn)return re(Ce,be,Oe,$e,gt,Lt,kt);re(Ce,be.slice(0,_t.to-It),Oe,$e,null,Lt,kt),$e=null,be=be.slice(_t.to-It),It=_t.to}}}function Hr(re,he,Ce,be){var Oe=!be&&Ce.widgetNode;Oe&&re.map.push(re.pos,re.pos+he,Oe),!be&&re.cm.display.input.needsContentAttribute&&(Oe||(Oe=re.content.appendChild(document.createElement("span"))),Oe.setAttribute("cm-marker",Ce.id)),Oe&&(re.cm.display.input.setUneditable(Oe),re.content.appendChild(Oe)),re.pos+=he,re.trailingSpace=!1}function eo(re,he,Ce){var be=re.markedSpans,Oe=re.text,$e=0;if(!be){for(var gt=1;gt<Ce.length;gt+=2)he.addToken(he,Oe.slice($e,$e=Ce[gt]),mo(Ce[gt+1],he.cm.options));return}for(var Lt=Oe.length,kt=0,It=1,nn="",_t,xn,mn=0,ur,gr,Cr,Ir,ni;;){if(mn==kt){ur=gr=Cr=xn="",ni=null,Ir=null,mn=1/0;for(var Zr=[],ci=void 0,Ii=0;Ii<be.length;++Ii){var Kr=be[Ii],$i=Kr.marker;if($i.type=="bookmark"&&Kr.from==kt&&$i.widgetNode)Zr.push($i);else if(Kr.from<=kt&&(Kr.to==null||Kr.to>kt||$i.collapsed&&Kr.to==kt&&Kr.from==kt)){if(Kr.to!=null&&Kr.to!=kt&&mn>Kr.to&&(mn=Kr.to,gr=""),$i.className&&(ur+=" "+$i.className),$i.css&&(xn=(xn?xn+";":"")+$i.css),$i.startStyle&&Kr.from==kt&&(Cr+=" "+$i.startStyle),$i.endStyle&&Kr.to==mn&&(ci||(ci=[])).push($i.endStyle,Kr.to),$i.title&&((ni||(ni={})).title=$i.title),$i.attributes)for(var Xo in $i.attributes)(ni||(ni={}))[Xo]=$i.attributes[Xo];$i.collapsed&&(!Ir||Fn(Ir.marker,$i)<0)&&(Ir=Kr)}else Kr.from>kt&&mn>Kr.from&&(mn=Kr.from)}if(ci)for(var Ia=0;Ia<ci.length;Ia+=2)ci[Ia+1]==mn&&(gr+=" "+ci[Ia]);if(!Ir||Ir.from==kt)for(var ia=0;ia<Zr.length;++ia)Hr(he,0,Zr[ia]);if(Ir&&(Ir.from||0)==kt){if(Hr(he,(Ir.to==null?Lt+1:Ir.to)-kt,Ir.marker,Ir.from==null),Ir.to==null)return;Ir.to==kt&&(Ir=!1)}}if(kt>=Lt)break;for(var Ds=Math.min(Lt,mn);;){if(nn){var gs=kt+nn.length;if(!Ir){var La=gs>Ds?nn.slice(0,Ds-kt):nn;he.addToken(he,La,_t?_t+ur:ur,Cr,kt+La.length==mn?gr:"",xn,ni)}if(gs>=Ds){nn=nn.slice(Ds-kt),kt=Ds;break}kt=gs,Cr=""}nn=Oe.slice($e,$e=Ce[It++]),_t=mo(Ce[It++],he.cm.options)}}}function Gi(re,he,Ce){this.line=he,this.rest=Lr(he),this.size=this.rest?jt(mt(this.rest))-Ce+1:1,this.node=this.text=null,this.hidden=vn(re,he)}function xi(re,he,Ce){for(var be=[],Oe,$e=he;$e<Ce;$e=Oe){var gt=new Gi(re.doc,zn(re.doc,$e),$e);Oe=$e+gt.size,be.push(gt)}return be}var qi=null;function ga(re){qi?qi.ops.push(re):re.ownsGroup=qi={ops:[re],delayedCallbacks:[]}}function Ao(re){var he=re.delayedCallbacks,Ce=0;do{for(;Ce<he.length;Ce++)he[Ce].call(null);for(var be=0;be<re.ops.length;be++){var Oe=re.ops[be];if(Oe.cursorActivityHandlers)for(;Oe.cursorActivityCalled<Oe.cursorActivityHandlers.length;)Oe.cursorActivityHandlers[Oe.cursorActivityCalled++].call(null,Oe.cm)}}while(Ce<he.length)}function Aa(re,he){var Ce=re.ownsGroup;if(Ce)try{Ao(Ce)}finally{qi=null,he(Ce)}}var ma=null;function Gr(re,he){var Ce=Vt(re,he);if(Ce.length){var be=Array.prototype.slice.call(arguments,2),Oe;qi?Oe=qi.delayedCallbacks:ma?Oe=ma:(Oe=ma=[],setTimeout(to,0));for(var $e=function(Lt){Oe.push(function(){return Ce[Lt].apply(null,be)})},gt=0;gt<Ce.length;++gt)$e(gt)}}function to(){var re=ma;ma=null;for(var he=0;he<re.length;++he)re[he]()}function Co(re,he,Ce,be){for(var Oe=0;Oe<he.changes.length;Oe++){var $e=he.changes[Oe];$e=="text"?Mn(re,he):$e=="gutter"?ki(re,he,Ce,be):$e=="class"?Wr(re,he):$e=="widget"&&co(re,he,be)}he.changes=null}function Qo(re){return re.node==re.text&&(re.node=Me("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),Re&&de<8&&(re.node.style.zIndex=2)),re.node}function Ei(re,he){var Ce=he.bgClass?he.bgClass+" "+(he.line.bgClass||""):he.line.bgClass;if(Ce&&(Ce+=" CodeMirror-linebackground"),he.background)Ce?he.background.className=Ce:(he.background.parentNode.removeChild(he.background),he.background=null);else if(Ce){var be=Qo(he);he.background=be.insertBefore(Me("div",null,Ce),be.firstChild),re.display.input.setUneditable(he.background)}}function wi(re,he){var Ce=re.display.externalMeasured;return Ce&&Ce.line==he.line?(re.display.externalMeasured=null,he.measure=Ce.measure,Ce.built):$t(re,he)}function Mn(re,he){var Ce=he.text.className,be=wi(re,he);he.text==he.node&&(he.node=be.pre),he.text.parentNode.replaceChild(be.pre,he.text),he.text=be.pre,be.bgClass!=he.bgClass||be.textClass!=he.textClass?(he.bgClass=be.bgClass,he.textClass=be.textClass,Wr(re,he)):Ce&&(he.text.className=Ce)}function Wr(re,he){Ei(re,he),he.line.wrapClass?Qo(he).className=he.line.wrapClass:he.node!=he.text&&(he.node.className="");var Ce=he.textClass?he.textClass+" "+(he.line.textClass||""):he.line.textClass;he.text.className=Ce||""}function ki(re,he,Ce,be){if(he.gutter&&(he.node.removeChild(he.gutter),he.gutter=null),he.gutterBackground&&(he.node.removeChild(he.gutterBackground),he.gutterBackground=null),he.line.gutterClass){var Oe=Qo(he);he.gutterBackground=Me("div",null,"CodeMirror-gutter-background "+he.line.gutterClass,"left: "+(re.options.fixedGutter?be.fixedPos:-be.gutterTotalWidth)+"px; width: "+be.gutterTotalWidth+"px"),re.display.input.setUneditable(he.gutterBackground),Oe.insertBefore(he.gutterBackground,he.text)}var $e=he.line.gutterMarkers;if(re.options.lineNumbers||$e){var gt=Qo(he),Lt=he.gutter=Me("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?be.fixedPos:-be.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Lt),gt.insertBefore(Lt,he.text),he.line.gutterClass&&(Lt.className+=" "+he.line.gutterClass),re.options.lineNumbers&&(!$e||!$e["CodeMirror-linenumbers"])&&(he.lineNumber=Lt.appendChild(Me("div",Yn(re.options,Ce),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+be.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),$e)for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var It=re.display.gutterSpecs[kt].className,nn=$e.hasOwnProperty(It)&&$e[It];nn&&Lt.appendChild(Me("div",[nn],"CodeMirror-gutter-elt","left: "+be.gutterLeft[It]+"px; width: "+be.gutterWidth[It]+"px"))}}}function co(re,he,Ce){he.alignable&&(he.alignable=null);for(var be=je("CodeMirror-linewidget"),Oe=he.node.firstChild,$e=void 0;Oe;Oe=$e)$e=Oe.nextSibling,be.test(Oe.className)&&he.node.removeChild(Oe);aa(re,he,Ce)}function ba(re,he,Ce,be){var Oe=wi(re,he);return he.text=he.node=Oe.pre,Oe.bgClass&&(he.bgClass=Oe.bgClass),Oe.textClass&&(he.textClass=Oe.textClass),Wr(re,he),ki(re,he,Ce,be),aa(re,he,be),he.node}function aa(re,he,Ce){if(ai(re,he.line,he,Ce,!0),he.rest)for(var be=0;be<he.rest.length;be++)ai(re,he.rest[be],he,Ce,!1)}function ai(re,he,Ce,be,Oe){if(he.widgets)for(var $e=Qo(Ce),gt=0,Lt=he.widgets;gt<Lt.length;++gt){var kt=Lt[gt],It=Me("div",[kt.node],"CodeMirror-linewidget"+(kt.className?" "+kt.className:""));kt.handleMouseEvents||It.setAttribute("cm-ignore-events","true"),Wo(kt,It,Ce,be),re.display.input.setUneditable(It),Oe&&kt.above?$e.insertBefore(It,Ce.gutter||Ce.text):$e.appendChild(It),Gr(kt,"redraw")}}function Wo(re,he,Ce,be){if(re.noHScroll){(Ce.alignable||(Ce.alignable=[])).push(he);var Oe=be.wrapperWidth;he.style.left=be.fixedPos+"px",re.coverGutter||(Oe-=be.gutterTotalWidth,he.style.paddingLeft=be.gutterTotalWidth+"px"),he.style.width=Oe+"px"}re.coverGutter&&(he.style.zIndex=5,he.style.position="relative",re.noHScroll||(he.style.marginLeft=-be.gutterTotalWidth+"px"))}function Ko(re){if(re.height!=null)return re.height;var he=re.doc.cm;if(!he)return 0;if(!Ye(document.body,re.node)){var Ce="position: relative;";re.coverGutter&&(Ce+="margin-left: -"+he.display.gutters.offsetWidth+"px;"),re.noHScroll&&(Ce+="width: "+he.display.wrapper.clientWidth+"px;"),Te(he.display.measure,Me("div",[re.node],null,Ce))}return re.height=re.node.parentNode.offsetHeight}function jo(re,he){for(var Ce=er(he);Ce!=re.wrapper;Ce=Ce.parentNode)if(!Ce||Ce.nodeType==1&&Ce.getAttribute("cm-ignore-events")=="true"||Ce.parentNode==re.sizer&&Ce!=re.mover)return!0}function io(re){return re.lineSpace.offsetTop}function Pa(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function is(re){if(re.cachedPaddingH)return re.cachedPaddingH;var he=Te(re.measure,Me("pre","x","CodeMirror-line-like")),Ce=window.getComputedStyle?window.getComputedStyle(he):he.currentStyle,be={left:parseInt(Ce.paddingLeft),right:parseInt(Ce.paddingRight)};return!isNaN(be.left)&&!isNaN(be.right)&&(re.cachedPaddingH=be),be}function fo(re){return Ct-re.display.nativeBarWidth}function os(re){return re.display.scroller.clientWidth-fo(re)-re.display.barWidth}function Gs(re){return re.display.scroller.clientHeight-fo(re)-re.display.barHeight}function Lu(re,he,Ce){var be=re.options.lineWrapping,Oe=be&&os(re);if(!he.measure.heights||be&&he.measure.width!=Oe){var $e=he.measure.heights=[];if(be){he.measure.width=Oe;for(var gt=he.text.firstChild.getClientRects(),Lt=0;Lt<gt.length-1;Lt++){var kt=gt[Lt],It=gt[Lt+1];Math.abs(kt.bottom-It.bottom)>2&&$e.push((kt.bottom+It.top)/2-Ce.top)}}$e.push(Ce.bottom-Ce.top)}}function Ho(re,he,Ce){if(re.line==he)return{map:re.measure.map,cache:re.measure.cache};for(var be=0;be<re.rest.length;be++)if(re.rest[be]==he)return{map:re.measure.maps[be],cache:re.measure.caches[be]};for(var Oe=0;Oe<re.rest.length;Oe++)if(jt(re.rest[Oe])>Ce)return{map:re.measure.maps[Oe],cache:re.measure.caches[Oe],before:!0}}function th(re,he){he=Wn(he);var Ce=jt(he),be=re.display.externalMeasured=new Gi(re.doc,he,Ce);be.lineN=Ce;var Oe=be.built=$t(re,be);return be.text=Oe.pre,Te(re.display.lineMeasure,Oe.pre),be}function Mu(re,he,Ce,be){return Ns(re,gl(re,he),Ce,be)}function Nu(re,he){if(he>=re.display.viewFrom&&he<re.display.viewTo)return re.display.view[js(re,he)];var Ce=re.display.externalMeasured;if(Ce&&he>=Ce.lineN&&he<Ce.lineN+Ce.size)return Ce}function gl(re,he){var Ce=jt(he),be=Nu(re,Ce);be&&!be.text?be=null:be&&be.changes&&(Co(re,be,Ce,Fu(re)),re.curOp.forceUpdate=!0),be||(be=th(re,he));var Oe=Ho(be,he,Ce);return{line:he,view:be,rect:null,map:Oe.map,cache:Oe.cache,before:Oe.before,hasHeights:!1}}function Ns(re,he,Ce,be,Oe){he.before&&(Ce=-1);var $e=Ce+(be||""),gt;return he.cache.hasOwnProperty($e)?gt=he.cache[$e]:(he.rect||(he.rect=he.view.text.getBoundingClientRect()),he.hasHeights||(Lu(re,he.view,he.rect),he.hasHeights=!0),gt=Vo(re,he,Ce,be),gt.bogus||(he.cache[$e]=gt)),{left:gt.left,right:gt.right,top:Oe?gt.rtop:gt.top,bottom:Oe?gt.rbottom:gt.bottom}}var Ll={left:0,right:0,top:0,bottom:0};function nh(re,he,Ce){for(var be,Oe,$e,gt,Lt,kt,It=0;It<re.length;It+=3)if(Lt=re[It],kt=re[It+1],he<Lt?(Oe=0,$e=1,gt="left"):he<kt?(Oe=he-Lt,$e=Oe+1):(It==re.length-3||he==kt&&re[It+3]>he)&&($e=kt-Lt,Oe=$e-1,he>=kt&&(gt="right")),Oe!=null){if(be=re[It+2],Lt==kt&&Ce==(be.insertLeft?"left":"right")&&(gt=Ce),Ce=="left"&&Oe==0)for(;It&&re[It-2]==re[It-3]&&re[It-1].insertLeft;)be=re[(It-=3)+2],gt="left";if(Ce=="right"&&Oe==kt-Lt)for(;It<re.length-3&&re[It+3]==re[It+4]&&!re[It+5].insertLeft;)be=re[(It+=3)+2],gt="right";break}return{node:be,start:Oe,end:$e,collapse:gt,coverStart:Lt,coverEnd:kt}}function Au(re,he){var Ce=Ll;if(he=="left")for(var be=0;be<re.length&&(Ce=re[be]).left==Ce.right;be++);else for(var Oe=re.length-1;Oe>=0&&(Ce=re[Oe]).left==Ce.right;Oe--);return Ce}function Vo(re,he,Ce,be){var Oe=nh(he.map,Ce,be),$e=Oe.node,gt=Oe.start,Lt=Oe.end,kt=Oe.collapse,It;if($e.nodeType==3){for(var nn=0;nn<4;nn++){for(;gt&&Ge(he.line.text.charAt(Oe.coverStart+gt));)--gt;for(;Oe.coverStart+Lt<Oe.coverEnd&&Ge(he.line.text.charAt(Oe.coverStart+Lt));)++Lt;if(Re&&de<9&>==0&&Lt==Oe.coverEnd-Oe.coverStart?It=$e.parentNode.getBoundingClientRect():It=Au(Ue($e,gt,Lt).getClientRects(),be),It.left||It.right||gt==0)break;Lt=gt,gt=gt-1,kt="right"}Re&&de<11&&(It=ju(re.display.measure,It))}else{gt>0&&(kt=be="right");var _t;re.options.lineWrapping&&(_t=$e.getClientRects()).length>1?It=_t[be=="right"?_t.length-1:0]:It=$e.getBoundingClientRect()}if(Re&&de<9&&!gt&&(!It||!It.left&&!It.right)){var xn=$e.parentNode.getClientRects()[0];xn?It={left:xn.left,right:xn.left+Hl(re.display),top:xn.top,bottom:xn.bottom}:It=Ll}for(var mn=It.top-he.rect.top,ur=It.bottom-he.rect.top,gr=(mn+ur)/2,Cr=he.view.measure.heights,Ir=0;Ir<Cr.length-1&&!(gr<Cr[Ir]);Ir++);var ni=Ir?Cr[Ir-1]:0,Zr=Cr[Ir],ci={left:(kt=="right"?It.right:It.left)-he.rect.left,right:(kt=="left"?It.left:It.right)-he.rect.left,top:ni,bottom:Zr};return!It.left&&!It.right&&(ci.bogus=!0),re.options.singleCursorHeightPerLine||(ci.rtop=mn,ci.rbottom=ur),ci}function ju(re,he){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!wr(re))return he;var Ce=screen.logicalXDPI/screen.deviceXDPI,be=screen.logicalYDPI/screen.deviceYDPI;return{left:he.left*Ce,right:he.right*Ce,top:he.top*be,bottom:he.bottom*be}}function rh(re){if(re.measure&&(re.measure.cache={},re.measure.heights=null,re.rest))for(var he=0;he<re.rest.length;he++)re.measure.caches[he]={}}function iu(re){re.display.externalMeasure=null,Fe(re.display.lineMeasure);for(var he=0;he<re.display.view.length;he++)rh(re.display.view[he])}function ou(re){iu(re),re.display.cachedCharWidth=re.display.cachedTextHeight=re.display.cachedPaddingH=null,re.options.lineWrapping||(re.display.maxLineChanged=!0),re.display.lineNumChars=null}function ja(){return ke&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Oa(){return ke&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function na(re){var he=0;if(re.widgets)for(var Ce=0;Ce<re.widgets.length;++Ce)re.widgets[Ce].above&&(he+=Ko(re.widgets[Ce]));return he}function sa(re,he,Ce,be,Oe){if(!Oe){var $e=na(he);Ce.top+=$e,Ce.bottom+=$e}if(be=="line")return Ce;be||(be="local");var gt=Or(he);if(be=="local"?gt+=io(re.display):gt-=re.display.viewOffset,be=="page"||be=="window"){var Lt=re.display.lineSpace.getBoundingClientRect();gt+=Lt.top+(be=="window"?0:Oa());var kt=Lt.left+(be=="window"?0:ja());Ce.left+=kt,Ce.right+=kt}return Ce.top+=gt,Ce.bottom+=gt,Ce}function uo(re,he,Ce){if(Ce=="div")return he;var be=he.left,Oe=he.top;if(Ce=="page")be-=ja(),Oe-=Oa();else if(Ce=="local"||!Ce){var $e=re.display.sizer.getBoundingClientRect();be+=$e.left,Oe+=$e.top}var gt=re.display.lineSpace.getBoundingClientRect();return{left:be-gt.left,top:Oe-gt.top}}function Bi(re,he,Ce,be,Oe){return be||(be=zn(re.doc,he.line)),sa(re,be,Mu(re,be,he.ch,Oe),Ce)}function Wi(re,he,Ce,be,Oe,$e){be=be||zn(re.doc,he.line),Oe||(Oe=gl(re,be));function gt(ur,gr){var Cr=Ns(re,Oe,ur,gr?"right":"left",$e);return gr?Cr.left=Cr.right:Cr.right=Cr.left,sa(re,be,Cr,Ce)}var Lt=qt(be,re.doc.direction),kt=he.ch,It=he.sticky;if(kt>=be.text.length?(kt=be.text.length,It="before"):kt<=0&&(kt=0,It="after"),!Lt)return gt(It=="before"?kt-1:kt,It=="before");function nn(ur,gr,Cr){var Ir=Lt[gr],ni=Ir.level==1;return gt(Cr?ur-1:ur,ni!=Cr)}var _t=Et(Lt,kt,It),xn=Ot,mn=nn(kt,_t,It=="before");return xn!=null&&(mn.other=nn(kt,xn,It!="before")),mn}function la(re,he){var Ce=0;he=dr(re.doc,he),re.options.lineWrapping||(Ce=Hl(re.display)*he.ch);var be=zn(re.doc,he.line),Oe=Or(be)+io(re.display);return{left:Ce,right:Ce,top:Oe,bottom:Oe+be.height}}function $o(re,he,Ce,be,Oe){var $e=ln(re,he,Ce);return $e.xRel=Oe,be&&($e.outside=be),$e}function qo(re,he,Ce){var be=re.doc;if(Ce+=re.display.viewOffset,Ce<0)return $o(be.first,0,null,-1,-1);var Oe=un(be,Ce),$e=be.first+be.size-1;if(Oe>$e)return $o(be.first+be.size-1,zn(be,$e).text.length,null,1,1);he<0&&(he=0);for(var gt=zn(be,Oe);;){var Lt=Ln(re,gt,Oe,he,Ce),kt=Rn(gt,Lt.ch+(Lt.xRel>0||Lt.outside>0?1:0));if(!kt)return Lt;var It=kt.find(1);if(It.line==Oe)return It;gt=zn(be,Oe=It.line)}}function jr(re,he,Ce,be){be-=na(he);var Oe=he.text.length,$e=ht(function(gt){return Ns(re,Ce,gt-1).bottom<=be},Oe,0);return Oe=ht(function(gt){return Ns(re,Ce,gt).top>be},$e,Oe),{begin:$e,end:Oe}}function As(re,he,Ce,be){Ce||(Ce=gl(re,he));var Oe=sa(re,he,Ns(re,Ce,be),"line").top;return jr(re,he,Ce,Oe)}function Gt(re,he,Ce,be){return re.bottom<=Ce?!1:re.top>Ce?!0:(be?re.left:re.right)>he}function Ln(re,he,Ce,be,Oe){Oe-=Or(he);var $e=gl(re,he),gt=na(he),Lt=0,kt=he.text.length,It=!0,nn=qt(he,re.doc.direction);if(nn){var _t=(re.options.lineWrapping?Ou:Ml)(re,he,Ce,$e,nn,be,Oe);It=_t.level!=1,Lt=It?_t.from:_t.to-1,kt=It?_t.to:_t.from-1}var xn=null,mn=null,ur=ht(function(Ii){var Kr=Ns(re,$e,Ii);return Kr.top+=gt,Kr.bottom+=gt,Gt(Kr,be,Oe,!1)?(Kr.top<=Oe&&Kr.left<=be&&(xn=Ii,mn=Kr),!0):!1},Lt,kt),gr,Cr,Ir=!1;if(mn){var ni=be-mn.left<mn.right-be,Zr=ni==It;ur=xn+(Zr?0:1),Cr=Zr?"after":"before",gr=ni?mn.left:mn.right}else{!It&&(ur==kt||ur==Lt)&&ur++,Cr=ur==0?"after":ur==he.text.length?"before":Ns(re,$e,ur-(It?1:0)).bottom+gt<=Oe==It?"after":"before";var ci=Wi(re,ln(Ce,ur,Cr),"line",he,$e);gr=ci.left,Ir=Oe<ci.top?-1:Oe>=ci.bottom?1:0}return ur=tt(he.text,ur,1),$o(Ce,ur,Cr,Ir,be-gr)}function Ml(re,he,Ce,be,Oe,$e,gt){var Lt=ht(function(_t){var xn=Oe[_t],mn=xn.level!=1;return Gt(Wi(re,ln(Ce,mn?xn.to:xn.from,mn?"before":"after"),"line",he,be),$e,gt,!0)},0,Oe.length-1),kt=Oe[Lt];if(Lt>0){var It=kt.level!=1,nn=Wi(re,ln(Ce,It?kt.from:kt.to,It?"after":"before"),"line",he,be);Gt(nn,$e,gt,!0)&&nn.top>gt&&(kt=Oe[Lt-1])}return kt}function Ou(re,he,Ce,be,Oe,$e,gt){var Lt=jr(re,he,be,gt),kt=Lt.begin,It=Lt.end;/\s/.test(he.text.charAt(It-1))&&It--;for(var nn=null,_t=null,xn=0;xn<Oe.length;xn++){var mn=Oe[xn];if(!(mn.from>=It||mn.to<=kt)){var ur=mn.level!=1,gr=Ns(re,be,ur?Math.min(It,mn.to)-1:Math.max(kt,mn.from)).right,Cr=gr<$e?$e-gr+1e9:gr-$e;(!nn||_t>Cr)&&(nn=mn,_t=Cr)}}return nn||(nn=Oe[Oe.length-1]),nn.from<kt&&(nn={from:kt,to:nn.to,level:nn.level}),nn.to>It&&(nn={from:nn.from,to:It,level:nn.level}),nn}var ua;function Us(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if(ua==null){ua=Me("pre",null,"CodeMirror-line-like");for(var he=0;he<49;++he)ua.appendChild(document.createTextNode("x")),ua.appendChild(Me("br"));ua.appendChild(document.createTextNode("x"))}Te(re.measure,ua);var Ce=ua.offsetHeight/50;return Ce>3&&(re.cachedTextHeight=Ce),Fe(re.measure),Ce||1}function Hl(re){if(re.cachedCharWidth!=null)return re.cachedCharWidth;var he=Me("span","xxxxxxxxxx"),Ce=Me("pre",[he],"CodeMirror-line-like");Te(re.measure,Ce);var be=he.getBoundingClientRect(),Oe=(be.right-be.left)/10;return Oe>2&&(re.cachedCharWidth=Oe),Oe||10}function Fu(re){for(var he=re.display,Ce={},be={},Oe=he.gutters.clientLeft,$e=he.gutters.firstChild,gt=0;$e;$e=$e.nextSibling,++gt){var Lt=re.display.gutterSpecs[gt].className;Ce[Lt]=$e.offsetLeft+$e.clientLeft+Oe,be[Lt]=$e.clientWidth}return{fixedPos:Du(he),gutterTotalWidth:he.gutters.offsetWidth,gutterLeft:Ce,gutterWidth:be,wrapperWidth:he.wrapper.clientWidth}}function Du(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function Oo(re){var he=Us(re.display),Ce=re.options.lineWrapping,be=Ce&&Math.max(5,re.display.scroller.clientWidth/Hl(re.display)-3);return function(Oe){if(vn(re.doc,Oe))return 0;var $e=0;if(Oe.widgets)for(var gt=0;gt<Oe.widgets.length;gt++)Oe.widgets[gt].height&&($e+=Oe.widgets[gt].height);return Ce?$e+(Math.ceil(Oe.text.length/be)||1)*he:$e+he}}function pi(re){var he=re.doc,Ce=Oo(re);he.iter(function(be){var Oe=Ce(be);Oe!=be.height&&qn(be,Oe)})}function Ga(re,he,Ce,be){var Oe=re.display;if(!Ce&&er(he).getAttribute("cm-not-content")=="true")return null;var $e,gt,Lt=Oe.lineSpace.getBoundingClientRect();try{$e=he.clientX-Lt.left,gt=he.clientY-Lt.top}catch(_t){return null}var kt=qo(re,$e,gt),It;if(be&&kt.xRel>0&&(It=zn(re.doc,kt.line).text).length==kt.ch){var nn=qe(It,It.length,re.options.tabSize)-It.length;kt=ln(kt.line,Math.max(0,Math.round(($e-is(re.display).left)/Hl(re.display))-nn))}return kt}function js(re,he){if(he>=re.display.viewTo||(he-=re.display.viewFrom,he<0))return null;for(var Ce=re.display.view,be=0;be<Ce.length;be++)if(he-=Ce[be].size,he<0)return be}function Fo(re,he,Ce,be){he==null&&(he=re.doc.first),Ce==null&&(Ce=re.doc.first+re.doc.size),be||(be=0);var Oe=re.display;if(be&&Ce<Oe.viewTo&&(Oe.updateLineNumbers==null||Oe.updateLineNumbers>he)&&(Oe.updateLineNumbers=he),re.curOp.viewChanged=!0,he>=Oe.viewTo)rn&&mr(re.doc,he)<Oe.viewTo&&_o(re);else if(Ce<=Oe.viewFrom)rn&&lr(re.doc,Ce+be)>Oe.viewFrom?_o(re):(Oe.viewFrom+=be,Oe.viewTo+=be);else if(he<=Oe.viewFrom&&Ce>=Oe.viewTo)_o(re);else if(he<=Oe.viewFrom){var $e=ds(re,Ce,Ce+be,1);$e?(Oe.view=Oe.view.slice($e.index),Oe.viewFrom=$e.lineN,Oe.viewTo+=be):_o(re)}else if(Ce>=Oe.viewTo){var gt=ds(re,he,he,-1);gt?(Oe.view=Oe.view.slice(0,gt.index),Oe.viewTo=gt.lineN):_o(re)}else{var Lt=ds(re,he,he,-1),kt=ds(re,Ce,Ce+be,1);Lt&&kt?(Oe.view=Oe.view.slice(0,Lt.index).concat(xi(re,Lt.lineN,kt.lineN)).concat(Oe.view.slice(kt.index)),Oe.viewTo+=be):_o(re)}var It=Oe.externalMeasured;It&&(Ce<It.lineN?It.lineN+=be:he<It.lineN+It.size&&(Oe.externalMeasured=null))}function Ui(re,he,Ce){re.curOp.viewChanged=!0;var be=re.display,Oe=re.display.externalMeasured;if(Oe&&he>=Oe.lineN&&he<Oe.lineN+Oe.size&&(be.externalMeasured=null),!(he<be.viewFrom||he>=be.viewTo)){var $e=be.view[js(re,he)];if($e.node!=null){var gt=$e.changes||($e.changes=[]);wt(gt,Ce)==-1&>.push(Ce)}}}function _o(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function ds(re,he,Ce,be){var Oe=js(re,he),$e,gt=re.display.view;if(!rn||Ce==re.doc.first+re.doc.size)return{index:Oe,lineN:Ce};for(var Lt=re.display.viewFrom,kt=0;kt<Oe;kt++)Lt+=gt[kt].size;if(Lt!=he){if(be>0){if(Oe==gt.length-1)return null;$e=Lt+gt[Oe].size-he,Oe++}else $e=Lt-he;he+=$e,Ce+=$e}for(;mr(re.doc,Ce)!=Ce;){if(Oe==(be<0?0:gt.length-1))return null;Ce+=be*gt[Oe-(be<0?1:0)].size,Oe+=be}return{index:Oe,lineN:Ce}}function wo(re,he,Ce){var be=re.display,Oe=be.view;Oe.length==0||he>=be.viewTo||Ce<=be.viewFrom?(be.view=xi(re,he,Ce),be.viewFrom=he):(be.viewFrom>he?be.view=xi(re,he,be.viewFrom).concat(be.view):be.viewFrom<he&&(be.view=be.view.slice(js(re,he))),be.viewFrom=he,be.viewTo<Ce?be.view=be.view.concat(xi(re,be.viewTo,Ce)):be.viewTo>Ce&&(be.view=be.view.slice(0,js(re,Ce)))),be.viewTo=Ce}function ws(re){for(var he=re.display.view,Ce=0,be=0;be<he.length;be++){var Oe=he[be];!Oe.hidden&&(!Oe.node||Oe.changes)&&++Ce}return Ce}function va(re){re.display.input.showSelection(re.display.input.prepareSelection())}function au(re,he){he===void 0&&(he=!0);for(var Ce=re.doc,be={},Oe=be.cursors=document.createDocumentFragment(),$e=be.selection=document.createDocumentFragment(),gt=0;gt<Ce.sel.ranges.length;gt++)if(!(!he&>==Ce.sel.primIndex)){var Lt=Ce.sel.ranges[gt];if(!(Lt.from().line>=re.display.viewTo||Lt.to().line<re.display.viewFrom)){var kt=Lt.empty();(kt||re.options.showCursorWhenSelecting)&&oo(re,Lt.head,Oe),kt||no(re,Lt,$e)}}return be}function oo(re,he,Ce){var be=Wi(re,he,"div",null,null,!re.options.singleCursorHeightPerLine),Oe=Ce.appendChild(Me("div","\xA0","CodeMirror-cursor"));if(Oe.style.left=be.left+"px",Oe.style.top=be.top+"px",Oe.style.height=Math.max(0,be.bottom-be.top)*re.options.cursorHeight+"px",be.other){var $e=Ce.appendChild(Me("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));$e.style.display="",$e.style.left=be.other.left+"px",$e.style.top=be.other.top+"px",$e.style.height=(be.other.bottom-be.other.top)*.85+"px"}}function Ea(re,he){return re.top-he.top||re.left-he.left}function no(re,he,Ce){var be=re.display,Oe=re.doc,$e=document.createDocumentFragment(),gt=is(re.display),Lt=gt.left,kt=Math.max(be.sizerWidth,os(re)-be.sizer.offsetLeft)-gt.right,It=Oe.direction=="ltr";function nn(Zr,ci,Ii,Kr){ci<0&&(ci=0),ci=Math.round(ci),Kr=Math.round(Kr),$e.appendChild(Me("div",null,"CodeMirror-selected","position: absolute; left: "+Zr+`px;
|
|
top: `+ci+"px; width: "+(Ii==null?kt-Zr:Ii)+`px;
|
|
height: `+(Kr-ci)+"px"))}function _t(Zr,ci,Ii){var Kr=zn(Oe,Zr),$i=Kr.text.length,Xo,Ia;function ia(La,Vs){return Bi(re,ln(Zr,La),"div",Kr,Vs)}function Ds(La,Vs,ss){var Ma=As(re,Kr,null,La),yo=Vs=="ltr"==(ss=="after")?"left":"right",ca=ss=="after"?Ma.begin:Ma.end-(/\s/.test(Kr.text.charAt(Ma.end-1))?2:1);return ia(ca,yo)[yo]}var gs=qt(Kr,Oe.direction);return ut(gs,ci||0,Ii==null?$i:Ii,function(La,Vs,ss,Ma){var yo=ss=="ltr",ca=ia(La,yo?"left":"right"),Za=ia(Vs-1,yo?"right":"left"),ls=ci==null&&La==0,Ol=Ii==null&&Vs==$i,oa=Ma==0,Sl=!gs||Ma==gs.length-1;if(Za.top-ca.top<=3){var pa=(It?ls:Ol)&&oa,Af=(It?Ol:ls)&&Sl,sl=pa?Lt:(yo?ca:Za).left,Zs=Af?kt:(yo?Za:ca).right;nn(sl,ca.top,Zs-sl,ca.bottom)}else{var Bs,Bo,Xa,pu;yo?(Bs=It&&ls&&oa?Lt:ca.left,Bo=It?kt:Ds(La,ss,"before"),Xa=It?Lt:Ds(Vs,ss,"after"),pu=It&&Ol&&Sl?kt:Za.right):(Bs=It?Ds(La,ss,"before"):Lt,Bo=!It&&ls&&oa?kt:ca.right,Xa=!It&&Ol&&Sl?Lt:Za.left,pu=It?Ds(Vs,ss,"after"):kt),nn(Bs,ca.top,Bo-Bs,ca.bottom),ca.bottom<Za.top&&nn(Lt,ca.bottom,null,Za.top),nn(Xa,Za.top,pu-Xa,Za.bottom)}(!Xo||Ea(ca,Xo)<0)&&(Xo=ca),Ea(Za,Xo)<0&&(Xo=Za),(!Ia||Ea(ca,Ia)<0)&&(Ia=ca),Ea(Za,Ia)<0&&(Ia=Za)}),{start:Xo,end:Ia}}var xn=he.from(),mn=he.to();if(xn.line==mn.line)_t(xn.line,xn.ch,mn.ch);else{var ur=zn(Oe,xn.line),gr=zn(Oe,mn.line),Cr=Wn(ur)==Wn(gr),Ir=_t(xn.line,xn.ch,Cr?ur.text.length+1:null).end,ni=_t(mn.line,Cr?0:null,mn.ch).start;Cr&&(Ir.top<ni.top-2?(nn(Ir.right,Ir.top,null,Ir.bottom),nn(Lt,ni.top,ni.left,ni.bottom)):nn(Ir.right,Ir.top,ni.left-Ir.right,Ir.bottom)),Ir.bottom<ni.top&&nn(Lt,Ir.bottom,null,ni.top)}Ce.appendChild($e)}function bo(re){if(re.state.focused){var he=re.display;clearInterval(he.blinker);var Ce=!0;he.cursorDiv.style.visibility="",re.options.cursorBlinkRate>0?he.blinker=setInterval(function(){re.hasFocus()||Bu(re),he.cursorDiv.style.visibility=(Ce=!Ce)?"":"hidden"},re.options.cursorBlinkRate):re.options.cursorBlinkRate<0&&(he.cursorDiv.style.visibility="hidden")}}function Eo(re){re.state.focused||(re.display.input.focus(),ho(re))}function zo(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Bu(re))},100)}function ho(re,he){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(on(re,"focus",re,he),re.state.focused=!0,Ze(re.display.wrapper,"CodeMirror-focused"),!re.curOp&&re.display.selForContextMenu!=re.doc.sel&&(re.display.input.reset(),ve&&setTimeout(function(){return re.display.input.reset(!0)},20)),re.display.input.receivedFocus()),bo(re))}function Bu(re,he){re.state.delayingBlurEvent||(re.state.focused&&(on(re,"blur",re,he),re.state.focused=!1,De(re.display.wrapper,"CodeMirror-focused")),clearInterval(re.display.blinker),setTimeout(function(){re.state.focused||(re.display.shift=!1)},150))}function fi(re){for(var he=re.display,Ce=he.lineDiv.offsetTop,be=0;be<he.view.length;be++){var Oe=he.view[be],$e=re.options.lineWrapping,gt=void 0,Lt=0;if(!Oe.hidden){if(Re&&de<8){var kt=Oe.node.offsetTop+Oe.node.offsetHeight;gt=kt-Ce,Ce=kt}else{var It=Oe.node.getBoundingClientRect();gt=It.bottom-It.top,!$e&&Oe.text.firstChild&&(Lt=Oe.text.firstChild.getBoundingClientRect().right-It.left-1)}var nn=Oe.line.height-gt;if((nn>.005||nn<-.005)&&(qn(Oe.line,gt),uf(Oe.line),Oe.rest))for(var _t=0;_t<Oe.rest.length;_t++)uf(Oe.rest[_t]);if(Lt>re.display.sizerWidth){var xn=Math.ceil(Lt/Hl(re.display));xn>re.display.maxLineLength&&(re.display.maxLineLength=xn,re.display.maxLine=Oe.line,re.display.maxLineChanged=!0)}}}}function uf(re){if(re.widgets)for(var he=0;he<re.widgets.length;++he){var Ce=re.widgets[he],be=Ce.node.parentNode;be&&(Ce.height=be.offsetHeight)}}function Ji(re,he,Ce){var be=Ce&&Ce.top!=null?Math.max(0,Ce.top):re.scroller.scrollTop;be=Math.floor(be-io(re));var Oe=Ce&&Ce.bottom!=null?Ce.bottom:be+re.wrapper.clientHeight,$e=un(he,be),gt=un(he,Oe);if(Ce&&Ce.ensure){var Lt=Ce.ensure.from.line,kt=Ce.ensure.to.line;Lt<$e?($e=Lt,gt=un(he,Or(zn(he,Lt))+re.wrapper.clientHeight)):Math.min(kt,he.lastLine())>=gt&&($e=un(he,Or(zn(he,kt))-re.wrapper.clientHeight),gt=kt)}return{from:$e,to:Math.max(gt,$e+1)}}function Cc(re,he){if(!cn(re,"scrollCursorIntoView")){var Ce=re.display,be=Ce.sizer.getBoundingClientRect(),Oe=null;if(he.top+be.top<0?Oe=!0:he.bottom+be.top>(window.innerHeight||document.documentElement.clientHeight)&&(Oe=!1),Oe!=null&&!Pe){var $e=Me("div","\u200B",null,`position: absolute;
|
|
top: `+(he.top-Ce.viewOffset-io(re.display))+`px;
|
|
height: `+(he.bottom-he.top+fo(re)+Ce.barHeight)+`px;
|
|
left: `+he.left+"px; width: "+Math.max(2,he.right-he.left)+"px;");re.display.lineSpace.appendChild($e),$e.scrollIntoView(Oe),re.display.lineSpace.removeChild($e)}}}function su(re,he,Ce,be){be==null&&(be=0);var Oe;!re.options.lineWrapping&&he==Ce&&(he=he.ch?ln(he.line,he.sticky=="before"?he.ch-1:he.ch,"after"):he,Ce=he.sticky=="before"?ln(he.line,he.ch+1,"before"):he);for(var $e=0;$e<5;$e++){var gt=!1,Lt=Wi(re,he),kt=!Ce||Ce==he?Lt:Wi(re,Ce);Oe={left:Math.min(Lt.left,kt.left),top:Math.min(Lt.top,kt.top)-be,right:Math.max(Lt.left,kt.left),bottom:Math.max(Lt.bottom,kt.bottom)+be};var It=Ec(re,Oe),nn=re.doc.scrollTop,_t=re.doc.scrollLeft;if(It.scrollTop!=null&&(Wl(re,It.scrollTop),Math.abs(re.doc.scrollTop-nn)>1&&(gt=!0)),It.scrollLeft!=null&&(Kl(re,It.scrollLeft),Math.abs(re.doc.scrollLeft-_t)>1&&(gt=!0)),!gt)break}return Oe}function ih(re,he){var Ce=Ec(re,he);Ce.scrollTop!=null&&Wl(re,Ce.scrollTop),Ce.scrollLeft!=null&&Kl(re,Ce.scrollLeft)}function Ec(re,he){var Ce=re.display,be=Us(re.display);he.top<0&&(he.top=0);var Oe=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:Ce.scroller.scrollTop,$e=Gs(re),gt={};he.bottom-he.top>$e&&(he.bottom=he.top+$e);var Lt=re.doc.height+Pa(Ce),kt=he.top<be,It=he.bottom>Lt-be;if(he.top<Oe)gt.scrollTop=kt?0:he.top;else if(he.bottom>Oe+$e){var nn=Math.min(he.top,(It?Lt:he.bottom)-$e);nn!=Oe&&(gt.scrollTop=nn)}var _t=re.options.fixedGutter?0:Ce.gutters.offsetWidth,xn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:Ce.scroller.scrollLeft-_t,mn=os(re)-Ce.gutters.offsetWidth,ur=he.right-he.left>mn;return ur&&(he.right=he.left+mn),he.left<10?gt.scrollLeft=0:he.left<xn?gt.scrollLeft=Math.max(0,he.left+_t-(ur?0:10)):he.right>mn+xn-3&&(gt.scrollLeft=he.right+(ur?0:10)-mn),gt}function _h(re,he){he!=null&&(nl(re),re.curOp.scrollTop=(re.curOp.scrollTop==null?re.doc.scrollTop:re.curOp.scrollTop)+he)}function Nl(re){nl(re);var he=re.getCursor();re.curOp.scrollToPos={from:he,to:he,margin:re.options.cursorScrollMargin}}function Iu(re,he,Ce){(he!=null||Ce!=null)&&nl(re),he!=null&&(re.curOp.scrollLeft=he),Ce!=null&&(re.curOp.scrollTop=Ce)}function lo(re,he){nl(re),re.curOp.scrollToPos=he}function nl(re){var he=re.curOp.scrollToPos;if(he){re.curOp.scrollToPos=null;var Ce=la(re,he.from),be=la(re,he.to);zh(re,Ce,be,he.margin)}}function zh(re,he,Ce,be){var Oe=Ec(re,{left:Math.min(he.left,Ce.left),top:Math.min(he.top,Ce.top)-be,right:Math.max(he.right,Ce.right),bottom:Math.max(he.bottom,Ce.bottom)+be});Iu(re,Oe.scrollLeft,Oe.scrollTop)}function Wl(re,he){Math.abs(re.doc.scrollTop-he)<2||(at||ah(re,{top:he}),kc(re,he,!0),at&&ah(re),Tc(re,100))}function kc(re,he,Ce){he=Math.max(0,Math.min(re.display.scroller.scrollHeight-re.display.scroller.clientHeight,he)),!(re.display.scroller.scrollTop==he&&!Ce)&&(re.doc.scrollTop=he,re.display.scrollbars.setScrollTop(he),re.display.scroller.scrollTop!=he&&(re.display.scroller.scrollTop=he))}function Kl(re,he,Ce,be){he=Math.max(0,Math.min(he,re.display.scroller.scrollWidth-re.display.scroller.clientWidth)),!((Ce?he==re.doc.scrollLeft:Math.abs(re.doc.scrollLeft-he)<2)&&!be)&&(re.doc.scrollLeft=he,td(re),re.display.scroller.scrollLeft!=he&&(re.display.scroller.scrollLeft=he),re.display.scrollbars.setScrollLeft(he))}function Ki(re){var he=re.display,Ce=he.gutters.offsetWidth,be=Math.round(re.doc.height+Pa(re.display));return{clientHeight:he.scroller.clientHeight,viewHeight:he.wrapper.clientHeight,scrollWidth:he.scroller.scrollWidth,clientWidth:he.scroller.clientWidth,viewWidth:he.wrapper.clientWidth,barLeft:re.options.fixedGutter?Ce:0,docHeight:be,scrollHeight:be+fo(re)+he.barHeight,nativeBarWidth:he.nativeBarWidth,gutterWidth:Ce}}var ao=function(re,he,Ce){this.cm=Ce;var be=this.vert=Me("div",[Me("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Oe=this.horiz=Me("div",[Me("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");be.tabIndex=Oe.tabIndex=-1,re(be),re(Oe),Kt(be,"scroll",function(){be.clientHeight&&he(be.scrollTop,"vertical")}),Kt(Oe,"scroll",function(){Oe.clientWidth&&he(Oe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Re&&de<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ao.prototype.update=function(re){var he=re.scrollWidth>re.clientWidth+1,Ce=re.scrollHeight>re.clientHeight+1,be=re.nativeBarWidth;if(Ce){this.vert.style.display="block",this.vert.style.bottom=he?be+"px":"0";var Oe=re.viewHeight-(he?be:0);this.vert.firstChild.style.height=Math.max(0,re.scrollHeight-re.clientHeight+Oe)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(he){this.horiz.style.display="block",this.horiz.style.right=Ce?be+"px":"0",this.horiz.style.left=re.barLeft+"px";var $e=re.viewWidth-re.barLeft-(Ce?be:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+$e)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&re.clientHeight>0&&(be==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Ce?be:0,bottom:he?be:0}},ao.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ao.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ao.prototype.zeroWidthHack=function(){var re=se&&!me?"12px":"18px";this.horiz.style.height=this.vert.style.width=re,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new rt,this.disableVert=new rt},ao.prototype.enableZeroWidthBar=function(re,he,Ce){re.style.pointerEvents="auto";function be(){var Oe=re.getBoundingClientRect(),$e=Ce=="vert"?document.elementFromPoint(Oe.right-1,(Oe.top+Oe.bottom)/2):document.elementFromPoint((Oe.right+Oe.left)/2,Oe.bottom-1);$e!=re?re.style.pointerEvents="none":he.set(1e3,be)}he.set(1e3,be)},ao.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var Zo=function(){};Zo.prototype.update=function(){return{bottom:0,right:0}},Zo.prototype.setScrollLeft=function(){},Zo.prototype.setScrollTop=function(){},Zo.prototype.clear=function(){};function Fa(re,he){he||(he=Ki(re));var Ce=re.display.barWidth,be=re.display.barHeight;ka(re,he);for(var Oe=0;Oe<4&&Ce!=re.display.barWidth||be!=re.display.barHeight;Oe++)Ce!=re.display.barWidth&&re.options.lineWrapping&&fi(re),ka(re,Ki(re)),Ce=re.display.barWidth,be=re.display.barHeight}function ka(re,he){var Ce=re.display,be=Ce.scrollbars.update(he);Ce.sizer.style.paddingRight=(Ce.barWidth=be.right)+"px",Ce.sizer.style.paddingBottom=(Ce.barHeight=be.bottom)+"px",Ce.heightForcer.style.borderBottom=be.bottom+"px solid transparent",be.right&&be.bottom?(Ce.scrollbarFiller.style.display="block",Ce.scrollbarFiller.style.height=be.bottom+"px",Ce.scrollbarFiller.style.width=be.right+"px"):Ce.scrollbarFiller.style.display="",be.bottom&&re.options.coverGutterNextToScrollbar&&re.options.fixedGutter?(Ce.gutterFiller.style.display="block",Ce.gutterFiller.style.height=be.bottom+"px",Ce.gutterFiller.style.width=he.gutterWidth+"px"):Ce.gutterFiller.style.display=""}var lu={native:ao,null:Zo};function Vl(re){re.display.scrollbars&&(re.display.scrollbars.clear(),re.display.scrollbars.addClass&&De(re.display.wrapper,re.display.scrollbars.addClass)),re.display.scrollbars=new lu[re.options.scrollbarStyle](function(he){re.display.wrapper.insertBefore(he,re.display.scrollbarFiller),Kt(he,"mousedown",function(){re.state.focused&&setTimeout(function(){return re.display.input.focus()},0)}),he.setAttribute("cm-not-content","true")},function(he,Ce){Ce=="horizontal"?Kl(re,he):Wl(re,he)},re),re.display.scrollbars.addClass&&Ze(re.display.wrapper,re.display.scrollbars.addClass)}var uu=0;function rl(re){re.curOp={cm:re,viewChanged:!1,startHeight:re.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:++uu},ga(re.curOp)}function Al(re){var he=re.curOp;he&&Aa(he,function(Ce){for(var be=0;be<Ce.ops.length;be++)Ce.ops[be].cm.curOp=null;Qv(Ce)})}function Qv(re){for(var he=re.ops,Ce=0;Ce<he.length;Ce++)$v(he[Ce]);for(var be=0;be<he.length;be++)qv(he[be]);for(var Oe=0;Oe<he.length;Oe++)Rg(he[Oe]);for(var $e=0;$e<he.length;$e++)ha(he[$e]);for(var gt=0;gt<he.length;gt++)oh(he[gt])}function $v(re){var he=re.cm,Ce=he.display;_g(he),re.updateMaxLine&&Qr(he),re.mustUpdate=re.viewChanged||re.forceUpdate||re.scrollTop!=null||re.scrollToPos&&(re.scrollToPos.from.line<Ce.viewFrom||re.scrollToPos.to.line>=Ce.viewTo)||Ce.maxLineChanged&&he.options.lineWrapping,re.update=re.mustUpdate&&new Gh(he,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function qv(re){re.updatedDisplay=re.mustUpdate&&ed(re.cm,re.update)}function Rg(re){var he=re.cm,Ce=he.display;re.updatedDisplay&&fi(he),re.barMeasure=Ki(he),Ce.maxLineChanged&&!he.options.lineWrapping&&(re.adjustWidthTo=Mu(he,Ce.maxLine,Ce.maxLine.text.length).left+3,he.display.sizerWidth=re.adjustWidthTo,re.barMeasure.scrollWidth=Math.max(Ce.scroller.clientWidth,Ce.sizer.offsetLeft+re.adjustWidthTo+fo(he)+he.display.barWidth),re.maxScrollLeft=Math.max(0,Ce.sizer.offsetLeft+re.adjustWidthTo-os(he))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=Ce.input.prepareSelection())}function ha(re){var he=re.cm;re.adjustWidthTo!=null&&(he.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<he.doc.scrollLeft&&Kl(he,Math.min(he.display.scroller.scrollLeft,re.maxScrollLeft),!0),he.display.maxLineChanged=!1);var Ce=re.focus&&re.focus==Ve();re.preparedSelection&&he.display.input.showSelection(re.preparedSelection,Ce),(re.updatedDisplay||re.startHeight!=he.doc.height)&&Fa(he,re.barMeasure),re.updatedDisplay&&lh(he,re.barMeasure),re.selectionChanged&&bo(he),he.state.focused&&re.updateInput&&he.display.input.reset(re.typing),Ce&&Eo(re.cm)}function oh(re){var he=re.cm,Ce=he.display,be=he.doc;if(re.updatedDisplay&&ko(he,re.update),Ce.wheelStartX!=null&&(re.scrollTop!=null||re.scrollLeft!=null||re.scrollToPos)&&(Ce.wheelStartX=Ce.wheelStartY=null),re.scrollTop!=null&&kc(he,re.scrollTop,re.forceScroll),re.scrollLeft!=null&&Kl(he,re.scrollLeft,!0,!0),re.scrollToPos){var Oe=su(he,dr(be,re.scrollToPos.from),dr(be,re.scrollToPos.to),re.scrollToPos.margin);Cc(he,Oe)}var $e=re.maybeHiddenMarkers,gt=re.maybeUnhiddenMarkers;if($e)for(var Lt=0;Lt<$e.length;++Lt)$e[Lt].lines.length||on($e[Lt],"hide");if(gt)for(var kt=0;kt<gt.length;++kt)gt[kt].lines.length&&on(gt[kt],"unhide");Ce.wrapper.offsetHeight&&(be.scrollTop=he.display.scroller.scrollTop),re.changeObjs&&on(he,"changes",he,re.changeObjs),re.update&&re.update.finish()}function So(re,he){if(re.curOp)return he();rl(re);try{return he()}finally{Al(re)}}function Da(re,he){return function(){if(re.curOp)return he.apply(re,arguments);rl(re);try{return he.apply(re,arguments)}finally{Al(re)}}}function Ua(re){return function(){if(this.curOp)return re.apply(this,arguments);rl(this);try{return re.apply(this,arguments)}finally{Al(this)}}}function Ha(re){return function(){var he=this.cm;if(!he||he.curOp)return re.apply(this,arguments);rl(he);try{return re.apply(this,arguments)}finally{Al(he)}}}function Tc(re,he){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(he,ft(Wa,re))}function Wa(re){var he=re.doc;if(!(he.highlightFrontier>=re.display.viewTo)){var Ce=+new Date+re.options.workTime,be=Mi(re,he.highlightFrontier),Oe=[];he.iter(be.line,Math.min(he.first+he.size,re.display.viewTo+500),function($e){if(be.line>=re.display.viewFrom){var gt=$e.styles,Lt=$e.text.length>re.options.maxHighlightLength?Nn(he.mode,be.state):null,kt=Fi(re,$e,be,!0);Lt&&(be.state=Lt),$e.styles=kt.styles;var It=$e.styleClasses,nn=kt.classes;nn?$e.styleClasses=nn:It&&($e.styleClasses=null);for(var _t=!gt||gt.length!=$e.styles.length||It!=nn&&(!It||!nn||It.bgClass!=nn.bgClass||It.textClass!=nn.textClass),xn=0;!_t&&xn<gt.length;++xn)_t=gt[xn]!=$e.styles[xn];_t&&Oe.push(be.line),$e.stateAfter=be.save(),be.nextLine()}else $e.text.length<=re.options.maxHighlightLength&&an(re,$e.text,be),$e.stateAfter=be.line%5==0?be.save():null,be.nextLine();if(+new Date>Ce)return Tc(re,re.options.workDelay),!0}),he.highlightFrontier=be.line,he.modeFrontier=Math.max(he.modeFrontier,be.line),Oe.length&&So(re,function(){for(var $e=0;$e<Oe.length;$e++)Ui(re,Oe[$e],"text")})}}var Gh=function(re,he,Ce){var be=re.display;this.viewport=he,this.visible=Ji(be,re.doc,he),this.editorIsHidden=!be.wrapper.offsetWidth,this.wrapperHeight=be.wrapper.clientHeight,this.wrapperWidth=be.wrapper.clientWidth,this.oldDisplayWidth=os(re),this.force=Ce,this.dims=Fu(re),this.events=[]};Gh.prototype.signal=function(re,he){Cn(re,he)&&this.events.push(arguments)},Gh.prototype.finish=function(){for(var re=0;re<this.events.length;re++)on.apply(null,this.events[re])};function _g(re){var he=re.display;!he.scrollbarsClipped&&he.scroller.offsetWidth&&(he.nativeBarWidth=he.scroller.offsetWidth-he.scroller.clientWidth,he.heightForcer.style.height=fo(re)+"px",he.sizer.style.marginBottom=-he.nativeBarWidth+"px",he.sizer.style.borderRightWidth=fo(re)+"px",he.scrollbarsClipped=!0)}function zg(re){if(re.hasFocus())return null;var he=Ve();if(!he||!Ye(re.display.lineDiv,he))return null;var Ce={activeElt:he};if(window.getSelection){var be=window.getSelection();be.anchorNode&&be.extend&&Ye(re.display.lineDiv,be.anchorNode)&&(Ce.anchorNode=be.anchorNode,Ce.anchorOffset=be.anchorOffset,Ce.focusNode=be.focusNode,Ce.focusOffset=be.focusOffset)}return Ce}function Os(re){if(!(!re||!re.activeElt||re.activeElt==Ve())&&(re.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(re.activeElt.nodeName)&&re.anchorNode&&Ye(document.body,re.anchorNode)&&Ye(document.body,re.focusNode))){var he=window.getSelection(),Ce=document.createRange();Ce.setEnd(re.anchorNode,re.anchorOffset),Ce.collapse(!1),he.removeAllRanges(),he.addRange(Ce),he.extend(re.focusNode,re.focusOffset)}}function ed(re,he){var Ce=re.display,be=re.doc;if(he.editorIsHidden)return _o(re),!1;if(!he.force&&he.visible.from>=Ce.viewFrom&&he.visible.to<=Ce.viewTo&&(Ce.updateLineNumbers==null||Ce.updateLineNumbers>=Ce.viewTo)&&Ce.renderedView==Ce.view&&ws(re)==0)return!1;Ca(re)&&(_o(re),he.dims=Fu(re));var Oe=be.first+be.size,$e=Math.max(he.visible.from-re.options.viewportMargin,be.first),gt=Math.min(Oe,he.visible.to+re.options.viewportMargin);Ce.viewFrom<$e&&$e-Ce.viewFrom<20&&($e=Math.max(be.first,Ce.viewFrom)),Ce.viewTo>gt&&Ce.viewTo-gt<20&&(gt=Math.min(Oe,Ce.viewTo)),rn&&($e=mr(re.doc,$e),gt=lr(re.doc,gt));var Lt=$e!=Ce.viewFrom||gt!=Ce.viewTo||Ce.lastWrapHeight!=he.wrapperHeight||Ce.lastWrapWidth!=he.wrapperWidth;wo(re,$e,gt),Ce.viewOffset=Or(zn(re.doc,Ce.viewFrom)),re.display.mover.style.top=Ce.viewOffset+"px";var kt=ws(re);if(!Lt&&kt==0&&!he.force&&Ce.renderedView==Ce.view&&(Ce.updateLineNumbers==null||Ce.updateLineNumbers>=Ce.viewTo))return!1;var It=zg(re);return kt>4&&(Ce.lineDiv.style.display="none"),lp(re,Ce.updateLineNumbers,he.dims),kt>4&&(Ce.lineDiv.style.display=""),Ce.renderedView=Ce.view,Os(It),Fe(Ce.cursorDiv),Fe(Ce.selectionDiv),Ce.gutters.style.height=Ce.sizer.style.minHeight=0,Lt&&(Ce.lastWrapHeight=he.wrapperHeight,Ce.lastWrapWidth=he.wrapperWidth,Tc(re,400)),Ce.updateLineNumbers=null,!0}function ko(re,he){for(var Ce=he.viewport,be=!0;;be=!1){if(!be||!re.options.lineWrapping||he.oldDisplayWidth==os(re)){if(Ce&&Ce.top!=null&&(Ce={top:Math.min(re.doc.height+Pa(re.display)-Gs(re),Ce.top)}),he.visible=Ji(re.display,re.doc,Ce),he.visible.from>=re.display.viewFrom&&he.visible.to<=re.display.viewTo)break}else be&&(he.visible=Ji(re.display,re.doc,Ce));if(!ed(re,he))break;fi(re);var Oe=Ki(re);va(re),Fa(re,Oe),lh(re,Oe),he.force=!1}he.signal(re,"update",re),(re.display.viewFrom!=re.display.reportedViewFrom||re.display.viewTo!=re.display.reportedViewTo)&&(he.signal(re,"viewportChange",re,re.display.viewFrom,re.display.viewTo),re.display.reportedViewFrom=re.display.viewFrom,re.display.reportedViewTo=re.display.viewTo)}function ah(re,he){var Ce=new Gh(re,he);if(ed(re,Ce)){fi(re),ko(re,Ce);var be=Ki(re);va(re),Fa(re,be),lh(re,be),Ce.finish()}}function lp(re,he,Ce){var be=re.display,Oe=re.options.lineNumbers,$e=be.lineDiv,gt=$e.firstChild;function Lt(ur){var gr=ur.nextSibling;return ve&&se&&re.display.currentWheelTarget==ur?ur.style.display="none":ur.parentNode.removeChild(ur),gr}for(var kt=be.view,It=be.viewFrom,nn=0;nn<kt.length;nn++){var _t=kt[nn];if(!_t.hidden)if(!_t.node||_t.node.parentNode!=$e){var xn=ba(re,_t,It,Ce);$e.insertBefore(xn,gt)}else{for(;gt!=_t.node;)gt=Lt(gt);var mn=Oe&&he!=null&&he<=It&&_t.lineNumber;_t.changes&&(wt(_t.changes,"gutter")>-1&&(mn=!1),Co(re,_t,It,Ce)),mn&&(Fe(_t.lineNumber),_t.lineNumber.appendChild(document.createTextNode(Yn(re.options,It)))),gt=_t.node.nextSibling}It+=_t.size}for(;gt;)gt=Lt(gt)}function sh(re){var he=re.gutters.offsetWidth;re.sizer.style.marginLeft=he+"px"}function lh(re,he){re.display.sizer.style.minHeight=he.docHeight+"px",re.display.heightForcer.style.top=he.docHeight+"px",re.display.gutters.style.height=he.docHeight+re.display.barHeight+fo(re)+"px"}function td(re){var he=re.display,Ce=he.view;if(!(!he.alignWidgets&&(!he.gutters.firstChild||!re.options.fixedGutter))){for(var be=Du(he)-he.scroller.scrollLeft+re.doc.scrollLeft,Oe=he.gutters.offsetWidth,$e=be+"px",gt=0;gt<Ce.length;gt++)if(!Ce[gt].hidden){re.options.fixedGutter&&(Ce[gt].gutter&&(Ce[gt].gutter.style.left=$e),Ce[gt].gutterBackground&&(Ce[gt].gutterBackground.style.left=$e));var Lt=Ce[gt].alignable;if(Lt)for(var kt=0;kt<Lt.length;kt++)Lt[kt].style.left=$e}re.options.fixedGutter&&(he.gutters.style.left=be+Oe+"px")}}function Ca(re){if(!re.options.lineNumbers)return!1;var he=re.doc,Ce=Yn(re.options,he.first+he.size-1),be=re.display;if(Ce.length!=be.lineNumChars){var Oe=be.measure.appendChild(Me("div",[Me("div",Ce)],"CodeMirror-linenumber CodeMirror-gutter-elt")),$e=Oe.firstChild.offsetWidth,gt=Oe.offsetWidth-$e;return be.lineGutter.style.width="",be.lineNumInnerWidth=Math.max($e,be.lineGutter.offsetWidth-gt)+1,be.lineNumWidth=be.lineNumInnerWidth+gt,be.lineNumChars=be.lineNumInnerWidth?Ce.length:-1,be.lineGutter.style.width=be.lineNumWidth+"px",sh(re.display),!0}return!1}function Ka(re,he){for(var Ce=[],be=!1,Oe=0;Oe<re.length;Oe++){var $e=re[Oe],gt=null;if(typeof $e!="string"&&(gt=$e.style,$e=$e.className),$e=="CodeMirror-linenumbers")if(he)be=!0;else continue;Ce.push({className:$e,style:gt})}return he&&!be&&Ce.push({className:"CodeMirror-linenumbers",style:null}),Ce}function Uh(re){var he=re.gutters,Ce=re.gutterSpecs;Fe(he),re.lineGutter=null;for(var be=0;be<Ce.length;++be){var Oe=Ce[be],$e=Oe.className,gt=Oe.style,Lt=he.appendChild(Me("div",null,"CodeMirror-gutter "+$e));gt&&(Lt.style.cssText=gt),$e=="CodeMirror-linenumbers"&&(re.lineGutter=Lt,Lt.style.width=(re.lineNumWidth||1)+"px")}he.style.display=Ce.length?"":"none",sh(re)}function il(re){Uh(re.display),Fo(re),td(re)}function uh(re,he,Ce,be){var Oe=this;this.input=Ce,Oe.scrollbarFiller=Me("div",null,"CodeMirror-scrollbar-filler"),Oe.scrollbarFiller.setAttribute("cm-not-content","true"),Oe.gutterFiller=Me("div",null,"CodeMirror-gutter-filler"),Oe.gutterFiller.setAttribute("cm-not-content","true"),Oe.lineDiv=Be("div",null,"CodeMirror-code"),Oe.selectionDiv=Me("div",null,null,"position: relative; z-index: 1"),Oe.cursorDiv=Me("div",null,"CodeMirror-cursors"),Oe.measure=Me("div",null,"CodeMirror-measure"),Oe.lineMeasure=Me("div",null,"CodeMirror-measure"),Oe.lineSpace=Be("div",[Oe.measure,Oe.lineMeasure,Oe.selectionDiv,Oe.cursorDiv,Oe.lineDiv],null,"position: relative; outline: none");var $e=Be("div",[Oe.lineSpace],"CodeMirror-lines");Oe.mover=Me("div",[$e],null,"position: relative"),Oe.sizer=Me("div",[Oe.mover],"CodeMirror-sizer"),Oe.sizerWidth=null,Oe.heightForcer=Me("div",null,null,"position: absolute; height: "+Ct+"px; width: 1px;"),Oe.gutters=Me("div",null,"CodeMirror-gutters"),Oe.lineGutter=null,Oe.scroller=Me("div",[Oe.sizer,Oe.heightForcer,Oe.gutters],"CodeMirror-scroll"),Oe.scroller.setAttribute("tabIndex","-1"),Oe.wrapper=Me("div",[Oe.scrollbarFiller,Oe.gutterFiller,Oe.scroller],"CodeMirror"),Re&&de<8&&(Oe.gutters.style.zIndex=-1,Oe.scroller.style.paddingRight=0),!ve&&!(at&&te)&&(Oe.scroller.draggable=!0),re&&(re.appendChild?re.appendChild(Oe.wrapper):re(Oe.wrapper)),Oe.viewFrom=Oe.viewTo=he.first,Oe.reportedViewFrom=Oe.reportedViewTo=he.first,Oe.view=[],Oe.renderedView=null,Oe.externalMeasured=null,Oe.viewOffset=0,Oe.lastWrapHeight=Oe.lastWrapWidth=0,Oe.updateLineNumbers=null,Oe.nativeBarWidth=Oe.barHeight=Oe.barWidth=0,Oe.scrollbarsClipped=!1,Oe.lineNumWidth=Oe.lineNumInnerWidth=Oe.lineNumChars=null,Oe.alignWidgets=!1,Oe.cachedCharWidth=Oe.cachedTextHeight=Oe.cachedPaddingH=null,Oe.maxLine=null,Oe.maxLineLength=0,Oe.maxLineChanged=!1,Oe.wheelDX=Oe.wheelDY=Oe.wheelStartX=Oe.wheelStartY=null,Oe.shift=!1,Oe.selForContextMenu=null,Oe.activeTouch=null,Oe.gutterSpecs=Ka(be.gutters,be.lineNumbers),Uh(Oe),Ce.init(Oe)}var Hs=0,ya=null;Re?ya=-.53:at?ya=15:ke?ya=-.7:Ae&&(ya=-1/3);function Zl(re){var he=re.wheelDeltaX,Ce=re.wheelDeltaY;return he==null&&re.detail&&re.axis==re.HORIZONTAL_AXIS&&(he=re.detail),Ce==null&&re.detail&&re.axis==re.VERTICAL_AXIS?Ce=re.detail:Ce==null&&(Ce=re.wheelDelta),{x:he,y:Ce}}function ol(re){var he=Zl(re);return he.x*=ya,he.y*=ya,he}function Va(re,he){var Ce=Zl(he),be=Ce.x,Oe=Ce.y,$e=re.display,gt=$e.scroller,Lt=gt.scrollWidth>gt.clientWidth,kt=gt.scrollHeight>gt.clientHeight;if(be&&Lt||Oe&&kt){if(Oe&&se&&ve){e:for(var It=he.target,nn=$e.view;It!=gt;It=It.parentNode)for(var _t=0;_t<nn.length;_t++)if(nn[_t].node==It){re.display.currentWheelTarget=It;break e}}if(be&&!at&&!Se&&ya!=null){Oe&&kt&&Wl(re,Math.max(0,gt.scrollTop+Oe*ya)),Kl(re,Math.max(0,gt.scrollLeft+be*ya)),(!Oe||Oe&&kt)&&In(he),$e.wheelStartX=null;return}if(Oe&&ya!=null){var xn=Oe*ya,mn=re.doc.scrollTop,ur=mn+$e.wrapper.clientHeight;xn<0?mn=Math.max(0,mn+xn-50):ur=Math.min(re.doc.height,ur+xn+50),ah(re,{top:mn,bottom:ur})}Hs<20&&($e.wheelStartX==null?($e.wheelStartX=gt.scrollLeft,$e.wheelStartY=gt.scrollTop,$e.wheelDX=be,$e.wheelDY=Oe,setTimeout(function(){if($e.wheelStartX!=null){var gr=gt.scrollLeft-$e.wheelStartX,Cr=gt.scrollTop-$e.wheelStartY,Ir=Cr&&$e.wheelDY&&Cr/$e.wheelDY||gr&&$e.wheelDX&&gr/$e.wheelDX;$e.wheelStartX=$e.wheelStartY=null,Ir&&(ya=(ya*Hs+Ir)/(Hs+1),++Hs)}},200)):($e.wheelDX+=be,$e.wheelDY+=Oe))}}var ml=function(re,he){this.ranges=re,this.primIndex=he};ml.prototype.primary=function(){return this.ranges[this.primIndex]},ml.prototype.equals=function(re){if(re==this)return!0;if(re.primIndex!=this.primIndex||re.ranges.length!=this.ranges.length)return!1;for(var he=0;he<this.ranges.length;he++){var Ce=this.ranges[he],be=re.ranges[he];if(!Hn(Ce.anchor,be.anchor)||!Hn(Ce.head,be.head))return!1}return!0},ml.prototype.deepCopy=function(){for(var re=[],he=0;he<this.ranges.length;he++)re[he]=new To(tr(this.ranges[he].anchor),tr(this.ranges[he].head));return new ml(re,this.primIndex)},ml.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},ml.prototype.contains=function(re,he){he||(he=re);for(var Ce=0;Ce<this.ranges.length;Ce++){var be=this.ranges[Ce];if(fn(he,be.from())>=0&&fn(re,be.to())<=0)return Ce}return-1};var To=function(re,he){this.anchor=re,this.head=he};To.prototype.from=function(){return ir(this.anchor,this.head)},To.prototype.to=function(){return Zn(this.anchor,this.head)},To.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function jl(re,he,Ce){var be=re&&re.options.selectionsMayTouch,Oe=he[Ce];he.sort(function(xn,mn){return fn(xn.from(),mn.from())}),Ce=wt(he,Oe);for(var $e=1;$e<he.length;$e++){var gt=he[$e],Lt=he[$e-1],kt=fn(Lt.to(),gt.from());if(be&&!gt.empty()?kt>0:kt>=0){var It=ir(Lt.from(),gt.from()),nn=Zn(Lt.to(),gt.to()),_t=Lt.empty()?gt.from()==gt.head:Lt.from()==Lt.head;$e<=Ce&&--Ce,he.splice(--$e,2,new To(_t?nn:It,_t?It:nn))}}return new ml(he,Ce)}function Ru(re,he){return new ml([new To(re,he||re)],0)}function hh(re){return re.text?ln(re.from.line+re.text.length-1,mt(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function Hh(re,he){if(fn(re,he.from)<0)return re;if(fn(re,he.to)<=0)return hh(he);var Ce=re.line+he.text.length-(he.to.line-he.from.line)-1,be=re.ch;return re.line==he.to.line&&(be+=hh(he).ch-he.to.ch),ln(Ce,be)}function hf(re,he){for(var Ce=[],be=0;be<re.sel.ranges.length;be++){var Oe=re.sel.ranges[be];Ce.push(new To(Hh(Oe.anchor,he),Hh(Oe.head,he)))}return jl(re.cm,Ce,re.sel.primIndex)}function Lc(re,he,Ce){return re.line==he.line?ln(Ce.line,re.ch-he.ch+Ce.ch):ln(Ce.line+(re.line-he.line),re.ch)}function cf(re,he,Ce){for(var be=[],Oe=ln(re.first,0),$e=Oe,gt=0;gt<he.length;gt++){var Lt=he[gt],kt=Lc(Lt.from,Oe,$e),It=Lc(hh(Lt),Oe,$e);if(Oe=Lt.to,$e=It,Ce=="around"){var nn=re.sel.ranges[gt],_t=fn(nn.head,nn.anchor)<0;be[gt]=new To(_t?It:kt,_t?kt:It)}else be[gt]=new To(kt,kt)}return new ml(be,re.sel.primIndex)}function Qi(re){re.doc.mode=Qt(re.options,re.doc.modeOption),ff(re)}function ff(re){re.doc.iter(function(he){he.stateAfter&&(he.stateAfter=null),he.styles&&(he.styles=null)}),re.doc.modeFrontier=re.doc.highlightFrontier=re.doc.first,Tc(re,100),re.state.modeGen++,re.curOp&&Fo(re)}function up(re,he){return he.from.ch==0&&he.to.ch==0&&mt(he.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function nd(re,he,Ce,be){function Oe(ni){return Ce?Ce[ni]:null}function $e(ni,Zr,ci){di(ni,Zr,ci,be),Gr(ni,"change",ni,he)}function gt(ni,Zr){for(var ci=[],Ii=ni;Ii<Zr;++Ii)ci.push(new ui(It[Ii],Oe(Ii),be));return ci}var Lt=he.from,kt=he.to,It=he.text,nn=zn(re,Lt.line),_t=zn(re,kt.line),xn=mt(It),mn=Oe(It.length-1),ur=kt.line-Lt.line;if(he.full)re.insert(0,gt(0,It.length)),re.remove(It.length,re.size-It.length);else if(up(re,he)){var gr=gt(0,It.length-1);$e(_t,_t.text,mn),ur&&re.remove(Lt.line,ur),gr.length&&re.insert(Lt.line,gr)}else if(nn==_t)if(It.length==1)$e(nn,nn.text.slice(0,Lt.ch)+xn+nn.text.slice(kt.ch),mn);else{var Cr=gt(1,It.length-1);Cr.push(new ui(xn+nn.text.slice(kt.ch),mn,be)),$e(nn,nn.text.slice(0,Lt.ch)+It[0],Oe(0)),re.insert(Lt.line+1,Cr)}else if(It.length==1)$e(nn,nn.text.slice(0,Lt.ch)+It[0]+_t.text.slice(kt.ch),Oe(0)),re.remove(Lt.line+1,ur);else{$e(nn,nn.text.slice(0,Lt.ch)+It[0],Oe(0)),$e(_t,xn+_t.text.slice(kt.ch),mn);var Ir=gt(1,It.length-1);ur>1&&re.remove(Lt.line+1,ur-1),re.insert(Lt.line+1,Ir)}Gr(re,"change",re,he)}function Xl(re,he,Ce){function be(Oe,$e,gt){if(Oe.linked)for(var Lt=0;Lt<Oe.linked.length;++Lt){var kt=Oe.linked[Lt];if(kt.doc!=$e){var It=gt&&kt.sharedHist;Ce&&!It||(he(kt.doc,It),be(kt.doc,Oe,It))}}}be(re,null,!0)}function rd(re,he){if(he.cm)throw new Error("This document is already in use.");re.doc=he,he.cm=re,pi(re),Qi(re),df(re),re.options.lineWrapping||Qr(re),re.options.mode=he.modeOption,Fo(re)}function df(re){(re.doc.direction=="rtl"?Ze:De)(re.display.lineDiv,"CodeMirror-rtl")}function e0(re){So(re,function(){df(re),Fo(re)})}function Mc(re){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=re||1}function id(re,he){var Ce={from:tr(he.from),to:hh(he),text:Ht(re,he.from,he.to)};return ch(re,Ce,he.from.line,he.to.line+1),Xl(re,function(be){return ch(be,Ce,he.from.line,he.to.line+1)},!0),Ce}function Nc(re){for(;re.length;){var he=mt(re);if(he.ranges)re.pop();else break}}function pf(re,he){if(he)return Nc(re.done),mt(re.done);if(re.done.length&&!mt(re.done).ranges)return mt(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),mt(re.done)}function gf(re,he,Ce,be){var Oe=re.history;Oe.undone.length=0;var $e=+new Date,gt,Lt;if((Oe.lastOp==be||Oe.lastOrigin==he.origin&&he.origin&&(he.origin.charAt(0)=="+"&&Oe.lastModTime>$e-(re.cm?re.cm.options.historyEventDelay:500)||he.origin.charAt(0)=="*"))&&(gt=pf(Oe,Oe.lastOp==be)))Lt=mt(gt.changes),fn(he.from,he.to)==0&&fn(he.from,Lt.to)==0?Lt.to=hh(he):gt.changes.push(id(re,he));else{var kt=mt(Oe.done);for((!kt||!kt.ranges)&&Ac(re.sel,Oe.done),gt={changes:[id(re,he)],generation:Oe.generation},Oe.done.push(gt);Oe.done.length>Oe.undoDepth;)Oe.done.shift(),Oe.done[0].ranges||Oe.done.shift()}Oe.done.push(Ce),Oe.generation=++Oe.maxGeneration,Oe.lastModTime=Oe.lastSelTime=$e,Oe.lastOp=Oe.lastSelOp=be,Oe.lastOrigin=Oe.lastSelOrigin=he.origin,Lt||on(re,"historyAdded")}function hp(re,he,Ce,be){var Oe=he.charAt(0);return Oe=="*"||Oe=="+"&&Ce.ranges.length==be.ranges.length&&Ce.somethingSelected()==be.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function mf(re,he,Ce,be){var Oe=re.history,$e=be&&be.origin;Ce==Oe.lastSelOp||$e&&Oe.lastSelOrigin==$e&&(Oe.lastModTime==Oe.lastSelTime&&Oe.lastOrigin==$e||hp(re,$e,mt(Oe.done),he))?Oe.done[Oe.done.length-1]=he:Ac(he,Oe.done),Oe.lastSelTime=+new Date,Oe.lastSelOrigin=$e,Oe.lastSelOp=Ce,be&&be.clearRedo!==!1&&Nc(Oe.undone)}function Ac(re,he){var Ce=mt(he);Ce&&Ce.ranges&&Ce.equals(re)||he.push(re)}function ch(re,he,Ce,be){var Oe=he["spans_"+re.id],$e=0;re.iter(Math.max(re.first,Ce),Math.min(re.first+re.size,be),function(gt){gt.markedSpans&&((Oe||(Oe=he["spans_"+re.id]={}))[$e]=gt.markedSpans),++$e})}function bs(re){if(!re)return null;for(var he,Ce=0;Ce<re.length;++Ce)re[Ce].marker.explicitlyCleared?he||(he=re.slice(0,Ce)):he&&he.push(re[Ce]);return he?he.length?he:null:re}function hu(re,he){var Ce=he["spans_"+re.id];if(!Ce)return null;for(var be=[],Oe=0;Oe<he.text.length;++Oe)be.push(bs(Ce[Oe]));return be}function od(re,he){var Ce=hu(re,he),be=Di(re,he);if(!Ce)return be;if(!be)return Ce;for(var Oe=0;Oe<Ce.length;++Oe){var $e=Ce[Oe],gt=be[Oe];if($e&>)e:for(var Lt=0;Lt<gt.length;++Lt){for(var kt=gt[Lt],It=0;It<$e.length;++It)if($e[It].marker==kt.marker)continue e;$e.push(kt)}else gt&&(Ce[Oe]=gt)}return Ce}function _u(re,he,Ce){for(var be=[],Oe=0;Oe<re.length;++Oe){var $e=re[Oe];if($e.ranges){be.push(Ce?ml.prototype.deepCopy.call($e):$e);continue}var gt=$e.changes,Lt=[];be.push({changes:Lt});for(var kt=0;kt<gt.length;++kt){var It=gt[kt],nn=void 0;if(Lt.push({from:It.from,to:It.to,text:It.text}),he)for(var _t in It)(nn=_t.match(/^spans_(\d+)$/))&&wt(he,Number(nn[1]))>-1&&(mt(Lt)[_t]=It[_t],delete It[_t])}}return be}function ad(re,he,Ce,be){if(be){var Oe=re.anchor;if(Ce){var $e=fn(he,Oe)<0;$e!=fn(Ce,Oe)<0?(Oe=he,he=Ce):$e!=fn(he,Ce)<0&&(he=Ce)}return new To(Oe,he)}else return new To(Ce||he,he)}function sd(re,he,Ce,be,Oe){Oe==null&&(Oe=re.cm&&(re.cm.display.shift||re.extend)),ps(re,new ml([ad(re.sel.primary(),he,Ce,Oe)],0),be)}function Gg(re,he,Ce){for(var be=[],Oe=re.cm&&(re.cm.display.shift||re.extend),$e=0;$e<re.sel.ranges.length;$e++)be[$e]=ad(re.sel.ranges[$e],he[$e],null,Oe);var gt=jl(re.cm,be,re.sel.primIndex);ps(re,gt,Ce)}function fh(re,he,Ce,be){var Oe=re.sel.ranges.slice(0);Oe[he]=Ce,ps(re,jl(re.cm,Oe,re.sel.primIndex),be)}function Wh(re,he,Ce,be){ps(re,Ru(he,Ce),be)}function Ug(re,he,Ce){var be={ranges:he.ranges,update:function(Oe){this.ranges=[];for(var $e=0;$e<Oe.length;$e++)this.ranges[$e]=new To(dr(re,Oe[$e].anchor),dr(re,Oe[$e].head))},origin:Ce&&Ce.origin};return on(re,"beforeSelectionChange",re,be),re.cm&&on(re.cm,"beforeSelectionChange",re.cm,be),be.ranges!=he.ranges?jl(re.cm,be.ranges,be.ranges.length-1):he}function ld(re,he,Ce){var be=re.history.done,Oe=mt(be);Oe&&Oe.ranges?(be[be.length-1]=he,Kh(re,he,Ce)):ps(re,he,Ce)}function ps(re,he,Ce){Kh(re,he,Ce),mf(re,re.sel,re.cm?re.cm.curOp.id:NaN,Ce)}function Kh(re,he,Ce){(Cn(re,"beforeSelectionChange")||re.cm&&Cn(re.cm,"beforeSelectionChange"))&&(he=Ug(re,he,Ce));var be=Ce&&Ce.bias||(fn(he.primary().head,re.sel.primary().head)<0?-1:1);cp(re,yf(re,he,be,!0)),!(Ce&&Ce.scroll===!1)&&re.cm&&Nl(re.cm)}function cp(re,he){he.equals(re.sel)||(re.sel=he,re.cm&&(re.cm.curOp.updateInput=1,re.cm.curOp.selectionChanged=!0,Sn(re.cm)),Gr(re,"cursorActivity",re))}function vf(re){cp(re,yf(re,re.sel,null,!1))}function yf(re,he,Ce,be){for(var Oe,$e=0;$e<he.ranges.length;$e++){var gt=he.ranges[$e],Lt=he.ranges.length==re.sel.ranges.length&&re.sel.ranges[$e],kt=Sf(re,gt.anchor,Lt&&Lt.anchor,Ce,be),It=Sf(re,gt.head,Lt&&Lt.head,Ce,be);(Oe||kt!=gt.anchor||It!=gt.head)&&(Oe||(Oe=he.ranges.slice(0,$e)),Oe[$e]=new To(kt,It))}return Oe?jl(re.cm,Oe,he.primIndex):he}function zu(re,he,Ce,be,Oe){var $e=zn(re,he.line);if($e.markedSpans)for(var gt=0;gt<$e.markedSpans.length;++gt){var Lt=$e.markedSpans[gt],kt=Lt.marker,It="selectLeft"in kt?!kt.selectLeft:kt.inclusiveLeft,nn="selectRight"in kt?!kt.selectRight:kt.inclusiveRight;if((Lt.from==null||(It?Lt.from<=he.ch:Lt.from<he.ch))&&(Lt.to==null||(nn?Lt.to>=he.ch:Lt.to>he.ch))){if(Oe&&(on(kt,"beforeCursorEnter"),kt.explicitlyCleared))if($e.markedSpans){--gt;continue}else break;if(!kt.atomic)continue;if(Ce){var _t=kt.find(be<0?1:-1),xn=void 0;if((be<0?nn:It)&&(_t=fp(re,_t,-be,_t&&_t.line==he.line?$e:null)),_t&&_t.line==he.line&&(xn=fn(_t,Ce))&&(be<0?xn<0:xn>0))return zu(re,_t,he,be,Oe)}var mn=kt.find(be<0?-1:1);return(be<0?It:nn)&&(mn=fp(re,mn,be,mn.line==he.line?$e:null)),mn?zu(re,mn,he,be,Oe):null}}return he}function Sf(re,he,Ce,be,Oe){var $e=be||1,gt=zu(re,he,Ce,$e,Oe)||!Oe&&zu(re,he,Ce,$e,!0)||zu(re,he,Ce,-$e,Oe)||!Oe&&zu(re,he,Ce,-$e,!0);return gt||(re.cantEdit=!0,ln(re.first,0))}function fp(re,he,Ce,be){return Ce<0&&he.ch==0?he.line>re.first?dr(re,ln(he.line-1)):null:Ce>0&&he.ch==(be||zn(re,he.line)).text.length?he.line<re.first+re.size-1?ln(he.line+1,0):null:new ln(he.line,he.ch+Ce)}function Sa(re){re.setSelection(ln(re.firstLine(),0),ln(re.lastLine()),ct)}function xf(re,he,Ce){var be={canceled:!1,from:he.from,to:he.to,text:he.text,origin:he.origin,cancel:function(){return be.canceled=!0}};return Ce&&(be.update=function(Oe,$e,gt,Lt){Oe&&(be.from=dr(re,Oe)),$e&&(be.to=dr(re,$e)),gt&&(be.text=gt),Lt!==void 0&&(be.origin=Lt)}),on(re,"beforeChange",re,be),re.cm&&on(re.cm,"beforeChange",re.cm,be),be.canceled?(re.cm&&(re.cm.curOp.updateInput=2),null):{from:be.from,to:be.to,text:be.text,origin:be.origin}}function dh(re,he,Ce){if(re.cm){if(!re.cm.curOp)return Da(re.cm,dh)(re,he,Ce);if(re.cm.state.suppressEdits)return}if(!((Cn(re,"beforeChange")||re.cm&&Cn(re.cm,"beforeChange"))&&(he=xf(re,he,!0),!he))){var be=sr&&!Ce&&pn(re,he.from,he.to);if(be)for(var Oe=be.length-1;Oe>=0;--Oe)Vh(re,{from:be[Oe].from,to:be[Oe].to,text:Oe?[""]:he.text,origin:he.origin});else Vh(re,he)}}function Vh(re,he){if(!(he.text.length==1&&he.text[0]==""&&fn(he.from,he.to)==0)){var Ce=hf(re,he);gf(re,he,Ce,re.cm?re.cm.curOp.id:NaN),jc(re,he,Ce,Di(re,he));var be=[];Xl(re,function(Oe,$e){!$e&&wt(be,Oe.history)==-1&&(pp(Oe.history,he),be.push(Oe.history)),jc(Oe,he,null,Di(Oe,he))})}}function wf(re,he,Ce){var be=re.cm&&re.cm.state.suppressEdits;if(!(be&&!Ce)){for(var Oe=re.history,$e,gt=re.sel,Lt=he=="undo"?Oe.done:Oe.undone,kt=he=="undo"?Oe.undone:Oe.done,It=0;It<Lt.length&&($e=Lt[It],!(Ce?$e.ranges&&!$e.equals(re.sel):!$e.ranges));It++);if(It!=Lt.length){for(Oe.lastOrigin=Oe.lastSelOrigin=null;;)if($e=Lt.pop(),$e.ranges){if(Ac($e,kt),Ce&&!$e.equals(re.sel)){ps(re,$e,{clearRedo:!1});return}gt=$e}else if(be){Lt.push($e);return}else break;var nn=[];Ac(gt,kt),kt.push({changes:nn,generation:Oe.generation}),Oe.generation=$e.generation||++Oe.maxGeneration;for(var _t=Cn(re,"beforeChange")||re.cm&&Cn(re.cm,"beforeChange"),xn=function(gr){var Cr=$e.changes[gr];if(Cr.origin=he,_t&&!xf(re,Cr,!1))return Lt.length=0,{};nn.push(id(re,Cr));var Ir=gr?hf(re,Cr):mt(Lt);jc(re,Cr,Ir,od(re,Cr)),!gr&&re.cm&&re.cm.scrollIntoView({from:Cr.from,to:hh(Cr)});var ni=[];Xl(re,function(Zr,ci){!ci&&wt(ni,Zr.history)==-1&&(pp(Zr.history,Cr),ni.push(Zr.history)),jc(Zr,Cr,null,od(Zr,Cr))})},mn=$e.changes.length-1;mn>=0;--mn){var ur=xn(mn);if(ur)return ur.v}}}}function dp(re,he){if(he!=0&&(re.first+=he,re.sel=new ml(vt(re.sel.ranges,function(Oe){return new To(ln(Oe.anchor.line+he,Oe.anchor.ch),ln(Oe.head.line+he,Oe.head.ch))}),re.sel.primIndex),re.cm)){Fo(re.cm,re.first,re.first-he,he);for(var Ce=re.cm.display,be=Ce.viewFrom;be<Ce.viewTo;be++)Ui(re.cm,be,"gutter")}}function jc(re,he,Ce,be){if(re.cm&&!re.cm.curOp)return Da(re.cm,jc)(re,he,Ce,be);if(he.to.line<re.first){dp(re,he.text.length-1-(he.to.line-he.from.line));return}if(!(he.from.line>re.lastLine())){if(he.from.line<re.first){var Oe=he.text.length-1-(re.first-he.from.line);dp(re,Oe),he={from:ln(re.first,0),to:ln(he.to.line+Oe,he.to.ch),text:[mt(he.text)],origin:he.origin}}var $e=re.lastLine();he.to.line>$e&&(he={from:he.from,to:ln($e,zn(re,$e).text.length),text:[he.text[0]],origin:he.origin}),he.removed=Ht(re,he.from,he.to),Ce||(Ce=hf(re,he)),re.cm?Hg(re.cm,he,be):nd(re,he,be),Kh(re,Ce,ct),re.cantEdit&&Sf(re,ln(re.firstLine(),0))&&(re.cantEdit=!1)}}function Hg(re,he,Ce){var be=re.doc,Oe=re.display,$e=he.from,gt=he.to,Lt=!1,kt=$e.line;re.options.lineWrapping||(kt=jt(Wn(zn(be,$e.line))),be.iter(kt,gt.line+1,function(mn){if(mn==Oe.maxLine)return Lt=!0,!0})),be.sel.contains(he.from,he.to)>-1&&Sn(re),nd(be,he,Ce,Oo(re)),re.options.lineWrapping||(be.iter(kt,$e.line+he.text.length,function(mn){var ur=oi(mn);ur>Oe.maxLineLength&&(Oe.maxLine=mn,Oe.maxLineLength=ur,Oe.maxLineChanged=!0,Lt=!1)}),Lt&&(re.curOp.updateMaxLine=!0)),Jr(be,$e.line),Tc(re,400);var It=he.text.length-(gt.line-$e.line)-1;he.full?Fo(re):$e.line==gt.line&&he.text.length==1&&!up(re.doc,he)?Ui(re,$e.line,"text"):Fo(re,$e.line,gt.line+1,It);var nn=Cn(re,"changes"),_t=Cn(re,"change");if(_t||nn){var xn={from:$e,to:gt,text:he.text,removed:he.removed,origin:he.origin};_t&&Gr(re,"change",re,xn),nn&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(xn)}re.display.selForContextMenu=null}function Zh(re,he,Ce,be,Oe){var $e;be||(be=Ce),fn(be,Ce)<0&&($e=[be,Ce],Ce=$e[0],be=$e[1]),typeof he=="string"&&(he=re.splitLines(he)),dh(re,{from:Ce,to:be,text:he,origin:Oe})}function vl(re,he,Ce,be){Ce<re.line?re.line+=be:he<re.line&&(re.line=he,re.ch=0)}function Wg(re,he,Ce,be){for(var Oe=0;Oe<re.length;++Oe){var $e=re[Oe],gt=!0;if($e.ranges){$e.copied||($e=re[Oe]=$e.deepCopy(),$e.copied=!0);for(var Lt=0;Lt<$e.ranges.length;Lt++)vl($e.ranges[Lt].anchor,he,Ce,be),vl($e.ranges[Lt].head,he,Ce,be);continue}for(var kt=0;kt<$e.changes.length;++kt){var It=$e.changes[kt];if(Ce<It.from.line)It.from=ln(It.from.line+be,It.from.ch),It.to=ln(It.to.line+be,It.to.ch);else if(he<=It.to.line){gt=!1;break}}gt||(re.splice(0,Oe+1),Oe=0)}}function pp(re,he){var Ce=he.from.line,be=he.to.line,Oe=he.text.length-(be-Ce)-1;Wg(re.done,Ce,be,Oe),Wg(re.undone,Ce,be,Oe)}function Xh(re,he,Ce,be){var Oe=he,$e=he;return typeof he=="number"?$e=zn(re,Un(re,he)):Oe=jt(he),Oe==null?null:(be($e,Oe)&&re.cm&&Ui(re.cm,Oe,Ce),$e)}function Oc(re){this.lines=re,this.parent=null;for(var he=0,Ce=0;Ce<re.length;++Ce)re[Ce].parent=this,he+=re[Ce].height;this.height=he}Oc.prototype={chunkSize:function(){return this.lines.length},removeInner:function(re,he){for(var Ce=re,be=re+he;Ce<be;++Ce){var Oe=this.lines[Ce];this.height-=Oe.height,hi(Oe),Gr(Oe,"delete")}this.lines.splice(re,he)},collapse:function(re){re.push.apply(re,this.lines)},insertInner:function(re,he,Ce){this.height+=Ce,this.lines=this.lines.slice(0,re).concat(he).concat(this.lines.slice(re));for(var be=0;be<he.length;++be)he[be].parent=this},iterN:function(re,he,Ce){for(var be=re+he;re<be;++re)if(Ce(this.lines[re]))return!0}};function ra(re){this.children=re;for(var he=0,Ce=0,be=0;be<re.length;++be){var Oe=re[be];he+=Oe.chunkSize(),Ce+=Oe.height,Oe.parent=this}this.size=he,this.height=Ce,this.parent=null}ra.prototype={chunkSize:function(){return this.size},removeInner:function(re,he){this.size-=he;for(var Ce=0;Ce<this.children.length;++Ce){var be=this.children[Ce],Oe=be.chunkSize();if(re<Oe){var $e=Math.min(he,Oe-re),gt=be.height;if(be.removeInner(re,$e),this.height-=gt-be.height,Oe==$e&&(this.children.splice(Ce--,1),be.parent=null),(he-=$e)==0)break;re=0}else re-=Oe}if(this.size-he<25&&(this.children.length>1||!(this.children[0]instanceof Oc))){var Lt=[];this.collapse(Lt),this.children=[new Oc(Lt)],this.children[0].parent=this}},collapse:function(re){for(var he=0;he<this.children.length;++he)this.children[he].collapse(re)},insertInner:function(re,he,Ce){this.size+=he.length,this.height+=Ce;for(var be=0;be<this.children.length;++be){var Oe=this.children[be],$e=Oe.chunkSize();if(re<=$e){if(Oe.insertInner(re,he,Ce),Oe.lines&&Oe.lines.length>50){for(var gt=Oe.lines.length%25+25,Lt=gt;Lt<Oe.lines.length;){var kt=new Oc(Oe.lines.slice(Lt,Lt+=25));Oe.height-=kt.height,this.children.splice(++be,0,kt),kt.parent=this}Oe.lines=Oe.lines.slice(0,gt),this.maybeSpill()}break}re-=$e}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var he=re.children.splice(re.children.length-5,5),Ce=new ra(he);if(re.parent){re.size-=Ce.size,re.height-=Ce.height;var Oe=wt(re.parent.children,re);re.parent.children.splice(Oe+1,0,Ce)}else{var be=new ra(re.children);be.parent=re,re.children=[be,Ce],re=be}Ce.parent=re.parent}while(re.children.length>10);re.parent.maybeSpill()}},iterN:function(re,he,Ce){for(var be=0;be<this.children.length;++be){var Oe=this.children[be],$e=Oe.chunkSize();if(re<$e){var gt=Math.min(he,$e-re);if(Oe.iterN(re,gt,Ce))return!0;if((he-=gt)==0)break;re=0}else re-=$e}}};var Gu=function(re,he,Ce){if(Ce)for(var be in Ce)Ce.hasOwnProperty(be)&&(this[be]=Ce[be]);this.doc=re,this.node=he};Gu.prototype.clear=function(){var re=this.doc.cm,he=this.line.widgets,Ce=this.line,be=jt(Ce);if(!(be==null||!he)){for(var Oe=0;Oe<he.length;++Oe)he[Oe]==this&&he.splice(Oe--,1);he.length||(Ce.widgets=null);var $e=Ko(this);qn(Ce,Math.max(0,Ce.height-$e)),re&&(So(re,function(){Kg(re,Ce,-$e),Ui(re,be,"widget")}),Gr(re,"lineWidgetCleared",re,this,be))}},Gu.prototype.changed=function(){var re=this,he=this.height,Ce=this.doc.cm,be=this.line;this.height=null;var Oe=Ko(this)-he;Oe&&(vn(this.doc,be)||qn(be,be.height+Oe),Ce&&So(Ce,function(){Ce.curOp.forceUpdate=!0,Kg(Ce,be,Oe),Gr(Ce,"lineWidgetChanged",Ce,re,jt(be))}))},kn(Gu);function Kg(re,he,Ce){Or(he)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&_h(re,Ce)}function ud(re,he,Ce,be){var Oe=new Gu(re,Ce,be),$e=re.cm;return $e&&Oe.noHScroll&&($e.display.alignWidgets=!0),Xh(re,he,"widget",function(gt){var Lt=gt.widgets||(gt.widgets=[]);if(Oe.insertAt==null?Lt.push(Oe):Lt.splice(Math.min(Lt.length-1,Math.max(0,Oe.insertAt)),0,Oe),Oe.line=gt,$e&&!vn(re,gt)){var kt=Or(gt)<re.scrollTop;qn(gt,gt.height+Ko(Oe)),kt&&_h($e,Oe.height),$e.curOp.forceUpdate=!0}return!0}),$e&&Gr($e,"lineWidgetAdded",$e,Oe,typeof he=="number"?he:jt(he)),Oe}var Vg=0,Jt=function(re,he){this.lines=[],this.type=he,this.doc=re,this.id=++Vg};Jt.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,he=re&&!re.curOp;if(he&&rl(re),Cn(this,"clear")){var Ce=this.find();Ce&&Gr(this,"clear",Ce.from,Ce.to)}for(var be=null,Oe=null,$e=0;$e<this.lines.length;++$e){var gt=this.lines[$e],Lt=Pr(gt.markedSpans,this);re&&!this.collapsed?Ui(re,jt(gt),"text"):re&&(Lt.to!=null&&(Oe=jt(gt)),Lt.from!=null&&(be=jt(gt))),gt.markedSpans=zr(gt.markedSpans,Lt),Lt.from==null&&this.collapsed&&!vn(this.doc,gt)&&re&&qn(gt,Us(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var kt=0;kt<this.lines.length;++kt){var It=Wn(this.lines[kt]),nn=oi(It);nn>re.display.maxLineLength&&(re.display.maxLine=It,re.display.maxLineLength=nn,re.display.maxLineChanged=!0)}be!=null&&re&&this.collapsed&&Fo(re,be,Oe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&vf(re.doc)),re&&Gr(re,"markerCleared",re,this,be,Oe),he&&Al(re),this.parent&&this.parent.clear()}},Jt.prototype.find=function(re,he){re==null&&this.type=="bookmark"&&(re=1);for(var Ce,be,Oe=0;Oe<this.lines.length;++Oe){var $e=this.lines[Oe],gt=Pr($e.markedSpans,this);if(gt.from!=null&&(Ce=ln(he?$e:jt($e),gt.from),re==-1))return Ce;if(gt.to!=null&&(be=ln(he?$e:jt($e),gt.to),re==1))return be}return Ce&&{from:Ce,to:be}},Jt.prototype.changed=function(){var re=this,he=this.find(-1,!0),Ce=this,be=this.doc.cm;!he||!be||So(be,function(){var Oe=he.line,$e=jt(he.line),gt=Nu(be,$e);if(gt&&(rh(gt),be.curOp.selectionChanged=be.curOp.forceUpdate=!0),be.curOp.updateMaxLine=!0,!vn(Ce.doc,Oe)&&Ce.height!=null){var Lt=Ce.height;Ce.height=null;var kt=Ko(Ce)-Lt;kt&&qn(Oe,Oe.height+kt)}Gr(be,"markerChanged",be,re)})},Jt.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var he=this.doc.cm.curOp;(!he.maybeHiddenMarkers||wt(he.maybeHiddenMarkers,this)==-1)&&(he.maybeUnhiddenMarkers||(he.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},Jt.prototype.detachLine=function(re){if(this.lines.splice(wt(this.lines,re),1),!this.lines.length&&this.doc.cm){var he=this.doc.cm.curOp;(he.maybeHiddenMarkers||(he.maybeHiddenMarkers=[])).push(this)}},kn(Jt);function Yh(re,he,Ce,be,Oe){if(be&&be.shared)return Zg(re,he,Ce,be,Oe);if(re.cm&&!re.cm.curOp)return Da(re.cm,Yh)(re,he,Ce,be,Oe);var $e=new Jt(re,Oe),gt=fn(he,Ce);if(be&&St(be,$e,!1),gt>0||gt==0&&$e.clearWhenEmpty!==!1)return $e;if($e.replacedWith&&($e.collapsed=!0,$e.widgetNode=Be("span",[$e.replacedWith],"CodeMirror-widget"),be.handleMouseEvents||$e.widgetNode.setAttribute("cm-ignore-events","true"),be.insertLeft&&($e.widgetNode.insertLeft=!0)),$e.collapsed){if(Gn(re,he.line,he,Ce,$e)||he.line!=Ce.line&&Gn(re,Ce.line,he,Ce,$e))throw new Error("Inserting collapsed marker partially overlapping an existing one");sn()}$e.addToHistory&&gf(re,{from:he,to:Ce,origin:"markText"},re.sel,NaN);var Lt=he.line,kt=re.cm,It;if(re.iter(Lt,Ce.line+1,function(_t){kt&&$e.collapsed&&!kt.options.lineWrapping&&Wn(_t)==kt.display.maxLine&&(It=!0),$e.collapsed&&Lt!=he.line&&qn(_t,0),Ri(_t,new hr($e,Lt==he.line?he.ch:null,Lt==Ce.line?Ce.ch:null)),++Lt}),$e.collapsed&&re.iter(he.line,Ce.line+1,function(_t){vn(re,_t)&&qn(_t,0)}),$e.clearOnEnter&&Kt($e,"beforeCursorEnter",function(){return $e.clear()}),$e.readOnly&&(nr(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),$e.collapsed&&($e.id=++Vg,$e.atomic=!0),kt){if(It&&(kt.curOp.updateMaxLine=!0),$e.collapsed)Fo(kt,he.line,Ce.line+1);else if($e.className||$e.startStyle||$e.endStyle||$e.css||$e.attributes||$e.title)for(var nn=he.line;nn<=Ce.line;nn++)Ui(kt,nn,"text");$e.atomic&&vf(kt.doc),Gr(kt,"markerAdded",kt,$e)}return $e}var cu=function(re,he){this.markers=re,this.primary=he;for(var Ce=0;Ce<re.length;++Ce)re[Ce].parent=this};cu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var re=0;re<this.markers.length;++re)this.markers[re].clear();Gr(this,"clear")}},cu.prototype.find=function(re,he){return this.primary.find(re,he)},kn(cu);function Zg(re,he,Ce,be,Oe){be=St(be),be.shared=!1;var $e=[Yh(re,he,Ce,be,Oe)],gt=$e[0],Lt=be.widgetNode;return Xl(re,function(kt){Lt&&(be.widgetNode=Lt.cloneNode(!0)),$e.push(Yh(kt,dr(kt,he),dr(kt,Ce),be,Oe));for(var It=0;It<kt.linked.length;++It)if(kt.linked[It].isParent)return;gt=mt($e)}),new cu($e,gt)}function gp(re){return re.findMarks(ln(re.first,0),re.clipPos(ln(re.lastLine())),function(he){return he.parent})}function Xg(re,he){for(var Ce=0;Ce<he.length;Ce++){var be=he[Ce],Oe=be.find(),$e=re.clipPos(Oe.from),gt=re.clipPos(Oe.to);if(fn($e,gt)){var Lt=Yh(re,$e,gt,be.primary,be.primary.type);be.markers.push(Lt),Lt.parent=be}}}function mp(re){for(var he=function(be){var Oe=re[be],$e=[Oe.primary.doc];Xl(Oe.primary.doc,function(kt){return $e.push(kt)});for(var gt=0;gt<Oe.markers.length;gt++){var Lt=Oe.markers[gt];wt($e,Lt.doc)==-1&&(Lt.parent=null,Oe.markers.splice(gt--,1))}},Ce=0;Ce<re.length;Ce++)he(Ce)}var t0=0,as=function(re,he,Ce,be,Oe){if(!(this instanceof as))return new as(re,he,Ce,be,Oe);Ce==null&&(Ce=0),ra.call(this,[new Oc([new ui("",null)])]),this.first=Ce,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Ce;var $e=ln(Ce,0);this.sel=Ru($e),this.history=new Mc(null),this.id=++t0,this.modeOption=he,this.lineSep=be,this.direction=Oe=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),nd(this,{from:$e,to:$e,text:re}),ps(this,Ru($e),ct)};as.prototype=we(ra.prototype,{constructor:as,iter:function(re,he,Ce){Ce?this.iterN(re-this.first,he-re,Ce):this.iterN(this.first,this.first+this.size,re)},insert:function(re,he){for(var Ce=0,be=0;be<he.length;++be)Ce+=he[be].height;this.insertInner(re-this.first,he,Ce)},remove:function(re,he){this.removeInner(re-this.first,he)},getValue:function(re){var he=Yt(this,this.first,this.first+this.size);return re===!1?he:he.join(re||this.lineSeparator())},setValue:Ha(function(re){var he=ln(this.first,0),Ce=this.first+this.size-1;dh(this,{from:he,to:ln(Ce,zn(this,Ce).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&Iu(this.cm,0,0),ps(this,Ru(he),ct)}),replaceRange:function(re,he,Ce,be){he=dr(this,he),Ce=Ce?dr(this,Ce):he,Zh(this,re,he,Ce,be)},getRange:function(re,he,Ce){var be=Ht(this,dr(this,re),dr(this,he));return Ce===!1?be:be.join(Ce||this.lineSeparator())},getLine:function(re){var he=this.getLineHandle(re);return he&&he.text},getLineHandle:function(re){if(An(this,re))return zn(this,re)},getLineNumber:function(re){return jt(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=zn(this,re)),Wn(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return dr(this,re)},getCursor:function(re){var he=this.sel.primary(),Ce;return re==null||re=="head"?Ce=he.head:re=="anchor"?Ce=he.anchor:re=="end"||re=="to"||re===!1?Ce=he.to():Ce=he.from(),Ce},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ha(function(re,he,Ce){Wh(this,dr(this,typeof re=="number"?ln(re,he||0):re),null,Ce)}),setSelection:Ha(function(re,he,Ce){Wh(this,dr(this,re),dr(this,he||re),Ce)}),extendSelection:Ha(function(re,he,Ce){sd(this,dr(this,re),he&&dr(this,he),Ce)}),extendSelections:Ha(function(re,he){Gg(this,Nr(this,re),he)}),extendSelectionsBy:Ha(function(re,he){var Ce=vt(this.sel.ranges,re);Gg(this,Nr(this,Ce),he)}),setSelections:Ha(function(re,he,Ce){if(re.length){for(var be=[],Oe=0;Oe<re.length;Oe++)be[Oe]=new To(dr(this,re[Oe].anchor),dr(this,re[Oe].head));he==null&&(he=Math.min(re.length-1,this.sel.primIndex)),ps(this,jl(this.cm,be,he),Ce)}}),addSelection:Ha(function(re,he,Ce){var be=this.sel.ranges.slice(0);be.push(new To(dr(this,re),dr(this,he||re))),ps(this,jl(this.cm,be,be.length-1),Ce)}),getSelection:function(re){for(var he=this.sel.ranges,Ce,be=0;be<he.length;be++){var Oe=Ht(this,he[be].from(),he[be].to());Ce=Ce?Ce.concat(Oe):Oe}return re===!1?Ce:Ce.join(re||this.lineSeparator())},getSelections:function(re){for(var he=[],Ce=this.sel.ranges,be=0;be<Ce.length;be++){var Oe=Ht(this,Ce[be].from(),Ce[be].to());re!==!1&&(Oe=Oe.join(re||this.lineSeparator())),he[be]=Oe}return he},replaceSelection:function(re,he,Ce){for(var be=[],Oe=0;Oe<this.sel.ranges.length;Oe++)be[Oe]=re;this.replaceSelections(be,he,Ce||"+input")},replaceSelections:Ha(function(re,he,Ce){for(var be=[],Oe=this.sel,$e=0;$e<Oe.ranges.length;$e++){var gt=Oe.ranges[$e];be[$e]={from:gt.from(),to:gt.to(),text:this.splitLines(re[$e]),origin:Ce}}for(var Lt=he&&he!="end"&&cf(this,be,he),kt=be.length-1;kt>=0;kt--)dh(this,be[kt]);Lt?ld(this,Lt):this.cm&&Nl(this.cm)}),undo:Ha(function(){wf(this,"undo")}),redo:Ha(function(){wf(this,"redo")}),undoSelection:Ha(function(){wf(this,"undo",!0)}),redoSelection:Ha(function(){wf(this,"redo",!0)}),setExtending:function(re){this.extend=re},getExtending:function(){return this.extend},historySize:function(){for(var re=this.history,he=0,Ce=0,be=0;be<re.done.length;be++)re.done[be].ranges||++he;for(var Oe=0;Oe<re.undone.length;Oe++)re.undone[Oe].ranges||++Ce;return{undo:he,redo:Ce}},clearHistory:function(){var re=this;this.history=new Mc(this.history.maxGeneration),Xl(this,function(he){return he.history=re.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(re){return re&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(re){return this.history.generation==(re||this.cleanGeneration)},getHistory:function(){return{done:_u(this.history.done),undone:_u(this.history.undone)}},setHistory:function(re){var he=this.history=new Mc(this.history.maxGeneration);he.done=_u(re.done.slice(0),null,!0),he.undone=_u(re.undone.slice(0),null,!0)},setGutterMarker:Ha(function(re,he,Ce){return Xh(this,re,"gutter",function(be){var Oe=be.gutterMarkers||(be.gutterMarkers={});return Oe[he]=Ce,!Ce&&Ie(Oe)&&(be.gutterMarkers=null),!0})}),clearGutter:Ha(function(re){var he=this;this.iter(function(Ce){Ce.gutterMarkers&&Ce.gutterMarkers[re]&&Xh(he,Ce,"gutter",function(){return Ce.gutterMarkers[re]=null,Ie(Ce.gutterMarkers)&&(Ce.gutterMarkers=null),!0})})}),lineInfo:function(re){var he;if(typeof re=="number"){if(!An(this,re)||(he=re,re=zn(this,re),!re))return null}else if(he=jt(re),he==null)return null;return{line:he,handle:re,text:re.text,gutterMarkers:re.gutterMarkers,textClass:re.textClass,bgClass:re.bgClass,wrapClass:re.wrapClass,widgets:re.widgets}},addLineClass:Ha(function(re,he,Ce){return Xh(this,re,he=="gutter"?"gutter":"class",function(be){var Oe=he=="text"?"textClass":he=="background"?"bgClass":he=="gutter"?"gutterClass":"wrapClass";if(!be[Oe])be[Oe]=Ce;else{if(je(Ce).test(be[Oe]))return!1;be[Oe]+=" "+Ce}return!0})}),removeLineClass:Ha(function(re,he,Ce){return Xh(this,re,he=="gutter"?"gutter":"class",function(be){var Oe=he=="text"?"textClass":he=="background"?"bgClass":he=="gutter"?"gutterClass":"wrapClass",$e=be[Oe];if($e)if(Ce==null)be[Oe]=null;else{var gt=$e.match(je(Ce));if(!gt)return!1;var Lt=gt.index+gt[0].length;be[Oe]=$e.slice(0,gt.index)+(!gt.index||Lt==$e.length?"":" ")+$e.slice(Lt)||null}else return!1;return!0})}),addLineWidget:Ha(function(re,he,Ce){return ud(this,re,he,Ce)}),removeLineWidget:function(re){re.clear()},markText:function(re,he,Ce){return Yh(this,dr(this,re),dr(this,he),Ce,Ce&&Ce.type||"range")},setBookmark:function(re,he){var Ce={replacedWith:he&&(he.nodeType==null?he.widget:he),insertLeft:he&&he.insertLeft,clearWhenEmpty:!1,shared:he&&he.shared,handleMouseEvents:he&&he.handleMouseEvents};return re=dr(this,re),Yh(this,re,re,Ce,"bookmark")},findMarksAt:function(re){re=dr(this,re);var he=[],Ce=zn(this,re.line).markedSpans;if(Ce)for(var be=0;be<Ce.length;++be){var Oe=Ce[be];(Oe.from==null||Oe.from<=re.ch)&&(Oe.to==null||Oe.to>=re.ch)&&he.push(Oe.marker.parent||Oe.marker)}return he},findMarks:function(re,he,Ce){re=dr(this,re),he=dr(this,he);var be=[],Oe=re.line;return this.iter(re.line,he.line+1,function($e){var gt=$e.markedSpans;if(gt)for(var Lt=0;Lt<gt.length;Lt++){var kt=gt[Lt];!(kt.to!=null&&Oe==re.line&&re.ch>=kt.to||kt.from==null&&Oe!=re.line||kt.from!=null&&Oe==he.line&&kt.from>=he.ch)&&(!Ce||Ce(kt.marker))&&be.push(kt.marker.parent||kt.marker)}++Oe}),be},getAllMarks:function(){var re=[];return this.iter(function(he){var Ce=he.markedSpans;if(Ce)for(var be=0;be<Ce.length;++be)Ce[be].from!=null&&re.push(Ce[be].marker)}),re},posFromIndex:function(re){var he,Ce=this.first,be=this.lineSeparator().length;return this.iter(function(Oe){var $e=Oe.text.length+be;if($e>re)return he=re,!0;re-=$e,++Ce}),dr(this,ln(Ce,he))},indexFromPos:function(re){re=dr(this,re);var he=re.ch;if(re.line<this.first||re.ch<0)return 0;var Ce=this.lineSeparator().length;return this.iter(this.first,re.line,function(be){he+=be.text.length+Ce}),he},copy:function(re){var he=new as(Yt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return he.scrollTop=this.scrollTop,he.scrollLeft=this.scrollLeft,he.sel=this.sel,he.extend=!1,re&&(he.history.undoDepth=this.history.undoDepth,he.setHistory(this.getHistory())),he},linkedDoc:function(re){re||(re={});var he=this.first,Ce=this.first+this.size;re.from!=null&&re.from>he&&(he=re.from),re.to!=null&&re.to<Ce&&(Ce=re.to);var be=new as(Yt(this,he,Ce),re.mode||this.modeOption,he,this.lineSep,this.direction);return re.sharedHist&&(be.history=this.history),(this.linked||(this.linked=[])).push({doc:be,sharedHist:re.sharedHist}),be.linked=[{doc:this,isParent:!0,sharedHist:re.sharedHist}],Xg(be,gp(this)),be},unlinkDoc:function(re){if(re instanceof vo&&(re=re.doc),this.linked)for(var he=0;he<this.linked.length;++he){var Ce=this.linked[he];if(Ce.doc==re){this.linked.splice(he,1),re.unlinkDoc(this),mp(gp(this));break}}if(re.history==this.history){var be=[re.id];Xl(re,function(Oe){return be.push(Oe.id)},!0),re.history=new Mc(null),re.history.done=_u(this.history.done,be),re.history.undone=_u(this.history.undone,be)}},iterLinkedDocs:function(re){Xl(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):mi(re)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Ha(function(re){re!="rtl"&&(re="ltr"),re!=this.direction&&(this.direction=re,this.iter(function(he){return he.order=null}),this.cm&&e0(this.cm))})}),as.prototype.eachLine=as.prototype.iter;var bf=0;function vp(re){var he=this;if(Qg(he),!(cn(he,re)||jo(he.display,re))){In(re),Re&&(bf=+new Date);var Ce=Ga(he,re,!0),be=re.dataTransfer.files;if(!(!Ce||he.isReadOnly()))if(be&&be.length&&window.FileReader&&window.File)for(var Oe=be.length,$e=Array(Oe),gt=0,Lt=function(){++gt==Oe&&Da(he,function(){Ce=dr(he.doc,Ce);var mn={from:Ce,to:Ce,text:he.doc.splitLines($e.filter(function(ur){return ur!=null}).join(he.doc.lineSeparator())),origin:"paste"};dh(he.doc,mn),ld(he.doc,Ru(dr(he.doc,Ce),dr(he.doc,hh(mn))))})()},kt=function(mn,ur){if(he.options.allowDropFileTypes&&wt(he.options.allowDropFileTypes,mn.type)==-1){Lt();return}var gr=new FileReader;gr.onerror=function(){return Lt()},gr.onload=function(){var Cr=gr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Cr)){Lt();return}$e[ur]=Cr,Lt()},gr.readAsText(mn)},It=0;It<be.length;It++)kt(be[It],It);else{if(he.state.draggingText&&he.doc.sel.contains(Ce)>-1){he.state.draggingText(re),setTimeout(function(){return he.display.input.focus()},20);return}try{var nn=re.dataTransfer.getData("Text");if(nn){var _t;if(he.state.draggingText&&!he.state.draggingText.copy&&(_t=he.listSelections()),Kh(he.doc,Ru(Ce,Ce)),_t)for(var xn=0;xn<_t.length;++xn)Zh(he.doc,"",_t[xn].anchor,_t[xn].head,"drag");he.replaceSelection(nn,"around","paste"),he.display.input.focus()}}catch(mn){}}}}function Yg(re,he){if(Re&&(!re.state.draggingText||+new Date-bf<100)){qr(he);return}if(!(cn(re,he)||jo(re.display,he))&&(he.dataTransfer.setData("Text",re.getSelection()),he.dataTransfer.effectAllowed="copyMove",he.dataTransfer.setDragImage&&!Ae)){var Ce=Me("img",null,null,"position: fixed; left: 0; top: 0;");Ce.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Se&&(Ce.width=Ce.height=1,re.display.wrapper.appendChild(Ce),Ce._top=Ce.offsetTop),he.dataTransfer.setDragImage(Ce,0,0),Se&&Ce.parentNode.removeChild(Ce)}}function Jg(re,he){var Ce=Ga(re,he);if(Ce){var be=document.createDocumentFragment();oo(re,Ce,be),re.display.dragCursor||(re.display.dragCursor=Me("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),re.display.lineSpace.insertBefore(re.display.dragCursor,re.display.cursorDiv)),Te(re.display.dragCursor,be)}}function Qg(re){re.display.dragCursor&&(re.display.lineSpace.removeChild(re.display.dragCursor),re.display.dragCursor=null)}function $g(re){if(document.getElementsByClassName){for(var he=document.getElementsByClassName("CodeMirror"),Ce=[],be=0;be<he.length;be++){var Oe=he[be].CodeMirror;Oe&&Ce.push(Oe)}Ce.length&&Ce[0].operation(function(){for(var $e=0;$e<Ce.length;$e++)re(Ce[$e])})}}var yp=!1;function al(){yp||(Fc(),yp=!0)}function Fc(){var re;Kt(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,$g(Sp)},100))}),Kt(window,"blur",function(){return $g(Bu)})}function Sp(re){var he=re.display;he.cachedCharWidth=he.cachedTextHeight=he.cachedPaddingH=null,he.scrollbarsClipped=!1,re.setSize()}for(var fu={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"},Pf=0;Pf<10;Pf++)fu[Pf+48]=fu[Pf+96]=String(Pf);for(var hd=65;hd<=90;hd++)fu[hd]=String.fromCharCode(hd);for(var Cf=1;Cf<=12;Cf++)fu[Cf+111]=fu[Cf+63235]="F"+Cf;var Ws={};Ws.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"},Ws.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"},Ws.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"},Ws.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"]},Ws.default=se?Ws.macDefault:Ws.pcDefault;function xp(re){var he=re.split(/-(?!$)/);re=he[he.length-1];for(var Ce,be,Oe,$e,gt=0;gt<he.length-1;gt++){var Lt=he[gt];if(/^(cmd|meta|m)$/i.test(Lt))$e=!0;else if(/^a(lt)?$/i.test(Lt))Ce=!0;else if(/^(c|ctrl|control)$/i.test(Lt))be=!0;else if(/^s(hift)?$/i.test(Lt))Oe=!0;else throw new Error("Unrecognized modifier name: "+Lt)}return Ce&&(re="Alt-"+re),be&&(re="Ctrl-"+re),$e&&(re="Cmd-"+re),Oe&&(re="Shift-"+re),re}function wp(re){var he={};for(var Ce in re)if(re.hasOwnProperty(Ce)){var be=re[Ce];if(/^(name|fallthrough|(de|at)tach)$/.test(Ce))continue;if(be=="..."){delete re[Ce];continue}for(var Oe=vt(Ce.split(" "),xp),$e=0;$e<Oe.length;$e++){var gt=void 0,Lt=void 0;$e==Oe.length-1?(Lt=Oe.join(" "),gt=be):(Lt=Oe.slice(0,$e+1).join(" "),gt="...");var kt=he[Lt];if(!kt)he[Lt]=gt;else if(kt!=gt)throw new Error("Inconsistent bindings for "+Lt)}delete re[Ce]}for(var It in he)re[It]=he[It];return re}function yl(re,he,Ce,be){he=Jh(he);var Oe=he.call?he.call(re,be):he[re];if(Oe===!1)return"nothing";if(Oe==="...")return"multi";if(Oe!=null&&Ce(Oe))return"handled";if(he.fallthrough){if(Object.prototype.toString.call(he.fallthrough)!="[object Array]")return yl(re,he.fallthrough,Ce,be);for(var $e=0;$e<he.fallthrough.length;$e++){var gt=yl(re,he.fallthrough[$e],Ce,be);if(gt)return gt}}}function Dc(re){var he=typeof re=="string"?re:fu[re.keyCode];return he=="Ctrl"||he=="Alt"||he=="Shift"||he=="Mod"}function bp(re,he,Ce){var be=re;return he.altKey&&be!="Alt"&&(re="Alt-"+re),(pe?he.metaKey:he.ctrlKey)&&be!="Ctrl"&&(re="Ctrl-"+re),(pe?he.ctrlKey:he.metaKey)&&be!="Mod"&&(re="Cmd-"+re),!Ce&&he.shiftKey&&be!="Shift"&&(re="Shift-"+re),re}function qg(re,he){if(Se&&re.keyCode==34&&re.char)return!1;var Ce=fu[re.keyCode];return Ce==null||re.altGraphKey?!1:(re.keyCode==3&&re.code&&(Ce=re.code),bp(Ce,re,he))}function Jh(re){return typeof re=="string"?Ws[re]:re}function Ks(re,he){for(var Ce=re.doc.sel.ranges,be=[],Oe=0;Oe<Ce.length;Oe++){for(var $e=he(Ce[Oe]);be.length&&fn($e.from,mt(be).to)<=0;){var gt=be.pop();if(fn(gt.from,$e.from)<0){$e.from=gt.from;break}}be.push($e)}So(re,function(){for(var Lt=be.length-1;Lt>=0;Lt--)Zh(re.doc,"",be[Lt].from,be[Lt].to,"+delete");Nl(re)})}function Pp(re,he,Ce){var be=tt(re.text,he+Ce,Ce);return be<0||be>re.text.length?null:be}function xa(re,he,Ce){var be=Pp(re,he.ch,Ce);return be==null?null:new ln(he.line,be,Ce<0?"after":"before")}function Ef(re,he,Ce,be,Oe){if(re){he.doc.direction=="rtl"&&(Oe=-Oe);var $e=qt(Ce,he.doc.direction);if($e){var gt=Oe<0?mt($e):$e[0],Lt=Oe<0==(gt.level==1),kt=Lt?"after":"before",It;if(gt.level>0||he.doc.direction=="rtl"){var nn=gl(he,Ce);It=Oe<0?Ce.text.length-1:0;var _t=Ns(he,nn,It).top;It=ht(function(xn){return Ns(he,nn,xn).top==_t},Oe<0==(gt.level==1)?gt.from:gt.to-1,It),kt=="before"&&(It=Pp(Ce,It,1))}else It=Oe<0?gt.to:gt.from;return new ln(be,It,kt)}}return new ln(be,Oe<0?Ce.text.length:0,Oe<0?"before":"after")}function cd(re,he,Ce,be){var Oe=qt(he,re.doc.direction);if(!Oe)return xa(he,Ce,be);Ce.ch>=he.text.length?(Ce.ch=he.text.length,Ce.sticky="before"):Ce.ch<=0&&(Ce.ch=0,Ce.sticky="after");var $e=Et(Oe,Ce.ch,Ce.sticky),gt=Oe[$e];if(re.doc.direction=="ltr"&>.level%2==0&&(be>0?gt.to>Ce.ch:gt.from<Ce.ch))return xa(he,Ce,be);var Lt=function(Ir,ni){return Pp(he,Ir instanceof ln?Ir.ch:Ir,ni)},kt,It=function(Ir){return re.options.lineWrapping?(kt=kt||gl(re,he),As(re,he,kt,Ir)):{begin:0,end:he.text.length}},nn=It(Ce.sticky=="before"?Lt(Ce,-1):Ce.ch);if(re.doc.direction=="rtl"||gt.level==1){var _t=gt.level==1==be<0,xn=Lt(Ce,_t?1:-1);if(xn!=null&&(_t?xn<=gt.to&&xn<=nn.end:xn>=gt.from&&xn>=nn.begin)){var mn=_t?"before":"after";return new ln(Ce.line,xn,mn)}}var ur=function(Ir,ni,Zr){for(var ci=function(Xo,Ia){return Ia?new ln(Ce.line,Lt(Xo,1),"before"):new ln(Ce.line,Xo,"after")};Ir>=0&&Ir<Oe.length;Ir+=ni){var Ii=Oe[Ir],Kr=ni>0==(Ii.level!=1),$i=Kr?Zr.begin:Lt(Zr.end,-1);if(Ii.from<=$i&&$i<Ii.to||($i=Kr?Ii.from:Lt(Ii.to,-1),Zr.begin<=$i&&$i<Zr.end))return ci($i,Kr)}},gr=ur($e+be,be,nn);if(gr)return gr;var Cr=be>0?nn.end:Lt(nn.begin,-1);return Cr!=null&&!(be>0&&Cr==he.text.length)&&(gr=ur(be>0?0:Oe.length-1,be,It(Cr)),gr)?gr:null}var ph={selectAll:Sa,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),ct)},killLine:function(re){return Ks(re,function(he){if(he.empty()){var Ce=zn(re.doc,he.head.line).text.length;return he.head.ch==Ce&&he.head.line<re.lastLine()?{from:he.head,to:ln(he.head.line+1,0)}:{from:he.head,to:ln(he.head.line,Ce)}}else return{from:he.from(),to:he.to()}})},deleteLine:function(re){return Ks(re,function(he){return{from:ln(he.from().line,0),to:dr(re.doc,ln(he.to().line+1,0))}})},delLineLeft:function(re){return Ks(re,function(he){return{from:ln(he.from().line,0),to:he.from()}})},delWrappedLineLeft:function(re){return Ks(re,function(he){var Ce=re.charCoords(he.head,"div").top+5,be=re.coordsChar({left:0,top:Ce},"div");return{from:be,to:he.from()}})},delWrappedLineRight:function(re){return Ks(re,function(he){var Ce=re.charCoords(he.head,"div").top+5,be=re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Ce},"div");return{from:he.from(),to:be}})},undo:function(re){return re.undo()},redo:function(re){return re.redo()},undoSelection:function(re){return re.undoSelection()},redoSelection:function(re){return re.redoSelection()},goDocStart:function(re){return re.extendSelection(ln(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(ln(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(he){return Bc(re,he.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(re){return re.extendSelectionsBy(function(he){return Cp(re,he.head)},{origin:"+move",bias:1})},goLineEnd:function(re){return re.extendSelectionsBy(function(he){return Ic(re,he.head.line)},{origin:"+move",bias:-1})},goLineRight:function(re){return re.extendSelectionsBy(function(he){var Ce=re.cursorCoords(he.head,"div").top+5;return re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Ce},"div")},dt)},goLineLeft:function(re){return re.extendSelectionsBy(function(he){var Ce=re.cursorCoords(he.head,"div").top+5;return re.coordsChar({left:0,top:Ce},"div")},dt)},goLineLeftSmart:function(re){return re.extendSelectionsBy(function(he){var Ce=re.cursorCoords(he.head,"div").top+5,be=re.coordsChar({left:0,top:Ce},"div");return be.ch<re.getLine(be.line).search(/\S/)?Cp(re,he.head):be},dt)},goLineUp:function(re){return re.moveV(-1,"line")},goLineDown:function(re){return re.moveV(1,"line")},goPageUp:function(re){return re.moveV(-1,"page")},goPageDown:function(re){return re.moveV(1,"page")},goCharLeft:function(re){return re.moveH(-1,"char")},goCharRight:function(re){return re.moveH(1,"char")},goColumnLeft:function(re){return re.moveH(-1,"column")},goColumnRight:function(re){return re.moveH(1,"column")},goWordLeft:function(re){return re.moveH(-1,"word")},goGroupRight:function(re){return re.moveH(1,"group")},goGroupLeft:function(re){return re.moveH(-1,"group")},goWordRight:function(re){return re.moveH(1,"word")},delCharBefore:function(re){return re.deleteH(-1,"codepoint")},delCharAfter:function(re){return re.deleteH(1,"char")},delWordBefore:function(re){return re.deleteH(-1,"word")},delWordAfter:function(re){return re.deleteH(1,"word")},delGroupBefore:function(re){return re.deleteH(-1,"group")},delGroupAfter:function(re){return re.deleteH(1,"group")},indentAuto:function(re){return re.indentSelection("smart")},indentMore:function(re){return re.indentSelection("add")},indentLess:function(re){return re.indentSelection("subtract")},insertTab:function(re){return re.replaceSelection(" ")},insertSoftTab:function(re){for(var he=[],Ce=re.listSelections(),be=re.options.tabSize,Oe=0;Oe<Ce.length;Oe++){var $e=Ce[Oe].from(),gt=qe(re.getLine($e.line),$e.ch,be);he.push(Dt(be-gt%be))}re.replaceSelections(he)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return So(re,function(){for(var he=re.listSelections(),Ce=[],be=0;be<he.length;be++)if(he[be].empty()){var Oe=he[be].head,$e=zn(re.doc,Oe.line).text;if($e){if(Oe.ch==$e.length&&(Oe=new ln(Oe.line,Oe.ch-1)),Oe.ch>0)Oe=new ln(Oe.line,Oe.ch+1),re.replaceRange($e.charAt(Oe.ch-1)+$e.charAt(Oe.ch-2),ln(Oe.line,Oe.ch-2),Oe,"+transpose");else if(Oe.line>re.doc.first){var gt=zn(re.doc,Oe.line-1).text;gt&&(Oe=new ln(Oe.line,1),re.replaceRange($e.charAt(0)+re.doc.lineSeparator()+gt.charAt(gt.length-1),ln(Oe.line-1,gt.length-1),Oe,"+transpose"))}}Ce.push(new To(Oe,Oe))}re.setSelections(Ce)})},newlineAndIndent:function(re){return So(re,function(){for(var he=re.listSelections(),Ce=he.length-1;Ce>=0;Ce--)re.replaceRange(re.doc.lineSeparator(),he[Ce].anchor,he[Ce].head,"+input");he=re.listSelections();for(var be=0;be<he.length;be++)re.indentLine(he[be].from().line,null,!0);Nl(re)})},openLine:function(re){return re.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function Bc(re,he){var Ce=zn(re.doc,he),be=Wn(Ce);return be!=Ce&&(he=jt(be)),Ef(!0,re,be,he,1)}function Ic(re,he){var Ce=zn(re.doc,he),be=Xn(Ce);return be!=Ce&&(he=jt(be)),Ef(!0,re,Ce,he,-1)}function Cp(re,he){var Ce=Bc(re,he.line),be=zn(re.doc,Ce.line),Oe=qt(be,re.doc.direction);if(!Oe||Oe[0].level==0){var $e=Math.max(Ce.ch,be.text.search(/\S/)),gt=he.line==Ce.line&&he.ch<=$e&&he.ch;return ln(Ce.line,gt?0:$e,Ce.sticky)}return Ce}function Rc(re,he,Ce){if(typeof he=="string"&&(he=ph[he],!he))return!1;re.display.input.ensurePolled();var be=re.display.shift,Oe=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Ce&&(re.display.shift=!1),Oe=he(re)!=bt}finally{re.display.shift=be,re.state.suppressEdits=!1}return Oe}function Ep(re,he,Ce){for(var be=0;be<re.state.keyMaps.length;be++){var Oe=yl(he,re.state.keyMaps[be],Ce,re);if(Oe)return Oe}return re.options.extraKeys&&yl(he,re.options.extraKeys,Ce,re)||yl(he,re.options.keyMap,Ce,re)}var du=new rt;function Qh(re,he,Ce,be){var Oe=re.state.keySeq;if(Oe){if(Dc(he))return"handled";if(/\'$/.test(he)?re.state.keySeq=null:du.set(50,function(){re.state.keySeq==Oe&&(re.state.keySeq=null,re.display.input.reset())}),fd(re,Oe+" "+he,Ce,be))return!0}return fd(re,he,Ce,be)}function fd(re,he,Ce,be){var Oe=Ep(re,he,be);return Oe=="multi"&&(re.state.keySeq=he),Oe=="handled"&&Gr(re,"keyHandled",re,he,Ce),(Oe=="handled"||Oe=="multi")&&(In(Ce),bo(re)),!!Oe}function dd(re,he){var Ce=qg(he,!0);return Ce?he.shiftKey&&!re.state.keySeq?Qh(re,"Shift-"+Ce,he,function(be){return Rc(re,be,!0)})||Qh(re,Ce,he,function(be){if(typeof be=="string"?/^go[A-Z]/.test(be):be.motion)return Rc(re,be)}):Qh(re,Ce,he,function(be){return Rc(re,be)}):!1}function pd(re,he,Ce){return Qh(re,"'"+Ce+"'",he,function(be){return Rc(re,be,!0)})}var $h=null;function kp(re){var he=this;if(!(re.target&&re.target!=he.display.input.getField())&&(he.curOp.focus=Ve(),!cn(he,re))){Re&&de<11&&re.keyCode==27&&(re.returnValue=!1);var Ce=re.keyCode;he.display.shift=Ce==16||re.shiftKey;var be=dd(he,re);Se&&($h=be?Ce:null,!be&&Ce==88&&!ii&&(se?re.metaKey:re.ctrlKey)&&he.replaceSelection("",null,"cut")),at&&!se&&!be&&Ce==46&&re.shiftKey&&!re.ctrlKey&&document.execCommand&&document.execCommand("cut"),Ce==18&&!/\bCodeMirror-crosshair\b/.test(he.display.lineDiv.className)&&Tp(he)}}function Tp(re){var he=re.display.lineDiv;Ze(he,"CodeMirror-crosshair");function Ce(be){(be.keyCode==18||!be.altKey)&&(De(he,"CodeMirror-crosshair"),hn(document,"keyup",Ce),hn(document,"mouseover",Ce))}Kt(document,"keyup",Ce),Kt(document,"mouseover",Ce)}function Lp(re){re.keyCode==16&&(this.doc.sel.shift=!1),cn(this,re)}function Yl(re){var he=this;if(!(re.target&&re.target!=he.display.input.getField())&&!(jo(he.display,re)||cn(he,re)||re.ctrlKey&&!re.altKey||se&&re.metaKey)){var Ce=re.keyCode,be=re.charCode;if(Se&&Ce==$h){$h=null,In(re);return}if(!(Se&&(!re.which||re.which<10)&&dd(he,re))){var Oe=String.fromCharCode(be==null?Ce:be);Oe!="\b"&&(pd(he,re,Oe)||he.display.input.onKeyPress(re))}}}var em=400,Mp=function(re,he,Ce){this.time=re,this.pos=he,this.button=Ce};Mp.prototype.compare=function(re,he,Ce){return this.time+em>re&&fn(he,this.pos)==0&&Ce==this.button};var _c,qh;function Np(re,he){var Ce=+new Date;return qh&&qh.compare(Ce,re,he)?(_c=qh=null,"triple"):_c&&_c.compare(Ce,re,he)?(qh=new Mp(Ce,re,he),_c=null,"double"):(_c=new Mp(Ce,re,he),qh=null,"single")}function Jl(re){var he=this,Ce=he.display;if(!(cn(he,re)||Ce.activeTouch&&Ce.input.supportsTouch())){if(Ce.input.ensurePolled(),Ce.shift=re.shiftKey,jo(Ce,re)){ve||(Ce.scroller.draggable=!1,setTimeout(function(){return Ce.scroller.draggable=!0},100));return}if(!vd(he,re)){var be=Ga(he,re),Oe=si(re),$e=be?Np(be,Oe):"single";window.focus(),Oe==1&&he.state.selectingText&&he.state.selectingText(re),!(be&&Ap(he,Oe,be,$e,re))&&(Oe==1?be?tm(he,be,$e,re):er(re)==Ce.scroller&&In(re):Oe==2?(be&&sd(he.doc,be),setTimeout(function(){return Ce.input.focus()},20)):Oe==3&&(xe?he.display.input.onContextMenu(re):zo(he)))}}}function Ap(re,he,Ce,be,Oe){var $e="Click";return be=="double"?$e="Double"+$e:be=="triple"&&($e="Triple"+$e),$e=(he==1?"Left":he==2?"Middle":"Right")+$e,Qh(re,bp($e,Oe),Oe,function(gt){if(typeof gt=="string"&&(gt=ph[gt]),!gt)return!1;var Lt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Lt=gt(re,Ce)!=bt}finally{re.state.suppressEdits=!1}return Lt})}function gd(re,he,Ce){var be=re.getOption("configureMouse"),Oe=be?be(re,he,Ce):{};if(Oe.unit==null){var $e=ie?Ce.shiftKey&&Ce.metaKey:Ce.altKey;Oe.unit=$e?"rectangle":he=="single"?"char":he=="double"?"word":"line"}return(Oe.extend==null||re.doc.extend)&&(Oe.extend=re.doc.extend||Ce.shiftKey),Oe.addNew==null&&(Oe.addNew=se?Ce.metaKey:Ce.ctrlKey),Oe.moveOnDrag==null&&(Oe.moveOnDrag=!(se?Ce.altKey:Ce.ctrlKey)),Oe}function tm(re,he,Ce,be){Re?setTimeout(ft(Eo,re),0):re.curOp.focus=Ve();var Oe=gd(re,Ce,be),$e=re.doc.sel,gt;re.options.dragDrop&&ei&&!re.isReadOnly()&&Ce=="single"&&(gt=$e.contains(he))>-1&&(fn((gt=$e.ranges[gt]).from(),he)<0||he.xRel>0)&&(fn(gt.to(),he)>0||he.xRel<0)?jp(re,be,he,Oe):n0(re,be,he,Oe)}function jp(re,he,Ce,be){var Oe=re.display,$e=!1,gt=Da(re,function(It){ve&&(Oe.scroller.draggable=!1),re.state.draggingText=!1,hn(Oe.wrapper.ownerDocument,"mouseup",gt),hn(Oe.wrapper.ownerDocument,"mousemove",Lt),hn(Oe.scroller,"dragstart",kt),hn(Oe.scroller,"drop",gt),$e||(In(It),be.addNew||sd(re.doc,Ce,null,null,be.extend),ve&&!Ae||Re&&de==9?setTimeout(function(){Oe.wrapper.ownerDocument.body.focus({preventScroll:!0}),Oe.input.focus()},20):Oe.input.focus())}),Lt=function(It){$e=$e||Math.abs(he.clientX-It.clientX)+Math.abs(he.clientY-It.clientY)>=10},kt=function(){return $e=!0};ve&&(Oe.scroller.draggable=!0),re.state.draggingText=gt,gt.copy=!be.moveOnDrag,Oe.scroller.dragDrop&&Oe.scroller.dragDrop(),Kt(Oe.wrapper.ownerDocument,"mouseup",gt),Kt(Oe.wrapper.ownerDocument,"mousemove",Lt),Kt(Oe.scroller,"dragstart",kt),Kt(Oe.scroller,"drop",gt),zo(re),setTimeout(function(){return Oe.input.focus()},20)}function Op(re,he,Ce){if(Ce=="char")return new To(he,he);if(Ce=="word")return re.findWordAt(he);if(Ce=="line")return new To(ln(he.line,0),dr(re.doc,ln(he.line+1,0)));var be=Ce(re,he);return new To(be.from,be.to)}function n0(re,he,Ce,be){var Oe=re.display,$e=re.doc;In(he);var gt,Lt,kt=$e.sel,It=kt.ranges;if(be.addNew&&!be.extend?(Lt=$e.sel.contains(Ce),Lt>-1?gt=It[Lt]:gt=new To(Ce,Ce)):(gt=$e.sel.primary(),Lt=$e.sel.primIndex),be.unit=="rectangle")be.addNew||(gt=new To(Ce,Ce)),Ce=Ga(re,he,!0,!0),Lt=-1;else{var nn=Op(re,Ce,be.unit);be.extend?gt=ad(gt,nn.anchor,nn.head,be.extend):gt=nn}be.addNew?Lt==-1?(Lt=It.length,ps($e,jl(re,It.concat([gt]),Lt),{scroll:!1,origin:"*mouse"})):It.length>1&&It[Lt].empty()&&be.unit=="char"&&!be.extend?(ps($e,jl(re,It.slice(0,Lt).concat(It.slice(Lt+1)),0),{scroll:!1,origin:"*mouse"}),kt=$e.sel):fh($e,Lt,gt,xt):(Lt=0,ps($e,new ml([gt],0),xt),kt=$e.sel);var _t=Ce;function xn(Zr){if(fn(_t,Zr)!=0)if(_t=Zr,be.unit=="rectangle"){for(var ci=[],Ii=re.options.tabSize,Kr=qe(zn($e,Ce.line).text,Ce.ch,Ii),$i=qe(zn($e,Zr.line).text,Zr.ch,Ii),Xo=Math.min(Kr,$i),Ia=Math.max(Kr,$i),ia=Math.min(Ce.line,Zr.line),Ds=Math.min(re.lastLine(),Math.max(Ce.line,Zr.line));ia<=Ds;ia++){var gs=zn($e,ia).text,La=Mt(gs,Xo,Ii);Xo==Ia?ci.push(new To(ln(ia,La),ln(ia,La))):gs.length>La&&ci.push(new To(ln(ia,La),ln(ia,Mt(gs,Ia,Ii))))}ci.length||ci.push(new To(Ce,Ce)),ps($e,jl(re,kt.ranges.slice(0,Lt).concat(ci),Lt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(Zr)}else{var Vs=gt,ss=Op(re,Zr,be.unit),Ma=Vs.anchor,yo;fn(ss.anchor,Ma)>0?(yo=ss.head,Ma=ir(Vs.from(),ss.anchor)):(yo=ss.anchor,Ma=Zn(Vs.to(),ss.head));var ca=kt.ranges.slice(0);ca[Lt]=nm(re,new To(dr($e,Ma),yo)),ps($e,jl(re,ca,Lt),xt)}}var mn=Oe.wrapper.getBoundingClientRect(),ur=0;function gr(Zr){var ci=++ur,Ii=Ga(re,Zr,!0,be.unit=="rectangle");if(Ii)if(fn(Ii,_t)!=0){re.curOp.focus=Ve(),xn(Ii);var Kr=Ji(Oe,$e);(Ii.line>=Kr.to||Ii.line<Kr.from)&&setTimeout(Da(re,function(){ur==ci&&gr(Zr)}),150)}else{var $i=Zr.clientY<mn.top?-20:Zr.clientY>mn.bottom?20:0;$i&&setTimeout(Da(re,function(){ur==ci&&(Oe.scroller.scrollTop+=$i,gr(Zr))}),50)}}function Cr(Zr){re.state.selectingText=!1,ur=1/0,Zr&&(In(Zr),Oe.input.focus()),hn(Oe.wrapper.ownerDocument,"mousemove",Ir),hn(Oe.wrapper.ownerDocument,"mouseup",ni),$e.history.lastSelOrigin=null}var Ir=Da(re,function(Zr){Zr.buttons===0||!si(Zr)?Cr(Zr):gr(Zr)}),ni=Da(re,Cr);re.state.selectingText=ni,Kt(Oe.wrapper.ownerDocument,"mousemove",Ir),Kt(Oe.wrapper.ownerDocument,"mouseup",ni)}function nm(re,he){var Ce=he.anchor,be=he.head,Oe=zn(re.doc,Ce.line);if(fn(Ce,be)==0&&Ce.sticky==be.sticky)return he;var $e=qt(Oe);if(!$e)return he;var gt=Et($e,Ce.ch,Ce.sticky),Lt=$e[gt];if(Lt.from!=Ce.ch&&Lt.to!=Ce.ch)return he;var kt=gt+(Lt.from==Ce.ch==(Lt.level!=1)?0:1);if(kt==0||kt==$e.length)return he;var It;if(be.line!=Ce.line)It=(be.line-Ce.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var nn=Et($e,be.ch,be.sticky),_t=nn-gt||(be.ch-Ce.ch)*(Lt.level==1?-1:1);nn==kt-1||nn==kt?It=_t<0:It=_t>0}var xn=$e[kt+(It?-1:0)],mn=It==(xn.level==1),ur=mn?xn.from:xn.to,gr=mn?"after":"before";return Ce.ch==ur&&Ce.sticky==gr?he:new To(new ln(Ce.line,ur,gr),be)}function md(re,he,Ce,be){var Oe,$e;if(he.touches)Oe=he.touches[0].clientX,$e=he.touches[0].clientY;else try{Oe=he.clientX,$e=he.clientY}catch(xn){return!1}if(Oe>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;be&&In(he);var gt=re.display,Lt=gt.lineDiv.getBoundingClientRect();if($e>Lt.bottom||!Cn(re,Ce))return xr(he);$e-=Lt.top-gt.viewOffset;for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var It=gt.gutters.childNodes[kt];if(It&&It.getBoundingClientRect().right>=Oe){var nn=un(re.doc,$e),_t=re.display.gutterSpecs[kt];return on(re,Ce,re,nn,_t.className,he),xr(he)}}}function vd(re,he){return md(re,he,"gutterClick",!0)}function yd(re,he){jo(re.display,he)||rm(re,he)||cn(re,he,"contextmenu")||xe||re.display.input.onContextMenu(he)}function rm(re,he){return Cn(re,"gutterContextMenu")?md(re,he,"gutterContextMenu",!1):!1}function Sd(re){re.display.wrapper.className=re.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+re.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ou(re)}var gh={toString:function(){return"CodeMirror.Init"}},Fp={},kf={};function im(re){var he=re.optionHandlers;function Ce(be,Oe,$e,gt){re.defaults[be]=Oe,$e&&(he[be]=gt?function(Lt,kt,It){It!=gh&&$e(Lt,kt,It)}:$e)}re.defineOption=Ce,re.Init=gh,Ce("value","",function(be,Oe){return be.setValue(Oe)},!0),Ce("mode",null,function(be,Oe){be.doc.modeOption=Oe,Qi(be)},!0),Ce("indentUnit",2,Qi,!0),Ce("indentWithTabs",!1),Ce("smartIndent",!0),Ce("tabSize",4,function(be){ff(be),ou(be),Fo(be)},!0),Ce("lineSeparator",null,function(be,Oe){if(be.doc.lineSep=Oe,!!Oe){var $e=[],gt=be.doc.first;be.doc.iter(function(kt){for(var It=0;;){var nn=kt.text.indexOf(Oe,It);if(nn==-1)break;It=nn+Oe.length,$e.push(ln(gt,nn))}gt++});for(var Lt=$e.length-1;Lt>=0;Lt--)Zh(be.doc,Oe,$e[Lt],ln($e[Lt].line,$e[Lt].ch+Oe.length))}}),Ce("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(be,Oe,$e){be.state.specialChars=new RegExp(Oe.source+(Oe.test(" ")?"":"| "),"g"),$e!=gh&&be.refresh()}),Ce("specialCharPlaceholder",yi,function(be){return be.refresh()},!0),Ce("electricChars",!0),Ce("inputStyle",te?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Ce("spellcheck",!1,function(be,Oe){return be.getInputField().spellcheck=Oe},!0),Ce("autocorrect",!1,function(be,Oe){return be.getInputField().autocorrect=Oe},!0),Ce("autocapitalize",!1,function(be,Oe){return be.getInputField().autocapitalize=Oe},!0),Ce("rtlMoveVisually",!le),Ce("wholeLineUpdateBefore",!0),Ce("theme","default",function(be){Sd(be),il(be)},!0),Ce("keyMap","default",function(be,Oe,$e){var gt=Jh(Oe),Lt=$e!=gh&&Jh($e);Lt&&Lt.detach&&Lt.detach(be,gt),gt.attach&>.attach(be,Lt||null)}),Ce("extraKeys",null),Ce("configureMouse",null),Ce("lineWrapping",!1,om,!0),Ce("gutters",[],function(be,Oe){be.display.gutterSpecs=Ka(Oe,be.options.lineNumbers),il(be)},!0),Ce("fixedGutter",!0,function(be,Oe){be.display.gutters.style.left=Oe?Du(be.display)+"px":"0",be.refresh()},!0),Ce("coverGutterNextToScrollbar",!1,function(be){return Fa(be)},!0),Ce("scrollbarStyle","native",function(be){Vl(be),Fa(be),be.display.scrollbars.setScrollTop(be.doc.scrollTop),be.display.scrollbars.setScrollLeft(be.doc.scrollLeft)},!0),Ce("lineNumbers",!1,function(be,Oe){be.display.gutterSpecs=Ka(be.options.gutters,Oe),il(be)},!0),Ce("firstLineNumber",1,il,!0),Ce("lineNumberFormatter",function(be){return be},il,!0),Ce("showCursorWhenSelecting",!1,va,!0),Ce("resetSelectionOnContextMenu",!0),Ce("lineWiseCopyCut",!0),Ce("pasteLinesPerSelection",!0),Ce("selectionsMayTouch",!1),Ce("readOnly",!1,function(be,Oe){Oe=="nocursor"&&(Bu(be),be.display.input.blur()),be.display.input.readOnlyChanged(Oe)}),Ce("screenReaderLabel",null,function(be,Oe){Oe=Oe===""?null:Oe,be.display.input.screenReaderLabelChanged(Oe)}),Ce("disableInput",!1,function(be,Oe){Oe||be.display.input.reset()},!0),Ce("dragDrop",!0,xd),Ce("allowDropFileTypes",null),Ce("cursorBlinkRate",530),Ce("cursorScrollMargin",0),Ce("cursorHeight",1,va,!0),Ce("singleCursorHeightPerLine",!0,va,!0),Ce("workTime",100),Ce("workDelay",100),Ce("flattenSpans",!0,ff,!0),Ce("addModeClass",!1,ff,!0),Ce("pollInterval",100),Ce("undoDepth",200,function(be,Oe){return be.doc.history.undoDepth=Oe}),Ce("historyEventDelay",1250),Ce("viewportMargin",10,function(be){return be.refresh()},!0),Ce("maxHighlightLength",1e4,ff,!0),Ce("moveInputWithCursor",!0,function(be,Oe){Oe||be.display.input.resetPosition()}),Ce("tabindex",null,function(be,Oe){return be.display.input.getField().tabIndex=Oe||""}),Ce("autofocus",null),Ce("direction","ltr",function(be,Oe){return be.doc.setDirection(Oe)},!0),Ce("phrases",null)}function xd(re,he,Ce){var be=Ce&&Ce!=gh;if(!he!=!be){var Oe=re.display.dragFunctions,$e=he?Kt:hn;$e(re.display.scroller,"dragstart",Oe.start),$e(re.display.scroller,"dragenter",Oe.enter),$e(re.display.scroller,"dragover",Oe.over),$e(re.display.scroller,"dragleave",Oe.leave),$e(re.display.scroller,"drop",Oe.drop)}}function om(re){re.options.lineWrapping?(Ze(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(De(re.display.wrapper,"CodeMirror-wrap"),Qr(re)),pi(re),Fo(re),ou(re),setTimeout(function(){return Fa(re)},100)}function vo(re,he){var Ce=this;if(!(this instanceof vo))return new vo(re,he);this.options=he=he?St(he):{},St(Fp,he,!1);var be=he.value;typeof be=="string"?be=new as(be,he.mode,null,he.lineSeparator,he.direction):he.mode&&(be.modeOption=he.mode),this.doc=be;var Oe=new vo.inputStyles[he.inputStyle](this),$e=this.display=new uh(re,be,Oe,he);$e.wrapper.CodeMirror=this,Sd(this),he.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vl(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 rt,keySeq:null,specialChars:null},he.autofocus&&!te&&$e.input.focus(),Re&&de<11&&setTimeout(function(){return Ce.display.input.reset(!0)},20),zc(this),al(),rl(this),this.curOp.forceUpdate=!0,rd(this,be),he.autofocus&&!te||this.hasFocus()?setTimeout(function(){Ce.hasFocus()&&!Ce.state.focused&&ho(Ce)},20):Bu(this);for(var gt in kf)kf.hasOwnProperty(gt)&&kf[gt](this,he[gt],gh);Ca(this),he.finishInit&&he.finishInit(this);for(var Lt=0;Lt<ec.length;++Lt)ec[Lt](this);Al(this),ve&&he.lineWrapping&&getComputedStyle($e.lineDiv).textRendering=="optimizelegibility"&&($e.lineDiv.style.textRendering="auto")}vo.defaults=Fp,vo.optionHandlers=kf;function zc(re){var he=re.display;Kt(he.scroller,"mousedown",Da(re,Jl)),Re&&de<11?Kt(he.scroller,"dblclick",Da(re,function(kt){if(!cn(re,kt)){var It=Ga(re,kt);if(!(!It||vd(re,kt)||jo(re.display,kt))){In(kt);var nn=re.findWordAt(It);sd(re.doc,nn.anchor,nn.head)}}})):Kt(he.scroller,"dblclick",function(kt){return cn(re,kt)||In(kt)}),Kt(he.scroller,"contextmenu",function(kt){return yd(re,kt)}),Kt(he.input.getField(),"contextmenu",function(kt){he.scroller.contains(kt.target)||yd(re,kt)});var Ce,be={end:0};function Oe(){he.activeTouch&&(Ce=setTimeout(function(){return he.activeTouch=null},1e3),be=he.activeTouch,be.end=+new Date)}function $e(kt){if(kt.touches.length!=1)return!1;var It=kt.touches[0];return It.radiusX<=1&&It.radiusY<=1}function gt(kt,It){if(It.left==null)return!0;var nn=It.left-kt.left,_t=It.top-kt.top;return nn*nn+_t*_t>20*20}Kt(he.scroller,"touchstart",function(kt){if(!cn(re,kt)&&!$e(kt)&&!vd(re,kt)){he.input.ensurePolled(),clearTimeout(Ce);var It=+new Date;he.activeTouch={start:It,moved:!1,prev:It-be.end<=300?be:null},kt.touches.length==1&&(he.activeTouch.left=kt.touches[0].pageX,he.activeTouch.top=kt.touches[0].pageY)}}),Kt(he.scroller,"touchmove",function(){he.activeTouch&&(he.activeTouch.moved=!0)}),Kt(he.scroller,"touchend",function(kt){var It=he.activeTouch;if(It&&!jo(he,kt)&&It.left!=null&&!It.moved&&new Date-It.start<300){var nn=re.coordsChar(he.activeTouch,"page"),_t;!It.prev||gt(It,It.prev)?_t=new To(nn,nn):!It.prev.prev||gt(It,It.prev.prev)?_t=re.findWordAt(nn):_t=new To(ln(nn.line,0),dr(re.doc,ln(nn.line+1,0))),re.setSelection(_t.anchor,_t.head),re.focus(),In(kt)}Oe()}),Kt(he.scroller,"touchcancel",Oe),Kt(he.scroller,"scroll",function(){he.scroller.clientHeight&&(Wl(re,he.scroller.scrollTop),Kl(re,he.scroller.scrollLeft,!0),on(re,"scroll",re))}),Kt(he.scroller,"mousewheel",function(kt){return Va(re,kt)}),Kt(he.scroller,"DOMMouseScroll",function(kt){return Va(re,kt)}),Kt(he.wrapper,"scroll",function(){return he.wrapper.scrollTop=he.wrapper.scrollLeft=0}),he.dragFunctions={enter:function(kt){cn(re,kt)||qr(kt)},over:function(kt){cn(re,kt)||(Jg(re,kt),qr(kt))},start:function(kt){return Yg(re,kt)},drop:Da(re,vp),leave:function(kt){cn(re,kt)||Qg(re)}};var Lt=he.input.getField();Kt(Lt,"keyup",function(kt){return Lp.call(re,kt)}),Kt(Lt,"keydown",Da(re,kp)),Kt(Lt,"keypress",Da(re,Yl)),Kt(Lt,"focus",function(kt){return ho(re,kt)}),Kt(Lt,"blur",function(kt){return Bu(re,kt)})}var ec=[];vo.defineInitHook=function(re){return ec.push(re)};function Ba(re,he,Ce,be){var Oe=re.doc,$e;Ce==null&&(Ce="add"),Ce=="smart"&&(Oe.mode.indent?$e=Mi(re,he).state:Ce="prev");var gt=re.options.tabSize,Lt=zn(Oe,he),kt=qe(Lt.text,null,gt);Lt.stateAfter&&(Lt.stateAfter=null);var It=Lt.text.match(/^\s*/)[0],nn;if(!be&&!/\S/.test(Lt.text))nn=0,Ce="not";else if(Ce=="smart"&&(nn=Oe.mode.indent($e,Lt.text.slice(It.length),Lt.text),nn==bt||nn>150)){if(!be)return;Ce="prev"}Ce=="prev"?he>Oe.first?nn=qe(zn(Oe,he-1).text,null,gt):nn=0:Ce=="add"?nn=kt+re.options.indentUnit:Ce=="subtract"?nn=kt-re.options.indentUnit:typeof Ce=="number"&&(nn=kt+Ce),nn=Math.max(0,nn);var _t="",xn=0;if(re.options.indentWithTabs)for(var mn=Math.floor(nn/gt);mn;--mn)xn+=gt,_t+=" ";if(xn<nn&&(_t+=Dt(nn-xn)),_t!=It)return Zh(Oe,_t,ln(he,0),ln(he,It.length),"+input"),Lt.stateAfter=null,!0;for(var ur=0;ur<Oe.sel.ranges.length;ur++){var gr=Oe.sel.ranges[ur];if(gr.head.line==he&&gr.head.ch<It.length){var Cr=ln(he,It.length);fh(Oe,ur,new To(Cr,Cr));break}}}var Fs=null;function tc(re){Fs=re}function Tf(re,he,Ce,be,Oe){var $e=re.doc;re.display.shift=!1,be||(be=$e.sel);var gt=+new Date-200,Lt=Oe=="paste"||re.state.pasteIncoming>gt,kt=mi(he),It=null;if(Lt&&be.ranges.length>1)if(Fs&&Fs.text.join(`
|
|
`)==he){if(be.ranges.length%Fs.text.length==0){It=[];for(var nn=0;nn<Fs.text.length;nn++)It.push($e.splitLines(Fs.text[nn]))}}else kt.length==be.ranges.length&&re.options.pasteLinesPerSelection&&(It=vt(kt,function(Ir){return[Ir]}));for(var _t=re.curOp.updateInput,xn=be.ranges.length-1;xn>=0;xn--){var mn=be.ranges[xn],ur=mn.from(),gr=mn.to();mn.empty()&&(Ce&&Ce>0?ur=ln(ur.line,ur.ch-Ce):re.state.overwrite&&!Lt?gr=ln(gr.line,Math.min(zn($e,gr.line).text.length,gr.ch+mt(kt).length)):Lt&&Fs&&Fs.lineWise&&Fs.text.join(`
|
|
`)==kt.join(`
|
|
`)&&(ur=gr=ln(ur.line,0)));var Cr={from:ur,to:gr,text:It?It[xn%It.length]:kt,origin:Oe||(Lt?"paste":re.state.cutIncoming>gt?"cut":"+input")};dh(re.doc,Cr),Gr(re,"inputRead",re,Cr)}he&&!Lt&&Bp(re,he),Nl(re),re.curOp.updateInput<2&&(re.curOp.updateInput=_t),re.curOp.typing=!0,re.state.pasteIncoming=re.state.cutIncoming=-1}function Dp(re,he){var Ce=re.clipboardData&&re.clipboardData.getData("Text");if(Ce)return re.preventDefault(),!he.isReadOnly()&&!he.options.disableInput&&So(he,function(){return Tf(he,Ce,0,null,"paste")}),!0}function Bp(re,he){if(!(!re.options.electricChars||!re.options.smartIndent))for(var Ce=re.doc.sel,be=Ce.ranges.length-1;be>=0;be--){var Oe=Ce.ranges[be];if(!(Oe.head.ch>100||be&&Ce.ranges[be-1].head.line==Oe.head.line)){var $e=re.getModeAt(Oe.head),gt=!1;if($e.electricChars){for(var Lt=0;Lt<$e.electricChars.length;Lt++)if(he.indexOf($e.electricChars.charAt(Lt))>-1){gt=Ba(re,Oe.head.line,"smart");break}}else $e.electricInput&&$e.electricInput.test(zn(re.doc,Oe.head.line).text.slice(0,Oe.head.ch))&&(gt=Ba(re,Oe.head.line,"smart"));gt&&Gr(re,"electricInput",re,Oe.head.line)}}}function Ip(re){for(var he=[],Ce=[],be=0;be<re.doc.sel.ranges.length;be++){var Oe=re.doc.sel.ranges[be].head.line,$e={anchor:ln(Oe,0),head:ln(Oe+1,0)};Ce.push($e),he.push(re.getRange($e.anchor,$e.head))}return{text:he,ranges:Ce}}function Rp(re,he,Ce,be){re.setAttribute("autocorrect",Ce?"":"off"),re.setAttribute("autocapitalize",be?"":"off"),re.setAttribute("spellcheck",!!he)}function _p(){var re=Me("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),he=Me("div",[re],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ve?re.style.width="1000px":re.setAttribute("wrap","off"),fe&&(re.style.border="1px solid black"),Rp(re),he}function mh(re){var he=re.optionHandlers,Ce=re.helpers={};re.prototype={constructor:re,focus:function(){window.focus(),this.display.input.focus()},setOption:function(be,Oe){var $e=this.options,gt=$e[be];$e[be]==Oe&&be!="mode"||($e[be]=Oe,he.hasOwnProperty(be)&&Da(this,he[be])(this,Oe,gt),on(this,"optionChange",this,be))},getOption:function(be){return this.options[be]},getDoc:function(){return this.doc},addKeyMap:function(be,Oe){this.state.keyMaps[Oe?"push":"unshift"](Jh(be))},removeKeyMap:function(be){for(var Oe=this.state.keyMaps,$e=0;$e<Oe.length;++$e)if(Oe[$e]==be||Oe[$e].name==be)return Oe.splice($e,1),!0},addOverlay:Ua(function(be,Oe){var $e=be.token?be:re.getMode(this.options,be);if($e.startState)throw new Error("Overlays may not be stateful.");et(this.state.overlays,{mode:$e,modeSpec:be,opaque:Oe&&Oe.opaque,priority:Oe&&Oe.priority||0},function(gt){return gt.priority}),this.state.modeGen++,Fo(this)}),removeOverlay:Ua(function(be){for(var Oe=this.state.overlays,$e=0;$e<Oe.length;++$e){var gt=Oe[$e].modeSpec;if(gt==be||typeof be=="string"&>.name==be){Oe.splice($e,1),this.state.modeGen++,Fo(this);return}}}),indentLine:Ua(function(be,Oe,$e){typeof Oe!="string"&&typeof Oe!="number"&&(Oe==null?Oe=this.options.smartIndent?"smart":"prev":Oe=Oe?"add":"subtract"),An(this.doc,be)&&Ba(this,be,Oe,$e)}),indentSelection:Ua(function(be){for(var Oe=this.doc.sel.ranges,$e=-1,gt=0;gt<Oe.length;gt++){var Lt=Oe[gt];if(Lt.empty())Lt.head.line>$e&&(Ba(this,Lt.head.line,be,!0),$e=Lt.head.line,gt==this.doc.sel.primIndex&&Nl(this));else{var kt=Lt.from(),It=Lt.to(),nn=Math.max($e,kt.line);$e=Math.min(this.lastLine(),It.line-(It.ch?0:1))+1;for(var _t=nn;_t<$e;++_t)Ba(this,_t,be);var xn=this.doc.sel.ranges;kt.ch==0&&Oe.length==xn.length&&xn[gt].from().ch>0&&fh(this.doc,gt,new To(kt,xn[gt].to()),ct)}}}),getTokenAt:function(be,Oe){return br(this,be,Oe)},getLineTokens:function(be,Oe){return br(this,ln(be),Oe,!0)},getTokenTypeAt:function(be){be=dr(this.doc,be);var Oe=ti(this,zn(this.doc,be.line)),$e=0,gt=(Oe.length-1)/2,Lt=be.ch,kt;if(Lt==0)kt=Oe[2];else for(;;){var It=$e+gt>>1;if((It?Oe[It*2-1]:0)>=Lt)gt=It;else if(Oe[It*2+1]<Lt)$e=It+1;else{kt=Oe[It*2+2];break}}var nn=kt?kt.indexOf("overlay "):-1;return nn<0?kt:nn==0?null:kt.slice(0,nn-1)},getModeAt:function(be){var Oe=this.doc.mode;return Oe.innerMode?re.innerMode(Oe,this.getTokenAt(be).state).mode:Oe},getHelper:function(be,Oe){return this.getHelpers(be,Oe)[0]},getHelpers:function(be,Oe){var $e=[];if(!Ce.hasOwnProperty(Oe))return $e;var gt=Ce[Oe],Lt=this.getModeAt(be);if(typeof Lt[Oe]=="string")gt[Lt[Oe]]&&$e.push(gt[Lt[Oe]]);else if(Lt[Oe])for(var kt=0;kt<Lt[Oe].length;kt++){var It=gt[Lt[Oe][kt]];It&&$e.push(It)}else Lt.helperType&>[Lt.helperType]?$e.push(gt[Lt.helperType]):gt[Lt.name]&&$e.push(gt[Lt.name]);for(var nn=0;nn<gt._global.length;nn++){var _t=gt._global[nn];_t.pred(Lt,this)&&wt($e,_t.val)==-1&&$e.push(_t.val)}return $e},getStateAfter:function(be,Oe){var $e=this.doc;return be=Un($e,be==null?$e.first+$e.size-1:be),Mi(this,be+1,Oe).state},cursorCoords:function(be,Oe){var $e,gt=this.doc.sel.primary();return be==null?$e=gt.head:typeof be=="object"?$e=dr(this.doc,be):$e=be?gt.from():gt.to(),Wi(this,$e,Oe||"page")},charCoords:function(be,Oe){return Bi(this,dr(this.doc,be),Oe||"page")},coordsChar:function(be,Oe){return be=uo(this,be,Oe||"page"),qo(this,be.left,be.top)},lineAtHeight:function(be,Oe){return be=uo(this,{top:be,left:0},Oe||"page").top,un(this.doc,be+this.display.viewOffset)},heightAtLine:function(be,Oe,$e){var gt=!1,Lt;if(typeof be=="number"){var kt=this.doc.first+this.doc.size-1;be<this.doc.first?be=this.doc.first:be>kt&&(be=kt,gt=!0),Lt=zn(this.doc,be)}else Lt=be;return sa(this,Lt,{top:0,left:0},Oe||"page",$e||gt).top+(gt?this.doc.height-Or(Lt):0)},defaultTextHeight:function(){return Us(this.display)},defaultCharWidth:function(){return Hl(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(be,Oe,$e,gt,Lt){var kt=this.display;be=Wi(this,dr(this.doc,be));var It=be.bottom,nn=be.left;if(Oe.style.position="absolute",Oe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Oe),kt.sizer.appendChild(Oe),gt=="over")It=be.top;else if(gt=="above"||gt=="near"){var _t=Math.max(kt.wrapper.clientHeight,this.doc.height),xn=Math.max(kt.sizer.clientWidth,kt.lineSpace.clientWidth);(gt=="above"||be.bottom+Oe.offsetHeight>_t)&&be.top>Oe.offsetHeight?It=be.top-Oe.offsetHeight:be.bottom+Oe.offsetHeight<=_t&&(It=be.bottom),nn+Oe.offsetWidth>xn&&(nn=xn-Oe.offsetWidth)}Oe.style.top=It+"px",Oe.style.left=Oe.style.right="",Lt=="right"?(nn=kt.sizer.clientWidth-Oe.offsetWidth,Oe.style.right="0px"):(Lt=="left"?nn=0:Lt=="middle"&&(nn=(kt.sizer.clientWidth-Oe.offsetWidth)/2),Oe.style.left=nn+"px"),$e&&ih(this,{left:nn,top:It,right:nn+Oe.offsetWidth,bottom:It+Oe.offsetHeight})},triggerOnKeyDown:Ua(kp),triggerOnKeyPress:Ua(Yl),triggerOnKeyUp:Lp,triggerOnMouseDown:Ua(Jl),execCommand:function(be){if(ph.hasOwnProperty(be))return ph[be].call(null,this)},triggerElectric:Ua(function(be){Bp(this,be)}),findPosH:function(be,Oe,$e,gt){var Lt=1;Oe<0&&(Lt=-1,Oe=-Oe);for(var kt=dr(this.doc,be),It=0;It<Oe&&(kt=Lf(this.doc,kt,Lt,$e,gt),!kt.hitSide);++It);return kt},moveH:Ua(function(be,Oe){var $e=this;this.extendSelectionsBy(function(gt){return $e.display.shift||$e.doc.extend||gt.empty()?Lf($e.doc,gt.head,be,Oe,$e.options.rtlMoveVisually):be<0?gt.from():gt.to()},dt)}),deleteH:Ua(function(be,Oe){var $e=this.doc.sel,gt=this.doc;$e.somethingSelected()?gt.replaceSelection("",null,"+delete"):Ks(this,function(Lt){var kt=Lf(gt,Lt.head,be,Oe,!1);return be<0?{from:kt,to:Lt.head}:{from:Lt.head,to:kt}})}),findPosV:function(be,Oe,$e,gt){var Lt=1,kt=gt;Oe<0&&(Lt=-1,Oe=-Oe);for(var It=dr(this.doc,be),nn=0;nn<Oe;++nn){var _t=Wi(this,It,"div");if(kt==null?kt=_t.left:_t.left=kt,It=vh(this,_t,Lt,$e),It.hitSide)break}return It},moveV:Ua(function(be,Oe){var $e=this,gt=this.doc,Lt=[],kt=!this.display.shift&&!gt.extend&>.sel.somethingSelected();if(gt.extendSelectionsBy(function(nn){if(kt)return be<0?nn.from():nn.to();var _t=Wi($e,nn.head,"div");nn.goalColumn!=null&&(_t.left=nn.goalColumn),Lt.push(_t.left);var xn=vh($e,_t,be,Oe);return Oe=="page"&&nn==gt.sel.primary()&&_h($e,Bi($e,xn,"div").top-_t.top),xn},dt),Lt.length)for(var It=0;It<gt.sel.ranges.length;It++)gt.sel.ranges[It].goalColumn=Lt[It]}),findWordAt:function(be){var Oe=this.doc,$e=zn(Oe,be.line).text,gt=be.ch,Lt=be.ch;if($e){var kt=this.getHelper(be,"wordChars");(be.sticky=="before"||Lt==$e.length)&>?--gt:++Lt;for(var It=$e.charAt(gt),nn=nt(It,kt)?function(_t){return nt(_t,kt)}:/\s/.test(It)?function(_t){return/\s/.test(_t)}:function(_t){return!/\s/.test(_t)&&!nt(_t)};gt>0&&nn($e.charAt(gt-1));)--gt;for(;Lt<$e.length&&nn($e.charAt(Lt));)++Lt}return new To(ln(be.line,gt),ln(be.line,Lt))},toggleOverwrite:function(be){be!=null&&be==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ze(this.display.cursorDiv,"CodeMirror-overwrite"):De(this.display.cursorDiv,"CodeMirror-overwrite"),on(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ve()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ua(function(be,Oe){Iu(this,be,Oe)}),getScrollInfo:function(){var be=this.display.scroller;return{left:be.scrollLeft,top:be.scrollTop,height:be.scrollHeight-fo(this)-this.display.barHeight,width:be.scrollWidth-fo(this)-this.display.barWidth,clientHeight:Gs(this),clientWidth:os(this)}},scrollIntoView:Ua(function(be,Oe){be==null?(be={from:this.doc.sel.primary().head,to:null},Oe==null&&(Oe=this.options.cursorScrollMargin)):typeof be=="number"?be={from:ln(be,0),to:null}:be.from==null&&(be={from:be,to:null}),be.to||(be.to=be.from),be.margin=Oe||0,be.from.line!=null?lo(this,be):zh(this,be.from,be.to,be.margin)}),setSize:Ua(function(be,Oe){var $e=this,gt=function(kt){return typeof kt=="number"||/^\d+$/.test(String(kt))?kt+"px":kt};be!=null&&(this.display.wrapper.style.width=gt(be)),Oe!=null&&(this.display.wrapper.style.height=gt(Oe)),this.options.lineWrapping&&iu(this);var Lt=this.display.viewFrom;this.doc.iter(Lt,this.display.viewTo,function(kt){if(kt.widgets){for(var It=0;It<kt.widgets.length;It++)if(kt.widgets[It].noHScroll){Ui($e,Lt,"widget");break}}++Lt}),this.curOp.forceUpdate=!0,on(this,"refresh",this)}),operation:function(be){return So(this,be)},startOperation:function(){return rl(this)},endOperation:function(){return Al(this)},refresh:Ua(function(){var be=this.display.cachedTextHeight;Fo(this),this.curOp.forceUpdate=!0,ou(this),Iu(this,this.doc.scrollLeft,this.doc.scrollTop),sh(this.display),(be==null||Math.abs(be-Us(this.display))>.5||this.options.lineWrapping)&&pi(this),on(this,"refresh",this)}),swapDoc:Ua(function(be){var Oe=this.doc;return Oe.cm=null,this.state.selectingText&&this.state.selectingText(),rd(this,be),ou(this),this.display.input.reset(),Iu(this,be.scrollLeft,be.scrollTop),this.curOp.forceScroll=!0,Gr(this,"swapDoc",this,Oe),Oe}),phrase:function(be){var Oe=this.options.phrases;return Oe&&Object.prototype.hasOwnProperty.call(Oe,be)?Oe[be]:be},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}},kn(re),re.registerHelper=function(be,Oe,$e){Ce.hasOwnProperty(be)||(Ce[be]=re[be]={_global:[]}),Ce[be][Oe]=$e},re.registerGlobalHelper=function(be,Oe,$e,gt){re.registerHelper(be,Oe,gt),Ce[be]._global.push({pred:$e,val:gt})}}function Lf(re,he,Ce,be,Oe){var $e=he,gt=Ce,Lt=zn(re,he.line),kt=Oe&&re.direction=="rtl"?-Ce:Ce;function It(){var ni=he.line+kt;return ni<re.first||ni>=re.first+re.size?!1:(he=new ln(ni,he.ch,he.sticky),Lt=zn(re,ni))}function nn(ni){var Zr;if(be=="codepoint"){var ci=Lt.text.charCodeAt(he.ch+(be>0?0:-1));isNaN(ci)?Zr=null:Zr=new ln(he.line,Math.max(0,Math.min(Lt.text.length,he.ch+Ce*(ci>=55296&&ci<56320?2:1))),-Ce)}else Oe?Zr=cd(re.cm,Lt,he,Ce):Zr=xa(Lt,he,Ce);if(Zr==null)if(!ni&&It())he=Ef(Oe,re.cm,Lt,he.line,kt);else return!1;else he=Zr;return!0}if(be=="char"||be=="codepoint")nn();else if(be=="column")nn(!0);else if(be=="word"||be=="group")for(var _t=null,xn=be=="group",mn=re.cm&&re.cm.getHelper(he,"wordChars"),ur=!0;!(Ce<0&&!nn(!ur));ur=!1){var gr=Lt.text.charAt(he.ch)||`
|
|
`,Cr=nt(gr,mn)?"w":xn&&gr==`
|
|
`?"n":!xn||/\s/.test(gr)?null:"p";if(xn&&!ur&&!Cr&&(Cr="s"),_t&&_t!=Cr){Ce<0&&(Ce=1,nn(),he.sticky="after");break}if(Cr&&(_t=Cr),Ce>0&&!nn(!ur))break}var Ir=Sf(re,he,$e,gt,!0);return Hn($e,Ir)&&(Ir.hitSide=!0),Ir}function vh(re,he,Ce,be){var Oe=re.doc,$e=he.left,gt;if(be=="page"){var Lt=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),kt=Math.max(Lt-.5*Us(re.display),3);gt=(Ce>0?he.bottom:he.top)+Ce*kt}else be=="line"&&(gt=Ce>0?he.bottom+3:he.top-3);for(var It;It=qo(re,$e,gt),!!It.outside;){if(Ce<0?gt<=0:gt>=Oe.height){It.hitSide=!0;break}gt+=Ce*5}return It}var Do=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new rt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Do.prototype.init=function(re){var he=this,Ce=this,be=Ce.cm,Oe=Ce.div=re.lineDiv;Rp(Oe,be.options.spellcheck,be.options.autocorrect,be.options.autocapitalize);function $e(Lt){for(var kt=Lt.target;kt;kt=kt.parentNode){if(kt==Oe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(kt.className))break}return!1}Kt(Oe,"paste",function(Lt){!$e(Lt)||cn(be,Lt)||Dp(Lt,be)||de<=11&&setTimeout(Da(be,function(){return he.updateFromDOM()}),20)}),Kt(Oe,"compositionstart",function(Lt){he.composing={data:Lt.data,done:!1}}),Kt(Oe,"compositionupdate",function(Lt){he.composing||(he.composing={data:Lt.data,done:!1})}),Kt(Oe,"compositionend",function(Lt){he.composing&&(Lt.data!=he.composing.data&&he.readFromDOMSoon(),he.composing.done=!0)}),Kt(Oe,"touchstart",function(){return Ce.forceCompositionEnd()}),Kt(Oe,"input",function(){he.composing||he.readFromDOMSoon()});function gt(Lt){if(!(!$e(Lt)||cn(be,Lt))){if(be.somethingSelected())tc({lineWise:!1,text:be.getSelections()}),Lt.type=="cut"&&be.replaceSelection("",null,"cut");else if(be.options.lineWiseCopyCut){var kt=Ip(be);tc({lineWise:!0,text:kt.text}),Lt.type=="cut"&&be.operation(function(){be.setSelections(kt.ranges,0,ct),be.replaceSelection("",null,"cut")})}else return;if(Lt.clipboardData){Lt.clipboardData.clearData();var It=Fs.text.join(`
|
|
`);if(Lt.clipboardData.setData("Text",It),Lt.clipboardData.getData("Text")==It){Lt.preventDefault();return}}var nn=_p(),_t=nn.firstChild;be.display.lineSpace.insertBefore(nn,be.display.lineSpace.firstChild),_t.value=Fs.text.join(`
|
|
`);var xn=document.activeElement;lt(_t),setTimeout(function(){be.display.lineSpace.removeChild(nn),xn.focus(),xn==Oe&&Ce.showPrimarySelection()},50)}}Kt(Oe,"copy",gt),Kt(Oe,"cut",gt)},Do.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Do.prototype.prepareSelection=function(){var re=au(this.cm,!1);return re.focus=document.activeElement==this.div,re},Do.prototype.showSelection=function(re,he){!re||!this.cm.display.view.length||((re.focus||he)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Do.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Do.prototype.showPrimarySelection=function(){var re=this.getSelection(),he=this.cm,Ce=he.doc.sel.primary(),be=Ce.from(),Oe=Ce.to();if(he.display.viewTo==he.display.viewFrom||be.line>=he.display.viewTo||Oe.line<he.display.viewFrom){re.removeAllRanges();return}var $e=Mf(he,re.anchorNode,re.anchorOffset),gt=Mf(he,re.focusNode,re.focusOffset);if(!($e&&!$e.bad&>&&!gt.bad&&fn(ir($e,gt),be)==0&&fn(Zn($e,gt),Oe)==0)){var Lt=he.display.view,kt=be.line>=he.display.viewFrom&&wd(he,be)||{node:Lt[0].measure.map[2],offset:0},It=Oe.line<he.display.viewTo&&wd(he,Oe);if(!It){var nn=Lt[Lt.length-1].measure,_t=nn.maps?nn.maps[nn.maps.length-1]:nn.map;It={node:_t[_t.length-1],offset:_t[_t.length-2]-_t[_t.length-3]}}if(!kt||!It){re.removeAllRanges();return}var xn=re.rangeCount&&re.getRangeAt(0),mn;try{mn=Ue(kt.node,kt.offset,It.offset,It.node)}catch(ur){}mn&&(!at&&he.state.focused?(re.collapse(kt.node,kt.offset),mn.collapsed||(re.removeAllRanges(),re.addRange(mn))):(re.removeAllRanges(),re.addRange(mn)),xn&&re.anchorNode==null?re.addRange(xn):at&&this.startGracePeriod()),this.rememberSelection()}},Do.prototype.startGracePeriod=function(){var re=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){re.gracePeriod=!1,re.selectionChanged()&&re.cm.operation(function(){return re.cm.curOp.selectionChanged=!0})},20)},Do.prototype.showMultipleSelections=function(re){Te(this.cm.display.cursorDiv,re.cursors),Te(this.cm.display.selectionDiv,re.selection)},Do.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Do.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var he=re.getRangeAt(0).commonAncestorContainer;return Ye(this.div,he)},Do.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Do.prototype.blur=function(){this.div.blur()},Do.prototype.getField=function(){return this.div},Do.prototype.supportsTouch=function(){return!0},Do.prototype.receivedFocus=function(){var re=this;this.selectionInEditor()?this.pollSelection():So(this.cm,function(){return re.cm.curOp.selectionChanged=!0});function he(){re.cm.state.focused&&(re.pollSelection(),re.polling.set(re.cm.options.pollInterval,he))}this.polling.set(this.cm.options.pollInterval,he)},Do.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Do.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var re=this.getSelection(),he=this.cm;if(z&&ke&&this.cm.display.gutterSpecs.length&&zp(re.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Ce=Mf(he,re.anchorNode,re.anchorOffset),be=Mf(he,re.focusNode,re.focusOffset);Ce&&be&&So(he,function(){ps(he.doc,Ru(Ce,be),ct),(Ce.bad||be.bad)&&(he.curOp.selectionChanged=!0)})}}},Do.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var re=this.cm,he=re.display,Ce=re.doc.sel.primary(),be=Ce.from(),Oe=Ce.to();if(be.ch==0&&be.line>re.firstLine()&&(be=ln(be.line-1,zn(re.doc,be.line-1).length)),Oe.ch==zn(re.doc,Oe.line).text.length&&Oe.line<re.lastLine()&&(Oe=ln(Oe.line+1,0)),be.line<he.viewFrom||Oe.line>he.viewTo-1)return!1;var $e,gt,Lt;be.line==he.viewFrom||($e=js(re,be.line))==0?(gt=jt(he.view[0].line),Lt=he.view[0].node):(gt=jt(he.view[$e].line),Lt=he.view[$e-1].node.nextSibling);var kt=js(re,Oe.line),It,nn;if(kt==he.view.length-1?(It=he.viewTo-1,nn=he.lineDiv.lastChild):(It=jt(he.view[kt+1].line)-1,nn=he.view[kt+1].node.previousSibling),!Lt)return!1;for(var _t=re.doc.splitLines(Uc(re,Lt,nn,gt,It)),xn=Ht(re.doc,ln(gt,0),ln(It,zn(re.doc,It).text.length));_t.length>1&&xn.length>1;)if(mt(_t)==mt(xn))_t.pop(),xn.pop(),It--;else if(_t[0]==xn[0])_t.shift(),xn.shift(),gt++;else break;for(var mn=0,ur=0,gr=_t[0],Cr=xn[0],Ir=Math.min(gr.length,Cr.length);mn<Ir&&gr.charCodeAt(mn)==Cr.charCodeAt(mn);)++mn;for(var ni=mt(_t),Zr=mt(xn),ci=Math.min(ni.length-(_t.length==1?mn:0),Zr.length-(xn.length==1?mn:0));ur<ci&&ni.charCodeAt(ni.length-ur-1)==Zr.charCodeAt(Zr.length-ur-1);)++ur;if(_t.length==1&&xn.length==1&>==be.line)for(;mn&&mn>be.ch&&ni.charCodeAt(ni.length-ur-1)==Zr.charCodeAt(Zr.length-ur-1);)mn--,ur++;_t[_t.length-1]=ni.slice(0,ni.length-ur).replace(/^\u200b+/,""),_t[0]=_t[0].slice(mn).replace(/\u200b+$/,"");var Ii=ln(gt,mn),Kr=ln(It,xn.length?mt(xn).length-ur:0);if(_t.length>1||_t[0]||fn(Ii,Kr))return Zh(re.doc,_t,Ii,Kr,"+input"),!0},Do.prototype.ensurePolled=function(){this.forceCompositionEnd()},Do.prototype.reset=function(){this.forceCompositionEnd()},Do.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Do.prototype.readFromDOMSoon=function(){var re=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(re.readDOMTimeout=null,re.composing)if(re.composing.done)re.composing=null;else return;re.updateFromDOM()},80))},Do.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&So(this.cm,function(){return Fo(re.cm)})},Do.prototype.setUneditable=function(re){re.contentEditable="false"},Do.prototype.onKeyPress=function(re){re.charCode==0||this.composing||(re.preventDefault(),this.cm.isReadOnly()||Da(this.cm,Tf)(this.cm,String.fromCharCode(re.charCode==null?re.keyCode:re.charCode),0))},Do.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Do.prototype.onContextMenu=function(){},Do.prototype.resetPosition=function(){},Do.prototype.needsContentAttribute=!0;function wd(re,he){var Ce=Nu(re,he.line);if(!Ce||Ce.hidden)return null;var be=zn(re.doc,he.line),Oe=Ho(Ce,be,he.line),$e=qt(be,re.doc.direction),gt="left";if($e){var Lt=Et($e,he.ch);gt=Lt%2?"right":"left"}var kt=nh(Oe.map,he.ch,gt);return kt.offset=kt.collapse=="right"?kt.end:kt.start,kt}function zp(re){for(var he=re;he;he=he.parentNode)if(/CodeMirror-gutter-wrapper/.test(he.className))return!0;return!1}function Gc(re,he){return he&&(re.bad=!0),re}function Uc(re,he,Ce,be,Oe){var $e="",gt=!1,Lt=re.doc.lineSeparator(),kt=!1;function It(mn){return function(ur){return ur.id==mn}}function nn(){gt&&($e+=Lt,kt&&($e+=Lt),gt=kt=!1)}function _t(mn){mn&&(nn(),$e+=mn)}function xn(mn){if(mn.nodeType==1){var ur=mn.getAttribute("cm-text");if(ur){_t(ur);return}var gr=mn.getAttribute("cm-marker"),Cr;if(gr){var Ir=re.findMarks(ln(be,0),ln(Oe+1,0),It(+gr));Ir.length&&(Cr=Ir[0].find(0))&&_t(Ht(re.doc,Cr.from,Cr.to).join(Lt));return}if(mn.getAttribute("contenteditable")=="false")return;var ni=/^(pre|div|p|li|table|br)$/i.test(mn.nodeName);if(!/^br$/i.test(mn.nodeName)&&mn.textContent.length==0)return;ni&&nn();for(var Zr=0;Zr<mn.childNodes.length;Zr++)xn(mn.childNodes[Zr]);/^(pre|p)$/i.test(mn.nodeName)&&(kt=!0),ni&&(gt=!0)}else mn.nodeType==3&&_t(mn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;xn(he),he!=Ce;)he=he.nextSibling,kt=!1;return $e}function Mf(re,he,Ce){var be;if(he==re.display.lineDiv){if(be=re.display.lineDiv.childNodes[Ce],!be)return Gc(re.clipPos(ln(re.display.viewTo-1)),!0);he=null,Ce=0}else for(be=he;;be=be.parentNode){if(!be||be==re.display.lineDiv)return null;if(be.parentNode&&be.parentNode==re.display.lineDiv)break}for(var Oe=0;Oe<re.display.view.length;Oe++){var $e=re.display.view[Oe];if($e.node==be)return am($e,he,Ce)}}function am(re,he,Ce){var be=re.text.firstChild,Oe=!1;if(!he||!Ye(be,he))return Gc(ln(jt(re.line),0),!0);if(he==be&&(Oe=!0,he=be.childNodes[Ce],Ce=0,!he)){var $e=re.rest?mt(re.rest):re.line;return Gc(ln(jt($e),$e.text.length),Oe)}var gt=he.nodeType==3?he:null,Lt=he;for(!gt&&he.childNodes.length==1&&he.firstChild.nodeType==3&&(gt=he.firstChild,Ce&&(Ce=gt.nodeValue.length));Lt.parentNode!=be;)Lt=Lt.parentNode;var kt=re.measure,It=kt.maps;function nn(Cr,Ir,ni){for(var Zr=-1;Zr<(It?It.length:0);Zr++)for(var ci=Zr<0?kt.map:It[Zr],Ii=0;Ii<ci.length;Ii+=3){var Kr=ci[Ii+2];if(Kr==Cr||Kr==Ir){var $i=jt(Zr<0?re.line:re.rest[Zr]),Xo=ci[Ii]+ni;return(ni<0||Kr!=Cr)&&(Xo=ci[Ii+(ni?1:0)]),ln($i,Xo)}}}var _t=nn(gt,Lt,Ce);if(_t)return Gc(_t,Oe);for(var xn=Lt.nextSibling,mn=gt?gt.nodeValue.length-Ce:0;xn;xn=xn.nextSibling){if(_t=nn(xn,xn.firstChild,0),_t)return Gc(ln(_t.line,_t.ch-mn),Oe);mn+=xn.textContent.length}for(var ur=Lt.previousSibling,gr=Ce;ur;ur=ur.previousSibling){if(_t=nn(ur,ur.firstChild,-1),_t)return Gc(ln(_t.line,_t.ch+gr),Oe);gr+=ur.textContent.length}}var Ta=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new rt,this.hasSelection=!1,this.composing=null};Ta.prototype.init=function(re){var he=this,Ce=this,be=this.cm;this.createField(re);var Oe=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),fe&&(Oe.style.width="0px"),Kt(Oe,"input",function(){Re&&de>=9&&he.hasSelection&&(he.hasSelection=null),Ce.poll()}),Kt(Oe,"paste",function(gt){cn(be,gt)||Dp(gt,be)||(be.state.pasteIncoming=+new Date,Ce.fastPoll())});function $e(gt){if(!cn(be,gt)){if(be.somethingSelected())tc({lineWise:!1,text:be.getSelections()});else if(be.options.lineWiseCopyCut){var Lt=Ip(be);tc({lineWise:!0,text:Lt.text}),gt.type=="cut"?be.setSelections(Lt.ranges,null,ct):(Ce.prevInput="",Oe.value=Lt.text.join(`
|
|
`),lt(Oe))}else return;gt.type=="cut"&&(be.state.cutIncoming=+new Date)}}Kt(Oe,"cut",$e),Kt(Oe,"copy",$e),Kt(re.scroller,"paste",function(gt){if(!(jo(re,gt)||cn(be,gt))){if(!Oe.dispatchEvent){be.state.pasteIncoming=+new Date,Ce.focus();return}var Lt=new Event("paste");Lt.clipboardData=gt.clipboardData,Oe.dispatchEvent(Lt)}}),Kt(re.lineSpace,"selectstart",function(gt){jo(re,gt)||In(gt)}),Kt(Oe,"compositionstart",function(){var gt=be.getCursor("from");Ce.composing&&Ce.composing.range.clear(),Ce.composing={start:gt,range:be.markText(gt,be.getCursor("to"),{className:"CodeMirror-composing"})}}),Kt(Oe,"compositionend",function(){Ce.composing&&(Ce.poll(),Ce.composing.range.clear(),Ce.composing=null)})},Ta.prototype.createField=function(re){this.wrapper=_p(),this.textarea=this.wrapper.firstChild},Ta.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},Ta.prototype.prepareSelection=function(){var re=this.cm,he=re.display,Ce=re.doc,be=au(re);if(re.options.moveInputWithCursor){var Oe=Wi(re,Ce.sel.primary().head,"div"),$e=he.wrapper.getBoundingClientRect(),gt=he.lineDiv.getBoundingClientRect();be.teTop=Math.max(0,Math.min(he.wrapper.clientHeight-10,Oe.top+gt.top-$e.top)),be.teLeft=Math.max(0,Math.min(he.wrapper.clientWidth-10,Oe.left+gt.left-$e.left))}return be},Ta.prototype.showSelection=function(re){var he=this.cm,Ce=he.display;Te(Ce.cursorDiv,re.cursors),Te(Ce.selectionDiv,re.selection),re.teTop!=null&&(this.wrapper.style.top=re.teTop+"px",this.wrapper.style.left=re.teLeft+"px")},Ta.prototype.reset=function(re){if(!(this.contextMenuPending||this.composing)){var he=this.cm;if(he.somethingSelected()){this.prevInput="";var Ce=he.getSelection();this.textarea.value=Ce,he.state.focused&<(this.textarea),Re&&de>=9&&(this.hasSelection=Ce)}else re||(this.prevInput=this.textarea.value="",Re&&de>=9&&(this.hasSelection=null))}},Ta.prototype.getField=function(){return this.textarea},Ta.prototype.supportsTouch=function(){return!1},Ta.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!te||Ve()!=this.textarea))try{this.textarea.focus()}catch(re){}},Ta.prototype.blur=function(){this.textarea.blur()},Ta.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ta.prototype.receivedFocus=function(){this.slowPoll()},Ta.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},Ta.prototype.fastPoll=function(){var re=!1,he=this;he.pollingFast=!0;function Ce(){var be=he.poll();!be&&!re?(re=!0,he.polling.set(60,Ce)):(he.pollingFast=!1,he.slowPoll())}he.polling.set(20,Ce)},Ta.prototype.poll=function(){var re=this,he=this.cm,Ce=this.textarea,be=this.prevInput;if(this.contextMenuPending||!he.state.focused||Qe(Ce)&&!be&&!this.composing||he.isReadOnly()||he.options.disableInput||he.state.keySeq)return!1;var Oe=Ce.value;if(Oe==be&&!he.somethingSelected())return!1;if(Re&&de>=9&&this.hasSelection===Oe||se&&/[\uf700-\uf7ff]/.test(Oe))return he.display.input.reset(),!1;if(he.doc.sel==he.display.selForContextMenu){var $e=Oe.charCodeAt(0);if($e==8203&&!be&&(be="\u200B"),$e==8666)return this.reset(),this.cm.execCommand("undo")}for(var gt=0,Lt=Math.min(be.length,Oe.length);gt<Lt&&be.charCodeAt(gt)==Oe.charCodeAt(gt);)++gt;return So(he,function(){Tf(he,Oe.slice(gt),be.length-gt,null,re.composing?"*compose":null),Oe.length>1e3||Oe.indexOf(`
|
|
`)>-1?Ce.value=re.prevInput="":re.prevInput=Oe,re.composing&&(re.composing.range.clear(),re.composing.range=he.markText(re.composing.start,he.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ta.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ta.prototype.onKeyPress=function(){Re&&de>=9&&(this.hasSelection=null),this.fastPoll()},Ta.prototype.onContextMenu=function(re){var he=this,Ce=he.cm,be=Ce.display,Oe=he.textarea;he.contextMenuPending&&he.contextMenuPending();var $e=Ga(Ce,re),gt=be.scroller.scrollTop;if(!$e||Se)return;var Lt=Ce.options.resetSelectionOnContextMenu;Lt&&Ce.doc.sel.contains($e)==-1&&Da(Ce,ps)(Ce.doc,Ru($e),ct);var kt=Oe.style.cssText,It=he.wrapper.style.cssText,nn=he.wrapper.offsetParent.getBoundingClientRect();he.wrapper.style.cssText="position: static",Oe.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(re.clientY-nn.top-5)+"px; left: "+(re.clientX-nn.left-5)+`px;
|
|
z-index: 1000; background: `+(Re?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var _t;ve&&(_t=window.scrollY),be.input.focus(),ve&&window.scrollTo(null,_t),be.input.reset(),Ce.somethingSelected()||(Oe.value=he.prevInput=" "),he.contextMenuPending=mn,be.selForContextMenu=Ce.doc.sel,clearTimeout(be.detectingSelectAll);function xn(){if(Oe.selectionStart!=null){var gr=Ce.somethingSelected(),Cr="\u200B"+(gr?Oe.value:"");Oe.value="\u21DA",Oe.value=Cr,he.prevInput=gr?"":"\u200B",Oe.selectionStart=1,Oe.selectionEnd=Cr.length,be.selForContextMenu=Ce.doc.sel}}function mn(){if(he.contextMenuPending==mn&&(he.contextMenuPending=!1,he.wrapper.style.cssText=It,Oe.style.cssText=kt,Re&&de<9&&be.scrollbars.setScrollTop(be.scroller.scrollTop=gt),Oe.selectionStart!=null)){(!Re||Re&&de<9)&&xn();var gr=0,Cr=function(){be.selForContextMenu==Ce.doc.sel&&Oe.selectionStart==0&&Oe.selectionEnd>0&&he.prevInput=="\u200B"?Da(Ce,Sa)(Ce):gr++<10?be.detectingSelectAll=setTimeout(Cr,500):(be.selForContextMenu=null,be.input.reset())};be.detectingSelectAll=setTimeout(Cr,200)}}if(Re&&de>=9&&xn(),xe){qr(re);var ur=function(){hn(window,"mouseup",ur),setTimeout(mn,20)};Kt(window,"mouseup",ur)}else setTimeout(mn,50)},Ta.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},Ta.prototype.setUneditable=function(){},Ta.prototype.needsContentAttribute=!1;function sm(re,he){if(he=he?St(he):{},he.value=re.value,!he.tabindex&&re.tabIndex&&(he.tabindex=re.tabIndex),!he.placeholder&&re.placeholder&&(he.placeholder=re.placeholder),he.autofocus==null){var Ce=Ve();he.autofocus=Ce==re||re.getAttribute("autofocus")!=null&&Ce==document.body}function be(){re.value=Lt.getValue()}var Oe;if(re.form&&(Kt(re.form,"submit",be),!he.leaveSubmitMethodAlone)){var $e=re.form;Oe=$e.submit;try{var gt=$e.submit=function(){be(),$e.submit=Oe,$e.submit(),$e.submit=gt}}catch(kt){}}he.finishInit=function(kt){kt.save=be,kt.getTextArea=function(){return re},kt.toTextArea=function(){kt.toTextArea=isNaN,be(),re.parentNode.removeChild(kt.getWrapperElement()),re.style.display="",re.form&&(hn(re.form,"submit",be),!he.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=Oe))}},re.style.display="none";var Lt=vo(function(kt){return re.parentNode.insertBefore(kt,re.nextSibling)},he);return Lt}function Hc(re){re.off=hn,re.on=Kt,re.wheelEventPixels=ol,re.Doc=as,re.splitLines=mi,re.countColumn=qe,re.findColumn=Mt,re.isWordChar=Xe,re.Pass=bt,re.signal=on,re.Line=ui,re.changeEnd=hh,re.scrollbarModel=lu,re.Pos=ln,re.cmpPos=fn,re.modes=Er,re.mimeModes=kr,re.resolveMode=Kn,re.getMode=Qt,re.modeExtensions=Wt,re.extendMode=zt,re.copyState=Nn,re.startState=vr,re.innerMode=Vn,re.commands=ph,re.keyMap=Ws,re.keyName=qg,re.isModifierKey=Dc,re.lookupKey=yl,re.normalizeKeyMap=wp,re.StringStream=yn,re.SharedTextMarker=cu,re.TextMarker=Jt,re.LineWidget=Gu,re.e_preventDefault=In,re.e_stopPropagation=_r,re.e_stop=qr,re.addClass=Ze,re.contains=Ye,re.rmClass=De,re.keyNames=fu}im(vo),mh(vo);var Uu="iter insert remove copy getEditor constructor".split(" ");for(var Nf in as.prototype)as.prototype.hasOwnProperty(Nf)&&wt(Uu,Nf)<0&&(vo.prototype[Nf]=function(re){return function(){return re.apply(this.doc,arguments)}}(as.prototype[Nf]));return kn(as),vo.inputStyles={textarea:Ta,contenteditable:Do},vo.defineMode=function(re){!vo.defaults.mode&&re!="null"&&(vo.defaults.mode=re),Hi.apply(this,arguments)},vo.defineMIME=pr,vo.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),vo.defineMIME("text/plain","null"),vo.defineExtension=function(re,he){vo.prototype[re]=he},vo.defineDocExtension=function(re,he){as.prototype[re]=he},vo.fromTextArea=sm,Hc(vo),vo.version="5.58.2",vo})},25419:function(Dn,jn,pt){(function(at){at(pt(89780),pt(15525),pt(98101))})(function(at){"use strict";at.defineMode("markdown",function(Ut,oe){var He=at.getMode(Ut,"text/html"),Re=He.name=="null";function de(qe){if(at.findModeByName){var rt=at.findModeByName(qe);rt&&(qe=rt.mime||rt.mimes[0])}var wt=at.getMode(Ut,qe);return wt.name=="null"?null:wt}oe.highlightFormatting===void 0&&(oe.highlightFormatting=!1),oe.maxBlockquoteDepth===void 0&&(oe.maxBlockquoteDepth=0),oe.taskLists===void 0&&(oe.taskLists=!1),oe.strikethrough===void 0&&(oe.strikethrough=!1),oe.emoji===void 0&&(oe.emoji=!1),oe.fencedCodeBlockHighlighting===void 0&&(oe.fencedCodeBlockHighlighting=!0),oe.fencedCodeBlockDefaultMode===void 0&&(oe.fencedCodeBlockDefaultMode="text/plain"),oe.xml===void 0&&(oe.xml=!0),oe.tokenTypeOverrides===void 0&&(oe.tokenTypeOverrides={});var ve={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 Ee in ve)ve.hasOwnProperty(Ee)&&oe.tokenTypeOverrides[Ee]&&(ve[Ee]=oe.tokenTypeOverrides[Ee]);var ke=/^([*\-_])(?:\s*\1){2,}\s*$/,Se=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ae=/^\[(x| )\](?=\s)/i,me=oe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Pe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,fe=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,te=/^\s*\[[^\]]+?\]:.*$/,se=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ie=" ";function le(qe,rt,wt){return rt.f=rt.inline=wt,wt(qe,rt)}function ce(qe,rt,wt){return rt.f=rt.block=wt,wt(qe,rt)}function pe(qe){return!qe||!/\S/.test(qe.string)}function xe(qe){if(qe.linkTitle=!1,qe.linkHref=!1,qe.linkText=!1,qe.em=!1,qe.strong=!1,qe.strikethrough=!1,qe.quote=0,qe.indentedCode=!1,qe.f==De){var rt=Re;if(!rt){var wt=at.innerMode(He,qe.htmlState);rt=wt.mode.name=="xml"&&wt.state.tagStart===null&&!wt.state.context&&wt.state.tokenize.isInText}rt&&(qe.f=Be,qe.block=je,qe.htmlState=null)}return qe.trailingSpace=0,qe.trailingSpaceNewLine=!1,qe.prevLine=qe.thisLine,qe.thisLine={stream:null},null}function je(qe,rt){var wt=qe.column()===rt.indentation,Ct=pe(rt.prevLine.stream),bt=rt.indentedCode,ct=rt.prevLine.hr,xt=rt.list!==!1,dt=(rt.listStack[rt.listStack.length-1]||0)+3;rt.indentedCode=!1;var Mt=rt.indentation;if(rt.indentationDiff===null&&(rt.indentationDiff=rt.indentation,xt)){for(rt.list=null;Mt<rt.listStack[rt.listStack.length-1];)rt.listStack.pop(),rt.listStack.length?rt.indentation=rt.listStack[rt.listStack.length-1]:rt.list=!1;rt.list!==!1&&(rt.indentationDiff=Mt-rt.listStack[rt.listStack.length-1])}var yt=!Ct&&!ct&&!rt.prevLine.header&&(!xt||!bt)&&!rt.prevLine.fencedCodeEnd,Dt=(rt.list===!1||ct||Ct)&&rt.indentation<=dt&&qe.match(ke),mt=null;if(rt.indentationDiff>=4&&(bt||rt.prevLine.fencedCodeEnd||rt.prevLine.header||Ct))return qe.skipToEnd(),rt.indentedCode=!0,ve.code;if(qe.eatSpace())return null;if(wt&&rt.indentation<=dt&&(mt=qe.match(me))&&mt[1].length<=6)return rt.quote=0,rt.header=mt[1].length,rt.thisLine.header=!0,oe.highlightFormatting&&(rt.formatting="header"),rt.f=rt.inline,Te(rt);if(rt.indentation<=dt&&qe.eat(">"))return rt.quote=wt?1:rt.quote+1,oe.highlightFormatting&&(rt.formatting="quote"),qe.eatSpace(),Te(rt);if(!Dt&&!rt.setext&&wt&&rt.indentation<=dt&&(mt=qe.match(Se))){var vt=mt[1]?"ol":"ul";return rt.indentation=Mt+qe.current().length,rt.list=!0,rt.quote=0,rt.listStack.push(rt.indentation),rt.em=!1,rt.strong=!1,rt.code=!1,rt.strikethrough=!1,oe.taskLists&&qe.match(Ae,!1)&&(rt.taskList=!0),rt.f=rt.inline,oe.highlightFormatting&&(rt.formatting=["list","list-"+vt]),Te(rt)}else{if(wt&&rt.indentation<=dt&&(mt=qe.match(z,!0)))return rt.quote=0,rt.fencedEndRE=new RegExp(mt[1]+"+ *$"),rt.localMode=oe.fencedCodeBlockHighlighting&&de(mt[2]||oe.fencedCodeBlockDefaultMode),rt.localMode&&(rt.localState=at.startState(rt.localMode)),rt.f=rt.block=Fe,oe.highlightFormatting&&(rt.formatting="code-block"),rt.code=-1,Te(rt);if(rt.setext||(!yt||!xt)&&!rt.quote&&rt.list===!1&&!rt.code&&!Dt&&!te.test(qe.string)&&(mt=qe.lookAhead(1))&&(mt=mt.match(Pe)))return rt.setext?(rt.header=rt.setext,rt.setext=0,qe.skipToEnd(),oe.highlightFormatting&&(rt.formatting="header")):(rt.header=mt[0].charAt(0)=="="?1:2,rt.setext=rt.header),rt.thisLine.header=!0,rt.f=rt.inline,Te(rt);if(Dt)return qe.skipToEnd(),rt.hr=!0,rt.thisLine.hr=!0,ve.hr;if(qe.peek()==="[")return le(qe,rt,ot)}return le(qe,rt,rt.inline)}function De(qe,rt){var wt=He.token(qe,rt.htmlState);if(!Re){var Ct=at.innerMode(He,rt.htmlState);(Ct.mode.name=="xml"&&Ct.state.tagStart===null&&!Ct.state.context&&Ct.state.tokenize.isInText||rt.md_inside&&qe.current().indexOf(">")>-1)&&(rt.f=Be,rt.block=je,rt.htmlState=null)}return wt}function Fe(qe,rt){var wt=rt.listStack[rt.listStack.length-1]||0,Ct=rt.indentation<wt,bt=wt+3;if(rt.fencedEndRE&&rt.indentation<=bt&&(Ct||qe.match(rt.fencedEndRE))){oe.highlightFormatting&&(rt.formatting="code-block");var ct;return Ct||(ct=Te(rt)),rt.localMode=rt.localState=null,rt.block=je,rt.f=Be,rt.fencedEndRE=null,rt.code=0,rt.thisLine.fencedCodeEnd=!0,Ct?ce(qe,rt,rt.block):ct}else return rt.localMode?rt.localMode.token(qe,rt.localState):(qe.skipToEnd(),ve.code)}function Te(qe){var rt=[];if(qe.formatting){rt.push(ve.formatting),typeof qe.formatting=="string"&&(qe.formatting=[qe.formatting]);for(var wt=0;wt<qe.formatting.length;wt++)rt.push(ve.formatting+"-"+qe.formatting[wt]),qe.formatting[wt]==="header"&&rt.push(ve.formatting+"-"+qe.formatting[wt]+"-"+qe.header),qe.formatting[wt]==="quote"&&(!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=qe.quote?rt.push(ve.formatting+"-"+qe.formatting[wt]+"-"+qe.quote):rt.push("error"))}if(qe.taskOpen)return rt.push("meta"),rt.length?rt.join(" "):null;if(qe.taskClosed)return rt.push("property"),rt.length?rt.join(" "):null;if(qe.linkHref?rt.push(ve.linkHref,"url"):(qe.strong&&rt.push(ve.strong),qe.em&&rt.push(ve.em),qe.strikethrough&&rt.push(ve.strikethrough),qe.emoji&&rt.push(ve.emoji),qe.linkText&&rt.push(ve.linkText),qe.code&&rt.push(ve.code),qe.image&&rt.push(ve.image),qe.imageAltText&&rt.push(ve.imageAltText,"link"),qe.imageMarker&&rt.push(ve.imageMarker)),qe.header&&rt.push(ve.header,ve.header+"-"+qe.header),qe.quote&&(rt.push(ve.quote),!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=qe.quote?rt.push(ve.quote+"-"+qe.quote):rt.push(ve.quote+"-"+oe.maxBlockquoteDepth)),qe.list!==!1){var Ct=(qe.listStack.length-1)%3;Ct?Ct===1?rt.push(ve.list2):rt.push(ve.list3):rt.push(ve.list1)}return qe.trailingSpaceNewLine?rt.push("trailing-space-new-line"):qe.trailingSpace&&rt.push("trailing-space-"+(qe.trailingSpace%2?"a":"b")),rt.length?rt.join(" "):null}function Me(qe,rt){if(qe.match(fe,!0))return Te(rt)}function Be(qe,rt){var wt=rt.text(qe,rt);if(typeof wt!="undefined")return wt;if(rt.list)return rt.list=null,Te(rt);if(rt.taskList){var Ct=qe.match(Ae,!0)[1]===" ";return Ct?rt.taskOpen=!0:rt.taskClosed=!0,oe.highlightFormatting&&(rt.formatting="task"),rt.taskList=!1,Te(rt)}if(rt.taskOpen=!1,rt.taskClosed=!1,rt.header&&qe.match(/^#+$/,!0))return oe.highlightFormatting&&(rt.formatting="header"),Te(rt);var bt=qe.next();if(rt.linkTitle){rt.linkTitle=!1;var ct=bt;bt==="("&&(ct=")"),ct=(ct+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var xt="^\\s*(?:[^"+ct+"\\\\]+|\\\\\\\\|\\\\.)"+ct;if(qe.match(new RegExp(xt),!0))return ve.linkHref}if(bt==="`"){var dt=rt.formatting;oe.highlightFormatting&&(rt.formatting="code"),qe.eatWhile("`");var Mt=qe.current().length;if(rt.code==0&&(!rt.quote||Mt==1))return rt.code=Mt,Te(rt);if(Mt==rt.code){var yt=Te(rt);return rt.code=0,yt}else return rt.formatting=dt,Te(rt)}else if(rt.code)return Te(rt);if(bt==="\\"&&(qe.next(),oe.highlightFormatting)){var Dt=Te(rt),mt=ve.formatting+"-escape";return Dt?Dt+" "+mt:mt}if(bt==="!"&&qe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return rt.imageMarker=!0,rt.image=!0,oe.highlightFormatting&&(rt.formatting="image"),Te(rt);if(bt==="["&&rt.imageMarker&&qe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return rt.imageMarker=!1,rt.imageAltText=!0,oe.highlightFormatting&&(rt.formatting="image"),Te(rt);if(bt==="]"&&rt.imageAltText){oe.highlightFormatting&&(rt.formatting="image");var Dt=Te(rt);return rt.imageAltText=!1,rt.image=!1,rt.inline=rt.f=Ye,Dt}if(bt==="["&&!rt.image)return rt.linkText&&qe.match(/^.*?\]/)||(rt.linkText=!0,oe.highlightFormatting&&(rt.formatting="link")),Te(rt);if(bt==="]"&&rt.linkText){oe.highlightFormatting&&(rt.formatting="link");var Dt=Te(rt);return rt.linkText=!1,rt.inline=rt.f=qe.match(/\(.*?\)| ?\[.*?\]/,!1)?Ye:Be,Dt}if(bt==="<"&&qe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=Ue,oe.highlightFormatting&&(rt.formatting="link");var Dt=Te(rt);return Dt?Dt+=" ":Dt="",Dt+ve.linkInline}if(bt==="<"&&qe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=Ue,oe.highlightFormatting&&(rt.formatting="link");var Dt=Te(rt);return Dt?Dt+=" ":Dt="",Dt+ve.linkEmail}if(oe.xml&&bt==="<"&&qe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var vt=qe.string.indexOf(">",qe.pos);if(vt!=-1){var et=qe.string.substring(qe.start,vt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(et)&&(rt.md_inside=!0)}return qe.backUp(1),rt.htmlState=at.startState(He),ce(qe,rt,De)}if(oe.xml&&bt==="<"&&qe.match(/^\/\w*?>/))return rt.md_inside=!1,"tag";if(bt==="*"||bt==="_"){for(var We=1,we=qe.pos==1?" ":qe.string.charAt(qe.pos-2);We<3&&qe.eat(bt);)We++;var Ne=qe.peek()||" ",Xe=!/\s/.test(Ne)&&(!se.test(Ne)||/\s/.test(we)||se.test(we)),nt=!/\s/.test(we)&&(!se.test(we)||/\s/.test(Ne)||se.test(Ne)),Ie=null,_e=null;if(We%2&&(!rt.em&&Xe&&(bt==="*"||!nt||se.test(we))?Ie=!0:rt.em==bt&&nt&&(bt==="*"||!Xe||se.test(Ne))&&(Ie=!1)),We>1&&(!rt.strong&&Xe&&(bt==="*"||!nt||se.test(we))?_e=!0:rt.strong==bt&&nt&&(bt==="*"||!Xe||se.test(Ne))&&(_e=!1)),_e!=null||Ie!=null){oe.highlightFormatting&&(rt.formatting=Ie==null?"strong":_e==null?"em":"strong em"),Ie===!0&&(rt.em=bt),_e===!0&&(rt.strong=bt);var yt=Te(rt);return Ie===!1&&(rt.em=!1),_e===!1&&(rt.strong=!1),yt}}else if(bt===" "&&(qe.eat("*")||qe.eat("_"))){if(qe.peek()===" ")return Te(rt);qe.backUp(1)}if(oe.strikethrough){if(bt==="~"&&qe.eatWhile(bt)){if(rt.strikethrough){oe.highlightFormatting&&(rt.formatting="strikethrough");var yt=Te(rt);return rt.strikethrough=!1,yt}else if(qe.match(/^[^\s]/,!1))return rt.strikethrough=!0,oe.highlightFormatting&&(rt.formatting="strikethrough"),Te(rt)}else if(bt===" "&&qe.match(/^~~/,!0)){if(qe.peek()===" ")return Te(rt);qe.backUp(2)}}if(oe.emoji&&bt===":"&&qe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){rt.emoji=!0,oe.highlightFormatting&&(rt.formatting="emoji");var Ge=Te(rt);return rt.emoji=!1,Ge}return bt===" "&&(qe.match(/^ +$/,!1)?rt.trailingSpace++:rt.trailingSpace&&(rt.trailingSpaceNewLine=!0)),Te(rt)}function Ue(qe,rt){var wt=qe.next();if(wt===">"){rt.f=rt.inline=Be,oe.highlightFormatting&&(rt.formatting="link");var Ct=Te(rt);return Ct?Ct+=" ":Ct="",Ct+ve.linkInline}return qe.match(/^[^>]+/,!0),ve.linkInline}function Ye(qe,rt){if(qe.eatSpace())return null;var wt=qe.next();return wt==="("||wt==="["?(rt.f=rt.inline=Ze(wt==="("?")":"]"),oe.highlightFormatting&&(rt.formatting="link-string"),rt.linkHref=!0,Te(rt)):"error"}var Ve={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ze(qe){return function(rt,wt){var Ct=rt.next();if(Ct===qe){wt.f=wt.inline=Be,oe.highlightFormatting&&(wt.formatting="link-string");var bt=Te(wt);return wt.linkHref=!1,bt}return rt.match(Ve[qe]),wt.linkHref=!0,Te(wt)}}function ot(qe,rt){return qe.match(/^([^\]\\]|\\.)*\]:/,!1)?(rt.f=lt,qe.next(),oe.highlightFormatting&&(rt.formatting="link"),rt.linkText=!0,Te(rt)):le(qe,rt,Be)}function lt(qe,rt){if(qe.match(/^\]:/,!0)){rt.f=rt.inline=ft,oe.highlightFormatting&&(rt.formatting="link");var wt=Te(rt);return rt.linkText=!1,wt}return qe.match(/^([^\]\\]|\\.)+/,!0),ve.linkText}function ft(qe,rt){return qe.eatSpace()?null:(qe.match(/^[^\s]+/,!0),qe.peek()===void 0?rt.linkTitle=!0:qe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),rt.f=rt.inline=Be,ve.linkHref+" url")}var St={startState:function(){return{f:je,prevLine:{stream:null},thisLine:{stream:null},block:je,htmlState:null,indentation:0,inline:Be,text:Me,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(qe){return{f:qe.f,prevLine:qe.prevLine,thisLine:qe.thisLine,block:qe.block,htmlState:qe.htmlState&&at.copyState(He,qe.htmlState),indentation:qe.indentation,localMode:qe.localMode,localState:qe.localMode?at.copyState(qe.localMode,qe.localState):null,inline:qe.inline,text:qe.text,formatting:!1,linkText:qe.linkText,linkTitle:qe.linkTitle,linkHref:qe.linkHref,code:qe.code,em:qe.em,strong:qe.strong,strikethrough:qe.strikethrough,emoji:qe.emoji,header:qe.header,setext:qe.setext,hr:qe.hr,taskList:qe.taskList,list:qe.list,listStack:qe.listStack.slice(0),quote:qe.quote,indentedCode:qe.indentedCode,trailingSpace:qe.trailingSpace,trailingSpaceNewLine:qe.trailingSpaceNewLine,md_inside:qe.md_inside,fencedEndRE:qe.fencedEndRE}},token:function(qe,rt){if(rt.formatting=!1,qe!=rt.thisLine.stream){if(rt.header=0,rt.hr=!1,qe.match(/^\s*$/,!0))return xe(rt),null;if(rt.prevLine=rt.thisLine,rt.thisLine={stream:qe},rt.taskList=!1,rt.trailingSpace=0,rt.trailingSpaceNewLine=!1,!rt.localState&&(rt.f=rt.block,rt.f!=De)){var wt=qe.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(rt.indentation=wt,rt.indentationDiff=null,wt>0)return null}}return rt.f(qe,rt)},innerMode:function(qe){return qe.block==De?{state:qe.htmlState,mode:He}:qe.localState?{state:qe.localState,mode:qe.localMode}:{state:qe,mode:St}},indent:function(qe,rt,wt){return qe.block==De&&He.indent?He.indent(qe.htmlState,rt,wt):qe.localState&&qe.localMode.indent?qe.localMode.indent(qe.localState,rt,wt):at.Pass},blankLine:xe,getType:Te,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return St},"xml"),at.defineMIME("text/markdown","markdown"),at.defineMIME("text/x-markdown","markdown")})},98101:function(Dn,jn,pt){(function(at){at(pt(89780))})(function(at){"use strict";at.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 Ut=0;Ut<at.modeInfo.length;Ut++){var oe=at.modeInfo[Ut];oe.mimes&&(oe.mime=oe.mimes[0])}at.findModeByMIME=function(He){He=He.toLowerCase();for(var Re=0;Re<at.modeInfo.length;Re++){var de=at.modeInfo[Re];if(de.mime==He)return de;if(de.mimes){for(var ve=0;ve<de.mimes.length;ve++)if(de.mimes[ve]==He)return de}}if(/\+xml$/.test(He))return at.findModeByMIME("application/xml");if(/\+json$/.test(He))return at.findModeByMIME("application/json")},at.findModeByExtension=function(He){He=He.toLowerCase();for(var Re=0;Re<at.modeInfo.length;Re++){var de=at.modeInfo[Re];if(de.ext){for(var ve=0;ve<de.ext.length;ve++)if(de.ext[ve]==He)return de}}},at.findModeByFileName=function(He){for(var Re=0;Re<at.modeInfo.length;Re++){var de=at.modeInfo[Re];if(de.file&&de.file.test(He))return de}var ve=He.lastIndexOf("."),Ee=ve>-1&&He.substring(ve+1,He.length);if(Ee)return at.findModeByExtension(Ee)},at.findModeByName=function(He){He=He.toLowerCase();for(var Re=0;Re<at.modeInfo.length;Re++){var de=at.modeInfo[Re];if(de.name.toLowerCase()==He)return de;if(de.alias){for(var ve=0;ve<de.alias.length;ve++)if(de.alias[ve].toLowerCase()==He)return de}}}})},67549:function(Dn,jn,pt){(function(at){at(pt(89780))})(function(at){"use strict";at.defineMode("stex",function(Ut,oe){"use strict";function He(fe,z){fe.cmdState.push(z)}function Re(fe){return fe.cmdState.length>0?fe.cmdState[fe.cmdState.length-1]:null}function de(fe){var z=fe.cmdState.pop();z&&z.closeBracket()}function ve(fe){for(var z=fe.cmdState,te=z.length-1;te>=0;te--){var se=z[te];if(se.name!="DEFAULT")return se}return{styleIdentifier:function(){return null}}}function Ee(fe,z,te){return function(){this.name=fe,this.bracketNo=0,this.style=z,this.styles=te,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ke={};ke.importmodule=Ee("importmodule","tag",["string","builtin"]),ke.documentclass=Ee("documentclass","tag",["","atom"]),ke.usepackage=Ee("usepackage","tag",["atom"]),ke.begin=Ee("begin","tag",["atom"]),ke.end=Ee("end","tag",["atom"]),ke.label=Ee("label","tag",["atom"]),ke.ref=Ee("ref","tag",["atom"]),ke.eqref=Ee("eqref","tag",["atom"]),ke.cite=Ee("cite","tag",["atom"]),ke.bibitem=Ee("bibitem","tag",["atom"]),ke.Bibitem=Ee("Bibitem","tag",["atom"]),ke.RBibitem=Ee("RBibitem","tag",["atom"]),ke.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Se(fe,z){fe.f=z}function Ae(fe,z){var te;if(fe.match(/^\\[a-zA-Z@]+/)){var se=fe.current().slice(1);return te=ke.hasOwnProperty(se)?ke[se]:ke.DEFAULT,te=new te,He(z,te),Se(z,Pe),te.style}if(fe.match(/^\\[$&%#{}_]/)||fe.match(/^\\[,;!\/\\]/))return"tag";if(fe.match("\\["))return Se(z,function(le,ce){return me(le,ce,"\\]")}),"keyword";if(fe.match("\\("))return Se(z,function(le,ce){return me(le,ce,"\\)")}),"keyword";if(fe.match("$$"))return Se(z,function(le,ce){return me(le,ce,"$$")}),"keyword";if(fe.match("$"))return Se(z,function(le,ce){return me(le,ce,"$")}),"keyword";var ie=fe.next();if(ie=="%")return fe.skipToEnd(),"comment";if(ie=="}"||ie=="]"){if(te=Re(z),te)te.closeBracket(ie),Se(z,Pe);else return"error";return"bracket"}else return ie=="{"||ie=="["?(te=ke.DEFAULT,te=new te,He(z,te),"bracket"):/\d/.test(ie)?(fe.eatWhile(/[\w.%]/),"atom"):(fe.eatWhile(/[\w\-_]/),te=ve(z),te.name=="begin"&&(te.argument=fe.current()),te.styleIdentifier())}function me(fe,z,te){if(fe.eatSpace())return null;if(te&&fe.match(te))return Se(z,Ae),"keyword";if(fe.match(/^\\[a-zA-Z@]+/))return"tag";if(fe.match(/^[a-zA-Z]+/))return"variable-2";if(fe.match(/^\\[$&%#{}_]/)||fe.match(/^\\[,;!\/]/)||fe.match(/^[\^_&]/))return"tag";if(fe.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(fe.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var se=fe.next();return se=="{"||se=="}"||se=="["||se=="]"||se=="("||se==")"?"bracket":se=="%"?(fe.skipToEnd(),"comment"):"error"}function Pe(fe,z){var te=fe.peek(),se;return te=="{"||te=="["?(se=Re(z),se.openBracket(te),fe.eat(te),Se(z,Ae),"bracket"):/[ \t\r]/.test(te)?(fe.eat(te),null):(Se(z,Ae),de(z),Ae(fe,z))}return{startState:function(){var fe=oe.inMathMode?function(z,te){return me(z,te)}:Ae;return{cmdState:[],f:fe}},copyState:function(fe){return{cmdState:fe.cmdState.slice(),f:fe.f}},token:function(fe,z){return z.f(fe,z)},blankLine:function(fe){fe.f=Ae,fe.cmdState.length=0},lineComment:"%"}}),at.defineMIME("text/x-stex","stex"),at.defineMIME("text/x-latex","stex")})},15525:function(Dn,jn,pt){(function(at){at(pt(89780))})(function(at){"use strict";var Ut={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},oe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};at.defineMode("xml",function(He,Re){var de=He.indentUnit,ve={},Ee=Re.htmlMode?Ut:oe;for(var ke in Ee)ve[ke]=Ee[ke];for(var ke in Re)ve[ke]=Re[ke];var Se,Ae;function me(Ue,Ye){function Ve(lt){return Ye.tokenize=lt,lt(Ue,Ye)}var Ze=Ue.next();if(Ze=="<")return Ue.eat("!")?Ue.eat("[")?Ue.match("CDATA[")?Ve(z("atom","]]>")):null:Ue.match("--")?Ve(z("comment","-->")):Ue.match("DOCTYPE",!0,!0)?(Ue.eatWhile(/[\w\._\-]/),Ve(te(1))):null:Ue.eat("?")?(Ue.eatWhile(/[\w\._\-]/),Ye.tokenize=z("meta","?>"),"meta"):(Se=Ue.eat("/")?"closeTag":"openTag",Ye.tokenize=Pe,"tag bracket");if(Ze=="&"){var ot;return Ue.eat("#")?Ue.eat("x")?ot=Ue.eatWhile(/[a-fA-F\d]/)&&Ue.eat(";"):ot=Ue.eatWhile(/[\d]/)&&Ue.eat(";"):ot=Ue.eatWhile(/[\w\.\-:]/)&&Ue.eat(";"),ot?"atom":"error"}else return Ue.eatWhile(/[^&<]/),null}me.isInText=!0;function Pe(Ue,Ye){var Ve=Ue.next();if(Ve==">"||Ve=="/"&&Ue.eat(">"))return Ye.tokenize=me,Se=Ve==">"?"endTag":"selfcloseTag","tag bracket";if(Ve=="=")return Se="equals",null;if(Ve=="<"){Ye.tokenize=me,Ye.state=ce,Ye.tagName=Ye.tagStart=null;var Ze=Ye.tokenize(Ue,Ye);return Ze?Ze+" tag error":"tag error"}else return/[\'\"]/.test(Ve)?(Ye.tokenize=fe(Ve),Ye.stringStartCol=Ue.column(),Ye.tokenize(Ue,Ye)):(Ue.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function fe(Ue){var Ye=function(Ve,Ze){for(;!Ve.eol();)if(Ve.next()==Ue){Ze.tokenize=Pe;break}return"string"};return Ye.isInAttribute=!0,Ye}function z(Ue,Ye){return function(Ve,Ze){for(;!Ve.eol();){if(Ve.match(Ye)){Ze.tokenize=me;break}Ve.next()}return Ue}}function te(Ue){return function(Ye,Ve){for(var Ze;(Ze=Ye.next())!=null;){if(Ze=="<")return Ve.tokenize=te(Ue+1),Ve.tokenize(Ye,Ve);if(Ze==">")if(Ue==1){Ve.tokenize=me;break}else return Ve.tokenize=te(Ue-1),Ve.tokenize(Ye,Ve)}return"meta"}}function se(Ue,Ye,Ve){this.prev=Ue.context,this.tagName=Ye,this.indent=Ue.indented,this.startOfLine=Ve,(ve.doNotIndent.hasOwnProperty(Ye)||Ue.context&&Ue.context.noIndent)&&(this.noIndent=!0)}function ie(Ue){Ue.context&&(Ue.context=Ue.context.prev)}function le(Ue,Ye){for(var Ve;;){if(!Ue.context||(Ve=Ue.context.tagName,!ve.contextGrabbers.hasOwnProperty(Ve)||!ve.contextGrabbers[Ve].hasOwnProperty(Ye)))return;ie(Ue)}}function ce(Ue,Ye,Ve){return Ue=="openTag"?(Ve.tagStart=Ye.column(),pe):Ue=="closeTag"?xe:ce}function pe(Ue,Ye,Ve){return Ue=="word"?(Ve.tagName=Ye.current(),Ae="tag",Fe):ve.allowMissingTagName&&Ue=="endTag"?(Ae="tag bracket",Fe(Ue,Ye,Ve)):(Ae="error",pe)}function xe(Ue,Ye,Ve){if(Ue=="word"){var Ze=Ye.current();return Ve.context&&Ve.context.tagName!=Ze&&ve.implicitlyClosed.hasOwnProperty(Ve.context.tagName)&&ie(Ve),Ve.context&&Ve.context.tagName==Ze||ve.matchClosing===!1?(Ae="tag",je):(Ae="tag error",De)}else return ve.allowMissingTagName&&Ue=="endTag"?(Ae="tag bracket",je(Ue,Ye,Ve)):(Ae="error",De)}function je(Ue,Ye,Ve){return Ue!="endTag"?(Ae="error",je):(ie(Ve),ce)}function De(Ue,Ye,Ve){return Ae="error",je(Ue,Ye,Ve)}function Fe(Ue,Ye,Ve){if(Ue=="word")return Ae="attribute",Te;if(Ue=="endTag"||Ue=="selfcloseTag"){var Ze=Ve.tagName,ot=Ve.tagStart;return Ve.tagName=Ve.tagStart=null,Ue=="selfcloseTag"||ve.autoSelfClosers.hasOwnProperty(Ze)?le(Ve,Ze):(le(Ve,Ze),Ve.context=new se(Ve,Ze,ot==Ve.indented)),ce}return Ae="error",Fe}function Te(Ue,Ye,Ve){return Ue=="equals"?Me:(ve.allowMissing||(Ae="error"),Fe(Ue,Ye,Ve))}function Me(Ue,Ye,Ve){return Ue=="string"?Be:Ue=="word"&&ve.allowUnquoted?(Ae="string",Fe):(Ae="error",Fe(Ue,Ye,Ve))}function Be(Ue,Ye,Ve){return Ue=="string"?Be:Fe(Ue,Ye,Ve)}return{startState:function(Ue){var Ye={tokenize:me,state:ce,indented:Ue||0,tagName:null,tagStart:null,context:null};return Ue!=null&&(Ye.baseIndent=Ue),Ye},token:function(Ue,Ye){if(!Ye.tagName&&Ue.sol()&&(Ye.indented=Ue.indentation()),Ue.eatSpace())return null;Se=null;var Ve=Ye.tokenize(Ue,Ye);return(Ve||Se)&&Ve!="comment"&&(Ae=null,Ye.state=Ye.state(Se||Ve,Ue,Ye),Ae&&(Ve=Ae=="error"?Ve+" error":Ae)),Ve},indent:function(Ue,Ye,Ve){var Ze=Ue.context;if(Ue.tokenize.isInAttribute)return Ue.tagStart==Ue.indented?Ue.stringStartCol+1:Ue.indented+de;if(Ze&&Ze.noIndent)return at.Pass;if(Ue.tokenize!=Pe&&Ue.tokenize!=me)return Ve?Ve.match(/^(\s*)/)[0].length:0;if(Ue.tagName)return ve.multilineTagIndentPastTag!==!1?Ue.tagStart+Ue.tagName.length+2:Ue.tagStart+de*(ve.multilineTagIndentFactor||1);if(ve.alignCDATA&&/<!\[CDATA\[/.test(Ye))return 0;var ot=Ye&&/^<(\/)?([\w_:\.-]*)/.exec(Ye);if(ot&&ot[1])for(;Ze;)if(Ze.tagName==ot[2]){Ze=Ze.prev;break}else if(ve.implicitlyClosed.hasOwnProperty(Ze.tagName))Ze=Ze.prev;else break;else if(ot)for(;Ze;){var lt=ve.contextGrabbers[Ze.tagName];if(lt&<.hasOwnProperty(ot[2]))Ze=Ze.prev;else break}for(;Ze&&Ze.prev&&!Ze.startOfLine;)Ze=Ze.prev;return Ze?Ze.indent+de:Ue.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ve.htmlMode?"html":"xml",helperType:ve.htmlMode?"html":"xml",skipAttribute:function(Ue){Ue.state==Me&&(Ue.state=Fe)},xmlCurrentTag:function(Ue){return Ue.tagName?{name:Ue.tagName,close:Ue.type=="closeTag"}:null},xmlCurrentContext:function(Ue){for(var Ye=[],Ve=Ue.context;Ve;Ve=Ve.prev)Ve.tagName&&Ye.push(Ve.tagName);return Ye.reverse()}}}),at.defineMIME("text/xml","xml"),at.defineMIME("application/xml","xml"),at.mimeModes.hasOwnProperty("text/html")||at.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(Dn,jn,pt){"use strict";pt.d(jn,{$u:function(){return ke},BD:function(){return We},E9:function(){return Ee},FF:function(){return vi},FJ:function(){return ce},Hn:function(){return le},KX:function(){return xe},NB:function(){return ut},S0:function(){return mt},UL:function(){return Se},Vk:function(){return ie},Vm:function(){return Et},YI:function(){return vt},ZA:function(){return oe},Zt:function(){return Ae},al:function(){return Ie},bn:function(){return nt},bx:function(){return we},g2:function(){return et},h1:function(){return Me},hD:function(){return kn},l4:function(){return de},rU:function(){return Ot},s_:function(){return Ne},uz:function(){return ht},z6:function(){return me}}),Dn=pt.hmd(Dn),function(){var Qe;function ii(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Tr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:ii(a)}}function wr(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},kr;if(typeof Object.setPrototypeOf=="function")kr=Object.setPrototypeOf;else{var Hi;e:{var pr={a:!0},Kn={};try{Kn.__proto__=pr,Hi=Kn.a;break e}catch(a){}Hi=!1}kr=Hi?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Qt=kr;function Wt(a,y){if(a.prototype=Er(y.prototype),a.prototype.constructor=a,Qt)Qt(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var b=Object.getOwnPropertyDescriptor(y,x);b&&Object.defineProperty(a,x,b)}else a[x]=y[x];a.QA=y.prototype}var zt=typeof pt.g!="undefined"&&pt.g!=null?pt.g:self,Nn=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var b=arguments[x];if(b)for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(a[E]=b[E])}return a},Vn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function vr(a,y){if(y){var x=zt;a=a.split(".");for(var b=0;b<a.length-1;b++){var E=a[b];E in x||(x[E]={}),x=x[E]}a=a[a.length-1],b=x[a],y=y(b),y!=b&&y!=null&&Vn(x,a,{writable:!0,value:y})}}vr("Object.assign",function(a){return a||Nn}),vr("Array.prototype.fill",function(a){return a||function(y,x,b){var E=this.length||0;for(0>x&&(x=Math.max(0,E+x)),(b==null||b>E)&&(b=E),b=Number(b),0>b&&(b=Math.max(0,E+b)),x=Number(x||0);x<b;x++)this[x]=y;return this}});var yn=typeof globalThis=="object"&&globalThis||typeof pt.g=="object"&&pt.g.global===pt.g&&pt.g||typeof self=="object"&&self.self===self&&self||{};yn.requestAnimationFrame===void 0&&(yn.setImmediate===void 0?yn.requestAnimationFrame=function(a){yn.setTimeout(a,0)}:yn.requestAnimationFrame=yn.setImmediate);function zn(){}function Ht(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&yn.clearTimeout(x),x=Yt(function(){x=-1,a.apply(b,E)},y)}}function Yt(a,y){return yn.setTimeout(a,y)}function qn(a){return yn.document.createElement(a)}function jt(a){throw Error(a)}function un(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),jt(a)}function An(a,y,x,b){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",b!==void 0&&(x+="."+b),jt(x+" is not in the range "+y+": "+a)}function Yn(a){yn.console&&yn.console.log(a)}function ln(a){return typeof a=="object"&&a!==null}function fn(a){return Array.isArray(a)||yn.NodeList&&a instanceof yn.NodeList||yn.HTMLCollection&&a instanceof yn.HTMLCollection}function Hn(a){return Array.prototype.slice.call(a)}function tr(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):jt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Zn(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):jt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function ir(){var a=Mi.pop();return a===void 0?[]:a}function Un(a){a.length=0,Mi.push(a)}function dr(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(ln(a)&&a.constructor)return dr(a.constructor);return typeof a}function Fr(a){var y=a;return ln(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 Nr(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 Rr(a,y,x){Object.defineProperty(Ji.prototype,a,{get:y,set:x})}function gn(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var b=0,E=0;E<a.length;E+=2)x[b++]=y[a.substr(E,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=b=0;256>x;x++)b=(b+y[x]+119)%256,E=y[x],y[x]=y[b],y[b]=E;b=x=0;for(var ee="",ne=0;ne<a.length;ne++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,ee+=String.fromCharCode(a.charCodeAt(ne)^y[(y[x]+y[b])%256]);return ee.indexOf("GoJS 2.1 evaluation")>-1||ee.indexOf("\xA9 1998-2021 Northwoods Software")>-1||ee.indexOf("Not for distribution or production use")>-1||ee.indexOf("gojs.net")>-1?"":ee}var Fi=yn.navigator!==void 0&&0<yn.navigator.userAgent.indexOf("Trident/7"),ti=yn.navigator!==void 0&&yn.navigator.platform!==void 0&&yn.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Mi=[];Object.freeze([]),zn.className="Util",zn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",zn.adym="gojs.net",zn.vfo="28e645fdb266",zn.className="Util";function an(a,y,x){hr(this),this.j=a,this.xa=y,this.o=x}an.prototype.toString=function(){return"EnumValue."+this.xa};function Qn(a,y){return y==null||y===""?null:a[y]}zt.Object.defineProperties(an.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),an.className="EnumValue";function or(){this.ew=[]}or.prototype.toString=function(){return this.ew.join("")},or.prototype.add=function(a){a!==""&&this.ew.push(a)},or.className="StringBuilder";function yr(){}yr.className="PropertyCollection";var br={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){yn.console&&yn.console.log(a)},HA:function(a,y,x,b){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(b.left,b.top+20),a.lineTo(b.left,b.top),a.lineTo(b.left+20,b.top),a.moveTo(b.right,b.bottom-20),a.lineTo(b.right,b.bottom),a.lineTo(b.right-20,b.bottom),a.stroke(),a.fillText("DB: "+Math.round(b.x)+", "+Math.round(b.y)+", "+Math.round(b.width)+", "+Math.round(b.height),b.left,b.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var b=a[y.x];if(b.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(b.prototype);for(var E={Tj:0};E.Tj<y.Zl.length;E={Tj:E.Tj},E.Tj++){var ee=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);ee.get!==void 0&&ee.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(ne,ae){return function(){throw Error("Property "+ne.Zl[ae.Tj]+" of "+ne.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Ar(){}Ar.prototype.reset=function(){},Ar.prototype.next=function(){return!1},Ar.prototype.Ad=function(){return!1},Ar.prototype.first=function(){return null},Ar.prototype.any=function(){return!1},Ar.prototype.all=function(){return!0},Ar.prototype.each=function(){return this},Ar.prototype.map=function(){return this},Ar.prototype.filter=function(){return this},Ar.prototype.de=function(){},Ar.prototype.toString=function(){return"EmptyIterator"},zt.Object.defineProperties(Ar.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Ar.prototype.first=Ar.prototype.first,Ar.prototype.hasNext=Ar.prototype.Ad,Ar.prototype.next=Ar.prototype.next,Ar.prototype.reset=Ar.prototype.reset;var ri=null;Ar.className="EmptyIterator",ri=new Ar;function Yr(a){this.key=-1,this.value=a}Yr.prototype.reset=function(){this.key=-1},Yr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Yr.prototype.Ad=function(){return this.next()},Yr.prototype.first=function(){return this.key=0,this.value},Yr.prototype.any=function(a){return this.key=-1,a(this.value)},Yr.prototype.all=function(a){return this.key=-1,a(this.value)},Yr.prototype.each=function(a){return this.key=-1,a(this.value),this},Yr.prototype.map=function(a){return new Yr(a(this.value))},Yr.prototype.filter=function(a){return a(this.value)?new Yr(this.value):ri},Yr.prototype.de=function(){this.value=null},Yr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},zt.Object.defineProperties(Yr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Yr.prototype.first=Yr.prototype.first,Yr.prototype.hasNext=Yr.prototype.Ad,Yr.prototype.next=Yr.prototype.next,Yr.prototype.reset=Yr.prototype.reset,Yr.className="SingletonIterator";function Jr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Jr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Jr.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,b=this.qf;if(b!==null)for(;x<y;){var E=a[x];if(b(E))return this.key=this.Za=x,this.value=E,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},Jr.prototype.Ad=function(){return this.next()},Jr.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 b=0;b<y;){var E=a[b];if(x(E))return this.key=this.Za=b,this.value=E;b++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},Jr.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var ee=y[E];if((b===null||b(ee))&&a(ee))return!0}return!1},Jr.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var ee=y[E];if((b===null||b(ee))&&!a(ee))return!1}return!0},Jr.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var ee=y[E];(b===null||b(ee))&&a(ee)}return this},Jr.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,ee=0;ee<b;ee++){var ne=y[ee];(E===null||E(ne))&&x.push(a(ne))}return a=new rn,a.s=x,a.xb(),a.iterator},Jr.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,ee=0;ee<b;ee++){var ne=y[ee];(E===null||E(ne))&&a(ne)&&x.push(ne)}return a=new rn,a.s=x,a.xb(),a.iterator},Jr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Jr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},zt.Object.defineProperties(Jr.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,b=x.length,E=0;E<b;E++)a(x[E])&&y++;return y}return this.Bb.s.length}}}),Jr.prototype.first=Jr.prototype.first,Jr.prototype.hasNext=Jr.prototype.Ad,Jr.prototype.next=Jr.prototype.next,Jr.prototype.reset=Jr.prototype.reset,Jr.className="ListIterator";function sr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}sr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},sr.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)},sr.prototype.Ad=function(){return this.next()},sr.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},sr.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},sr.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},sr.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},sr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new rn,a.s=x,a.xb(),a.iterator},sr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new rn,a.s=x,a.xb(),a.iterator},sr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},sr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},zt.Object.defineProperties(sr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),sr.prototype.first=sr.prototype.first,sr.prototype.hasNext=sr.prototype.Ad,sr.prototype.next=sr.prototype.next,sr.prototype.reset=sr.prototype.reset,sr.className="ListIteratorBackwards";function rn(a){hr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&jt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Qe=rn.prototype,Qe.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return this._isFrozen=!1,this},Qe.toString=function(){return"List()#"+zr(this)},Qe.add=function(a){return a===null?this:(this._isFrozen&&un(this,a),this.s.push(a),this.xb(),this)},Qe.push=function(a){this.add(a)},Qe.addAll=function(a){if(a===null)return this;this._isFrozen&&un(this);var y=this.s;if(fn(a))for(var x=a.length,b=0;b<x;b++)y.push(a[b]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Qe.clear=function(){this._isFrozen&&un(this),this.s.length=0,this.xb()},Qe.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Qe.has=function(a){return this.contains(a)},Qe.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Qe.M=function(a){var y=this.s;return(0>a||a>=y.length)&&An(a,"0 <= i < length",rn,"elt:i"),y[a]},Qe.get=function(a){return this.M(a)},Qe.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&An(a,"0 <= i < length",rn,"setElt:i"),this._isFrozen&&un(this,a),x[a]=y},Qe.set=function(a,y){this.cd(a,y)},Qe.first=function(){var a=this.s;return a.length===0?null:a[0]},Qe.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Qe.pop=function(){this._isFrozen&&un(this);var a=this.s;return 0<a.length?a.pop():null},rn.prototype.any=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(a(y[b]))return!0;return!1},rn.prototype.all=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(!a(y[b]))return!1;return!0},rn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},rn.prototype.map=function(a){for(var y=new rn,x=[],b=this.s,E=b.length,ee=0;ee<E;ee++)x.push(a(b[ee]));return y.s=x,y.xb(),y},rn.prototype.filter=function(a){for(var y=new rn,x=[],b=this.s,E=b.length,ee=0;ee<E;ee++){var ne=b[ee];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},Qe=rn.prototype,Qe.Gb=function(a,y){0>a&&An(a,">= 0",rn,"insertAt:i"),this._isFrozen&&un(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Qe.remove=function(a){if(a===null)return!1;this._isFrozen&&un(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},Qe.delete=function(a){return this.remove(a)},Qe.mb=function(a){var y=this.s;(0>a||a>=y.length)&&An(a,"0 <= i < length",rn,"removeAt:i"),this._isFrozen&&un(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Qe.removeRange=function(a,y){var x=this.s,b=x.length;if(0>a)a=0;else if(a>=b)return this;if(0>y)return this;if(y>=b&&(y=b-1),a>y)return this;this._isFrozen&&un(this);for(var E=a,ee=y+1;ee<b;)x[E++]=x[ee++];return x.length=b-(y-a+1),this.xb(),this},rn.prototype.copy=function(){var a=new rn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Qe=rn.prototype,Qe.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},Qe.Iv=function(){for(var a=new sn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},Qe.sort=function(a){return this._isFrozen&&un(this),this.s.sort(a),this.xb(),this},Qe.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&un(this);var ee=x-y;if(1>=ee)return this;if((0>y||y>=E-1)&&An(y,"0 <= from < length",rn,"sortRange:from"),ee===2)return x=b[y],E=b[y+1],0<a(x,E)&&(b[y]=E,b[y+1]=x,this.xb()),this;if(y===0)if(x>=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a<x;a++)b[a]=y[a];else if(x>=E)for(x=b.slice(y),x.sort(a),a=y;a<E;a++)b[a]=x[a-y];else for(E=b.slice(y,x),E.sort(a),a=y;a<x;a++)b[a]=E[a-y];return this.xb(),this},Qe.reverse=function(){return this._isFrozen&&un(this),this.s.reverse(),this.xb(),this},zt.Object.defineProperties(rn.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 ri;var a=this.Sa;return a!==null?(a.reset(),a):new Jr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return ri;var a=this.Hg;return a!==null?(a.reset(),a):new sr(this)}}}),rn.prototype.reverse=rn.prototype.reverse,rn.prototype.sortRange=rn.prototype.zi,rn.prototype.sort=rn.prototype.sort,rn.prototype.toSet=rn.prototype.Iv,rn.prototype.toArray=rn.prototype.Fa,rn.prototype.removeRange=rn.prototype.removeRange,rn.prototype.removeAt=rn.prototype.mb,rn.prototype.delete=rn.prototype.delete,rn.prototype.remove=rn.prototype.remove,rn.prototype.insertAt=rn.prototype.Gb,rn.prototype.pop=rn.prototype.pop,rn.prototype.last=rn.prototype.jc,rn.prototype.first=rn.prototype.first,rn.prototype.set=rn.prototype.set,rn.prototype.setElt=rn.prototype.cd,rn.prototype.get=rn.prototype.get,rn.prototype.elt=rn.prototype.M,rn.prototype.indexOf=rn.prototype.indexOf,rn.prototype.has=rn.prototype.has,rn.prototype.contains=rn.prototype.contains,rn.prototype.clear=rn.prototype.clear,rn.prototype.addAll=rn.prototype.addAll,rn.prototype.push=rn.prototype.push,rn.prototype.add=rn.prototype.add,rn.prototype.thaw=rn.prototype.ka,rn.prototype.freeze=rn.prototype.freeze,rn.className="List";function nr(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}nr.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},nr.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)},nr.prototype.Ad=function(){return this.next()},nr.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},nr.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},nr.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},nr.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},nr.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new rn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},nr.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new rn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},nr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},nr.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},zt.Object.defineProperties(nr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),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="SetIterator";function sn(a){hr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&jt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Qe=sn.prototype,Qe.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return this._isFrozen=!1,this},Qe.toString=function(){return"Set()#"+zr(this)},Qe.add=function(a){if(a===null)return this;this._isFrozen&&un(this,a);var y=a;return ln(a)&&(y=Pr(a)),this.Tb[y]===void 0&&(this.Sb++,a=new en(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},Qe.addAll=function(a){if(a===null)return this;if(this._isFrozen&&un(this),fn(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},Qe.contains=function(a){if(a===null)return!1;var y=a;return ln(a)&&(y=zr(a),y===void 0)?!1:this.Tb[y]!==void 0},Qe.has=function(a){return this.contains(a)},Qe.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Qe.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Qe.first=function(){var a=this.ea;return a===null?null:a.value},sn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},sn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},sn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},sn.prototype.map=function(a){for(var y=new sn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},sn.prototype.filter=function(a){for(var y=new sn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},Qe=sn.prototype,Qe.remove=function(a){if(a===null)return!1;this._isFrozen&&un(this,a);var y=a;if(ln(a)&&(y=zr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},Qe.delete=function(a){return this.remove(a)},Qe.hp=function(a){if(a===null)return this;if(this._isFrozen&&un(this),fn(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},Qe.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&un(this);var y=new sn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var b=x.value;y.contains(b)||a.push(b)}return this.hp(a),this},Qe.clear=function(){this._isFrozen&&un(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},sn.prototype.copy=function(){var a=new sn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},sn.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,b;for(b in y)a[x]=y[b].value,x++;return a},sn.prototype.Hv=function(){var a=new rn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function hr(a){a.__gohashid=Ri++}function Pr(a){var y=a.__gohashid;return y===void 0&&(y=Ri++,a.__gohashid=y),y}function zr(a){return a.__gohashid}zt.Object.defineProperties(sn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return ri;var a=this.Sa;return a!==null?(a.reset(),a):new nr(this)}}}),sn.prototype.toList=sn.prototype.Hv,sn.prototype.toArray=sn.prototype.Fa,sn.prototype.clear=sn.prototype.clear,sn.prototype.retainAll=sn.prototype.pA,sn.prototype.removeAll=sn.prototype.hp,sn.prototype.delete=sn.prototype.delete,sn.prototype.remove=sn.prototype.remove,sn.prototype.first=sn.prototype.first,sn.prototype.containsAny=sn.prototype.Ty,sn.prototype.containsAll=sn.prototype.Sy,sn.prototype.has=sn.prototype.has,sn.prototype.contains=sn.prototype.contains,sn.prototype.addAll=sn.prototype.addAll,sn.prototype.add=sn.prototype.add,sn.prototype.thaw=sn.prototype.ka,sn.prototype.freeze=sn.prototype.freeze;var Ri=1;sn.className="Set",sn.uniqueHash=hr,sn.hashIdUnique=Pr,sn.hashId=zr;function Oi(a){this.ma=a,this.qa=a.Ja,this.sa=null}Oi.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Oi.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)},Oi.prototype.Ad=function(){return this.next()},Oi.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},Oi.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},Oi.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},Oi.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},Oi.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new rn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Oi.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new rn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},Oi.prototype.de=function(){this.value=this.key=null,this.qa=-1},Oi.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},zt.Object.defineProperties(Oi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Oi.prototype.first=Oi.prototype.first,Oi.prototype.hasNext=Oi.prototype.Ad,Oi.prototype.next=Oi.prototype.next,Oi.prototype.reset=Oi.prototype.reset,Oi.className="MapKeySetIterator";function Si(a){sn.call(this),hr(this),this._isFrozen=!0,this.ma=a}Wt(Si,sn),Qe=Si.prototype,Qe.freeze=function(){return this},Qe.ka=function(){return this},Qe.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Qe.add=function(){jt("This Set is read-only: "+this.toString())},Qe.contains=function(a){return this.ma.contains(a)},Qe.has=function(a){return this.contains(a)},Qe.remove=function(){jt("This Set is read-only: "+this.toString())},Qe.delete=function(a){return this.remove(a)},Qe.clear=function(){jt("This Set is read-only: "+this.toString())},Qe.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Si.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Si.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Si.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Si.prototype.map=function(a){for(var y=new sn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Si.prototype.filter=function(a){for(var y=new sn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Si.prototype.copy=function(){return new Si(this.ma)},Si.prototype.Iv=function(){var a=new sn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Si.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},Si.prototype.Hv=function(){var a=new rn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},zt.Object.defineProperties(Si.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?ri:new Oi(this.ma)}}}),Si.prototype.toList=Si.prototype.Hv,Si.prototype.toArray=Si.prototype.Fa,Si.prototype.toSet=Si.prototype.Iv,Si.prototype.first=Si.prototype.first,Si.prototype.clear=Si.prototype.clear,Si.prototype.delete=Si.prototype.delete,Si.prototype.remove=Si.prototype.remove,Si.prototype.has=Si.prototype.has,Si.prototype.contains=Si.prototype.contains,Si.prototype.add=Si.prototype.add,Si.prototype.thaw=Si.prototype.ka,Si.prototype.freeze=Si.prototype.freeze,Si.className="MapKeySet";function Di(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Di.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Di.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)},Di.prototype.Ad=function(){return this.next()},Di.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},Di.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},Di.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},Di.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},Di.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new rn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Di.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new rn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Di.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Di.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},zt.Object.defineProperties(Di.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Di.prototype.first=Di.prototype.first,Di.prototype.hasNext=Di.prototype.Ad,Di.prototype.next=Di.prototype.next,Di.prototype.reset=Di.prototype.reset,Di.className="MapValueSetIterator";function en(a,y){this.key=a,this.value=y,this.ll=this.va=null}en.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},en.className="KeyValuePair";function pn(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}pn.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},pn.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)},pn.prototype.Ad=function(){return this.next()},pn.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},pn.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},pn.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},pn.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},pn.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new rn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},pn.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new rn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},pn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},pn.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},zt.Object.defineProperties(pn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),pn.prototype.first=pn.prototype.first,pn.prototype.hasNext=pn.prototype.Ad,pn.prototype.next=pn.prototype.next,pn.prototype.reset=pn.prototype.reset,pn.className="MapIterator";function tn(a){hr(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"&&jt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Qe=tn.prototype,Qe.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return this._isFrozen=!1,this},Qe.toString=function(){return"Map()#"+zr(this)},Qe.add=function(a,y){this._isFrozen&&un(this,a);var x=a;ln(a)&&(x=Pr(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new en(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()):b.value=y,this},Qe.set=function(a,y){return this.add(a,y)},Qe.addAll=function(a){if(a===null)return this;if(fn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];this.add(b.key,b.value)}else if(a instanceof tn)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},Qe.first=function(){return this.ea},tn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},tn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},tn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},tn.prototype.map=function(a){for(var y=new tn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},tn.prototype.filter=function(a){for(var y=new tn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Qe=tn.prototype,Qe.contains=function(a){var y=a;return ln(a)&&(y=zr(a),y===void 0)?!1:this.Tb[y]!==void 0},Qe.has=function(a){return this.contains(a)},Qe.I=function(a){var y=a;return ln(a)&&(y=zr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Qe.get=function(a){return this.I(a)},Qe.remove=function(a){if(a===null)return!1;this._isFrozen&&un(this,a);var y=a;if(ln(a)&&(y=zr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},Qe.delete=function(a){return this.remove(a)},Qe.clear=function(){this._isFrozen&&un(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},tn.prototype.copy=function(){var a=new tn,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},tn.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,b;for(b in a){var E=a[b];y[x]=new en(E.key,E.value),x++}return y},tn.prototype.Lf=function(){return new Si(this)},zt.Object.defineProperties(tn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return ri;var a=this.Sa;return a!==null?(a.reset(),a):new pn(this)}},iteratorKeys:{get:function(){return 0>=this.count?ri:new Oi(this)}},iteratorValues:{get:function(){if(0>=this.count)return ri;var a=this.jf;return a!==null?(a.reset(),a):new Di(this)}}}),tn.prototype.toKeySet=tn.prototype.Lf,tn.prototype.toArray=tn.prototype.Fa,tn.prototype.clear=tn.prototype.clear,tn.prototype.delete=tn.prototype.delete,tn.prototype.remove=tn.prototype.remove,tn.prototype.get=tn.prototype.get,tn.prototype.getValue=tn.prototype.I,tn.prototype.has=tn.prototype.has,tn.prototype.contains=tn.prototype.contains,tn.prototype.first=tn.prototype.first,tn.prototype.addAll=tn.prototype.addAll,tn.prototype.set=tn.prototype.set,tn.prototype.add=tn.prototype.add,tn.prototype.thaw=tn.prototype.ka,tn.prototype.freeze=tn.prototype.freeze,tn.className="Map";function st(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):jt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Bn,Pn,Fn,Jn,ar;st.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},st.prototype.h=function(a,y){return this.x=a,this.y=y,this},st.prototype.sg=function(a,y){return this.x=a,this.y=y,this},st.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},st.prototype.copy=function(){var a=new st;return a.x=this.x,a.y=this.y,a},Qe=st.prototype,Qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function wn(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new st(x,E)}return new st}function Rn(a){return a.x.toString()+" "+a.y.toString()}Qe.toString=function(){return"Point("+this.x+","+this.y+")"},Qe.D=function(a){return a instanceof st?this.x===a.x&&this.y===a.y:!1},Qe.hi=function(a,y){return this.x===a&&this.y===y},Qe.Xa=function(a){return Gt.B(this.x,a.x)&&Gt.B(this.y,a.y)},Qe.add=function(a){return this.x+=a.x,this.y+=a.y,this},Qe.re=function(a){return this.x-=a.x,this.y-=a.y,this},Qe.offset=function(a,y){return this.x+=a,this.y+=y,this},st.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));return this.x=a*y-b*x,this.y=b*y+a*x,this},Qe=st.prototype,Qe.scale=function(a,y){return this.x*=a,this.y*=y,this},Qe.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Qe.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Qe.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},Qe.ab=function(a){return Gn(a.x-this.x,a.y-this.y)},Qe.direction=function(a,y){return Gn(a-this.x,y-this.y)};function Gn(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}Qe.Ry=function(a,y){return Gt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Qe.fA=function(a,y,x,b){return Gt.qh(a,y,x,b,this.x,this.y,this),this},Qe.gA=function(a,y){return Gt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Qe.uA=function(a,y,x,b){return Gt.No(this.x,this.y,a,y,x,b,this),this},Qe.vA=function(a,y){return Gt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Qe.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},Qe.yi=function(a,y,x,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},Qe.transform=function(a){return a.Ga(this),this};function Wn(a,y){return y.Cd(a),a}function Xn(a,y,x,b,E,ee){var ne=E-x,ae=ee-b,ue=ne*ne+ae*ae;x-=a,b-=y;var ge=-x*ne-b*ae;return 0>=ge||ge>=ue?(ne=E-a,ae=ee-y,Math.min(x*x+b*b,ne*ne+ae*ae)):(a=ne*b-ae*x,a*a/ue)}function Lr(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function mr(a,y,x,b){return a=x-a,y=b-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(b=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?b=0>y?b+180:180-b:0>y&&(b=360-b),b)}Qe.w=function(){return isFinite(this.x)&&isFinite(this.y)},st.alloc=function(){var a=lr.pop();return a===void 0?new st:a},st.allocAt=function(a,y){var x=lr.pop();return x===void 0?new st(a,y):(x.x=a,x.y=y,x)},st.free=function(a){lr.push(a)},st.prototype.isReal=st.prototype.w,st.prototype.setSpot=st.prototype.yi,st.prototype.setRectSpot=st.prototype.xi,st.prototype.snapToGridPoint=st.prototype.vA,st.prototype.snapToGrid=st.prototype.uA,st.prototype.projectOntoLineSegmentPoint=st.prototype.gA,st.prototype.projectOntoLineSegment=st.prototype.fA,st.intersectingLineSegments=function(a,y,x,b,E,ee,ne,ae){return Gt.Rl(a,y,x,b,E,ee,ne,ae)},st.prototype.compareWithLineSegmentPoint=st.prototype.Ry,st.compareWithLineSegment=function(a,y,x,b,E,ee){return Gt.Fl(a,y,x,b,E,ee)},st.prototype.direction=st.prototype.direction,st.prototype.directionPoint=st.prototype.ab,st.prototype.normalize=st.prototype.normalize,st.prototype.distanceSquared=st.prototype.zd,st.prototype.distanceSquaredPoint=st.prototype.Bf,st.prototype.scale=st.prototype.scale,st.prototype.rotate=st.prototype.rotate,st.prototype.offset=st.prototype.offset,st.prototype.subtract=st.prototype.re,st.prototype.add=st.prototype.add,st.prototype.equalsApprox=st.prototype.Xa,st.prototype.equalTo=st.prototype.hi,st.prototype.equals=st.prototype.D,st.prototype.set=st.prototype.set,st.prototype.setTo=st.prototype.sg;var lr=[];st.className="Point",st.parse=wn,st.stringify=Rn,st.distanceLineSegmentSquared=Xn,st.distanceSquared=Lr,st.direction=mr,st.Origin=Bn=new st(0,0).ja(),st.InfiniteTopLeft=Pn=new st(-1/0,-1/0).ja(),st.InfiniteBottomRight=Fn=new st(1/0,1/0).ja(),st.SixPoint=Jn=new st(6,6).ja(),st.NoPoint=ar=new st(NaN,NaN).ja(),st.parse=wn,st.stringify=Rn,st.distanceLineSegmentSquared=Xn,st.distanceSquared=Lr,st.direction=mr;function vn(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):jt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var fr,Or,oi,Qr,ui,di,hi;vn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},vn.prototype.h=function(a,y){return this.width=a,this.height=y,this},vn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},vn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},vn.prototype.copy=function(){var a=new vn;return a.width=this.width,a.height=this.height,a},Qe=vn.prototype,Qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function _i(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new vn(x,E)}return new vn}function zi(a){return a.width.toString()+" "+a.height.toString()}Qe.toString=function(){return"Size("+this.width+","+this.height+")"},Qe.D=function(a){return a instanceof vn?this.width===a.width&&this.height===a.height:!1},Qe.hi=function(a,y){return this.width===a&&this.height===y},Qe.Xa=function(a){return Gt.B(this.width,a.width)&&Gt.B(this.height,a.height)},Qe.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},Qe.w=function(){return isFinite(this.width)&&isFinite(this.height)},vn.alloc=function(){var a=mo.pop();return a===void 0?new vn:a},vn.free=function(a){mo.push(a)},vn.prototype.isReal=vn.prototype.w,vn.prototype.inflate=vn.prototype.Bc,vn.prototype.equalsApprox=vn.prototype.Xa,vn.prototype.equalTo=vn.prototype.hi,vn.prototype.equals=vn.prototype.D,vn.prototype.set=vn.prototype.set,vn.prototype.setTo=vn.prototype.sg;var mo=[];vn.className="Size",vn.parse=_i,vn.stringify=zi,vn.ZeroSize=fr=new vn(0,0).ja(),vn.OneSize=Or=new vn(1,1).ja(),vn.SixSize=oi=new vn(6,6).ja(),vn.EightSize=Qr=new vn(8,8).ja(),vn.TenSize=ui=new vn(10,10).ja(),vn.InfiniteSize=di=new vn(1/0,1/0).ja(),vn.NoSize=hi=new vn(NaN,NaN).ja(),vn.parse=_i,vn.stringify=zi;function $t(a,y,x,b){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof st?(x=a.x,a=a.y,y instanceof st?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof vn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):jt("Incorrect second argument supplied to Rect constructor "+y)):jt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Qe=$t.prototype,Qe.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Qe.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function yi(a,y,x){a.width=y,a.height=x}Qe.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},Qe.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Qe.dd=function(a){return this.x=a.x,this.y=a.y,this},Qe.tA=function(a){return this.width=a.width,this.height=a.height,this},$t.prototype.copy=function(){var a=new $t;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Qe=$t.prototype,Qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ti(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;(b=a[y++])&&(E=parseFloat(b));for(var ee=0;a[y]==="";)y++;(b=a[y++])&&(ee=parseFloat(b));for(var ne=0;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),new $t(x,E,ee,ne)}return new $t}function Vr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Qe.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Qe.D=function(a){return a instanceof $t?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Qe.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},Qe.Xa=function(a){return Gt.B(this.x,a.x)&&Gt.B(this.y,a.y)&&Gt.B(this.width,a.width)&&Gt.B(this.height,a.height)};function Ci(a,y){return Gt.$(a.x,y.x)&&Gt.$(a.y,y.y)&&Gt.$(a.width,y.width)&&Gt.$(a.height,y.height)}Qe.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Qe.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},Qe.contains=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+b<=this.y+this.height},Qe.offset=function(a,y){return this.x+=a,this.y+=y,this},Qe.Bc=function(a,y){return Hr(this,y,a,y,a)},Qe.Co=function(a){return Hr(this,a.top,a.right,a.bottom,a.left)},Qe.Fv=function(a){return Hr(this,-a.top,-a.right,-a.bottom,-a.left)},Qe.Hz=function(a,y,x,b){return Hr(this,a,y,x,b)};function Hr(a,y,x,b,E){var ee=a.width;return x+E<=-ee?(a.x+=ee/2,a.width=0):(a.x-=E,a.width+=x+E),x=a.height,y+b<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+b),a}Qe.Ex=function(a){return eo(this,a.x,a.y,a.width,a.height)},Qe.Uu=function(a,y,x,b){return eo(this,a,y,x,b)};function eo(a,y,x,b,E){var ee=Math.max(a.x,y),ne=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),a.x=ee,a.y=ne,a.width=Math.max(0,y-ee),a.height=Math.max(0,x-ne),a}Qe.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Qe.Vu=function(a,y,x,b){var E=this.width,ee=this.x;return E!==1/0&&x!==1/0&&(E+=ee,x+=a,isNaN(x)||isNaN(E)||ee>x||a>E)?!1:(a=this.height,x=this.y,!(a!==1/0&&b!==1/0&&(a+=x,b+=y,isNaN(b)||isNaN(a)||x>b||y>a)))};function Gi(a,y){var x=a.width,b=a.x,E=y.x-10;return b>y.width+10+10+E||E>x+b?!1:(x=a.height,a=a.y,b=y.y-10,!(a>y.height+10+10+b||b>x+a))}Qe.Ye=function(a){return xi(this,a.x,a.y,0,0)},Qe.ed=function(a){return xi(this,a.x,a.y,a.width,a.height)},Qe.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),xi(this,a,y,x,b)};function xi(a,y,x,b,E){var ee=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=ee,a.y=ne,a.width=y-ee,a.height=x-ne,a}Qe.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 qi(a,y,x,b,E,ee,ne,ae){return ne===void 0&&(ne=0),ae===void 0&&(ae=0),a<=E&&E+ne<=a+x&&y<=ee&&ee+ae<=y+b}function ga(a,y,x,b,E,ee,ne,ae){return a>ne+E||E>x+a?!1:!(y>ae+ee||ee>b+y)}Qe.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Qe.Mz=function(){return this.width===0&&this.height===0},$t.alloc=function(){var a=ma.pop();return a===void 0?new $t:a},$t.allocAt=function(a,y,x,b){var E=ma.pop();return E===void 0?new $t(a,y,x,b):E.h(a,y,x,b)},$t.free=function(a){ma.push(a)},zt.Object.defineProperties($t.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 st(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new vn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new st(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}}}),$t.prototype.isEmpty=$t.prototype.Mz,$t.prototype.isReal=$t.prototype.w,$t.intersectsLineSegment=function(a,y,x,b,E,ee,ne,ae){return Gt.Fx(a,y,x,b,E,ee,ne,ae)},$t.prototype.setSpot=$t.prototype.yi,$t.prototype.union=$t.prototype.Kv,$t.prototype.unionRect=$t.prototype.ed,$t.prototype.unionPoint=$t.prototype.Ye,$t.prototype.intersects=$t.prototype.Vu,$t.prototype.intersectsRect=$t.prototype.Yc,$t.prototype.intersect=$t.prototype.Uu,$t.prototype.intersectRect=$t.prototype.Ex,$t.prototype.grow=$t.prototype.Hz,$t.prototype.subtractMargin=$t.prototype.Fv,$t.prototype.addMargin=$t.prototype.Co,$t.prototype.inflate=$t.prototype.Bc,$t.prototype.offset=$t.prototype.offset,$t.prototype.contains=$t.prototype.contains,$t.prototype.containsRect=$t.prototype.Re,$t.prototype.containsPoint=$t.prototype.ca,$t.prototype.equalsApprox=$t.prototype.Xa,$t.prototype.equalTo=$t.prototype.hi,$t.prototype.equals=$t.prototype.D,$t.prototype.setSize=$t.prototype.tA,$t.prototype.setPoint=$t.prototype.dd,$t.prototype.set=$t.prototype.set,$t.prototype.setTo=$t.prototype.sg;var Ao=null,Aa=null,ma=[];$t.className="Rect",$t.parse=Ti,$t.stringify=Vr,$t.contains=qi,$t.intersects=ga,$t.ZeroRect=Ao=new $t(0,0,0,0).ja(),$t.NoRect=Aa=new $t(NaN,NaN,NaN,NaN).ja(),$t.parse=Ti,$t.stringify=Vr,$t.contains=qi,$t.intersects=ga;function Gr(a,y,x,b){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):jt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Gr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Gr.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Gr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Gr.prototype.copy=function(){var a=new Gr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Qe=Gr.prototype,Qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function to(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var b=a[y++];if(b&&(x=parseFloat(b)),isNaN(x))return new Gr;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Gr(x);for(var ee=NaN;a[y]==="";)y++;if((b=a[y++])&&(ee=parseFloat(b)),isNaN(ee))return new Gr(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Gr(x,E):new Gr(x,E,ee,ne)}return new Gr}function Co(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Qe.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Qe.D=function(a){return a instanceof Gr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Qe.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},Qe.Xa=function(a){return Gt.B(this.top,a.top)&&Gt.B(this.right,a.right)&&Gt.B(this.bottom,a.bottom)&&Gt.B(this.left,a.left)},Qe.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Gr.alloc=function(){var a=wi.pop();return a===void 0?new Gr:a},Gr.free=function(a){wi.push(a)},Gr.prototype.isReal=Gr.prototype.w,Gr.prototype.equalsApprox=Gr.prototype.Xa,Gr.prototype.equalTo=Gr.prototype.hi,Gr.prototype.equals=Gr.prototype.D,Gr.prototype.set=Gr.prototype.set,Gr.prototype.setTo=Gr.prototype.sg;var Qo=null,Ei=null,wi=[];Gr.className="Margin",Gr.parse=to,Gr.stringify=Co,Gr.ZeroMargin=Qo=new Gr(0,0,0,0).ja(),Gr.TwoMargin=Ei=new Gr(2,2,2,2).ja(),Gr.parse=to,Gr.stringify=Co;function Mn(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var Wr,ki,co,ba,aa,ai,Wo,Ko,jo,io,Pa,is,fo,os,Gs,Lu,Ho,th,Mu,Nu,gl,Ns,Ll,nh,Au,Vo,ju,rh,iu,ou,ja,Oa,na,sa,uo,Bi;Mn.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Mn.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},Mn.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Mn.prototype.copy=function(){var a=new Mn;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Qe=Mn.prototype,Qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Wi(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function la(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Wr;if(a==="TopLeft")return ki;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return co;if(a==="TopRight")return ba;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return aa;if(a==="Center")return ai;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Wo;if(a==="BottomLeft")return Ko;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return jo;if(a==="BottomRight")return io;if(a==="TopSide")return Pa;if(a==="LeftSide")return is;if(a==="RightSide")return fo;if(a==="BottomSide")return os;if(a==="TopBottomSides")return Gs;if(a==="LeftRightSides")return Lu;if(a==="TopLeftSides")return Ho;if(a==="TopRightSides")return th;if(a==="BottomLeftSides")return Mu;if(a==="BottomRightSides")return Nu;if(a==="NotTopSide")return gl;if(a==="NotLeftSide")return Ns;if(a==="NotRightSide")return Ll;if(a==="NotBottomSide")return nh;if(a==="AllSides")return Au;if(a==="Default")return Vo;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0<b.length&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(E=parseFloat(b));for(var ee=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(ee=parseFloat(b));for(var ne=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(ne=parseFloat(b)),new Mn(x,E,ee,ne)}return new Mn}function $o(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Qe.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(Wr)?"None":this.D(ki)?"TopLeft":this.D(co)?"Top":this.D(ba)?"TopRight":this.D(aa)?"Left":this.D(ai)?"Center":this.D(Wo)?"Right":this.D(Ko)?"BottomLeft":this.D(jo)?"Bottom":this.D(io)?"BottomRight":this.D(Pa)?"TopSide":this.D(is)?"LeftSide":this.D(fo)?"RightSide":this.D(os)?"BottomSide":this.D(Gs)?"TopBottomSides":this.D(Lu)?"LeftRightSides":this.D(Ho)?"TopLeftSides":this.D(th)?"TopRightSides":this.D(Mu)?"BottomLeftSides":this.D(Nu)?"BottomRightSides":this.D(gl)?"NotTopSide":this.D(Ns)?"NotLeftSide":this.D(Ll)?"NotRightSide":this.D(nh)?"NotBottomSide":this.D(Au)?"AllSides":this.D(Vo)?"Default":"None"},Qe.D=function(a){return a instanceof Mn?(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},Qe.gv=function(){return new Mn(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Qe.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(ju))a=is;else if(a.D(rh))a=fo;else if(a.D(iu))a=Pa;else if(a.D(ou))a=os;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Qe.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Qe.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Qe.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Qe.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Qe.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Mn.alloc=function(){var a=qo.pop();return a===void 0?new Mn:a},Mn.free=function(a){qo.push(a)},Mn.prototype.isDefault=Mn.prototype.Xb,Mn.prototype.isNone=Mn.prototype.ys,Mn.prototype.isSide=Mn.prototype.$c,Mn.prototype.isNoSpot=Mn.prototype.Mc,Mn.prototype.isSpot=Mn.prototype.sb,Mn.prototype.includesSide=Mn.prototype.Hf,Mn.prototype.opposite=Mn.prototype.gv,Mn.prototype.equals=Mn.prototype.D,Mn.prototype.set=Mn.prototype.set,Mn.prototype.setTo=Mn.prototype.sg;var qo=[];Mn.className="Spot",Mn.parse=la,Mn.stringify=$o,Mn.None=Wr=Wi(new Mn(0,0,0,0),0).ja(),Mn.Default=Vo=Wi(new Mn(0,0,-1,0),-1).ja(),Mn.TopLeft=ki=new Mn(0,0,0,0).ja(),Mn.TopCenter=co=new Mn(.5,0,0,0).ja(),Mn.TopRight=ba=new Mn(1,0,0,0).ja(),Mn.LeftCenter=aa=new Mn(0,.5,0,0).ja(),Mn.Center=ai=new Mn(.5,.5,0,0).ja(),Mn.RightCenter=Wo=new Mn(1,.5,0,0).ja(),Mn.BottomLeft=Ko=new Mn(0,1,0,0).ja(),Mn.BottomCenter=jo=new Mn(.5,1,0,0).ja(),Mn.BottomRight=io=new Mn(1,1,0,0).ja(),Mn.MiddleTop=ja=co,Mn.MiddleLeft=Oa=aa,Mn.MiddleRight=na=Wo,Mn.MiddleBottom=sa=jo,Mn.Top=iu=co,Mn.Left=ju=aa,Mn.Right=rh=Wo,Mn.Bottom=ou=jo,Mn.TopSide=Pa=Wi(new Mn(0,0,1,1),1).ja(),Mn.LeftSide=is=Wi(new Mn(0,0,1,2),1).ja(),Mn.RightSide=fo=Wi(new Mn(0,0,1,4),1).ja(),Mn.BottomSide=os=Wi(new Mn(0,0,1,8),1).ja(),Mn.TopBottomSides=Gs=Wi(new Mn(0,0,1,9),1).ja(),Mn.LeftRightSides=Lu=Wi(new Mn(0,0,1,6),1).ja(),Mn.TopLeftSides=Ho=Wi(new Mn(0,0,1,3),1).ja(),Mn.TopRightSides=th=Wi(new Mn(0,0,1,5),1).ja(),Mn.BottomLeftSides=Mu=Wi(new Mn(0,0,1,10),1).ja(),Mn.BottomRightSides=Nu=Wi(new Mn(0,0,1,12),1).ja(),Mn.NotTopSide=gl=Wi(new Mn(0,0,1,14),1).ja(),Mn.NotLeftSide=Ns=Wi(new Mn(0,0,1,13),1).ja(),Mn.NotRightSide=Ll=Wi(new Mn(0,0,1,11),1).ja(),Mn.NotBottomSide=nh=Wi(new Mn(0,0,1,7),1).ja(),Mn.AllSides=Au=Wi(new Mn(0,0,1,15),1).ja(),uo=new Mn(.156,.156).ja(),Bi=new Mn(.844,.844).ja(),Mn.parse=la,Mn.stringify=$o;function jr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}jr.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},jr.prototype.setTransform=function(a,y,x,b,E,ee){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=ee,this},jr.prototype.copy=function(){var a=new jr;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},jr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},jr.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},jr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},jr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},jr.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,b=this.m11*a.m21+this.m21*a.m22,E=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=b,this.m22=E,this},jr.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,b=-a.m12*y,E=-a.m21*y,ee=a.m11*y,ne=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*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*ee,E=this.m12*E+this.m22*ee,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},jr.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,b=this.m11*a,E=a*(this.m21*this.dy-this.m22*this.dx),ee=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=ee,this},jr.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 b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,ee=this.m11*-b+this.m21*a,ne=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=ee,this.m22=ne,this.translate(-y,-x),this},Qe=jr.prototype,Qe.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Qe.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Qe.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)},Qe.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,b=a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Qe.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,b=1.2*a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Qe.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,ee=this.m11,ne=this.m12,ae=this.m21,ue=this.m22,ge=this.dx,ye=this.dy,Le=y*ee+x*ae+ge,ze=y*ne+x*ue+ye,Ke=b*ee+x*ae+ge,Je=b*ne+x*ue+ye;return x=y*ee+E*ae+ge,y=y*ne+E*ue+ye,ee=b*ee+E*ae+ge,b=b*ne+E*ue+ye,E=Math.min(Le,Ke),Le=Math.max(Le,Ke),Ke=Math.min(ze,Je),ze=Math.max(ze,Je),E=Math.min(E,x),Le=Math.max(Le,x),Ke=Math.min(Ke,y),ze=Math.max(ze,y),E=Math.min(E,ee),Le=Math.max(Le,ee),Ke=Math.min(Ke,b),ze=Math.max(ze,b),a.h(E,Ke,Le-E,ze-Ke),a},jr.alloc=function(){var a=As.pop();return a===void 0?new jr:a},jr.free=function(a){As.push(a)},jr.prototype.transformRect=jr.prototype.pp,jr.prototype.transformPoint=jr.prototype.Ga,jr.prototype.scale=jr.prototype.scale,jr.prototype.translate=jr.prototype.translate,jr.prototype.rotate=jr.prototype.rotate,jr.prototype.invert=jr.prototype.Vj,jr.prototype.multiplyInverted=jr.prototype.bv,jr.prototype.multiply=jr.prototype.multiply,jr.prototype.reset=jr.prototype.reset,jr.prototype.isIdentity=jr.prototype.ws,jr.prototype.equals=jr.prototype.D,jr.prototype.setTransform=jr.prototype.setTransform,jr.prototype.set=jr.prototype.set;var As=[];jr.className="Transform",jr.xF="54a702f3e53909c447824c6706603faf4c";var Gt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Gt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Gt.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,b,E,ee,ne){if(0>=E&&(E=1e-6),a<x)var ae=a,ue=x;else ae=x,ue=a;if(y<b)var ge=y,ye=b;else ge=b,ye=y;if(a===x)return ge<=ne&&ne<=ye&&a-E<=ee&&ee<=a+E;if(y===b)return ae<=ee&&ee<=ue&&y-E<=ne&&ne<=y+E;if(ue+=E,ae-=E,ae<=ee&&ee<=ue&&(ye+=E,ge-=E,ge<=ne&&ne<=ye))if(ue-ae>ye-ge)if(a-x>E||x-a>E){if(ee=(b-y)/(x-a)*(ee-a)+y,ee-E<=ne&&ne<=ee+E)return!0}else return!0;else if(y-b>E||b-y>E){if(ne=(x-a)/(b-y)*(ne-y)+a,ne-E<=ee&&ee<=ne+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,ee,ne,ae,ue,ge,ye,Le){if(Gt.Yb(a,y,ne,ae,Le,x,b)&&Gt.Yb(a,y,ne,ae,Le,E,ee))return Gt.Yb(a,y,ne,ae,Le,ge,ye);var ze=(a+x)/2,Ke=(y+b)/2,Je=(x+E)/2,it=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(ze+Je)/2,x=(Ke+it)/2,Je=(Je+E)/2,it=(it+ee)/2;var Tt=(b+Je)/2,Pt=(x+it)/2;return Gt.cs(a,y,ze,Ke,b,x,Tt,Pt,ue,ge,ye,Le)||Gt.cs(Tt,Pt,Je,it,E,ee,ne,ae,ue,ge,ye,Le)},ax:function(a,y,x,b,E,ee,ne,ae,ue){var ge=(x+E)/2,ye=(b+ee)/2;return ue.h((((a+x)/2+ge)/2+(ge+(E+ne)/2)/2)/2,(((y+b)/2+ye)/2+(ye+(ee+ae)/2)/2)/2),ue},My:function(a,y,x,b,E,ee,ne,ae){var ue=(x+E)/2,ge=(b+ee)/2;return mr(((a+x)/2+ue)/2,((y+b)/2+ge)/2,(ue+(E+ne)/2)/2,(ge+(ee+ae)/2)/2)},Dl:function(a,y,x,b,E,ee,ne,ae,ue,ge){if(Gt.Yb(a,y,ne,ae,ue,x,b)&&Gt.Yb(a,y,ne,ae,ue,E,ee))xi(ge,a,y,0,0),xi(ge,ne,ae,0,0);else{var ye=(a+x)/2,Le=(y+b)/2,ze=(x+E)/2,Ke=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(ye+ze)/2,x=(Le+Ke)/2,ze=(ze+E)/2,Ke=(Ke+ee)/2;var Je=(b+ze)/2,it=(x+Ke)/2;Gt.Dl(a,y,ye,Le,b,x,Je,it,ue,ge),Gt.Dl(Je,it,ze,Ke,E,ee,ne,ae,ue,ge)}return ge},Qe:function(a,y,x,b,E,ee,ne,ae,ue,ge){if(Gt.Yb(a,y,ne,ae,ue,x,b)&&Gt.Yb(a,y,ne,ae,ue,E,ee))ge.length===0&&(ge.push(a),ge.push(y)),ge.push(ne),ge.push(ae);else{var ye=(a+x)/2,Le=(y+b)/2,ze=(x+E)/2,Ke=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(ye+ze)/2,x=(Le+Ke)/2,ze=(ze+E)/2,Ke=(Ke+ee)/2;var Je=(b+ze)/2,it=(x+Ke)/2;Gt.Qe(a,y,ye,Le,b,x,Je,it,ue,ge),Gt.Qe(Je,it,ze,Ke,E,ee,ne,ae,ue,ge)}return ge},jv:function(a,y,x,b,E,ee,ne,ae,ue,ge){if(Gt.Yb(a,y,E,ee,ge,x,b))return Gt.Yb(a,y,E,ee,ge,ae,ue);var ye=(a+x)/2,Le=(y+b)/2;x=(x+E)/2,b=(b+ee)/2;var ze=(ye+x)/2,Ke=(Le+b)/2;return Gt.jv(a,y,ye,Le,ze,Ke,ne,ae,ue,ge)||Gt.jv(ze,Ke,x,b,E,ee,ne,ae,ue,ge)},OA:function(a,y,x,b,E,ee,ne){return ne.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+ee)/2)/2),ne},iv:function(a,y,x,b,E,ee,ne,ae){if(Gt.Yb(a,y,E,ee,ne,x,b))xi(ae,a,y,0,0),xi(ae,E,ee,0,0);else{var ue=(a+x)/2,ge=(y+b)/2;x=(x+E)/2,b=(b+ee)/2;var ye=(ue+x)/2,Le=(ge+b)/2;Gt.iv(a,y,ue,ge,ye,Le,ne,ae),Gt.iv(ye,Le,x,b,E,ee,ne,ae)}return ae},ep:function(a,y,x,b,E,ee,ne,ae){if(Gt.Yb(a,y,E,ee,ne,x,b))ae.length===0&&(ae.push(a),ae.push(y)),ae.push(E),ae.push(ee);else{var ue=(a+x)/2,ge=(y+b)/2;x=(x+E)/2,b=(b+ee)/2;var ye=(ue+x)/2,Le=(ge+b)/2;Gt.ep(a,y,ue,ge,ye,Le,ne,ae),Gt.ep(ye,Le,x,b,E,ee,ne,ae)}return ae},Eo:function(a,y,x,b,E,ee,ne,ae,ue,ge,ye,Le,ze,Ke){if(Gt.Yb(a,y,ne,ae,ze,x,b)&&Gt.Yb(a,y,ne,ae,ze,E,ee))return!Gt.Rl(a,y,ne,ae,ue,ge,ye,Le)||(ze=(a-ne)*(ge-Le)-(y-ae)*(ue-ye),ze===0)?!1:(Ke.h(((a*ae-y*ne)*(ue-ye)-(a-ne)*(ue*Le-ge*ye))/ze,((a*ae-y*ne)*(ge-Le)-(y-ae)*(ue*Le-ge*ye))/ze),!0);var Je=(a+x)/2,it=(y+b)/2,Tt=(x+E)/2,Pt=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(Je+Tt)/2,x=(it+Pt)/2,Tt=(Tt+E)/2,Pt=(Pt+ee)/2;var Nt=(b+Tt)/2,At=(x+Pt)/2,Bt=1/0,Rt=!1,Zt=0,On=0;return Gt.Eo(a,y,Je,it,b,x,Nt,At,ue,ge,ye,Le,ze,Ke)&&(a=(Ke.x-ue)*(Ke.x-ue)+(Ke.y-ge)*(Ke.y-ge),a<Bt&&(Bt=a,Rt=!0,Zt=Ke.x,On=Ke.y)),Gt.Eo(Nt,At,Tt,Pt,E,ee,ne,ae,ue,ge,ye,Le,ze,Ke)&&(Ke.x-ue)*(Ke.x-ue)+(Ke.y-ge)*(Ke.y-ge)<Bt&&(Rt=!0,Zt=Ke.x,On=Ke.y),Rt&&(Ke.x=Zt,Ke.y=On),Rt},Fo:function(a,y,x,b,E,ee,ne,ae,ue,ge,ye,Le,ze){var Ke=0;if(Gt.Yb(a,y,ne,ae,ze,x,b)&&Gt.Yb(a,y,ne,ae,ze,E,ee)){if(ze=(a-ne)*(ge-Le)-(y-ae)*(ue-ye),ze===0)return Ke;var Je=((a*ae-y*ne)*(ue-ye)-(a-ne)*(ue*Le-ge*ye))/ze,it=((a*ae-y*ne)*(ge-Le)-(y-ae)*(ue*Le-ge*ye))/ze;if(Je>=ye)return Ke;if((ue>ye?ue-ye:ye-ue)<(ge>Le?ge-Le:Le-ge)){if(y<ae?(ue=y,a=ae):(ue=ae,a=y),it<ue||it>a)return Ke}else if(a<ne?(ue=a,a=ne):ue=ne,Je<ue||Je>a)return Ke;0<ze?Ke++:0>ze&&Ke--}else{Je=(a+x)/2,it=(y+b)/2;var Tt=(x+E)/2,Pt=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(Je+Tt)/2,x=(it+Pt)/2,Tt=(Tt+E)/2,Pt=(Pt+ee)/2;var Nt=(b+Tt)/2,At=(x+Pt)/2;Ke+=Gt.Fo(a,y,Je,it,b,x,Nt,At,ue,ge,ye,Le,ze),Ke+=Gt.Fo(Nt,At,Tt,Pt,E,ee,ne,ae,ue,ge,ye,Le,ze)}return Ke},qh:function(a,y,x,b,E,ee,ne){return Gt.$(a,x)?(y<b?(x=y,y=b):x=b,ee<x?(ne.h(a,x),!1):ee>y?(ne.h(a,y),!1):(ne.h(a,ee),!0)):Gt.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(ne.h(b,y),!1):E>a?(ne.h(a,y),!1):(ne.h(E,y),!0)):(E=((a-E)*(a-x)+(y-ee)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(ne.h(a,y),!1):1.000005<E?(ne.h(x,b),!1):(ne.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,ee,ne,ae,ue){return Gt.B(a,x)&&Gt.B(y,b)?(ue.h(a,y),!1):Gt.$(E,ne)?Gt.$(a,x)?(Gt.qh(a,y,x,b,E,ee,ue),!1):Gt.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,ue):(ae=(ae-ee)/(ne-E),Gt.$(a,x)?(x=ae*(a-E)+ee,y<b?(E=y,y=b):E=b,x<E?(ue.h(a,E),!1):x>y?(ue.h(a,y),!1):(ue.h(a,x),!0)):(ne=(b-y)/(x-a),Gt.$(ae,ne)?(Gt.qh(a,y,x,b,E,ee,ue),!1):(E=(ne*a-ae*E+ee-y)/(ne-ae),Gt.$(ne,0)?(a<x?(b=a,a=x):b=x,E<b?(ue.h(b,y),!1):E>a?(ue.h(a,y),!1):(ue.h(E,y),!0)):Gt.qh(a,y,x,b,E,ne*(E-a)+y,ue))))},MA:function(a,y,x,b,E){return Gt.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,ee,ne,ae,ue,ge){function ye(Tt,Pt){var Nt=(Tt-a)*(Tt-a)+(Pt-y)*(Pt-y);Nt<Le&&(Le=Nt,ue.h(Tt,Pt))}var Le=1/0;ye(ue.x,ue.y);var ze=0,Ke=0,Je=0,it=0;if(E<ne?(ze=E,Ke=ne):(ze=ne,Ke=E),ee<ae?(Je=E,it=ne):(Je=ne,it=E),ze=(Ke-ze)/2+ge,ge=(it-Je)/2+ge,E=(E+ne)/2,ee=(ee+ae)/2,ze===0||ge===0)return ue;if(.5>(x>a?x-a:a-x)){if(ze=1-(x-E)*(x-E)/(ze*ze),0>ze)return ue;ze=Math.sqrt(ze),b=-ge*ze+ee,ye(x,ge*ze+ee),ye(x,b)}else{if(x=(b-y)/(x-a),b=1/(ze*ze)+x*x/(ge*ge),ae=2*x*(y-x*a)/(ge*ge)-2*x*ee/(ge*ge)-2*E/(ze*ze),ze=ae*ae-4*b*(2*x*a*ee/(ge*ge)-2*y*ee/(ge*ge)+ee*ee/(ge*ge)+E*E/(ze*ze)-1+(y-x*a)*(y-x*a)/(ge*ge)),0>ze)return ue;ze=Math.sqrt(ze),ge=(-ae+ze)/(2*b),ye(ge,x*ge-x*a+y),ze=(-ae-ze)/(2*b),ye(ze,x*ze-x*a+y)}return ue},Ff:function(a,y,x,b,E,ee,ne,ae,ue){var ge=1e21,ye=a,Le=y;if(Gt.Ve(a,y,a,b,E,ee,ne,ae,ue)){var ze=(ue.x-E)*(ue.x-E)+(ue.y-ee)*(ue.y-ee);ze<ge&&(ge=ze,ye=ue.x,Le=ue.y)}return Gt.Ve(x,y,x,b,E,ee,ne,ae,ue)&&(ze=(ue.x-E)*(ue.x-E)+(ue.y-ee)*(ue.y-ee),ze<ge&&(ge=ze,ye=ue.x,Le=ue.y)),Gt.Ve(a,y,x,y,E,ee,ne,ae,ue)&&(y=(ue.x-E)*(ue.x-E)+(ue.y-ee)*(ue.y-ee),y<ge&&(ge=y,ye=ue.x,Le=ue.y)),Gt.Ve(a,b,x,b,E,ee,ne,ae,ue)&&(a=(ue.x-E)*(ue.x-E)+(ue.y-ee)*(ue.y-ee),a<ge&&(ge=a,ye=ue.x,Le=ue.y)),ue.h(ye,Le),1e21>ge},us:function(a,y,x){return Gt.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,ee,ne,ae){var ue=a+x,ge=y+b;return E===ne?(ee<ae?(ne=ee,ee=ae):ne=ae,a<=E&&E<=ue&&ne<=ge&&ee>=y):ee===ae?(E<ne?(ae=E,E=ne):ae=ne,y<=ee&&ee<=ge&&ae<=ue&&E>=a):!!(qi(a,y,x,b,E,ee)||qi(a,y,x,b,ne,ae)||Gt.Rl(a,y,ue,y,E,ee,ne,ae)||Gt.Rl(ue,y,ue,ge,E,ee,ne,ae)||Gt.Rl(ue,ge,a,ge,E,ee,ne,ae)||Gt.Rl(a,ge,a,y,E,ee,ne,ae))},Rl:function(a,y,x,b,E,ee,ne,ae){return a===x&&y===b&&E===ne&&ee===ae?a===E&&y===ee:0>=Gt.Fl(a,y,x,b,E,ee)*Gt.Fl(a,y,x,b,ne,ae)&&0>=Gt.Fl(E,ee,ne,ae,a,y)*Gt.Fl(E,ee,ne,ae,x,b)},Fl:function(a,y,x,b,E,ee){return x-=a,b-=y,a=E-a,y=ee-y,ee=a*b-y*x,ee===0&&(ee=a*x+y*b,0<ee&&(ee=(a-x)*x+(y-b)*b,0>ee&&(ee=0))),ee},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,ee){var ne=Math.PI;ee||(b*=ne/180,E*=ne/180);var ae=b>E?-1:1;ee=[];var ue=ne/2,ge=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return ue=ge+ae*Math.min(b,ue),ae=a+x*Math.cos(ge),ge=y+x*Math.sin(ge),a+=x*Math.cos(ue),y+=x*Math.sin(ue),x=(ae+a)/2,ue=(ge+y)/2,ee.push([ae,ge,x,ue,x,ue,a,y]),ee;for(;1e-5<b;)E=ge+ae*Math.min(b,ue),ee.push(Gt.Vy(x,ge,E,a,y)),b-=Math.abs(E-ge),ge=E;return ee},Vy:function(a,y,x,b,E){var ee=(x-y)/2,ne=a*Math.cos(ee),ae=a*Math.sin(ee),ue=-ae,ge=ne*ne+ue*ue,ye=ge+ne*ne+ue*ae;return ge=4/3*(Math.sqrt(2*ge*ye)-ye)/(ne*ae-ue*ne),ae=ne-ge*ue,ne=ue+ge*ne,ue=-ne,ge=ee+y,ee=Math.cos(ge),ge=Math.sin(ge),[b+a*Math.cos(y),E+a*Math.sin(y),b+ae*ee-ne*ge,E+ae*ge+ne*ee,b+ae*ee-ue*ge,E+ae*ge+ue*ee,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,ee,ne){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/ee)*ee+b;var ae=x;return x+E-a<E/2&&(ae=x+E),a=b,b+ee-y<ee/2&&(a=b+ee),ne.h(ae,a),ne},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var b;do y=x%a,x=b=a,a=y;while(0<y);return b},$y:function(a,y,x,b){var E=0>x,ee=0>b;if(a<y)var ne=1,ae=0;else ne=0,ae=1;var ue=ne===0?a:y,ge=ne===0?x:b;return(ne===0?E:ee)&&(ge=-ge),ne=ae,x=ne===0?x:b,(ne===0?E:ee)&&(x=-x),Gt.az(ue,ne===0?a:y,ge,x,0,0)},az:function(a,y,x,b,E,ee){if(0<b)if(0<x){E=a*a,ee=y*y,a*=x;var ne=y*b,ae=-ee+ne,ue=-ee+Math.sqrt(a*a+ne*ne);y=ae;for(var ge=0;9999999999>ge&&(y=.5*(ae+ue),!(y===ae||y===ue));++ge){var ye=a/(y+E),Le=ne/(y+ee);if(ye=ye*ye+Le*Le-1,0<ye)ae=y;else if(0>ye)ue=y;else break}x=E*x/(y+E)-x,b=ee*b/(y+ee)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,ee=a*x,ee<b?(b=ee/b,ee=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+ee*ee)):x=Math.abs(x-a);return x},Ze:new yr,um:new yr,Mf:new yr,Nf:0,vm:100};Gt.za=Gt.AA;function Ln(a){hr(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 rn:(Ln.V===null&&(Ln.V=new rn().freeze()),this.ee=Ln.V),this.aq=this.ee.Ja,this.Ip=new $t().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=ki,this.gg=io,this.Rk=this.Sk=NaN,this.Uf=xn}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,b=0;b<y.length;b++)x.add(y[b].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)&&jt("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?Ml(this,a):a.type===Ln.j&&this.type===Ln.o?Ml(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 b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0}return Gt.B(this.startX,a.startX)&&Gt.B(this.startY,a.startY)&&Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)};function Ml(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&&Gt.B(a.startX,y.startX)&&Gt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Ui&&Gt.B(a.endX,y.endX)&&Gt.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 $t(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 $t(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 b=x.length,E=0;E<b;E++){var ee=x[E];0<E&&(y+=" x "),ee.isFilled&&(y+="F "),y+=ee.toString(a)}return y;default:return this.type.toString()}},Ln.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",b=0;b<y;b++){var E=a[b];x=E.match(/[Ff]/)!==null?b===0?x+E:x+("X"+(E[0]===" "?"":" ")+E):x+((b===0?"":"X ")+"F"+(E[0]===" "?"":" ")+E)}return x},Ln.parse=function(a,y){function x(){return it>=Bt-1?!0:ge[it+1].match(Rt)!==null}function b(){return it++,ge[it]}function E(Dr){var Mr=parseFloat(b()),bi=parseFloat(b());Tt===Tt.toLowerCase()&&(Mr=At.x+Mr,bi=At.y+bi),Dr.h(Mr,bi)}function ee(){return E(At),At}function ne(){return E(Nt),Nt}function ae(){var Dr=Pt.toLowerCase();return Dr!=="c"&&Dr!=="s"&&Dr!=="q"&&Dr!=="t"?At:new st(2*At.x-Nt.x,2*At.y-Nt.y)}y===void 0&&(y=!1);var ue=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ue,"$1 $2"),a=a.replace(ue,"$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 ge=a.split(" ");for(a=0;a<ge.length;a++){var ye=ge[a];if(ye.match(/(\.[0-9]*)(\.)/gm)!==null){ue=ir();for(var Le="",ze=!1,Ke=0;Ke<ye.length;Ke++){var Je=ye[Ke];Je!=="."||ze?Je==="."?(ue.push(Le),Le="."):Le+=Je:(ze=!0,Le+=Je)}for(ue.push(Le),ge.splice(a,1),ye=0;ye<ue.length;ye++)ge.splice(a+ye,0,ue[ye]);a+=ue.length-1,Un(ue)}}var it=-1,Tt="",Pt="";ue=new st(0,0);var Nt=new st(0,0),At=new st(0,0),Bt=ge.length;a=A1(null),ze=Le=ye=!1,Ke=!0,Je=null;for(var Rt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(it>=Bt-1);)if(Pt=Tt,Tt=b(),Tt!=="")switch(Tt.toUpperCase()){case"X":Ke=!0,Le=ye=!1;break;case"M":for(Je=ee(),a.mc===null||Ke===!0?(Dd(a,Je.x,Je.y,ye,!Le,ze),Ke=!1):a.moveTo(Je.x,Je.y),ue.assign(At);!x();)Je=ee(),a.lineTo(Je.x,Je.y);break;case"L":for(;!x();)Je=ee(),a.lineTo(Je.x,Je.y);break;case"H":for(;!x();)At=new st((Tt===Tt.toLowerCase()?At.x:0)+parseFloat(b()),At.y),a.lineTo(At.x,At.y);break;case"V":for(;!x();)At=new st(At.x,(Tt===Tt.toLowerCase()?At.y:0)+parseFloat(b())),a.lineTo(At.x,At.y);break;case"C":for(;!x();){Je=new st,E(Je);var Zt=ne(),On=ee();wh(a,Je.x,Je.y,Zt.x,Zt.y,On.x,On.y)}break;case"S":for(;!x();)Je=ae(),Zt=ne(),On=ee(),wh(a,Je.x,Je.y,Zt.x,Zt.y,On.x,On.y);break;case"Q":for(;!x();)Je=ne(),Zt=ee(),Im(a,Je.x,Je.y,Zt.x,Zt.y);break;case"T":for(;!x();)Nt=Je=ae(),Zt=ee(),Im(a,Je.x,Je.y,Zt.x,Zt.y);break;case"B":for(;!x();){Je=parseFloat(b()),Zt=parseFloat(b()),On=parseFloat(b());var rr=parseFloat(b()),$n=parseFloat(b()),En=$n,dn=!1;x()||(En=parseFloat(b()),x()||(dn=parseFloat(b())!==0)),Tt===Tt.toLowerCase()&&(On+=At.x,rr+=At.y),a.arcTo(Je,Zt,On,rr,$n,En,dn)}break;case"A":for(;!x();)Je=Math.abs(parseFloat(b())),Zt=Math.abs(parseFloat(b())),On=parseFloat(b()),$n=rr=!1,dn=En=0,En=b(),En.length===1?(rr=!!parseFloat(En),$n=!!parseFloat(b()),En=parseFloat(b())):En.length===2?(rr=!!parseFloat(En[0]),$n=!!parseFloat(En[1]),En=parseFloat(b())):(rr=!!parseFloat(En[0]),$n=!!parseFloat(En[1]),En=parseFloat(En.slice(2))),dn=parseFloat(b()),Tt===Tt.toLowerCase()&&(En=At.x+En,dn=At.y+dn),At.h(En,dn),Px(a,Je,Zt,On,rr,$n,En,dn);break;case"Z":bx(a),At.assign(ue);break;case"F":for(Je="",Zt=1;ge[it+Zt];)if(ge[it+Zt]==="0")ze=!0,Zt++;else if(ge[it+Zt].match(/[Uu]/)!==null)Zt++;else if(ge[it+Zt].match(Rt)===null)Zt++;else{Je=ge[it+Zt];break}Je.match(/[Mm]/)?ye=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Je="",Zt=1;ge[it+Zt];)if(ge[it+Zt].match(/[Ff]/)!==null)Zt++;else if(ge[it+Zt].match(Rt)===null)Zt++;else{Je=ge[it+Zt];break}Je.match(/[Mm]/)?Le=!0:a.mc.isShadowed=!1}if(ue=a.os,Rm=a,y)for(y=ue.figures.iterator;y.next();)y.value.isFilled=!0;return ue},Ln.Ha=function(a,y){for(var x=a.length,b=st.alloc(),E=0;E<x;E++){var ee=a[E];b.x=ee[0],b.y=ee[1],y.Ga(b),ee[0]=b.x,ee[1]=b.y,b.x=ee[2],b.y=ee[3],y.Ga(b),ee[2]=b.x,ee[3]=b.y,b.x=ee[4],b.y=ee[5],y.Ga(b),ee[4]=b.x,ee[5]=b.y,b.x=ee[6],b.y=ee[7],y.Ga(b),ee[6]=b.x,ee[7]=b.y}st.free(b)},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 b=a[x];b._isInvalidBounds=!1;var E=b.segments;b.sr=E.Ja,b=E.s,E=b.length;for(var ee=0;ee<E;ee++){var ne=b[ee];ne._isInvalidBounds=!1,ne.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),Ou(this,a,!1),xi(a,0,0,0,0),a.freeze()},Ln.prototype.ix=function(){var a=new $t;return Ou(this,a,!0),a};function Ou(a,y,x){switch(a.type){case Ln.j:case Ln.u:case Ln.F:x?y.h(a.od,a.pd,0,0):xi(y,a.od,a.pd,0,0),xi(y,a.Dc,a.Ec,0,0);break;case Ln.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var ee=a[E];x&&E===0?y.h(ee.startX,ee.startY,0,0):xi(y,ee.startX,ee.startY,0,0);for(var ne=ee.segments.s,ae=ne.length,ue=ee.startX,ge=ee.startY,ye=0;ye<ae;ye++){var Le=ne[ye];switch(Le.type){case Ui:case Fo:ue=Le.endX,ge=Le.endY,xi(y,ue,ge,0,0);break;case _o:Gt.Dl(ue,ge,Le.point1X,Le.point1Y,Le.point2X,Le.point2Y,Le.endX,Le.endY,.5,y),ue=Le.endX,ge=Le.endY;break;case ds:Gt.iv(ue,ge,Le.point1X,Le.point1Y,Le.endX,Le.endY,.5,y),ue=Le.endX,ge=Le.endY;break;case wo:case ws:var ze=Le.type===wo?Ga(Le,ee):js(Le,ee,ue,ge),Ke=ze.length;if(Ke===0){ue=Le.type===wo?Le.centerX:Le.endX,ge=Le.type===wo?Le.centerY:Le.endY,xi(y,ue,ge,0,0);break}Le=null;for(var Je=0;Je<Ke;Je++)Le=ze[Je],Gt.Dl(Le[0],Le[1],Le[2],Le[3],Le[4],Le[5],Le[6],Le[7],.5,y);Le!==null&&(ue=Le[6],ge=Le[7]);break;default:jt("Unknown Segment type: "+Le.type)}}}break;default:jt("Unknown Geometry type: "+a.type)}}Ln.prototype.normalize=function(){this._isFrozen&&un(this);var a=this.ix();return this.offset(-a.x,-a.y),new st(-a.x,-a.y)},Ln.prototype.offset=function(a,y){return this._isFrozen&&un(this),this.transform(1,0,0,1,a,y),this},Ln.prototype.scale=function(a,y){return this._isFrozen&&un(this),this.transform(a,0,0,y,0,0),this},Ln.prototype.rotate=function(a,y,x){this._isFrozen&&un(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=jr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),jr.free(b),this},Qe=Ln.prototype,Qe.transform=function(a,y,x,b,E,ee){switch(this.type){case Ln.j:case Ln.u:case Ln.F:var ne=this.od,ae=this.pd;this.od=ne*a+ae*x+E,this.pd=ne*y+ae*b+ee,ne=this.Dc,ae=this.Ec,this.Dc=ne*a+ae*x+E,this.Ec=ne*y+ae*b+ee;break;case Ln.o:for(var ue=this.figures.s,ge=ue.length,ye=0;ye<ge;ye++){var Le=ue[ye];ne=Le.startX,ae=Le.startY,Le.startX=ne*a+ae*x+E,Le.startY=ne*y+ae*b+ee,Le=Le.segments.s;for(var ze=Le.length,Ke=0;Ke<ze;Ke++){var Je=Le[Ke];switch(Je.type){case Ui:case Fo:ne=Je.endX,ae=Je.endY,Je.endX=ne*a+ae*x+E,Je.endY=ne*y+ae*b+ee;break;case _o:ne=Je.point1X,ae=Je.point1Y,Je.point1X=ne*a+ae*x+E,Je.point1Y=ne*y+ae*b+ee,ne=Je.point2X,ae=Je.point2Y,Je.point2X=ne*a+ae*x+E,Je.point2Y=ne*y+ae*b+ee,ne=Je.endX,ae=Je.endY,Je.endX=ne*a+ae*x+E,Je.endY=ne*y+ae*b+ee;break;case ds:ne=Je.point1X,ae=Je.point1Y,Je.point1X=ne*a+ae*x+E,Je.point1Y=ne*y+ae*b+ee,ne=Je.endX,ae=Je.endY,Je.endX=ne*a+ae*x+E,Je.endY=ne*y+ae*b+ee;break;case wo:ne=Je.centerX,ae=Je.centerY,Je.centerX=ne*a+ae*x+E,Je.centerY=ne*y+ae*b+ee,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Je.startAngle+=ne),0>a&&(Je.startAngle=180-Je.startAngle,Je.sweepAngle=-Je.sweepAngle),0>b&&(Je.startAngle=-Je.startAngle,Je.sweepAngle=-Je.sweepAngle),Je.radiusX*=Math.sqrt(a*a+x*x),Je.radiusY!==void 0&&(Je.radiusY*=Math.sqrt(y*y+b*b));break;case ws:if(ne=Je.endX,ae=Je.endY,Je.endX=ne*a+ae*x+E,Je.endY=ne*y+ae*b+ee,Je.radiusX===0||Je.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Je.xAxisRotation+=ne),0>a&&(Je.xAxisRotation=180-Je.xAxisRotation,Je.isClockwiseArc=!Je.isClockwiseArc),0>b&&(Je.xAxisRotation=-Je.xAxisRotation,Je.isClockwiseArc=!Je.isClockwiseArc),Je.radiusX*=Math.sqrt(a*a+x*x),Je.radiusY*=Math.sqrt(y*y+b*b);break;default:jt("Unknown Segment type: "+Je.type)}}}}return this._isInvalidBounds=!0,this},Qe.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,ee=this.Ec;switch(this.type){case Ln.j:return Gt.Yb(x,b,E,ee,y,a.x,a.y);case Ln.u:var ne=$t.allocAt(Math.min(x,E)-y,Math.min(b,ee)-y,Math.abs(E-x)+2*y,Math.abs(ee-b)+2*y);return a=ne.ca(a),$t.free(ne),a;case Ln.F:ne=Math.min(x,E)-y;var ae=Math.min(b,ee)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(ee-b)+2*y)/2,0>=x||0>=y?!1:(ne=a.x-(ne+x),ae=a.y-(ae+y),1>=ne*ne/(x*x)+ae*ae/(y*y));case Ln.o:return ua(this,a,y,!0,!1);default:return!1}};function ua(a,y,x,b,E){var ee=y.x;y=y.y;for(var ne=a.bounds.x-20,ae=0,ue,ge,ye,Le,ze=a.figures.s,Ke=ze.length,Je=0;Je<Ke;Je++){var it=ze[Je],Tt=!it.isEvenOdd;if(it.isFilled){if(b&&it.ca(ee,y,x))return!0;var Pt=it.segments;ue=it.startX,ge=it.startY;for(var Nt=ue,At=ge,Bt=Pt.s,Rt=0;Rt<=Pt.length;Rt++){var Zt=void 0;if(Rt!==Pt.length){Zt=Bt[Rt];var On=Zt.type;a=Zt.endX,Le=Zt.endY}else On=Ui,a=Nt,Le=At;switch(On){case Fo:if(Nt=Us(ee,y,ne,y,ue,ge,Nt,At),isNaN(Nt))return!0;ae+=Nt,Nt=a,At=Le;break;case Ui:if(ue=Us(ee,y,ne,y,ue,ge,a,Le),isNaN(ue))return!0;ae+=ue;break;case _o:ye=Gt.Fo(ue,ge,Zt.point1X,Zt.point1Y,Zt.point2X,Zt.point2Y,a,Le,ne,y,ee,y,.5),ae+=ye;break;case ds:ye=Gt.Fo(ue,ge,(ue+2*Zt.point1X)/3,(ge+2*Zt.point1Y)/3,(2*Zt.point1X+a)/3,(2*Zt.point1Y+Le)/3,a,Le,ne,y,ee,y,.5),ae+=ye;break;case wo:case ws:On=Zt.type===wo?Ga(Zt,it):js(Zt,it,ue,ge);var rr=On.length;if(rr===0){if(ue=Us(ee,y,ne,y,ue,ge,Zt.type===wo?Zt.centerX:Zt.endX,Zt.type===wo?Zt.centerY:Zt.endY),isNaN(ue))return!0;ae+=ue;break}Zt=null;for(var $n=0;$n<rr;$n++){if(Zt=On[$n],$n===0){if(ye=Us(ee,y,ne,y,ue,ge,Zt[0],Zt[1]),isNaN(ye))return!0;ae+=ye}ye=Gt.Fo(Zt[0],Zt[1],Zt[2],Zt[3],Zt[4],Zt[5],Zt[6],Zt[7],ne,y,ee,y,.5),ae+=ye}Zt!==null&&(a=Zt[6],Le=Zt[7]);break;default:jt("Unknown Segment type: "+Zt.type)}ue=a,ge=Le}if(Tt){if(ae!==0)return!0}else if(ae%2!==0)return!0;ae=0}else if(it.ca(ee,y,E?x:x+2))return!0}return!1}function Us(a,y,x,b,E,ee,ne,ae){if(Gt.Yb(E,ee,ne,ae,.05,a,y))return NaN;var ue=(a-x)*(ee-ae);if(ue===0)return 0;var ge=((a*b-y*x)*(E-ne)-(a-x)*(E*ae-ee*ne))/ue;if(y=(a*b-y*x)*(ee-ae)/ue,ge>=a)return 0;if((E>ne?E-ne:ne-E)<(ee>ae?ee-ae:ae-ee)){if(ee<ae){if(y<ee||y>ae)return 0}else if(y<ae||y>ee)return 0}else if(E<ne){if(ge<E||ge>ne)return 0}else if(ge<ne||ge>E)return 0;return 0<ue?1:-1}function Hl(a,y,x,b){a=a.figures.s;for(var E=a.length,ee=0;ee<E;ee++)if(a[ee].ca(y,x,b))return!0;return!1}Qe.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new st),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,b=this.flattenedLengths,E=x.length,ee=this.flattenedTotalLength*a,ne=0,ae=0;ae<E;ae++){var ue=b[ae],ge=ue.length;for(a=0;a<ge;a++){var ye=ue[a];if(ne+ye>=ee)return b=ee-ne,b=ye===0?0:b/ye,x=x[ae],ae=x[2*a],E=x[2*a+1],y.h(ae+(x[2*a+2]-ae)*b,E+(x[2*a+3]-E)*b),y;ne+=ye}}return y},Qe.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,b=y.length,E=this.flattenedTotalLength*a,ee=0,ne=0;ne<b;ne++){var ae=x[ne],ue=ae.length;for(a=0;a<ue;a++){var ge=ae[a];if(ee+ge>=E)return E=y[ne],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;ee+=ge}}return NaN},Qe.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,b=this.flattenedLengths,E=x.length,ee=this.flattenedTotalLength*a,ne=0,ae=0;ae<E;ae++){var ue=b[ae],ge=ue.length;for(a=0;a<ge;a++){var ye=ue[a];if(ne+ye>=ee)return b=ee-ne,b=ye===0?0:b/ye,ye=x[ae],x=ye[2*a],ae=ye[2*a+1],E=ye[2*a+2],a=ye[2*a+3],y[0]=x+(E-x)*b,y[1]=ae+(a-ae)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-ae)?0:1>Math.abs(E-x)?0<=a-ae?90:270:1>Math.abs(a-ae)?0<=E-x?0:180:180*Math.atan2(a-ae,E-x)/Math.PI,y;ne+=ye}}return y},Qe.xx=function(a){if(this.type===Ln.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var ee=a.x;if(a=a.y,y===b){if(x<E){var ne=x;b=E}else ne=E,b=x;return a<=ne?ne===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-ne)}if(x===E)return y<b?ne=y:(ne=b,b=y),ee<=ne?ne===y?0:1:ee>=b?b===y?0:1:Math.abs(ee-y)/(b-ne);ne=(b-y)*(b-y)+(E-x)*(E-x);var ae=st.alloc();return Gt.qh(y,x,b,E,ee,a,ae),a=ae.x,ee=ae.y,st.free(ae),Math.sqrt(((a-y)*(a-y)+(ee-x)*(ee-x))/ne)}}else if(this.type===Ln.u){ne=this.startX,ae=this.startY;var ue=this.endX;if(E=this.endY,ne!==ue||ae!==E){y=ue-ne,x=E-ae,ee=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),ue),a=Math.min(Math.max(a,ae),E),ne=Math.abs(b-ne),ue=Math.abs(b-ue),ae=Math.abs(a-ae),E=Math.abs(a-E);var ge=Math.min(ne,ue,ae,E);if(ge===ae)return b/ee;if(ge===ue)return(y+a)/ee;if(ge===E)return(2*y+x-b)/ee;if(ge===ne)return(2*y+2*x-a)/ee}}else{y=this.flattenedSegments,x=this.flattenedLengths,ee=this.flattenedTotalLength,b=st.alloc(),E=1/0,ae=ne=0,ue=y.length;for(var ye=ge=0,Le=0;Le<ue;Le++)for(var ze=y[Le],Ke=x[Le],Je=ze.length,it=0;it<Je;it+=2){var Tt=ze[it],Pt=ze[it+1];if(it!==0){Gt.qh(ge,ye,Tt,Pt,a.x,a.y,b);var Nt=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Nt<E&&(E=Nt,ne=ae,ne+=Math.sqrt((b.x-ge)*(b.x-ge)+(b.y-ye)*(b.y-ye))),ae+=Ke[(it-2)/2]}ge=Tt,ye=Pt}return st.free(b),a=ne/ee,0>a?0:1<a?1:a}return 0};function Fu(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===Ln.j)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.endY),y.push(b),E.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(E);else if(a.type===Ln.u)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.startY),b.push(a.endX),b.push(a.endY),b.push(a.startX),b.push(a.endY),b.push(a.startX),b.push(a.startY),y.push(b),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),x.push(E);else if(a.type===Ln.F){var ee=new Oo;ee.startX=a.endX,ee.startY=(a.startY+a.endY)/2;var ne=new pi(wo);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,ee.add(ne),a=Ga(ne,ee),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=ee.startX,ee=ee.startY;for(var ae=0;ae<E;ae++){var ue=a[ae];Gt.Qe(ne,ee,ue[2],ue[3],ue[4],ue[5],ue[6],ue[7],.5,b),ne=ue[6],ee=ue[7]}}y.push(b),x.push(Du(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),ne=E.startX,ee=E.startY,ae=ne,ue=ee;for(var ge=E.segments.s,ye=ge.length,Le=0;Le<ye;Le++){var ze=ge[Le];switch(ze.type){case Fo:4<=b.length&&(y.push(b),x.push(Du(b))),b=[],b.push(ze.endX),b.push(ze.endY),ne=ze.endX,ee=ze.endY,ae=ne,ue=ee;break;case Ui:b.push(ze.endX),b.push(ze.endY),ne=ze.endX,ee=ze.endY;break;case _o:Gt.Qe(ne,ee,ze.point1X,ze.point1Y,ze.point2X,ze.point2Y,ze.endX,ze.endY,.5,b),ne=ze.endX,ee=ze.endY;break;case ds:Gt.ep(ne,ee,ze.point1X,ze.point1Y,ze.endX,ze.endY,.5,b),ne=ze.endX,ee=ze.endY;break;case wo:var Ke=Ga(ze,E),Je=Ke.length;if(Je===0){b.push(ze.centerX),b.push(ze.centerY),ne=ze.centerX,ee=ze.centerY;break}for(var it=0;it<Je;it++){var Tt=Ke[it];Gt.Qe(ne,ee,Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7],.5,b),ne=Tt[6],ee=Tt[7]}break;case ws:if(Ke=js(ze,E,ne,ee),Je=Ke.length,it=ze.endX,Tt=ze.endY,Je===0){b.push(it),b.push(Tt),ne=it,ee=Tt;break}for(it=0;it<Je;it++)Tt=Ke[it],Gt.Qe(ne,ee,Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7],.5,b),ne=Tt[6],ee=Tt[7];break;default:jt("Segment not of valid type: "+ze.type)}ze.isClosed&&(b.push(ae),b.push(ue))}4<=b.length&&(y.push(b),x.push(Du(b)))}}}function Du(a){for(var y=[],x=0,b=0,E=a.length,ee=0;ee<E;ee+=2){var ne=a[ee],ae=a[ee+1];ee!==0&&y.push(Math.sqrt(Lr(x,b,ne,ae))),x=ne,b=ae}return y}Qe.add=function(a){return this.ee.add(a),this},Qe.pm=function(a,y,x,b,E,ee,ne,ae){return this._isFrozen&&un(this),this.fg=new Mn(a,y,E,ee).freeze(),this.gg=new Mn(x,b,ne,ae).freeze(),this},zt.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 Fu(this),this.tk}},flattenedLengths:{get:function(){return Fu(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,b=a=0;b<x;b++)for(var E=y[b],ee=E.length,ne=0;ne<ee;ne++)a+=E[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&un(this,a),this.na=a,a===Ln.o?this.ee=new rn:(Ln.V===null&&(Ln.V=new rn().freeze()),this.ee=Ln.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&un(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&un(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&un(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&un(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&un(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&un(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&un(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&un(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),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 an(Ln,"Line",0),Ln.u=new an(Ln,"Rectangle",1),Ln.F=new an(Ln,"Ellipse",2),Ln.o=new an(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 Oo(a,y,x,b,E){hr(this),x===void 0&&(x=!0),b===void 0&&(b=!0),E===void 0&&(E=!1),this.l=2|(x?4:0)|(b?8:0)|(E?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new rn,this.sr=this.pl.Ja,this.fw=null}Oo.prototype.copy=function(){var a=new Oo;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var ee=y[E].copy();b.add(ee)}return a.sr=this.sr,a.fw=this.fw,a},Qe=Oo.prototype,Qe.Xa=function(a){if(!(a instanceof Oo&&Gt.B(this.startX,a.startX)&&Gt.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 b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0},Qe.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,b=x.length,E=0;E<b;E++)y+=" "+x[E].toString(a);return y},Qe.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},Qe.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},Qe.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},Qe.add=function(a){return this.pl.add(a),this},Qe.ca=function(a,y,x){for(var b=this.startX,E=this.startY,ee=b,ne=E,ae=this.segments.s,ue=ae.length,ge=0;ge<ue;ge++){var ye=ae[ge];switch(ye.type){case Fo:ee=ye.endX,ne=ye.endY,b=ye.endX,E=ye.endY;break;case Ui:if(Gt.Yb(b,E,ye.endX,ye.endY,x,a,y))return!0;b=ye.endX,E=ye.endY;break;case _o:if(Gt.cs(b,E,ye.point1X,ye.point1Y,ye.point2X,ye.point2Y,ye.endX,ye.endY,.5,a,y,x))return!0;b=ye.endX,E=ye.endY;break;case ds:if(Gt.jv(b,E,ye.point1X,ye.point1Y,ye.endX,ye.endY,.5,a,y,x))return!0;b=ye.endX,E=ye.endY;break;case wo:case ws:var Le=ye.type===wo?Ga(ye,this):js(ye,this,b,E),ze=Le.length,Ke=ye.type===wo?ye.centerX:ye.endX,Je=ye.type===wo?ye.centerY:ye.endY;if(ze===0){if(Gt.Yb(b,E,Ke,Je,x,a,y))return!0;b=Ke,E=Je;break}for(Ke=null,Je=0;Je<ze;Je++)if(Ke=Le[Je],Je===0&&Gt.Yb(b,E,Ke[0],Ke[1],x,a,y)||Gt.cs(Ke[0],Ke[1],Ke[2],Ke[3],Ke[4],Ke[5],Ke[6],Ke[7],.5,a,y,x))return!0;Ke!==null&&(b=Ke[6],E=Ke[7]);break;default:jt("Unknown Segment type: "+ye.type)}if(ye.isClosed&&(b!==ee||E!==ne)&&Gt.Yb(b,E,ee,ne,x,a,y))return!0}return!1},zt.Object.defineProperties(Oo.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&un(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&un(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&un(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&un(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&un(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&un(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Oo.prototype.add=Oo.prototype.add,Oo.prototype.equalsApprox=Oo.prototype.Xa,Oo.className="PathFigure";function pi(a,y,x,b,E,ee,ne,ae){hr(this),a===void 0&&(a=Ui),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,b===void 0&&(b=0),E===void 0&&(E=0),ee===void 0&&(ee=0),ne===void 0&&(ne=0),a===ws?(a=ee%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),ae&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===wo&&(ee=Math.max(ee,0)),this.Wh=ee,typeof ne=="number"?(a===wo&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}pi.prototype.copy=function(){var a=new pi;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},Qe=pi.prototype,Qe.Xa=function(a){if(!(a instanceof pi)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Fo:case Ui:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY);case _o:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.point1X,a.point1X)&&Gt.B(this.point1Y,a.point1Y)&&Gt.B(this.point2X,a.point2X)&&Gt.B(this.point2Y,a.point2Y);case ds:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.point1X,a.point1X)&&Gt.B(this.point1Y,a.point1Y);case wo:return Gt.B(this.startAngle,a.startAngle)&&Gt.B(this.sweepAngle,a.sweepAngle)&&Gt.B(this.centerX,a.centerX)&&Gt.B(this.centerY,a.centerY)&&Gt.B(this.radiusX,a.radiusX)&&Gt.B(this.radiusY,a.radiusY);case ws:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Gt.B(this.xAxisRotation,a.xAxisRotation)&&Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.radiusX,a.radiusX)&&Gt.B(this.radiusY,a.radiusY);default:return!1}},Qe.qb=function(a){a.classType===pi&&(this.type=a)},Qe.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Fo:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ui:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case _o: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 ds: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 wo: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 ws: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":"")},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return this._isFrozen=!1,this},Qe.close=function(){return this.isClosed=!0,this};function Ga(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,ee=Gt.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=jr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Ln.Ha(ee,ne),jr.free(ne)}for(x=ee.length,b=0;b<x;b++)ne=ee[b],ne[0]+=y,ne[1]+=E,ne[2]+=y,ne[3]+=E,ne[4]+=y,ne[5]+=E,ne[6]+=y,ne[7]+=E;return a.ae=ee,a.ae}function js(a,y,x,b){function E(it,Tt,Pt,Nt){return(it*Nt<Tt*Pt?-1:1)*Math.acos((it*Pt+Tt*Nt)/(Math.sqrt(it*it+Tt*Tt)*Math.sqrt(Pt*Pt+Nt*Nt)))}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 ee=a.Pg;y===0&&(y=1e-4),ee===0&&(ee=1e-4);var ne=Math.PI/180*a.Ne,ae=a.isLargeArc,ue=a.isClockwiseArc,ge=a.Dc,ye=a.Ec,Le=Math.cos(ne),ze=Math.sin(ne),Ke=Le*(x-ge)/2+ze*(b-ye)/2;ne=-ze*(x-ge)/2+Le*(b-ye)/2;var Je=Ke*Ke/(y*y)+ne*ne/(ee*ee);return 1<Je&&(y*=Math.sqrt(Je),ee*=Math.sqrt(Je)),Je=(ae===ue?-1:1)*Math.sqrt((y*y*ee*ee-y*y*ne*ne-ee*ee*Ke*Ke)/(y*y*ne*ne+ee*ee*Ke*Ke)),isNaN(Je)&&(Je=0),ae=Je*y*ne/ee,Je=Je*-ee*Ke/y,isNaN(ae)&&(ae=0),isNaN(Je)&&(Je=0),x=(x+ge)/2+Le*ae-ze*Je,b=(b+ye)/2+ze*ae+Le*Je,ye=E(1,0,(Ke-ae)/y,(ne-Je)/ee),Le=(Ke-ae)/y,ge=(ne-Je)/ee,Ke=(-Ke-ae)/y,ae=(-ne-Je)/ee,ne=E(Le,ge,Ke,ae),Ke=(Le*Ke+ge*ae)/(Math.sqrt(Le*Le+ge*ge)*Math.sqrt(Ke*Ke+ae*ae)),-1>=Ke?ne=Math.PI:1<=Ke&&(ne=0),!ue&&0<ne&&(ne-=2*Math.PI),ue&&0>ne&&(ne+=2*Math.PI),ue=y>ee?1:y/ee,Ke=y>ee?ee/y:1,y=Gt.jx(0,0,y>ee?y:ee,ye,ye+ne,!0),ee=jr.alloc(),ee.reset(),ee.translate(x,b),ee.rotate(a.Ne,0,0),ee.scale(ue,Ke),Ln.Ha(y,ee),jr.free(ee),a.ae=y,a.ae}zt.Object.defineProperties(pi.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return(this.l&8)!==0},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{get:function(){return this.na},set:function(a){this._isFrozen&&un(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&un(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&un(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&un(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&un(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&un(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&un(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&un(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&un(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&An(a,">= zero",pi,"radiusX"),this._isFrozen&&un(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&An(a,">= zero",pi,"radiusY"),this._isFrozen&&un(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&un(this,a),a%=360,0>a&&(a+=360),this.Dc=a,this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&un(this,a),360<a&&(a=360),-360>a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&un(this,a),this.l=a?this.l|4:this.l&-5,this._isInvalidBounds=!0}},isLargeArc:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&un(this,a),this.l=a?this.l|16:this.l&-17,this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(a){this._isFrozen&&un(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),pi.prototype.equalsApprox=pi.prototype.Xa;var Fo=new an(pi,"Move",0),Ui=new an(pi,"Line",1),_o=new an(pi,"Bezier",2),ds=new an(pi,"QuadraticBezier",3),wo=new an(pi,"Arc",4),ws=new an(pi,"SvgArc",4);pi.className="PathSegment",pi.Move=Fo,pi.Line=Ui,pi.Bezier=_o,pi.QuadraticBezier=ds,pi.Arc=wo,pi.SvgArc=ws;function va(){this.H=null,this.xu=new st(0,0).freeze(),this.mt=new st(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}va.prototype.copy=function(){var a=new va;return this.clone(a)},va.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},va.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},va.prototype.So=function(a,y){var x=this.diagram;return x===null||bp(x,a,y),y},va.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(bp(x,a,y),y.assign(x.Ps(y))),y},zt.Object.defineProperties(va.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}}}),va.prototype.getMultiTouchDocumentPoint=va.prototype.Bz,va.prototype.getMultiTouchViewPoint=va.prototype.So,va.className="InputEvent";function au(){this.H=null,this.xa="",this.ar=this.Lr=null}au.prototype.copy=function(){var a=new au;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},au.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},zt.Object.defineProperties(au.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}}}),au.className="DiagramEvent";function oo(){this.Fm=no,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}oo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},oo.prototype.copy=function(){var a=new oo;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=ln(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=ln(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=ln(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=ln(y)&&typeof y.J=="function"?y.J():y,a},oo.prototype.qb=function(a){a.classType===oo&&(this.change=a)},oo.prototype.toString=function(){var a="";return a=this.change===Ea?a+"* ":this.change===no?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===Ea?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Fr(this.object)),this.oldValue!==null&&(a+=" old: "+Fr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Fr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},oo.prototype.I=function(a){return a?this.oldValue:this.newValue},oo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},oo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},oo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},oo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},oo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},zt.Object.defineProperties(oo.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===Ea&&(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}}}),oo.prototype.redo=oo.prototype.redo,oo.prototype.canRedo=oo.prototype.canRedo,oo.prototype.undo=oo.prototype.undo,oo.prototype.canUndo=oo.prototype.canUndo,oo.prototype.getParam=oo.prototype.Dz,oo.prototype.getValue=oo.prototype.I,oo.prototype.clear=oo.prototype.clear;var Ea=new an(oo,"Transaction",-1),no=new an(oo,"Property",0),bo=new an(oo,"Insert",1),Eo=new an(oo,"Remove",2);oo.className="ChangedEvent",oo.Transaction=Ea,oo.Property=no,oo.Insert=bo,oo.Remove=Eo;function zo(){this.o=new rn().freeze(),this.xa="",this.j=!1}zo.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var b=this.changes.M(x);b!==null&&(y+=`
|
|
`+b.toString())}}return y},zo.prototype.clear=function(){var a=this.changes;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),a.freeze()},zo.prototype.canUndo=function(){return this.isComplete},zo.prototype.undo=function(){if(this.canUndo())for(var a=this.changes.count-1;0<=a;a--){var y=this.changes.M(a);y!==null&&y.undo()}},zo.prototype.canRedo=function(){return this.isComplete},zo.prototype.redo=function(){if(this.canRedo())for(var a=this.changes.count,y=0;y<a;y++){var x=this.changes.M(y);x!==null&&x.redo()}},zo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new tn,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===no&&b.object){var E=y.get(b.object);E||(E=new tn,y.set(b.object,E));var ee=E.get(b.propertyName);ee===null?E.set(b.propertyName,-1):(0<ee&&a.cd(ee,null),E.set(b.propertyName,x))}}for(x=y=0;x<a.count;x++)b=a.M(x),b!==null&&(x>y&&a.cd(y,b),y++);for(;a.length>y;)a.pop();a.freeze()}},zt.Object.defineProperties(zo.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}}),zo.prototype.optimize=zo.prototype.ak,zo.prototype.redo=zo.prototype.redo,zo.prototype.canRedo=zo.prototype.canRedo,zo.prototype.undo=zo.prototype.undo,zo.prototype.canUndo=zo.prototype.canUndo,zo.prototype.clear=zo.prototype.clear,zo.className="Transaction";function ho(){this.Pt=new sn,this.Jd=!1,this.u=new rn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new rn().freeze(),this.hl=new rn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}ho.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;b<x;b++)0<b&&(y+=" "),y+=this.nestedTransactionNames.M(b);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,b=0;b<x;b++)y+=`
|
|
`+this.history.M(b).toString(a-1);return y},ho.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},ho.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Qe=ho.prototype,Qe.Xw=function(a){this.Pt.add(a)},Qe.Rx=function(a){this.Pt.remove(a)},Qe.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},Qe.eb=function(a){return a===void 0&&(a=""),Bu(this,!0,a)},Qe.Kf=function(){return Bu(this,!1,"")};function Bu(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Yn("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var ee=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(ee=a.hl.M(ne-1),a.hl.mb(ne-1))}if(b){if(y)a.rq=!1,E===null&&x!==""&&(E=a.currentTransaction),a.isEnabled&&E!==null&&(E.isComplete||(E.isComplete=!0,E.name=x),a.lx(),y=a.history,y.ka(),b=a.maxHistoryLength,0<=b&&(b===0?y.clear():y.count>=b&&(ee=y.M(0),ee!==null&&ee.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=ee,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);x.freeze()}return!1}Qe.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()}},ho.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},ho.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){Yn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},ho.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},ho.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){Yn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},ho.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new oo;for(b.change=Ea,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},ho.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new zo);var x=a.copy();y=y.changes,y.ka(),y.add(x),y.freeze(),this.checksTransactionLevel&&0>=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||Yn("Change not within a transaction: "+x.toString()))}},ho.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},zt.Object.defineProperties(ho.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}}}),ho.prototype.handleChanged=ho.prototype.Tu,ho.prototype.redo=ho.prototype.redo,ho.prototype.undo=ho.prototype.undo,ho.prototype.canUndo=ho.prototype.canUndo,ho.prototype.discardHistoryAfterIndex=ho.prototype.lx,ho.prototype.rollbackTransaction=ho.prototype.Kf,ho.prototype.commitTransaction=ho.prototype.eb,ho.prototype.startTransaction=ho.prototype.Ea,ho.prototype.removeModel=ho.prototype.Rx,ho.prototype.addModel=ho.prototype.Xw,ho.prototype.clear=ho.prototype.clear,ho.className="UndoManager";function fi(){hr(this),this.H=cu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new va,this.Zr=-1}fi.prototype.toString=function(){return this.name!==""?this.name+" Tool":dr(this.constructor)},fi.prototype.updateAdornments=function(){},fi.prototype.canStart=function(){return this.isEnabled},fi.prototype.doStart=function(){},fi.prototype.doActivate=function(){this.isActive=!0},fi.prototype.doDeactivate=function(){this.isActive=!1},fi.prototype.doStop=function(){},fi.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},fi.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},fi.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},fi.prototype.doMouseMove=function(){},fi.prototype.doMouseUp=function(){this.stopTool()},fi.prototype.doMouseWheel=function(){},fi.prototype.canStartMultiTouch=function(){return!0},fi.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,st.allocAt(NaN,NaN)),b=y.So(1,st.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,ee=b.y-x.y;a.Jw=Math.sqrt(E*E+ee*ee),y.bubbles=!1}st.free(x),st.free(b)},fi.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,st.allocAt(NaN,NaN)),b=y.So(1,st.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,ee=b.y-x.y;ee=Math.sqrt(E*E+ee*ee)/a.Jw,E=new st((Math.min(b.x,x.x)+Math.max(b.x,x.x))/2,(Math.min(b.y,x.y)+Math.max(b.y,x.y))/2),ee*=a.Bw;var ne=a.commandHandler;if(ee!==a.scale&&ne.canResetZoom(ee)){var ae=a.zoomPoint;a.zoomPoint=E,ne.resetZoom(ee),a.zoomPoint=ae}y.bubbles=!1}st.free(x),st.free(b)},fi.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},fi.prototype.doKeyUp=function(){},fi.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},fi.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},fi.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(ti?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||(ti?y.meta:y.control)||y.shift||a.clearSelection()}},fi.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(E){return!E.layer.isTemporary});var x=this.diagram,b=x.lastInput;return a=x.ic(b.documentPoint,a,y),b.targetObject=a,uf(a,b,x),b.handled};function uf(a,y,x){if(y.handled=!1,a===null||a.If()){var b=0;y.left?b=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(b=3);var E="ObjectSingleClicked";if(a!==null){switch(b){case 1:E="ObjectSingleClicked";break;case 2:E="ObjectDoubleClicked";break;case 3:E="ObjectContextClicked"}b!==0&&x.R(E,a)}else{switch(b){case 1:E="BackgroundSingleClicked";break;case 2:E="BackgroundDoubleClicked";break;case 3:E="BackgroundContextClicked"}b!==0&&x.R(E)}if(a!==null)for(;a!==null;){switch(x=null,b){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,b){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)}}}fi.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var b=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(b=null),y.targetObject=b;var E=!1;if(b!==a.Ck){var ee=a.Ck,ne=ee;for(a.Ck=b,this.doCurrentObjectChanged(ee,b),y.handled=!1;ee!==null;){var ae=ee.mouseLeave;if(ae!==null&&(b===ee||b!==null&&b.rg(ee)||(ae(y,ee,b),E=!0,y.handled)))break;ee=ee.panel}for(ee=ne,y.handled=!1;b!==null&&(ne=b.mouseEnter,!(ne!==null&&(ee===b||ee!==null&&ee.rg(b)||(ne(y,b,ee),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(ee=b,ne="";ee!==null&&(ne=ee.cursor,ne==="");)ee=ee.panel;for(a.currentCursor=ne,y.handled=!1,ee=b;ee!==null&&(b=ee.mouseOver,!(b!==null&&(b(y,ee),E=!0,y.handled)));)ee=ee.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},fi.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},fi.prototype.doCurrentObjectChanged=function(){},fi.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var b=a.commandHandler,E=a.toolManager.mouseWheelBehavior;if(b!==null&&(E===ih&&!y.shift||E===su&&y.control))(0<x?b.canIncreaseZoom():b.canDecreaseZoom())&&(E=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?b.increaseZoom():b.decreaseZoom(),a.zoomPoint=E),y.bubbles=!1;else if(E===ih&&y.shift||E===su&&!y.control){b=a.position.copy();var ee=y.event;E=ee.deltaMode;var ne=ee.deltaX;ee=ee.deltaY;var ae="pixel";if(ne===0&&ee===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(ae,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(ae,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:ae="pixel";break;case 1:ae="line";break;case 2:ae="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(ae,0<ne?"right":"left",Math.abs(ne))),ee!==0&&a.allowVerticalScroll&&(ee*=a.scrollVerticalLineChange/16,a.scroll(ae,0<ee?"down":"up",Math.abs(ee)))}this.doWheelChange(a,b,y)}}},fi.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},fi.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Yt(function(){x.doWaitAfter(b)},a)},fi.prototype.cancelWaitAfter=function(){this.Zr!==-1&&yn.clearTimeout(this.Zr),this.Zr=-1},fi.prototype.doWaitAfter=function(){},fi.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof gi);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},fi.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var b=x.toolManager.dragSize,E=b.width;return b=b.height,x.firstInput.isTouchEvent&&(E+=6,b+=6),Math.abs(y.x-a.x)>E||Math.abs(y.y-a.y)>b},zt.Object.defineProperties(fi.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Jt&&(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}}}),fi.prototype.startTransaction=fi.prototype.Ea,fi.className="Tool";function Ji(){fi.call(this),this.name="ToolManager",this.hb=new rn,this.ob=new rn,this.Hb=new rn,this.F=this.V=850,this.o=new vn(2,2).ja(),this.Ha=5e3,this.ia=su,this.u=_h,this.Mp=this.j=null,this.zj=-1}Wt(Ji,fi),Ji.prototype.initializeStandardTools=function(){},Ji.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof gi&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Ji.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Nl&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Iu){y.bubbles=!0;return}if(this.gestureBehavior===Nl)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===su?this.mouseWheelBehavior=ih:this.mouseWheelBehavior===ih&&(this.mouseWheelBehavior=su)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Ji.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Iu){y.bubbles=!0;return}if(this.gestureBehavior===Nl)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,b=0;b<x;b++){var E=this.mouseMoveTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseMove());return}}Cc(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Cc(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Ji.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof gi&&(y===a||y.rg(a))||this.hideToolTip()},Ji.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()))},Ji.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)},Ji.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 gi)||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()},Ji.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof gi){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof Zl&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(yn.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Yt(function(){E.hideToolTip()},a)}},Ji.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y=x.y+20/y.scale+b.height>E.bottom?x.y-(b.height+5/y.scale):x.y+20/y.scale,x.y<E.y&&(x.y=E.y),a.position=x}},Ji.prototype.hideToolTip=function(){this.zj!==-1&&(yn.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof gi?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Zl&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Ji.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var b=this.mouseUpTools.M(x);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseUp());return}}a.doFocus(),this.doDeactivate()},Ji.prototype.doMouseWheel=function(){this.standardMouseWheel()},Ji.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Ji.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Ji.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var b=this.mouseDownTools.M(x);if(b.name===a)return b}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(b=this.mouseMoveTools.M(x),b.name===a)return b;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(b=this.mouseUpTools.M(x),b.name===a)return b;return null},Ji.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.name===a)return y!==null?this.mouseDownTools.cd(b,y):this.mouseDownTools.mb(b),E}for(x=this.mouseMoveTools.length,b=0;b<x;b++)if(E=this.mouseMoveTools.M(b),E.name===a)return y!==null?this.mouseMoveTools.cd(b,y):this.mouseMoveTools.mb(b),E;for(x=this.mouseUpTools.length,b=0;b<x;b++)if(E=this.mouseUpTools.M(b),E.name===a)return y!==null?this.mouseUpTools.cd(b,y):this.mouseUpTools.mb(b),E;return null},Ji.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)},zt.Object.defineProperties(Ji.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 gi?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}}}),Ji.prototype.replaceStandardTool=Ji.prototype.gb;var su=new an(Ji,"WheelScroll",0),ih=new an(Ji,"WheelZoom",1),Ec=new an(Ji,"WheelNone",2),_h=new an(Ji,"GestureZoom",3),Nl=new an(Ji,"GestureCancel",4),Iu=new an(Ji,"GestureNone",5);Ji.className="ToolManager",Ji.WheelScroll=su,Ji.WheelZoom=ih,Ji.WheelNone=Ec,Ji.GestureZoom=_h,Ji.GestureCancel=Nl,Ji.GestureNone=Iu;function lo(){fi.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 st(NaN,NaN),this.Fr=new st,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new sn().freeze(),this.ia=new he,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var nl;Wt(lo,fi),lo.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},lo.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},lo.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,(ti?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},lo.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),ha=null,this.isActive=!0,this.tl.set(a.position),zh(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&&as(a),pd(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,ha=this,oh=this.diagram,this.doSimulatedDragOut()))};function zh(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Tn?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new Os,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}lo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},lo.prototype.Pd=function(a){return a===void 0?new Uu(Bn):this.isGridSnapEnabled?new Uu(new st(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Uu(a.copy())},lo.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Wl(this),$h(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<nl.count){for(var y=nl,x=y.length,b=0;b<x;b++){var E=y.M(b);ao(E),Ki(E),Wl(E),E.diagram.ug()}y.clear()}ao(this),this.tl.h(NaN,NaN),oh!==null&&(oh.currentCursor=""),ha=oh=null,Ki(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),bf(a,!0)},lo.prototype.stopTransaction=function(){var a=this.diagram,y=fi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Wl(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,lu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function kc(){var a=ha;Ki(a),Fa(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}lo.prototype.doCancel=function(){Ki(this),Fa(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},lo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},lo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Kl(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):Fa(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 tn,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var ee=y.I(E);ee!==null&&(ee.location=E.location,ee.Va(),x.add(ee,a.Pd(ee.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof Tn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,zh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ch(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Ki(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof Tn&&(x.value.point=new st(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function ao(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 Zo(a,y,x){var b=a.diagram,E=a.startPoint,ee=st.alloc();ee.assign(b.lastInput.documentPoint),a.moveParts(y,ee.re(E),x),st.free(ee),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(as(b),b.hk())}lo.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Qh(b,a,y,this.dragOptions,x)};function Fa(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof Tn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Ch(b,-E.x,-E.y)}y.bd()}}function ka(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),rl(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var ee=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=lu(a,E,b),!a.isActive&&ha===null)return;var ae=b!==null?b.part:null;if(ae===null||x.handlesDragDropForTopLevelParts&&ae.isTopLevel&&!(ae instanceof Br)){var ue=x.mouseDragOver;ue!==null&&(ue(E),ne=!0)}if(!a.isActive&&ha===null||(a.doDragOver(y,b),!a.isActive&&ha===null))return}finally{x.skipsUndoManager=ee,ne&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}lo.prototype.findDragOverObject=function(a){var y=this;return fu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof gi||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},lo.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 lu(a,y,x){var b=!1,E=a.Cg.length,ee=0<E?a.Cg[0]:null;if(x===ee)return!1;y.handled=!1;for(var ne=0;ne<E;ne++){var ae=a.Cg[ne],ue=ae.mouseDragLeave;if(ue!==null&&(ue(y,ae,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&ha===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=Vl(E);for(E=a.Cg.length,x=0;x<E&&(ne=a.Cg[x],ae=ne.mouseDragEnter,ae===null||(ae(y,ne,ee),b=!0,!y.handled));x++);return b}function Vl(a){var y=a.panel;return y!==null?y:a instanceof Sr&&!(a instanceof Br)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function uu(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(ge){return b.findValidLinkablePort(ge,x)});a=st.alloc();var ee=1/0,ne=null;for(E=E.iterator;E.next();){var ae=E.value;if(ae.part!==null){var ue=ae.ga(ai,a);ue=y.Bf(ue),ue<ee&&(ne=ae,ee=ue)}}return st.free(a),ne}function rl(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var b=a.diagram;if(!b.isReadOnly){var E=a.Oe;if(E!==null){var ee=null,ne=null;x.fromNode===null&&(ee=uu(a,x.i(0),!1),ee!==null&&(ne=ee.part));var ae=null,ue=null;x.toNode===null&&(ae=uu(a,x.i(x.pointsCount-1),!0),ae!==null&&(ue=ae.part)),E.isValidLink(ne,ee,ue,ae)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,ee!==null&&(x.fromPortId=ee.portId),x.toNode=ue,ae!==null&&(x.toPortId=ae.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):ed(E,ne,ee,ue,ae):ed(E,null,null,null,null)}}}}lo.prototype.doDragOver=function(){};function Al(a,y){var x=a.diagram;a.dragsLink&&rl(a,!0),Wl(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var ee=b;ee!==null;){var ne=ee.mouseDrop;if(ne!==null&&(ne(E,ee),E.handled))break;Qv(a,E,ee),ee=Vl(ee)}}else ee=x.mouseDrop,ee!==null&&ee(E);if(a.isActive||ha!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)ee=E.key,ee instanceof _n&&ee.linksConnected.each(function(ae){ae.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||ha!==null){for(a=$t.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof _n&&$v(x,b,a);$t.free(a)}}}function Qv(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Br||(x=a.mouseDrop,x!==null&&x(y))}function $v(a,y,x){var b=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(b=!0),a=a.Nu(x,function(E){return E.part},function(E){return E instanceof Tn},!0,function(E){return E instanceof Tn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}lo.prototype.doDropOnto=function(){},lo.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()?(Kl(this,!1),pd(a,this.copiedParts),Zo(this,this.copiedParts,!1),$h(a,this.copiedParts)):this.mayMove()?(Ki(this),Zo(this,this.draggedParts,!0)):this.mayDragOut()?(Kl(this,!1),Zo(this,this.copiedParts,!1)):Ki(this),ka(this,a.lastInput.documentPoint))}},lo.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?(Ki(this),Kl(this,!0),pd(a,this.copiedParts),Zo(this,this.copiedParts,!1),$h(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0}))):(y=!0,Ki(this),this.mayMove()&&(Zo(this,this.draggedParts,!0),ka(this,a.lastInput.documentPoint))),this.Ym=!0,Al(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&qv(this),a.Ya(),$h(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},lo.prototype.simulatedMouseMove=function(a,y,x){if(ha===null)return!1;var b=ha.diagram;x instanceof Jt||(x=null);var E=oh;return x!==E&&(E!==null&&E!==b&&(E.ug(),ha.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),oh=x,x!==null&&x!==b&&(kc(),E=x.toolManager.findTool("Dragging"),E!==null&&(nl.contains(E)||nl.add(E),E.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===b||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(b=x.toolManager.findTool("Dragging"),b!==null&&(a!==null&&(a.targetTouches!==void 0&&(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,b.doSimulatedDragOver()),!0)},lo.prototype.simulatedMouseUp=function(a,y,x){if(ha===null)return!1;var b=oh,E=ha.diagram;if(x===null)return ha.doCancel(),!0;if(x!==b){var ee=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&ee!==null)return b.ug(),ha.isDragOutStarted=!1,ee.doSimulatedDragLeave(),!1;oh=x,b=x.toolManager.findTool("Dragging"),b!==null&&(kc(),nl.contains(b)||nl.add(b),b.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 st),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=ha,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function qv(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof _n&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}lo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(ti?!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())},lo.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())},lo.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())},lo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},lo.prototype.Az=function(){return ha},lo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=ha;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},lo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ks(a),a.animationManager.Cc(),a=ha,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},lo.prototype.doSimulatedDragLeave=function(){var a=ha;a!==null&&a.doSimulatedDragOut(),this.doCancel()},lo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=ha;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Rg(this,y.draggedParts.Lf(),!1,a.firstInput),Zo(this,this.copiedParts,!1),ka(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},lo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=ha;if(y!==null){var x=y.diagram;if(y.Ym=!0,Ki(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Rg(this,y.draggedParts.Lf(),!0,a.lastInput),Zo(this,this.copiedParts,!1);var b=new sn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Al(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",b,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function Rg(a,y,x,b){if(a.copiedParts===null){var E=a.diagram;if(!E.isReadOnly&&!E.isModelReadOnly){E.skipsUndoManager=!x,E.partManager.addsToTemporaryLayer=!x,a.startPoint=b.documentPoint,x=E.Kj(y,E,!0);var ee=$t.alloc();E=b=1/0;for(var ne=-1/0,ae=-1/0,ue=y.iterator;ue.next();){var ge=ue.value;if(ge.isVisible()){var ye=ge.location;ge=ye.x,ye=ye.y,isNaN(ge)||isNaN(ye)||(ge<b&&(b=ge),ye<E&&(E=ye),ge>ne&&(ne=ge),ye>ae&&(ae=ye))}}for(b===1/0?ee.h(0,0,0,0):ee.h(b,E,ne-b,ae-E),b=ee.x+ee.width/2,E=ee.y+ee.height/2,$t.free(ee),ee=a.Fr,ne=new tn,ae=st.alloc(),ue=y.iterator;ue.next();)ge=ue.value,ge instanceof Tn&&ge.canCopy()&&(ye=x.I(ge),ye!==null&&(ye.points=ge.points,Ch(ye,ee.x-b,ee.y-E),ye.suspendsRouting=!0,ne.add(ye,a.Pd())));for(y=y.iterator;y.next();)ge=y.value,ge.Zc()&&ge.canCopy()&&(ue=x.I(ge),ue!==null&&(ge=ge.location,ae.h(ee.x-(b-ge.x),ee.y-(E-ge.y)),ue.location=ae,ue.Va(),ne.add(ue,a.Pd(ae))));st.free(ae),a.copiedParts=ne,zh(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ch(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}lo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},lo.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new st},zt.Object.defineProperties(lo.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}}}),lo.prototype.getDraggingSource=lo.prototype.Az;var ha=null,oh=null;lo.className="DraggingTool",nl=new rn,Rr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Ji.prototype.doCancel=function(){ha!==null&&ha.doCancel(),fi.prototype.doCancel.call(this)};function So(){fi.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Tn,y=new Ur;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Ur,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new _n,y=new Ur,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Or,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new _n,y=new Ur,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Or,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 tn,this.Of=this.gj=this.Pf=null}Wt(So,fi),So.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},So.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var ee=y.Df(),ne=vn.alloc();ne.width=y.naturalBounds.width*ee,ne.height=y.naturalBounds.height*ee,b.desiredSize=ne,vn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=ai,ee=st.alloc(),x.location=y.ga(ai,ee),st.free(ee),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},So.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Or,y.fromSpot=Wr,y.toSpot=Wr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},So.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},So.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof _n){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)}},So.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof _n))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof _n)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},So.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,ee=y.og(x,b,function(Le){return E.findValidLinkablePort(Le,a)},null,!0);for(b=1/0,y=null,ee=ee.iterator;ee.next();){var ne=ee.value,ae=ne.part;if(ae instanceof _n){var ue=ne.ga(ai,st.alloc()),ge=x.x-ue.x,ye=x.y-ue.y;st.free(ue),ue=ge*ge+ye*ye,ue<b&&(ge=this.validPortsCache.I(ne),ge!==null?ge&&(y=ne,b=ue):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,ae,ne)||!a&&this.isValidLink(ae,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,b=ue):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof _n&&(x.layer===null||x.layer.allowLink))?y:null},So.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},So.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},So.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},So.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof _n))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof _n))return!1;for(y=y.portId,y===null&&(y=""),y=b.Sd(y);y.next();)if(b=y.value,b.fromNode===x&&b.fromPortId===a)return!0;return!1},So.prototype.isValidLink=function(a,y,x,b){if(!this.isValidFrom(a,y)||!this.isValidTo(x,b)||!(y===null||b===null||(y.fromLinkableSelfNode&&b.toLinkableSelfNode||!this.isInSameNode(y,b))&&(y.fromLinkableDuplicates&&b.toLinkableDuplicates||!this.isLinked(y,b)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var E=a.linkValidation;if(E!==null&&!E(a,y,x,b,this.originalLink))return!1}return x!==null&&(E=x.linkValidation,E!==null&&!E(a,y,x,b,this.originalLink))?!1:(E=this.linkValidation,E!==null?E(a,y,x,b,this.originalLink):!0)},So.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var b=new sn;return b.add(a),Da(this,x,y,b)};function Da(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Da(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Da(a,y.labeledLink,x,b))))}So.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var b=this.diagram.validCycle;if(b!==Tf){if(b===Rp){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=y.linksConnected;b.next();){var E=b.value;if(E!==x&&E.isTreeLink&&E.toNode===y)return!1}return!Ua(this,a,y,x,!0)}if(b===_p){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=a.linksConnected;b.next();)if(E=b.value,E!==x&&E.isTreeLink&&E.fromNode===a)return!1;return!Ua(this,a,y,x,!0)}if(b===Dp)return a===y?a=!0:(b=new sn,b.add(y),a=Ha(this,b,a,y,x)),!a;if(b===Bp)return!Ua(this,a,y,x,!1);if(b===Ip)return a===y?a=!0:(b=new sn,b.add(y),a=Tc(this,b,a,y,x)),!a}return!0};function Ua(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var ee=y.linksConnected;ee.next();){var ne=ee.value;if(ne!==b&&(!E||ne.isTreeLink)&&ne.toNode===y&&(ne=ne.fromNode,ne!==y&&Ua(a,ne,x,b,E)))return!0}return!1}function Ha(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var ee=x.linksConnected;ee.next();){var ne=ee.value;if(ne!==E&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&Ha(a,y,ne,b,E)))return!0}return!1}function Tc(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var ee=x.linksConnected;ee.next();){var ne=ee.value;if(ne!==E){var ae=ne.fromNode;if(ne=ne.toNode,ae=ae===x?ne:ae,ae!==x&&Tc(a,y,ae,b,E))return!0}}return!1}zt.Object.defineProperties(So.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}}}),So.className="LinkingBaseTool";function Wa(){So.call(this),this.name="Linking",this.V={},this.F=null,this.K=Gh,this.Xd=null}Wt(Wa,So),Wa.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},Wa.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 _n)))return null;var x=this.direction;if(x===Gh||x===_g){var b=this.findValidLinkablePort(y,!1);if(b!==null||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b,!1)))return this.isForwards=!0,b}return(x===Gh||x===zg)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Wa.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 _n&&(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 _n&&(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)},Wa.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()},Wa.prototype.doStop=function(){So.prototype.doStop.call(this),this.startObject=null},Wa.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,ee=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var ae=ne.part;ae instanceof _n&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=ae,E=ne):(y=ae,x=ne,this.originalToNode!==null&&(b=this.originalToNode,E=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(b=this.originalToNode,E=this.originalToPort);y!==null||b!==null?(ee=this.insertLink(y,x,b,E),ee!==null?(ne===null&&(this.isForwards?ee.defaultToPoint=a.lastInput.documentPoint:ee.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),ee.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",ee)):this.doNoLink(y,x,b,E)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),ee&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Wa.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Tn)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},Wa.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Wa.prototype.doNoLink=function(){},zt.Object.defineProperties(Wa.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 Gh=new an(Wa,"Either",0),_g=new an(Wa,"ForwardsOnly",0),zg=new an(Wa,"BackwardsOnly",0);Wa.className="LinkingTool",Wa.Either=Gh,Wa.ForwardsOnly=_g,Wa.BackwardsOnly=zg;function Os(){So.call(this),this.name="Relinking";var a=new Ur;a.figure="Diamond",a.desiredSize=Qr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Ur,a.figure="Diamond",a.desiredSize=Qr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new $t}Wt(Os,So),Os.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Tn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var b=a.selectionObject;b!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(b,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(b=a.selectionObject,b!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(b,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Os.prototype.makeAdornment=function(a,y){var x=new gi;return x.type=bn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Os.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},Os.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 gi&&x.adornedPart instanceof Tn))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=fr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=fr),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},Os.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Rd||x===Eh)&&(x=Qa),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}},Os.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()},Os.prototype.doStop=function(){So.prototype.doStop.call(this),this.handle=null},Os.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,b=this.originalToNode,E=this.originalToPort,ee=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof _n&&(this.isForwards?(b=ne,E=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:ee=null;ee!==null?(this.reconnectLink(ee,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?ee.defaultToPoint=a.lastInput.documentPoint:ee.defaultFromPoint=a.lastInput.documentPoint,ee.bb()),this.transactionResult=this.name,a.R("LinkRelinked",ee,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Os.prototype.reconnectLink=function(a,y,x,b){return x=x!==null&&x.portId!==null?x.portId:"",b?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Os.prototype.doNoRelink=function(){};function ed(a,y,x,b,E){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),b!==null?(a.copyPortProperties(b,E,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}zt.Object.defineProperties(Os.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 gi))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Os.className="RelinkingTool",Rr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Rr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function ko(){fi.call(this),this.name="LinkReshaping";var a=new Ur;a.figure="Rectangle",a.desiredSize=oi,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Ur,a.figure="Diamond",a.desiredSize=Qr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new st,this.Yq=new rn}Wt(ko,fi),ko.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:lp},ko.prototype.om=function(a,y){a.reshapingBehavior=y},ko.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Tn){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},ko.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new gi,E.type=bn.Link,x=y.firstPickIndex;var ee=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==Rs)for(var ae=x+ne;ae<ee-ne;ae++){var ue=this.makeResegmentHandle(a,ae);ue!==null&&(ue.segmentIndex=ae,ue.segmentFraction=.5,ue.fromMaxLinks=999,E.add(ue))}for(ne=x+1;ne<ee;ne++)if(ae=this.makeHandle(a,ne),ae!==null){if(ae.segmentIndex=ne,ne!==x)if(ne===x+1&&b){ue=y.i(x);var ge=y.i(x+1);Gt.B(ue.x,ge.x)&&Gt.B(ue.y,ge.y)&&(ge=y.i(x-1)),Gt.B(ue.x,ge.x)?(this.om(ae,lh),ae.cursor="n-resize"):Gt.B(ue.y,ge.y)&&(this.om(ae,sh),ae.cursor="w-resize")}else ne===ee-1&&b?(ue=y.i(ee-1),ge=y.i(ee),Gt.B(ue.x,ge.x)&&Gt.B(ue.y,ge.y)&&(ue=y.i(ee+1)),Gt.B(ue.x,ge.x)?(this.om(ae,lh),ae.cursor="n-resize"):Gt.B(ue.y,ge.y)&&(this.om(ae,sh),ae.cursor="w-resize")):ne!==ee&&(this.om(ae,td),ae.cursor="move");E.add(ae)}E.adornedObject=a}return E},ko.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},ko.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},ko.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},ko.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof Tn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),b=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,b),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,b),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}}},ko.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},ko.prototype.stopTransaction=function(){var a=this.diagram,y=fi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ko.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},ko.prototype.getResegmentingPoint=function(){return this.handle.ga(ai)},ko.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},ko.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,b=y.i(x-1),E=y.i(x),ee=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var ne=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(ah(this,ne,b,E,ee,!0)||ah(this,ne,b,E,ee,!1))){var ae=y.points.copy();ah(this,ne,b,E,ee,!0)?(ae.cd(x-2,new st(ne.x,(ee.y+ne.y)/2)),ae.cd(x+1,new st(ee.x,(ee.y+ne.y)/2))):(ae.cd(x-2,new st((ee.x+ne.x)/2,ne.y)),ae.cd(x+1,new st((ee.x+ne.x)/2,ee.y))),ae.mb(x),ae.mb(x-1),y.points=ae,y.Wb()}else ne=y.i(x+2),Math.abs(E.x-ee.x)<this.resegmentingDistance&&Math.abs(E.y-ee.y)<this.resegmentingDistance&&(ah(this,b,E,ee,ne,!0)||ah(this,b,E,ee,ne,!1))&&(ae=y.points.copy(),ah(this,b,E,ee,ne,!0)?(ae.cd(x-1,new st(b.x,(b.y+ne.y)/2)),ae.cd(x+2,new st(ne.x,(b.y+ne.y)/2))):(ae.cd(x-1,new st((b.x+ne.x)/2,b.y)),ae.cd(x+2,new st((b.x+ne.x)/2,ne.y))),ae.mb(x+1),ae.mb(x),y.points=ae,y.Wb())}}else ne=st.alloc(),Gt.qh(b.x,b.y,ee.x,ee.y,E.x,E.y,ne)&&ne.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),st.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function ah(a,y,x,b,E,ee){return ee?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-b.y)<a.resegmentingDistance&&Math.abs(b.y-E.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-b.x)<a.resegmentingDistance&&Math.abs(b.x-E.x)<a.resegmentingDistance}ko.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,b=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,b===lh?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===sh&&(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,b===lh?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===sh&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{b=x;var E=y.i(b),ee=y.i(b-1),ne=y.i(b+1);Gt.B(ee.x,E.x)&&Gt.B(E.y,ne.y)?(Gt.B(ee.x,y.i(b-2).x)&&!Gt.B(ee.y,y.i(b-2).y)?(y.m(b,a.x,ee.y),x++,b++):y.L(b-1,a.x,ee.y),Gt.B(ne.y,y.i(b+2).y)&&!Gt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):Gt.B(ee.y,E.y)&&Gt.B(E.x,ne.x)?(Gt.B(ee.y,y.i(b-2).y)&&!Gt.B(ee.x,y.i(b-2).x)?(y.m(b,ee.x,a.y),x++,b++):y.L(b-1,ee.x,a.y),Gt.B(ne.x,y.i(b+2).x)&&!Gt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Gt.B(ee.x,E.x)&&Gt.B(E.x,ne.x)?(Gt.B(ee.x,y.i(b-2).x)&&!Gt.B(ee.y,y.i(b-2).y)?(y.m(b,a.x,ee.y),x++,b++):y.L(b-1,a.x,ee.y),Gt.B(ne.x,y.i(b+2).x)&&!Gt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Gt.B(ee.y,E.y)&&Gt.B(E.y,ne.y)&&(Gt.B(ee.y,y.i(b-2).y)&&!Gt.B(ee.x,y.i(b-2).x)?(y.m(b,ee.x,a.y),x++,b++):y.L(b-1,ee.x,a.y),Gt.B(ne.y,y.i(b+2).y)&&!Gt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),b=y.fromNode,E=y.fromPort,b!==null&&(ee=b.findVisibleNode(),ee!==null&&ee!==b&&(b=ee,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(ee=E.ga(ai,st.alloc()),b=y.getLinkPointFromPoint(b,E,ee,a,!0,st.alloc()),y.L(0,b.x,b.y),st.free(ee),st.free(b)),b=y.toNode,E=y.toPort,b!==null&&(ee=b.findVisibleNode(),ee!==null&&ee!==b&&(b=ee,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(ai,st.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,st.alloc()),y.L(y.pointsCount-1,a.x,a.y),st.free(x),st.free(a));y.zf()},ko.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case td:return a;case lh:return new st(y.i(x).x,a.y);case sh:return new st(a.x,y.i(x).y);default:case lp:return y.i(x)}},zt.Object.defineProperties(ko.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 gi))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}}}),ko.prototype.setReshapingBehavior=ko.prototype.om,ko.prototype.getReshapingBehavior=ko.prototype.Ru;var lp=new an(ko,"None",0),sh=new an(ko,"Horizontal",1),lh=new an(ko,"Vertical",2),td=new an(ko,"All",3);ko.className="LinkReshapingTool",ko.None=lp,ko.Horizontal=sh,ko.Vertical=lh,ko.All=td,Rr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Ca(){fi.call(this),this.name="Resizing",this.o=new vn(1,1).freeze(),this.j=new vn(9999,9999).freeze(),this.yg=new vn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Ur;a.alignmentFocus=ai,a.figure="Rectangle",a.desiredSize=oi,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new st,this.Dw=new vn,this.Tn=new st,this.rt=new vn(0,0),this.qt=new vn(1/0,1/0),this.pt=new vn(1,1)}Wt(Ca,fi),Ca.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Tn)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),ic(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Ca.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new gi,y.type=bn.Spot,y.locationSpot=ai;var x=new Ja;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,ki)),y.add(this.makeHandle(a,ba)),y.add(this.makeHandle(a,io)),y.add(this.makeHandle(a,Ko)),y.add(this.makeHandle(a,ja)),y.add(this.makeHandle(a,na)),y.add(this.makeHandle(a,sa)),y.add(this.makeHandle(a,Oa))}else if(ul(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ca.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Ca.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))e:{var x=a.alignment;if(x.Mc()&&(x=ai),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 e;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 bn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Ca.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},Ca.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))},Ca.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Ca.prototype.stopTransaction=function(){var a=this.diagram,y=fi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ca.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Ca.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,st.alloc()),ee=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,ee),this.resize(y),a.bd(),st.free(E)}},Ca.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,st.alloc()),ee=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,ee),this.resize(y),st.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Ca.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 Br){var b=new rn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new he;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Ca.prototype.computeResize=function(a,y,x,b,E,ee){y.Mc()&&(y=ai);var ne=this.adornedObject.naturalBounds,ae=ne.x,ue=ne.y,ge=ne.x+ne.width,ye=ne.y+ne.height,Le=1;if(!ee){Le=ne.width;var ze=ne.height;0>=Le&&(Le=1),0>=ze&&(ze=1),Le=ze/Le}return ze=st.alloc(),Gt.No(a.x,a.y,ae,ue,E.width,E.height,ze),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(ze.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=Math.max(ge-a.x,x.width),a.y=Math.max(ze.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=Math.max(ye-a.y,x.height),ee||(1<=a.height/a.width?(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le):(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width),a.x=ge-a.width,a.y=ye-a.height)):1<=y.y?(a.x=Math.max(ze.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=Math.max(ge-a.x,x.width),a.height=Math.max(Math.min(ze.y-ue,b.height),x.height),ee||(1<=a.height/a.width?(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le):(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width),a.x=ge-a.width)):(a.x=Math.max(ze.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=ge-a.x,ee||(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le,a.y=ue+.5*(ye-ue-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(ze.x-ae,b.width),x.width),a.y=Math.max(ze.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=Math.max(ye-a.y,x.height),ee||(1<=a.height/a.width?(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le):(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width),a.y=ye-a.height)):1<=y.y?(a.width=Math.max(Math.min(ze.x-ae,b.width),x.width),a.height=Math.max(Math.min(ze.y-ue,b.height),x.height),ee||(1<=a.height/a.width?(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le):(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width))):(a.width=Math.max(Math.min(ze.x-ae,b.width),x.width),ee||(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le,a.y=ue+.5*(ye-ue-a.height))):0>=y.y?(a.y=Math.max(ze.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=ye-a.y,ee||(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width,a.x=ae+.5*(ge-ae-a.width))):1<=y.y&&(a.height=Math.max(Math.min(ze.y-ue,b.height),x.height),ee||(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width,a.x=ae+.5*(ge-ae-a.width))),st.free(ze),a},Ca.prototype.computeReshape=function(){var a=mn;return this.adornedObject instanceof Ur&&(a=E0(this.adornedObject)),!(a===ur||this.diagram.lastInput.shift)},Ca.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},Ca.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},Ca.prototype.computeCellSize=function(){var a=new vn(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},zt.Object.defineProperties(Ca.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 gi))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 gi)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}}}),Ca.className="ResizingTool",Rr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ka(){fi.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new st,this.ue=null;var a=new Ur;a.figure="Ellipse",a.desiredSize=Qr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new st(NaN,NaN),this.u=0,this.F=50}Wt(Ka,fi),Ka.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)}},Ka.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new gi,y.type=bn.Position,y.locationSpot=ai;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(ul(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ka.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},Ka.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)},Ka.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(ai)},Ka.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 b=this.handleDistance;return x===0?y.x=a.naturalBounds.width+b:x===45?(y.x=a.naturalBounds.width+b,y.y=a.naturalBounds.height+b):x===90?y.y=a.naturalBounds.height+b:x===135?(y.x=-b,y.y=a.naturalBounds.height+b):x===180?y.x=-b:x===225?(y.x=-b,y.y=-b):x===270?y.y=-b:x===315&&(y.x=a.naturalBounds.width+b,y.y=-b),a.ga(y)},Ka.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new st(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ka.prototype.stopTransaction=function(){var a=this.diagram,y=fi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ka.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ka.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ka.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()},Ka.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,b=y.rotateObject;(x===b||x.rg(b))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Ka.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},zt.Object.defineProperties(Ka.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 gi))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 gi)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}}}),Ka.className="RotatingTool",Rr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Uh(){fi.call(this),this.name="ClickSelecting"}Wt(Uh,fi),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 il(){fi.call(this),this.name="Action",this.pk=null}Wt(il,fi),il.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},il.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()},il.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))}},il.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()},il.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())},il.prototype.doStop=function(){this.pk=null},il.className="ActionTool";function uh(){fi.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new st(0,0)}Wt(uh,fi),uh.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)},uh.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},uh.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Sr)x.Zc()&&(ul(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);ln(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var ee=st.allocAt(a.x,a.y);this.isGridSnapEnabled&&dd(this.diagram,b,a,ee),b.location=ee,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),st.free(ee)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},zt.Object.defineProperties(uh.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}}}),uh.className="ClickCreatingTool";function Hs(){fi.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Sr;a.layerName="Tool",a.selectable=!1;var y=new Ur;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Wt(Hs,fi),Hs.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))},Hs.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Hs.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Hs.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 b=vn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),vn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Hs.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()},Hs.prototype.computeBoxBounds=function(){var a=this.diagram;return new $t(a.firstInput.documentPoint,a.lastInput.documentPoint)},Hs.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),ti?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 rn,y=y.selection.iterator;y.next();){var b=y.value;a.contains(b)||x.add(b)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},zt.Object.defineProperties(Hs.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}}}),Hs.className="DragSelectingTool";function ya(){fi.call(this),this.name="Panning",this.Xt=new st,this.xy=new st,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(yn.document,"scroll",a.Kw,!1),a.stopTool()}}Wt(ya,fi),ya.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())},ya.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(yn.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},ya.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},ya.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},ya.prototype.doMouseMove=function(){this.move()},ya.prototype.doMouseUp=function(){this.move(),this.stopTool()},ya.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,b=a.lastInput.documentPoint,E=y.x+x.x-b.x;x=y.y+x.y-b.y,a.allowHorizontalScroll||(E=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(E,x)}},zt.Object.defineProperties(ya.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),ya.className="PanningTool",Rr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Rr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Rr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Rr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Rr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Zl(){this.F=this.u=this.j=this.o=null}zt.Object.defineProperties(Zl.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}}}),Zl.className="HTMLInfo";function ol(a,y,x){this.text=a,this.hx=y,this.visible=x}ol.className="ContextMenuButtonInfo";function Va(){fi.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new st,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Wt(Va,fi);function ml(a){var y=new Zl;y.show=function(E,ee,ne){ne.showDefaultContextMenu()},y.hide=function(E,ee){ee.hideDefaultContextMenu()},Hh=y,a.tu=function(){a.stopTool()},y=qn("div");var x=qn("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 b=qn("style");yn.document.getElementsByTagName("head")[0].appendChild(b),b.sheet.insertRule(".goCXul { list-style: none; }",0),b.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),b.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),b=a.diagram,b!==null&&(b.addEventListener(y,"contextmenu",To,!1),b.addEventListener(y,"selectstart",To,!1),b.addEventListener(x,"contextmenu",To,!1)),y.className="goCXforeground",x.className="goCXbackground",yn.document.body&&(yn.document.body.appendChild(y),yn.document.body.appendChild(x)),cf=y,Lc=x,hf=!0}function To(a){return a.preventDefault(),!1}Va.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)},Va.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Va.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Va.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof Jt||(a instanceof _t?b=a:b=y.ic(x.documentPoint,null,function(E){return!E.layer.isTemporary})),b!==null){for(a=b;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return b.part}else if(y.contextMenu!==null)return y;return null},Va.prototype.doActivate=function(){},Va.prototype.doMouseDown=function(){if(fi.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof gi){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&jl(this)},Va.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof gi){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}jl(this)};function jl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Zl||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(Ru(a,!0),a.isActive||a.stopTool())}Va.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Ru(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=Hh,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof _t?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof gi&&!a.currentContextMenu.visible&&a.stopTool()}}Va.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Va.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof gi){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof Zl&&a.show(y,x,this);this.currentContextMenu=a},Va.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y+b.height>E.bottom&&(x.y-=b.height+5/y.scale),x.y<E.y&&(x.y=E.y),a.position=x}},Va.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof gi?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Zl&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function hh(a){var y=new rn;return y.add(new ol("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new ol("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new ol("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new ol("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new ol("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new ol("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new ol("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new ol("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new ol("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new ol("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new ol("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new ol("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new ol("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Va.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=hh(this)),cf.innerHTML="",Lc.addEventListener("pointerdown",this.tu,!1);var y=this,x=qn("ul");x.className="goCXul",cf.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,ee=E.visible;if(typeof E.hx=="function"&&(typeof ee!="function"||ee(a))){ee=qn("li"),ee.className="goCXli";var ne=qn("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(ae){return this.ky(a),y.stopTool(),ae.preventDefault(),!1},!1),ne.textContent=E.text,ee.appendChild(ne),x.appendChild(ee)}}cf.style.display="block",Lc.style.display="block"},Va.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Hh){cf.style.display="none",Lc.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Lc,"pointerdown",this.tu,!1),this.currentContextMenu=null}},zt.Object.defineProperties(Va.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof gi?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return hf===!1&&Hh===null&&vo&&ml(this),Hh},set:function(a){a===null&&(hf=!0),Hh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Hh=null,hf=!1,Lc=null,cf=null;Va.className="ContextMenuTool",Rr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Qi(){fi.call(this),this.name="TextEditing",this.Zh=new Zi,this.ia=null,this.V=Mc,this.vj=null,this.qa=Nc,this.u=1,this.F=!0,this.o=null,this.j=new Zl,this.kt=null,ff(this,this.j)}Wt(Qi,fi);function ff(a,y){if(vo){var x=qn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(df)):E==="Tab"?(a.acceptText(rd),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Nc){var b=a.kt;a.qa===pf&&(a.qa=gf),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Nc){var b=a.kt;typeof b.focus=="function"&&b.focus(),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(b,E,ee){if(b instanceof Zi&&ee instanceof Qi)if(ee.state===mf)x.style.border="3px solid red",x.focus();else{var ne=b.ga(ai),ae=E.position,ue=E.scale,ge=b.Df()*ue;ge<ee.minimumEditorScale&&(ge=ee.minimumEditorScale);var ye=b.naturalBounds.width*ge+6,Le=b.naturalBounds.height*ge+2,ze=(ne.x-ae.x)*ue;ne=(ne.y-ae.y)*ue,ae=b.verticalAlignment,ue=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*ge,Le=ae.y*Le-ae.y*ue+ae.offsetY-(.5*Le-.5*ue)-ue/2,x.value=b.text,E.div.style.font=b.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*ge+"%",x.style.lineHeight="normal",x.style.width=ye+"px",x.style.left=(ze-ye/2|0)-1+"px",x.style.top=(ne+Le|0)-1+"px",x.style.textAlign=b.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=b.lineCount,x.wA=ge,x.className="goTXarea",E.div.appendChild(x),x.focus(),ee.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}Qi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||ch&&ch!==this&&(ch.acceptText(Xl),ch&&ch!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Zi&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Mc&&!y.isSelected||this.starting===id&&2>a.lastInput.clickCount)):!1},Qi.prototype.doStart=function(){ch=this,this.textBlock!==null&&this.doActivate()},Qi.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 Zi&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=pf;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new $t(this.textBlock.ga(ki),this.textBlock.ga(io));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Qi.prototype.doCancel=function(){this.stopTool()},Qi.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Qi.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Xl)},Qi.prototype.acceptText=function(a){switch(a){case Xl:this.qa===Ac?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===pf||this.qa===mf||this.qa===gf)&&(this.qa=hp,up(this));break;case nd:case df:case rd:(df!==a||this.textBlock.isMultiline!==!0)&&(this.qa===pf||this.qa===mf||this.qa===gf)&&(this.qa=hp,up(this))}};function up(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,ee="";b.valueFunction!==null&&(ee=b.valueFunction()),a.isValidText(y,E,ee)?(a.Ea(a.name),a.qa=Ac,a.transactionResult=a.name,y.text=ee,a.doSuccess(E,ee),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=mf,a.doError(E,ee))}}Qi.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)},Qi.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Qi.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Nc,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Qi.prototype.doStop=function(){ch=null},Qi.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},Qi.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},zt.Object.defineProperties(Qi.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)}}}),Qi.prototype.measureTemporaryTextBlock=Qi.prototype.Lx;var nd=new an(Qi,"LostFocus",0),Xl=new an(Qi,"MouseDown",1),rd=new an(Qi,"Tab",2),df=new an(Qi,"Enter",3),e0=new an(Qi,"SingleClick",0),Mc=new an(Qi,"SingleClickSelected",1),id=new an(Qi,"DoubleClick",2),Nc=new an(Qi,"StateNone",0),pf=new an(Qi,"StateActive",1),gf=new an(Qi,"StateEditing",2),hp=new an(Qi,"StateValidating",3),mf=new an(Qi,"StateInvalid",4),Ac=new an(Qi,"StateValidated",5),ch=null;Qi.className="TextEditingTool",Qi.LostFocus=nd,Qi.MouseDown=Xl,Qi.Tab=rd,Qi.Enter=df,Qi.SingleClick=e0,Qi.SingleClickSelected=Mc,Qi.DoubleClick=id,Qi.StateNone=Nc,Qi.StateActive=pf,Qi.StateEditing=gf,Qi.StateValidating=hp,Qi.StateInvalid=mf,Qi.StateValidated=Ac,Rr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function bs(a){yf||(cp(),yf=!0),this.H=cu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=zu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new sn,this.ce=new Sa,this.ce.Yd=this,this.Ei=new sn,this.pu=new sn,this.Sr=new sn,this.pr=new sn,a&&Object.assign(this,a)}bs.prototype.Xe=function(a){this.H=a},bs.prototype.canStart=function(){return!0};function hu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),xa(a.H),a.zb=!0)}function od(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===zu?(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===fp&&y.vc.clear(),a.Qw=!!(a.Pk===Sf&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),xf(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==Ba&&b!==null&&(delete b.start.scale,delete b.end.scale),yn.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&as(x),vp(x),a.zb=!1,y.start(),y.bc&&(fh(a),x.Ya(),dp(y,0),Ks(x,!0),Wh(a),x.R("AnimationStarting",a)))}))}}function _u(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function ad(a,y,x,b){a.isTicking||_u(a)||y instanceof Tn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}Qe=bs.prototype,Qe.fv=function(a){return this.ce.fv(a)},Qe.Xu=function(a){return this.ce.Xu(a)};function sd(a,y){function x(){if(0<E.Sr.count&&(b.addAll(E.Sr),E.Sr.clear(),E.bc=!0),E.bc!==!1&&b.count!==0){E.pu.addAll(b);for(var ee=E.pu.iterator;ee.next();){var ne=ee.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var ae=!0;else{for(ae=ne.vc.iterator;ae.next();){var ue=ae.key;if(ue instanceof _t&&ue.diagram!==null||ue instanceof Jt){ae=!0;break e}}ae=!1}ae?wf(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(fh(E),Ks(E.H),Wh(E)),yn.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),yn.requestAnimationFrame(function(){x()}))}function Gg(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function fh(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 Wh(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Qe.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(),xf(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),xf(y,this.H)},Qe.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))},Qe.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),ps(this,a))},Qe.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),dh(this.ce,y,"position",y.position,y.position),ps(this,a))};function Ug(a,y,x){!a.zb||y.D(x)||_u(a)||(a.H.pi||(y=x.copy()),dh(a.ce,a.H,"position",y,x))}function ld(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function ps(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Kh(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var ee=a[0],ne=a[1],ae=a[2];a=a[3];var ue=y[0],ge=y[1],ye=y[2];return y=y[3],ae===0||ae===100?(ee=ue,ne=ge):(ye===0||ye===100)&&(ue=ee,ge=ne),180<Math.abs(ue-ee)&&(ue>ee?ee+=360:ue+=360),ee=E(x,ee,ue-ee,b)%360,ne=E(x,ne,ge-ne,b),ae=E(x,ae,ye-ae,b),x=E(x,a,y-a,b),"hsla("+ee+", "+ne+"%, "+ae+"%, "+x+")"}function cp(){function a(x,b,E,ee,ne,ae){x.position=new st(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae))}var y=new tn;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,ee,ne,ae){ne<ae?x.mm(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae),!1):x.position=new st(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae))}),y.add("location",function(x,b,E,ee,ne,ae){ne<ae?x.mm(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae),!0):x.location=new st(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae))}),y.add("position:placeholder",function(x,b,E,ee,ne,ae){ne<ae?x.mm(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae),!1):x.position=new st(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae))}),y.add("position:nodeCollapse",function(x,b,E,ee,ne,ae){var ue=x.actualBounds,ge=E.actualBounds;E=ge.x+ge.width/2-ue.width/2,ue=ge.y+ge.height/2-ue.height/2,ne<ae?x.mm(ee(ne,b.x,E-b.x,ae),ee(ne,b.y,ue-b.y,ae),!1):x.position=new st(ee(ne,b.x,E-b.x,ae),ee(ne,b.y,ue-b.y,ae))}),y.add("desiredSize",function(x,b,E,ee,ne,ae){x.desiredSize=new $t(ee(ne,b.width,E.width-b.width,ae),ee(ne,b.height,E.height-b.height,ae))}),y.add("width",function(x,b,E,ee,ne,ae){x.width=ee(ne,b,E-b,ae)}),y.add("height",function(x,b,E,ee,ne,ae){x.height=ee(ne,b,E-b,ae)}),y.add("fill",function(x,b,E,ee,ne,ae){x.fill=Kh(b,E,ne,ae,ee)}),y.add("stroke",function(x,b,E,ee,ne,ae){x.stroke=Kh(b,E,ne,ae,ee)}),y.add("strokeWidth",function(x,b,E,ee,ne,ae){x.strokeWidth=ee(ne,b,E-b,ae)}),y.add("strokeDashOffset",function(x,b,E,ee,ne,ae){x.strokeDashOffset=ee(ne,b,E-b,ae)}),y.add("background",function(x,b,E,ee,ne,ae){x.background=Kh(b,E,ne,ae,ee)}),y.add("areaBackground",function(x,b,E,ee,ne,ae){x.areaBackground=Kh(b,E,ne,ae,ee)}),y.add("opacity",function(x,b,E,ee,ne,ae){x.opacity=ee(ne,b,E-b,ae)}),y.add("scale",function(x,b,E,ee,ne,ae){x.scale=ee(ne,b,E-b,ae)}),y.add("angle",function(x,b,E,ee,ne,ae){x.angle=ee(ne,b,E-b,ae)}),vf=y}zt.Object.defineProperties(bs.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&&An(a,">= 1",bs,"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}}}),bs.prototype.stopAnimation=bs.prototype.Cc;var vf=null,yf=!1,zu=new an(bs,"Default",1),Sf=new an(bs,"AnimateLocations",2),fp=new an(bs,"None",3);bs.className="AnimationManager",bs.defineAnimationEffect=function(a,y){yf||(cp(),yf=!0),vf.add(a,y)},bs.Default=zu,bs.AnimateLocations=Sf,bs.None=fp;function Sa(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=jc,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Bn,this.vc=new tn,this.Tt=new tn,this.yl=new sn,this.Ut=new sn,this.dw=mh,a&&Object.assign(this,a)}Sa.prototype.suspend=function(){this.Xk=!0},Sa.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,wf(this,!0),fh(this.Yd),Ks(this.H),Wh(this.Yd),this.H.redraw()};function xf(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}Qe=Sa.prototype,Qe.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 Jt?a=x:x instanceof _t&&(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===zu&&this===y.defaultAnimation&&(this.Lp=Hg,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Lf),fh(y),this.yl.each(function(b){b.data=null,a.add(b)}),Wh(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,sd(y,this),this)},Qe.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Qe.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof Jt?this.H=a:a instanceof _t&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Sr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return dh(this,a,y,x,b,E),this};function dh(a,y,x,b,E,ee){var ne=a.vc;if(y instanceof Jt&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Wu(b),s0(),b=[Is.j,Is.u,Is.o,Is.F],Wu(E),s0(),E=[Is.j,Is.u,Is.o,Is.F]),ne.contains(y)){var ae=ne.I(y),ue=ae.start,ge=ae.end;ue[x]===void 0&&(ue[x]=Vh(b)),ge[x]=Vh(E)}else ue={},ge={},ue[x]=Vh(b),ge[x]=Vh(E),ae=ue.position,y instanceof _t&&ae instanceof st&&!ae.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&ae.assign(ge.position),ae=new Zh(ue,ge,ee),ne.add(y,ae);ne=ue[x],ne instanceof st&&!ne.w()&&ne.assign(a.o),ee&&x.indexOf("position:")===0&&y instanceof Sr?ae.Ku.location=Vh(y.location):ee&&(ae.Ku[x]=Vh(b))}function Vh(a){return a instanceof st||a instanceof vn?a.copy():a}Qe.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Qe.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function wf(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var b=+new Date,E=b>a.cn?a.Gd:b-a.Qd;y&&(E=a.gw,E<a.Gd?(a.Qd=+new Date-E,a.cn=a.Qd+a.Gd):E=a.Gd),fh(x),dp(a,E),Ks(a.H,!0),Wh(x),b>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function dp(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var ee=b.key;if(!(ee instanceof _t&&ee.diagram===null)){var ne=b.value,ae=E?ne.end:ne.start;ne=E?ne.start:ne.end;var ue=vf,ge;for(ge in ne)ge==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||ue.get(ge)===null||ue.get(ge)(ee,ae[ge],ne[ge],a.Lp,y,x,a)}}}Qe.stop=function(){return this.bc?(this.Ml(!0),this):this},Qe.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,fh(x);for(var b=this.vc,E=this.yl.iterator;E.next();)y.remove(E.value);for(E=this.Ut.iterator;E.next();)E.value.v();E=this.ho,b=b.iterator;for(var ee=vf;b.next();){var ne=b.key,ae=b.value,ue=E?ae.end:ae.start,ge=E?ae.start:ae.end,ye=ae.Ku,Le;for(Le in ge)if(ee.get(Le)!==null){var ze=Le;!ae.Hu||ze!=="position:nodeCollapse"&&ze!=="position:placeholder"||(ze="position"),ee.get(ze)(ne,ue[Le],ye[Le]!==void 0?ye[Le]:ae.Hu?ue[Le]:ge[Le],this.Lp,this.Gd,this.Gd,this)}ae.Hu&&ye.location!==void 0&&ne instanceof Sr&&(ne.location=ye.location),ae.nv&&ne instanceof Sr&&ne.Zb(!1)}if(y.As.clear(),bf(y,!1),y.Ya(),y.N(),Ks(y,!0),x.defaultAnimation===this){for(Le=x.pr.iterator;Le.next();)E=Le.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Ks(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Wh(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),xf(this,null),x.Ml(this),y.$b())}},Qe.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Br&&(b=y.placeholder),b!==null?(x=b.ga(ki),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new st(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Br)for(a=a.memberParts;a.next();)b=a.value,b instanceof _n&&this.Cj(b,y)},Qe.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Br&&(x=y.placeholder),x!==null){var b=x.ga(ki);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof Br)for(a=a.memberParts;a.next();)b=a.value,b instanceof _n&&this.Aj(b,y)}},Qe.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},zt.Object.defineProperties(Sa.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&An(a,">= 1",Sa,"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:jt("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}}}),Sa.prototype.getTemporaryState=Sa.prototype.Ez,Sa.prototype.stop=Sa.prototype.stop,Sa.prototype.add=Sa.prototype.add,Sa.prototype.addTemporaryPart=Sa.prototype.Iy;function jc(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Hg(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}Sa.className="Animation",Sa.EaseLinear=function(a,y,x,b){return x*a/b+y},Sa.EaseInOutQuad=jc,Sa.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},Sa.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},Sa.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},Sa.EaseOutExpo=Hg;function Zh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Zh.className="AnimationState";function vl(a,y,x){this.xd=null,this.rf=a,this.so=x||pp,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Xh))}vl.prototype.copy=function(){var a=new vl(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 Wg(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))}zt.Object.defineProperties(vl.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 pp=new an(vl,"Default",1),Xh=new an(vl,"Immediate",2),Oc=new an(vl,"Bundled",3);vl.className="AnimationTrigger",vl.Default=pp,vl.Immediate=Xh,vl.Bundled=Oc;function ra(a){hr(this),this.H=null,this.Pa=new rn,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)}Qe=ra.prototype,Qe.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Ma(x)}a.clear(),this.Zq.length=0},Qe.Xe=function(a){this.H=a},Qe.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,b=0,E=0,ee=0,ne=0,ae=this.Pa.iterator;ae.next();){var ue=ae.value;ue instanceof Br?E++:ue instanceof _n?b++:ue instanceof Tn?ee++:ue instanceof gi?ne++:x++}if(ae="",0<x&&(ae+=x+" Parts "),0<b&&(ae+=b+" Nodes "),0<E&&(ae+=E+" Groups "),0<ee&&(ae+=ee+" Links "),0<ne&&(ae+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,ae+=`
|
|
`+x.toString(),b=x.data,b!==null&&zr(b)&&(ae+=" #"+zr(b)),x instanceof _n?ae+=" "+Fr(b):x instanceof Tn&&(ae+=" "+Fr(x.fromNode)+" "+Fr(x.toNode));return y+" "+this.Pa.count+": "+ae},Qe.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=st.alloc(),ee=this.Pa.s,ne=ee.length;ne--;){var ae=ee[ne];if((b!==!0||ic(ae)!==!1)&&ae.isVisible()&&(E.assign(a),Wn(E,ae.oe),ae=ae.ic(E,y,x),ae!==null&&(y!==null&&(ae=y(ae)),ae!==null&&(x===null||x(ae)))))return st.free(E),ae}return st.free(E),null},Qe.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof rn||b instanceof sn||(b=new sn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var ee=st.alloc(),ne=this.Pa.s,ae=ne.length;ae--;){var ue=ne[ae];if((E!==!0||ic(ue)!==!1)&&ue.isVisible()){ee.assign(a),Wn(ee,ue.oe);var ge=ue;ue.ji(ee,y,x,b)&&(y!==null&&(ge=y(ge)),ge===null||x!==null&&!x(ge)||b.add(ge))}}return st.free(ee),b},Qe.Cf=function(a,y,x,b,E){if(y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof rn||E instanceof sn||(E=new sn),this.Uh===!1)return E;var ee=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(ee=!0);for(var ne=this.Pa.s,ae=ne.length;ae--;){var ue=ne[ae];if((ee!==!0||ic(ue)!==!1)&&ue.isVisible()){var ge=ue;ue.Cf(a,y,x,b,E)&&(y!==null&&(ge=y(ge)),ge===null||x!==null&&!x(ge)||E.add(ge))}}return E},Qe.Nu=function(a,y,x,b,E,ee,ne){if(this.Uh===!1)return E;for(var ae=this.Pa.s,ue=ae.length;ue--;){var ge=ae[ue];if((ne!==!0||ic(ge)!==!1)&&ee(ge)&&ge.isVisible()){var ye=ge;ge.Cf(a,y,x,b,E)&&(y!==null&&(ye=y(ye)),ye===null||x!==null&&!x(ye)||E.add(ye))}}return E},Qe.og=function(a,y,x,b,E,ee){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof rn||E instanceof sn)&&(ee=E),E=!0),ee instanceof rn||ee instanceof sn||(ee=new sn),this.Uh===!1)return ee;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var ae=st.alloc(),ue=st.alloc(),ge=this.Pa.s,ye=ge.length;ye--;){var Le=ge[ye];if((ne!==!0||ic(Le)!==!1)&&Le.isVisible()){ae.assign(a),Wn(ae,Le.oe),ue.h(a.x+y,a.y),Wn(ue,Le.oe);var ze=Le;Le.og(ae,ue,x,b,E,ee)&&(x!==null&&(ze=x(ze)),ze===null||b!==null&&!b(ze)||ee.add(ze))}}return st.free(ae),st.free(ue),ee},Qe.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=ir();for(var E=ir(),ee=0;ee<b;ee++){var ne=x[ee];if(ne.vw=ee,ne instanceof Tn){if(ne.fd===!1)continue}else if(ne instanceof gi&&ne.adornedPart!==null)continue;var ae=ne.actualBounds;ne.isVisible()&&Gi(ae,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&E.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],B0(x),x=x.adornments;x.next();)b=x.value,b.measure(1/0,1/0),b.arrange(),b.Fd(!0);for(y=0;y<E.length;y++)B0(E[y]);Un(a),Un(E)}}};function Gu(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Qe.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=Gu(this,a);var ee=this.Zq;ee.length=0;for(var ne=y.scale,ae=$t.alloc(),ue=0;ue<b;ue++)this.Oj(a,x[ue],y,ee,ne,ae,!0);if($t.free(ae),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Kg(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var ee=E.length;if(ee!==0){var ne=Gu(a,y),ae=a.Zq;ae.length=0;for(var ue=x.scale,ge=$t.alloc(),ye=0;ye<ee;ye++){var Le=E[ye];b.contains(Le)&&a.Oj(y,Le,x,ae,ue,ge,!1)}$t.free(ge),y.globalAlpha=ne}}}Qe.Oj=function(a,y,x,b,E,ee,ne){if(ne&&!ic(y))a.Hs(y);else{if(b!==null&&y instanceof Tn&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,b=y.containingGroup;b!==null;)ne?b.tb!==null&&ee.Ex(b.tb):b.tb!==null&&(ne=!0,ee.assign(b.tb)),b=b.containingGroup;var ae=y.actualBounds;if(b=!1,ne&&y.isVisible()){if(!ee.Yc(ae)){a.Hs(y);return}b=!ee.Re(ae)}b&&(a.save(),a instanceof Ps?a.bk=ee.copy():(a.beginPath(),a.rect(ee.x,ee.y,ee.width,ee.height),a.clip())),ae.width*E>x.Oq||ae.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,ee=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(yo(y,a,y.areaBackground,!0,!0,ee,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(yo(y,a,"rgba(0,0,0,0.3)",!0,!1,ee,E),a.fillRect(E.x,E.y,E.width,E.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),yo(y,a,y.background,!0,!1,ee,E),a.fillRect(0,0,ee.width/2,ee.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),b&&(a.restore(),a.Vc(!0))}},Qe.g=function(a,y,x,b,E){var ee=this.diagram;ee!==null&&ee.cb(no,a,this,y,x,b,E)},Qe.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&Ma(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),ud(this,a,y),a},Qe.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var b=this.Pa;if(0>a||a>=b.length){if(a=b.indexOf(y),0>a)return-1}else if(b.M(a)!==y&&(a=b.indexOf(y),0>a))return-1;return y.Wo(x),b.mb(a),b=this.diagram,b!==null&&(x?b.N():b.pc(y)),y.Ig=null,Ma(y),a};function ud(a,y,x){if(y=Vg(a,y,x),x instanceof Br&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,ee=E.length,ne=0;ne<ee;ne++){var ae=E[ne];if(ae===x&&(y=ne,0<=b)||0>b&&ae.containingGroup===x&&(b=ne,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&ud(a,-1,y)}x.svg!==null&&x.svg.remove()}function Vg(a,y,x){var b=x.zOrder;if(isNaN(b))return y;a=a.Pa;var E=a.count;if(1>=E)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var ee=y-1,ne=NaN;0<=ee&&(ne=a.M(ee).zOrder,!!isNaN(ne));)ee--;for(var ae=y+1,ue=NaN;ae<E&&(ue=a.M(ae).zOrder,!!isNaN(ue));)ae++;if(!isNaN(ne)&&ne>b)for(;;){if(ee===-1||ne<=b){if(ee++,ee===y)break;return a.mb(y),a.Gb(ee,x),ee}for(ne=NaN;0<=--ee&&(ne=a.M(ee).zOrder,isNaN(ne)););}else if(!isNaN(ue)&&ue<b)for(;;){if(ae===E||ue>=b){if(ae--,ae===y)break;return a.mb(y),a.Gb(ae,x),ae}for(ue=NaN;++ae<E&&(ue=a.M(ae).zOrder,isNaN(ue)););}return y}zt.Object.defineProperties(ra.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===""&&jt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&jt("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)&&An(a,"0 <= value <= 1",ra,"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))}}}),ra.prototype.findObjectsNear=ra.prototype.og,ra.prototype.findObjectsIn=ra.prototype.Cf,ra.prototype.findObjectsAt=ra.prototype.ji,ra.prototype.findObjectAt=ra.prototype.ic,ra.className="Layer";function Jt(a,y){if(am||(Ta(),am=!0),hr(this),cu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,vo){var x=this,b=function(){x.removeEventListener(yn.document,"DOMContentLoaded",b,!1),x.setRTL()};yn.document.body!==null?this.setRTL():x.addEventListener(yn.document,"DOMContentLoaded",b,!1)}this.ol=null,xd.add("Model",Ai);var E=this;return this.Hb=function(ee){var ne=E.partManager;if(ee.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var ae=ee.change;ee.modelChange===""&&ae===no&&ne.updateDataBindings(ee.object,ee.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(ee){E.partManager.doModelChanged(ee)},this.hu=this.ku=null,Zg(this),this.model=cy(),this.Wg=!0,Yg(this),this.layout=new so,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 sm,a!==void 0&&(typeof a=="string"||yn.Element&&a instanceof Element?mp(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Yh,cu;function Zg(a){a.Yd=new bs,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new rn,a.pj=new tn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new st(NaN,NaN).freeze(),a.du=new st(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new st(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new jr,a.zu=new st(NaN,NaN).freeze(),a.ut=new $t(NaN,NaN,NaN,NaN).freeze(),a.rj=new Gr(0,0,0,0).freeze(),a.sj=mh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ba,a.zk=Vo,a.Fg=Ba,a.pq=Vo,a.yt=ki,a.Bt=ki,a.Fc=!0,a.pn=!1,a.De=new sn,a.Eh=new tn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Gr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new va,a.bq.diagram=a,a.Qg=new va,a.Qg.diagram=a,a.cj=new va,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,n0(a),a.ai=new sn,a.Ht=!0,a.uu=vh,a.pw=!1,a.wu=Tf,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 tn,a.Xn=new rn,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 Gr(5).freeze(),a.Hw=new sn().freeze(),a.Nt=999999999,a.nw=new sn().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 sn,a.ow=new sn,a.Xh=null,a.aw=new vn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new st,bounds:new $t,Py:new vn,bA:new vn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new $t(NaN,NaN,NaN,NaN).freeze(),a.wo=new vn(NaN,NaN).freeze(),a.Sp=new $t(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new tn;var y=new _n,x=new Zi;x.bind(new Lo("text","",Fr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new _n,x=new Zi,x.stroke="brown",x.bind(new Lo("text","",Fr)),y.add(x),a.Lg.add("Comment",y),y=new _n,y.selectable=!1,y.avoidable=!1,x=new Ur,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new vn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new tn,y=new Br,y.selectionObjectName="GROUPPANEL",y.type=bn.Vertical,x=new Zi,x.font="bold 12pt sans-serif",x.bind(new Lo("text","",Fr)),y.add(x),x=new bn(bn.Auto),x.name="GROUPPANEL";var b=new Ur;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Ja,b.padding=new Gr(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new tn,y=new Tn,x=new Ur,x.isPanelMain=!0,y.add(x),x=new Ur,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Tn,x=new Ur,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new gi,y.type=bn.Auto,x=new Ur,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ja,x.margin=new Gr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new gi,y.type=bn.Link,x=new Ur,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 Ai,a.toolManager=new Ji,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new he,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Xg(),a.eq=null,a.fq=ar,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 st,a.zy=500,a.wp=new st,a.wq=!1}Jt.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),zc=null,ec="",gp(this,!1),this.Xn.clear(),Od(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function gp(a,y){a.animationManager.Cc(!0),a.Hw=new sn().freeze(),a.nw=new sn().freeze();var x=a.skipsUndoManager,b=a.cc!==null&&a.cc!==void 0;b&&(a.skipsUndoManager=!0);var E=null;a.fe!==null&&(E=a.fe.part,E!==null&&a.remove(E));var ee=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var ae=a.Wa.s[y].parts;ae.next();){var ue=ae.value;ue!==E&&ue.data===null&&ee.push(ue)}for(y=0;y<ee.length;y++)a.remove(ee[y])}for(y=0;y<ne;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(),Od(),a.Og.clear(),Mi=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),ee}function Xg(){return null}Jt.prototype.reset=function(){this.clear(),this.vb=!0,Zg(this),Jl(this),this.Wg=!0,Yg(this),this.layout=new so,this.Wg=!1,this.model=cy(),this.model.undoManager=new ho,this.vb=this.rn=!1,this.N()},Jt.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=yn.document.body);var y=qn("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},Jt.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=yn.document.body);var y=0;if(vo){var x=om;y=Yh,x===null&&(x=om=qn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Yh=qn("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 b=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,b===x&&(x=y.clientWidth),a.removeChild(y),y=b-x,y!==0||ti||(y=11)}this.Db=y,this.Gw=!0},Jt.prototype.qb=function(a){a.classType===Jt&&(this.autoScale=a)},Jt.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 mp(a,y){if(vo){if(y!=null||jt("Diagram setup requires an argument DIV."),a.Ka!==null&&jt("Diagram has already completed setup."),typeof y=="string"?a.Ka=yn.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:jt("No DIV or DIV id supplied: "+y),a.Ka===null&&jt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&jt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&yn.ResizeObserver){var x=Ht(function(){a.$b()},250);a.ol=new yn.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}yn.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var b="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=b,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=yn.go;var E=new ll(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",yn.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Cp(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new ll(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,vo){E=qn("div");var ee=qn("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",ee.style.position="absolute",ee.style.width="1px",ee.style.height="1px",a.Ka.appendChild(E),E.appendChild(ee),E.onscroll=Qg,E.addEventListener("pointerdown",$g),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=ee}a.hk=Ht(function(){a.Yh=null,a.N()},300),a.Ov=Ht(function(){vp(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var ae=Ws(a,ne,!0);ae.bubbles=!0;var ue=0,ge=0;ae.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(ue=0<ne.deltaX?1:-1),ne.deltaY!==0&&(ge=0<ne.deltaY?1:-1),ae.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-ue:-ge):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(ue=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(ge=0<ne.wheelDeltaY?-1:1),ae.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-ue:-ge):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(ae.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),yl(ae,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Ws(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var ae=a.Yt;ae[ne.pointerId]===void 0&&(ae[ne.pointerId]=ne),ae=a.oj;var ue=!1;if(ae[0]===null||ae[0].pointerId!==ne.pointerId&&ae[0].pointerType===ne.pointerType)if(ae[1]!==null&&ae[1].pointerId===ne.pointerId)ae[1]=ne,ue=!0;else if(ae[0]===null)ae[0]=ne;else if(ae[1]===null)ae[1]=ne,ue=!0;else{ne.preventDefault();return}else ae[0]=ne;(ae=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var ge=ue;ue=wp(a,ne,!0,!1,!0,ge),Dc(a,ne,ue),ue.targetDiagram=xp(ne,ne.target),ue.targetObject=null,ge||ue.clone(a.bq),ge=a.uw,ae=ae?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(ge.x-ne.screenX)>ae||Math.abs(ge.y-ne.screenY)>ae)?a.yq++:a.yq=1,ue.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():yl(ue,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var ae=a.oj;if(ae[0]===null||ae[0].pointerId!==ne.pointerId&&ae[0].pointerType===ne.pointerType){if(ae[1]!==null&&ae[1].pointerId===ne.pointerId){ae[1]=ne;return}if(ae[0]===null)ae[0]=ne;else return}else ae[0]=ne;if(ae[0].pointerId===ne.pointerId){ae=wp(a,ne,!1,!1,!1,ae[1]!==null);var ue=yn.document.elementFromPoint(ne.clientX,ne.clientY)||null;ue!==null&&ue.shadowRoot!==void 0&&ue.shadowRoot!==null&&(ue=ue.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var ge=a,ye=ne;ue&&ue.H&&(ye=ne,ge=ue.H),ae.targetDiagram=ge,Dc(a,ye,ae),ae.targetObject=null,a.doMouseMove(),yl(ae,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var ae=ne.pointerType==="touch"||ne.pointerType==="pen",ue=a.Yt;if(ae&&a.qu)delete ue[ne.pointerId],ne.preventDefault();else if(ue=a.oj,ue[0]===null||ue[0].pointerId!==ne.pointerId&&ue[0].pointerType===ne.pointerType)ue[1]!==null&&ue[1].pointerId===ne.pointerId&&(ue[1]=null);else{ue[0]=null,ue=wp(a,ne,!1,!0,!0,!1);var ge=yn.document.elementFromPoint(ne.clientX,ne.clientY)||null;ge!==null&&ge.shadowRoot!==void 0&&ge.shadowRoot!==null&&(ge=ge.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),ge!==null&&ge.H instanceof Jt&&ge.H!==a&&Dc(ge.H,ne,ue),ge===null&&(ge=ne.target),Dc(a,ne,ue),ue.clickCount=a.yq,ue.targetDiagram=xp(ne,ge),ue.targetObject=null,a.doMouseUp(),yl(ue,ne),ae&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var ae=a.Yt;ae[ne.pointerId]&&delete ae[ne.pointerId],ae=a.oj,ae[0]!==null&&ae[0].pointerId===ne.pointerId&&(ae[0]=null),ae[1]!==null&&ae[1].pointerId===ne.pointerId&&(ae[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var ae=a.oj;ae[0]!==null&&ae[0].pointerId===ne.pointerId?(ae[0]=null,a.wq=!1):ae[1]!==null&&ae[1].pointerId===ne.pointerId&&(ae[1]=null)},a.Vp=b.Z["d"+Nf[1]+Nf[2]+"wI"+Uc.slice(1,5)]["b"+Ox.slice(1,y)](b.Z,Mf,y,y),b.Vc(!0),t0(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Jt.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Jt.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function t0(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(yn,"resize",a.Ov,!1)}function as(a){30<a.Sq&&(a.Yh=1)}function bf(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),br&&br.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Jt.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:yn.devicePixelRatio||1},Jt.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Jt.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Jt.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Jt.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Jt.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Jt.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Jt.prototype.doFocus=function(){this.focus()},Jt.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=yn.scrollX||yn.pageXOffset,y=yn.scrollY||yn.pageYOffset;this.ta.focus(),yn.scrollTo(a,y)}},Jt.prototype.Oy=function(){this.H.R("GainedFocus")},Jt.prototype.Ny=function(){this.H.R("LostFocus")};function vp(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,b=a.Be?a.Db:0,E=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==E&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+b)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===Ba&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Yg(a){var y=new ra;y.name="Background",a.Al(y),y=new ra,y.name="",a.Al(y),y=new ra,y.name="Foreground",a.Al(y),y=new ra,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ra,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ra,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function Jg(a){var y=new bn(bn.Grid);y.name="GRID";var x=new Ur;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Ur,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Ur,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ur,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Ur,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Ur,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Sr,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 Qg(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Rc(this.H)}function $g(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Rc(this.H)}Jt.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var b=this.documentBounds,E=this.viewportBounds,ee=this.rj,ne=b.x-ee.left,ae=b.y-ee.top,ue=b.width+ee.left+ee.right,ge=b.height+ee.top+ee.bottom,ye=b.right+ee.right;ee=b.bottom+ee.bottom;var Le=E.x;b=E.y;var ze=E.width,Ke=E.height,Je=E.right,it=E.bottom;E=this.scale;var Tt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Tt=Tt+a.scrollWidth-a.clientWidth;break;case"reverse":Tt=a.scrollWidth-Tt-a.clientWidth}var Pt=Tt;ze<ue||Ke<ge?(Tt=st.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Pt&&(Tt.x=Pt/E+ne,this.ju=Pt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Tt.y=a.scrollTop/E+ae,this.lu=a.scrollTop),this.position=Tt,st.free(Tt),this.Ee=this.qr=!1):(Tt=st.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Le&&(this.position=Tt.h(Pt+ne,this.position.y)),ye>Je&&(this.position=Tt.h(-(y.scrollWidth-this.Aa)+Pt-this.Aa/E+ye,this.position.y))),a.vy&&this.allowVerticalScroll&&(ae<b&&(this.position=Tt.h(this.position.x,a.scrollTop+ae)),ee>it&&(this.position=Tt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+ee))),st.free(Tt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ye=b.right,Je=E.right,ee=b.bottom,it=E.bottom,ne=b.x,Le=E.x,ae=b.y,b=E.y,ze>=ue&&ne>=Le&&ye<=Je&&(x.style.width="1px"),Ke>=ge&&ae>=b&&ee<=it&&(x.style.height="1px"))}},Jt.prototype.computeBounds=function(a){return a===void 0&&(a=new $t),xa(this),yp(this,a)};function yp(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,ee=0;ee<E;ee++){var ne=b[ee];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var ae=ne.length,ue=0;ue<ae;ue++){var ge=ne[ue];ge.isInDocumentBounds&&ge.isVisible()&&(ge=ge.actualBounds,ge.w()&&(x?(x=!1,y.assign(ge)):y.ed(ge)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Jt.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(fn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Tn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds))}else for(a=a.iterator;a.next();)b=a.value,!y&&b instanceof Tn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new $t(NaN,NaN,0,0):x};function al(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=st.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=$t.allocAt(0,0,b.width,b.height);var E=st.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,$t.free(b),st.free(E),st.free(x)}x=a.yh,y&&a.Fg!==Ba&&(x=a.Fg);var ee=x!==Ba?Fc(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/ee;var ne=a.ya/ee,ae=a.zk,ue=a.pq;y&&!ae.sb()&&(ue.sb()||ue.Xb())&&(ae=ue.Xb()?ai:ue),Sp(a,a.documentBounds,E,ne,ae,y),y=a.scale,a.scale=ee,a.vb=!1,ee=a.viewportBounds,Gt.B(ee.x,x)&&Gt.B(ee.y,b)&&Gt.B(ee.width,E)&&Gt.B(ee.height,ne)||a.onViewportBoundsChanged(new $t(x,b,E,ne),ee,y,!1)}}function Fc(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var b=a.documentBounds;if(!b.w())return x;var E=b.width;b=b.height;var ee=a.Aa+(a.gf?a.Db:0),ne=a.ya+(a.Be?a.Db:0),ae=ee/E,ue=ne/b;return y===Fs?(y=Math.min(ue,ae),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===tc?(y=ue>ae?(ne-a.Db)/b:(ee-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Jt.prototype.zoomToFit=function(){var a=this.sj;this.sj=mh,this.scale=Fc(this,Fs),a!==mh&&(al(this,!1),Sp(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Qe=Jt.prototype,Qe.BA=function(a,y){y===void 0&&(y=Fs);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Fs||y===tc)if(isNaN(x))E=this.viewportBounds.height*this.scale/b;else if(isNaN(b))E=this.viewportBounds.width*this.scale/x;else{E=this.Aa;var ee=this.ya;E=y===tc?ee/b>E/x?(ee-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(ee/b,E/x)}this.scale=E,this.position=new st(a.x,a.y)}},Qe.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new st(x.x+(a.x*x.width+a.offsetX)-(y.x*b.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*b.height-y.offsetY))},Qe.zz=function(a){if(a instanceof _t){this.eq=a;var y=st.alloc();this.fq=this.op(a.ga(ki,y)),st.free(y)}else this.eq=null,this.fq=ar};function Sp(a,y,x,b,E,ee){var ne=st.allocAt(a.pa.x,a.pa.y),ae=ne.x,ue=ne.y;if(a.eq!==null){var ge=st.alloc();ge=a.eq.ga(ki,ge),ae=ge.x-a.fq.x/a.scale,ue=ge.y-a.fq.y/a.scale,E=Wr,st.free(ge)}(ee||a.scrollMode===mh)&&(E.sb()&&(x>y.width&&(ae=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(ue=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,ee=x-y.width,x<y.width+E.left+E.right?(ae=Math.min(ae+x/2,y.right+Math.max(ee,E.right)-x/2),ae=Math.max(ae,y.left-Math.max(ee,E.left)+x/2),ae-=x/2):ae>y.left?ae=y.left:ae<y.right-x&&(ae=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(ue=Math.min(ue+b/2,y.bottom+Math.max(x,E.bottom)-b/2),ue=Math.max(ue,y.top-Math.max(x,E.top)+b/2),ue-=b/2):ue>y.top?ue=y.top:ue<y.bottom-b&&(ue=y.bottom-b)),ne.x=isFinite(ae)?ae:-a.yb.left,ne.y=isFinite(ue)?ue:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),Ug(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Jl(a),st.free(ne)}Qe.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=fu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Sr)return a}else if(a=fu(this,a,function(x){return x.part}),a instanceof Sr)return a;return null},Qe.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),xa(this);for(var b=this.Wa.iteratorBackwards;b.next();){var E=b.value;if(E.visible&&(E=E.ic(a,y,x),E!==null))return E}return null};function fu(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),xa(a),a=a.Wa.iteratorBackwards;a.next();){var E=a.value;if(E.visible&&!E.isTemporary&&(E=E.ic(y,x,b),E!==null))return E}return null}Qe.lz=function(a,y,x){return y===void 0&&(y=!0),Pf(this,a,function(b){return b.part},y?function(b){return b instanceof Sr&&b.canSelect()}:null,x)};function Pf(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof rn||E instanceof sn||(E=new sn),xa(a),a=a.Wa.iteratorBackwards;a.next();){var ee=a.value;ee.visible&&!ee.isTemporary&&ee.ji(y,x,b,E)}return E}Qe.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof rn||b instanceof sn||(b=new sn),xa(this);for(var E=this.Wa.iteratorBackwards;E.next();){var ee=E.value;ee.visible&&ee.ji(a,y,x,b)}return b},Qe.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),hd(this,a,function(E){return E instanceof Sr&&(!x||E.canSelect())},y,b)},Qe.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof rn||E instanceof sn||(E=new sn),xa(this);for(var ee=this.Wa.iteratorBackwards;ee.next();){var ne=ee.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},Qe.Nu=function(a,y,x,b,E,ee){var ne=new sn;xa(this);for(var ae=this.Wa.iteratorBackwards;ae.next();){var ue=ae.value;ue.visible&&ue.Nu(a,y,x,b,ne,E,ee)}return ne};function hd(a,y,x,b,E){var ee=null;for(ee===void 0&&(ee=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof rn||E instanceof sn||(E=new sn),xa(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,ee,x,b,E)}return E}Qe.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),Cf(this,a,y,function(ee){return ee instanceof Sr&&(!b||ee.canSelect())},x,E)},Qe.og=function(a,y,x,b,E,ee){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof rn||E instanceof sn)&&(ee=E),E=!0),ee instanceof rn||ee instanceof sn||(ee=new sn),xa(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var ae=ne.value;ae.visible&&ae.og(a,y,x,b,E,ee)}return ee};function Cf(a,y,x,b,E,ee){var ne=null;for(ne===void 0&&(ne=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof rn||E instanceof sn)&&(ee=E),E=!0),ee instanceof rn||ee instanceof sn||(ee=new sn),xa(a),a=a.Wa.iteratorBackwards;a.next();){var ae=a.value;ae.visible&&!ae.isTemporary&&ae.og(y,x,ne,b,E,ee)}return ee}Jt.prototype.acceptEvent=function(a){return Ws(this,a,a instanceof MouseEvent)};function Ws(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?Dc(a,y,b):(b.viewPoint=a.Qg.viewPoint,b.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),b.modifiers=a,b.button=y.button,y.buttons!==void 0&&(b.buttons=y.buttons),ti&&y.button===0&&y.ctrlKey&&(b.button=2),b.down=!1,b.up=!1,b.clickCount=1,b.delta=0,b.handled=!1,b.bubbles=!1,b.timestamp=y.timeStamp,b.isMultiTouch=!1,b.targetDiagram=xp(y,y.target),b.targetObject=null,b}function xp(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 wp(a,y,x,b,E,ee){var ne=a.Qg;return a.Qg=a.cj,a.cj=ne,ne.diagram=a,ne.clickCount=1,a=ne.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ne.modifiers=a,ne.event=y,ne.timestamp=y.timeStamp,ne.button=y.button,ne.buttons=y.buttons,ti&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=b,ne.handled=!1,ne.bubbles=E,ne.isMultiTouch=ee,ne}function yl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Jt.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Ws(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(),yl(x,a)},Jt.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ws(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(),yl(x,a)},Jt.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ws(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),yl(x,a)},Jt.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ws(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),yl(x,a)},Jt.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new st(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?Wn(new st(y,a),this.Ab):new st(y,a)};function Dc(a,y,x){var b=a.ta,E=a.Aa,ee=a.ya,ne=0,ae=0;b!==null&&(b=b.getBoundingClientRect(),ne=y.clientX-E/b.width*b.left,ae=y.clientY-ee/b.height*b.top),x.viewPoint.h(ne,ae),a.Ab!==null?(y=st.allocAt(ne,ae),a.Ab.Cd(y),x.documentPoint.assign(y),st.free(y)):x.documentPoint.h(ne,ae)}function bp(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var b=a.ta;b!==null&&(b=b.getBoundingClientRect(),x.h(y.clientX-a.Aa/b.width*b.left,y.clientY-a.ya/b.height*b.top))}}Jt.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function qg(a){a.ld||xa(a),a.Va()}Jt.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Qe=Jt.prototype,Qe.Pz=function(){return this.kg},Qe.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Ks(this),this.hf=!1,this.du=new st(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Yt(function(){b.ld=!1,hu(y,"Model"),a(b)},1)},Qe.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;yn.requestAnimationFrame(function(){y.kg&&y.bd()})}},Qe.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ks(this))};function Jh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Rc(a)||(y&&xa(a),x&&al(a,!1))}function Ks(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,b=a.Xn;if(!x.isAnimating&&b.length!==0){for(var E=b.s,ee=E.length,ne=0;ne<ee;ne++){var ae=E[ne];Bo(ae,!1),ae.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(ue){ue.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||vp(a),Jh(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Yl(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),xa(a),ee=!1,(!a.hf||a.xh)&&(a.hf?jp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),jp(a,!1)),ee=!0),a.Jk=!1,xa(a),a.ou||qg(a),Jh(a,!0,!1),ne=!1,ee?(x=$t.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Pp(a)),a.R("LayoutCompleted"),Jh(a,!0,!1),$t.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ba?a.scale=Fc(a,a.Fg):a.yh!==Ba?a.scale=Fc(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),al(a,!0)),ee&&ne&&a.eb("Initial Layout"),xa(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Pp(a){if(a.Fg!==Ba)a.scale=Fc(a,a.Fg);else if(a.yh!==Ba)a.scale=Fc(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}al(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Yl(a)}function xa(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 sn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Br&&b.U&65536&&(b.U=b.U^65536)})}}Qe.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Br||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Br&&x.isVisible()&&Ef(this,x);for(a.reset();a.next();)x=a.value,x instanceof Tn&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof gi&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function Ef(a,y){for(var x=ir(),b=ir(),E=y.memberParts;E.next();){var ee=E.value;ee.isVisible()&&(ee instanceof Br?(Bs(ee)||Xa(ee)||rc(ee))&&Ef(a,ee):ee instanceof Tn?ee.fromNode===y||ee.toNode===y?b.push(ee):x.push(ee):(ee.measure(1/0,1/0),ee.arrange()))}for(a=x.length,E=0;E<a;E++)ee=x[E],ee.measure(1/0,1/0),ee.arrange();for(Un(x),y.measure(1/0,1/0),y.arrange(),a=b.length,y=0;y<a;y++)x=b[y],x.measure(1/0,1/0),x.arrange();Un(b)}Qe.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},Qe.gc=function(a){if(this.Ka!==null){if(this.ta===null&&jt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Ic(this);var x=this.Aa,b=this.ya;if(a.Gv.resize(x,b,x,b),x=this.Wa.s,b=x.length,this.Fd(x,b,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var E=this.Ca,ee=Math.round(y.x*E)/E,ne=Math.round(y.y*E)/E,ae=this.Ab;for(ae.reset(),E!==1&&ae.scale(E),y.x===0&&y.y===0||ae.translate(-ee,-ne),a.ti=null,Yy(a,ae.m11,ae.m12,ae.m21,ae.m22,ae.dx,ae.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<b;y++)x[y].gc(a,this);a=!1,this.Yf?Hc(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(jr.prototype.Cd=jr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(ee=this.animationManager,!ee.zb&&(!ee.isAnimating||ee.isTicking)&&(x=new Date,Ic(this),this.Ka.style.opacity!=="0")){if(b=a!==this.ib,y=this.Wa.s,E=y.length,this.Fd(y,E,this,this.viewportBounds),b)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!ee.isAnimating)break e;ee=this.Ab,ee.reset(),ne=this.Mb,ae=this.pa;var ue=this.Ca,ge=Math.round(ae.x*ue)/ue,ye=Math.round(ae.y*ue)/ue;for(ue!==1&&ee.scale(ue),ae.x===0&&ae.y===0||ee.translate(-ge,-ye),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),ph(this,a),ae=0;ae<E;ae++)a.setTransform(ne,0,0,ne,0,0),a.transform(ee.m11,ee.m12,ee.m21,ee.m22,ee.dx,ee.dy),a.yc(),y[ae].gc(a,this);if(y=!1,this.Yf?Hc(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(jr.prototype.Cd=jr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=br&&br.nx,x=this.zw,b||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,E=y=0;E<x.length;E++)y+=x[E];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),b)for(a.setTransform(1,0,0,1,0,0),b=0;b<x.length;b++)a.fillText(x[b].toString(),20,150+ +(20*b))}}};function cd(a,y,x,b,E,ee,ne,ae,ue,ge){if(a.Ka!==null){a.ta===null&&jt("No canvas specified"),ne===void 0&&(ne=null),ae===void 0&&(ae=null),ue===void 0&&(ue=!1),ge===void 0&&(ge=!1),Ic(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ye=a.Ca;a.Ca=E;var Le=a.Wa.s,ze=Le.length;try{var Ke=new $t(ee.x,ee.y,b.width/E,b.height/E),Je=Ke.copy();Je.Co(x),Yl(a,Je),xa(a),a.Fd(Le,ze,a,Ke),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),ae!==null&&ae!==""&&(y.fillStyle=ae,y.ox(0,0,b.width,b.height));var it=a.Mb;y.scale(it,it);var Tt=jr.alloc();Tt.reset(),Tt.translate(x.left,x.top),Tt.scale(E),ee.x===0&&ee.y===0||Tt.translate(-ee.x,-ee.y),y.setTransform(Tt.m11,Tt.m12,Tt.m21,Tt.m22,Tt.dx,Tt.dy),y.yc(),y instanceof Ps&&Yy(y,Tt.m11,Tt.m12,Tt.m21,Tt.m22,Tt.dx,Tt.dy),jr.free(Tt),ph(a,y),y.globalAlpha=a.pb;var Pt=a.Qj("Grid");if(ne){var Nt=new sn,At=ne.iterator;for(At.reset();At.next();){var Bt=At.value;Bt instanceof Sr&&(ge||Bt.layer!==Pt)&&(Bt.Gj(),Nt.add(Bt))}for(ge=0;ge<ze;ge++)Kg(Le[ge],y,a,Nt,ue);Nt.each(function(Zt){return Zt.Gj()})}else for(Nt=0;Nt<ze;Nt++){var Rt=Le[Nt];Rt===Pt?ge&&Rt.gc(y,a,!0):Rt.gc(y,a,ue)}a.$i=!1,a.Yf&&Hc(a.Yf,a)&&a.Vp()}finally{a.Ca=ye,a.ib.Vc(!0),a.vd=!0,a.Fd(Le,ze,a,a.viewportBounds),Yl(a),a.ib instanceof Ps&&(a.ib.Nj.PA(),a.redraw())}}}Qe.Gf=function(a){return this.Rg[a]},Qe.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Qe.Tx=function(){this.Rg=new yr,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(ti||Fi),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))}Qe.Ql=function(a){return this.on[a]},Qe.sA=function(a,y){this.on[a]=y},Qe.Sx=function(){this.on=new yr,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Qe.set=function(a){return Object.assign(this,a),this},Qe.Du=function(a){return this.nm(a)},Qe.nm=function(a){return Bc(this,a),this};function Bc(a,y){var x=a instanceof bn,b=a instanceof Jt,E;for(E in y){E===""&&jt("Setting properties requires non-empty property names");var ee=a,ne=E;if(x||b){var ae=E.indexOf(".");if(0<ae){var ue=E.substring(0,ae);x?ee=a.fb(ue):(ee=a[ue],ee==null&&(ee=a.toolManager[ue])),ln(ee)?ne=E.substr(ae+1):jt("Unable to find object named: "+ue+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!Nr(ee,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&Nr(a.toolManager,ne))ee=a.toolManager;else if(b&&nm(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof cr&&ne==="Changed"){a.Pe(y[ne]);continue}else jt('Trying to set undefined property "'+ne+'" on object: '+ee.toString());ee[ne]=y[E],ne[0]==="_"&&ee instanceof _t&&ee.Vw(ne)}}Qe.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new tn,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Qe.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")},Jt.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!==Lf&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var b=this.scale,E=Math.max(a.y,y.y),ee=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))*b&&0<Math.max(0,ee-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=$t.alloc(),Ap(this,this.computeBounds(b)),$t.free(b)),b=this.ta,b===null||b instanceof Ql)))){var ne=this.Mb;E=this.Aa*ne;var ae=this.ya*ne,ue=this.scale*ne;ee=Math.round(Math.round(y.x*ue)-Math.round(a.x*ue)),y=Math.round(Math.round(y.y*ue)-Math.round(a.y*ue)),ue=this.jw,a=this.oy,ue.width!==E&&(ue.width=E),ue.height!==ae&&(ue.height=ae),a.clearRect(0,0,E,ae),ue=190*ne;var ge=70*ne,ye=Math.max(ee,0),Le=Math.max(y,0),ze=Math.floor(E-ye),Ke=Math.floor(ae-Le);a.drawImage(b.Oa,ye,Le,ze,Ke,0,0,ze,Ke),Hc(this.Yf,this)&&a.clearRect(0,0,ue,ge),b=ir(),a=ir(),Ke=Math.abs(ee),ze=Math.abs(y);var Je=ye===0?0:E-Ke;ye=st.allocAt(Je,0),Ke=st.allocAt(Ke+Je,ae),a.push(new $t(Math.min(ye.x,Ke.x),Math.min(ye.y,Ke.y),Math.abs(ye.x-Ke.x),Math.abs(ye.y-Ke.y)));var it=this.Ab;if(it.reset(),it.scale(ne,ne),this.Ca!==1&&it.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&it.translate(-ne.x,-ne.y),Wn(ye,it),Wn(Ke,it),b.push(new $t(Math.min(ye.x,Ke.x),Math.min(ye.y,Ke.y),Math.abs(ye.x-Ke.x),Math.abs(ye.y-Ke.y))),Je=Le===0?0:ae-ze,ye.h(0,Je),Ke.h(E,ze+Je),a.push(new $t(Math.min(ye.x,Ke.x),Math.min(ye.y,Ke.y),Math.abs(ye.x-Ke.x),Math.abs(ye.y-Ke.y))),Wn(ye,it),Wn(Ke,it),b.push(new $t(Math.min(ye.x,Ke.x),Math.min(ye.y,Ke.y),Math.abs(ye.x-Ke.x),Math.abs(ye.y-Ke.y))),Hc(this.Yf,this)&&(E=0<ee?0:-ee,ae=0<y?0:-y,ye.h(E,ae),Ke.h(ue+E,ge+ae),a.push(new $t(Math.min(ye.x,Ke.x),Math.min(ye.y,Ke.y),Math.abs(ye.x-Ke.x),Math.abs(ye.y-Ke.y))),Wn(ye,it),Wn(Ke,it),b.push(new $t(Math.min(ye.x,Ke.x),Math.min(ye.y,Ke.y),Math.abs(ye.x-Ke.x),Math.abs(ye.y-Ke.y)))),st.free(ye),st.free(Ke),Jh(this,!1,!0),this.Ka===null&&jt("No div specified"),this.ta===null&&jt("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(Ic(this),ae=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*ae,this.ya*ae),E.drawImage(this.jw.Oa,0<ee?0:Math.round(-ee),0<y?0:Math.round(-y)),ee=this.pa,ne=this.Ca,ue=Math.round(ee.x*ne)/ne,ge=Math.round(ee.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),ee.x===0&&ee.y===0||y.translate(-ue,-ge),E.save(),E.beginPath(),ee=a.length,ne=0;ne<ee;ne++)ue=a[ne],ue.width!==0&&ue.height!==0&&E.rect(Math.floor(ue.x),Math.floor(ue.y),Math.ceil(ue.width),Math.ceil(ue.height));for(E.clip(),E.setTransform(ae,0,0,ae,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,ee=y.length,this.Fd(y,ee,this,this.viewportBounds),ph(this,E),E.globalAlpha=this.pb,ae=0;ae<ee;ae++)if(ne=y[ae],ue=b,ne.visible&&ne.pb!==0){ge=Gu(ne,E),Le=ne.Zq,Le.length=0,ye=this.scale,ze=$t.alloc(),Ke=ne.Pa.s,it=Ke.length,Je=ue.length;for(var Tt=0;Tt<it;Tt++){var Pt=Ke[Tt],Nt=Jc(Pt,Pt.actualBounds);e:{for(var At=2/ye,Bt=4/ye,Rt=0;Rt<Je;Rt++){var Zt=ue[Rt];if(Zt.width!==0&&Zt.height!==0&&Nt.Vu(Zt.x-At,Zt.y-At,Zt.width+Bt,Zt.height+Bt)){Nt=!0;break e}}Nt=!1}Nt&&ne.Oj(E,Pt,this,Le,ye,ze,!0)}$t.free(ze),E.globalAlpha=ge}E.restore(),E.Vc(!0),this.Yf&&Hc(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Un(b),Un(a),this.ld=!1}}else this.bd();x&&(as(this),this.bd(),bf(this,!0))}else x?(as(this),this.bd(),bf(this,!0)):this.bd()}};function Ic(a){a.pn!==!1&&(a.pn=!1,Cp(a,a.Aa,a.ya))}function Cp(a,y,x){Jl(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Rc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,ee=!1,ne=a.gf?a.Db:0,ae=a.Be?a.Db:0,ue=E.clientWidth||x+ne,ge=E.clientHeight||b+ae,ye=a.viewportBounds;E=ye.x;var Le=ye.y,ze=ye.width,Ke=ye.height;if((ue!==x+ne||ge!==b+ae)&&(a.gf=!1,a.Be=!1,ae=ne=0,a.Aa=ue,a.ya=ge,ee=a.pn=!0,Jl(a)),!a.hf||!a.viewportBounds.w())return!0;var Je=a.ku,it=a.hu;if(a.Ee=!1,!(ee||a.gf||a.Be||a.mn||a.nn))return!0;var Tt=a.documentBounds,Pt=0,Nt=0,At=0,Bt=0,Rt=ye.width,Zt=ye.height,On=a.rj;a.contentAlignment.sb()?(Tt.width>Rt&&(Pt=On.left,Nt=On.right),Tt.height>Zt&&(At=On.top,Bt=On.bottom)):(Pt=On.left,Nt=On.right,At=On.top,Bt=On.bottom);var rr=Tt.width+Pt+Nt,$n=Tt.height+At+Bt;On=a.scale;var En=rr>ue/On,dn=$n>ge/On;if(!(ee||a.gf||a.Be||En||dn))return!0;Pt=Tt.x-Pt,ue=ye.x,Nt=Tt.right+Nt,ge=ye.right+ne,At=Tt.y-At;var Dr=ye.y;Tt=Tt.bottom+Bt,ye=ye.bottom+ae;var Mr="1px";if(Bt="1px",a.scrollMode===mh&&(En||dn)&&(En&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(En=1,Pt+1<ue&&(En=Math.max((ue-Pt)*On+a.Aa,En)),Nt>ge+1&&(En=Math.max((Nt-ge)*On+a.Aa,En)),Rt+ne+1<rr&&(En=Math.max((rr-Rt)*On+a.Aa,En)),Mr=En.toString()+"px"),dn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(En=1,At+1<Dr&&(En=Math.max((Dr-At)*On+a.ya,En)),Tt>ye+1&&(En=Math.max((Tt-ye)*On+a.ya,En)),Zt+ae+1<$n&&(En=Math.max(($n-Zt)*On+a.ya,En)),Bt=En.toString()+"px")),En=Mr!=="1px",dn=Bt!=="1px",En&&dn||!En&&!dn||(dn&&(ge-=a.Db),En&&(ye-=a.Db),rr<Rt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Pt+1<ue&&(ne=Math.max((ue-Pt)*On+a.Aa,ne)),Nt>ge+1&&(ne=Math.max((Nt-ge)*On+a.Aa,ne)),Rt+1<rr&&(ne=Math.max((rr-Rt)*On+a.Aa,ne)),Mr=ne.toString()+"px"),En=Mr!=="1px",ne=a.ya,En!==a.Be&&(ne=En?a.ya-a.Db:a.ya+a.Db),$n<Zt+ae||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ae=1,At+1<Dr&&(ae=Math.max((Dr-At)*On+ne,ae)),Tt>ye+1&&(ae=Math.max((Tt-ye)*On+ne,ae)),Zt+1<$n&&(ae=Math.max(($n-Zt)*On+ne,ae)),Bt=ae.toString()+"px"),dn=Bt!=="1px"),a.qr&&En===a.Be&&dn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(En!==a.Be&&(Mr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),ee=!0),a.Be=En,it.style.width=Mr,dn!==a.gf&&(Bt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),ee=!0,a.tn&&(ae=st.alloc(),dn?(y.style.left=a.Db+"px",a.position=ae.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=ae.h(a.pa.x-a.Db/a.scale,a.pa.y)),st.free(ae))),ee&&Jl(a),a.gf=dn,it.style.height=Bt,a.gu=!0,ee&&(a.pn=!0),y=Je.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Rt+1<rr?y=(a.position.x-Pt)*On:Pt+1<ue?y=Je.scrollWidth-Je.clientWidth:Nt>ge+1&&(y=a.position.x*On)),a.tn)switch(a.bu){case"negative":y=-(Je.scrollWidth-y-Je.clientWidth);break;case"reverse":y=Je.scrollWidth-y-Je.clientWidth}return Je.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Zt+1<$n?Je.scrollTop=(a.position.y-At)*On:At+1<Dr?Je.scrollTop=Je.scrollHeight-Je.clientHeight:Tt>ye+1&&(Je.scrollTop=a.position.y*On)),ue=a.Aa,ge=a.ya,Je.style.width=ue+(a.gf?a.Db:0)+"px",Je.style.height=ge+(a.Be?a.Db:0)+"px",x!==ue||b!==ge||a.animationManager.zb?(x=$t.allocAt(E,Le,ze,Ke),a.onViewportBoundsChanged(x,a.viewportBounds,On,ee),$t.free(x),!1):!0}Qe=Jt.prototype,Qe.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&jt("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&&jt('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(bo,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Qe.oi=function(a){this.partManager.oi(a);var y=this;Zc(a,function(x){_c(y,x)}),(a instanceof gi||a instanceof Br&&a.placeholder!==null)&&a.v(),a.data!==null&&Zc(a,function(x){ly(y.partManager,x)}),Xa(a)!==!0&&rc(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(Jc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Jc(a,a.actualBounds)),this.$b()},Qe.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Zc(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(Jc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Jc(a,a.actualBounds)),this.$b()},Qe.remove=function(a){Ep(this,a,!0)};function Ep(a,y,x){var b=y.layer;b!==null&&b.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=b.pc(-1,y,!1),0<=x&&a.cb(Eo,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}Qe.Is=function(a,y){if(y===void 0&&(y=!1),fn(a))for(var x=a.length,b=0;b<x;b++){var E=a[b];y&&!E.canDelete()||this.remove(E)}else for(x=new sn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Qe.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Jt.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=fd(this)),this.toolManager!==null){var E=new tn;if(a!==null)if(fn(a))for(var ee=0;ee<a.length;ee++)du(this,E,a[ee],x,b);else for(a=a.iterator;a.next();)du(this,E,a.value,x,b);else{for(a=this.parts;a.next();)du(this,E,a.value,x,b);for(a=this.nodes;a.next();)du(this,E,a.value,x,b);for(a=this.links;a.next();)du(this,E,a.value,x,b)}Qh(this,E,y,b,x)}};function du(a,y,x,b,E,ee){if(!y.contains(x)&&(ee===void 0&&(ee=!1),!b||ee||x.canMove()||x.canCopy()))if(E===void 0&&(E=fd(a)),x instanceof _n){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Br&&(x.placeholder!==null||E.dragsMembers))for(ee=x.memberParts;ee.next();)du(a,y,ee.value,b,E,E.groupsAlwaysMove);for(ee=x.linksConnected;ee.next();){var ne=ee.value;if(!y.contains(ne)){var ae=ne.fromNode,ue=ne.toNode;ae!==null&&y.contains(ae)&&ue!==null&&y.contains(ue)&&du(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)du(a,y,x.value,b,E)}else if(x instanceof Tn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)du(a,y,x.value,b,E);else x instanceof gi||y.add(x,a.Pd(E,x,x.location))}function Qh(a,y,x,b,E){if(y!==null&&y.count!==0){var ee=st.alloc(),ne=st.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||pd(a,y);for(var ae=ir(),ue=ir(),ge=y.iterator,ye=st.alloc();ge.next();){var Le=ge.key,ze=ge.value;if(Le.Zc()){var Ke=kp(a,Le,y);Ke!==null?ae.push(new re(Le,ze,Ke)):(!E||Le.canMove())&&(Ke=ze.point,ee.assign(Ke),a.computeMove(Le,ee.add(ne),b,ye),Le.location=ye,ze.shifted===void 0&&(ze.shifted=new st),ze.shifted.assign(ye.re(Ke)))}else ge.key instanceof Tn&&ue.push(ge.sa)}for(st.free(ye),E=ae.length,ge=0;ge<E;ge++)Le=ae[ge],ee.assign(Le.info.point),Le.Su.shifted===void 0&&(Le.Su.shifted=new st),Le.node.location=ee.add(Le.Su.shifted);for(E=st.alloc(),ge=st.alloc(),Le=ue.length,ze=0;ze<Le;ze++){var Je=ue[ze];if(Ke=Je.key,Ke instanceof Tn)if(Ke.suspendsRouting){Ke.Tg=null,ye=Ke.fromNode;var it=Ke.toNode;if(a.draggedLink!==null&&b.dragsLink)if(it=Je.value.point,Ke.dragComputation===null)y.add(Ke,a.Pd(b,Ke,ne)),Ch(Ke,ne.x-it.x,ne.y-it.y);else{Je=st.allocAt(0,0),(ye=Ke.i(0))&&ye.w()&&Je.assign(ye);var Tt=ye=st.alloc().assign(Je).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Tt=st.alloc(),dd(a,Ke,ye,Tt,b)),ye.assign(Ke.dragComputation(Ke,ye,Tt)).re(Je),y.add(Ke,a.Pd(b,Ke,ye)),Ch(Ke,ye.x-it.x,ye.y-it.y),st.free(Je),st.free(ye),Tt!==ye&&st.free(Tt)}else ye!==null&&(E.assign(ye.location),Tt=y.I(ye),Tt!==null&&E.re(Tt.point)),it!==null&&(ge.assign(it.location),Tt=y.I(it),Tt!==null&&ge.re(Tt.point)),ye!==null&&it!==null?E.Xa(ge)?(ye=Je.value.point,it=ee,it.assign(E),it.re(ye),y.add(Ke,a.Pd(b,Ke,E)),Ch(Ke,it.x,it.y)):(Ke.suspendsRouting=!1,Ke.bb()):(Je=Je.value.point,ye=ye!==null?E:it!==null?ge:ne,y.add(Ke,a.Pd(b,Ke,ye)),Ch(Ke,ye.x-Je.x,ye.y-Je.y))}else(Ke.fromNode===null||Ke.toNode===null)&&(ye=Je.value.point,y.add(Ke,a.Pd(b,Ke,ne)),Ch(Ke,ne.x-ye.x,ne.y-ye.y))}st.free(ee),st.free(ne),st.free(E),st.free(ge),Un(ae),Un(ue),x||(xa(a),$h(a,y))}}Jt.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new st),b.assign(y),a===null)return b;var E=y,ee=x.isGridSnapEnabled;ee&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=st.alloc(),dd(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var ne=a.minLocation,ae=ne.x;isNaN(ae)&&(ae=ee?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=ee?Math.round(1e3*a.location.y)/1e3:a.location.y);var ue=a.maxLocation,ge=ue.x;return isNaN(ge)&&(ge=ee?Math.round(1e3*a.location.x)/1e3:a.location.x),ue=ue.y,isNaN(ue)&&(ue=ee?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(ae,Math.min(x.x,ge)),Math.max(ne,Math.min(x.y,ue))),E!==y&&st.free(E),b};function fd(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function dd(a,y,x,b,E){if(E===void 0&&(E=fd(a)),b.assign(x),y!==null){var ee=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var ne=E.gridSnapOrigin,ae=ne.x;if(ne=ne.y,E=E.gridSnapCellSpot,ee!==null){var ue=ee.gridCellSize;isNaN(a)&&(a=ue.width),isNaN(y)&&(y=ue.height),ee=ee.gridOrigin,isNaN(ae)&&(ae=ee.x),isNaN(ne)&&(ne=ee.y)}ee=st.allocAt(0,0),ee.yi(0,0,a,y,E),Gt.No(x.x,x.y,ae+ee.x,ne+ee.y,a,y,b),st.free(ee)}}function pd(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Tn&&(y.suspendsRouting=!0)}function $h(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Tn&&(x.suspendsRouting=!1,X0(x)&&x.bb())}a.Mr=!1}}function kp(a,y,x){return y=y.containingGroup,y!==null&&(a=kp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Qe=Jt.prototype,Qe.Pd=function(a,y,x){if(x===void 0)return new Uu(Bn);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Uu(new st(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Uu(x.copy())};function Tp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&jt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&jt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&jt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&jt("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var b=0;b<x;b++)a.M(b).name===y&&jt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Qe.Al=function(a){Tp(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(bo,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Qe.Ww=function(a,y){Tp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Eo,"layers",this,a,null,b,null));var E=x.count,ee;for(ee=0;ee<E;ee++)if(x.M(ee)===y){x.Gb(ee,a);break}return this.cc!==null&&this.cb(bo,"layers",this,null,a,null,ee),this.N(),0>b&&this.Ya(),this},Qe.Cy=function(a,y){Tp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Eo,"layers",this,a,null,b,null));var E=x.count,ee;for(ee=0;ee<E;ee++)if(x.M(ee)===y){x.Gb(ee+1,a);break}return this.cc!==null&&this.cb(bo,"layers",this,null,a,null,ee+1),this.N(),0>b&&this.Ya(),this},Qe.kA=function(a){if(a.diagram!==this&&jt("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(Eo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Qe.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Qe.Yw=function(a){return this.pf===null&&(this.pf=new rn),this.pf.add(a),this.model.Pe(a),this},Qe.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Qe.Pe=function(a){return this.zg===null&&(this.zg=new rn),this.zg.add(a),this},Qe.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Qe.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Ea&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},Qe.cb=function(a,y,x,b,E,ee,ne){ee===void 0&&(ee=null),ne===void 0&&(ne=null);var ae=new oo;ae.diagram=this,ae.change=a,ae.propertyName=y,ae.object=x,ae.oldValue=b,ae.oldParam=ee,ae.newValue=E,ae.newParam=ne,this.ds(ae)},Qe.g=function(a,y,x,b,E){this.cb(no,a,this,y,x,b,E)},Jt.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var b=a.change;if(b===no){var E=a.object;if(ro(E,a.propertyName,a.I(y)),E instanceof _t){var ee=E.part;ee!==null&&ee.Wb()}this.isModified=!0}else if(b===bo){var ne=a.object,ae=a.newParam,ue=a.newValue;if(ne instanceof bn)if(typeof ae=="number"&&ue instanceof _t){y?ne.pc(ae):ne.Gb(ae,ue);var ge=ne.part;ge!==null&&ge.Wb()}else typeof ae=="number"&&ue instanceof Io&&(ue.isRow?c1(ne,ae,y?void 0:ue):f1(ne,ae,y?void 0:ue));else if(ne instanceof ra){var ye=a.oldParam===!0;typeof ae=="number"&&ue instanceof Sr&&(y?(ue.isSelected=!1,ue.isHighlighted=!1,ue.Wb(),ne.pc(ye?ae:-1,ue,ye)):ne.oi(ae,ue,ye))}else ne instanceof Jt?typeof ae=="number"&&ue instanceof ra&&(y?this.Wa.mb(ae):(ue.Xe(this),this.Wa.Gb(ae,ue))):jt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===Eo){var Le=a.object,ze=a.oldParam,Ke=a.oldValue;if(Le instanceof bn)typeof ze=="number"&&Ke instanceof _t?y?Le.Gb(ze,Ke):Le.pc(ze):typeof ze=="number"&&Ke instanceof Io&&(Ke.isRow?c1(Le,ze,y?Ke:void 0):f1(Le,ze,y?Ke:void 0));else if(Le instanceof ra){var Je=a.newParam===!0;typeof ze=="number"&&Ke instanceof Sr&&(y?0>Le.Pa.indexOf(Ke)&&Le.oi(ze,Ke,Je):(Ke.isSelected=!1,Ke.isHighlighted=!1,Ke.Wb(),Le.pc(Je?ze:-1,Ke,Je)))}else Le instanceof Jt?typeof ze=="number"&&Ke instanceof ra&&(y?(Ke.Xe(this),this.Wa.Gb(ze,Ke)):this.Wa.mb(ze)):jt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ea&&jt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Jt.prototype.Ea=function(a){return this.undoManager.Ea(a)},Jt.prototype.eb=function(a){return this.undoManager.eb(a)},Jt.prototype.Kf=function(){return this.undoManager.Kf()},Jt.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Jt.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Jt.prototype.rp=function(){this.partManager.rp()};function Lp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Jl(a),a.N(),a.Ee=!0,b.zb&&(_u(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Jl(a);else{a.vb=!0;var E=a.viewportBounds.copy(),ee=a.Aa,ne=a.ya,ae=a.zoomPoint.x,ue=a.zoomPoint.y,ge=a.contentAlignment;isNaN(ae)&&(ge.$c()?ge.Hf(is)?ae=0:ge.Hf(fo)&&(ae=ee-1):ae=ge.sb()?ge.x*(ee-1):ee/2),isNaN(ue)&&(ge.$c()?ge.Hf(Pa)?ue=0:ge.Hf(os)&&(ue=ne-1):ue=ge.sb()?ge.y*(ne-1):ne/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),ee=st.allocAt(a.pa.x+ae/y-ae/x,a.pa.y+ue/y-ue/x),a.position=ee,st.free(ee),a.Ca=x,Jl(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),al(a,!1),b.zb&&(_u(b)||b.ce.add(b.H,"scale",y,a.Ca))}}Jt.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==Ba||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Ji&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Cc(E,this)),this.vb||this.invalidateViewport(a,y),Yl(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=b,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(ee){ee.isAvoiding&&ee.actualBounds.Yc(y)&&ee.bb()})}};function Yl(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=vn.alloc(),E=1,ee=1,ne=x.O.s,ae=ne.length,ue=0;ue<ae;ue++){var ge=ne[ue],ye=Math.abs(ge.interval);2>ye||(m0(ge.figure)?ee=ee*ye/Gt.vx(ee,ye):E=E*ye/Gt.vx(E,ye))}if(ne=x.gridCellSize,b.h(ee*ne.width,E*ne.height),y!==void 0)E=y.width,ee=y.height,a=y.x,ne=y.y;else{if(y=$t.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){$t.free(y);return}E=y.width,ee=y.height,a=y.x,ne=y.y,$t.free(y)}x.width=E+2*b.width,x.height=ee+2*b.height,y=st.alloc(),Gt.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),vn.free(b),x.part.location=y,st.free(y)}}Jt.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),b=x.length,E=0;E<b;E++)x[E].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},Jt.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))},Jt.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),fn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Sr||jt("Diagram.selectCollection given something that is not a Part: "+b),b.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Sr||jt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Jt.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,b=0;b<x;b++)y[b].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Qe=Jt.prototype,Qe.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Qe.Jz=function(a){a=new sn().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 Sr||jt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Qe.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,ee=st.alloc();if(a==="pixel")E=x;else if(a==="line")E=x*(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=b?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(E=x*Math.max(a-(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){E=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=ee.h(x.x,E.y):y==="left"?this.position=ee.h(E.x,x.y):y==="down"?this.position=ee.h(x.x,E.bottom-x.height):y==="right"&&(this.position=ee.h(E.right-x.width,x.y)),st.free(ee);return}jt("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=ee.h(x.x,x.y-E):y==="down"?this.position=ee.h(x.x,x.y+E):y==="left"?this.position=ee.h(x.x-E,x.y):y==="right"?this.position=ee.h(x.x+E,x.y):jt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),st.free(ee)},Qe.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)},Qe.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Qe.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)},Qe.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,ee=b+a.height,ne=y.m11,ae=y.m12,ue=y.m21,ge=y.m22,ye=y.dx,Le=y.dy,ze=x*ne+b*ue+ye;y=x*ae+b*ge+Le;var Ke=E*ne+b*ue+ye;return a=E*ae+b*ge+Le,b=x*ne+ee*ue+ye,x=x*ae+ee*ge+Le,ne=E*ne+ee*ue+ye,E=E*ae+ee*ge+Le,ee=Math.min(ze,Ke),ze=Math.max(ze,Ke),Ke=Math.min(y,a),y=Math.max(y,a),ee=Math.min(ee,b),ze=Math.max(ze,b),Ke=Math.min(Ke,x),y=Math.max(y,x),ee=Math.min(ee,ne),ze=Math.max(ze,ne),Ke=Math.min(Ke,E),y=Math.max(y,E),new $t(ee,Ke,ze-ee,y-Ke)},Qe.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),Wn(a.copy(),this.Ab)};function em(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Mp(a){return a=xd.get(a),a!==null?new a:new Ai}Jt.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Ea&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(ue){return ue.diagram=E}),a.mouseMoveTools.each(function(ue){return ue.diagram=E}),a.mouseUpTools.each(function(ue){return ue.diagram=E}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else b==="StartingUndo"||b==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):b==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===Ea){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),xa(this));var ee=this.animationManager;b==="RolledBackTransaction"&&ee.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||od(ee),b==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),b!=="CommittedTransaction"&&b!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var ne=a.isTransactionFinished;if(ne&&(em(this),this.As.clear(),Gg(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var ae=this;Yt(function(){ae.currentTool.standardMouseOver(),ae.Rt=!1},10)}}}finally{this.aa=!0}}}};function _c(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)qh(a,y[b])}function qh(a,y){if(y instanceof hs){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof sn&&x.Bg.add(a);var b=y.Eg;if(b!==null&&b.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",b=a.Og.I(x),b===null)b=[],b.push(y),a.Og.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}}function Np(a,y){if(y instanceof hs){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var b=x.getAttribute("src")||"",E=a.Og.I(b);if(E!==null){for(var ee=0;ee<E.length;ee++)if(E[ee]===y){E.splice(ee,1),E.length===0&&(a.Og.remove(b),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof sn&&x.Bg.remove(a),Od(b));break}}}}}Jt.prototype.Wd=function(){this.partManager.Wd()},Jt.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Jt.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Jt.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Jt.prototype.Vb=function(a){return this.partManager.Vb(a)},Jt.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Qe=Jt.prototype,Qe.Lc=function(a){return this.partManager.Lc(a)},Qe.ii=function(a){return this.partManager.ii(a)},Qe.Kc=function(a){return this.partManager.Kc(a)},Qe.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:wr(Tr(y)))},Qe.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:wr(Tr(y)))};function Jl(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 Ap(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),al(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Qe.Va=function(){if(this.Zi){var a=$t.alloc();Ap(this,this.computeBounds(a)),$t.free(a)}},Qe.rz=function(){for(var a=new sn,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},Qe.qz=function(){return this.ai.iterator},Qe.Uz=function(a){xa(this),a&&gd(this,!0),this.ld?jp(this,!1):(this.Jk=!0,Ks(this))};function gd(a,y){for(var x=a.ai.iterator;x.next();)tm(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function tm(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)tm(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function jp(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,ee=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!ee.defaultAnimation.isAnimating&&!ee.zb&&(y||hu(ee,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)Op(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),xa(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||od(ee),a.aa=x}}}function Op(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Op(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),Ef(a,y),E.isValidLayout=!0):a.xh=!0)}}Qe.yz=function(){for(var a=new rn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function n0(a){function y(E){var ee=E.toLowerCase(),ne=new rn;x.add(E,ne),x.add(ee,ne),b.add(E,E),b.add(ee,E)}var x=new tn,b=new tn;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=b}function nm(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function md(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;jt("Unknown DiagramEvent name: "+y)}Qe.Bj=function(a,y){return a=md(this,a),a!==null&&a.add(y),this},Qe.am=function(a,y){a=md(this,a),a!==null&&a.remove(y)},Qe.R=function(a,y,x){var b=md(this,a),E=new au;if(E.diagram=this,a=nm(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x<y;x++)(0,b[x])(E)};function vd(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Qe.Yj=function(a,y){return yd(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Jt.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?yp(this,a):a.assign(this.documentBounds)};function yd(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new lg(a.avoidanceCellSize)),E.vs||E.group!==x||E.Yx!==b){if(E.Hx=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),E.Ix=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=rm(a,x)),x===null){y=$t.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var ee=a.nodes;ee.next();){var ne=ee.value,ae=ne.layer;ae!==null&&ae.visible&&!ae.isTemporary&&Sd(a,ne,b,y)}$t.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=$t.alloc(),ee=x.memberParts;ee.next();)ne=ee.value,ne instanceof _n&&Sd(a,ne,b,y);$t.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&oS(E);return E}function rm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?rm(a,y.containingGroup):null}function Sd(a,y,x,b){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(b),a=a.Xh;var E=y.x,ee=y.y;if(_d(a,E,ee))for(x=(ee-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((ee+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(ee=a.ac[E],ee.fill)ee.fill(kh,x,y+1);else for(var ne=x;ne<=y;ne++)ee[ne]=kh}else if(y instanceof Br)for(y=y.memberParts;y.next();)E=y.value,E instanceof _n&&Sd(a,E,x,b)}}function gh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Jt.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Fp(this)};function Fp(a){a.vk===-1&&(a.vk=Yt(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=$t.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Ap(a,y),$t.free(y),a.Fc=!0,a.bd(),Fp(a))}},a.vp))}Jt.prototype.ug=function(){this.vk!==-1&&(yn.clearTimeout(this.vk),this.vk=-1)},Jt.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 b=this.viewportBounds,E=this.scale;b=$t.allocAt(0,0,b.width*E,b.height*E);var ee=st.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,ee.x-=ne,a.x<b.x+x.left/2&&(ee.x-=ne),a.x<b.x+x.left/4&&(ee.x-=4*ne)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,ee.x+=ne,a.x>b.x+b.width-x.right/2&&(ee.x+=ne),a.x>b.x+b.width-x.right/4&&(ee.x+=4*ne));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,ee.y-=ne,a.y<b.y+x.top/2&&(ee.y-=ne),a.y<b.y+x.top/4&&(ee.y-=4*ne)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,ee.y+=ne,a.y>b.y+b.height-x.bottom/2&&(ee.y+=ne),a.y>b.y+b.height-x.bottom/4&&(ee.y+=4*ne)),ee.Xa(Bn)||(y=new st(y.x+ee.x/E,y.y+ee.y/E)),$t.free(b),st.free(ee),y},Qe=Jt.prototype,Qe.Cs=function(){return null},Qe.av=function(){return null},Qe.bs=function(a,y){this.pj.add(a,y)},Qe.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Br&&(y.$p=null)})};function kf(a,y,x){function b(){var ye=+new Date;for(ee=!0,ne.reset();ne.next();)if(!ne.value[0].al){ee=!1;break}ee||ye-ge>ue?y(x,E,ae):yn.requestAnimationFrame(b)}for(var E=x.callback,ee=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){ee=!1;break}if(typeof E!="function"||ee)return y(x,E,a);var ae=a,ue=x.callbackTimeout||300,ge=+new Date;return yn.requestAnimationFrame(function(){b()}),null}Qe.Wz=function(a){return vo?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Qe.Jx=function(a){return a===void 0&&(a={}),kf(this,this.Xz,a)},Qe.Xz=function(a,y,x){var b=im(x,a,"canvas",null);if(b===null)return null;x=b.Z.canvas;var E=null;if(x!==null)switch(E=a.returnType,E===void 0?E="string":E=E.toLowerCase(),E){case Uc+"data":E=b.getImageData(0,0,x.width,x.height);break;case Uc:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&jt('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function im(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&jt("properties argument must be an Object.");var E=y.size||null,ee=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(ee="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new vn(1/0,1/0):new vn(2e3,2e3));var ae=y.position||null,ue=y.parts||null,ge=y.padding===void 0?1:y.padding,ye=y.background||null,Le=y.omitTemporary;Le===void 0&&(Le=!0);var ze=y.document||document,Ke=y.elementFinished||null,Je=y.showTemporary;Je===void 0&&(Je=!Le),y=y.showGrid,y===void 0&&(y=Je),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof ge=="number"?ge=new Gr(ge):ge instanceof Gr||jt("MakeImage padding must be a Margin or a number."),ge.left=Math.max(ge.left,0),ge.right=Math.max(ge.right,0),ge.top=Math.max(ge.top,0),ge.bottom=Math.max(ge.bottom,0),a.ib.Vc(!0),Le=new ll(null,ze,void 0,!0);var it=Le.context;if(!(E||ee||ue||ae))return Le.width=a.Aa+Math.ceil(ge.left+ge.right),Le.height=a.ya+Math.ceil(ge.top+ge.bottom),x==="SVG"?b===null?null:(b.resize(Le.width,Le.height,Le.width,Le.height),b.ownerDocument=ze,b.hs=Ke,cd(a,b.context,ge,new vn(Le.width,Le.height),a.Ca,a.pa,ue,ye,Je,y),b.context):(a.Xm=!1,cd(a,it,ge,new vn(Le.width,Le.height),a.Ca,a.pa,ue,ye,Je,y),a.Xm=!0,Le.context);var Tt=a.Pp,Pt=a.documentBounds.copy();if(Pt.Fv(a.yb),Je)for(var Nt=a.Wa.s,At=Nt.length,Bt=0;Bt<At;Bt++){var Rt=Nt[Bt];if(Rt.visible&&Rt.isTemporary){Rt=Rt.Pa.s;for(var Zt=Rt.length,On=0;On<Zt;On++){var rr=Rt[On];rr.isInDocumentBounds&&rr.isVisible()&&(rr=rr.actualBounds,rr.w()&&Pt.ed(rr))}}}if(Nt=new st(Pt.x,Pt.y),ue!==null){for(At=new $t(0,0,0,0),Bt=!0,Rt=ue.iterator,Rt.reset();Rt.next();)Zt=Rt.value,Zt instanceof Sr&&(On=Zt.layer,On!==null&&!On.visible||On!==null&&!Je&&On.isTemporary||!Zt.isVisible()||(Zt=Zt.actualBounds,Zt.w()&&(Bt?(Bt=!1,At.assign(Zt)):At.ed(Zt))));Pt.width=At.width,Pt.height=At.height,Nt.x=At.x,Nt.y=At.y}return ae!==null&&ae.w()&&(Nt=ae,ee||(ee=Tt)),At=ae=0,ge!==null&&(ae=ge.left+ge.right,At=ge.top+ge.bottom),Bt=Rt=0,E!==null&&(Rt=E.width,Bt=E.height,isFinite(Rt)&&(Rt=Math.max(0,Rt-ae)),isFinite(Bt)&&(Bt=Math.max(0,Bt-At))),E!==null&&ee!==null?(ee==="NaN"&&(ee=Tt),E.w()?(E=Rt,Pt=Bt):isNaN(Bt)?(E=Rt,Pt=Pt.height*ee):(E=Pt.width*ee,Pt=Bt)):E!==null?E.w()?(ee=Math.min(Rt/Pt.width,Bt/Pt.height),E=Rt,Pt=Bt):isNaN(Bt)?(ee=Rt/Pt.width,E=Rt,Pt=Pt.height*ee):(ee=Bt/Pt.height,E=Pt.width*ee,Pt=Bt):ee!==null?ee==="NaN"&&ne.w()?(ee=Math.min((ne.width-ae)/Pt.width,(ne.height-At)/Pt.height),ee>Tt?(ee=Tt,E=Pt.width,Pt=Pt.height):(E=ne.width,Pt=ne.height)):(E=Pt.width*ee,Pt=Pt.height*ee):(ee=Tt,E=Pt.width,Pt=Pt.height),ge!==null?(E+=ae,Pt+=At):ge=new Gr(0),ne!==null&&(Tt=ne.width,ne=ne.height,isNaN(Tt)&&(Tt=2e3),isNaN(ne)&&(ne=2e3),isFinite(Tt)&&(E=Math.min(E,Tt)),isFinite(ne)&&(Pt=Math.min(Pt,ne))),Le.width=Math.ceil(E),Le.height=Math.ceil(Pt),x==="SVG"?b===null?null:(b.resize(Le.width,Le.height,Le.width,Le.height),b.ownerDocument=ze,b.hs=Ke,cd(a,b.context,ge,new vn(Math.ceil(E),Math.ceil(Pt)),ee,Nt,ue,ye,Je,y),b.context):(a.Xm=!1,cd(a,it,ge,new vn(Math.ceil(E),Math.ceil(Pt)),ee,Nt,ue,ye,Je,y),a.Xm=!0,Le.context)}zt.Object.defineProperties(Jt.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Oe||(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 Ql(this,yn.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 Ql(this,yn.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(yn,"resize",this.Ov,!1),this.removeEventListener(yn,"wheel",this.$j,!0),cu===this&&(cu=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),mp(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)&&An(a,"0 <= value <= 1",Jt,"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),al(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),al(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),al(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),al(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&An(a,">= 0",Jt,"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&&An(a,">= 0",Jt,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var b=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===b&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===b&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===b&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<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 An(a,">= 0",Jt,"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||em(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&&jt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=gp(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,hu(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(ee){return y.ik(ee)}),y.ik(this.Oc)),this.cc=a,this.partManager=Mp(this.cc.type);for(var E=0;E<x.length;E++)this.add(x[E]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(ee){return a.Pe(ee)}),this.vb=b,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(yn,"pointermove",this.dk,!0),this.addEventListener(yn,"pointerdown",this.ui,!0),this.addEventListener(yn,"pointerup",this.fk,!0),this.addEventListener(yn,"pointerout",this.ek,!0),this.addEventListener(yn,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(yn,"wheel",this.$j,!0),this.addEventListener(yn,"selectstart",this.preventDefault,!1)):(this.removeEventListener(yn,"pointermove",this.dk,!0),this.removeEventListener(yn,"pointerdown",this.ui,!0),this.removeEventListener(yn,"pointerup",this.fk,!0),this.removeEventListener(yn,"pointerout",this.ek,!0),this.removeEventListener(yn,"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(yn,"wheel",this.$j,!0),this.removeEventListener(yn,"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=st.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Ug(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Jl(this):(this.vb=!0,a=this.scale,Sp(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)}st.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=Jg(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=Jg(this)),a.type!==bn.Grid&&jt("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),Yl(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),Jl(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||jt("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 Gr(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===mh&&al(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,al(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,Lp(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&&Lp(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!==Ba&&al(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()||jt("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()||jt("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)):An(a,"> 0",Jt,"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)):An(a,"> 0",Jt,"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),al(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 Gr(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&&jt("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();)$p(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==vh&&a!==Do&&a!==wd&&jt("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 vn(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 Gr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),zt.Object.defineProperties(Jt,{licenseKey:{get:function(){return zp.jc()},set:function(a){zp.add(a.replace(/\s/g,""))}},version:{get:function(){return Gc}}}),Jt.prototype.makeImageData=Jt.prototype.Jx,Jt.prototype.makeImage=Jt.prototype.Wz,Jt.prototype.cacheGroupExternalLinks=Jt.prototype.Fu,Jt.prototype.addRenderer=Jt.prototype.bs,Jt.prototype.makeSVG=Jt.prototype.av,Jt.prototype.makeSvg=Jt.prototype.Cs,Jt.prototype.stopAutoScroll=Jt.prototype.ug,Jt.prototype.doAutoScroll=Jt.prototype.gs,Jt.prototype.isUnoccupied=Jt.prototype.Yj,Jt.prototype.raiseDiagramEvent=Jt.prototype.R,Jt.prototype.removeDiagramListener=Jt.prototype.am,Jt.prototype.addDiagramListener=Jt.prototype.Bj,Jt.prototype.findTreeRoots=Jt.prototype.yz,Jt.prototype.layoutDiagram=Jt.prototype.Uz,Jt.prototype.findTopLevelGroups=Jt.prototype.qz,Jt.prototype.findTopLevelNodesAndLinks=Jt.prototype.rz,Jt.prototype.ensureBounds=Jt.prototype.Va,Jt.prototype.findLinksByExample=Jt.prototype.ls,Jt.prototype.findNodesByExample=Jt.prototype.ms,Jt.prototype.findLinkForData=Jt.prototype.Kc,Jt.prototype.findNodeForData=Jt.prototype.ii,Jt.prototype.findPartForData=Jt.prototype.Lc,Jt.prototype.findLinkForKey=Jt.prototype.findLinkForKey,Jt.prototype.findNodeForKey=Jt.prototype.Vb,Jt.prototype.findPartForKey=Jt.prototype.findPartForKey,Jt.prototype.rebuildParts=Jt.prototype.Wd,Jt.prototype.transformViewToDoc=Jt.prototype.Ps,Jt.prototype.transformRectDocToView=Jt.prototype.zA,Jt.prototype.transformDocToView=Jt.prototype.op,Jt.prototype.centerRect=Jt.prototype.es,Jt.prototype.scrollToRect=Jt.prototype.tv,Jt.prototype.scroll=Jt.prototype.scroll,Jt.prototype.highlightCollection=Jt.prototype.Jz,Jt.prototype.highlight=Jt.prototype.Iz,Jt.prototype.selectCollection=Jt.prototype.rA,Jt.prototype.select=Jt.prototype.select,Jt.prototype.updateAllRelationshipsFromData=Jt.prototype.rp,Jt.prototype.updateAllTargetBindings=Jt.prototype.updateAllTargetBindings,Jt.prototype.commit=Jt.prototype.commit,Jt.prototype.rollbackTransaction=Jt.prototype.Kf,Jt.prototype.commitTransaction=Jt.prototype.eb,Jt.prototype.startTransaction=Jt.prototype.Ea,Jt.prototype.raiseChanged=Jt.prototype.g,Jt.prototype.raiseChangedEvent=Jt.prototype.cb,Jt.prototype.removeChangedListener=Jt.prototype.ik,Jt.prototype.addChangedListener=Jt.prototype.Pe,Jt.prototype.removeModelChangedListener=Jt.prototype.mA,Jt.prototype.addModelChangedListener=Jt.prototype.Yw,Jt.prototype.findLayer=Jt.prototype.Qj,Jt.prototype.removeLayer=Jt.prototype.kA,Jt.prototype.addLayerAfter=Jt.prototype.Cy,Jt.prototype.addLayerBefore=Jt.prototype.Ww,Jt.prototype.addLayer=Jt.prototype.Al,Jt.prototype.moveParts=Jt.prototype.moveParts,Jt.prototype.copyParts=Jt.prototype.Kj,Jt.prototype.removeParts=Jt.prototype.Is,Jt.prototype.remove=Jt.prototype.remove,Jt.prototype.add=Jt.prototype.add,Jt.prototype.clearDelayedGeometries=Jt.prototype.bx,Jt.prototype.setProperties=Jt.prototype.nm,Jt.prototype.attach=Jt.prototype.Du,Jt.prototype.set=Jt.prototype.set,Jt.prototype.resetInputOptions=Jt.prototype.Sx,Jt.prototype.setInputOption=Jt.prototype.sA,Jt.prototype.getInputOption=Jt.prototype.Ql,Jt.prototype.resetRenderingHints=Jt.prototype.Tx,Jt.prototype.setRenderingHint=Jt.prototype.Xx,Jt.prototype.getRenderingHint=Jt.prototype.Gf,Jt.prototype.maybeUpdate=Jt.prototype.bd,Jt.prototype.requestUpdate=Jt.prototype.$b,Jt.prototype.delayInitialization=Jt.prototype.Xy,Jt.prototype.isUpdateRequested=Jt.prototype.Pz,Jt.prototype.invalidateDocumentBounds=Jt.prototype.Ya,Jt.prototype.findObjectsNear=Jt.prototype.og,Jt.prototype.findPartsNear=Jt.prototype.mz,Jt.prototype.findObjectsIn=Jt.prototype.Cf,Jt.prototype.findPartsIn=Jt.prototype.ux,Jt.prototype.findObjectsAt=Jt.prototype.ji,Jt.prototype.findPartsAt=Jt.prototype.lz,Jt.prototype.findObjectAt=Jt.prototype.ic,Jt.prototype.findPartAt=Jt.prototype.Ol,Jt.prototype.focusObject=Jt.prototype.zz,Jt.prototype.alignDocument=Jt.prototype.Jy,Jt.prototype.zoomToRect=Jt.prototype.BA,Jt.prototype.zoomToFit=Jt.prototype.zoomToFit,Jt.prototype.diagramScroll=Jt.prototype.kx,Jt.prototype.focus=Jt.prototype.focus;var xd=new tn,om=null,vo=yn.document!==void 0,zc=null,ec="",Ba=new an(Jt,"None",0),Fs=new an(Jt,"Uniform",1),tc=new an(Jt,"UniformToFill",2),Tf=new an(Jt,"CycleAll",10),Dp=new an(Jt,"CycleNotDirected",11),Bp=new an(Jt,"CycleNotDirectedFast",12),Ip=new an(Jt,"CycleNotUndirected",13),Rp=new an(Jt,"CycleDestinationTree",14),_p=new an(Jt,"CycleSourceTree",15),mh=new an(Jt,"DocumentScroll",1),Lf=new an(Jt,"InfiniteScroll",2),vh=new an(Jt,"TreeParentCollapsed",21),Do=new an(Jt,"AllParentsCollapsed",22),wd=new an(Jt,"AnyParentsCollapsed",23),zp=new rn,Gc="2.3.10",Uc="image",Mf=null,am=!1;function Ta(){if(vo){var a=yn.document.createElement("canvas"),y=a.getContext("2d"),x=gn("7ca11abfd022028846");y[x]=gn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",zn.Dx+"4ae6247590da4bb21c324ba3a84e385776",jr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Gt.za],E=1;5>E;E++)y[gn("7ca11abfd7330390")](gn(b[E-1]),10,15*E);for(y[x]=gn("39f046ebb36e4b"),x=1;5>x;x++)y[gn("7ca11abfd7330390")](gn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(jr.prototype.Cd=jr.prototype.Eu),Mf=a}}Jt.className="Diagram",Jt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=yn.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Jt?y.H:null},Jt.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},Jt.useDOM=function(a){vo=a?yn.document!==void 0:!1},Jt.isUsingDOM=function(){return vo},Jt.None=Ba,Jt.Uniform=Fs,Jt.UniformToFill=tc,Jt.CycleAll=Tf,Jt.CycleNotDirected=Dp,Jt.CycleNotDirectedFast=Bp,Jt.CycleNotUndirected=Ip,Jt.CycleDestinationTree=Rp,Jt.CycleSourceTree=_p,Jt.DocumentScroll=mh,Jt.InfiniteScroll=Lf,Jt.TreeParentCollapsed=vh,Jt.AllParentsCollapsed=Do,Jt.AnyParentsCollapsed=wd;function sm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Hc(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=yn[gn("76a715b2f73f148a")][gn("72ba13b5")]||"";if(a.Rc=!0,vo){var b=Jt[gn("76a115b6ed251eaf4692")];if(b)for(var E=zp.iterator;E.next()&&(b=E.value,b=gn(b).split(gn("39e9")),!(6>b.length));){var ee=gn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=gn(zn[gn("6cae19")]).split(".");if(ee[0]>ne[0]||ee[0]===ne[0]&&ee[1]>=ne[1]){var ae=yn[gn("74a900bae4370f8b51")][gn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=ae[gn("73a612b6fb191d")](gn("3aad1ab6e022098b4dc4")),ee=gn(b[2]),-1<ne&&(ae=ae[gn("73a612b6fb191d")](ee.toLowerCase()+"/"),a.Rc=!(-1<ae&&ae<ne),!a.Rc))break;for(ne=x[gn("76ad18b4f73e")],ae=x[gn("73a612b6fb191d")](gn("35e7"))+2;ae<ne;ae++)y+=x[ae];if(ne=y[gn("73a612b6fb191d")](ee),0>ne&&ee!==gn("7da71ca0ad381e90")&&(ne=y[gn("73a612b6fb191d")](gn("76a715b2ef3e149757"))),0>ne&&(ne=y[gn("73a612b6fb191d")](gn("76a715b2ef3e149757"))),0>ne&&(ne=y[gn("73a612b6fb191d")](gn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[gn("73a612b6fb191d")](gn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[gn("73a612b6fb191d")](gn("35"))||y[gn("73a612b6fb191d")](gn("35"))===-1),!a.Rc||x[gn("73a612b6fb191d")](gn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[gn("73a612b6fb191d")](ee)),!a.Rc)||(ne=yn[gn("76a715b2f73f148a")][gn("69ad17a1e03e")],ae=ne[gn("73a612b6fb191d")](gn("7fb002b6ed25128b4da25b2e")),-1<ae&&(a.Rc=!(ne[gn("73a612b6fb191d")](ee)>ae),!a.Rc)))break;if(ee[0]==="#"){ne=yn.document.createElement("div");for(var ue=b[0].replace(/[A-Za-z]/g,"");4>ue.length;)ue+="9";if(ae=ue,ue=ue.substr(ue.length-4),b="",b+=["gsh","gsf"][parseInt(ue.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(ue.substr(0,1),10)%4],ne[gn("79a417a0f0181a8946")]=b,yn.document[gn("78a712aa")]){yn.document[gn("78a712aa")][gn("7bb806b6ed32388c4a875b")](ne),ue=yn.getComputedStyle(ne).getPropertyValue(gn("78a704b7e62456904c9b12701b6532a8"));var ge=yn.getComputedStyle(ne).getPropertyValue(gn("75b817b0ea2202"));if(yn.document[gn("78a712aa")][gn("68ad1bbcf533388c4a875b")](ne),ue){if(ne=yn[gn("77a902b0eb1b1e804a8a")],ge==="0."+parseInt(ae,10)%100||ue.indexOf(parseInt(ee[1]+ee[2],16))!==-1&&ue.indexOf(parseInt(ee[3]+ee[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(gn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,ee=0;ee<document.styleSheets.length;ee++){ne=document.styleSheets[ee].rules||document.styleSheets[ee].cssRules;for(var ye in ne)if(b===ne[ye].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ye=x[gn("76ad18b4f73e")],E=x[gn("73a612b6fb191d")](gn("35e7"))+2;E<ye;E++)y+=x[E];x=y[gn("73a612b6fb191d")](gn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[gn("73a612b6fb191d")](gn("35")))}}}return 0<a.Rc&&a!==a.wy}sm.className="DiagramHelper";function Uu(a){this.j=a===void 0?new st:a,this.o=new st}zt.Object.defineProperties(Uu.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 Nf="DraggingInfo";Uu.className="DraggingInfo";function re(a,y,x){this.node=a,this.info=y,this.Su=x}re.className="DraggingNodeInfoPair";function he(){this.reset()}he.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new vn(NaN,NaN).freeze(),this.gridSnapCellSpot=ki,this.gridSnapOrigin=new st(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},he.className="DraggingOptions";function Ce(a,y){if(typeof a=="string"||yn.Element&&a instanceof Element)var x=Jt.call(this,a)||this;else x=Jt.call(this)||this,y=a;return be(x),y&&x.nm(y),x}Wt(Ce,Jt);function be(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=co,a.layout=new fa}Ce.prototype.reset=function(){Jt.prototype.reset.call(this),be(this)},Ce.className="Palette";function Oe(a,y){if(typeof a=="string"||yn.Element&&a instanceof Element)var x=Jt.call(this,a)||this;else x=Jt.call(this)||this,y=a;var b=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 Sr;var E=new Ur;return E.stroke="magenta",E.strokeWidth=2,E.fill="transparent",E.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(E),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new Gr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Lt,x.toolManager.mouseMoveTools),x.click=function(){var ee=b.observed;if(ee!==null){var ne=ee.viewportBounds,ae=b.lastInput.documentPoint;ee.position=new st(ae.x-ne.width/2,ae.y-ne.height/2)}},x.Pf=function(){b.Ya(),gt(b)},x.Xd=function(){b.observed!==null&&(b.Ya(),b.N())},x.Ha=function(){1>b.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&>(b)},x.autoScale=Fs,x.vb=!1,y&&Object.assign(x,y),x}Wt(Oe,Jt),Oe.prototype.computePixelRatio=function(){return 1},Oe.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(Ic(this),this.ql===null){var x=new ll(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),$e(this)}finally{this.ta=a,this.ib=y}}}Jt.prototype.redraw.call(this)},Oe.prototype.gc=function(){if(this.Ka===null&&jt("No div specified"),this.ta===null&&jt("No canvas specified"),!(this.ta instanceof Ql)&&(B0(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Ic(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?$e(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,b=0;b<x;b++)y[b].gc(a,this);this.Fc=this.vd=!1}}};function $e(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,b=a.drawsGrid&&x,E=y.grid;b&&E!==null&&E.visible&&!isNaN(E.width)&&!isNaN(E.height)&&(E=$t.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Yl(y,E),$t.free(E),xa(y));var ee=a.Ab;ee.reset(),a.scale!==1&&ee.scale(a.scale),a.position.x===0&&a.position.y===0||ee.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(ee.m11,ee.m12,ee.m21,ee.m22,ee.dx,ee.dy),E.yc(),y=y.Wa.s,ee=y.length;for(var ne=0;ne<ee;ne++){var ae=y[ne],ue=a;if(ae.visible&&ae.opacity!==0){var ge=ae.diagram.grid.part;if(!x&&ae.isTemporary)b&&ge.layer===ae&&(ae=Gu(ae,E),ge.gc(E,ue),E.globalAlpha=ae);else{for(var ye=Gu(ae,E),Le=ue.scale,ze=$t.alloc(),Ke=ae.Pa.s,Je=Ke.length,it=0;it<Je;it++){var Tt=Ke[it];(b||Tt!==ge)&&ae.Oj(E,Tt,ue,null,Le,ze,!1)}$t.free(ze),E.globalAlpha=ye}}}}}function gt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=vn.alloc();E.h(x.width,x.height),b.desiredSize=E,vn.free(E),a=2/a.scale,b instanceof Ur&&(b.strokeWidth=a),y.location=new st(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Oe.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Ao;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Oe.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Oe.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),gt(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=b,this.R("ViewportBoundsChanged",this.fc,a))},zt.Object.defineProperties(Oe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Oe&&jt("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,b=this.ib;x&&b&&(b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,x.width,x.height))}else this.Ha(null),gt(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),gt(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)}}}),Oe.className="Overview";function Lt(){lo.call(this),this.j=null}Wt(Lt,lo),Lt.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 st(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new st(a.x-this.j.x,a.y-this.j.y)),!0)},Lt.prototype.doActivate=function(){this.j=null,lo.prototype.doActivate.call(this)},Lt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Lt.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 b=a.firstInput.documentPoint;x=x.location,this.j=new st(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new st(a.x-this.j.x,a.y-this.j.y)}}},Lt.className="OverviewDraggingTool";function kt(){hr(this),this.H=cu,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=Ao,this.hb=!0,this.cg=null,this.ob=200}kt.prototype.toString=function(){return"CommandHandler"},kt.prototype.Xe=function(a){this.H=a},kt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=ti?y.meta:y.control,b=y.shift,E=y.alt,ee=y.key;!x||ee!=="C"&&ee!=="Insert"?x&&ee==="X"||b&&ee==="Del"?this.canCutSelection()&&this.cutSelection():x&&ee==="V"||b&&ee==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&ee==="Y"||E&&b&&ee==="Backspace"?this.canRedo()&&this.redo():x&&ee==="Z"||E&&ee==="Backspace"?this.canUndo()&&this.undo():ee==="Del"||ee==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&ee==="A"?this.canSelectAll()&&this.selectAll():ee==="Esc"?this.canStopCommand()&&this.stopCommand():ee==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):ee==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):ee==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):ee==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):ee==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):ee==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):ee==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):ee==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):ee===" "?this.canScrollToPart()&&this.scrollToPart():ee==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():ee==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&ee==="0"?this.canResetZoom()&&this.resetZoom():b&&ee==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&ee==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&ee==="G"?this.canUngroupSelection()&&this.ungroupSelection():ee==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():ee==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},kt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},kt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Ji&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},kt.prototype.canStopCommand=function(){return!0},kt.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 b=a.links;b.next();)b.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},kt.prototype.canSelectAll=function(){return this.diagram.allowSelect},kt.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 sn,x=a.selection.iterator;x.next();)oc(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(b){return b.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},kt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},kt.prototype.copySelection=function(){var a=this.diagram,y=new sn;for(a=a.selection.iterator;a.next();)oc(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},kt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},kt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},kt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},kt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)zc=null,ec="";else{x=y.model;var b=!1,E=!1,ee=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),ee=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new rn,x.addAll(ee),zc=x,ec=y.model.dataFormat}}y.R("ClipboardChanged",x)},kt.prototype.pasteFromClipboard=function(){var a=new sn,y=zc;if(y===null)return a;var x=this.diagram;if(ec!==x.model.dataFormat)return a;var b=x.model,E=!1,ee=!1,ne=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(ee=b.Ij,b.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=ee),y=ne.iterator;y.next();)x=y.value,b=y.key,x.location.w()||(b.location.w()?x.location=b.location:!x.position.w()&&b.position.w()&&(x.position=b.position)),a.add(x)}return a},kt.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 b=x.iterator;b.next();)b.value.isSelected=!0;if(a!==null){var E=y.computePartsBounds(y.selection);if(E.w()){var ee=this.computeEffectiveCollection(y.selection,y.Wm);Qh(y,ee,new st(a.x-E.centerX,a.y-E.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},kt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||zc===null||zc.count===0||ec!==a.model.dataFormat)},kt.prototype.undo=function(){this.diagram.undoManager.undo()},kt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},kt.prototype.redo=function(){this.diagram.undoManager.redo()},kt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},kt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Ba&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},kt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Ba?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},kt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Ba&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},kt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Ba?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},kt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},kt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},kt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;hu(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&b===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=Ao):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),od(y)},kt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},kt.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(ue){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;hu(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=It(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var ee=function(){y.Ea();for(var ue=E.pop();0<E.length&&ue instanceof _n&&ue.isTreeExpanded&&(!(ue instanceof Br)||ue.isSubGraphExpanded);)ue=E.pop();0<E.length?(ue instanceof Sr&&y.tv(ue.actualBounds),ue instanceof _n&&!ue.isTreeExpanded&&(ue.isTreeExpanded=!0),ue instanceof Br&&!ue.isSubGraphExpanded&&(ue.isSubGraphExpanded=!0)):(ue instanceof Sr&&y.es(ue.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Yt(ee,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",ne),ee()}}else{var ae=y.position.copy();y.es(a.actualBounds),ae.Xa(y.position)&&x.Cc()}}};function It(a,y,x){if(y.isVisible())return x;if(y instanceof gi)It(a,y.adornedPart,x);else if(y instanceof Tn){var b=y.fromNode;b!==null&&It(a,b,x),y=y.toNode,y!==null&&It(a,y,x)}else y instanceof _n&&(b=y.labeledLink,b!==null&&It(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),It(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),It(a,y,x));return x}kt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Sr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},kt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),hu(y.animationManager,"Collapse Tree");var x=new rn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof _n&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},kt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof _n&&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 _n&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},kt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),hu(y.animationManager,"Expand Tree");var x=new rn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof _n&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},kt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof _n)||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 _n&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},kt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var b=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var E=new rn,ee=a.selection.iterator;ee.next();){var ne=ee.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var ae=new rn,ue=E.iterator;ue.next();){var ge=ue.value;ee=!1;for(var ye=E.iterator;ye.next();)if(ge.Td(ye.value)){ee=!0;break}ee||ae.add(ge)}if(0<ae.count){var Le=ae.first().containingGroup;if(Le!==null)for(;Le!==null;){E=!1;for(var ze=ae.iterator;ze.next();)if(!ze.value.Td(Le)){E=!0;break}if(E)Le=Le.containingGroup;else break}if(x instanceof Br)ul(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Ke=y.copyNodeData(x);ln(Ke)&&(y.xf(Ke),b=a.ii(Ke))}if(b!==null){Le!==null&&this.isValidMember(Le,b)&&(b.containingGroup=Le);for(var Je=ae.iterator;Je.next();){var it=Je.value;this.isValidMember(b,it)&&(it.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},kt.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 nn(a){var y=ir();for(a=a.iterator;a.next();){var x=a.value;x instanceof Tn||y.push(x)}a=new sn,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],ee=!0,ne=0;ne<x;ne++)if(E.Td(y[ne])){ee=!1;break}ee&&a.add(E)}return Un(y),a}kt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Tn)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},kt.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 b=new rn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var ee=E.value;ee instanceof Br&&ee.canUngroup()&&b.add(ee)}var ne=new rn;if(0<b.count){y.clearSelection(!0);for(var ae=b.iterator;ae.next();){var ue=ae.value;ue.expandSubGraph();var ge=ue.containingGroup,ye=ge!==null&&ge.data!==null?x.wa(ge.data):void 0;ne.addAll(ue.memberParts);for(var Le=ne.iterator;Le.next();){var ze=Le.value;if(ze.isSelected=!0,!(ze instanceof Tn)){var Ke=ze.data;Ke!==null?x.mp(Ke,ye):ze.containingGroup=ge}}y.remove(ue)}}y.R("SelectionUngrouped",b,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},kt.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 Br))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Br&&y.canUngroup())return!0;return!1},kt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=nn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},kt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),hu(y.animationManager,"Collapse SubGraph");var x=new rn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Br&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},kt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Br&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Br&&y.isSubGraphExpanded)return!0;return!1},kt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),hu(y.animationManager,"Expand SubGraph");var x=new rn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Br&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},kt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Br&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Br&&!y.isSubGraphExpanded)return!0;return!1},kt.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 b=y.selection.iterator;b.next();){var E=b.value;if(E.canEdit()){a=E;break}}if(a===null)return;a=a.Nl(function(ee){return ee instanceof Zi&&ee.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},kt.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 Zi))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 Zi&&x.editable}),a!==null))return!0;return!1},kt.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 b=y.lastInput,E=null;a instanceof _t?E=a.ga(ai):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new st(E.x+E.width/2,E.y+E.height/2)),E!==null&&(b.viewPoint=y.op(E),b.documentPoint=E,b.left=!1,b.right=!0,b.up=!0),y.currentTool=x,Ru(x,!1,a)}},kt.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)},kt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,b=x.toolManager.findTool("Dragging"),E=x.currentTool===b;if(y===void 0&&(y=E?b.dragOptions:x.Wm),b=new tn,a===null)return b;for(var ee=a.iterator;ee.next();)du(x,b,ee.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(ee=a.iterator;ee.next();)a=ee.value,a instanceof Tn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},zt.Object.defineProperties(kt.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||jt("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}}}),kt.className="CommandHandler",Xg=function(){return new kt};function _t(){hr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new st(NaN,NaN).freeze(),this.jd=hi,this.Ab=new jr,this.wh=new jr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Qo,this.uc=new $t(NaN,NaN,NaN,NaN).freeze(),this.Ib=new $t(NaN,NaN,NaN,NaN).freeze(),this.dc=new $t(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Vo,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 xn,mn,ur,gr,Cr,Ir,ni,Zr,ci,Ii;_t.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=Hn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},_t.prototype.Vw=function(a){var y=this.Dh;if(fn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},_t.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},_t.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},_t.prototype.copy=function(){return this.clone()},Qe=_t.prototype,Qe.qb=function(a){a.classType===Tn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:jt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===_t&&(this.stretch=a)},Qe.toString=function(){return dr(this.constructor)+"#"+zr(this)},Qe.th=function(){this.A!==null&&(this.A.nc=!0)};function Kr(a){a.A===null?a.A=new jf:a.A.nc&&(a.A=a.A.copy())}Qe.Xc=function(){if(this.ba===null){var a=new Gp;a.Xi=Wr,a.yj=Wr,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Qe.cb=function(a,y,x,b,E,ee,ne){var ae=this.part;if(ae!==null&&(ae.gk(a,y,x,b,E,ee,ne),x===this&&a===no&&pa(this)&&$i(this,ae,y),ee=this.diagram,this.animationTriggers===null||ee===null||!ee.pi||ee.undoManager.isUndoingRedoing||ee.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&ee.animationManager.isEnabled&&!ee.animationManager.isTicking&&(this.jo===null&&(this.jo=new tn),ne=ee.undoManager.transactionLevel===0,a.startCondition===Xh?ne=!0:a.startCondition===Oc&&(ne=!1),ne?(ee=new Sa,Wg(a,ee),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,ee),ee.vu=this,ee.Nw=a,ee.add(this,y,b,E),ee.start()):(hu(ee.animationManager,"Trigger"),ee.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof bn&&x===ae&&(ae.l&16777216)!==0&&ae.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)ae=x[E],ae instanceof bn&&Zc(ae,function(ue){ue.data!==null&&ue.l&16777216&&ue.La(y)})};function $i(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var ee=E.value,ne=null;if(ee.sourceName!==null){if(ne=TS(ee,b,a),ne===null)continue;ee.sp(a,ne,x,null)}else if(ee.isToModel){var ae=y.diagram;ae===null||ae.skipsModelSourceBindings||ee.sp(a,ae.model.modelData,x,b)}else{if(ae=b.data,ae===null)continue;var ue=y.diagram;ue===null||ue.skipsModelSourceBindings||ee.sp(a,ae,x,b)}ne===a&&(ae=b.ks(ee.Ai),ae!==null&&ee.Mv(ae,ne,x))}}Qe.ks=function(a){return this.bindingId===a?this:null},Qe.g=function(a,y,x){this.cb(no,a,this,y,x)},Qe.Ge=function(a,y,x,b){var E=this.uc;if(E.h(a,y,x,b),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new jr);var ee=this.Lb;ee.reset(),this.no(ee,a,y,x,b),ee.pp(E)}};function Xo(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}Qe.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?Xn(a.x,a.y,0,0,0,b.height)<=y||Xn(a.x,a.y,0,b.height,b.width,b.height)<=y||Xn(a.x,a.y,b.width,b.height,b.width,0)<=y||Xn(a.x,a.y,b.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,b.height)<=y&&a.zd(b.width,0)<=y&&a.zd(b.width,b.height)<=y},Qe.se=function(){return!0},Qe.ca=function(a){var y=st.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return st.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),ee=b.Ql("extraTouchArea"),ne=ee/2,ae=this.naturalBounds;b=this.Df()*b.scale;var ue=1/b;if(ae.width*b<E&&ae.height*b<E)return a=qi(x.x-ne*ue,x.y-ne*ue,x.width+ee*ue,x.height+ee*ue,y.x,y.y),st.free(y),a}return E=!1,(this instanceof gi||this instanceof Ur?qi(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)?E=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?E=!0:E=this.gh(a)),st.free(y),E},Qe.gh=function(a){var y=this.naturalBounds;return qi(0,0,y.width,y.height,a.x,a.y)},Qe.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=$t.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=st.allocAt(a.x,a.y);return y.ca(x.Cd(E))&&(E.h(a.x,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.y),y.ca(x.Cd(E))&&(b=!0)))),st.free(E),$t.free(y),b},Qe.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=st.allocAt(0,0);return a.ca(y.Ga(E))&&(E.h(0,x.height),a.ca(y.Ga(E))&&(E.h(x.width,x.height),a.ca(y.Ga(E))&&(E.h(x.width,0),a.ca(y.Ga(E))&&(b=!0)))),st.free(E),b},Qe.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=st.allocAt(0,0),E=st.allocAt(0,x.height),ee=st.allocAt(x.width,x.height),ne=st.allocAt(x.width,0),ae=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(ee))||a.ca(y.Ga(ne)))ae=!0;else{x=$t.allocAt(0,0,x.width,x.height);var ue=st.allocAt(a.x,a.y);x.ca(y.Cd(ue))?ae=!0:(ue.h(a.x,a.bottom),x.ca(y.Cd(ue))?ae=!0:(ue.h(a.right,a.bottom),x.ca(y.Cd(ue))?ae=!0:(ue.h(a.right,a.y),x.ca(y.Cd(ue))&&(ae=!0)))),st.free(ue),$t.free(x),!ae&&(Gt.us(a,b,E)||Gt.us(a,E,ee)||Gt.us(a,ee,ne)||Gt.us(a,ne,b))&&(ae=!0)}return st.free(b),st.free(E),st.free(ee),st.free(ne),ae},Qe.ga=function(a,y){if(y===void 0&&(y=new st),a instanceof Mn){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},Qe.mi=function(a){a===void 0&&(a=new $t);var y=this.naturalBounds,x=this.oe,b=st.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),xi(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),xi(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),xi(a,b.x,b.y,0,0),st.free(b),a},Qe.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},Qe.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Qe.qs=function(a,y){return y===void 0&&(y=new st),y.assign(a),this.oe.Cd(y),y},Qe.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Qe.Sj=function(a,y,x,b,E){var ee=this.transform,ne=1/(ee.m11*ee.m22-ee.m12*ee.m21),ae=ee.m22*ne,ue=-ee.m12*ne,ge=-ee.m21*ne,ye=ee.m11*ne,Le=ne*(ee.m21*ee.dy-ee.m22*ee.dx),ze=ne*(ee.m12*ee.dx-ee.m11*ee.dy);return this.areaBackground!==null?(ee=this.actualBounds,Gt.Ff(ee.left,ee.top,ee.right,ee.bottom,a,y,x,b,E)):(ne=a*ae+y*ge+Le,a=a*ue+y*ye+ze,y=x*ae+b*ge+Le,x=x*ue+b*ye+ze,E.h(0,0),b=this.naturalBounds,x=Gt.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(ee),x)},_t.prototype.measure=function(a,y,x,b){if(Bs(this)!==!1){var E=this.Kg,ee=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-ee,0),y=Math.max(y-E,0),x=Math.max((x||0)-ee,0),b=Math.max((b||0)-E,0),ee=this.angle,E=this.desiredSize;var ne=this.kq();ee===90||ee===270?(a=isFinite(E.height)?E.height+ne:a,y=isFinite(E.width)?E.width+ne:y):(a=isFinite(E.width)?E.width+ne:a,y=isFinite(E.height)?E.height+ne:y),E=x||0,ne=b||0;var ae=this instanceof bn;switch(ls(this,!0)){case mn:ne=E=0,ae&&(y=a=1/0);break;case xn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case gr:isFinite(a)&&a>x&&(E=a),ne=0,ae&&(y=1/0);break;case Cr:isFinite(y)&&y>b&&(ne=y),E=0,ae&&(a=1/0)}ae=this.maxSize;var ue=this.minSize;E>ae.width&&ue.width<ae.width&&(E=ae.width),ne>ae.height&&ue.height<ae.height&&(ne=ae.height),x=Math.max(E,ue.width),b=Math.max(ne,ue.height),ae.width<x&&(x=Math.min(ue.width,x)),ae.height<b&&(b=Math.min(ue.height,b)),a=Math.min(ae.width,a),y=Math.min(ae.height,y),a=Math.max(x,a),y=Math.max(b,y),(ee===90||ee===270)&&(ee=a,a=y,y=ee,ee=x,x=b,b=ee),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||jt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Bo(this,!1)}},_t.prototype.Wl=function(){},_t.prototype.Dd=function(){return!1},_t.prototype.arrange=function(a,y,x,b,E){this.Uk();var ee=$t.alloc();ee.assign(this.Ib),this.Ib.ka(),Xa(this)===!1?this.Ib.h(a,y,x,b):this.eh(a,y,x,b),this.Ib.freeze(),E===void 0?this.tb=null:this.tb=E,x=!1,E!==void 0?x=!0:(E=this.panel,E!==null&&xh(E)&&(E=E.panel),E!==null&&(E=E.dc,b=this.measuredBounds,this.areaBackground!==null&&(b=this.Ib),x=y+b.height,b=a+b.width,x=!(0<=a+.05&&b<=E.width+.05&&0<=y+.05&&x<=E.height+.05),this instanceof Zi&&(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()||jt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(ee,this.Ib),pu(this,!1),$t.free(ee)},Qe=_t.prototype,Qe.eh=function(){};function Ia(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var ee=a.uc;x=a.Kg,y=x.right+x.left;var ne=x.top+x.bottom;switch(x=ee.width+y,ee=ee.height+ne,b+=y,E+=ne,y=ls(a,!0),x===b&&ee===E&&(y=mn),y){case mn:(x>b||ee>E)&&(Bo(a,!0),a.measure(x>b?b:x,ee>E?E:ee,0,0));break;case xn:Bo(a,!0),a.measure(b,E,0,0);break;case gr:Bo(a,!0),a.measure(b,ee,0,0);break;case Cr:Bo(a,!0),a.measure(x,E,0,0)}}}Qe.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||_0(x,!0),this.N(),Ci(a,y)||(x.oh(),this.Pn(x)))},Qe.Pn=function(a){this.portId!==null&&(_0(a,!0),a instanceof _n&&W1(a,this))},Qe.gc=function(a,y){if(!Vs(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var b=1;x!==1&&(b=a.globalAlpha,a.globalAlpha=b*x);var E="";this.filter!==""&&(E=a.filter,a.filter=this.filter);var ee=this instanceof bn&&xh(this),ne=this.Ib;if(ee){var ae=this.Ib,ue=this.dc,ge=this.areaBackground,ye=this.Ma;ge===null&&ye===null||a.yc(),ge!==null&&(yo(this,a,ge,!0,!0,ue,ae),ge instanceof Ni&&ge.type===Ys?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(ge)):a.fillRect(ae.x,ae.y,ae.width,ae.height)),ye!==null&&(yo(this,a,ye,!0,!1,ue,ae),ye instanceof Ni&&ye.type===Ys?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(ye)):a.fillRect(ae.x,ae.y,ae.width,ae.height)),this.hh(a,y)}if(!ee&&(ee||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){ee=this.transform,ae=this.panel,this.l&4096&&ca(this),ge=this.part,ue=!1;var Le=0;ge&&y.Gf("drawShadows")&&(ue=ge.isShadowed)&&(ye=ge.shadowOffset,Le=Math.max(ye.y,ye.x)*y.scale*y.Mb),ye=this.Dd();var ze;if(!(ze=y.$i||!ye)){var Ke=this.naturalBounds;ze=this.wh;var Je=ze.m11,it=ze.m21,Tt=ze.dx,Pt=ze.m12,Nt=ze.m22,At=ze.dy,Bt,Rt=Bt=0;ze=Bt*Je+Rt*it+Tt;var Zt=Bt*Pt+Rt*Nt+At;Bt=Ke.width+Le,Rt=0;var On=Bt*Je+Rt*it+Tt;Bt=Bt*Pt+Rt*Nt+At,Rt=Math.min(ze,On);var rr=Math.min(Zt,Bt),$n=Math.max(ze+0,On)-Rt,En=Math.max(Zt+0,Bt)-rr;ze=Rt,Zt=rr,Bt=Ke.width+Le,Rt=Ke.height+Le,On=Bt*Je+Rt*it+Tt,Bt=Bt*Pt+Rt*Nt+At,Rt=Math.min(ze,On),rr=Math.min(Zt,Bt),$n=Math.max(ze+$n,On)-Rt,En=Math.max(Zt+En,Bt)-rr,ze=Rt,Zt=rr,Bt=0,Rt=Ke.height+Le,On=Bt*Je+Rt*it+Tt,Bt=Bt*Pt+Rt*Nt+At,Rt=Math.min(ze,On),rr=Math.min(Zt,Bt),$n=Math.max(ze+$n,On)-Rt,En=Math.max(Zt+En,Bt)-rr,ze=Rt,Zt=rr,Le=y.viewportBounds,Ke=Le.x,Je=Le.y,ze=!(ze>Le.width+Ke||Ke>$n+ze||Zt>Le.height+Je||Je>En+Zt)}if(ze){if(ze=(this.l&256)!==0,a.clipInsteadOfFill&&(ze=!1),this instanceof Zi&&(a.font=this.font),ze){if(Zt=ae.se()?ae.naturalBounds:ae.actualBounds,$n=Math.max(ne.x,Zt.x),En=Math.max(ne.y,Zt.y),Le=Math.min(ne.right,Zt.right)-$n,Ke=Math.min(ne.bottom,Zt.bottom)-En,Je=this.tb,Je!==null&&($n=Je.x,En=Je.y,Le=Je.width,Ke=Je.height),$n>ne.width+ne.x||ne.x>Zt.width+Zt.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect($n,En,Le,Ke),a.clip()}if(ye){if(!ge.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}ue&&(Zt=ge.shadowOffset,a.Ev(Zt.x*y.scale*this.scale*y.Mb,Zt.y*y.scale*this.scale*y.Mb,ge.shadowBlur),Hu(a),a.shadowColor=ge.shadowColor)}ue&&this.shadowVisible===!0?Hu(a):ue&&this.shadowVisible===!1&&gu(a),ge=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Ds(this,a,ge,ne)),a.transform(ee.m11,ee.m12,ee.m21,ee.m22,ee.dx,ee.dy),ue&&ia(this,ae)&&this.shadowVisible===null&&gu(a),this.Ma!==null&&(a.yc(),gs(this,a,ge,ne)),ue&&(this.Ma!==null||this.areaBackground!==null||ia(this,ae))?(Sl(this,!0),this.shadowVisible===null&&gu(a)):Sl(this,!1),this.hh(a,y),ue&&this.l&512&&Hu(a),ye&&ue&&gu(a),ze&&(a.restore(),a.Vc(this instanceof bn)),ee.ws()||(y=1/(ee.m11*ee.m22-ee.m12*ee.m21),a.transform(ee.m22*y,-ee.m12*y,-ee.m21*y,ee.m11*y,y*(ee.m21*ee.dy-ee.m22*ee.dx),y*(ee.m12*ee.dx-ee.m11*ee.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function ia(a,y){return y===null?!1:(xh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===bn.Auto||y.type===bn.Spot)&&y.Pb()!==a)}Qe.Dv=function(){};function Ds(a,y,x,b){yo(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof Ni&&a.areaBackground.type===Ys?(y.beginPath(),y.rect(b.x,b.y,b.width,b.height),y.ng(a.areaBackground)):y.fillRect(b.x,b.y,b.width,b.height)}function gs(a,y,x,b){var E=a.kq(),ee=x.x,ne=x.y,ae=x.width+E,ue=x.height+E;yo(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof Ni&&a.Ma.type===Ys?(y.beginPath(),y.rect(ee-E/2,ne-E/2,ae,ue),y.ng(a.Ma)):y.fillRect(ee-E/2,ne-E/2,ae,ue)}function La(a,y,x){for(var b=y.O.s,E=b.length,ee=-1,ne=0;ne<E;ne++)if(b[ne]===a){ee=ne;break}if(a=ee,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===bn.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 Vs(a,y,x){if(!(y instanceof Ps))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 b=a.panel,E=a.nk(y);if(a.kk(y,x,E))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):b&&La(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var ee=a.shadowOffset;y.Ev(ee.x*x.scale*a.scale*x.Mb,ee.y*x.scale*a.scale*x.Mb,a.shadowBlur),Hu(y),y.shadowColor=a.shadowColor}a instanceof Zi&&(y.font=a.font),y.yd=null;var ne=a.transform;ee=a instanceof bn;var ae=a instanceof bn?xh(a):!1;a.l&4096&&ca(a);var ue=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,ee&&ae?(Up(y,1,0,0,1,0,0),a.svg=y.ad):ee?(Up(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):Up(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var ge=ne.copy().Vj();y.rb.ha=[ge.m11,ge.m12,ge.m21,ge.m22,ge.dx,ge.dy],Ds(a,y,E,ue),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return ee||(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(ee?(ae&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),gs(a,y,E,ue),ae&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],gs(a,y,E,ue)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,E=a.part,ae=!1,E&&x.Gf("drawShadows")&&(ae=E.isShadowed),y.clipInsteadOfFill&&(ae=!1),a.Dd()&&ae&&Hu(y),ae&&a.shadowVisible===!0?Hu(y):ae&&a.shadowVisible===!1&&gu(y),E=a.panel,ae&&ia(a,E)&&a.shadowVisible===null&&gu(y),y.Il&&(ge=x.computePixelRatio(),ge="drop-shadow("+y.shadowOffsetX/ge+"px "+y.shadowOffsetY/ge+"px "+y.shadowBlur/ge/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",ge),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",ge)),ae&&(a.Ma!==null||a.areaBackground!==null||ia(a,E))?(Sl(a,!0),a.shadowVisible===null&&gu(y)):Sl(a,!1),E=ae,a.hh(y,x),ee&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,ae=ee?a.svg:y.yd,ge=a.svg,!ee&&ge!==null&&ae!==ge&&ge.parentNode===a.panel.svg?(a.svg.replaceWith(ae),a.svg=ae,ae!==null&&a.$o(y,b,ue,ae),ss(y,ge),!0):(a.svg=ae,ne!==null&&ae===null&&(um(y),y.nh.pop()),ae===null||(a.$o(y,b,ue,ae),y.Il&&(x=x.computePixelRatio(),a.Dv(ae,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&Hu(y),a.Dd()&&gu(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&ae.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&ae.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(ae):y.Nj.prepend(ae),y.ti=ae):b!==null&&La(a,b,ae),ne!==null&&ne(a,ae)),!0)}Qe.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var ee=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,ee.x),E=Math.max(x.y,ee.y);var ne=Math.min(x.right,ee.right)-y;x=Math.min(x.bottom,ee.bottom)-E,ee=this.tb,ee!==null&&(y=ee.x,E=ee.y,ne=ee.width,x=ee.height),ee=b.getAttribute("clip-path");var ae=null;ee!==null&&(ae=a.svg.getElementById(ee.split("#")[1].slice(0,-1))),ae===null?(ee="CLIP"+Ri++,ae=a.Ud("clipPath",{id:ee}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof bn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),ae.appendChild(y),a.svg.appendChild(ae),b.setAttributeNS(null,"clip-path","url(#"+ee+")")):(a=ae.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",ne.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),ss(a,b)};function ss(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Ma(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Tr(y);for(var b=y.next();!b.done;b=y.next())b=x.getElementById(b.value.split("#")[1].slice(0,-1)),b!==null&&b.remove()}a.svg.remove()}}Qe.hh=function(){},Qe.lv=function(){this.Uc=!0},Qe.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 b=this.transform,E=this instanceof bn?xh(this):!1;if(!(this instanceof bn&&E))if(this instanceof hs){var ee=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],ee!==null&&Jy(a,ee[0],ee[1],ee[2],ee[3],ee[4],ee[5],ee[6],ee[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Qy(a)):y.setAttributeNS(null,"transform",Qy(a))}else if(!x||this instanceof bn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof Ur){ee=y.getElementsByTagName("path");for(var ne=0;ne<ee.length;ne++)ee[ne].setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");return ee=this.Dd()?this.opacity*a.globalAlpha:this.opacity,ee===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",ee.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(ee=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(ne=b.copy().Vj(),a.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Ds(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ne=y.gd.getAttribute("filter"),ne!==null&&a.ad.setAttribute("filter",ne),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),ee&&hm(a,ee)),(this.background!==null||y.Ma!==void 0)&&(ee=y.Ma,this.background===null?(hm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof bn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),gs(this,a,this.naturalBounds,this.actualBounds),y.Ma?(hm(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),ee&&hm(a,ee)),this.$o(a,this.panel,this.actualBounds,y),!0},Qe.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 yo(a,y,x,b,E,ee,ne){if(x!==null){var ae=1,ue=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Sh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var ge=a.kq();if(ae=ee.width,ue=ee.height,E?(ae=ne.width,ue=ne.height):b||(ae+=ge,ue+=ge),(ee=y instanceof Vc)&&x.xe&&(x.type===Ld||x.yk===ae&&x.ft===ue))var ye=x.xe;else{var Le=0,ze=0,Ke=0,Je=0,it=0,Tt=0;if(Tt=it=0,E?(it=ne.x,Tt=ne.y):b||(it-=ge/2,Tt-=ge/2),Le=x.start.x*ae+x.start.offsetX,ze=x.start.y*ue+x.start.offsetY,Ke=x.end.x*ae+x.end.offsetX,Je=x.end.y*ue+x.end.offsetY,Le+=it,Ke+=it,ze+=Tt,Je+=Tt,x.type===Ku)ye=y.createLinearGradient(Le,ze,Ke,Je);else if(x.type===Ys)Tt=isNaN(x.endRadius)?Math.max(ae,ue)/2:x.endRadius,isNaN(x.startRadius)?(it=0,Tt=Math.max(ae,ue)/2):it=x.startRadius,ye=y.createRadialGradient(Le,ze,it,Ke,Je,Tt);else if(x.type===Ld)try{ye=y.createPattern(x.pattern,"repeat")}catch(Nt){ye=null}if(x.type!==Ld&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)ye.addColorStop(E.key,E.value);if(ee&&(x.xe=ye,ye!==null&&(x.yk=ae,x.ft=ue),ye===null&&x.type===Ld&&x.yk!==-1)){x.yk=-1;var Pt=a.diagram;Pt!==null&&x.yk===-1&&Yt(function(){Pt.redraw()},600)}}b?y.fillStyle=ye:y.strokeStyle=ye}}}Qe.rg=function(a){if(a instanceof bn)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},Qe.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Qe.If=function(){for(var a=this instanceof bn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function ca(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){sl(a,!1);return}if(y.translate(a.Ib.x-a.uc.x,a.Ib.y-a.uc.y),a.scale!==1||a.angle!==0){var x=a.naturalBounds;a.no(y,x.x,x.y,x.width,x.height)}sl(a,!1),Zs(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Zs(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,Zs(a,!1)))}Qe.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var ee=st.alloc();ee.yi(y,x,b,E,ai),a.rotate(this.Kb,ee.x,ee.y),st.free(ee)}},Qe.v=function(a){if(!Bs(this)){a===void 0&&(a=!1),Bo(this,!0),pu(this,!0);var y=this.panel;y===null||a||y.v()}},Qe.Uj=function(){Bs(this)||(Bo(this,!0),pu(this,!0))};function Za(a){if(!Xa(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof _n&&a.Bd(),y.$b())),pu(a,!0)}}Qe.Uk=function(){!(this.l&2048)&&(sl(this,!0),Zs(this,!0))},Qe.Wu=function(){Zs(this,!0)},Qe.N=function(){var a=this.part;a!==null&&a.N()};function ls(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===bn.Table?Ol(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===bn.Auto&&b.Pb()===a?oa(a,xn,y):x===Ir?b!==null?b.type===bn.Spot&&b.Pb()===a?oa(a,xn,y):(x=b.defaultStretch,x===Ir?oa(a,mn,y):oa(a,x,y)):oa(a,mn,y):oa(a,x,y)}function Ol(a,y,x,b){var E=a.stretch;if(E!==Ir)return oa(a,E,b);var ee=E=null;switch(y.stretch){case Cr:ee=!0;break;case xn:ee=!0}switch(x.stretch){case gr:E=!0;break;case xn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===gr||y===xn),ee===null&&(ee=y===Cr||y===xn),E===!0&&ee===!0?oa(a,xn,b):E===!0?oa(a,gr,b):ee===!0?oa(a,Cr,b):oa(a,mn,b)}function oa(a,y,x){if(x)return y;if(y===mn||(x=a.desiredSize,x.w()))return mn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===gr)return mn;if(y===xn)return Cr}else{if(y===Cr)return mn;if(y===xn)return gr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Cr)return mn;if(y===xn)return gr}else{if(y===gr)return mn;if(y===xn)return Cr}return y}function Sl(a,y){a.l=y?a.l|512:a.l&-513}function pa(a){return(a.l&1024)!==0}function Af(a,y){a.l=y?a.l|1024:a.l&-1025}function sl(a,y){a.l=y?a.l|2048:a.l&-2049}function Zs(a,y){a.l=y?a.l|4096:a.l&-4097}function Bs(a){return(a.l&8192)!==0}function Bo(a,y){a.l=y?a.l|8192:a.l&-8193}function Xa(a){return(a.l&16384)!==0}function pu(a,y){a.l=y?a.l|16384:a.l&-16385}Qe.Gj=function(){this.svg=null},Qe.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Qe.Av=function(){},Qe.zv=function(a){return this.pa=a,Za(this),!0},Qe.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Qe.kq=function(){return 0};function Wc(a){var y=a.part;if(y instanceof _n&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||W1(y,a)}}function Xy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof bn?a instanceof _n?a.Bd():a.qm(a,function(x){Wc(x)}):Wc(a))}Qe.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Lo(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&d1(a)&&jt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new rn),this.localBindings.add(E),this},Qe.set=function(a){return Object.assign(this,a),this},Qe.Du=function(a){return r0(this,a),this},Qe.apply=function(a){return a(this),this},Qe.nm=function(a){return Bc(this,a),this},Qe.pz=function(){return this.ih()},Qe.ih=function(){for(var a=this instanceof bn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Qe.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new tn),this.animationTriggers.add(a.propertyName,a),this};function Xs(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var b=null,E=null;if(typeof a=="function")E=a;else if(typeof a=="string"){var ee=bd.I(a);typeof ee=="function"?(x=Hn(arguments),b=ee(x),ln(b)||jt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=yn.go[a]}if(b===null&&(E!=null&&E.constructor||jt("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),b=new E),E=1,b instanceof Jt&&1<x.length){ee=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(mp(ee,ne),E++)}for(;E<x.length;E++)ee=x[E],ee===void 0?jt("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):r0(b,ee);return b}function r0(a,y){if(typeof y=="string")if(a instanceof Zi)a.text=y;else if(a instanceof Ur)a.figure=y;else if(a instanceof hs)a.source=y;else if(a instanceof bn)y=xl.I(y),y!==null&&(a.type=y);else if(a instanceof Ni){var x=Qn(Ni,y);x!==null?a.type=x:jt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Ln?(y=Qn(Ln,y),y!==null&&(a.type=y)):a instanceof pi&&(y=Qn(pi,y),y!==null&&(a.type=y));else if(y instanceof _t)a instanceof bn||jt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Io){var b;y.isRow&&typeof a.getRowDefinition=="function"?b=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(b=a.getColumnDefinition(y.index)),b instanceof Io?km(b,y):jt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof an)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Go)a.type=y;else if(y instanceof Lo)a instanceof _t||a instanceof Io?a.bind(y):jt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof vl)a instanceof _t?a.Jv(y):jt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Oo)a instanceof Ln&&a.type===Ln.o?a.figures.add(y):jt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof pi)a instanceof Oo?a.segments.add(y):jt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof so)a instanceof Jt||a instanceof Br?a.layout=y:jt("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++)r0(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Ni){x=new yr;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);Bc(a,x)}else if(a instanceof Io){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&jt("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+E),a.isRow=!0,a.index=E):y.column!==void 0&&(E=y.column,(E==null||E===1/0||isNaN(E)||0>E)&&jt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new yr;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Bc(a,E)}else Bc(a,y);else jt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function yh(a,y){bd.add(a,y)}function lm(a,y,x){x===void 0&&(x=null);var b=a[1];if(typeof x=="function"?x(b):typeof b=="string")return a.splice(1,1),b;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}zt.Object.defineProperties(_t.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new jf),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 jf),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 jf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Kr(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&&(Kr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Qa},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new nc),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Qa&&(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 nc),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 nc),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Bn},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new nc),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Ir},set:function(a){var y=this.stretch;y!==a&&(Kr(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&&(Kr(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)&&An(a,"0 <= value <= 1",_t,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Jc(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(Jc(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(),Xy(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&&Ff(a,"GraphObject.areaBackground"),a instanceof Ni&&a.freeze(),Kr(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&&Ff(a,"GraphObject.background"),a instanceof Ni&&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 Sr)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,b=this.pa,E=b.x;b=b.y,(E===y||isNaN(E)&&isNaN(y))&&(b===x||isNaN(b)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,E,b)&&this.g("position",new st(E,b),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&jt("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,Xy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,b=this.jd,E=b.width,ee=b.height;(E===y||isNaN(E)&&isNaN(y))&&(ee===x||isNaN(ee)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Ur&&this.qc(),this.g("desiredSize",b,a),pa(this)&&(a=this.part,a!==null&&($i(this,a,"width"),$i(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 vn(a,this.jd.height).freeze(),this.v(),this instanceof Ur&&this.qc(),this.g("desiredSize",y,a),pa(this)&&(a=this.part,a!==null&&$i(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 vn(this.jd.width,a).freeze(),this.v(),this instanceof Ur&&this.qc(),this.g("desiredSize",y,a),pa(this)&&(a=this.part,a!==null&&$i(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:fr},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(),Kr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:di},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(),Kr(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 Gr(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&&ca(this),this.Ab}},oe:{get:function(){return this.l&4096&&ca(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Kr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:mn},set:function(a){this.reshapingBehavior!==a&&(Kr(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()&&jt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Za(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&&An(a,">= 0",_t,"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&&An(a,">= 1",_t,"columnSpan"),Kr(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&&An(a,">= 0",_t,"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&&An(a,">= 1",_t,"rowSpan"),Kr(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&&(Kr(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 _n||jt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&H0(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,Z1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Wr},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Wc(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&An(a,">= 0",_t,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Wc(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),Wc(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&&An(a,">= 0",_t,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Wr},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Wc(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&An(a,">= 0",_t,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Wc(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),Wc(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&&An(a,">= 0",_t,"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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(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&&(Kr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),_t.prototype.trigger=_t.prototype.Jv,_t.prototype.findBindingPanel=_t.prototype.ih,_t.prototype.findTemplateBinder=_t.prototype.pz,_t.prototype.setProperties=_t.prototype.nm,_t.prototype.apply=_t.prototype.apply,_t.prototype.attach=_t.prototype.Du,_t.prototype.set=_t.prototype.set,_t.prototype.isEnabledObject=_t.prototype.If,_t.prototype.isVisibleObject=_t.prototype.Ed,_t.prototype.isContainedBy=_t.prototype.rg,_t.prototype.getNearestIntersectionPoint=_t.prototype.rs,_t.prototype.getLocalPoint=_t.prototype.qs,_t.prototype.getDocumentScale=_t.prototype.Df,_t.prototype.getDocumentAngle=_t.prototype.li,_t.prototype.getDocumentBounds=_t.prototype.mi,_t.prototype.getDocumentPoint=_t.prototype.ga,_t.prototype.intersectsRect=_t.prototype.Yc,_t.prototype.containedInRect=_t.prototype.fh,_t.prototype.containsRect=_t.prototype.Re,_t.prototype.containsPoint=_t.prototype.ca,_t.prototype.raiseChanged=_t.prototype.g,_t.prototype.raiseChangedEvent=_t.prototype.cb,_t.prototype.addCopyProperty=_t.prototype.Vw;var bd=null;_t.className="GraphObject",bd=new tn,yh("Button",function(){function a(x,b){return x.diagram.ic(x.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E},function(E){return E===b})!==null}var y=Xs(bn,bn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof bn){var E=x.fb("ButtonBorder");E!==null&&(E.fill=b?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Xs(Ur,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Mn(0,0,2.76142374915397,2.761423749153969),spot2:new Mn(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,b){if(b.If()&&b instanceof bn&&(x=b.fb("ButtonBorder"),x instanceof Ur)){var E=b._buttonFillOver;b._buttonFillNormal=x.fill,x.fill=E,E=b._buttonStrokeOver,b._buttonStrokeNormal=x.stroke,x.stroke=E}},y.mouseLeave=function(x,b){b.If()&&b instanceof bn&&(x=b.fb("ButtonBorder"),x instanceof Ur&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof bn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Ur){x=x.diagram;var ee=x.skipsUndoManager;x.skipsUndoManager=!0;var ne=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=ne,ne=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=ne,x.skipsUndoManager=ee}}},y.actionUp=function(x,b){if(b.If()&&b instanceof bn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Ur){var ee=x.diagram,ne=ee.skipsUndoManager;ee.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),ee.skipsUndoManager=ne}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof bn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof Ur){var ee=x.diagram,ne=ee.skipsUndoManager;ee.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),ee.skipsUndoManager=ne}}},y.actionMove=function(x,b){if(b.If()&&b instanceof bn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof Ur))){var ee=E.skipsUndoManager;E.skipsUndoManager=!0;var ne=b._buttonFillPressed;x.fill!==ne&&(x.fill=ne),ne=b._buttonStrokePressed,x.stroke!==ne&&(x.stroke=ne),E.skipsUndoManager=ee}}},y}),yh("TreeExpanderButton",function(){var a=Xs("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Xs(Ur,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Qr},new Lo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Lo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof gi&&(x=x.adornedPart),x instanceof _n){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),yh("SubGraphExpanderButton",function(){var a=Xs("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Xs(Ur,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Qr},new Lo("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 gi&&(x=x.adornedPart),x instanceof Br){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),yh("ToolTip",function(){return Xs(gi,bn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},Xs(Ur,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Mn(0,0,4,6),spot2:new Mn(1,1,-4,-4)}))}),yh("ContextMenu",function(){return Xs(gi,bn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},new Lo("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),yh("ContextMenuButton",function(){var a=Xs("Button");a.stretch=gr;var y=a.fb("ButtonBorder");return y instanceof Ur&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Mn(0,0,2,3),y.spot2=new Mn(1,1,-2,-2)),a}),yh("PanelExpanderButton",function(a){var y=lm(a,"COLLAPSIBLE"),x=Xs("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},Xs(Ur,{name:"ButtonIcon",strokeWidth:2},new Lo("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Ur&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var ee=E.diagram;if(ee!==null&&!ee.isReadOnly){var ne=E.ih();ne===null&&(ne=E.part),ne!==null&&(E=ne.fb(y),E!==null&&(b.handled=!0,ee.Ea("Collapse/Expand Panel"),E.visible=!E.visible,ee.eb("Collapse/Expand Panel")))}},x}),yh("CheckBoxButton",function(a){var y=lm(a);return a=Xs("Button",{desiredSize:new vn(14,14)},Xs(Ur,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:xn,geometryStretch:ur,visible:!1},y!==""?new Lo("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof bn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var ee=b.fb("ButtonIcon");E.Ea("checkbox"),ee.visible=!ee.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),yh("CheckBox",function(a){a=lm(a),a=Xs("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Gr(0,1,0,0)});var y=Xs(bn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Gr(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}),_t.None=mn=new an(_t,"None",0),_t.Default=Ir=new an(_t,"Default",0),_t.Vertical=Cr=new an(_t,"Vertical",4),_t.Horizontal=gr=new an(_t,"Horizontal",5),_t.Fill=xn=new an(_t,"Fill",3),_t.Uniform=ur=new an(_t,"Uniform",1),_t.UniformToFill=ni=new an(_t,"UniformToFill",2),_t.FlipVertical=Zr=new an(_t,"FlipVertical",1),_t.FlipHorizontal=ci=new an(_t,"FlipHorizontal",2),_t.FlipBoth=Ii=new an(_t,"FlipBoth",3),_t.make=Xs,_t.getBuilders=function(){var a=new tn,y;for(y in bd)if(y!==y.toLowerCase()){var x=bd.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},_t.defineBuilder=yh,_t.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=bd.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof _t))return y&&b.set(y),b;jt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},_t.takeBuilderArgument=lm;function jf(){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=fr,this.o=di,this.hg=Ir,this.ob=this.Bi=1,this.Pf=mn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}jf.prototype.copy=function(){var a=new jf;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 nc(){this.u=-1/0,this.o=0,this.F=Bn,this.rr=Qa,this.j=this.V="None"}nc.prototype.copy=function(){var a=new nc;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},nc.className="LinkElementSettings";function Gp(){this.yj=this.Xi=Vo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Gp.prototype.copy=function(){var a=new Gp;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},Gp.className="LinkSettings";function Kc(){this.ha=[1,0,0,1,0,0]}Kc.prototype.copy=function(){var a=new Kc;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},Kc.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},Kc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Kc.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 b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,ee=this.ha[0]*-b+this.ha[2]*a,ne=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=ee,this.ha[3]=ne,this.translate(-y,-x)}},Kc.className="STransform";function Of(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Of.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Of.className="SGradient";function Ql(a,y,x){this.ownerDocument=a=y===void 0?yn.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 Ps(this,x)}Ql.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",b+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+b),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",b+"px"),!0):!1},Ql.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),ln(y))for(var b in y)a.setAttributeNS(b==="href"?"http://www.w3.org/1999/xlink":"",b,y[b]);return x!==void 0&&(a.textContent=x),a},Ql.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Ql.prototype.focus=function(){this.Oa.focus()},Ql.prototype.mx=function(){this.ownerDocument=null},zt.Object.defineProperties(Ql.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}}}),Ql.className="SVGSurface";function Ps(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 Kc,this.j=um(this),this.Nj=um(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Ri++,b=this.Ud("clipPath",{id:"mainClip"+x});b.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=b,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(b),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Yy(a,y,x,b,E,ee,ne){a.Nj===void 0?Up(a,y,x,b,E,ee,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+ee+", "+ne+")")}Qe=Ps.prototype,Qe.arc=function(a,y,x,b,E,ee,ne,ae){var ue=2*Math.PI,ge=ue-1e-6,ye=x*Math.cos(b),Le=x*Math.sin(b),ze=a+ye,Ke=y+Le,Je=ee?0:1;b=ee?b-E:E-b,(1e-6<Math.abs(ne-ze)||1e-6<Math.abs(ae-Ke))&&this.path.push(["L",ze,+Ke]),0>b&&(b=b%ue+ue),b>ge?(this.path.push(["A",x,x,0,1,Je,a-ye,y-Le]),this.path.push(["A",x,x,0,1,Je,ze,Ke])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),Je,a+x*Math.cos(E),y+x*Math.sin(E)])},Qe.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Qe.Se=function(a){this.addPath(this.path,this.rb,a||0)},Qe.bezierCurveTo=function(a,y,x,b,E,ee){this.path.push(["C",a,y,x,b,E,ee])},Qe.clearRect=function(){},Qe.clip=function(){this.Yl.clipPath=!0},Qe.closePath=function(){this.path.push(["z"])},Qe.createLinearGradient=function(a,y,x,b){var E=new Of("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},Qe.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var b="PATTERN"+Ri++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Uc,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},Qe.createRadialGradient=function(a,y,x,b,E,ee){var ne=new Of("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=b,ne.y2=E,ne.r2=ee,ne};function Jy(a,y,x,b,E,ee,ne,ae,ue){b=ae/b,E=ue/E,ee===0&&ne===0||a.rb.translate(ee,ne),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}Qe.drawImage=function(a,y,x,b,E,ee,ne,ae,ue){var ge="";a instanceof HTMLCanvasElement&&(ge=a.toDataURL()),a instanceof HTMLImageElement&&(ge=a.getAttribute("src"));var ye=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(ee=y,ne=x,ae=b=ye,ue=E=a),b=b||0,E=E||0,ae=ae||0,ue=ue||0,Jy(this,y,x,b,E,ee||0,ne||0,ae,ue),ee={x:0,y:0,width:ye||b,height:a||E,href:ge},Gt.$(b,ae)&&Gt.$(E,ue)?ge.toLowerCase().indexOf(".svg")===-1&&ge.toLowerCase().indexOf("data:image/svg")===-1&&(ee.preserveAspectRatio="xMidYMid slice"):ee.preserveAspectRatio="none",(y!==0||x!==0||b!==ye||E!==a)&&(b+=y,E+=x,ee["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),Pd(this,Uc,ee,this.rb),this.addElement(Uc,ee)},Qe.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),i0(this,this.Yl)},Qe.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Qe.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},Pd(this,"fill",a,this.rb),this.addElement("rect",a)},Qe.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},Pd(this,"fill",a,this.rb),i0(this,a),this.svg.prepend(this.Ud("rect",a))},Qe.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},Pd(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Qe.lineTo=function(a,y){this.path.push(["L",a,y])},Qe.moveTo=function(a,y){this.path.push(["M",a,y])},Qe.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},Qe.rect=function(a,y,x,b){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+b],["L",a,y+b],["z"])},Qe.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},Qe.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())},Qe.setTransform=function(a,y,x,b,E,ee){a===1&&y===0&&x===0&&b===1&&E===0&&ee===0||Up(this,a,y,x,b,E,ee)};function Qy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Qe.scale=function(a,y){this.rb.scale(a,y)},Qe.translate=function(a,y){this.rb.translate(a,y)},Qe.transform=function(){},Qe.yc=function(){},Qe.stroke=function(){qy(this,this.Yl)},Qe.jk=function(){this.clipInsteadOfFill||this.stroke()},Qe.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Qe.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 Pd(a,y,x,b){y==="fill"?i0(a,x):y==="stroke"&&qy(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function i0(a,y){a.fillStyle instanceof Of?y.fill=o0(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 Of?y.setAttributeNS(null,"fill",o0(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 Of)y.stroke=o0(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 o0(a,y,x){var b="";if(b=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,b!==null&&b.indexOf("GRAD")!==-1?(b=b.split("#")[1].slice(0,-1),x=a.svg.getElementById(b),x!==null&&x.remove()):b="GRAD"+Ri++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:b,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:b});else throw Error("invalid gradient");var E=y.gx;y=E.length;for(var ee=[],ne=0;ne<y;ne++){var ae=E[ne],ue=ae.color;ae={offset:ae.offset,"stop-color":ue},/^rgba\(/.test(ue)&&(ue=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ue),ae["stop-color"]="rgb("+ue[1]+","+ue[2]+","+ue[3]+")",ae["stop-opacity"]=ue[4]),ee.push(ae)}for(ee.sort(function(ge,ye){return ge.offset>ye.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",ee[E]));return a.svg.appendChild(x),"url(#"+b+")"}Qe.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var ee=Hn(a[E]),ne=[ee.shift()];if(ne[0]==="A")ne.push(ee.shift()+","+ee.shift(),ee.shift(),ee.shift()+","+ee.shift(),ee.shift()+","+ee.shift());else for(;ee.length;)ne.push(ee.shift()+","+ee.shift());b.push(ne.join(" "))}if(b=b.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+b+'")');else if(a.d=b,Pd(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var ae in a)ae!=="transform"&&y.setAttributeNS(null,ae,a[ae]);else{ae=y.getElementsByTagName("path");for(var ue in a)ue!=="transform"&&ae[x].setAttributeNS(null,ue,a[ue])}else this.addElement("path",a)};function Up(a,y,x,b,E,ee,ne){var ae=new Kc;ae.ha=[y,x,b,E,ee,ne],y={},Pd(a,"g",y,ae),ae=a.addElement("g",y),a.nh.push(ae)}function um(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Qe.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function gu(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Hu(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Qe.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Qe.fs=function(){this.Ct=!1},Qe.Vc=function(){},Qe.Wx=function(){},Ps.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Ps.prototype.getImageData=function(){return null},Ps.prototype.measureText=function(){return null};function hm(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()))}Ps.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Ps.className="SVGContext",Jt.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Ql(this,yn.document));var y=new Ql(this,yn.document,!0);a===void 0&&(a=new yr);var x=this;return kf(this,function(b,E){return b=im(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},Jt.prototype.makeSvg=Jt.prototype.Cs,Jt.prototype.av=function(a){return this.Cs(a)},Jt.prototype.makeSVG=Jt.prototype.av;function ll(a,y,x,b){this.ownerDocument=y=y===void 0?yn.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Vc(y,x,b),y.H=a}ll.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",!0):!1},ll.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},ll.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},ll.prototype.focus=function(){this.Oa.focus()},ll.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},zt.Object.defineProperties(ll.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}}}),ll.className="CanvasSurface";function Vc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&jt("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 jr,this.isTemporary=!!x}Qe=Vc.prototype,Qe.Wx=function(a){this.Z.imageSmoothingEnabled=a},Qe.arc=function(a,y,x,b,E,ee){this.Z.arc(a,y,x,b,E,ee)},Qe.beginPath=function(){this.Z.beginPath()},Qe.Se=function(){},Qe.bezierCurveTo=function(a,y,x,b,E,ee){this.Z.bezierCurveTo(a,y,x,b,E,ee)},Qe.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},Qe.clip=function(){this.Z.clip()},Qe.closePath=function(){this.Z.closePath()},Qe.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},Qe.createPattern=function(a,y){return this.Z.createPattern(a,y)},Qe.createRadialGradient=function(a,y,x,b,E,ee){return this.Z.createRadialGradient(a,y,x,b,E,ee)},Qe.drawImage=function(a,y,x,b,E,ee,ne,ae,ue){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,ee,ne,ae,ue)},Qe.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Qe.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Qe.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Qe.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Qe.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},Qe.lineTo=function(a,y){this.Z.lineTo(a,y)},Qe.measureText=function(a){return this.Z.measureText(a)},Qe.moveTo=function(a,y){this.Z.moveTo(a,y)},Qe.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},Qe.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},Qe.restore=function(){this.Z.restore()},Qe.save=function(){this.yc(),this.Z.save()},Vc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Qe=Vc.prototype,Qe.setTransform=function(a,y,x,b,E,ee){this.El.setTransform(a,y,x,b,E,ee)},Qe.scale=function(a,y){this.El.scale(a,y)},Qe.translate=function(a,y){this.El.translate(a,y)},Qe.stroke=function(){this.Z.stroke()},Qe.transform=function(a,y,x,b,E,ee){if(a!==1||y!==0||x!==0||b!==1||E!==0||ee!==0){var ne=this.El,ae=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*b,x=ne.m12*x+ne.m22*b,ne.dx=ne.m11*E+ne.m21*ee+ne.dx,ne.dy=ne.m12*E+ne.m22*ee+ne.dy,ne.m11=ae,ne.m12=a,ne.m21=y,ne.m22=x}},Qe.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Qe.ng=function(a,y){if(a instanceof Ni&&a.type===Ys){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)},Qe.jk=function(){this.Hm||this.stroke()},Qe.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Qe.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Qe.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},Qe.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Qe.Hs=function(){},zt.Object.defineProperties(Vc.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 vx=Object.freeze([]);Vc.className="CanvasSurfaceContext";function Hp(){this.F=this.o=this.u=this.j=0}Hp.className="ColorNumbers";function Ni(a,y){Td||(c0(),Td=!0),hr(this),this._isFrozen=!1,a===void 0?(this.na=Sh,this.xk="black"):typeof a=="string"?(this.na=Sh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Ku?(this.Qd=co,this.Lk=jo):this.Lk=a===Ys?this.Qd=ai:this.Qd=Wr,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Ni.prototype.copy=function(){var a=new Ni;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},Qe=Ni.prototype,Qe.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Qe.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Qe.qb=function(a){a.classType===Ni&&(this.type=a)},Qe.toString=function(){var a="Brush(";if(this.type===Sh)a+=this.color;else if(a=this.type===Ku?a+"Linear ":this.type===Ys?a+"Radial ":this.type===Ld?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+")"},Qe.addColorStop=function(a,y){return this._isFrozen&&un(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&An(a,"0 <= loc <= 1",Ni,"addColorStop:loc"),this.we===null&&(this.we=new tn),this.we.add(a,y),this.na===Sh&&(this.type=Ku),this.xe=null,this},Qe.Vz=function(a,y){if(this._isFrozen&&un(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Md:y,this.type===Sh)Wu(this.color),this.color=Ed(a,y);else if((this.type===Ku||this.type===Ys)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Wu(x.value),this.addColorStop(x.key,Ed(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Md:x,Wu(a),Ed(y,x)}Qe.Wy=function(a,y){if(this._isFrozen&&un(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Md:y,this.type===Sh)Wu(this.color),this.color=Ed(-a,y);else if((this.type===Ku||this.type===Ys)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Wu(x.value),this.addColorStop(x.key,Ed(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Md:x,Wu(a),Ed(-y,x)}function a0(a,y,x){Wu(a),a=Yi.j;var b=Yi.u,E=Yi.o,ee=Yi.F;return Wu(y),x===void 0&&(x=.5),"rgba("+Math.round((Yi.j-a)*x+a)+", "+Math.round((Yi.u-b)*x+b)+", "+Math.round((Yi.o-E)*x+E)+", "+Math.round((Yi.F-ee)*x+ee)+")"}Qe.Gx=function(){if(this.type===Sh)return Cd(this.color);if((this.type===Ku||this.type===Ys)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Ys)return Cd(a.first().value);if(a.get(.5)!==null)return Cd(a.get(.5));if(a.count===2)return a=a.Fa(),Cd(a0(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,ee=1;y.next();){var ne=y.key,ae=Math.abs(.5-y.key);E>ee&&ae<E?(x=ne,E=ae):ee>=E&&ae<ee&&(b=ne,ee=ae)}return x>b&&(ee=x,x=b,b=ee,ee=E),E=b-x,Cd(a0(a.get(x),a.get(b),1-ee/E))}return!1};function Cd(a){return a?a instanceof Ni?a.Gx():(Wu(a),128>(299*Yi.j+587*Yi.u+114*Yi.o)/1e3):!1}function Ed(a,y){switch(y){case Md:y=100*l0(Yi.j);var x=100*l0(Yi.u),b=100*l0(Yi.o);return Ya.j=.4124564*y+.3575761*x+.1804375*b,Ya.u=.2126729*y+.7151522*x+.072175*b,Ya.o=.0193339*y+.119192*x+.9503041*b,Ya.F=Yi.F,y=h0(Ya.j/kd[0]),x=h0(Ya.u/kd[1]),b=h0(Ya.o/kd[2]),mu.j=116*x-16,mu.u=500*(y-x),mu.o=200*(x-b),mu.F=Ya.F,mu.j=Math.min(100,Math.max(0,mu.j+100*a)),a=(mu.j+16)/116,y=a-mu.o/200,Ya.j=kd[0]*n1(mu.u/500+a),Ya.u=kd[1]*(mu.j>cm*f0?Math.pow(a,3):mu.j/cm),Ya.o=kd[2]*n1(y),Ya.F=mu.F,a=-.969266*Ya.j+1.8760108*Ya.u+.041556*Ya.o,y=.0556434*Ya.j+-.2040259*Ya.u+1.0572252*Ya.o,Yi.j=255*u0((3.2404542*Ya.j+-1.5371385*Ya.u+-.4985314*Ya.o)/100),Yi.u=255*u0(a/100),Yi.o=255*u0(y/100),Yi.F=Ya.F,Yi.j=Math.round(Yi.j),255<Yi.j?Yi.j=255:0>Yi.j&&(Yi.j=0),Yi.u=Math.round(Yi.u),255<Yi.u?Yi.u=255:0>Yi.u&&(Yi.u=0),Yi.o=Math.round(Yi.o),255<Yi.o?Yi.o=255:0>Yi.o&&(Yi.o=0),"rgba("+Yi.j+", "+Yi.u+", "+Yi.o+", "+Yi.F+")";case r1:return s0(),Is.o=Math.min(100,Math.max(0,Is.o+100*a)),"hsla("+Is.j+", "+Is.u+"%, "+Is.o+"%, "+Is.F+")";default:jt("Unknown color space: "+y)}}function Wu(a){Td||(c0(),Td=!0);var y=d0;if(y!==null){y.clearRect(0,0,1,1),y.fillStyle="#000000";var x=y.fillStyle;y.fillStyle=a,y.fillStyle!==x?(y.fillRect(0,0,1,1),a=y.getImageData(0,0,1,1).data,Yi.j=a[0],Yi.u=a[1],Yi.o=a[2],Yi.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Yi.j=0,Yi.u=0,Yi.o=0,Yi.F=1)}}function s0(){var a=Yi.j/255,y=Yi.u/255,x=Yi.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),ee=b-E;if(E=(b+E)/2,ee===0)var ne=a=0;else{switch(b){case a:ne=(y-x)/ee%6;break;case y:ne=(x-a)/ee+2;break;case x:ne=(a-y)/ee+4}ne*=60,0>ne&&(ne+=360),a=ee/(1-Math.abs(2*E-1))}Is.j=Math.round(ne),Is.u=Math.round(100*a),Is.o=Math.round(100*E),Is.F=Yi.F}function l0(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function u0(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function h0(a){return a>f0?Math.pow(a,1/3):(cm*a+16)/116}function n1(a){var y=a*a*a;return y>f0?y:(116*a-16)/cm}function Ff(a,y){typeof a!="string"&&(a instanceof Ni||jt("Value for "+y+" must be a color string or a Brush, not "+a))}function c0(){d0=vo?new ll(null,void 0,{willReadFrequently:!0}).context:null}zt.Object.defineProperties(Ni.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&un(this,a),this.na=a,this.start.Mc()&&(a===Ku?this.start=co:a===Ys&&(this.start=ai)),this.end.Mc()&&(a===Ku?this.end=jo:a===Ys&&(this.end=ai)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&un(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&un(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&un(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&un(this,a),0>a&&An(a,">= zero",Ni,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&un(this,a),0>a&&An(a,">= zero",Ni,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&un(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&un(this,a),this.cr=a,this.xe=null}}}),Ni.prototype.isDark=Ni.prototype.Gx,Ni.prototype.darkenBy=Ni.prototype.Wy,Ni.prototype.lightenBy=Ni.prototype.Vz,Ni.prototype.addColorStop=Ni.prototype.addColorStop;var f0=216/24389,cm=24389/27,kd=[95.047,100,108.883],d0=null,Yi=new Hp,Is=new Hp,Ya=new Hp,mu=new Hp,Td=!1;Ni.className="Brush";var Sh;Ni.Solid=Sh=new an(Ni,"Solid",0);var Ku;Ni.Linear=Ku=new an(Ni,"Linear",1);var Ys;Ni.Radial=Ys=new an(Ni,"Radial",2);var Ld;Ni.Pattern=Ld=new an(Ni,"Pattern",4);var Md;Ni.Lab=Md=new an(Ni,"Lab",5);var r1;Ni.HSL=r1=new an(Ni,"HSL",6),Ni.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var b=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>b.length&&(b="0"+b),2>a.length&&(a="0"+a),"#"+y+b+a},Ni.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Td||(c0(),Td=!0);var y=d0;if(y===null)return!0;y.fillStyle="#000000";var x=y.fillStyle;return y.fillStyle=a,y.fillStyle!==x?!0:(y.fillStyle="#FFFFFF",x=y.fillStyle,y.fillStyle=a,y.fillStyle!==x)},Ni.lighten=function(a){return e1(a)},Ni.lightenBy=e1,Ni.darken=function(a){return t1(a)},Ni.darkenBy=t1,Ni.mix=a0,Ni.isDark=Cd;function Go(){this.xa="Base"}Go.prototype.measure=function(){},Go.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},Go.prototype.arrange=function(){},Go.prototype.Ly=function(a,y,x,b,E,ee){a.arrange(y,x,b,E,ee)},Go.prototype.iA=function(a){a.Uj()},Go.prototype.gc=function(){},zt.Object.defineProperties(Go.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return bn}}}),Go.prototype.remeasureObject=Go.prototype.iA,Go.prototype.arrangeElement=Go.prototype.Ly,Go.prototype.measureElement=Go.prototype.Yz,Go.className="PanelLayout";function fm(){this.xa="Base"}Wt(fm,Go),fm.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=b.length;a=Vu(a);for(var ue=0;ue<ae;ue++){var ge=b[ue];if(ge.visible||ge===a){var ye=ge.margin,Le=ye.right+ye.left;ye=ye.top+ye.bottom,ge.measure(y,x,ee,ne);var ze=ge.measuredBounds;Le=Math.max(ze.width+Le,0),ye=Math.max(ze.height+ye,0),ze=ge.position.x;var Ke=ge.position.y;isFinite(ze)||(ze=0),isFinite(Ke)||(Ke=0),ge instanceof Ur&&ge.isGeometryPositioned&&(ge=ge.strokeWidth/2,ze-=ge,Ke-=ge),xi(E,ze,Ke,Le,ye)}}},fm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding;for(a=x.x-E.left,x=x.y-E.top,E=0;E<b;E++){var ee=y[E],ne=ee.measuredBounds,ae=ee.margin,ue=ee.position.x,ge=ee.position.y;if(ue=isNaN(ue)?-a:ue-a,ge=isNaN(ge)?-x:ge-x,ee instanceof Ur&&ee.isGeometryPositioned){var ye=ee.strokeWidth/2;ue-=ye,ge-=ye}ee.visible&&ee.arrange(ue+ae.left,ge+ae.top,ne.width,ne.height)}};function dm(){this.xa="Base"}Wt(dm,Go),dm.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=b.length;y=ir(),ee=Vu(a);for(var ue=0;ue<ae;ue++){var ge=b[ue];if(ge.visible||ge===ee){var ye=ls(ge,!1);if(ye!==mn&&ye!==gr)y.push(ge);else{ge.measure(1/0,x,0,ne),ye=ge.margin,ge=ge.measuredBounds;var Le=Math.max(ge.height+ye.top+ye.bottom,0);E.width+=Math.max(ge.width+ye.right+ye.left,0),E.height=Math.max(E.height,Le)}}}for(b=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):E.height!==0&&(x=Math.min(E.height,a.maxSize.height)),a=0;a<b;a++)ue=y[a],(ue.visible||ue===ee)&&(ye=ue.margin,ae=ye.right+ye.left,ye=ye.top+ye.bottom,ue.measure(1/0,x,0,ne),ue=ue.measuredBounds,ye=Math.max(ue.height+ye,0),E.width+=Math.max(ue.width+ae,0),E.height=Math.max(E.height,ye));Un(y)},dm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,ee=E.top,ne=a.isOpposite,ae=ne?x.width:E.left,ue=0;ue<b;ue++){var ge=ee,ye=y[ue];if(ye.visible){var Le=ye.measuredBounds,ze=ye.margin,Ke=ze.top+ze.bottom,Je=ee+E.bottom,it=Le.height,Tt=ls(ye,!1);(isNaN(ye.desiredSize.height)&&Tt===xn||Tt===Cr)&&(it=Math.max(x.height-Ke-Je,0)),Ke=it+Ke+Je,Je=ye.alignment,Je.Xb()&&(Je=a.defaultAlignment),Je.sb()||(Je=ai),ne&&(ae-=Le.width+ze.left+ze.right),ye.arrange(ae+Je.offsetX+ze.left,ge+Je.offsetY+ze.top+(x.height*Je.y-Ke*Je.y),Le.width,it),ne||(ae+=Le.width+ze.left+ze.right)}}};function pm(){this.xa="Base"}Wt(pm,Go),pm.prototype.measure=function(a,y,x,b,E,ee){var ne=b.length;x=ir();for(var ae=Vu(a),ue=0;ue<ne;ue++){var ge=b[ue];if(ge.visible||ge===ae){var ye=ls(ge,!1);if(ye!==mn&&ye!==Cr)x.push(ge);else{var Le=ge.margin;ye=Le.right+Le.left,Le=Le.top+Le.bottom,ge.measure(y,1/0,ee,0),ge=ge.measuredBounds,yi(E,Math.max(E.width,Math.max(ge.width+ye,0)),E.height+Math.max(ge.height+Le,0))}}}if(b=x.length,b!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):E.width!==0&&(y=Math.min(E.width,a.maxSize.width)),a=0;a<b;a++)ue=x[a],(ue.visible||ue===ae)&&(ge=ue.margin,ne=ge.right+ge.left,ge=ge.top+ge.bottom,ue.measure(y,1/0,ee,0),ue=ue.measuredBounds,ge=Math.max(ue.height+ge,0),E.width=Math.max(E.width,Math.max(ue.width+ne,0)),E.height+=ge);Un(x)}},pm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,ee=E.left,ne=a.isOpposite,ae=ne?x.height:E.top,ue=0;ue<b;ue++){var ge=ee,ye=y[ue];if(ye.visible){var Le=ye.measuredBounds,ze=ye.margin,Ke=ze.left+ze.right,Je=ee+E.right,it=Le.width,Tt=ls(ye,!1);(isNaN(ye.desiredSize.width)&&Tt===xn||Tt===gr)&&(it=Math.max(x.width-Ke-Je,0)),Ke=it+Ke+Je,Je=ye.alignment,Je.Xb()&&(Je=a.defaultAlignment),Je.sb()||(Je=ai),ne&&(ae-=Le.height+ze.bottom+ze.top),ye.arrange(ge+Je.offsetX+ze.left+(x.width*Je.x-Ke*Je.x),ae+Je.offsetY+ze.top,it,Le.height),ne||(ae+=Le.height+ze.bottom+ze.top)}}};function gm(){this.xa="Base"}Wt(gm,Go),gm.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=b.length,ue=a.Pb(),ge=ue.margin,ye=ge.right+ge.left,Le=ge.top+ge.bottom;ue.measure(y,x,ee,ne);var ze=ue.measuredBounds;ee=ze.width,ne=ze.height;var Ke=Math.max(ee+ye,0),Je=Math.max(ne+Le,0),it=a.isClipping,Tt=$t.allocAt(-ge.left,-ge.top,Ke,Je),Pt=$t.allocAt(0,0,ee,ne);p0(ue,Pt,!0),ee=Pt.width,ne=Pt.height;for(var Nt=!0,At=Vu(a),Bt=0;Bt<ae;Bt++){var Rt=b[Bt];ze=y;var Zt=x;if(Rt!==ue&&(Rt.visible||Rt===At)){ge=Rt.margin;var On=ge.left,rr=ge.top;switch(Ke=ge.right+ge.left,Je=ge.top+ge.bottom,ge=ls(Rt,!1),ge){case xn:ze=ee,Zt=ne,rr=On=Je=Ke=0;break;case gr:ze=ee,On=Ke=0;break;case Cr:Zt=ne,rr=Je=0}Rt.measure(ze,Zt,0,0),ze=Rt.measuredBounds,Ke=Math.max(ze.width+Ke,0),Je=Math.max(ze.height+Je,0),ge=Rt.alignment,ge.Xb()&&(ge=a.defaultAlignment),ge.sb()||(ge=ai);var $n=Rt.alignmentFocus;if($n.Xb()&&($n=ai),Zt=null,Rt instanceof bn&&Rt.$e!==""&&(Zt=Rt.fb(Rt.$e),Zt===Rt&&(Zt=null)),On=Pt.x-On,rr=Pt.y-rr,Zt!==null){for(Rt.arrange(0,0,ze.width,ze.height),ze=Zt.actualBounds,ze=st.allocAt(ze.x+($n.x*ze.width-$n.offsetX),ze.y+($n.y*ze.height-$n.offsetY)),Zt=Zt.panel;Zt!==Rt;)Zt.transform.Ga(ze),Zt=Zt.panel;On+=ge.x*ee+ge.offsetX-ze.x,rr+=ge.y*ne+ge.offsetY-ze.y,st.free(ze)}else On+=ge.x*ee+ge.offsetX-($n.x*ze.width+$n.offsetX),rr+=ge.y*ne+ge.offsetY-($n.y*ze.height+$n.offsetY);Nt?(Nt=!1,E.h(On,rr,Ke,Je)):xi(E,On,rr,Ke,Je)}}switch(Nt?E.assign(Tt):it?E.Uu(Pt.x,Pt.y,Pt.width,Pt.height):xi(E,Tt.x,Tt.y,Tt.width,Tt.height),$t.free(Tt),$t.free(Pt),ge=ue.stretch,ge===Ir&&(ge=ls(ue,!1)),ge){case mn:return;case xn:if(!isFinite(y)&&!isFinite(x))return;break;case gr:if(!isFinite(y))return;break;case Cr:if(!isFinite(x))return}for(ze=ue.measuredBounds,ee=ze.width,ne=ze.height,Ke=Math.max(ee+ye,0),Je=Math.max(ne+Le,0),ge=ue.margin,Pt=$t.allocAt(-ge.left,-ge.top,Ke,Je),p0(ue,Pt,!0),ee=Pt.width,ne=Pt.height,y=0;y<ae;y++)x=b[y],x===ue||!x.visible&&x!==At||(ge=x.margin,Ke=ge.right+ge.left,Je=ge.top+ge.bottom,ze=x.measuredBounds,Ke=Math.max(ze.width+Ke,0),Je=Math.max(ze.height+Je,0),ye=x.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=ai),x=x.alignmentFocus,x.Xb()&&(x=ai),Nt?(Nt=!1,E.h(ye.x*ee+ye.offsetX-(x.x*ze.width+x.offsetX)-ge.left,ye.y*ne+ye.offsetY-(x.y*ze.height+x.offsetY)-ge.top,Ke,Je)):xi(E,ye.x*ee+ye.offsetX-(x.x*ze.width+x.offsetX)-ge.left,ye.y*ne+ye.offsetY-(x.y*ze.height+x.offsetY)-ge.top,Ke,Je));Nt?E.assign(Tt):it?E.Uu(Pt.x,Pt.y,Pt.width,Pt.height):xi(E,Tt.x,Tt.y,Tt.width,Tt.height),$t.free(Pt)},gm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),ee=E.measuredBounds,ne=ee.width,ae=ee.height,ue=a.padding;ee=ue.left,ue=ue.top;var ge=ee-x.x,ye=ue-x.y;for(E.arrange(ge,ye,ne,ae),ne=$t.allocAt(0,0,ne,ae),p0(E,ne,!1),ae=0;ae<b;ae++){var Le=y[ae];if(Le!==E){ge=Le.measuredBounds;var ze=ge.width,Ke=ge.height;ye=Le.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=ai);var Je=Le.alignmentFocus;if(Je.Xb()&&(Je=ai),ge=null,Le instanceof bn&&Le.$e!==""&&(ge=Le.fb(Le.$e),ge===Le&&(ge=null)),ge!==null){var it=ge.actualBounds;for(Je=st.allocAt(it.x+(Je.x*it.width-Je.offsetX),it.y+(Je.y*it.height-Je.offsetY)),ge=ge.panel;ge!==Le;)ge.transform.Ga(Je),ge=ge.panel;ge=ye.x*ne.width+ye.offsetX-Je.x,ye=ye.y*ne.height+ye.offsetY-Je.y,st.free(Je)}else ge=ye.x*ne.width+ye.offsetX-(Je.x*ze+Je.offsetX),ye=ye.y*ne.height+ye.offsetY-(Je.y*Ke+Je.offsetY);ge+=ne.x-x.x,ye+=ne.y-x.y,Le.visible&&Le.arrange(ee+ge,ue+ye,ze,Ke)}}$t.free(ne)};function p0(a,y,x){var b=null;if(a instanceof bn&&a.$e!==""&&(b=a.fb(a.$e),b===a&&(b=null)),b!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(b.actualBounds),b=b.panel;b!==a;)b.transform.pp(y),b=b.panel}function mm(){this.xa="Base"}Wt(mm,Go),mm.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=b.length,ue=a.Pb(),ge=ue.margin,ye=y,Le=x,ze=ge.right+ge.left,Ke=ge.top+ge.bottom;ue.measure(y,x,ee,ne),ge=ue.measuredBounds;var Je=0,it=null;ue instanceof Ur&&(it=ue,Je=it.strokeWidth*it.scale);var Tt=Math.max(ge.width+ze,0);ge=Math.max(ge.height+Ke,0);var Pt=y0(ue),Nt=Pt.x*Tt+Pt.offsetX;Pt=Pt.y*ge+Pt.offsetY;var At=S0(ue),Bt=At.x*Tt+At.offsetX;for(At=At.y*ge+At.offsetY,isFinite(y)&&(ye=Math.max(Math.abs(Nt-Bt)-Je,0)),isFinite(x)&&(Le=Math.max(Math.abs(Pt-At)-Je,0)),Je=vn.alloc(),Je.h(0,0),a=Vu(a),At=0;At<ae;At++)Pt=b[At],Pt===ue||!Pt.visible&&Pt!==a||(ge=Pt.margin,Tt=ge.right+ge.left,Nt=ge.top+ge.bottom,Pt.measure(ye,Le,0,0),ge=Pt.measuredBounds,Tt=Math.max(ge.width+Tt,0),ge=Math.max(ge.height+Nt,0),Je.h(Math.max(Tt,Je.width),Math.max(ge,Je.height)));if(ae===1)E.width=Tt,E.height=ge,vn.free(Je);else{switch(Pt=y0(ue),At=S0(ue),ae=b=0,At.x!==Pt.x&&At.y!==Pt.y&&(b=Je.width/Math.abs(At.x-Pt.x),ae=Je.height/Math.abs(At.y-Pt.y)),vn.free(Je),Je=0,it!==null&&(Je=it.strokeWidth*it.scale,E0(it)===ur&&(b=ae=Math.max(b,ae))),b+=Math.abs(Pt.offsetX)+Math.abs(At.offsetX)+Je,ae+=Math.abs(Pt.offsetY)+Math.abs(At.offsetY)+Je,it=ue.stretch,it===Ir&&(it=ls(ue,!1)),it){case mn:ne=ee=0;break;case xn:isFinite(y)&&(b=y),isFinite(x)&&(ae=x);break;case gr:isFinite(y)&&(b=y),ne=0;break;case Cr:ee=0,isFinite(x)&&(ae=x)}ue.Uj(),ue.measure(b,ae,ee,ne),E.width=ue.measuredBounds.width+ze,E.height=ue.measuredBounds.height+Ke}},mm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,ee=$t.alloc();ee.h(0,0,1,1);var ne=b.margin,ae=ne.left;ne=ne.top;var ue=a.padding,ge=ue.left;ue=ue.top,b.arrange(ge+ae,ue+ne,E.width,E.height);var ye=y0(b),Le=S0(b),ze=ye.y*E.height+ye.offsetY,Ke=Le.x*E.width+Le.offsetX;for(Le=Le.y*E.height+Le.offsetY,ee.x=ye.x*E.width+ye.offsetX,ee.y=ze,xi(ee,Ke,Le,0,0),ee.x+=ae+ge,ee.y+=ne+ue,E=0;E<x;E++)ae=y[E],ae!==b&&(ge=ae.measuredBounds,ne=ae.margin,ue=Math.max(ge.width+ne.right+ne.left,0),ye=Math.max(ge.height+ne.top+ne.bottom,0),ze=ae.alignment,ze.Xb()&&(ze=a.defaultAlignment),ze.sb()||(ze=ai),ue=ee.width*ze.x+ze.offsetX-ue*ze.x+ne.left+ee.x,ne=ee.height*ze.y+ze.offsetY-ye*ze.y+ne.top+ee.y,ae.visible&&(qi(ee.x,ee.y,ee.width,ee.height,ue,ne,ge.width,ge.height)?ae.arrange(ue,ne,ge.width,ge.height):ae.arrange(ue,ne,ge.width,ge.height,new $t(ee.x,ee.y,ee.width,ee.height))));$t.free(ee)};function vm(){this.xa="Base",this.name="Table"}Wt(vm,Go),vm.prototype.measure=function(a,y,x,b,E){for(var ee=b.length,ne=ir(),ae=ir(),ue=0;ue<ee;ue++){var ge=b[ue],ye=ge instanceof bn?ge:null;if(ye!==null&&xh(ye)&&ge.visible){ae.push(ye);for(var Le=ye.O.s,ze=Le.length,Ke=0;Ke<ze;Ke++){var Je=Le[Ke];ye.type===bn.TableRow?Je.row=ge.row:ye.type===bn.TableColumn&&(Je.column=ge.column),ne.push(Je)}}else ne.push(ge)}ee=ne.length,ee===0&&(a.Fb(0),a.Eb(0));for(var it=[],Tt=0;Tt<ee;Tt++){var Pt=ne[Tt];Pt.visible&&(Bo(Pt,!0),pu(Pt,!0),it[Pt.row]||(it[Pt.row]=[]),it[Pt.row][Pt.column]||(it[Pt.row][Pt.column]=[]),it[Pt.row][Pt.column].push(Pt))}Un(ne);var Nt=ir(),At=ir(),Bt=ir(),Rt={count:0},Zt={count:0},On=y,rr=x,$n=a.rowDefs,En=a.colDefs,dn=null;ee=$n.length;for(var Dr=0;Dr<ee;Dr++)dn=$n[Dr],dn!==void 0&&(dn.actual=0);ee=En.length;for(var Mr=0;Mr<ee;Mr++)dn=En[Mr],dn!==void 0&&(dn.actual=0);for(var bi=it.length,Vi=0,Yo=0;Yo<bi;Yo++)it[Yo]&&(Vi=Math.max(Vi,it[Yo].length));var ta=Math.min(a.topIndex,bi-1),Ra=Math.min(a.leftIndex,Vi-1),Jo=0;bi=it.length;for(var Nh=Vu(a),Mo=0;Mo<bi;Mo++)if(it[Mo]){Vi=it[Mo].length;var Rl=a.Fb(Mo);Rl.actual=0;for(var _a=Rl.oc=0;_a<Vi;_a++)if(it[Mo][_a]){var Ah=a.Eb(_a);Nt[_a]===void 0&&(Ah.actual=0,Ah.oc=0,Nt[_a]=!0);for(var zs=it[Mo][_a],fl=zs.length,ks=0;ks<fl;ks++){var vs=zs[ks];if(vs.visible||vs===Nh){var mc=1<vs.rowSpan||1<vs.columnSpan;mc&&(Mo<ta||_a<Ra||At.push(vs));var _l=vs.margin,$d=_l.right+_l.left,Ts=_l.top+_l.bottom,za=Ol(vs,Rl,Ah,!1),Ng=vs.desiredSize,Vf=!isNaN(Ng.height),eu=!isNaN(Ng.width)&&Vf;if(mc||za===mn||eu||Mo<ta||_a<Ra||(Rt[_a]!==void 0||za!==xn&&za!==gr||(Rt[_a]=-1,Rt.count++),Zt[Mo]!==void 0||za!==xn&&za!==Cr||(Zt[Mo]=-1,Zt.count++),Bt.push(vs)),vs.measure(1/0,1/0,0,0),!(Mo<ta||_a<Ra)){var ys=vs.measuredBounds,tf=Math.max(ys.width+$d,0),Ls=Math.max(ys.height+Ts,0);if(vs.rowSpan===1&&(za===mn||za===gr)){dn=a.Fb(Mo);var vc=dn.Wc();Jo=Math.max(Ls-dn.actual,0),Jo+vc>rr&&(Jo=Math.max(rr-vc,0));var zv=dn.oa===0;dn.oc=dn.oc+Jo,dn.actual=dn.oa+Jo,rr=Math.max(rr-(Jo+(zv?vc:0)),0)}if(vs.columnSpan===1&&(za===mn||za===Cr)){dn=a.Eb(_a);var Ag=dn.Wc();Jo=Math.max(tf-dn.actual,0),Jo+Ag>On&&(Jo=Math.max(On-Ag,0));var Gy=dn.oa===0;dn.oc=dn.oc+Jo,dn.actual=dn.oa+Jo,On=Math.max(On-(Jo+(Gy?Ag:0)),0)}mc&&vs.Uj()}}}}}Un(Nt);var Eu=0,Yu=0;ee=a.columnCount;for(var Zf=0;Zf<ee;Zf++){var yc=En[Zf];yc!==void 0&&(Eu+=isNaN(yc.Hc)?yc.oc:yc.Hc,yc.oc!==0&&(Eu+=yc.Wc()))}ee=a.rowCount;for(var qd=0;qd<ee;qd++){var Sc=$n[qd];Sc!==void 0&&(Yu+=isNaN(Sc.Hc)?Sc.oc:Sc.Hc,Sc.oc!==0&&(Yu+=Sc.Wc()))}On=Math.max(y-Eu,0);var ku=rr=Math.max(x-Yu,0),jh=On;ee=Bt.length;for(var Ss=0;Ss<ee;Ss++){var tu=Bt[Ss],Gv=a.Fb(tu.row),Ju=a.Eb(tu.column),ep=tu.measuredBounds,zl=tu.margin,nf=zl.right+zl.left,nu=zl.top+zl.bottom;Rt[tu.column]=Ju.oc===0&&Rt[tu.column]!==void 0?Math.max(ep.width+nf,Rt[tu.column]):null,Zt[tu.row]=Gv.oc===0&&Zt[tu.row]!==void 0?Math.max(ep.height+nu,Zt[tu.row]):null}var Xf=0,tp=0,kl;for(kl in Zt)kl!=="count"&&(Xf+=Zt[kl]);for(kl in Rt)kl!=="count"&&(tp+=Rt[kl]);for(var da=vn.alloc(),jg=0;jg<ee;jg++){var ns=Bt[jg];if(ns.visible||ns===Nh){var No=a.Fb(ns.row),rs=a.Eb(ns.column),Qu=0;isFinite(rs.width)?Qu=rs.width:(isFinite(On)&&Rt[ns.column]!==null?tp===0?Qu=rs.actual+On:Qu=Rt[ns.column]/tp*jh:Rt[ns.column]!==null?Qu=On:Qu=rs.actual||On,Qu=Math.max(0,Qu-rs.Wc()));var Oh=0;switch(isFinite(No.height)?Oh=No.height:(isFinite(rr)&&Zt[ns.row]!==null?Xf===0?Oh=No.actual+rr:Oh=Zt[ns.row]/Xf*ku:Zt[ns.row]!==null?Oh=rr:Oh=No.actual||rr,Oh=Math.max(0,Oh-No.Wc())),da.h(Math.max(rs.minimum,Math.min(Qu,rs.maximum)),Math.max(No.minimum,Math.min(Oh,No.maximum))),za=Ol(ns,No,rs,!1),za){case gr:da.height=Math.max(da.height,No.actual+rr);break;case Cr:da.width=Math.max(da.width,rs.actual+On)}var rf=ns.margin,Uy=rf.right+rf.left,Uv=rf.top+rf.bottom;ns.Uj(),ns.measure(da.width,da.height,rs.minimum,No.minimum);var np=ns.measuredBounds,of=Math.max(np.width+Uy,0),Yf=Math.max(np.height+Uv,0);isFinite(On)&&(of=Math.min(of,da.width)),isFinite(rr)&&(Yf=Math.min(Yf,da.height));var xs=0;xs=No.actual,No.actual=Math.max(No.actual,Yf),No.oc=Math.max(No.oc,Yf),Jo=No.actual-xs,rr=Math.max(rr-Jo,0),Zt[ns.row]===null&&(ku=Math.max(ku-Jo,0)),xs=rs.actual,rs.actual=Math.max(rs.actual,of),rs.oc=Math.max(rs.oc,of),Jo=rs.actual-xs,On=Math.max(On-Jo,0),Rt[ns.column]===null&&(jh=Math.max(jh-Jo,0))}}Un(Bt);var $u=vn.alloc(),Gl=ir(),tl=ir();if(ee=At.length,ee!==0){for(var xc=0;xc<bi;xc++)if(it[xc]){Vi=it[xc].length;var rp=a.Fb(xc);Gl[xc]=rp.actual;for(var wc=0;wc<Vi;wc++)if(it[xc][wc]){var Hv=a.Eb(wc);tl[wc]=Hv.actual}}}for(var ip=0;ip<ee;ip++){var xo=At[ip];if(xo.visible||xo===Nh){var Tl=a.Fb(xo.row),dl=a.Eb(xo.column);switch(da.h(Math.max(dl.minimum,Math.min(y,dl.maximum)),Math.max(Tl.minimum,Math.min(x,Tl.maximum))),za=Ol(xo,Tl,dl,!1),za){case xn:tl[dl.index]!==0&&(da.width=Math.min(da.width,tl[dl.index])),Gl[Tl.index]!==0&&(da.height=Math.min(da.height,Gl[Tl.index]));break;case gr:tl[dl.index]!==0&&(da.width=Math.min(da.width,tl[dl.index]));break;case Cr:Gl[Tl.index]!==0&&(da.height=Math.min(da.height,Gl[Tl.index]))}isFinite(dl.width)&&(da.width=dl.width),isFinite(Tl.height)&&(da.height=Tl.height),$u.h(0,0);for(var Wv=dl.minimum,Ms=Tl.minimum,Fh=1;Fh<xo.rowSpan&&!(xo.row+Fh>=a.rowCount);Fh++)dn=a.Fb(xo.row+Fh),Jo=0,Jo=za===xn||za===Cr?Math.max(dn.minimum,Gl[xo.row+Fh]===0?dn.maximum:Math.min(Gl[xo.row+Fh],dn.maximum)):Math.max(dn.minimum,isNaN(dn.Hc)?dn.maximum:Math.min(dn.Hc,dn.maximum)),$u.height+=Jo,Ms+=dn.minimum;for(var pl=1;pl<xo.columnSpan&&!(xo.column+pl>=a.columnCount);pl++)dn=a.Eb(xo.column+pl),Jo=0,Jo=za===xn||za===gr?Math.max(dn.minimum,tl[xo.column+pl]===0?dn.maximum:Math.min(tl[xo.column+pl],dn.maximum)):Math.max(dn.minimum,isNaN(dn.Hc)?dn.maximum:Math.min(dn.Hc,dn.maximum)),$u.width+=Jo,Wv+=dn.minimum;da.width+=$u.width,da.height+=$u.height;var op=xo.margin,bc=op.right+op.left,Og=op.top+op.bottom;xo.measure(da.width,da.height,Wv,Ms);for(var ap=xo.measuredBounds,ru=Math.max(ap.width+bc,0),af=Math.max(ap.height+Og,0),Pc=0,sp=0;sp<xo.rowSpan&&!(xo.row+sp>=a.rowCount);sp++)dn=a.Fb(xo.row+sp),Pc+=dn.total||0;if(Pc<af){var Dh=af-Pc,Tu=af-Pc;if(xo.spanAllocation!==null)for(var Bh=xo.spanAllocation,qu=0;qu<xo.rowSpan&&!(0>=Dh)&&!(xo.row+qu>=a.rowCount);qu++){dn=a.Fb(xo.row+qu);var Ih=dn.oa||0,sf=Bh(xo,dn,Tu);dn.actual=Math.min(dn.maximum,Ih+sf),dn.oa!==Ih&&(Dh-=dn.oa-Ih)}for(;0<Dh;){var Ul=dn.oa||0;if(isNaN(dn.height)&&dn.maximum>Ul&&(dn.actual=Math.min(dn.maximum,Ul+Dh),dn.oa!==Ul&&(Dh-=dn.oa-Ul)),dn.index===0)break;dn=a.Fb(dn.index-1)}}for(var Jf=0,Rh=0;Rh<xo.columnSpan&&!(xo.column+Rh>=a.columnCount);Rh++)dn=a.Eb(xo.column+Rh),Jf+=dn.total||0;if(Jf<ru){var Qf=ru-Jf,Hy=ru-Jf;if(xo.spanAllocation!==null)for(var eh=xo.spanAllocation,lf=0;lf<xo.columnSpan&&!(0>=Qf)&&!(xo.column+lf>=a.columnCount);lf++){dn=a.Eb(xo.column+lf);var Fg=dn.oa||0,Wy=eh(xo,dn,Hy);dn.actual=Math.min(dn.maximum,Fg+Wy),dn.oa!==Fg&&(Qf-=dn.oa-Fg)}for(;0<Qf;){var Kv=dn.oa||0;if(isNaN(dn.width)&&dn.maximum>Kv&&(dn.actual=Math.min(dn.maximum,Kv+Qf),dn.oa!==Kv&&(Qf-=dn.oa-Kv)),dn.index===0)break;dn=a.Eb(dn.index-1)}}}}Un(At),vn.free($u),vn.free(da),Gl!==void 0&&Un(Gl),tl!==void 0&&Un(tl);var $f=0,qf=0,Vv=a.desiredSize,gx=a.maxSize;za=ls(a,!0);var Dg=Yu=Eu=0,Bg=0;ee=a.columnCount;for(var Zv=0;Zv<ee;Zv++)En[Zv]!==void 0&&(dn=a.Eb(Zv),isFinite(dn.width)?(Dg+=dn.width,Dg+=dn.Wc()):Tm(dn)===Zp?(Dg+=dn.oa,Dg+=dn.Wc()):dn.oa!==0&&(Eu+=dn.oa,Eu+=dn.Wc()));isFinite(Vv.width)?$f=Math.min(Vv.width,gx.width):$f=za!==mn&&isFinite(y)?y:Eu,$f=Math.max($f,a.minSize.width),$f=Math.max($f-Dg,0);for(var $x=Eu===0?1:Math.max($f/Eu,1),Xv=0;Xv<ee;Xv++)En[Xv]!==void 0&&(dn=a.Eb(Xv),isFinite(dn.width)||Tm(dn)===Zp||(dn.actual=dn.oa*$x),dn.position=E.width,dn.oa!==0&&(E.width+=dn.oa,E.width+=dn.Wc()));ee=a.rowCount;for(var Yv=0;Yv<ee;Yv++)$n[Yv]!==void 0&&(dn=a.Fb(Yv),isFinite(dn.height)?(Bg+=dn.height,Bg+=dn.Wc()):Tm(dn)===Zp?(Bg+=dn.oa,Bg+=dn.Wc()):dn.oa!==0&&(Yu+=dn.oa,Yu+=dn.Wc()));isFinite(Vv.height)?qf=Math.min(Vv.height,gx.height):qf=za!==mn&&isFinite(x)?x:Yu,qf=Math.max(qf,a.minSize.height),qf=Math.max(qf-Bg,0);for(var qx=Yu===0?1:Math.max(qf/Yu,1),Jv=0;Jv<ee;Jv++)$n[Jv]!==void 0&&(dn=a.Fb(Jv),isFinite(dn.height)||Tm(dn)===Zp||(dn.actual=dn.oa*qx),dn.position=E.height,dn.oa!==0&&(E.height+=dn.oa,E.height+=dn.Wc()));ee=ae.length;for(var Ky=0;Ky<ee;Ky++){var Ig=ae[Ky],Vy=0,Zy=0;Ig.type===bn.TableRow?(Vy=E.width,dn=a.Fb(Ig.row),Zy=dn.actual):(dn=a.Eb(Ig.column),Vy=dn.actual,Zy=E.height),Ig.measuredBounds.h(0,0,Vy,Zy),Bo(Ig,!1)}Un(ae),a.inRowsCols=it},vm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,ee=E.left;E=E.top;var ne=a.inRowsCols;if(ne!==null){for(var ae,ue,ge=ne.length,ye=0,Le=0;Le<ge;Le++)ne[Le]&&(ye=Math.max(ye,ne[Le].length));ue=a.rowDefs,ae=a.colDefs;var ze=Le=0,Ke=Math.min(a.topIndex,ge-1);if(0<ue.length){for(;Ke!==ge&&(ue[Ke]===void 0||ue[Ke].oa===0);)Ke++;Ke=Math.max(Math.min(Ke,ge-1),0),Le=-ue[Ke].position}var Je=Math.min(a.leftIndex,ye-1);if(0<ae.length){for(;Je!==ye&&(ae[Je]===void 0||ae[Je].oa===0);)Je++;Je=Math.max(Math.min(Je,ye-1),0),ze=-ae[Je].position}for(var it=0,Tt=0;it!==ge&&ue[it]===void 0;)it++;for(;Tt!==ge&&ae[Tt]===void 0;)Tt++;ye=a.part,a.Fb(it),a.Eb(Tt);for(var Pt=0;Pt<y.length;Pt++){var Nt=y[Pt];if(Nt instanceof bn&&Nt.visible&&xh(Nt)){if(Nt.type===bn.TableRow){ae=a.Fb(Nt.row);var At=a.Eb(Tt)}else ae=a.Fb(it),At=a.Eb(Nt.column);ue=ae.position+Le+E,ae.oa!==0&&(ue+=ae.Io(Math.max(it,Ke))),ae=At.position+ze+ee,At.oa!==0&&(ae+=At.Io(Math.max(Tt,Je))),At=Nt.measuredBounds,Nt.Uk(),Nt.actualBounds.ka();var Bt=Nt.actualBounds,Rt=$t.allocAt(Bt.x,Bt.y,Bt.width,Bt.height);Bt.x=Nt.type===bn.TableRow?ee:ae,Bt.y=Nt.type===bn.TableColumn?E:ue,Bt.width=At.width,Bt.height=At.height,Nt.actualBounds.freeze(),pu(Nt,!1),Ci(Rt,Bt)||ye===null||(ye.oh(),Nt.Pn(ye)),$t.free(Rt)}}for(Pt=vn.alloc(),Nt=0;Nt<ge;Nt++)if(ne[Nt]){for(ye=ne[Nt].length,At=a.Fb(Nt),ue=At.position+Le+E,At.oa!==0&&(ue+=At.Io(Math.max(it,Ke))),Bt=0;Bt<ye;Bt++)if(ne[Nt][Bt]){Rt=a.Eb(Bt),ae=Rt.position+ze+ee,Rt.oa!==0&&(ae+=Rt.Io(Math.max(Tt,Je)));for(var Zt=ne[Nt][Bt],On=Zt.length,rr=0;rr<On;rr++){var $n=Zt[rr],En=$n.measuredBounds;Pt.h(0,0);for(var dn=1;dn<$n.rowSpan&&!(Nt+dn>=a.rowCount);dn++){var Dr=a.Fb(Nt+dn);Dr.oa!==0&&(Pt.height+=Dr.total)}for(dn=1;dn<$n.columnSpan&&!(Bt+dn>=a.columnCount);dn++)Dr=a.Eb(Bt+dn),Dr.oa!==0&&(Pt.width+=Dr.total);var Mr=Rt.oa+Pt.width,bi=At.oa+Pt.height;dn=ae,Dr=ue;var Vi=Mr,Yo=bi,ta=ae,Ra=ue,Jo=Mr,Nh=bi;ae+Mr>x.width&&(Jo=Math.max(x.width-ae,0)),ue+bi>x.height&&(Nh=Math.max(x.height-ue,0));var Mo=$n.alignment;if(Mo.Xb()){Mo=a.defaultAlignment,Mo.sb()||(Mo=ai);var Rl=Mo.x,_a=Mo.y,Ah=Mo.offsetX;Mo=Mo.offsetY;var zs=Rt.alignment,fl=At.alignment;zs.sb()&&(Rl=zs.x,Ah=zs.offsetX),fl.sb()&&(_a=fl.y,Mo=fl.offsetY)}else Rl=Mo.x,_a=Mo.y,Ah=Mo.offsetX,Mo=Mo.offsetY;(isNaN(Rl)||isNaN(_a))&&(_a=Rl=.5,Mo=Ah=0),zs=En.width,fl=En.height;var ks=$n.margin,vs=ks.left+ks.right,mc=ks.top+ks.bottom,_l=Ol($n,At,Rt,!1);!isNaN($n.desiredSize.width)||_l!==xn&&_l!==gr||(zs=Math.max(Mr-vs,0)),!isNaN($n.desiredSize.height)||_l!==xn&&_l!==Cr||(fl=Math.max(bi-mc,0)),Mr=$n.maxSize,bi=$n.minSize,zs=Math.min(Mr.width,zs),fl=Math.min(Mr.height,fl),zs=Math.max(bi.width,zs),fl=Math.max(bi.height,fl),Mr=fl+mc,dn+=Vi*Rl-(zs+vs)*Rl+Ah+ks.left,Dr+=Yo*_a-Mr*_a+Mo+ks.top,$n.visible&&(qi(ta,Ra,Jo,Nh,dn,Dr,En.width,En.height)?$n.arrange(dn,Dr,zs,fl):$n.arrange(dn,Dr,zs,fl,new $t(ta,Ra,Jo,Nh)))}}}for(vn.free(Pt),a=0;a<b;a++)x=y[a],ee=x instanceof bn?x:null,ee!==null&&xh(ee)&&(ee=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,ee.width,ee.height),x.naturalBounds.freeze())}};function ym(){this.xa="Base"}Wt(ym,Go),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}Wt(Sm,Go),Sm.prototype.measure=function(){},Sm.prototype.arrange=function(){};function xm(){this.xa="Base"}Wt(xm,Go),xm.prototype.measure=function(a,y,x,b,E,ee,ne){1<b.length&&jt("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,ee,ne);var ae=b.measuredBounds,ue=b.margin,ge=ue.right+ue.left;if(ue=ue.top+ue.bottom,isFinite(y)||isFinite(x)){var ye=b.scale,Le=ae.width;ae=ae.height;var ze=Math.max(y-ge,0),Ke=Math.max(x-ue,0),Je=1;a.viewboxStretch===ur?Le!==0&&ae!==0&&(Je=Math.min(ze/Le,Ke/ae)):Le!==0&&ae!==0&&(Je=Math.max(ze/Le,Ke/ae)),Je===0&&(Je=1e-4),b.Ca*=Je,ye!==b.scale&&(Bo(b,!0),b.measure(1/0,1/0,ee,ne))}ae=b.measuredBounds,E.width=isFinite(y)?y:Math.max(ae.width+ge,0),E.height=isFinite(x)?x:Math.max(ae.height+ue,0)},xm.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,ee=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=ai),y.arrange(x.width*ne.x-ee*ne.x+ne.offsetX,x.height*ne.y-E*ne.y+ne.offsetY,b.width,b.height)};function Wp(){this.xa="Base"}Wt(Wp,Go),Wp.prototype.measure=function(){},Wp.prototype.arrange=function(){},Wp.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var b=a.gridCellSize,E=b.width;b=b.height;var ee=a.naturalBounds,ne=a.actualBounds,ae=ee.width,ue=ee.height,ge=Math.ceil(ae/E),ye=Math.ceil(ue/b),Le=a.gridOrigin,ze=Le.x;Le=Le.y,y.save(),y.beginPath(),y.rect(0,0,ae,ue),y.clip(),y.Se();for(var Ke=[],Je=a.O.s,it=Je.length,Tt=0;Tt<it;Tt++){var Pt=Je[Tt],Nt=[];if(Ke.push(Nt),Pt.visible){var At=Pt.interval;if(!(0>At)){Pt=m0(Pt.figure);for(var Bt=0;Bt<it;Bt++)if(Bt!==Tt){var Rt=Je[Bt];Rt.visible&&m0(Rt.figure)===Pt&&(Rt=Rt.interval,Rt>At&&Nt.push(Rt))}}}}for(Je=a.O.s,it=Je.length,Tt=0;Tt<it;Tt++){var Zt=Je[Tt];if(Zt.visible&&(Nt=Zt.interval||1,Pt=Math.abs(Nt),!(2>E*Pt*x))){if(At=Zt.segmentIndex,(!isFinite(At)||isNaN(At))&&(At=0),0>At&&(At=Pt-Math.min(-At,Pt)),At=Math.round(At%Pt),Pt=Zt.opacity,Bt=1,Pt!==1){if(Pt===0)continue;Bt=y.globalAlpha,y.globalAlpha=Bt*Pt}Rt=Ke[Tt];var On=!1,rr=Zt.strokeDashArray;if(rr!==null&&(On=!0,y.js(rr,Zt.strokeDashOffset)),Zt.figure==="LineV"&&Zt.stroke!==null&&0<Zt.strokeWidth){for(y.lineWidth=Zt.strokeWidth,yo(a,y,Zt.stroke,!1,!1,ee,ne),y.beginPath(),rr=Zt=Math.floor((ze-E)/E);rr<=Zt+ge;rr++){var $n=rr*E+ze;0<=$n&&$n<=ae&&wm(rr,Nt,At,Rt)&&(y.moveTo($n,0),y.lineTo($n,ue))}y.stroke(),y.Se()}else if(Zt.figure==="LineH"&&Zt.stroke!==null&&0<Zt.strokeWidth){for(y.lineWidth=Zt.strokeWidth,yo(a,y,Zt.stroke,!1,!1,ee,ne),y.beginPath(),rr=Zt=Math.floor((Le-b)/b);rr<=Zt+ye;rr++)$n=rr*b+Le,0<=$n&&$n<=ue&&wm(rr,Nt,At,Rt)&&(y.moveTo(0,$n),y.lineTo(ae,$n));y.stroke(),y.Se()}else if(Zt.figure==="BarV"&&Zt.fill!==null)for(yo(a,y,Zt.fill,!0,!1,ee,ne),Zt=Zt.width,isNaN(Zt)&&(Zt=E),$n=rr=Math.floor((ze-E)/E);$n<=rr+ge;$n++){var En=$n*E+ze;0<=En+Zt&&En<=ae&&wm($n,Nt,At,Rt)&&y.fillRect(En,0,Zt,ue)}else if(Zt.figure==="BarH"&&Zt.fill!==null)for(yo(a,y,Zt.fill,!0,!1,ee,ne),Zt=Zt.height,isNaN(Zt)&&(Zt=b),$n=rr=Math.floor((Le-b)/b);$n<=rr+ye;$n++)En=$n*b+Le,0<=En+Zt&&En<=ue&&wm($n,Nt,At,Rt)&&y.fillRect(0,En,ae,Zt);On&&y.fs(),Pt!==1&&(y.globalAlpha=Bt)}}y.restore(),y.Vc(!1)};function wm(a,y,x,b){if(0>y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;E<y;E++)if(a%b[E]===x)return!1;return!0}function bm(){this.xa="Base"}Wt(bm,Go),bm.prototype.measure=function(a,y,x,b,E){var ee=b.length;if(a instanceof gi||a instanceof Tn){var ne=null,ae=null;if(a instanceof Tn&&(ne=a),a instanceof gi&&(ae=a,ne=ae.adornedPart,a.j===null&&(a.j=[])),ne instanceof Tn){var ue=ne;if(ee===0)yi(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var ge=a instanceof gi?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ye=ue.points,Le=ne.pointsCount;ae!==null?ae.Ul(!1):ne!==null&&ne.Ul(!1),ae=y.width;var ze=y.height,Ke=a.j;if(Ke.length=0,ge!==null){i1(a,ae,ze,ge);var Je=ge.measuredBounds;x.ed(Je),Ke.push(Je)}Je=jr.alloc();for(var it=st.alloc(),Tt=st.alloc(),Pt=0;Pt<ee;Pt++){var Nt=b[Pt];if(Nt!==ge)if(Nt.isPanelMain&&Nt instanceof Ur){i1(a,ae,ze,Nt);var At=Nt.measuredBounds;x.ed(At),Ke.push(At)}else if(2>Le)Nt.measure(1/0,1/0,0,0),At=Nt.measuredBounds,x.ed(At),Ke.push(At);else{var Bt=Nt.segmentIndex,Rt=Nt.segmentFraction,Zt=Nt.alignmentFocus;Zt.Mc()&&(Zt=ai);var On=Nt.segmentOrientation,rr=Nt.segmentOffset;if(isNaN(Bt)){var $n=ue.ua;At=ir(),$n.Qu(Rt,At);var En=st.allocAt(At[0],At[1]);if(En.add(ue.i(0)),$n.type===Ln.j?En.offset(-$n.startX,-$n.startY):($n=$n.figures.first(),$n!==null&&En.offset(-$n.startX,-$n.startY)),$n=At[2],On!==Qa){var dn=ue.computeAngle(Nt,On,$n);Nt.Kb=dn}dn=En.x-y.x;var Dr=En.y-y.y;st.free(En),Un(At)}else if(Bt<-Le||Bt>=Le)At=st.alloc(),ue.vg(),ue.computeMidPoint(At),$n=ue.midAngle,On!==Qa&&(dn=ue.computeAngle(Nt,On,$n),Nt.Kb=dn),dn=At.x-y.x,Dr=At.y-y.y,st.free(At);else{if(dn=0,0<=Bt?(Dr=ye.M(Bt),At=Bt<Le-1?ye.M(Bt+1):Dr):(dn=Le+Bt,Dr=ye.M(dn),At=0<dn?ye.M(dn-1):Dr),Dr.Xa(At)){0<=Bt?($n=0<Bt?ye.M(Bt-1):Dr,dn=Bt<Le-2?ye.M(Bt+2):At):($n=dn<Le-1?ye.M(dn+1):Dr,dn=1<dn?ye.M(dn-2):At),En=$n.Bf(Dr);var Mr=At.Bf(dn);$n=En>Mr+10?0<=Bt?$n.ab(Dr):Dr.ab($n):Mr>En+10?0<=Bt?At.ab(dn):dn.ab(At):0<=Bt?$n.ab(dn):dn.ab($n)}else $n=0<=Bt?Dr.ab(At):At.ab(Dr);On!==Qa&&(dn=ue.computeAngle(Nt,On,$n),Nt.Kb=dn),dn=Dr.x+(At.x-Dr.x)*Rt-y.x,Dr=Dr.y+(At.y-Dr.y)*Rt-y.y}Nt.measure(1/0,1/0,0,0),At=Nt.measuredBounds,En=Nt.naturalBounds;var bi=0;Nt instanceof Ur&&(bi=Nt.strokeWidth),Mr=En.width+bi;var Vi=En.height+bi;Je.reset(),Je.translate(-At.x,-At.y),Je.scale(Nt.scale,Nt.scale),Je.rotate(On===Qa?Nt.angle:$n,Mr/2,Vi/2),On!==rg&&On!==og||Je.rotate(90,Mr/2,Vi/2),On!==ig&&On!==ag||Je.rotate(-90,Mr/2,Vi/2),On===$m&&(45<$n&&135>$n||225<$n&&315>$n)&&Je.rotate(-$n,Mr/2,Vi/2),En=new $t(0,0,Mr,Vi),it.xi(En,Zt),Je.Ga(it),Zt=-it.x+bi/2*Nt.scale,Nt=-it.y+bi/2*Nt.scale,Tt.assign(rr),bi=isNaN(rr.x);var Yo=isNaN(rr.y);if(bi||Yo){Mr=Mr/2+3,Vi=Vi/2+3;var ta=45<=$n&&135>=$n,Ra=225<=$n&&315>=$n;On===Qa&&(ta||Ra)?(Tt.x=Yo?Mr:rr.y,Tt.y=bi?Vi:rr.x,ta?0<=Bt||isNaN(Bt)&&.5>Rt||!bi||(Tt.y=-Vi):Ra&&((0<=Bt||isNaN(Bt)&&.5>Rt)&&bi&&(Tt.y=-Vi),Yo&&(Tt.x=-Mr))):(bi&&(Tt.x=0<=Bt||isNaN(Bt)&&.5>Rt?Mr:-Mr),Yo&&(Tt.y=-Vi),Tt.rotate($n))}else Tt.rotate($n);dn+=Tt.x,Dr+=Tt.y,En.set(At),En.h(dn+Zt,Dr+Nt,At.width,At.height),Ke.push(En),x.ed(En)}}if(ne!==null)for(b=ne.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),yi(E,x.width||0,x.height||0),jr.free(Je),st.free(it),st.free(Tt)}}}},bm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof gi||a instanceof Tn){var b=a,E=null;a instanceof gi&&(E=a,b=E.adornedPart);var ee=a instanceof gi?null:b.path,ne=a.j;if(ne.length!==0){var ae=0;if(ee!==null&&ae<ne.length){var ue=ne[ae];ae++,ee.arrange(ue.x-a.jg.x,ue.y-a.jg.y,ue.width,ue.height)}for(ue=0;ue<x;ue++){var ge=y[ue];if(ge!==ee&&ae<ne.length){var ye=ne[ae];ae++,ge.arrange(ye.x-a.jg.x,ye.y-a.jg.y,ye.width,ye.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof Tn)for(ee=a.labelNodes;ee.next();){var Le=a;ne=ee.value,ae=ne.segmentIndex,ue=ne.segmentFraction;var ze=ne.alignmentFocus;if(ge=ne.segmentOrientation,ye=ne.segmentOffset,isNaN(ae)){var Ke=Le.ua,Je=ir();Ke.Qu(ue,Je);var it=st.allocAt(Je[0],Je[1]);it.add(Le.i(0)),Ke.type===Ln.j||(Ke=Ke.figures.first()),it.offset(-Ke.startX,-Ke.startY),Ke=Je[2],ge!==Qa&&(Le=Le.computeAngle(ne,ge,Ke),ne.angle=Le),Le=it.x;var Tt=it.y;st.free(it),Un(Je)}else if(ae<-x||ae>=x)Je=st.alloc(),Ke=Le,Tt=Je,Ke.vg(),Ke.computeMidPoint(Tt),Ke=Le.midAngle,ge!==Qa&&(Le=Le.computeAngle(ne,ge,Ke),ne.angle=Le),Le=Je.x,Tt=Je.y,st.free(Je);else{if(it=0,0<=ae?(Je=y.s[ae],Tt=ae<x-1?y.s[ae+1]:Je):(it=x+ae,Je=y.s[it],Tt=0<it?y.s[it-1]:Je),Je.Xa(Tt)){0<=ae?(Ke=0<ae?y.s[ae-1]:Je,it=ae<x-2?y.s[ae+2]:Tt):(Ke=it<x-1?y.s[it+1]:Je,it=1<it?y.s[it-2]:Tt);var Pt=Ke.Bf(Je),Nt=Tt.Bf(it);Ke=Pt>Nt+10?0<=ae?Ke.ab(Je):Je.ab(Ke):Nt>Pt+10?0<=ae?Tt.ab(it):it.ab(Tt):0<=ae?Ke.ab(it):it.ab(Ke)}else Ke=0<=ae?Je.ab(Tt):Tt.ab(Je);ge!==Qa&&(Le=Le.computeAngle(ne,ge,Ke),ne.angle=Le),Le=Je.x+(Tt.x-Je.x)*ue,Tt=Je.y+(Tt.y-Je.y)*ue}if(ze.ys())ne.location=new st(Le,Tt);else{ze.Mc()&&(ze=ai),Je=jr.alloc(),Je.reset(),Je.scale(ne.scale,ne.scale),Je.rotate(ne.angle,0,0);var At=ne.naturalBounds;it=$t.allocAt(0,0,At.width,At.height),Pt=st.alloc(),Pt.xi(it,ze),Je.Ga(Pt),ze=-Pt.x,Nt=-Pt.y;var Bt=At.width,Rt=At.height;At=st.alloc(),At.assign(ye);var Zt=isNaN(ye.x),On=isNaN(ye.y);if(Zt||On){Bt=Bt/2+3,Rt=Rt/2+3;var rr=45<=Ke&&135>=Ke,$n=225<=Ke&&315>=Ke;ge===Qa&&(rr||$n)?(At.x=On?Bt:ye.y,At.y=Zt?Rt:ye.x,rr?0<=ae||isNaN(ae)&&.5>ue||!Zt||(At.y=-Rt):$n&&((0<=ae||isNaN(ae)&&.5>ue)&&Zt&&(At.y=-Rt),On&&(At.x=-Bt))):(Zt&&(At.x=0<=ae||isNaN(ae)&&.5>ue?Bt:-Bt),On&&(At.y=-Rt),At.rotate(Ke))}else At.rotate(Ke);Le+=At.x,Tt+=At.y,Je.pp(it),ze+=it.x,Nt+=it.y,ae=st.allocAt(Le+ze,Tt+Nt),ne.move(ae),st.free(ae),st.free(At),st.free(Pt),$t.free(it),jr.free(Je)}}E!==null?E.Ul(!1):b.Ul(!1),b=O1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),st.free(b)}};function i1(a,y,x,b){if(Bs(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof gi&&a.type===bn.Link&&a.adornedObject instanceof Ur&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Tn&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof gi&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):b.Ge(-(E/2),-(E/2),y+E,x+E),E=b.desiredSize,E.w()||b.ua===null?b.dc.h(0,0,E.width,E.height):b.dc.assign(b.ua.bounds),Bo(b,!1)}}function Kp(){this.xa="Base"}Wt(Kp,Go),Kp.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=a.Pb();a.graduatedBounds=[];var ue=ae.margin,ge=ue.right+ue.left,ye=ue.top+ue.bottom;ae.measure(y,x,ee,ne);var Le=ae.measuredBounds,ze=new $t(-ue.left,-ue.top,Math.max(Le.width+ge,0),Math.max(Le.height+ye,0));a.graduatedBounds.push(ze),E.assign(ze);for(var Ke=ae.geometry,Je=ae.strokeWidth,it=Ke.flattenedSegments,Tt=Ke.flattenedLengths,Pt=Ke.flattenedTotalLength,Nt=it.length,At=0,Bt=0,Rt=ir(),Zt=0;Zt<Nt;Zt++){var On=it[Zt],rr=[];Bt=At=0;for(var $n=On.length,En=0;En<$n;En+=2){var dn=On[En],Dr=On[En+1];if(En!==0){var Mr=180*Math.atan2(Dr-Bt,dn-At)/Math.PI;0>Mr&&(Mr+=360),rr.push(Mr)}At=dn,Bt=Dr}Rt.push(rr)}if(a.graduatedIntervals===null){for(var bi=[],Vi=a.O.s,Yo=Vi.length,ta=0;ta<Yo;ta++){var Ra=Vi[ta],Jo=[];if(bi.push(Jo),Ra.visible){var Nh=Ra.interval;if(!(0>Nh)){for(var Mo=0;Mo<Yo;Mo++)if(Mo!==ta){var Rl=Vi[Mo];if(Rl.visible&&Ra.constructor===Rl.constructor){var _a=Rl.interval;_a>Nh&&Jo.push(_a)}}}}}a.graduatedIntervals=bi}var Ah=a.graduatedIntervals,zs=a.O.s,fl=zs.length,ks=0,vs=0,mc=Pt;a.graduatedMarks=[];for(var _l,$d=0;$d<fl;$d++){var Ts=zs[$d];if(_l=[],Ts.visible&&Ts!==ae){var za=Math.abs(Ts.interval),Ng=a.graduatedTickUnit;if(!(2>Ng*za*Pt/a.graduatedRange&&Ts.graduatedSkip===null)){var Vf=Tt[0][0],eu=0,ys=0;vs=Pt*Ts.graduatedStart-1e-4,mc=Pt*Ts.graduatedEnd+1e-4;var tf=Ng*za,Ls=a.graduatedTickBase;if(Ls<a.graduatedMin){var vc=(a.graduatedMin-Ls)/tf;vc=vc%1===0?vc:Math.floor(vc+1),Ls+=vc*tf}else Ls>a.graduatedMin+tf&&(Ls-=Math.floor((Ls-a.graduatedMin)/tf)*tf);for(var zv=Ah[$d],Ag=Ls,Gy=1e-6*a.graduatedMax,Eu=1;Ls<=a.graduatedMax+Gy;Eu++){e:{for(var Yu=zv.length,Zf=0;Zf<Yu;Zf++){var yc=(Ls-a.graduatedTickBase)%(zv[Zf]*a.graduatedTickUnit),qd=1e-6*a.graduatedTickUnit;if(yc<qd&&yc>-qd){var Sc=!1;break e}}Sc=!0}if(Sc&&(Ls>a.graduatedMax&&(Ls=a.graduatedMax),Ts.graduatedSkip===null||Ts instanceof Zi&&!Ts.graduatedSkip(Ls,Ts)||Ts instanceof Ur&&!Ts.graduatedSkip(Ls,Ts))&&(ks=(Ls-a.graduatedMin)*Pt/a.graduatedRange,ks>Pt&&(ks=Pt),vs<=ks&&ks<=mc)){for(var ku=Rt[eu][ys],jh=Tt[eu][ys];eu<Tt.length;){for(;ks>Vf&&ys<Tt[eu].length-1;)ys++,ku=Rt[eu][ys],jh=Tt[eu][ys],Vf+=jh;if(ks<=Vf)break;eu++,ys=0,ku=Rt[eu][ys],jh=Tt[eu][ys],Vf+=jh}var Ss=it[eu],tu=Ss[2*ys],Gv=Ss[2*ys+1],Ju=(ks-(Vf-jh))/jh,ep=new st(tu+(Ss[2*ys+2]-tu)*Ju+Je/2-Ke.bounds.x,Gv+(Ss[2*ys+3]-Gv)*Ju+Je/2-Ke.bounds.y);ep.scale(ae.scale,ae.scale);e:{var zl=ku,nf=Rt[eu];if(!(.5005>Ju&&.4995<Ju)){var nu=zl;if(.5>Ju?0<ys?nu=nf[ys-1]:Gt.$(Ss[0],Ss[Ss.length-2])&&Gt.$(Ss[1],Ss[Ss.length-1])&&(nu=nf[nf.length-1]):.5<Ju&&(ys+1<nf.length?nu=nf[ys+1]:Gt.$(Ss[0],Ss[Ss.length-2])&&Gt.$(Ss[1],Ss[Ss.length-1])&&(nu=nf[0])),zl!==nu){var Xf=Math.abs(zl-nu);if(180<Xf&&(zl<nu?zl+=360:nu+=360,Xf=Math.abs(zl-nu)),5e-4>Ju||.9995<Ju){ku=(zl+nu)/2%360;break e}if(10>Xf){var tp=1-Math.abs(.5-Ju);ku=(zl*tp+nu*(1-tp))%360;break e}}}ku=zl}if(Ts instanceof Zi){var kl="";Ts.graduatedFunction!==null?(kl=Ts.graduatedFunction(Ls,Ts),kl=kl!=null?kl.toString():""):kl=(+Ls.toFixed(2)).toString(),kl!==""&&_l.push({$l:ep,angle:ku,text:kl})}else _l.push({$l:ep,angle:ku})}Ls=Ag+Eu*tf}}}a.graduatedMarks.push(_l)}Un(Rt);var da=a.graduatedMarks;if(da!==null)for(var jg=b.length,ns=0;ns<jg;ns++){var No=b[ns],rs=da[ns];if(No.visible&&No!==ae&&rs.length!==0){if(No instanceof Ur){var Qu=a,Oh=E,rf=No.alignmentFocus;rf.Mc()&&(rf=co);var Uy=No.angle;No.Kb=0,No.measure(1/0,1/0,0,0),No.Kb=Uy;var Uv=No.measuredBounds,np=Uv.width,of=Uv.height,Yf=$t.allocAt(0,0,np,of),xs=st.alloc();xs.xi(Yf,rf),$t.free(Yf);for(var $u=-xs.x,Gl=-xs.y,tl=new $t,xc=rs.length,rp=0;rp<xc;rp++)for(var wc=rs[rp],Hv=wc.$l.x,ip=wc.$l.y,xo=wc.angle,Tl=0;4>Tl;Tl++){switch(Tl){case 0:xs.h($u,Gl);break;case 1:xs.h($u+np,Gl);break;case 2:xs.h($u,Gl+of);break;case 3:xs.h($u+np,Gl+of)}xs.rotate(xo+No.angle),xs.offset(Hv,ip),rp===0&&Tl===0?tl.h(xs.x,xs.y,0,0):tl.Ye(xs),xs.offset(-Hv,-ip),xs.rotate(-xo-No.angle)}st.free(xs),Qu.graduatedBounds!==null&&Qu.graduatedBounds.push(tl),xi(Oh,tl.x,tl.y,tl.width,tl.height)}else if(No instanceof Zi){var dl=a,Wv=E;dl.temporaryTextBlock===null&&(dl.temporaryTextBlock=new Zi);var Ms=dl.temporaryTextBlock;S1(Ms,No);var Fh=No.alignmentFocus;Fh.Mc()&&(Fh=co);for(var pl=No.segmentOrientation,op=No.segmentOffset,bc=new $t,Og=0,ap=0,ru=0,af=0,Pc=0,sp=rs.length,Dh=0;Dh<sp;Dh++){var Tu=rs[Dh];Og=Tu.$l.x,ap=Tu.$l.y,ru=Tu.angle,Pc=af=No.angle,pl!==Qa&&(Pc=pl===ng||pl===Qm?ru+No.angle:ru,af=Tn.computeAngle(pl,Pc)),Ms.Kb=af,Ms.text=Tu.text||"",Ms.measure(1/0,1/0,0,0);var Bh=Ms.measuredBounds,qu=Ms.naturalBounds,Ih=qu.width,sf=qu.height,Ul=jr.alloc();Ul.reset(),Ul.translate(-Bh.x,-Bh.y),Ul.scale(Ms.scale,Ms.scale),Ul.rotate(Pc,Ih/2,sf/2),pl!==rg&&pl!==og||Ul.rotate(90,Ih/2,sf/2),pl!==ig&&pl!==ag||Ul.rotate(-90,Ih/2,sf/2),pl===$m&&(45<ru&&135>ru||225<ru&&315>ru)&&Ul.rotate(-ru,Ih/2,sf/2);var Jf=$t.allocAt(0,0,Ih,sf),Rh=st.alloc();Rh.xi(Jf,Fh),Ul.Ga(Rh);var Qf=-Rh.x,Hy=-Rh.y,eh=st.alloc();eh.assign(op),isNaN(eh.x)&&(eh.x=Ih/2+3),isNaN(eh.y)&&(eh.y=-(sf/2+3)),eh.rotate(ru),Og+=eh.x+Qf,ap+=eh.y+Hy;var lf=new $t(Og,ap,Bh.width,Bh.height),Fg=new $t(Bh.x,Bh.y,Bh.width,Bh.height),Wy=new $t(qu.x,qu.y,qu.width,qu.height);Tu.Sz=af,Tu.lineCount=Ms.lineCount,Tu.lines=[Ms.Cb,Ms.Ih,Ms.df,Ms.Le,Ms.Qc,Ms.Qb,Ms.ze],Tu.actualBounds=lf,Tu.measuredBounds=Fg,Tu.naturalBounds=Wy,Dh===0?bc.assign(lf):bc.ed(lf),st.free(eh),st.free(Rh),$t.free(Jf),jr.free(Ul)}dl.graduatedBounds!==null&&dl.graduatedBounds.push(bc),xi(Wv,bc.x,bc.y,bc.width,bc.height)}Bo(No,!1)}}},Kp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var ee=a.graduatedBounds,ne=0,ae=ee[ne];ne++,b!==null&&b.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height);for(var ue=y.length,ge=0;ge<ue;ge++){var ye=y[ge];ae=E[ge],ye.visible&&ye!==b&&ae.length!==0&&(ae=ee[ne],ne++,ye.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height))}a.graduatedBounds=null}}},Kp.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,ee=E.width,ne=E.height;E=y instanceof Ps,y.save(),y.beginPath(),y.rect(-1,-1,ee+1,ne+1),y.clip(),y.Se(),ee=a.Pb(),ee.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var ae=ee.actualBounds,ue=a.O.s,ge=a.graduatedMarks,ye=ue.length,Le=0;Le<ye;Le++){var ze=ue[Le],Ke=ge[Le],Je=Ke.length;if(ze.visible&&ze!==ee&&Ke.length!==0){if(ze instanceof Ur){if(!(2>a.graduatedTickUnit*ze.interval*ee.geometry.flattenedTotalLength/a.graduatedRange*ne&&ze.graduatedSkip===null)){var it=ze.measuredBounds,Tt=ze.strokeWidth*ze.scale,Pt=ze.alignmentFocus;Pt.Mc()&&(Pt=co);for(var Nt=0;Nt<Je;Nt++){var At=Ke[Nt].$l,Bt=Ke[Nt].angle,Rt=Pt,Zt=ze.Ab;Zt.reset(),Zt.translate(At.x+ae.x,At.y+ae.y),Zt.rotate(Bt+ze.angle,0,0),Zt.translate(-it.width*Rt.x+Rt.offsetX+Tt/2,-it.height*Rt.y+Rt.offsetY+Tt/2),Zt.scale(ze.scale,ze.scale),sl(ze,!1),ze.wh.set(ze.Ab),ze.Kk=ze.scale,Zs(ze,!1),ze.gc(y,x),E&&(a.svg.appendChild(ze.svg),ze.svg=null),ze.Ab.reset()}}}else if(ze instanceof Zi)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Zi),it=a.temporaryTextBlock,S1(it,ze),Tt=0;Tt<Je;Tt++)Pt=Ke[Tt],Pt.actualBounds&&Pt.measuredBounds&&Pt.naturalBounds&&(it.ec=Pt.text||"",it.Kb=Pt.Sz||0,it.Gc=Pt.lineCount||0,Nt=Pt.lines,Nt!==void 0&&(it.Cb=Nt[0],it.Ih=Nt[1],it.df=Nt[2],it.Le=Nt[3],it.Qc=Nt[4],it.Qb=Nt[5],it.ze=Nt[6]),Pt.naturalBounds&&(it.dc=Pt.naturalBounds),Pt.actualBounds&&(Nt=Pt.actualBounds,it.arrange(Nt.x,Nt.y,Nt.width,Nt.height)),Nt=Pt.actualBounds,it.arrange(Nt.x,Nt.y,Nt.width,Nt.height),At=Pt.measuredBounds,Pt=Pt.naturalBounds,Bt=it.Ab,Bt.reset(),Bt.translate(Nt.x+ae.x,Nt.y+ae.y),Bt.translate(-At.x,-At.y),it.no(Bt,Pt.x,Pt.y,Pt.width,Pt.height),sl(it,!1),it.wh.set(it.Ab),it.Kk=it.scale,Zs(it,!1),it.Ng=ze.part,it.Me=ze.panel,it.gc(y,x),it.Me=null,it.Ng=null,E&&(a.svg.appendChild(it.svg),it.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function bn(a,y){if(_t.call(this),this.na=null,a===void 0)this.na=bn.Position;else if(typeof a=="string"){var x=xl.I(a);x!==null&&(this.na=x)}else a instanceof Go?this.na=a:a&&(this.na=bn.Position,y=a);this.na===null&&jt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===bn.Grid?1048576:0),this.O=new rn,this.yb=Qo,this.Tm=Vo,this.Uf=Ir,this.$g=null,this.$e="",this.jg=new $t(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=ur,this.jn=ui,this.kn=Bn,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Wt(bn,_t),bn.prototype.cloneProtected=function(a){_t.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},bn.prototype.Af=function(a){_t.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,b=0;b<x;b++)y[b].Me=a;a.$g=null},bn.prototype.copy=function(){var a=_t.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].copy();E.wi(a),E.Ng=null;var ee=a.O,ne=ee.count;if(ee.Gb(ne,E),ee=a.part,ee!==null){ee.Rh=null,E.portId!==null&&ee instanceof _n&&(ee.Te=!0);var ae=a.diagram;ae!==null&&ae.undoManager.isUndoingRedoing||ee.cb(bo,"elements",a,null,E,null,ne)}}return a}return null},Qe=bn.prototype,Qe.toString=function(){return"Panel("+this.type.name+")#"+zr(this)},Qe.Pn=function(a){_t.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},Qe.hh=function(a,y){if(this.na===bn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===bn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===bn.Table)if(a.yc(),a instanceof Ps){var x=a.yd;a.yd=um(a,"gojs-ts"),g0(this,a),a.nh.pop(),a.yd=x}else g0(this,a);(x=this.isClipping&&this.na===bn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,ee=E.length,ne=0;ne<ee;ne++){var ae=E[ne];x&&ae===b&&(a.clipInsteadOfFill=!0),ae.gc(a,y),x&&ae===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function g0(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Pm(a,y,!0,x,!0),b!==null&&Pm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&Pm(a,y,!0,x,!1),b!==null&&Pm(a,y,!1,b,!1)}function o1(a,y,x,b){for(var E=b.length,ee=a.actualBounds,ne=a.naturalBounds,ae=!0,ue=0;ue<E;ue++){var ge=b[ue];if(ge!==void 0&&ge.actual!==0)if(ae)ae=!1;else{if(x){if(ge.position>ne.height)continue}else if(ge.position>ne.width)continue;var ye=ge.separatorStrokeWidth;isNaN(ye)&&(ye=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Le=ge.separatorStroke;if(Le===null&&(Le=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ye!==0&&Le!==null){yo(a,y,Le,!1,!1,ne,ee),Le=!1;var ze=ge.separatorDashArray;ze===null&&(ze=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),ze!==null&&(Le=!0,y.js(ze,0)),y.beginPath(),ze=ge.position+ye,x?ze>ne.height&&(ye-=ze-ne.height):ze>ne.width&&(ye-=ze-ne.width),ge=ge.position+ye/2,y.lineWidth=ye,ye=a.yb,x?(ge+=ye.top,ze=ne.width-ye.right,y.moveTo(ye.left,ge),y.lineTo(ze,ge)):(ge+=ye.left,ze=ne.height-ye.bottom,y.moveTo(ge,ye.top),y.lineTo(ge,ze)),y.stroke(),y.Se(),Le&&y.fs()}}}}function Pm(a,y,x,b,E){for(var ee=b.length,ne=a.actualBounds,ae=a.naturalBounds,ue=a1(a,!0),ge=a1(a,!1),ye=0;ye<ee;ye++){var Le=b[ye];if(Le!==void 0&&Le.background!==null&&Le.coversSeparators!==E&&Le.actual!==0){var ze=x?ne.height:ne.width;if(!(Le.position>ze)){var Ke=Le.Wc(),Je=Le.separatorStrokeWidth;isNaN(Je)&&(Je=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var it=Le.separatorStroke;it===null&&(it=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(it===null||Le.index===(x?ue:ge))&&(Je=0),Ke-=Je,Je=Le.position+Je,Ke+=Le.actual,Je+Ke>ze&&(Ke=ze-Je),0>=Ke||(ze=a.yb,yo(a,y,Le.background,!0,!1,ae,ne),x?y.fillRect(ze.left,Je+ze.top,ne.width-(ze.left+ze.right),Ke):y.fillRect(Je+ze.left,ze.top,Ke,ne.height-(ze.top+ze.bottom)))}}}}function a1(a,y){for(var x=y?a.rowCount:a.columnCount,b=0;b<x;b++){var E=y?a.rowDefs[b]:a.colDefs[b];if(E!==void 0)return E.index}return 0}function m0(a){return a==="LineV"||a==="BarV"}Qe.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Qe.kk=function(a,y,x){if(!_t.prototype.kk.call(this,a,y,x))return!1;if(this.type===bn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,g0(this,a),a.yd=null;else if(this.na===bn.Grid||this.na===bn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var b=x.length,E=0;E<b;E++)x[E].gc(a,y);return!0},Qe.nk=function(){return!0},Qe.$o=function(a,y,x,b){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var E=0,ee=0,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var ae=y[ne].actualBounds;E=ne===0?ae.x:Math.min(ae.x,E),ee=ne===0?ae.y:Math.min(ae.y,ee)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-ee)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else _t.prototype.$o.call(this,a,y,x,b)},Qe.Sj=function(a,y,x,b,E){var ee=this.se(),ne=this.transform,ae=1/(ne.m11*ne.m22-ne.m12*ne.m21),ue=ne.m22*ae,ge=-ne.m12*ae,ye=-ne.m21*ae,Le=ne.m11*ae,ze=ae*(ne.m21*ne.dy-ne.m22*ne.dx),Ke=ae*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,Gt.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return ee=a*ue+y*ye+ze,ae=a*ge+y*Le+Ke,a=x*ue+b*ye+ze,ue=x*ge+b*Le+Ke,E.h(0,0),x=this.naturalBounds,ee=Gt.Ff(0,0,x.width,x.height,ee,ae,a,ue,E),E.transform(ne),ee;ee||(ue=1,ye=ge=0,Le=1,Ke=ze=0),ae=a*ue+y*ye+ze,a=a*ge+y*Le+Ke,ue=x*ue+b*ye+ze,x=x*ge+b*Le+Ke,E.h(ue,x),b=(ue-ae)*(ue-ae)+(x-a)*(x-a),ge=!1,Le=this.O.s,Ke=Le.length,ye=st.alloc(),ze=null,y=1/0;var Je=null,it=this.isClipping&&this.na===bn.Spot;it&&(Je=st.alloc(),ze=this.Pb(),(ge=ze.Sj(ae,a,ue,x,Je))&&(y=(ae-Je.x)*(ae-Je.x)+(a-Je.y)*(a-Je.y)));for(var Tt=0;Tt<Ke;Tt++){var Pt=Le[Tt];Pt.visible&&Pt!==ze&&Pt.Sj(ae,a,ue,x,ye)&&(ge=!0,Pt=(ae-ye.x)*(ae-ye.x)+(a-ye.y)*(a-ye.y),Pt<b&&(b=Pt,E.set(ye)))}return it&&(y>b&&E.set(Je),st.free(Je)),st.free(ye),ee&&E.transform(ne),ge},Qe.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();_t.prototype.Gj.call(this)},Qe.v=function(a){if(!Bs(this)){_t.prototype.v.call(this,a),a=null,(this.na===bn.Auto||this.na===bn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if((E===a||E.isPanelMain)&&E.v(!0),!E.desiredSize.w()){var ee=ls(E,!1);(E instanceof Ja||E instanceof bn||E instanceof Zi||ee!==mn)&&E.v(!0)}}}},Qe.Uj=function(){if(!Bs(this)){Bo(this,!0),pu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Qe.Uk=function(){if(!(this.l&2048)){sl(this,!0),Zs(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Qe.Wu=function(){Zs(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Qe.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var ee=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,b=ne.height),x=Math.max(x,ne.width),b=Math.max(b,ne.height);var ae=this.maxSize;isNaN(ee.width)||(a=Math.min(ee.width,ae.width)),isNaN(ee.height)||(y=Math.min(ee.height,ae.height)),a=Math.max(x,a),y=Math.max(b,y);var ue=this.yb;a=Math.max(a-ue.left-ue.right,0),y=Math.max(y-ue.top-ue.bottom,0);var ge=this.O.s;ge.length!==0&&this.na.measure(this,a,y,ge,E,x,b),a=E.width+ue.left+ue.right,ue=E.height+ue.top+ue.bottom,isFinite(ee.width)&&(a=ee.width),isFinite(ee.height)&&(ue=ee.height),a=Math.min(ae.width,a),ue=Math.min(ae.height,ue),a=Math.max(ne.width,a),ue=Math.max(ne.height,ue),a=Math.max(x,a),ue=Math.max(b,ue),yi(E,a,ue),yi(this.naturalBounds,a,ue),this.Ge(0,0,a,ue)},Qe.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 b=a[x];if(b.isPanelMain===!0)return this.$g=b}this.$g=a[0]}return this.$g};function Vu(a){return a.part!==null?a.part.locationObject:null}Qe.eh=function(a,y,x,b){var E=this.O.s;if(this.actualBounds.h(a,y,x,b),E.length!==0){if(!this.desiredSize.w()){a=ls(this,!0);var ee=this.measuredBounds;y=ee.width,ee=ee.height;var ne=this.Kg,ae=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&ee===b&&(a=mn),a){case mn:(y>x||ee>b)&&(this.v(),this.measure(y>x?x:y,ee>b?b:ee,0,0));break;case xn:this.v(!0),this.measure(x+ae,b+ne,0,0);break;case gr:this.v(!0),this.measure(x+ae,ee+ne,0,0);break;case Cr:this.v(!0),this.measure(y+ae,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},Qe.gh=function(a){var y=this.naturalBounds,x=Vu(this);if(qi(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=st.allocAt(0,0);b--;){var ee=y[b];if((ee.visible||ee===x)&&(Wn(E.set(a),ee.transform),ee.ca(E)))return st.free(E),!0}return st.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},Qe.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].ks(a);if(E!==null)return E}return null},Qe.qm=function(a,y){if(y(this,a),a instanceof bn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Zc(a,y){s1(a,a,y)}function s1(a,y,x){x(y),y=y.O.s;for(var b=y.length,E=0;E<b;E++){var ee=y[E];ee instanceof bn&&s1(a,ee,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof bn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}Qe.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof bn){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var ee=u1(a,y[E],x);if(ee!==null)return ee}}return null}Qe.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Vp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof bn){var ee=E.fb(a);if(ee!==null)return ee}if(E.name===a)return E}return null};function h1(a){a=a.O.s;for(var y=a.length,x=0,b=0;b<y;b++){var E=a[b];E instanceof bn?x=Math.max(x,h1(E)):E instanceof Ur&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}Qe.se=function(){return!(this.type===bn.TableRow||this.type===bn.TableColumn)};function xh(a){return a.type===bn.TableRow||a.type===bn.TableColumn}Qe.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Xa(this)))return null;var b=this.naturalBounds,E=1/this.Df(),ee=this.se(),ne=ee?a:Wn(st.allocAt(a.x,a.y),this.transform),ae=this.diagram,ue=10,ge=5;if(ae!==null&&(ue=ae.Ql("extraTouchArea"),ge=ue/2),qi(-(ge*E),-(ge*E),b.width+ue*E,b.height+ue*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var ye=E.length;if(ae=st.alloc(),ge=(ue=this.isClipping&&this.na===bn.Spot)?this.Pb():null,ue&&(ge.se()?Wn(ae.set(a),ge.transform):ae.set(a),!ge.ca(ae)))return st.free(ae),ee||st.free(ne),null;for(var Le=Vu(this);ye--;){var ze=E[ye];if((ze.visible||ze===Le)&&(ze.se()?Wn(ae.set(a),ze.transform):ae.set(a),!ue||ze!==ge)){var Ke=null;if(ze instanceof bn?Ke=ze.ic(ae,y,x):ze.pickable===!0&&ze.ca(ae)&&(Ke=ze),Ke!==null&&(y!==null&&(Ke=y(Ke)),Ke!==null&&(x===null||x(Ke))))return st.free(ae),ee||st.free(ne),Ke}}st.free(ae)}return this.background===null&&this.areaBackground===null?(ee||st.free(ne),null):(a=qi(0,0,b.width,b.height,ne.x,ne.y)?this:null,ee||st.free(ne),a)}return ee||st.free(ne),null},Qe.ji=function(a,y,x,b){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var E=this.naturalBounds,ee=this.se(),ne=ee?a:Wn(st.allocAt(a.x,a.y),this.transform);if(E=qi(0,0,E.width,E.height,ne.x,ne.y),xh(this)||E){if(!this.isAtomic){for(var ae=this.O.s,ue=ae.length,ge=st.alloc(),ye=Vu(this);ue--;){var Le=ae[ue];if(Le.visible||Le===ye){Le.se()?Wn(ge.set(a),Le.transform):ge.set(a);var ze=Le;Le=Le instanceof bn?Le:null,(Le!==null?Le.ji(ge,y,x,b):ze.ca(ge))&&ze.pickable!==!1&&(y!==null&&(ze=y(ze)),ze===null||x!==null&&!x(ze)||b.add(ze))}}st.free(ge)}return ee||st.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return ee||st.free(ne),!1},Qe.Cf=function(a,y,x,b,E,ee){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=ee;if(ee===void 0&&(ne=jr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return v0(this,y,x,E),ee===void 0&&jr.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var ae=Vu(this),ue=this.O.s,ge=ue.length;ge--;){var ye=ue[ge];if(ye.visible||ye===ae){var Le=ye.actualBounds,ze=this.naturalBounds;Le.x>ze.width||Le.y>ze.height||0>Le.x+Le.width||0>Le.y+Le.height||(Le=ye,ye=ye instanceof bn?ye:null,ze=jr.alloc(),ze.set(ne),(ye!==null?ye.Cf(a,y,x,b,E,ze):Xo(Le,a,b,ze))&&(y!==null&&(Le=y(Le)),Le===null||x!==null&&!x(Le)||E.add(Le)),jr.free(ze))}}return ee===void 0&&jr.free(ne),b}return ee===void 0&&jr.free(ne),!1};function v0(a,y,x,b){for(var E=a.O.s,ee=E.length;ee--;){var ne=E[ee];if(ne.visible){var ae=ne.actualBounds,ue=a.naturalBounds;ae.x>ue.width||ae.y>ue.height||0>ae.x+ae.width||0>ae.y+ae.height||(ne instanceof bn&&v0(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}Qe.og=function(a,y,x,b,E,ee){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var ne=this.naturalBounds,ae=this.se(),ue=ae?a:Wn(st.allocAt(a.x,a.y),this.transform),ge=ae?y:Wn(st.allocAt(y.x,y.y),this.transform),ye=ue.Bf(ge),Le=0<ue.x&&ue.x<ne.width&&0<ue.y&&ue.y<ne.height||Xn(ue.x,ue.y,0,0,0,ne.height)<=ye||Xn(ue.x,ue.y,0,ne.height,ne.width,ne.height)<=ye||Xn(ue.x,ue.y,ne.width,ne.height,ne.width,0)<=ye||Xn(ue.x,ue.y,ne.width,0,0,0)<=ye;if(ne=ue.zd(0,0)<=ye&&ue.zd(0,ne.height)<=ye&&ue.zd(ne.width,0)<=ye&&ue.zd(ne.width,ne.height)<=ye,ae||(st.free(ue),st.free(ge)),Le){if(!this.isAtomic){ue=st.alloc(),ge=st.alloc(),ye=Vu(this);for(var ze=this.O.s,Ke=ze.length;Ke--;){var Je=ze[Ke];if(Je.visible||Je===ye){var it=Je.actualBounds,Tt=this.naturalBounds;(!ae||!(it.x>Tt.width||it.y>Tt.height||0>it.x+it.width||0>it.y+it.height))&&(Je.se()?(it=Je.transform,Wn(ue.set(a),it),Wn(ge.set(y),it)):(ue.set(a),ge.set(y)),it=Je,Je=Je instanceof bn?Je:null,(Je!==null?Je.og(ue,ge,x,b,E,ee):it.tx(ue,ge,E))&&(x!==null&&(it=x(it)),it===null||b!==null&&!b(it)||ee.add(it)))}}st.free(ue),st.free(ge)}return E?Le:ne}return!1};function y0(a){var y=null;return a instanceof Ur&&(y=a.spot1,y===Vo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=ki),y}function S0(a){var y=null;return a instanceof Ur&&(y=a.spot2,y===Vo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=io),y}Qe.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},Qe.M=function(a){return this.O.M(a)},Qe.Gb=function(a,y){y instanceof Sr&&jt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&jt("Cannot make a Panel contain itself: "+this.toString()),jt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&jt("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!==bn.Grid||y instanceof Ur||jt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==bn.Graduated||y instanceof Ur||y instanceof Zi||jt("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var b=y.data;b!==null&&typeof b=="object"&&(this.ge===null&&(this.ge=new tn),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var ee=-1,ne=this.O.s,ae=ne.length,ue=0;ue<ae;ue++)if(ne[ue]===y){ee=ue;break}if(ee!==-1){if(ee===a||ee+1>=E.count&&a>=E.count)return;E.mb(ee),b=ee}else jt("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>E.count)&&(a=E.count),E.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),Bs(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof bn&&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 _n&&(x.Te=!0),x.Te&&x instanceof _n&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(Eo,"elements",this,y,null,b,null),x.cb(bo,"elements",this,null,y,null,a)))};function x0(a,y){a.l=y?a.l|16777216:a.l&-16777217}Qe.remove=function(a){for(var y=this.O.s,x=y.length,b=-1,E=0;E<x;E++)if(y[E]===a){b=E;break}b!==-1&&this.pc(b,!0)},Qe.mb=function(a){0<=a&&this.pc(a,!0)},Qe.pc=function(a,y){var x=this.O,b=x.M(a);if(b.Ng=null,b.wi(null),this.ge!==null){var E=b.data;typeof E=="object"&&this.ge.remove(E)}x.mb(a),Bo(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var ee=this.part;ee!==null&&(ee.Rh=null,ee.ag=NaN,ee.Wb(),ee instanceof _n&&(b instanceof bn?b.qm(b,function(ne,ae){H0(ee,ae,y)}):H0(ee,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||ee.cb(Eo,"elements",this,b,null,a,null))},Qe.Fb=function(a){0>a&&An(a,">= 0",bn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Io;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(bo,"rowdefs",this,null,x,null,a)}return y[a]},Qe.oA=function(a){if(0>a&&An(a,">= 0",bn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Eo,"rowdefs",this,x,null,a,null),this.v()}}};function c1(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof Io?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Qe.Eb=function(a){0>a&&An(a,">= 0",bn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Io;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(bo,"coldefs",this,null,x,null,a)}return y[a]},Qe.jA=function(a){if(0>a&&An(a,">= 0",bn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Eo,"coldefs",this,x,null,a,null),this.v()}}};function f1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof Io?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Qe.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&km(y,a),this},Qe.Hy=function(a,y){return(a=this.Fb(a))&&km(a,new Io(y)),this},Qe.By=function(a,y){return(a=this.Eb(a))&&km(a,new Io(y)),this},Qe.nz=function(a){if(0>a||this.type!==bn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var ee=x[E];if(ee!==void 0&&(y+=ee.total,a<y))break}return E},Qe.fz=function(a){if(0>a||this.type!==bn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var ee=x[E];if(ee!==void 0&&(y+=ee.total,a<y))break}return E},Qe.Fz=function(a,y){if(y===void 0&&(y=new st(NaN,NaN)),this.type!==bn.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)},Qe.Gz=function(a){if(this.type!==bn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function d1(a){return a=a.allBindings,a!==null&&a._isFrozen}function ul(a){var y=a.allBindings;if(y===null)a.data!==null&&jt("Template cannot have .data be non-null: "+a),a.allBindings=y=new rn;else if(y._isFrozen)return;var x=new rn;x0(a,!1),a.qm(a,function(ge,ye){ye.th();var Le=ye.localBindings;if(Le!==null)for(Af(ye,!1),Le=Le.iterator;Le.next();){var ze=Le.value;ze.mode===pg&&Af(ye,!0);var Ke=ze.sourceName;Ke!==null&&(Ke==="/"&&x0(ge,!0),Ke=TS(ze,ge,ye),Ke!==null&&(x.add(Ke),Ke.srcBindings===null&&(Ke.srcBindings=new rn),Ke.srcBindings.add(ze))),y.add(ze)}if(ye instanceof bn&&ye.type===bn.Table){if(0<ye.rowCount){for(ge=ye.rowDefs,Le=ge.length,ze=0;ze<Le;ze++)if(Ke=ge[ze],Ke!==void 0&&Ke.be!==null)for(var Je=Ke.be.iterator;Je.next();){var it=Je.value;it.xd=Ke,it.to=2,it.wl=Ke.index,y.add(it)}}if(0<ye.columnCount){for(ye=ye.colDefs,ge=ye.length,Le=0;Le<ge;Le++)if(ze=ye[Le],ze!==void 0&&ze.be!==null)for(Ke=ze.be.iterator;Ke.next();)Je=Ke.value,Je.xd=ze,Je.to=1,Je.wl=ze.index,y.add(Je)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Af(E,!0);for(var ee=E.srcBindings.iterator;ee.next();){var ne=ee.value;E.localBindings===null&&(E.localBindings=new rn),E.localBindings.add(ne)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,ee=E.xd,ee!==null){E.xd=null;var ae=E.targetProperty,ue=ae.indexOf(".");0<ue&&ee instanceof bn&&(ne=ae.substring(0,ue),ae=ae.substr(ue+1),ue=ee.fb(ne),ue!==null?(ee=ue,E.targetProperty=ae):Yn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),ee instanceof Io?(ne=zr(ee.panel),E.Ai=ne===void 0?-1:ne,ee.panel.bindingId=E.Ai):ee instanceof _t?(ne=zr(ee),E.Ai=ne===void 0?-1:ne,ee.bindingId=E.Ai):jt("Unknown type of binding target: "+ee)}y.freeze(),a instanceof Sr&&a.Zc()&&a.Va()}Qe.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof bn&&(x.allBindings=null,x.ub=null);var b=x.localBindings;b!==null&&(x.localBindings=null,b.each(function(E){x.bind(E.copy())})),b=x.animationTriggers,b!==null&&(x.animationTriggers=null,b.each(function(E){x.Jv(E.value.copy())}))}),a&&ul(y),y},Qe.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,b=x.sourceProperty;if((a===""||b===""||b===a)&&(b=x.targetProperty,x.converter!==null||b!=="")){b=this.data;var E=x.sourceName;if(E!==null){if(E==="")b=this;else if(E==="/")b=this;else if(E===".")b=this;else if(E==="..")b=this;else if(b=this.fb(E),b===null)continue}else if(x.isToModel)if(b=this.diagram,b!==null)b=b.model.modelData;else continue;var ee=this,ne=x.Ai;if(ne!==-1){if(ee=this.ks(ne),ee===null)continue}else x.xd!==null&&(ee=x.xd);if(E==="/"?b=ee.part:E==="."?b=ee:E===".."&&(b=ee.panel),E=x.to,E!==0){if(!(ee instanceof bn))continue;E===1?ee=ee.Eb(x.wl):E===2&&(ee=ee.Fb(x.wl))}ee!==void 0&&x.Mv(ee,b)}}},Qe.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Sx(a,y){a=a.O.s;for(var x=a.length,b=y.length,E=0,ee=null;E<x&&(ee=a[E],!(ee instanceof bn&&ee.data!==null));)E++,ee=a[E];if(x-E!==b)return!0;if(ee===null)return 0<b;for(var ne=0;E<x&&ne<b;){if(ee=a[E],!(ee instanceof bn)||ee.data!==y[ne])return!0;E++,ne++}return!1}function Vp(a){if(a.type===bn.Spot||a.type===bn.Auto)return Math.min(a.O.length,1);if(a.type===bn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof Ur&&b.isPanelMain))break}return x}return a.type===bn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof bn&&xh(a))?1:0}Qe.mv=function(){for(var a=Vp(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=Vp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var b=0;b<x;b++)Cm(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var ee=y[E],ne=b<a.O.length?a.O.M(b):null;if(ne instanceof bn){if(ne.data!==ee){var ae=b0(a,ne.data),ue=b0(a,ee),ge=ue!==ae;ge||(ae=P0(a,ae),ge=P0(a,ue)!==ae),ge?(a.pc(b,!1),Cm(a,ee,E,!1)):ne.data=ee}}else Cm(a,ee,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,w0(a,x,0),Bs(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 _n&&(y.Te=!0),y.Te&&y instanceof _n&&(y.wc=null))}}function Cm(a,y,x,b){if(!(y==null||0>x)){var E=b0(a,y);if(E=P0(a,E),E!==null){if(ul(E),E=E.copy(),E.l&16777216){var ee=a.ih();ee!==null&&x0(ee,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new tn),a.ge.add(y,E)),ee=x+Vp(a),a.Gb(ee,E),b&&(E.ub=y,w0(a,ee,x),E.ub=null),E.data=y}}}function w0(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof bn){var E=y,ee=x;b.type===bn.TableRow?b.row=E:b.type===bn.TableColumn&&(b.column=E),b.itemIndex=ee}y++,x++}}function b0(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=Po(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;jt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function P0(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(g1||(g1=!0,Yn('No item template Panel found for category "'+y+'" on '+a),Yn(" Using default item template."),a=new bn,y=new Zi,y.bind(new Lo("text","",Fr)),a.add(y),m1=a),b=m1)),b}function Em(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof bn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var ee=y[E];x&&ee instanceof bn&&!ee.isEnabled||Em(a,ee,x)}}}function $l(a,y){y.name=a,xl.add(a,y)}zt.Object.defineProperties(bn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===bn.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&&An(a,">= 0",bn,"padding"),a=new Gr(a)):(0>a.left&&An(a.left,">= 0",bn,"padding:value.left"),0>a.right&&An(a.right,">= 0",bn,"padding:value.right"),0>a.top&&An(a.top,">= 0",bn,"padding:value.top"),0>a.bottom&&An(a.bottom,">= 0",bn,"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:Qo},set:function(a){typeof a=="number"&&(a=new Gr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Js),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 Ni)&&(a instanceof Ni&&a.freeze(),this.T===null&&(this.T=new Js),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 Js),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var ee=a[E];typeof ee=="number"&&0<=ee&&isFinite(ee)||jt("defaultRowSeparatorDashArray value "+ee+" at index "+E+" must be a positive number or zero."),b+=ee}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Js),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 Ni)&&(a instanceof Ni&&a.freeze(),this.T===null&&(this.T=new Js),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 Js),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,b=0,E=0;E<x;E++){var ee=a[E];typeof ee=="number"&&0<=ee&&isFinite(ee)||jt("defaultColumnSeparatorDashArray value "+ee+" at index "+E+" must be a positive number or zero."),b+=ee}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Js),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 Js),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||jt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Yl(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()||jt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Yl(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 Zu),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),pa(this)&&(a=this.part,a!==null&&$i(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 Zu),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),pa(this)&&(a=this.part,a!==null&&$i(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 Zu),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 Zu),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 Zu,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 Zu,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 Zu,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 Zu,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 Js),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Js),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Lm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Js),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Lm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Js),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)&&jt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Js),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)&&jt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Js),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 Sr&&!(this instanceof gi);ul(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Tn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Sr&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),b!==null&&b.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new jf),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Sx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&uy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&ly(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||p1(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 tn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Sr||a.isPanelMain)&&jt("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(););Kr(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&&(Kr(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 Br&&(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))}}}),zt.Object.defineProperties(bn,{Position:{get:function(){return xl.I("Position")}},Horizontal:{get:function(){return xl.I("Horizontal")}},Vertical:{get:function(){return xl.I("Vertical")}},Spot:{get:function(){return xl.I("Spot")}},Auto:{get:function(){return xl.I("Auto")}},Table:{get:function(){return xl.I("Table")}},Viewbox:{get:function(){return xl.I("Viewbox")}},TableRow:{get:function(){return xl.I("TableRow")}},TableColumn:{get:function(){return xl.I("TableColumn")}},Link:{get:function(){return xl.I("Link")}},Grid:{get:function(){return xl.I("Grid")}},Graduated:{get:function(){return xl.I("Graduated")}}}),bn.prototype.rebuildItemElements=bn.prototype.mv,bn.prototype.findItemPanelForData=bn.prototype.sx,bn.prototype.updateTargetBindings=bn.prototype.La,bn.prototype.copyTemplate=bn.prototype.Uy,bn.prototype.graduatedValueForPoint=bn.prototype.Gz,bn.prototype.graduatedPointForValue=bn.prototype.Fz,bn.prototype.findColumnForLocalX=bn.prototype.fz,bn.prototype.findRowForLocalY=bn.prototype.nz,bn.prototype.addColumnDefinition=bn.prototype.By,bn.prototype.addRowDefinition=bn.prototype.Hy,bn.prototype.addRowColumnDefinition=bn.prototype.Gy,bn.prototype.removeColumnDefinition=bn.prototype.jA,bn.prototype.getColumnDefinition=bn.prototype.Eb,bn.prototype.removeRowDefinition=bn.prototype.oA,bn.prototype.getRowDefinition=bn.prototype.Fb,bn.prototype.removeAt=bn.prototype.mb,bn.prototype.remove=bn.prototype.remove,bn.prototype.insertAt=bn.prototype.Gb,bn.prototype.elt=bn.prototype.M,bn.prototype.add=bn.prototype.add,bn.prototype.findObject=bn.prototype.fb,bn.prototype.findInVisualTree=bn.prototype.Nl,bn.prototype.walkVisualTreeFrom=bn.prototype.qm,bn.prototype.findMainElement=bn.prototype.Pb;var g1=!1,m1=null,xl=new tn;bn.className="Panel",bn.definePanelLayout=$l,$l("Position",new fm),$l("Vertical",new pm),$l("Auto",new mm),$l("Link",new bm);function Zu(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Zu.prototype.copy=function(){var a=new Zu;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},Zu.className="GradPanelSettings";function Js(){this.Pc=[],this.Oc=[],this.j=this.ob=Lm,this.hb=this.Hb=0,this.Qp=Qo,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Js.prototype.copy=function(a){for(var y=new Js,x=this.Pc,b=x.length,E=y.Pc,ee=0;ee<b;ee++)if(x[ee]!==void 0){var ne=x[ee].copy();ne.wi(a),E[ee]=ne}for(x=this.Oc,b=x.length,E=y.Oc,ee=0;ee<b;ee++)x[ee]!==void 0&&(ne=x[ee].copy(),ne.wi(a),E[ee]=ne);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},Js.className="TablePanelSettings";function Io(a){hr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Vo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=C0,this.hg=Ir,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))}Io.prototype.copy=function(){var a=new Io;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=Hn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function km(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=Hn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Qe=Io.prototype,Qe.qb=function(a){a.classType===Io&&(this.sizing=a)},Qe.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+zr(this)},Qe.wi=function(a){this.Me=a},Qe.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)},Qe.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===bn.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,ee=0;ee<E;ee++){var ne=b?y.rowDefs[ee]:y.colDefs[ee];if(ne!==void 0&&ne.oa!==0){x=ne.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=b?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=b?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),b=this.dg,b===null)if(y!==null)b=y.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top+b.bottom:b.left+b.right)},Qe.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(no,a,this,y,x,void 0,void 0),this.be!==null&&(y=b.diagram,y!==null&&!y.skipsModelSourceBindings&&(b=b.ih(),b!==null&&(y=b.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,b)};function Tm(a){if(a.sizing===C0){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Qe.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Lo(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&jt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new rn),this.be.add(E),this},zt.Object.defineProperties(Io.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&&An(a,">= 0",Io,"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&&An(a,">= 0",Io,"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))&&An(a,">= 0",Io,"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&&An(a,">= 0",Io,"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 Gr(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&&Ff(a,"RowColumnDefinition.separatorStroke"),a instanceof Ni&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var ee=a[E];typeof ee=="number"&&0<=ee&&isFinite(ee)||jt("separatorDashArray value "+ee+" at index "+E+" must be a positive number or zero."),b+=ee}if(b===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&&Ff(a,"RowColumnDefinition.background"),a instanceof Ni&&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}}}),Io.prototype.computeEffectiveSpacing=Io.prototype.Wc,Io.prototype.computeEffectiveSpacingTop=Io.prototype.Io;var C0=new an(Io,"Default",0),Zp=new an(Io,"None",1),Lm=new an(Io,"ProportionalExtra",2);Io.className="RowColumnDefinition",Io.Default=C0,Io.None=Zp,Io.ProportionalExtra=Lm;function Ur(a,y){_t.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)}Wt(Ur,_t),Ur.prototype.cloneProtected=function(a){_t.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=Hn(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 Xc(a){a.Na===null?a.Na=new T0:a.Na.nc&&(a.Na=a.Na.copy())}Qe=Ur.prototype,Qe.th=function(){_t.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Qe.qb=function(a){a===mn||a===ur||a===ni||a===Ir?this.geometryStretch=a:_t.prototype.qb.call(this,a)},Qe.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+zr(this)};function Nd(a,y,x,b){var E=x.length;if(!(4>E)){var ee=b.measuredBounds,ne=Math.max(1,ee.width);ee=ee.height;for(var ae=x[0],ue=x[1],ge,ye,Le,ze,Ke,Je,it=0,Tt=ir(),Pt=2;Pt<E;Pt+=2)ge=x[Pt],ye=x[Pt+1],Le=ge-ae,ae=ye-ue,Le===0&&(Le=.001),ze=ae/Le,Ke=Math.atan2(ae,Le),Je=Math.sqrt(Le*Le+ae*ae),Tt.push([Le,Ke,ze,Je]),it+=Je,ae=ge,ue=ye;ae=x[0],ue=x[1],Le=b.measuredBounds.width,b instanceof Ur&&(Le-=b.strokeWidth),1>Le&&(Le=1),E=x=Le,ge=ne/2,ye=ge!==0,Pt=0,Je=Tt[Pt],Le=Je[0],Ke=Je[1],ze=Je[2],Je=Je[3];for(var Nt=0;.1<=it;){if(Nt===0&&(ye?(E=x,E-=ge,it-=ge,ye=!1):E=x,E===0&&(E=1)),E>it){Un(Tt);return}E>Je?(Nt=E-Je,E=Je):Nt=0;var At=Math.sqrt(E*E/(1+ze*ze));if(0>Le&&(At=-At),ae+=At,ue+=ze*At,a.translate(ae,ue),a.rotate(Ke),a.translate(-(ne/2),-(ee/2)),Nt===0&&b.hh(a,y),a.translate(ne/2,ee/2),a.rotate(-Ke),a.translate(-ae,-ue),it-=E,Je-=E,Nt!==0){if(Pt++,Pt===Tt.length){Un(Tt);return}Je=Tt[Pt],Le=Je[0],Ke=Je[1],ze=Je[2],Je=Je[3],E=Nt}}Un(Tt)}}Qe.hh=function(a,y){var x=this.xc,b=this.Ui;if(x!==null||b!==null){var E=this.ua;if(E!==null){a.yc();var ee=this.actualBounds,ne=this.naturalBounds;b!==null&&yo(this,a,b,!0,!1,ne,ee);var ae=this.part,ue=this.ig;if(x===null||ue!==0||ae===null||!this.isPanelMain&&ae.Pb()!==this||(ue=ae.type===bn.Link&&ae instanceof gi&&ae.category==="Selection"&&ae.adornedObject instanceof Ur&&ae.adornedPart.Pb()===ae.adornedObject?ae.adornedObject.strokeWidth:0),ue===0&&(x=null),x!==null&&ue!==0&&(yo(this,a,x,!1,!1,ne,ee),a.lineWidth=ue,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),ee=!1,ae&&y.Gf("drawShadows")&&(ee=ae.isShadowed),a.Il===!1&&(ee=!1),ae=!0,x===null||b!==null&&b!=="transparent"||(ae=!1),ne=!1,ue=this.strokeDashArray,ue!==null&&(ne=!0,a.js(ue,this.strokeDashOffset)),E.type===Ln.j)a.beginPath(),a.moveTo(E.startX,E.startY),a.lineTo(E.endX,E.endY),x!==null&&a.jk(),a.Se();else if(E.type===Ln.u){var ge=E.startX;ue=E.startY;var ye=E.endX,Le=E.endY;E=Math.min(ge,ye);var ze=Math.min(ue,Le);ge=Math.abs(ye-ge),ue=Math.abs(Le-ue),a.beginPath(),a.rect(E,ze,ge,ue),b!==null&&a.ng(b),x!==null&&(ae&&ee&&gu(a),a.jk(),ae&&ee&&Hu(a)),a.Se()}else if(E.type===Ln.F)ge=E.startX,ue=E.startY,ye=E.endX,Le=E.endY,E=Math.abs(ye-ge)/2,ze=Math.abs(Le-ue)/2,ge=Math.min(ge,ye)+E,ue=Math.min(ue,Le)+ze,a.beginPath(),a.moveTo(ge,ue-ze),a.bezierCurveTo(ge+Gt.wg*E,ue-ze,ge+E,ue-Gt.wg*ze,ge+E,ue),a.bezierCurveTo(ge+E,ue+Gt.wg*ze,ge+Gt.wg*E,ue+ze,ge,ue+ze),a.bezierCurveTo(ge-Gt.wg*E,ue+ze,ge-E,ue+Gt.wg*ze,ge-E,ue),a.bezierCurveTo(ge-E,ue-Gt.wg*ze,ge-Gt.wg*E,ue-ze,ge,ue-ze),a.closePath(),b!==null&&a.ng(b),x!==null&&(ae&&ee&&gu(a),a.jk(),ae&&ee&&Hu(a)),a.Se();else if(E.type===Ln.o)for(E=E.figures,ue=E.length,ze=0;ze<ue;ze++){ge=E.s[ze],a.beginPath(),a.moveTo(ge.startX,ge.startY),ye=ge.segments.s,Le=ye.length;for(var Ke=null,Je=0;Je<Le;Je++){var it=ye[Je];switch(it.type){case Fo:a.moveTo(it.endX,it.endY);break;case Ui:a.lineTo(it.endX,it.endY);break;case _o:a.bezierCurveTo(it.point1X,it.point1Y,it.point2X,it.point2Y,it.endX,it.endY);break;case ds:a.quadraticCurveTo(it.point1X,it.point1Y,it.endX,it.endY);break;case wo:if(it.radiusX===it.radiusY){var Tt=Math.PI/180;a.arc(it.point1X,it.point1Y,it.radiusX,it.startAngle*Tt,(it.startAngle+it.sweepAngle)*Tt,0>it.sweepAngle,Ke!==null?Ke.endX:ge.startX,Ke!==null?Ke.endY:ge.startY)}else if(Ke=Ga(it,ge),Tt=Ke.length,Tt===0)a.lineTo(it.centerX,it.centerY);else for(var Pt=0;Pt<Tt;Pt++){var Nt=Ke[Pt];Pt===0&&a.lineTo(Nt[0],Nt[1]),a.bezierCurveTo(Nt[2],Nt[3],Nt[4],Nt[5],Nt[6],Nt[7])}break;case ws:if(Pt=Tt=0,Ke!==null&&Ke.type===wo){if(Ke=Ga(Ke,ge),Nt=Ke.length,Nt===0){a.lineTo(it.endX,it.endY);break}Ke=Ke[Nt-1]||null,Ke!==null&&(Tt=Ke[6],Pt=Ke[7])}else Tt=Ke!==null?Ke.endX:ge.startX,Pt=Ke!==null?Ke.endY:ge.startY;if(Ke=js(it,ge,Tt,Pt),Tt=Ke.length,Tt===0){a.lineTo(it.endX,it.endY);break}for(Pt=0;Pt<Tt;Pt++)Nt=Ke[Pt],a.bezierCurveTo(Nt[2],Nt[3],Nt[4],Nt[5],Nt[6],Nt[7]);break;default:jt("Segment not of valid type: "+it.type)}it.isClosed&&a.closePath(),Ke=it}ye=ge.isFilled,ee?ge.isShadowed?(ye===!0&&b!=="transparent"&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&(ye&&ae&&gu(a),a.jk(),ye&&ae&&Hu(a))):(gu(a),ye&&b!=="transparent"&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&a.jk(),Hu(a)):(ye&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&a.jk()),a.Se(ze)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),b=x.measuredBounds,x.arrange(0,0,b.width,b.height),ee=this.geometry,a.save(),a.beginPath(),b=ir(),ee.type===Ln.j)b.push(ee.startX),b.push(ee.startY),b.push(ee.endX),b.push(ee.endY),Nd(a,y,b,x);else if(ee.type===Ln.o)for(ee=ee.figures.iterator;ee.next();){for(ae=ee.value,b.length=0,b.push(ae.startX),b.push(ae.startY),ne=ae.startX,E=ae.startY,ue=ne,ze=E,ge=ae.segments.s,ye=ge.length,Le=0;Le<ye;Le++){switch(Je=ge[Le],Je.type){case Fo:Nd(a,y,b,x),b.length=0,b.push(Je.endX),b.push(Je.endY),ne=Je.endX,E=Je.endY,ue=ne,ze=E;break;case Ui:b.push(Je.endX),b.push(Je.endY),ne=Je.endX,E=Je.endY;break;case _o:Gt.Qe(ne,E,Je.point1X,Je.point1Y,Je.point2X,Je.point2Y,Je.endX,Je.endY,.5,b),ne=Je.endX,E=Je.endY;break;case ds:Gt.ep(ne,E,Je.point1X,Je.point1Y,Je.endX,Je.endY,.5,b),ne=Je.endX,E=Je.endY;break;case wo:if(it=Ga(Je,ae),Ke=it.length,Ke===0){b.push(Je.centerX),b.push(Je.centerY),ne=Je.centerX,E=Je.centerY;break}for(Tt=0;Tt<Ke;Tt++)Pt=it[Tt],Gt.Qe(ne,E,Pt[2],Pt[3],Pt[4],Pt[5],Pt[6],Pt[7],.5,b),ne=Pt[6],E=Pt[7];break;case ws:if(it=js(Je,ae,ne,E),Ke=it.length,Ke===0){b.push(Je.endX),b.push(Je.endY),ne=Je.endX,E=Je.endY;break}for(Tt=0;Tt<Ke;Tt++)Pt=it[Tt],Gt.Qe(ne,E,Pt[2],Pt[3],Pt[4],Pt[5],Pt[6],Pt[7],.5,b),ne=Pt[6],E=Pt[7];break;default:jt("Segment not of valid type: "+Je.type)}Je.isClosed&&(b.push(ue),b.push(ze),Nd(a,y,b,x))}Nd(a,y,b,x)}else if(ee.type===Ln.u)b.push(ee.startX),b.push(ee.startY),b.push(ee.endX),b.push(ee.startY),b.push(ee.endX),b.push(ee.endY),b.push(ee.startX),b.push(ee.endY),b.push(ee.startX),b.push(ee.startY),Nd(a,y,b,x);else if(ee.type===Ln.F){if(E=new Oo,E.startX=ee.endX,E.startY=(ee.startY+ee.endY)/2,ne=new pi(wo),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(ee.startX+ee.endX)/2,ne.centerY=(ee.startY+ee.endY)/2,ne.radiusX=Math.abs(ee.startX-ee.endX)/2,ne.radiusY=Math.abs(ee.startY-ee.endY)/2,E.add(ne),ee=Ga(ne,E),ae=ee.length,ae===0)b.push(ne.centerX),b.push(ne.centerY);else for(ne=E.startX,E=E.startY,ue=0;ue<ae;ue++)ze=ee[ue],Gt.Qe(ne,E,ze[2],ze[3],ze[4],ze[5],ze[6],ze[7],.5,b),ne=ze[6],E=ze[7];Nd(a,y,b,x)}Un(b),a.restore(),a.Vc(!1)}}}},Qe.kk=function(a,y,x){return!_t.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)},Qe.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:_t.prototype.nk.call(this,a)},Qe.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)}},Qe.ga=function(a,y){if(y===void 0&&(y=new st),a instanceof Mn){a.Mc()&&jt("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,b=this.strokeWidth;y.h(a.x*(x.width+b)-b/2+x.x+a.offsetX,a.y*(x.height+b)-b/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Qe.mi=function(a){a===void 0&&(a=new $t);var y=this.naturalBounds,x=this.oe;y=$t.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=st.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),xi(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),xi(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),xi(a,b.x,b.y,0,0),$t.free(y),st.free(b),a},Qe.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var b=x.bounds,E=this.strokeWidth/2;x.type!==Ln.j||y||(E+=2);var ee=$t.alloc();if(ee.assign(b),ee.Bc(E+2,E+2),!ee.ca(a))return $t.free(ee),!1;if(b=E+1e-4,x.type===Ln.j)return this.stroke===null||(b=(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>b)?!1:($t.free(ee),Gt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Ln.u){y=x.startX;var ne=x.startY,ae=x.endX;if(x=x.endY,ee.x=Math.min(y,ae),ee.y=Math.min(ne,x),ee.width=Math.abs(ae-y),ee.height=Math.abs(x-ne),this.fill===null){if(ee.Bc(-b,-b),ee.ca(a))return $t.free(ee),!1;ee.Bc(b,b)}return this.stroke!==null&&ee.Bc(E,E),a=ee.ca(a),$t.free(ee),a}if(x.type===Ln.F){ne=x.startX,E=x.startY,ae=x.endX;var ue=x.endY;if(x=Math.min(ne,ae),y=Math.min(E,ue),ne=Math.abs(ae-ne)/2,E=Math.abs(ue-E)/2,x=a.x-(x+ne),y=a.y-(y+E),this.fill===null){if(ne-=b,E-=b,0>=ne||0>=E||1>=x*x/(ne*ne)+y*y/(E*E))return $t.free(ee),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),$t.free(ee),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Ln.o)return $t.free(ee),this.fill===null?Hl(x,a.x,a.y,E):ua(x,a,E,1<this.strokeWidth,y);jt("Unknown Geometry type: "+x.type)},Qe.Wl=function(a,y,x,b){var E=this.desiredSize,ee=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var ae=this.figure,ue=k0[ae];if(ue===void 0){var ge=Gt.Ze[ae];typeof ge=="string"&&(ge=Gt.Ze[ge]),typeof ge=="function"?(ue=ge(null,100,100),k0[ae]=ue):jt("Unsupported Figure: "+ae)}ne=ue.bounds}ae=ne.width,ue=ne.height,ge=ne.width;var ye=ne.height;switch(ls(this,!0)){case mn:b=x=0;break;case xn:ge=Math.max(a-ee,0),ye=Math.max(y-ee,0);break;case gr:ge=Math.max(a-ee,0),b=0;break;case Cr:x=0,ye=Math.max(y-ee,0)}isFinite(E.width)&&(ge=E.width),isFinite(E.height)&&(ye=E.height);var Le=this.maxSize,ze=this.minSize;switch(x=Math.max(x-ee,ze.width),b=Math.max(b-ee,ze.height),ge=Math.min(Le.width,ge),ye=Math.min(Le.height,ye),ge=isFinite(ge)?Math.max(x,ge):Math.max(ae,x),ye=isFinite(ye)?Math.max(b,ye):Math.max(ue,b),x=E0(this),x){case mn:break;case xn:ae=ge,ue=ye;break;case ur:x=Math.min(ge/ae,ye/ue),isFinite(x)||(x=1),ae*=x,ue*=x;break;default:jt(x+" is not a valid geometryStretch.")}this.Rd!==null?(ae===0&&(ae=.001),ue===0&&(ue=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,b=ae/ne.width,ne=ue/ne.height,isFinite(b)||(b=1),isFinite(ne)||(ne=1),this.ua=b===1&&ne===1?x:x.copy().scale(b,ne)):this.ua!==null&&Gt.$(this.ua.Sk,a-ee)&&Gt.$(this.ua.Rk,y-ee)||(this.ua=Ur.makeGeometry(this,ae,ue)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-ee/2,ne.y-ee/2,a===0&&ae===0?0:ne.width+ee,y===0&&ue===0?0:ne.height+ee):this.Ge(-(ee/2),-(ee/2),ge+ee,ye+ee),E.w()?(ge=E.width,ye=E.height,ge=Math.min(Le.width,ge),ye=Math.min(Le.height,ye),ge=Math.max(ze.width,ge),ye=Math.max(ze.height,ye),this.dc.h(0,0,ge,ye)):this.dc.assign(ne)};function E0(a){var y=a.geometryStretch;return a.Rd!==null?y===Ir?xn:y:y===Ir?k0[a.figure].defaultStretch:y}Qe.eh=function(a,y,x,b){Ia(this,a,y,x,b)},Qe.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Qe.Sj=function(a,y,x,b,E){var ee=this.transform,ne=1/(ee.m11*ee.m22-ee.m12*ee.m21),ae=ee.m22*ne,ue=-ee.m12*ne,ge=-ee.m21*ne,ye=ee.m11*ne,Le=ne*(ee.m21*ee.dy-ee.m22*ee.dx),ze=ne*(ee.m12*ee.dx-ee.m11*ee.dy);ee=a*ae+y*ge+Le,ne=a*ue+y*ye+ze,ae=x*ae+b*ge+Le,ue=x*ue+b*ye+ze,Le=this.ig/2,ge=this.ua,ge===null&&(this.measure(1/0,1/0),ge=this.ua);var Ke=ge.bounds;if(ye=!1,ge.type===Ln.j)if(1.5>=this.strokeWidth)ye=Gt.Ve(ge.startX,ge.startY,ge.endX,ge.endY,ee,ne,ae,ue,E);else{if(ge.startX===ge.endX?(b=Le,ye=0):(y=(ge.endY-ge.startY)/(ge.endX-ge.startX),ye=Le/Math.sqrt(1+y*y),b=ye*y),y=ir(),a=new st,Gt.Ve(ge.startX+b,ge.startY+ye,ge.endX+b,ge.endY+ye,ee,ne,ae,ue,a)&&y.push(a),a=new st,Gt.Ve(ge.startX-b,ge.startY-ye,ge.endX-b,ge.endY-ye,ee,ne,ae,ue,a)&&y.push(a),a=new st,Gt.Ve(ge.startX+b,ge.startY+ye,ge.startX-b,ge.startY-ye,ee,ne,ae,ue,a)&&y.push(a),a=new st,Gt.Ve(ge.endX+b,ge.endY+ye,ge.endX-b,ge.endY-ye,ee,ne,ae,ue,a)&&y.push(a),ae=y.length,ae===0)return Un(y),!1;for(ye=!0,ue=1/0,b=0;b<ae;b++)a=y[b],x=(a.x-ee)*(a.x-ee)+(a.y-ne)*(a.y-ne),x<ue&&(ue=x,E.x=a.x,E.y=a.y);Un(y)}else if(ge.type===Ln.u)ye=Gt.Ff(Ke.x-Le,Ke.y-Le,Ke.x+Ke.width+Le,Ke.y+Ke.height+Le,ee,ne,ae,ue,E);else if(ge.type===Ln.F){y=$t.allocAt(Ke.x,Ke.y,Ke.width,Ke.height).Bc(Le,Le);e:if(y.width===0)ye=Gt.Ve(y.x,y.y,y.x,y.y+y.height,ee,ne,ae,ue,E);else if(y.height===0)ye=Gt.Ve(y.x,y.y,y.x+y.width,y.y,ee,ne,ae,ue,E);else{if(a=y.width/2,ge=y.height/2,b=y.x+a,ye=y.y+ge,x=9999,ee!==ae&&(x=(ne-ue)/(ee-ae)),9999>Math.abs(x)){if(ue=ne-ye-x*(ee-b),0>a*a*x*x+ge*ge-ue*ue){E.x=NaN,E.y=NaN,ye=!1;break e}Le=Math.sqrt(a*a*x*x+ge*ge-ue*ue),ae=(-(a*a*x*ue)+a*ge*Le)/(ge*ge+a*a*x*x)+b,a=(-(a*a*x*ue)-a*ge*Le)/(ge*ge+a*a*x*x)+b,ge=x*(ae-b)+ue+ye,ue=x*(a-b)+ue+ye,Math.abs((ee-ae)*(ee-ae))+Math.abs((ne-ge)*(ne-ge))<Math.abs((ee-a)*(ee-a))+Math.abs((ne-ue)*(ne-ue))?(E.x=ae,E.y=ge):(E.x=a,E.y=ue)}else{if(ae=ge*ge,ue=ee-b,ae-=ae/(a*a)*ue*ue,0>ae){E.x=NaN,E.y=NaN,ye=!1;break e}ue=Math.sqrt(ae),ae=ye+ue,ue=ye-ue,Math.abs(ae-ne)<Math.abs(ue-ne)?(E.x=ee,E.y=ae):(E.x=ee,E.y=ue)}ye=!0}$t.free(y)}else if(ge.type===Ln.o){ze=st.alloc();var Je=ae-ee,it=ue-ne,Tt=Je*Je+it*it,Pt=ee,Nt=ne;if(0<Tt&&Ke.contains(Pt,Nt)&&(ze.x=Pt,ze.y=Nt,this.ca(ze)))for(Je!==0&&.5>Math.abs(Je)?(it*=.5/Je,Je=.5):it!==0&&.5>Math.abs(it)&&(Je*=.5/it,it=.5),Pt-=Je,Nt-=it;Ke.contains(Pt,Nt);)Pt-=Je,Nt-=it;for(E.x=ae,E.y=ue,it=0;it<ge.figures.count;it++){var At=ge.figures.s[it],Bt=At.isFilled?Pt:ee,Rt=At.isFilled?Nt:ne,Zt=At.segments;Ke=At.startX,Je=At.startY;for(var On=Ke,rr=Je,$n=0;$n<Zt.count;$n++){var En=Zt.s[$n],dn=En.type,Dr=En.endX,Mr=En.endY,bi=!1;switch(dn){case Fo:On=Dr,rr=Mr;break;case Ui:bi=Nm(Ke,Je,Dr,Mr,Bt,Rt,ae,ue,ze);break;case _o:bi=Gt.Eo(Ke,Je,En.point1X,En.point1Y,En.point2X,En.point2Y,Dr,Mr,Bt,Rt,ae,ue,.6,ze);break;case ds:bi=Gt.Eo(Ke,Je,Ke+2/3*(En.point1X-Ke),Je+2/3*(En.point1Y-Je),Dr+2/3*(En.point1X-Dr),Mr+2/3*(En.point1Y-Mr),Dr,Mr,Bt,Rt,ae,ue,.6,ze);break;case wo:case ws:dn=En.type===wo?Ga(En,At):js(En,At,Ke,Je);var Vi=dn.length;if(Vi===0){bi=Nm(Ke,Je,En.type===wo?En.centerX:En.endX,En.type===wo?En.centerY:En.endY,Bt,Rt,ae,ue,ze);break}for(Mr=null,Dr=0;Dr<Vi;Dr++){if(Mr=dn[Dr],Dr===0&&Nm(Ke,Je,Mr[0],Mr[1],Bt,Rt,ae,ue,ze)){var Yo=Mm(Bt,Rt,ze,Tt,E);Yo<Tt&&(Tt=Yo,ye=!0)}Gt.Eo(Mr[0],Mr[1],Mr[2],Mr[3],Mr[4],Mr[5],Mr[6],Mr[7],Bt,Rt,ae,ue,.6,ze)&&(Yo=Mm(Bt,Rt,ze,Tt,E),Yo<Tt&&(Tt=Yo,ye=!0))}Dr=Mr[6],Mr=Mr[7];break;default:jt("Unknown Segment type: "+dn)}Ke=Dr,Je=Mr,bi&&(bi=Mm(Bt,Rt,ze,Tt,E),bi<Tt&&(Tt=bi,ye=!0)),En.isClosed&&(Dr=On,Mr=rr,Nm(Ke,Je,Dr,Mr,Bt,Rt,ae,ue,ze)&&(En=Mm(Bt,Rt,ze,Tt,E),En<Tt&&(Tt=En,ye=!0)))}}ee=x-a,ne=b-y,ae=Math.sqrt(ee*ee+ne*ne),ae!==0&&(ee/=ae,ne/=ae),E.x-=ee*Le,E.y-=ne*Le,st.free(ze)}else jt("Unknown Geometry type: "+ge.type);return ye?(this.transform.Ga(E),!0):!1};function Mm(a,y,x,b,E){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<b?(E.x=x.x,E.y=x.y,y):b}function Nm(a,y,x,b,E,ee,ne,ae,ue){if(Gt.$(a,x)&&Gt.$(y,b)||Gt.$(E,ne)&&Gt.$(ee,ae))return!1;var ge=!1,ye=(E-ne)*(y-b)-(ee-ae)*(a-x);return ye===0?!1:(ue.x=((E*ae-ee*ne)*(a-x)-(E-ne)*(a*b-y*x))/ye,ue.y=((E*ae-ee*ne)*(y-b)-(ee-ae)*(a*b-y*x))/ye,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(ue.y>a||Gt.$(ue.y,a))&&(ue.y<y||Gt.$(ue.y,y))&&(ge=!0)):(y=a<x?a:x,a=a<x?x:a,(ue.x>y||Gt.$(ue.x,y))&&(ue.x<a||Gt.$(ue.x,a))&&(ge=!0)),ge)}Qe.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 b=this.strokeWidth/2,E=!1,ee=st.alloc();return ee.h(x.x-b,x.y-b),a.ca(y.Ga(ee))&&(ee.h(x.x-b,x.bottom+b),a.ca(y.Ga(ee))&&(ee.h(x.right+b,x.bottom+b),a.ca(y.Ga(ee))&&(ee.h(x.right+b,x.y-b),a.ca(y.Ga(ee))&&(E=!0)))),st.free(ee),E},Qe.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=jr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,ee=a.top;a=a.bottom;var ne=st.alloc();if(ne.h(b,ee),x.Ga(ne),this.gh(ne,!0)||(ne.h(E,ee),x.Ga(ne),this.gh(ne,!0))||(ne.h(b,a),x.Ga(ne),this.gh(ne,!0))||(ne.h(E,a),x.Ga(ne),this.gh(ne,!0)))return st.free(ne),!0;var ae=st.alloc(),ue=st.alloc();return x.set(y),x.bv(this.transform),x.Vj(),ae.x=E,ae.y=ee,ae.transform(x),ne.x=b,ne.y=ee,ne.transform(x),y=!1,Yc(this,ne,ae,ue)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),Yc(this,ne,ae,ue)?y=!0:(ae.x=b,ae.y=a,ae.transform(x),Yc(this,ne,ae,ue)?y=!0:(ne.x=b,ne.y=ee,ne.transform(x),Yc(this,ne,ae,ue)&&(y=!0)))),st.free(ne),jr.free(x),st.free(ae),st.free(ue),y};function Yc(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,ee=x.y;return x=b.x,b=b.y,a===E?(y<ee?(a=y,y=ee):a=ee,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}Qe.tx=function(a,y,x){function b(Tt,Pt){for(var Nt=Tt.length,At=0;At<Nt;At+=2)if(Pt.zd(Tt[At],Tt[At+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),ee=E;if(1.5<this.strokeWidth&&(E=this.strokeWidth/2+Math.sqrt(E),E*=E),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var ne=y.bounds,ae=ne.x,ue=ne.y,ge=ne.x+ne.width;if(ne=ne.y+ne.height,Lr(a.x,a.y,ae,ue)<=E&&Lr(a.x,a.y,ge,ue)<=E&&Lr(a.x,a.y,ae,ne)<=E&&Lr(a.x,a.y,ge,ne)<=E)return!0}if(ae=y.startX,ue=y.startY,ge=y.endX,ne=y.endY,y.type===Ln.j){if(x=(ae-ge)*(a.x-ge)+(ue-ne)*(a.y-ne),Xn(a.x,a.y,ae,ue,ge,ne)<=(0<=(ge-ae)*(a.x-ae)+(ne-ue)*(a.y-ue)&&0<=x?E:ee))return!0}else{if(y.type===Ln.u)return y=!1,x&&(y=Xn(a.x,a.y,ae,ue,ae,ne)<=E||Xn(a.x,a.y,ae,ue,ge,ue)<=E||Xn(a.x,a.y,ge,ue,ge,ne)<=E||Xn(a.x,a.y,ae,ne,ge,ne)<=E),y;if(y.type===Ln.F){y=a.x-(ae+ge)/2,ee=a.y-(ue+ne)/2;var ye=Math.abs(ge-ae)/2,Le=Math.abs(ne-ue)/2;if(ye===0||Le===0)return Xn(a.x,a.y,ae,ue,ge,ne)<=E;if(x){if(a=Gt.$y(ye,Le,y,ee),a*a<=E)return!0}else return!(Lr(y,ee,-ye,0)>=E||Lr(y,ee,0,-Le)>=E||Lr(y,ee,0,Le)>=E||Lr(y,ee,ye,0)>=E)}else if(y.type===Ln.o){if(ge=y.bounds,ee=ge.x,ae=ge.y,ue=ge.x+ge.width,ge=ge.y+ge.height,a.x>ue&&a.x<ee&&a.y>ge&&a.y<ae&&Xn(a.x,a.y,ee,ae,ee,ge)>E&&Xn(a.x,a.y,ee,ae,ue,ae)>E&&Xn(a.x,a.y,ue,ge,ee,ge)>E&&Xn(a.x,a.y,ue,ge,ue,ae)>E)return!1;if(ee=Math.sqrt(E),x){if(this.fill===null?Hl(y,a.x,a.y,ee):ua(y,a,ee,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(ee=x.s[y],ne=ee.startX,ye=ee.startY,a.zd(ne,ye)>E)return!1;for(ae=ee.segments.s,ue=ae.length,ge=0;ge<ue;ge++)switch(Le=ae[ge],Le.type){case Fo:case Ui:if(ne=Le.endX,ye=Le.endY,a.zd(ne,ye)>E)return!1;break;case _o:var ze=ir();if(Gt.Qe(ne,ye,Le.point1X,Le.point1Y,Le.point2X,Le.point2Y,Le.endX,Le.endY,.8,ze),ne=b(ze,a),Un(ze),ne||(ne=Le.endX,ye=Le.endY,a.zd(ne,ye)>E))return!1;break;case ds:if(ze=ir(),Gt.ep(ne,ye,Le.point1X,Le.point1Y,Le.endX,Le.endY,.8,ze),ne=b(ze,a),Un(ze),ne||(ne=Le.endX,ye=Le.endY,a.zd(ne,ye)>E))return!1;break;case wo:case ws:ze=Le.type===wo?Ga(Le,ee):js(Le,ee,ne,ye);var Ke=ze.length;if(Ke===0){if(ne=Le.type===wo?Le.centerX:Le.endX,ye=Le.type===wo?Le.centerY:Le.endY,a.zd(ne,ye)>E)return!1;break}Le=null;for(var Je=ir(),it=0;it<Ke;it++)if(Le=ze[it],Je.length=0,Gt.Qe(Le[0],Le[1],Le[2],Le[3],Le[4],Le[5],Le[6],Le[7],.8,Je),b(Je,a))return Un(Je),!1;Un(Je),Le!==null&&(ne=Le[6],ye=Le[7]);break;default:jt("Unknown Segment type: "+Le.type)}}return!0}}}return!1},Qe.qc=function(){this.ua=null},Qe.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=ng,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=na):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Mn(1-na.x,na.y)))}Ur.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=vu[a.toArrow];else a.fromArrow!=="None"?b=vu[a.fromArrow]:(b=Gt.Ze[a.figure],typeof b=="string"&&(b=Gt.Ze[b]),b===void 0&&jt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Gt.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=vu[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=vu[x],y===void 0){var b=null,E;for(E in Gt.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Ln.parse(Gt.um[b],!1),vu[b]=a,x!==b&&(vu[x]=b),b}}return typeof y=="string"?y:y instanceof Ln?a:null}zt.Object.defineProperties(Ur.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 b=this.part;b!==null&&(b.ag=NaN),this.v(),this.g("geometry",y||x,a),pa(this)&&(a=this.part,a!==null&&$i(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=st.allocAt(-y.x,-y.y),st.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&&Ff(a,"Shape.fill"),a instanceof Ni&&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&&Ff(a,"Shape.stroke"),a instanceof Ni&&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 An(a,"value >= 0",Ur,"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"?An(a,'"butt", "round", or "square"',Ur,"strokeCap"):(Xc(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"?An(a,'"miter", "bevel", or "round"',Ur,"strokeJoin"):(Xc(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){Xc(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var ee=a[E];0<=ee&&isFinite(ee)||jt("strokeDashArray:value "+ee+" at index "+E+" must be a positive number or zero."),b+=ee}if(b===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&&(Xc(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=Gt.Ze[a];typeof x=="function"?x=a:(x=Gt.Ze[a.toLowerCase()])||jt("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=y1(a);x===null?jt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new nc),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),v1(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=y1(a);x===null?jt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new nc),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Vo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Xc(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Vo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Xc(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&&(Xc(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Ir},set:function(a){var y=this.geometryStretch;y!==a&&(Xc(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 yu),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Yl(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 yu),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 yu),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 yu),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Ur.prototype.intersectsRect=Ur.prototype.Yc,Ur.prototype.containedInRect=Ur.prototype.fh,Ur.prototype.getNearestIntersectionPoint=Ur.prototype.rs,Ur.prototype.getDocumentBounds=Ur.prototype.mi,Ur.prototype.getDocumentPoint=Ur.prototype.ga;var vu=new yr,k0=new yr;Ur.className="Shape",Ur.getFigureGenerators=function(){var a=new tn,y;for(y in Gt.Ze)y!==y.toLowerCase()&&a.add(y,Gt.Ze[y]);return a.freeze(),a},Ur.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Gt.Ze;b[a]=y,b[x]=a},Ur.getArrowheadGeometries=function(){var a=new tn;for(b in Gt.um)if(vu[b]===void 0){var y=Ln.parse(Gt.um[b],!1);vu[b]=y,y=b.toLowerCase(),y!==b&&(vu[y]=b)}for(var x in vu)if(x!==x.toLowerCase()){var b=vu[x];b instanceof Ln&&a.add(x,b)}return a.freeze(),a},Ur.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Ln.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||jt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=vu;b[a]=x,b[y]=a};function T0(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Ir,this.gg=this.fg=Vo}T0.prototype.copy=function(){var a=new T0;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 Zi(a,y){return _t.call(this),Dm||(us=vo?new ll(null).context:null,Dm=!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}Wt(Zi,_t),Zi.prototype.cloneProtected=function(a){_t.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 ql(a){a.da===null?a.da=new F0:a.da.nc&&(a.da=a.da.copy())}Qe=Zi.prototype,Qe.th=function(){_t.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function S1(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}Qe.qb=function(a){a.classType===Zi?this.wrap=a:_t.prototype.qb.call(this,a)},Qe.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Qe.v=function(){_t.prototype.v.call(this)},Qe.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,b=this.actualBounds,E=x.width,ee=x.height,ne=Yp(this),ae=a.textAlign=this.textAlign,ue=y.tn;ae==="start"?ae=ue?"right":"left":ae==="end"&&(ae=ue?"left":"right"),ue=this.isUnderline;var ge=this.isStrikethrough;yo(this,a,this.xc,!0,!1,x,b),(ue||ge)&&yo(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var ye=this.oe,Le=ye.dx-(ne*ye.m21+ye.dx);ye=ye.dy-(ne*ye.m22+ye.dy);var ze=y.scale;switch(8>(Le*Le+ye*ye)*ze*ze&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Ps&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Le=this.spacingBelow,this.flip){case ci:a.translate(E,0),a.scale(-1,1);break;case Zr:a.translate(0,ee),a.scale(1,-1);break;case Ii:a.translate(E,ee),a.scale(-1,-1)}if(a.yc(),ye=this.Gc,ze=(y+ne+Le)*ye,ee>ze&&(b=this.verticalAlignment,b=b.y*ee-b.y*ze+b.offsetY),ye===1&&this.ze!==null)Le=this.Cb,Le>E&&(Le=E),this.Oj(this.ze,a,0,b+y,E,ne,Le,x,ae,ue,ge);else if(this.Qc!==null&&this.Qb!==null)for(ze=0;ze<ye;ze++){var Ke=this.Qc[ze];Ke>E&&(Ke=E),b+=y,this.Oj(this.Qb[ze],a,0,b,E,ne,Ke,x,ae,ue,ge),b+=ne+Le}switch(this.flip){case ci:a.scale(-1,1),a.translate(-E,0);break;case Zr:a.scale(1,-1),a.translate(0,-ee);break;case Ii:a.scale(-1,-1),a.translate(-E,-ee)}}},Qe.Oj=function(a,y,x,b,E,ee,ne,ae,ue,ge,ye){var Le=0;if(ae)ue==="left"?Le=0:ue==="right"?Le=E-ne:ue==="center"&&(Le=(E-ne)/2),y.fillRect(x+Le,b+.25*ee,ne,1);else{if(ue==="left"?Le=0:ue==="right"?Le=E:ue==="center"&&(Le=E/2),E=Am!==null?Am(this,ee):.75*ee,y.fillText(a,x+Le,b+E),a=ee/20|0,a===0&&(a=1),ue==="right"?Le-=ne:ue==="center"&&(Le-=ne/2),ge){ae=jm!==null?jm(this,ee):.8*ee,ue=x+Le,ge=b+ae,E=x+Le+ne,ae=b+ae;var ze=a;y.beginPath(),y.lineWidth=ze,y.moveTo(ue,ge),y.lineTo(E,ae),y.stroke(),y.Se(),y instanceof Ps&&y.ad.classList.add("gojs-td")}ye&&(ye=b+ee-ee/2.2|0,a%2!==0&&(ye+=.5),b=x+Le,ee=ye,x=x+Le+ne,ne=ye,Le=a,y.beginPath(),y.lineWidth=Le,y.moveTo(b,ee),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Ps&&y.ad.classList.add("gojs-td"))}},Qe.kk=function(a,y,x){if(!_t.prototype.kk.call(this,a,y,x))return!1;if(yo(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},Qe.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:_t.prototype.nk.call(this,a)},Qe.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)}},Qe.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var ee=this.Ae;us!==null&&k1!==ee&&(k1=us.font=ee),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;if(isNaN(this.desiredSize.width)){if(ee=this.ec.replace(/\r\n/g,`
|
|
`).replace(/\r/g,`
|
|
`),ee.length===0)ee=8;else if(this.isMultiline){for(var ae=ne=0,ue=!1;!ue;){var ge=ee.indexOf(`
|
|
`,ae);ge===-1&&(ge=ee.length,ue=!0),ae=ee.substr(ae,ge-ae),this.formatting===Jp&&(ae=ae.trim()),ne=Math.max(ne,wl(ae)),ae=ge+1}ee=ne}else ne=ee.indexOf(`
|
|
`,0),0<=ne&&(ee=ee.substr(0,ne)),ee=wl(ee);ee=Math.min(ee,a/this.scale)}else ee=this.desiredSize.width;if(this.panel!==null&&(ee=Math.min(ee,this.panel.maxSize.width)),ne=w1(this,ee),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,ue=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Om&&(y=this.Ae,y=this.overflow===Om?x1(y):0,ge=this.spacingAbove+this.spacingBelow,ge=Math.max(0,Yp(this)+ge),ue=Math.min(this.maxLines-1,Math.max(Math.floor(ue/ge+.01)-1,0)),!(ue+1>=this.Qb.length))){for(this.l|=16777216,ge=this.Qb[ue],y=Math.max(1,a-y);wl(ge)>y&&1<ge.length;)ge=ge.substr(0,ge.length-1);ge+=Qp,y=wl(ge),this.Qb[ue]=ge,this.Qb=this.Qb.slice(0,ue+1),this.Qc[ue]=y,this.Qc=this.Qc.slice(0,ue+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===b1||isNaN(this.desiredSize.width))&&(ee=isNaN(a)?this.Cb:Math.min(a,this.Cb)),ee=Math.max(x,ee),ne=Math.max(b,ne),yi(this.dc,ee,ne),this.Ge(0,0,ee,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},Qe.eh=function(a,y,x,b){Ia(this,a,y,x,b)};function Xp(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 L0(a,y,x,b){var E=a.formatting===Jp;E&&(y=y.trim());var ee=0,ne=a.Ae,ae=a.spacingAbove+a.spacingBelow;ae=Math.max(0,Yp(a)+ae);var ue=a.overflow===Om?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,ae);else if(ne=y,a.wrap===M0){a.Le=1;var ge=wl(y);if(ue===0||ge<=x)a.Cb=Math.max(a.Cb,ge),Xp(a,y,a.Cb),b!==null&&b.h(ge,ae);else{for(ee=Ad(a,ne),ne=ne.substr(ee.length),y=Ad(a,ne),ge=wl(ee+y);0<y.length&&ge<=x;)ee+=y,ne=ne.substr(y.length),y=Ad(a,ne),ge=ee+y,E&&(ge=ge.trim()),ge=wl(ge);for(E&&(y=y.trim()),ee+=y,x=Math.max(1,x-ue);wl(ee)>x&&1<ee.length;)ee=ee.substr(0,ee.length-1);a.l|=16777216,ee+=Qp;var ye=wl(ee);a.Cb=ye,Xp(a,ee,ye),b!==null&&b.h(ye,ae)}}else{for(ue=0,ne.length===0&&(ue=1,Xp(a,ne,0));0<ne.length;){for(y=Ad(a,ne),ne=ne.substr(y.length);wl(y)>x;){var Le=1;for(ge=wl(y.substr(0,Le)),ye=0;ge<=x;)Le++,ye=ge,ge=wl(y.substr(0,Le));if(Le===1){var ze=ge;ee=Math.max(ee,ge)}else ze=ye,ee=Math.max(ee,ye);if(Le--,1>Le&&(Le=1),Xp(a,y.substr(0,Le),ze),ue++,y=y.substr(Le),a.Gc+ue>a.maxLines)break}for(ye=Ad(a,ne),ge=wl(y+ye);0<ye.length&&ge<=x;)y+=ye,ne=ne.substr(ye.length),ye=Ad(a,ne),ge=y+ye,E&&(ge=ge.trim()),ge=wl(ge);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ye.length===0?(Le=ge,ee=Math.max(ee,ge)):(Le=ye=wl(y),ee=Math.max(ee,ye)),Xp(a,y,Le),ue++,a.Gc+ue>a.maxLines))break}a.Le=Math.min(a.maxLines,ue),a.Cb=Math.max(a.Cb,ee),b!==null&&b.h(a.Cb,ae*a.Le)}}function Ad(a,y){if(a.wrap===P1)return y.substr(0,1);for(var x=y.length,b=0,E=xx;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===C1&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function wl(a){return us===null?8*a.length:us.measureText(a).width}function Yp(a){if(a.df!==null)return a.df;var y=a.Ae;if(us===null){var x=16;return a.df=x}return j0[y]!==void 0&&5e3>E1?x=j0[y]:(x=1.3*us.measureText("M").width,j0[y]=x,E1++),a.df=x}function x1(a){if(us===null)return 6;if(Fm[a]!==void 0&&5e3>O0)var y=Fm[a];else y=us.measureText(Qp).width,Fm[a]=y,O0++;return y}function w1(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
`).replace(/\r/g,`
|
|
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,Yp(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(`
|
|
`,0);0<=E&&(x=x.substr(0,E))}E=0;for(var ee=a.Gc=0,ne,ae=!1;!ae;){if(ne=x.indexOf(`
|
|
`,ee),ne===-1&&(ne=x.length,ae=!0),ee<=ne){if(ee=x.substr(ee,ne-ee),a.wrap!==M0){a.Le=0;var ue=vn.alloc();L0(a,ee,y,ue),E+=ue.height,vn.free(ue),a.Gc+=a.Le}else L0(a,ee,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(ae=!0)}ee=ne+1}return a.Lq=E}zt.Object.defineProperties(Zi.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"||(ql(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:mn},set:function(a){var y=this.flip;y!==a&&(ql(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:iu},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),ql(this),this.da.Yr=a,Za(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=vn.alloc();L0(this,this.ec,999999,a);var y=a.width;vn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),yi(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:N0},set:function(a){var y=this.wrap;y!==a&&(ql(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:A0},set:function(a){var y=this.overflow;y!==a&&(ql(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&&Ff(a,"TextBlock.stroke"),a instanceof Ni&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Yp(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&&(ql(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&&(ql(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 yu),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 yu),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 yu),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 yu),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 yu),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&&(ql(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&&(ql(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&&(ql(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&&(ql(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Jp},set:function(a){var y=this.formatting;y!==a&&(ql(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&&An(a,"> 0",Zi,"maxLines"),ql(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 Am=null,jm=null,M0=new an(Zi,"None",0),b1=new an(Zi,"WrapFit",1),N0=new an(Zi,"WrapDesiredSize",2),P1=new an(Zi,"WrapBreakAll",3),A0=new an(Zi,"OverflowClip",0),Om=new an(Zi,"OverflowEllipsis",1),Jp=new an(Zi,"FormatTrim",0),C1=new an(Zi,"FormatNone",0),xx=/[ \u200b\u00ad]/,j0=new yr,E1=0,Fm=new yr,O0=0,Qp="...",k1="",us=null,Dm=!1;Zi.className="TextBlock";function F0(){this.nc=!1,this.Hd=null,this.Xf=mn,this.gq=Jp,this.Jq=1/0,this.$q=A0,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=iu,this.$r=N0}F0.prototype.copy=function(){var a=new F0;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},Zi.getEllipsis=function(){return Qp},Zi.setEllipsis=function(a){Qp=a,Fm=new yr,O0=0},Zi.getBaseline=function(){return Am},Zi.setBaseline=function(a){Am=a},Zi.getUnderline=function(){return jm},Zi.setUnderline=function(a){jm=a},Zi.isValidFont=function(a){if(Dm||(us=vo?new ll(null).context:null,Dm=!0),us===null)return!0;var y=us.font;if(a===y||a==="10px sans-serif")return!0;us.font="10px sans-serif",us.font=a;var x=us.font;if(x!=="10px sans-serif")return us.font=y,!0;us.font="19px serif";var b=us.font;return us.font=a,x=us.font,us.font=y,x!==b},Zi.FormatNone=C1,Zi.FormatTrim=Jp,Zi.None=M0,Zi.OverflowClip=A0,Zi.OverflowEllipsis=Om,Zi.WrapBreakAll=P1,Zi.WrapDesiredSize=N0,Zi.WrapFit=b1;function yu(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}yu.prototype.copy=function(){var a=new yu;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},yu.className="GradElementSettings";function hs(a,y){_t.call(this),this.Eg=null,this.qo="",this.Xg=Aa,this.Nk=xn,this.Zg=this.Hd=null,this.Mk=ai,this.Xf=mn,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 jd;Wt(hs,_t),hs.prototype.cloneProtected=function(a){_t.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},hs.prototype.qb=function(a){a===mn||a===ur||a===ni?this.imageStretch=a:_t.prototype.qb.call(this,a)},hs.prototype.toString=function(){return"Picture("+this.source+")#"+zr(this)};function Od(a){a===void 0&&(a=""),a!==""?jd[a]&&(delete jd[a],Bm--):(jd=new yr,Bm=0)}function T1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var ee=y.getAttribute("src")||"",ne=E.Og.I(ee);if(ne!==null)for(var ae=ne.length,ue=0;ue<ae;ue++)ee=ne[ue],E.Xn.add(ee),ee.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),ee.Zg!==null&&ee.Zg(ee,x))}y.Bg.clear()}a.desiredSize.w()||(Bo(a,!1),a.v())},y.Yp=function(x){y.ln=x;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value,ee=y.getAttribute("src")||"",ne=E.Og.I(ee);if(ne!==null){E=ne.length,ee=ir();for(var ae=0;ae<E;ae++)ee.push(ne[ae]);if(y.hn)for(ae=0;ae<E;ae++)ne=ee[ae],ne.Hd!==null&&ne.Hd(ne,x);Un(ee)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}hs.prototype.hA=function(){if(this.source!==""){Od(this.source);var a=this.source;this.source="",this.source=a}},hs.prototype.redraw=function(){this.N(),this.Uc=!0},hs.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var b=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(b===null||b==="")||x.ln instanceof Event&&a instanceof Vc)){var E=a instanceof Ps;b=this.naturalBounds;var ee=0,ne=0,ae=this.qn,ue=ae?+x.width:x.naturalWidth;if(ae=ae?+x.height:x.naturalHeight,ue===void 0&&x.videoWidth&&(ue=x.videoWidth),ae===void 0&&x.videoHeight&&(ae=x.videoHeight),ue=ue||b.width,ae=ae||b.height,ue!==0&&ae!==0){var ge=ue,ye=ae;this.sourceRect.w()&&(ee=this.Xg.x,ne=this.Xg.y,ue=this.Xg.width,ae=this.Xg.height);var Le=ue,ze=ae,Ke=this.Nk,Je=this.Mk;switch(Ke){case mn:if(this.sourceRect.w())break;Le>=b.width&&(ee=ee+Je.offsetX+(Le*Je.x-b.width*Je.x)),ze>=b.height&&(ne=ne+Je.offsetY+(ze*Je.y-b.height*Je.y)),ue=Math.min(b.width,Le),ae=Math.min(b.height,ze);break;case xn:Le=b.width,ze=b.height;break;case ur:case ni:Ke===ur?(Ke=Math.min(b.height/ze,b.width/Le),Le*=Ke,ze*=Ke):Ke===ni&&(Ke=Math.max(b.height/ze,b.width/Le),Le*=Ke,ze*=Ke,Le>=b.width&&(ee=(ee+Je.offsetX+(Le*Je.x-b.width*Je.x)/Le)*ue),ze>=b.height&&(ne=(ne+Je.offsetY+(ze*Je.y-b.height*Je.y)/ze)*ae),ue*=1/(Le/b.width),ae*=1/(ze/b.height),Le=b.width,ze=b.height)}Ke=this.Df()*y.scale;var it=Le*Ke*ze*Ke,Tt=ue*ae/it,Pt=x.__goCache;Ke=null;var Nt=wx;if(!E){if(x.sq&&Pt!==void 0&&4<it&&Tt>Nt*Nt)for(Pt.gi===null&&(M1(Pt,4,ge,ye,x),M1(Pt,16,ge,ye,x)),E=Pt.gi,ge=E.length,ye=0;ye<ge&&E[ye].ratio*E[ye].ratio<Tt;ye++)Ke=E[ye];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new ll(null).context;try{E.drawImage(this.Eg,0,0)}catch(At){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(At){this.vl=!0}}if(this.vl)return}}switch(E=Le<b.width?Je.offsetX+(b.width*Je.x-Le*Je.x):0,Je=ze<b.height?Je.offsetY+(b.height*Je.y-ze*Je.y):0,this.flip){case ci:a.translate(Math.min(b.width,Le),0),a.scale(-1,1);break;case Zr:a.translate(0,Math.min(b.height,ze)),a.scale(1,-1);break;case Ii:a.translate(Math.min(b.width,Le),Math.min(b.height,ze)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Pt!==void 0&&Ke!==null&&Ke.ratio!==1){a.save(),y=Ke.ratio;try{a.drawImage(Ke.source,ee/y,ne/y,Math.min(Ke.source.width,ue/y),Math.min(Ke.source.height,ae/y),E,Je,Math.min(b.width,Le),Math.min(b.height,ze)),a instanceof Ps&&(this.bt=[ee/y,ne/y,Math.min(Ke.source.width,ue/y),Math.min(Ke.source.height,ae/y),E,Je,Math.min(b.width,Le),Math.min(b.height,ze)])}catch(At){this.en=!1}a.restore()}else try{a.drawImage(x,ee,ne,ue,ae,E,Je,Math.min(b.width,Le),Math.min(b.height,ze)),a instanceof Ps&&(this.bt=[ee,ne,ue,ae,E,Je,Math.min(b.width,Le),Math.min(b.height,ze)])}catch(At){this.en=!1}switch(this.flip){case ci:a.scale(-1,1),a.translate(-Math.min(b.width,Le),0);break;case Zr:a.scale(1,-1),a.translate(0,-Math.min(b.height,ze));break;case Ii:a.scale(-1,-1),a.translate(-Math.min(b.width,Le),-Math.min(b.height,ze))}}}}},hs.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,ee=ls(this,!0),ne=this.Eg,ae=this.qn,ue=0,ge=0;(ae||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(ue=ae?+ne.width:ne.naturalWidth,ge=ae?+ne.height:ne.naturalHeight),isFinite(E.width)||ee===xn||ee===gr?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=ue)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ue),isFinite(E.height)||ee===xn||ee===Cr?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=ge)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:ge),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,ee=this.minSize,x=Math.max(x||0,ee.width),b=Math.max(b||0,ee.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),yi(this.dc,a,y),this.Ge(0,0,a,y)},hs.prototype.eh=function(a,y,x,b){Ia(this,a,y,x,b)},zt.Object.defineProperties(hs.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||jt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Np(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new sn),b!==null&&x&&qh(b,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()||(Bo(this,!1),this.v())):x&&T1(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=jd;if(vo){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Bm&&(Od(),x=jd),b=qn("img"),b.hn=!0,T1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Bm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new L1),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}}}),hs.prototype.redraw=hs.prototype.redraw,hs.prototype.reloadSource=hs.prototype.hA;var Bm=0,wx=4;hs.className="Picture",jd=new yr,hs.clearCache=Od;function L1(){this.gi=null}function M1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var ee=new ll(null),ne=ee.context,ae=1/y;ee.width=x/y,ee.height=b/y,ee.width!==0&&ee.height!==0&&(y=new N1(ee.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),ne.setTransform(ae*x,0,0,ae*x,0,0),ne.yc(),ne.drawImage(E,0,0),a.gi.push(y))}L1.className="PictureCacheArray";function N1(a,y){this.source=a,this.ratio=y}N1.className="PictureCacheInstance";function Fd(){this.os=new Ln,this.mc=null}Fd.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Ln,this.mc=null};function Dd(a,y,x,b,E,ee){a.mc=new Oo,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=ee||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function bx(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Fd.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new pi(Fo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},Fd.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new pi(Ui);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function wh(a,y,x,b,E,ee,ne){var ae;ae===void 0&&(ae=!1);var ue=new pi(_o);ue.point1X=y,ue.point1Y=x,ue.point2X=b,ue.point2Y=E,ue.endX=ee,ue.endY=ne,ae&&ue.close(),a.mc.segments.add(ue)}function Im(a,y,x,b,E){var ee;ee===void 0&&(ee=!1);var ne=new pi(ds);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,ee&&ne.close(),a.mc.segments.add(ne)}Fd.prototype.arcTo=function(a,y,x,b,E,ee,ne){ee===void 0&&(ee=0),ne===void 0&&(ne=!1);var ae=new pi(wo);ae.startAngle=a,ae.sweepAngle=y,ae.centerX=x,ae.centerY=b,ae.radiusX=E,ae.radiusY=ee!==0?ee:E,ne&&ae.close(),this.mc.segments.add(ae)};function Px(a,y,x,b,E,ee,ne,ae){var ue;ue===void 0&&(ue=!1),y=new pi(ws,ne,ae,y,x,b,E,ee),ue&&y.close(),a.mc.segments.add(y)}function A1(a){var y=Rm;return y!==null?(Rm=null,y.reset(a),y):(y=new Fd,y.reset(a),y)}var Rm=null;Fd.className="StreamGeometryContext";function Na(a,y){var x=a.toLowerCase(),b=Gt.Ze;b[a]=y,b[x]=a}Na("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Ln(Ln.u),b.endX=y,b.endY=x,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("Square",function(a,y,x){a="s"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Ln(Ln.u),b.endX=y,b.endY=x,b.defaultStretch=ur,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("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 b="rr"+y+","+x+","+a,E=Gt.Mf[b];if(E!==void 0)return E;var ee=a*Gt.wg;return E=new Ln().add(new Oo(a,0,!0).add(new pi(Ui,y-a,0)).add(new pi(_o,y,a,y-ee,0,y,ee)).add(new pi(Ui,y,x-a)).add(new pi(_o,y-a,x,y,x-ee,y-ee,x)).add(new pi(Ui,a,x)).add(new pi(_o,0,x-a,ee,x,0,x-ee)).add(new pi(Ui,0,a)).add(new pi(_o,a,0,0,ee,ee,0).close())),1<ee&&(E.spot1=new Mn(0,0,ee,ee),E.spot2=new Mn(1,1,-ee,-ee)),Gt.Nf<Gt.vm&&(Gt.Mf[b]=E,Gt.Nf++),E}),Na("Border","RoundedRectangle"),Na("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Ln(Ln.F),b.endX=y,b.endY=x,b.spot1=uo,b.spot2=Bi,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("Circle",function(a,y,x){a="c"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Ln(Ln.F),b.endX=y,b.endY=x,b.spot1=uo,b.spot2=Bi,b.defaultStretch=ur,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("TriangleRight",function(a,y,x){return new Ln().add(new Oo(0,0).add(new pi(Ui,y,.5*x)).add(new pi(Ui,0,x).close())).pm(0,.25,.5,.75)}),Na("TriangleDown",function(a,y,x){return new Ln().add(new Oo(0,0).add(new pi(Ui,y,0)).add(new pi(Ui,.5*y,x).close())).pm(.25,0,.75,.5)}),Na("TriangleLeft",function(a,y,x){return new Ln().add(new Oo(y,x).add(new pi(Ui,0,.5*x)).add(new pi(Ui,y,0).close())).pm(.5,.25,1,.75)}),Na("TriangleUp",function(a,y,x){return new Ln().add(new Oo(y,x).add(new pi(Ui,0,x)).add(new pi(Ui,.5*y,0).close())).pm(.25,.5,.75,1)}),Na("Triangle","TriangleUp"),Na("Diamond",function(a,y,x){return new Ln().add(new Oo(.5*y,0).add(new pi(Ui,0,.5*x)).add(new pi(Ui,.5*y,x)).add(new pi(Ui,y,.5*x).close())).pm(.25,.25,.75,.75)}),Na("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}),Na("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}),Na("None","Rectangle"),Na("BarH","Rectangle"),Na("BarV","Rectangle"),Na("MinusLine","LineH"),Na("PlusLine",function(a,y,x){return new Ln().add(new Oo(0,x/2,!1).add(new pi(Ui,y,x/2)).add(new pi(Fo,y/2,0)).add(new pi(Ui,y/2,x)))}),Na("XLine",function(a,y,x){return new Ln().add(new Oo(0,x,!1).add(new pi(Ui,y,0)).add(new pi(Fo,0,0)).add(new pi(Ui,y,x)))}),Na("LineRight",function(a,y,x){return new Ln().add(new Oo(.25*y,0,!1).add(new pi(Ui,.75*y,.5*x)).add(new pi(Ui,.25*y,x)))}),Na("LineDown",function(a,y,x){return new Ln().add(new Oo(0,.25*x,!1).add(new pi(Ui,.5*y,.75*x)).add(new pi(Ui,y,.25*x)))}),Na("LineLeft",function(a,y,x){return new Ln().add(new Oo(.75*y,0,!1).add(new pi(Ui,.25*y,.5*x)).add(new pi(Ui,.75*y,x)))}),Na("LineUp",function(a,y,x){return new Ln().add(new Oo(0,.75*x,!1).add(new pi(Ui,.5*y,.25*x)).add(new pi(Ui,y,.75*x)))}),Gt.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 D0(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=hi,this.ir=null,this.jr="",this.lr=Vo,this.Gq="",this.Hq=ki,this.Pq=Pn,this.Kq=Fn,this.Up=null,this.Cq=127,this.zr=Jn,this.yr="gray",this.Vg=4}D0.prototype.copy=function(){var a=new D0;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 Sr(a,y){a===void 0||a instanceof Go||typeof a=="string"?bn.call(this,a):(bn.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 st(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new $t,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Wt(Sr,bn),Sr.prototype.cloneProtected=function(a){bn.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},Qe=Sr.prototype,Qe.Af=function(a){bn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Qe.toString=function(){var a=dr(this.constructor)+"#"+zr(this);return this.data!==null&&(a+="("+Fr(this.data)+")"),a};function cs(a){a.P===null?a.P=new D0:a.P.nc&&(a.P=a.P.copy())}Qe.th=function(){bn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Qe.gk=function(a,y,x,b,E,ee,ne){var ae=this.diagram;ae!==null&&(a===bo&&y==="elements"?E instanceof bn?Zc(E,function(ue){ly(ae.partManager,ue),_c(ae,ue)}):qh(ae,E):a===Eo&&y==="elements"&&(E instanceof bn?Zc(E,function(ue){uy(ae.partManager,ue,ae)}):Np(ae,E)),ae.cb(a,y,x,b,E,ee,ne))},Qe.La=function(a){if(bn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E instanceof bn&&Zc(E,function(ee){ee.data!==null&&ee.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Sr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Sr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Sr.prototype.bh=function(a,y){if(y!==null){var x=null,b=this.Qf;if(b!==null&&(x=b.I(a)),x!==y){if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}b===null&&(this.Qf=b=new tn),y.Tf!==a&&(y.category=a),b.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)))}}},Sr.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Sr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=ir();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Un(y)}},Sr.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()}e:{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 Br?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof gi))break e;ul(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=bn.Link),x.adornedObject=y)}if(x!==null){x.type===bn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},Sr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function B0(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 _m(a){if(rc(a)===!1){R0(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function j1(a){if(a.G|=2097152,rc(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=$t.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),$t.free(b),R0(a,!1)}}Sr.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new jr);var ee=this.Lb;ee.reset(),this.no(ee,a,y,x,b),this.Lb=ee,ee.ws()||ee.pp(E)},Sr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var ee=ai;this.locationSpot.sb()&&(ee=this.locationSpot);var ne=st.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ne.yi(x.x,x.y,x.width,x.height,ee),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),ee=y.panel;ee!==null&&ee!==this;)ee.Lb!==null&&ee.Lb.Ga(ne),ne.offset(-ee.measuredBounds.x,-ee.measuredBounds.y),ee=ee.panel;else ne.yi(y,x,b,E,ee);a.rotate(this.Kb,ne.x,ne.y),st.free(ne)}},Sr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Sr.prototype.moveTo=function(a,y,x){a=st.allocAt(a,y),this.move(a,x),st.free(a)},Sr.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())},Sr.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())},Sr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new tn),y.I(a)!==null)return y.I(a);var x=bn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function bh(a,y,x,b){b===void 0&&(b=new st),x=x.Mc()?ai:x;var E=y.naturalBounds;if(b.h(E.width*x.x+x.offsetX,E.height*x.y+x.offsetY),y===null||y===a)return b;for(y.transform.Ga(b),y=y.panel;y!==null&&y!==a;)y.transform.Ga(b),y=y.panel;return a.Lb!==null&&a.Lb.Ga(b),b.offset(-a.uc.x,-a.uc.y),b}Sr.prototype.mi=function(a){return a===void 0&&(a=new $t),a.assign(this.actualBounds)},Sr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=st.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof Ur?x.strokeWidth:0;if(y.yi(0,0,b.width+E,b.height+E,a.locationSpot),x!==a)for(y.offset(-E/2,-E/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 Jc(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=h1(a));var b=a.ag,E=2*b;if(!a.isShadowed)return x.h(y.x-1-b,y.y-1-b,y.width+2+E,y.height+2+E),x;b=y.x,E=y.y;var ee=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,ee+=ne,y+=ne,b-=ne/2,E-=ne/2,0<a.x?ee+=a.x:(b+=a.x,ee-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,ee+2,y+2),x}Sr.prototype.arrange=function(){if(Xa(this)===!1)j1(this);else{pu(this,!1);var a=this.Ib,y=$t.alloc();y.assign(a);var x=ic(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;D1(this,b,this.location),a.ka(),a.x=b.x,a.y=b.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||Gt.B(y.width,a.width)&&Gt.B(y.height,a.height)||0<=this.vw&&this.C(16),$t.free(y),R0(this,!1)}},Qe=Sr.prototype,Qe.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=$t.alloc();E.assign(x.documentBounds),E.Fv(x.padding),a.x>E.x&&a.y>E.y&&a.right<E.right&&a.bottom<E.bottom&&y.x>E.x&&y.y>E.y&&y.right<E.right&&y.bottom<E.bottom&&(b=!0),$t.free(E)}!(this.G&65536)&&a.D(y)||R1(this,b,x),x.N(),!a.w()&&!y.w()||Ci(a,y)||(this instanceof _n&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Qe.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&F1(this,b,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||b!==null&&!b.animationManager.isTicking&&b.undoManager.isUndoingRedoing||(b=this.ke,this.ke=new st(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),rc(this)===!1&&Xa(this)===!1&&(_m(this),j1(this)),!0};function F1(a,y,x,b,E){y===null||a instanceof gi||(y=y.animationManager,y.zb&&ad(y,a,new st(b,E),x))}Qe.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;rc(this)||Xa(this)?E.h(NaN,NaN):E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}else{if(E.x===a&&E.y===y)return;b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}_m(this)},Qe.Av=function(){this.G&=-2097153,_m(this)};function D1(a,y,x){var b=O1(a),E=a.diagram,ee=x.w(),ne=y.w();ee&&ne?a.G&2097152?B1(a,y,x,E,b):I1(a,y,x,E,b):ee?B1(a,y,x,E,b):ne&&I1(a,y,x,E,b),a.G|=2097152,st.free(b),a.Uk()}function B1(a,y,x,b,E){var ee=y.x,ne=y.y;y.h(x.x-E.x,x.y-E.y),b!==null&&(x=b.animationManager,(b=x.defaultAnimation.isAnimating)||!x.zb||a instanceof gi||ad(x,a,new st(ee,ne),y),b||y.x===ee&&y.y===ne||a.g("position",new st(ee,ne),y.copy()))}function I1(a,y,x,b,E){var ee=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(ee)||b===null||a.g("location",ee,x.copy())}function R1(a,y,x){_0(a,!1),a instanceof _n&&gh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?ic(a)?(Gi(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Qe.si=function(){return!0},Qe.Zc=function(){return!0},Qe.ph=function(){return!1},Qe.Dd=function(){return!0};function I0(a,y,x,b){y.constructor===a.constructor||G1||(G1=!0,Yn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Yn(" Old class: "+dr(a.constructor)+", new class: "+dr(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var ee=a.isSelected,ne=a.isHighlighted,ae=!0,ue=!0,ge=!1;a instanceof _n&&(ae=a.isTreeLeaf,ue=a.isTreeExpanded,ge=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=b,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,b=!0,y!==null&&(b=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=E,a.G=ee?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof _n&&(a.U=ae?a.U|4:a.U&-5,a.U=ue?a.U|1:a.U&-2,a.U=ge?a.U|2:a.U&-3),E!==null&&a.La(),E=a.layerName,E!==x&&(a.Jg=x,a.layerName=E),y!==null&&(y.skipsUndoManager=b),a.Zc()&&a.C(64)}Sr.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},Sr.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},Sr.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},Sr.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},Sr.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},Sr.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},Sr.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},Sr.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},Sr.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 rc(a){return(a.G&32768)!==0}function R0(a,y){a.G=y?a.G|32768:a.G&-32769}function _0(a,y){a.G=y?a.G|65536:a.G&-65537}function ic(a){return(a.G&131072)!==0}Qe=Sr.prototype,Qe.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function zm(a,y){a.G=y?a.G|1048576:a.G&-1048577}Qe.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Qe.N=function(){var a=this.diagram;a!==null&&!Xa(this)&&!rc(this)&&this.isVisible()&&this.Ib.w()&&a.N(Jc(this,this.Ib))},Qe.v=function(){bn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof _n&&this.labeledLink!==null&&Za(this.labeledLink),a.$b(!0))},Qe.Vo=function(a){a||(a=this.Ah,a!==null&&K0(a,this))},Qe.Wo=function(a){a||(a=this.Ah,a!==null&&V0(a,this))},Qe.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Qe.oz=function(){return z0(this,this)};function z0(a,y){var x=y.containingGroup;return x!==null?1+z0(a,x):y instanceof _n&&(y=y.labeledLink,y!==null)?z0(a,y):0}Qe.sz=function(){return _1(this,this)};function _1(a,y){var x=y.containingGroup;return x!==null||y instanceof _n&&(x=y.labeledLink,x!==null)?_1(a,x):y}Qe.Td=function(a){return a instanceof Br?G0(this,this,a):!1};function G0(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!G0(a,b,x)?y instanceof _n&&(y=y.labeledLink,y!==null)?G0(a,y,x):!1:!0}Qe.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Br&&zm(y,!0),y instanceof _n){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 _n&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Br&&zm(y,!1),y instanceof _n&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Sr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof _n&&this.isLinkLabel)},Sr.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 _n&&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 z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function oc(a,y,x,b,E,ee){if(ee===void 0&&(ee=null),!(a.contains(y)||ee!==null&&!ee(y)||y instanceof gi)){if(a.add(y),y instanceof _n){if(x&&y instanceof Br)for(var ne=y.memberParts;ne.next();)oc(a,ne.value,x,b,E,ee);if(E!==!1)for(ne=y.linksConnected;ne.next();){var ae=ne.value;if(!a.contains(ae)){var ue=ae.fromNode,ge=ae.toNode;ue=ue===null||a.contains(ue),ge=ge===null||a.contains(ge),(E?ue&&ge:ue||ge)&&oc(a,ae,x,b,E,ee)}}if(1<b)for(y=y.Ou();y.next();)oc(a,y.value,x,b-1,E,ee)}else if(y instanceof Tn)for(y=y.labelNodes;y.next();)oc(a,y.value,x,b,E,ee)}}zt.Object.defineProperties(Sr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?ri: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 b=y.pc(-1,this,!0);if(0<=b&&x.cb(Eo,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(bo,"parts",a,null,this,!0,b),b=this.layerChanged,b!==null){var E=x.aa;x.aa=!0,b(this,y,a),x.aa=E}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(cs(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&&ud(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 gi?this.type!==bn.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:Pn},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),cs(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Fn},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),cs(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&&(cs(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:ki},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),cs(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,b=this.ke;if(!(b.x===y||isNaN(b.x)&&isNaN(y))||!(b.y===x||isNaN(b.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,Xa(this)===!1&&(_m(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var ee=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),F1(this,E,x,ee.x,ee.y),this.g("position",ee,x.copy())}}y=!0}y&&this.g("location",b,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,b=this.data,E=null;if(x!==null&&b!==null&&!(this instanceof gi)){var ee=x.model.undoManager;ee.isEnabled&&!ee.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof gi?this instanceof gi&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(ee=x.model,ee.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(ul(x),x=x.copy(),x!==null&&I0(this,x,y,a))):(ee!==null&&ee.jm(b,a),x=fS(x.partManager,b,a),x!==null&&(ul(x),x=x.copy(),x===null||x instanceof Tn||(b=this.location.copy(),I0(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){I0(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 b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(cs(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&&(cs(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&&(cs(this),this.P.tr=a,this.g("selectionAdornmentTemplate",y,a))}},selectionObject:{get:function(){if(this.Ug===null){var a=this.selectionObjectName;a!==null&&a!==""?(a=this.fb(a),a!==null?this.Ug=a:this.Ug=this):this instanceof Tn?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(cs(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&&(cs(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&&(cs(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:hi},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),cs(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&&(cs(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&&(cs(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:Vo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),cs(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&&jt("Cannot make a Group a member of itself: "+this.toString()),jt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?V0(y,this):this instanceof Br&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?K0(a,this):this instanceof Br&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var b=this.data,E=x.model;if(b!==null&&E.Xj()){var ee=E.wa(a!==null?a.data:null);E.mp(b,ee)}}if(b=this.containingGroupChanged,b!==null&&(E=!0,x!==null&&(E=x.aa,x.aa=!0),b(this,y,a),x!==null&&(x.aa=E)),this instanceof Br){for(x=new sn,oc(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof _n)for(b=b.linksConnected;b.next();)Bd(b.value)}if(this instanceof _n){for(x=this.linksConnected;x.next();)Bd(x.value);x=this.labeledLink,x!==null&&Bd(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&ud(y,-1,a))}}else jt("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&&(cs(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof _n&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(cs(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&&(cs(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Jn},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),cs(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&&(cs(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&&(cs(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Sr.prototype.invalidateLayout=Sr.prototype.C,Sr.prototype.findCommonContainingGroup=Sr.prototype.px,Sr.prototype.isMemberOf=Sr.prototype.Td,Sr.prototype.findTopLevelPart=Sr.prototype.sz,Sr.prototype.findSubGraphLevel=Sr.prototype.oz,Sr.prototype.ensureBounds=Sr.prototype.Va,Sr.prototype.getDocumentBounds=Sr.prototype.mi,Sr.prototype.findObject=Sr.prototype.fb,Sr.prototype.moveTo=Sr.prototype.moveTo,Sr.prototype.invalidateAdornments=Sr.prototype.Wb,Sr.prototype.clearAdornments=Sr.prototype.Ej,Sr.prototype.removeAdornment=Sr.prototype.Jf,Sr.prototype.addAdornment=Sr.prototype.bh,Sr.prototype.findAdornment=Sr.prototype.Pj,Sr.prototype.updateTargetBindings=Sr.prototype.La;var G1=!1;Sr.className="Part",Sr.LayoutNone=0,Sr.LayoutAdded=1,Sr.LayoutRemoved=2,Sr.LayoutShown=4,Sr.LayoutHidden=8,Sr.LayoutNodeSized=16,Sr.LayoutGroupLayout=32,Sr.LayoutNodeReplaced=64,Sr.LayoutStandard=127,Sr.LayoutAll=16777215;function gi(a,y){a===void 0||a instanceof Go||typeof a=="string"?Sr.call(this,a):(Sr.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)}Wt(gi,Sr),gi.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},gi.prototype.updateRelationshipsFromData=function(){},gi.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Tn&&y instanceof Ur){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var b=0;b<y;b++){var E=x[b];E.isPanelMain&&E instanceof Ur&&(E.ua=a)}}},gi.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Xa(a))},gi.prototype.Zc=function(){return!1},gi.prototype.gk=function(a,y,x,b,E,ee,ne){if(a===bo&&y==="elements"){if(E instanceof Ja)this.$a===null&&(this.$a=E);else if(E instanceof bn){var ae=E.Nl(function(ue){return ue instanceof Ja});ae instanceof Ja&&this.$a===null&&(this.$a=ae)}}else a===Eo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof bn&&this.$a.rg(b)&&(this.$a=null));Sr.prototype.gk.call(this,a,y,x,b,E,ee,ne)},gi.prototype.updateAdornments=function(){},gi.prototype.Lj=function(){},zt.Object.defineProperties(gi.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}}}),gi.className="Adornment";function U0(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Ei,this.er=Hm,this.Kr=this.ij=this.Nq=this.Mq=null}U0.prototype.copy=function(){var a=new U0;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 _n(a,y){a===void 0||a instanceof Go||typeof a=="string"?Sr.call(this,a):(Sr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new rn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Wt(_n,Sr),_n.prototype.cloneProtected=function(a){Sr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Qe=_n.prototype,Qe.Af=function(a){Sr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Ph(a){a.Ba===null?a.Ba=new U0:a.Ba.nc&&(a.Ba=a.Ba.copy())}Qe.th=function(){Sr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new sn),a.af.add(y))}function H1(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var ee=E.value;if(ee.Ds===a&&ee.cv===y&&ee.Ox===x&&ee.Px===b||ee.Ds===y&&ee.cv===a&&ee.Ox===b&&ee.Px===x)return ee}return null}Qe.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=H1(this,a,y,x),a!==null&&a.Sl()},Qe.gk=function(a,y,x,b,E,ee,ne){a===bo&&y==="elements"?this.wc=null:a===Eo&&y==="elements"&&(this.wc=null),Sr.prototype.gk.call(this,a,y,x,b,E,ee,ne)},Qe.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Cs(x.fromPort),Cs(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Cs(x.fromPort),Cs(x.toPort),x.bb())}}function Cs(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Cs(y.port)}}Qe.si=function(){return!0},_n.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},_n.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},_n.prototype.isVisible=function(){if(!Sr.prototype.isVisible.call(this))return!1;var a=!0,y=vh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===vh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Do){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===wd&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(b){return!b.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},_n.prototype.Zb=function(a){Sr.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var b=x.To(this);b===null||b.Td(this.containingGroup)||x.bb()}x.Zb(a)}},_n.prototype.qx=function(){var a=new sn,y=new sn;return K1(this,this,a,y),y.iterator};function K1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,ee=a.diagram;ee!==null&&(E=ee.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(E?ne.fromNode===y:ne.toNode===y)&&K1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}_n.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Jr(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},Qe=_n.prototype,Qe.Mo=function(a){a===void 0&&(a=null);var y=new Jr(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},Qe.Sd=function(a){a===void 0&&(a=null);var y=new Jr(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},Qe.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode===this?(a===null||E.fromPortId===a)&&(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new sn,y.add(x),y.add(E)):x=E):E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new sn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Yr(x):ri},Qe.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode!==this||a!==null&&E.fromPortId!==a||(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new sn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Yr(x):ri},Qe.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new sn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Yr(x):ri},Qe.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Jr(this.jb),E=this;return b.predicate=function(ee){return!((ee.fromNode!==E||ee.toNode!==a||y!==null&&ee.fromPortId!==y||x!==null&&ee.toPortId!==x)&&(ee.fromNode!==a||ee.toNode!==E||x!==null&&ee.fromPortId!==x||y!==null&&ee.toPortId!==y))},b},Qe.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Jr(this.jb),E=this;return b.predicate=function(ee){return!(ee.fromNode!==E||ee.toNode!==a||y!==null&&ee.fromPortId!==y||x!==null&&ee.toPortId!==x)},b};function Gm(a,y,x){Cs(x);var b=a.jb.contains(y);if(b||a.jb.add(y),!b||y.fromNode===y.toNode){var E=a.linkConnected;if(E!==null){var ee=!0,ne=a.diagram;ne!==null&&(ee=ne.aa,ne.aa=!0),E(a,y,x),ne!==null&&(ne.aa=ee)}}!b&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(b=!0,a=a.diagram,a!==null&&(b=a.isTreePathToChildren),E=b?y:x,ee=b?x:y,E.ci||(E.ci=ee),!ee.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===ee&&(ee.isTreeLeaf=!1):y===ee&&(ee.isTreeLeaf=!1))))}function Um(a,y,x){Cs(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var ee=a.linkDisconnected;if(E=a.diagram,ee!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),ee(a,y,x),E!==null&&(E.aa=ne)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.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,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):$p(y)))}function $p(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 b=x.value;if(b.isTreeLink){if(y){if(b.fromNode===a){a.isTreeLeaf=!1;return}}else if(b.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}_n.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Qe=_n.prototype,Qe.Vo=function(a){Sr.prototype.Vo.call(this,a),a||($p(this),a=this.Yk,a!==null&&eS(a,this))},Qe.Wo=function(a){Sr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Qe.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 b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,Sr.prototype.Lj.call(this)},Qe.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;V1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function V1(a){a.wc===null?a.wc=new tn:a.wc.clear(),a.qm(a,function(y,x){Z1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function Z1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function H0(a,y,x){var b=y.portId;if(b!==null&&(a.wc!==null&&a.wc.remove(b),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(b);a.next();)b=a.value,x===null&&(x=ir()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Un(x)}}}Qe.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 b=x.jb.iterator;b.next();){var E=b.value;if(E.isTreeLink&&(y=E.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,b=x.jb.iterator;b.next()&&(E=b.value,!E.isTreeLink||(y=E.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},Qe.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 b=x.value;if(b.isTreeLink&&(a=b.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()&&(b=x.value,!b.isTreeLink||(a=b.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},Qe.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)zm(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;)zm(y,!1),y=y.pg();return x},Qe.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},Qe.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof _n)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},Qe.vz=function(){function a(x,b){b.add(x);var E=x.kh();E!==null&&(b.add(E),x=x.pg(),x!==null&&a(x,b))}var y=new sn;return a(this,y),y},Qe.uz=function(){return X1(this,this)};function X1(a,y){return y=y.pg(),y===null?0:1+X1(a,y)}Qe.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Jr(this.jb);var x=this;return y.predicate=a?function(b){return!!(b.isTreeLink&&b.fromNode===x)}:function(b){return!!(b.isTreeLink&&b.toNode===x)},y},Qe.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,b=this.jb.iterator;if(a)for(;b.next();)a=b.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new rn,y.add(x),y.add(a)):x=a);else for(;b.next();)a=b.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new rn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Yr(x):ri},Qe.wz=function(a){a===void 0&&(a=1/0);var y=new sn;return oc(y,this,!1,a,!0),y},_n.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 sn;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===vh),y.Ue=!1}};function Y1(a,y,x,b,E,ee,ne){if(1<b)for(var ae=x?a.Mo():a.Sd();ae.next();){var ue=ae.value;ue.isTreeLink&&(ue=ue.To(a),ue===null||ue===a||y.contains(ue)||(y.add(ue),Y1(ue,y,x,b-1,E,ee,ne)))}else J1(a,y,x,E,ee,ne)}function J1(a,y,x,b,E,ee){for(var ne=E===a?!0:a.isTreeExpanded,ae=x?a.Mo():a.Sd(),ue={};ae.next();){var ge=ae.value;if(ge.isTreeLink&&(ge=ge.To(a),ge!==null&&ge!==a)){var ye=y.contains(ge);if(ye||y.add(ge),ne){var Le=x?ge.Oo():ge.Po();ue.uv=a,Le.all(function(ze){return function(Ke){return Ke===ze.uv||!Ke.isTreeExpanded}}(ue))&&b.Aj(ge,E),ge.oh(),ge.Zb(!1)}ge.isTreeExpanded&&(ge.wasTreeExpanded=ge.isTreeExpanded,ye||J1(ge,y,x,b,E,ee))}ue={uv:ue.uv}}a.isTreeExpanded=!1}_n.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 sn;x.add(this),Q1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===vh),y.Ue=!1}};function Q1(a,y,x,b,E,ee,ne){for(var ae=ee===a?!1:a.isTreeExpanded,ue=x?a.Mo():a.Sd(),ge={};ue.next();){var ye=ue.value;if(ye.isTreeLink&&(ae||ye.fd||ye.bb(),ye=ye.To(a),ye!==null&&ye!==a&&!y.contains(ye))){if(y.add(ye),!ae){ye.Zb(!0),ye.oh();var Le=x?ye.Oo():ye.Po();ge.vv=a,Le.all(function(ze){return function(Ke){return Ke===ze.vv||!Ke.isTreeExpanded}}(ge))&&E.Cj(ye,ee)}(2<b||ye.wasTreeExpanded)&&(ye.wasTreeExpanded=!1,Q1(ye,y,x,b-1,E,ee,ne))}ge={vv:ge.vv}}a.isTreeExpanded=!0}zt.Object.defineProperties(_n.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Hm},set:function(a){var y=this.portSpreading;y!==a&&(Ph(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&&gh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Ei},set:function(a){typeof a=="number"&&(a=new Gr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Ph(this),this.Ba.yp=a;var x=this.diagram;x!==null&&gh(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&&(Ph(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&&(Ph(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&&(Ph(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,b=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&b!==null&&!x.undoManager.isUndoingRedoing){var E=y.data,ee=x.model;if(E!==null&&ee.ri()){var ne=ee.wa(b);ne!==void 0&&ee.Qx(E,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(eS(a,this),x===null||b===null||x.undoManager.isUndoingRedoing||(E=a.data,x=x.model,E!==null&&x.ri()&&(b=x.wa(b),b!==void 0&&x.Bu(E,b))),this.containingGroup=a.containingGroup),Za(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&V1(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 b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}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&&(Ph(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))}}}),_n.prototype.expandTree=_n.prototype.expandTree,_n.prototype.collapseTree=_n.prototype.collapseTree,_n.prototype.findTreeParts=_n.prototype.wz,_n.prototype.findTreeChildrenNodes=_n.prototype.Ou,_n.prototype.findTreeChildrenLinks=_n.prototype.Qo,_n.prototype.findTreeLevel=_n.prototype.uz,_n.prototype.findTreeParentChain=_n.prototype.vz,_n.prototype.findTreeParentNode=_n.prototype.pg,_n.prototype.findTreeParentLink=_n.prototype.kh,_n.prototype.findCommonTreeParent=_n.prototype.gz,_n.prototype.findTreeRoot=_n.prototype.xz,_n.prototype.isInTreeOf=_n.prototype.Nz,_n.prototype.findPort=_n.prototype.ns,_n.prototype.findLinksTo=_n.prototype.kz,_n.prototype.findLinksBetween=_n.prototype.jz,_n.prototype.findNodesInto=_n.prototype.Oo,_n.prototype.findNodesOutOf=_n.prototype.Po,_n.prototype.findNodesConnected=_n.prototype.Mu,_n.prototype.findLinksInto=_n.prototype.Sd,_n.prototype.findLinksOutOf=_n.prototype.Mo,_n.prototype.findExternalTreeLinksConnected=_n.prototype.qx,_n.prototype.invalidateConnectedLinks=_n.prototype.Bd,_n.prototype.invalidateLinkBundle=_n.prototype.Lz;var Ex=new an(_n,"SpreadingNone",10),Hm=new an(_n,"SpreadingEvenly",11),W0=new an(_n,"SpreadingPacked",12);_n.className="Node",_n.SpreadingNone=Ex,_n.SpreadingEvenly=Hm,_n.SpreadingPacked=W0;function Br(a,y){a===void 0||a instanceof Go||typeof a=="string"?_n.call(this,a):(_n.call(this),a&&(y=a)),this.U|=4608,this.Gn=new sn,this.$a=null,this.Sc=new so,this.Sc.group=this,this.gl=new sn,this.tb=this.$p=null,y&&Object.assign(this,y)}Wt(Br,_n),Br.prototype.cloneProtected=function(a){_n.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ja});y instanceof Ja?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())},Qe=Br.prototype,Qe.Af=function(a){_n.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 _n)x.Bd(y);else if(x instanceof Tn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Qe.gk=function(a,y,x,b,E,ee,ne){if(a===bo&&y==="elements"){if(E instanceof Ja)this.$a===null?this.$a=E:this.$a!==E&&jt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof bn){var ae=E.Nl(function(ue){return ue instanceof Ja});ae instanceof Ja&&(this.$a===null?this.$a=ae:this.$a!==ae&&jt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Eo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof bn&&this.$a.rg(b)&&(this.$a=null));_n.prototype.gk.call(this,a,y,x,b,E,ee,ne)},Qe.Xl=function(a,y){_n.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==bn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof bn&&(a=a.Pb()),this.tb===null&&(this.tb=new $t),a.mi(this.tb),a instanceof Ur&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Qe.eh=function(a,y,x,b){this.nf=this.$a,_n.prototype.eh.call(this,a,y,x,b)},Qe.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Tn||y.Va()}),_n.prototype.Va.call(this)},Qe.si=function(){if(!_n.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof _n){if(y.isVisible()&&Xa(y))return!1}else if(y instanceof Tn&&y.isVisible()&&Xa(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function K0(a,y){if(a.Gn.add(y)){y instanceof Br&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof Tn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function V0(a,y){if(a.Gn.remove(y)){y instanceof Br&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof Tn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Qe.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)}_n.prototype.Lj.call(this)},Br.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=nn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Br.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=nn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Br.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))},Qe=Br.prototype,Qe.Bd=function(a){var y=(this.U&65536)!==0;if(_n.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 b=x.fromNode;b!==null&&b!==this&&b.Td(this)&&!b.isVisible()?(Cs(x.fromPort),Cs(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Cs(x.fromPort),Cs(x.toPort),x.bb()))}}},Qe.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 sn,b=y.iterator;b.next();){var E=b.value;if(E instanceof _n)for(E=E.linksConnected;E.next();){var ee=E.value;y.contains(ee)||x.add(ee)}}return a&&(this.$p=x),x.iterator},Qe.iz=function(){var a=this.Rj();a.add(this);for(var y=new sn,x=a.iterator;x.next();){var b=x.value;if(b instanceof _n)for(b=b.linksConnected;b.next();){var E=b.value,ee=E.fromNode;ee===null||a.contains(ee)&&ee!==this||y.add(ee),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},Qe.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new sn;return a(this,y),y},Qe.Rj=function(){var a=new sn;return oc(a,this,!0,0,!0),a.remove(this),a},Qe.Zb=function(a){_n.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Br.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();$1(this,y,a,this),a.Ue=!1}};function $1(a,y,x,b){for(var E=a.memberParts;E.next();){var ee=E.value;if(ee.Zb(!1),ee instanceof Br&&ee.isSubGraphExpanded&&(ee.wasSubGraphExpanded=ee.isSubGraphExpanded,$1(ee,y,x,b)),ee instanceof _n)ee.Bd(y),x.Aj(ee,b);else if(ee instanceof Tn)for(ee=ee.labelNodes;ee.next();)ee.value.Bd(y)}a.isSubGraphExpanded=!1}Br.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();q1(this,y,a,this),a.Ue=!1}};function q1(a,y,x,b){for(var E=a.memberParts;E.next();){var ee=E.value;if(ee.Zb(!0),ee instanceof Br&&ee.wasSubGraphExpanded&&(ee.wasSubGraphExpanded=!1,q1(ee,y,x,b)),ee instanceof _n)ee.Bd(y),x.Cj(ee,b);else if(ee instanceof Tn)for(ee=ee.labelNodes;ee.next();)ee.value.Bd(y)}a.isSubGraphExpanded=!0}Br.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,b=x.x;x=x.y;var E=a.x,ee=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===ee||isNaN(x)&&isNaN(ee))){for(b=E-(isNaN(b)?0:b),x=ee-(isNaN(x)?0:x),ee=st.alloc(),_n.prototype.move.call(this,a,y),a=new sn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Tn&&(E.suspendsRouting&&a.add(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(E.suspendsRouting=!0);for(y.reset();y.next();)if(E=y.value,!(E.ph()||E instanceof _n&&E.isLinkLabel)){var ne=E.position,ae=E.location;ne.w()?(ee.x=ne.x+b,ee.y=ne.y+x,E.position=ee):ae.w()&&(ee.x=ae.x+b,ee.y=ae.y+x,E.location=ee)}for(y.reset();y.next();)E=y.value,E instanceof Tn&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(ne=E.position,ee.x=ne.x+b,ee.y=ne.y+x,ee.w()?E.move(ee):E.bb(),X0(E)&&E.bb());st.free(ee)}},zt.Object.defineProperties(Br.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&&jt("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&&(Ph(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&&(Ph(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&&(Ph(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 b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(E){E.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&&(Ph(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)}}}),Br.prototype.expandSubGraph=Br.prototype.expandSubGraph,Br.prototype.collapseSubGraph=Br.prototype.collapseSubGraph,Br.prototype.findSubGraphParts=Br.prototype.Rj,Br.prototype.findContainingGroupChain=Br.prototype.hz,Br.prototype.findExternalNodesConnected=Br.prototype.iz,Br.prototype.findExternalLinksConnected=Br.prototype.Lu,Br.prototype.ensureBounds=Br.prototype.Va,Br.className="Group";function Ja(a){_t.call(this),this.yb=Qo,this.ko=new $t(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Wt(Ja,_t),Ja.prototype.cloneProtected=function(a){_t.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ja.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return qi(0,0,y.width,y.height,a.x,a.y)},Ja.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Br||a instanceof gi)||jt("Placeholder is not inside a Group or Adornment."),a instanceof Br){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(yi(b,(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,b.width,b.height),b=a.memberParts,x=!1;b.next();)if(b.value.isVisible()){x=!0;break}b=a.diagram,!x||b===null||b.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=st.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),st.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,ee=a.adornedObject;a.angle=ee.li();var ne=0;ee instanceof Ur&&(ne=ee.strokeWidth);var ae=ee.Df(),ue=ee.naturalBounds,ge=(ue.width+ne)*ae;ne=(ue.height+ne)*ae,a.type!==bn.Link&&(ae=ee.ga(a.category==="Selection"?ki:a.locationSpot,st.alloc()),a.location=ae,st.free(ae)),isNaN(ge)||isNaN(ne)?(a=ee.ga(ki,st.alloc()),ge=$t.allocAt(a.x,a.y,0,0),ge.Ye(ee.ga(io,a)),ge.Ye(ee.ga(ba,a)),ge.Ye(ee.ga(Ko,a)),yi(y,ge.width+b||0,ge.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),st.free(a),$t.free(ge)):(yi(y,ge+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ja.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Ja.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Br&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var E=x.toolManager.findTool("Dragging");if(E===x.currentTool&&(x=E.computeBorder(y,this.ko,a),x!==null))return x}x=$t.alloc(),E=this.computeMemberBounds(x);var ee=this.yb;return y instanceof Br&&!y.isSubGraphExpanded?a.h(E.x-ee.left,E.y-ee.top,0,0):a.h(E.x-ee.left,E.y-ee.top,Math.max(E.width+ee.left+ee.right,0),Math.max(E.height+ee.top+ee.bottom,0)),$t.free(x),b&&y instanceof Br&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ja.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Br))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,ee=-1/0,ne=y.memberParts;ne.next();){var ae=ne.value;if(ae.isVisible()){if(ae instanceof Tn&&(!y.computesBoundsIncludingLinks||Bs(ae)||ae.fromNode===y||ae.toNode===y))continue;ae=ae.actualBounds,ae.left<x&&(x=ae.left),ae.top<b&&(b=ae.top),ae.right>E&&(E=ae.right),ae.bottom>ee&&(ee=ae.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,ee-b):(y=y.location,a.h(y.x,y.y,0,0)),a},zt.Object.defineProperties(Ja.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Gr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ja.className="Placeholder";function Tn(a){Sr.call(this,bn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Qa,this.Om=0,this.Qm=Qa,this.Rm=NaN,this.qj=Q0,this.po=.5,this.wd=null,this.Nb=new rn().freeze(),this.Tg=this.Mg=null,this.ml=new $t,this.ua=new Ln,this.u=this.o=this.Sf=this.Wf=null,this.su=new st,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Wt(Tn,Sr),Tn.prototype.cloneProtected=function(a){Sr.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())},Qe=Tn.prototype,Qe.Af=function(a){Sr.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&&Cs(y),a=a.toPort,a!==null&&Cs(a)},Qe.qb=function(a){a.classType===Tn?(a.value&2)===2?this.routing=a:a===Rs||a===Eh||a===Rd?this.curve=a:a===tg||a===Ym||a===Jm?this.adjusting=a:a!==Q0&&a!==Qa&&jt("Unknown Link enum value for a Link property: "+a):Sr.prototype.qb.call(this,a)},Qe.Xc=function(){this.ba===null&&(this.ba=new Gp)},Qe.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Xa(a)||rc(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Xa(a)||rc(a)))},Qe.zv=function(){return!1},Qe.Av=function(){},Qe.Zc=function(){return!1},Tn.prototype.computeAngle=function(a,y,x){return Tn.computeAngle(y,x)},Tn.computeAngle=function(a,y){switch(a){default:case Qa:a=0;break;case ng:a=y;break;case rg:a=y+90;break;case ig:a=y-90;break;case $0:a=y+180;break;case Qm:a=Gt.bp(y),90<a&&270>a&&(a-=180);break;case og:a=Gt.bp(y+90),90<a&&270>a&&(a-=180);break;case ag:a=Gt.bp(y-90),90<a&&270>a&&(a-=180);break;case $m:if(a=Gt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Gt.bp(a)};function Bd(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&V0(x,a),a.Ah=y,y!==null&&K0(y,a);var E=a.containingGroupChanged;if(E!==null){var ee=!0,ne=a.diagram;ne!==null&&(ee=ne.aa,ne.aa=!0),E(a,x,y),ne!==null&&(ne.aa=ee)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}Qe=Tn.prototype,Qe.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Sr.prototype.oh.call(this)},Qe.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Qe.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new sn),a.wd.add(y),a.v()}Qe.Vo=function(a){if(Sr.prototype.Vo.call(this,a),Qc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Gm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Gm(x,this,b)}qp(this)}},Qe.Wo=function(a){if(Sr.prototype.Wo.call(this,a),Qc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Um(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Um(x,this,b)}eg(this)}},Qe.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},Tn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Tn.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?Sr.prototype.move.call(this,a,!1):(a=st.allocAt(x.x+b,x.y+E),Sr.prototype.move.call(this,a,!1),st.free(a)),Ch(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},Tn.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},Tn.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},Tn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(ar),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),b=this.i(1);return a.h((x.x+b.x)/2,(x.y+b.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Rs))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()===Rs){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Gt.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var ee=this.i(x+2);x=this.i(x+3),Gt.ax(b.x,b.y,E.x,E.y,ee.x,ee.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,E=ee=b=0;b<x/2&&ee<y&&(E=ne[ee],!(b+E>x/2));)b+=E,ee++;return y=this.i(ee),ee=this.i(ee+1),1>Math.abs(y.x-ee.x)?y.y>ee.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-ee.y)?y.x>ee.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(ee.x-y.x),y.y+x*(ee.y-y.y))),a},Tn.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(a===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Rs))return this.ua.wx(.5);if(this.computeCurve()===Rs&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var b=this.i(x+2);return x=this.i(x+3),Gt.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,b=this.flattenedTotalLength;var E=0;x=0;for(var ee;E<b/2&&x<a&&(ee=y[x],!(E+ee>b/2));)E+=ee,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},Qe=Tn.prototype,Qe.i=function(a){return this.Nb.s[a]},Qe.dd=function(a,y){this.Nb.cd(a,y)},Qe.L=function(a,y,x){this.Nb.cd(a,new st(y,x))},Qe.Kz=function(a,y){this.Nb.Gb(a,y)},Qe.m=function(a,y,x){this.Nb.Gb(a,new st(y,x))},Qe.ne=function(a){this.Nb.add(a)},Qe.yf=function(a,y){this.Nb.add(new st(a,y))},Qe.pv=function(a){this.Nb.mb(a)},Qe.Fj=function(){this.Nb.clear()};function Ch(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var b=a.fd,E=new rn,ee=a.Nb.iterator;ee.next();){var ne=ee.value;E.add(new st(ne.x+y,ne.y+x).freeze())}E.freeze(),ee=a.Nb,a.Nb=E,ne=a.diagram,isNaN(y)||isNaN(x)||ne!==null&&ne.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),Za(a)),b?Wm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&ld(ne.animationManager,a,E),a.g("points",ee,E)}}Qe.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Qe.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,ee=E.length,ne=0;ne<ee;ne++){var ae=E[ne];x=Math.min(ae.x,x),b=Math.min(ae.y,b)}ae=ne=1/0;for(var ue=y.s,ge=ue.length,ye=0;ye<ge;ye++){var Le=ue[ye];ne=Math.min(Le.x,ne),ae=Math.min(Le.y,ae),Le.freeze()}if(y.freeze(),ge===ee){for(ee=0;ee<ge;ee++)if(ye=E[ee],Le=ue[ee],ye.x-x!==Le.x-ne||ye.y-b!==Le.y-ae){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ld(x.animationManager,this,y),Wm(this),this.g("points",a,y)}},Qe.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Wm(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),Xm(a,!1))}Qe.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())}},Qe.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},Tn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(If||(If=new _n,If.desiredSize=fr,If.Va()),this.defaultFromPoint&&(If.location=this.defaultFromPoint,If.Va(),y=a=If)):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 b=this.toNode,E=null;if(b===null?(Rf||(Rf=new _n,Rf.desiredSize=fr,Rf.Va()),this.defaultToPoint&&(Rf.location=this.defaultToPoint,Rf.Va(),E=b=Rf)):E=this.toPort,E===null||b.isVisible()||(x=b.findVisibleNode(),x!==null&&x!==b?(b=x,E=x.port):b=x),this.Mw=b,b===null||!b.location.w())return!1;for(;!(E===null||E.actualBounds.w()&&E.Ed());)E=E.panel;if(E===null)return!1;var ee=this.pointsCount,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var ae=Id(ne),ue=Id(x),ge=y===E&&y!==null,ye=this.isOrthogonal,Le=this.curve===Rs;this.Wf=ge&&!ye?Le=!0:!1;var ze=this.computeAdjusting()===Qa||ge;if(!ye&&!ge&&ae&&ue){if(ae=!1,!ze&&3<=ee&&(ze=this.getLinkPoint(a,y,ne,!0,!1,b,E),ue=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=this.adjustPoints(0,ze,ee-1,ue))&&(ze=this.getLinkPoint(a,y,ne,!0,!1,b,E),ue=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,ze,ee-1,ue)),!ae)if(this.Fj(),Le){ee=this.getLinkPoint(a,y,ne,!0,!1,b,E),ze=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=ze.x-ee.x,ue=ze.y-ee.y,ge=this.computeCurviness(),Le=ye=0;var Ke=ee.x+ae/3,Je=ee.y+ue/3,it=Ke,Tt=Je;Gt.B(ue,0)?Tt=0<ae?Tt-ge:Tt+ge:(ye=-ae/ue,Le=Math.sqrt(ge*ge/(ye*ye+1)),0>ge&&(Le=-Le),it=(0>ue?-1:1)*Le+Ke,Tt=ye*(it-Ke)+Je),Ke=ee.x+2*ae/3,Je=ee.y+2*ue/3;var Pt=Ke,Nt=Je;Gt.B(ue,0)?Nt=0<ae?Nt-ge:Nt+ge:(Pt=(0>ue?-1:1)*Le+Ke,Nt=ye*(Pt-Ke)+Je),this.Fj(),this.ne(ee),this.yf(it,Tt),this.yf(Pt,Nt),this.ne(ze),this.dd(0,this.getLinkPoint(a,y,ne,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else ee=b,ze=E,b=this.getLinkPoint(a,y,ne,!0,!1,ee,ze),E=this.getLinkPoint(ee,ze,x,!1,!1,a,y),this.hasCurviness()?(ze=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+ze/2,y=b.y+x/2,ee=a,ae=y,Gt.B(x,0)?ae=0<ze?ae-ne:ae+ne:(ze=-ze/x,ee=Math.sqrt(ne*ne/(ze*ze+1)),0>ne&&(ee=-ee),ee=(0>x?-1:1)*ee+a,ae=ze*(ee-a)+y),this.ne(b),this.yf(ee,ae),this.ne(E)):(this.ne(b),this.ne(E),ae=$t.alloc(),y.mi(ae),ue=ae.ca(E),ze.mi(ae),ge=ae.ca(b),(ue||ge)&&(ne=y.ga(Vm(ne),new st),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=ze.ga(Vm(x),new st),this.dd(1,this.getLinkPointFromPoint(ee,ze,x,b,!1,x))),$t.free(ae))}else{Le=this.isAvoiding,ze&&(ye&&Le||ge)&&this.Fj();var At=ge?this.computeCurviness():0;Le=this.getLinkPoint(a,y,ne,!0,ye,b,E),Ke=it=Je=0,(ye||!ae||ge)&&(Tt=this.computeEndSegmentLength(a,y,ne,!0),Ke=this.getLinkDirection(a,y,Le,ne,!0,ye,b,E),ge&&(ae||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ke-=ye?90:30,0>At&&(Ke-=180)),0>Ke?Ke+=360:360<=Ke&&(Ke-=360),ge&&(Tt+=Math.abs(At)*(ye?1:2)),Ke===0?Je=Tt:Ke===90?it=Tt:Ke===180?Je=-Tt:Ke===270?it=-Tt:(Je=Tt*Math.cos(Ke*Math.PI/180),it=Tt*Math.sin(Ke*Math.PI/180)),ne.Mc()&&ge&&(Tt=y.ga(ai,st.alloc()),Pt=st.allocAt(Tt.x+1e3*Je,Tt.y+1e3*it),this.getLinkPointFromPoint(a,y,Tt,Pt,!0,Le),st.free(Tt),st.free(Pt))),Tt=this.getLinkPoint(b,E,x,!1,ye,a,y);var Bt=Nt=Pt=0;if(ye||!ue||ge){var Rt=this.computeEndSegmentLength(b,E,x,!1);Bt=this.getLinkDirection(b,E,Tt,x,!1,ye,a,y),ge&&(ue||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(Bt+=ye?0:30,0>At&&(Bt+=180)),0>Bt?Bt+=360:360<=Bt&&(Bt-=360),ge&&(Rt+=Math.abs(At)*(ye?1:2)),Bt===0?Pt=Rt:Bt===90?Nt=Rt:Bt===180?Pt=-Rt:Bt===270?Nt=-Rt:(Pt=Rt*Math.cos(Bt*Math.PI/180),Nt=Rt*Math.sin(Bt*Math.PI/180)),x.Mc()&&ge&&(x=E.ga(ai,st.alloc()),ne=st.allocAt(x.x+1e3*Pt,x.y+1e3*Nt),this.getLinkPointFromPoint(b,E,x,ne,!1,Tt),st.free(x),st.free(ne))}x=Le,(ye||!ae||ge)&&(x=new st(Le.x+Je,Le.y+it)),ne=Tt,(ye||!ue||ge)&&(ne=new st(Tt.x+Pt,Tt.y+Nt)),!ze&&!ye&&ae&&3<ee&&this.adjustPoints(0,Le,ee-2,ne)?this.dd(ee-1,Tt):!ze&&!ye&&ue&&3<ee&&this.adjustPoints(1,x,ee-1,Tt)?this.dd(0,Le):!ze&&(ye?6<=ee:4<ee)&&this.adjustPoints(1,x,ee-2,ne)?(this.dd(0,Le),this.dd(ee-1,Tt)):(this.Fj(),this.ne(Le),(ye||!ae||ge)&&this.ne(x),ye&&this.addOrthoPoints(x,Ke,ne,Bt,a,b),(ye||!ue||ge)&&this.ne(ne),this.ne(Tt))}return!0};function Z0(a,y){return Math.abs(y.x-a.x)>Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}Tn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,ee){if(ee===void 0&&(ee=new st),a===null||y===null)return ee.assign(x),ee;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var ne=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*E;var ae=-a.m12*E,ue=-a.m21*E,ge=a.m11*E,ye=E*(a.m21*a.dy-a.m22*a.dx),Le=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*ue+ye,b=b.x*ae+b.y*ge+Le,ne=x.x*ne+x.y*ue+ye,x=x.x*ae+x.y*ge+Le}return y.Sj(E,b,ne,x,ee),a!==null&&ee.transform(a),ee};function Km(a,y){var x=y.Zn;return x===null&&(x=new _f,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}Tn.prototype.getLinkPoint=function(a,y,x,b,E,ee,ne,ae){if(ae===void 0&&(ae=new st),x.sb()&&!Id(x))return y.ga(x,ae),ae;if(x.$c()){var ue=Km(this,y);if(ue!==null){if(ae.assign(ue.Zo),E&&this.routing===nS){var ge=Km(this,ne);if(ge!==null&&ue.Gl<ge.Gl){ue=st.alloc(),ge=st.alloc();var ye=new $t(y.ga(ki,ue),y.ga(io,ge)),Le=this.computeSpot(!b,ne);a=this.getLinkPoint(ee,ne,Le,!b,E,a,y,ge),(x.Hf(is)||x.Hf(fo))&&a.y>=ye.y&&a.y<=ye.y+ye.height?ae.y=a.y:(x.Hf(Pa)||x.Hf(os))&&a.x>=ye.x&&a.x<=ye.x+ye.width&&(ae.x=a.x),st.free(ue),st.free(ge)}}return ae}}return x=y.ga(Vm(x),st.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=Z0(x,ne.copy()))):(ue=this.computeSpot(!b,ne),ee=st.alloc(),ne=ne.ga(Vm(ue),ee),E&&(ne=Z0(x,ne)),st.free(ee)),this.getLinkPointFromPoint(a,y,x,ne,b,ae),st.free(x),ae},Tn.prototype.getLinkDirection=function(a,y,x,b,E,ee,ne,ae){e:if(b.sb())var ue=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x<b.y?b.x>1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5<b.x?45:0;else{if(b.$c()&&(ue=Km(this,y),ue!==null))switch(ue.Nc){case 1:ue=270;break e;case 2:ue=180;break e;default:case 4:ue=0;break e;case 8:ue=90;break e}ue=y.ga(ai,st.alloc()),this.pointsCount>(ee?6:2)?(ae=E?this.i(1):this.i(this.pointsCount-2),ae=ee?Z0(ue,ae.copy()):x):(x=st.alloc(),ae=ae.ga(ai,x),st.free(x)),x=Math.abs(ae.x-ue.x)>Math.abs(ae.y-ue.y)?ae.x>=ue.x?0:180:ae.y>=ue.y?90:270,st.free(ue),ue=x}return b.Mc()&&ne.Td(a)&&(ue+=180,360<=ue&&(ue-=360)),Id(b)||(a=y.li(),a===0)||(45<=a&&135>a?ue+=90:135<=a&&225>a?ue+=180:225<=a&&315>a&&(ue+=270),360<=ue&&(ue-=360)),ue},Tn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Km(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Tn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=ai:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Vo?Wr:y)):(a=y||this.toPort,a===null?a=ai:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Vo?Wr:y)),a};function Id(a){return a===Wr||a.x===.5&&a.y===.5}function Vm(a){return a.x===.5&&a.y===.5?a:ai}Tn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Qa&&4<this.pointsCount?this.computeMidPoint(new st):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(ai))},Tn.prototype.computeShortLength=function(a){if(a){if(a=this.fromShortLength,isNaN(a)){var y=this.fromPort;y!==null&&(a=y.fromShortLength)}return isNaN(a)?0:a}return a=this.toShortLength,isNaN(a)&&(y=this.toPort,y!==null&&(a=y.toShortLength)),isNaN(a)?0:a},Tn.prototype.Cf=function(a,y,x,b,E,ee){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=ee;if(ee===void 0&&(ne=jr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return v0(this,y,x,E),ee===void 0&&jr.free(ne),!0;if(this.Yc(a,ne)){var ae=!1;if(!this.isAtomic)for(var ue=this.O.s,ge=ue.length;ge--;){var ye=ue[ge];if(ye.visible||ye===this.locationObject){var Le=ye.actualBounds,ze=this.naturalBounds;if(!(Le.x>ze.width||Le.y>ze.height||0>Le.x+Le.width||0>Le.y+Le.height)){if(Le=jr.alloc(),Le.set(ne),ye instanceof bn)ae=ye.Cf(a,y,x,b,E,Le);else if(this.path===ye){if(ye instanceof Ur)if(ae=a,ze=b,ye.pickable===!1)ae=!1;else if(Le.multiply(ye.transform),ze)e:{var Ke=ae,Je=Le;if(ye.fh(Ke,Je))ae=!0;else{if(Je===void 0&&(Je=ye.transform,Ke.Re(ye.actualBounds))){ae=!0;break e}ae=Ke.left,ze=Ke.right;var it=Ke.top;Ke=Ke.bottom;var Tt=st.alloc(),Pt=st.alloc(),Nt=st.alloc(),At=jr.alloc();At.set(Je),At.bv(ye.transform),At.Vj(),Pt.x=ze,Pt.y=it,Pt.transform(At),Tt.x=ae,Tt.y=it,Tt.transform(At),Je=!1,Yc(ye,Tt,Pt,Nt)?Je=!0:(Tt.x=ze,Tt.y=Ke,Tt.transform(At),Yc(ye,Tt,Pt,Nt)?Je=!0:(Pt.x=ae,Pt.y=Ke,Pt.transform(At),Yc(ye,Tt,Pt,Nt)?Je=!0:(Tt.x=ae,Tt.y=it,Tt.transform(At),Yc(ye,Tt,Pt,Nt)&&(Je=!0)))),jr.free(At),st.free(Tt),st.free(Pt),st.free(Nt),ae=Je}}else ae=ye.fh(ae,Le)}else ae=Xo(ye,a,b,Le);ae&&(ze=ye,y!==null&&(ze=y(ye)),ze&&(x===null||x(ze))&&E.add(ze)),jr.free(Le)}}}return ee===void 0&&jr.free(ne),ae||this.background!==null||this.areaBackground!==null}return ee===void 0&&jr.free(ne),!1},Tn.prototype.computeCurve=function(){if(this.Wf===null){var a=this.fromPort,y=this.isOrthogonal;this.Wf=a!==null&&a===this.toPort&&!y}return this.Wf?Rs:this.curve},Tn.prototype.computeCorner=function(){if(this.curve===Rs)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Tn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if(E!==a&&!E.isPanelMain&&(E.segmentIndex===-1/0||isNaN(E.segmentIndex)))return E}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},Tn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=iS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var b=this.findMidLabel();if(b!==null){var E=b.naturalBounds,ee=b.margin,ne=isNaN(E.width)?30:E.width*b.scale+ee.left+ee.right;E=isNaN(E.height)?14:E.height*b.scale+ee.top+ee.bottom,b=b.segmentOrientation,b===ng||b===Qm||b===$0?a=Math.max(a,E):b===ig||b===ag||b===rg||b===og?a=Math.max(a,ne):(y=y.ga(ai).ab(x.ga(ai))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===Rs&&(a*=1.333)}}return a},Tn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Qa&&x.bb()}},Tn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=ir(),b=0,E=y.links,ee=0;ee<E.length;ee++){var ne=E[ee].computeSpacing();x.push(ne),b+=ne}for(b=-b/2,ee=0;ee<E.length;ee++){if(E[ee]===this){a=b+x[ee]/2;break}b+=x[ee]}y.Ds===this.fromNode&&(a=-a),Un(x)}}return a},Tn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Tn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Tn.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===Ym)return!1;E===Jm&&(E=tg)}switch(E){case Ym:var ee=this.i(a),ne=this.i(x);if(!ee.Xa(y)||!ne.Xa(b)){E=ee.x,ee=ee.y;var ae=ne.x-E,ue=ne.y-ee,ge=Math.sqrt(ae*ae+ue*ue);if(!Gt.$(ge,0)){if(Gt.$(ae,0))var ye=0>ue?-Math.PI/2:Math.PI/2;else ye=Math.atan(ue/Math.abs(ae)),0>ae&&(ye=Math.PI-ye);ne=y.x;var Le=y.y;ae=b.x-ne;var ze=b.y-Le;for(ue=Math.sqrt(ae*ae+ze*ze),Gt.$(ae,0)?ze=0>ze?-Math.PI/2:Math.PI/2:(ze=Math.atan(ze/Math.abs(ae)),0>ae&&(ze=Math.PI-ze)),ge=ue/ge,ye=ze-ye,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),ae=y.x-E,ue=y.y-ee,y=Math.sqrt(ae*ae+ue*ue),Gt.$(y,0)||(Gt.$(ae,0)?ue=0>ue?-Math.PI/2:Math.PI/2:(ue=Math.atan(ue/Math.abs(ae)),0>ae&&(ue=Math.PI-ue)),ae=ue+ye,y*=ge,this.L(a,ne+y*Math.cos(ae),Le+y*Math.sin(ae)));this.dd(x,b)}}return!0;case Jm:if(ee=this.i(a),Le=this.i(x),!ee.Xa(y)||!Le.Xa(b)){E=ee.x,ee=ee.y,ne=Le.x,Le=Le.y,ge=(ne-E)*(ne-E)+(Le-ee)*(Le-ee),ae=y.x,ye=y.y,ue=b.x,ze=b.y;var Ke=1;if(ue-ae!==0){var Je=(ze-ye)/(ue-ae);Ke=Math.sqrt(1+1/(Je*Je))}else Je=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var it=y.x,Tt=y.y,Pt=.5;ge!==0&&(Pt=((E-it)*(E-ne)+(ee-Tt)*(ee-Le))/ge);var Nt=E+Pt*(ne-E),At=ee+Pt*(Le-ee);y=Math.sqrt((it-Nt)*(it-Nt)+(Tt-At)*(Tt-At)),Tt<Je*(it-Nt)+At&&(y=-y),0<Je&&(y=-y),it=ae+Pt*(ue-ae),Pt=ye+Pt*(ze-ye),Je!==0?(y=it+y/Ke,this.L(a,y,Pt-(y-it)/Je)):this.L(a,it,Pt+y)}this.dd(x,b)}return!0;case tg:e:{if(this.isOrthogonal&&(E=this.i(a),ee=this.i(a+1),ne=this.i(a+2),ae=ee.x,ye=ee.y,Le=ae,ge=ye,Gt.B(E.y,ee.y)?Gt.B(ee.x,ne.x)?ye=y.y:Gt.B(ee.y,ne.y)&&(ae=y.x):Gt.B(E.x,ee.x)&&(Gt.B(ee.y,ne.y)?ae=y.x:Gt.B(ee.x,ne.x)&&(ye=y.y)),this.L(a+1,ae,ye),E=this.i(x),ee=this.i(x-1),ne=this.i(x-2),ae=ee.x,ye=ee.y,ue=ae,ze=ye,Gt.B(E.y,ee.y)?Gt.B(ee.x,ne.x)?ye=b.y:Gt.B(ee.y,ne.y)&&(ae=b.x):Gt.B(E.x,ee.x)&&(Gt.B(ee.y,ne.y)?ae=b.x:Gt.B(ee.x,ne.x)&&(ye=b.y)),this.L(x-1,ae,ye),X0(this))){this.L(a+1,Le,ge),this.L(x-1,ue,ze),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Tn.prototype.addOrthoPoints=function(a,y,x,b,E,ee){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var ne=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var ae=E.actualBounds.copy(),ue=ee.actualBounds.copy();if(ae.w()&&ue.w()){ae.Bc(sg,sg),ue.Bc(sg,sg),ae.Ye(a),ue.Ye(x);var ge=st.alloc(),ye=st.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&ue.right>a.x||b===90&&x.y>a.y&&ue.right>a.x?(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===180?(ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=ge.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ge.x=a.x<ue.left?this.computeMidOrthoPosition(a.x,a.y,ue.left,x.y,!1):a.x<ue.right&&(b===270&&a.y<ue.top||b===90&&a.y>ue.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ue.right,ye.x=ge.x,ye.y=x.y):b===0&&a.x<ue.left&&a.y>ue.top&&a.y<ue.bottom&&(ge.x=a.x,ge.y=a.y<x.y?Math.min(x.y,ue.top):Math.max(x.y,ue.bottom),ye.y=ge.y)):(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<ae.top||b===270&&x.y>ae.bottom)&&(b===180&&(ue.ca(a)||ae.ca(x))?ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?ge.y=this.computeMidOrthoPosition(a.x,ae.top,x.x,Math.max(x.y,ue.bottom),!0):x.y>a.y&&(b===180||b===270)&&(ge.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,ue.top),!0)),ye.x=x.x,ye.y=ge.y),ge.y>ae.top&&ge.y<ae.bottom&&(x.x>=ae.left&&x.x<=a.x||a.x<=ue.right&&a.x>=x.x?(b===90||b===270)&&(ge.h(Math.max((a.x+x.x)/2,a.x),a.y),ye.h(ge.x,x.y)):(ge.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?ae.top:Math.min(ae.top,ue.top)):Math.max(x.y,b===0?ae.bottom:Math.max(ae.bottom,ue.bottom)),ye.x=x.x,ye.y=ge.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&ue.left<a.x||b===90&&x.y>a.y&&ue.left<a.x?(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===0?(ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=ge.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ge.x=a.x>ue.right?this.computeMidOrthoPosition(a.x,a.y,ue.right,x.y,!1):a.x>ue.left&&(b===270&&a.y<ue.top||b===90&&a.y>ue.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ue.left,ye.x=ge.x,ye.y=x.y):b===180&&a.x>ue.right&&a.y>ue.top&&a.y<ue.bottom&&(ge.x=a.x,ge.y=a.y<x.y?Math.min(x.y,ue.top):Math.max(x.y,ue.bottom),ye.y=ge.y)):(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<ae.top||b===270&&x.y>ae.bottom)&&(b===0&&(ue.ca(a)||ae.ca(x))?ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?ge.y=this.computeMidOrthoPosition(a.x,ae.top,x.x,Math.max(x.y,ue.bottom),!0):x.y>a.y&&(b===0||b===270)&&(ge.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,ue.top),!0)),ye.x=x.x,ye.y=ge.y),ge.y>ae.top&&ge.y<ae.bottom&&(x.x<=ae.right&&x.x>=a.x||a.x>=ue.left&&a.x<=x.x?(b===90||b===270)&&(ge.h(Math.min((a.x+x.x)/2,a.x),a.y),ye.h(ge.x,x.y)):(ge.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?ae.top:Math.min(ae.top,ue.top)):Math.max(x.y,b===180?ae.bottom:Math.max(ae.bottom,ue.bottom)),ye.x=x.x,ye.y=ge.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&ue.bottom>a.y||b===0&&x.x>a.x&&ue.bottom>a.y?(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===270?(ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=ge.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(ge.y=a.y<ue.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ue.top,!0):a.y<ue.bottom&&(b===180&&a.x<ue.left||b===0&&a.x>ue.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ue.bottom,ye.x=x.x,ye.y=ge.y):b===90&&a.y<ue.top&&a.x>ue.left&&a.x<ue.right&&(ge.x=a.x<x.x?Math.min(x.x,ue.left):Math.max(x.x,ue.right),ge.y=a.y,ye.x=ge.x)):(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<ae.left||b===180&&x.x>ae.right)&&(b===270&&(ue.ca(a)||ae.ca(x))?ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?ge.x=this.computeMidOrthoPosition(ae.left,a.y,Math.max(x.x,ue.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(ge.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,ue.left),x.y,!1)),ye.x=ge.x,ye.y=x.y),ge.x>ae.left&&ge.x<ae.right&&(x.y>=ae.top&&x.y<=a.y||a.y<=ue.bottom&&a.y>=x.y?(b===0||b===180)&&(ge.h(a.x,Math.max((a.y+x.y)/2,a.y)),ye.h(x.x,ge.y)):(ge.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?ae.left:Math.min(ae.left,ue.left)):Math.max(x.x,b===90?ae.right:Math.max(ae.right,ue.right)),ye.x=ge.x,ye.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&ue.top<a.y||b===0&&x.x>a.x&&ue.top<a.y?(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===90?(ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=ge.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(ge.y=a.y>ue.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ue.bottom,!0):a.y>ue.top&&(b===180&&a.x<ue.left||b===0&&a.x>ue.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ue.top,ye.x=x.x,ye.y=ge.y):b===270&&a.y>ue.bottom&&a.x>ue.left&&a.x<ue.right&&(ge.x=a.x<x.x?Math.min(x.x,ue.left):Math.max(x.x,ue.right),ge.y=a.y,ye.x=ge.x)):(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<ae.left||b===180&&x.x>ae.right)&&(b===90&&(ue.ca(a)||ae.ca(x))?ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?ge.x=this.computeMidOrthoPosition(ae.left,a.y,Math.max(x.x,ue.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(ge.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,ue.left),x.y,!1)),ye.x=ge.x,ye.y=x.y),ge.x>ae.left&&ge.x<ae.right&&(x.y<=ae.bottom&&x.y>=a.y||a.y>=ue.top&&a.y<=x.y?(b===0||b===180)&&(ge.h(a.x,Math.min((a.y+x.y)/2,a.y)),ye.h(x.x,ge.y)):(ge.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?ae.left:Math.min(ae.left,ue.left)):Math.max(x.x,b===270?ae.right:Math.max(ae.right,ue.right)),ye.x=ge.x,ye.y=x.y)));var Le=x;if(this.isAvoiding){var ze=this.diagram;if(ze===null||E===ee||this.layer.isTemporary||!vd(ze)||ae.ca(Le)&&!ee.Td(E)||ue.ca(a)&&!E.Td(ee))y=!1;else{var Ke=yd(ze,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Ke.Yj(Math.min(a.x,ge.x),Math.min(a.y,ge.y),Math.abs(a.x-ge.x),Math.abs(a.y-ge.y))&&Ke.Yj(Math.min(ge.x,ye.x),Math.min(ge.y,ye.y),Math.abs(ge.x-ye.x),Math.abs(ge.y-ye.y))&&Ke.Yj(Math.min(ye.x,Le.x),Math.min(ye.y,Le.y),Math.abs(ye.x-Le.x),Math.abs(ye.y-Le.y)))y=!1;else{E=a,ee=Le;var Je=x=null;if(ze.isVirtualized){ze=Ke.bounds.copy(),ze.Bc(-Ke.Ho,-Ke.Go);var it=st.alloc();_d(Ke,a.x,a.y)||(Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,a.x,a.y,ge.x,ge.y,it)?(x=a=it.copy(),y=it.ab(ge)):Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ge.x,ge.y,ye.x,ye.y,it)?(x=a=it.copy(),y=it.ab(ye)):Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ye.x,ye.y,Le.x,Le.y,it)&&(x=a=it.copy(),y=it.ab(Le))),_d(Ke,Le.x,Le.y)||(Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,Le.x,Le.y,ye.x,ye.y,it)?(Je=Le=it.copy(),b=ye.ab(it)):Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ye.x,ye.y,ge.x,ge.y,it)?(Je=Le=it.copy(),b=ge.ab(it)):Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ge.x,ge.y,a.x,a.y,it)&&(Je=Le=it.copy(),b=a.ab(it))),st.free(it)}ae=ae.copy().ed(ue),ae.Bc(Ke.Ho*Ke.Os,Ke.Go*Ke.Os),aS(Ke,a,y,Le,b,ae,!0),ue=Su(Ke,Le.x,Le.y),!Ke.abort&&ue>=zd&&(oS(Ke),ae.Bc(Ke.Ho*Ke.Hx,Ke.Go*Ke.Ix),aS(Ke,a,y,Le,b,ae,!1),ue=Su(Ke,Le.x,Le.y)),!Ke.abort&&ue<zd&&Su(Ke,Le.x,Le.y)!==kh?(Y0(this,Ke,Le.x,Le.y,b,!0,ne),ae=this.i(2),4>this.pointsCount?(y===0||y===180?(ae.x=a.x,ae.y=Le.y):(ae.x=Le.x,ae.y=a.y),this.L(2,ae.x,ae.y),this.m(3,ae.x,ae.y)):(ne=this.i(3),y===0||y===180?Gt.B(ae.x,ne.x)?(ae=y===0?Math.max(ae.x,a.x):Math.min(ae.x,a.x),this.L(2,ae,a.y),this.L(3,ae,ne.y)):Gt.B(ae.y,ne.y)?(Math.abs(a.y-ae.y)<=Ke.Go/2&&(this.L(2,ae.x,a.y),this.L(3,ne.x,a.y)),this.m(2,ae.x,a.y)):this.L(2,a.x,ae.y):(y===90||y===270)&&(Gt.B(ae.y,ne.y)?(ae=y===90?Math.max(ae.y,a.y):Math.min(ae.y,a.y),this.L(2,a.x,ae),this.L(3,ne.x,ae)):Gt.B(ae.x,ne.x)?(Math.abs(a.x-ae.x)<=Ke.Ho/2&&(this.L(2,a.x,ae.y),this.L(3,a.x,ne.y)),this.m(2,a.x,ae.y)):this.L(2,ae.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),Je!==null&&(b===0||b===180?this.yf(ee.x,Je.y):this.yf(Je.x,ee.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(ge.copy()),this.ne(ye.copy())),st.free(ge),st.free(ye)}},Tn.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var ee=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(ee=this.computeCurviness()),E?(y+b)/2+ee:(a+x)/2+ee};function X0(a){if(a.diagram===null||!a.isAvoiding||!vd(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=yd(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],ee=y[b+1];if(!a.Yj(Math.min(E.x,ee.x),Math.min(E.y,ee.y),Math.abs(E.x-ee.x),Math.abs(E.y-ee.y)))return!0}return!1}function Y0(a,y,x,b,E,ee,ne){var ae=y.Ho,ue=y.Go,ge=Su(y,x,b),ye=x,Le=b;for(E===0?ye+=ae:E===90?Le+=ue:E===180?ye-=ae:Le-=ue,E!==ne&&ge>$c&&Su(y,ye,Le)!==ge-1&&(Su(y,x-ae,b)===ge-1?(E=180,ye=x-ae,Le=b):Su(y,x+ae,b)===ge-1?(E=0,ye=x+ae,Le=b):Su(y,x,b-ue)===ge-1?(E=270,ye=x,Le=b-ue):Su(y,x,b+ue)===ge-1&&(E=90,ye=x,Le=b+ue));ge>$c&&Su(y,ye,Le)===ge-1;)x=ye,b=Le,E===0?ye+=ae:E===90?Le+=ue:E===180?ye-=ae:Le-=ue,--ge;ee?ge>$c&&(E===180||E===0?x=Math.floor(x/ae)*ae+ae/2:(E===90||E===270)&&(b=Math.floor(b/ue)*ue+ue/2)):(x=Math.floor(x/ae)*ae+ae/2,b=Math.floor(b/ue)*ue+ue/2),ge>$c&&(ee=E,ne=x,ye=b,E===0?(ee=90,ye+=ue):E===90?(ee=180,ne-=ae):E===180?(ee=270,ye-=ue):E===270&&(ee=0,ne+=ae),Su(y,ne,ye)===ge-1?Y0(a,y,ne,ye,ee,!1,ee):(ne=x,ye=b,E===0?(ee=270,ye-=ue):E===90?(ee=0,ne+=ae):E===180?(ee=90,ye+=ue):E===270&&(ee=180,ne-=ae),Su(y,ne,ye)===ge-1&&Y0(a,y,ne,ye,ee,!1,ee))),a.yf(x,b)}Tn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=Xn(y,a,x.x,x.y,b.x,b.y),ee=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var ae=Xn(y,a,b.x,b.y,x.x,x.y);b=x,ae<E&&(ee=ne,E=ae)}return ee},Tn.prototype.qc=function(){this.lk=!1,this.v()},Tn.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E!==a&&E.isPanelMain&&E instanceof Ur&&(E.ua=this.ua)}}},Tn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Qc(this)&&b.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(b.animationManager.isAnimating||b.currentTool!==b.toolManager)&&(x=!0);var E=this.i(0).copy(),ee=E.copy();b=this.Nb.s;var ne=this.computeCurve();if(ne===Rs&&3<=y&&!Gt.$(this.smoothness,0))if(y===3){var ae=this.i(1);b=Math.min(E.x,ae.x);var ue=Math.min(E.y,ae.y);ae=this.i(2),b=Math.min(b,ae.x),ue=Math.min(ue,ae.y)}else{if(this.isOrthogonal)for(ue=0;ue<y;ue++)ae=b[ue],ee.x=Math.min(ae.x,ee.x),ee.y=Math.min(ae.y,ee.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),ue=this.i(b),ee.x=Math.min(ue.x,ee.x),ee.y=Math.min(ue.y,ee.y);b=ee.x,ue=ee.y}else{for(ue=0;ue<y;ue++)ae=b[ue],ee.x=Math.min(ae.x,ee.x),ee.y=Math.min(ae.y,ee.y);b=ee.x,ue=ee.y}if(b-=this.su.x,ue-=this.su.y,E.x-=b,E.y-=ue,y!==2||Qc(this)){if(a.type=Ln.o,ae=A1(a),this.computeShortLength(!0)!==0&&(E=Df(this,E,!0,ee)),Dd(ae,E.x,E.y,!1),ne===Rs&&3<=y&&!Gt.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-ue,E=this.i(2).copy(),E.x-=b,E.y-=ue,this.computeShortLength(!1)!==0&&(E=Df(this,E,!1,ee)),wh(ae,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=st.allocAt(b,ue),x=st.alloc(),x.assign(this.i(1)),ee=st.allocAt(b,ue),E=st.allocAt(b,ue),ne=this.i(0);for(var ge,ye=this.smoothness/3,Le=1;Le<this.pointsCount-1;Le++){ge=this.i(Le);var ze=ne,Ke=ge,Je=this.i(J0(this,ge,Le,!1));if((!Gt.$(ze.x,Ke.x)||!Gt.$(Ke.x,Je.x))&&(!Gt.$(ze.y,Ke.y)||!Gt.$(Ke.y,Je.y))){var it=ye;isNaN(it)&&(it=this.smoothness/3);var Tt=ze.x;ze=ze.y;var Pt=Ke.x;Ke=Ke.y;var Nt=Je.x;Je=Je.y;var At=it*Zm(Tt,ze,Pt,Ke);it*=Zm(Pt,Ke,Nt,Je),Gt.$(ze,Ke)&&Gt.$(Pt,Nt)&&(Pt>Tt?Je>Ke?(ee.x=Pt-At,ee.y=Ke-At,E.x=Pt+it,E.y=Ke+it):(ee.x=Pt-At,ee.y=Ke+At,E.x=Pt+it,E.y=Ke-it):Je>Ke?(ee.x=Pt+At,ee.y=Ke-At,E.x=Pt-it,E.y=Ke+it):(ee.x=Pt+At,ee.y=Ke+At,E.x=Pt-it,E.y=Ke-it)),Gt.$(Tt,Pt)&&Gt.$(Ke,Je)&&(Ke>ze?(Nt>Pt?(ee.x=Pt-At,ee.y=Ke-At,E.x=Pt+it):(ee.x=Pt+At,ee.y=Ke-At,E.x=Pt-it),E.y=Ke+it):(Nt>Pt?(ee.x=Pt-At,ee.y=Ke+At,E.x=Pt+it):(ee.x=Pt+At,ee.y=Ke+At,E.x=Pt-it),E.y=Ke-it)),(Gt.$(Tt,Pt)&&Gt.$(Pt,Nt)||Gt.$(ze,Ke)&&Gt.$(Ke,Je))&&(Tt=.5*(Tt+Nt),ze=.5*(ze+Je),ee.x=Tt,ee.y=ze,E.x=Tt,E.y=ze),(Le===1||Le===2&&Gt.$(ne.x,this.i(0).x)&&Gt.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+ge.x),x.y=.5*(ne.y+ge.y)),wh(ae,x.x-b,x.y-ue,ee.x-b,ee.y-ue,ge.x-b,ge.y-ue),y.set(ee),x.set(E),ne=ge}}ge=ne.x,ne=ne.y,ye=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ye=Df(this,ye.copy(),!1,Bn)),ge=.5*(ge+ye.x),ne=.5*(ne+ye.y),wh(ae,E.x-b,E.y-ue,ge-b,ne-ue,ye.x-b,ye.y-ue),st.free(y),st.free(x),st.free(ee),st.free(E)}else for(x=3;x<y;x+=3)ee=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=Df(this,ne.copy(),!1,Bn)),wh(ae,ee.x-b,ee.y-ue,E.x-b,E.y-ue,ne.x-b,ne.y-ue);else{for(ee=st.alloc(),ee.assign(this.i(0)),E=st.alloc(),E.assign(ee),ne=this.computeCorner(),Le=1,ge=0;Le<y;){if(Le=J0(this,ee,Le,1<Le),ye=this.i(Le),Le>=y-1){if(!ee.D(ye))this.computeShortLength(!1)!==0&&(ye=Df(this,ye.copy(),!1,Bn)),Bf(this,ae,-b,-ue,ee,ye,x);else if(ge===0)for(Le=1;Le<y;)E.assign(ee),ye=this.i(Le++),Bf(this,ae,-b,-ue,ee,ye,x),ee.assign(ye);break}if(ge=J0(this,ye,Le+1,Le<y-3),Le=-b,Tt=-ue,ze=ye,Pt=this.i(ge),it=x,Gt.B(ee.y,ze.y)&&Gt.B(ze.x,Pt.x))if(Je=Math.min(ne,Math.abs(ze.x-E.x)/2),Je=At=Math.min(Je,Math.abs(Pt.y-ze.y)/2),Gt.B(Je,0))Bf(this,ae,Le,Tt,ee,ze,it),ee.assign(ze);else{var Bt=ze.x,Rt=ze.y;Ke=Bt,Nt=Rt,ze.x>ee.x?Bt=ze.x-Je:Bt=ze.x+Je,Pt.y>ze.y?Nt=ze.y+At:Nt=ze.y-At,Pt=st.allocAt(Bt,Rt),Bf(this,ae,Le,Tt,ee,Pt,it),st.free(Pt),Im(ae,ze.x+Le,ze.y+Tt,Ke+Le,Nt+Tt),ee.h(Ke,Nt)}else Gt.B(ee.x,ze.x)&&Gt.B(ze.y,Pt.y)?(Je=Math.min(ne,Math.abs(ze.y-E.y)/2),Je=At=Math.min(Je,Math.abs(Pt.x-ze.x)/2),Gt.B(At,0)?(Bf(this,ae,Le,Tt,ee,ze,it),ee.assign(ze)):(Bt=ze.x,Rt=ze.y,Ke=Bt,Nt=Rt,ze.y>ee.y?Rt=ze.y-Je:Rt=ze.y+Je,Pt.x>ze.x?Ke=ze.x+At:Ke=ze.x-At,Pt=st.allocAt(Bt,Rt),Bf(this,ae,Le,Tt,ee,Pt,it),st.free(Pt),Im(ae,ze.x+Le,ze.y+Tt,Ke+Le,Nt+Tt),ee.h(Ke,Nt))):(Bf(this,ae,Le,Tt,ee,ze,it),ee.assign(ze));E.assign(ye),Le=ge}st.free(ee)}Rm=ae}else ae=this.i(1).copy(),ae.x-=b,ae.y-=ue,this.computeShortLength(!0)!==0&&(E=Df(this,E,!0,ee)),this.computeShortLength(!1)!==0&&(ae=Df(this,ae,!1,ee)),a.type=Ln.j,a.startX=E.x,a.startY=E.y,a.endX=ae.x,a.endY=ae.y;return this.lk=!0,a};function Zm(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),Gt.$(a,0)?y:Gt.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Df(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var ee=a.i(1);if(x=ee.x-b.x,ee=ee.y-b.y,b=Zm(y.x,y.y,x,ee),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(ee-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(ee=a.i(E-2),x=ee.x-b.x,ee=ee.y-b.y,b=Zm(y.x,y.y,x,ee),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-ee)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function J0(a,y,x,b){for(var E=a.pointsCount,ee=y;Gt.$(y.x,ee.x)&&Gt.$(y.y,ee.y);){if(x>=E)return E-1;ee=a.i(x++)}if(!Gt.$(y.x,ee.x)&&!Gt.$(y.y,ee.y))return x-1;for(var ne=ee;Gt.$(y.x,ee.x)&&Gt.$(ee.x,ne.x)&&(!b||(y.y>=ee.y?ee.y>=ne.y:ee.y<=ne.y))||Gt.$(y.y,ee.y)&&Gt.$(ee.y,ne.y)&&(!b||(y.x>=ee.x?ee.x>=ne.x:ee.x<=ne.x));){if(x>=E)return E-1;ne=a.i(x++)}return x-2}Tn.prototype.computeJumpLength=function(){return 10};function Bf(a,y,x,b,E,ee,ne){if(!ne&&Qc(a)){ne=a.computeJumpLength();var ae=ne/2,ue=[],ge=0;if(a.isVisible()&&(ge=kx(a,E,ee,ue)),0<ge){if(Gt.B(E.y,ee.y))if(E.x<ee.x)for(var ye=0;ye<ge;){var Le=Math.max(E.x,Math.min(ue[ye++]-ae,ee.x-ne));y.lineTo(Le+x,ee.y+b);for(var ze=Le+x,Ke=Math.min(Le+ne,ee.x);ye<ge&&(Le=ue[ye],Le<Ke+ne);)ye++,Ke=Math.min(Le+ae,ee.x);Le=ee.y-ne+b,Ke+=x;var Je=ee.y+b;a.curve===Eh?Dd(y,Ke,Je,!1):wh(y,ze,Le,Ke,Le,Ke,Je)}else for(--ge;0<=ge;){for(ye=Math.min(E.x,Math.max(ue[ge--]+ae,ee.x+ne)),y.lineTo(ye+x,ee.y+b),ze=ye+x,Le=Math.max(ye-ne,ee.x);0<=ge&&(ye=ue[ge],ye>Le-ne);)ge--,Le=Math.max(ye-ae,ee.x);ye=ee.y-ne+b,Le+=x,Ke=ee.y+b,a.curve===Eh?Dd(y,Le,Ke,!1):wh(y,ze,ye,Le,ye,Le,Ke)}else if(Gt.B(E.x,ee.x))if(E.y<ee.y)for(ye=0;ye<ge;){for(Le=Math.max(E.y,Math.min(ue[ye++]-ae,ee.y-ne)),y.lineTo(ee.x+x,Le+b),ze=Le+b,Le=Math.min(Le+ne,ee.y);ye<ge&&(Ke=ue[ye],Ke<Le+ne);)ye++,Le=Math.min(Ke+ae,ee.y);Ke=ee.x-ne+x,Je=ee.x+x,Le+=b,a.curve===Eh?Dd(y,Je,Le,!1):wh(y,Ke,ze,Ke,Le,Je,Le)}else for(--ge;0<=ge;){for(ye=Math.min(E.y,Math.max(ue[ge--]+ae,ee.y+ne)),y.lineTo(ee.x+x,ye+b),ze=ye+b,ye=Math.max(ye-ne,ee.y);0<=ge&&(Le=ue[ge],Le>ye-ne);)ge--,ye=Math.max(Le-ae,ee.y);Le=ee.x-ne+x,Ke=ee.x+x,ye+=b,a.curve===Eh?Dd(y,Ke,ye,!1):wh(y,Le,ze,Le,ye,Ke,ye)}}}y.lineTo(ee.x+x,ee.y+b)}function kx(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var ee=E.value;if(ee!==null&&ee.visible){ee=ee.Pa.s;for(var ne=ee.length,ae=0;ae<ne;ae++){var ue=ee[ae];if(ue instanceof Tn){if(ue===a)return 0<b.length&&b.sort(function(ye,Le){return ye-Le}),b.length;if(ue.isVisible()&&Qc(ue)){var ge=ue.routeBounds;ge.w()&&a.routeBounds.Yc(ge)&&!a.usesSamePort(ue)&&(ge=ue.path,ge!==null&&ge.Ed()&&Tx(y,x,b,ue))}}}}}return 0<b.length&&b.sort(function(ye,Le){return ye-Le}),b.length}function Tx(a,y,x,b){for(var E=Gt.B(a.y,y.y),ee=b.pointsCount,ne=b.i(0),ae=st.alloc(),ue=1;ue<ee;ue++){var ge=b.i(ue);if(ue<ee-1){var ye=b.i(ue+1);if(ne.y===ge.y&&ge.y===ye.y){if(ge.x>ne.x&&ye.x>=ge.x||ge.x<ne.x&&ye.x<=ge.x)continue}else if(ne.x===ge.x&&ge.x===ye.x&&(ge.y>ne.y&&ye.y>=ge.y||ge.y<ne.y&&ye.y<=ge.y))continue}e:{ye=a.x;var Le=a.y,ze=y.x,Ke=y.y,Je=ne.x;ne=ne.y;var it=ge.x,Tt=ge.y;if(Gt.B(ye,ze)){if(!Gt.B(Le,Ke)&&Gt.B(ne,Tt)&&Math.min(Le,Ke)<ne&&Math.max(Le,Ke)>ne&&Math.min(Je,it)<ye&&Math.max(Je,it)>ye&&!Gt.B(Je,it)){ae.x=ye,ae.y=ne,ye=!0;break e}}else if(Gt.B(Le,Ke)&&Gt.B(Je,it)&&Math.min(ye,ze)<Je&&Math.max(ye,ze)>Je&&Math.min(ne,Tt)<Le&&Math.max(ne,Tt)>Le&&!Gt.B(ne,Tt)){ae.x=Je,ae.y=Le,ye=!0;break e}ae.x=0,ae.y=0,ye=!1}ye&&(E?x.push(ae.x):x.push(ae.y)),ne=ge}st.free(ae)}function Qc(a){return a=a.curve,a===Rd||a===Eh}function Xm(a,y){(y||Qc(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}Tn.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var b=!1;for(x=x.layers;x.next();){var E=x.value;if(E.visible){if(E===y){b=!0;var ee=!1;E=E.Pa.s;for(var ne=E.length,ae=0;ae<ne;ae++){var ue=E[ae];ue instanceof Tn&&(ue===this?ee=!0:ee&&tS(this,ue,a))}}else if(b)for(ee=E.Pa.s,E=ee.length,ne=0;ne<E;ne++)ae=ee[ne],ae instanceof Tn&&tS(this,ae,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&Qc(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}Tn.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var b=this.i(0),E=a.i(0);if(b.Xa(E)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||b.Xa(a)||y.Xa(E)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},Tn.prototype.isVisible=function(){if(!Sr.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 b=x;b!==null;){if(b.labeledLink===this)return!0;b=b.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},Tn.prototype.Zb=function(a){if(Sr.prototype.Zb.call(this,a),a&&Xm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Tn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?tg:this.qk};function qp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var b=a.ff,E=a.vf,ee=a=null,ne=y.jb.s,ae=ne.length,ue=0;ue<ae;ue++){var ge=ne[ue];(ge.ef===y&&ge.ff===b&&ge.uf===x&&ge.vf===E||ge.ef===x&&ge.ff===E&&ge.uf===y&&ge.vf===b)&&(ee===null?ee=ge:(a===null&&(a=[],a.push(ee)),a.push(ge)))}if(a!==null){for(ee=H1(y,x,b,E),ee===null&&(ee=new qm(y,b,x,E),U1(y,ee),U1(x,ee)),ee.links=a,y=0;y<a.length;y++)a[y].Sf=ee;ee.Sl()}}}}function eg(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(Zn(y.links,a),y.Sl()))}Tn.prototype.ph=function(){return!0},zt.Object.defineProperties(Tn.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&Um(y,this,x),eg(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,ee=this.fromPortChanged;if(ee!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),ee(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.uf!==a&&Gm(a,this,E),qp(this),this.C(1)),this.g("fromNode",y,a),Bd(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Cs(x),eg(this),this.ff=a;var b=this.fromPort;b!==null&&Cs(b);var E=this.diagram;if(E!==null){var ee=this.data,ne=E.model;ee!==null&&ne.ri()&&ne.xv(ee,a)}x!==b&&(this.Wf=null,this.bb(),ee=this.fromPortChanged,ee!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),ee(this,x,b),E!==null&&(E.aa=ne))),qp(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&&Um(y,this,x),eg(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setToNodeForLink(this,a,y);var E=this.toPort,ee=this.toPortChanged;if(ee!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),ee(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.ef!==a&&Gm(a,this,E),qp(this),this.C(1)),this.g("toNode",y,a),Bd(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Cs(x),eg(this),this.vf=a;var b=this.toPort;b!==null&&Cs(b);var E=this.diagram;if(E!==null){var ee=this.data,ne=E.model;ee!==null&&ne.ri()&&ne.Cv(ee,a)}x!==b&&(this.Wf=null,this.bb(),ee=this.toPortChanged,ee!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),ee(this,x,b),E!==null&&(E.aa=ne))),qp(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:Vo},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&&Cs(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&&An(a,">= 0",Tn,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Vo},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&&Cs(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&&An(a,">= 0",Tn,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?ri: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&&$p(this.fromNode),this.toNode!==null&&$p(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Ur?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,b=this.pointsCount;if(b===0)a.h(NaN,NaN,0,0);else{if(b===1)b=this.i(0),y=Math.min(b.x,y),x=Math.min(b.y,x),a.h(b.x,b.y,0,0);else if(b===2){b=this.i(0);var E=this.i(1);y=Math.min(b.x,E.x),x=Math.min(b.y,E.y),a.h(b.x,b.y,0,0),a.Ye(E)}else if(this.computeCurve()===Rs&&3<=b&&!this.isOrthogonal)if(E=this.i(0),y=E.x,x=E.y,a.h(y,x,0,0),b===3){b=this.i(1),y=Math.min(b.x,y),x=Math.min(b.y,x);var ee=this.i(2);y=Math.min(ee.x,y),x=Math.min(ee.y,x),Gt.Dl(E.x,E.y,b.x,b.y,b.x,b.y,ee.x,ee.y,.5,a)}else for(ee=3;ee<b;ee+=3){var ne=this.i(ee-2);ee+3>=b&&(ee=b-1);var ae=this.i(ee-1),ue=this.i(ee);Gt.Dl(E.x,E.y,ne.x,ne.y,ae.x,ae.y,ue.x,ue.y,.5,a),y=Math.min(ue.x,y),x=Math.min(ue.y,x),E=ue}else for(E=this.i(0),ee=this.i(1),y=Math.min(E.x,ee.x),x=Math.min(E.y,ee.y),a.h(E.x,E.y,0,0),a.Ye(ee),E=2;E<b;E++)ee=this.i(E),y=Math.min(ee.x,y),x=Math.min(ee.y,x),a.Ye(ee);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new st)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Wm(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var b=this.i(x),E=this.i(x+1);Gt.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Gt.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];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 b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new rn,b=0;b<a.length/2;b++)E=new st(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var ee=a[E];if(!ln(ee)||typeof ee.x!="number"||isNaN(ee.x)||typeof ee.y!="number"||isNaN(ee.y)){b=!1;break}}if(b)for(x=new rn,b=0;b<a.length;b++)E=a[b],x.add(new st(E.x,E.y).freeze())}}else if(a instanceof rn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else jt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Wm(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ld(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||!Id(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Id(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(),Xm(this,y===Eh||y===Rd||a===Eh||a===Rd),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(),Xm(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),Tn.prototype.invalidateOtherJumpOvers=Tn.prototype.Xo,Tn.prototype.findClosestSegment=Tn.prototype.ez,Tn.prototype.updateRoute=Tn.prototype.vg,Tn.prototype.invalidateRoute=Tn.prototype.bb,Tn.prototype.rollbackRoute=Tn.prototype.rv,Tn.prototype.commitRoute=Tn.prototype.zf,Tn.prototype.startRoute=Tn.prototype.uh,Tn.prototype.clearPoints=Tn.prototype.Fj,Tn.prototype.removePoint=Tn.prototype.pv,Tn.prototype.addPointAt=Tn.prototype.yf,Tn.prototype.addPoint=Tn.prototype.ne,Tn.prototype.insertPointAt=Tn.prototype.m,Tn.prototype.insertPoint=Tn.prototype.Kz,Tn.prototype.setPointAt=Tn.prototype.L,Tn.prototype.setPoint=Tn.prototype.dd,Tn.prototype.getPoint=Tn.prototype.i,Tn.prototype.getOtherPort=Tn.prototype.Cz,Tn.prototype.getOtherNode=Tn.prototype.To;var If=null,Rf=null,Q0=new an(Tn,"Normal",1),Lx=new an(Tn,"Orthogonal",2),Mx=new an(Tn,"AvoidsNodes",6),nS=new an(Tn,"AvoidsNodesStraight",7),Qa=new an(Tn,"None",0),Rs=new an(Tn,"Bezier",9),Eh=new an(Tn,"JumpGap",10),Rd=new an(Tn,"JumpOver",11),tg=new an(Tn,"End",17),Ym=new an(Tn,"Scale",18),Jm=new an(Tn,"Stretch",19),ng=new an(Tn,"OrientAlong",21),rg=new an(Tn,"OrientPlus90",22),ig=new an(Tn,"OrientMinus90",23),$0=new an(Tn,"OrientOpposite",24),Qm=new an(Tn,"OrientUpright",25),og=new an(Tn,"OrientPlus90Upright",26),ag=new an(Tn,"OrientMinus90Upright",27),$m=new an(Tn,"OrientUpright45",28),rS=16,iS=14,sg=8;Tn.className="Link",Tn.Normal=Q0,Tn.Orthogonal=Lx,Tn.AvoidsNodes=Mx,Tn.AvoidsNodesStraight=nS,Tn.None=Qa,Tn.Bezier=Rs,Tn.JumpGap=Eh,Tn.JumpOver=Rd,Tn.End=tg,Tn.Scale=Ym,Tn.Stretch=Jm,Tn.OrientAlong=ng,Tn.OrientPlus90=rg,Tn.OrientMinus90=ig,Tn.OrientOpposite=$0,Tn.OrientUpright=Qm,Tn.OrientPlus90Upright=og,Tn.OrientMinus90Upright=ag,Tn.OrientUpright45=$m,Tn.EndSegmentStep=8,Tn.CurvinessStart=rS,Tn.SpacingMin=iS,Tn.OrthoShortCut=sg;function qm(a,y,x,b){hr(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}qm.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},qm.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))}},qm.className="LinkBundle";function lg(a){hr(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}lg.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,b=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((b+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],b=0;b<=a;b++)x[b]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=q0,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(b=0;b<=this.ei;b++)x[b]=a}};function _d(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Su(a,y,x){return _d(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):q0}function oS(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],b=0;b<=a.ei;b++)x[b]>=$c&&(x[b]=q0)}lg.prototype.Yj=function(a,y,x,b){if(a>this.En||a+x<this.Nd||y>this.Fn||y+b<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 E=Math.max(0,b)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(E+=y,y=0),0>x||0>E)return!0;for(b=Math.min(a+x-1,this.di)|0,x=Math.min(y+E-1,this.ei)|0;a<=b;a++){E=this.ac[a];for(var ee=y;ee<=x;ee++)if(E[ee]===kh)return!1}return!0};function xu(a,y,x,b,E,ee,ne,ae,ue){if(!(y<ee||y>ne||x<ae||x>ue)){var ge=y|0,ye=x|0,Le=a.ac[ge][ye];if(Le>=$c&&Le<zd)for(E?ye+=b:ge+=b,Le+=1;ee<=ge&&ge<=ne&&ae<=ye&&ye<=ue&&!(Le>=a.ac[ge][ye]);)a.ac[ge][ye]=Le,Le+=1,E?ye+=b:ge+=b;if(ge=E?ye:ge,E)if(0<b)for(x+=b;x<ge;x+=b)xu(a,y,x,1,!E,ee,ne,ae,ue),xu(a,y,x,-1,!E,ee,ne,ae,ue);else for(x+=b;x>ge;x+=b)xu(a,y,x,1,!E,ee,ne,ae,ue),xu(a,y,x,-1,!E,ee,ne,ae,ue);else if(0<b)for(y+=b;y<ge;y+=b)xu(a,y,x,1,!E,ee,ne,ae,ue),xu(a,y,x,-1,!E,ee,ne,ae,ue);else for(y+=b;y>ge;y+=b)xu(a,y,x,1,!E,ee,ne,ae,ue),xu(a,y,x,-1,!E,ee,ne,ae,ue)}}function ev(a,y,x,b,E,ee,ne,ae,ue){y|=0,x|=0;var ge=kh,ye=$c;for(a.ac[y][x]=ye;ge===kh&&y>ee&&y<ne&&x>ae&&x<ue;)ye+=1,a.ac[y][x]=ye,E?x+=b:y+=b,ge=a.ac[y][x]}function tv(a,y,x,b,E,ee,ne,ae,ue){y|=0,x|=0;var ge=kh,ye=zd;for(a.ac[y][x]=ye;ge===kh&&y>ee&&y<ne&&x>ae&&x<ue;)a.ac[y][x]=ye,E?x+=b:y+=b,ge=a.ac[y][x]}function aS(a,y,x,b,E,ee,ne){if(a.ac!==null){a.abort=!1;var ae=y.x,ue=y.y;if(_d(a,ae,ue)){ae-=a.Nd,ae/=a.rc,ue-=a.Od,ue/=a.sc;var ge=b.x,ye=b.y;if(_d(a,ge,ye))if(ge-=a.Nd,ge/=a.rc,ye-=a.Od,ye/=a.sc,1>=Math.abs(ae-ge)&&1>=Math.abs(ue-ye))a.abort=!0;else{var Le=ee.x;b=ee.y,y=ee.x+ee.width;var ze=ee.y+ee.height;Le-=a.Nd,Le/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,ze-=a.Od,ze/=a.sc,ee=Math.max(0,Math.min(a.di,Le|0)),y=Math.min(a.di,Math.max(0,y|0)),Le=Math.max(0,Math.min(a.ei,b|0)),ze=Math.min(a.ei,Math.max(0,ze|0)),b=a.ac,ae|=0,ue|=0,ge|=0,ye|=0;var Ke=x===0||x===90?1:-1;if(x=x===90||x===270,b[ae][ue]===kh?(ev(a,ae,ue,Ke,x,ee,y,Le,ze),ev(a,ae,ue,1,!x,ee,y,Le,ze),ev(a,ae,ue,-1,!x,ee,y,Le,ze)):ev(a,ae,ue,Ke,x,ae,ue,ae,ue),b[ge][ye]===kh?(tv(a,ge,ye,E===0||E===90?1:-1,E===90||E===270,ee,y,Le,ze),tv(a,ge,ye,1,!(E===90||E===270),ee,y,Le,ze),tv(a,ge,ye,-1,!(E===90||E===270),ee,y,Le,ze)):tv(a,ge,ye,Ke,x,ge,ye,ge,ye),x=ir(),ne&&sS(a,ge,ye,E,ae,ue,x))for((x[0]!==ge||x[1]!==ye)&&(x.unshift(ye),x.unshift(ge)),(x[x.length-2]!==ae||x[x.length-1]!==ue)&&(x.push(ae),x.push(ue)),a=$c,E=x[x.length-2],ne=x[x.length-1],b[E][ne]=a++,ee=x.length-4;0<=ee;ee-=2)for(E=x[ee+2],ne=x[ee+3],y=x[ee],ge=x[ee+1];y>E?E++:y<E?E--:ge>ne?ne++:ge<ne&&ne--,b[E][ne]=a++,E!==y||ne!==ge;);else xu(a,ae,ue,1,!1,ee,y,Le,ze),xu(a,ae,ue,-1,!1,ee,y,Le,ze),xu(a,ae,ue,1,!0,ee,y,Le,ze),xu(a,ae,ue,-1,!0,ee,y,Le,ze);Un(x)}}}}function sS(a,y,x,b,E,ee,ne){for(var ae=a.ac,ue=y,ge=x;;){if(ue===E&&ge===ee)return!0;var ye=ue,Le=ge;if(b===0)if(ye<E)ye++;else break;else if(b===90)if(Le<ee)Le++;else break;else if(b===180)if(ye>E)ye--;else break;else if(Le>ee)Le--;else break;var ze=ae[ye][Le];if(ze===0||ze===ey)break;ue=ye,ge=Le}for(;;){if(ye=b,Le=ue,ze=ge,b===0?ze<ee?(ye=90,ze++):ze>ee&&(ye=270,ze--):b===90?Le<E?(ye=0,Le++):Le>E&&(ye=180,Le--):b===180?ze<ee?(ye=90,ze++):ze>ee&&(ye=270,ze--):Le<E?(ye=0,Le++):Le>E&&(ye=180,Le--),Le=ae[Le][ze],ye!==b&&Le!==0&&Le!==ey){if(ne.push(ue),ne.push(ge),sS(a,ue,ge,ye,E,ee,ne))return!0;ne.pop(),ne.pop()}if(ae[ue][ge]=ey,b===0){if(ue===y)return!1;ue--}else if(b===90){if(ge===x)return!1;ge--}else if(b===180){if(ue===y)return!1;ue++}else{if(ge===x)return!1;ge++}}}zt.Object.defineProperties(lg.prototype,{bounds:{get:function(){return new $t(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 kh=0,$c=1,zd=999999,q0=zd+1,ey=zd+2;lg.className="PositionArray";function _f(){hr(this),this.port=this.node=null,this.pe=[],this.ap=!1}_f.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var b=a[x];b!==null&&(y+=`
|
|
`+b.toString())}return y};function Nx(a,y,x,b){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 b&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}_f.prototype.Sl=function(){this.pe.length=0};function lS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,ee=E instanceof Br?E:null;if(ee===null||ee.isSubGraphExpanded)var ne=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!ee.actualBounds.w()){a.ap=x;break e}b=ee,ne=b.Lu()}ee=a.pe.length=0;var ae=a.port.ga(ki,st.alloc()),ue=a.port.ga(io,st.alloc());for(E=$t.allocAt(ae.x,ae.y,0,0),E.Ye(ue),st.free(ae),st.free(ue),ae=st.allocAt(E.x+E.width/2,E.y+E.height/2),ue=a.port.li(),ne=ne.iterator;ne.next();){var ge=ne.value;if(ge.isVisible()&&ge.fromPort!==ge.toPort){var ye=ge.fromPort===a.port||ge.fromNode!==null&&ge.fromNode.Td(b),Le=ge.computeSpot(ye,a.port);if(Le.$c()&&(ye=ye?ge.toPort:ge.fromPort,ye!==null)){var ze=ye.part;if(ze!==null){var Ke=ze.findVisibleNode();Ke!==null&&Ke!==ze&&(ze=Ke,ye=ze.port),ye=ge.computeOtherPoint(ze,ye),ze=ae.ab(ye),ze-=ue,0>ze?ze+=360:360<=ze&&(ze-=360),Le=Nx(E,Le,ze,ge.isOrthogonal),Le===0?(Le=4,180<ze&&(ze-=360)):Le===90?(Le=8,270<ze&&(ze-=360)):Le===180?Le=2:(Le=1,90>ze&&(ze+=360)),Ke=a.pe[ee],Ke===void 0?(Ke=new ty(ge,ze,Le),a.pe[ee]=Ke):(Ke.link=ge,Ke.angle=ze,Ke.Nc=Le),Ke.hv.set(ye),ee++}}}}for(st.free(ae),a.pe.sort(_f.prototype.j),ue=a.pe.length,b=-1,ee=ae=0;ee<ue;ee++)ne=a.pe[ee],ne!==void 0&&(ne.Nc!==b&&(b=ne.Nc,ae=0),ne.Uo=ae,ae++);for(b=-1,ae=0,ee=ue-1;0<=ee;ee--)ue=a.pe[ee],ue!==void 0&&(ue.Nc!==b&&(b=ue.Nc,ae=ue.Uo+1),ue.Gl=ae);if(ee=a.pe,Le=a.port,b=a.node.portSpreading,ae=st.alloc(),ue=st.alloc(),ne=st.alloc(),ge=st.alloc(),Le.ga(ki,ae),Le.ga(ba,ue),Le.ga(io,ne),Le.ga(Ko,ge),Ke=ze=ye=Le=0,b===W0)for(var Je=0;Je<ee.length;Je++){var it=ee[Je];if(it!==null){var Tt=it.link.computeThickness();switch(it.Nc){case 8:ze+=Tt;break;case 2:Ke+=Tt;break;case 1:Le+=Tt;break;default:case 4:ye+=Tt}}}var Pt=Je=0,Nt=1,At=it=0;for(Tt=0;Tt<ee.length;Tt++){var Bt=ee[Tt];if(Bt!==null){if(Je!==Bt.Nc){switch(Je=Bt.Nc,Je){case 8:var Rt=ne;Pt=ge;break;case 2:Rt=ge,Pt=ae;break;case 1:Rt=ae,Pt=ue;break;default:case 4:Rt=ue,Pt=ne}switch(it=Pt.x-Rt.x,At=Pt.y-Rt.y,Je){case 8:ze>Math.abs(it)?(Nt=Math.abs(it)/ze,ze=Math.abs(it)):Nt=1;break;case 2:Ke>Math.abs(At)?(Nt=Math.abs(At)/Ke,Ke=Math.abs(At)):Nt=1;break;case 1:Le>Math.abs(it)?(Nt=Math.abs(it)/Le,Le=Math.abs(it)):Nt=1;break;default:case 4:ye>Math.abs(At)?(Nt=Math.abs(At)/ye,ye=Math.abs(At)):Nt=1}Pt=0}var Zt=Bt.Zo;if(b===W0){switch(Bt=Bt.link.computeThickness(),Bt*=Nt,Zt.set(Rt),Je){case 8:Zt.x=Rt.x+it/2+ze/2-Pt-Bt/2;break;case 2:Zt.y=Rt.y+At/2+Ke/2-Pt-Bt/2;break;case 1:Zt.x=Rt.x+it/2-Le/2+Pt+Bt/2;break;default:case 4:Zt.y=Rt.y+At/2-ye/2+Pt+Bt/2}Pt+=Bt}else{var On=.5;b===Hm&&(On=(Bt.Uo+1)/(Bt.Gl+1)),Zt.x=Rt.x+it*On,Zt.y=Rt.y+At*On}}}for(st.free(ae),st.free(ue),st.free(ne),st.free(ge),Rt=a.pe,ee=0;ee<Rt.length;ee++)b=Rt[ee],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,$t.free(E)}x=a.pe}for(a=0;a<x.length;a++)if(E=x[a],E!==null&&E.link===y)return E;return null}_f.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},_f.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Wr,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var ee=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<ee.y:y.x<ee.x)?x+8*b:(a?y.y===ee.y:y.x===ee.x)?x:x+8*(E-1-b)},_f.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new st,this.Gl=this.Uo=0,this.Zo=new st,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 so(a){hr(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new st(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}so.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},so.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},so.prototype.qb=function(){},so.prototype.toString=function(){var a=dr(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},so.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())}}},so.prototype.createNetwork=function(){return new Xi(this)},so.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Jt?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Br?y.lg(a.memberParts):y.lg(a.iterator),y},so.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")}},so.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()}},so.prototype.doLayout=function(a){var y=new sn;a instanceof Jt?(ac(this,y,a.nodes,!0,this.rh,!0,!1,!0),ac(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Br?ac(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},so.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,b=x,E=this.arrangementOrigin.y,ee=0,ne=0;for(a=a.iterator;a.next();){var ae=a.value;ug(ae);var ue=ae.measuredBounds,ge=ue.width;ue=ue.height,ae.moveTo(b,E),ae instanceof Br&&(ae.rh=!1),b+=Math.max(ge,50)+20,ne=Math.max(ne,Math.max(ue,50)),ee>=y-1?(ee=0,b=x,E+=ne+20,ne=0):ee++}},so.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,b=this.arrangementOrigin.y,E=0,ee=0,ne=this.network.vertexes.iterator;ne.next();){var ae=ne.value.node;if(!(ae===null||ae instanceof Tn)&&(ug(ae),this.rh(ae))){var ue=ae.measuredBounds,ge=ue.width;ue=ue.height,ae.moveTo(x,b),ae instanceof Br&&(ae.rh=!1),x+=Math.max(ge,50)+20,ee=Math.max(ee,Math.max(ue,50)),E>=a-1?(E=0,x=y,b+=ee+20,ee=0):E++}}},so.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Br&&a.rh)};function ac(a,y,x,b,E,ee,ne,ae){for(x=x.iterator;x.next();){var ue=x.value;b&&!ue.isTopLevel||E!==null&&!E(ue)||!ue.canLayout()||(ee&&ue instanceof _n?ue.isLinkLabel||(ue instanceof Br&&ue.layout===null?ac(a,y,ue.memberParts,!1,E,ee,ne,ae):(ug(ue),y.add(ue))):ne&&ue instanceof Tn?y.add(ue):!ae||!ue.Zc()||ue instanceof _n||(ug(ue),y.add(ue)))}}function ug(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}so.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new $t),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},so.prototype.ex=function(a){var y=new sn;return a instanceof Jt?(ac(this,y,a.nodes,!0,null,!0,!0,!0),ac(this,y,a.links,!0,null,!0,!0,!0),ac(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Br?ac(this,y,a.memberParts,!1,null,!0,!0,!0):ac(this,y,a.iterator,!1,null,!0,!0,!0),y},so.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(ki),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},zt.Object.defineProperties(so.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())}}}),so.prototype.collectParts=so.prototype.ex,so.prototype.getLayoutBounds=so.prototype.ni,so.prototype.invalidateLayout=so.prototype.C,so.className="Layout";function Xi(a){hr(this),this.Sc=a,this.wf=new sn,this.ye=new sn,this.Es=new tn,this.zs=new tn}Xi.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 sn,this.ye=new sn,this.Es=new tn,this.zs=new tn},Xi.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},Xi.prototype.createVertex=function(){return new Uo(this)},Xi.prototype.createEdge=function(){return new Es(this)},Xi.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(ne){if(ne instanceof _n)return!ne.isLinkLabel;if(ne instanceof Tn){var ae=ne.fromNode;return ae===null||ae.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof _n&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Br&&b.layout===null)this.lg(b.memberParts,!1);else if(this.ki(b)===null){var E=this.createVertex();E.node=b,this.dh(E)}}}for(a.reset();a.next();)if(b=a.value,b instanceof Tn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var ee=b.fromNode;E=b.toNode,ee!==null&&E!==null&&ee!==E&&(ee=this.findGroupVertex(ee),E=this.findGroupVertex(E),ee!==null&&E!==null&&this.Zj(ee,E,b))}}},Xi.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},Qe=Xi.prototype,Qe.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Qe.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},Qe.Iu=function(a){if(a!==null&&uS(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var b=y.M(x);this.Mj(b)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function uS(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}Qe.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Qe.ki=function(a){return a===null?null:this.Es.I(a)},Qe.Bo=function(a){if(a!==null){ny(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ny(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}}Qe.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,b=this.Lo(a);return b===null?(b=this.createEdge(),b.link=a,y!==null&&(b.fromVertex=this.Bl(y)),x!==null&&(b.toVertex=this.Bl(x)),this.Bo(b)):(y!==null?b.fromVertex=this.Bl(y):b.fromVertex=null,x!==null?b.toVertex=this.Bl(x):b.toVertex=null),b},Qe.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),ry(this,a)}};function ry(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Qe.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Qe.Lo=function(a){return a===null?null:this.zs.I(a)},Qe.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var b=this.createEdge();return b.link=x,b.fromVertex=a,b.toVertex=y,this.Bo(b),b}return null},Qe.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))}},Qe.Ko=function(){for(var a=ir(),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]);Un(a)},Xi.prototype.deleteArtificialVertexes=function(){for(var a=ir(),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=ir(),x=this.ye.iterator;x.next();){var b=x.value;b.link===null&&b.data===null&&y.push(b)}for(x=y.length,b=0;b<x;b++)this.Mj(y[b]);Un(a),Un(y)};function Ax(a){for(var y=ir(),x=a.ye.iterator;x.next();){var b=x.value;b.fromVertex!==null&&b.toVertex!==null||y.push(b)}for(x=y.length,b=0;b<x;b++)a.Mj(y[b]);Un(y)}Xi.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new rn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var b=x.value;if(0<b.tg.count||0<b.mg.count){y=this.layout.createNetwork(),a.add(y),iy(this,y,b),y=!0;break}}}return a.sort(function(E,ee){return E===null||ee===null||E===ee?0:ee.vertexes.count-E.vertexes.count}),a};function iy(a,y,x){if(x!==null&&x.network!==y){uS(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(ry(a,E),ny(y,E),iy(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(ry(a,x),ny(y,x),iy(a,y,x.toVertex))}}Xi.prototype.dz=function(){for(var a=new sn,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},zt.Object.defineProperties(Xi.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}}}),Xi.prototype.findAllParts=Xi.prototype.dz,Xi.prototype.splitIntoSubNetworks=Xi.prototype.Zx,Xi.prototype.deleteSelfEdges=Xi.prototype.Ko,Xi.prototype.reverseEdge=Xi.prototype.gm,Xi.prototype.linkVertexes=Xi.prototype.Zj,Xi.prototype.findEdge=Xi.prototype.Lo,Xi.prototype.deleteLink=Xi.prototype.Yy,Xi.prototype.deleteEdge=Xi.prototype.Mj,Xi.prototype.addLink=Xi.prototype.Dy,Xi.prototype.addEdge=Xi.prototype.Bo,Xi.prototype.findVertex=Xi.prototype.ki,Xi.prototype.deleteNode=Xi.prototype.Zy,Xi.prototype.deleteVertex=Xi.prototype.Iu,Xi.prototype.addNode=Xi.prototype.Bl,Xi.prototype.addVertex=Xi.prototype.dh,Xi.prototype.addParts=Xi.prototype.lg,Xi.className="LayoutNetwork";function Uo(a){hr(this),this.ob=a,this.j=new $t(0,0,10,10).freeze(),this.o=new st(5,5).freeze(),this.Sh=this.ub=null,this.tg=new rn,this.mg=new rn}Uo.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new rn,this.mg=new rn},Uo.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+zr(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,b=this.tg.iterator;b.next();){var E=b.value;x?x=!1:a+=",",a+=E.toString(0)}for(E="",x=!0,b=this.mg.iterator;b.next();){var ee=b.value;x?x=!1:E+=",",E+=ee.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},Uo.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;ln(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 Br)){x=$t.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(ai);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),$t.free(x);return}$t.free(x)}a.moveTo(y.x,y.y)}},Uo.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Uo.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Uo.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Uo.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function oy(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}zt.Object.defineProperties(Uo.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,b=y.width;y=y.height,this.o.h(b/2,y/2),this.j.h(a,x,b,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=$t.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,ee=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,ee,b),$t.free(x),!(a instanceof Br)&&(a=a.locationObject.ga(ai),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(ee/2,b/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new sn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new sn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new sn,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 rn,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}}}),Uo.prototype.deleteDestinationEdge=Uo.prototype.Jl,Uo.prototype.addDestinationEdge=Uo.prototype.zl,Uo.prototype.deleteSourceEdge=Uo.prototype.Kl,Uo.prototype.addSourceEdge=Uo.prototype.Cl,Uo.className="LayoutVertex",Uo.standardComparer=oy,Uo.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 b=parseFloat(y[x]),E=parseFloat(a[x]);if(isNaN(b))if(isNaN(E)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}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 Es(a){hr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Es.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Es.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+zr(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},Es.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Es.prototype.commit=function(){},Es.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},zt.Object.defineProperties(Es.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)}}}),Es.prototype.getOtherVertex=Es.prototype.Ax,Es.className="LayoutEdge";function fa(a){so.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new vn(NaN,NaN).freeze(),this.tf=new vn(10,10).freeze(),this.Jb=hg,this.Rb=rv,this.nd=cg,this.hd=hS,a&&Object.assign(this,a)}Wt(fa,so),fa.prototype.cloneProtected=function(a){so.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},fa.prototype.qb=function(a){a.classType===fa?a===cg||a===ov||a===ay||a===iv?this.sorting=a:a===rv||a===Fl?this.arrangement=a:a===hg||a===nv?this.alignment=a:jt("Unknown enum value: "+a):so.prototype.qb.call(this,a)},fa.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var b=x.value;if(!b.ph()||b.fromNode===null&&b.toNode===null){if(b.Va(),b instanceof Br)for(b=b.memberParts;b.next();)y.remove(b.value)}else y.remove(b)}var E=y.Fa();if(E.length!==0){switch(this.sorting){case iv:E.reverse();break;case cg:E.sort(this.comparer);break;case ov:E.sort(this.comparer),E.reverse()}var ee=this.wrappingColumn;isNaN(ee)&&(ee=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=ee&&0>=ne&&(ee=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case nv:var ae=y,ue=x,ge=$t.alloc(),ye=Math.max(this.cellSize.width,1);if(!isFinite(ye))for(var Le=ye=0;Le<E.length;Le++){var ze=this.ni(E[Le],ge);ye=Math.max(ye,ze.width)}if(ye=Math.max(ye+ae,1),Le=Math.max(this.cellSize.height,1),!isFinite(Le))for(ze=Le=0;ze<E.length;ze++){var Ke=this.ni(E[ze],ge);Le=Math.max(Le,Ke.height)}Le=Math.max(Le+ue,1),ze=this.arrangement;for(var Je=Ke=this.arrangementOrigin.x,it=this.arrangementOrigin.y,Tt=0,Pt=0,Nt=0;Nt<E.length;Nt++){var At=E[Nt],Bt=this.ni(At,ge),Rt=Math.ceil((Bt.width+ae)/ye)*ye,Zt=Math.ceil((Bt.height+ue)/Le)*Le;switch(ze){case Fl:var On=Math.abs(Je-Bt.width);break;default:On=Je+Bt.width}switch((0<ee&&Tt>ee-1||0<ne&&0<Tt&&On-Ke>ne)&&(b.push(new $t(0,it,ne+ae,Pt)),Tt=0,Je=Ke,it+=Pt,Pt=0),Pt=Math.max(Pt,Zt),ze){case Fl:Bt=-Bt.width;break;default:Bt=0}switch(At.moveTo(Je+Bt,it),ze){case Fl:Je-=Rt;break;default:Je+=Rt}Tt++}b.push(new $t(0,it,ne+ae,Pt)),$t.free(ge);break;case hg:for(ue=ne,ye=ee,Le=y,ze=x,ne=$t.alloc(),Ke=Math.max(this.cellSize.width,1),ee=it=ge=0,ae=st.alloc(),Je=0;Je<E.length;Je++)Pt=E[Je],Tt=this.ni(Pt,ne),Pt=bh(Pt,Pt.locationObject,Pt.locationSpot,ae),ge=Math.max(ge,Pt.x),it=Math.max(it,Tt.width-Pt.x),ee=Math.max(ee,Pt.y);switch(Je=this.arrangement,Je){case Fl:ge+=Le;break;default:it+=Le}Ke=isFinite(Ke)?Math.max(Ke+Le,1):Math.max(ge+it,1);var rr=Pt=this.arrangementOrigin.x;for(Nt=this.arrangementOrigin.y,it=0,ue>=ge&&(ue-=ge),ge=At=0,Rt=Math.max(this.cellSize.height,1),Bt=ee=0,Zt=!0,Tt=st.alloc(),On=0;On<E.length;On++){var $n=E[On],En=this.ni($n,ne),dn=bh($n,$n.locationObject,$n.locationSpot,ae);if(0<it)switch(Je){case Fl:rr=(rr-Pt-(En.width-dn.x))/Ke,rr=Gt.$(Math.round(rr),rr)?Math.round(rr):Math.floor(rr),rr=rr*Ke+Pt;break;default:rr=(rr-Pt+dn.x)/Ke,rr=Gt.$(Math.round(rr),rr)?Math.round(rr):Math.ceil(rr),rr=rr*Ke+Pt}else switch(Je){case Fl:At=rr+dn.x+En.width;break;default:At=rr-dn.x}switch(Je){case Fl:var Dr=-(rr+dn.x)+At;break;default:Dr=rr+En.width-dn.x-At}if(0<ye&&it>ye-1||0<ue&&0<it&&Dr>ue){for(b.push(new $t(0,Zt?Nt-ee:Nt,ue+Le,Bt+ee+ze)),rr=0;rr<it&&On!==it;rr++){Dr=E[On-it+rr];var Mr=bh(Dr,Dr.locationObject,Dr.locationSpot,Tt);Dr.moveTo(Dr.position.x,Dr.position.y+ee-Mr.y)}Bt+=ze,Nt=Zt?Nt+Bt:Nt+(Bt+ee),it=Bt=ee=0,rr=Pt,Zt=!1}switch(rr===Pt&&(ge=Je===Fl?Math.max(ge,En.width-dn.x):Math.min(ge,-dn.x)),ee=Math.max(ee,dn.y),Bt=Math.max(Bt,En.height-dn.y),isFinite(Rt)&&(Bt=Math.max(Bt,Math.max(En.height,Rt)-dn.y)),Zt?$n.moveTo(rr-dn.x,Nt-dn.y):$n.moveTo(rr-dn.x,Nt),Je){case Fl:rr-=dn.x+Le;break;default:rr+=En.width-dn.x+Le}it++}if(b.push(new $t(0,Nt,ue+Le,(Zt?Bt:Bt+ee)+ze)),E.length!==it)for(ue=0;ue<it;ue++)ye=E[E.length-it+ue],Le=bh(ye,ye.locationObject,ye.locationSpot,ae),ye.moveTo(ye.position.x,ye.position.y+ee-Le.y);if(st.free(ae),st.free(Tt),Je===Fl)for(E=0;E<b.length;E++)ee=b[E],ee.width+=ge,ee.x-=ge;else for(E=0;E<b.length;E++)ee=b[E],ee.x>ge&&(ee.width+=ee.x-ge,ee.x=ge);$t.free(ne)}for(ae=ee=ne=E=0;ae<b.length;ae++)ue=b[ae],E=Math.min(E,ue.x),ne=Math.min(ne,ue.y),ee=Math.max(ee,ue.x+ue.width);this.arrangement===Fl?this.commitLayers(b,new st(E+y/2-(ee+E),ne-x/2)):this.commitLayers(b,new st(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},fa.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}zt.Object.defineProperties(fa.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!==hg&&a!==nv||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==rv&&a!==Fl||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ay&&a!==iv&&a!==cg&&a!==ov||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var nv=new an(fa,"Position",0),hg=new an(fa,"Location",1),rv=new an(fa,"LeftToRight",2),Fl=new an(fa,"RightToLeft",3),ay=new an(fa,"Forward",4),iv=new an(fa,"Reverse",5),cg=new an(fa,"Ascending",6),ov=new an(fa,"Descending",7);fa.className="GridLayout",fa.standardComparer=hS,fa.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 b=parseFloat(a[x]),E=parseFloat(y[x]);if(isNaN(b))if(isNaN(E)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},fa.Position=nv,fa.Location=hg,fa.LeftToRight=rv,fa.RightToLeft=Fl,fa.Forward=ay,fa.Reverse=iv,fa.Ascending=cg,fa.Descending=ov;function Ai(){this.On=new sn,this.Dn=new sn,this.Pa=new sn,this.cf=new tn,this.bf=new tn,this.aj=new tn,this.H=null,this.tp=!1}Qe=Ai.prototype,Qe.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Qe.Xe=function(a){this.H=a},Qe.oi=function(a){if(a instanceof _n){if(this.On.add(a),a instanceof Br){var y=a.containingGroup;y===null?this.H.ai.add(a):y.gl.add(a),y=a.layout,y!==null&&(y.diagram=this.H)}}else a instanceof Tn?this.Dn.add(a):a instanceof gi||this.Pa.add(a);y=a.data,y===null||a instanceof gi||(a instanceof Tn?this.bf.add(y,a):this.cf.add(y,a))},Qe.pc=function(a){if(a.Ej(),a instanceof _n){if(this.On.remove(a),a instanceof Br){var y=a.containingGroup;y===null?this.H.ai.remove(a):y.gl.remove(a),y=a.layout,y!==null&&(y.diagram=null)}}else a instanceof Tn?this.Dn.remove(a):a instanceof gi||this.Pa.remove(a);y=a.data,y===null||a instanceof gi||(a instanceof Tn?this.bf.remove(y):this.cf.remove(y))},Qe.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,b=y.key;(!x.Zc()||x instanceof Br)&&jt('Invalid node template in Diagram.nodeTemplateMap: template for "'+b+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof Br||jt('Invalid group template in Diagram.groupTemplateMap: template for "'+b+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof Tn||jt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=ir(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=ir(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=ir(),b=this.nodes.iterator;b.next();){var E=b.value;E.data!==null&&(a.push(E.data),a.push(E.location))}for(b=this.links.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(b=this.parts.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),b=0;b<y.length;b++)E=this.Lc(y[b]),E!==null&&(E.isSelected=!0);for(b=0;b<x.length;b++)E=this.Lc(x[b]),E!==null&&(E.isHighlighted=!0);for(b=0;b<a.length;b+=2)E=this.Lc(a[b]),E!==null&&(E.location=a[b+1]);Un(y),Un(x),Un(a)}},Ai.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Ai.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&cS(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&gd(this.diagram,!1)};function cS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=fS(a,y,b);if(E!==null&&(ul(E),E=E.copy(),E!==null)){var ee=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=b,E.ub=y,a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=ee,b=E;break e}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}Ai.prototype.insertLink=function(){return null},Ai.prototype.resolveReferencesForData=function(){},Ai.prototype.Ro=function(a){return this.H.model.Ro(a)};function fS(a,y,x){a=a.H;var b=a.model;return b.Xj()&&b.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gS||(gS=!0,Yn('No Group template found for category "'+x+'"'),Yn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,Yn('No Node template found for category "'+x+'"'),Yn(" Using default node template")),y=a.ny))),y}Ai.prototype.getLinkCategoryForData=function(){return""},Ai.prototype.setLinkCategoryForData=function(){},Ai.prototype.setFromNodeForLink=function(){},Ai.prototype.setToNodeForLink=function(){},Ai.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(mS||(mS=!0,Yn('No Link template found for category "'+a+'"'),Yn(" Using default link template")),x=y.my)),x},Ai.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Ai.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Ai.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Ep(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Ai.prototype.unresolveReferencesForPart=function(){},Ai.prototype.removeDataForLink=function(){},Ai.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Ai.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof _n?a:null)},Ai.prototype.findLinkForKey=function(){return null},Qe=Ai.prototype,Qe.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Qe.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof _n?a:null)},Qe.Kc=function(a){return a===null?null:this.bf.I(a)},Qe.ms=function(a){for(var y=0;y<arguments.length;++y);y=new sn;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var ee=0;ee<arguments.length;ee++){var ne=arguments[ee];if(ln(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator},Qe.ls=function(a){for(var y=0;y<arguments.length;++y);y=new sn;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var ee=0;ee<arguments.length;ee++){var ne=arguments[ee];if(ln(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator};function sy(a,y,x){for(var b in x){var E=y[b],ee=x[b];if(fn(ee)){if(!fn(E)||E.length<ee.length)return!1;for(var ne=0;ne<E.length;ne++){var ae=ee[ne];if(ae!==void 0&&!dS(a,E[ne],ae))return!1}}else if(!dS(a,E,ee))return!1}return!0}function dS(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(ln(y)&&ln(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}Ai.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 b=a.modelChange;if(b!=="")if(x===no){if(b==="nodeCategory"){var E=this.Lc(a.object),ee=a.newValue;E!==null&&typeof ee=="string"&&(E.category=ee)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===bo){var ne=a.newValue;b==="nodeDataArray"&&ln(ne)&&cS(this,ne),y.isModified=!0}else if(x===Eo){var ae=a.oldValue;b==="nodeDataArray"&&ln(ae)&&this.ip(ae),y.isModified=!0}else x===Ea&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===no){var ue=a.propertyName,ge=a.object;ge===y.model?(ue==="nodeKeyProperty"||ue==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(ge,ue),y.isModified=!0}else if(x===bo||x===Eo){var ye=a.change===bo,Le=ye?a.newParam:a.oldParam,ze=ye?a.newValue:a.oldValue,Ke=this.aj.I(a.object);if(Array.isArray(Ke))for(a=0;a<Ke.length;a++){var Je=Ke[a];if(ye)Cm(Je,ze,Le,!0);else if(!(0>Le)){var it=Le+Vp(Je);Je.pc(it,!0),w0(Je,it,Le)}}y.isModified=!0}}finally{y.aa=!0}}}}},Ai.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)},Ai.prototype.rp=function(){for(var a=this.H.model,y=new sn,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),E.forEach(function(ne){ES(a,ne,!1)}),b=0;b<x.length;b++){var ee=x[b];this.Lc(ee)===null&&CS(a,ee,!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()},Ai.prototype.refreshDataBoundLinks=function(){},Ai.prototype.updateRelationshipsFromData=function(){},Ai.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 b=this.aj.iterator;b.next();){for(var E=b.value,ee=0;ee<E.length;ee++){var ne=E[ee].sx(a);ne!==null&&(x===null&&(x=ir()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Un(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(fn(x)){var b=a.aj.I(x);if(b===null)b=[],b.push(y),a.aj.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}function uy(a,y,x){Zc(y,function(ne){ne=ne.O.s;for(var ae=ne.length,ue=0;ue<ae;ue++)Np(x,ne[ue])});var b=y.Hh;if(fn(b)){var E=a.aj.I(b);if(E!==null){for(var ee=0;ee<E.length;ee++)if(E[ee]===y){E.splice(ee,1),E.length===0&&a.aj.remove(b);break}}}}Ai.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new tn;if(fn(a))for(var E=0;E<a.length;E++)av(this,a[E],y,b,x);else for(a=a.iterator;a.next();)av(this,a.value,y,b,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,E=new sn;for(var ee=new tn,ne=b.iterator;ne.next();){var ae=ne.value;if(ae instanceof Tn)a||ae.fromNode!==null&&ae.toNode!==null||E.add(ae);else if(ae instanceof _n&&ae.data!==null&&x.Tl()){var ue=ae;ae=ne.key;var ge=ae.pg();ge!==null&&(ge=b.I(ge),ge!==null?(x.qe(ue.data,x.wa(ge.data)),ue=y.Kc(ue.data),ae=ae.kh(),ae!==null&&ue!==null&&ee.add(ae,ue)):x.qe(ue.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<ee.count)for(x=ee.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ye=new tn;b.each(function(Le){Le.key.data!==null&&ye.add(Le.key.data,Le.value.data)}),x(ye,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function av(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var ee=a.copyPartData(y,x);if(!(ee instanceof Sr))return null;if(ee.isSelected=!1,ee.isHighlighted=!1,b.add(y,ee),y instanceof _n){for(var ne=y.linksConnected;ne.next();){var ae=ne.value;if(ae.fromNode===y){var ue=b.I(ae);ue!==null&&(ue.fromNode=ee)}ae.toNode===y&&(ae=b.I(ae),ae!==null&&(ae.toNode=ee))}if(y instanceof Br&&ee instanceof Br)for(y=y.memberParts;y.next();)ne=av(a,y.value,x,b,E),ne instanceof Tn||ne===null||(ne.containingGroup=ee)}else if(y instanceof Tn&&ee instanceof Tn)for(ne=y.fromNode,ne!==null&&(ne=b.I(ne),ne!==null&&(ee.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=b.I(ne),ne!==null&&(ee.toNode=ne)),y=y.labelNodes;y.next();)ne=av(a,y.value,x,b,E),ne!==null&&ne instanceof _n&&(ne.labeledLink=ee);return ee}Ai.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Tn||(b=E.copyNodeData(b),ln(b)&&(E.xf(b),x=y.Lc(b)))}else ul(a),x=a.copy(),x!==null&&(E=this.H,y!==null?y.add(x):b!==null&&E!==null&&E.commandHandler!==null&&E.commandHandler.copiesClipboardData&&(y=E.model,E=null,x instanceof Tn||(E=y.copyNodeData(b)),ln(E)&&(x.data=E)));return x},zt.Object.defineProperties(Ai.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}}}),Ai.prototype.updateAllRelationshipsFromData=Ai.prototype.rp,Ai.prototype.findLinksByExample=Ai.prototype.ls,Ai.prototype.findNodesByExample=Ai.prototype.ms,Ai.prototype.findLinkForData=Ai.prototype.Kc,Ai.prototype.findNodeForData=Ai.prototype.ii,Ai.prototype.findPartForData=Ai.prototype.Lc,Ai.prototype.findNodeForKey=Ai.prototype.Vb,Ai.prototype.removeModeledPart=Ai.prototype.ip,Ai.prototype.removeModeledParts=Ai.prototype.Gs,Ai.prototype.rebuildParts=Ai.prototype.Wd;var pS=!1,gS=!1,mS=!1;Ai.className="PartManager";function ea(a){Ai.apply(this,arguments)}Wt(ea,Ai),ea.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},ea.prototype.addModeledParts=function(a){for(Ai.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Bd(a.value);gd(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),gd(a.diagram,!1)}function yS(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),b=a.findLinkTemplateForCategory(x);if(b!==null){ul(b);var E=b.copy();if(E!==null){b=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,E.Tf=x,E.ub=y,x=a.diagram.model;var ee=hv(x,y,!0);ee!==""&&(E.fromPortId=ee),ee=_s(x,y,!0),ee!==void 0&&(ee=a.Vb(ee),ee instanceof _n&&(E.fromNode=ee)),ee=hv(x,y,!1),ee!==""&&(E.toPortId=ee),ee=_s(x,y,!1),ee!==void 0&&(ee=a.Vb(ee),ee instanceof _n&&(E.toNode=ee)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}ea.prototype.removeAllModeledParts=function(){var a=this.diagram.model;SS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function SS(a,y){y.forEach(function(x){a.ip(x)})}ea.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},ea.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},ea.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},ea.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},ea.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},ea.prototype.findPartForKey=function(a){var y=Ai.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},ea.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},ea.prototype.doModelChanged=function(a){var y=this;if(Ai.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var b=a.change;if(x.aa){x.aa=!1;try{var E=a.modelChange;if(E!==""){if(b===no){if(E==="linkFromKey"){var ee=this.Kc(a.object);if(ee!==null){var ne=this.Vb(a.newValue);ee.fromNode=ne}}else if(E==="linkToKey"){var ae=this.Kc(a.object);if(ae!==null){var ue=this.Vb(a.newValue);ae.toNode=ue}}else if(E==="linkFromPortId"){var ge=this.Kc(a.object);if(ge!==null){var ye=a.newValue;typeof ye=="string"&&(ge.fromPortId=ye)}}else if(E==="linkToPortId"){var Le=this.Kc(a.object);if(Le!==null){var ze=a.newValue;typeof ze=="string"&&(Le.toPortId=ze)}}else if(E==="nodeGroupKey"){var Ke=this.Lc(a.object);if(Ke!==null){var Je=a.newValue;if(Je!==void 0){var it=this.Vb(Je);it instanceof Br?Ke.containingGroup=it:Ke.containingGroup=null}else Ke.containingGroup=null}}else if(E==="linkLabelKeys"){var Tt=this.Kc(a.object);if(Tt!==null){var Pt=a.oldValue,Nt=a.newValue;Array.isArray(Pt)&&Pt.forEach(function(dn){0<=Nt.indexOf(dn)||(dn=y.Vb(dn),dn!==null&&(dn.labeledLink=null))}),Array.isArray(Nt)&&Nt.forEach(function(dn){dn=y.Vb(dn),dn!==null&&(dn.labeledLink=Tt)})}}else if(E==="linkCategory"){var At=this.Kc(a.object),Bt=a.newValue;At!==null&&typeof Bt=="string"&&(At.category=Bt)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===bo){var Rt=a.newValue;if(E==="linkDataArray"&&typeof Rt=="object"&&Rt!==null)yS(this,Rt);else if(E==="linkLabelKeys"&&lc(Rt)){var Zt=this.Kc(a.object),On=this.Vb(Rt);Zt!==null&&On!==null&&(On.labeledLink=Zt)}x.isModified=!0}else if(b===Eo){var rr=a.oldValue;if(E==="linkDataArray"&&typeof rr=="object"&&rr!==null)this.ip(rr);else if(E==="linkLabelKeys"&&lc(rr)){var $n=this.Vb(rr);$n!==null&&($n.labeledLink=null)}x.isModified=!0}}else if(b===no){var En=a.propertyName;a.object!==x.model||En!=="linkFromKeyProperty"&&En!=="linkToKeyProperty"&&En!=="linkFromPortIdProperty"&&En!=="linkToPortIdProperty"&&En!=="linkLabelKeysProperty"&&En!=="nodeIsGroupProperty"&&En!=="nodeGroupKeyProperty"&&En!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},ea.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new sn,b=y.linkDataArray;b.forEach(function(ee){x.add(ee)});var E=[];this.links.each(function(ee){ee.data===null||x.contains(ee.data)||E.push(ee.data)}),E.forEach(function(ee){AS(y,ee,!1)}),b.forEach(function(ee){a.Kc(ee)===null&&NS(y,ee,!1)})},ea.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;if(a instanceof Tn){var E=_s(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=_s(b,y,!1),E=x.Vb(E),a.toNode=E,y=b.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){E=y[0];var ee=a.labelNodes.first();if(b.wa(ee.data)===E)return}E=new sn().addAll(y);var ne=new sn;a.labelNodes.each(function(ae){ae.data!==null&&(ae=b.wa(ae.data),ae!==void 0&&ne.add(ae))}),y=ne.copy(),y.hp(E),E=E.copy(),E.hp(ne),(0<y.count||0<E.count)&&(y.each(function(ae){ae=x.Vb(ae),ae!==null&&ae.labeledLink===a&&(ae.labeledLink=null)}),E.each(function(ae){ae=x.Vb(ae),ae!==null&&ae.labeledLink!==a&&(ae.labeledLink=a)}))}}else!(a instanceof gi)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Br)&&(a.containingGroup=y)}}},ea.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=fg(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var ee={};b.next();){var ne=b.value;y.lb(ne)?E instanceof Br&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(ee.link=this.Kc(ne),ee.link!==null&&E instanceof _n&&(_s(y,ne,!0)===x&&(ee.link.fromNode=E),_s(y,ne,!1)===x&&(ee.link.toNode=E),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(ae){return function(ue){return ue===x?(E.labeledLink=ae.link,!0):!1}}(ee)))),ee={link:ee.link}}Bl(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Br&&(E.containingGroup=a))}},ea.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof _n){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Dl(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Dl(y,x,b.data)),a instanceof Br)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Dl(y,x,b)}}},ea.prototype.copyPartData=function(a,y){var x=Ai.prototype.copyPartData.call(this,a,y);if(a instanceof Tn)if(a=a.data,a!==null&&y!==null){var b=y.model;a=b.Jo(a),typeof a=="object"&&a!==null&&(b.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},ea.prototype.insertLink=function(a,y,x,b){var E=this.diagram,ee=E.model,ne=E.toolManager.findTool("Linking"),ae="";if(a!==null&&(y===null&&(y=a),ae=y.portId,ae===null&&(ae="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=ne.archetypeLinkData,b instanceof Tn){if(ul(b),ee=b.copy(),ee!==null)return ee.fromNode=a,ee.fromPortId=ae,ee.toNode=x,ee.toPortId=y,E.add(ee),a=ne.archetypeLabelNodeData,a instanceof _n&&(ul(a),a=a.copy(),a!==null&&(a.labeledLink=ee,E.add(a))),ee}else if(b!==null&&(b=ee.Jo(b),typeof b=="object"&&b!==null))return a!==null&&Ud(ee,b,ee.wa(a.data),!0),Hd(ee,b,ae,!0),x!==null&&Ud(ee,b,ee.wa(x.data),!1),Hd(ee,b,y,!1),ee.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof _n||(a=ee.copyNodeData(a),typeof a=="object"&&a!==null&&(ee.xf(a),a=ee.wa(a),a!==void 0&&ee.Bu(b,a))),E.Kc(b);return null},ea.prototype.findLinkForKey=ea.prototype.findLinkForKey,ea.prototype.findPartForKey=ea.prototype.findPartForKey,ea.prototype.removeAllModeledParts=ea.prototype.removeAllModeledParts,ea.prototype.addModeledParts=ea.prototype.addModeledParts,ea.prototype.addAllModeledParts=ea.prototype.addAllModeledParts,ea.className="GraphLinksPartManager";function Qs(){Ai.apply(this,arguments),this.Sg=null}Wt(Qs,Ai);function sv(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,ee=x;if(a.diagram.isTreePathToChildren||(E=x,ee=y),(b===null||!Ua(b,E,ee,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(ul(b),b=b.copy(),b!==null))){var ne=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=ee,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=ne}}}Qs.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Qs.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Qs.prototype.setFromNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)b.qe(a.data,b.wa(y));else{var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=E}},Qs.prototype.setToNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=E}else b.qe(a.data,b.wa(y))},Qs.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Qs.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Qs.prototype.doModelChanged=function(a){if(Ai.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 b=a.modelChange;if(b!==""){if(x===no){if(b==="nodeParentKey"){var E=a.object,ee=this.Vb(a.newValue),ne=this.ii(E);if(this.Sg!==null)ee!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(ne!==null){var ae=ne.kh();ae!==null?ee===null?y.remove(ae):y.isTreePathToChildren?ae.fromNode=ee:ae.toNode=ee:sv(this,ee,ne)}}else if(b==="parentLinkCategory"){var ue=this.ii(a.object),ge=a.newValue;if(ue!==null&&typeof ge=="string"){var ye=ue.kh();ye!==null&&(ye.category=ge)}}y.isModified=!0}}else if(x===no){var Le=a.propertyName;a.object===y.model&&Le==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Qs.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof _n&&(y=b.mh(y),y=x.Vb(y),b=a.pg(),y!==b&&(b=a.kh(),y!==null?b!==null?x.isTreePathToChildren?b.fromNode=y:b.toNode=y:sv(this,y,a):b!==null&&Ep(x,b,!1)))}}},Qs.prototype.updateDataBindings=function(a,y){Ai.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Qs.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=fg(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var ee=b.value;y.lb(ee)&&E instanceof _n&&y.mh(ee)===x&&sv(this,E,this.ii(ee))}Bl(y,x)}a=y.mh(a),a!==void 0&&E instanceof _n&&(a=this.Vb(a),sv(this,a,E))}},Qs.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof _n){var x=y.wa(a.data),b=this.Kc(a.data);if(b!==null){b.isSelected=!1,b.isHighlighted=!1;var E=b.layer;if(E!==null){var ee=E.pc(-1,b,!1);0<=ee&&this.diagram.cb(Eo,"parts",E,b,null,ee,null),ee=b.layerChanged,ee!==null&&ee(b,E,null)}}for(b=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)E=a.value,E=(b?E.toNode:E.fromNode).data,y.lb(E)&&Dl(y,x,E)}},Qs.prototype.insertLink=function(a,y,x){y=this.diagram.model;var b=a,E=x;return this.diagram.isTreePathToChildren||(b=x,E=a),b!==null&&E!==null?(y.qe(E.data,y.wa(b.data)),E.kh()):null},Qs.prototype.findLinkForKey=Qs.prototype.findLinkForKey,Qs.className="TreePartManager";function cr(a,y){this.kl=new sn,this.il=new sn,this.Wv=`,
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
"removedNodeKeys": `,this.vh=null,hr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new tn,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 tn,this.Lt=new rn,this.Wg=!1,this.o=null,this.undoManager=new ho,a!==void 0&&(fn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}cr.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},cr.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},cr.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},cr.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,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Fr(E)}}return y},cr.prototype.xA=function(a){a.change!==Ea&&jt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof zo?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},cr.prototype.Qv=function(a,y){var x=this,b=!1,E=new sn,ee=new sn,ne=new sn,ae=this.vh;a.changes.each(function(Le){Le.model===x&&(Le.modelChange==="nodeDataArray"?Le.change===bo?E.add(Le.newValue):Le.change===Eo&&ne.add(Le.oldValue):x.lb(Le.object)?ee.add(Le.object):Le.change!==no||x.modelData!==Le.object&&Le.propertyName!=="modelData"?Le.object!==null&&(ae&&ae.contains(Le.object)?ae.get(Le.object).each(function(ze){x.lb(ze)&&ee.add(ze)}):Le.object instanceof cr||x.ri()&&x.Jc(Le.object)||bS(x,Le.object).each(function(ze){ee.add(ze)})):b=!0)});var ue=this.il;ue.clear(),E.each(function(Le){ue.add(x.wa(Le)),y||ee.add(Le)});var ge=this.kl;ge.clear(),ne.each(function(Le){ge.add(x.wa(Le)),y&&ee.add(Le)}),a=x.cloneDeep(ee.Fa());var ye=null;return b&&(ye===null&&(ye={}),ye.modelData=this.cloneDeep(this.modelData)),0<ue.count&&(ye===null&&(ye={}),y?ye.removedNodeKeys=ue.Fa():ye.insertedNodeKeys=ue.Fa()),0<a.length&&(ye===null&&(ye={}),ye.modifiedNodeData=a),0<ge.count&&(ye===null&&(ye={}),y?ye.insertedNodeKeys=ge.Fa():ye.removedNodeKeys=ge.Fa()),ge.clear(),ue.clear(),ye},cr.prototype.cloneDeep=function(a){return Gd(this,a,!0)};function Gd(a,y,x,b,E,ee){function ne(Le,ze){ae?(Le.__gohashid===void 0&&ee.push(Le),b.set(Le,ze)):(Le=Ri++,b.set(Le,ze),E.set(Le,y))}if(!ln(y))return y;ee||(ee=[]);var ae=Object.isExtensible(y);if(b||(b=new tn),ae){var ue=b.get(y);if(ue)return ue}else for(E||(E=new tn),ue=E.iterator;ue.next();){var ge=ue.key;if(ue.value===y&&(ge=b.get(ge)))return ge}if(Array.isArray(y)){ue=[],ne(y,ue);for(var ye=0;ye<y.length;ye++)ue.push(Gd(a,y[ye],!1,b,E,ee))}else if(y instanceof st||y instanceof vn||y instanceof $t||y instanceof Gr||y instanceof Mn)ue=y.copy(),ne(y,ue);else{if(y instanceof Ni||y instanceof Ln||y instanceof an)return y;if(y instanceof rn)ue=new rn().addAll(Gd(a,y.Fa(),!1,b,E,ee)),ne(y,ue);else if(y instanceof sn)ue=new sn().addAll(Gd(a,y.Fa(),!1,b,E,ee)),ne(y,ue);else if(y instanceof tn)ue=new tn().addAll(Gd(a,y.Fa(),!1,b,E,ee)),ne(y,ue);else if(y instanceof Date)ue=new Date(y.getTime()),ne(y,ue);else if(y instanceof RegExp)ue=new RegExp(y),ne(y,ue),ue.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ue=y.copy(),ne(y,ue);else for(ye in ue={},ne(y,ue),y)ye!=="__gohashid"&&(ue[ye]=Gd(a,y[ye],!1,b,E,ee))}return x&&ee.forEach(function(Le){delete Le.__gohashid}),ue}Qe=cr.prototype,Qe.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Qe.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},Qe.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 xS(a,y){y=y.modelData,ln(y)&&(a.dm(y),a.modelData=y)}Qe.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!PS(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
"modelData": `+hy(this,this.modelData)),a+`,
|
|
"nodeDataArray": `+sc(this,this.nodeDataArray,!0)},Qe.kv=function(a){xS(this,a),a=a.nodeDataArray,fn(a)&&(this.dm(a),this.nodeDataArray=a)};function wS(a,y){function x(E,ee){if((ee=ee.part)&&(ee=ee.data,E!==ee)){var ne=b.get(E);ne===null?(ne=new sn,ne.add(ee),b.add(E,ne)):ne.add(ee)}}var b=a.vh;b===null&&(b=new tn,y.changes.each(function(E){if(E.diagram!==null){var ee=E.change;ee===no?(E=E.object.panel)&&(ee=E.data)&&x(ee,E):(ee===bo||ee===Eo)&&(E=E.object,(ee=E.itemArray)&&x(ee,E))}}),a.vh=b)}function bS(a,y){for(var x=new sn,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];lv(a,y,E,E,x)}return x}function lv(a,y,x,b,E){if(Array.isArray(x))for(var ee=0;ee<x.length;ee++){var ne=x[ee];if(ne===y)return E.add(b),!0;if(lv(a,y,ne,b,E))return!0}else if(ln(x)&&Object.getPrototypeOf(x)===Object.prototype)for(ee in x){if(ne=x[ee],ne===y)return E.add(b),!0;if(lv(a,y,ne,b,E))return!0}return!1}Qe.Pv=function(a,y){var x=this,b=!1,E=new sn,ee=new sn,ne=new sn,ae=this.vh;a.changes.each(function(ye){ye.model===x&&(ye.modelChange==="nodeDataArray"?ye.change===bo?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):x.lb(ye.object)?ee.add(ye.object):ye.change!==no||x.modelData!==ye.object&&ye.propertyName!=="modelData"?ye.object!==null&&(ae&&ae.contains(ye.object)?ae.get(ye.object).each(function(Le){x.lb(Le)&&ee.add(Le)}):ye.object instanceof cr||x.ri()&&x.Jc(ye.object)||bS(x,ye.object).each(function(Le){ee.add(Le)})):b=!0)});var ue=this.il;ue.clear(),E.each(function(ye){ue.add(x.wa(ye)),y||ee.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(x.wa(ye)),y&&ee.add(ye)}),a="",b&&(a+=`,
|
|
"modelData": `+hy(this,this.modelData)),0<ue.count&&(a+=(y?this.Yv:this.Wv)+sc(this,ue.Fa(),!0)),0<ee.count&&(a+=this.jy+sc(this,ee.Fa(),!0)),0<ge.count&&(a+=(y?this.Wv:this.Yv)+sc(this,ge.Fa(),!0)),ge.clear(),ue.clear(),a},Qe.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)&&jt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new tn;if(Array.isArray(x))for(var E=0;E<x.length;E++){var ee=x[E],ne=this.wa(ee);ne!=null&&b.set(ne,ee)}if(Array.isArray(y))for(E=y.length,ee=0;ee<E;ee++){ne=y[ee];var ae=this.hc(ne);ae===null&&(ae=(ae=b.get(ne))?ae:this.copyNodeData({}),this.km(ae,ne),this.xf(ae))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],ee=this.wa(E),ee=this.hc(ee),ee!==null){for(var ue in E)ue==="__gohashid"||ue===this.nodeKeyProperty||this.Wj()&&ue===this.nodeIsGroupProperty||this.setDataProperty(ee,ue,E[ue]);this.lm(E,ee)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,ue=0;ue<x;ue++)y=this.hc(a[ue]),y!==null&&this.cm(y)},Qe.$x=function(a,y){a.change!==Ea&&jt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof zo?(y===void 0&&(y=dg(this,this)),wS(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 }'},Qe.yA=function(a,y){return this.$x(a,y)},Qe.np=function(a){return a===void 0&&(a=dg(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Qe.toJSON=function(a){return this.np(a)},Qe.Zw=function(a){var y=null;if(typeof a=="string")try{y=yn.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:jt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&jt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Qe.Ky=function(a){return this.Zw(a)},cr.constructGraphLinksModel=function(){return new cr},Qe=cr.prototype,Qe.dm=function(a){if(fn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(ln(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:jt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(ln(a)){for(y in a)if(x=a[y],ln(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new rn,b=0;b<x.length/2;b++)E.add(new st(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return jx(a)}return a},Qe.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()):fn(a)?sc(this,a):ln(a)?hy(this,a):typeof a=="function"?"null":a.toString()};function sc(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new or;E.add("["),x&&1<b&&E.add(`
|
|
`);for(var ee=0;ee<b;ee++){var ne=y[ee];ne!==void 0&&(0<ee&&(E.add(","),x&&E.add(`
|
|
`)),E.add(a.sm(ne)))}return x&&1<b&&E.add(`
|
|
`),E.add("]"),E.toString()}function PS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function $a(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof st)y={class:"go.Point",x:$a(x.x),y:$a(x.y)};else if(x instanceof vn)y={class:"go.Size",width:$a(x.width),height:$a(x.height)};else if(x instanceof $t)y={class:"go.Rect",x:$a(x.x),y:$a(x.y),width:$a(x.width),height:$a(x.height)};else if(x instanceof Gr)y={class:"go.Margin",top:$a(x.top),right:$a(x.right),bottom:$a(x.bottom),left:$a(x.left)};else if(x instanceof Mn)x.sb()?y={class:"go.Spot",x:$a(x.x),y:$a(x.y),offsetX:$a(x.offsetX),offsetY:$a(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Ni){if(y={class:"go.Brush",type:x.type.name},x.type===Sh?y.color=x.color:(x.type===Ku||x.type===Ys)&&(y.start=x.start,y.end=x.end,x.type===Ys&&(x.startRadius!==0&&(y.startRadius=$a(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=$a(x.endRadius)))),x.colorStops!==null){var b={};for(x=x.colorStops.iterator;x.next();)b[x.key]=x.value;y.colorStops=b}}else x instanceof Ln?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=$a(x.startX)),x.startY!==0&&(y.startY=$a(x.startY)),x.endX!==0&&(y.endX=$a(x.endX)),x.endY!==0&&(y.endY=$a(x.endY)),x.spot1.D(ki)||(y.spot1=x.spot1),x.spot2.D(io)||(y.spot2=x.spot2),x.type===Ln.o&&(y.path=Ln.ia(x))):x instanceof an&&(y={class:"go.EnumValue",classType:dg(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var ee=Po(y,E);if(!PS(E,ee))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&ee instanceof rn){var ne="[";for(ee=ee.iterator;ee.next();){var ae=ee.value;1<ne.length&&(ne+=","),ne+=a.sm(ae.x),ne+=",",ne+=a.sm(ae.y)}ne+="]",b+=ne}else b+=a.sm(ee)}return b+"}"}function qa(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function jx(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 st(qa(a.x),qa(a.y));else if(y==="Size")x=new vn(qa(a.width),qa(a.height));else if(y==="Rect")x=new $t(qa(a.x),qa(a.y),qa(a.width),qa(a.height));else if(y==="Margin")x=new Gr(qa(a.top),qa(a.right),qa(a.bottom),qa(a.left));else if(y==="Spot")typeof a.enum=="string"?x=la(a.enum):x=new Mn(qa(a.x),qa(a.y),qa(a.offsetX),qa(a.offsetY));else if(y==="Brush"){if(x=new Ni,x.type=Qn(Ni,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Mn&&(x.start=a.start),a.end instanceof Mn&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=qa(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=qa(a.endRadius)),a=a.colorStops,ln(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Ln.parse(a.path):x=new Ln,x.type=Qn(Ln,a.type),typeof a.startX=="number"&&(x.startX=qa(a.startX)),typeof a.startY=="number"&&(x.startY=qa(a.startY)),typeof a.endX=="number"&&(x.endX=qa(a.endX)),typeof a.endY=="number"&&(x.endY=qa(a.endY)),a.spot1 instanceof Mn&&(x.spot1=a.spot1),a.spot2 instanceof Mn&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=Qn(b,a.name)));return x}Qe.Pe=function(a){return this.Lt.add(a),this},Qe.ik=function(a){this.Lt.remove(a)},Qe.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,b=0;b<x;b++)y.M(b)(a)},Qe.cb=function(a,y,x,b,E,ee,ne){Ro(this,"",a,y,x,b,E,ee,ne)},Qe.g=function(a,y,x,b,E){Ro(this,"",no,a,this,y,x,b,E)},Qe.Fs=function(a,y,x,b,E,ee){Ro(this,"",no,y,a,x,b,E,ee)};function Ro(a,y,x,b,E,ee,ne,ae,ue){ae===void 0&&(ae=null),ue===void 0&&(ue=null);var ge=new oo;ge.model=a,ge.change=x,ge.modelChange=y,ge.propertyName=b,ge.object=E,ge.oldValue=ee,ge.oldParam=ae,ge.newValue=ne,ge.newParam=ue,a.ds(ge)}cr.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===no){var x=a.object,b=a.propertyName,E=a.I(y);b===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),E!==void 0&&this.kb.add(E,x)),ro(x,b,E)}else a.change===bo?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,ln(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&Zn(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&tr(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!fn(b)&&a.propertyName&&(b=Po(a.object,a.propertyName)),fn(b)&&typeof x=="number"&&(a=a.newValue,y?Zn(b,x):tr(b,x,a))):jt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Eo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,ln(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&tr(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&Zn(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!fn(b)&&a.propertyName&&(b=Po(a.object,a.propertyName)),fn(b)&&typeof x=="number"&&(a=a.oldValue,y?tr(b,x,a):Zn(b,x))):jt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ea&&jt("unknown ChangedEvent: "+a.toString())},cr.prototype.Ea=function(a){return this.undoManager.Ea(a)},cr.prototype.eb=function(a){return this.undoManager.eb(a)},cr.prototype.Kf=function(){return this.undoManager.Kf()},cr.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Qe=cr.prototype,Qe.La=function(a,y){y===void 0&&(y=""),Ro(this,"SourceChanged",Ea,y,a,null,null)},Qe.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Po(a,y),y!==void 0)){if(lc(y))return y;jt("Key value for node data "+a+" is not a number or a string: "+y)}}},Qe.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Po(a,x);b!==y&&this.hc(y)===null&&(ro(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Ro(this,"nodeKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else ro(a,x,y)}};function lc(a){return typeof a=="number"||typeof a=="string"}Qe.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Qe.hc=function(a){return a===null&&jt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&lc(a)?this.kb.I(a):null},Qe.$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 b=this.bl;if(b!==null&&(x=b(this,a),x!=null&&!this.kb.contains(x))){ro(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;ro(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;ro(a,y,x)}}}}},Qe.xf=function(a){a!==null&&(Pr(a),this.lb(a)||CS(this,a,!0))};function CS(a,y,x){var b=a.wa(y);(b===void 0||a.kb.I(b)!==y)&&(a.$u(y),b=a.wa(y),b===void 0&&jt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,tr(a.Tc,b,y)),Ro(a,"nodeDataArray",bo,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}Qe.Fy=function(a){if(fn(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)},Qe.cm=function(a){a!==null&&ES(this,a,!0)};function ES(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){e:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break e}b=-1}if(0>b)return;Zn(a.Tc,b)}Ro(a,"nodeDataArray",Eo,"nodeDataArray",a,y,null,b,null),a.qp(y)}Qe.nA=function(a){if(fn(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)},Qe.$z=function(a){if(a!==this.nodeDataArray&&fn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var ee=a[E],ne=this.wa(ee);if(ne!==void 0){x.add(ne);var ae=this.hc(ne);ae!==ee&&(ae!==null?(this.Do(ae,ee),this.lm(ee,ae)):(ee=this.cloneDeep(ee),this.km(ee,ne),this.xf(ee)))}else ne=this.cloneDeep(ee),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},Qe.jp=function(a,y){y!==void 0&&(a=fg(this,a),a instanceof sn&&this.Vf.add(y,a))},Qe.Lv=function(){},Qe.fm=function(){},Qe.em=function(){},Qe.qp=function(){};function Dl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new sn,a.Vf.add(y,b)),b.add(x)}}function Bl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof sn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function fg(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof sn?a:null)}Qe.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},cr.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):uv(this,a,!0),ln(a)&&hr(a),a};function uv(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=uv(a,y[x],a.copiesArrayObjects);b.push(E)}return hr(b),b}if(x&&ln(y)){x=(x=y.constructor)?new x:{},E=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(b in y)if(b==="__gohashid")x.__gohashid=void 0;else if(b===E)x[E]=void 0;else{var ee=Po(y,b),ne=dg(a,ee);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||ee instanceof cr||ee instanceof ho||ee instanceof zo||ee instanceof oo||(ee=uv(a,ee,!1)),ro(x,b,ee)}return hr(x),x}return y instanceof st||y instanceof vn||y instanceof $t||y instanceof Mn||y instanceof Gr?y.copy():y}cr.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!kS&&a instanceof _t&&(kS=!0,Yn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Yn(" Is that really your intent?"));var b=Po(a,y);b!==x&&(ro(a,y,x),this.Fs(a,y,b,x))},Qe=cr.prototype,Qe.set=function(a,y,x){this.setDataProperty(a,y,x)},Qe.Do=function(a,y){if(y){var x=this.lb(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||this.setDataProperty(a,b,y[b])}},Qe.Ay=function(a,y){this.ts(a,-1,y)},Qe.ts=function(a,y,x){0>y&&(y=a.length),tr(a,y,x),Ro(this,"",bo,"",a,null,x,null,y)},Qe.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&jt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Zn(a,y),Ro(this,"",Eo,"",a,x,null,y,null)},Qe.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Po(a,y),y===void 0))return"";if(typeof y=="string")return y;jt("getCategoryForNodeData found a non-string category for "+a+": "+y)},Qe.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Po(a,x);b===void 0&&(b=""),b!==y&&(ro(a,x,y),Ro(this,"nodeCategory",no,x,a,b,y))}else ro(a,x,y)}},Qe.lm=function(a,y){this.jm(y,this.Ro(a))},Qe.Tl=function(){return!1},Qe.Wj=function(){return!1},Qe.ri=function(){return!1},Qe.xs=function(){return!1},Qe.Xj=function(){return!1};function cy(){return new cr}function dg(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 dg(a,y.constructor);return typeof y}function fy(a){return bl[a]?bl[a]:yn.go!==void 0&&yn.go[a]?yn.go[a]:null}function Po(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(b){}return x}function ro(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(b){}}zt.Object.defineProperties(cr.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===""&&jt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&jt("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,b=0;b<x;b++){var E=a[b];ln(E)||jt("Model.nodeDataArray must only contain Objects, not: "+E),Pr(E)}for(this.Tc=a,b=new rn,E=0;E<x;E++){var ee=a[E],ne=this.wa(ee);ne===void 0||this.kb.I(ne)!==null?b.add(ee):this.kb.add(ne,ee)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),ee=this.wa(E),ee!==void 0&&this.kb.add(ee,E);for(Ro(this,"nodeDataArray",no,"nodeDataArray",this,y,a),y=0;y<x;y++)b=a[y],this.fm(b),this.em(b);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"}}}),cr.prototype.setCategoryForNodeData=cr.prototype.jm,cr.prototype.getCategoryForNodeData=cr.prototype.Ro,cr.prototype.removeArrayItem=cr.prototype.ov,cr.prototype.insertArrayItem=cr.prototype.ts,cr.prototype.addArrayItem=cr.prototype.Ay,cr.prototype.assignAllDataProperties=cr.prototype.Do,cr.prototype.set=cr.prototype.set,cr.prototype.clearUnresolvedReferences=cr.prototype.Qy,cr.prototype.mergeNodeDataArray=cr.prototype.$z,cr.prototype.removeNodeDataCollection=cr.prototype.nA,cr.prototype.removeNodeData=cr.prototype.cm,cr.prototype.addNodeDataCollection=cr.prototype.Fy,cr.prototype.addNodeData=cr.prototype.xf,cr.prototype.makeNodeDataKeyUnique=cr.prototype.$u,cr.prototype.findNodeDataForKey=cr.prototype.hc,cr.prototype.containsNodeData=cr.prototype.lb,cr.prototype.setKeyForNodeData=cr.prototype.km,cr.prototype.getKeyForNodeData=cr.prototype.wa,cr.prototype.updateTargetBindings=cr.prototype.La,cr.prototype.commit=cr.prototype.commit,cr.prototype.rollbackTransaction=cr.prototype.Kf,cr.prototype.commitTransaction=cr.prototype.eb,cr.prototype.startTransaction=cr.prototype.Ea,cr.prototype.raiseDataChanged=cr.prototype.Fs,cr.prototype.raiseChanged=cr.prototype.g,cr.prototype.raiseChangedEvent=cr.prototype.cb,cr.prototype.removeChangedListener=cr.prototype.ik,cr.prototype.addChangedListener=cr.prototype.Pe,cr.prototype.writeJsonValue=cr.prototype.sm,cr.prototype.replaceJsonObjects=cr.prototype.dm,cr.prototype.applyIncrementalJSON=cr.prototype.Ky,cr.prototype.applyIncrementalJson=cr.prototype.Zw,cr.prototype.toJSON=cr.prototype.toJSON,cr.prototype.toJson=cr.prototype.np,cr.prototype.toIncrementalJSON=cr.prototype.yA,cr.prototype.toIncrementalJson=cr.prototype.$x,cr.prototype.toIncrementalData=cr.prototype.xA,cr.prototype.clear=cr.prototype.clear;var kS=!1,bl={};cr.className="Model",cr.fromJSON=cr.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=yn.JSON.parse(a)}catch(ee){}else typeof a=="object"?x=a:jt("Unable to construct a Model from: "+a);if(y===null){a=null;var b=x.class;if(typeof b=="string")try{var E=null;b.indexOf("go.")===0?(b=b.substr(3),E=fy(b)):(E=fy(b),E===null&&(E=yn[b])),typeof E=="function"&&(a=new E)}catch(ee){}a===null||a instanceof cr?y=a:jt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=cr.constructGraphLinksModel()),y.gp(x),y.kv(x),y},cr.safePropertyValue=Po,cr.safePropertySet=ro,bl.Brush=Ni,bl.ChangedEvent=oo,bl.Geometry=Ln,bl.Margin=Gr,bl.Panel=bn,bl.Point=st,bl.Rect=$t,bl.Size=vn,bl.Spot=Mn,bl.Transaction=zo,bl.UndoManager=ho;function Lo(a,y,x,b){hr(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,b===void 0?(this.el=LS,this.wk=null):(this.el=pg,this.wk=b),this.st=new sn}Lo.prototype.copy=function(){var a=new Lo;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},Qe=Lo.prototype,Qe.qb=function(a){a.classType===Lo&&(this.mode=a)},Qe.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return this._isFrozen=!1,this},Qe.Kx=function(a){return a===void 0&&(a=null),this.mode=pg,this.backConverter=a,this},Qe.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Qe.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function TS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Qe.Mv=function(a,y,x){var b=this.sl;if(x===void 0||b===""||b===x){x=this.xl;var E=this.Im;if(E===null&&x==="")Yn("Binding error: target property is the empty string: "+this.toString());else{var ee=y;if(b!==""&&(ee=Po(y,b)),ee!==void 0)if(E===null)x!==""&&ro(a,x,ee);else try{if(x!==""){var ne=E(ee,a);ro(a,x,ne)}else E(ee,a)}catch(ae){}}}},Qe.sp=function(a,y,x,b){if(this.el===pg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var ee=this.wk,ne=a;if(E!==""&&(ne=Po(a,E)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var ae=b!==null?b.diagram:null,ue=ae!==null?ae.model:null;if(ee===null){if(x!=="")ue!==null?ue.setDataProperty(y,x,ne):ro(y,x,ne);else if(ue!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var ge=b.itemIndex,ye=b.panel.itemArray;ue.ov(ye,ge),ue.ts(ye,ge,ne)}}else try{if(x!==""){var Le=ee(ne,y,ue);ue!==null?ue.setDataProperty(y,x,Le):ro(y,x,Le)}else{var ze=ee(ne,y,ue);if(ze!==void 0&&ue!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Ke=b.itemIndex,Je=b.panel.itemArray;ue.ov(Je,Ke),ue.ts(Je,Ke,ze)}}}catch(it){}}finally{this.st.remove(a)}}}},zt.Object.defineProperties(Lo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&un(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&un(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&un(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&un(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&un(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&un(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&un(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&un(this),this.el=a}}}),Lo.prototype.updateSource=Lo.prototype.sp,Lo.prototype.updateTarget=Lo.prototype.Mv,Lo.prototype.ofModel=Lo.prototype.dA,Lo.prototype.ofObject=Lo.prototype.cp,Lo.prototype.makeTwoWay=Lo.prototype.Kx;var Ox="Binding",LS=new an(Lo,"OneWay",1),pg=new an(Lo,"TwoWay",2);Lo.className="Binding",Lo.parseEnum=function(a,y){return function(x){return x=Qn(a,x),x===null?y:x}},Lo.toString=Fr,Lo.OneWay=LS,Lo.TwoWay=pg;function li(a,y,x){cr.call(this),this.Vv=`,
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
"removedLinkKeys": `,this.md=[],this.$f=new sn,this.wb=new tn,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&&(fn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Wt(li,cr),li.constructGraphLinksModel=cr.constructGraphLinksModel,li.prototype.cloneProtected=function(a){cr.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},Qe=li.prototype,Qe.clear=function(){cr.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Qe.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,b;for(b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Fr(E)}for(y+=`
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+_s(this,E,!0)+"-->"+_s(this,E,!1)}return y},Qe.Qv=function(a,y){this.linkKeyProperty===""&&jt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=cr.prototype.Qv.call(this,a,y),b=this,E=new sn,ee=new sn,ne=new sn,ae=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===bo?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):b.Jc(ye.object)?ee.add(ye.object):ye.object!==null&&(ye.object!==null&&ae&&ae.contains(ye.object)?ae.get(ye.object).each(function(Le){b.Jc(Le)&&ee.add(Le)}):ye.object instanceof cr||b.lb(ye.object)||MS(b,ye.object).each(function(Le){ee.add(Le)})))});var ue=this.il;ue.clear(),E.each(function(ye){ue.add(b.Ac(ye)),y||ee.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(b.Ac(ye)),y&&ee.add(ye)}),a=b.cloneDeep(ee.Fa()),0<ue.count&&(x===null&&(x={}),y?x.removedLinkKeys=ue.Fa():x.insertedLinkKeys=ue.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<ge.count&&(x===null&&(x={}),y?x.insertedLinkKeys=ge.Fa():x.removedLinkKeys=ge.Fa()),ge.clear(),ue.clear(),x},Qe.rm=function(){var a=cr.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},Qe.gp=function(a){cr.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)},Qe.Rv=function(){var a=cr.prototype.Rv.call(this),y=`,
|
|
"linkDataArray": `+sc(this,this.linkDataArray,!0);return a+y},Qe.kv=function(a){cr.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function MS(a,y){for(var x=new sn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];lv(a,y,E,E,x)}return x}Qe.Pv=function(a,y){this.linkKeyProperty===""&&jt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=cr.prototype.Pv.call(this,a,y),b=this,E=new sn,ee=new sn,ne=new sn,ae=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===bo?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):b.Jc(ye.object)?ee.add(ye.object):ye.object!==null&&(ye.object!==null&&ae&&ae.contains(ye.object)?ae.get(ye.object).each(function(Le){b.Jc(Le)&&ee.add(Le)}):ye.object instanceof cr||b.lb(ye.object)||MS(b,ye.object).each(function(Le){ee.add(Le)})))});var ue=this.il;ue.clear(),E.each(function(ye){ue.add(b.Ac(ye)),y||ee.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(b.Ac(ye)),y&&ee.add(ye)}),a=x,0<ue.count&&(a+=(y?this.Xv:this.Vv)+sc(this,ue.Fa(),!0)),0<ee.count&&(a+=this.iy+sc(this,ee.Fa(),!0)),0<ge.count&&(a+=(y?this.Vv:this.Xv)+sc(this,ge.Fa(),!0)),ge.clear(),ue.clear(),a},Qe.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)&&jt("applyIncrementalJson cannot change Model properties"),cr.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,b=0;b<x;b++){var E=y[b],ee=this.jh(E);ee===null&&(ee=this.Jo({}),this.Ks(ee,E),this.fi(ee))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],ee=this.Ac(E),ee=this.jh(ee),ee!==null){for(var ne in E)ne!=="__gohashid"&&ne!==this.linkKeyProperty&&this.setDataProperty(ee,ne,E[ne]);jS(this,E,ee)}}if(a=a.removedLinkKeys,Array.isArray(a))for(ne=a.length,y=0;y<ne;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},li.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===no){var x=a.object,b=a.propertyName;if(b===this.linkKeyProperty&&this.Jc(x)){var E=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),E!==void 0&&this.wb.add(E,x),ro(x,b,E);return}}else if(a.change===bo){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,ln(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)):0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===Eo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,ln(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue):(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)));return}}cr.prototype.changeState.call(this,a,y)}},Qe=li.prototype,Qe.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),ro(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Qe.yx=function(a){return _s(this,a,!0)},Qe.wv=function(a,y){Ud(this,a,y,!0)},Qe.Bx=function(a){return _s(this,a,!1)},Qe.Bv=function(a,y){Ud(this,a,y,!1)};function _s(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Po(y,a),a!==void 0))){if(lc(a))return a;jt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Ud(a,y,x,b){if(x===null&&(x=void 0),y!==null){var E=b?a.lf:a.mf;if(E!=="")if(x=a.Vl(x),a.Jc(y)){var ee=Po(y,E);ee!==x&&(Bl(a,ee,y),ro(y,E,x),a.hc(x)===null&&Dl(a,x,y),Ro(a,b?"linkFromKey":"linkToKey",no,E,y,ee,x),typeof E=="string"&&a.La(y,E))}else ro(y,E,x)}}Qe.zx=function(a){return hv(this,a,!0)},Qe.xv=function(a,y){Hd(this,a,y,!0)},Qe.Cx=function(a){return hv(this,a,!1)},Qe.Cv=function(a,y){Hd(this,a,y,!1)};function hv(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Po(y,a),y===void 0?"":y)}function Hd(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var ee=Po(y,E);ee===void 0&&(ee=""),ee!==x&&(ro(y,E,x),Ro(a,b?"linkFromPortId":"linkToPortId",no,E,y,ee,x),typeof E=="string"&&a.La(y,E))}else ro(y,E,x)}}Qe.Ef=function(a){if(a===null)return cv;var y=this.je;return y===""?cv:(a=Po(a,y),a===void 0?cv:a)},Qe.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Po(a,x);if(b===void 0&&(b=cv),b!==y){if(Array.isArray(b))for(var E=b.length,ee=0;ee<E;ee++)Bl(this,b[ee],a);for(ro(a,x,y),E=y.length,ee=0;ee<E;ee++){var ne=y[ee];this.hc(ne)===null&&Dl(this,ne,a)}Ro(this,"linkLabelKeys",no,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else ro(a,x,y)}},Qe.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Po(a,x);if(b===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(b)){var E=b.indexOf(y);0<=E||(E=b.length,b.push(y),this.Jc(a)&&(this.hc(y)===null&&Dl(this,y,a),Ro(this,"linkLabelKeys",bo,x,a,null,y,null,E)))}else jt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Qe.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Po(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(Bl(this,y,a),Ro(this,"linkLabelKeys",Eo,x,a,y,null,E,null)))}else b!==void 0&&jt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Qe.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Po(a,y),y!==void 0)){if(lc(y))return y;jt("Key value for link data "+a+" is not a number or a string: "+y)}}},Qe.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Po(a,x);b!==y&&this.jh(y)===null&&(ro(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Ro(this,"linkKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},Qe.jh=function(a){return a===null&&jt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&lc(a)?this.wb.I(a):null},Qe.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){ro(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;ro(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;ro(a,y,x)}}}}},Qe.Jc=function(a){return a===null?!1:this.$f.contains(a)},Qe.fi=function(a){a!==null&&(Pr(a),this.Jc(a)||NS(this,a,!0))};function NS(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&jt("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),Ro(a,"linkDataArray",bo,"linkDataArray",a,null,y,null,b),dy(a,y)}Qe.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)},Qe.bm=function(a){a!==null&&AS(this,a,!0)};function AS(a,y,x){a.$f.remove(y);var b=a.Ac(y);if(b!==void 0&&a.wb.remove(b),b=null,x){if(b=a.md.indexOf(y),0>b)return;a.md.splice(b,1)}if(Ro(a,"linkDataArray",Eo,"linkDataArray",a,y,null,b,null),x=_s(a,y,!0),Bl(a,x,y),x=_s(a,y,!1),Bl(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,ee=0;ee<E;ee++)x=b[ee],Bl(a,x,y)}Qe.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)},Qe.Zz=function(a){if(this.linkKeyProperty===""&&jt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&fn(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var ee=a[E],ne=this.Ac(ee);if(ne!==void 0){x.add(ne);var ae=this.jh(ne);ae!==ee&&(ae!==null?(this.Do(ae,ee),jS(this,ee,ae)):(ee=this.cloneDeep(ee),this.Ks(ee,ne),this.fi(ee)))}else ne=this.cloneDeep(ee),this.fi(ne),x.add(this.Ac(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function dy(a,y){var x=_s(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Dl(a,x,y),x=_s(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Dl(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,ee=0;ee<E;ee++)x=b[ee],a.hc(x)===null&&Dl(a,x,y)}Qe.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):uv(this,a,!0),ln(a)&&(hr(a),this.lf!==""&&ro(a,this.lf,void 0),this.mf!==""&&ro(a,this.mf,void 0),this.je!==""&&ro(a,this.je,[])),a},Qe.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Po(a,y)},Qe.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Po(a,y),y!==void 0)){if(lc(y))return y;jt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Qe.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Po(a,x);b!==y&&(Bl(this,b,a),ro(a,x,y),this.hc(y)===null&&Dl(this,y,a),Ro(this,"nodeGroupKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},li.prototype.copyNodeData=function(a){return a===null?null:(a=cr.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Po(a,this.Je)===void 0||ro(a,this.Je,void 0),a)},li.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){Ud(this,a,x,!0);return}if(y===this.linkToKeyProperty){Ud(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Hd(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Hd(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 b=Po(a,y);b!==x&&(ro(a,y,x),this.Fs(a,y,b,x))},Qe=li.prototype,Qe.Do=function(a,y){if(y){var x=this.lb(a),b=this.Jc(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||x&&E===this.nodeIsGroupProperty&&Po(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},Qe.jp=function(a,y){cr.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 b=x.value,E=a,ee=y;if(_s(this,b,!0)===E){var ne=this.lf;ro(b,ne,ee),Ro(this,"linkFromKey",no,ne,b,E,ee),typeof ne=="string"&&this.La(b,ne)}if(_s(this,b,!1)===E&&(ne=this.mf,ro(b,ne,ee),Ro(this,"linkToKey",no,ne,b,E,ee),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var ae=ne.length,ue=this.je,ge=0;ge<ae;ge++)ne[ge]===E&&(ne[ge]=ee,Ro(this,"linkLabelKeys",bo,ue,b,E,ee,ge,ge))}},Qe.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;ro(a,b,x),Ro(this,"nodeGroupKey",no,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Qe.Lv=function(){cr.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},Qe.fm=function(a){cr.prototype.fm.call(this,a),a=this.wa(a);var y=fg(this,a);if(y!==null){var x=ir();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;Ro(this,"nodeGroupKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(_s(this,b,!0)===a&&(E=this.lf,Ro(this,"linkFromKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),_s(this,b,!1)===a&&(E=this.mf,Ro(this,"linkToKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var ee=E.length,ne=this.je,ae=0;ae<ee;ae++)E[ae]===a&&(Ro(this,"linkLabelKeys",bo,ne,b,a,a,ae,ae),x.push(b))}for(y=0;y<x.length;y++)Bl(this,a,x[y]);Un(x)}},Qe.em=function(a){cr.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Dl(this,y,a)},Qe.qp=function(a){cr.prototype.qp.call(this,a);var y=this.lh(a);Bl(this,y,a)},Qe.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Po(a,y),y===void 0))return"";if(typeof y=="string")return y;jt("getCategoryForLinkData found a non-string category for "+a+": "+y)},li.prototype.getLinkCategoryForData=function(a){return this.ps(a)},li.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Po(a,x);b===void 0&&(b=""),b!==y&&(ro(a,x,y),Ro(this,"linkCategory",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},li.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Qe=li.prototype,Qe.lm=function(a,y){cr.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function jS(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))}Qe.Wj=function(){return!0},Qe.ri=function(){return!0},Qe.xs=function(){return!0},Qe.Xj=function(){return!0},zt.Object.defineProperties(li.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,b=0;b<x;b++){var E=a[b];ln(E)||jt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),Pr(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new rn,E=0;E<x;E++){var ee=a[E],ne=this.Ac(ee);ne===void 0||this.wb.I(ne)!==null?b.add(ee):this.wb.add(ne,ee)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),ee=this.Ac(E),ee!==void 0&&this.wb.add(ee,E)}for(b=new sn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,Ro(this,"linkDataArray",no,"linkDataArray",this,y,a),y=0;y<x;y++)dy(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,b=0;b<x;b++){var E=this.linkDataArray[b],ee=this.Ac(E);ee===void 0&&(this.Bs(E),ee=this.Ac(E)),ee!==void 0&&this.wb.add(ee,E)}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"}}}),li.prototype.setCategoryForLinkData=li.prototype.lp,li.prototype.getCategoryForLinkData=li.prototype.ps,li.prototype.assignAllDataProperties=li.prototype.Do,li.prototype.setGroupKeyForNodeData=li.prototype.mp,li.prototype.getGroupKeyForNodeData=li.prototype.lh,li.prototype.isGroupForNodeData=li.prototype.Yu,li.prototype.copyLinkData=li.prototype.Jo,li.prototype.mergeLinkDataArray=li.prototype.Zz,li.prototype.removeLinkDataCollection=li.prototype.lA,li.prototype.removeLinkData=li.prototype.bm,li.prototype.addLinkDataCollection=li.prototype.Ey,li.prototype.addLinkData=li.prototype.fi,li.prototype.containsLinkData=li.prototype.Jc,li.prototype.makeLinkDataKeyUnique=li.prototype.Bs,li.prototype.findLinkDataForKey=li.prototype.jh,li.prototype.setKeyForLinkData=li.prototype.Ks,li.prototype.getKeyForLinkData=li.prototype.Ac,li.prototype.removeLabelKeyForLinkData=li.prototype.Qx,li.prototype.addLabelKeyForLinkData=li.prototype.Bu,li.prototype.setLabelKeysForLinkData=li.prototype.Ls,li.prototype.getLabelKeysForLinkData=li.prototype.Ef,li.prototype.setToPortIdForLinkData=li.prototype.Cv,li.prototype.getToPortIdForLinkData=li.prototype.Cx,li.prototype.setFromPortIdForLinkData=li.prototype.xv,li.prototype.getFromPortIdForLinkData=li.prototype.zx,li.prototype.setToKeyForLinkData=li.prototype.Bv,li.prototype.getToKeyForLinkData=li.prototype.Bx,li.prototype.setFromKeyForLinkData=li.prototype.wv,li.prototype.getFromKeyForLinkData=li.prototype.yx,li.prototype.clear=li.prototype.clear;var cv=Object.freeze([]);li.className="GraphLinksModel",bl.GraphLinksModel=li,cr.constructGraphLinksModel=cr.constructGraphLinksModel=function(){return new li},cr.initDiagramModel=cy=function(){return new li};function es(a,y){cr.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(fn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Wt(es,cr),es.constructGraphLinksModel=cr.constructGraphLinksModel,es.prototype.cloneProtected=function(a){cr.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Qe=es.prototype,Qe.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,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Fr(E)}}return y},Qe.rm=function(){var a=cr.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Qe.gp=function(a){cr.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Qe.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&jt("applyIncrementalJson cannot change Model properties"),cr.prototype.fp.call(this,a)},Qe.Vl=function(a){return a},Qe.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Po(a,y),y!==void 0)){if(lc(y))return y;jt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Qe.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 b=Po(a,x);b!==y&&(Bl(this,b,a),ro(a,x,y),this.hc(y)===null&&Dl(this,y,a),Ro(this,"nodeParentKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},Qe.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Po(a,y),y===void 0)?"":typeof y=="string"?y:(jt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},es.prototype.getLinkCategoryForData=function(a){return this.ss(a)},es.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Po(a,x);b===void 0&&(b=""),b!==y&&(ro(a,x,y),Ro(this,"parentLinkCategory",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},es.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},es.prototype.copyNodeData=function(a){return a===null?null:(a=cr.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Po(a,this.Ke)===void 0||ro(a,this.Ke,void 0),a)},es.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 b=Po(a,y);b!==x&&(ro(a,y,x),this.Fs(a,y,b,x))},Qe=es.prototype,Qe.jp=function(a,y){cr.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Qe.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;ro(a,b,x),Ro(this,"nodeParentKey",no,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Qe.fm=function(a){cr.prototype.fm.call(this,a),a=this.wa(a);var y=fg(this,a);if(y!==null){var x=ir();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;Ro(this,"nodeParentKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)Bl(this,a,x[y]);Un(x)}},Qe.em=function(a){cr.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Dl(this,y,a)},Qe.qp=function(a){cr.prototype.qp.call(this,a);var y=this.mh(a);Bl(this,y,a)},Qe.lm=function(a,y){cr.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Qe.Tl=function(){return!0},Qe.xs=function(){return!0},zt.Object.defineProperties(es.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"}}}),es.prototype.setParentLinkCategoryForNodeData=es.prototype.Ms,es.prototype.getParentLinkCategoryForNodeData=es.prototype.ss,es.prototype.setParentKeyForNodeData=es.prototype.qe,es.prototype.getParentKeyForNodeData=es.prototype.mh,es.className="TreeModel",bl.TreeModel=es;function po(a){so.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Pl,this.Ti=0,this.Zv=new st,this.Jp=this.me=0,this.Xr=new yg,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Pl,this.K=ts,this.nd=Kd,this.hd=oy,this.tf=6,this.Nn=yv,a&&Object.assign(this,a)}Wt(po,so),po.prototype.cloneProtected=function(a){so.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},po.prototype.qb=function(a){a.classType===po?a===mv||a===vv||a===pv||a===gv||a===Kd?this.sorting=a:a===qc||a===Wd||a===ts||a===hc?this.direction=a:a===Th||a===uc||a===Pl||a===Cl?this.arrangement=a:(a===zf||a===yv)&&(this.nodeDiameterFormula=a):so.prototype.qb.call(this,a)},po.prototype.createNetwork=function(){return new Vd(this)},po.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 rn;y.addAll(a.iterator),a=new rn;var x=new rn,b=this.sort(y),E,ee,ne=this.Jp,ae=this.arrangement,ue=this.nodeDiameterFormula,ge=this.radius;(!isFinite(ge)||0>=ge)&&(ge=NaN);var ye=this.aspectRatio;(!isFinite(ye)||0>=ye)&&(ye=1);var Le=this.startAngle;isFinite(Le)||(Le=0);var ze=this.sweepAngle;if((!isFinite(ze)||360<ze||1>ze)&&(ze=360),y=this.spacing,isFinite(y)||(y=NaN),ae===Cl&&ue===zf?ae=Pl:ae===Cl&&ue!==zf&&(ae=this.arrangement),(this.direction===qc||this.direction===Wd)&&this.sorting!==Kd){for(ue=0;!(ue>=b.length)&&(a.add(b.M(ue)),!(ue+1>=b.length));ue+=2)x.add(b.M(ue+1));this.direction===qc?(this.arrangement===Cl&&a.reverse(),b=new rn,b.addAll(a),b.addAll(x)):(this.arrangement===Cl&&x.reverse(),b=new rn,b.addAll(x),b.addAll(a))}ue=b.length;for(var Ke=ee=E=0;Ke<b.length;Ke++){var Je=Le+ze*ee*(this.direction===ts?1:-1)/ue,it=b.M(Ke).diameter;isNaN(it)&&(it=cc(b.M(Ke),Je)),360>ze&&(Ke===0||Ke===b.length-1)&&(it/=2),E+=it,ee++}if(isNaN(ge)||ae===Cl){if(isNaN(y)&&(y=6),ae!==Pl&&ae!==Cl){for(ee=-1/0,ne=0;ne<ue;ne++)Ke=b.M(ne),E=b.M(ne===ue-1?0:ne+1),isNaN(Ke.diameter)&&cc(Ke,0),isNaN(E.diameter)&&cc(E,0),ee=Math.max(ee,(Ke.diameter+E.diameter)/2);ne=ee+y,ae===Th?ge=(ee+y)/(2*Math.PI/ue):ge=fv(this,ne*(360<=ze?ue:ue-1),ye,Le*Math.PI/180,ze*Math.PI/180)}else ge=fv(this,E+(360<=ze?ue:ue-1)*(ae!==Cl?y:1.6*y),ye,Le*Math.PI/180,ze*Math.PI/180);ee=ge*ye}else if(ee=ge*ye,Ke=py(this,ge,ee,Le*Math.PI/180,ze*Math.PI/180),isNaN(y))(ae===Pl||ae===Cl)&&(y=(Ke-E)/(360<=ze?ue:ue-1));else if(ae===Pl||ae===Cl)Ke=(Ke-E)/(360<=ze?ue:ue-1),Ke<y?(ge=fv(this,E+y*(360<=ze?ue:ue-1),ye,Le*Math.PI/180,ze*Math.PI/180),ee=ge*ye):y=Ke;else{for(ne=-1/0,E=0;E<ue;E++)Je=b.M(E),it=b.M(E===ue-1?0:E+1),isNaN(Je.diameter)&&cc(Je,0),isNaN(it.diameter)&&cc(it,0),ne=Math.max(ne,(Je.diameter+it.diameter)/2);ne+=y,E=fv(this,ne*(360<=ze?ue:ue-1),ye,Le*Math.PI/180,ze*Math.PI/180),E>ge?(ge=E,ee=ge*ye):ne=Ke/(360<=ze?ue:ue-1)}if(this.kw=ae,this.lc=ge,this.Zm=ye,this.lw=Le,this.Wp=ze,this.Ti=y,this.me=ee,this.Jp=ne,y=b,b=this.kw,ae=this.lc,ge=this.lw,ye=this.Wp,Le=this.Ti,ze=this.me,ue=this.Jp,this.direction!==qc&&this.direction!==Wd||b!==Cl)if(this.direction===qc||this.direction===Wd){switch(ne=0,b){case uc:ne=180*dv(this,ae,ze,ge,ue)/Math.PI;break;case Pl:ue=y=0,ne=a.first(),ne!==null&&(y=cc(ne,Math.PI/2)),ne=x.first(),ne!==null&&(ue=cc(ne,Math.PI/2)),ne=180*dv(this,ae,ze,ge,Le+(y+ue)/2)/Math.PI;break;case Th:ne=ye/y.length}if(this.direction===qc){switch(b){case uc:vg(this,a,ge,hc);break;case Pl:mg(this,a,ge,hc);break;case Th:gg(this,a,ye/2,ge,hc)}switch(b){case uc:vg(this,x,ge+ne,ts);break;case Pl:mg(this,x,ge+ne,ts);break;case Th:gg(this,x,ye/2,ge+ne,ts)}}else{switch(b){case uc:vg(this,x,ge,hc);break;case Pl:mg(this,x,ge,hc);break;case Th:gg(this,x,ye/2,ge,hc)}switch(b){case uc:vg(this,a,ge+ne,ts);break;case Pl:mg(this,a,ge+ne,ts);break;case Th:gg(this,a,ye/2,ge+ne,ts)}}}else switch(b){case uc:vg(this,y,ge,this.direction);break;case Pl:mg(this,y,ge,this.direction);break;case Th:gg(this,y,ye,ge,this.direction);break;case Cl:OS(this,y,ye,ge,this.direction)}else OS(this,y,ye,ge-ye/2,ts)}this.updateParts(),this.network=null,this.isValidLayout=!0};function gg(a,y,x,b,E){var ee=a.Wp,ne=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var ae=y.length,ue=0;ue<ae;ue++){var ge=b+(E===ts?ue*x/(360<=ee?ae:ae-1):-(ue*x)/ae),ye=y.M(ue),Le=ne*Math.tan(ge)/a;Le=Math.sqrt((ne*ne+a*a*Le*Le)/(1+Le*Le)),ye.centerX=Le*Math.cos(ge),ye.centerY=Le*Math.sin(ge),ye.actualAngle=180*ge/Math.PI}}function mg(a,y,x,b){var E=a.lc,ee=a.me,ne=a.Ti;x=x*Math.PI/180;for(var ae=y.length,ue=0;ue<ae;ue++){var ge=y.M(ue),ye=y.M(ue===ae-1?0:ue+1),Le=ee*Math.sin(x);ge.centerX=E*Math.cos(x),ge.centerY=Le,ge.actualAngle=180*x/Math.PI,isNaN(ge.diameter)&&cc(ge,0),isNaN(ye.diameter)&&cc(ye,0),ge=dv(a,E,ee,b===ts?x:-x,(ge.diameter+ye.diameter)/2+ne),x+=b===ts?ge:-ge}}function vg(a,y,x,b){var E=a.lc,ee=a.me,ne=a.Jp;x=x*Math.PI/180;for(var ae=y.length,ue=0;ue<ae;ue++){var ge=y.M(ue);ge.centerX=E*Math.cos(x),ge.centerY=ee*Math.sin(x),ge.actualAngle=180*x/Math.PI,ge=dv(a,E,ee,b===ts?x:-x,ne),x+=b===ts?ge:-ge}}function OS(a,y,x,b,E){var ee=a.Wp;if(a.mj=0,a.Xr=new yg,360>x){for(ee=b+(E===ts?ee:-ee);0>ee;)ee+=360;ee%=360,180<ee&&(ee-=360),ee*=Math.PI/180,a.gt=ee,DS(a,y,x,b,E)}else FS(a,y,x,b,E);a.Xr.commit(y)}function FS(a,y,x,b,E){var ee=a.lc,ne=a.Ti,ae=a.Zm,ue=ee*Math.cos(b*Math.PI/180),ge=a.me*Math.sin(b*Math.PI/180),ye=y.Fa();if(ye.length===3)ye[0].centerX=ee,ye[0].centerY=0,ye[1].centerX=ye[0].centerX-ye[0].width/2-ye[1].width/2-ne,ye[1].y=ye[0].y,ye[2].centerX=(ye[0].centerX+ye[1].centerX)/2,ye[2].y=ye[0].y-ye[2].height-ne;else if(ye.length===4)ye[0].centerX=ee,ye[0].centerY=0,ye[2].centerX=-ye[0].centerX,ye[2].centerY=ye[0].centerY,ye[1].centerX=0,ye[1].y=Math.min(ye[0].y,ye[2].y)-ye[1].height-ne,ye[3].centerX=0,ye[3].y=Math.max(ye[0].y+ye[0].height+ne,ye[2].y+ye[2].height+ne);else{ee=st.alloc();for(var Le=0;Le<ye.length&&(ye[Le].centerX=ue,ye[Le].centerY=ge,!(Le>=ye.length-1));Le++)BS(a,ue,ge,ye,Le,E,ee)||IS(a,ue,ge,ye,Le,E,ee),ue=ee.x,ge=ee.y;if(st.free(ee),a.mj++,!(23<a.mj)){ue=ye[0].centerX,ge=ye[0].centerY,ee=ye[ye.length-1].centerX,Le=ye[ye.length-1].centerY;var ze=Math.abs(ue-ee)-((ye[0].width+ye[ye.length-1].width)/2+ne),Ke=Math.abs(ge-Le)-((ye[0].height+ye[ye.length-1].height)/2+ne);ne=0,1>Math.abs(Ke)?Math.abs(ue-ee)<(ye[0].width+ye[ye.length-1].width)/2&&(ne=0):ne=0<Ke?Ke:1>Math.abs(ze)?0:ze,ue=Math.abs(ee)>Math.abs(Le)?0<ee!=ge>Le:0<Le!=ue<ee,(ue=E===ts?ue:!ue)&&(ne=-Math.abs(ne),ne=Math.min(ne,-ye[ye.length-1].width),ne=Math.min(ne,-ye[ye.length-1].height)),a.Xr.compare(ne,ye),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>ye.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*ae,FS(a,y,x,b,E))}}}function DS(a,y,x,b,E){for(var ee=a.lc,ne=a.me,ae=a.Zm,ue=ee*Math.cos(b*Math.PI/180),ge=ne*Math.sin(b*Math.PI/180),ye=st.alloc(),Le=y.Fa(),ze=0;ze<Le.length&&(Le[ze].centerX=ue,Le[ze].centerY=ge,!(ze>=Le.length-1));ze++)BS(a,ue,ge,Le,ze,E,ye)||IS(a,ue,ge,Le,ze,E,ye),ue=ye.x,ge=ye.y;if(st.free(ye),a.mj++,!(23<a.mj)){if(ue=Math.atan2(ge,ue),ue=E===ts?a.gt-ue:ue-a.gt,ue=Math.abs(ue)<Math.abs(ue-2*Math.PI)?ue:ue-2*Math.PI,ee=ue*(ee+ne)/2,ne=a.Xr,Math.abs(ee)<Math.abs(ne.Pl))for(ne.Pl=ee,ne.mk=[],ne.tm=[],ue=0;ue<Le.length;ue++)ne.mk[ue]=Le[ue].bounds.x,ne.tm[ue]=Le[ue].bounds.y;1<Math.abs(ee)&&(a.lc=8>a.mj?a.lc-ee/(2*Math.PI):a.lc-(0<ee?1.7:-2.3),a.me=a.lc*ae,DS(a,y,x,b,E))}}function BS(a,y,x,b,E,ee,ne){var ae=a.lc,ue=a.me,ge=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var ye=!1;if(0<=x!=(ee===ts)){if(ee=y+a,ee>ae){if(ee=y-a,ee<-ae)return ne.x=ee,ne.y=ge,!1;ye=!0}}else if(ee=y-a,ee<-ae){if(ee=y+a,ee>ae)return ne.x=ee,ne.y=ge,!1;ye=!0}return ge=Math.sqrt(1-Math.min(1,ee*ee/(ae*ae)))*ue,0>x!==ye&&(ge=-ge),Math.abs(x-ge)>(b[E].height+b[E+1].height)/2?(ne.x=ee,ne.y=ge,!1):(ne.x=ee,ne.y=ge,!0)}function IS(a,y,x,b,E,ee,ne){var ae=a.lc,ue=a.me,ge=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(ee===ts)){if(ee=x-a,ee<-ue){if(ee=x+a,ee>ue){ne.x=ge,ne.y=ee;return}b=!0}}else if(ee=x+a,ee>ue){if(ee=x-a,ee<-ue){ne.x=ge,ne.y=ee;return}b=!0}ge=Math.sqrt(1-Math.min(1,ee*ee/(ue*ue)))*ae,0>y!==b&&(ge=-ge),ne.x=ge,ne.y=ee}po.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},po.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 st(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},po.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var ee=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ne=0,ae=b!==void 0&&E!==void 0?E/(ee+1):Math.PI/(2*(ee+1)),ue=0,ge=0;ge<=ee;ge++){b!==void 0&&E!==void 0?ue=b+ge*E/ee:ue=ge*Math.PI/(2*ee);var ye=Math.sin(ue);ne+=Math.sqrt(1-a*a*ye*ye)*ae}return b!==void 0&&E!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function fv(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function dv(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var ee=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var ae=0;;ae++){var ue=Math.sin(b+ae*a);if(ne+=(y>x?y:x)*Math.sqrt(1-ee*ee*ue*ue)*a,ne>=E)return ae*a}}po.prototype.sort=function(a){switch(this.sorting){case pv:break;case gv:a.reverse();break;case mv:a.sort(this.comparer);break;case vv:a.sort(this.comparer),a.reverse();break;case Kd:return this.ak(Fx(a));default:jt("Invalid sorting type.")}return a};function Fx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new rn;for(var b=0;b<a.length;b++){var E=-1,ee=-1;if(b===0)for(var ne=0;ne<a.length;ne++){var ae=a.M(ne).edgesCount;ae>E&&(E=ae,ee=ne)}else for(ne=0;ne<a.length;ne++)ae=y[ne],ae>E&&(E=ae,ee=ne);for(x.add(a.M(ee)),y[ee]=-1,ee=a.M(ee),ne=ee.sourceEdges;ne.next();)E=a.indexOf(ne.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(ee=ee.destinationEdges;ee.next();)E=a.indexOf(ee.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}po.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,ee=b.destinationEdges;ee.next();)E=a.indexOf(ee.value.toVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(ee=[],x=0;x<y.length;x++)ee[x]=0;x=[];var ne=[],ae=[];b=[],E=new rn;for(var ue=0,ge=0;ge<y.length;ge++){var ye=y[ge].length;if(ye===1)b.push(ge);else if(ye===0)E.add(a.M(ge));else{if(ue===0)x.push(ge);else{for(var Le=ye=1/0,ze=-1,Ke=[],Je=0;Je<x.length;Je++)0>y[x[Je]].indexOf(x[Je===x.length-1?0:Je+1])&&Ke.push(Je===x.length-1?0:Je+1);if(Ke.length===0)for(Je=0;Je<x.length;Je++)Ke.push(Je);for(Je=0;Je<Ke.length;Je++){for(var it=Ke[Je],Tt=y[ge],Pt=0,Nt=0;Nt<ne.length;Nt++){var At=ee[ne[Nt]],Bt=ee[ae[Nt]];if(At<Bt){var Rt=At;At=Bt}else Rt=Bt;if(Rt<it&&it<=At)for(Bt=0;Bt<Tt.length;Bt++){var Zt=Tt[Bt];0>x.indexOf(Zt)||Rt<ee[Zt]&&ee[Zt]<At||Rt===ee[Zt]||At===ee[Zt]||Pt++}else for(Bt=0;Bt<Tt.length;Bt++)Zt=Tt[Bt],0>x.indexOf(Zt)||Rt<ee[Zt]&&ee[Zt]<At&&Rt!==ee[Zt]&&At!==ee[Zt]&&Pt++}for(Tt=Pt,Nt=Pt=0;Nt<y[ge].length;Nt++)Rt=x.indexOf(y[ge][Nt]),0<=Rt&&(Rt=Math.abs(it-(Rt>=it?Rt+1:Rt)),Pt+=Rt<x.length+1-Rt?Rt:x.length+1-Rt);for(Nt=0;Nt<ne.length;Nt++)Rt=ee[ne[Nt]],At=ee[ae[Nt]],Rt>=it&&Rt++,At>=it&&At++,Rt>At&&(Bt=At,At=Rt,Rt=Bt),At-Rt<(x.length+2)/2==(Rt<it&&it<=At)&&Pt++;(Tt<ye||Tt===ye&&Pt<Le)&&(ye=Tt,Le=Pt,ze=it)}for(x.splice(ze,0,ge),ye=0;ye<x.length;ye++)ee[x[ye]]=ye;for(ye=0;ye<y[ge].length;ye++)Le=y[ge][ye],0<=x.indexOf(Le)&&(ne.push(ge),ae.push(Le))}ue++}}for(ne=x.length;;){for(ee=!0,ae=0;ae<b.length;ae++)if(ue=b[ae],ge=y[ue][0],ye=x.indexOf(ge),0<=ye){for(ze=Le=0;ze<y[ge].length;ze++)Ke=x.indexOf(y[ge][ze]),0>Ke||Ke===ye||(Je=Ke>ye?Ke-ye:ye-Ke,Le+=Ke<ye!=Je>ne-Je?1:-1);x.splice(0>Le?ye:ye+1,0,ue),b.splice(ae,1),ae--}else ee=!1;if(ee)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},zt.Object.defineProperties(po.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!==Cl&&a!==Pl&&a!==uc&&a!==Th||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==ts&&a!==hc&&a!==qc&&a!==Wd||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==pv&&a!==gv&&a!==mv&&!vv&&a!==Kd||(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!==yv&&a!==zf||(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 Pl=new an(po,"ConstantSpacing",0),uc=new an(po,"ConstantDistance",1),Th=new an(po,"ConstantAngle",2),Cl=new an(po,"Packed",3),ts=new an(po,"Clockwise",4),hc=new an(po,"Counterclockwise",5),qc=new an(po,"BidirectionalLeft",6),Wd=new an(po,"BidirectionalRight",7),pv=new an(po,"Forwards",8),gv=new an(po,"Reverse",9),mv=new an(po,"Ascending",10),vv=new an(po,"Descending",11),Kd=new an(po,"Optimized",12),yv=new an(po,"Pythagorean",13),zf=new an(po,"Circular",14);po.className="CircularLayout",po.ConstantSpacing=Pl,po.ConstantDistance=uc,po.ConstantAngle=Th,po.Packed=Cl,po.Clockwise=ts,po.Counterclockwise=hc,po.BidirectionalLeft=qc,po.BidirectionalRight=Wd,po.Forwards=pv,po.Reverse=gv,po.Ascending=mv,po.Descending=vv,po.Optimized=Kd,po.Pythagorean=yv,po.Circular=zf;function yg(){this.Pl=-1/0,this.tm=this.mk=null}yg.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},yg.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]}},yg.className="VertexArrangement";function Vd(a){Xi.call(this,a)}Wt(Vd,Xi),Vd.prototype.createVertex=function(){return new Sg(this)},Vd.prototype.createEdge=function(){return new Sv(this)},Vd.className="CircularNetwork";function Sg(a){Uo.call(this,a),this.u=this.Si=NaN}Wt(Sg,Uo);function cc(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Cl)if(x.nodeDiameterFormula===zf)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===zf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}zt.Object.defineProperties(Sg.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)}}}),Sg.className="CircularVertex";function Sv(a){Es.call(this,a)}Wt(Sv,Es),Sv.className="CircularEdge";function wa(a){so.call(this),this.ah=null,this.An=0,this.$d=new vn(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)}Wt(wa,so),wa.prototype.cloneProtected=function(a){so.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},wa.prototype.createNetwork=function(){return new Gf(this)},wa.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 b=x.iterator;b.next();){this.network=b.value;for(var E=this.network.vertexes.iterator;E.next();){var ee=E.value;ee.Vd=ee.vertexes.count,ee.sh=1,ee.Hj=null,ee.We=null}RS(this,0,a)}this.network=y;var ne=b=x.iterator;b=this.arrangementSpacing;var ae=ne.count,ue=!0;ee=E=0;for(var ge=ir(),ye=0;ye<ae+y.vertexes.count+2;ye++)ge[ye]=null;ae=0,ne.reset();for(var Le=$t.alloc();ne.next();)if(ye=ne.value,this.computeBounds(ye,Le),ue)ue=!1,E=Le.x+Le.width/2,ee=Le.y+Le.height/2,ge[0]=new st(Le.x+Le.width+b.width,Le.y),ge[1]=new st(Le.x,Le.y+Le.height+b.height),ae=2;else{var ze=_S(ge,ae,E,ee,Le.width,Le.height,b),Ke=ge[ze],Je=new st(Ke.x+Le.width+b.width,Ke.y),it=new st(Ke.x,Ke.y+Le.height+b.height);for(ze+1<ae&&ge.splice(ze+1,0,null),ge[ze]=Je,ge[ze+1]=it,ae++,ze=Ke.x-Le.x,Ke=Ke.y-Le.y,ye=ye.vertexes.iterator;ye.next();)Je=ye.value,Je.centerX+=ze,Je.centerY+=Ke}for($t.free(Le),ye=y.vertexes.iterator;ye.next();)ne=ye.value,ze=ne.bounds,2>ae?(E=ze.x+ze.width/2,ee=ze.y+ze.height/2,ge[0]=new st(ze.x+ze.width+b.width,ze.y),ge[1]=new st(ze.x,ze.y+ze.height+b.height),ae=2):(ue=_S(ge,ae,E,ee,ze.width,ze.height,b),Le=ge[ue],Ke=new st(Le.x+ze.width+b.width,Le.y),ze=new st(Le.x,Le.y+ze.height+b.height),ue+1<ae&&ge.splice(ue+1,0,null),ge[ue]=Ke,ge[ue+1]=ze,ae++,ne.centerX=Le.x+ne.width/2,ne.centerY=Le.y+ne.height/2);for(Un(ge),b=x.iterator;b.next();){for(x=b.value,E=x.vertexes.iterator;E.next();)y.dh(E.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}GS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},wa.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,b=this.network.vertexes.iterator;b.next();){if(b.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},wa.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var b=a.value;x?(x=!1,y.set(b.bounds)):y.ed(b.bounds)}return y};function RS(a,y,x){if(Dx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Bx(a,y),ee=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=ee,RS(a,y+1,x),GS(a,ee),Ix(a,E),y=E.vertexes.Fa(),y.sort(function(ne,ae){return ne===null||ae===null||ne===ae?0:ae.Vd-ne.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=b}}function Dx(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,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Bx(a,y){for(var x=a.network,b=new Gf(a),E=0;E<a.ah.length;E++){var ee=a.ah[E];if(1<ee.Vd){b.dh(ee);var ne=new US;ne.Rs=ee.Vd,ne.Ss=ee.width,ne.Qs=ee.height,ne.Sv=ee.focus.x,ne.Tv=ee.focus.y,ee.We===null&&(ee.We=new rn),ee.We.add(ne),ee.sv=ee.We.count-1}else break}for(ee=x.edges.iterator;ee.next();){var ae=ee.value;E=ae.fromVertex,ne=ae.toVertex,E.network===b&&ne.network===b?b.Bo(ae):E.network===b?(ae=E.Hj,ae===null&&(ae=new rn,E.Hj=ae),ae.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(ae=ne.Hj,ae===null&&(ae=new rn,ne.Hj=ae),ae.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)ee=E.value,ee.length*=Math.max(1,Gt.sqrt((ee.fromVertex.sh+ee.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var ue=E.Hj;if(ue!==null&&0<ue.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var ge=ae=0,ye=ue.count-ne;ye<ue.count;ye++){var Le=ue.M(ye),ze=null;for(ee=Le.edges.iterator;ee.next();){var Ke=ee.value;if(Ke.Ax(Le)===E){ze=Ke;break}}ze!==null&&(ge+=ze.length,ae+=Le.width*Le.height)}ee=E.centerX,ue=E.centerY,ye=E.width,Le=E.height,ze=E.focus,Ke=ye*Le,1>Ke&&(Ke=1),ae=Gt.sqrt((ae+Ke+ge*ge*4/(ne*ne))/Ke),ne=(ae-1)*ye/2,ae=(ae-1)*Le/2,E.bounds=new $t(ee-ze.x-ne,ue-ze.y-ae,ye+2*ne,Le+2*ae),E.focus=new st(ze.x+ne,ze.y+ae)}}return a.network=b,x}function Ix(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var ee=E.Sv,ne=E.Tv;b.bounds=new $t(b.centerX-ee,b.centerY-ne,E.Ss,E.Qs),b.focus=new st(ee,ne),b.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 b=y.centerX,E=y.centerY,ee=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),ee=ne.Ss,ne=ne.Qs),ee=Gt.sqrt(ee*ee+ne*ne)/2;for(var ae=!1,ue=ne=0,ge=0,ye=y.vertexes.iterator;ye.next();){var Le=ye.value;1>=Le.Vd?ue++:(ae=!0,ge++,ne+=Math.atan2(y.centerY-Le.centerY,y.centerX-Le.centerX))}if(ue!==0){for(0<ge&&(ne/=ge),ge=y=0,y=ae?2*Math.PI/(ue+1):2*Math.PI/ue,ue%2===0&&(ge=y/2),1<x.count&&x.sort(function(Ke,Je){return Ke===null||Je===null||Ke===Je?0:Je.width*Je.height-Ke.width*Ke.height}),ae=ue%2===0?0:1,x=x.iterator;x.next();)if(ue=x.value,!(1<ue.Vd||a.isFixed(ue))){for(ye=null,Le=ue.edges.iterator;Le.next();){ye=Le.value;break}Le=ue.width;var ze=ue.height;Le=Gt.sqrt(Le*Le+ze*ze)/2,ye=ee+ye.length+Le,Le=ne+(y*(ae/2>>1)+ge)*(ae%2===0?1:-1),ue.centerX=b+ye*Math.cos(Le),ue.centerY=E+ye*Math.sin(Le),ae++}}}}function _S(a,y,x,b,E,ee,ne){var ae=9e19,ue=-1,ge=0;e:for(;ge<y;ge++){var ye=a[ge],Le=ye.x-x,ze=ye.y-b;if(Le=Le*Le+ze*ze,Le<ae){for(ze=ge-1;0<=ze;ze--)if(a[ze].y>ye.y&&a[ze].x-ye.x<E+ne.width)continue e;for(ze=ge+1;ze<y;ze++)if(a[ze].x>ye.x&&a[ze].y-ye.y<ee+ne.height)continue e;ue=ge,ae=Le}}return ue}wa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},wa.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 b=this.network.ki(x);b===null&&(b=this.network.Bl(x)),b.charge=this.defaultCommentElectricalCharge,x=null;for(var E=b.destinationEdges;E.next();){var ee=E.value;if(ee.toVertex===a){x=ee;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(ee=E.value,ee.fromVertex===a){x=ee;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function zS(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var ee=y.bounds,ne=ee.x;y=ee.y;var ae=ee.width;return ee=ee.height,b+E<ne?a>y+ee?(x=b+E-ne,a=a-y-ee,Gt.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,Gt.sqrt(b*b+a*a)):ne-(b+E):b>ne+ae?a>y+ee?(x=b-ne-ae,a=a-y-ee,Gt.sqrt(x*x+a*a)):a+x<y?(b=b-ne-ae,a=a+x-y,Gt.sqrt(b*b+a*a)):b-(ne+ae):a>y+ee?a-(y+ee):a+x<y?y-(a+x):.1}function GS(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,_x(a)););a.ah=null}function _x(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 b=x.centerX,E=b,ee=x=x.centerY,ne=1;ne<y.length;ne++){var ae=y[ne];ae.forceX=0,ae.forceY=0;var ue=ae.centerX;ae=ae.centerY,b=Math.min(b,ue),E=Math.max(E,ue),x=Math.min(x,ae),ee=Math.max(ee,ae)}(E=E-b>ee-x)?y.sort(function(it,Tt){return it===null||Tt===null||it===Tt?0:it.centerX-Tt.centerX}):y.sort(function(it,Tt){return it===null||Tt===null||it===Tt?0:it.centerY-Tt.centerY}),x=a.Zf;var ge=b=ae=0;for(ee=0;ee<y.length;ee++){ne=y[ee],b=ne.bounds,ae=ne.focus,ue=b.x+ae.x;var ye=b.y+ae.y;b=ne.charge*a.electricalFieldX(ue,ye),ge=ne.charge*a.electricalFieldY(ue,ye),b+=ne.mass*a.gravitationalFieldX(ue,ye),ge+=ne.mass*a.gravitationalFieldY(ue,ye),ne.forceX+=b,ne.forceY+=ge;for(var Le=ee+1;Le<y.length;Le++){var ze=y[Le];if(ze!==ne){b=ze.bounds,ae=ze.focus,ge=b.x+ae.x;var Ke=b.y+ae.y;if(ue-ge>x||ge-ue>x){if(E)break}else if(ye-Ke>x||Ke-ye>x){if(!E)break}else{var Je=zS(ne,ze);1>Je?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new xv),Je=b.random(),ae=b.random(),ue>ge?(b=Math.abs(ze.bounds.right-ne.bounds.x),b=(1+b)*Je):ue<ge?(b=Math.abs(ze.bounds.x-ne.bounds.right),b=-(1+b)*Je):(b=Math.max(ze.width,ne.width),b=(1+b)*Je-b/2),ye>Ke?(ge=Math.abs(ze.bounds.bottom-ne.bounds.y),ge=(1+ge)*ae):ue<ge?(ge=Math.abs(ze.bounds.y-ne.bounds.bottom),ge=-(1+ge)*ae):(ge=Math.max(ze.height,ne.height),ge=(1+ge)*ae-ge/2)):(ae=-(ne.charge*ze.charge)/(Je*Je),b=(ge-ue)/Je*ae,ge=(Ke-ye)/Je*ae),ne.forceX+=b,ne.forceY+=ge,ze.forceX-=b,ze.forceY-=ge}}}}for(E=a.network.edges.iterator;E.next();)ae=E.value,x=ae.fromVertex,ee=ae.toVertex,ne=x.bounds,ue=x.focus,b=ne.x+ue.x,ne=ne.y+ue.y,ye=ee.bounds,Le=ee.focus,ue=ye.x+Le.x,ye=ye.y+Le.y,Le=zS(x,ee),1>Le?(Le=a.randomNumberGenerator,Le===null&&(a.randomNumberGenerator=Le=new xv),ae=Le.random(),Le=Le.random(),b=(b>ue?1:-1)*(1+(ee.width>x.width?ee.width:x.width))*ae,ge=(ne>ye?1:-1)*(1+(ee.height>x.height?ee.height:x.height))*Le):(ae=ae.stiffness*(Le-ae.length),b=(ue-b)/Le*ae,ge=(ye-ne)/Le*ae),x.forceX+=b,x.forceY+=ge,ee.forceX-=b,ee.forceY-=ge;for(E=b=0;E<y.length;E++)x=y[E],a.isFixed(x)?a.moveFixedVertex(x):b=Math.max(b,a.moveVertex(x)||0);return b>a.epsilonDistance*a.epsilonDistance}wa.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,b=this.moveLimit;return y<-b?y=-b:y>b&&(y=b),x<-b?x=-b:x>b&&(x=b),a.centerX+=y,a.centerY+=x,y*y+x*x},wa.prototype.moveFixedVertex=function(){},wa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},wa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Vo,y.toSpot=Vo)}},wa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=$t.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,$t.free(x)}x=$t.alloc();for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;(a!==0||y!==0)&&(x.assign(E.bounds),x.x+=a,x.y+=y,E.bounds=x),E.commit()}$t.free(x)},wa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},wa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},wa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},wa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},wa.prototype.electricalFieldX=function(){return 0},wa.prototype.electricalFieldY=function(){return 0},wa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},wa.prototype.gravitationalFieldX=function(){return 0},wa.prototype.gravitationalFieldY=function(){return 0},wa.prototype.isFixed=function(a){return a.isFixed},zt.Object.defineProperties(wa.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"&&jt('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())}}}),wa.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Gf(a){Xi.call(this,a)}Wt(Gf,Xi),Gf.prototype.createVertex=function(){return new xg(this)},Gf.prototype.createEdge=function(){return new wg(this)},Gf.className="ForceDirectedNetwork";function xg(a){Uo.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}Wt(xg,Uo),zt.Object.defineProperties(xg.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)}}}),xg.className="ForceDirectedVertex";function wg(a){Es.call(this,a),this.j=this.o=NaN}Wt(wg,Es),zt.Object.defineProperties(wg.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)}}}),wg.className="ForceDirectedEdge";function xv(){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()}xv.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},xv.className="RandomNumberGenerator";function ji(a){so.call(this),this.kc=this.ie=25,this.K=0,this.Dk=Ev,this.Zk=kv,this.Qk=Tv,this.bj=4,this.rk=Lv,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 st,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Wt(ji,so),ji.prototype.cloneProtected=function(a){so.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},ji.prototype.qb=function(a){a.classType===ji?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:jt("Unknown enum value: "+a):so.prototype.qb.call(this,a)},ji.prototype.createNetwork=function(){return new Xd(this)},ji.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!==Pg&&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===Pg&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var b=x.value;b.valid=!1,y.push(b)}for(x=0;x<y.length;x++){b=y[x];var E=b.fromVertex,ee=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||ee.node===null&&ee.data===null)&&E.layer===ee.layer)){var ne=0,ae=0,ue=0,ge=0;if(b.link!==null){if(ae=b.link,ae===null)continue;var ye=E.node;if(ne=ee.node,ye===null||ne===null)continue;var Le=ae.fromNode;ue=ae.toNode;for(var ze=ae.fromPort;ze!==null&&!ze.Ed();)ze=ze.panel;for(ae=ae.toPort;ae!==null&&!ae.Ed();)ae=ae.panel;if(b.rev){ge=Le;var Ke=ze;Le=ue,ze=ae,ue=ge,ae=Ke}var Je=E.focus;ge=ee.focus;var it=b.rev?ee.bounds:E.bounds;Ke=st.alloc(),ye!==Le?it.w()&&Le.isVisible()?Le.actualBounds.w()?(bh(Le,ze,ai,Ke),Ke.x+=Le.actualBounds.x-it.x,Ke.y+=Le.actualBounds.y-it.y):(bh(Le,ze,ai,Ke),Ke.w()||Ke.assign(Je)):Ke.assign(Je):it.w()?(bh(Le,ze,ai,Ke),Ke.w()||Ke.assign(Je)):Ke.assign(Je),Le=b.rev?E.bounds:ee.bounds,ye=st.alloc(),ne!==ue?Le.w()&&ue.isVisible()?ue.actualBounds.w()?(bh(ue,ae,ai,ye),ye.x+=ue.actualBounds.x-Le.x,ye.y+=ue.actualBounds.y-Le.y):(bh(ue,ae,ai,ye),ye.w()||ye.assign(ge)):ye.assign(ge):Le.w()?(bh(ue,ae,ai,ye),ye.w()||ye.assign(ge)):ye.assign(ge),this.K===90||this.K===270?(ne=Math.round((Ke.x-Je.x)/this.kc),ue=Ke.x,ae=Math.round((ye.x-ge.x)/this.kc),ge=ye.x):(ne=Math.round((Ke.y-Je.y)/this.kc),ue=Ke.y,ae=Math.round((ye.y-ge.y)/this.kc),ge=ye.y),st.free(Ke),st.free(ye),b.portFromColOffset=ne,b.portFromPos=ue,b.portToColOffset=ae,b.portToPos=ge}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Ke=E.layer,ye=ee.layer,Le=0,it=b.link,it!==null){var Tt=it.fromPort,Pt=it.toPort;if(Tt!==null&&Pt!==null){var Nt=it.fromNode;if(ze=it.toNode,Nt!==null&&ze!==null){var At=Cv(this,!0),Bt=Cv(this,!1),Rt=this.setsPortSpots?At:it.computeSpot(!0,Tt);Je=this.setsPortSpots?Bt:it.computeSpot(!1,Pt);var Zt=it.isOrthogonal;Rt.$c()&&Rt.Hf(Bt)&&Je.$c()&&Je.Hf(At)?Le=0:(At=it.getLinkPoint(Nt,Tt,Rt,!0,Zt,ze,Pt,st.alloc()),Bt=it.getLinkDirection(Nt,Tt,At,Rt,!0,Zt,ze,Pt),st.free(At),Rt.ys()||Bt!==QS(this,b,!0)?this.setsPortSpots&&Nt!==null&&Nt.ports.count===1&&b.rev&&(Le+=1):Le+=1,Rt=it.getLinkPoint(ze,Pt,Je,!1,Zt,Nt,Tt,st.alloc()),it=it.getLinkDirection(ze,Pt,Rt,Je,!1,Zt,Nt,Tt),st.free(Rt),Je.ys()||it!==QS(this,b,!1)?this.setsPortSpots&&ze!==null&&ze.ports.count===1&&b.rev&&(Le+=2):Le+=2)}}}if(ze=Le,Le=ze===1||ze===3,(ze=ze===2||ze===3)&&(Je=a.createVertex(),Je.node=null,Je.Dj=1,Je.layer=Ke,Je.near=E,a.dh(Je),E=a.Zj(E,Je,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=ue,E.portToPos=0,E=Je),it=1,Le&&it--,Ke-ye>it&&0<Ke){for(b.valid=!1,Je=a.createVertex(),Je.node=null,Je.Dj=2,Je.layer=Ke-1,a.dh(Je),E=a.Zj(E,Je,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=ze?0:ne,E.portToColOffset=0,E.portFromPos=ze?0:ue,E.portToPos=0,E=Je,Ke--;Ke-ye>it&&0<Ke;)Je=a.createVertex(),Je.node=null,Je.Dj=3,Je.layer=Ke-1,a.dh(Je),E=a.Zj(E,Je,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=Je,Ke--;E=a.Zj(Je,ee,b.link),E.valid=!Le,Le&&(Je.near=ee),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=ae,E.portFromPos=0,E.portToPos=ge}else b.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=fc(this,a),x=0,b=this.tc[a],ee=0;ee<b;ee++)E=y[ee],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),dc(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},ji.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}ji.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},ji.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 fs(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var b=x.value;a.kj[y]=b.layer,y++,a.kj[y]=b.column,y++,a.kj[y]=b.index,y++}return a.kj}function $s(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var b=a.value;b.layer=y[x],x++,b.column=y[x],x++,b.index=y[x],x++}}function HS(a,y,x){var b=fc(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var ee=a.Jn,ne=0;ne<E;ne++){var ae=0,ue=b[ne],ge=ue.near;if(ge!==null&&ge.layer===ue.layer)if(ue=ge.index,ue>ne)for(var ye=ne+1;ye<ue;ye++){var Le=b[ye];Le.near===ge&&Le.Dj===ge.Dj||ae++}else for(ye=ne-1;ye>ue;ye--)Le=b[ye],Le.near===ge&&Le.Dj===ge.Dj||ae++;var ze;if(0<=x)for(ue=b[ne].sourceEdgesArrayAccess,ge=0;ge<ue.length;ge++){var Ke=ue[ge];if(Ke.valid&&Ke.fromVertex.layer!==y)for(Le=Ke.fromVertex.index,ye=Ke.portToPos,Ke=Ke.portFromPos,ze=ge+1;ze<ue.length;ze++){var Je=ue[ze];if(Je.valid&&Je.fromVertex.layer!==y){var it=Je.fromVertex.index,Tt=Je.portToPos;Je=Je.portFromPos,ye<Tt&&(Le>it||Le===it&&Ke>Je)&&ae++,Tt<ye&&(it>Le||it===Le&&Je>Ke)&&ae++}}}if(0>=x){for(ue=b[ne].destinationEdgesArrayAccess,ge=0;ge<ue.length;ge++)if(Ke=ue[ge],Ke.valid&&Ke.toVertex.layer!==y)for(Le=Ke.toVertex.index,ye=Ke.portToPos,Ke=Ke.portFromPos,ze=ge+1;ze<ue.length;ze++)Je=ue[ze],Je.valid&&Je.toVertex.layer!==y&&(it=Je.toVertex.index,Tt=Je.portToPos,Je=Je.portFromPos,Ke<Je&&(Le>it||Le===it&&ye>Tt)&&ae++,Je<Ke&&(it>Le||it===Le&&Tt>ye)&&ae++)}for(ee[ne*E+ne]=ae,ue=ne+1;ue<E;ue++){var Pt=0,Nt=0;if(0<=x){ae=b[ne].sourceEdgesArrayAccess;var At=b[ue].sourceEdgesArrayAccess;for(ge=0;ge<ae.length;ge++)if(Ke=ae[ge],Ke.valid&&Ke.fromVertex.layer!==y)for(Le=Ke.fromVertex.index,Ke=Ke.portFromPos,ze=0;ze<At.length;ze++)Je=At[ze],Je.valid&&Je.fromVertex.layer!==y&&(it=Je.fromVertex.index,Je=Je.portFromPos,(Le<it||Le===it&&Ke<Je)&&Nt++,(it<Le||it===Le&&Je<Ke)&&Pt++)}if(0>=x){for(ae=b[ne].destinationEdgesArrayAccess,At=b[ue].destinationEdgesArrayAccess,ge=0;ge<ae.length;ge++)if(Ke=ae[ge],Ke.valid&&Ke.toVertex.layer!==y)for(Le=Ke.toVertex.index,ye=Ke.portToPos,ze=0;ze<At.length;ze++)Je=At[ze],Je.valid&&Je.toVertex.layer!==y&&(it=Je.toVertex.index,Tt=Je.portToPos,(Le<it||Le===it&&ye<Tt)&&Nt++,(it<Le||it===Le&&Tt<ye)&&Pt++)}ee[ne*E+ue]=Pt,ee[ue*E+ne]=Nt}}return dc(a,y,b),ee}ji.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=HS(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var ee=E;ee<b;ee++)a+=x[E*b+ee];return a};function wv(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,ee=fc(b,E),ne=b.tc[E],ae=0,ue=0;ue<ne;ue++){var ge=ee[ue].destinationEdgesArrayAccess;if(ge!==null)for(var ye=0;ye<ge.length;ye++){var Le=ge[ye];if(Le.valid&&Le.toVertex.layer!==E){var ze=Le.fromVertex.column+Le.portFromColOffset,Ke=Le.toVertex.column+Le.portToColOffset;ae+=(Math.abs(ze-Ke)+1)*gy(Le)}}}dc(b,E,ee),y+=ae}return y}ji.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 my(a,y,x){for(var b=fc(a,y),E=a.tc[y],ee=[],ne=0;ne<E;ne++){var ae=b[ne],ue=null;0>=x&&(ue=ae.sourceEdgesArrayAccess);var ge=null;0<=x&&(ge=ae.destinationEdgesArrayAccess);var ye=0,Le=0,ze=ae.near;if(ze!==null&&ze.layer===ae.layer&&(ye+=ze.column-1,Le++),ue!==null)for(ze=0;ze<ue.length;ze++){ae=ue[ze];var Ke=ae.fromVertex;ae.valid&&!ae.rev&&Ke.layer!==y&&(ye+=Ke.column,Le++)}if(ge!==null)for(ue=0;ue<ge.length;ue++)ae=ge[ue],ze=ae.toVertex,ae.valid&&!ae.rev&&ze.layer!==y&&(ye+=ze.column,Le++);ee[ne]=Le===0?-1:ye/Le}return dc(a,y,b),ee}function WS(a,y,x){for(var b=fc(a,y),E=a.tc[y],ee=[],ne=0;ne<E;ne++){var ae=b[ne],ue=null;0>=x&&(ue=ae.sourceEdgesArrayAccess);var ge=null;0<=x&&(ge=ae.destinationEdgesArrayAccess);var ye=0,Le=[],ze=ae.near;if(ze!==null&&ze.layer===ae.layer&&(Le[ye]=ze.column-1,ye++),ae=void 0,ue!==null)for(ze=0;ze<ue.length;ze++){ae=ue[ze];var Ke=ae.fromVertex;ae.valid&&!ae.rev&&Ke.layer!==y&&(Le[ye]=Ke.column+ae.portFromColOffset,ye++)}if(ge!==null)for(ue=0;ue<ge.length;ue++)ae=ge[ue],ze=ae.toVertex,ae.valid&&!ae.rev&&ze.layer!==y&&(Le[ye]=ze.column+ae.portToColOffset,ye++);ye===0?ee[ne]=-1:(Le.sort(function(Je,it){return Je-it}),ge=ye>>1,ee[ne]=ye&1?Le[ge]:Le[ge-1]+Le[ge]>>1)}return dc(a,y,b),ee}function bg(a,y,x,b,E,ee){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var ae=ne.value,ue=ae.toVertex,ge=y.layer-ue.layer;ae=a.linkMinLength(ae),ge===ae&&bg(a,ue,x,b,E,ee)}if(ee)for(ne=y.sourceEdges;ne.next();)ae=ne.value,ue=ae.fromVertex,ge=ue.layer-y.layer,ae=a.linkMinLength(ae),ge===ae&&bg(a,ue,x,b,E,ee)}}function vy(a,y,x,b,E,ee){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();)vy(a,ne.value.toVertex,x,b,E,ee);if(ee)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,ee)}}ji.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case xy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;zx(a)!==null;){for(E=KS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=KS(a);for(E=VS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=VS(a);E=null;for(var ee=0,ne=this.network.vertexes.iterator;ne.next();){var ae=ne.value;if(ae.valid){for(var ue=0,ge=ae.destinationEdges;ge.next();)ge.value.toVertex.valid&&ue++;ge=0;for(var ye=ae.sourceEdges;ye.next();)ye.value.fromVertex.valid&&ge++;(E===null||ee<ue-ge)&&(E=ae,ee=ue-ge)}}E!==null&&(b[y]=E,y++,E.valid=!1)}for(y=0;y<a.vertexes.count;y++)b[y].index=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case Ev:for(b=this.network.vertexes.iterator;b.next();)a=b.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,b.reset();b.next();)y=b.value,y.sourceEdges.count===0&&yy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&yy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,ee=E.finish,E.Ll<y.Ll&&x<ee&&(this.network.gm(b),b.rev=!0));break;case Pg:for(a=this.network,y=a.vertexes.iterator,b=1/0;y.next();)b=Math.min(b,y.value.layer);if(1/0>b){if(0>b)for(y.reset();y.next();)y.value.layer-=b;for(b=[],y.reset();y.next();)x=y.value,E=b[x.layer],E===void 0?b[x.layer]=[x]:E.push(x);for(x=y=0;x<b.length;x++)if(E=b[x],!E||E.length===0)y++;else if(0<x)for(ee=0;ee<E.length;ee++)E[ee].layer-=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function KS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function VS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.sourceEdges;b.next();)if(b.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function yy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var b=x.value,E=b.toVertex;E.Ll===-1&&(b.forest=!0,yy(a,E))}y.finish=a.Kn,a.Kn++}ji.prototype.assignLayers=function(){switch(this.Zk){case wy:ZS(this);break;case by:for(var a,y=this.network.vertexes.iterator;y.next();)a=YS(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 kv:for(ZS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&JS(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 ZS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=XS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function XS(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,ee=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,XS(a,ee)+E)}y.layer=x}else x=y.layer;return x}function YS(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,ee=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,ee)+E)}y.layer=x}else x=y.layer;return x}function JS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)JS(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,ee=0;ee<E;ee++){var ne=b[ee],ae=ne.fromVertex,ue=ne.toVertex;ne=a.linkMinLength(ne),ae.layer-ue.layer>ne&&bg(a,ae,0,-1,!0,!1)}for(bg(a,y,1,-1,!0,!0);y.component!==0;){for(ee=0,b=1/0,ae=0,ue=null,ne=a.network.vertexes.iterator;ne.next();){var ge=ne.value;if(ge.component===1){var ye=0,Le=!1,ze=ge.sourceEdgesArrayAccess;E=ze.length;for(var Ke=0;Ke<E;Ke++){var Je=ze[Ke],it=Je.fromVertex;ye+=1,it.component!==1&&(ee+=1,it=it.layer-ge.layer,Je=a.linkMinLength(Je),b=Math.min(b,it-Je))}for(ze=ge.destinationEdgesArrayAccess,E=ze.length,Ke=0;Ke<E;Ke++)Je=ze[Ke].toVertex,--ye,Je.component!==1?--ee:Le=!0;(ue===null||ye<ae)&&!Le&&(ue=ge,ae=ye)}}if(0<ee){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else ue.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(bg(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,ee=0,ae=null,ue=a.network.vertexes.iterator;ue.next();)if(ne=ue.value,ne.component===1){for(ge=0,ye=!1,ze=ne.sourceEdgesArrayAccess,Le=ze.length,Ke=0;Ke<Le;Ke++)Je=ze[Ke].fromVertex,ge+=1,Je.component!==1?b+=1:ye=!0;for(ze=ne.destinationEdgesArrayAccess,Le=ze.length,Ke=0;Ke<Le;Ke++)Je=ze[Ke],it=Je.toVertex,--ge,it.component!==1&&(--b,it=ne.layer-it.layer,Je=a.linkMinLength(Je),E=Math.min(E,it-Je));(ae===null||ge>ee)&&!ye&&(ae=ne,ee=ge)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else ae.component=0}}}function QS(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}ji.prototype.initializeIndices=function(){switch(this.Qk){default:case Cy:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case Tv:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&$S(this,x);break;case Py: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&&qS(this,x)}};function $S(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var b=0;b<y.length-1;b++){var E=y[b],ee=y[b+1];E.portFromColOffset>ee.portFromColOffset&&(x=!0,y[b]=ee,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&$S(a,b))}function qS(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var b=!0;b;)for(b=!1,x=0;x<y.length-1;x++){var E=y[x],ee=y[x+1];E.portToColOffset>ee.portToColOffset&&(b=!0,y[x]=ee,y[x+1]=E)}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.fromVertex,b.index===-1&&qS(a,b))}ji.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=fs(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)bv(this,b,1),hl(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=fs(this)),b=this.Ia;0<=b;b--)bv(this,b,-1),hl(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=fs(this))}for($s(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)bv(this,b,0),hl(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=fs(this)),b=this.Ia;0<=b;b--)bv(this,b,0),hl(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=fs(this))}$s(this,y);var ee,ne,ae;switch(this.rk){case Ey:break;case ky:for(ae=a+1;(b=this.countCrossings())<ae;)for(ae=b,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=hl(this,b,-1)||ee;for(E=this.countCrossings(),E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=hl(this,b,1)||ee;for(E=this.countCrossings(),E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=hl(this,b,1)||ee;for(E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=hl(this,b,-1)||ee;for(E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=hl(this,b,0)||ee;for(E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=hl(this,b,0)||ee;E>=a?$s(this,y):(a=E,y=fs(this))}break;default:case Lv:for(x=this.Ia,ne=0,ae=a+1;(b=this.countCrossings())<ae;){for(ae=b,ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=hl(this,b,-1)||ee;for(E=this.countCrossings(),E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=hl(this,b,1)||ee;for(E=this.countCrossings(),E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=hl(this,b,1)||ee;for(E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=hl(this,b,-1)||ee;for(E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=hl(this,b,0)||ee;for(E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=hl(this,b,0)||ee;E>=a?$s(this,y):(a=E,y=fs(this))}}$s(this,y)};function bv(a,y,x){var b=fc(a,y),E=a.tc[y],ee=WS(a,y,x),ne=my(a,y,x);for(x=0;x<E;x++)ne[x]===-1&&(ne[x]=b[x].column),ee[x]===-1&&(ee[x]=b[x].column);for(var ae=!0,ue;ae;)for(ae=!1,x=0;x<E-1;x++)(ee[x+1]<ee[x]||ee[x+1]===ee[x]&&ne[x+1]<ne[x])&&(ae=!0,ue=ee[x],ee[x]=ee[x+1],ee[x+1]=ue,ue=ne[x],ne[x]=ne[x+1],ne[x+1]=ue,ue=b[x],b[x]=b[x+1],b[x+1]=ue);for(x=ee=0;x<E;x++)ue=b[x],ue.index=x,ee+=a.nodeMinColumnSpace(ue,!0),ue.column=ee,ee+=1,ee+=a.nodeMinColumnSpace(ue,!1);dc(a,y,b)}function hl(a,y,x){var b=fc(a,y),E=a.tc[y];x=HS(a,y,x);var ee,ne=[];for(ee=0;ee<E;ee++)ne[ee]=-1;var ae=[];for(ee=0;ee<E;ee++)ae[ee]=-1;for(var ue=!1,ge=!0;ge;)for(ge=!1,ee=0;ee<E-1;ee++){var ye=x[b[ee].index*E+b[ee+1].index],Le=x[b[ee+1].index*E+b[ee].index],ze=0,Ke=0,Je=b[ee].column,it=b[ee+1].column,Tt=a.nodeMinColumnSpace(b[ee],!0),Pt=a.nodeMinColumnSpace(b[ee],!1),Nt=a.nodeMinColumnSpace(b[ee+1],!0),At=a.nodeMinColumnSpace(b[ee+1],!1);Tt=Je-Tt+Nt,Pt=it-Pt+At;var Bt=b[ee].sourceEdges.iterator;for(Bt.reset();Bt.next();)if(Nt=Bt.value,At=Nt.fromVertex,Nt.valid&&At.layer===y){for(Nt=0;b[Nt]!==At;)Nt++;Nt<ee&&(ze+=2*(ee-Nt),Ke+=2*(ee+1-Nt)),Nt===ee+1&&(ze+=1),Nt>ee+1&&(ze+=4*(Nt-ee),Ke+=4*(Nt-(ee+1)))}for(Bt=b[ee].destinationEdges.iterator,Bt.reset();Bt.next();)if(Nt=Bt.value,At=Nt.toVertex,Nt.valid&&At.layer===y){for(Nt=0;b[Nt]!==At;)Nt++;Nt===ee+1&&(Ke+=1)}for(Bt=b[ee+1].sourceEdges.iterator,Bt.reset();Bt.next();)if(Nt=Bt.value,At=Nt.fromVertex,Nt.valid&&At.layer===y){for(Nt=0;b[Nt]!==At;)Nt++;Nt<ee&&(ze+=2*(ee+1-Nt),Ke+=2*(ee-Nt)),Nt===ee&&(Ke+=1),Nt>ee+1&&(ze+=4*(Nt-(ee+1)),Ke+=4*(Nt-ee))}for(Bt=b[ee+1].destinationEdges.iterator,Bt.reset();Bt.next();)if(Nt=Bt.value,At=Nt.toVertex,Nt.valid&&At.layer===y){for(Nt=0;b[Nt]!==At;)Nt++;Nt===ee&&(ze+=1)}Nt=At=0,Bt=ne[b[ee].index];var Rt=ae[b[ee].index],Zt=ne[b[ee+1].index],On=ae[b[ee+1].index];Bt!==-1&&(At+=Math.abs(Bt-Je),Nt+=Math.abs(Bt-Pt)),Rt!==-1&&(At+=Math.abs(Rt-Je),Nt+=Math.abs(Rt-Pt)),Zt!==-1&&(At+=Math.abs(Zt-it),Nt+=Math.abs(Zt-Tt)),On!==-1&&(At+=Math.abs(On-it),Nt+=Math.abs(On-Tt)),(Ke<ze-.5||Ke===ze&&Le<ye-.5||Ke===ze&&Le===ye&&Nt<At-.5)&&(ge=ue=!0,b[ee].column=Pt,b[ee+1].column=Tt,ye=b[ee],b[ee]=b[ee+1],b[ee+1]=ye)}for(ee=0;ee<E;ee++)b[ee].index=ee;return dc(a,y,b),ue}ji.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Xx)!==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 b,E=this.network.vertexes.iterator;E.next();){var ee=E.value;y=ee.layer,b=ee.column,ee=this.nodeMinColumnSpace(ee,!1),x[y]=Math.max(x[y],b+ee)}for(E.reset();E.next();)ee=E.value,y=ee.layer,b=ee.column,ee.column=(8*(this.Ra-x[y])>>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Zd(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Zd(this,y,-1)||x;x=Zd(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Sy(this,y,1);for(y=this.Md-1;0<=y;y--)Sy(this,y,-1);Sy(this,this.Md,0)}if(a&&(ex(this,-1),ex(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Zd(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Zd(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Zd(this,y,0)||x}}else Wx(this)};function Zd(a,y,x){for(var b=!1;Gx(a,y,x);)b=!0;return b}function Gx(a,y,x){var b,E=fc(a,y),ee=a.tc[y],ne=my(a,y,-1);if(0<x)for(b=0;b<ee;b++)ne[b]=-1;var ae=my(a,y,1);if(0>x)for(b=0;b<ee;b++)ae[b]=-1;for(var ue=!1,ge=!0;ge;)for(ge=!1,b=0;b<ee;b++){var ye=E[b].column,Le=a.nodeMinColumnSpace(E[b],!0),ze=a.nodeMinColumnSpace(E[b],!1),Ke=0;0>b-1||ye-E[b-1].column-1>Le+a.nodeMinColumnSpace(E[b-1],!1)?Ke=ye-1:Ke=ye,Le=b+1>=ee||E[b+1].column-ye-1>ze+a.nodeMinColumnSpace(E[b+1],!0)?ye+1:ye;var Je=ze=0,it=0;if(0>=x)for(var Tt=E[b].sourceEdges.iterator;Tt.next();){var Pt=Tt.value,Nt=Pt.fromVertex;if(Pt.valid&&Nt.layer!==y){var At=gy(Pt),Bt=Pt.portFromColOffset;Pt=Pt.portToColOffset,Nt=Nt.column,ze+=(Math.abs(ye+Pt-(Nt+Bt))+1)*At,Je+=(Math.abs(Ke+Pt-(Nt+Bt))+1)*At,it+=(Math.abs(Le+Pt-(Nt+Bt))+1)*At}}if(0<=x)for(Tt=E[b].destinationEdges.iterator;Tt.next();)Pt=Tt.value,Nt=Pt.toVertex,Pt.valid&&Nt.layer!==y&&(At=gy(Pt),Bt=Pt.portFromColOffset,Pt=Pt.portToColOffset,Nt=Nt.column,ze+=(Math.abs(ye+Bt-(Nt+Pt))+1)*At,Je+=(Math.abs(Ke+Bt-(Nt+Pt))+1)*At,it+=(Math.abs(Le+Bt-(Nt+Pt))+1)*At);Pt=Bt=At=0,Tt=ne[E[b].index],Nt=ae[E[b].index],Tt!==-1&&(At+=Math.abs(Tt-ye),Bt+=Math.abs(Tt-Ke),Pt+=Math.abs(Tt-Le)),Nt!==-1&&(At+=Math.abs(Nt-ye),Bt+=Math.abs(Nt-Ke),Pt+=Math.abs(Nt-Le)),Je<ze||Je===ze&&Bt<At?(ge=ue=!0,E[b].column=Ke):(it<ze||it===ze&&Pt<At)&&(ge=ue=!0,E[b].column=Le)}return dc(a,y,E),a.normalize(),ue}function Sy(a,y,x){var b=fc(a,y),E=a.tc[y],ee=WS(a,y,x),ne=[];for(x=0;x<E;x++)ne[x]=ee[x];for(ee=!0;ee;)for(ee=!1,x=0;x<E;x++){var ae=b[x].column,ue=a.nodeMinColumnSpace(b[x],!0),ge=a.nodeMinColumnSpace(b[x],!1),ye=0;if(ne[x]===-1)if(x===0&&x===E-1)ye=ae;else if(x===0){var Le=b[x+1].column;Le-ae===ge+a.nodeMinColumnSpace(b[x+1],!0)?ye=ae-1:ye=ae}else x===E-1?(Le=b[x-1].column,ye=ae-Le===ue+a.nodeMinColumnSpace(b[x-1],!1)?ae+1:ae):(Le=b[x-1].column,ue=Le+a.nodeMinColumnSpace(b[x-1],!1)+ue+1,Le=b[x+1].column,ge=Le-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ye=(ue+ge)/2|0);else x===0&&x===E-1?ye=ne[x]:x===0?(Le=b[x+1].column,ge=Le-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ye=Math.min(ne[x],ge)):x===E-1?(Le=b[x-1].column,ue=Le+a.nodeMinColumnSpace(b[x-1],!1)+ue+1,ye=Math.max(ne[x],ue)):(Le=b[x-1].column,ue=Le+a.nodeMinColumnSpace(b[x-1],!1)+ue+1,Le=b[x+1].column,ge=Le-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ue<ne[x]&&ne[x]<ge?ye=ne[x]:ue>=ne[x]?ye=ue:ge<=ne[x]&&(ye=ge));ye!==ae&&(ee=!0,b[x].column=ye)}dc(a,y,b),a.normalize()}function Ux(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,ee=a.nodeMinColumnSpace(E,!0),ne=a.nodeMinColumnSpace(E,!1);if(E.column-ee<=y&&E.column+ne>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Hx(a,y){var x=y+1,b,E=[],ee=[];for(b=0;b<=a.Ia;b++)E[b]=!1,ee[b]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){b=ne.value;var ae=b.column-a.nodeMinColumnSpace(b,!0),ue=b.column+a.nodeMinColumnSpace(b,!1);ae<=y&&ue>=y&&(E[b.layer]=!0),ae<=x&&ue>=x&&(ee[b.layer]=!0)}for(ae=!0,x=!1,b=0;b<=a.Ia;b++)ae=ae&&!(E[b]&&ee[b]);if(ae)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function ex(a,y){for(var x=0;x<=a.Ra;x++)for(;Ux(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Hx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=fs(a),ee=wv(a);for(b=ee+1;ee<b;){b=ee,tx(a,x,1);var ne=wv(a);ne>ee?$s(a,E):ne<ee&&(ee=ne,E=fs(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=fs(a),ee=wv(a),b=ee+1;ee<b;)b=ee,tx(a,x,-1),ne=wv(a),ne>ee?$s(a,E):ne<ee&&(ee=ne,E=fs(a));a.normalize()}function tx(a,y,x){a.le=0;for(var b=a.network.vertexes.iterator;b.next();)b.value.component=-1;if(0<x)for(b.reset();b.next();){var E=b.value;E.column-a.nodeMinColumnSpace(E,!0)<=y&&(E.component=a.le)}if(0>x)for(b.reset();b.next();)E=b.value,E.column+a.nodeMinColumnSpace(E,!1)>=y&&(E.component=a.le);for(a.le++,b.reset();b.next();)y=b.value,y.component===-1&&(vy(a,y,a.le,-1,!0,!0),a.le++);var ee;for(y=[],ee=0;ee<a.le*a.le;ee++)y[ee]=!1;for(E=[],ee=0;ee<(a.Ia+1)*(a.Ra+1);ee++)E[ee]=-1;for(b.reset();b.next();){ee=b.value;for(var ne=ee.layer,ae=Math.max(0,ee.column-a.nodeMinColumnSpace(ee,!0)),ue=Math.min(a.Ra,ee.column+a.nodeMinColumnSpace(ee,!1));ae<=ue;ae++)E[ne*(a.Ra+1)+ae]=ee.component}for(ee=0;ee<=a.Ia;ee++){if(0<x)for(ne=0;ne<a.Ra;ne++)E[ee*(a.Ra+1)+ne]!==-1&&E[ee*(a.Ra+1)+ne+1]!==-1&&E[ee*(a.Ra+1)+ne]!==E[ee*(a.Ra+1)+ne+1]&&(y[E[ee*(a.Ra+1)+ne]*a.le+E[ee*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)E[ee*(a.Ra+1)+ne]!==-1&&E[ee*(a.Ra+1)+ne-1]!==-1&&E[ee*(a.Ra+1)+ne]!==E[ee*(a.Ra+1)+ne-1]&&(y[E[ee*(a.Ra+1)+ne]*a.le+E[ee*(a.Ra+1)+ne-1]]=!0)}for(E=[],ee=0;ee<a.le;ee++)E[ee]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(ue=ne[ne.length-1],ne.pop(),E[ue])for(E[ue]=!1,ee=0;ee<a.le;ee++)y[ue*a.le+ee]&&ne.splice(0,0,ee);if(0<x)for(b.reset();b.next();)a=b.value,E[a.component]&&--a.column;if(0>x)for(b.reset();b.next();)x=b.value,E[x.component]&&(x.column+=1)}function Wx(a){for(var y=ir(),x=a.fl.length,b=0;b<=x;b++)y[b]=[];for(b=a.network.vertexes.iterator;b.next();){var E=b.value;y[x-E.layer][E.index]=E}x=new sn,Kx(y,x);var ee=null,ne=null,ae=null,ue=null,ge=(a.ve&1)!==0,ye=(a.ve&2)!==0,Le=(a.ve&4)!==0,ze=(a.ve&8)!==0;for(ge&&(a.verticalAlignment(y,x,!0),ee=Pv(a,y,!0,!1)),y.reverse(),Le&&(a.verticalAlignment(y,x,!1),ae=Pv(a,y,!1,!1)),b=Tr(y),E=b.next();!E.done;E=b.next())E.value.reverse();ze&&(a.verticalAlignment(y,x,!1),ue=Pv(a,y,!1,!0)),y.reverse(),ye&&(a.verticalAlignment(y,x,!0),ne=Pv(a,y,!0,!0)),Un(y),a.u(ee,ne,ae,ue),a.network.vertexes.each(function(Ke){var Je=ir();ge&&Je.push(ee.get(Ke)),ye&&Je.push(ne.get(Ke)),Le&&Je.push(ae.get(Ke)),ze&&Je.push(ue.get(Ke)),Je.sort(function(Tt,Pt){return Tt-Pt});var it=Je.length;it=(Je[Math.floor((it-1)/2)]+Je[Math.ceil((it-1)/2)])/2,Un(Je),Ke.zc=it})}function Kx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,ee=0,ne=a[b],ae=a[b+1],ue=0;ee<ae.length;ue++){var ge=ae[ue];e:{if(ge.node===null){var ye=Ty(ge);if(0<ye.length){ye=ye[0].node===null;break e}}ye=!1}var Le=ye;if(ue===ae.length-1||Le){for(ye=ne.length-1,Le&&(ye=Ty(ge)[0].index);ee<=ue;){if(ge=ae[ee],!ge.bo){Le=[];for(var ze=Tr(ge.sourceEdgesArrayAccess),Ke=ze.next();!Ke.done;Ke=ze.next())Ke=Ke.value,Ke.valid&&Le.push(Ke);ge.bo=Le}for(ge=Tr(ge.bo),Le=ge.next();!Le.done;Le=ge.next())Le=Le.value,ze=Le.fromVertex.index,(ze<E||ze>ye)&&y.add(Le);ee++}E=ye}}}ji.prototype.verticalAlignment=function(a,y,x){Vx(a),a=Tr(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Tr(b.value);for(var ee=b.next();!ee.done;ee=b.next()){ee=ee.value;var ne=x?Ty(ee):Yx(ee),ae=ne.length;if(0<ae){ne.sort(function(Le,ze){return Le.vi-ze.vi});var ue=(ae-1)/2;for(ae=Math.floor(ue),ue=Math.ceil(ue);ae<=ue;ae++)if(ee.align===ee){var ge=ne[ae],ye=void 0;ye=x?Mv(ge,ee):Mv(ee,ge),!y.contains(ye)&&E<ge.vi&&(ge.align=ee,ee.root=ge.root,ee.align=ge.root,E=ge.vi)}}}}};function Vx(a){for(var y=0;y<a.length;y++)for(var x=a[y],b=0;b<x.length;b++){var E=x[b];E.root=E,E.align=E,E.Tz=y,E.vi=b}}function Pv(a,y,x,b){for(var E=a.K===90||a.K===270,ee=Tr(y),ne=ee.next();!ne.done;ne=ee.next()){var ae=Tr(ne.value);for(ne=ae.next();!ne.done;ne=ae.next())ne=ne.value,ne.sd=ne,ne.shift=1/0,ne.zc=NaN,ne.qg=0}for(ne=a.K===90||a.K===270,ee=Tr(y),ae=ee.next();!ae.done;ae=ee.next()){ae=Tr(ae.value);for(var ue=ae.next();!ue.done;ue=ae.next())if(ue=ue.value,ue.root===ue){for(var ge=0,ye=ue;ye.align!==ue;){var Le=ye.align,ze=ne?ye.width:ye.height,Ke=ne?Le.width:Le.height;if(x){var Je=Mv(ye,Le),it=Je.portFromPos,Tt=Je.portToPos;Je.link!==null&&(ye.node&&ye.node!==Je.link.fromNode&&(it=ne?ye.focusX:ye.focusY),Le.node&&Le.node!==Je.link.toNode&&(Tt=ne?Le.focusX:Le.focusY))}else Je=Mv(Le,ye),it=Je.portToPos,Tt=Je.portFromPos,Je.link!==null&&(ye.node&&ye.node!==Je.link.toNode&&(it=ne?ye.focusX:ye.focusY),Le.node&&Le.node!==Je.link.fromNode&&(Tt=ne?Le.focusX:Le.focusY));ze=b?ye.qg+(ze-it)-(Ke-Tt):ye.qg+it-Tt,Le.qg=ze,ge=Math.min(ge,ze),ye=ye.align}ye=ue;do ye.qg=ye.qg-ge,ye=ye.align;while(ye!==ue)}}for(x=Tr(y),ne=x.next();!ne.done;ne=x.next())for(ee=Tr(ne.value),ne=ee.next();!ne.done;ne=ee.next())ne=ne.value,ne.root===ne&&nx(a,ne,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ne=y[x][0],ne.sd===ne)){ne.sd.shift===1/0&&(ne.sd.shift=0),ne=x,ae=0;do{for(ee=y[ne][ae];ee.align!==ee.root;)ee=ee.align,ne++,0<ee.vi&&(ae=rx(ee,y),ae.sd.shift=Math.min(ae.sd.shift,ee.sd.shift+ee.zc+ee.qg-(ae.zc+ae.qg+(E?ae.width:ae.height)+a.columnSpacing)));ae=ee.vi+1}while(ne<y.length&&ae<y[ne].length&&ee.sd===y[ne][ae].sd)}for(a=new tn,y=Tr(y),ne=y.next();!ne.done;ne=y.next())for(x=Tr(ne.value),ne=x.next();!ne.done;ne=x.next())ne=ne.value,ne.zc=ne.zc+ne.sd.shift+ne.qg,ee=E?ne.width:ne.height,a.add(ne,b?-ne.zc-ee:ne.zc);return a}function nx(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=rx(b,x),ee=E.root;nx(a,ee,x),y.sd===y&&(y.sd=ee.sd);var ne=a.K===90||a.K===270?E.width:E.height;y.sd===ee.sd&&(y.zc=Math.max(y.zc,ee.zc+E.qg+ne-b.qg+a.columnSpacing))}b=b.align}while(b!==y);for(;b.align!==y;)b=b.align,b.zc=y.zc,b.sd=y.sd}}function rx(a,y){var x=a.Tz;return a=a.vi,1>a&&jt("Could not determine previous vertex in layer"),y[x][a-1]}ji.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=ir(),E=ir(),ee=1/0,ne=0;4>ne;ne++)if(y[ne]){var ae=Zx(this,y[ne],b,E,ne);ae<ee&&(x=ne,ee=ae)}for(ee={},ne=0;4>ne;ee={delta:ee.delta},ne++)y[ne]&&(ee.delta=ne===0||ne===2?b[x]-b[ne]:E[x]-E[ne],ee.delta!==0&&y[ne].each(function(ue){return function(ge){ge.value+=ue.delta}}(ee)));Un(b),Un(E)};function Zx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var ee=1/0,ne=-1/0;return y.each(function(ae){var ue=ae.key;ae=ae.value,ue=a.K===90||a.K===270?ue.width:ue.height,ae<ee&&(ee=ae),ae+ue>ne&&(ne=ae+ue)}),x[E]=ee,b[E]=ne,ne-ee}ji.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Cv(this,!0),y=Cv(this,!1),x=this.network.edges.iterator;x.next();){var b=x.value.link;b!==null&&(b.fromSpot=a,b.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function Cv(a,y){return a.K===270?y?ja:sa:a.K===90?y?sa:ja:a.K===180?y?Oa:na:y?na:Oa}ji.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var b=0;b<=this.Ia;b++){var E=x;0>=this.he[b]+this.Ld[b]&&(E=0),0<b&&(y+=E/2),this.K===90||this.K===0?(y+=this.Ld[b],this.Kd[b]=y,y+=this.he[b]):(y+=this.he[b],this.Kd[b]=y,y+=this.Ld[b]),b<this.Ia&&(y+=E/2),this.Ta[b]=y}for(x=y,y=this.arrangementOrigin,b=0;b<=this.Ia;b++)this.K===270?this.Kd[b]=y.y+this.Kd[b]:this.K===90?(this.Kd[b]=y.y+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]):this.K===180?this.Kd[b]=y.x+this.Kd[b]:(this.Kd[b]=y.x+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]);x=this.ve!==0,a.reset(),b=this.K===270||this.K===90;for(var ee=1/0,ne=E=1/0,ae=-1/0;a.next();){var ue=a.value,ge=ue.layer,ye=ue.column|0;b?(ne=y.x+this.kc*ye,ge=this.Kd[ge]):(ne=this.Kd[ge],ge=y.y+this.kc*ye),ue.centerX=ne,ue.centerY=ge,x&&isFinite(ue.zc)&&(b?ue.node?ue.x=y.x+ue.zc:ue.centerX=y.x+ue.zc:ue.node?ue.y=y.y+ue.zc:ue.centerY=y.y+ue.zc),ee=Math.min(ue.x,ee),E=Math.min(ue.y,E),b?(ne=ee,ae=Math.max(ae,ue.bounds.right)):(ne=E,ae=Math.max(ae,ue.bounds.bottom))}for(this.xw=ae-ne,ee=y.x-ee,y=y.y-E,this.Rf=new st(x&&b?0:ee,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=ee,x.y+=y,x.commit()},ji.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 b=this.maxLayer;0<=b;b--)this.K===270?b===0?y.push(new $t(0,0,x,Math.abs(this.Ta[0]))):y.push(new $t(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new $t(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new $t(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new $t(0,0,Math.abs(this.Ta[0]),x)):y.push(new $t(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new $t(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new $t(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},ji.prototype.commitLayers=function(){},ji.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 b=y,E=b.fromNode,ee=b.toNode,ne=b.fromPort,ae=b.toPort;if(E!==null){var ue=E.findVisibleNode();ue!==null&&ue!==E&&(E=ue,ne=ue.port)}ee!==null&&(ue=ee.findVisibleNode(),ue!==null&&ue!==ee&&(ee=ue,ae=ue.port));var ge=y.computeSpot(!0,ne);ue=y.computeSpot(!1,ae);var ye=x.fromVertex,Le=x.toVertex;if(x.valid)y.curve===Rs&&y.pointsCount===4&&(ye.column===Le.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,ge,!0,!1,ee,ae),ae=y.getLinkPoint(ee,ae,ue,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),ae.w()||ae.set(ee.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+ae.x)/3,(2*x.y+ae.y)/3),y.yf((x.x+2*ae.x)/3,(x.y+2*ae.y)/3),y.yf(ae.x,ae.y)):(x=b=!1,ne!==null&&ge===Wr&&(b=!0),ae!==null&&ue===Wr&&(x=!0),(b||x)&&(ue=null,b&&(ue=y.getLinkPointFromPoint(E,ne,ne.ga(ai),y.i(3),!0),ue.w()||ue.set(E.actualBounds.center),y.L(0,ue.x,ue.y)),E=null,x&&(E=y.getLinkPointFromPoint(ee,ae,ae.ga(ai),y.i(0),!1),E.w()||E.set(ee.actualBounds.center),y.L(3,E.x,E.y)),ue&&(ee=y.i(2),y.L(1,(2*ue.x+ee.x)/3,(2*ue.y+ee.y)/3)),E&&(ee=y.i(1),y.L(2,(2*E.x+ee.x)/3,(2*E.y+ee.y)/3))))),y.zf();else if(ye.layer===Le.layer)y.zf();else{var ze=!1,Ke=!1,Je=this.ie,it=y.firstPickIndex+1;if(y.isOrthogonal){Ke=!0;var Tt=y.pointsCount;4<Tt&&y.points.removeRange(2,Tt-3)}else if(y.curve===Rs)ze=!0,Tt=y.pointsCount,4<Tt&&y.points.removeRange(2,Tt-3),Tt===4&&(it=2);else{Tt=y.pointsCount;var Pt=ge===Wr,Nt=ue===Wr;2<Tt&&Pt&&Nt?y.points.removeRange(1,Tt-2):3<Tt&&Pt&&!Nt?y.points.removeRange(1,Tt-3):3<Tt&&!Pt&&Nt?y.points.removeRange(2,Tt-2):4<Tt&&!Pt&&!Nt&&y.points.removeRange(2,Tt-3)}if(x.rev){for(;Le!==null&&ye!==Le;){var At=Tt=null;for(Pt=Le.sourceEdges.iterator;Pt.next()&&(Nt=Pt.value,Nt.link!==x.link||(Tt=Nt.fromVertex,At=Nt.toVertex,Tt.node!==null)););if(Tt===null)break;if(Tt!==ye){Pt=y.i(it-1).x,Nt=y.i(it-1).y;var Bt=Tt.centerX,Rt=Tt.centerY;if(Ke)this.K===180||this.K===0?it===y.firstPickIndex+1?(y.m(it++,Pt,Nt),y.m(it++,Pt,Rt)):(At!==null?At.centerY:Nt)!==Rt&&(At=this.Ta[Tt.layer-1]+this.Rf.x,y.m(it++,At,Nt),y.m(it++,At,Rt)):it===y.firstPickIndex+1?(y.m(it++,Pt,Nt),y.m(it++,Bt,Nt)):(At!==null?At.centerX:Pt)!==Bt&&(At=this.Ta[Tt.layer-1]+this.Rf.y,y.m(it++,Pt,At),y.m(it++,Bt,At));else if(it===y.firstPickIndex+1){At=Math.max(10,this.he[Le.layer]);var Zt=Math.max(10,this.Ld[Le.layer]);if(ze)this.K===180?Bt<=Le.bounds.x?(Le=Le.bounds.x,y.m(it++,Le-At,Rt),y.m(it++,Le,Rt),y.m(it++,Le+Zt,Rt)):(y.m(it++,Bt-At,Rt),y.m(it++,Bt,Rt),y.m(it++,Bt+Zt,Rt)):this.K===90?Rt>=Le.bounds.bottom?(Le=Le.bounds.y+Le.bounds.height,y.m(it++,Bt,Le+Zt),y.m(it++,Bt,Le),y.m(it++,Bt,Le-At)):(y.m(it++,Bt,Rt+Zt),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt-At)):this.K===270?Rt<=Le.bounds.y?(Le=Le.bounds.y,y.m(it++,Bt,Le-At),y.m(it++,Bt,Le),y.m(it++,Bt,Le+Zt)):(y.m(it++,Bt,Rt-At),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt+Zt)):this.K===0&&(Bt>=Le.bounds.right?(Le=Le.bounds.x+Le.bounds.width,y.m(it++,Le+Zt,Rt),y.m(it++,Le,Rt),y.m(it++,Le-At,Rt)):(y.m(it++,Bt+Zt,Rt),y.m(it++,Bt,Rt),y.m(it++,Bt-At,Rt)));else{y.m(it++,Pt,Nt);var On=0;this.K===180||this.K===0?((this.K===180?Bt>=Le.bounds.right:Bt<=Le.bounds.x)&&(On=(this.K===0?-At:Zt)/2),y.m(it++,Pt+On,Rt)):((this.K===270?Rt>=Le.bounds.bottom:Rt<=Le.bounds.y)&&(On=(this.K===90?-At:Zt)/2),y.m(it++,Bt,Nt+On)),y.m(it++,Bt,Rt)}}else At=Math.max(10,this.he[Tt.layer]),Zt=Math.max(10,this.Ld[Tt.layer]),ze?this.K===180?(y.m(it++,Bt-At-Je,Rt),y.m(it++,Math.min(Bt-At+Je/2,Bt),Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Math.max(Bt+Zt-Je/2,Bt),Rt),y.m(it++,Bt+Zt+Je,Rt)):this.K===90?(y.m(it++,Bt,Rt+Zt+Je),y.m(it++,Bt,Math.max(Rt+Zt-Je/2,Rt)),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Math.min(Rt-At+Je/2,Rt)),y.m(it++,Bt,Rt-At-Je)):this.K===270?(y.m(it++,Bt,Rt-At-Je),y.m(it++,Bt,Math.min(Rt-At+Je/2,Rt)),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Math.max(Rt+Zt-Je/2,Rt)),y.m(it++,Bt,Rt+Zt+Je)):(y.m(it++,Bt+Zt+Je,Rt),y.m(it++,Math.max(Bt+Zt-Je/2,Bt),Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Math.min(Bt-At+Je/2,Bt),Rt),y.m(it++,Bt-At-Je,Rt)):y.m(it++,Bt,Rt)}Le=Tt}(ae===null||ge!==Wr||Ke)&&(Pt=y.i(it-1).x,Nt=y.i(it-1).y,Bt=y.i(it).x,Rt=y.i(it).y,Ke?(Je=this.Ld[ye.layer],this.K===180||this.K===0?(Ke=Nt,Ke>=ye.bounds.y&&Ke<=ye.bounds.bottom&&(this.K===180?Bt>=ye.bounds.x:Bt<=ye.bounds.right)&&(Le=ye.centerX+(this.K===180?-Je:Je),Ke<ye.bounds.y+ye.bounds.height/2?Ke=ye.bounds.y-this.kc/2:Ke=ye.bounds.bottom+this.kc/2,y.m(it++,Le,Nt),y.m(it++,Le,Ke)),y.m(it++,Bt,Ke)):(Ke=Pt,Ke>=ye.bounds.x&&Ke<=ye.bounds.right&&(this.K===270?Rt>=ye.bounds.y:Rt<=ye.bounds.bottom)&&(Le=ye.centerY+(this.K===270?-Je:Je),Ke<ye.bounds.x+ye.bounds.width/2?Ke=ye.bounds.x-this.kc/2:Ke=ye.bounds.right+this.kc/2,y.m(it++,Pt,Le),y.m(it++,Ke,Le)),y.m(it++,Ke,Rt)),y.m(it++,Bt,Rt)):ze?(At=Math.max(10,this.he[ye.layer]),Zt=Math.max(10,this.Ld[ye.layer]),this.K===180&&Bt>=ye.bounds.x?(Le=ye.bounds.x+ye.bounds.width,y.L(it-2,Le,Nt),y.L(it-1,Le+Zt,Nt)):this.K===90&&Rt<=ye.bounds.bottom?(Le=ye.bounds.y,y.L(it-2,Pt,Le),y.L(it-1,Pt,Le-At)):this.K===270&&Rt>=ye.bounds.y?(Le=ye.bounds.y+ye.bounds.height,y.L(it-2,Pt,Le),y.L(it-1,Pt,Le+Zt)):this.K===0&&Bt<=ye.bounds.right&&(Le=ye.bounds.x,y.L(it-2,Le,Nt),y.L(it-1,Le-At,Nt))):(At=Math.max(10,this.he[ye.layer]),Zt=Math.max(10,this.Ld[ye.layer]),Ke=0,this.K===180||this.K===0?((this.K===180?Bt<=ye.bounds.x:Bt>=ye.bounds.right)&&(Ke=(this.K===0?Zt:-At)/2),y.m(it++,Bt+Ke,Nt)):((this.K===270?Rt<=ye.bounds.y:Rt>=ye.bounds.bottom)&&(Ke=(this.K===90?Zt:-At)/2),y.m(it++,Pt,Rt+Ke)),y.m(it++,Bt,Rt)))}else{for(;ye!==null&&ye!==Le;){for(At=Tt=null,ye=ye.destinationEdges.iterator;ye.next()&&(Pt=ye.value,Pt.link!==x.link||(Tt=Pt.toVertex,At=Pt.fromVertex,At.node!==null&&(At=null),Tt.node!==null)););if(Tt===null)break;Tt!==Le&&(Pt=y.i(it-1).x,Nt=y.i(it-1).y,Bt=Tt.centerX,Rt=Tt.centerY,Ke?this.K===180||this.K===0?(At!==null?At.centerY:Nt)!==Rt&&(At=this.Ta[Tt.layer]+this.Rf.x,it===y.firstPickIndex+1&&(At=this.K===0?Math.max(At,Pt):Math.min(At,Pt)),y.m(it++,At,Nt),y.m(it++,At,Rt)):(At!==null?At.centerX:Pt)!==Bt&&(At=this.Ta[Tt.layer]+this.Rf.y,it===y.firstPickIndex+1&&(At=this.K===90?Math.max(At,Nt):Math.min(At,Nt)),y.m(it++,Pt,At),y.m(it++,Bt,At)):(At=Math.max(10,this.he[Tt.layer]),Zt=Math.max(10,this.Ld[Tt.layer]),ze?this.K===180?(y.m(it++,Bt+Zt+Je,Rt),y.m(it++,Math.max(Bt+Zt-Je/2,Bt),Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Math.min(Bt-At+Je/2,Bt),Rt),y.m(it++,Bt-At-Je,Rt)):this.K===90?(y.m(it++,Bt,Rt-At-Je),y.m(it++,Bt,Math.min(Rt-At+Je/2,Rt)),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Math.max(Rt+Zt-Je/2,Rt)),y.m(it++,Bt,Rt+Zt+Je)):this.K===270?(y.m(it++,Bt,Rt+Zt+Je),y.m(it++,Bt,Math.max(Rt+Zt-Je/2,Rt)),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Math.min(Rt-At+Je/2,Rt)),y.m(it++,Bt,Rt-At-Je)):(y.m(it++,Bt-At-Je,Rt),y.m(it++,Math.min(Bt-At+Je/2,Bt),Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Math.max(Bt+Zt-Je/2,Bt),Rt),y.m(it++,Bt+Zt+Je,Rt)):this.K===180?(y.m(it++,Bt+Zt,Rt),y.m(it++,Bt-At,Rt)):this.K===90?(y.m(it++,Bt,Rt-At),y.m(it++,Bt,Rt+Zt)):this.K===270?(y.m(it++,Bt,Rt+Zt),y.m(it++,Bt,Rt-At)):(y.m(it++,Bt-At,Rt),y.m(it++,Bt+Zt,Rt)))),ye=Tt}Ke&&(Pt=y.i(it-1).x,Nt=y.i(it-1).y,Bt=y.i(it).x,Rt=y.i(it).y,this.K===180||this.K===0?Nt!==Rt&&(At=this.K===0?Math.min(Math.max((Bt+Pt)/2,this.Ta[Le.layer]+this.Rf.x),Bt):Math.max(Math.min((Bt+Pt)/2,this.Ta[Le.layer]+this.Rf.x),Bt),y.m(it++,At,Nt),y.m(it++,At,Rt)):Pt!==Bt&&(At=this.K===90?Math.min(Math.max((Rt+Nt)/2,this.Ta[Le.layer]+this.Rf.y),Rt):Math.max(Math.min((Rt+Nt)/2,this.Ta[Le.layer]+this.Rf.y),Rt),y.m(it++,Pt,At),y.m(it++,Bt,At)))}b!==null&&ze&&4<=y.pointsCount&&(ne!==null&&(ne=ge===Wr?y.getLinkPointFromPoint(E,ne,ne.ga(ai),y.i(3),!0):y.i(0),ge===Wr&&(ge=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+ge.x)/2,ge.y),y.L(2,b.x,(ge.y+b.y)/2)):(y.L(1,ge.x,(ne.y+ge.y)/2),y.L(2,(ge.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),ae!==null&&(E=ue===Wr?y.getLinkPointFromPoint(ee,ae,ae.ga(ai),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ue===Wr&&(ae=y.i(y.pointsCount-3),ue=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+ae.x)/2,ae.y),y.L(y.pointsCount-2,ue.x,(ae.y+ue.y)/2)):(y.L(y.pointsCount-2,ae.x,(E.y+ae.y)/2),y.L(y.pointsCount-3,(ae.x+ue.x)/2,ue.y))),E.w()||E.set(ee.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},ji.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new rn,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 b=a.value;if(b!==null&&b.isOrthogonal)for(var E=2;E<b.pointsCount-3;E++){var ee=b.i(E),ne=b.i(E+1);if(this.B(ee.y,ne.y)&&!this.B(ee.x,ne.x)){var ae=new pc;ae.layer=Math.floor(ee.y/2);var ue=b.i(0),ge=b.i(b.pointsCount-1);if(ae.first=ue.x*ue.x+ue.y,ae.jc=ge.x*ge.x+ge.y,ae.rd=Math.min(ee.x,ne.x),ae.Ic=Math.max(ee.x,ne.x),ae.index=E,ae.link=b,E+2<b.pointsCount){ue=b.i(E-1),ge=b.i(E+2);var ye=0;ue.y<ee.y?ye=ge.y<ee.y?3:ee.x<ne.x?2:1:ue.y>ee.y&&(ye=ge.y>ee.y?0:ne.x<ee.x?2:1),ae.j=ye}x.push(ae)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(ee=x[a].layer,b=a+1;b<x.length&&x[b].layer===ee;)b++;if(1<b-a)for(ee=a;ee<b;){for(ne=x[ee].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-ee,1<ne){for(this.zi(x,this.Js,ee,ee+ne),ye=1,ae=x[ee].jc,ue=ee;ue<E;ue++)ge=x[ue],ge.jc!==ae&&(ye++,ae=ge.jc);this.zi(x,this.Ux,ee,ee+ne);var Le=1;for(ae=x[ee].first,ue=ee;ue<E;ue++)ge=x[ue],ge.first!==ae&&(Le++,ae=ge.first);for(ue=!0,ge=Le,ye<Le?(ue=!1,ge=ye,ae=x[ee].jc,this.zi(x,this.Js,ee,ee+ne)):ae=x[ee].first,ye=0,Le=ee;Le<E;Le++){var ze=x[Le];(ue?ze.first:ze.jc)!==ae&&(ye++,ae=ue?ze.first:ze.jc);var Ke=ze.link;ee=Ke.i(ze.index),ne=Ke.i(ze.index+1);var Je=this.linkSpacing*(ye-(ge-1)/2);y++,Ke.uh(),Ke.L(ze.index,ee.x,ee.y+Je),Ke.L(ze.index+1,ne.x,ne.y+Je),Ke.zf()}}ee=E}a=b}}else{for(y=0,x=[],a=a.iterator;a.next();)if(b=a.value,b!==null&&b.isOrthogonal)for(E=2;E<b.pointsCount-3;E++)ee=b.i(E),ne=b.i(E+1),this.B(ee.x,ne.x)&&!this.B(ee.y,ne.y)&&(ae=new pc,ae.layer=Math.floor(ee.x/2),ue=b.i(0),ge=b.i(b.pointsCount-1),ae.first=ue.x+ue.y*ue.y,ae.jc=ge.x+ge.y*ge.y,ae.rd=Math.min(ee.y,ne.y),ae.Ic=Math.max(ee.y,ne.y),ae.index=E,ae.link=b,E+2<b.pointsCount&&(ue=b.i(E-1),ge=b.i(E+2),ye=0,ue.x<ee.x?ye=ge.x<ee.x?3:ee.y<ne.y?2:1:ue.x>ee.x&&(ye=ge.x>ee.x?0:ne.y<ee.y?2:1),ae.j=ye),x.push(ae));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(ee=x[a].layer,b=a+1;b<x.length&&x[b].layer===ee;)b++;if(1<b-a)for(ee=a;ee<b;){for(ne=x[ee].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-ee,1<ne){for(this.zi(x,this.Js,ee,ee+ne),ye=1,ae=x[ee].jc,ue=ee;ue<E;ue++)ge=x[ue],ge.jc!==ae&&(ye++,ae=ge.jc);for(this.zi(x,this.Ux,ee,ee+ne),Le=1,ae=x[ee].first,ue=ee;ue<E;ue++)ge=x[ue],ge.first!==ae&&(Le++,ae=ge.first);for(ue=!0,ge=Le,ye<Le?(ue=!1,ge=ye,ae=x[ee].jc,this.zi(x,this.Js,ee,ee+ne)):ae=x[ee].first,ye=0,Le=ee;Le<E;Le++)ze=x[Le],(ue?ze.first:ze.jc)!==ae&&(ye++,ae=ue?ze.first:ze.jc),Ke=ze.link,ee=Ke.i(ze.index),ne=Ke.i(ze.index+1),Je=this.linkSpacing*(ye-(ge-1)/2),y++,Ke.uh(),Ke.L(ze.index,ee.x+Je,ee.y),Ke.L(ze.index+1,ne.x+Je,ne.y),Ke.zf()}ee=E}a=b}}}},Qe=ji.prototype,Qe.Vx=function(a,y){return a instanceof pc&&y instanceof pc&&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},Qe.Ux=function(a,y){return a instanceof pc&&y instanceof pc&&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},Qe.Js=function(a,y){return a instanceof pc&&y instanceof pc&&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},Qe.B=function(a,y){return a-=y,-1<a&&1>a},Qe.zi=function(a,y,x,b){var E=a.length,ee=b-x;if(!(1>=ee))if((0>x||x>=E-1)&&jt("not in range 0 <= from < length: "+x),ee===2)b=a[x],E=a[x+1],0<y(b,E)&&(a[x]=E,a[x+1]=b);else if(x===0)if(b>=E)a.sort(y);else for(x=a.slice(0,b),x.sort(y),y=0;y<b;y++)a[y]=x[y];else if(b>=E)for(b=a.slice(x),b.sort(y),y=x;y<E;y++)a[y]=b[y-x];else for(E=a.slice(x,b),E.sort(y),y=x;y<b;y++)a[y]=E[y-x]};function fc(a,y){var x=a.tc[y];if(x>=a.He.length){for(var b=[],E=0;E<a.He.length;E++)b[E]=a.He[E];a.He=b}for(a.He[x]===void 0||a.He[x]===null?b=[]:(b=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],b[x.index]=x;return b}function dc(a,y,x){a.He[a.tc[y]]=x}zt.Object.defineProperties(ji.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()):jt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==Ev&&a!==Pg||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==kv&&a!==wy&&a!==by||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==Tv&&a!==Py&&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!==Ey&&a!==Lv&&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 Ev=new an(ji,"CycleDepthFirst",0),xy=new an(ji,"CycleGreedy",1),Pg=new an(ji,"CycleFromLayers",2),kv=new an(ji,"LayerOptimalLinkLength",0),wy=new an(ji,"LayerLongestPathSink",1),by=new an(ji,"LayerLongestPathSource",2),Tv=new an(ji,"InitDepthFirstOut",0),Py=new an(ji,"InitDepthFirstIn",1),Cy=new an(ji,"InitNaive",2),Ey=new an(ji,"AggressiveNone",0),Lv=new an(ji,"AggressiveLess",1),ky=new an(ji,"AggressiveMore",2),Xx=8;ji.className="LayeredDigraphLayout",ji.CycleDepthFirst=Ev,ji.CycleGreedy=xy,ji.CycleFromLayers=Pg,ji.LayerOptimalLinkLength=kv,ji.LayerLongestPathSink=wy,ji.LayerLongestPathSource=by,ji.InitDepthFirstOut=Tv,ji.InitDepthFirstIn=Py,ji.InitNaive=Cy,ji.AggressiveNone=Ey,ji.AggressiveLess=Lv,ji.AggressiveMore=ky,ji.PackNone=0,ji.PackExpand=1,ji.PackStraighten=2,ji.PackMedian=4,ji.PackAll=15,ji.AlignNone=0,ji.AlignUpperLeft=1,ji.AlignUpperRight=2,ji.AlignLowerLeft=4,ji.AlignLowerRight=8,ji.AlignAll=15;function pc(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}pc.className="SegInfo";function Xd(a){Xi.call(this,a)}Wt(Xd,Xi),Xd.prototype.createVertex=function(){return new el(this)},Xd.prototype.createEdge=function(){return new Cg(this)},Xd.className="LayeredDigraphNetwork";function el(a){Uo.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}Wt(el,Uo);function ix(a,y){return a.index-y.index}function Mv(a,y){if(!a.$n){for(var x=[],b=Tr(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Tr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;jt("Unable to find destination edge to given vertex")}function Ty(a){if(!a.co){for(var y=[],x=Tr(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(ix),a.co=y}return a.co}function Yx(a){if(!a.ao){for(var y=[],x=Tr(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(ix),a.ao=y}return a.ao}el.prototype.Cl=function(a){Uo.prototype.Cl.call(this,a),this.bo=this.co=null},el.prototype.Kl=function(a){Uo.prototype.Kl.call(this,a),this.bo=this.co=null},el.prototype.zl=function(a){Uo.prototype.zl.call(this,a),this.$n=this.ao=null},el.prototype.Jl=function(a){Uo.prototype.Jl.call(this,a),this.$n=this.ao=null},zt.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 Cg(a){Es.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Wt(Cg,Es),zt.Object.defineProperties(Cg.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)}}}),Cg.className="LayeredDigraphEdge";function $r(a){so.call(this),this.Ub=new sn,this.Wn=Ov,this.ud=wu,this.vo=Dv,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=Bv,this.$d=new vn(10,10).freeze();var y=new Kf(this);this.W=new cl(y),this.Y=new cl(y),this.ru=[],a&&Object.assign(this,a)}Wt($r,so),$r.prototype.cloneProtected=function(a){so.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)},$r.prototype.qb=function(a){a.classType===$r?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:jt("Unknown enum value: "+a):so.prototype.qb.call(this,a)},$r.prototype.createNetwork=function(){return new Kf(this)},$r.prototype.makeNetwork=function(a){function y(b){if(b instanceof _n)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Tn){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Jt?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Br?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},$r.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==Iv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Jt&&(y=a),this.path===Ov&&y!==null?this.ud=y.isTreePathToChildren?wu:Hf:this.ud=this.path===Ov?wu: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 sn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof _n?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof cl&&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,Ly(this,y));for(y=this.network.vertexes,a=null;a=Jx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ly(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof cl&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof cl&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof cl&&ux(this,y);if(this.Cu(),this.layerStyle===Rv){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var b=x.parent;b===null&&(b=x),b=b.angle===0||b.angle===180;var E=a[x.level];E===void 0&&(E=0),a[x.level]=Math.max(E,b?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,b=x.parent,b===null&&(b=x),b.angle===0||b.angle===180?(b.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(b.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===_y)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,b=-1,E=0;E<y.children.length;E++){var ee=y.children[E];b=Math.max(b,x?ee.width:ee.height)}if(0<=b)for(E=0;E<y.children.length;E++)ee=y.children[E],x?(y.angle===180&&(ee.focusX+=b-ee.width),ee.width=b):(y.angle===270&&(ee.focusY+=b-ee.height),ee.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof cl&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new sn,this.isValidLayout=!0};function Jx(a){var y=new sn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}$r.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case wu:x.sourceEdges.count===0&&this.Ub.add(x);break;case Hf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:jt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=ox(this,a),a!==null&&this.Ub.add(a))};function ox(a,y){var x=999999,b=null;for(y=y.iterator;y.next();){var E=y.value;switch(a.ud){case wu:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Hf:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:jt("Unhandled path value "+a.ud.toString())}}return b}function Ly(a,y){if(y!==null){switch(a.ud){case wu:if(0<y.destinationEdges.count){for(var x=new rn,b=y.destinationVertexes;b.next();){var E=b.value;ax(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case Hf:if(0<y.sourceEdges.count){for(x=new rn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:jt("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var ee=x[E];ee.initialized=!0,ee.level=y.level+1,ee.parent=y,a.Ub.remove(ee)}for(y=0;y<b;y++)Ly(a,x[y])}}function ax(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}$r.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,b=0,E=0;E<x.length;E++)x[E]===y&&b++;if(0<b){b=Array(x.length-b);for(var ee=E=0;ee<x.length;ee++)x[ee]!==y&&(b[E++]=x[ee]);a.children=b}}};function sx(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Cu&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,ee=y.children,ne=ee.length,ae=0;ae<ne;ae++){var ue=ee[ae];sx(a,ue),x+=ue.descendantCount+1,b=Math.max(b,ue.maxChildrenCount),E=Math.max(E,ue.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function Qx(a,y){switch(a.vo){default:case Dv:return y.parent!==null?y.parent:a.W;case By:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Dy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Fy:var x=!0;if(y.childrenCount===0)x=!1;else for(var b=y.children,E=b.length,ee=0;ee<E;ee++)if(0<b[ee].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}$r.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Qx(this,a)),a.parent!==null&&a.parent.alignment===Cu){for(var y=a.angle,x=a.parent.children,b=0;b<x.length&&a!==x[b];)b++;b%2===0?b!==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 lx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)lx(a,y[b])}}$r.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Cu&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}$r.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Yd:break;case kg:a.children.reverse();break;case Tg:a.children.sort(a.comparer);break;case Lg:a.children.sort(a.comparer),a.children.reverse();break;default:jt("Unhandled sorting value "+a.sorting.toString())}},$r.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},$r.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=gc(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var ee=0,ne=0,ae=0,ue=a.commentSpacing;if(a.node!==null)for(var ge=a.node.Mu();ge.next();){var ye=ge.value;ye.category==="Comment"&&ye.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ye),ye.Va(),ye=ye.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(ee=Math.max(ee,ye.width),ne+=ye.height+Math.abs(ae)):(ee+=ye.width+Math.abs(ae),ne=Math.max(ne,ye.height)),ae=ue)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(ee+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),ee=Math.max(0,ee-a.width)),E=$t.allocAt(0,0,a.bounds.width+ee,a.bounds.height+ne),a.bounds=E,$t.free(E))};function gc(a){return a===Lh||a===Cu||a===Mh||a===Xu}function Eg(a){return a===Lh||a===Cu}function My(a){var y=a.parent;if(y!==null){var x=y.alignment;if(gc(x)){if(Eg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Mh)return!0}}return!1}$r.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,ee=!1;x!==null&&(E=x.angle,ee=x.alignment,ee=gc(ee)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,ae=My(a),ue=0,ge=a.comments,ye=ge.length,Le=st.alloc(),ze=0;ze<ye;ze++){var Ke=ge[ze],Je=Ke.measuredBounds;if(b&&!ne||!ee&&!x&&ne||ee&&x&&ne){if(135<E&&!ee||x&&ae)if(0<=a.commentMargin)for(Le.h(a.bounds.x-a.commentMargin-Je.width,a.bounds.y+ue),Ke.move(Le),Ke=Ke.Sd();Ke.next();){var it=Ke.value;it.fromSpot=Oa,it.toSpot=na}else for(Le.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ue),Ke.move(Le),Ke=Ke.Sd();Ke.next();)it=Ke.value,it.fromSpot=na,it.toSpot=Oa;else if(0<=a.commentMargin)for(Le.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ue),Ke.move(Le),Ke=Ke.Sd();Ke.next();)it=Ke.value,it.fromSpot=na,it.toSpot=Oa;else for(Le.h(a.bounds.x+a.commentMargin-Je.width,a.bounds.y+ue),Ke.move(Le),Ke=Ke.Sd();Ke.next();)it=Ke.value,it.fromSpot=Oa,it.toSpot=na;ue=0<=a.commentSpacing?ue+(Je.height+a.commentSpacing):ue+(a.commentSpacing-Je.height)}else{if(135<E&&!ee||!x&&ae)if(0<=a.commentMargin)for(Le.h(a.bounds.x+ue,a.bounds.y-a.commentMargin-Je.height),Ke.move(Le),Ke=Ke.Sd();Ke.next();)it=Ke.value,it.fromSpot=ja,it.toSpot=sa;else for(Le.h(a.bounds.x+ue,a.bounds.y+2*a.focus.y-a.commentMargin),Ke.move(Le),Ke=Ke.Sd();Ke.next();)it=Ke.value,it.fromSpot=sa,it.toSpot=ja;else if(0<=a.commentMargin)for(Le.h(a.bounds.x+ue,a.bounds.y+2*a.focus.y+a.commentMargin),Ke.move(Le),Ke=Ke.Sd();Ke.next();)it=Ke.value,it.fromSpot=sa,it.toSpot=ja;else for(Le.h(a.bounds.x+ue,a.bounds.y+a.commentMargin-Je.height),Ke.move(Le),Ke=Ke.Sd();Ke.next();)it=Ke.value,it.fromSpot=ja,it.toSpot=sa;ue=0<=a.commentSpacing?ue+(Je.width+a.commentSpacing):ue+(a.commentSpacing-Je.width)}}if(st.free(Le),y=ue-a.commentSpacing-(b?y.height:y.width),this.ud===wu)for(a=a.destinationEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.toEndSegmentLength=0<y?y:NaN)}},$r.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case Fv:hx(this,a);break;case Mg:if(a.alignment===Cu)hx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=gc(x)),b=My(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!b?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&b?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 E=El(a);y=E===90||E===270;var ee=0,ne=a.children,ae=ne.length;for(x=0;x<ae;x++)b=ne[x],ee=Math.max(ee,y?b.Da.width:b.Da.height);var ue=a.alignment;b=ue===bu;var ge=ue===Pu,ye=gc(ue),Le=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var ze=a.nodeSpacing,Ke=this.computeNodeIndent(a),Je=a.rowSpacing,it=0;(b||ge||a.hm||a.im&&a.maxGenerationCount===1)&&(it=Math.max(0,a.rowIndent)),b=a.width;var Tt=a.height,Pt=0,Nt=0,At=0,Bt=null,Rt=null,Zt=0,On=0,rr=0,$n=0,En=0,dn=0,Dr=0,Mr=0;if(ye&&!Eg(ue)&&135<E&&ne.reverse(),Eg(ue))if(1<ae)for(var bi=0;bi<ae;bi++)bi%2===0&&bi!==ae-1&&(Mr=Math.max(Mr,y?ne[bi].Da.width:ne[bi].Da.height));else ae===1&&(Mr=y?ne[0].Da.width:ne[0].Da.height);if(ye){switch(ue){case Lh:Nt=135>E?cx(this,a,ne,Mr,Pt,Nt):fx(this,a,ne,Mr,Pt,Nt),Mr=Nt.x,Pt=Nt.width,Nt=Nt.height;break;case Mh:for(Bt=0;Bt<ae;Bt++)Rt=ne[Bt],Le=Rt.Da,At=dn===0?0:Je,y?(Rt.S.h(ee-Le.width,$n+At),Pt=Math.max(Pt,Le.width),Nt=Math.max(Nt,$n+At+Le.height),$n+=At+Le.height):(Rt.S.h(rr+At,ee-Le.height),Pt=Math.max(Pt,rr+At+Le.width),Nt=Math.max(Nt,Le.height),rr+=At+Le.width),dn++;break;case Xu:for(Bt=0;Bt<ae;Bt++)Rt=ne[Bt],ee=Rt.Da,Le=dn===0?0:Je,y?(Rt.S.h(ze/2+a.focus.x,$n+Le),Pt=Math.max(Pt,ee.width),Nt=Math.max(Nt,$n+Le+ee.height),$n+=Le+ee.height):(Rt.S.h(rr+Le,ze/2+a.focus.y),Pt=Math.max(Pt,rr+Le+ee.width),Nt=Math.max(Nt,ee.height),rr+=Le+ee.width),dn++}Bt=ms(this,2),Rt=ms(this,2),y?(Bt[0].h(0,0),Bt[1].h(0,Nt),Rt[0].h(Pt,0)):(Bt[0].h(0,0),Bt[1].h(Pt,0),Rt[0].h(0,Nt)),Rt[1].h(Pt,Nt)}else for(bi=0;bi<ae;bi++){var Vi=ne[bi],Yo=Vi.Da;if(y){0<Le&&0<dn&&rr+ze+Yo.width>Le&&(rr<ee&&ef(a,ue,ee-rr,0,Dr,bi-1),En++,dn=0,Dr=bi,At=Nt,rr=0,$n=135<E?-Nt-Je:Nt+Je),Av(this,Vi,0,$n);var ta=0;if(dn===0)Bt=Vi.Yo,Rt=Vi.kp,Zt=Yo.width,On=Yo.height,(Bt===null||Rt===null||E!==El(Vi))&&(Bt=ms(this,2),Rt=ms(this,2),Bt[0].h(0,0),Bt[1].h(0,On),Rt[0].h(Zt,0),Rt[1].h(Zt,On));else{var Ra=ir();On=dx(this,a,Vi,Bt,Rt,Zt,On,Ra),ta=On.x,Bt=Ra[0],Rt=Ra[1],Zt=On.width,On=On.height,Un(Ra),rr<Yo.width&&0>ta&&(Uf(a,-ta,0,Dr,bi-1),jv(Bt,-ta,0),jv(Rt,-ta,0),ta=0)}Vi.S.h(ta,$n),Pt=Math.max(Pt,Zt),Nt=Math.max(Nt,At+(En===0?0:Je)+Yo.height),rr=Zt}else 0<Le&&0<dn&&$n+ze+Yo.height>Le&&($n<ee&&ef(a,ue,0,ee-$n,Dr,bi-1),En++,dn=0,Dr=bi,At=Pt,$n=0,rr=135<E?-Pt-Je:Pt+Je),Av(this,Vi,rr,0),ta=0,dn===0?(Bt=Vi.Yo,Rt=Vi.kp,Zt=Yo.width,On=Yo.height,(Bt===null||Rt===null||E!==El(Vi))&&(Bt=ms(this,2),Rt=ms(this,2),Bt[0].h(0,0),Bt[1].h(Zt,0),Rt[0].h(0,On),Rt[1].h(Zt,On))):(Ra=ir(),On=dx(this,a,Vi,Bt,Rt,Zt,On,Ra),ta=On.x,Bt=Ra[0],Rt=Ra[1],Zt=On.width,On=On.height,Un(Ra),$n<Yo.height&&0>ta&&(Uf(a,0,-ta,Dr,bi-1),jv(Bt,0,-ta),jv(Rt,0,-ta),ta=0)),Vi.S.h(rr,ta),Nt=Math.max(Nt,On),Pt=Math.max(Pt,At+(En===0?0:Je)+Yo.width),$n=On;dn++}switch(0<En&&(y?(Nt+=Math.max(0,x),rr<Pt&&ef(a,ue,Pt-rr,0,Dr,ae-1),0<it&&(ge||Uf(a,it,0,0,ae-1),Pt+=it)):(Pt+=Math.max(0,x),$n<Nt&&ef(a,ue,0,Nt-$n,Dr,ae-1),0<it&&(ge||Uf(a,0,it,0,ae-1),Nt+=it))),it=ge=0,ue){case Jd:y?ge+=Pt/2-a.focus.x-Ke/2:it+=Nt/2-a.focus.y-Ke/2;break;case Wf:0<En?y?ge+=Pt/2-a.focus.x-Ke/2:it+=Nt/2-a.focus.y-Ke/2:y?(Mr=ne[0].S.x+ne[0].la.x,ge+=Mr+(ne[ae-1].S.x+ne[ae-1].la.x+2*ne[ae-1].focus.x-Mr)/2-a.focus.x-Ke/2):(Mr=ne[0].S.y+ne[0].la.y,it+=Mr+(ne[ae-1].S.y+ne[ae-1].la.y+2*ne[ae-1].focus.y-Mr)/2-a.focus.y-Ke/2);break;case bu:y?(ge-=Ke,Pt+=Ke):(it-=Ke,Nt+=Ke);break;case Pu:y?(ge+=Pt-a.width+Ke,Pt+=Ke):(it+=Nt-a.height+Ke,Nt+=Ke);break;case Lh:y?1<ae?ge+=Mr+ze/2-a.focus.x:ge+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<ae?it+=Mr+ze/2-a.focus.y:it+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Mh:y?ge+=Pt+ze/2-a.focus.x:it+=Nt+ze/2-a.focus.y;break;case Xu:break;default:Nt=this.customAlignment(a,ge,it,Pt,Nt),ge=Nt[0],it=Nt[1],Pt=Nt[2],Nt=Nt[3]}for(Ke=0;Ke<ae;Ke++)Mr=ne[Ke],y?Mr.S.h(Mr.S.x+Mr.la.x-ge,Mr.S.y+(135<E?(ye?-Nt:-Mr.Da.height)+Mr.la.y-x:Tt+x+Mr.la.y)):Mr.S.h(Mr.S.x+(135<E?(ye?-Pt:-Mr.Da.width)+Mr.la.x-x:b+x+Mr.la.x),Mr.S.y+Mr.la.y-it);if(ae=ne=0,ye?y?(Pt=Ny(a,Pt,ge),0>ge&&(ge=0),135<E&&(it+=Nt+x),Nt+=Tt+x,ue===Xu&&(ne+=ze/2+a.focus.x),ae+=Tt+x):(135<E&&(ge+=Pt+x),Pt+=b+x,Nt=Ay(a,Nt,it),0>it&&(it=0),ue===Xu&&(ae+=ze/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>Pt&&(Pt=jy(ue,b-Pt,0),ne=Pt.x,ae=Pt.y,Pt=b,ge=0):Pt=Ny(a,Pt,ge),0>ge&&(ne-=ge,ge=0),135<E&&(it+=Nt+x),Nt=Math.max(Math.max(Nt,Tt),Nt+Tt+x),ae+=Tt+x):(135<E&&(ge+=Pt+x),Pt=Math.max(Math.max(Pt,b),Pt+b+x),a.comments===null?Tt>Nt&&(Nt=jy(ue,0,Tt-Nt),ne=Nt.x,ae=Nt.y,Nt=Tt,it=0):Nt=Ay(a,Nt,it),0>it&&(ae-=it,it=0),ne+=b+x),0<En)E=ms(this,4),En=ms(this,4),y?(E[2].h(0,Tt+x),E[3].h(E[2].x,Nt),En[2].h(Pt,E[2].y),En[3].h(En[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Pt,E[2].y),En[2].h(E[2].x,Nt),En[3].h(E[3].x,En[2].y));else{for(E=ms(this,Bt.length+2),En=ms(this,Rt.length+2),ue=0;ue<Bt.length;ue++)ye=Bt[ue],E[ue+2].h(ye.x+ne,ye.y+ae);for(ue=0;ue<Rt.length;ue++)ye=Rt[ue],En[ue+2].h(ye.x+ne,ye.y+ae)}y?(E[0].h(ge,0),E[1].h(E[0].x,Tt),E[2].y<E[1].y&&(E[2].x>E[0].x?E[2].assign(E[1]):E[1].assign(E[2])),E[3].y<E[2].y&&(E[3].x>E[0].x?E[3].assign(E[2]):E[2].assign(E[3])),En[0].h(ge+b,0),En[1].h(En[0].x,Tt),En[2].y<En[1].y&&(En[2].x<En[0].x?En[2].assign(En[1]):En[1].assign(En[2])),En[3].y<En[2].y&&(En[3].x<En[0].x?En[3].assign(En[2]):En[2].assign(En[3])),E[2].y-=x/2,En[2].y-=x/2):(E[0].h(0,it),E[1].h(b,E[0].y),E[2].x<E[1].x&&(E[2].y>E[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].x<E[2].x&&(E[3].y>E[0].y?E[3].assign(E[2]):E[2].assign(E[3])),En[0].h(0,it+Tt),En[1].h(b,En[0].y),En[2].x<En[1].x&&(En[2].y<En[0].y?En[2].assign(En[1]):En[1].assign(En[2])),En[3].x<En[2].x&&(En[3].y<En[0].y?En[3].assign(En[2]):En[2].assign(En[3])),E[2].x-=x/2,En[2].x-=x/2),Il(this,Bt),Il(this,Rt),a.Yo=E,a.kp=En,a.la.h(ge,it),a.Da.h(Pt,Nt)}break;default:jt("Unhandled compaction value "+a.compaction.toString())}}};function hx(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=gc(x));var E=My(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(b!==180&&b!==270||x)&&!E?y.la.h(0,0):b===180&&!x||(b===90||b===270)&&E?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{b=El(y),x=b===90||b===270;var ee=0;E=y.children;for(var ne=E.length,ae=0;ae<ne;ae++){var ue=E[ae];ee=Math.max(ee,x?ue.Da.width:ue.Da.height)}var ge=y.alignment,ye=ge===bu,Le=ge===Pu;ae=gc(ge);var ze=Math.max(0,y.breadthLimit);ue=a.computeLayerSpacing(y);var Ke=y.nodeSpacing,Je=a.computeNodeIndent(y),it=ye||Le?0:Je/2,Tt=y.rowSpacing,Pt=0;(ye||Le||y.hm||y.im&&y.maxGenerationCount===1)&&(Pt=Math.max(0,y.rowIndent)),ye=y.width;var Nt=y.height,At=0,Bt=0,Rt=0,Zt=0,On=0,rr=0,$n=0,En=0,dn=0,Dr=0;if(ae&&!Eg(ge)&&135<b&&E.reverse(),Eg(ge))if(1<ne)for(var Mr=0;Mr<ne;Mr++){var bi=E[Mr],Vi=bi.Da;Mr%2===0&&Mr!==ne-1?dn=Math.max(dn,(x?Vi.width:Vi.height)+a.computeBusNodeSpacing(bi)-Ke):Mr%2!==0&&(Dr=Math.max(Dr,(x?Vi.width:Vi.height)+a.computeBusNodeSpacing(bi)-Ke))}else ne===1&&(dn=x?E[0].Da.width:E[0].Da.height);if(ae)switch(ge){case Lh:case Cu:Bt=135>b?cx(a,y,E,dn,At,Bt):fx(a,y,E,dn,At,Bt),dn=Bt.x,At=Bt.width,Bt=Bt.height;break;case Mh:for(ze=0;ze<ne;ze++)it=E[ze],Rt=it.Da,Dr=$n===0?0:Tt,x?(it.S.h(ee-Rt.width,On+Dr),At=Math.max(At,Rt.width),Bt=Math.max(Bt,On+Dr+Rt.height),On+=Dr+Rt.height):(it.S.h(Zt+Dr,ee-Rt.height),At=Math.max(At,Zt+Dr+Rt.width),Bt=Math.max(Bt,Rt.height),Zt+=Dr+Rt.width),$n++;break;case Xu:for(ee=0;ee<ne;ee++)ze=E[ee],it=ze.Da,Rt=$n===0?0:Tt,x?(ze.S.h(Ke/2+y.focus.x,On+Rt),At=Math.max(At,it.width),Bt=Math.max(Bt,On+Rt+it.height),On+=Rt+it.height):(ze.S.h(Zt+Rt,Ke/2+y.focus.y),At=Math.max(At,Zt+Rt+it.width),Bt=Math.max(Bt,it.height),Zt+=Rt+it.width),$n++}else for(Dr=0;Dr<ne;Dr++)Mr=E[Dr],bi=Mr.Da,x?(0<ze&&0<$n&&Zt+Ke+bi.width>ze&&(Zt<ee&&ef(y,ge,ee-Zt,0,En,Dr-1),rr++,$n=0,En=Dr,Rt=Bt,Zt=0,On=135<b?-Bt-Tt:Bt+Tt),Vi=$n===0?it:Ke,Av(a,Mr,0,On),Mr.S.h(Zt+Vi,On),At=Math.max(At,Zt+Vi+bi.width),Bt=Math.max(Bt,Rt+(rr===0?0:Tt)+bi.height),Zt+=Vi+bi.width):(0<ze&&0<$n&&On+Ke+bi.height>ze&&(On<ee&&ef(y,ge,0,ee-On,En,Dr-1),rr++,$n=0,En=Dr,Rt=At,On=0,Zt=135<b?-At-Tt:At+Tt),Vi=$n===0?it:Ke,Av(a,Mr,Zt,0),Mr.S.h(Zt,On+Vi),Bt=Math.max(Bt,On+Vi+bi.height),At=Math.max(At,Rt+(rr===0?0:Tt)+bi.width),On+=Vi+bi.height),$n++;switch(0<rr&&(x?(Bt+=Math.max(0,ue),Zt<At&&ef(y,ge,At-Zt,0,En,ne-1),0<Pt&&(Le||Uf(y,Pt,0,0,ne-1),At+=Pt)):(At+=Math.max(0,ue),On<Bt&&ef(y,ge,0,Bt-On,En,ne-1),0<Pt&&(Le||Uf(y,0,Pt,0,ne-1),Bt+=Pt))),Pt=Le=0,ge){case Jd:x?Le+=At/2-y.focus.x-Je/2:Pt+=Bt/2-y.focus.y-Je/2;break;case Wf:0<rr?x?Le+=At/2-y.focus.x-Je/2:Pt+=Bt/2-y.focus.y-Je/2:x?(a=E[0].S.x+E[0].la.x,Le+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-Je/2):(a=E[0].S.y+E[0].la.y,Pt+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-Je/2);break;case bu:x?(Le-=Je,At+=Je):(Pt-=Je,Bt+=Je);break;case Pu:x?(Le+=At-y.width+Je,At+=Je):(Pt+=Bt-y.height+Je,Bt+=Je);break;case Lh:case Cu:x?1<ne?Le+=dn+Ke/2-y.focus.x:Le+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?Pt+=dn+Ke/2-y.focus.y:Pt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Mh:x?Le+=At+Ke/2-y.focus.x:Pt+=Bt+Ke/2-y.focus.y;break;case Xu:break;default:a=a.customAlignment(y,Le,Pt,At,Bt),Le=a[0],Pt=a[1],At=a[2],Bt=a[3]}for(a=0;a<ne;a++)Je=E[a],x?Je.S.h(Je.S.x+Je.la.x-Le,Je.S.y+(135<b?(ae?-Bt:-Je.Da.height)+Je.la.y-ue:Nt+ue+Je.la.y)):Je.S.h(Je.S.x+(135<b?(ae?-At:-Je.Da.width)+Je.la.x-ue:ye+ue+Je.la.x),Je.S.y+Je.la.y-Pt);x?(At=Ny(y,At,Le),0>Le&&(Le=0),135<b&&(Pt+=Bt+ue),Bt=Math.max(Math.max(Bt,Nt),Bt+Nt+ue)):(135<b&&(Le+=At+ue),At=Math.max(Math.max(At,ye),At+ye+ue),Bt=Ay(y,Bt,Pt),0>Pt&&(Pt=0)),y.la.h(Le,Pt),y.Da.h(At,Bt)}}$r.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function cx(a,y,x,b,E,ee){var ne=x.length;if(ne===0)return new $t(b,0,E,ee);if(ne===1)return y=x[0],E=y.Da.width,ee=y.Da.height,new $t(b,0,E,ee);for(var ae=y.nodeSpacing,ue=y.rowSpacing,ge=El(y)===90,ye=0,Le=0,ze=0,Ke=0;Ke<ne;Ke++)if(!(Ke%2!==0||1<ne&&Ke===ne-1)){var Je=x[Ke],it=Je.Da,Tt=ye===0?0:ue;if(ge){var Pt=a.computeBusNodeSpacing(Je)-ae;Je.S.h(b-(it.width+Pt),ze+Tt),E=Math.max(E,it.width+Pt),ee=Math.max(ee,ze+Tt+it.height),ze+=Tt+it.height}else Pt=a.computeBusNodeSpacing(Je)-ae,Je.S.h(Le+Tt,b-(it.height+Pt)),ee=Math.max(ee,it.height+Pt),E=Math.max(E,Le+Tt+it.width),Le+=Tt+it.width;ye++}for(ye=0,Je=Le,Ke=ze,ge?(Le=b+ae,ze=0):(Le=0,ze=b+ae),it=0;it<ne;it++)if(it%2!==0){Tt=x[it],Pt=Tt.Da;var Nt=ye===0?0:ue;if(ge){var At=a.computeBusNodeSpacing(Tt)-ae;Tt.S.h(Le+At,ze+Nt),E=Math.max(E,Le+Pt.width+At),ee=Math.max(ee,ze+Nt+Pt.height),ze+=Nt+Pt.height}else At=a.computeBusNodeSpacing(Tt)-ae,Tt.S.h(Le+Nt,ze+At),E=Math.max(E,Le+Nt+Pt.width),ee=Math.max(ee,ze+Pt.height+At),Le+=Nt+Pt.width;ye++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,ge?Math.max(Math.abs(Ke),Math.abs(ze)):Math.max(Math.abs(Je),Math.abs(Le))),ge?(x.S.h(b+ae/2-x.focus.x-x.la.x,ee+a),ge=b+ae/2-x.focus.x-x.la.x,E=Math.max(E,ge+ne.width),0>ge&&(E-=ge),ee=Math.max(ee,Math.max(Ke,ze)+a+ne.height),0>x.S.x&&(b=Nv(y,x.S.x,!1,b,ae))):(x.S.h(E+a,b+ae/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(Je,Le)+a+ne.width),ze=b+ae/2-x.focus.y-x.la.y,ee=Math.max(ee,ze+ne.height),0>ze&&(ee-=ze),0>x.S.y&&(b=Nv(y,x.S.y,!0,b,ae)))),new $t(b,0,E,ee)}function fx(a,y,x,b,E,ee){var ne=x.length;if(ne===0)return new $t(b,0,E,ee);if(ne===1)return x=x[0],E=x.Da.width,ee=x.Da.height,new $t(b,0,E,ee);for(var ae=y.nodeSpacing,ue=y.rowSpacing,ge=El(y)===270,ye=0,Le=0,ze=0,Ke=0;Ke<ne;Ke++)if(!(Ke%2!==0||1<ne&&Ke===ne-1)){var Je=x[Ke],it=Je.Da,Tt=ye===0?0:ue;if(ge){var Pt=a.computeBusNodeSpacing(Je)-ae;ze-=Tt+it.height,Je.S.h(b-(it.width+Pt),ze),E=Math.max(E,it.width+Pt),ee=Math.max(ee,Math.abs(ze))}else Pt=a.computeBusNodeSpacing(Je)-ae,Le-=Tt+it.width,Je.S.h(Le,b-(it.height+Pt)),ee=Math.max(ee,it.height+Pt),E=Math.max(E,Math.abs(Le));ye++}for(ye=0,Je=Le,Ke=ze,ge?(Le=b+ae,ze=0):(Le=0,ze=b+ae),it=0;it<ne;it++)if(it%2!==0){Tt=x[it],Pt=Tt.Da;var Nt=ye===0?0:ue;if(ge){var At=a.computeBusNodeSpacing(Tt)-ae;ze-=Nt+Pt.height,Tt.S.h(Le+At,ze),E=Math.max(E,Le+Pt.width+At),ee=Math.max(ee,Math.abs(ze))}else At=a.computeBusNodeSpacing(Tt)-ae,Le-=Nt+Pt.width,Tt.S.h(Le,ze+At),ee=Math.max(ee,ze+Pt.height+At),E=Math.max(E,Math.abs(Le));ye++}for(1<ne&&ne%2===1&&(ue=x[ne-1],ye=ue.Da,a=a.computeBusLastRowSpacing(ue,ge?Math.max(Math.abs(Ke),Math.abs(ze)):Math.max(Math.abs(Je),Math.abs(Le))),ge?(ue.S.h(b+ae/2-ue.focus.x-ue.la.x,-ee-ye.height-a),Le=b+ae/2-ue.focus.x-ue.la.x,E=Math.max(E,Le+ye.width),0>Le&&(E-=Le),ee=Math.max(ee,Math.abs(Math.min(Ke,ze))+a+ye.height),0>ue.S.x&&(b=Nv(y,ue.S.x,!1,b,ae))):(ue.S.h(-E-ye.width-a,b+ae/2-ue.focus.y-ue.la.y),E=Math.max(E,Math.abs(Math.min(Je,Le))+a+ye.width),ze=b+ae/2-ue.focus.y-ue.la.y,ee=Math.max(ee,ze+ye.height),0>ze&&(ee-=ze),0>ue.S.y&&(b=Nv(y,ue.S.y,!0,b,ae)))),y=0;y<ne;y++)ae=x[y],ge?ae.S.h(ae.S.x,ae.S.y+ee):ae.S.h(ae.S.x+E,ae.S.y);return new $t(b,0,E,ee)}$r.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},$r.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function Nv(a,y,x,b,E){a=a.children;for(var ee=a.length,ne=0;ne<ee;ne++)x?a[ne].S.h(a[ne].S.x,a[ne].S.y-y):a[ne].S.h(a[ne].S.x-y,a[ne].S.y);return y=a[ee-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function Ny(a,y,x){switch(a.alignment){case Wf:case Jd:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case bu:return a.width>y?a.width:y;case Pu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Lh:case Cu:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Mh:return a.width-a.focus.x+a.nodeSpacing/2+y;case Xu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a.alignment){case Wf:case Jd:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case bu:return a.height>y?a.height:y;case Pu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Lh:case Cu:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Mh:return a.height-a.focus.y+a.nodeSpacing/2+y;case Xu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function jy(a,y,x){switch(a){case Jd:y/=2,x/=2;break;case Wf:y/=2,x/=2;break;case bu:x=y=0;break;case Pu:break;default:jt("Unhandled alignment value "+a.toString())}return new st(y,x)}function ef(a,y,x,b,E,ee){y=jy(y,x,b),Uf(a,y.x,y.y,E,ee)}function Uf(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var ee=a[b].S;ee.x+=y,ee.y+=x}}function Av(a,y,x,b){var E=y.parent;switch(a.ud){case wu:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Hf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:jt("Unhandled path value "+a.ud.toString())}}function jv(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function dx(a,y,x,b,E,ee,ne,ae){var ue=El(y),ge=ue===90||ue===270,ye=y.nodeSpacing;y=b;var Le=E;b=ee;var ze=ne,Ke=x.Yo,Je=x.kp;ne=x.Da;var it=ge?Math.max(ze,ne.height):Math.max(b,ne.width);if((Ke===null||ue!==El(x))&&(Ke=ms(a,2),Je=ms(a,2),ge?(Ke[0].h(0,0),Ke[1].h(0,ne.height),Je[0].h(ne.width,0),Je[1].h(Je[0].x,Ke[1].y)):(Ke[0].h(0,0),Ke[1].h(ne.width,0),Je[0].h(0,ne.height),Je[1].h(Ke[1].x,Je[0].y))),ge){if(ze=9999999,!(Le===null||2>Le.length||Ke===null||2>Ke.length))for(E=x=0;x<Le.length&&E<Ke.length;){ee=Le[x];var Tt=Ke[E];ue=Tt.x,ge=Tt.y,ue+=b;var Pt=ee;x+1<Le.length&&(Pt=Le[x+1]);var Nt=Tt;Tt=Nt.x,Nt=Nt.y,E+1<Ke.length&&(Nt=Ke[E+1],Tt=Nt.x,Nt=Nt.y,Tt+=b);var At=ze;ee.y===ge?At=ue-ee.x:ee.y>ge&&ee.y<Nt?At=ue+(ee.y-ge)/(Nt-ge)*(Tt-ue)-ee.x:ge>ee.y&&ge<Pt.y&&(At=ue-(ee.x+(ge-ee.y)/(Pt.y-ee.y)*(Pt.x-ee.x))),At<ze&&(ze=At),Pt.y<=ee.y?x++:Nt<=ge?E++:(Pt.y<=Nt&&x++,Nt<=Pt.y&&E++)}if(ze=b-ze,ze+=ye,x=Ke,E=ze,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=ms(a,y.length+x.length),b=ee=ue=0;ee<x.length&&x[ee].y<y[0].y;)ge=x[ee++],ye[b++].h(ge.x+E,ge.y);for(;ue<y.length;)ge=y[ue++],ye[b++].h(ge.x,ge.y);for(ue=y[y.length-1].y;ee<x.length&&x[ee].y<=ue;)ee++;for(;ee<x.length&&x[ee].y>ue;)ge=x[ee++],ye[b++].h(ge.x+E,ge.y);for(x=ms(a,b),ue=0;ue<b;ue++)x[ue].assign(ye[ue]);Il(a,ye),b=x}if(ee=Je,ue=ze,Le===null||2>Le.length||ee===null||2>ee.length)E=null;else{for(ye=ms(a,Le.length+ee.length),E=ge=x=0;x<Le.length&&Le[x].y<ee[0].y;)Pt=Le[x++],ye[E++].h(Pt.x,Pt.y);for(;ge<ee.length;)Pt=ee[ge++],ye[E++].h(Pt.x+ue,Pt.y);for(ee=ee[ee.length-1].y;x<Le.length&&Le[x].y<=ee;)x++;for(;x<Le.length&&Le[x].y>ee;)ue=Le[x++],ye[E++].h(ue.x,ue.y);for(ee=ms(a,E),x=0;x<E;x++)ee[x].assign(ye[x]);Il(a,ye),E=ee}return ee=Math.max(0,ze)+ne.width,ne=it,Il(a,y),Il(a,Ke),Il(a,Le),Il(a,Je),ae[0]=b,ae[1]=E,new $t(ze,0,ee,ne)}if(b=9999999,!(Le===null||2>Le.length||Ke===null||2>Ke.length))for(E=x=0;x<Le.length&&E<Ke.length;)ee=Le[x],Tt=Ke[E],ue=Tt.x,ge=Tt.y,ge+=ze,Pt=ee,x+1<Le.length&&(Pt=Le[x+1]),Nt=Tt,Tt=Nt.x,Nt=Nt.y,E+1<Ke.length&&(Nt=Ke[E+1],Tt=Nt.x,Nt=Nt.y,Nt+=ze),At=b,ee.x===ue?At=ge-ee.y:ee.x>ue&&ee.x<Tt?At=ge+(ee.x-ue)/(Tt-ue)*(Nt-ge)-ee.y:ue>ee.x&&ue<Pt.x&&(At=ge-(ee.y+(ue-ee.x)/(Pt.x-ee.x)*(Pt.y-ee.y))),At<b&&(b=At),Pt.x<=ee.x?x++:Tt<=ue?E++:(Pt.x<=Tt&&x++,Tt<=Pt.x&&E++);if(ze-=b,ze+=ye,x=Ke,E=ze,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=ms(a,y.length+x.length),b=ee=ue=0;ee<x.length&&x[ee].x<y[0].x;)ge=x[ee++],ye[b++].h(ge.x,ge.y+E);for(;ue<y.length;)ge=y[ue++],ye[b++].h(ge.x,ge.y);for(ue=y[y.length-1].x;ee<x.length&&x[ee].x<=ue;)ee++;for(;ee<x.length&&x[ee].x>ue;)ge=x[ee++],ye[b++].h(ge.x,ge.y+E);for(x=ms(a,b),ue=0;ue<b;ue++)x[ue].assign(ye[ue]);Il(a,ye),b=x}if(ee=Je,ue=ze,Le===null||2>Le.length||ee===null||2>ee.length)E=null;else{for(ye=ms(a,Le.length+ee.length),E=ge=x=0;x<Le.length&&Le[x].x<ee[0].x;)Pt=Le[x++],ye[E++].h(Pt.x,Pt.y);for(;ge<ee.length;)Pt=ee[ge++],ye[E++].h(Pt.x,Pt.y+ue);for(ee=ee[ee.length-1].x;x<Le.length&&Le[x].x<=ee;)x++;for(;x<Le.length&&Le[x].x>ee;)ue=Le[x++],ye[E++].h(ue.x,ue.y);for(ee=ms(a,E),x=0;x<E;x++)ee[x].assign(ye[x]);Il(a,ye),E=ee}return ee=it,ne=Math.max(0,ze)+ne.height,Il(a,y),Il(a,Ke),Il(a,Le),Il(a,Je),ae[0]=b,ae[1]=E,new $t(ze,0,ee,ne)}function ms(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 st;return a}function Il(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}$r.prototype.arrangeTrees=function(){if(this.Rb===Iv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof cl){var x=y.node;if(x!==null){var b=x.position;x=b.x,b=b.y,isFinite(x)||(x=0),isFinite(b)||(b=0),Oy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof cl&&a.push(x);switch(this.sorting){case Yd:break;case kg:a.reverse();break;case Tg:a.sort(this.comparer);break;case Lg:a.sort(this.comparer),a.reverse();break;default:jt("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,b=0;b<a.length;b++){var E=a[b];switch(Oy(this,E,y+E.la.x,x+E.la.y),this.Rb){case Bv:x+=E.Da.height+this.$d.height;break;case Iy:y+=E.Da.width+this.$d.width;break;default:jt("Unhandled arrangement value "+this.Rb.toString())}}}};function Oy(a,y,x,b){if(y!==null){y.x=x,y.y=b,y=y.children;for(var E=y.length,ee=0;ee<E;ee++){var ne=y[ee];Oy(a,ne,x+ne.S.x,b+ne.S.y)}}}$r.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},$r.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},$r.prototype.Gu=function(){if(this.layerStyle===Rv){for(var a=this.$v,y=[],x=null,b=this.network.vertexes.iterator;b.next();){var E=b.value;x===null?x=E.bounds.copy():x.ed(E.bounds);var ee=y[E.level];ee===void 0?ee=this.computeLayerSpacing(E):ee=Math.max(ee,this.computeLayerSpacing(E)),y[E.level]=ee}for(b=0;b<y.length;b++)y[b]===void 0&&(y[b]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),b=new st(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new st(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,ee=0,this.angle===180||this.angle===270)for(var ne=0;ne<a.length;ne++)ee+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var ae=a[ne]+y[ne];this.angle===270?(ee-=ae,E.push(new $t(0,ee,x,ae))):this.angle===90?(E.push(new $t(0,ee,x,ae)),ee+=ae):this.angle===180?(ee-=ae,E.push(new $t(ee,0,ae,x))):(E.push(new $t(ee,0,ae,x)),ee+=ae)}this.commitLayers(E,b)}},$r.prototype.commitLayers=function(){},$r.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},$r.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof cl&&px(this,y)}};function px(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)px(a,y[b])}}$r.prototype.setPortSpots=function(a){var y=a.alignment;if(gc(y)){var x=this.ud===wu,b=El(a);switch(b){case 0:var E=na;break;case 90:E=sa;break;case 180:E=Oa;break;default:E=ja}var ee=a.children,ne=ee.length;switch(y){case Lh:case Cu:for(y=0;y<ne;y++){var ae=ee[y];if(ae=(x?ae.sourceEdges:ae.destinationEdges).first(),ae!==null&&(ae=ae.link,ae!==null)){var ue=b===90||b===270?Oa:ja;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:ue=Oa;break;case 90:ue=ja;break;case 180:ue=na;break;default:ue=sa}else y%2===0&&(ue=b===90||b===270?na:sa);x?(a.setsPortSpot&&(ae.fromSpot=E),a.setsChildPortSpot&&(ae.toSpot=ue)):(a.setsPortSpot&&(ae.fromSpot=ue),a.setsChildPortSpot&&(ae.toSpot=E))}}break;case Mh:for(b=b===90||b===270?na:sa,ee=x?a.destinationEdges:a.sourceEdges;ee.next();)ne=ee.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)));break;case Xu:for(b=b===90||b===270?Oa:ja,ee=x?a.destinationEdges:a.sourceEdges;ee.next();)ne=ee.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)))}}else if(x=El(a),this.ud===wu){for(E=a.destinationEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.fromSpot=na;break;case 90:b.fromSpot=sa;break;case 180:b.fromSpot=Oa;break;default:b.fromSpot=ja}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Oa;break;case 90:b.toSpot=ja;break;case 180:b.toSpot=na;break;default:b.toSpot=sa}else b.toSpot=a.childPortSpot}}else for(E=a.sourceEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.toSpot=na;break;case 90:b.toSpot=sa;break;case 180:b.toSpot=Oa;break;default:b.toSpot=ja}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Oa;break;case 90:b.fromSpot=ja;break;case 180:b.fromSpot=na;break;default:b.fromSpot=sa}else b.fromSpot=a.childPortSpot}};function El(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}$r.prototype.computeLayerSpacing=function(a){var y=El(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var b=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*b:a.width*b}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},$r.prototype.computeNodeIndent=function(a){var y=El(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var b=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*b:a.height*b}return x=Math.max(0,x)},zt.Object.defineProperties($r.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!==Dv&&a!==Dy&&a!==Fy&&a!==By||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==_y&&a!==Rv||(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!==Bv&&a!==Iy&&a!==Iv||(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!==Yd&&a!==kg&&a!==Tg&&!Lg||(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()):jt("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!==Fv&&a!==Mg||(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!==Yd&&a!==kg&&a!==Tg&&!Lg||(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!==Fv&&a!==Mg||(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 Ov=new an($r,"PathDefault",-1),wu=new an($r,"PathDestination",0),Hf=new an($r,"PathSource",1),Yd=new an($r,"SortingForwards",10),kg=new an($r,"SortingReverse",11),Tg=new an($r,"SortingAscending",12),Lg=new an($r,"SortingDescending",13),Jd=new an($r,"AlignmentCenterSubtrees",20),Wf=new an($r,"AlignmentCenterChildren",21),bu=new an($r,"AlignmentStart",22),Pu=new an($r,"AlignmentEnd",23),Lh=new an($r,"AlignmentBus",24),Cu=new an($r,"AlignmentBusBranching",25),Mh=new an($r,"AlignmentTopLeftBus",26),Xu=new an($r,"AlignmentBottomRightBus",27),Fv=new an($r,"CompactionNone",30),Mg=new an($r,"CompactionBlock",31),Dv=new an($r,"StyleLayered",40),Fy=new an($r,"StyleLastParents",41),Dy=new an($r,"StyleAlternating",42),By=new an($r,"StyleRootOnly",43),Bv=new an($r,"ArrangementVertical",50),Iy=new an($r,"ArrangementHorizontal",51),Iv=new an($r,"ArrangementFixedRoots",52),Ry=new an($r,"LayerIndividual",60),_y=new an($r,"LayerSiblings",61),Rv=new an($r,"LayerUniform",62);$r.className="TreeLayout",$r.PathDefault=Ov,$r.PathDestination=wu,$r.PathSource=Hf,$r.SortingForwards=Yd,$r.SortingReverse=kg,$r.SortingAscending=Tg,$r.SortingDescending=Lg,$r.AlignmentCenterSubtrees=Jd,$r.AlignmentCenterChildren=Wf,$r.AlignmentStart=bu,$r.AlignmentEnd=Pu,$r.AlignmentBus=Lh,$r.AlignmentBusBranching=Cu,$r.AlignmentTopLeftBus=Mh,$r.AlignmentBottomRightBus=Xu,$r.CompactionNone=Fv,$r.CompactionBlock=Mg,$r.StyleLayered=Dv,$r.StyleLastParents=Fy,$r.StyleAlternating=Dy,$r.StyleRootOnly=By,$r.ArrangementVertical=Bv,$r.ArrangementHorizontal=Iy,$r.ArrangementFixedRoots=Iv,$r.LayerIndividual=Ry,$r.LayerSiblings=_y,$r.LayerUniform=Rv;function Kf(a){Xi.call(this,a)}Wt(Kf,Xi),Kf.prototype.createVertex=function(){return new cl(this)},Kf.prototype.createEdge=function(){return new Qd(this)},Kf.className="TreeNetwork";function cl(a){Uo.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 st(0,0),this.Da=new vn(0,0),this.la=new st(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Yd,this.hd=oy,this.Kb=0,this.Jb=Wf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Mg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Vo,this.wr=!0,this.Dp=Vo}Wt(cl,Uo),cl.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)},zt.Object.defineProperties(cl.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)}}}),cl.className="TreeVertex";function Qd(a){Es.call(this,a),this.$t=new st(0,0)}Wt(Qd,Es),Qd.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,b=null;switch(y.ud){case wu:x=this.fromVertex,b=this.toVertex;break;case Hf:x=this.toVertex,b=this.fromVertex;break;default:jt("Unhandled path value "+y.ud.toString())}if(x!==null&&b!==null){var E=this.$t;if(E.x!==0||E.y!==0||x.qA){b=x.bounds;var ee=El(x),ne=y.computeLayerSpacing(x),ae=x.rowSpacing;a.vg();var ue=a.curve===Rs,ge=a.isOrthogonal,ye;if(a.uh(),ge||ue){for(ye=2;4<a.pointsCount;)a.pv(2);var Le=a.i(1),ze=a.i(2)}else{for(ye=1;3<a.pointsCount;)a.pv(1);Le=a.i(0),ze=a.i(a.pointsCount-1)}var Ke=a.i(a.pointsCount-1);ee===0?(x.alignment===Pu?(ee=b.bottom+E.y,E.y===0&&Le.y>Ke.y+x.rowIndent&&(ee=Math.min(ee,Math.max(Le.y,ee-y.computeNodeIndent(x))))):x.alignment===bu?(ee=b.top+E.y,E.y===0&&Le.y<Ke.y-x.rowIndent&&(ee=Math.max(ee,Math.min(Le.y,ee+y.computeNodeIndent(x))))):ee=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,ue?(a.m(ye,Le.x,ee),ye++,a.m(ye,b.right+ne,ee),ye++,a.m(ye,b.right+ne+(E.x-ae)/3,ee),ye++,a.m(ye,b.right+ne+2*(E.x-ae)/3,ee),ye++,a.m(ye,b.right+ne+(E.x-ae),ee),ye++,a.m(ye,ze.x,ee)):(ge&&(a.m(ye,b.right+ne/2,Le.y),ye++),a.m(ye,b.right+ne/2,ee),ye++,a.m(ye,b.right+ne+E.x-(ge?ae/2:ae),ee),ye++,ge&&a.m(ye,a.i(ye-1).x,ze.y))):ee===90?(x.alignment===Pu?(ee=b.right+E.x,E.x===0&&Le.x>Ke.x+x.rowIndent&&(ee=Math.min(ee,Math.max(Le.x,ee-y.computeNodeIndent(x))))):x.alignment===bu?(ee=b.left+E.x,E.x===0&&Le.x<Ke.x-x.rowIndent&&(ee=Math.max(ee,Math.min(Le.x,ee+y.computeNodeIndent(x))))):ee=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,ue?(a.m(ye,ee,Le.y),ye++,a.m(ye,ee,b.bottom+ne),ye++,a.m(ye,ee,b.bottom+ne+(E.y-ae)/3),ye++,a.m(ye,ee,b.bottom+ne+2*(E.y-ae)/3),ye++,a.m(ye,ee,b.bottom+ne+(E.y-ae)),ye++,a.m(ye,ee,ze.y)):(ge&&(a.m(ye,Le.x,b.bottom+ne/2),ye++),a.m(ye,ee,b.bottom+ne/2),ye++,a.m(ye,ee,b.bottom+ne+E.y-(ge?ae/2:ae)),ye++,ge&&a.m(ye,ze.x,a.i(ye-1).y))):ee===180?(x.alignment===Pu?(ee=b.bottom+E.y,E.y===0&&Le.y>Ke.y+x.rowIndent&&(ee=Math.min(ee,Math.max(Le.y,ee-y.computeNodeIndent(x))))):x.alignment===bu?(ee=b.top+E.y,E.y===0&&Le.y<Ke.y-x.rowIndent&&(ee=Math.max(ee,Math.min(Le.y,ee+y.computeNodeIndent(x))))):ee=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,ue?(a.m(ye,Le.x,ee),ye++,a.m(ye,b.left-ne,ee),ye++,a.m(ye,b.left-ne+(E.x+ae)/3,ee),ye++,a.m(ye,b.left-ne+2*(E.x+ae)/3,ee),ye++,a.m(ye,b.left-ne+(E.x+ae),ee),ye++,a.m(ye,ze.x,ee)):(ge&&(a.m(ye,b.left-ne/2,Le.y),ye++),a.m(ye,b.left-ne/2,ee),ye++,a.m(ye,b.left-ne+E.x+(ge?ae/2:ae),ee),ye++,ge&&a.m(ye,a.i(ye-1).x,ze.y))):ee===270?(x.alignment===Pu?(ee=b.right+E.x,E.x===0&&Le.x>Ke.x+x.rowIndent&&(ee=Math.min(ee,Math.max(Le.x,ee-y.computeNodeIndent(x))))):x.alignment===bu?(ee=b.left+E.x,E.x===0&&Le.x<Ke.x-x.rowIndent&&(ee=Math.max(ee,Math.min(Le.x,ee+y.computeNodeIndent(x))))):ee=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,ue?(a.m(ye,ee,Le.y),ye++,a.m(ye,ee,b.top-ne),ye++,a.m(ye,ee,b.top-ne+(E.y+ae)/3),ye++,a.m(ye,ee,b.top-ne+2*(E.y+ae)/3),ye++,a.m(ye,ee,b.top-ne+(E.y+ae)),ye++,a.m(ye,ee,ze.y)):(ge&&(a.m(ye,Le.x,b.top-ne/2),ye++),a.m(ye,ee,b.top-ne/2),ye++,a.m(ye,ee,b.top-ne+E.y+(ge?ae/2:ae)),ye++,ge&&a.m(ye,ze.x,a.i(ye-1).y))):jt("Invalid angle "+ee),a.zf()}else E=b,a=this.link,b=this.network.layout,y=El(x),y!==El(E)&&(ne=b.computeLayerSpacing(x),ae=x.bounds,x=E.bounds,y===0&&x.left-ae.right<ne+1||y===90&&x.top-ae.bottom<ne+1||y===180&&ae.left-x.right<ne+1||y===270&&ae.top-x.bottom<ne+1||(a.vg(),x=a.curve===Rs,E=a.isOrthogonal,b=gc(this.fromVertex.alignment),a.uh(),y===0?(y=ae.right+ne/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)):E?b?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=ae.bottom+ne/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)):E?b?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=ae.left-ne/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)):E?b?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=ae.top-ne/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)):E?b?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()))}}},zt.Object.defineProperties(Qd.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)}}}),Qd.className="TreeEdge",Ji.prototype.initializeStandardTools=function(){this.gb("Action",new il,this.mouseDownTools),this.gb("Relinking",new Os,this.mouseDownTools),this.gb("LinkReshaping",new ko,this.mouseDownTools),this.gb("Rotating",new Ka,this.mouseDownTools),this.gb("Resizing",new Ca,this.mouseDownTools),this.gb("Linking",new Wa,this.mouseMoveTools),this.gb("Dragging",new lo,this.mouseMoveTools),this.gb("DragSelecting",new Hs,this.mouseMoveTools),this.gb("Panning",new ya,this.mouseMoveTools),this.gb("ContextMenu",new Va,this.mouseUpTools),this.gb("TextEditing",new Qi,this.mouseUpTools),this.gb("ClickCreating",new uh,this.mouseUpTools),this.gb("ClickSelecting",new Uh,this.mouseUpTools)},$l("Horizontal",new dm),$l("Spot",new gm),$l("Table",new vm),$l("Viewbox",new xm),$l("TableRow",new ym),$l("TableColumn",new Sm),$l("Graduated",new Kp),$l("Grid",new Wp),xd.add("GraphLinksModel",ea),xd.add("TreeModel",Qs);var _v=yn.go,zy={get licenseKey(){return Jt.licenseKey},set licenseKey(a){Jt.licenseKey=a},get version(){return Jt.version},Group:Br,EnumValue:an,List:rn,Set:sn,Map:tn,Point:st,Size:vn,Rect:$t,Margin:Gr,Spot:Mn,Geometry:Ln,PathFigure:Oo,PathSegment:pi,InputEvent:va,DiagramEvent:au,ChangedEvent:oo,Model:cr,GraphLinksModel:li,TreeModel:es,Binding:Lo,Transaction:zo,UndoManager:ho,CommandHandler:kt,Tool:fi,DraggingTool:lo,DraggingInfo:Uu,DraggingOptions:he,LinkingBaseTool:So,LinkingTool:Wa,RelinkingTool:Os,LinkReshapingTool:ko,ResizingTool:Ca,RotatingTool:Ka,ClickSelectingTool:Uh,ActionTool:il,ClickCreatingTool:uh,HTMLInfo:Zl,ContextMenuTool:Va,DragSelectingTool:Hs,PanningTool:ya,TextEditingTool:Qi,ToolManager:Ji,Animation:Sa,AnimationManager:bs,AnimationTrigger:vl,Layer:ra,Diagram:Jt,Palette:Ce,Overview:Oe,Brush:Ni,GraphObject:_t,Panel:bn,RowColumnDefinition:Io,Shape:Ur,TextBlock:Zi,Picture:hs,Part:Sr,Adornment:gi,Node:_n,Link:Tn,Placeholder:Ja,Layout:so,LayoutNetwork:Xi,LayoutVertex:Uo,LayoutEdge:Es,GridLayout:fa,PanelLayout:Go,CircularLayout:po,CircularNetwork:Vd,CircularVertex:Sg,CircularEdge:Sv,ForceDirectedLayout:wa,ForceDirectedNetwork:Gf,ForceDirectedVertex:xg,ForceDirectedEdge:wg,LayeredDigraphLayout:ji,LayeredDigraphNetwork:Xd,LayeredDigraphVertex:el,LayeredDigraphEdge:Cg,TreeLayout:$r,TreeNetwork:Kf,TreeVertex:cl,TreeEdge:Qd};typeof _v=="object"&&_v.version&&Yn("WARNING: a `go` object on the root object is already defined. "+("Debug"in _v?"debug ":"")+"version: "+_v.version+", replaced with version: "+zy.version),Jt.prototype.go=zy,yn.go=zy,typeof Dn.exports=="object"&&(Dn.exports=typeof pt.g!="undefined"?pt.g.go:self.go)}();var at=typeof pt.g!="undefined"?pt.g.go:self.go;const Ut=typeof pt.g!="undefined"?pt.g.go:self.go,oe=Ut.Group,He=Ut.EnumValue,Re=Ut.List,de=Ut.Set,ve=Ut.Map,Ee=Ut.Point,ke=Ut.Size,Se=Ut.Rect,Ae=Ut.Margin,me=Ut.Spot,Pe=Ut.Geometry,fe=Ut.PathFigure,z=Ut.PathSegment,te=Ut.InputEvent,se=Ut.DiagramEvent,ie=Ut.ChangedEvent,le=Ut.Model,ce=Ut.GraphLinksModel,pe=Ut.TreeModel,xe=Ut.Binding,je=Ut.Transaction,De=Ut.UndoManager,Fe=Ut.CommandHandler,Te=Ut.Tool,Me=Ut.DraggingTool,Be=Ut.DraggingInfo,Ue=Ut.LinkingBaseTool,Ye=Ut.LinkingTool,Ve=Ut.RelinkingTool,Ze=Ut.LinkReshapingTool,ot=Ut.ResizingTool,lt=Ut.RotatingTool,ft=Ut.ClickSelectingTool,St=Ut.ActionTool,qe=Ut.ClickCreatingTool,rt=Ut.HTMLInfo,wt=Ut.ContextMenuTool,Ct=Ut.DragSelectingTool,bt=Ut.PanningTool,ct=Ut.TextEditingTool,xt=Ut.ToolManager,dt=Ut.Animation,Mt=Ut.AnimationManager,yt=Ut.AnimationTrigger,Dt=Ut.Layer,mt=Ut.Diagram,vt=Ut.Palette,et=Ut.Overview,We=Ut.Brush,we=Ut.GraphObject,Ne=Ut.Panel,Xe=Ut.RowColumnDefinition,nt=Ut.Shape,Ie=Ut.TextBlock,_e=Ut.TextBlockMetrics,Ge=Ut.Picture,tt=Ut.Part,ht=Ut.Adornment,ut=Ut.Node,Ot=Ut.Link,Et=Ut.Placeholder,Ft=Ut.Layout,qt=Ut.LayoutNetwork,Xt=Ut.LayoutVertex,Kt=Ut.LayoutEdge,Vt=Ut.GridLayout,hn=Ut.PanelLayout,on=Ut.CircularLayout,cn=Ut.CircularNetwork,Sn=Ut.CircularVertex,Cn=Ut.CircularEdge,kn=Ut.ForceDirectedLayout,In=Ut.ForceDirectedNetwork,_r=Ut.ForceDirectedVertex,xr=Ut.ForceDirectedEdge,qr=Ut.LayeredDigraphLayout,er=Ut.LayeredDigraphNetwork,si=Ut.LayeredDigraphVertex,ei=Ut.LayeredDigraphEdge,vi=Ut.TreeLayout,Li=Ut.TreeNetwork,Pi=Ut.TreeVertex,Xr=Ut.TreeEdge,mi=Ut.version},2859:function(Dn,jn,pt){"use strict";pt.d(jn,{hP:function(){return et}});var at=function(We,we){return(at=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ne,Xe){Ne.__proto__=Xe}||function(Ne,Xe){for(var nt in Xe)Object.prototype.hasOwnProperty.call(Xe,nt)&&(Ne[nt]=Xe[nt])})(We,we)};function Ut(We,we){function Ne(){this.constructor=We}at(We,we),We.prototype=we===null?Object.create(we):(Ne.prototype=we.prototype,new Ne)}function oe(We,we,Ne,Xe){return new(Ne||(Ne=Promise))(function(nt,Ie){function _e(ht){try{tt(Xe.next(ht))}catch(ut){Ie(ut)}}function Ge(ht){try{tt(Xe.throw(ht))}catch(ut){Ie(ut)}}function tt(ht){var ut;ht.done?nt(ht.value):(ut=ht.value,ut instanceof Ne?ut:new Ne(function(Ot){Ot(ut)})).then(_e,Ge)}tt((Xe=Xe.apply(We,we||[])).next())})}function He(We,we){var Ne,Xe,nt,Ie,_e={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return Ie={next:Ge(0),throw:Ge(1),return:Ge(2)},typeof Symbol=="function"&&(Ie[Symbol.iterator]=function(){return this}),Ie;function Ge(tt){return function(ht){return function(ut){if(Ne)throw new TypeError("Generator is already executing.");for(;_e;)try{if(Ne=1,Xe&&(nt=2&ut[0]?Xe.return:ut[0]?Xe.throw||((nt=Xe.return)&&nt.call(Xe),0):Xe.next)&&!(nt=nt.call(Xe,ut[1])).done)return nt;switch(Xe=0,nt&&(ut=[2&ut[0],nt.value]),ut[0]){case 0:case 1:nt=ut;break;case 4:return _e.label++,{value:ut[1],done:!1};case 5:_e.label++,Xe=ut[1],ut=[0];continue;case 7:ut=_e.ops.pop(),_e.trys.pop();continue;default:if(nt=_e.trys,!((nt=nt.length>0&&nt[nt.length-1])||ut[0]!==6&&ut[0]!==2)){_e=0;continue}if(ut[0]===3&&(!nt||ut[1]>nt[0]&&ut[1]<nt[3])){_e.label=ut[1];break}if(ut[0]===6&&_e.label<nt[1]){_e.label=nt[1],nt=ut;break}if(nt&&_e.label<nt[2]){_e.label=nt[2],_e.ops.push(ut);break}nt[2]&&_e.ops.pop(),_e.trys.pop();continue}ut=we.call(We,_e)}catch(Ot){ut=[6,Ot],Xe=0}finally{Ne=nt=0}if(5&ut[0])throw ut[1];return{value:ut[0]?ut[1]:void 0,done:!0}}([tt,ht])}}}function Re(){for(var We=0,we=0,Ne=arguments.length;we<Ne;we++)We+=arguments[we].length;var Xe=Array(We),nt=0;for(we=0;we<Ne;we++)for(var Ie=arguments[we],_e=0,Ge=Ie.length;_e<Ge;_e++,nt++)Xe[nt]=Ie[_e];return Xe}var de=function(){function We(){}return We.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},We.setAttributes=function(we,Ne){for(var Xe=0,nt=Ne;Xe<nt.length;Xe++){var Ie=nt[Xe],_e=Ie[0],Ge=Ie[1];we.setAttribute(_e,Ge)}},We.createRect=function(we,Ne,Xe){var nt=document.createElementNS("http://www.w3.org/2000/svg","rect");return nt.setAttribute("width",we.toString()),nt.setAttribute("height",Ne.toString()),Xe&&We.setAttributes(nt,Xe),nt},We.createLine=function(we,Ne,Xe,nt,Ie){var _e=document.createElementNS("http://www.w3.org/2000/svg","line");return _e.setAttribute("x1",we.toString()),_e.setAttribute("y1",Ne.toString()),_e.setAttribute("x2",Xe.toString()),_e.setAttribute("y2",nt.toString()),Ie&&We.setAttributes(_e,Ie),_e},We.createPolygon=function(we,Ne){var Xe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Xe.setAttribute("points",we),Ne&&We.setAttributes(Xe,Ne),Xe},We.createCircle=function(we,Ne){var Xe=document.createElementNS("http://www.w3.org/2000/svg","circle");return Xe.setAttribute("cx",(we/2).toString()),Xe.setAttribute("cy",(we/2).toString()),Xe.setAttribute("r",we.toString()),Ne&&We.setAttributes(Xe,Ne),Xe},We.createEllipse=function(we,Ne,Xe){var nt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return nt.setAttribute("cx",(we/2).toString()),nt.setAttribute("cy",(Ne/2).toString()),nt.setAttribute("rx",(we/2).toString()),nt.setAttribute("ry",(Ne/2).toString()),Xe&&We.setAttributes(nt,Xe),nt},We.createGroup=function(we){var Ne=document.createElementNS("http://www.w3.org/2000/svg","g");return we&&We.setAttributes(Ne,we),Ne},We.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},We.createMarker=function(we,Ne,Xe,nt,Ie,_e,Ge){var tt=document.createElementNS("http://www.w3.org/2000/svg","marker");return We.setAttributes(tt,[["id",we],["orient",Ne],["markerWidth",Xe.toString()],["markerHeight",nt.toString()],["refX",Ie.toString()],["refY",_e.toString()]]),tt.appendChild(Ge),tt},We.createText=function(we){var Ne=document.createElementNS("http://www.w3.org/2000/svg","text");return Ne.setAttribute("x","0"),Ne.setAttribute("y","0"),we&&We.setAttributes(Ne,we),Ne},We.createTSpan=function(we,Ne){var Xe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Xe.textContent=we,Ne&&We.setAttributes(Xe,Ne),Xe},We.createImage=function(we){var Ne=document.createElementNS("http://www.w3.org/2000/svg","image");return we&&We.setAttributes(Ne,we),Ne},We.createPoint=function(we,Ne){var Xe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Xe.x=we,Xe.y=Ne,Xe},We.createPath=function(we,Ne){var Xe=document.createElementNS("http://www.w3.org/2000/svg","path");return Xe.setAttribute("d",we),Ne&&We.setAttributes(Xe,Ne),Xe},We}(),ve=function(){function We(){}return We.addKey=function(we){We.key=we},Object.defineProperty(We,"isLicensed",{get:function(){return!!We.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(We.key)},enumerable:!1,configurable:!0}),We}(),Ee=function(){function We(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return We.prototype.rasterize=function(we,Ne,Xe){var nt=this;return new Promise(function(Ie){var _e=Xe!==void 0?Xe:document.createElement("canvas");we===null&&(nt.markersOnly=!0,nt.naturalSize=!1);var Ge=document.createElementNS("http://www.w3.org/2000/svg","svg");Ge.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ge.setAttribute("width",Ne.width.baseVal.valueAsString),Ge.setAttribute("height",Ne.height.baseVal.valueAsString),Ge.setAttribute("viewBox","0 0 "+Ne.viewBox.baseVal.width.toString()+" "+Ne.viewBox.baseVal.height.toString()),Ge.innerHTML=Ne.innerHTML,nt.naturalSize===!0?(Ge.width.baseVal.value=we.naturalWidth,Ge.height.baseVal.value=we.naturalHeight):nt.width!==void 0&&nt.height!==void 0&&(Ge.width.baseVal.value=nt.width,Ge.height.baseVal.value=nt.height),_e.width=Ge.width.baseVal.value,_e.height=Ge.height.baseVal.value;var tt=Ge.outerHTML,ht=_e.getContext("2d");nt.markersOnly!==!0&&ht.drawImage(we,0,0,_e.width,_e.height);var ut=window.URL,Ot=new Image(_e.width,_e.height);Ot.setAttribute("crossOrigin","anonymous");var Et=new Blob([tt],{type:"image/svg+xml"}),Ft=ut.createObjectURL(Et);Ot.onload=function(){ht.drawImage(Ot,0,0),ut.revokeObjectURL(Ft);var qt=_e.toDataURL(nt.imageType,nt.imageQuality);Ie(qt)},Ot.src=Ft})},We}(),ke=function(){},Se=function(){function We(we){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+we+"_"}return Object.defineProperty(We.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(We.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(We.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),We.prototype.addClass=function(we){return this.styleSheet===void 0&&this.addStyleSheet(),we.name=""+this.classNamePrefix+we.localName,this.classes.push(we),this.styleSheet.sheet.insertRule("."+we.name+" {"+we.style+"}",this.styleSheet.sheet.cssRules.length),we},We.prototype.addRule=function(we){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(we),this.styleSheet.sheet.insertRule(we.selector+" {"+we.style+"}",this.styleSheet.sheet.cssRules.length)},We.prototype.addStyleSheet=function(){var we;this.styleSheet=document.createElement("style"),((we=this.styleSheetRoot)!==null&&we!==void 0?we:document.head).appendChild(this.styleSheet),this.addRule(new Ae("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ae("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Ae("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new me("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new me("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},We.prototype.removeStyleSheet=function(){var we;this.styleSheet&&(((we=this.styleSheetRoot)!==null&&we!==void 0?we:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},We}(),Ae=function(We,we){this.selector=We,this.style=we},me=function(We,we){this.localName=We,this.style=we},Pe=function(){function We(we,Ne,Xe,nt,Ie){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=we,this.displayMode=Ne,this.markerItems=Xe,this.uiStyleSettings=nt,this.styles=Ie,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return We.prototype.show=function(we){var Ne=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=we,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Xe=document.createElement("div");Xe.className=this.toolbarBlockStyleClass.name,Xe.style.whiteSpace="nowrap",this.uiContainer.appendChild(Xe),this.addActionButton(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Ie){var _e=document.createElement("div");_e.className=""+Ne.toolbarButtonStyleClass.name,_e.setAttribute("data-type-name",Ie.typeName),_e.innerHTML=Ie.icon,_e.addEventListener("click",function(){Ne.markerToolbarButtonClicked(_e,Ie)}),Ne.buttons.push(_e),Ne.markerButtons.push(_e)}),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 nt=document.createElement("div");nt.className=this.toolbarBlockStyleClass.name,nt.style.whiteSpace="nowrap",nt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(nt),this.addActionButton(nt,'<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(nt,'<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()},We.prototype.addButtonClickListener=function(we){this.buttonClickListeners.push(we)},We.prototype.removeButtonClickListener=function(we){this.buttonClickListeners.indexOf(we)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(we),1)},We.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},We.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var we=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Ne=0;Ne<this.markerButtons.length;Ne++)Ne<we||Ne===we&&this.markerButtons.length-1===we?this.markerButtonBlock.appendChild(this.markerButtons[Ne]):(Ne===we&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Ne]))}},We.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")},We.prototype.resetButtonStyles=function(){var we=this;this.buttons.forEach(function(Ne){Ne.className=Ne.className.replace(we.uiStyleSettings.toolbarButtonStyleColorsClassName?we.uiStyleSettings.toolbarButtonStyleColorsClassName:we.toolbarButtonStyleColorsClass.name,"").trim(),Ne.className=Ne.className.replace(we.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?we.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:we.toolbarActiveButtonStyleColorsClass.name,"").trim(),Ne.className+=" "+(we.uiStyleSettings.toolbarButtonStyleColorsClassName?we.uiStyleSettings.toolbarButtonStyleColorsClassName:we.toolbarButtonStyleColorsClass.name)})},We.prototype.addActionButton=function(we,Ne,Xe){var nt=this,Ie=document.createElement("div");switch(Ie.className=""+this.toolbarButtonStyleClass.name,Ie.innerHTML=Ne,Ie.setAttribute("data-action",Xe),Ie.addEventListener("click",function(){nt.actionToolbarButtonClicked(Ie,Xe)}),Xe){case"select":Ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ie.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ie.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ie.style.fill=this.uiStyleSettings.closeButtonColor}we.appendChild(Ie),this.buttons.push(Ie)},We.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new me("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 me("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new me("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new me("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 me("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var we=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new me("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*we)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*we)+`px;
|
|
padding: `+we+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new me("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Ae("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Ae("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},We.prototype.markerToolbarButtonClicked=function(we,Ne){this.setActiveButton(we),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Xe){return Xe("marker",Ne)}),this.markerButtonOverflowBlock.style.display="none"},We.prototype.actionToolbarButtonClicked=function(we,Ne){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Xe){return Xe("action",Ne)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},We.prototype.setActiveButton=function(we){this.resetButtonStyles(),we.className=we.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),we.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},We.prototype.setActiveMarkerButton=function(we){var Ne=this.markerButtons.find(function(Xe){return Xe.getAttribute("data-type-name")===we});Ne&&this.setActiveButton(Ne)},We.prototype.setCurrentMarker=function(we){var Ne=this;this.currentMarker=we,this.buttons.filter(function(Xe){return/delete|notes/.test(Xe.getAttribute("data-action"))}).forEach(function(Xe){Ne.currentMarker===void 0?(Xe.style.fillOpacity="0.4",Xe.style.pointerEvents="none"):(Xe.style.fillOpacity="1",Xe.style.pointerEvents="all")})},We}(),fe=function(){function We(we,Ne,Xe,nt){this.panels=[],this.panelButtons=[],this.markerjsContainer=we,this.displayMode=Ne,this.uiStyleSettings=Xe,this.styles=nt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return We.prototype.addStyles=function(){var we;this.toolboxStyleClass=this.styles.addClass(new me("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 me("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var Ne=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new me("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new me("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new me("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 me("toolbox-panel-row_colors",`
|
|
background-color: `+((we=this.uiStyleSettings.toolboxBackgroundColor)!==null&&we!==void 0?we:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new me("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
|
|
padding: `+Ne+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new me("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new Ae("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Ae("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},We.prototype.show=function(we){var Ne;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=we,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},We.prototype.setPanelButtons=function(we){var Ne,Xe,nt=this;this.panels=we,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Xe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Xe!==void 0?Xe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ie){var _e;Ie.uiStyleSettings=nt.uiStyleSettings;var Ge=document.createElement("div");Ge.className=nt.toolboxButtonStyleClass.name+" "+((_e=nt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_e!==void 0?_e:nt.toolboxButtonStyleColorsClass.name),Ge.innerHTML=Ie.icon,Ge.title=Ie.title,Ge.addEventListener("click",function(){nt.panelButtonClick(Ie)}),nt.panelButtons.push(Ge),nt.buttonRow.appendChild(Ge)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},We.prototype.panelButtonClick=function(we){var Ne=this,Xe=-1;if(we!==this.activePanel){Xe=this.panels.indexOf(we),this.panelRow.innerHTML="";var nt=we.getUi();nt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(nt),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=we}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Ne.displayMode==="inline"?Ne.panelRow.style.display="none":Ne.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ie,_e){var Ge,tt;Ie.className=Ne.toolboxButtonStyleClass.name+" "+(_e===Xe?""+((Ge=Ne.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ge!==void 0?Ge:Ne.toolboxActiveButtonStyleColorsClass.name):""+((tt=Ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&tt!==void 0?tt:Ne.toolboxButtonStyleColorsClass.name))})},We}(),z=function(We,we){this.title=We,this.icon=we},te=function(We){function we(Ne,Xe,nt,Ie){var _e=We.call(this,Ne,Ie||'<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 _e.colors=[],_e.addTransparent=!1,_e.colorBoxes=[],_e.colors=Xe,_e.currentColor=nt,_e.setCurrentColor=_e.setCurrentColor.bind(_e),_e.getColorBox=_e.getColorBox.bind(_e),_e}return Ut(we,We),we.prototype.getUi=function(){var Ne=this,Xe=document.createElement("div");return Xe.style.overflow="hidden",Xe.style.whiteSpace="nowrap",this.colors.forEach(function(nt){var Ie=Ne.getColorBox(nt);Xe.appendChild(Ie),Ne.colorBoxes.push(Ie)}),Xe},we.prototype.getColorBox=function(Ne){var Xe=this,nt=this.uiStyleSettings.toolbarHeight/4,Ie=this.uiStyleSettings.toolbarHeight-nt,_e=document.createElement("div");_e.style.display="inline-block",_e.style.boxSizing="content-box",_e.style.width=Ie-2+"px",_e.style.height=Ie-2+"px",_e.style.padding="1px",_e.style.marginRight="2px",_e.style.marginBottom="2px",_e.style.borderWidth="2px",_e.style.borderStyle="solid",_e.style.borderRadius=(Ie+2)/2+"px",_e.style.borderColor=Ne===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_e.addEventListener("click",function(){Xe.setCurrentColor(Ne,_e)});var Ge=document.createElement("div");return Ge.style.display="inline-block",Ge.style.width=Ie-2+"px",Ge.style.height=Ie-2+"px",Ge.style.backgroundColor=Ne,Ge.style.borderRadius=Ie/2+"px",Ne==="transparent"&&(Ge.style.fill=this.uiStyleSettings.toolboxAccentColor,Ge.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>`),_e.appendChild(Ge),_e},we.prototype.setCurrentColor=function(Ne,Xe){var nt=this;this.currentColor=Ne,this.colorBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Ne)},we}(z),se=function(){function We(we,Ne,Xe){this._state="new",this._isSelected=!1,this._container=we,this._overlayContainer=Ne,this.globalSettings=Xe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(We.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),We.prototype.ownsTarget=function(we){return!1},Object.defineProperty(We.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),We.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},We.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},We.prototype.pointerDown=function(we,Ne){},We.prototype.dblClick=function(we,Ne){},We.prototype.manipulate=function(we){},We.prototype.pointerUp=function(we){this.stateChanged()},We.prototype.dispose=function(){},We.prototype.addMarkerVisualToContainer=function(we){this.container.childNodes.length>0?this.container.insertBefore(we,this.container.childNodes[0]):this.container.appendChild(we)},We.prototype.getState=function(){return{typeName:We.typeName,state:this.state,notes:this.notes}},We.prototype.restoreState=function(we){this._state=we.state,this.notes=we.notes},We.prototype.scale=function(we,Ne){},We.prototype.colorChanged=function(we){this.onColorChanged&&this.onColorChanged(we),this.stateChanged()},We.prototype.fillColorChanged=function(we){this.onFillColorChanged&&this.onFillColorChanged(we),this.stateChanged()},We.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var we=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),we.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(we)&&this.onStateChanged(this)}},We.typeName="MarkerBase",We}(),ie=function(){function We(){this.findGripByVisual=this.findGripByVisual.bind(this)}return We.prototype.findGripByVisual=function(we){return this.topLeft.ownsTarget(we)?this.topLeft:this.topCenter.ownsTarget(we)?this.topCenter:this.topRight.ownsTarget(we)?this.topRight:this.centerLeft.ownsTarget(we)?this.centerLeft:this.centerRight.ownsTarget(we)?this.centerRight:this.bottomLeft.ownsTarget(we)?this.bottomLeft:this.bottomCenter.ownsTarget(we)?this.bottomCenter:this.bottomRight.ownsTarget(we)?this.bottomRight:void 0},We}(),le=function(){function We(){this.GRIP_SIZE=10,this.visual=de.createGroup(),this.visual.appendChild(de.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(de.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return We.prototype.ownsTarget=function(we){return we===this.visual||we===this.visual.childNodes[0]||we===this.visual.childNodes[1]},We}(),ce=function(){function We(){}return We.toITransformMatrix=function(we){return{a:we.a,b:we.b,c:we.c,d:we.d,e:we.e,f:we.f}},We.toSVGMatrix=function(we,Ne){return we.a=Ne.a,we.b=Ne.b,we.c=Ne.c,we.d=Ne.d,we.e=Ne.e,we.f=Ne.f,we},We}(),pe=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.left=0,Ie.top=0,Ie.width=0,Ie.height=0,Ie.defaultSize={x:50,y:20},Ie.offsetX=0,Ie.offsetY=0,Ie.rotationAngle=0,Ie.CB_DISTANCE=10,Ie._suppressMarkerCreateEvent=!1,Ie.container.transform.baseVal.appendItem(de.createTransform()),Ie.setupControlBox(),Ie}return Ut(we,We),Object.defineProperty(we.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"visual",{get:function(){return this._visual},set:function(Ne){this._visual=Ne;var Xe=de.createTransform();this._visual.transform.baseVal.appendItem(Xe)},enumerable:!1,configurable:!0}),we.prototype.ownsTarget=function(Ne){return!!We.prototype.ownsTarget.call(this,Ne)||!!(this.controlGrips.findGripByVisual(Ne)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ne))},we.prototype.pointerDown=function(Ne,Xe){We.prototype.pointerDown.call(this,Ne,Xe),this.state==="new"&&(this.left=Ne.x,this.top=Ne.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var nt=this.unrotatePoint(Ne);if(this.manipulationStartX=nt.x,this.manipulationStartY=nt.y,this.offsetX=nt.x-this.left,this.offsetY=nt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Xe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Xe)){this.activeGrip=this.rotatorGrip;var Ie=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ie.x-this.width/2,this.top=Ie.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var _e=this.container.transform.baseVal.getItem(0);_e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(_e,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},we.prototype.pointerUp=function(Ne){var Xe=this.state;We.prototype.pointerUp.call(this,Ne),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Ne),this._state="select",Xe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},we.prototype.moveVisual=function(Ne){this.visual.style.transform="translate("+Ne.x+"px, "+Ne.y+"px)"},we.prototype.manipulate=function(Ne){var Xe=this.unrotatePoint(Ne);this.state==="creating"?this.resize(Ne):this.state==="move"?(this.left=this.manipulationStartLeft+(Xe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Xe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Xe):this.state==="rotate"&&this.rotate(Ne)},we.prototype.resize=function(Ne){var Xe=this.manipulationStartLeft,nt=this.manipulationStartWidth,Ie=this.manipulationStartTop,_e=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Xe=this.manipulationStartLeft+Ne.x-this.manipulationStartX,nt=this.manipulationStartWidth+this.manipulationStartLeft-Xe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:nt=this.manipulationStartWidth+Ne.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ie=this.manipulationStartTop+Ne.y-this.manipulationStartY,_e=this.manipulationStartHeight+this.manipulationStartTop-Ie;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_e=this.manipulationStartHeight+Ne.y-this.manipulationStartY}nt>=0?(this.left=Xe,this.width=nt):(this.left=Xe+nt,this.width=-nt),_e>=0?(this.top=Ie,this.height=_e):(this.top=Ie+_e,this.height=-_e),this.setSize()},we.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},we.prototype.rotate=function(Ne){if(Math.abs(Ne.x-this.centerX)>.1){var Xe=Math.sign(Ne.x-this.centerX);this.rotationAngle=180*Math.atan((Ne.y-this.centerY)/(Ne.x-this.centerX))/Math.PI+90*Xe,this.applyRotation()}},we.prototype.applyRotation=function(){var Ne=this.container.transform.baseVal.getItem(0);Ne.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ne,0)},we.prototype.rotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var Xe=this.container.getCTM(),nt=de.createPoint(Ne.x,Ne.y);return{x:(nt=nt.matrixTransform(Xe)).x,y:nt.y}},we.prototype.unrotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var Xe=this.container.getCTM();Xe=Xe.inverse();var nt=de.createPoint(Ne.x,Ne.y);return{x:(nt=nt.matrixTransform(Xe)).x,y:nt.y}},we.prototype.select=function(){We.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},we.prototype.deselect=function(){We.prototype.deselect.call(this),this.controlBox.style.display="none"},we.prototype.setupControlBox=function(){this.controlBox=de.createGroup();var Ne=de.createTransform();Ne.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Ne),this.container.appendChild(this.controlBox),this.controlRect=de.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=de.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 ie,this.addControlGrips(),this.controlBox.style.display="none"},we.prototype.adjustControlBox=function(){var Ne=this.controlBox.transform.baseVal.getItem(0);Ne.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Ne,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()},we.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()},we.prototype.createGrip=function(){var Ne=new le;return Ne.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},we.prototype.positionGrips=function(){var Ne=this.controlGrips.topLeft.GRIP_SIZE,Xe=-Ne/2,nt=Xe,Ie=(this.width+this.CB_DISTANCE)/2-Ne/2,_e=(this.height+this.CB_DISTANCE)/2-Ne/2,Ge=this.height+this.CB_DISTANCE-Ne/2,tt=this.width+this.CB_DISTANCE-Ne/2;this.positionGrip(this.controlGrips.topLeft.visual,Xe,nt),this.positionGrip(this.controlGrips.topCenter.visual,Ie,nt),this.positionGrip(this.controlGrips.topRight.visual,tt,nt),this.positionGrip(this.controlGrips.centerLeft.visual,Xe,_e),this.positionGrip(this.controlGrips.centerRight.visual,tt,_e),this.positionGrip(this.controlGrips.bottomLeft.visual,Xe,Ge),this.positionGrip(this.controlGrips.bottomCenter.visual,Ie,Ge),this.positionGrip(this.controlGrips.bottomRight.visual,tt,Ge),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ie,nt-3*this.CB_DISTANCE)},we.prototype.positionGrip=function(Ne,Xe,nt){var Ie=Ne.transform.baseVal.getItem(0);Ie.setTranslate(Xe,nt),Ne.transform.baseVal.replaceItem(Ie,0)},we.prototype.hideControlBox=function(){this.controlBox.style.display="none"},we.prototype.showControlBox=function(){this.controlBox.style.display=""},we.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ce.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ce.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},We.prototype.getState.call(this))},we.prototype.restoreState=function(Ne){We.prototype.restoreState.call(this,Ne);var Xe=Ne;this.left=Xe.left,this.top=Xe.top,this.width=Xe.width,this.height=Xe.height,this.rotationAngle=Xe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ce.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Xe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ce.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Xe.containerTransformMatrix))},we.prototype.scale=function(Ne,Xe){We.prototype.scale.call(this,Ne,Xe);var nt=this.rotatePoint({x:this.left,y:this.top}),Ie=this.unrotatePoint({x:nt.x*Ne,y:nt.y*Xe});this.left=Ie.x,this.top=Ie.y,this.width=this.width*Ne,this.height=this.height*Xe,this.adjustControlBox()},we}(se),xe=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.opacity=1,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie}return Ut(we,We),we.prototype.ownsTarget=function(Ne){return!(!We.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},we.prototype.createVisual=function(){this.visual=de.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)},we.prototype.pointerDown=function(Ne,Xe){We.prototype.pointerDown.call(this,Ne,Xe),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},we.prototype.manipulate=function(Ne){We.prototype.manipulate.call(this,Ne)},we.prototype.resize=function(Ne){We.prototype.resize.call(this,Ne),this.setSize()},we.prototype.setSize=function(){We.prototype.setSize.call(this),de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},we.prototype.pointerUp=function(Ne){We.prototype.pointerUp.call(this,Ne),this.setSize()},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},we.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&de.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},we.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},We.prototype.getState.call(this))},we.prototype.restoreState=function(Ne){var Xe=Ne;this.fillColor=Xe.fillColor,this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.opacity=Xe.opacity,this.createVisual(),We.prototype.restoreState.call(this,Ne),this.setSize()},we.prototype.scale=function(Ne,Xe){We.prototype.scale.call(this,Ne,Xe),this.setSize()},we.title="Rectangle marker",we}(pe),je=function(We){function we(Ne,Xe,nt,Ie){var _e=We.call(this,Ne,Ie||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return _e.widths=[],_e.widthBoxes=[],_e.widths=Xe,_e.currentWidth=nt,_e.setCurrentWidth=_e.setCurrentWidth.bind(_e),_e}return Ut(we,We),we.prototype.getUi=function(){var Ne=this,Xe=document.createElement("div");return Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2",this.widths.forEach(function(nt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.flexGrow="2",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderColor=nt===Ne.currentWidth?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Ne.setCurrentWidth(nt,Ie)}),Xe.appendChild(Ie);var _e=document.createElement("div");_e.innerText=nt.toString(),_e.style.marginRight="5px",Ie.appendChild(_e);var Ge=document.createElement("div");Ge.style.minHeight="20px",Ge.style.flexGrow="2",Ge.style.display="flex",Ge.style.alignItems="center";var tt=document.createElement("hr");tt.style.minWidth="20px",tt.style.border="0px",tt.style.borderTop=nt+"px solid "+Ne.uiStyleSettings.toolboxColor,tt.style.flexGrow="2",Ge.appendChild(tt),Ie.appendChild(Ge),Ne.widthBoxes.push(Ie)}),Xe},we.prototype.setCurrentWidth=function(Ne,Xe){var nt=this;this.currentWidth=Ne,this.widthBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},we}(z),De=function(We){function we(Ne,Xe,nt,Ie){var _e=We.call(this,Ne,Ie||'<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 _e.styles=[],_e.styleBoxes=[],_e.styles=Xe,_e.currentStyle=nt,_e.setCurrentStyle=_e.setCurrentStyle.bind(_e),_e}return Ut(we,We),we.prototype.getUi=function(){var Ne=this,Xe=document.createElement("div");return Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2",this.styles.forEach(function(nt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.overflow="hidden",Ie.style.maxWidth=100/Ne.styles.length-5+"%",Ie.style.borderColor=nt===Ne.currentStyle?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Ne.setCurrentStyle(nt,Ie)}),Xe.appendChild(Ie);var _e=document.createElement("div");_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.overflow="hidden";var Ge=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Ne.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(nt!==""?'stroke-dasharray="'+nt+'"':"")+` />
|
|
</svg>`;_e.innerHTML=Ge,Ie.appendChild(_e),Ne.styleBoxes.push(Ie)}),Xe},we.prototype.setCurrentStyle=function(Ne,Xe){var nt=this;this.currentStyle=Ne,this.styleBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},we}(z),Fe=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.strokeColor=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.strokePanel=new te("Line color",nt.defaultColorSet,nt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Ut(we,We),Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=We.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.typeName="FrameMarker",we.title="Frame marker",we.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',we}(xe),Te=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"},Me=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.x1=0,Ie.y1=0,Ie.x2=0,Ie.y2=0,Ie.defaultLength=50,Ie.manipulationStartX=0,Ie.manipulationStartY=0,Ie.manipulationStartX1=0,Ie.manipulationStartY1=0,Ie.manipulationStartX2=0,Ie.manipulationStartY2=0,Ie.setupControlBox(),Ie}return Ut(we,We),we.prototype.ownsTarget=function(Ne){return!!We.prototype.ownsTarget.call(this,Ne)||!(!this.grip1.ownsTarget(Ne)&&!this.grip2.ownsTarget(Ne))},we.prototype.pointerDown=function(Ne,Xe){We.prototype.pointerDown.call(this,Ne,Xe),this.manipulationStartX=Ne.x,this.manipulationStartY=Ne.y,this.state==="new"&&(this.x1=Ne.x,this.y1=Ne.y,this.x2=Ne.x,this.y2=Ne.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(Xe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Xe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},we.prototype.pointerUp=function(Ne){var Xe=this.state;We.prototype.pointerUp.call(this,Ne),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(Ne),this._state="select",Xe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},we.prototype.adjustVisual=function(){},we.prototype.manipulate=function(Ne){this.state==="creating"?this.resize(Ne):this.state==="move"?(this.x1=this.manipulationStartX1+Ne.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Ne.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Ne.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Ne.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Ne)},we.prototype.resize=function(Ne){switch(this.activeGrip){case this.grip1:this.x1=Ne.x,this.y1=Ne.y;break;case this.grip2:case void 0:this.x2=Ne.x,this.y2=Ne.y}this.adjustVisual(),this.adjustControlBox()},we.prototype.select=function(){We.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},we.prototype.deselect=function(){We.prototype.deselect.call(this),this.controlBox.style.display="none"},we.prototype.setupControlBox=function(){this.controlBox=de.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},we.prototype.adjustControlBox=function(){this.positionGrips()},we.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},we.prototype.createGrip=function(){var Ne=new le;return Ne.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},we.prototype.positionGrips=function(){var Ne=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Ne/2,this.y1-Ne/2),this.positionGrip(this.grip2.visual,this.x2-Ne/2,this.y2-Ne/2)},we.prototype.positionGrip=function(Ne,Xe,nt){var Ie=Ne.transform.baseVal.getItem(0);Ie.setTranslate(Xe,nt),Ne.transform.baseVal.replaceItem(Ie,0)},we.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},We.prototype.getState.call(this))},we.prototype.restoreState=function(Ne){We.prototype.restoreState.call(this,Ne);var Xe=Ne;this.x1=Xe.x1,this.y1=Xe.y1,this.x2=Xe.x2,this.y2=Xe.y2},we.prototype.scale=function(Ne,Xe){We.prototype.scale.call(this,Ne,Xe),this.x1=this.x1*Ne,this.y1=this.y1*Xe,this.x2=this.x2*Ne,this.y2=this.y2*Xe,this.adjustVisual(),this.adjustControlBox()},we}(se),Be=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.strokeColor=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.strokePanel=new te("Line color",nt.defaultColorSet,nt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Ut(we,We),we.prototype.ownsTarget=function(Ne){return!(!We.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorLine&&Ne!==this.visibleLine)},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.selectorLine=de.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=de.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)},we.prototype.pointerDown=function(Ne,Xe){We.prototype.pointerDown.call(this,Ne,Xe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},we.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()),de.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),de.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),de.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},We.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){We.prototype.restoreState.call(this,Ne);var Xe=Ne;this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.createVisual(),this.adjustVisual()},we.typeName="LineMarker",we.title="Line marker",we.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',we}(Me),Ue=function(We){function we(Ne,Xe,nt,Ie){var _e=We.call(this,Ne,Ie||'<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 _e.fonts=[],_e.fontBoxes=[],_e.fonts=Xe,_e.currentFont=nt,_e.setCurrentFont=_e.setCurrentFont.bind(_e),_e}return Ut(we,We),we.prototype.getUi=function(){var Ne=this,Xe=document.createElement("div");return Xe.style.overflow="hidden",Xe.style.flexGrow="2",this.fonts.forEach(function(nt){var Ie=document.createElement("div");Ie.style.display="inline-block",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.overflow="hidden",Ie.style.maxWidth=100/Ne.fonts.length-5+"%",Ie.style.borderColor=nt===Ne.currentFont?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Ne.setCurrentFont(nt,Ie)}),Xe.appendChild(Ie);var _e=document.createElement("div");_e.style.display="flex",_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.fontFamily=nt,_e.style.overflow="hidden";var Ge=document.createElement("div");Ge.style.whiteSpace="nowrap",Ge.style.overflow="hidden",Ge.style.textOverflow="ellipsis",Ge.innerHTML="The quick brown fox jumps over the lazy dog",_e.appendChild(Ge),Ie.appendChild(_e),Ne.fontBoxes.push(Ie)}),Xe},we.prototype.setCurrentFont=function(Ne,Xe){var nt=this;this.currentFont=Ne,this.fontBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},we}(z),Ye=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.color="transparent",Ie.padding=5,Ie.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ie.text=Ie.DEFAULT_TEXT,Ie.isMoved=!1,Ie.color=nt.defaultColor,Ie.fontFamily=nt.defaultFontFamily,Ie.defaultSize={x:100,y:30},Ie.setColor=Ie.setColor.bind(Ie),Ie.setFont=Ie.setFont.bind(Ie),Ie.renderText=Ie.renderText.bind(Ie),Ie.sizeText=Ie.sizeText.bind(Ie),Ie.textEditDivClicked=Ie.textEditDivClicked.bind(Ie),Ie.showTextEditor=Ie.showTextEditor.bind(Ie),Ie.setSize=Ie.setSize.bind(Ie),Ie.positionTextEditor=Ie.positionTextEditor.bind(Ie),Ie.colorPanel=new te("Color",nt.defaultColorSet,nt.defaultColor),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.fontFamilyPanel=new Ue("Font",nt.defaultFontFamilies,nt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie}return Ut(we,We),we.prototype.ownsTarget=function(Ne){if(We.prototype.ownsTarget.call(this,Ne)||Ne===this.visual||Ne===this.textElement||Ne===this.bgRectangle)return!0;var Xe=!1;return this.textElement.childNodes.forEach(function(nt){nt===Ne&&(Xe=!0)}),Xe},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.bgRectangle=de.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=de.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(de.createTransform()),this.textElement.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},we.prototype.pointerDown=function(Ne,Xe){We.prototype.pointerDown.call(this,Ne,Xe),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},we.prototype.renderText=function(){var Ne=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(Xe){Ne.textElement.appendChild(de.createTSpan(Xe.trim()===""?" ":Xe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},we.prototype.getTextScale=function(){var Ne=this.textElement.getBBox(),Xe=1;if(Ne.width>0&&Ne.height>0){var nt=(1*this.width-this.width*this.padding*2/100)/Ne.width,Ie=(1*this.height-this.height*this.padding*2/100)/Ne.height;Xe=Math.min(nt,Ie)}return Xe},we.prototype.getTextPosition=function(Ne){var Xe=this.textElement.getBBox(),nt=0,Ie=0;return Xe.width>0&&Xe.height>0&&(nt=(this.width-Xe.width*Ne)/2,Ie=this.height/2-Xe.height*Ne/2),{x:nt,y:Ie}},we.prototype.sizeText=function(){var Ne=this.textElement.getBBox(),Xe=this.getTextScale(),nt=this.getTextPosition(Xe);nt.y-=Ne.y*Xe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+nt.x+"px, "+nt.y+"px) scale("+Xe+", "+Xe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(nt.x,nt.y),this.textElement.transform.baseVal.getItem(1).setScale(Xe,Xe))},we.prototype.manipulate=function(Ne){We.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},we.prototype.resize=function(Ne){We.prototype.resize.call(this,Ne),this.isMoved=!0,this.setSize(),this.sizeText()},we.prototype.setSize=function(){We.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},we.prototype.pointerUp=function(Ne){var Xe=this.state;Xe==="creating"&&(this._suppressMarkerCreateEvent=!0),We.prototype.pointerUp.call(this,Ne),this.setSize(),(Xe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},we.prototype.showTextEditor=function(){var Ne=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(Xe){Xe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Xe=Number.parseFloat(Ne.textEditor.style.fontSize);Ne.textEditor.clientWidth>=Number.parseInt(Ne.textEditor.style.maxWidth)&&Xe>.9;)Xe-=.1,Ne.textEditor.style.fontSize=Math.max(Xe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Xe){Xe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Xe){if(Xe.clipboardData){var nt=Xe.clipboardData.getData("text"),Ie=window.getSelection();if(!Ie.rangeCount)return!1;Ie.deleteFromDocument(),Ie.getRangeAt(0).insertNode(document.createTextNode(nt)),Xe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Ne.textEditDivClicked(Ne.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},we.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Ne=this.getTextScale(),Xe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),nt=this.textElement.getBBox(),Ie={x:nt.width*Ne,y:nt.height*Ne};Xe.x-=Ie.x/2,Xe.y-=Ie.y/2,this.textEditor.style.top=Xe.y+"px",this.textEditor.style.left=Xe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Xe.x+"px",this.textEditor.style.fontSize=Math.max(16*Ne,12)+"px",this.textElement.style.display="none"}},we.prototype.textEditDivClicked=function(Ne){this.text=Ne.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},we.prototype.select=function(){We.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},we.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),We.prototype.deselect.call(this)},we.prototype.dblClick=function(Ne,Xe){We.prototype.dblClick.call(this,Ne,Xe),this.showTextEditor()},we.prototype.setColor=function(Ne){this.textElement&&de.setAttributes(this.textElement,[["fill",Ne]]),this.color=Ne,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Ne)},we.prototype.setFont=function(Ne){this.textElement&&de.setAttributes(this.textElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},we.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},we.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},We.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){var Xe=Ne;this.color=Xe.color,this.fontFamily=Xe.fontFamily,this.padding=Xe.padding,this.text=Xe.text,this.createVisual(),We.prototype.restoreState.call(this,Ne),this.setSize()},we.prototype.scale=function(Ne,Xe){We.prototype.scale.call(this,Ne,Xe),this.setSize(),this.sizeText(),this.positionTextEditor()},we.typeName="TextMarker",we.title="Text marker",we.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>',we}(pe),Ve=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.color="transparent",Ie.lineWidth=3,Ie.drawing=!1,Ie.pixelRatio=1,Ie.color=nt.defaultColor,Ie.lineWidth=nt.defaultStrokeWidth,Ie.pixelRatio=nt.freehandPixelRatio,Ie.setColor=Ie.setColor.bind(Ie),Ie.addCanvas=Ie.addCanvas.bind(Ie),Ie.finishCreation=Ie.finishCreation.bind(Ie),Ie.setLineWidth=Ie.setLineWidth.bind(Ie),Ie.colorPanel=new te("Color",nt.defaultColorSet,nt.defaultColor),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.lineWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.lineWidthPanel.onWidthChanged=Ie.setLineWidth,Ie}return Ut(we,We),we.prototype.ownsTarget=function(Ne){return!(!We.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.drawingImage)},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.drawingImage=de.createImage(),this.visual.appendChild(this.drawingImage);var Ne=de.createTransform();this.visual.transform.baseVal.appendItem(Ne),this.addMarkerVisualToContainer(this.visual)},we.prototype.pointerDown=function(Ne,Xe){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(Ne.x,Ne.y),this.drawing=!0):We.prototype.pointerDown.call(this,Ne,Xe)},we.prototype.manipulate=function(Ne){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Ne.x,Ne.y),this.canvasContext.stroke()):We.prototype.manipulate.call(this,Ne)},we.prototype.resize=function(Ne){We.prototype.resize.call(this,Ne),de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},we.prototype.pointerUp=function(Ne){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):We.prototype.pointerUp.call(this,Ne)},we.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)},we.prototype.select=function(){this.state==="creating"&&this.finishCreation(),We.prototype.select.call(this)},we.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),We.prototype.deselect.call(this)},we.prototype.finishCreation=function(){for(var Ne=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Xe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],nt=Xe[0],Ie=Xe[1],_e=Xe[2],Ge=Xe[3],tt=!1,ht=0;ht<this.canvasElement.height;ht++)for(var ut=0;ut<this.canvasElement.width;ut++)Ne.data[ht*this.canvasElement.width*4+4*ut+3]>0&&(tt=!0,ht<Ie&&(Ie=ht),ut<nt&&(nt=ut),ht>Ge&&(Ge=ht),ut>_e&&(_e=ut));if(tt){this.left=nt/this.pixelRatio,this.top=Ie/this.pixelRatio,this.width=(_e-nt)/this.pixelRatio,this.height=(Ge-Ie)/this.pixelRatio;var Ot=document.createElement("canvas");Ot.width=_e-nt,Ot.height=Ge-Ie,Ot.getContext("2d").putImageData(this.canvasContext.getImageData(nt,Ie,_e-nt,Ge-Ie),0,0),this.drawingImgUrl=Ot.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},we.prototype.setDrawingImage=function(){de.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},we.prototype.setColor=function(Ne){this.color=Ne,this.colorChanged(Ne)},we.prototype.setLineWidth=function(Ne){this.lineWidth=Ne},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({drawingImgUrl:this.drawingImgUrl},We.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){this.createVisual(),We.prototype.restoreState.call(this,Ne),this.drawingImgUrl=Ne.drawingImgUrl,this.setDrawingImage()},we.prototype.scale=function(Ne,Xe){We.prototype.scale.call(this,Ne,Xe),this.setDrawingImage()},we.typeName="FreehandMarker",we.title="Freehand marker",we.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>',we}(pe),Ze=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,nt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ie.typeBoxes=[],Ie.currentType=Xe,Ie.setCurrentType=Ie.setCurrentType.bind(Ie),Ie}return Ut(we,We),we.prototype.getUi=function(){var Ne=this,Xe=document.createElement("div");Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2";for(var nt=function(Ge){var tt="both";switch(Ge){case 0:tt="both";break;case 1:tt="start";break;case 2:tt="end";break;case 3:tt="none"}var ht=document.createElement("div");if(ht.style.display="flex",ht.style.flexGrow="2",ht.style.alignItems="center",ht.style.justifyContent="space-between",ht.style.padding="5px",ht.style.borderWidth="2px",ht.style.borderStyle="solid",ht.style.borderColor=tt===Ie.currentType?Ie.uiStyleSettings.toolboxAccentColor:"transparent",ht.addEventListener("click",function(){Ne.setCurrentType(tt,ht)}),Xe.appendChild(ht),tt==="both"||tt==="start"){var ut=document.createElement("div");ut.style.display="flex",ut.style.alignItems="center",ut.style.minHeight="20px",ut.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="`+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,ut.style.marginLeft="5px",ht.appendChild(ut)}var Ot=document.createElement("div");Ot.style.display="flex",Ot.style.alignItems="center",Ot.style.minHeight="20px",Ot.style.flexGrow="2";var Et=document.createElement("hr");if(Et.style.minWidth="20px",Et.style.border="0px",Et.style.borderTop="3px solid "+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee"),Et.style.flexGrow="2",Ot.appendChild(Et),ht.appendChild(Ot),tt==="both"||tt==="end"){var Ft=document.createElement("div");Ft.style.display="flex",Ft.style.alignItems="center",Ft.style.minHeight="20px",Ft.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="`+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Ft.style.marginRight="5px",ht.appendChild(Ft)}Ie.typeBoxes.push(ht)},Ie=this,_e=0;_e<4;_e++)nt(_e);return Xe},we.prototype.setCurrentType=function(Ne,Xe){var nt=this;this.currentType=Ne,this.typeBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?nt.uiStyleSettings!==void 0?nt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},we}(z),ot=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.arrowType="end",Ie.arrowBaseHeight=10,Ie.arrowBaseWidth=10,Ie.getArrowPoints=Ie.getArrowPoints.bind(Ie),Ie.setArrowType=Ie.setArrowType.bind(Ie),Ie.arrowTypePanel=new Ze("Arrow type","end"),Ie.arrowTypePanel.onArrowTypeChanged=Ie.setArrowType,Ie}return Ut(we,We),we.prototype.ownsTarget=function(Ne){return!(!We.prototype.ownsTarget.call(this,Ne)&&Ne!==this.arrow1&&Ne!==this.arrow2)},we.prototype.getArrowPoints=function(Ne,Xe){var nt=this.arrowBaseWidth+2*this.strokeWidth,Ie=this.arrowBaseHeight+2*this.strokeWidth;return Ne-nt/2+","+(Xe+Ie/2)+" "+Ne+","+(Xe-Ie/2)+" "+(Ne+nt/2)+","+(Xe+Ie/2)},we.prototype.createTips=function(){this.arrow1=de.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=de.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.arrow2)},we.prototype.pointerDown=function(Ne,Xe){We.prototype.pointerDown.call(this,Ne,Xe),this.state==="creating"&&this.createTips()},we.prototype.adjustVisual=function(){if(We.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",de.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),de.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Ne=0;Math.abs(this.x1-this.x2)>.1&&(Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Xe=this.arrow1.transform.baseVal.getItem(0);Xe.setRotate(Ne,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Xe,0);var nt=this.arrow2.transform.baseVal.getItem(0);nt.setRotate(Ne+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(nt,0)}},we.prototype.setArrowType=function(Ne){this.arrowType=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({arrowType:this.arrowType},We.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){We.prototype.restoreState.call(this,Ne);var Xe=Ne;this.arrowType=Xe.arrowType,this.createTips(),this.adjustVisual()},we.typeName="ArrowMarker",we.title="Arrow marker",we.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',we}(Be),lt=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.fillColor=nt.defaultFillColor,Ie.strokeWidth=0,Ie.fillPanel=new te("Color",nt.defaultColorSet,nt.defaultFillColor),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie}return Ut(we,We),Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=We.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.typeName="CoverMarker",we.title="Cover marker",we.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',we}(xe),ft=function(We){function we(Ne,Xe,nt,Ie){var _e=We.call(this,Ne,Ie||'<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 _e.opacities=[],_e.opacityBoxes=[],_e.opacities=Xe,_e.currentOpacity=nt,_e.setCurrentOpacity=_e.setCurrentOpacity.bind(_e),_e}return Ut(we,We),we.prototype.getUi=function(){var Ne=this,Xe=document.createElement("div");return Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2",Xe.style.justifyContent="space-between",this.opacities.forEach(function(nt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.alignItems="center",Ie.style.justifyContent="center",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderColor=nt===Ne.currentOpacity?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Ne.setCurrentOpacity(nt,Ie)}),Xe.appendChild(Ie);var _e=document.createElement("div");_e.innerText=100*nt+"%",Ie.appendChild(_e),Ne.opacityBoxes.push(Ie)}),Xe},we.prototype.setCurrentOpacity=function(Ne,Xe){var nt=this;this.currentOpacity=Ne,this.opacityBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},we}(z),St=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.setOpacity=Ie.setOpacity.bind(Ie),Ie.fillColor=nt.defaultHighlightColor,Ie.strokeWidth=0,Ie.opacity=nt.defaultHighlightOpacity,Ie.fillPanel=new te("Color",nt.defaultColorSet,Ie.fillColor),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.opacityPanel=new ft("Opacity",nt.defaultOpacitySteps,Ie.opacity),Ie.opacityPanel.onOpacityChanged=Ie.setOpacity,Ie}return Ut(we,We),we.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&de.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=We.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.typeName="HighlightMarker",we.title="Highlight marker",we.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>',we}(lt),qe='<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>',rt='<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>',wt=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.bgColor="transparent",Ie.tipPosition={x:0,y:0},Ie.tipBase1Position={x:0,y:0},Ie.tipBase2Position={x:0,y:0},Ie.tipMoving=!1,Ie.color=nt.defaultStrokeColor,Ie.bgColor=nt.defaultFillColor,Ie.fontFamily=nt.defaultFontFamily,Ie.defaultSize={x:100,y:30},Ie.setBgColor=Ie.setBgColor.bind(Ie),Ie.getTipPoints=Ie.getTipPoints.bind(Ie),Ie.positionTip=Ie.positionTip.bind(Ie),Ie.setTipPoints=Ie.setTipPoints.bind(Ie),Ie.colorPanel=new te("Text color",nt.defaultColorSet,Ie.color,qe),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.bgColorPanel=new te("Fill color",nt.defaultColorSet,Ie.bgColor,rt),Ie.bgColorPanel.onColorChanged=Ie.setBgColor,Ie.fontFamilyPanel=new Ue("Font",nt.defaultFontFamilies,nt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie.tipGrip=new le,Ie.tipGrip.visual.transform.baseVal.appendItem(de.createTransform()),Ie.controlBox.appendChild(Ie.tipGrip.visual),Ie}return Ut(we,We),we.prototype.ownsTarget=function(Ne){return We.prototype.ownsTarget.call(this,Ne)||this.tipGrip.ownsTarget(Ne)||this.tip===Ne},we.prototype.createTip=function(){de.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=de.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},we.prototype.pointerDown=function(Ne,Xe){this.state==="new"&&We.prototype.pointerDown.call(this,Ne,Xe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Xe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):We.prototype.pointerDown.call(this,Ne,Xe)},we.prototype.pointerUp=function(Ne){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,We.prototype.pointerUp.call(this,Ne);else{var Xe=this.state==="creating";We.prototype.pointerUp.call(this,Ne),this.setTipPoints(Xe),this.positionTip()}},we.prototype.manipulate=function(Ne){if(this.tipMoving){var Xe=this.unrotatePoint(Ne);this.tipPosition={x:Xe.x-this.manipulationStartLeft,y:Xe.y-this.manipulationStartTop},this.positionTip()}else We.prototype.manipulate.call(this,Ne)},we.prototype.setBgColor=function(Ne){this.bgRectangle&&this.tip&&(de.setAttributes(this.bgRectangle,[["fill",Ne]]),de.setAttributes(this.tip,[["fill",Ne]])),this.bgColor=Ne,this.fillColorChanged(Ne)},we.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},we.prototype.setTipPoints=function(Ne){Ne===void 0&&(Ne=!1);var Xe=Math.min(this.height/2,15),nt=this.height/5;Ne&&(this.tipPosition={x:Xe+nt/2,y:this.height+20});var Ie=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ie<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(nt=this.width/5,Xe=Math.min(this.width/2,15),this.tipBase1Position={x:Xe,y:0},this.tipBase2Position={x:Xe+nt,y:0}):(this.tipBase1Position={x:0,y:Xe},this.tipBase2Position={x:0,y:Xe+nt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ie<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(nt=this.width/5,Xe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Xe-nt,y:0},this.tipBase2Position={x:this.width-Xe,y:0}):(this.tipBase1Position={x:this.width,y:Xe},this.tipBase2Position={x:this.width,y:Xe+nt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ie<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(nt=this.width/5,Xe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Xe-nt,y:this.height},this.tipBase2Position={x:this.width-Xe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Xe-nt},this.tipBase2Position={x:this.width,y:this.height-Xe}):Ie<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(nt=this.width/5,Xe=Math.min(this.width/2,15),this.tipBase1Position={x:Xe,y:this.height},this.tipBase2Position={x:Xe+nt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Xe},this.tipBase2Position={x:0,y:this.height-Xe-nt})},we.prototype.resize=function(Ne){We.prototype.resize.call(this,Ne),this.positionTip()},we.prototype.positionTip=function(){de.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Ne=this.tipGrip.visual.transform.baseVal.getItem(0);Ne.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Ne,0)},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),we.prototype.select=function(){this.positionTip(),We.prototype.select.call(this)},we.prototype.getState=function(){var Ne=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},We.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){var Xe=Ne;this.bgColor=Xe.bgColor,this.tipPosition=Xe.tipPosition,We.prototype.restoreState.call(this,Ne),this.createTip(),this.setTipPoints()},we.prototype.scale=function(Ne,Xe){We.prototype.scale.call(this,Ne,Xe),this.tipPosition={x:this.tipPosition.x*Ne,y:this.tipPosition.y*Xe},this.positionTip()},we.typeName="CalloutMarker",we.title="Callout marker",we.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>',we}(Ye),Ct=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.opacity=1,Ie.strokeColor=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.fillColor=nt.defaultFillColor,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.setOpacity=Ie.setOpacity.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie.strokePanel=new te("Line color",Re(nt.defaultColorSet,["transparent"]),nt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.fillPanel=new te("Fill color",Re(nt.defaultColorSet,["transparent"]),Ie.fillColor,rt),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie.opacityPanel=new ft("Opacity",nt.defaultOpacitySteps,Ie.opacity),Ie.opacityPanel.onOpacityChanged=Ie.setOpacity,Ie}return Ut(we,We),we.prototype.ownsTarget=function(Ne){return!(!We.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},we.prototype.createVisual=function(){this.visual=de.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)},we.prototype.pointerDown=function(Ne,Xe){We.prototype.pointerDown.call(this,Ne,Xe),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},we.prototype.manipulate=function(Ne){We.prototype.manipulate.call(this,Ne)},we.prototype.resize=function(Ne){We.prototype.resize.call(this,Ne),this.setSize()},we.prototype.setSize=function(){We.prototype.setSize.call(this),de.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},we.prototype.pointerUp=function(Ne){We.prototype.pointerUp.call(this,Ne),this.setSize()},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},we.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&de.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},we.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&de.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},We.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){var Xe=Ne;this.fillColor=Xe.fillColor,this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.opacity=Xe.opacity,this.createVisual(),We.prototype.restoreState.call(this,Ne),this.setSize()},we.prototype.scale=function(Ne,Xe){We.prototype.scale.call(this,Ne,Xe),this.setSize()},we.typeName="EllipseMarker",we.title="Ellipse marker",we.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>',we}(pe),bt=function(We){function we(Ne,Xe,nt){return We.call(this,Ne,Xe,nt)||this}return Ut(we,We),Object.defineProperty(we.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),we.prototype.ownsTarget=function(Ne){return!(!We.prototype.ownsTarget.call(this,Ne)&&Ne!==this.tip1&&Ne!==this.tip2)},we.prototype.createTips=function(){this.tip1=de.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(de.createTransform()),this.visual.appendChild(this.tip1),this.tip2=de.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(de.createTransform()),this.visual.appendChild(this.tip2)},we.prototype.pointerDown=function(Ne,Xe){We.prototype.pointerDown.call(this,Ne,Xe),this.state==="creating"&&this.createTips()},we.prototype.adjustVisual=function(){if(We.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(de.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()]]),de.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 Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Xe=this.tip1.transform.baseVal.getItem(0);Xe.setRotate(Ne,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Xe,0);var nt=this.tip2.transform.baseVal.getItem(0);nt.setRotate(Ne+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(nt,0)}},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=We.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){We.prototype.restoreState.call(this,Ne),this.createTips(),this.adjustVisual()},we.typeName="MeasurementMarker",we.title="Measurement marker",we.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>',we}(Be),ct=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.strokePanel.colors=nt.defaultColorSet,Ie.fillColor="transparent",Ie}return Ut(we,We),Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=We.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.typeName="EllipseFrameMarker",we.title="Ellipse frame marker",we.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>',we}(Ct),xt=function(){function We(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(We.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),We.prototype.addUndoStep=function(we){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(we)||(this.undoStack.push(we),JSON.stringify(this.lastRedoStep)!==JSON.stringify(we)&&this.redoStack.splice(0,this.redoStack.length))},We.prototype.replaceLastUndoStep=function(we){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=we)},We.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},We.prototype.undo=function(){if(this.undoStack.length>1){var we=this.undoStack.pop();return we!==void 0&&this.redoStack.push(we),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},We.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},We}(),dt=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.curveX=0,Ie.curveY=0,Ie.manipulationStartCurveX=0,Ie.manipulationStartCurveY=0,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.positionGrips=Ie.positionGrips.bind(Ie),Ie.addControlGrips=Ie.addControlGrips.bind(Ie),Ie.adjustVisual=Ie.adjustVisual.bind(Ie),Ie.setupControlBox=Ie.setupControlBox.bind(Ie),Ie.resize=Ie.resize.bind(Ie),Ie.strokeColor=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.strokePanel=new te("Line color",nt.defaultColorSet,nt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Ut(we,We),we.prototype.ownsTarget=function(Ne){return!(!We.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorCurve&&Ne!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ne))},we.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.selectorCurve=de.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=de.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)},we.prototype.pointerDown=function(Ne,Xe){We.prototype.pointerDown.call(this,Ne,Xe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Ne.x,this.curveY=Ne.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Xe)&&(this.activeGrip=this.curveGrip,this._state="resize")},we.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),de.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),de.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),de.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},we.prototype.setupControlBox=function(){We.prototype.setupControlBox.call(this),this.curveControlLine1=de.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=de.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)},we.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,We.prototype.addControlGrips.call(this)},we.prototype.positionGrips=function(){We.prototype.positionGrips.call(this);var Ne=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Ne/2,this.curveY-Ne/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()))},we.prototype.manipulate=function(Ne){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Ne.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Ne.y-this.manipulationStartY),We.prototype.manipulate.call(this,Ne)},we.prototype.resize=function(Ne){this.activeGrip===this.curveGrip&&(this.curveX=Ne.x,this.curveY=Ne.y),We.prototype.resize.call(this,Ne),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual()},we.prototype.scale=function(Ne,Xe){this.curveX=this.curveX*Ne,this.curveY=this.curveY*Xe,We.prototype.scale.call(this,Ne,Xe)},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},We.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){We.prototype.restoreState.call(this,Ne);var Xe=Ne;this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.curveX=Xe.curveX,this.curveY=Xe.curveY,this.createVisual(),this.adjustVisual()},we.typeName="CurveMarker",we.title="Curve marker",we.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>',we}(Me),Mt=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,Xe,nt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.textColor="transparent",Ie.fontSize="1rem",Ie.isMoved=!1,Ie.captionText="Caption",Ie.PADDING=5,Ie.captionBoxWidth=0,Ie.captionBoxHeight=0,Ie.strokeColor=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.fillColor=nt.defaultFillColor,Ie.textColor=nt.defaultStrokeColor,Ie.fontFamily=nt.defaultFontFamily,Ie.fontSize=nt.defaultCaptionFontSize,Ie.captionText=nt.defaultCaptionText,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie.sizeCaption=Ie.sizeCaption.bind(Ie),Ie.setCaptionText=Ie.setCaptionText.bind(Ie),Ie.showTextEditor=Ie.showTextEditor.bind(Ie),Ie.positionTextEditor=Ie.positionTextEditor.bind(Ie),Ie.finishTextEditing=Ie.finishTextEditing.bind(Ie),Ie.setFont=Ie.setFont.bind(Ie),Ie.setTextColor=Ie.setTextColor.bind(Ie),Ie.strokePanel=new te("Line color",Re(nt.defaultColorSet,["transparent"]),Ie.strokeColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.fillPanel=new te("Fill color",Re(nt.defaultColorSet,["transparent"]),Ie.fillColor,rt),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie.fontFamilyPanel=new Ue("Font",nt.defaultFontFamilies,nt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie.textColorPanel=new te("Text color",nt.defaultColorSet,Ie.textColor,qe),Ie.textColorPanel.onColorChanged=Ie.setTextColor,Ie}return Ut(we,We),we.prototype.ownsTarget=function(Ne){return!(!We.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.frame&&Ne!==this.captionBg&&Ne!==this.captionElement)},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=de.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=de.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=de.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()},we.prototype.setCaptionText=function(Ne){this.captionText=Ne,this.captionElement.textContent=this.captionText,this.sizeCaption()},we.prototype.pointerDown=function(Ne,Xe){We.prototype.pointerDown.call(this,Ne,Xe),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},we.prototype.manipulate=function(Ne){We.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},we.prototype.resize=function(Ne){We.prototype.resize.call(this,Ne),this.setSize()},we.prototype.sizeCaption=function(){var Ne=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Ne.width+2*this.PADDING,this.captionBoxHeight=Ne.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),de.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')"]]),de.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')"]])},we.prototype.showTextEditor=function(){var Ne=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(Xe){Xe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Xe){Xe.key==="Enter"&&Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Xe){Xe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},we.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"))},we.prototype.finishTextEditing=function(Ne){this.setCaptionText(Ne.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},we.prototype.setFont=function(Ne){this.captionElement&&de.setAttributes(this.captionElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},we.prototype.setTextColor=function(Ne){this.captionElement&&de.setAttributes(this.captionElement,[["fill",Ne]]),this.textColor=Ne,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},we.prototype.setSize=function(){We.prototype.setSize.call(this),de.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},we.prototype.pointerUp=function(Ne){We.prototype.pointerUp.call(this,Ne),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},we.prototype.dblClick=function(Ne,Xe){We.prototype.dblClick.call(this,Ne,Xe),this.showTextEditor()},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.frame&&de.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},we.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.captionBg&&de.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.frame&&de.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.frame&&de.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=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},We.prototype.getState.call(this));return Ne.typeName=this.typeName,Ne},we.prototype.restoreState=function(Ne){var Xe=Ne;this.fillColor=Xe.fillColor,this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.textColor=Xe.textColor,this.fontFamily=Xe.fontFamily,this.captionText=Xe.captionText,this.fontSize=Xe.fontSize,this.createVisual(),We.prototype.restoreState.call(this,Ne),this.setSize()},we.prototype.scale=function(Ne,Xe){We.prototype.scale.call(this,Ne,Xe),this.setSize()},we.typeName="CaptionFrameMarker",we.title="Caption frame marker",we.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>',we}(pe),yt=function(){function We(we,Ne){Ne===void 0&&(Ne=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=we,this.cancelable=Ne}return Object.defineProperty(We.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),We.prototype.preventDefault=function(){this._defaultPrevented=!0},We}(),Dt=function(We){function we(Ne,Xe,nt){var Ie=We.call(this,Ne,!1)||this;return Ie.dataUrl=Xe,Ie.state=nt,Ie}return Ut(we,We),we}(yt),mt=function(We){function we(Ne,Xe,nt){nt===void 0&&(nt=!1);var Ie=We.call(this,Ne,nt)||this;return Ie.marker=Xe,Ie}return Ut(we,We),we}(yt),vt=function(){function We(){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 We.prototype.addEventListener=function(we,Ne){this[we].push(Ne)},We.prototype.removeEventListener=function(we,Ne){var Xe=this[we].indexOf(Ne);Xe>-1&&this[we].splice(Xe,1)},We}(),et=function(){function We(we){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Te,this._isOpen=!1,this.undoRedoManager=new xt,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 vt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=We.instanceCounter++,this.styles=new Se(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=we,this.targetRoot=document.body,this.width=we.clientWidth,this.height=we.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(We.prototype,"ALL_MARKER_TYPES",{get:function(){return[Fe,Ve,ot,Ye,ct,Ct,St,wt,bt,lt,Be,dt,Mt]},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Fe,Ve,ot,Ye,Ct,St,wt]},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Fe,Ve,ot,Ye,St]},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(we){var Ne=this;this._availableMarkerTypes.splice(0),we.forEach(function(Xe){if(typeof Xe=="string"){var nt=Ne.ALL_MARKER_TYPES.find(function(Ie){return Ie.typeName===Xe});nt!==void 0&&Ne._availableMarkerTypes.push(nt)}else Ne._availableMarkerTypes.push(Xe)})},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(we){this._zoomLevel=we,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(We.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),We.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ve.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},We.prototype.show=function(){var we=this;this.styles.styleSheetRoot===void 0&&ke.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ke.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Ne){return Ne(new yt(we))})},We.prototype.render=function(){return oe(this,void 0,void 0,function(){var we;return He(this,function(Ne){switch(Ne.label){case 0:return this.setCurrentMarker(),(we=new Ee).naturalSize=this.renderAtNaturalSize,we.imageType=this.renderImageType,we.imageQuality=this.renderImageQuality,we.markersOnly=this.renderMarkersOnly,we.width=this.renderWidth,we.height=this.renderHeight,[4,we.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Ne.sent(),[4,we.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ne.sent()]}})})},We.prototype.close=function(we){var Ne=this;if(we===void 0&&(we=!1),this.isOpen){var Xe=!1;we||this.eventListeners.beforeclose.forEach(function(nt){var Ie=new yt(Ne,!0);nt(Ie),Ie.defaultPrevented&&(Xe=!0)}),Xe||(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(nt){return nt(new yt(Ne))}),this.detachEvents(),this._isOpen=!1)}},We.prototype.addMarkersToToolbar=function(){for(var we,Ne=[],Xe=0;Xe<arguments.length;Xe++)Ne[Xe]=arguments[Xe];(we=this._availableMarkerTypes).push.apply(we,Ne)},We.prototype.addRenderEventListener=function(we){this.addEventListener("render",function(Ne){we(Ne.dataUrl,Ne.state)})},We.prototype.removeRenderEventListener=function(we){},We.prototype.addCloseEventListener=function(we){this.addEventListener("close",function(){we()})},We.prototype.removeCloseEventListener=function(we){},We.prototype.setupResizeObserver=function(){var we=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){we.resize(we.target.clientWidth,we.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return we.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},We.prototype.onPopupTargetResize=function(){var we=1*this.target.clientWidth/this.target.clientHeight,Ne=this.editorCanvas.clientWidth/we>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*we:this.editorCanvas.clientWidth,Xe=Ne<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/we;this.resize(Ne,Xe)},We.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},We.prototype.resize=function(we,Ne){this._isResizing=!0;var Xe=we/this.imageWidth,nt=Ne/this.imageHeight;this.imageWidth=Math.round(we),this.imageHeight=Math.round(Ne),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(Xe,nt),this._isResizing=!1},We.prototype.scaleMarkers=function(we,Ne){var Xe,nt=this;this._currentMarker&&this._currentMarker instanceof Ye?this._currentMarker.scale(we,Ne):(Xe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ie){Ie!==nt._currentMarker&&Ie.scale(we,Ne)}),Xe!==void 0&&this.setCurrentMarker(Xe)},We.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"},We.prototype.setTopLeft=function(){var we=this.editingTarget.getBoundingClientRect(),Ne=this.editorCanvas.getBoundingClientRect();this.left=we.left-Ne.left,this.top=we.top-Ne.top},We.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)},We.prototype.addDefs=function(){for(var we,Ne=[],Xe=0;Xe<arguments.length;Xe++)Ne[Xe]=arguments[Xe];this.defs=de.createDefs(),this.addDefsToImage(),(we=this.defs).append.apply(we,Ne)},We.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},We.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)},We.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},We.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},We.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)},We.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},We.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)},We.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 we=document.createElement("a");we.href="https://markerjs.com/",we.target="_blank",we.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>',we.title="Powered by marker.js",we.style.display="grid",we.style.alignItems="center",we.style.justifyItems="center",we.style.padding="3px",we.style.width="20px",we.style.height="20px",this.logoUI.appendChild(we),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},We.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")},We.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"},We.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},We.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 we=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=we+"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 Pe(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 fe(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},We.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},We.prototype.removeMarker=function(we){this.markerImage.removeChild(we.container),this.markers.indexOf(we)>-1&&this.markers.splice(this.markers.indexOf(we),1),we.dispose()},We.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())},We.prototype.toolbarButtonClicked=function(we,Ne){if(we==="marker"&&Ne!==void 0)this.createNewMarker(Ne);else if(we==="action")switch(Ne){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()}},We.prototype.deleteSelectedMarker=function(){var we=this;if(this._currentMarker!==void 0){var Ne=!1;if(this.eventListeners.markerbeforedelete.forEach(function(nt){var Ie=new mt(we,we._currentMarker,!0);nt(Ie),Ie.defaultPrevented&&(Ne=!0)}),!Ne){var Xe=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(nt){return nt(new mt(we,Xe))})}}},We.prototype.clear=function(){var we=this,Ne=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_e){var Ge=new mt(we,void 0,!0);_e(Ge),Ge.defaultPrevented&&(Ne=!0)}),!Ne)){this.setCurrentMarker();for(var Xe=function(_e){var Ge=nt.markers[_e];nt.setCurrentMarker(nt.markers[_e]),nt._currentMarker.dispose(),nt.markerImage.removeChild(nt._currentMarker.container),nt.markers.splice(nt.markers.indexOf(nt._currentMarker),1),nt.eventListeners.markerdelete.forEach(function(tt){return tt(new mt(we,Ge))})},nt=this,Ie=this.markers.length-1;Ie>=0;Ie--)Xe(Ie);this.addUndoStep()}},Object.defineProperty(We.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),We.prototype.showNotesEditor=function(){var we;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=(we=this._currentMarker.notes)!==null&&we!==void 0?we:"",this.overlayContainer.appendChild(this.notesArea))},We.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)},We.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},We.prototype.addUndoStep=function(){var we=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Ne=this.getState(),Xe=this.undoRedoManager.getLastUndoStep();if(!Xe||Xe.width===Ne.width&&Xe.height===Ne.height){var nt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Ne),nt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ie){return Ie(new yt(we))})}else this.undoRedoManager.replaceLastUndoStep(Ne),this.eventListeners.statechange.forEach(function(Ie){return Ie(new yt(we))})}},We.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},We.prototype.undoStep=function(){var we=this,Ne=this.undoRedoManager.undo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Xe){return Xe(new yt(we))}))},We.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},We.prototype.redoStep=function(){var we=this,Ne=this.undoRedoManager.redo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Xe){return Xe(new yt(we))}))},We.prototype.stepZoom=function(){var we=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=we<this.zoomSteps.length-1?this.zoomSteps[we+1]:this.zoomSteps[0]},We.prototype.panTo=function(we){this.contentDiv.scrollBy({left:this.prevPanPoint.x-we.x,top:this.prevPanPoint.y-we.y}),this.prevPanPoint=we},We.prototype.startRenderAndClose=function(){return oe(this,void 0,void 0,function(){var we,Ne,Xe=this;return He(this,function(nt){switch(nt.label){case 0:return[4,this.render()];case 1:return we=nt.sent(),Ne=this.getState(),this.eventListeners.render.forEach(function(Ie){return Ie(new Dt(Xe,we,Ne))}),this.close(!0),[2]}})})},We.prototype.getState=function(we){we===!0&&this.setCurrentMarker();var Ne={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Xe){return Ne.markers.push(Xe.getState())}),Ne},We.prototype.restoreState=function(we){var Ne=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);we.markers.forEach(function(Xe){var nt=Ne._availableMarkerTypes.find(function(_e){return _e.typeName===Xe.typeName});if(nt!==void 0){var Ie=Ne.addNewMarker(nt);Ie.restoreState(Xe),Ne.markers.push(Ie)}}),we.width&&we.height&&(we.width!==this.imageWidth||we.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/we.width,this.imageHeight/we.height),this.eventListeners.restorestate.forEach(function(Xe){return Xe(new yt(Ne))})},We.prototype.addNewMarker=function(we){var Ne=de.createGroup();return this.markerImage.appendChild(Ne),new we(Ne,this.overlayContainer,this.settings)},We.prototype.createNewMarker=function(we){var Ne,Xe=this;(Ne=typeof we=="string"?this._availableMarkerTypes.find(function(nt){return nt.typeName===we}):we)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Ne),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(Ne.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(nt){return nt(new mt(Xe,Xe._currentMarker))}))},We.prototype.markerCreated=function(we){var Ne=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(we),this.setCurrentMarker(we),we instanceof Ve&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ve):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Xe){return Xe(new mt(Ne,Ne._currentMarker))})},We.prototype.colorChanged=function(we){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=we,this.settings.defaultStrokeColor=we)},We.prototype.fillColorChanged=function(we){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=we)},We.prototype.markerStateChanged=function(we){var Ne=this;this.eventListeners.markerchange.forEach(function(Xe){return Xe(new mt(Ne,we))})},We.prototype.setCurrentMarker=function(we){var Ne=this;this._currentMarker!==we&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Xe){return Xe(new mt(Ne,Ne._currentMarker))})),this._currentMarker=we,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(Xe){return Xe(new mt(Ne,Ne._currentMarker))}))},We.prototype.onPointerDown=function(we){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||we.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Ne=this.markers.find(function(Xe){return Xe.ownsTarget(we.target)});Ne!==void 0?(this.setCurrentMarker(Ne),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(we.clientX,we.clientY),we.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:we.clientX,y:we.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(we.clientX,we.clientY))},We.prototype.onDblClick=function(we){if(this._isFocused||this.focus(),this.mode==="select"){var Ne=this.markers.find(function(Xe){return Xe.ownsTarget(we.target)});Ne!==void 0&&Ne!==this._currentMarker&&this.setCurrentMarker(Ne),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(we.clientX,we.clientY),we.target):this.setCurrentMarker()}},We.prototype.onPointerMove=function(we){this.touchPoints!==1&&we.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||we.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(we.clientX,we.clientY)):this.zoomLevel>1&&this.panTo({x:we.clientX,y:we.clientY}))},We.prototype.onPointerUp=function(we){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(we.clientX,we.clientY)),this.isDragging=!1,this.addUndoStep()},We.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},We.prototype.onKeyUp=function(we){this._currentMarker===void 0||this.notesArea!==void 0||we.key!=="Delete"&&we.key!=="Backspace"||this.deleteSelectedMarker()},We.prototype.clientToLocalCoordinates=function(we,Ne){var Xe=this.markerImage.getBoundingClientRect();return{x:(we-Xe.left)/this.zoomLevel,y:(Ne-Xe.top)/this.zoomLevel}},We.prototype.onWindowResize=function(){this.positionUI()},We.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var we=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=we+"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()},We.prototype.addLicenseKey=function(we){ve.addKey(we)},We.prototype.addEventListener=function(we,Ne){this.eventListeners.addEventListener(we,Ne)},We.prototype.removeEventListener=function(we,Ne){this.eventListeners.removeEventListener(we,Ne)},We.prototype.renderState=function(we){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(we),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(We.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),We.prototype.focus=function(){var we=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Ne){return Ne(new yt(we))}))},We.prototype.blur=function(){var we=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Ne){return Ne(new yt(we))}))},We.instanceCounter=0,We}()},23425:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return De}});var at=pt(49618),Ut=pt(72308),oe=pt(62853),He=pt(77321),Re=pt(52487),de=pt(92310),ve=pt.n(de),Ee=pt(18929),ke=pt(10228),Se=pt(26112),Ae=pt(48736),me=pt(59301),Pe=pt(17119),fe=[10,20,50,100],z=function(Te){var Me=Te.pageSizeOptions,Be=Me===void 0?fe:Me,Ue=Te.locale,Ye=Te.changeSize,Ve=Te.pageSize,Ze=Te.goButton,ot=Te.quickGo,lt=Te.rootPrefixCls,ft=Te.disabled,St=Te.buildOptionText,qe=Te.showSizeChanger,rt=Te.sizeChangerRender,wt=me.useState(""),Ct=(0,Re.Z)(wt,2),bt=Ct[0],ct=Ct[1],xt=function(){return!bt||Number.isNaN(bt)?void 0:Number(bt)},dt=typeof St=="function"?St:function(Ne){return"".concat(Ne," ").concat(Ue.items_per_page)},Mt=function(Xe){ct(Xe.target.value)},yt=function(Xe){Ze||bt===""||(ct(""),!(Xe.relatedTarget&&(Xe.relatedTarget.className.indexOf("".concat(lt,"-item-link"))>=0||Xe.relatedTarget.className.indexOf("".concat(lt,"-item"))>=0))&&(ot==null||ot(xt())))},Dt=function(Xe){bt!==""&&(Xe.keyCode===ke.Z.ENTER||Xe.type==="click")&&(ct(""),ot==null||ot(xt()))},mt=function(){return Be.some(function(Xe){return Xe.toString()===Ve.toString()})?Be:Be.concat([Ve]).sort(function(Xe,nt){var Ie=Number.isNaN(Number(Xe))?0:Number(Xe),_e=Number.isNaN(Number(nt))?0:Number(nt);return Ie-_e})},vt="".concat(lt,"-options");if(!qe&&!ot)return null;var et=null,We=null,we=null;return qe&&rt&&(et=rt({disabled:ft,size:Ve,onSizeChange:function(Xe){Ye==null||Ye(Number(Xe))},"aria-label":Ue.page_size,className:"".concat(vt,"-size-changer"),options:mt().map(function(Ne){return{label:dt(Ne),value:Ne}})})),ot&&(Ze&&(we=typeof Ze=="boolean"?me.createElement("button",{type:"button",onClick:Dt,onKeyUp:Dt,disabled:ft,className:"".concat(vt,"-quick-jumper-button")},Ue.jump_to_confirm):me.createElement("span",{onClick:Dt,onKeyUp:Dt},Ze)),We=me.createElement("div",{className:"".concat(vt,"-quick-jumper")},Ue.jump_to,me.createElement("input",{disabled:ft,type:"text",value:bt,onChange:Mt,onKeyUp:Dt,onBlur:yt,"aria-label":Ue.page}),Ue.page,we)),me.createElement("li",{className:vt},et,We)},te=z,se=function(Te){var Me=Te.rootPrefixCls,Be=Te.page,Ue=Te.active,Ye=Te.className,Ve=Te.showTitle,Ze=Te.onClick,ot=Te.onKeyPress,lt=Te.itemRender,ft="".concat(Me,"-item"),St=ve()(ft,"".concat(ft,"-").concat(Be),(0,at.Z)((0,at.Z)({},"".concat(ft,"-active"),Ue),"".concat(ft,"-disabled"),!Be),Ye),qe=function(){Ze(Be)},rt=function(bt){ot(bt,Ze,Be)},wt=lt(Be,"page",me.createElement("a",{rel:"nofollow"},Be));return wt?me.createElement("li",{title:Ve?String(Be):null,className:St,onClick:qe,onKeyDown:rt,tabIndex:0},wt):null},ie=se,le=function(Te,Me,Be){return Be};function ce(){}function pe(Fe){var Te=Number(Fe);return typeof Te=="number"&&!Number.isNaN(Te)&&isFinite(Te)&&Math.floor(Te)===Te}function xe(Fe,Te,Me){var Be=typeof Fe=="undefined"?Te:Fe;return Math.floor((Me-1)/Be)+1}var je=function(Te){var Me=Te.prefixCls,Be=Me===void 0?"rc-pagination":Me,Ue=Te.selectPrefixCls,Ye=Ue===void 0?"rc-select":Ue,Ve=Te.className,Ze=Te.current,ot=Te.defaultCurrent,lt=ot===void 0?1:ot,ft=Te.total,St=ft===void 0?0:ft,qe=Te.pageSize,rt=Te.defaultPageSize,wt=rt===void 0?10:rt,Ct=Te.onChange,bt=Ct===void 0?ce:Ct,ct=Te.hideOnSinglePage,xt=Te.align,dt=Te.showPrevNextJumpers,Mt=dt===void 0?!0:dt,yt=Te.showQuickJumper,Dt=Te.showLessItems,mt=Te.showTitle,vt=mt===void 0?!0:mt,et=Te.onShowSizeChange,We=et===void 0?ce:et,we=Te.locale,Ne=we===void 0?Pe.Z:we,Xe=Te.style,nt=Te.totalBoundaryShowSizeChanger,Ie=nt===void 0?50:nt,_e=Te.disabled,Ge=Te.simple,tt=Te.showTotal,ht=Te.showSizeChanger,ut=ht===void 0?St>Ie:ht,Ot=Te.sizeChangerRender,Et=Te.pageSizeOptions,Ft=Te.itemRender,qt=Ft===void 0?le:Ft,Xt=Te.jumpPrevIcon,Kt=Te.jumpNextIcon,Vt=Te.prevIcon,hn=Te.nextIcon,on=me.useRef(null),cn=(0,Ee.Z)(10,{value:qe,defaultValue:wt}),Sn=(0,Re.Z)(cn,2),Cn=Sn[0],kn=Sn[1],In=(0,Ee.Z)(1,{value:Ze,defaultValue:lt,postState:function(Pr){return Math.max(1,Math.min(Pr,xe(void 0,Cn,St)))}}),_r=(0,Re.Z)(In,2),xr=_r[0],qr=_r[1],er=me.useState(xr),si=(0,Re.Z)(er,2),ei=si[0],vi=si[1];(0,me.useEffect)(function(){vi(xr)},[xr]);var Li=bt!==ce,Pi="current"in Te,Xr=Math.max(1,xr-(Dt?3:5)),mi=Math.min(xe(void 0,Cn,St),xr+(Dt?3:5));function Qe(hr,Pr){var zr=hr||me.createElement("button",{type:"button","aria-label":Pr,className:"".concat(Be,"-item-link")});return typeof hr=="function"&&(zr=me.createElement(hr,(0,He.Z)({},Te))),zr}function ii(hr){var Pr=hr.target.value,zr=xe(void 0,Cn,St),Ri;return Pr===""?Ri=Pr:Number.isNaN(Number(Pr))?Ri=ei:Pr>=zr?Ri=zr:Ri=Number(Pr),Ri}function Tr(hr){return pe(hr)&&hr!==xr&&pe(St)&&St>0}var wr=St>Cn?yt:!1;function Er(hr){(hr.keyCode===ke.Z.UP||hr.keyCode===ke.Z.DOWN)&&hr.preventDefault()}function kr(hr){var Pr=ii(hr);switch(Pr!==ei&&vi(Pr),hr.keyCode){case ke.Z.ENTER:Kn(Pr);break;case ke.Z.UP:Kn(Pr-1);break;case ke.Z.DOWN:Kn(Pr+1);break;default:break}}function Hi(hr){Kn(ii(hr))}function pr(hr){var Pr=xe(hr,Cn,St),zr=xr>Pr&&Pr!==0?Pr:xr;kn(hr),vi(zr),We==null||We(xr,hr),qr(zr),bt==null||bt(zr,hr)}function Kn(hr){if(Tr(hr)&&!_e){var Pr=xe(void 0,Cn,St),zr=hr;return hr>Pr?zr=Pr:hr<1&&(zr=1),zr!==ei&&vi(zr),qr(zr),bt==null||bt(zr,Cn),zr}return xr}var Qt=xr>1,Wt=xr<xe(void 0,Cn,St);function zt(){Qt&&Kn(xr-1)}function Nn(){Wt&&Kn(xr+1)}function Vn(){Kn(Xr)}function vr(){Kn(mi)}function yn(hr,Pr){if(hr.key==="Enter"||hr.charCode===ke.Z.ENTER||hr.keyCode===ke.Z.ENTER){for(var zr=arguments.length,Ri=new Array(zr>2?zr-2:0),Oi=2;Oi<zr;Oi++)Ri[Oi-2]=arguments[Oi];Pr.apply(void 0,Ri)}}function zn(hr){yn(hr,zt)}function Ht(hr){yn(hr,Nn)}function Yt(hr){yn(hr,Vn)}function qn(hr){yn(hr,vr)}function jt(hr){var Pr=qt(hr,"prev",Qe(Vt,"prev page"));return me.isValidElement(Pr)?me.cloneElement(Pr,{disabled:!Qt}):Pr}function un(hr){var Pr=qt(hr,"next",Qe(hn,"next page"));return me.isValidElement(Pr)?me.cloneElement(Pr,{disabled:!Wt}):Pr}function An(hr){(hr.type==="click"||hr.keyCode===ke.Z.ENTER)&&Kn(ei)}var Yn=null,ln=(0,Se.Z)(Te,{aria:!0,data:!0}),fn=tt&&me.createElement("li",{className:"".concat(Be,"-total-text")},tt(St,[St===0?0:(xr-1)*Cn+1,xr*Cn>St?St:xr*Cn])),Hn=null,tr=xe(void 0,Cn,St);if(ct&&St<=Cn)return null;var Zn=[],ir={rootPrefixCls:Be,onClick:Kn,onKeyPress:yn,showTitle:vt,itemRender:qt,page:-1},Un=xr-1>0?xr-1:0,dr=xr+1<tr?xr+1:tr,Fr=yt&&yt.goButton,Nr=(0,oe.Z)(Ge)==="object"?Ge.readOnly:!Ge,Rr=Fr,gn=null;Ge&&(Fr&&(typeof Fr=="boolean"?Rr=me.createElement("button",{type:"button",onClick:An,onKeyUp:An},Ne.jump_to_confirm):Rr=me.createElement("span",{onClick:An,onKeyUp:An},Fr),Rr=me.createElement("li",{title:vt?"".concat(Ne.jump_to).concat(xr,"/").concat(tr):null,className:"".concat(Be,"-simple-pager")},Rr)),gn=me.createElement("li",{title:vt?"".concat(xr,"/").concat(tr):null,className:"".concat(Be,"-simple-pager")},Nr?ei:me.createElement("input",{type:"text","aria-label":Ne.jump_to,value:ei,disabled:_e,onKeyDown:Er,onKeyUp:kr,onChange:kr,onBlur:Hi,size:3}),me.createElement("span",{className:"".concat(Be,"-slash")},"/"),tr));var Fi=Dt?1:2;if(tr<=3+Fi*2){tr||Zn.push(me.createElement(ie,(0,Ut.Z)({},ir,{key:"noPager",page:1,className:"".concat(Be,"-item-disabled")})));for(var ti=1;ti<=tr;ti+=1)Zn.push(me.createElement(ie,(0,Ut.Z)({},ir,{key:ti,page:ti,active:xr===ti})))}else{var Mi=Dt?Ne.prev_3:Ne.prev_5,an=Dt?Ne.next_3:Ne.next_5,Qn=qt(Xr,"jump-prev",Qe(Xt,"prev page")),or=qt(mi,"jump-next",Qe(Kt,"next page"));Mt&&(Yn=Qn?me.createElement("li",{title:vt?Mi:null,key:"prev",onClick:Vn,tabIndex:0,onKeyDown:Yt,className:ve()("".concat(Be,"-jump-prev"),(0,at.Z)({},"".concat(Be,"-jump-prev-custom-icon"),!!Xt))},Qn):null,Hn=or?me.createElement("li",{title:vt?an:null,key:"next",onClick:vr,tabIndex:0,onKeyDown:qn,className:ve()("".concat(Be,"-jump-next"),(0,at.Z)({},"".concat(Be,"-jump-next-custom-icon"),!!Kt))},or):null);var yr=Math.max(1,xr-Fi),br=Math.min(xr+Fi,tr);xr-1<=Fi&&(br=1+Fi*2),tr-xr<=Fi&&(yr=tr-Fi*2);for(var Ar=yr;Ar<=br;Ar+=1)Zn.push(me.createElement(ie,(0,Ut.Z)({},ir,{key:Ar,page:Ar,active:xr===Ar})));if(xr-1>=Fi*2&&xr!==3&&(Zn[0]=me.cloneElement(Zn[0],{className:ve()("".concat(Be,"-item-after-jump-prev"),Zn[0].props.className)}),Zn.unshift(Yn)),tr-xr>=Fi*2&&xr!==tr-2){var ri=Zn[Zn.length-1];Zn[Zn.length-1]=me.cloneElement(ri,{className:ve()("".concat(Be,"-item-before-jump-next"),ri.props.className)}),Zn.push(Hn)}yr!==1&&Zn.unshift(me.createElement(ie,(0,Ut.Z)({},ir,{key:1,page:1}))),br!==tr&&Zn.push(me.createElement(ie,(0,Ut.Z)({},ir,{key:tr,page:tr})))}var Yr=jt(Un);if(Yr){var Jr=!Qt||!tr;Yr=me.createElement("li",{title:vt?Ne.prev_page:null,onClick:zt,tabIndex:Jr?null:0,onKeyDown:zn,className:ve()("".concat(Be,"-prev"),(0,at.Z)({},"".concat(Be,"-disabled"),Jr)),"aria-disabled":Jr},Yr)}var sr=un(dr);if(sr){var rn,nr;Ge?(rn=!Wt,nr=Qt?0:null):(rn=!Wt||!tr,nr=rn?null:0),sr=me.createElement("li",{title:vt?Ne.next_page:null,onClick:Nn,tabIndex:nr,onKeyDown:Ht,className:ve()("".concat(Be,"-next"),(0,at.Z)({},"".concat(Be,"-disabled"),rn)),"aria-disabled":rn},sr)}var sn=ve()(Be,Ve,(0,at.Z)((0,at.Z)((0,at.Z)((0,at.Z)((0,at.Z)({},"".concat(Be,"-start"),xt==="start"),"".concat(Be,"-center"),xt==="center"),"".concat(Be,"-end"),xt==="end"),"".concat(Be,"-simple"),Ge),"".concat(Be,"-disabled"),_e));return me.createElement("ul",(0,Ut.Z)({className:sn,style:Xe,ref:on},ln),fn,Yr,Ge?gn:Zn,sr,me.createElement(te,{locale:Ne,rootPrefixCls:Be,disabled:_e,selectPrefixCls:Ye,changeSize:pr,pageSize:Cn,pageSizeOptions:Et,quickGo:wr?Kn:null,goButton:Rr,showSizeChanger:ut,sizeChangerRender:Ot}))},De=je},25930:function(Dn,jn,pt){"use strict";pt.d(jn,{Cd:function(){return Be}});var at=pt(72308),Ut=pt(77321),oe=pt(74416),He=pt(59301),Re=pt(92310),de=pt.n(Re),ve={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ee=function(){var Ve=(0,He.useRef)([]),Ze=(0,He.useRef)(null);return(0,He.useEffect)(function(){var ot=Date.now(),lt=!1;Ve.current.forEach(function(ft){if(ft){lt=!0;var St=ft.style;St.transitionDuration=".3s, .3s, .3s, .06s",Ze.current&&ot-Ze.current<100&&(St.transitionDuration="0s, 0s")}}),lt&&(Ze.current=Date.now())}),Ve.current},ke=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Se=function(Ve){var Ze=(0,Ut.Z)((0,Ut.Z)({},ve),Ve),ot=Ze.className,lt=Ze.percent,ft=Ze.prefixCls,St=Ze.strokeColor,qe=Ze.strokeLinecap,rt=Ze.strokeWidth,wt=Ze.style,Ct=Ze.trailColor,bt=Ze.trailWidth,ct=Ze.transition,xt=(0,oe.Z)(Ze,ke);delete xt.gapPosition;var dt=Array.isArray(lt)?lt:[lt],Mt=Array.isArray(St)?St:[St],yt=Ee(),Dt=rt/2,mt=100-rt/2,vt="M ".concat(qe==="round"?Dt:0,",").concat(Dt,`
|
|
L `).concat(qe==="round"?mt:100,",").concat(Dt),et="0 0 100 ".concat(rt),We=0;return He.createElement("svg",(0,at.Z)({className:de()("".concat(ft,"-line"),ot),viewBox:et,preserveAspectRatio:"none",style:wt},xt),He.createElement("path",{className:"".concat(ft,"-line-trail"),d:vt,strokeLinecap:qe,stroke:Ct,strokeWidth:bt||rt,fillOpacity:"0"}),dt.map(function(we,Ne){var Xe=1;switch(qe){case"round":Xe=1-rt/100;break;case"square":Xe=1-rt/2/100;break;default:Xe=1;break}var nt={strokeDasharray:"".concat(we*Xe,"px, 100px"),strokeDashoffset:"-".concat(We,"px"),transition:ct||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ie=Mt[Ne]||Mt[Mt.length-1];return We+=we,He.createElement("path",{key:Ne,className:"".concat(ft,"-line-path"),d:vt,strokeLinecap:qe,stroke:Ie,strokeWidth:rt,fillOpacity:"0",ref:function(Ge){yt[Ne]=Ge},style:nt})}))},Ae=Se,me=pt(62853),Pe=pt(52487),fe=pt(47273),z=0,te=(0,fe.Z)();function se(){var Ye;return te?(Ye=z,z+=1):Ye="TEST_OR_SSR",Ye}var ie=function(Ye){var Ve=He.useState(),Ze=(0,Pe.Z)(Ve,2),ot=Ze[0],lt=Ze[1];return He.useEffect(function(){lt("rc_progress_".concat(se()))},[]),Ye||ot},le=function(Ve){var Ze=Ve.bg,ot=Ve.children;return He.createElement("div",{style:{width:"100%",height:"100%",background:Ze}},ot)};function ce(Ye,Ve){return Object.keys(Ye).map(function(Ze){var ot=parseFloat(Ze),lt="".concat(Math.floor(ot*Ve),"%");return"".concat(Ye[Ze]," ").concat(lt)})}var pe=He.forwardRef(function(Ye,Ve){var Ze=Ye.prefixCls,ot=Ye.color,lt=Ye.gradientId,ft=Ye.radius,St=Ye.style,qe=Ye.ptg,rt=Ye.strokeLinecap,wt=Ye.strokeWidth,Ct=Ye.size,bt=Ye.gapDegree,ct=ot&&(0,me.Z)(ot)==="object",xt=ct?"#FFF":void 0,dt=Ct/2,Mt=He.createElement("circle",{className:"".concat(Ze,"-circle-path"),r:ft,cx:dt,cy:dt,stroke:xt,strokeLinecap:rt,strokeWidth:wt,opacity:qe===0?0:1,style:St,ref:Ve});if(!ct)return Mt;var yt="".concat(lt,"-conic"),Dt=bt?"".concat(180+bt/2,"deg"):"0deg",mt=ce(ot,(360-bt)/360),vt=ce(ot,1),et="conic-gradient(from ".concat(Dt,", ").concat(mt.join(", "),")"),We="linear-gradient(to ".concat(bt?"bottom":"top",", ").concat(vt.join(", "),")");return He.createElement(He.Fragment,null,He.createElement("mask",{id:yt},Mt),He.createElement("foreignObject",{x:0,y:0,width:Ct,height:Ct,mask:"url(#".concat(yt,")")},He.createElement(le,{bg:We},He.createElement(le,{bg:et}))))}),xe=pe,je=100,De=function(Ve,Ze,ot,lt,ft,St,qe,rt,wt,Ct){var bt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,ct=ot/100*360*((360-St)/360),xt=St===0?0:{bottom:0,top:180,left:90,right:-90}[qe],dt=(100-lt)/100*Ze;wt==="round"&<!==100&&(dt+=Ct/2,dt>=Ze&&(dt=Ze-.01));var Mt=je/2;return{stroke:typeof rt=="string"?rt:void 0,strokeDasharray:"".concat(Ze,"px ").concat(Ve),strokeDashoffset:dt+bt,transform:"rotate(".concat(ft+ct+xt,"deg)"),transformOrigin:"".concat(Mt,"px ").concat(Mt,"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}},Fe=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Te(Ye){var Ve=Ye!=null?Ye:[];return Array.isArray(Ve)?Ve:[Ve]}var Me=function(Ve){var Ze=(0,Ut.Z)((0,Ut.Z)({},ve),Ve),ot=Ze.id,lt=Ze.prefixCls,ft=Ze.steps,St=Ze.strokeWidth,qe=Ze.trailWidth,rt=Ze.gapDegree,wt=rt===void 0?0:rt,Ct=Ze.gapPosition,bt=Ze.trailColor,ct=Ze.strokeLinecap,xt=Ze.style,dt=Ze.className,Mt=Ze.strokeColor,yt=Ze.percent,Dt=(0,oe.Z)(Ze,Fe),mt=je/2,vt=ie(ot),et="".concat(vt,"-gradient"),We=mt-St/2,we=Math.PI*2*We,Ne=wt>0?90+wt/2:-90,Xe=we*((360-wt)/360),nt=(0,me.Z)(ft)==="object"?ft:{count:ft,gap:2},Ie=nt.count,_e=nt.gap,Ge=Te(yt),tt=Te(Mt),ht=tt.find(function(Kt){return Kt&&(0,me.Z)(Kt)==="object"}),ut=ht&&(0,me.Z)(ht)==="object",Ot=ut?"butt":ct,Et=De(we,Xe,0,100,Ne,wt,Ct,bt,Ot,St),Ft=Ee(),qt=function(){var Vt=0;return Ge.map(function(hn,on){var cn=tt[on]||tt[tt.length-1],Sn=De(we,Xe,Vt,hn,Ne,wt,Ct,cn,Ot,St);return Vt+=hn,He.createElement(xe,{key:on,color:cn,ptg:hn,radius:We,prefixCls:lt,gradientId:et,style:Sn,strokeLinecap:Ot,strokeWidth:St,gapDegree:wt,ref:function(kn){Ft[on]=kn},size:je})}).reverse()},Xt=function(){var Vt=Math.round(Ie*(Ge[0]/100)),hn=100/Ie,on=0;return new Array(Ie).fill(null).map(function(cn,Sn){var Cn=Sn<=Vt-1?tt[0]:bt,kn=Cn&&(0,me.Z)(Cn)==="object"?"url(#".concat(et,")"):void 0,In=De(we,Xe,on,hn,Ne,wt,Ct,Cn,"butt",St,_e);return on+=(Xe-In.strokeDashoffset+_e)*100/Xe,He.createElement("circle",{key:Sn,className:"".concat(lt,"-circle-path"),r:We,cx:mt,cy:mt,stroke:kn,strokeWidth:St,opacity:1,style:In,ref:function(xr){Ft[Sn]=xr}})})};return He.createElement("svg",(0,at.Z)({className:de()("".concat(lt,"-circle"),dt),viewBox:"0 0 ".concat(je," ").concat(je),style:xt,id:ot,role:"presentation"},Dt),!Ie&&He.createElement("circle",{className:"".concat(lt,"-circle-trail"),r:We,cx:mt,cy:mt,stroke:bt,strokeLinecap:Ot,strokeWidth:qe||St,style:Et}),Ie?Xt():qt())},Be=Me,Ue={Line:Ae,Circle:Be}},738:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return ce}});var at=pt(72308),Ut=pt(49618),oe=pt(52487),He=pt(74416),Re=pt(92310),de=pt.n(Re),ve=pt(18929),Ee=pt(10228),ke=pt(26112),Se=pt(59301);function Ae(pe,xe){var je=pe.disabled,De=pe.prefixCls,Fe=pe.character,Te=pe.characterRender,Me=pe.index,Be=pe.count,Ue=pe.value,Ye=pe.allowHalf,Ve=pe.focused,Ze=pe.onHover,ot=pe.onClick,lt=function(ct){Ze(ct,Me)},ft=function(ct){ot(ct,Me)},St=function(ct){ct.keyCode===Ee.Z.ENTER&&ot(ct,Me)},qe=Me+1,rt=new Set([De]);Ue===0&&Me===0&&Ve?rt.add("".concat(De,"-focused")):Ye&&Ue+.5>=qe&&Ue<qe?(rt.add("".concat(De,"-half")),rt.add("".concat(De,"-active")),Ve&&rt.add("".concat(De,"-focused"))):(qe<=Ue?rt.add("".concat(De,"-full")):rt.add("".concat(De,"-zero")),qe===Ue&&Ve&&rt.add("".concat(De,"-focused")));var wt=typeof Fe=="function"?Fe(pe):Fe,Ct=Se.createElement("li",{className:de()(Array.from(rt)),ref:xe},Se.createElement("div",{onClick:je?null:ft,onKeyDown:je?null:St,onMouseMove:je?null:lt,role:"radio","aria-checked":Ue>Me?"true":"false","aria-posinset":Me+1,"aria-setsize":Be,tabIndex:je?-1:0},Se.createElement("div",{className:"".concat(De,"-first")},wt),Se.createElement("div",{className:"".concat(De,"-second")},wt)));return Te&&(Ct=Te(Ct,pe)),Ct}var me=Se.forwardRef(Ae);function Pe(){var pe=Se.useRef({});function xe(De){return pe.current[De]}function je(De){return function(Fe){pe.current[De]=Fe}}return[xe,je]}function fe(pe){var xe=pe.pageXOffset,je="scrollLeft";if(typeof xe!="number"){var De=pe.document;xe=De.documentElement[je],typeof xe!="number"&&(xe=De.body[je])}return xe}function z(pe){var xe,je,De=pe.ownerDocument,Fe=De.body,Te=De&&De.documentElement,Me=pe.getBoundingClientRect();return xe=Me.left,je=Me.top,xe-=Te.clientLeft||Fe.clientLeft||0,je-=Te.clientTop||Fe.clientTop||0,{left:xe,top:je}}function te(pe){var xe=z(pe),je=pe.ownerDocument,De=je.defaultView||je.parentWindow;return xe.left+=fe(De),xe.left}var se=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function ie(pe,xe){var je=pe.prefixCls,De=je===void 0?"rc-rate":je,Fe=pe.className,Te=pe.defaultValue,Me=pe.value,Be=pe.count,Ue=Be===void 0?5:Be,Ye=pe.allowHalf,Ve=Ye===void 0?!1:Ye,Ze=pe.allowClear,ot=Ze===void 0?!0:Ze,lt=pe.keyboard,ft=lt===void 0?!0:lt,St=pe.character,qe=St===void 0?"\u2605":St,rt=pe.characterRender,wt=pe.disabled,Ct=pe.direction,bt=Ct===void 0?"ltr":Ct,ct=pe.tabIndex,xt=ct===void 0?0:ct,dt=pe.autoFocus,Mt=pe.onHoverChange,yt=pe.onChange,Dt=pe.onFocus,mt=pe.onBlur,vt=pe.onKeyDown,et=pe.onMouseLeave,We=(0,He.Z)(pe,se),we=Pe(),Ne=(0,oe.Z)(we,2),Xe=Ne[0],nt=Ne[1],Ie=Se.useRef(null),_e=function(){if(!wt){var Xr;(Xr=Ie.current)===null||Xr===void 0||Xr.focus()}};Se.useImperativeHandle(xe,function(){return{focus:_e,blur:function(){if(!wt){var Xr;(Xr=Ie.current)===null||Xr===void 0||Xr.blur()}}}});var Ge=(0,ve.Z)(Te||0,{value:Me}),tt=(0,oe.Z)(Ge,2),ht=tt[0],ut=tt[1],Ot=(0,ve.Z)(null),Et=(0,oe.Z)(Ot,2),Ft=Et[0],qt=Et[1],Xt=function(Xr,mi){var Qe=bt==="rtl",ii=Xr+1;if(Ve){var Tr=Xe(Xr),wr=te(Tr),Er=Tr.clientWidth;(Qe&&mi-wr>Er/2||!Qe&&mi-wr<Er/2)&&(ii-=.5)}return ii},Kt=function(Xr){ut(Xr),yt==null||yt(Xr)},Vt=Se.useState(!1),hn=(0,oe.Z)(Vt,2),on=hn[0],cn=hn[1],Sn=function(){cn(!0),Dt==null||Dt()},Cn=function(){cn(!1),mt==null||mt()},kn=Se.useState(null),In=(0,oe.Z)(kn,2),_r=In[0],xr=In[1],qr=function(Xr,mi){var Qe=Xt(mi,Xr.pageX);Qe!==Ft&&(xr(Qe),qt(null)),Mt==null||Mt(Qe)},er=function(Xr){wt||(xr(null),qt(null),Mt==null||Mt(void 0)),Xr&&(et==null||et(Xr))},si=function(Xr,mi){var Qe=Xt(mi,Xr.pageX),ii=!1;ot&&(ii=Qe===ht),er(),Kt(ii?0:Qe),qt(ii?Qe:null)},ei=function(Xr){var mi=Xr.keyCode,Qe=bt==="rtl",ii=Ve?.5:1;ft&&(mi===Ee.Z.RIGHT&&ht<Ue&&!Qe?(Kt(ht+ii),Xr.preventDefault()):mi===Ee.Z.LEFT&&ht>0&&!Qe||mi===Ee.Z.RIGHT&&ht>0&&Qe?(Kt(ht-ii),Xr.preventDefault()):mi===Ee.Z.LEFT&&ht<Ue&&Qe&&(Kt(ht+ii),Xr.preventDefault())),vt==null||vt(Xr)};Se.useEffect(function(){dt&&!wt&&_e()},[]);var vi=new Array(Ue).fill(0).map(function(Pi,Xr){return Se.createElement(me,{ref:nt(Xr),index:Xr,count:Ue,disabled:wt,prefixCls:"".concat(De,"-star"),allowHalf:Ve,value:_r===null?ht:_r,onClick:si,onHover:qr,key:Pi||Xr,character:qe,characterRender:rt,focused:on})}),Li=de()(De,Fe,(0,Ut.Z)((0,Ut.Z)({},"".concat(De,"-disabled"),wt),"".concat(De,"-rtl"),bt==="rtl"));return Se.createElement("ul",(0,at.Z)({className:Li,onMouseLeave:er,tabIndex:wt?-1:xt,onFocus:wt?null:Sn,onBlur:wt?null:Cn,onKeyDown:wt?null:ei,ref:Ie},(0,ke.Z)(We,{aria:!0,data:!0,attr:!0})),vi)}var le=Se.forwardRef(ie),ce=le},69582:function(Dn,jn,pt){"use strict";pt.d(jn,{ZP:function(){return ve}});var at=pt(52487),Ut=pt(59301),oe=pt(47273),He=0,Re=(0,oe.Z)();function de(){var Ee;return Re?(Ee=He,He+=1):Ee="TEST_OR_SSR",Ee}function ve(Ee){var ke=Ut.useState(),Se=(0,at.Z)(ke,2),Ae=Se[0],me=Se[1];return Ut.useEffect(function(){me("rc_select_".concat(de()))},[]),Ee||Ae}},45560:function(Dn,jn,pt){"use strict";pt.d(jn,{Ac:function(){return Vt},Xo:function(){return on},Wx:function(){return Sn},ZP:function(){return zn},lk:function(){return ce}});var at=pt(72308),Ut=pt(80702),oe=pt(49618),He=pt(77321),Re=pt(52487),de=pt(74416),ve=pt(62853),Ee=pt(18929),ke=pt(48736),Se=pt(59301),Ae=pt(92310),me=pt.n(Ae),Pe=pt(34280),fe=pt(49658),z=pt(8654),te=function(Yt){var qn=Yt.className,jt=Yt.customizeIcon,un=Yt.customizeIconProps,An=Yt.children,Yn=Yt.onMouseDown,ln=Yt.onClick,fn=typeof jt=="function"?jt(un):jt;return Se.createElement("span",{className:qn,onMouseDown:function(tr){tr.preventDefault(),Yn==null||Yn(tr)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:ln,"aria-hidden":!0},fn!==void 0?fn:Se.createElement("span",{className:me()(qn.split(/\s+/).map(function(Hn){return"".concat(Hn,"-icon")}))},An))},se=te,ie=function(Yt,qn,jt,un,An){var Yn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,ln=arguments.length>6?arguments[6]:void 0,fn=arguments.length>7?arguments[7]:void 0,Hn=Se.useMemo(function(){if((0,ve.Z)(un)==="object")return un.clearIcon;if(An)return An},[un,An]),tr=Se.useMemo(function(){return!!(!Yn&&un&&(jt.length||ln)&&!(fn==="combobox"&&ln===""))},[un,Yn,jt.length,ln,fn]);return{allowClear:tr,clearIcon:Se.createElement(se,{className:"".concat(Yt,"-clear"),onMouseDown:qn,customizeIcon:Hn},"\xD7")}},le=Se.createContext(null);function ce(){return Se.useContext(le)}function pe(){var Ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Yt=Se.useState(!1),qn=(0,Re.Z)(Yt,2),jt=qn[0],un=qn[1],An=Se.useRef(null),Yn=function(){window.clearTimeout(An.current)};Se.useEffect(function(){return Yn},[]);var ln=function(Hn,tr){Yn(),An.current=window.setTimeout(function(){un(Hn),tr&&tr()},Ht)};return[jt,ln,Yn]}function xe(){var Ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Yt=Se.useRef(null),qn=Se.useRef(null);Se.useEffect(function(){return function(){window.clearTimeout(qn.current)}},[]);function jt(un){(un||Yt.current===null)&&(Yt.current=un),window.clearTimeout(qn.current),qn.current=window.setTimeout(function(){Yt.current=null},Ht)}return[function(){return Yt.current},jt]}function je(Ht,Yt,qn,jt){var un=Se.useRef(null);un.current={open:Yt,triggerOpen:qn,customizedTrigger:jt},Se.useEffect(function(){function An(Yn){var ln;if(!((ln=un.current)!==null&&ln!==void 0&&ln.customizedTrigger)){var fn=Yn.target;fn.shadowRoot&&Yn.composed&&(fn=Yn.composedPath()[0]||fn),un.current.open&&Ht().filter(function(Hn){return Hn}).every(function(Hn){return!Hn.contains(fn)&&Hn!==fn})&&un.current.triggerOpen(!1)}}return window.addEventListener("mousedown",An),function(){return window.removeEventListener("mousedown",An)}},[])}var De=pt(10228);function Fe(Ht){return Ht&&![De.Z.ESC,De.Z.SHIFT,De.Z.BACKSPACE,De.Z.TAB,De.Z.WIN_KEY,De.Z.ALT,De.Z.META,De.Z.WIN_KEY_RIGHT,De.Z.CTRL,De.Z.SEMICOLON,De.Z.EQUALS,De.Z.CAPS_LOCK,De.Z.CONTEXT_MENU,De.Z.F1,De.Z.F2,De.Z.F3,De.Z.F4,De.Z.F5,De.Z.F6,De.Z.F7,De.Z.F8,De.Z.F9,De.Z.F10,De.Z.F11,De.Z.F12].includes(Ht)}var Te=pt(26112),Me=pt(11780),Be=function(Yt,qn){var jt,un=Yt.prefixCls,An=Yt.id,Yn=Yt.inputElement,ln=Yt.disabled,fn=Yt.tabIndex,Hn=Yt.autoFocus,tr=Yt.autoComplete,Zn=Yt.editable,ir=Yt.activeDescendantId,Un=Yt.value,dr=Yt.maxLength,Fr=Yt.onKeyDown,Nr=Yt.onMouseDown,Rr=Yt.onChange,gn=Yt.onPaste,Fi=Yt.onCompositionStart,ti=Yt.onCompositionEnd,Mi=Yt.onBlur,an=Yt.open,Qn=Yt.attrs,or=Yn||Se.createElement("input",null),yr=or,br=yr.ref,Ar=yr.props,ri=Ar.onKeyDown,Yr=Ar.onChange,Jr=Ar.onMouseDown,sr=Ar.onCompositionStart,rn=Ar.onCompositionEnd,nr=Ar.onBlur,sn=Ar.style;return(0,ke.Kp)(!("maxLength"in or.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),or=Se.cloneElement(or,(0,He.Z)((0,He.Z)((0,He.Z)({type:"search"},Ar),{},{id:An,ref:(0,z.sQ)(qn,br),disabled:ln,tabIndex:fn,autoComplete:tr||"off",autoFocus:Hn,className:me()("".concat(un,"-selection-search-input"),(jt=or)===null||jt===void 0||(jt=jt.props)===null||jt===void 0?void 0:jt.className),role:"combobox","aria-expanded":an||!1,"aria-haspopup":"listbox","aria-owns":"".concat(An,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(An,"_list"),"aria-activedescendant":an?ir:void 0},Qn),{},{value:Zn?Un:"",maxLength:dr,readOnly:!Zn,unselectable:Zn?null:"on",style:(0,He.Z)((0,He.Z)({},sn),{},{opacity:Zn?null:0}),onKeyDown:function(Pr){Fr(Pr),ri&&ri(Pr)},onMouseDown:function(Pr){Nr(Pr),Jr&&Jr(Pr)},onChange:function(Pr){Rr(Pr),Yr&&Yr(Pr)},onCompositionStart:function(Pr){Fi(Pr),sr&&sr(Pr)},onCompositionEnd:function(Pr){ti(Pr),rn&&rn(Pr)},onPaste:gn,onBlur:function(Pr){Mi(Pr),nr&&nr(Pr)}})),or},Ue=Se.forwardRef(Be),Ye=Ue;function Ve(Ht){return Array.isArray(Ht)?Ht:Ht!==void 0?[Ht]:[]}var Ze=typeof window!="undefined"&&window.document&&window.document.documentElement,ot=Ze;function lt(Ht){return Ht!=null}function ft(Ht){return!Ht&&Ht!==0}function St(Ht){return["string","number"].includes((0,ve.Z)(Ht))}function qe(Ht){var Yt=void 0;return Ht&&(St(Ht.title)?Yt=Ht.title.toString():St(Ht.label)&&(Yt=Ht.label.toString())),Yt}function rt(Ht,Yt){ot?Se.useLayoutEffect(Ht,Yt):Se.useEffect(Ht,Yt)}function wt(Ht){var Yt;return(Yt=Ht.key)!==null&&Yt!==void 0?Yt:Ht.value}var Ct=function(Yt){Yt.preventDefault(),Yt.stopPropagation()},bt=function(Yt){var qn=Yt.id,jt=Yt.prefixCls,un=Yt.values,An=Yt.open,Yn=Yt.searchValue,ln=Yt.autoClearSearchValue,fn=Yt.inputRef,Hn=Yt.placeholder,tr=Yt.disabled,Zn=Yt.mode,ir=Yt.showSearch,Un=Yt.autoFocus,dr=Yt.autoComplete,Fr=Yt.activeDescendantId,Nr=Yt.tabIndex,Rr=Yt.removeIcon,gn=Yt.maxTagCount,Fi=Yt.maxTagTextLength,ti=Yt.maxTagPlaceholder,Mi=ti===void 0?function(ar){return"+ ".concat(ar.length," ...")}:ti,an=Yt.tagRender,Qn=Yt.onToggleOpen,or=Yt.onRemove,yr=Yt.onInputChange,br=Yt.onInputPaste,Ar=Yt.onInputKeyDown,ri=Yt.onInputMouseDown,Yr=Yt.onInputCompositionStart,Jr=Yt.onInputCompositionEnd,sr=Yt.onInputBlur,rn=Se.useRef(null),nr=(0,Se.useState)(0),sn=(0,Re.Z)(nr,2),hr=sn[0],Pr=sn[1],zr=(0,Se.useState)(!1),Ri=(0,Re.Z)(zr,2),Oi=Ri[0],Si=Ri[1],Di="".concat(jt,"-selection"),en=An||Zn==="multiple"&&ln===!1||Zn==="tags"?Yn:"",pn=Zn==="tags"||Zn==="multiple"&&ln===!1||ir&&(An||Oi);rt(function(){Pr(rn.current.scrollWidth)},[en]);var tn=function(wn,Rn,Gn,Wn,Xn){return Se.createElement("span",{title:qe(wn),className:me()("".concat(Di,"-item"),(0,oe.Z)({},"".concat(Di,"-item-disabled"),Gn))},Se.createElement("span",{className:"".concat(Di,"-item-content")},Rn),Wn&&Se.createElement(se,{className:"".concat(Di,"-item-remove"),onMouseDown:Ct,onClick:Xn,customizeIcon:Rr},"\xD7"))},st=function(wn,Rn,Gn,Wn,Xn,Lr){var mr=function(vn){Ct(vn),Qn(!An)};return Se.createElement("span",{onMouseDown:mr},an({label:Rn,value:wn,disabled:Gn,closable:Wn,onClose:Xn,isMaxTag:!!Lr}))},Bn=function(wn){var Rn=wn.disabled,Gn=wn.label,Wn=wn.value,Xn=!tr&&!Rn,Lr=Gn;if(typeof Fi=="number"&&(typeof Gn=="string"||typeof Gn=="number")){var mr=String(Lr);mr.length>Fi&&(Lr="".concat(mr.slice(0,Fi),"..."))}var lr=function(fr){fr&&fr.stopPropagation(),or(wn)};return typeof an=="function"?st(Wn,Lr,Rn,Xn,lr):tn(wn,Lr,Rn,Xn,lr)},Pn=function(wn){if(!un.length)return null;var Rn=typeof Mi=="function"?Mi(wn):Mi;return typeof an=="function"?st(void 0,Rn,!1,!1,void 0,!0):tn({title:Rn},Rn,!1)},Fn=Se.createElement("div",{className:"".concat(Di,"-search"),style:{width:hr},onFocus:function(){Si(!0)},onBlur:function(){Si(!1)}},Se.createElement(Ye,{ref:fn,open:An,prefixCls:jt,id:qn,inputElement:null,disabled:tr,autoFocus:Un,autoComplete:dr,editable:pn,activeDescendantId:Fr,value:en,onKeyDown:Ar,onMouseDown:ri,onChange:yr,onPaste:br,onCompositionStart:Yr,onCompositionEnd:Jr,onBlur:sr,tabIndex:Nr,attrs:(0,Te.Z)(Yt,!0)}),Se.createElement("span",{ref:rn,className:"".concat(Di,"-search-mirror"),"aria-hidden":!0},en,"\xA0")),Jn=Se.createElement(Me.Z,{prefixCls:"".concat(Di,"-overflow"),data:un,renderItem:Bn,renderRest:Pn,suffix:Fn,itemKey:wt,maxCount:gn});return Se.createElement("span",{className:"".concat(Di,"-wrap")},Jn,!un.length&&!en&&Se.createElement("span",{className:"".concat(Di,"-placeholder")},Hn))},ct=bt,xt=function(Yt){var qn=Yt.inputElement,jt=Yt.prefixCls,un=Yt.id,An=Yt.inputRef,Yn=Yt.disabled,ln=Yt.autoFocus,fn=Yt.autoComplete,Hn=Yt.activeDescendantId,tr=Yt.mode,Zn=Yt.open,ir=Yt.values,Un=Yt.placeholder,dr=Yt.tabIndex,Fr=Yt.showSearch,Nr=Yt.searchValue,Rr=Yt.activeValue,gn=Yt.maxLength,Fi=Yt.onInputKeyDown,ti=Yt.onInputMouseDown,Mi=Yt.onInputChange,an=Yt.onInputPaste,Qn=Yt.onInputCompositionStart,or=Yt.onInputCompositionEnd,yr=Yt.onInputBlur,br=Yt.title,Ar=Se.useState(!1),ri=(0,Re.Z)(Ar,2),Yr=ri[0],Jr=ri[1],sr=tr==="combobox",rn=sr||Fr,nr=ir[0],sn=Nr||"";sr&&Rr&&!Yr&&(sn=Rr),Se.useEffect(function(){sr&&Jr(!1)},[sr,Rr]);var hr=tr!=="combobox"&&!Zn&&!Fr?!1:!!sn,Pr=br===void 0?qe(nr):br,zr=Se.useMemo(function(){return nr?null:Se.createElement("span",{className:"".concat(jt,"-selection-placeholder"),style:hr?{visibility:"hidden"}:void 0},Un)},[nr,hr,Un,jt]);return Se.createElement("span",{className:"".concat(jt,"-selection-wrap")},Se.createElement("span",{className:"".concat(jt,"-selection-search")},Se.createElement(Ye,{ref:An,prefixCls:jt,id:un,open:Zn,inputElement:qn,disabled:Yn,autoFocus:ln,autoComplete:fn,editable:rn,activeDescendantId:Hn,value:sn,onKeyDown:Fi,onMouseDown:ti,onChange:function(Oi){Jr(!0),Mi(Oi)},onPaste:an,onCompositionStart:Qn,onCompositionEnd:or,onBlur:yr,tabIndex:dr,attrs:(0,Te.Z)(Yt,!0),maxLength:sr?gn:void 0})),!sr&&nr?Se.createElement("span",{className:"".concat(jt,"-selection-item"),title:Pr,style:hr?{visibility:"hidden"}:void 0},nr.label):null,zr)},dt=xt,Mt=function(Yt,qn){var jt=(0,Se.useRef)(null),un=(0,Se.useRef)(!1),An=Yt.prefixCls,Yn=Yt.open,ln=Yt.mode,fn=Yt.showSearch,Hn=Yt.tokenWithEnter,tr=Yt.disabled,Zn=Yt.prefix,ir=Yt.autoClearSearchValue,Un=Yt.onSearch,dr=Yt.onSearchSubmit,Fr=Yt.onToggleOpen,Nr=Yt.onInputKeyDown,Rr=Yt.onInputBlur,gn=Yt.domRef;Se.useImperativeHandle(qn,function(){return{focus:function(Pr){jt.current.focus(Pr)},blur:function(){jt.current.blur()}}});var Fi=xe(0),ti=(0,Re.Z)(Fi,2),Mi=ti[0],an=ti[1],Qn=function(Pr){var zr=Pr.which,Ri=jt.current instanceof HTMLTextAreaElement;!Ri&&Yn&&(zr===De.Z.UP||zr===De.Z.DOWN)&&Pr.preventDefault(),Nr&&Nr(Pr),zr===De.Z.ENTER&&ln==="tags"&&!un.current&&!Yn&&(dr==null||dr(Pr.target.value)),!(Ri&&!Yn&&~[De.Z.UP,De.Z.DOWN,De.Z.LEFT,De.Z.RIGHT].indexOf(zr))&&Fe(zr)&&Fr(!0)},or=function(){an(!0)},yr=(0,Se.useRef)(null),br=function(Pr){Un(Pr,!0,un.current)!==!1&&Fr(!0)},Ar=function(){un.current=!0},ri=function(Pr){un.current=!1,ln!=="combobox"&&br(Pr.target.value)},Yr=function(Pr){var zr=Pr.target.value;if(Hn&&yr.current&&/[\r\n]/.test(yr.current)){var Ri=yr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");zr=zr.replace(Ri,yr.current)}yr.current=null,br(zr)},Jr=function(Pr){var zr=Pr.clipboardData,Ri=zr==null?void 0:zr.getData("text");yr.current=Ri||""},sr=function(Pr){var zr=Pr.target;if(zr!==jt.current){var Ri=document.body.style.msTouchAction!==void 0;Ri?setTimeout(function(){jt.current.focus()}):jt.current.focus()}},rn=function(Pr){var zr=Mi();Pr.target!==jt.current&&!zr&&!(ln==="combobox"&&tr)&&Pr.preventDefault(),(ln!=="combobox"&&(!fn||!zr)||!Yn)&&(Yn&&ir!==!1&&Un("",!0,!1),Fr())},nr={inputRef:jt,onInputKeyDown:Qn,onInputMouseDown:or,onInputChange:Yr,onInputPaste:Jr,onInputCompositionStart:Ar,onInputCompositionEnd:ri,onInputBlur:Rr},sn=ln==="multiple"||ln==="tags"?Se.createElement(ct,(0,at.Z)({},Yt,nr)):Se.createElement(dt,(0,at.Z)({},Yt,nr));return Se.createElement("div",{ref:gn,className:"".concat(An,"-selector"),onClick:sr,onMouseDown:rn},Zn&&Se.createElement("div",{className:"".concat(An,"-prefix")},Zn),sn)},yt=Se.forwardRef(Mt),Dt=yt,mt=pt(65352),vt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],et=function(Yt){var qn=Yt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:qn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:qn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:qn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:qn,adjustY:1},htmlRegion:"scroll"}}},We=function(Yt,qn){var jt=Yt.prefixCls,un=Yt.disabled,An=Yt.visible,Yn=Yt.children,ln=Yt.popupElement,fn=Yt.animation,Hn=Yt.transitionName,tr=Yt.dropdownStyle,Zn=Yt.dropdownClassName,ir=Yt.direction,Un=ir===void 0?"ltr":ir,dr=Yt.placement,Fr=Yt.builtinPlacements,Nr=Yt.dropdownMatchSelectWidth,Rr=Yt.dropdownRender,gn=Yt.dropdownAlign,Fi=Yt.getPopupContainer,ti=Yt.empty,Mi=Yt.getTriggerDOMNode,an=Yt.onPopupVisibleChange,Qn=Yt.onPopupMouseEnter,or=(0,de.Z)(Yt,vt),yr="".concat(jt,"-dropdown"),br=ln;Rr&&(br=Rr(ln));var Ar=Se.useMemo(function(){return Fr||et(Nr)},[Fr,Nr]),ri=fn?"".concat(yr,"-").concat(fn):Hn,Yr=typeof Nr=="number",Jr=Se.useMemo(function(){return Yr?null:Nr===!1?"minWidth":"width"},[Nr,Yr]),sr=tr;Yr&&(sr=(0,He.Z)((0,He.Z)({},sr),{},{width:Nr}));var rn=Se.useRef(null);return Se.useImperativeHandle(qn,function(){return{getPopupElement:function(){var sn;return(sn=rn.current)===null||sn===void 0?void 0:sn.popupElement}}}),Se.createElement(mt.Z,(0,at.Z)({},or,{showAction:an?["click"]:[],hideAction:an?["click"]:[],popupPlacement:dr||(Un==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Ar,prefixCls:yr,popupTransitionName:ri,popup:Se.createElement("div",{onMouseEnter:Qn},br),ref:rn,stretch:Jr,popupAlign:gn,popupVisible:An,getPopupContainer:Fi,popupClassName:me()(Zn,(0,oe.Z)({},"".concat(yr,"-empty"),ti)),popupStyle:sr,getTriggerDOMNode:Mi,onPopupVisibleChange:an}),Yn)},we=Se.forwardRef(We),Ne=we,Xe=pt(68413);function nt(Ht,Yt){var qn=Ht.key,jt;return"value"in Ht&&(jt=Ht.value),qn!=null?qn:jt!==void 0?jt:"rc-index-key-".concat(Yt)}function Ie(Ht){return typeof Ht!="undefined"&&!Number.isNaN(Ht)}function _e(Ht,Yt){var qn=Ht||{},jt=qn.label,un=qn.value,An=qn.options,Yn=qn.groupLabel,ln=jt||(Yt?"children":"label");return{label:ln,value:un||"value",options:An||"options",groupLabel:Yn||ln}}function Ge(Ht){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},qn=Yt.fieldNames,jt=Yt.childrenAsData,un=[],An=_e(qn,!1),Yn=An.label,ln=An.value,fn=An.options,Hn=An.groupLabel;function tr(Zn,ir){Array.isArray(Zn)&&Zn.forEach(function(Un){if(ir||!(fn in Un)){var dr=Un[ln];un.push({key:nt(Un,un.length),groupOption:ir,data:Un,label:Un[Yn],value:dr})}else{var Fr=Un[Hn];Fr===void 0&&jt&&(Fr=Un.label),un.push({key:nt(Un,un.length),group:!0,data:Un,label:Fr}),tr(Un[fn],!0)}})}return tr(Ht,!1),un}function tt(Ht){var Yt=(0,He.Z)({},Ht);return"props"in Yt||Object.defineProperty(Yt,"props",{get:function(){return(0,ke.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Yt}}),Yt}var ht=function(Yt,qn,jt){if(!qn||!qn.length)return null;var un=!1,An=function ln(fn,Hn){var tr=(0,Xe.Z)(Hn),Zn=tr[0],ir=tr.slice(1);if(!Zn)return[fn];var Un=fn.split(Zn);return un=un||Un.length>1,Un.reduce(function(dr,Fr){return[].concat((0,Ut.Z)(dr),(0,Ut.Z)(ln(Fr,ir)))},[]).filter(Boolean)},Yn=An(Yt,qn);return un?typeof jt!="undefined"?Yn.slice(0,jt):Yn:null},ut=Se.createContext(null),Ot=ut;function Et(Ht){var Yt=Ht.visible,qn=Ht.values;if(!Yt)return null;var jt=50;return Se.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(qn.slice(0,jt).map(function(un){var An=un.label,Yn=un.value;return["number","string"].includes((0,ve.Z)(An))?An:Yn}).join(", ")),qn.length>jt?", ...":null)}var Ft=["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"],qt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Xt=function(Yt){return Yt==="tags"||Yt==="multiple"},Kt=Se.forwardRef(function(Ht,Yt){var qn,jt=Ht.id,un=Ht.prefixCls,An=Ht.className,Yn=Ht.showSearch,ln=Ht.tagRender,fn=Ht.direction,Hn=Ht.omitDomProps,tr=Ht.displayValues,Zn=Ht.onDisplayValuesChange,ir=Ht.emptyOptions,Un=Ht.notFoundContent,dr=Un===void 0?"Not Found":Un,Fr=Ht.onClear,Nr=Ht.mode,Rr=Ht.disabled,gn=Ht.loading,Fi=Ht.getInputElement,ti=Ht.getRawInputElement,Mi=Ht.open,an=Ht.defaultOpen,Qn=Ht.onDropdownVisibleChange,or=Ht.activeValue,yr=Ht.onActiveValueChange,br=Ht.activeDescendantId,Ar=Ht.searchValue,ri=Ht.autoClearSearchValue,Yr=Ht.onSearch,Jr=Ht.onSearchSplit,sr=Ht.tokenSeparators,rn=Ht.allowClear,nr=Ht.prefix,sn=Ht.suffixIcon,hr=Ht.clearIcon,Pr=Ht.OptionList,zr=Ht.animation,Ri=Ht.transitionName,Oi=Ht.dropdownStyle,Si=Ht.dropdownClassName,Di=Ht.dropdownMatchSelectWidth,en=Ht.dropdownRender,pn=Ht.dropdownAlign,tn=Ht.placement,st=Ht.builtinPlacements,Bn=Ht.getPopupContainer,Pn=Ht.showAction,Fn=Pn===void 0?[]:Pn,Jn=Ht.onFocus,ar=Ht.onBlur,wn=Ht.onKeyUp,Rn=Ht.onKeyDown,Gn=Ht.onMouseDown,Wn=(0,de.Z)(Ht,Ft),Xn=Xt(Nr),Lr=(Yn!==void 0?Yn:Xn)||Nr==="combobox",mr=(0,He.Z)({},Wn);qt.forEach(function(uo){delete mr[uo]}),Hn==null||Hn.forEach(function(uo){delete mr[uo]});var lr=Se.useState(!1),vn=(0,Re.Z)(lr,2),fr=vn[0],Or=vn[1];Se.useEffect(function(){Or((0,fe.Z)())},[]);var oi=Se.useRef(null),Qr=Se.useRef(null),ui=Se.useRef(null),di=Se.useRef(null),hi=Se.useRef(null),_i=Se.useRef(!1),zi=pe(),mo=(0,Re.Z)(zi,3),$t=mo[0],yi=mo[1],Ti=mo[2];Se.useImperativeHandle(Yt,function(){var uo,Bi;return{focus:(uo=di.current)===null||uo===void 0?void 0:uo.focus,blur:(Bi=di.current)===null||Bi===void 0?void 0:Bi.blur,scrollTo:function(la){var $o;return($o=hi.current)===null||$o===void 0?void 0:$o.scrollTo(la)},nativeElement:oi.current||Qr.current}});var Vr=Se.useMemo(function(){var uo;if(Nr!=="combobox")return Ar;var Bi=(uo=tr[0])===null||uo===void 0?void 0:uo.value;return typeof Bi=="string"||typeof Bi=="number"?String(Bi):""},[Ar,Nr,tr]),Ci=Nr==="combobox"&&typeof Fi=="function"&&Fi()||null,Hr=typeof ti=="function"&&ti(),eo=(0,z.x1)(Qr,Hr==null||(qn=Hr.props)===null||qn===void 0?void 0:qn.ref),Gi=Se.useState(!1),xi=(0,Re.Z)(Gi,2),qi=xi[0],ga=xi[1];(0,Pe.Z)(function(){ga(!0)},[]);var Ao=(0,Ee.Z)(!1,{defaultValue:an,value:Mi}),Aa=(0,Re.Z)(Ao,2),ma=Aa[0],Gr=Aa[1],to=qi?ma:!1,Co=!dr&&ir;(Rr||Co&&to&&Nr==="combobox")&&(to=!1);var Qo=Co?!1:to,Ei=Se.useCallback(function(uo){var Bi=uo!==void 0?uo:!to;Rr||(Gr(Bi),to!==Bi&&(Qn==null||Qn(Bi)))},[Rr,to,Gr,Qn]),wi=Se.useMemo(function(){return(sr||[]).some(function(uo){return[`
|
|
`,`\r
|
|
`].includes(uo)})},[sr]),Mn=Se.useContext(Ot)||{},Wr=Mn.maxCount,ki=Mn.rawValues,co=function(Bi,Wi,la){if(!(Xn&&Ie(Wr)&&(ki==null?void 0:ki.size)>=Wr)){var $o=!0,qo=Bi;yr==null||yr(null);var jr=ht(Bi,sr,Ie(Wr)?Wr-ki.size:void 0),As=la?null:jr;return Nr!=="combobox"&&As&&(qo="",Jr==null||Jr(As),Ei(!1),$o=!1),Yr&&Vr!==qo&&Yr(qo,{source:Wi?"typing":"effect"}),$o}},ba=function(Bi){!Bi||!Bi.trim()||Yr(Bi,{source:"submit"})};Se.useEffect(function(){!to&&!Xn&&Nr!=="combobox"&&co("",!1,!1)},[to]),Se.useEffect(function(){ma&&Rr&&Gr(!1),Rr&&!_i.current&&yi(!1)},[Rr]);var aa=xe(),ai=(0,Re.Z)(aa,2),Wo=ai[0],Ko=ai[1],jo=Se.useRef(!1),io=function(Bi){var Wi=Wo(),la=Bi.key,$o=la==="Enter";if($o&&(Nr!=="combobox"&&Bi.preventDefault(),to||Ei(!0)),Ko(!!Vr),la==="Backspace"&&!Wi&&Xn&&!Vr&&tr.length){for(var qo=(0,Ut.Z)(tr),jr=null,As=qo.length-1;As>=0;As-=1){var Gt=qo[As];if(!Gt.disabled){qo.splice(As,1),jr=Gt;break}}jr&&Zn(qo,{type:"remove",values:[jr]})}for(var Ln=arguments.length,Ml=new Array(Ln>1?Ln-1:0),Ou=1;Ou<Ln;Ou++)Ml[Ou-1]=arguments[Ou];if(to&&(!$o||!jo.current)){var ua;$o&&(jo.current=!0),(ua=hi.current)===null||ua===void 0||ua.onKeyDown.apply(ua,[Bi].concat(Ml))}Rn==null||Rn.apply(void 0,[Bi].concat(Ml))},Pa=function(Bi){for(var Wi=arguments.length,la=new Array(Wi>1?Wi-1:0),$o=1;$o<Wi;$o++)la[$o-1]=arguments[$o];if(to){var qo;(qo=hi.current)===null||qo===void 0||qo.onKeyUp.apply(qo,[Bi].concat(la))}Bi.key==="Enter"&&(jo.current=!1),wn==null||wn.apply(void 0,[Bi].concat(la))},is=function(Bi){var Wi=tr.filter(function(la){return la!==Bi});Zn(Wi,{type:"remove",values:[Bi]})},fo=function(){jo.current=!1},os=Se.useRef(!1),Gs=function(){yi(!0),Rr||(Jn&&!os.current&&Jn.apply(void 0,arguments),Fn.includes("focus")&&Ei(!0)),os.current=!0},Lu=function(){_i.current=!0,yi(!1,function(){os.current=!1,_i.current=!1,Ei(!1)}),!Rr&&(Vr&&(Nr==="tags"?Yr(Vr,{source:"submit"}):Nr==="multiple"&&Yr("",{source:"blur"})),ar&&ar.apply(void 0,arguments))},Ho=[];Se.useEffect(function(){return function(){Ho.forEach(function(uo){return clearTimeout(uo)}),Ho.splice(0,Ho.length)}},[]);var th=function(Bi){var Wi,la=Bi.target,$o=(Wi=ui.current)===null||Wi===void 0?void 0:Wi.getPopupElement();if($o&&$o.contains(la)){var qo=setTimeout(function(){var Ln=Ho.indexOf(qo);if(Ln!==-1&&Ho.splice(Ln,1),Ti(),!fr&&!$o.contains(document.activeElement)){var Ml;(Ml=di.current)===null||Ml===void 0||Ml.focus()}});Ho.push(qo)}for(var jr=arguments.length,As=new Array(jr>1?jr-1:0),Gt=1;Gt<jr;Gt++)As[Gt-1]=arguments[Gt];Gn==null||Gn.apply(void 0,[Bi].concat(As))},Mu=Se.useState({}),Nu=(0,Re.Z)(Mu,2),gl=Nu[1];function Ns(){gl({})}var Ll;Hr&&(Ll=function(Bi){Ei(Bi)}),je(function(){var uo;return[oi.current,(uo=ui.current)===null||uo===void 0?void 0:uo.getPopupElement()]},Qo,Ei,!!Hr);var nh=Se.useMemo(function(){return(0,He.Z)((0,He.Z)({},Ht),{},{notFoundContent:dr,open:to,triggerOpen:Qo,id:jt,showSearch:Lr,multiple:Xn,toggleOpen:Ei})},[Ht,dr,Qo,to,jt,Lr,Xn,Ei]),Au=!!sn||gn,Vo;Au&&(Vo=Se.createElement(se,{className:me()("".concat(un,"-arrow"),(0,oe.Z)({},"".concat(un,"-arrow-loading"),gn)),customizeIcon:sn,customizeIconProps:{loading:gn,searchValue:Vr,open:to,focused:$t,showSearch:Lr}}));var ju=function(){var Bi;Fr==null||Fr(),(Bi=di.current)===null||Bi===void 0||Bi.focus(),Zn([],{type:"clear",values:tr}),co("",!1,!1)},rh=ie(un,ju,tr,rn,hr,Rr,Vr,Nr),iu=rh.allowClear,ou=rh.clearIcon,ja=Se.createElement(Pr,{ref:hi}),Oa=me()(un,An,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(un,"-focused"),$t),"".concat(un,"-multiple"),Xn),"".concat(un,"-single"),!Xn),"".concat(un,"-allow-clear"),rn),"".concat(un,"-show-arrow"),Au),"".concat(un,"-disabled"),Rr),"".concat(un,"-loading"),gn),"".concat(un,"-open"),to),"".concat(un,"-customize-input"),Ci),"".concat(un,"-show-search"),Lr)),na=Se.createElement(Ne,{ref:ui,disabled:Rr,prefixCls:un,visible:Qo,popupElement:ja,animation:zr,transitionName:Ri,dropdownStyle:Oi,dropdownClassName:Si,direction:fn,dropdownMatchSelectWidth:Di,dropdownRender:en,dropdownAlign:pn,placement:tn,builtinPlacements:st,getPopupContainer:Bn,empty:ir,getTriggerDOMNode:function(Bi){return Qr.current||Bi},onPopupVisibleChange:Ll,onPopupMouseEnter:Ns},Hr?Se.cloneElement(Hr,{ref:eo}):Se.createElement(Dt,(0,at.Z)({},Ht,{domRef:Qr,prefixCls:un,inputElement:Ci,ref:di,id:jt,prefix:nr,showSearch:Lr,autoClearSearchValue:ri,mode:Nr,activeDescendantId:br,tagRender:ln,values:tr,open:to,onToggleOpen:Ei,activeValue:or,searchValue:Vr,onSearch:co,onSearchSubmit:ba,onRemove:is,tokenWithEnter:wi,onInputBlur:fo}))),sa;return Hr?sa=na:sa=Se.createElement("div",(0,at.Z)({className:Oa},mr,{ref:oi,onMouseDown:th,onKeyDown:io,onKeyUp:Pa,onFocus:Gs,onBlur:Lu}),Se.createElement(Et,{visible:$t&&!to,values:tr}),na,Vo,iu&&ou),Se.createElement(le.Provider,{value:nh},sa)}),Vt=Kt,hn=function(){return null};hn.isSelectOptGroup=!0;var on=hn,cn=function(){return null};cn.isSelectOption=!0;var Sn=cn,Cn=pt(80547),kn=pt(2738),In=pt(45680);function _r(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var xr=["disabled","title","children","style","className"];function qr(Ht){return typeof Ht=="string"||typeof Ht=="number"}var er=function(Yt,qn){var jt=ce(),un=jt.prefixCls,An=jt.id,Yn=jt.open,ln=jt.multiple,fn=jt.mode,Hn=jt.searchValue,tr=jt.toggleOpen,Zn=jt.notFoundContent,ir=jt.onPopupScroll,Un=Se.useContext(Ot),dr=Un.maxCount,Fr=Un.flattenOptions,Nr=Un.onActiveValue,Rr=Un.defaultActiveFirstOption,gn=Un.onSelect,Fi=Un.menuItemSelectedIcon,ti=Un.rawValues,Mi=Un.fieldNames,an=Un.virtual,Qn=Un.direction,or=Un.listHeight,yr=Un.listItemHeight,br=Un.optionRender,Ar="".concat(un,"-item"),ri=(0,Cn.Z)(function(){return Fr},[Yn,Fr],function(Pn,Fn){return Fn[0]&&Pn[1]!==Fn[1]}),Yr=Se.useRef(null),Jr=Se.useMemo(function(){return ln&&Ie(dr)&&(ti==null?void 0:ti.size)>=dr},[ln,dr,ti==null?void 0:ti.size]),sr=function(Fn){Fn.preventDefault()},rn=function(Fn){var Jn;(Jn=Yr.current)===null||Jn===void 0||Jn.scrollTo(typeof Fn=="number"?{index:Fn}:Fn)},nr=Se.useCallback(function(Pn){return fn==="combobox"?!1:ti.has(Pn)},[fn,(0,Ut.Z)(ti).toString(),ti.size]),sn=function(Fn){for(var Jn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ar=ri.length,wn=0;wn<ar;wn+=1){var Rn=(Fn+wn*Jn+ar)%ar,Gn=ri[Rn]||{},Wn=Gn.group,Xn=Gn.data;if(!Wn&&!(Xn!=null&&Xn.disabled)&&(nr(Xn.value)||!Jr))return Rn}return-1},hr=Se.useState(function(){return sn(0)}),Pr=(0,Re.Z)(hr,2),zr=Pr[0],Ri=Pr[1],Oi=function(Fn){var Jn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ri(Fn);var ar={source:Jn?"keyboard":"mouse"},wn=ri[Fn];if(!wn){Nr(null,-1,ar);return}Nr(wn.value,Fn,ar)};(0,Se.useEffect)(function(){Oi(Rr!==!1?sn(0):-1)},[ri.length,Hn]);var Si=Se.useCallback(function(Pn){return fn==="combobox"?String(Pn).toLowerCase()===Hn.toLowerCase():ti.has(Pn)},[fn,Hn,(0,Ut.Z)(ti).toString(),ti.size]);(0,Se.useEffect)(function(){var Pn=setTimeout(function(){if(!ln&&Yn&&ti.size===1){var Jn=Array.from(ti)[0],ar=ri.findIndex(function(wn){var Rn=wn.data;return Rn.value===Jn});ar!==-1&&(Oi(ar),rn(ar))}});if(Yn){var Fn;(Fn=Yr.current)===null||Fn===void 0||Fn.scrollTo(void 0)}return function(){return clearTimeout(Pn)}},[Yn,Hn]);var Di=function(Fn){Fn!==void 0&&gn(Fn,{selected:!ti.has(Fn)}),ln||tr(!1)};if(Se.useImperativeHandle(qn,function(){return{onKeyDown:function(Fn){var Jn=Fn.which,ar=Fn.ctrlKey;switch(Jn){case De.Z.N:case De.Z.P:case De.Z.UP:case De.Z.DOWN:{var wn=0;if(Jn===De.Z.UP?wn=-1:Jn===De.Z.DOWN?wn=1:_r()&&ar&&(Jn===De.Z.N?wn=1:Jn===De.Z.P&&(wn=-1)),wn!==0){var Rn=sn(zr+wn,wn);rn(Rn),Oi(Rn,!0)}break}case De.Z.TAB:case De.Z.ENTER:{var Gn,Wn=ri[zr];Wn&&!(Wn!=null&&(Gn=Wn.data)!==null&&Gn!==void 0&&Gn.disabled)&&!Jr?Di(Wn.value):Di(void 0),Yn&&Fn.preventDefault();break}case De.Z.ESC:tr(!1),Yn&&Fn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Fn){rn(Fn)}}}),ri.length===0)return Se.createElement("div",{role:"listbox",id:"".concat(An,"_list"),className:"".concat(Ar,"-empty"),onMouseDown:sr},Zn);var en=Object.keys(Mi).map(function(Pn){return Mi[Pn]}),pn=function(Fn){return Fn.label};function tn(Pn,Fn){var Jn=Pn.group;return{role:Jn?"presentation":"option",id:"".concat(An,"_list_").concat(Fn)}}var st=function(Fn){var Jn=ri[Fn];if(!Jn)return null;var ar=Jn.data||{},wn=ar.value,Rn=Jn.group,Gn=(0,Te.Z)(ar,!0),Wn=pn(Jn);return Jn?Se.createElement("div",(0,at.Z)({"aria-label":typeof Wn=="string"&&!Rn?Wn:null},Gn,{key:Fn},tn(Jn,Fn),{"aria-selected":Si(wn)}),wn):null},Bn={role:"listbox",id:"".concat(An,"_list")};return Se.createElement(Se.Fragment,null,an&&Se.createElement("div",(0,at.Z)({},Bn,{style:{height:0,width:0,overflow:"hidden"}}),st(zr-1),st(zr),st(zr+1)),Se.createElement(In.Z,{itemKey:"key",ref:Yr,data:ri,height:or,itemHeight:yr,fullHeight:!1,onMouseDown:sr,onScroll:ir,virtual:an,direction:Qn,innerProps:an?null:Bn},function(Pn,Fn){var Jn=Pn.group,ar=Pn.groupOption,wn=Pn.data,Rn=Pn.label,Gn=Pn.value,Wn=wn.key;if(Jn){var Xn,Lr=(Xn=wn.title)!==null&&Xn!==void 0?Xn:qr(Rn)?Rn.toString():void 0;return Se.createElement("div",{className:me()(Ar,"".concat(Ar,"-group"),wn.className),title:Lr},Rn!==void 0?Rn:Wn)}var mr=wn.disabled,lr=wn.title,vn=wn.children,fr=wn.style,Or=wn.className,oi=(0,de.Z)(wn,xr),Qr=(0,kn.Z)(oi,en),ui=nr(Gn),di=mr||!ui&&Jr,hi="".concat(Ar,"-option"),_i=me()(Ar,hi,Or,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(hi,"-grouped"),ar),"".concat(hi,"-active"),zr===Fn&&!di),"".concat(hi,"-disabled"),di),"".concat(hi,"-selected"),ui)),zi=pn(Pn),mo=!Fi||typeof Fi=="function"||ui,$t=typeof zi=="number"?zi:zi||Gn,yi=qr($t)?$t.toString():void 0;return lr!==void 0&&(yi=lr),Se.createElement("div",(0,at.Z)({},(0,Te.Z)(Qr),an?{}:tn(Pn,Fn),{"aria-selected":Si(Gn),className:_i,title:yi,onMouseMove:function(){zr===Fn||di||Oi(Fn)},onClick:function(){di||Di(Gn)},style:fr}),Se.createElement("div",{className:"".concat(hi,"-content")},typeof br=="function"?br(Pn,{index:Fn}):$t),Se.isValidElement(Fi)||ui,mo&&Se.createElement(se,{className:"".concat(Ar,"-option-state"),customizeIcon:Fi,customizeIconProps:{value:Gn,disabled:di,isSelected:ui}},ui?"\u2713":null))}))},si=Se.forwardRef(er),ei=si,vi=function(Ht,Yt){var qn=Se.useRef({values:new Map,options:new Map}),jt=Se.useMemo(function(){var An=qn.current,Yn=An.values,ln=An.options,fn=Ht.map(function(Zn){if(Zn.label===void 0){var ir;return(0,He.Z)((0,He.Z)({},Zn),{},{label:(ir=Yn.get(Zn.value))===null||ir===void 0?void 0:ir.label})}return Zn}),Hn=new Map,tr=new Map;return fn.forEach(function(Zn){Hn.set(Zn.value,Zn),tr.set(Zn.value,Yt.get(Zn.value)||ln.get(Zn.value))}),qn.current.values=Hn,qn.current.options=tr,fn},[Ht,Yt]),un=Se.useCallback(function(An){return Yt.get(An)||qn.current.options.get(An)},[Yt]);return[jt,un]};function Li(Ht,Yt){return Ve(Ht).join("").toUpperCase().includes(Yt)}var Pi=function(Ht,Yt,qn,jt,un){return Se.useMemo(function(){if(!qn||jt===!1)return Ht;var An=Yt.options,Yn=Yt.label,ln=Yt.value,fn=[],Hn=typeof jt=="function",tr=qn.toUpperCase(),Zn=Hn?jt:function(Un,dr){return un?Li(dr[un],tr):dr[An]?Li(dr[Yn!=="children"?Yn:"label"],tr):Li(dr[ln],tr)},ir=Hn?function(Un){return tt(Un)}:function(Un){return Un};return Ht.forEach(function(Un){if(Un[An]){var dr=Zn(qn,ir(Un));if(dr)fn.push(Un);else{var Fr=Un[An].filter(function(Nr){return Zn(qn,ir(Nr))});Fr.length&&fn.push((0,He.Z)((0,He.Z)({},Un),{},(0,oe.Z)({},An,Fr)))}return}Zn(qn,ir(Un))&&fn.push(Un)}),fn},[Ht,jt,un,qn,Yt])},Xr=pt(69582),mi=pt(11592),Qe=["children","value"],ii=["children"];function Tr(Ht){var Yt=Ht,qn=Yt.key,jt=Yt.props,un=jt.children,An=jt.value,Yn=(0,de.Z)(jt,Qe);return(0,He.Z)({key:qn,value:An!==void 0?An:qn,children:un},Yn)}function wr(Ht){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,mi.Z)(Ht).map(function(qn,jt){if(!Se.isValidElement(qn)||!qn.type)return null;var un=qn,An=un.type.isSelectOptGroup,Yn=un.key,ln=un.props,fn=ln.children,Hn=(0,de.Z)(ln,ii);return Yt||!An?Tr(qn):(0,He.Z)((0,He.Z)({key:"__RC_SELECT_GRP__".concat(Yn===null?jt:Yn,"__"),label:Yn},Hn),{},{options:wr(fn)})}).filter(function(qn){return qn})}var Er=function(Yt,qn,jt,un,An){return Se.useMemo(function(){var Yn=Yt,ln=!Yt;ln&&(Yn=wr(qn));var fn=new Map,Hn=new Map,tr=function(Un,dr,Fr){Fr&&typeof Fr=="string"&&Un.set(dr[Fr],dr)},Zn=function ir(Un){for(var dr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fr=0;Fr<Un.length;Fr+=1){var Nr=Un[Fr];!Nr[jt.options]||dr?(fn.set(Nr[jt.value],Nr),tr(Hn,Nr,jt.label),tr(Hn,Nr,un),tr(Hn,Nr,An)):ir(Nr[jt.options],!0)}};return Zn(Yn),{options:Yn,valueOptions:fn,labelOptions:Hn}},[Yt,qn,jt,un,An])},kr=Er;function Hi(Ht){var Yt=Se.useRef();Yt.current=Ht;var qn=Se.useCallback(function(){return Yt.current.apply(Yt,arguments)},[]);return qn}function pr(Ht){var Yt=Ht.mode,qn=Ht.options,jt=Ht.children,un=Ht.backfill,An=Ht.allowClear,Yn=Ht.placeholder,ln=Ht.getInputElement,fn=Ht.showSearch,Hn=Ht.onSearch,tr=Ht.defaultOpen,Zn=Ht.autoFocus,ir=Ht.labelInValue,Un=Ht.value,dr=Ht.inputValue,Fr=Ht.optionLabelProp,Nr=isMultiple(Yt),Rr=fn!==void 0?fn:Nr||Yt==="combobox",gn=qn||convertChildrenToData(jt);if(warning(Yt!=="tags"||gn.every(function(an){return!an.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Yt==="tags"||Yt==="combobox"){var Fi=gn.some(function(an){return an.options?an.options.some(function(Qn){return typeof("value"in Qn?Qn.value:Qn.key)=="number"}):typeof("value"in an?an.value:an.key)=="number"});warning(!Fi,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Yt!=="combobox"||!Fr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Yt==="combobox"||!un,"`backfill` only works with `combobox` mode."),warning(Yt==="combobox"||!ln,"`getInputElement` only work with `combobox` mode."),noteOnce(Yt!=="combobox"||!ln||!An||!Yn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Hn&&!Rr&&Yt!=="combobox"&&Yt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!tr||Zn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Un!=null){var ti=toArray(Un);warning(!ir||ti.every(function(an){return _typeof(an)==="object"&&("key"in an||"value"in an)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Nr||Array.isArray(Un),"`value` should be array when `mode` is `multiple` or `tags`")}if(jt){var Mi=null;toNodeArray(jt).some(function(an){if(!React.isValidElement(an)||!an.type)return!1;var Qn=an,or=Qn.type;if(or.isSelectOption)return!1;if(or.isSelectOptGroup){var yr=toNodeArray(an.props.children).every(function(br){return!React.isValidElement(br)||!an.type||br.type.isSelectOption?!0:(Mi=br.type,!1)});return!yr}return Mi=or,!0}),Mi&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Mi.displayName||Mi.name||Mi,"`.")),warning(dr===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Kn(Ht,Yt){if(Ht){var qn=function jt(un){for(var An=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Yn=0;Yn<un.length;Yn++){var ln=un[Yn];if(ln[Yt==null?void 0:Yt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!An&&Array.isArray(ln[Yt==null?void 0:Yt.options])&&jt(ln[Yt==null?void 0:Yt.options],!0))break}};qn(Ht)}}var Qt=null,Wt=["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"],zt=["inputValue"];function Nn(Ht){return!Ht||(0,ve.Z)(Ht)!=="object"}var Vn=Se.forwardRef(function(Ht,Yt){var qn=Ht.id,jt=Ht.mode,un=Ht.prefixCls,An=un===void 0?"rc-select":un,Yn=Ht.backfill,ln=Ht.fieldNames,fn=Ht.inputValue,Hn=Ht.searchValue,tr=Ht.onSearch,Zn=Ht.autoClearSearchValue,ir=Zn===void 0?!0:Zn,Un=Ht.onSelect,dr=Ht.onDeselect,Fr=Ht.dropdownMatchSelectWidth,Nr=Fr===void 0?!0:Fr,Rr=Ht.filterOption,gn=Ht.filterSort,Fi=Ht.optionFilterProp,ti=Ht.optionLabelProp,Mi=Ht.options,an=Ht.optionRender,Qn=Ht.children,or=Ht.defaultActiveFirstOption,yr=Ht.menuItemSelectedIcon,br=Ht.virtual,Ar=Ht.direction,ri=Ht.listHeight,Yr=ri===void 0?200:ri,Jr=Ht.listItemHeight,sr=Jr===void 0?20:Jr,rn=Ht.labelRender,nr=Ht.value,sn=Ht.defaultValue,hr=Ht.labelInValue,Pr=Ht.onChange,zr=Ht.maxCount,Ri=(0,de.Z)(Ht,Wt),Oi=(0,Xr.ZP)(qn),Si=Xt(jt),Di=!!(!Mi&&Qn),en=Se.useMemo(function(){return Rr===void 0&&jt==="combobox"?!1:Rr},[Rr,jt]),pn=Se.useMemo(function(){return _e(ln,Di)},[JSON.stringify(ln),Di]),tn=(0,Ee.Z)("",{value:Hn!==void 0?Hn:fn,postState:function(wi){return wi||""}}),st=(0,Re.Z)(tn,2),Bn=st[0],Pn=st[1],Fn=kr(Mi,Qn,pn,Fi,ti),Jn=Fn.valueOptions,ar=Fn.labelOptions,wn=Fn.options,Rn=Se.useCallback(function(Ei){var wi=Ve(Ei);return wi.map(function(Mn){var Wr,ki,co,ba,aa;if(Nn(Mn))Wr=Mn;else{var ai;co=Mn.key,ki=Mn.label,Wr=(ai=Mn.value)!==null&&ai!==void 0?ai:co}var Wo=Jn.get(Wr);if(Wo){var Ko;if(ki===void 0&&(ki=Wo==null?void 0:Wo[ti||pn.label]),co===void 0&&(co=(Ko=Wo==null?void 0:Wo.key)!==null&&Ko!==void 0?Ko:Wr),ba=Wo==null?void 0:Wo.disabled,aa=Wo==null?void 0:Wo.title,0)var jo}return{label:ki,value:Wr,key:co,disabled:ba,title:aa}})},[pn,ti,Jn]),Gn=(0,Ee.Z)(sn,{value:nr}),Wn=(0,Re.Z)(Gn,2),Xn=Wn[0],Lr=Wn[1],mr=Se.useMemo(function(){var Ei,wi=Si&&Xn===null?[]:Xn,Mn=Rn(wi);return jt==="combobox"&&ft((Ei=Mn[0])===null||Ei===void 0?void 0:Ei.value)?[]:Mn},[Xn,Rn,jt,Si]),lr=vi(mr,Jn),vn=(0,Re.Z)(lr,2),fr=vn[0],Or=vn[1],oi=Se.useMemo(function(){if(!jt&&fr.length===1){var Ei=fr[0];if(Ei.value===null&&(Ei.label===null||Ei.label===void 0))return[]}return fr.map(function(wi){var Mn;return(0,He.Z)((0,He.Z)({},wi),{},{label:(Mn=typeof rn=="function"?rn(wi):wi.label)!==null&&Mn!==void 0?Mn:wi.value})})},[jt,fr,rn]),Qr=Se.useMemo(function(){return new Set(fr.map(function(Ei){return Ei.value}))},[fr]);Se.useEffect(function(){if(jt==="combobox"){var Ei,wi=(Ei=fr[0])===null||Ei===void 0?void 0:Ei.value;Pn(lt(wi)?String(wi):"")}},[fr]);var ui=Hi(function(Ei,wi){var Mn=wi!=null?wi:Ei;return(0,oe.Z)((0,oe.Z)({},pn.value,Ei),pn.label,Mn)}),di=Se.useMemo(function(){if(jt!=="tags")return wn;var Ei=(0,Ut.Z)(wn),wi=function(Wr){return Jn.has(Wr)};return(0,Ut.Z)(fr).sort(function(Mn,Wr){return Mn.value<Wr.value?-1:1}).forEach(function(Mn){var Wr=Mn.value;wi(Wr)||Ei.push(ui(Wr,Mn.label))}),Ei},[ui,wn,Jn,fr,jt]),hi=Pi(di,pn,Bn,en,Fi),_i=Se.useMemo(function(){return jt!=="tags"||!Bn||hi.some(function(Ei){return Ei[Fi||"value"]===Bn})||hi.some(function(Ei){return Ei[pn.value]===Bn})?hi:[ui(Bn)].concat((0,Ut.Z)(hi))},[ui,Fi,jt,hi,Bn,pn]),zi=function Ei(wi){var Mn=(0,Ut.Z)(wi).sort(function(Wr,ki){return gn(Wr,ki,{searchValue:Bn})});return Mn.map(function(Wr){return Array.isArray(Wr.options)?(0,He.Z)((0,He.Z)({},Wr),{},{options:Wr.options.length>0?Ei(Wr.options):Wr.options}):Wr})},mo=Se.useMemo(function(){return gn?zi(_i):_i},[_i,gn,Bn]),$t=Se.useMemo(function(){return Ge(mo,{fieldNames:pn,childrenAsData:Di})},[mo,pn,Di]),yi=function(wi){var Mn=Rn(wi);if(Lr(Mn),Pr&&(Mn.length!==fr.length||Mn.some(function(co,ba){var aa;return((aa=fr[ba])===null||aa===void 0?void 0:aa.value)!==(co==null?void 0:co.value)}))){var Wr=hr?Mn:Mn.map(function(co){return co.value}),ki=Mn.map(function(co){return tt(Or(co.value))});Pr(Si?Wr:Wr[0],Si?ki:ki[0])}},Ti=Se.useState(null),Vr=(0,Re.Z)(Ti,2),Ci=Vr[0],Hr=Vr[1],eo=Se.useState(0),Gi=(0,Re.Z)(eo,2),xi=Gi[0],qi=Gi[1],ga=or!==void 0?or:jt!=="combobox",Ao=Se.useCallback(function(Ei,wi){var Mn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Wr=Mn.source,ki=Wr===void 0?"keyboard":Wr;qi(wi),Yn&&jt==="combobox"&&Ei!==null&&ki==="keyboard"&&Hr(String(Ei))},[Yn,jt]),Aa=function(wi,Mn,Wr){var ki=function(){var is,fo=Or(wi);return[hr?{label:fo==null?void 0:fo[pn.label],value:wi,key:(is=fo==null?void 0:fo.key)!==null&&is!==void 0?is:wi}:wi,tt(fo)]};if(Mn&&Un){var co=ki(),ba=(0,Re.Z)(co,2),aa=ba[0],ai=ba[1];Un(aa,ai)}else if(!Mn&&dr&&Wr!=="clear"){var Wo=ki(),Ko=(0,Re.Z)(Wo,2),jo=Ko[0],io=Ko[1];dr(jo,io)}},ma=Hi(function(Ei,wi){var Mn,Wr=Si?wi.selected:!0;Wr?Mn=Si?[].concat((0,Ut.Z)(fr),[Ei]):[Ei]:Mn=fr.filter(function(ki){return ki.value!==Ei}),yi(Mn),Aa(Ei,Wr),jt==="combobox"?Hr(""):(!Xt||ir)&&(Pn(""),Hr(""))}),Gr=function(wi,Mn){yi(wi);var Wr=Mn.type,ki=Mn.values;(Wr==="remove"||Wr==="clear")&&ki.forEach(function(co){Aa(co.value,!1,Wr)})},to=function(wi,Mn){if(Pn(wi),Hr(null),Mn.source==="submit"){var Wr=(wi||"").trim();if(Wr){var ki=Array.from(new Set([].concat((0,Ut.Z)(Qr),[Wr])));yi(ki),Aa(Wr,!0),Pn("")}return}Mn.source!=="blur"&&(jt==="combobox"&&yi(wi),tr==null||tr(wi))},Co=function(wi){var Mn=wi;jt!=="tags"&&(Mn=wi.map(function(ki){var co=ar.get(ki);return co==null?void 0:co.value}).filter(function(ki){return ki!==void 0}));var Wr=Array.from(new Set([].concat((0,Ut.Z)(Qr),(0,Ut.Z)(Mn))));yi(Wr),Wr.forEach(function(ki){Aa(ki,!0)})},Qo=Se.useMemo(function(){var Ei=br!==!1&&Nr!==!1;return(0,He.Z)((0,He.Z)({},Fn),{},{flattenOptions:$t,onActiveValue:Ao,defaultActiveFirstOption:ga,onSelect:ma,menuItemSelectedIcon:yr,rawValues:Qr,fieldNames:pn,virtual:Ei,direction:Ar,listHeight:Yr,listItemHeight:sr,childrenAsData:Di,maxCount:zr,optionRender:an})},[zr,Fn,$t,Ao,ga,ma,yr,Qr,pn,br,Nr,Ar,Yr,sr,Di,an]);return Se.createElement(Ot.Provider,{value:Qo},Se.createElement(Vt,(0,at.Z)({},Ri,{id:Oi,prefixCls:An,ref:Yt,omitDomProps:zt,mode:jt,displayValues:oi,onDisplayValuesChange:Gr,direction:Ar,searchValue:Bn,onSearch:to,autoClearSearchValue:ir,onSearchSplit:Co,dropdownMatchSelectWidth:Nr,OptionList:ei,emptyOptions:!$t.length,activeValue:Ci,activeDescendantId:"".concat(Oi,"_list_").concat(xi)})))}),vr=Vn;vr.Option=Sn,vr.OptGroup=on;var yn=vr,zn=yn},63158:function(Dn,jn,pt){"use strict";var at=pt(72308),Ut=pt(49618),oe=pt(52487),He=pt(74416),Re=pt(59301),de=pt(92310),ve=pt.n(de),Ee=pt(18929),ke=pt(10228),Se=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ae=Re.forwardRef(function(me,Pe){var fe,z=me.prefixCls,te=z===void 0?"rc-switch":z,se=me.className,ie=me.checked,le=me.defaultChecked,ce=me.disabled,pe=me.loadingIcon,xe=me.checkedChildren,je=me.unCheckedChildren,De=me.onClick,Fe=me.onChange,Te=me.onKeyDown,Me=(0,He.Z)(me,Se),Be=(0,Ee.Z)(!1,{value:ie,defaultValue:le}),Ue=(0,oe.Z)(Be,2),Ye=Ue[0],Ve=Ue[1];function Ze(St,qe){var rt=Ye;return ce||(rt=St,Ve(rt),Fe==null||Fe(rt,qe)),rt}function ot(St){St.which===ke.Z.LEFT?Ze(!1,St):St.which===ke.Z.RIGHT&&Ze(!0,St),Te==null||Te(St)}function lt(St){var qe=Ze(!Ye,St);De==null||De(qe,St)}var ft=ve()(te,se,(fe={},(0,Ut.Z)(fe,"".concat(te,"-checked"),Ye),(0,Ut.Z)(fe,"".concat(te,"-disabled"),ce),fe));return Re.createElement("button",(0,at.Z)({},Me,{type:"button",role:"switch","aria-checked":Ye,disabled:ce,className:ft,ref:Pe,onKeyDown:ot,onClick:lt}),pe,Re.createElement("span",{className:"".concat(te,"-inner")},Re.createElement("span",{className:"".concat(te,"-inner-checked")},xe),Re.createElement("span",{className:"".concat(te,"-inner-unchecked")},je)))});Ae.displayName="Switch",jn.Z=Ae},67204:function(Dn,jn,pt){"use strict";pt.d(jn,{R:function(){return Ut},w:function(){return at}});var at={},Ut="rc-table-internal-hook"},78612:function(Dn,jn,pt){"use strict";pt.d(jn,{L:function(){return te},Z:function(){return pe}});var at=pt(52487),Ut=pt(49618),oe=pt(80702),He=pt(62853),Re=pt(77321),de=pt(74416),ve=pt(11592),Ee=pt(48736),ke=pt(59301),Se=pt(67204),Ae=pt(90494);function me(xe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof je=="number"?je:je.endsWith("%")?xe*parseFloat(je)/100:null}function Pe(xe,je,De){return ke.useMemo(function(){if(je&&je>0){var Fe=0,Te=0;xe.forEach(function(lt){var ft=me(je,lt.width);ft?Fe+=ft:Te+=1});var Me=Math.max(je,De),Be=Math.max(Me-Fe,Te),Ue=Te,Ye=Be/Te,Ve=0,Ze=xe.map(function(lt){var ft=(0,Re.Z)({},lt),St=me(je,ft.width);if(St)ft.width=St;else{var qe=Math.floor(Ye);ft.width=Ue===1?Be:qe,Be-=qe,Ue-=1}return Ve+=ft.width,ft});if(Ve<Me){var ot=Me/Ve;Be=Me,Ze.forEach(function(lt,ft){var St=Math.floor(lt.width*ot);lt.width=ft===Ze.length-1?Be:St,Be-=St})}return[Ze,Math.max(Ve,Me)]}return[xe,je]},[xe,je,De])}var fe=["children"],z=["fixed"];function te(xe){return(0,ve.Z)(xe).filter(function(je){return ke.isValidElement(je)}).map(function(je){var De=je.key,Fe=je.props,Te=Fe.children,Me=(0,de.Z)(Fe,fe),Be=(0,Re.Z)({key:De},Me);return Te&&(Be.children=te(Te)),Be})}function se(xe){return xe.filter(function(je){return je&&(0,He.Z)(je)==="object"&&!je.hidden}).map(function(je){var De=je.children;return De&&De.length>0?(0,Re.Z)((0,Re.Z)({},je),{},{children:se(De)}):je})}function ie(xe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return xe.filter(function(De){return De&&(0,He.Z)(De)==="object"}).reduce(function(De,Fe,Te){var Me=Fe.fixed,Be=Me===!0?"left":Me,Ue="".concat(je,"-").concat(Te),Ye=Fe.children;return Ye&&Ye.length>0?[].concat((0,oe.Z)(De),(0,oe.Z)(ie(Ye,Ue).map(function(Ve){return(0,Re.Z)({fixed:Be},Ve)}))):[].concat((0,oe.Z)(De),[(0,Re.Z)((0,Re.Z)({key:Ue},Fe),{},{fixed:Be})])},[])}function le(xe){return xe.map(function(je){var De=je.fixed,Fe=(0,de.Z)(je,z),Te=De;return De==="left"?Te="right":De==="right"&&(Te="left"),(0,Re.Z)({fixed:Te},Fe)})}function ce(xe,je){var De=xe.prefixCls,Fe=xe.columns,Te=xe.children,Me=xe.expandable,Be=xe.expandedKeys,Ue=xe.columnTitle,Ye=xe.getRowKey,Ve=xe.onTriggerExpand,Ze=xe.expandIcon,ot=xe.rowExpandable,lt=xe.expandIconColumnIndex,ft=xe.direction,St=xe.expandRowByClick,qe=xe.columnWidth,rt=xe.fixed,wt=xe.scrollWidth,Ct=xe.clientWidth,bt=ke.useMemo(function(){var et=Fe||te(Te)||[];return se(et.slice())},[Fe,Te]),ct=ke.useMemo(function(){if(Me){var et=bt.slice();if(!et.includes(Se.w)){var We=lt||0;We>=0&&(We||rt==="left"||!rt)&&et.splice(We,0,Se.w),rt==="right"&&et.splice(bt.length,0,Se.w)}var we=et.indexOf(Se.w);et=et.filter(function(Ie,_e){return Ie!==Se.w||_e===we});var Ne=bt[we],Xe;rt?Xe=rt:Xe=Ne?Ne.fixed:null;var nt=(0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)({},Ae.v,{className:"".concat(De,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Ue),"fixed",Xe),"className","".concat(De,"-row-expand-icon-cell")),"width",qe),"render",function(_e,Ge,tt){var ht=Ye(Ge,tt),ut=Be.has(ht),Ot=ot?ot(Ge):!0,Et=Ze({prefixCls:De,expanded:ut,expandable:Ot,record:Ge,onExpand:Ve});return St?ke.createElement("span",{onClick:function(qt){return qt.stopPropagation()}},Et):Et});return et.map(function(Ie){return Ie===Se.w?nt:Ie})}return bt.filter(function(Ie){return Ie!==Se.w})},[Me,bt,Ye,Be,Ze,ft]),xt=ke.useMemo(function(){var et=ct;return je&&(et=je(et)),et.length||(et=[{render:function(){return null}}]),et},[je,ct,ft]),dt=ke.useMemo(function(){return ft==="rtl"?le(ie(xt)):ie(xt)},[xt,ft,wt]),Mt=ke.useMemo(function(){for(var et=-1,We=dt.length-1;We>=0;We-=1){var we=dt[We].fixed;if(we==="left"||we===!0){et=We;break}}if(et>=0)for(var Ne=0;Ne<=et;Ne+=1){var Xe=dt[Ne].fixed;if(Xe!=="left"&&Xe!==!0)return!0}var nt=dt.findIndex(function(Ge){var tt=Ge.fixed;return tt==="right"});if(nt>=0)for(var Ie=nt;Ie<dt.length;Ie+=1){var _e=dt[Ie].fixed;if(_e!=="right")return!0}return!1},[dt]),yt=Pe(dt,wt,Ct),Dt=(0,at.Z)(yt,2),mt=Dt[0],vt=Dt[1];return[xt,mt,vt,Mt]}var pe=ce},16596:function(Dn,jn,pt){"use strict";pt.d(jn,{w2:function(){return at.w},vP:function(){return ei.v},RQ:function(){return at.R},ER:function(){return ht},Q$:function(){return ti},TN:function(){return Oi}});var at=pt(67204),Ut=pt(52487),oe=pt(6089),He=pt(34280),Re=pt(13697),de=pt(59301),ve=pt(4676);function Ee(en){var pn=de.createContext(void 0),tn=function(Bn){var Pn=Bn.value,Fn=Bn.children,Jn=de.useRef(Pn);Jn.current=Pn;var ar=de.useState(function(){return{getValue:function(){return Jn.current},listeners:new Set}}),wn=(0,Ut.Z)(ar,1),Rn=wn[0];return(0,He.Z)(function(){(0,ve.unstable_batchedUpdates)(function(){Rn.listeners.forEach(function(Gn){Gn(Pn)})})},[Pn]),de.createElement(pn.Provider,{value:Rn},Fn)};return{Context:pn,Provider:tn,defaultValue:en}}function ke(en,pn){var tn=(0,oe.Z)(typeof pn=="function"?pn:function(Gn){if(pn===void 0)return Gn;if(!Array.isArray(pn))return Gn[pn];var Wn={};return pn.forEach(function(Xn){Wn[Xn]=Gn[Xn]}),Wn}),st=de.useContext(en==null?void 0:en.Context),Bn=st||{},Pn=Bn.listeners,Fn=Bn.getValue,Jn=de.useRef();Jn.current=tn(st?Fn():en==null?void 0:en.defaultValue);var ar=de.useState({}),wn=(0,Ut.Z)(ar,2),Rn=wn[1];return(0,He.Z)(function(){if(!st)return;function Gn(Wn){var Xn=tn(Wn);(0,Re.Z)(Jn.current,Xn,!0)||Rn({})}return Pn.add(Gn),function(){Pn.delete(Gn)}},[st]),Jn.current}var Se=pt(72308),Ae=pt(8654);function me(){var en=de.createContext(null);function pn(){return de.useContext(en)}function tn(Bn,Pn){var Fn=(0,Ae.Yr)(Bn),Jn=function(wn,Rn){var Gn=Fn?{ref:Rn}:{},Wn=de.useRef(0),Xn=de.useRef(wn),Lr=pn();return Lr!==null?de.createElement(Bn,(0,Se.Z)({},wn,Gn)):((!Pn||Pn(Xn.current,wn))&&(Wn.current+=1),Xn.current=wn,de.createElement(en.Provider,{value:Wn.current},de.createElement(Bn,(0,Se.Z)({},wn,Gn))))};return Fn?de.forwardRef(Jn):Jn}function st(Bn,Pn){var Fn=(0,Ae.Yr)(Bn),Jn=function(wn,Rn){var Gn=Fn?{ref:Rn}:{};return pn(),de.createElement(Bn,(0,Se.Z)({},wn,Gn))};return Fn?de.memo(de.forwardRef(Jn),Pn):de.memo(Jn,Pn)}return{makeImmutable:tn,responseImmutable:st,useImmutableMark:pn}}var Pe=me(),fe=Pe.makeImmutable,z=Pe.responseImmutable,te=Pe.useImmutableMark,se=me(),ie=se.makeImmutable,le=se.responseImmutable,ce=se.useImmutableMark,pe=Ee(),xe=pe;function je(en,pn){var tn=React.useRef(0);tn.current+=1;var st=React.useRef(en),Bn=[];Object.keys(en||{}).map(function(Fn){var Jn;(en==null?void 0:en[Fn])!==((Jn=st.current)===null||Jn===void 0?void 0:Jn[Fn])&&Bn.push(Fn)}),st.current=en;var Pn=React.useRef([]);return Bn.length&&(Pn.current=Bn),React.useDebugValue(tn.current),React.useDebugValue(Pn.current.join(", ")),pn&&console.log("".concat(pn,":"),tn.current,Pn.current),tn.current}var De=null,Fe=null,Te=pt(62853),Me=pt(77321),Be=pt(49618),Ue=pt(92310),Ye=pt.n(Ue),Ve=pt(80547),Ze=pt(97938),ot=pt(48736),lt=de.createContext({renderWithProps:!1}),ft=lt,St="RC_TABLE_KEY";function qe(en){return en==null?[]:Array.isArray(en)?en:[en]}function rt(en){var pn=[],tn={};return en.forEach(function(st){for(var Bn=st||{},Pn=Bn.key,Fn=Bn.dataIndex,Jn=Pn||qe(Fn).join("-")||St;tn[Jn];)Jn="".concat(Jn,"_next");tn[Jn]=!0,pn.push(Jn)}),pn}function wt(en){return en!=null}function Ct(en){return typeof en=="number"&&!Number.isNaN(en)}function bt(en){return en&&(0,Te.Z)(en)==="object"&&!Array.isArray(en)&&!de.isValidElement(en)}function ct(en,pn,tn,st,Bn,Pn){var Fn=de.useContext(ft),Jn=ce(),ar=(0,Ve.Z)(function(){if(wt(st))return[st];var wn=pn==null||pn===""?[]:Array.isArray(pn)?pn:[pn],Rn=(0,Ze.Z)(en,wn),Gn=Rn,Wn=void 0;if(Bn){var Xn=Bn(Rn,en,tn);bt(Xn)?(Gn=Xn.children,Wn=Xn.props,Fn.renderWithProps=!0):Gn=Xn}return[Gn,Wn]},[Jn,en,st,pn,Bn,tn],function(wn,Rn){if(Pn){var Gn=(0,Ut.Z)(wn,2),Wn=Gn[1],Xn=(0,Ut.Z)(Rn,2),Lr=Xn[1];return Pn(Lr,Wn)}return Fn.renderWithProps?!0:!(0,Re.Z)(wn,Rn,!0)});return ar}function xt(en,pn,tn,st){var Bn=en+pn-1;return en<=st&&Bn>=tn}function dt(en,pn){return ke(xe,function(tn){var st=xt(en,pn||1,tn.hoverStartRow,tn.hoverEndRow);return[st,tn.onHover]})}var Mt=pt(70425),yt=function(pn){var tn=pn.ellipsis,st=pn.rowType,Bn=pn.children,Pn,Fn=tn===!0?{showTitle:!0}:tn;return Fn&&(Fn.showTitle||st==="header")&&(typeof Bn=="string"||typeof Bn=="number"?Pn=Bn.toString():de.isValidElement(Bn)&&typeof Bn.props.children=="string"&&(Pn=Bn.props.children)),Pn};function Dt(en){var pn,tn,st,Bn,Pn,Fn,Jn,ar,wn=en.component,Rn=en.children,Gn=en.ellipsis,Wn=en.scope,Xn=en.prefixCls,Lr=en.className,mr=en.align,lr=en.record,vn=en.render,fr=en.dataIndex,Or=en.renderIndex,oi=en.shouldCellUpdate,Qr=en.index,ui=en.rowType,di=en.colSpan,hi=en.rowSpan,_i=en.fixLeft,zi=en.fixRight,mo=en.firstFixLeft,$t=en.lastFixLeft,yi=en.firstFixRight,Ti=en.lastFixRight,Vr=en.appendNode,Ci=en.additionalProps,Hr=Ci===void 0?{}:Ci,eo=en.isSticky,Gi="".concat(Xn,"-cell"),xi=ke(xe,["supportSticky","allColumnsFixedLeft","rowHoverable"]),qi=xi.supportSticky,ga=xi.allColumnsFixedLeft,Ao=xi.rowHoverable,Aa=ct(lr,fr,Or,Rn,vn,oi),ma=(0,Ut.Z)(Aa,2),Gr=ma[0],to=ma[1],Co={},Qo=typeof _i=="number"&&qi,Ei=typeof zi=="number"&&qi;Qo&&(Co.position="sticky",Co.left=_i),Ei&&(Co.position="sticky",Co.right=zi);var wi=(pn=(tn=(st=to==null?void 0:to.colSpan)!==null&&st!==void 0?st:Hr.colSpan)!==null&&tn!==void 0?tn:di)!==null&&pn!==void 0?pn:1,Mn=(Bn=(Pn=(Fn=to==null?void 0:to.rowSpan)!==null&&Fn!==void 0?Fn:Hr.rowSpan)!==null&&Pn!==void 0?Pn:hi)!==null&&Bn!==void 0?Bn:1,Wr=dt(Qr,Mn),ki=(0,Ut.Z)(Wr,2),co=ki[0],ba=ki[1],aa=(0,Mt.zX)(function(is){var fo;lr&&ba(Qr,Qr+Mn-1),Hr==null||(fo=Hr.onMouseEnter)===null||fo===void 0||fo.call(Hr,is)}),ai=(0,Mt.zX)(function(is){var fo;lr&&ba(-1,-1),Hr==null||(fo=Hr.onMouseLeave)===null||fo===void 0||fo.call(Hr,is)});if(wi===0||Mn===0)return null;var Wo=(Jn=Hr.title)!==null&&Jn!==void 0?Jn:yt({rowType:ui,ellipsis:Gn,children:Gr}),Ko=Ye()(Gi,Lr,(ar={},(0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)(ar,"".concat(Gi,"-fix-left"),Qo&&qi),"".concat(Gi,"-fix-left-first"),mo&&qi),"".concat(Gi,"-fix-left-last"),$t&&qi),"".concat(Gi,"-fix-left-all"),$t&&ga&&qi),"".concat(Gi,"-fix-right"),Ei&&qi),"".concat(Gi,"-fix-right-first"),yi&&qi),"".concat(Gi,"-fix-right-last"),Ti&&qi),"".concat(Gi,"-ellipsis"),Gn),"".concat(Gi,"-with-append"),Vr),"".concat(Gi,"-fix-sticky"),(Qo||Ei)&&eo&&qi),(0,Be.Z)(ar,"".concat(Gi,"-row-hover"),!to&&co)),Hr.className,to==null?void 0:to.className),jo={};mr&&(jo.textAlign=mr);var io=(0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({},to==null?void 0:to.style),Co),jo),Hr.style),Pa=Gr;return(0,Te.Z)(Pa)==="object"&&!Array.isArray(Pa)&&!de.isValidElement(Pa)&&(Pa=null),Gn&&($t||yi)&&(Pa=de.createElement("span",{className:"".concat(Gi,"-content")},Pa)),de.createElement(wn,(0,Se.Z)({},to,Hr,{className:Ko,style:io,title:Wo,scope:Wn,onMouseEnter:Ao?aa:void 0,onMouseLeave:Ao?ai:void 0,colSpan:wi!==1?wi:null,rowSpan:Mn!==1?Mn:null}),Vr,Pa)}var mt=de.memo(Dt);function vt(en,pn,tn,st,Bn){var Pn=tn[en]||{},Fn=tn[pn]||{},Jn,ar;Pn.fixed==="left"?Jn=st.left[Bn==="rtl"?pn:en]:Fn.fixed==="right"&&(ar=st.right[Bn==="rtl"?en:pn]);var wn=!1,Rn=!1,Gn=!1,Wn=!1,Xn=tn[pn+1],Lr=tn[en-1],mr=Xn&&!Xn.fixed||Lr&&!Lr.fixed||tn.every(function(oi){return oi.fixed==="left"});if(Bn==="rtl"){if(Jn!==void 0){var lr=Lr&&Lr.fixed==="left";Wn=!lr&&mr}else if(ar!==void 0){var vn=Xn&&Xn.fixed==="right";Gn=!vn&&mr}}else if(Jn!==void 0){var fr=Xn&&Xn.fixed==="left";wn=!fr&&mr}else if(ar!==void 0){var Or=Lr&&Lr.fixed==="right";Rn=!Or&&mr}return{fixLeft:Jn,fixRight:ar,lastFixLeft:wn,firstFixRight:Rn,lastFixRight:Gn,firstFixLeft:Wn,isSticky:st.isSticky}}var et=de.createContext({}),We=et;function we(en){var pn=en.className,tn=en.index,st=en.children,Bn=en.colSpan,Pn=Bn===void 0?1:Bn,Fn=en.rowSpan,Jn=en.align,ar=ke(xe,["prefixCls","direction"]),wn=ar.prefixCls,Rn=ar.direction,Gn=de.useContext(We),Wn=Gn.scrollColumnIndex,Xn=Gn.stickyOffsets,Lr=Gn.flattenColumns,mr=tn+Pn-1,lr=mr+1===Wn?Pn+1:Pn,vn=vt(tn,tn+lr-1,Lr,Xn,Rn);return de.createElement(mt,(0,Se.Z)({className:pn,index:tn,component:"td",prefixCls:wn,record:null,dataIndex:null,align:Jn,colSpan:lr,rowSpan:Fn,render:function(){return st}},vn))}var Ne=pt(74416),Xe=["children"];function nt(en){var pn=en.children,tn=(0,Ne.Z)(en,Xe);return de.createElement("tr",tn,pn)}function Ie(en){var pn=en.children;return pn}Ie.Row=nt,Ie.Cell=we;var _e=Ie;function Ge(en){var pn=en.children,tn=en.stickyOffsets,st=en.flattenColumns,Bn=ke(xe,"prefixCls"),Pn=st.length-1,Fn=st[Pn],Jn=de.useMemo(function(){return{stickyOffsets:tn,flattenColumns:st,scrollColumnIndex:Fn!=null&&Fn.scrollbar?Pn:null}},[Fn,st,Pn,tn]);return de.createElement(We.Provider,{value:Jn},de.createElement("tfoot",{className:"".concat(Bn,"-summary")},pn))}var tt=le(Ge),ht=_e,ut=pt(29301),Ot=pt(29194),Et=pt(24514),Ft=pt(75152),qt=pt(26112);function Xt(en,pn,tn,st,Bn,Pn,Fn){en.push({record:pn,indent:tn,index:Fn});var Jn=Pn(pn),ar=Bn==null?void 0:Bn.has(Jn);if(pn&&Array.isArray(pn[st])&&ar)for(var wn=0;wn<pn[st].length;wn+=1)Xt(en,pn[st][wn],tn+1,st,Bn,Pn,wn)}function Kt(en,pn,tn,st){var Bn=de.useMemo(function(){if(tn!=null&&tn.size){for(var Pn=[],Fn=0;Fn<(en==null?void 0:en.length);Fn+=1){var Jn=en[Fn];Xt(Pn,Jn,0,pn,tn,st,Fn)}return Pn}return en==null?void 0:en.map(function(ar,wn){return{record:ar,indent:0,index:wn}})},[en,pn,tn,st]);return Bn}function Vt(en,pn,tn,st){var Bn=ke(xe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Pn=Bn.flattenColumns,Fn=Bn.expandableType,Jn=Bn.expandedKeys,ar=Bn.childrenColumnName,wn=Bn.onTriggerExpand,Rn=Bn.rowExpandable,Gn=Bn.onRow,Wn=Bn.expandRowByClick,Xn=Bn.rowClassName,Lr=Fn==="nest",mr=Fn==="row"&&(!Rn||Rn(en)),lr=mr||Lr,vn=Jn&&Jn.has(pn),fr=ar&&en&&en[ar],Or=(0,Mt.zX)(wn),oi=Gn==null?void 0:Gn(en,tn),Qr=oi==null?void 0:oi.onClick,ui=function(zi){Wn&&lr&&wn(en,zi);for(var mo=arguments.length,$t=new Array(mo>1?mo-1:0),yi=1;yi<mo;yi++)$t[yi-1]=arguments[yi];Qr==null||Qr.apply(void 0,[zi].concat($t))},di;typeof Xn=="string"?di=Xn:typeof Xn=="function"&&(di=Xn(en,tn,st));var hi=rt(Pn);return(0,Me.Z)((0,Me.Z)({},Bn),{},{columnsKey:hi,nestExpandable:Lr,expanded:vn,hasNestChildren:fr,record:en,onTriggerExpand:Or,rowSupportExpand:mr,expandable:lr,rowProps:(0,Me.Z)((0,Me.Z)({},oi),{},{className:Ye()(di,oi==null?void 0:oi.className),onClick:ui})})}function hn(en){var pn=en.prefixCls,tn=en.children,st=en.component,Bn=en.cellComponent,Pn=en.className,Fn=en.expanded,Jn=en.colSpan,ar=en.isEmpty,wn=ke(xe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Rn=wn.scrollbarSize,Gn=wn.fixHeader,Wn=wn.fixColumn,Xn=wn.componentWidth,Lr=wn.horizonScroll,mr=tn;return(ar?Lr&&Xn:Wn)&&(mr=de.createElement("div",{style:{width:Xn-(Gn&&!ar?Rn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(pn,"-expanded-row-fixed")},mr)),de.createElement(st,{className:Pn,style:{display:Fn?null:"none"}},de.createElement(mt,{component:Bn,prefixCls:pn,colSpan:Jn},mr))}var on=hn;function cn(en){var pn=en.prefixCls,tn=en.record,st=en.onExpand,Bn=en.expanded,Pn=en.expandable,Fn="".concat(pn,"-row-expand-icon");if(!Pn)return de.createElement("span",{className:Ye()(Fn,"".concat(pn,"-row-spaced"))});var Jn=function(wn){st(tn,wn),wn.stopPropagation()};return de.createElement("span",{className:Ye()(Fn,(0,Be.Z)((0,Be.Z)({},"".concat(pn,"-row-expanded"),Bn),"".concat(pn,"-row-collapsed"),!Bn)),onClick:Jn})}function Sn(en,pn,tn){var st=[];function Bn(Pn){(Pn||[]).forEach(function(Fn,Jn){st.push(pn(Fn,Jn)),Bn(Fn[tn])})}return Bn(en),st}function Cn(en,pn,tn,st){return typeof en=="string"?en:typeof en=="function"?en(pn,tn,st):""}function kn(en,pn,tn,st,Bn){var Pn=en.record,Fn=en.prefixCls,Jn=en.columnsKey,ar=en.fixedInfoList,wn=en.expandIconColumnIndex,Rn=en.nestExpandable,Gn=en.indentSize,Wn=en.expandIcon,Xn=en.expanded,Lr=en.hasNestChildren,mr=en.onTriggerExpand,lr=Jn[tn],vn=ar[tn],fr;tn===(wn||0)&&Rn&&(fr=de.createElement(de.Fragment,null,de.createElement("span",{style:{paddingLeft:"".concat(Gn*st,"px")},className:"".concat(Fn,"-row-indent indent-level-").concat(st)}),Wn({prefixCls:Fn,expanded:Xn,expandable:Lr,record:Pn,onExpand:mr})));var Or;return pn.onCell&&(Or=pn.onCell(Pn,Bn)),{key:lr,fixedInfo:vn,appendCellNode:fr,additionalCellProps:Or||{}}}function In(en){var pn=en.className,tn=en.style,st=en.record,Bn=en.index,Pn=en.renderIndex,Fn=en.rowKey,Jn=en.indent,ar=Jn===void 0?0:Jn,wn=en.rowComponent,Rn=en.cellComponent,Gn=en.scopeCellComponent,Wn=Vt(st,Fn,Bn,ar),Xn=Wn.prefixCls,Lr=Wn.flattenColumns,mr=Wn.expandedRowClassName,lr=Wn.expandedRowRender,vn=Wn.rowProps,fr=Wn.expanded,Or=Wn.rowSupportExpand,oi=de.useRef(!1);oi.current||(oi.current=fr);var Qr=Cn(mr,st,Bn,ar),ui=de.createElement(wn,(0,Se.Z)({},vn,{"data-row-key":Fn,className:Ye()(pn,"".concat(Xn,"-row"),"".concat(Xn,"-row-level-").concat(ar),vn==null?void 0:vn.className,(0,Be.Z)({},Qr,ar>=1)),style:(0,Me.Z)((0,Me.Z)({},tn),vn==null?void 0:vn.style)}),Lr.map(function(_i,zi){var mo=_i.render,$t=_i.dataIndex,yi=_i.className,Ti=kn(Wn,_i,zi,ar,Bn),Vr=Ti.key,Ci=Ti.fixedInfo,Hr=Ti.appendCellNode,eo=Ti.additionalCellProps;return de.createElement(mt,(0,Se.Z)({className:yi,ellipsis:_i.ellipsis,align:_i.align,scope:_i.rowScope,component:_i.rowScope?Gn:Rn,prefixCls:Xn,key:Vr,record:st,index:Bn,renderIndex:Pn,dataIndex:$t,render:mo,shouldCellUpdate:_i.shouldCellUpdate},Ci,{appendNode:Hr,additionalProps:eo}))})),di;if(Or&&(oi.current||fr)){var hi=lr(st,Bn,ar+1,fr);di=de.createElement(on,{expanded:fr,className:Ye()("".concat(Xn,"-expanded-row"),"".concat(Xn,"-expanded-row-level-").concat(ar+1),Qr),prefixCls:Xn,component:wn,cellComponent:Rn,colSpan:Lr.length,isEmpty:!1},hi)}return de.createElement(de.Fragment,null,ui,di)}var _r=le(In);function xr(en){var pn=en.columnKey,tn=en.onColumnResize,st=de.useRef();return de.useEffect(function(){st.current&&tn(pn,st.current.offsetWidth)},[]),de.createElement(ut.Z,{data:pn},de.createElement("td",{ref:st,style:{padding:0,border:0,height:0}},de.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function qr(en){var pn=en.prefixCls,tn=en.columnsKey,st=en.onColumnResize;return de.createElement("tr",{"aria-hidden":"true",className:"".concat(pn,"-measure-row"),style:{height:0,fontSize:0}},de.createElement(ut.Z.Collection,{onBatchResize:function(Pn){Pn.forEach(function(Fn){var Jn=Fn.data,ar=Fn.size;st(Jn,ar.offsetWidth)})}},tn.map(function(Bn){return de.createElement(xr,{key:Bn,columnKey:Bn,onColumnResize:st})})))}function er(en){var pn=en.data,tn=en.measureColumnWidth,st=ke(xe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Bn=st.prefixCls,Pn=st.getComponent,Fn=st.onColumnResize,Jn=st.flattenColumns,ar=st.getRowKey,wn=st.expandedKeys,Rn=st.childrenColumnName,Gn=st.emptyNode,Wn=Kt(pn,Rn,wn,ar),Xn=de.useRef({renderWithProps:!1}),Lr=Pn(["body","wrapper"],"tbody"),mr=Pn(["body","row"],"tr"),lr=Pn(["body","cell"],"td"),vn=Pn(["body","cell"],"th"),fr;pn.length?fr=Wn.map(function(oi,Qr){var ui=oi.record,di=oi.indent,hi=oi.index,_i=ar(ui,Qr);return de.createElement(_r,{key:_i,rowKey:_i,record:ui,index:Qr,renderIndex:hi,rowComponent:mr,cellComponent:lr,scopeCellComponent:vn,indent:di})}):fr=de.createElement(on,{expanded:!0,className:"".concat(Bn,"-placeholder"),prefixCls:Bn,component:mr,cellComponent:lr,colSpan:Jn.length,isEmpty:!0},Gn);var Or=rt(Jn);return de.createElement(ft.Provider,{value:Xn.current},de.createElement(Lr,{className:"".concat(Bn,"-tbody")},tn&&de.createElement(qr,{prefixCls:Bn,columnsKey:Or,onColumnResize:Fn}),fr))}var si=le(er),ei=pt(90494),vi=["columnType"];function Li(en){for(var pn=en.colWidths,tn=en.columns,st=en.columCount,Bn=ke(xe,["tableLayout"]),Pn=Bn.tableLayout,Fn=[],Jn=st||tn.length,ar=!1,wn=Jn-1;wn>=0;wn-=1){var Rn=pn[wn],Gn=tn&&tn[wn],Wn=void 0,Xn=void 0;if(Gn&&(Wn=Gn[ei.v],Pn==="auto"&&(Xn=Gn.minWidth)),Rn||Xn||Wn||ar){var Lr=Wn||{},mr=Lr.columnType,lr=(0,Ne.Z)(Lr,vi);Fn.unshift(de.createElement("col",(0,Se.Z)({key:wn,style:{width:Rn,minWidth:Xn}},lr))),ar=!0}}return de.createElement("colgroup",null,Fn)}var Pi=Li,Xr=pt(80702),mi=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Qe(en,pn){return(0,de.useMemo)(function(){for(var tn=[],st=0;st<pn;st+=1){var Bn=en[st];if(Bn!==void 0)tn[st]=Bn;else return null}return tn},[en.join("_"),pn])}var ii=de.forwardRef(function(en,pn){var tn=en.className,st=en.noData,Bn=en.columns,Pn=en.flattenColumns,Fn=en.colWidths,Jn=en.columCount,ar=en.stickyOffsets,wn=en.direction,Rn=en.fixHeader,Gn=en.stickyTopOffset,Wn=en.stickyBottomOffset,Xn=en.stickyClassName,Lr=en.onScroll,mr=en.maxContentScroll,lr=en.children,vn=(0,Ne.Z)(en,mi),fr=ke(xe,["prefixCls","scrollbarSize","isSticky","getComponent"]),Or=fr.prefixCls,oi=fr.scrollbarSize,Qr=fr.isSticky,ui=fr.getComponent,di=ui(["header","table"],"table"),hi=Qr&&!Rn?0:oi,_i=de.useRef(null),zi=de.useCallback(function(eo){(0,Ae.mH)(pn,eo),(0,Ae.mH)(_i,eo)},[]);de.useEffect(function(){var eo;function Gi(xi){var qi=xi,ga=qi.currentTarget,Ao=qi.deltaX;Ao&&(Lr({currentTarget:ga,scrollLeft:ga.scrollLeft+Ao}),xi.preventDefault())}return(eo=_i.current)===null||eo===void 0||eo.addEventListener("wheel",Gi,{passive:!1}),function(){var xi;(xi=_i.current)===null||xi===void 0||xi.removeEventListener("wheel",Gi)}},[]);var mo=de.useMemo(function(){return Pn.every(function(eo){return eo.width})},[Pn]),$t=Pn[Pn.length-1],yi={fixed:$t?$t.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Or,"-cell-scrollbar")}}},Ti=(0,de.useMemo)(function(){return hi?[].concat((0,Xr.Z)(Bn),[yi]):Bn},[hi,Bn]),Vr=(0,de.useMemo)(function(){return hi?[].concat((0,Xr.Z)(Pn),[yi]):Pn},[hi,Pn]),Ci=(0,de.useMemo)(function(){var eo=ar.right,Gi=ar.left;return(0,Me.Z)((0,Me.Z)({},ar),{},{left:wn==="rtl"?[].concat((0,Xr.Z)(Gi.map(function(xi){return xi+hi})),[0]):Gi,right:wn==="rtl"?eo:[].concat((0,Xr.Z)(eo.map(function(xi){return xi+hi})),[0]),isSticky:Qr})},[hi,ar,Qr]),Hr=Qe(Fn,Jn);return de.createElement("div",{style:(0,Me.Z)({overflow:"hidden"},Qr?{top:Gn,bottom:Wn}:{}),ref:zi,className:Ye()(tn,(0,Be.Z)({},Xn,!!Xn))},de.createElement(di,{style:{tableLayout:"fixed",visibility:st||Hr?null:"hidden"}},(!st||!mr||mo)&&de.createElement(Pi,{colWidths:Hr?[].concat((0,Xr.Z)(Hr),[hi]):[],columCount:Jn+1,columns:Vr}),lr((0,Me.Z)((0,Me.Z)({},vn),{},{stickyOffsets:Ci,columns:Ti,flattenColumns:Vr}))))}),Tr=de.memo(ii),wr=function(pn){var tn=pn.cells,st=pn.stickyOffsets,Bn=pn.flattenColumns,Pn=pn.rowComponent,Fn=pn.cellComponent,Jn=pn.onHeaderRow,ar=pn.index,wn=ke(xe,["prefixCls","direction"]),Rn=wn.prefixCls,Gn=wn.direction,Wn;Jn&&(Wn=Jn(tn.map(function(Lr){return Lr.column}),ar));var Xn=rt(tn.map(function(Lr){return Lr.column}));return de.createElement(Pn,Wn,tn.map(function(Lr,mr){var lr=Lr.column,vn=vt(Lr.colStart,Lr.colEnd,Bn,st,Gn),fr;return lr&&lr.onHeaderCell&&(fr=Lr.column.onHeaderCell(lr)),de.createElement(mt,(0,Se.Z)({},Lr,{scope:lr.title?Lr.colSpan>1?"colgroup":"col":null,ellipsis:lr.ellipsis,align:lr.align,component:Fn,prefixCls:Rn,key:Xn[mr]},vn,{additionalProps:fr,rowType:"header"}))}))},Er=wr;function kr(en){var pn=[];function tn(Fn,Jn){var ar=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;pn[ar]=pn[ar]||[];var wn=Jn,Rn=Fn.filter(Boolean).map(function(Gn){var Wn={key:Gn.key,className:Gn.className||"",children:Gn.title,column:Gn,colStart:wn},Xn=1,Lr=Gn.children;return Lr&&Lr.length>0&&(Xn=tn(Lr,wn,ar+1).reduce(function(mr,lr){return mr+lr},0),Wn.hasSubColumns=!0),"colSpan"in Gn&&(Xn=Gn.colSpan),"rowSpan"in Gn&&(Wn.rowSpan=Gn.rowSpan),Wn.colSpan=Xn,Wn.colEnd=Wn.colStart+Xn-1,pn[ar].push(Wn),wn+=Xn,Xn});return Rn}tn(en,0);for(var st=pn.length,Bn=function(Jn){pn[Jn].forEach(function(ar){!("rowSpan"in ar)&&!ar.hasSubColumns&&(ar.rowSpan=st-Jn)})},Pn=0;Pn<st;Pn+=1)Bn(Pn);return pn}var Hi=function(pn){var tn=pn.stickyOffsets,st=pn.columns,Bn=pn.flattenColumns,Pn=pn.onHeaderRow,Fn=ke(xe,["prefixCls","getComponent"]),Jn=Fn.prefixCls,ar=Fn.getComponent,wn=de.useMemo(function(){return kr(st)},[st]),Rn=ar(["header","wrapper"],"thead"),Gn=ar(["header","row"],"tr"),Wn=ar(["header","cell"],"th");return de.createElement(Rn,{className:"".concat(Jn,"-thead")},wn.map(function(Xn,Lr){var mr=de.createElement(Er,{key:Lr,flattenColumns:Bn,cells:Xn,stickyOffsets:tn,rowComponent:Gn,cellComponent:Wn,onHeaderRow:Pn,index:Lr});return mr}))},pr=le(Hi),Kn=pt(78612);function Qt(en,pn,tn){var st=(0,ei.g)(en),Bn=st.expandIcon,Pn=st.expandedRowKeys,Fn=st.defaultExpandedRowKeys,Jn=st.defaultExpandAllRows,ar=st.expandedRowRender,wn=st.onExpand,Rn=st.onExpandedRowsChange,Gn=st.childrenColumnName,Wn=Bn||cn,Xn=Gn||"children",Lr=de.useMemo(function(){return ar?"row":en.expandable&&en.internalHooks===at.R&&en.expandable.__PARENT_RENDER_ICON__||pn.some(function(Qr){return Qr&&(0,Te.Z)(Qr)==="object"&&Qr[Xn]})?"nest":!1},[!!ar,pn]),mr=de.useState(function(){return Fn||(Jn?Sn(pn,tn,Xn):[])}),lr=(0,Ut.Z)(mr,2),vn=lr[0],fr=lr[1],Or=de.useMemo(function(){return new Set(Pn||vn||[])},[Pn,vn]),oi=de.useCallback(function(Qr){var ui=tn(Qr,pn.indexOf(Qr)),di,hi=Or.has(ui);hi?(Or.delete(ui),di=(0,Xr.Z)(Or)):di=[].concat((0,Xr.Z)(Or),[ui]),fr(di),wn&&wn(!hi,Qr),Rn&&Rn(di)},[tn,Or,pn,wn,Rn]);return[st,Lr,Or,Wn,Xn,oi]}function Wt(en,pn,tn){var st=en.map(function(Bn,Pn){return vt(Pn,Pn,en,pn,tn)});return(0,Ve.Z)(function(){return st},[st],function(Bn,Pn){return!(0,Re.Z)(Bn,Pn)})}function zt(en){var pn=(0,de.useRef)(en),tn=(0,de.useState)({}),st=(0,Ut.Z)(tn,2),Bn=st[1],Pn=(0,de.useRef)(null),Fn=(0,de.useRef)([]);function Jn(ar){Fn.current.push(ar);var wn=Promise.resolve();Pn.current=wn,wn.then(function(){if(Pn.current===wn){var Rn=Fn.current,Gn=pn.current;Fn.current=[],Rn.forEach(function(Wn){pn.current=Wn(pn.current)}),Pn.current=null,Gn!==pn.current&&Bn({})}})}return(0,de.useEffect)(function(){return function(){Pn.current=null}},[]),[pn.current,Jn]}function Nn(en){var pn=(0,de.useRef)(en||null),tn=(0,de.useRef)();function st(){window.clearTimeout(tn.current)}function Bn(Fn){pn.current=Fn,st(),tn.current=window.setTimeout(function(){pn.current=null,tn.current=void 0},100)}function Pn(){return pn.current}return(0,de.useEffect)(function(){return st},[]),[Bn,Pn]}function Vn(){var en=de.useState(-1),pn=(0,Ut.Z)(en,2),tn=pn[0],st=pn[1],Bn=de.useState(-1),Pn=(0,Ut.Z)(Bn,2),Fn=Pn[0],Jn=Pn[1],ar=de.useCallback(function(wn,Rn){st(wn),Jn(Rn)},[]);return[tn,Fn,ar]}var vr=pt(47273),yn=(0,vr.Z)()?window:null;function zn(en,pn){var tn=(0,Te.Z)(en)==="object"?en:{},st=tn.offsetHeader,Bn=st===void 0?0:st,Pn=tn.offsetSummary,Fn=Pn===void 0?0:Pn,Jn=tn.offsetScroll,ar=Jn===void 0?0:Jn,wn=tn.getContainer,Rn=wn===void 0?function(){return yn}:wn,Gn=Rn()||yn,Wn=!!en;return de.useMemo(function(){return{isSticky:Wn,stickyClassName:Wn?"".concat(pn,"-sticky-holder"):"",offsetHeader:Bn,offsetSummary:Fn,offsetScroll:ar,container:Gn}},[Wn,ar,Bn,Fn,pn,Gn])}function Ht(en,pn,tn){var st=(0,de.useMemo)(function(){var Bn=pn.length,Pn=function(wn,Rn,Gn){for(var Wn=[],Xn=0,Lr=wn;Lr!==Rn;Lr+=Gn)Wn.push(Xn),pn[Lr].fixed&&(Xn+=en[Lr]||0);return Wn},Fn=Pn(0,Bn,1),Jn=Pn(Bn-1,-1,-1).reverse();return tn==="rtl"?{left:Jn,right:Fn}:{left:Fn,right:Jn}},[en,pn,tn]);return st}var Yt=Ht;function qn(en){var pn=en.className,tn=en.children;return de.createElement("div",{className:pn},tn)}var jt=qn,un=pt(8224),An=pt(16089),Yn=pt(76846);function ln(en){var pn=(0,Yn.bn)(en),tn=pn.getBoundingClientRect(),st=document.documentElement;return{left:tn.left+(window.pageXOffset||st.scrollLeft)-(st.clientLeft||document.body.clientLeft||0),top:tn.top+(window.pageYOffset||st.scrollTop)-(st.clientTop||document.body.clientTop||0)}}var fn=function(pn,tn){var st,Bn,Pn=pn.scrollBodyRef,Fn=pn.onScroll,Jn=pn.offsetScroll,ar=pn.container,wn=pn.direction,Rn=ke(xe,"prefixCls"),Gn=((st=Pn.current)===null||st===void 0?void 0:st.scrollWidth)||0,Wn=((Bn=Pn.current)===null||Bn===void 0?void 0:Bn.clientWidth)||0,Xn=Gn&&Wn*(Wn/Gn),Lr=de.useRef(),mr=zt({scrollLeft:0,isHiddenScrollBar:!0}),lr=(0,Ut.Z)(mr,2),vn=lr[0],fr=lr[1],Or=de.useRef({delta:0,x:0}),oi=de.useState(!1),Qr=(0,Ut.Z)(oi,2),ui=Qr[0],di=Qr[1],hi=de.useRef(null);de.useEffect(function(){return function(){An.Z.cancel(hi.current)}},[]);var _i=function(){di(!1)},zi=function(Vr){Vr.persist(),Or.current.delta=Vr.pageX-vn.scrollLeft,Or.current.x=0,di(!0),Vr.preventDefault()},mo=function(Vr){var Ci,Hr=Vr||((Ci=window)===null||Ci===void 0?void 0:Ci.event),eo=Hr.buttons;if(!ui||eo===0){ui&&di(!1);return}var Gi=Or.current.x+Vr.pageX-Or.current.x-Or.current.delta,xi=wn==="rtl";Gi=Math.max(xi?Xn-Wn:0,Math.min(xi?0:Wn-Xn,Gi));var qi=!xi||Math.abs(Gi)+Math.abs(Xn)<Wn;qi&&(Fn({scrollLeft:Gi/Wn*(Gn+2)}),Or.current.x=Vr.pageX)},$t=function(){An.Z.cancel(hi.current),hi.current=(0,An.Z)(function(){if(Pn.current){var Vr=ln(Pn.current).top,Ci=Vr+Pn.current.offsetHeight,Hr=ar===window?document.documentElement.scrollTop+window.innerHeight:ln(ar).top+ar.clientHeight;Ci-(0,Ft.Z)()<=Hr||Vr>=Hr-Jn?fr(function(eo){return(0,Me.Z)((0,Me.Z)({},eo),{},{isHiddenScrollBar:!0})}):fr(function(eo){return(0,Me.Z)((0,Me.Z)({},eo),{},{isHiddenScrollBar:!1})})}})},yi=function(Vr){fr(function(Ci){return(0,Me.Z)((0,Me.Z)({},Ci),{},{scrollLeft:Vr/Gn*Wn||0})})};return de.useImperativeHandle(tn,function(){return{setScrollLeft:yi,checkScrollBarVisible:$t}}),de.useEffect(function(){var Ti=(0,un.Z)(document.body,"mouseup",_i,!1),Vr=(0,un.Z)(document.body,"mousemove",mo,!1);return $t(),function(){Ti.remove(),Vr.remove()}},[Xn,ui]),de.useEffect(function(){if(Pn.current){for(var Ti=[],Vr=(0,Yn.bn)(Pn.current);Vr;)Ti.push(Vr),Vr=Vr.parentElement;return Ti.forEach(function(Ci){return Ci.addEventListener("scroll",$t,!1)}),window.addEventListener("resize",$t,!1),window.addEventListener("scroll",$t,!1),ar.addEventListener("scroll",$t,!1),function(){Ti.forEach(function(Ci){return Ci.removeEventListener("scroll",$t)}),window.removeEventListener("resize",$t),window.removeEventListener("scroll",$t),ar.removeEventListener("scroll",$t)}}},[ar]),de.useEffect(function(){vn.isHiddenScrollBar||fr(function(Ti){var Vr=Pn.current;return Vr?(0,Me.Z)((0,Me.Z)({},Ti),{},{scrollLeft:Vr.scrollLeft/Vr.scrollWidth*Vr.clientWidth}):Ti})},[vn.isHiddenScrollBar]),Gn<=Wn||!Xn||vn.isHiddenScrollBar?null:de.createElement("div",{style:{height:(0,Ft.Z)(),width:Wn,bottom:Jn},className:"".concat(Rn,"-sticky-scroll")},de.createElement("div",{onMouseDown:zi,ref:Lr,className:Ye()("".concat(Rn,"-sticky-scroll-bar"),(0,Be.Z)({},"".concat(Rn,"-sticky-scroll-bar-active"),ui)),style:{width:"".concat(Xn,"px"),transform:"translate3d(".concat(vn.scrollLeft,"px, 0, 0)")}}))},Hn=de.forwardRef(fn);function tr(en){return null}var Zn=tr;function ir(en){return null}var Un=ir,dr="rc-table",Fr=[],Nr={};function Rr(){return"No Data"}function gn(en,pn){var tn=(0,Me.Z)({rowKey:"key",prefixCls:dr,emptyText:Rr},en),st=tn.prefixCls,Bn=tn.className,Pn=tn.rowClassName,Fn=tn.style,Jn=tn.data,ar=tn.rowKey,wn=tn.scroll,Rn=tn.tableLayout,Gn=tn.direction,Wn=tn.title,Xn=tn.footer,Lr=tn.summary,mr=tn.caption,lr=tn.id,vn=tn.showHeader,fr=tn.components,Or=tn.emptyText,oi=tn.onRow,Qr=tn.onHeaderRow,ui=tn.onScroll,di=tn.internalHooks,hi=tn.transformColumns,_i=tn.internalRefs,zi=tn.tailor,mo=tn.getContainerWidth,$t=tn.sticky,yi=tn.rowHoverable,Ti=yi===void 0?!0:yi,Vr=Jn||Fr,Ci=!!Vr.length,Hr=di===at.R,eo=de.useCallback(function(Ki,ao){return(0,Ze.Z)(fr,Ki)||ao},[fr]),Gi=de.useMemo(function(){return typeof ar=="function"?ar:function(Ki){var ao=Ki&&Ki[ar];return ao}},[ar]),xi=eo(["body"]),qi=Vn(),ga=(0,Ut.Z)(qi,3),Ao=ga[0],Aa=ga[1],ma=ga[2],Gr=Qt(tn,Vr,Gi),to=(0,Ut.Z)(Gr,6),Co=to[0],Qo=to[1],Ei=to[2],wi=to[3],Mn=to[4],Wr=to[5],ki=wn==null?void 0:wn.x,co=de.useState(0),ba=(0,Ut.Z)(co,2),aa=ba[0],ai=ba[1],Wo=(0,Kn.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({},tn),Co),{},{expandable:!!Co.expandedRowRender,columnTitle:Co.columnTitle,expandedKeys:Ei,getRowKey:Gi,onTriggerExpand:Wr,expandIcon:wi,expandIconColumnIndex:Co.expandIconColumnIndex,direction:Gn,scrollWidth:Hr&&zi&&typeof ki=="number"?ki:null,clientWidth:aa}),Hr?hi:null),Ko=(0,Ut.Z)(Wo,4),jo=Ko[0],io=Ko[1],Pa=Ko[2],is=Ko[3],fo=Pa!=null?Pa:ki,os=de.useMemo(function(){return{columns:jo,flattenColumns:io}},[jo,io]),Gs=de.useRef(),Lu=de.useRef(),Ho=de.useRef(),th=de.useRef();de.useImperativeHandle(pn,function(){return{nativeElement:Gs.current,scrollTo:function(ao){var Zo;if(Ho.current instanceof HTMLElement){var Fa=ao.index,ka=ao.top,lu=ao.key;if(Ct(ka)){var Vl;(Vl=Ho.current)===null||Vl===void 0||Vl.scrollTo({top:ka})}else{var uu,rl=lu!=null?lu:Gi(Vr[Fa]);(uu=Ho.current.querySelector('[data-row-key="'.concat(rl,'"]')))===null||uu===void 0||uu.scrollIntoView()}}else(Zo=Ho.current)!==null&&Zo!==void 0&&Zo.scrollTo&&Ho.current.scrollTo(ao)}}});var Mu=de.useRef(),Nu=de.useState(!1),gl=(0,Ut.Z)(Nu,2),Ns=gl[0],Ll=gl[1],nh=de.useState(!1),Au=(0,Ut.Z)(nh,2),Vo=Au[0],ju=Au[1],rh=zt(new Map),iu=(0,Ut.Z)(rh,2),ou=iu[0],ja=iu[1],Oa=rt(io),na=Oa.map(function(Ki){return ou.get(Ki)}),sa=de.useMemo(function(){return na},[na.join("_")]),uo=Yt(sa,io,Gn),Bi=wn&&wt(wn.y),Wi=wn&&wt(fo)||!!Co.fixed,la=Wi&&io.some(function(Ki){var ao=Ki.fixed;return ao}),$o=de.useRef(),qo=zn($t,st),jr=qo.isSticky,As=qo.offsetHeader,Gt=qo.offsetSummary,Ln=qo.offsetScroll,Ml=qo.stickyClassName,Ou=qo.container,ua=de.useMemo(function(){return Lr==null?void 0:Lr(Vr)},[Lr,Vr]),Us=(Bi||jr)&&de.isValidElement(ua)&&ua.type===_e&&ua.props.fixed,Hl,Fu,Du;Bi&&(Fu={overflowY:Ci?"scroll":"auto",maxHeight:wn.y}),Wi&&(Hl={overflowX:"auto"},Bi||(Fu={overflowY:"hidden"}),Du={width:fo===!0?"auto":fo,minWidth:"100%"});var Oo=de.useCallback(function(Ki,ao){(0,Ot.Z)(Gs.current)&&ja(function(Zo){if(Zo.get(Ki)!==ao){var Fa=new Map(Zo);return Fa.set(Ki,ao),Fa}return Zo})},[]),pi=Nn(null),Ga=(0,Ut.Z)(pi,2),js=Ga[0],Fo=Ga[1];function Ui(Ki,ao){ao&&(typeof ao=="function"?ao(Ki):ao.scrollLeft!==Ki&&(ao.scrollLeft=Ki,ao.scrollLeft!==Ki&&setTimeout(function(){ao.scrollLeft=Ki},0)))}var _o=(0,oe.Z)(function(Ki){var ao=Ki.currentTarget,Zo=Ki.scrollLeft,Fa=Gn==="rtl",ka=typeof Zo=="number"?Zo:ao.scrollLeft,lu=ao||Nr;if(!Fo()||Fo()===lu){var Vl;js(lu),Ui(ka,Lu.current),Ui(ka,Ho.current),Ui(ka,Mu.current),Ui(ka,(Vl=$o.current)===null||Vl===void 0?void 0:Vl.setScrollLeft)}var uu=ao||Lu.current;if(uu){var rl=Hr&&zi&&typeof fo=="number"?fo:uu.scrollWidth,Al=uu.clientWidth;if(rl===Al){Ll(!1),ju(!1);return}Fa?(Ll(-ka<rl-Al),ju(-ka>0)):(Ll(ka>0),ju(ka<rl-Al))}}),ds=(0,oe.Z)(function(Ki){_o(Ki),ui==null||ui(Ki)}),wo=function(){if(Wi&&Ho.current){var ao;_o({currentTarget:(0,Yn.bn)(Ho.current),scrollLeft:(ao=Ho.current)===null||ao===void 0?void 0:ao.scrollLeft})}else Ll(!1),ju(!1)},ws=function(ao){var Zo,Fa=ao.width;(Zo=$o.current)===null||Zo===void 0||Zo.checkScrollBarVisible();var ka=Gs.current?Gs.current.offsetWidth:Fa;Hr&&mo&&Gs.current&&(ka=mo(Gs.current,ka)||ka),ka!==aa&&(wo(),ai(ka))},va=de.useRef(!1);de.useEffect(function(){va.current&&wo()},[Wi,Jn,jo.length]),de.useEffect(function(){va.current=!0},[]);var au=de.useState(0),oo=(0,Ut.Z)(au,2),Ea=oo[0],no=oo[1],bo=de.useState(!0),Eo=(0,Ut.Z)(bo,2),zo=Eo[0],ho=Eo[1];de.useEffect(function(){(!zi||!Hr)&&(Ho.current instanceof Element?no((0,Ft.o)(Ho.current).width):no((0,Ft.o)(th.current).width)),ho((0,Et.G)("position","sticky"))},[]),de.useEffect(function(){Hr&&_i&&(_i.body.current=Ho.current)});var Bu=de.useCallback(function(Ki){return de.createElement(de.Fragment,null,de.createElement(pr,Ki),Us==="top"&&de.createElement(tt,Ki,ua))},[Us,ua]),fi=de.useCallback(function(Ki){return de.createElement(tt,Ki,ua)},[ua]),uf=eo(["table"],"table"),Ji=de.useMemo(function(){return Rn||(la?fo==="max-content"?"auto":"fixed":Bi||jr||io.some(function(Ki){var ao=Ki.ellipsis;return ao})?"fixed":"auto")},[Bi,la,io,Rn,jr]),Cc,su={colWidths:sa,columCount:io.length,stickyOffsets:uo,onHeaderRow:Qr,fixHeader:Bi,scroll:wn},ih=de.useMemo(function(){return Ci?null:typeof Or=="function"?Or():Or},[Ci,Or]),Ec=de.createElement(si,{data:Vr,measureColumnWidth:Bi||Wi||jr}),_h=de.createElement(Pi,{colWidths:io.map(function(Ki){var ao=Ki.width;return ao}),columns:io}),Nl=mr!=null?de.createElement("caption",{className:"".concat(st,"-caption")},mr):void 0,Iu=(0,qt.Z)(tn,{data:!0}),lo=(0,qt.Z)(tn,{aria:!0});if(Bi||jr){var nl;typeof xi=="function"?(nl=xi(Vr,{scrollbarSize:Ea,ref:Ho,onScroll:_o}),su.colWidths=io.map(function(Ki,ao){var Zo=Ki.width,Fa=ao===io.length-1?Zo-Ea:Zo;return typeof Fa=="number"&&!Number.isNaN(Fa)?Fa:0})):nl=de.createElement("div",{style:(0,Me.Z)((0,Me.Z)({},Hl),Fu),onScroll:ds,ref:Ho,className:Ye()("".concat(st,"-body"))},de.createElement(uf,(0,Se.Z)({style:(0,Me.Z)((0,Me.Z)({},Du),{},{tableLayout:Ji})},lo),Nl,_h,Ec,!Us&&ua&&de.createElement(tt,{stickyOffsets:uo,flattenColumns:io},ua)));var zh=(0,Me.Z)((0,Me.Z)((0,Me.Z)({noData:!Vr.length,maxContentScroll:Wi&&fo==="max-content"},su),os),{},{direction:Gn,stickyClassName:Ml,onScroll:_o});Cc=de.createElement(de.Fragment,null,vn!==!1&&de.createElement(Tr,(0,Se.Z)({},zh,{stickyTopOffset:As,className:"".concat(st,"-header"),ref:Lu}),Bu),nl,Us&&Us!=="top"&&de.createElement(Tr,(0,Se.Z)({},zh,{stickyBottomOffset:Gt,className:"".concat(st,"-summary"),ref:Mu}),fi),jr&&Ho.current&&Ho.current instanceof Element&&de.createElement(Hn,{ref:$o,offsetScroll:Ln,scrollBodyRef:Ho,onScroll:_o,container:Ou,direction:Gn}))}else Cc=de.createElement("div",{style:(0,Me.Z)((0,Me.Z)({},Hl),Fu),className:Ye()("".concat(st,"-content")),onScroll:_o,ref:Ho},de.createElement(uf,(0,Se.Z)({style:(0,Me.Z)((0,Me.Z)({},Du),{},{tableLayout:Ji})},lo),Nl,_h,vn!==!1&&de.createElement(pr,(0,Se.Z)({},su,os)),Ec,ua&&de.createElement(tt,{stickyOffsets:uo,flattenColumns:io},ua)));var Wl=de.createElement("div",(0,Se.Z)({className:Ye()(st,Bn,(0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)({},"".concat(st,"-rtl"),Gn==="rtl"),"".concat(st,"-ping-left"),Ns),"".concat(st,"-ping-right"),Vo),"".concat(st,"-layout-fixed"),Rn==="fixed"),"".concat(st,"-fixed-header"),Bi),"".concat(st,"-fixed-column"),la),"".concat(st,"-fixed-column-gapped"),la&&is),"".concat(st,"-scroll-horizontal"),Wi),"".concat(st,"-has-fix-left"),io[0]&&io[0].fixed),"".concat(st,"-has-fix-right"),io[io.length-1]&&io[io.length-1].fixed==="right")),style:Fn,id:lr,ref:Gs},Iu),Wn&&de.createElement(jt,{className:"".concat(st,"-title")},Wn(Vr)),de.createElement("div",{ref:th,className:"".concat(st,"-container")},Cc),Xn&&de.createElement(jt,{className:"".concat(st,"-footer")},Xn(Vr)));Wi&&(Wl=de.createElement(ut.Z,{onResize:ws},Wl));var kc=Wt(io,uo,Gn),Kl=de.useMemo(function(){return{scrollX:fo,prefixCls:st,getComponent:eo,scrollbarSize:Ea,direction:Gn,fixedInfoList:kc,isSticky:jr,supportSticky:zo,componentWidth:aa,fixHeader:Bi,fixColumn:la,horizonScroll:Wi,tableLayout:Ji,rowClassName:Pn,expandedRowClassName:Co.expandedRowClassName,expandIcon:wi,expandableType:Qo,expandRowByClick:Co.expandRowByClick,expandedRowRender:Co.expandedRowRender,onTriggerExpand:Wr,expandIconColumnIndex:Co.expandIconColumnIndex,indentSize:Co.indentSize,allColumnsFixedLeft:io.every(function(Ki){return Ki.fixed==="left"}),emptyNode:ih,columns:jo,flattenColumns:io,onColumnResize:Oo,hoverStartRow:Ao,hoverEndRow:Aa,onHover:ma,rowExpandable:Co.rowExpandable,onRow:oi,getRowKey:Gi,expandedKeys:Ei,childrenColumnName:Mn,rowHoverable:Ti}},[fo,st,eo,Ea,Gn,kc,jr,zo,aa,Bi,la,Wi,Ji,Pn,Co.expandedRowClassName,wi,Qo,Co.expandRowByClick,Co.expandedRowRender,Wr,Co.expandIconColumnIndex,Co.indentSize,ih,jo,io,Oo,Ao,Aa,ma,Co.rowExpandable,oi,Gi,Ei,Mn,Ti]);return de.createElement(xe.Provider,{value:Kl},Wl)}var Fi=de.forwardRef(gn);function ti(en){return ie(Fi,en)}var Mi=ti();Mi.EXPAND_COLUMN=at.w,Mi.INTERNAL_HOOKS=at.R,Mi.Column=Zn,Mi.ColumnGroup=Un,Mi.Summary=ht;var an=Mi,Qn=pt(45680),or=Ee(null),yr=Ee(null);function br(en,pn,tn){var st=pn||1;return tn[en+st]-(tn[en]||0)}function Ar(en){var pn=en.rowInfo,tn=en.column,st=en.colIndex,Bn=en.indent,Pn=en.index,Fn=en.component,Jn=en.renderIndex,ar=en.record,wn=en.style,Rn=en.className,Gn=en.inverse,Wn=en.getHeight,Xn=tn.render,Lr=tn.dataIndex,mr=tn.className,lr=tn.width,vn=ke(yr,["columnsOffset"]),fr=vn.columnsOffset,Or=kn(pn,tn,st,Bn,Pn),oi=Or.key,Qr=Or.fixedInfo,ui=Or.appendCellNode,di=Or.additionalCellProps,hi=di.style,_i=di.colSpan,zi=_i===void 0?1:_i,mo=di.rowSpan,$t=mo===void 0?1:mo,yi=st-1,Ti=br(yi,zi,fr),Vr=zi>1?lr-Ti:0,Ci=(0,Me.Z)((0,Me.Z)((0,Me.Z)({},hi),wn),{},{flex:"0 0 ".concat(Ti,"px"),width:"".concat(Ti,"px"),marginRight:Vr,pointerEvents:"auto"}),Hr=de.useMemo(function(){return Gn?$t<=1:zi===0||$t===0||$t>1},[$t,zi,Gn]);Hr?Ci.visibility="hidden":Gn&&(Ci.height=Wn==null?void 0:Wn($t));var eo=Hr?function(){return null}:Xn,Gi={};return($t===0||zi===0)&&(Gi.rowSpan=1,Gi.colSpan=1),de.createElement(mt,(0,Se.Z)({className:Ye()(mr,Rn),ellipsis:tn.ellipsis,align:tn.align,scope:tn.rowScope,component:Fn,prefixCls:pn.prefixCls,key:oi,record:ar,index:Pn,renderIndex:Jn,dataIndex:Lr,render:eo,shouldCellUpdate:tn.shouldCellUpdate},Qr,{appendNode:ui,additionalProps:(0,Me.Z)((0,Me.Z)({},di),{},{style:Ci},Gi)}))}var ri=Ar,Yr=["data","index","className","rowKey","style","extra","getHeight"],Jr=de.forwardRef(function(en,pn){var tn=en.data,st=en.index,Bn=en.className,Pn=en.rowKey,Fn=en.style,Jn=en.extra,ar=en.getHeight,wn=(0,Ne.Z)(en,Yr),Rn=tn.record,Gn=tn.indent,Wn=tn.index,Xn=ke(xe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Lr=Xn.scrollX,mr=Xn.flattenColumns,lr=Xn.prefixCls,vn=Xn.fixColumn,fr=Xn.componentWidth,Or=ke(or,["getComponent"]),oi=Or.getComponent,Qr=Vt(Rn,Pn,st,Gn),ui=oi(["body","row"],"div"),di=oi(["body","cell"],"div"),hi=Qr.rowSupportExpand,_i=Qr.expanded,zi=Qr.rowProps,mo=Qr.expandedRowRender,$t=Qr.expandedRowClassName,yi;if(hi&&_i){var Ti=mo(Rn,st,Gn+1,_i),Vr=Cn($t,Rn,st,Gn),Ci={};vn&&(Ci={style:(0,Be.Z)({},"--virtual-width","".concat(fr,"px"))});var Hr="".concat(lr,"-expanded-row-cell");yi=de.createElement(ui,{className:Ye()("".concat(lr,"-expanded-row"),"".concat(lr,"-expanded-row-level-").concat(Gn+1),Vr)},de.createElement(mt,{component:di,prefixCls:lr,className:Ye()(Hr,(0,Be.Z)({},"".concat(Hr,"-fixed"),vn)),additionalProps:Ci},Ti))}var eo=(0,Me.Z)((0,Me.Z)({},Fn),{},{width:Lr});Jn&&(eo.position="absolute",eo.pointerEvents="none");var Gi=de.createElement(ui,(0,Se.Z)({},zi,wn,{"data-row-key":Pn,ref:hi?null:pn,className:Ye()(Bn,"".concat(lr,"-row"),zi==null?void 0:zi.className,(0,Be.Z)({},"".concat(lr,"-row-extra"),Jn)),style:(0,Me.Z)((0,Me.Z)({},eo),zi==null?void 0:zi.style)}),mr.map(function(xi,qi){return de.createElement(ri,{key:qi,component:di,rowInfo:Qr,column:xi,colIndex:qi,indent:Gn,index:st,renderIndex:Wn,record:Rn,inverse:Jn,getHeight:ar})}));return hi?de.createElement("div",{ref:pn},Gi,yi):Gi}),sr=le(Jr),rn=sr,nr=de.forwardRef(function(en,pn){var tn=en.data,st=en.onScroll,Bn=ke(xe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Pn=Bn.flattenColumns,Fn=Bn.onColumnResize,Jn=Bn.getRowKey,ar=Bn.expandedKeys,wn=Bn.prefixCls,Rn=Bn.childrenColumnName,Gn=Bn.scrollX,Wn=Bn.direction,Xn=ke(or),Lr=Xn.sticky,mr=Xn.scrollY,lr=Xn.listItemHeight,vn=Xn.getComponent,fr=Xn.onScroll,Or=de.useRef(),oi=Kt(tn,Rn,ar,Jn),Qr=de.useMemo(function(){var yi=0;return Pn.map(function(Ti){var Vr=Ti.width,Ci=Ti.key;return yi+=Vr,[Ci,Vr,yi]})},[Pn]),ui=de.useMemo(function(){return Qr.map(function(yi){return yi[2]})},[Qr]);de.useEffect(function(){Qr.forEach(function(yi){var Ti=(0,Ut.Z)(yi,2),Vr=Ti[0],Ci=Ti[1];Fn(Vr,Ci)})},[Qr]),de.useImperativeHandle(pn,function(){var yi,Ti={scrollTo:function(Ci){var Hr;(Hr=Or.current)===null||Hr===void 0||Hr.scrollTo(Ci)},nativeElement:(yi=Or.current)===null||yi===void 0?void 0:yi.nativeElement};return Object.defineProperty(Ti,"scrollLeft",{get:function(){var Ci;return((Ci=Or.current)===null||Ci===void 0?void 0:Ci.getScrollInfo().x)||0},set:function(Ci){var Hr;(Hr=Or.current)===null||Hr===void 0||Hr.scrollTo({left:Ci})}}),Ti});var di=function(Ti,Vr){var Ci,Hr=(Ci=oi[Vr])===null||Ci===void 0?void 0:Ci.record,eo=Ti.onCell;if(eo){var Gi,xi=eo(Hr,Vr);return(Gi=xi==null?void 0:xi.rowSpan)!==null&&Gi!==void 0?Gi:1}return 1},hi=function(Ti){var Vr=Ti.start,Ci=Ti.end,Hr=Ti.getSize,eo=Ti.offsetY;if(Ci<0)return null;for(var Gi=Pn.filter(function(wi){return di(wi,Vr)===0}),xi=Vr,qi=function(Mn){if(Gi=Gi.filter(function(Wr){return di(Wr,Mn)===0}),!Gi.length)return xi=Mn,1},ga=Vr;ga>=0&&!qi(ga);ga-=1);for(var Ao=Pn.filter(function(wi){return di(wi,Ci)!==1}),Aa=Ci,ma=function(Mn){if(Ao=Ao.filter(function(Wr){return di(Wr,Mn)!==1}),!Ao.length)return Aa=Math.max(Mn-1,Ci),1},Gr=Ci;Gr<oi.length&&!ma(Gr);Gr+=1);for(var to=[],Co=function(Mn){var Wr=oi[Mn];if(!Wr)return 1;Pn.some(function(ki){return di(ki,Mn)>1})&&to.push(Mn)},Qo=xi;Qo<=Aa;Qo+=1)Co(Qo);var Ei=to.map(function(wi){var Mn=oi[wi],Wr=Jn(Mn.record,wi),ki=function(aa){var ai=wi+aa-1,Wo=Jn(oi[ai].record,ai),Ko=Hr(Wr,Wo);return Ko.bottom-Ko.top},co=Hr(Wr);return de.createElement(rn,{key:wi,data:Mn,rowKey:Wr,index:wi,style:{top:-eo+co.top},extra:!0,getHeight:ki})});return Ei},_i=de.useMemo(function(){return{columnsOffset:ui}},[ui]),zi="".concat(wn,"-tbody"),mo=vn(["body","wrapper"]),$t={};return Lr&&($t.position="sticky",$t.bottom=0,(0,Te.Z)(Lr)==="object"&&Lr.offsetScroll&&($t.bottom=Lr.offsetScroll)),de.createElement(yr.Provider,{value:_i},de.createElement(Qn.Z,{fullHeight:!1,ref:Or,prefixCls:"".concat(zi,"-virtual"),styles:{horizontalScrollBar:$t},className:zi,height:mr,itemHeight:lr||24,data:oi,itemKey:function(Ti){return Jn(Ti.record)},component:mo,scrollWidth:Gn,direction:Wn,onVirtualScroll:function(Ti){var Vr,Ci=Ti.x;st({currentTarget:(Vr=Or.current)===null||Vr===void 0?void 0:Vr.nativeElement,scrollLeft:Ci})},onScroll:fr,extraRender:hi},function(yi,Ti,Vr){var Ci=Jn(yi.record,Ti);return de.createElement(rn,{data:yi,rowKey:Ci,index:Ti,style:Vr.style})}))}),sn=le(nr),hr=sn,Pr=function(pn,tn){var st=tn.ref,Bn=tn.onScroll;return de.createElement(hr,{ref:st,data:pn,onScroll:Bn})};function zr(en,pn){var tn=en.data,st=en.columns,Bn=en.scroll,Pn=en.sticky,Fn=en.prefixCls,Jn=Fn===void 0?dr:Fn,ar=en.className,wn=en.listItemHeight,Rn=en.components,Gn=en.onScroll,Wn=Bn||{},Xn=Wn.x,Lr=Wn.y;typeof Xn!="number"&&(Xn=1),typeof Lr!="number"&&(Lr=500);var mr=(0,Mt.zX)(function(fr,Or){return(0,Ze.Z)(Rn,fr)||Or}),lr=(0,Mt.zX)(Gn),vn=de.useMemo(function(){return{sticky:Pn,scrollY:Lr,listItemHeight:wn,getComponent:mr,onScroll:lr}},[Pn,Lr,wn,mr,lr]);return de.createElement(or.Provider,{value:vn},de.createElement(an,(0,Se.Z)({},en,{className:Ye()(ar,"".concat(Jn,"-virtual")),scroll:(0,Me.Z)((0,Me.Z)({},Bn),{},{x:Xn}),components:(0,Me.Z)((0,Me.Z)({},Rn),{},{body:tn!=null&&tn.length?Pr:void 0}),columns:st,internalHooks:at.R,tailor:!0,ref:pn})))}var Ri=de.forwardRef(zr);function Oi(en){return ie(Ri,en)}var Si=Oi(),Di=null},90494:function(Dn,jn,pt){"use strict";pt.d(jn,{g:function(){return de},v:function(){return Re}});var at=pt(77321),Ut=pt(74416),oe=pt(48736),He=["expandable"],Re="RC_TABLE_INTERNAL_COL_DEFINE";function de(ve){var Ee=ve.expandable,ke=(0,Ut.Z)(ve,He),Se;return"expandable"in ve?Se=(0,at.Z)((0,at.Z)({},ke),Ee):Se=ke,Se.showExpandColumn===!1&&(Se.expandIconColumnIndex=-1),Se}},22711:function(Dn,jn,pt){"use strict";pt.r(jn),pt.d(jn,{ResizableTextArea:function(){return Ue},default:function(){return ot}});var at=pt(72308),Ut=pt(49618),oe=pt(77321),He=pt(80702),Re=pt(52487),de=pt(74416),ve=pt(92310),Ee=pt.n(ve),ke=pt(36901),Se=pt(66003),Ae=pt(30292),me=pt(18929),Pe=pt(59301),fe=pt(62853),z=pt(29301),te=pt(34280),se=pt(16089),ie=`
|
|
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;
|
|
`,le=["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"],ce={},pe;function xe(lt){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=lt.getAttribute("id")||lt.getAttribute("data-reactid")||lt.getAttribute("name");if(ft&&ce[St])return ce[St];var qe=window.getComputedStyle(lt),rt=qe.getPropertyValue("box-sizing")||qe.getPropertyValue("-moz-box-sizing")||qe.getPropertyValue("-webkit-box-sizing"),wt=parseFloat(qe.getPropertyValue("padding-bottom"))+parseFloat(qe.getPropertyValue("padding-top")),Ct=parseFloat(qe.getPropertyValue("border-bottom-width"))+parseFloat(qe.getPropertyValue("border-top-width")),bt=le.map(function(xt){return"".concat(xt,":").concat(qe.getPropertyValue(xt))}).join(";"),ct={sizingStyle:bt,paddingSize:wt,borderSize:Ct,boxSizing:rt};return ft&&St&&(ce[St]=ct),ct}function je(lt){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,qe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;pe||(pe=document.createElement("textarea"),pe.setAttribute("tab-index","-1"),pe.setAttribute("aria-hidden","true"),pe.setAttribute("name","hiddenTextarea"),document.body.appendChild(pe)),lt.getAttribute("wrap")?pe.setAttribute("wrap",lt.getAttribute("wrap")):pe.removeAttribute("wrap");var rt=xe(lt,ft),wt=rt.paddingSize,Ct=rt.borderSize,bt=rt.boxSizing,ct=rt.sizingStyle;pe.setAttribute("style","".concat(ct,";").concat(ie)),pe.value=lt.value||lt.placeholder||"";var xt=void 0,dt=void 0,Mt,yt=pe.scrollHeight;if(bt==="border-box"?yt+=Ct:bt==="content-box"&&(yt-=wt),St!==null||qe!==null){pe.value=" ";var Dt=pe.scrollHeight-wt;St!==null&&(xt=Dt*St,bt==="border-box"&&(xt=xt+wt+Ct),yt=Math.max(xt,yt)),qe!==null&&(dt=Dt*qe,bt==="border-box"&&(dt=dt+wt+Ct),Mt=yt>dt?"":"hidden",yt=Math.min(dt,yt))}var mt={height:yt,overflowY:Mt,resize:"none"};return xt&&(mt.minHeight=xt),dt&&(mt.maxHeight=dt),mt}var De=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Fe=0,Te=1,Me=2,Be=Pe.forwardRef(function(lt,ft){var St=lt,qe=St.prefixCls,rt=St.defaultValue,wt=St.value,Ct=St.autoSize,bt=St.onResize,ct=St.className,xt=St.style,dt=St.disabled,Mt=St.onChange,yt=St.onInternalAutoSize,Dt=(0,de.Z)(St,De),mt=(0,me.Z)(rt,{value:wt,postState:function(In){return In!=null?In:""}}),vt=(0,Re.Z)(mt,2),et=vt[0],We=vt[1],we=function(In){We(In.target.value),Mt==null||Mt(In)},Ne=Pe.useRef();Pe.useImperativeHandle(ft,function(){return{textArea:Ne.current}});var Xe=Pe.useMemo(function(){return Ct&&(0,fe.Z)(Ct)==="object"?[Ct.minRows,Ct.maxRows]:[]},[Ct]),nt=(0,Re.Z)(Xe,2),Ie=nt[0],_e=nt[1],Ge=!!Ct,tt=function(){try{if(document.activeElement===Ne.current){var In=Ne.current,_r=In.selectionStart,xr=In.selectionEnd,qr=In.scrollTop;Ne.current.setSelectionRange(_r,xr),Ne.current.scrollTop=qr}}catch(er){}},ht=Pe.useState(Me),ut=(0,Re.Z)(ht,2),Ot=ut[0],Et=ut[1],Ft=Pe.useState(),qt=(0,Re.Z)(Ft,2),Xt=qt[0],Kt=qt[1],Vt=function(){Et(Fe)};(0,te.Z)(function(){Ge&&Vt()},[wt,Ie,_e,Ge]),(0,te.Z)(function(){if(Ot===Fe)Et(Te);else if(Ot===Te){var kn=je(Ne.current,!1,Ie,_e);Et(Me),Kt(kn)}else tt()},[Ot]);var hn=Pe.useRef(),on=function(){se.Z.cancel(hn.current)},cn=function(In){Ot===Me&&(bt==null||bt(In),Ct&&(on(),hn.current=(0,se.Z)(function(){Vt()})))};Pe.useEffect(function(){return on},[]);var Sn=Ge?Xt:null,Cn=(0,oe.Z)((0,oe.Z)({},xt),Sn);return(Ot===Fe||Ot===Te)&&(Cn.overflowY="hidden",Cn.overflowX="hidden"),Pe.createElement(z.Z,{onResize:cn,disabled:!(Ct||bt)},Pe.createElement("textarea",(0,at.Z)({},Dt,{ref:Ne,style:Cn,className:Ee()(qe,ct,(0,Ut.Z)({},"".concat(qe,"-disabled"),dt)),disabled:dt,value:et,onChange:we})))}),Ue=Be,Ye=["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"],Ve=Pe.forwardRef(function(lt,ft){var St,qe=lt.defaultValue,rt=lt.value,wt=lt.onFocus,Ct=lt.onBlur,bt=lt.onChange,ct=lt.allowClear,xt=lt.maxLength,dt=lt.onCompositionStart,Mt=lt.onCompositionEnd,yt=lt.suffix,Dt=lt.prefixCls,mt=Dt===void 0?"rc-textarea":Dt,vt=lt.showCount,et=lt.count,We=lt.className,we=lt.style,Ne=lt.disabled,Xe=lt.hidden,nt=lt.classNames,Ie=lt.styles,_e=lt.onResize,Ge=lt.onClear,tt=lt.onPressEnter,ht=lt.readOnly,ut=lt.autoSize,Ot=lt.onKeyDown,Et=(0,de.Z)(lt,Ye),Ft=(0,me.Z)(qe,{value:rt,defaultValue:qe}),qt=(0,Re.Z)(Ft,2),Xt=qt[0],Kt=qt[1],Vt=Xt==null?"":String(Xt),hn=Pe.useState(!1),on=(0,Re.Z)(hn,2),cn=on[0],Sn=on[1],Cn=Pe.useRef(!1),kn=Pe.useState(null),In=(0,Re.Z)(kn,2),_r=In[0],xr=In[1],qr=(0,Pe.useRef)(null),er=(0,Pe.useRef)(null),si=function(){var Ht;return(Ht=er.current)===null||Ht===void 0?void 0:Ht.textArea},ei=function(){si().focus()};(0,Pe.useImperativeHandle)(ft,function(){var zn;return{resizableTextArea:er.current,focus:ei,blur:function(){si().blur()},nativeElement:((zn=qr.current)===null||zn===void 0?void 0:zn.nativeElement)||si()}}),(0,Pe.useEffect)(function(){Sn(function(zn){return!Ne&&zn})},[Ne]);var vi=Pe.useState(null),Li=(0,Re.Z)(vi,2),Pi=Li[0],Xr=Li[1];Pe.useEffect(function(){if(Pi){var zn;(zn=si()).setSelectionRange.apply(zn,(0,He.Z)(Pi))}},[Pi]);var mi=(0,Se.Z)(et,vt),Qe=(St=mi.max)!==null&&St!==void 0?St:xt,ii=Number(Qe)>0,Tr=mi.strategy(Vt),wr=!!Qe&&Tr>Qe,Er=function(Ht,Yt){var qn=Yt;!Cn.current&&mi.exceedFormatter&&mi.max&&mi.strategy(Yt)>mi.max&&(qn=mi.exceedFormatter(Yt,{max:mi.max}),Yt!==qn&&Xr([si().selectionStart||0,si().selectionEnd||0])),Kt(qn),(0,Ae.rJ)(Ht.currentTarget,Ht,bt,qn)},kr=function(Ht){Cn.current=!0,dt==null||dt(Ht)},Hi=function(Ht){Cn.current=!1,Er(Ht,Ht.currentTarget.value),Mt==null||Mt(Ht)},pr=function(Ht){Er(Ht,Ht.target.value)},Kn=function(Ht){Ht.key==="Enter"&&tt&&tt(Ht),Ot==null||Ot(Ht)},Qt=function(Ht){Sn(!0),wt==null||wt(Ht)},Wt=function(Ht){Sn(!1),Ct==null||Ct(Ht)},zt=function(Ht){Kt(""),ei(),(0,Ae.rJ)(si(),Ht,bt)},Nn=yt,Vn;mi.show&&(mi.showFormatter?Vn=mi.showFormatter({value:Vt,count:Tr,maxLength:Qe}):Vn="".concat(Tr).concat(ii?" / ".concat(Qe):""),Nn=Pe.createElement(Pe.Fragment,null,Nn,Pe.createElement("span",{className:Ee()("".concat(mt,"-data-count"),nt==null?void 0:nt.count),style:Ie==null?void 0:Ie.count},Vn)));var vr=function(Ht){var Yt;_e==null||_e(Ht),(Yt=si())!==null&&Yt!==void 0&&Yt.style.height&&xr(!0)},yn=!ut&&!vt&&!ct;return Pe.createElement(ke.BaseInput,{ref:qr,value:Vt,allowClear:ct,handleReset:zt,suffix:Nn,prefixCls:mt,classNames:(0,oe.Z)((0,oe.Z)({},nt),{},{affixWrapper:Ee()(nt==null?void 0:nt.affixWrapper,(0,Ut.Z)((0,Ut.Z)({},"".concat(mt,"-show-count"),vt),"".concat(mt,"-textarea-allow-clear"),ct))}),disabled:Ne,focused:cn,className:Ee()(We,wr&&"".concat(mt,"-out-of-range")),style:(0,oe.Z)((0,oe.Z)({},we),_r&&!yn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Vn=="string"?Vn:void 0}},hidden:Xe,readOnly:ht,onClear:Ge},Pe.createElement(Ue,(0,at.Z)({},Et,{autoSize:ut,maxLength:xt,onKeyDown:Kn,onChange:pr,onFocus:Qt,onBlur:Wt,onCompositionStart:kr,onCompositionEnd:Hi,className:Ee()(nt==null?void 0:nt.textarea),style:(0,oe.Z)((0,oe.Z)({},Ie==null?void 0:Ie.textarea),{},{resize:we==null?void 0:we.resize}),disabled:Ne,prefixCls:mt,onResize:vr,ref:er,readOnly:ht})))}),Ze=Ve,ot=Ze},639:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return ce}});var at=pt(72308),Ut=pt(49618),oe=pt(77321),He=pt(52487),Re=pt(74416),de=pt(59301),ve=pt(92310),Ee=pt.n(ve),ke=pt(26112),Se=pt(30699),Ae=function(xe){for(var je=xe.prefixCls,De=xe.level,Fe=xe.isStart,Te=xe.isEnd,Me="".concat(je,"-indent-unit"),Be=[],Ue=0;Ue<De;Ue+=1)Be.push(de.createElement("span",{key:Ue,className:Ee()(Me,(0,Ut.Z)((0,Ut.Z)({},"".concat(Me,"-start"),Fe[Ue]),"".concat(Me,"-end"),Te[Ue]))}));return de.createElement("span",{"aria-hidden":"true",className:"".concat(je,"-indent")},Be)},me=de.memo(Ae),Pe=pt(65065),fe=pt(34061),z=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],te="open",se="close",ie="---",le=function(xe){var je,De,Fe,Te=xe.eventKey,Me=xe.className,Be=xe.style,Ue=xe.dragOver,Ye=xe.dragOverGapTop,Ve=xe.dragOverGapBottom,Ze=xe.isLeaf,ot=xe.isStart,lt=xe.isEnd,ft=xe.expanded,St=xe.selected,qe=xe.checked,rt=xe.halfChecked,wt=xe.loading,Ct=xe.domRef,bt=xe.active,ct=xe.data,xt=xe.onMouseMove,dt=xe.selectable,Mt=(0,Re.Z)(xe,z),yt=de.useContext(Se.k),Dt=de.useContext(Se.y),mt=de.useRef(null),vt=de.useState(!1),et=(0,He.Z)(vt,2),We=et[0],we=et[1],Ne=!!(yt.disabled||xe.disabled||(je=Dt.nodeDisabled)!==null&&je!==void 0&&je.call(Dt,ct)),Xe=de.useMemo(function(){return!yt.checkable||xe.checkable===!1?!1:yt.checkable},[yt.checkable,xe.checkable]),nt=function(Tr){Ne||yt.onNodeSelect(Tr,(0,fe.F)(xe))},Ie=function(Tr){Ne||!Xe||xe.disableCheckbox||yt.onNodeCheck(Tr,(0,fe.F)(xe),!qe)},_e=de.useMemo(function(){return typeof dt=="boolean"?dt:yt.selectable},[dt,yt.selectable]),Ge=function(Tr){yt.onNodeClick(Tr,(0,fe.F)(xe)),_e?nt(Tr):Ie(Tr)},tt=function(Tr){yt.onNodeDoubleClick(Tr,(0,fe.F)(xe))},ht=function(Tr){yt.onNodeMouseEnter(Tr,(0,fe.F)(xe))},ut=function(Tr){yt.onNodeMouseLeave(Tr,(0,fe.F)(xe))},Ot=function(Tr){yt.onNodeContextMenu(Tr,(0,fe.F)(xe))},Et=de.useMemo(function(){return!!(yt.draggable&&(!yt.draggable.nodeDraggable||yt.draggable.nodeDraggable(ct)))},[yt.draggable,ct]),Ft=function(Tr){Tr.stopPropagation(),we(!0),yt.onNodeDragStart(Tr,xe);try{Tr.dataTransfer.setData("text/plain","")}catch(wr){}},qt=function(Tr){Tr.preventDefault(),Tr.stopPropagation(),yt.onNodeDragEnter(Tr,xe)},Xt=function(Tr){Tr.preventDefault(),Tr.stopPropagation(),yt.onNodeDragOver(Tr,xe)},Kt=function(Tr){Tr.stopPropagation(),yt.onNodeDragLeave(Tr,xe)},Vt=function(Tr){Tr.stopPropagation(),we(!1),yt.onNodeDragEnd(Tr,xe)},hn=function(Tr){Tr.preventDefault(),Tr.stopPropagation(),we(!1),yt.onNodeDrop(Tr,xe)},on=function(Tr){wt||yt.onNodeExpand(Tr,(0,fe.F)(xe))},cn=de.useMemo(function(){var ii=(0,Pe.Z)(yt.keyEntities,Te)||{},Tr=ii.children;return!!(Tr||[]).length},[yt.keyEntities,Te]),Sn=de.useMemo(function(){return Ze===!1?!1:Ze||!yt.loadData&&!cn||yt.loadData&&xe.loaded&&!cn},[Ze,yt.loadData,cn,xe.loaded]);de.useEffect(function(){wt||typeof yt.loadData=="function"&&ft&&!Sn&&!xe.loaded&&yt.onNodeLoad((0,fe.F)(xe))},[wt,yt.loadData,yt.onNodeLoad,ft,Sn,xe]);var Cn=de.useMemo(function(){var ii;return(ii=yt.draggable)!==null&&ii!==void 0&&ii.icon?de.createElement("span",{className:"".concat(yt.prefixCls,"-draggable-icon")},yt.draggable.icon):null},[yt.draggable]),kn=function(Tr){var wr=xe.switcherIcon||yt.switcherIcon;return typeof wr=="function"?wr((0,oe.Z)((0,oe.Z)({},xe),{},{isLeaf:Tr})):wr},In=function(){if(Sn){var Tr=kn(!0);return Tr!==!1?de.createElement("span",{className:Ee()("".concat(yt.prefixCls,"-switcher"),"".concat(yt.prefixCls,"-switcher-noop"))},Tr):null}var wr=kn(!1);return wr!==!1?de.createElement("span",{onClick:on,className:Ee()("".concat(yt.prefixCls,"-switcher"),"".concat(yt.prefixCls,"-switcher_").concat(ft?te:se))},wr):null},_r=de.useMemo(function(){if(!Xe)return null;var ii=typeof Xe!="boolean"?Xe:null;return de.createElement("span",{className:Ee()("".concat(yt.prefixCls,"-checkbox"),(0,Ut.Z)((0,Ut.Z)((0,Ut.Z)({},"".concat(yt.prefixCls,"-checkbox-checked"),qe),"".concat(yt.prefixCls,"-checkbox-indeterminate"),!qe&&rt),"".concat(yt.prefixCls,"-checkbox-disabled"),Ne||xe.disableCheckbox)),onClick:Ie,role:"checkbox","aria-checked":rt?"mixed":qe,"aria-disabled":Ne||xe.disableCheckbox,"aria-label":"Select ".concat(typeof xe.title=="string"?xe.title:"tree node")},ii)},[Xe,qe,rt,Ne,xe.disableCheckbox,xe.title]),xr=de.useMemo(function(){return Sn?null:ft?te:se},[Sn,ft]),qr=de.useMemo(function(){return de.createElement("span",{className:Ee()("".concat(yt.prefixCls,"-iconEle"),"".concat(yt.prefixCls,"-icon__").concat(xr||"docu"),(0,Ut.Z)({},"".concat(yt.prefixCls,"-icon_loading"),wt))})},[yt.prefixCls,xr,wt]),er=de.useMemo(function(){var ii=!!yt.draggable,Tr=!xe.disabled&&ii&&yt.dragOverNodeKey===Te;return Tr?yt.dropIndicatorRender({dropPosition:yt.dropPosition,dropLevelOffset:yt.dropLevelOffset,indent:yt.indent,prefixCls:yt.prefixCls,direction:yt.direction}):null},[yt.dropPosition,yt.dropLevelOffset,yt.indent,yt.prefixCls,yt.direction,yt.draggable,yt.dragOverNodeKey,yt.dropIndicatorRender]),si=de.useMemo(function(){var ii=xe.title,Tr=ii===void 0?ie:ii,wr="".concat(yt.prefixCls,"-node-content-wrapper"),Er;if(yt.showIcon){var kr=xe.icon||yt.icon;Er=kr?de.createElement("span",{className:Ee()("".concat(yt.prefixCls,"-iconEle"),"".concat(yt.prefixCls,"-icon__customize"))},typeof kr=="function"?kr(xe):kr):qr}else yt.loadData&&wt&&(Er=qr);var Hi;return typeof Tr=="function"?Hi=Tr(ct):yt.titleRender?Hi=yt.titleRender(ct):Hi=Tr,de.createElement("span",{ref:mt,title:typeof Tr=="string"?Tr:"",className:Ee()(wr,"".concat(wr,"-").concat(xr||"normal"),(0,Ut.Z)({},"".concat(yt.prefixCls,"-node-selected"),!Ne&&(St||We))),onMouseEnter:ht,onMouseLeave:ut,onContextMenu:Ot,onClick:Ge,onDoubleClick:tt},Er,de.createElement("span",{className:"".concat(yt.prefixCls,"-title")},Hi),er)},[yt.prefixCls,yt.showIcon,xe,yt.icon,qr,yt.titleRender,ct,xr,ht,ut,Ot,Ge,tt]),ei=(0,ke.Z)(Mt,{aria:!0,data:!0}),vi=(0,Pe.Z)(yt.keyEntities,Te)||{},Li=vi.level,Pi=lt[lt.length-1],Xr=!Ne&&Et,mi=yt.draggingNodeKey===Te,Qe=dt!==void 0?{"aria-selected":!!dt}:void 0;return de.createElement("div",(0,at.Z)({ref:Ct,role:"treeitem","aria-expanded":Ze?void 0:ft,className:Ee()(Me,"".concat(yt.prefixCls,"-treenode"),(Fe={},(0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)(Fe,"".concat(yt.prefixCls,"-treenode-disabled"),Ne),"".concat(yt.prefixCls,"-treenode-switcher-").concat(ft?"open":"close"),!Ze),"".concat(yt.prefixCls,"-treenode-checkbox-checked"),qe),"".concat(yt.prefixCls,"-treenode-checkbox-indeterminate"),rt),"".concat(yt.prefixCls,"-treenode-selected"),St),"".concat(yt.prefixCls,"-treenode-loading"),wt),"".concat(yt.prefixCls,"-treenode-active"),bt),"".concat(yt.prefixCls,"-treenode-leaf-last"),Pi),"".concat(yt.prefixCls,"-treenode-draggable"),Et),"dragging",mi),(0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)(Fe,"drop-target",yt.dropTargetKey===Te),"drop-container",yt.dropContainerKey===Te),"drag-over",!Ne&&Ue),"drag-over-gap-top",!Ne&&Ye),"drag-over-gap-bottom",!Ne&&Ve),"filter-node",(De=yt.filterTreeNode)===null||De===void 0?void 0:De.call(yt,(0,fe.F)(xe))),"".concat(yt.prefixCls,"-treenode-leaf"),Sn))),style:Be,draggable:Xr,onDragStart:Xr?Ft:void 0,onDragEnter:Et?qt:void 0,onDragOver:Et?Xt:void 0,onDragLeave:Et?Kt:void 0,onDrop:Et?hn:void 0,onDragEnd:Et?Vt:void 0,onMouseMove:xt},Qe,ei),de.createElement(me,{prefixCls:yt.prefixCls,level:Li,isStart:ot,isEnd:lt}),Cn,In(),_r,si)};le.isTreeNode=1;var ce=le},30699:function(Dn,jn,pt){"use strict";pt.d(jn,{k:function(){return Ut},y:function(){return oe}});var at=pt(59301),Ut=at.createContext(null),oe=at.createContext({})},15018:function(Dn,jn,pt){"use strict";pt.d(jn,{OF:function(){return Te.Z},y6:function(){return se.y},ZP:function(){return Ne}});var at=pt(72308),Ut=pt(62853),oe=pt(77321),He=pt(80702),Re=pt(96949),de=pt(55090),ve=pt(80237),Ee=pt(77205),ke=pt(38793),Se=pt(49618),Ae=pt(92310),me=pt.n(Ae),Pe=pt(10228),fe=pt(26112),z=pt(48736),te=pt(59301),se=pt(30699),ie=function(nt){var Ie=nt.dropPosition,_e=nt.dropLevelOffset,Ge=nt.indent,tt={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ie){case-1:tt.top=0,tt.left=-_e*Ge;break;case 1:tt.bottom=0,tt.left=-_e*Ge;break;case 0:tt.bottom=0,tt.left=Ge;break}return te.createElement("div",{style:tt})},le=ie;function ce(Xe){if(Xe==null)throw new TypeError("Cannot destructure "+Xe)}var pe=pt(52487),xe=pt(74416),je=pt(34280),De=pt(45680),Fe=pt(77900),Te=pt(639);function Me(Xe,nt){var Ie=te.useState(!1),_e=(0,pe.Z)(Ie,2),Ge=_e[0],tt=_e[1];(0,je.Z)(function(){if(Ge)return Xe(),function(){nt()}},[Ge]),(0,je.Z)(function(){return tt(!0),function(){tt(!1)}},[])}var Be=Me,Ue=pt(34061),Ye=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ve=te.forwardRef(function(Xe,nt){var Ie=Xe.className,_e=Xe.style,Ge=Xe.motion,tt=Xe.motionNodes,ht=Xe.motionType,ut=Xe.onMotionStart,Ot=Xe.onMotionEnd,Et=Xe.active,Ft=Xe.treeNodeRequiredProps,qt=(0,xe.Z)(Xe,Ye),Xt=te.useState(!0),Kt=(0,pe.Z)(Xt,2),Vt=Kt[0],hn=Kt[1],on=te.useContext(se.k),cn=on.prefixCls,Sn=tt&&ht!=="hide";(0,je.Z)(function(){tt&&Sn!==Vt&&hn(Sn)},[tt]);var Cn=function(){tt&&ut()},kn=te.useRef(!1),In=function(){tt&&!kn.current&&(kn.current=!0,Ot())};Be(Cn,In);var _r=function(qr){Sn===qr&&In()};return tt?te.createElement(Fe.default,(0,at.Z)({ref:nt,visible:Vt},Ge,{motionAppear:ht==="show",onVisibleChanged:_r}),function(xr,qr){var er=xr.className,si=xr.style;return te.createElement("div",{ref:qr,className:me()("".concat(cn,"-treenode-motion"),er),style:si},tt.map(function(ei){var vi=Object.assign({},(ce(ei.data),ei.data)),Li=ei.title,Pi=ei.key,Xr=ei.isStart,mi=ei.isEnd;delete vi.children;var Qe=(0,Ue.H8)(Pi,Ft);return te.createElement(Te.Z,(0,at.Z)({},vi,Qe,{title:Li,active:Et,data:ei.data,key:Pi,isStart:Xr,isEnd:mi}))}))}):te.createElement(Te.Z,(0,at.Z)({domRef:nt,className:Ie,style:_e},qt,{active:Et}))}),Ze=Ve;function ot(){var Xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ie=Xe.length,_e=nt.length;if(Math.abs(Ie-_e)!==1)return{add:!1,key:null};function Ge(tt,ht){var ut=new Map;tt.forEach(function(Et){ut.set(Et,!0)});var Ot=ht.filter(function(Et){return!ut.has(Et)});return Ot.length===1?Ot[0]:null}return Ie<_e?{add:!0,key:Ge(Xe,nt)}:{add:!1,key:Ge(nt,Xe)}}function lt(Xe,nt,Ie){var _e=Xe.findIndex(function(ut){return ut.key===Ie}),Ge=Xe[_e+1],tt=nt.findIndex(function(ut){return ut.key===Ie});if(Ge){var ht=nt.findIndex(function(ut){return ut.key===Ge.key});return nt.slice(tt+1,ht)}return nt.slice(tt+1)}var ft=["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"],St={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},qe=function(){},rt="RC_TREE_MOTION_".concat(Math.random()),wt={key:rt},Ct={key:rt,level:0,index:0,pos:"0",node:wt,nodes:[wt]},bt={parent:null,children:[],pos:Ct.pos,data:wt,title:null,key:rt,isStart:[],isEnd:[]};function ct(Xe,nt,Ie,_e){return nt===!1||!Ie?Xe:Xe.slice(0,Math.ceil(Ie/_e)+1)}function xt(Xe){var nt=Xe.key,Ie=Xe.pos;return(0,Ue.km)(nt,Ie)}function dt(Xe){for(var nt=String(Xe.data.key),Ie=Xe;Ie.parent;)Ie=Ie.parent,nt="".concat(Ie.data.key," > ").concat(nt);return nt}var Mt=te.forwardRef(function(Xe,nt){var Ie=Xe.prefixCls,_e=Xe.data,Ge=Xe.selectable,tt=Xe.checkable,ht=Xe.expandedKeys,ut=Xe.selectedKeys,Ot=Xe.checkedKeys,Et=Xe.loadedKeys,Ft=Xe.loadingKeys,qt=Xe.halfCheckedKeys,Xt=Xe.keyEntities,Kt=Xe.disabled,Vt=Xe.dragging,hn=Xe.dragOverNodeKey,on=Xe.dropPosition,cn=Xe.motion,Sn=Xe.height,Cn=Xe.itemHeight,kn=Xe.virtual,In=Xe.scrollWidth,_r=Xe.focusable,xr=Xe.activeItem,qr=Xe.focused,er=Xe.tabIndex,si=Xe.onKeyDown,ei=Xe.onFocus,vi=Xe.onBlur,Li=Xe.onActiveChange,Pi=Xe.onListChangeStart,Xr=Xe.onListChangeEnd,mi=(0,xe.Z)(Xe,ft),Qe=te.useRef(null),ii=te.useRef(null);te.useImperativeHandle(nt,function(){return{scrollTo:function(tr){Qe.current.scrollTo(tr)},getIndentWidth:function(){return ii.current.offsetWidth}}});var Tr=te.useState(ht),wr=(0,pe.Z)(Tr,2),Er=wr[0],kr=wr[1],Hi=te.useState(_e),pr=(0,pe.Z)(Hi,2),Kn=pr[0],Qt=pr[1],Wt=te.useState(_e),zt=(0,pe.Z)(Wt,2),Nn=zt[0],Vn=zt[1],vr=te.useState([]),yn=(0,pe.Z)(vr,2),zn=yn[0],Ht=yn[1],Yt=te.useState(null),qn=(0,pe.Z)(Yt,2),jt=qn[0],un=qn[1],An=te.useRef(_e);An.current=_e;function Yn(){var Hn=An.current;Qt(Hn),Vn(Hn),Ht([]),un(null),Xr()}(0,je.Z)(function(){kr(ht);var Hn=ot(Er,ht);if(Hn.key!==null)if(Hn.add){var tr=Kn.findIndex(function(Nr){var Rr=Nr.key;return Rr===Hn.key}),Zn=ct(lt(Kn,_e,Hn.key),kn,Sn,Cn),ir=Kn.slice();ir.splice(tr+1,0,bt),Vn(ir),Ht(Zn),un("show")}else{var Un=_e.findIndex(function(Nr){var Rr=Nr.key;return Rr===Hn.key}),dr=ct(lt(_e,Kn,Hn.key),kn,Sn,Cn),Fr=_e.slice();Fr.splice(Un+1,0,bt),Vn(Fr),Ht(dr),un("hide")}else Kn!==_e&&(Qt(_e),Vn(_e))},[ht,_e]),te.useEffect(function(){Vt||Yn()},[Vt]);var ln=cn?Nn:_e,fn={expandedKeys:ht,selectedKeys:ut,loadedKeys:Et,loadingKeys:Ft,checkedKeys:Ot,halfCheckedKeys:qt,dragOverNodeKey:hn,dropPosition:on,keyEntities:Xt};return te.createElement(te.Fragment,null,qr&&xr&&te.createElement("span",{style:St,"aria-live":"assertive"},dt(xr)),te.createElement("div",null,te.createElement("input",{style:St,disabled:_r===!1||Kt,tabIndex:_r!==!1?er:null,onKeyDown:si,onFocus:ei,onBlur:vi,value:"",onChange:qe,"aria-label":"for screen reader"})),te.createElement("div",{className:"".concat(Ie,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},te.createElement("div",{className:"".concat(Ie,"-indent")},te.createElement("div",{ref:ii,className:"".concat(Ie,"-indent-unit")}))),te.createElement(De.Z,(0,at.Z)({},mi,{data:ln,itemKey:xt,height:Sn,fullHeight:!1,virtual:kn,itemHeight:Cn,scrollWidth:In,prefixCls:"".concat(Ie,"-list"),ref:Qe,role:"tree",onVisibleChange:function(tr){tr.every(function(Zn){return xt(Zn)!==rt})&&Yn()}}),function(Hn){var tr=Hn.pos,Zn=Object.assign({},(ce(Hn.data),Hn.data)),ir=Hn.title,Un=Hn.key,dr=Hn.isStart,Fr=Hn.isEnd,Nr=(0,Ue.km)(Un,tr);delete Zn.key,delete Zn.children;var Rr=(0,Ue.H8)(Nr,fn);return te.createElement(Ze,(0,at.Z)({},Zn,Rr,{title:ir,active:!!xr&&Un===xr.key,pos:tr,data:Hn.data,isStart:dr,isEnd:Fr,motion:cn,motionNodes:Un===rt?zn:null,motionType:jt,onMotionStart:Pi,onMotionEnd:Yn,treeNodeRequiredProps:fn,onMouseMove:function(){Li(null)}}))}))}),yt=Mt,Dt=pt(82661),mt=pt(34643),vt=pt(65065),et=10,We=function(Xe){(0,Ee.Z)(Ie,Xe);var nt=(0,ke.Z)(Ie);function Ie(){var _e;(0,Re.Z)(this,Ie);for(var Ge=arguments.length,tt=new Array(Ge),ht=0;ht<Ge;ht++)tt[ht]=arguments[ht];return _e=nt.call.apply(nt,[this].concat(tt)),(0,Se.Z)((0,ve.Z)(_e),"destroyed",!1),(0,Se.Z)((0,ve.Z)(_e),"delayedDragEnterLogic",void 0),(0,Se.Z)((0,ve.Z)(_e),"loadingRetryTimes",{}),(0,Se.Z)((0,ve.Z)(_e),"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,Ue.w$)()}),(0,Se.Z)((0,ve.Z)(_e),"dragStartMousePosition",null),(0,Se.Z)((0,ve.Z)(_e),"dragNodeProps",null),(0,Se.Z)((0,ve.Z)(_e),"currentMouseOverDroppableNodeKey",null),(0,Se.Z)((0,ve.Z)(_e),"listRef",te.createRef()),(0,Se.Z)((0,ve.Z)(_e),"onNodeDragStart",function(ut,Ot){var Et=_e.state,Ft=Et.expandedKeys,qt=Et.keyEntities,Xt=_e.props.onDragStart,Kt=Ot.eventKey;_e.dragNodeProps=Ot,_e.dragStartMousePosition={x:ut.clientX,y:ut.clientY};var Vt=(0,Dt._5)(Ft,Kt);_e.setState({draggingNodeKey:Kt,dragChildrenKeys:(0,Dt.wA)(Kt,qt),indent:_e.listRef.current.getIndentWidth()}),_e.setExpandedKeys(Vt),window.addEventListener("dragend",_e.onWindowDragEnd),Xt==null||Xt({event:ut,node:(0,Ue.F)(Ot)})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDragEnter",function(ut,Ot){var Et=_e.state,Ft=Et.expandedKeys,qt=Et.keyEntities,Xt=Et.dragChildrenKeys,Kt=Et.flattenNodes,Vt=Et.indent,hn=_e.props,on=hn.onDragEnter,cn=hn.onExpand,Sn=hn.allowDrop,Cn=hn.direction,kn=Ot.pos,In=Ot.eventKey;if(_e.currentMouseOverDroppableNodeKey!==In&&(_e.currentMouseOverDroppableNodeKey=In),!_e.dragNodeProps){_e.resetDragState();return}var _r=(0,Dt.OM)(ut,_e.dragNodeProps,Ot,Vt,_e.dragStartMousePosition,Sn,Kt,qt,Ft,Cn),xr=_r.dropPosition,qr=_r.dropLevelOffset,er=_r.dropTargetKey,si=_r.dropContainerKey,ei=_r.dropTargetPos,vi=_r.dropAllowed,Li=_r.dragOverNodeKey;if(Xt.includes(er)||!vi){_e.resetDragState();return}if(_e.delayedDragEnterLogic||(_e.delayedDragEnterLogic={}),Object.keys(_e.delayedDragEnterLogic).forEach(function(Pi){clearTimeout(_e.delayedDragEnterLogic[Pi])}),_e.dragNodeProps.eventKey!==Ot.eventKey&&(ut.persist(),_e.delayedDragEnterLogic[kn]=window.setTimeout(function(){if(_e.state.draggingNodeKey!==null){var Pi=(0,He.Z)(Ft),Xr=(0,vt.Z)(qt,Ot.eventKey);Xr&&(Xr.children||[]).length&&(Pi=(0,Dt.L0)(Ft,Ot.eventKey)),_e.props.hasOwnProperty("expandedKeys")||_e.setExpandedKeys(Pi),cn==null||cn(Pi,{node:(0,Ue.F)(Ot),expanded:!0,nativeEvent:ut.nativeEvent})}},800)),_e.dragNodeProps.eventKey===er&&qr===0){_e.resetDragState();return}_e.setState({dragOverNodeKey:Li,dropPosition:xr,dropLevelOffset:qr,dropTargetKey:er,dropContainerKey:si,dropTargetPos:ei,dropAllowed:vi}),on==null||on({event:ut,node:(0,Ue.F)(Ot),expandedKeys:Ft})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDragOver",function(ut,Ot){var Et=_e.state,Ft=Et.dragChildrenKeys,qt=Et.flattenNodes,Xt=Et.keyEntities,Kt=Et.expandedKeys,Vt=Et.indent,hn=_e.props,on=hn.onDragOver,cn=hn.allowDrop,Sn=hn.direction;if(_e.dragNodeProps){var Cn=(0,Dt.OM)(ut,_e.dragNodeProps,Ot,Vt,_e.dragStartMousePosition,cn,qt,Xt,Kt,Sn),kn=Cn.dropPosition,In=Cn.dropLevelOffset,_r=Cn.dropTargetKey,xr=Cn.dropContainerKey,qr=Cn.dropTargetPos,er=Cn.dropAllowed,si=Cn.dragOverNodeKey;Ft.includes(_r)||!er||(_e.dragNodeProps.eventKey===_r&&In===0?_e.state.dropPosition===null&&_e.state.dropLevelOffset===null&&_e.state.dropTargetKey===null&&_e.state.dropContainerKey===null&&_e.state.dropTargetPos===null&&_e.state.dropAllowed===!1&&_e.state.dragOverNodeKey===null||_e.resetDragState():kn===_e.state.dropPosition&&In===_e.state.dropLevelOffset&&_r===_e.state.dropTargetKey&&xr===_e.state.dropContainerKey&&qr===_e.state.dropTargetPos&&er===_e.state.dropAllowed&&si===_e.state.dragOverNodeKey||_e.setState({dropPosition:kn,dropLevelOffset:In,dropTargetKey:_r,dropContainerKey:xr,dropTargetPos:qr,dropAllowed:er,dragOverNodeKey:si}),on==null||on({event:ut,node:(0,Ue.F)(Ot)}))}}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDragLeave",function(ut,Ot){_e.currentMouseOverDroppableNodeKey===Ot.eventKey&&!ut.currentTarget.contains(ut.relatedTarget)&&(_e.resetDragState(),_e.currentMouseOverDroppableNodeKey=null);var Et=_e.props.onDragLeave;Et==null||Et({event:ut,node:(0,Ue.F)(Ot)})}),(0,Se.Z)((0,ve.Z)(_e),"onWindowDragEnd",function(ut){_e.onNodeDragEnd(ut,null,!0),window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDragEnd",function(ut,Ot){var Et=_e.props.onDragEnd;_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),Et==null||Et({event:ut,node:(0,Ue.F)(Ot)}),_e.dragNodeProps=null,window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDrop",function(ut,Ot){var Et,Ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,qt=_e.state,Xt=qt.dragChildrenKeys,Kt=qt.dropPosition,Vt=qt.dropTargetKey,hn=qt.dropTargetPos,on=qt.dropAllowed;if(on){var cn=_e.props.onDrop;if(_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),Vt!==null){var Sn=(0,oe.Z)((0,oe.Z)({},(0,Ue.H8)(Vt,_e.getTreeNodeRequiredProps())),{},{active:((Et=_e.getActiveItem())===null||Et===void 0?void 0:Et.key)===Vt,data:(0,vt.Z)(_e.state.keyEntities,Vt).node}),Cn=Xt.includes(Vt);(0,z.ZP)(!Cn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var kn=(0,Dt.yx)(hn),In={event:ut,node:(0,Ue.F)(Sn),dragNode:_e.dragNodeProps?(0,Ue.F)(_e.dragNodeProps):null,dragNodesKeys:[_e.dragNodeProps.eventKey].concat(Xt),dropToGap:Kt!==0,dropPosition:Kt+Number(kn[kn.length-1])};Ft||cn==null||cn(In),_e.dragNodeProps=null}}}),(0,Se.Z)((0,ve.Z)(_e),"cleanDragState",function(){var ut=_e.state.draggingNodeKey;ut!==null&&_e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),_e.dragStartMousePosition=null,_e.currentMouseOverDroppableNodeKey=null}),(0,Se.Z)((0,ve.Z)(_e),"triggerExpandActionExpand",function(ut,Ot){var Et=_e.state,Ft=Et.expandedKeys,qt=Et.flattenNodes,Xt=Ot.expanded,Kt=Ot.key,Vt=Ot.isLeaf;if(!(Vt||ut.shiftKey||ut.metaKey||ut.ctrlKey)){var hn=qt.filter(function(cn){return cn.key===Kt})[0],on=(0,Ue.F)((0,oe.Z)((0,oe.Z)({},(0,Ue.H8)(Kt,_e.getTreeNodeRequiredProps())),{},{data:hn.data}));_e.setExpandedKeys(Xt?(0,Dt._5)(Ft,Kt):(0,Dt.L0)(Ft,Kt)),_e.onNodeExpand(ut,on)}}),(0,Se.Z)((0,ve.Z)(_e),"onNodeClick",function(ut,Ot){var Et=_e.props,Ft=Et.onClick,qt=Et.expandAction;qt==="click"&&_e.triggerExpandActionExpand(ut,Ot),Ft==null||Ft(ut,Ot)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDoubleClick",function(ut,Ot){var Et=_e.props,Ft=Et.onDoubleClick,qt=Et.expandAction;qt==="doubleClick"&&_e.triggerExpandActionExpand(ut,Ot),Ft==null||Ft(ut,Ot)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeSelect",function(ut,Ot){var Et=_e.state.selectedKeys,Ft=_e.state,qt=Ft.keyEntities,Xt=Ft.fieldNames,Kt=_e.props,Vt=Kt.onSelect,hn=Kt.multiple,on=Ot.selected,cn=Ot[Xt.key],Sn=!on;Sn?hn?Et=(0,Dt.L0)(Et,cn):Et=[cn]:Et=(0,Dt._5)(Et,cn);var Cn=Et.map(function(kn){var In=(0,vt.Z)(qt,kn);return In?In.node:null}).filter(Boolean);_e.setUncontrolledState({selectedKeys:Et}),Vt==null||Vt(Et,{event:"select",selected:Sn,node:Ot,selectedNodes:Cn,nativeEvent:ut.nativeEvent})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeCheck",function(ut,Ot,Et){var Ft=_e.state,qt=Ft.keyEntities,Xt=Ft.checkedKeys,Kt=Ft.halfCheckedKeys,Vt=_e.props,hn=Vt.checkStrictly,on=Vt.onCheck,cn=Ot.key,Sn,Cn={event:"check",node:Ot,checked:Et,nativeEvent:ut.nativeEvent};if(hn){var kn=Et?(0,Dt.L0)(Xt,cn):(0,Dt._5)(Xt,cn),In=(0,Dt._5)(Kt,cn);Sn={checked:kn,halfChecked:In},Cn.checkedNodes=kn.map(function(ei){return(0,vt.Z)(qt,ei)}).filter(Boolean).map(function(ei){return ei.node}),_e.setUncontrolledState({checkedKeys:kn})}else{var _r=(0,mt.S)([].concat((0,He.Z)(Xt),[cn]),!0,qt),xr=_r.checkedKeys,qr=_r.halfCheckedKeys;if(!Et){var er=new Set(xr);er.delete(cn);var si=(0,mt.S)(Array.from(er),{checked:!1,halfCheckedKeys:qr},qt);xr=si.checkedKeys,qr=si.halfCheckedKeys}Sn=xr,Cn.checkedNodes=[],Cn.checkedNodesPositions=[],Cn.halfCheckedKeys=qr,xr.forEach(function(ei){var vi=(0,vt.Z)(qt,ei);if(vi){var Li=vi.node,Pi=vi.pos;Cn.checkedNodes.push(Li),Cn.checkedNodesPositions.push({node:Li,pos:Pi})}}),_e.setUncontrolledState({checkedKeys:xr},!1,{halfCheckedKeys:qr})}on==null||on(Sn,Cn)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeLoad",function(ut){var Ot,Et=ut.key,Ft=_e.state.keyEntities,qt=(0,vt.Z)(Ft,Et);if(!(qt!=null&&(Ot=qt.children)!==null&&Ot!==void 0&&Ot.length)){var Xt=new Promise(function(Kt,Vt){_e.setState(function(hn){var on=hn.loadedKeys,cn=on===void 0?[]:on,Sn=hn.loadingKeys,Cn=Sn===void 0?[]:Sn,kn=_e.props,In=kn.loadData,_r=kn.onLoad;if(!In||cn.includes(Et)||Cn.includes(Et))return null;var xr=In(ut);return xr.then(function(){var qr=_e.state.loadedKeys,er=(0,Dt.L0)(qr,Et);_r==null||_r(er,{event:"load",node:ut}),_e.setUncontrolledState({loadedKeys:er}),_e.setState(function(si){return{loadingKeys:(0,Dt._5)(si.loadingKeys,Et)}}),Kt()}).catch(function(qr){if(_e.setState(function(si){return{loadingKeys:(0,Dt._5)(si.loadingKeys,Et)}}),_e.loadingRetryTimes[Et]=(_e.loadingRetryTimes[Et]||0)+1,_e.loadingRetryTimes[Et]>=et){var er=_e.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),_e.setUncontrolledState({loadedKeys:(0,Dt.L0)(er,Et)}),Kt()}Vt(qr)}),{loadingKeys:(0,Dt.L0)(Cn,Et)}})});return Xt.catch(function(){}),Xt}}),(0,Se.Z)((0,ve.Z)(_e),"onNodeMouseEnter",function(ut,Ot){var Et=_e.props.onMouseEnter;Et==null||Et({event:ut,node:Ot})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeMouseLeave",function(ut,Ot){var Et=_e.props.onMouseLeave;Et==null||Et({event:ut,node:Ot})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeContextMenu",function(ut,Ot){var Et=_e.props.onRightClick;Et&&(ut.preventDefault(),Et({event:ut,node:Ot}))}),(0,Se.Z)((0,ve.Z)(_e),"onFocus",function(){var ut=_e.props.onFocus;_e.setState({focused:!0});for(var Ot=arguments.length,Et=new Array(Ot),Ft=0;Ft<Ot;Ft++)Et[Ft]=arguments[Ft];ut==null||ut.apply(void 0,Et)}),(0,Se.Z)((0,ve.Z)(_e),"onBlur",function(){var ut=_e.props.onBlur;_e.setState({focused:!1}),_e.onActiveChange(null);for(var Ot=arguments.length,Et=new Array(Ot),Ft=0;Ft<Ot;Ft++)Et[Ft]=arguments[Ft];ut==null||ut.apply(void 0,Et)}),(0,Se.Z)((0,ve.Z)(_e),"getTreeNodeRequiredProps",function(){var ut=_e.state,Ot=ut.expandedKeys,Et=ut.selectedKeys,Ft=ut.loadedKeys,qt=ut.loadingKeys,Xt=ut.checkedKeys,Kt=ut.halfCheckedKeys,Vt=ut.dragOverNodeKey,hn=ut.dropPosition,on=ut.keyEntities;return{expandedKeys:Ot||[],selectedKeys:Et||[],loadedKeys:Ft||[],loadingKeys:qt||[],checkedKeys:Xt||[],halfCheckedKeys:Kt||[],dragOverNodeKey:Vt,dropPosition:hn,keyEntities:on}}),(0,Se.Z)((0,ve.Z)(_e),"setExpandedKeys",function(ut){var Ot=_e.state,Et=Ot.treeData,Ft=Ot.fieldNames,qt=(0,Ue.oH)(Et,ut,Ft);_e.setUncontrolledState({expandedKeys:ut,flattenNodes:qt},!0)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeExpand",function(ut,Ot){var Et=_e.state.expandedKeys,Ft=_e.state,qt=Ft.listChanging,Xt=Ft.fieldNames,Kt=_e.props,Vt=Kt.onExpand,hn=Kt.loadData,on=Ot.expanded,cn=Ot[Xt.key];if(!qt){var Sn=Et.includes(cn),Cn=!on;if((0,z.ZP)(on&&Sn||!on&&!Sn,"Expand state not sync with index check"),Et=Cn?(0,Dt.L0)(Et,cn):(0,Dt._5)(Et,cn),_e.setExpandedKeys(Et),Vt==null||Vt(Et,{node:Ot,expanded:Cn,nativeEvent:ut.nativeEvent}),Cn&&hn){var kn=_e.onNodeLoad(Ot);kn&&kn.then(function(){var In=(0,Ue.oH)(_e.state.treeData,Et,Xt);_e.setUncontrolledState({flattenNodes:In})}).catch(function(){var In=_e.state.expandedKeys,_r=(0,Dt._5)(In,cn);_e.setExpandedKeys(_r)})}}}),(0,Se.Z)((0,ve.Z)(_e),"onListChangeStart",function(){_e.setUncontrolledState({listChanging:!0})}),(0,Se.Z)((0,ve.Z)(_e),"onListChangeEnd",function(){setTimeout(function(){_e.setUncontrolledState({listChanging:!1})})}),(0,Se.Z)((0,ve.Z)(_e),"onActiveChange",function(ut){var Ot=_e.state.activeKey,Et=_e.props,Ft=Et.onActiveChange,qt=Et.itemScrollOffset,Xt=qt===void 0?0:qt;Ot!==ut&&(_e.setState({activeKey:ut}),ut!==null&&_e.scrollTo({key:ut,offset:Xt}),Ft==null||Ft(ut))}),(0,Se.Z)((0,ve.Z)(_e),"getActiveItem",function(){var ut=_e.state,Ot=ut.activeKey,Et=ut.flattenNodes;return Ot===null?null:Et.find(function(Ft){var qt=Ft.key;return qt===Ot})||null}),(0,Se.Z)((0,ve.Z)(_e),"offsetActiveKey",function(ut){var Ot=_e.state,Et=Ot.flattenNodes,Ft=Ot.activeKey,qt=Et.findIndex(function(Vt){var hn=Vt.key;return hn===Ft});qt===-1&&ut<0&&(qt=Et.length),qt=(qt+ut+Et.length)%Et.length;var Xt=Et[qt];if(Xt){var Kt=Xt.key;_e.onActiveChange(Kt)}else _e.onActiveChange(null)}),(0,Se.Z)((0,ve.Z)(_e),"onKeyDown",function(ut){var Ot=_e.state,Et=Ot.activeKey,Ft=Ot.expandedKeys,qt=Ot.checkedKeys,Xt=Ot.fieldNames,Kt=_e.props,Vt=Kt.onKeyDown,hn=Kt.checkable,on=Kt.selectable;switch(ut.which){case Pe.Z.UP:{_e.offsetActiveKey(-1),ut.preventDefault();break}case Pe.Z.DOWN:{_e.offsetActiveKey(1),ut.preventDefault();break}}var cn=_e.getActiveItem();if(cn&&cn.data){var Sn=_e.getTreeNodeRequiredProps(),Cn=cn.data.isLeaf===!1||!!(cn.data[Xt.children]||[]).length,kn=(0,Ue.F)((0,oe.Z)((0,oe.Z)({},(0,Ue.H8)(Et,Sn)),{},{data:cn.data,active:!0}));switch(ut.which){case Pe.Z.LEFT:{Cn&&Ft.includes(Et)?_e.onNodeExpand({},kn):cn.parent&&_e.onActiveChange(cn.parent.key),ut.preventDefault();break}case Pe.Z.RIGHT:{Cn&&!Ft.includes(Et)?_e.onNodeExpand({},kn):cn.children&&cn.children.length&&_e.onActiveChange(cn.children[0].key),ut.preventDefault();break}case Pe.Z.ENTER:case Pe.Z.SPACE:{hn&&!kn.disabled&&kn.checkable!==!1&&!kn.disableCheckbox?_e.onNodeCheck({},kn,!qt.includes(Et)):!hn&&on&&!kn.disabled&&kn.selectable!==!1&&_e.onNodeSelect({},kn);break}}}Vt==null||Vt(ut)}),(0,Se.Z)((0,ve.Z)(_e),"setUncontrolledState",function(ut){var Ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!_e.destroyed){var Ft=!1,qt=!0,Xt={};Object.keys(ut).forEach(function(Kt){if(_e.props.hasOwnProperty(Kt)){qt=!1;return}Ft=!0,Xt[Kt]=ut[Kt]}),Ft&&(!Ot||qt)&&_e.setState((0,oe.Z)((0,oe.Z)({},Xt),Et))}}),(0,Se.Z)((0,ve.Z)(_e),"scrollTo",function(ut){_e.listRef.current.scrollTo(ut)}),_e}return(0,de.Z)(Ie,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Ge=this.props,tt=Ge.activeKey,ht=Ge.itemScrollOffset,ut=ht===void 0?0:ht;tt!==void 0&&tt!==this.state.activeKey&&(this.setState({activeKey:tt}),tt!==null&&this.scrollTo({key:tt,offset:ut}))}},{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 Ge=this.state,tt=Ge.focused,ht=Ge.flattenNodes,ut=Ge.keyEntities,Ot=Ge.draggingNodeKey,Et=Ge.activeKey,Ft=Ge.dropLevelOffset,qt=Ge.dropContainerKey,Xt=Ge.dropTargetKey,Kt=Ge.dropPosition,Vt=Ge.dragOverNodeKey,hn=Ge.indent,on=this.props,cn=on.prefixCls,Sn=on.className,Cn=on.style,kn=on.showLine,In=on.focusable,_r=on.tabIndex,xr=_r===void 0?0:_r,qr=on.selectable,er=on.showIcon,si=on.icon,ei=on.switcherIcon,vi=on.draggable,Li=on.checkable,Pi=on.checkStrictly,Xr=on.disabled,mi=on.motion,Qe=on.loadData,ii=on.filterTreeNode,Tr=on.height,wr=on.itemHeight,Er=on.scrollWidth,kr=on.virtual,Hi=on.titleRender,pr=on.dropIndicatorRender,Kn=on.onContextMenu,Qt=on.onScroll,Wt=on.direction,zt=on.rootClassName,Nn=on.rootStyle,Vn=(0,fe.Z)(this.props,{aria:!0,data:!0}),vr;vi&&((0,Ut.Z)(vi)==="object"?vr=vi:typeof vi=="function"?vr={nodeDraggable:vi}:vr={});var yn={prefixCls:cn,selectable:qr,showIcon:er,icon:si,switcherIcon:ei,draggable:vr,draggingNodeKey:Ot,checkable:Li,checkStrictly:Pi,disabled:Xr,keyEntities:ut,dropLevelOffset:Ft,dropContainerKey:qt,dropTargetKey:Xt,dropPosition:Kt,dragOverNodeKey:Vt,indent:hn,direction:Wt,dropIndicatorRender:pr,loadData:Qe,filterTreeNode:ii,titleRender:Hi,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 te.createElement(se.k.Provider,{value:yn},te.createElement("div",{className:me()(cn,Sn,zt,(0,Se.Z)((0,Se.Z)((0,Se.Z)({},"".concat(cn,"-show-line"),kn),"".concat(cn,"-focused"),tt),"".concat(cn,"-active-focused"),Et!==null)),style:Nn},te.createElement(yt,(0,at.Z)({ref:this.listRef,prefixCls:cn,style:Cn,data:ht,disabled:Xr,selectable:qr,checkable:!!Li,motion:mi,dragging:Ot!==null,height:Tr,itemHeight:wr,virtual:kr,focusable:In,focused:tt,tabIndex:xr,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Kn,onScroll:Qt,scrollWidth:Er},this.getTreeNodeRequiredProps(),Vn))))}}],[{key:"getDerivedStateFromProps",value:function(Ge,tt){var ht=tt.prevProps,ut={prevProps:Ge};function Ot(xr){return!ht&&Ge.hasOwnProperty(xr)||ht&&ht[xr]!==Ge[xr]}var Et,Ft=tt.fieldNames;if(Ot("fieldNames")&&(Ft=(0,Ue.w$)(Ge.fieldNames),ut.fieldNames=Ft),Ot("treeData")?Et=Ge.treeData:Ot("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Et=(0,Ue.zn)(Ge.children)),Et){ut.treeData=Et;var qt=(0,Ue.I8)(Et,{fieldNames:Ft});ut.keyEntities=(0,oe.Z)((0,Se.Z)({},rt,Ct),qt.keyEntities)}var Xt=ut.keyEntities||tt.keyEntities;if(Ot("expandedKeys")||ht&&Ot("autoExpandParent"))ut.expandedKeys=Ge.autoExpandParent||!ht&&Ge.defaultExpandParent?(0,Dt.r7)(Ge.expandedKeys,Xt):Ge.expandedKeys;else if(!ht&&Ge.defaultExpandAll){var Kt=(0,oe.Z)({},Xt);delete Kt[rt];var Vt=[];Object.keys(Kt).forEach(function(xr){var qr=Kt[xr];qr.children&&qr.children.length&&Vt.push(qr.key)}),ut.expandedKeys=Vt}else!ht&&Ge.defaultExpandedKeys&&(ut.expandedKeys=Ge.autoExpandParent||Ge.defaultExpandParent?(0,Dt.r7)(Ge.defaultExpandedKeys,Xt):Ge.defaultExpandedKeys);if(ut.expandedKeys||delete ut.expandedKeys,Et||ut.expandedKeys){var hn=(0,Ue.oH)(Et||tt.treeData,ut.expandedKeys||tt.expandedKeys,Ft);ut.flattenNodes=hn}if(Ge.selectable&&(Ot("selectedKeys")?ut.selectedKeys=(0,Dt.BT)(Ge.selectedKeys,Ge):!ht&&Ge.defaultSelectedKeys&&(ut.selectedKeys=(0,Dt.BT)(Ge.defaultSelectedKeys,Ge))),Ge.checkable){var on;if(Ot("checkedKeys")?on=(0,Dt.E6)(Ge.checkedKeys)||{}:!ht&&Ge.defaultCheckedKeys?on=(0,Dt.E6)(Ge.defaultCheckedKeys)||{}:Et&&(on=(0,Dt.E6)(Ge.checkedKeys)||{checkedKeys:tt.checkedKeys,halfCheckedKeys:tt.halfCheckedKeys}),on){var cn=on,Sn=cn.checkedKeys,Cn=Sn===void 0?[]:Sn,kn=cn.halfCheckedKeys,In=kn===void 0?[]:kn;if(!Ge.checkStrictly){var _r=(0,mt.S)(Cn,!0,Xt);Cn=_r.checkedKeys,In=_r.halfCheckedKeys}ut.checkedKeys=Cn,ut.halfCheckedKeys=In}}return Ot("loadedKeys")&&(ut.loadedKeys=Ge.loadedKeys),ut}}]),Ie}(te.Component);(0,Se.Z)(We,"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:le,allowDrop:function(){return!0},expandAction:!1}),(0,Se.Z)(We,"TreeNode",Te.Z);var we=We,Ne=we},82661:function(Dn,jn,pt){"use strict";pt.d(jn,{BT:function(){return te},E6:function(){return le},L0:function(){return Se},OM:function(){return z},_5:function(){return ke},r7:function(){return ce},wA:function(){return me},yx:function(){return Ae}});var at=pt(80702),Ut=pt(62853),oe=pt(48736),He=pt(59301),Re=pt(639),de=pt(65065),ve=pt(34061),Ee=null;function ke(pe,xe){if(!pe)return[];var je=pe.slice(),De=je.indexOf(xe);return De>=0&&je.splice(De,1),je}function Se(pe,xe){var je=(pe||[]).slice();return je.indexOf(xe)===-1&&je.push(xe),je}function Ae(pe){return pe.split("-")}function me(pe,xe){var je=[],De=(0,de.Z)(xe,pe);function Fe(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Te.forEach(function(Me){var Be=Me.key,Ue=Me.children;je.push(Be),Fe(Ue)})}return Fe(De.children),je}function Pe(pe){if(pe.parent){var xe=Ae(pe.pos);return Number(xe[xe.length-1])===pe.parent.children.length-1}return!1}function fe(pe){var xe=Ae(pe.pos);return Number(xe[xe.length-1])===0}function z(pe,xe,je,De,Fe,Te,Me,Be,Ue,Ye){var Ve,Ze=pe.clientX,ot=pe.clientY,lt=pe.target.getBoundingClientRect(),ft=lt.top,St=lt.height,qe=(Ye==="rtl"?-1:1)*(((Fe==null?void 0:Fe.x)||0)-Ze),rt=(qe-12)/De,wt=Ue.filter(function(Ne){var Xe;return(Xe=Be[Ne])===null||Xe===void 0||(Xe=Xe.children)===null||Xe===void 0?void 0:Xe.length}),Ct=(0,de.Z)(Be,je.eventKey);if(ot<ft+St/2){var bt=Me.findIndex(function(Ne){return Ne.key===Ct.key}),ct=bt<=0?0:bt-1,xt=Me[ct].key;Ct=(0,de.Z)(Be,xt)}var dt=Ct.key,Mt=Ct,yt=Ct.key,Dt=0,mt=0;if(!wt.includes(dt))for(var vt=0;vt<rt&&Pe(Ct);vt+=1)Ct=Ct.parent,mt+=1;var et=xe.data,We=Ct.node,we=!0;return fe(Ct)&&Ct.level===0&&ot<ft+St/2&&Te({dragNode:et,dropNode:We,dropPosition:-1})&&Ct.key===je.eventKey?Dt=-1:(Mt.children||[]).length&&wt.includes(yt)?Te({dragNode:et,dropNode:We,dropPosition:0})?Dt=0:we=!1:mt===0?rt>-1.5?Te({dragNode:et,dropNode:We,dropPosition:1})?Dt=1:we=!1:Te({dragNode:et,dropNode:We,dropPosition:0})?Dt=0:Te({dragNode:et,dropNode:We,dropPosition:1})?Dt=1:we=!1:Te({dragNode:et,dropNode:We,dropPosition:1})?Dt=1:we=!1,{dropPosition:Dt,dropLevelOffset:mt,dropTargetKey:Ct.key,dropTargetPos:Ct.pos,dragOverNodeKey:yt,dropContainerKey:Dt===0?null:((Ve=Ct.parent)===null||Ve===void 0?void 0:Ve.key)||null,dropAllowed:we}}function te(pe,xe){if(pe){var je=xe.multiple;return je?pe.slice():pe.length?[pe[0]]:pe}}var se=function(xe){return xe};function ie(pe,xe){if(!pe)return[];var je=xe||{},De=je.processProps,Fe=De===void 0?se:De,Te=Array.isArray(pe)?pe:[pe];return Te.map(function(Me){var Be=Me.children,Ue=_objectWithoutProperties(Me,Ee),Ye=ie(Be,xe);return React.createElement(TreeNode,_extends({key:Ue.key},Fe(Ue)),Ye)})}function le(pe){if(!pe)return null;var xe;if(Array.isArray(pe))xe={checkedKeys:pe,halfCheckedKeys:void 0};else if((0,Ut.Z)(pe)==="object")xe={checkedKeys:pe.checked||void 0,halfCheckedKeys:pe.halfChecked||void 0};else return(0,oe.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return xe}function ce(pe,xe){var je=new Set;function De(Fe){if(!je.has(Fe)){var Te=(0,de.Z)(xe,Fe);if(Te){je.add(Fe);var Me=Te.parent,Be=Te.node;Be.disabled||Me&&De(Me.key)}}}return(pe||[]).forEach(function(Fe){De(Fe)}),(0,at.Z)(je)}},34643:function(Dn,jn,pt){"use strict";pt.d(jn,{S:function(){return ve}});var at=pt(48736),Ut=pt(65065);function oe(Ee,ke){var Se=new Set;return Ee.forEach(function(Ae){ke.has(Ae)||Se.add(Ae)}),Se}function He(Ee){var ke=Ee||{},Se=ke.disabled,Ae=ke.disableCheckbox,me=ke.checkable;return!!(Se||Ae)||me===!1}function Re(Ee,ke,Se,Ae){for(var me=new Set(Ee),Pe=new Set,fe=0;fe<=Se;fe+=1){var z=ke.get(fe)||new Set;z.forEach(function(le){var ce=le.key,pe=le.node,xe=le.children,je=xe===void 0?[]:xe;me.has(ce)&&!Ae(pe)&&je.filter(function(De){return!Ae(De.node)}).forEach(function(De){me.add(De.key)})})}for(var te=new Set,se=Se;se>=0;se-=1){var ie=ke.get(se)||new Set;ie.forEach(function(le){var ce=le.parent,pe=le.node;if(!(Ae(pe)||!le.parent||te.has(le.parent.key))){if(Ae(le.parent.node)){te.add(ce.key);return}var xe=!0,je=!1;(ce.children||[]).filter(function(De){return!Ae(De.node)}).forEach(function(De){var Fe=De.key,Te=me.has(Fe);xe&&!Te&&(xe=!1),!je&&(Te||Pe.has(Fe))&&(je=!0)}),xe&&me.add(ce.key),je&&Pe.add(ce.key),te.add(ce.key)}})}return{checkedKeys:Array.from(me),halfCheckedKeys:Array.from(oe(Pe,me))}}function de(Ee,ke,Se,Ae,me){for(var Pe=new Set(Ee),fe=new Set(ke),z=0;z<=Ae;z+=1){var te=Se.get(z)||new Set;te.forEach(function(ce){var pe=ce.key,xe=ce.node,je=ce.children,De=je===void 0?[]:je;!Pe.has(pe)&&!fe.has(pe)&&!me(xe)&&De.filter(function(Fe){return!me(Fe.node)}).forEach(function(Fe){Pe.delete(Fe.key)})})}fe=new Set;for(var se=new Set,ie=Ae;ie>=0;ie-=1){var le=Se.get(ie)||new Set;le.forEach(function(ce){var pe=ce.parent,xe=ce.node;if(!(me(xe)||!ce.parent||se.has(ce.parent.key))){if(me(ce.parent.node)){se.add(pe.key);return}var je=!0,De=!1;(pe.children||[]).filter(function(Fe){return!me(Fe.node)}).forEach(function(Fe){var Te=Fe.key,Me=Pe.has(Te);je&&!Me&&(je=!1),!De&&(Me||fe.has(Te))&&(De=!0)}),je||Pe.delete(pe.key),De&&fe.add(pe.key),se.add(pe.key)}})}return{checkedKeys:Array.from(Pe),halfCheckedKeys:Array.from(oe(fe,Pe))}}function ve(Ee,ke,Se,Ae){var me=[],Pe;Ae?Pe=Ae:Pe=He;var fe=new Set(Ee.filter(function(ie){var le=!!(0,Ut.Z)(Se,ie);return le||me.push(ie),le})),z=new Map,te=0;Object.keys(Se).forEach(function(ie){var le=Se[ie],ce=le.level,pe=z.get(ce);pe||(pe=new Set,z.set(ce,pe)),pe.add(le),te=Math.max(te,ce)}),(0,at.ZP)(!me.length,"Tree missing follow keys: ".concat(me.slice(0,100).map(function(ie){return"'".concat(ie,"'")}).join(", ")));var se;return ke===!0?se=Re(fe,z,te,Pe):se=de(fe,ke.halfCheckedKeys,z,te,Pe),se}},65065:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return at}});function at(Ut,oe){return Ut[oe]}},34061:function(Dn,jn,pt){"use strict";pt.d(jn,{F:function(){return ce},H8:function(){return le},I8:function(){return ie},km:function(){return me},oH:function(){return te},w$:function(){return Pe},zn:function(){return z}});var at=pt(62853),Ut=pt(80702),oe=pt(77321),He=pt(74416),Re=pt(11592),de=pt(2738),ve=pt(48736),Ee=pt(65065),ke=["children"];function Se(pe,xe){return"".concat(pe,"-").concat(xe)}function Ae(pe){return pe&&pe.type&&pe.type.isTreeNode}function me(pe,xe){return pe!=null?pe:xe}function Pe(pe){var xe=pe||{},je=xe.title,De=xe._title,Fe=xe.key,Te=xe.children,Me=je||"title";return{title:Me,_title:De||[Me],key:Fe||"key",children:Te||"children"}}function fe(pe,xe){var je=new Map;function De(Fe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Fe||[]).forEach(function(Me){var Be=Me[xe.key],Ue=Me[xe.children];warning(Be!=null,"Tree node must have a certain key: [".concat(Te).concat(Be,"]"));var Ye=String(Be);warning(!je.has(Ye)||Be===null||Be===void 0,"Same 'key' exist in the Tree: ".concat(Ye)),je.set(Ye,!0),De(Ue,"".concat(Te).concat(Ye," > "))})}De(pe)}function z(pe){function xe(je){var De=(0,Re.Z)(je);return De.map(function(Fe){if(!Ae(Fe))return(0,ve.ZP)(!Fe,"Tree/TreeNode can only accept TreeNode as children."),null;var Te=Fe.key,Me=Fe.props,Be=Me.children,Ue=(0,He.Z)(Me,ke),Ye=(0,oe.Z)({key:Te},Ue),Ve=xe(Be);return Ve.length&&(Ye.children=Ve),Ye}).filter(function(Fe){return Fe})}return xe(pe)}function te(pe,xe,je){var De=Pe(je),Fe=De._title,Te=De.key,Me=De.children,Be=new Set(xe===!0?[]:xe),Ue=[];function Ye(Ve){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ve.map(function(ot,lt){for(var ft=Se(Ze?Ze.pos:"0",lt),St=me(ot[Te],ft),qe,rt=0;rt<Fe.length;rt+=1){var wt=Fe[rt];if(ot[wt]!==void 0){qe=ot[wt];break}}var Ct=Object.assign((0,de.Z)(ot,[].concat((0,Ut.Z)(Fe),[Te,Me])),{title:qe,key:St,parent:Ze,pos:ft,children:null,data:ot,isStart:[].concat((0,Ut.Z)(Ze?Ze.isStart:[]),[lt===0]),isEnd:[].concat((0,Ut.Z)(Ze?Ze.isEnd:[]),[lt===Ve.length-1])});return Ue.push(Ct),xe===!0||Be.has(St)?Ct.children=Ye(ot[Me]||[],Ct):Ct.children=[],Ct})}return Ye(pe),Ue}function se(pe,xe,je){var De={};(0,at.Z)(je)==="object"?De=je:De={externalGetKey:je},De=De||{};var Fe=De,Te=Fe.childrenPropName,Me=Fe.externalGetKey,Be=Fe.fieldNames,Ue=Pe(Be),Ye=Ue.key,Ve=Ue.children,Ze=Te||Ve,ot;Me?typeof Me=="string"?ot=function(St){return St[Me]}:typeof Me=="function"&&(ot=function(St){return Me(St)}):ot=function(St,qe){return me(St[Ye],qe)};function lt(ft,St,qe,rt){var wt=ft?ft[Ze]:pe,Ct=ft?Se(qe.pos,St):"0",bt=ft?[].concat((0,Ut.Z)(rt),[ft]):[];if(ft){var ct=ot(ft,Ct),xt={node:ft,index:St,pos:Ct,key:ct,parentPos:qe.node?qe.pos:null,level:qe.level+1,nodes:bt};xe(xt)}wt&&wt.forEach(function(dt,Mt){lt(dt,Mt,{node:ft,pos:Ct,level:qe?qe.level+1:-1},bt)})}lt(null)}function ie(pe){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=xe.initWrapper,De=xe.processEntity,Fe=xe.onProcessFinished,Te=xe.externalGetKey,Me=xe.childrenPropName,Be=xe.fieldNames,Ue=arguments.length>2?arguments[2]:void 0,Ye=Te||Ue,Ve={},Ze={},ot={posEntities:Ve,keyEntities:Ze};return je&&(ot=je(ot)||ot),se(pe,function(lt){var ft=lt.node,St=lt.index,qe=lt.pos,rt=lt.key,wt=lt.parentPos,Ct=lt.level,bt=lt.nodes,ct={node:ft,nodes:bt,index:St,key:rt,pos:qe,level:Ct},xt=me(rt,qe);Ve[qe]=ct,Ze[xt]=ct,ct.parent=Ve[wt],ct.parent&&(ct.parent.children=ct.parent.children||[],ct.parent.children.push(ct)),De&&De(ct,ot)},{externalGetKey:Ye,childrenPropName:Me,fieldNames:Be}),Fe&&Fe(ot),ot}function le(pe,xe){var je=xe.expandedKeys,De=xe.selectedKeys,Fe=xe.loadedKeys,Te=xe.loadingKeys,Me=xe.checkedKeys,Be=xe.halfCheckedKeys,Ue=xe.dragOverNodeKey,Ye=xe.dropPosition,Ve=xe.keyEntities,Ze=(0,Ee.Z)(Ve,pe),ot={eventKey:pe,expanded:je.indexOf(pe)!==-1,selected:De.indexOf(pe)!==-1,loaded:Fe.indexOf(pe)!==-1,loading:Te.indexOf(pe)!==-1,checked:Me.indexOf(pe)!==-1,halfChecked:Be.indexOf(pe)!==-1,pos:String(Ze?Ze.pos:""),dragOver:Ue===pe&&Ye===0,dragOverGapTop:Ue===pe&&Ye===-1,dragOverGapBottom:Ue===pe&&Ye===1};return ot}function ce(pe){var xe=pe.data,je=pe.expanded,De=pe.selected,Fe=pe.checked,Te=pe.loaded,Me=pe.loading,Be=pe.halfChecked,Ue=pe.dragOver,Ye=pe.dragOverGapTop,Ve=pe.dragOverGapBottom,Ze=pe.pos,ot=pe.active,lt=pe.eventKey,ft=(0,oe.Z)((0,oe.Z)({},xe),{},{expanded:je,selected:De,checked:Fe,loaded:Te,loading:Me,halfChecked:Be,dragOver:Ue,dragOverGapTop:Ye,dragOverGapBottom:Ve,pos:Ze,active:ot,key:lt});return"props"in ft||Object.defineProperty(ft,"props",{get:function(){return(0,ve.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),pe}}),ft}},90472:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return lt}});var at=pt(72308),Ut=pt(96949),oe=pt(55090),He=pt(80237),Re=pt(77205),de=pt(38793),ve=pt(49618),Ee=pt(59301),ke=pt(77321),Se=pt(74416),Ae=pt(62853),me=pt(65736),Pe=pt(72633),fe=pt(80702),z=pt(92310),te=pt.n(z),se=pt(26112),ie=pt(48736),le=function(ft,St){if(ft&&St){var qe=Array.isArray(St)?St:St.split(","),rt=ft.name||"",wt=ft.type||"",Ct=wt.replace(/\/.*$/,"");return qe.some(function(bt){var ct=bt.trim();if(/^\*(\/\*)?$/.test(bt))return!0;if(ct.charAt(0)==="."){var xt=rt.toLowerCase(),dt=ct.toLowerCase(),Mt=[dt];return(dt===".jpg"||dt===".jpeg")&&(Mt=[".jpg",".jpeg"]),Mt.some(function(yt){return xt.endsWith(yt)})}return/\/\*$/.test(ct)?Ct===ct.replace(/\/.*$/,""):wt===ct?!0:/^\w+$/.test(ct)?((0,ie.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(ct,"'.Skip for check.")),!0):!1})}return!0};function ce(ft,St){var qe="cannot ".concat(ft.method," ").concat(ft.action," ").concat(St.status,"'"),rt=new Error(qe);return rt.status=St.status,rt.method=ft.method,rt.url=ft.action,rt}function pe(ft){var St=ft.responseText||ft.response;if(!St)return St;try{return JSON.parse(St)}catch(qe){return St}}function xe(ft){var St=new XMLHttpRequest;ft.onProgress&&St.upload&&(St.upload.onprogress=function(Ct){Ct.total>0&&(Ct.percent=Ct.loaded/Ct.total*100),ft.onProgress(Ct)});var qe=new FormData;ft.data&&Object.keys(ft.data).forEach(function(wt){var Ct=ft.data[wt];if(Array.isArray(Ct)){Ct.forEach(function(bt){qe.append("".concat(wt,"[]"),bt)});return}qe.append(wt,Ct)}),ft.file instanceof Blob?qe.append(ft.filename,ft.file,ft.file.name):qe.append(ft.filename,ft.file),St.onerror=function(Ct){ft.onError(Ct)},St.onload=function(){return St.status<200||St.status>=300?ft.onError(ce(ft,St),pe(St)):ft.onSuccess(pe(St),St)},St.open(ft.method,ft.action,!0),ft.withCredentials&&"withCredentials"in St&&(St.withCredentials=!0);var rt=ft.headers||{};return rt["X-Requested-With"]!==null&&St.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(rt).forEach(function(wt){rt[wt]!==null&&St.setRequestHeader(wt,rt[wt])}),St.send(qe),{abort:function(){St.abort()}}}var je=function(){var ft=(0,Pe.Z)((0,me.Z)().mark(function St(qe,rt){var wt,Ct,bt,ct,xt,dt,Mt,yt;return(0,me.Z)().wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:dt=function(){return dt=(0,Pe.Z)((0,me.Z)().mark(function et(We){return(0,me.Z)().wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.abrupt("return",new Promise(function(Xe){We.file(function(nt){rt(nt)?(We.fullPath&&!nt.webkitRelativePath&&(Object.defineProperties(nt,{webkitRelativePath:{writable:!0}}),nt.webkitRelativePath=We.fullPath.replace(/^\//,""),Object.defineProperties(nt,{webkitRelativePath:{writable:!1}})),Xe(nt)):Xe(null)})}));case 1:case"end":return Ne.stop()}},et)})),dt.apply(this,arguments)},xt=function(et){return dt.apply(this,arguments)},ct=function(){return ct=(0,Pe.Z)((0,me.Z)().mark(function et(We){var we,Ne,Xe,nt,Ie;return(0,me.Z)().wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:we=We.createReader(),Ne=[];case 2:return Ge.next=5,new Promise(function(tt){we.readEntries(tt,function(){return tt([])})});case 5:if(Xe=Ge.sent,nt=Xe.length,nt){Ge.next=9;break}return Ge.abrupt("break",12);case 9:for(Ie=0;Ie<nt;Ie++)Ne.push(Xe[Ie]);Ge.next=2;break;case 12:return Ge.abrupt("return",Ne);case 13:case"end":return Ge.stop()}},et)})),ct.apply(this,arguments)},bt=function(et){return ct.apply(this,arguments)},wt=[],Ct=[],qe.forEach(function(vt){return Ct.push(vt.webkitGetAsEntry())}),Mt=function(){var vt=(0,Pe.Z)((0,me.Z)().mark(function et(We,we){var Ne,Xe;return(0,me.Z)().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(We){Ie.next=2;break}return Ie.abrupt("return");case 2:if(We.path=we||"",!We.isFile){Ie.next=10;break}return Ie.next=6,xt(We);case 6:Ne=Ie.sent,Ne&&wt.push(Ne),Ie.next=15;break;case 10:if(!We.isDirectory){Ie.next=15;break}return Ie.next=13,bt(We);case 13:Xe=Ie.sent,Ct.push.apply(Ct,(0,fe.Z)(Xe));case 15:case"end":return Ie.stop()}},et)}));return function(We,we){return vt.apply(this,arguments)}}(),yt=0;case 9:if(!(yt<Ct.length)){mt.next=15;break}return mt.next=12,Mt(Ct[yt]);case 12:yt++,mt.next=9;break;case 15:return mt.abrupt("return",wt);case 16:case"end":return mt.stop()}},St)}));return function(qe,rt){return ft.apply(this,arguments)}}(),De=je,Fe=+new Date,Te=0;function Me(){return"rc-upload-".concat(Fe,"-").concat(++Te)}var Be=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Ue=function(ft){(0,Re.Z)(qe,ft);var St=(0,de.Z)(qe);function qe(){var rt;(0,Ut.Z)(this,qe);for(var wt=arguments.length,Ct=new Array(wt),bt=0;bt<wt;bt++)Ct[bt]=arguments[bt];return rt=St.call.apply(St,[this].concat(Ct)),(0,ve.Z)((0,He.Z)(rt),"state",{uid:Me()}),(0,ve.Z)((0,He.Z)(rt),"reqs",{}),(0,ve.Z)((0,He.Z)(rt),"fileInput",void 0),(0,ve.Z)((0,He.Z)(rt),"_isMounted",void 0),(0,ve.Z)((0,He.Z)(rt),"onChange",function(ct){var xt=rt.props,dt=xt.accept,Mt=xt.directory,yt=ct.target.files,Dt=(0,fe.Z)(yt).filter(function(mt){return!Mt||le(mt,dt)});rt.uploadFiles(Dt),rt.reset()}),(0,ve.Z)((0,He.Z)(rt),"onClick",function(ct){var xt=rt.fileInput;if(xt){var dt=ct.target,Mt=rt.props.onClick;if(dt&&dt.tagName==="BUTTON"){var yt=xt.parentNode;yt.focus(),dt.blur()}xt.click(),Mt&&Mt(ct)}}),(0,ve.Z)((0,He.Z)(rt),"onKeyDown",function(ct){ct.key==="Enter"&&rt.onClick(ct)}),(0,ve.Z)((0,He.Z)(rt),"onFileDrop",function(){var ct=(0,Pe.Z)((0,me.Z)().mark(function xt(dt){var Mt,yt,Dt;return(0,me.Z)().wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:if(Mt=rt.props.multiple,dt.preventDefault(),dt.type!=="dragover"){vt.next=4;break}return vt.abrupt("return");case 4:if(!rt.props.directory){vt.next=11;break}return vt.next=7,De(Array.prototype.slice.call(dt.dataTransfer.items),function(et){return le(et,rt.props.accept)});case 7:yt=vt.sent,rt.uploadFiles(yt),vt.next=14;break;case 11:Dt=(0,fe.Z)(dt.dataTransfer.files).filter(function(et){return le(et,rt.props.accept)}),Mt===!1&&(Dt=Dt.slice(0,1)),rt.uploadFiles(Dt);case 14:case"end":return vt.stop()}},xt)}));return function(xt){return ct.apply(this,arguments)}}()),(0,ve.Z)((0,He.Z)(rt),"uploadFiles",function(ct){var xt=(0,fe.Z)(ct),dt=xt.map(function(Mt){return Mt.uid=Me(),rt.processFile(Mt,xt)});Promise.all(dt).then(function(Mt){var yt=rt.props.onBatchStart;yt==null||yt(Mt.map(function(Dt){var mt=Dt.origin,vt=Dt.parsedFile;return{file:mt,parsedFile:vt}})),Mt.filter(function(Dt){return Dt.parsedFile!==null}).forEach(function(Dt){rt.post(Dt)})})}),(0,ve.Z)((0,He.Z)(rt),"processFile",function(){var ct=(0,Pe.Z)((0,me.Z)().mark(function xt(dt,Mt){var yt,Dt,mt,vt,et,We,we,Ne,Xe;return(0,me.Z)().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(yt=rt.props.beforeUpload,Dt=dt,!yt){Ie.next=14;break}return Ie.prev=3,Ie.next=6,yt(dt,Mt);case 6:Dt=Ie.sent,Ie.next=12;break;case 9:Ie.prev=9,Ie.t0=Ie.catch(3),Dt=!1;case 12:if(Dt!==!1){Ie.next=14;break}return Ie.abrupt("return",{origin:dt,parsedFile:null,action:null,data:null});case 14:if(mt=rt.props.action,typeof mt!="function"){Ie.next=21;break}return Ie.next=18,mt(dt);case 18:vt=Ie.sent,Ie.next=22;break;case 21:vt=mt;case 22:if(et=rt.props.data,typeof et!="function"){Ie.next=29;break}return Ie.next=26,et(dt);case 26:We=Ie.sent,Ie.next=30;break;case 29:We=et;case 30:return we=((0,Ae.Z)(Dt)==="object"||typeof Dt=="string")&&Dt?Dt:dt,we instanceof File?Ne=we:Ne=new File([we],dt.name,{type:dt.type}),Xe=Ne,Xe.uid=dt.uid,Ie.abrupt("return",{origin:dt,data:We,parsedFile:Xe,action:vt});case 35:case"end":return Ie.stop()}},xt,null,[[3,9]])}));return function(xt,dt){return ct.apply(this,arguments)}}()),(0,ve.Z)((0,He.Z)(rt),"saveFileInput",function(ct){rt.fileInput=ct}),rt}return(0,oe.Z)(qe,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(wt){var Ct=this,bt=wt.data,ct=wt.origin,xt=wt.action,dt=wt.parsedFile;if(this._isMounted){var Mt=this.props,yt=Mt.onStart,Dt=Mt.customRequest,mt=Mt.name,vt=Mt.headers,et=Mt.withCredentials,We=Mt.method,we=ct.uid,Ne=Dt||xe,Xe={action:xt,filename:mt,data:bt,file:dt,headers:vt,withCredentials:et,method:We||"post",onProgress:function(Ie){var _e=Ct.props.onProgress;_e==null||_e(Ie,dt)},onSuccess:function(Ie,_e){var Ge=Ct.props.onSuccess;Ge==null||Ge(Ie,dt,_e),delete Ct.reqs[we]},onError:function(Ie,_e){var Ge=Ct.props.onError;Ge==null||Ge(Ie,_e,dt),delete Ct.reqs[we]}};yt(ct),this.reqs[we]=Ne(Xe)}}},{key:"reset",value:function(){this.setState({uid:Me()})}},{key:"abort",value:function(wt){var Ct=this.reqs;if(wt){var bt=wt.uid?wt.uid:wt;Ct[bt]&&Ct[bt].abort&&Ct[bt].abort(),delete Ct[bt]}else Object.keys(Ct).forEach(function(ct){Ct[ct]&&Ct[ct].abort&&Ct[ct].abort(),delete Ct[ct]})}},{key:"render",value:function(){var wt=this.props,Ct=wt.component,bt=wt.prefixCls,ct=wt.className,xt=wt.classNames,dt=xt===void 0?{}:xt,Mt=wt.disabled,yt=wt.id,Dt=wt.name,mt=wt.style,vt=wt.styles,et=vt===void 0?{}:vt,We=wt.multiple,we=wt.accept,Ne=wt.capture,Xe=wt.children,nt=wt.directory,Ie=wt.openFileDialogOnClick,_e=wt.onMouseEnter,Ge=wt.onMouseLeave,tt=wt.hasControlInside,ht=(0,Se.Z)(wt,Be),ut=te()((0,ve.Z)((0,ve.Z)((0,ve.Z)({},bt,!0),"".concat(bt,"-disabled"),Mt),ct,ct)),Ot=nt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Et=Mt?{}:{onClick:Ie?this.onClick:function(){},onKeyDown:Ie?this.onKeyDown:function(){},onMouseEnter:_e,onMouseLeave:Ge,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:tt?void 0:"0"};return Ee.createElement(Ct,(0,at.Z)({},Et,{className:ut,role:tt?void 0:"button",style:mt}),Ee.createElement("input",(0,at.Z)({},(0,se.Z)(ht,{aria:!0,data:!0}),{id:yt,name:Dt,disabled:Mt,type:"file",ref:this.saveFileInput,onClick:function(qt){return qt.stopPropagation()},key:this.state.uid,style:(0,ke.Z)({display:"none"},et.input),className:dt.input,accept:we},Ot,{multiple:We,onChange:this.onChange},Ne!=null?{capture:Ne}:{})),Xe)}}]),qe}(Ee.Component),Ye=Ue;function Ve(){}var Ze=function(ft){(0,Re.Z)(qe,ft);var St=(0,de.Z)(qe);function qe(){var rt;(0,Ut.Z)(this,qe);for(var wt=arguments.length,Ct=new Array(wt),bt=0;bt<wt;bt++)Ct[bt]=arguments[bt];return rt=St.call.apply(St,[this].concat(Ct)),(0,ve.Z)((0,He.Z)(rt),"uploader",void 0),(0,ve.Z)((0,He.Z)(rt),"saveUploader",function(ct){rt.uploader=ct}),rt}return(0,oe.Z)(qe,[{key:"abort",value:function(wt){this.uploader.abort(wt)}},{key:"render",value:function(){return Ee.createElement(Ye,(0,at.Z)({},this.props,{ref:this.saveUploader}))}}]),qe}(Ee.Component);(0,ve.Z)(Ze,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ve,onError:Ve,onSuccess:Ve,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var ot=Ze,lt=ot},8224:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return Ut}});var at=pt(4676);function Ut(oe,He,Re,de){var ve=at.unstable_batchedUpdates?function(ke){at.unstable_batchedUpdates(Re,ke)}:Re;return oe!=null&&oe.addEventListener&&oe.addEventListener(He,ve,de),{remove:function(){oe!=null&&oe.removeEventListener&&oe.removeEventListener(He,ve,de)}}}},24514:function(Dn,jn,pt){"use strict";pt.d(jn,{G:function(){return He}});var at=pt(47273),Ut=function(de){if((0,at.Z)()&&window.document.documentElement){var ve=Array.isArray(de)?de:[de],Ee=window.document.documentElement;return ve.some(function(ke){return ke in Ee.style})}return!1},oe=function(de,ve){if(!Ut(de))return!1;var Ee=document.createElement("div"),ke=Ee.style[de];return Ee.style[de]=ve,Ee.style[de]!==ke};function He(Re,de){return!Array.isArray(Re)&&de!==void 0?oe(Re,de):Ut(Re)}},45680:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return et}});var at=pt(72308),Ut=pt(62853),oe=pt(77321),He=pt(49618),Re=pt(52487),de=pt(74416),ve=pt(92310),Ee=pt.n(ve),ke=pt(29301),Se=pt(70425),Ae=pt(34280),me=pt(59301),Pe=pt(4676),fe=me.forwardRef(function(We,we){var Ne=We.height,Xe=We.offsetY,nt=We.offsetX,Ie=We.children,_e=We.prefixCls,Ge=We.onInnerResize,tt=We.innerProps,ht=We.rtl,ut=We.extra,Ot={},Et={display:"flex",flexDirection:"column"};return Xe!==void 0&&(Ot={height:Ne,position:"relative",overflow:"hidden"},Et=(0,oe.Z)((0,oe.Z)({},Et),{},(0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)({transform:"translateY(".concat(Xe,"px)")},ht?"marginRight":"marginLeft",-nt),"position","absolute"),"left",0),"right",0),"top",0))),me.createElement("div",{style:Ot},me.createElement(ke.Z,{onResize:function(qt){var Xt=qt.offsetHeight;Xt&&Ge&&Ge()}},me.createElement("div",(0,at.Z)({style:Et,className:Ee()((0,He.Z)({},"".concat(_e,"-holder-inner"),_e)),ref:we},tt),Ie,ut)))});fe.displayName="Filler";var z=fe;function te(We){var we=We.children,Ne=We.setRef,Xe=me.useCallback(function(nt){Ne(nt)},[]);return me.cloneElement(we,{ref:Xe})}function se(We,we,Ne,Xe,nt,Ie,_e,Ge){var tt=Ge.getKey;return We.slice(we,Ne+1).map(function(ht,ut){var Ot=we+ut,Et=_e(ht,Ot,{style:{width:Xe},offsetX:nt}),Ft=tt(ht);return me.createElement(te,{key:Ft,setRef:function(Xt){return Ie(ht,Xt)}},Et)})}function ie(We,we,Ne,Xe){var nt=Ne-We,Ie=we-Ne,_e=Math.min(nt,Ie)*2;if(Xe<=_e){var Ge=Math.floor(Xe/2);return Xe%2?Ne+Ge+1:Ne-Ge}return nt>Ie?Ne-(Xe-Ie):Ne+(Xe-nt)}function le(We,we,Ne){var Xe=We.length,nt=we.length,Ie,_e;if(Xe===0&&nt===0)return null;Xe<nt?(Ie=We,_e=we):(Ie=we,_e=We);var Ge={__EMPTY_ITEM__:!0};function tt(qt){return qt!==void 0?Ne(qt):Ge}for(var ht=null,ut=Math.abs(Xe-nt)!==1,Ot=0;Ot<_e.length;Ot+=1){var Et=tt(Ie[Ot]),Ft=tt(_e[Ot]);if(Et!==Ft){ht=Ot,ut=ut||Et!==tt(_e[Ot+1]);break}}return ht===null?null:{index:ht,multiple:ut}}function ce(We,we,Ne){var Xe=me.useState(We),nt=(0,Re.Z)(Xe,2),Ie=nt[0],_e=nt[1],Ge=me.useState(null),tt=(0,Re.Z)(Ge,2),ht=tt[0],ut=tt[1];return me.useEffect(function(){var Ot=le(Ie||[],We||[],we);(Ot==null?void 0:Ot.index)!==void 0&&(Ne==null||Ne(Ot.index),ut(We[Ot.index])),_e(We)},[We]),[ht]}var pe=pt(16089),xe=(typeof navigator=="undefined"?"undefined":(0,Ut.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),je=xe,De=function(We,we,Ne,Xe){var nt=(0,me.useRef)(!1),Ie=(0,me.useRef)(null);function _e(){clearTimeout(Ie.current),nt.current=!0,Ie.current=setTimeout(function(){nt.current=!1},50)}var Ge=(0,me.useRef)({top:We,bottom:we,left:Ne,right:Xe});return Ge.current.top=We,Ge.current.bottom=we,Ge.current.left=Ne,Ge.current.right=Xe,function(tt,ht){var ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ot=tt?ht<0&&Ge.current.left||ht>0&&Ge.current.right:ht<0&&Ge.current.top||ht>0&&Ge.current.bottom;return ut&&Ot?(clearTimeout(Ie.current),nt.current=!1):(!Ot||nt.current)&&_e(),!nt.current&&Ot}};function Fe(We,we,Ne,Xe,nt,Ie,_e){var Ge=(0,me.useRef)(0),tt=(0,me.useRef)(null),ht=(0,me.useRef)(null),ut=(0,me.useRef)(!1),Ot=De(we,Ne,Xe,nt);function Et(hn,on){if(pe.Z.cancel(tt.current),!Ot(!1,on)){var cn=hn;if(!cn._virtualHandled)cn._virtualHandled=!0;else return;Ge.current+=on,ht.current=on,je||cn.preventDefault(),tt.current=(0,pe.Z)(function(){var Sn=ut.current?10:1;_e(Ge.current*Sn,!1),Ge.current=0})}}function Ft(hn,on){_e(on,!0),je||hn.preventDefault()}var qt=(0,me.useRef)(null),Xt=(0,me.useRef)(null);function Kt(hn){if(We){pe.Z.cancel(Xt.current),Xt.current=(0,pe.Z)(function(){qt.current=null},2);var on=hn.deltaX,cn=hn.deltaY,Sn=hn.shiftKey,Cn=on,kn=cn;(qt.current==="sx"||!qt.current&&Sn&&cn&&!on)&&(Cn=cn,kn=0,qt.current="sx");var In=Math.abs(Cn),_r=Math.abs(kn);qt.current===null&&(qt.current=Ie&&In>_r?"x":"y"),qt.current==="y"?Et(hn,kn):Ft(hn,Cn)}}function Vt(hn){We&&(ut.current=hn.detail===ht.current)}return[Kt,Vt]}function Te(We,we,Ne,Xe){var nt=me.useMemo(function(){return[new Map,[]]},[We,Ne.id,Xe]),Ie=(0,Re.Z)(nt,2),_e=Ie[0],Ge=Ie[1],tt=function(ut){var Ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ut,Et=_e.get(ut),Ft=_e.get(Ot);if(Et===void 0||Ft===void 0)for(var qt=We.length,Xt=Ge.length;Xt<qt;Xt+=1){var Kt,Vt=We[Xt],hn=we(Vt);_e.set(hn,Xt);var on=(Kt=Ne.get(hn))!==null&&Kt!==void 0?Kt:Xe;if(Ge[Xt]=(Ge[Xt-1]||0)+on,hn===ut&&(Et=Xt),hn===Ot&&(Ft=Xt),Et!==void 0&&Ft!==void 0)break}return{top:Ge[Et-1]||0,bottom:Ge[Ft]}};return tt}var Me=pt(96949),Be=pt(55090),Ue=function(){function We(){(0,Me.Z)(this,We),(0,He.Z)(this,"maps",void 0),(0,He.Z)(this,"id",0),(0,He.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Be.Z)(We,[{key:"set",value:function(Ne,Xe){this.maps[Ne]=Xe,this.id+=1,this.diffKeys.add(Ne)}},{key:"get",value:function(Ne){return this.maps[Ne]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),We}(),Ye=Ue;function Ve(We){var we=parseFloat(We);return isNaN(we)?0:we}function Ze(We,we,Ne){var Xe=me.useState(0),nt=(0,Re.Z)(Xe,2),Ie=nt[0],_e=nt[1],Ge=(0,me.useRef)(new Map),tt=(0,me.useRef)(new Ye),ht=(0,me.useRef)(0);function ut(){ht.current+=1}function Ot(){var Ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ut();var qt=function(){var Vt=!1;Ge.current.forEach(function(hn,on){if(hn&&hn.offsetParent){var cn=hn.offsetHeight,Sn=getComputedStyle(hn),Cn=Sn.marginTop,kn=Sn.marginBottom,In=Ve(Cn),_r=Ve(kn),xr=cn+In+_r;tt.current.get(on)!==xr&&(tt.current.set(on,xr),Vt=!0)}}),Vt&&_e(function(hn){return hn+1})};if(Ft)qt();else{ht.current+=1;var Xt=ht.current;Promise.resolve().then(function(){Xt===ht.current&&qt()})}}function Et(Ft,qt){var Xt=We(Ft),Kt=Ge.current.get(Xt);qt?(Ge.current.set(Xt,qt),Ot()):Ge.current.delete(Xt),!Kt!=!qt&&(qt?we==null||we(Ft):Ne==null||Ne(Ft))}return(0,me.useEffect)(function(){return ut},[]),[Et,Ot,tt.current,Ie]}var ot=14/15;function lt(We,we,Ne){var Xe=(0,me.useRef)(!1),nt=(0,me.useRef)(0),Ie=(0,me.useRef)(0),_e=(0,me.useRef)(null),Ge=(0,me.useRef)(null),tt,ht=function(Ft){if(Xe.current){var qt=Math.ceil(Ft.touches[0].pageX),Xt=Math.ceil(Ft.touches[0].pageY),Kt=nt.current-qt,Vt=Ie.current-Xt,hn=Math.abs(Kt)>Math.abs(Vt);hn?nt.current=qt:Ie.current=Xt;var on=Ne(hn,hn?Kt:Vt,!1,Ft);on&&Ft.preventDefault(),clearInterval(Ge.current),on&&(Ge.current=setInterval(function(){hn?Kt*=ot:Vt*=ot;var cn=Math.floor(hn?Kt:Vt);(!Ne(hn,cn,!0)||Math.abs(cn)<=.1)&&clearInterval(Ge.current)},16))}},ut=function(){Xe.current=!1,tt()},Ot=function(Ft){tt(),Ft.touches.length===1&&!Xe.current&&(Xe.current=!0,nt.current=Math.ceil(Ft.touches[0].pageX),Ie.current=Math.ceil(Ft.touches[0].pageY),_e.current=Ft.target,_e.current.addEventListener("touchmove",ht,{passive:!1}),_e.current.addEventListener("touchend",ut,{passive:!0}))};tt=function(){_e.current&&(_e.current.removeEventListener("touchmove",ht),_e.current.removeEventListener("touchend",ut))},(0,Ae.Z)(function(){return We&&we.current.addEventListener("touchstart",Ot,{passive:!0}),function(){var Et;(Et=we.current)===null||Et===void 0||Et.removeEventListener("touchstart",Ot),tt(),clearInterval(Ge.current)}},[We])}function ft(We){return Math.floor(Math.pow(We,.5))}function St(We,we){var Ne="touches"in We?We.touches[0]:We;return Ne[we?"pageX":"pageY"]-window[we?"scrollX":"scrollY"]}function qe(We,we,Ne){me.useEffect(function(){var Xe=we.current;if(We&&Xe){var nt=!1,Ie,_e,Ge=function(){pe.Z.cancel(Ie)},tt=function Et(){Ge(),Ie=(0,pe.Z)(function(){Ne(_e),Et()})},ht=function(Ft){if(!(Ft.target.draggable||Ft.button!==0)){var qt=Ft;qt._virtualHandled||(qt._virtualHandled=!0,nt=!0)}},ut=function(){nt=!1,Ge()},Ot=function(Ft){if(nt){var qt=St(Ft,!1),Xt=Xe.getBoundingClientRect(),Kt=Xt.top,Vt=Xt.bottom;if(qt<=Kt){var hn=Kt-qt;_e=-ft(hn),tt()}else if(qt>=Vt){var on=qt-Vt;_e=ft(on),tt()}else Ge()}};return Xe.addEventListener("mousedown",ht),Xe.ownerDocument.addEventListener("mouseup",ut),Xe.ownerDocument.addEventListener("mousemove",Ot),function(){Xe.removeEventListener("mousedown",ht),Xe.ownerDocument.removeEventListener("mouseup",ut),Xe.ownerDocument.removeEventListener("mousemove",Ot),Ge()}}},[We])}var rt=10;function wt(We,we,Ne,Xe,nt,Ie,_e,Ge){var tt=me.useRef(),ht=me.useState(null),ut=(0,Re.Z)(ht,2),Ot=ut[0],Et=ut[1];return(0,Ae.Z)(function(){if(Ot&&Ot.times<rt){if(!We.current){Et(function(mi){return(0,oe.Z)({},mi)});return}Ie();var Ft=Ot.targetAlign,qt=Ot.originAlign,Xt=Ot.index,Kt=Ot.offset,Vt=We.current.clientHeight,hn=!1,on=Ft,cn=null;if(Vt){for(var Sn=Ft||qt,Cn=0,kn=0,In=0,_r=Math.min(we.length-1,Xt),xr=0;xr<=_r;xr+=1){var qr=nt(we[xr]);kn=Cn;var er=Ne.get(qr);In=kn+(er===void 0?Xe:er),Cn=In}for(var si=Sn==="top"?Kt:Vt-Kt,ei=_r;ei>=0;ei-=1){var vi=nt(we[ei]),Li=Ne.get(vi);if(Li===void 0){hn=!0;break}if(si-=Li,si<=0)break}switch(Sn){case"top":cn=kn-Kt;break;case"bottom":cn=In-Vt+Kt;break;default:{var Pi=We.current.scrollTop,Xr=Pi+Vt;kn<Pi?on="top":In>Xr&&(on="bottom")}}cn!==null&&_e(cn),cn!==Ot.lastTop&&(hn=!0)}hn&&Et((0,oe.Z)((0,oe.Z)({},Ot),{},{times:Ot.times+1,targetAlign:on,lastTop:cn}))}},[Ot,We.current]),function(Ft){if(Ft==null){Ge();return}if(pe.Z.cancel(tt.current),typeof Ft=="number")_e(Ft);else if(Ft&&(0,Ut.Z)(Ft)==="object"){var qt,Xt=Ft.align;"index"in Ft?qt=Ft.index:qt=we.findIndex(function(hn){return nt(hn)===Ft.key});var Kt=Ft.offset,Vt=Kt===void 0?0:Kt;Et({times:0,index:qt,offset:Vt,originAlign:Xt})}}}var Ct=me.forwardRef(function(We,we){var Ne=We.prefixCls,Xe=We.rtl,nt=We.scrollOffset,Ie=We.scrollRange,_e=We.onStartMove,Ge=We.onStopMove,tt=We.onScroll,ht=We.horizontal,ut=We.spinSize,Ot=We.containerSize,Et=We.style,Ft=We.thumbStyle,qt=We.showScrollBar,Xt=me.useState(!1),Kt=(0,Re.Z)(Xt,2),Vt=Kt[0],hn=Kt[1],on=me.useState(null),cn=(0,Re.Z)(on,2),Sn=cn[0],Cn=cn[1],kn=me.useState(null),In=(0,Re.Z)(kn,2),_r=In[0],xr=In[1],qr=!Xe,er=me.useRef(),si=me.useRef(),ei=me.useState(qt),vi=(0,Re.Z)(ei,2),Li=vi[0],Pi=vi[1],Xr=me.useRef(),mi=function(){qt===!0||qt===!1||(clearTimeout(Xr.current),Pi(!0),Xr.current=setTimeout(function(){Pi(!1)},3e3))},Qe=Ie-Ot||0,ii=Ot-ut||0,Tr=me.useMemo(function(){if(nt===0||Qe===0)return 0;var zt=nt/Qe;return zt*ii},[nt,Qe,ii]),wr=function(Nn){Nn.stopPropagation(),Nn.preventDefault()},Er=me.useRef({top:Tr,dragging:Vt,pageY:Sn,startTop:_r});Er.current={top:Tr,dragging:Vt,pageY:Sn,startTop:_r};var kr=function(Nn){hn(!0),Cn(St(Nn,ht)),xr(Er.current.top),_e(),Nn.stopPropagation(),Nn.preventDefault()};me.useEffect(function(){var zt=function(yn){yn.preventDefault()},Nn=er.current,Vn=si.current;return Nn.addEventListener("touchstart",zt,{passive:!1}),Vn.addEventListener("touchstart",kr,{passive:!1}),function(){Nn.removeEventListener("touchstart",zt),Vn.removeEventListener("touchstart",kr)}},[]);var Hi=me.useRef();Hi.current=Qe;var pr=me.useRef();pr.current=ii,me.useEffect(function(){if(Vt){var zt,Nn=function(yn){var zn=Er.current,Ht=zn.dragging,Yt=zn.pageY,qn=zn.startTop;pe.Z.cancel(zt);var jt=er.current.getBoundingClientRect(),un=Ot/(ht?jt.width:jt.height);if(Ht){var An=(St(yn,ht)-Yt)*un,Yn=qn;!qr&&ht?Yn-=An:Yn+=An;var ln=Hi.current,fn=pr.current,Hn=fn?Yn/fn:0,tr=Math.ceil(Hn*ln);tr=Math.max(tr,0),tr=Math.min(tr,ln),zt=(0,pe.Z)(function(){tt(tr,ht)})}},Vn=function(){hn(!1),Ge()};return window.addEventListener("mousemove",Nn,{passive:!0}),window.addEventListener("touchmove",Nn,{passive:!0}),window.addEventListener("mouseup",Vn,{passive:!0}),window.addEventListener("touchend",Vn,{passive:!0}),function(){window.removeEventListener("mousemove",Nn),window.removeEventListener("touchmove",Nn),window.removeEventListener("mouseup",Vn),window.removeEventListener("touchend",Vn),pe.Z.cancel(zt)}}},[Vt]),me.useEffect(function(){return mi(),function(){clearTimeout(Xr.current)}},[nt]),me.useImperativeHandle(we,function(){return{delayHidden:mi}});var Kn="".concat(Ne,"-scrollbar"),Qt={position:"absolute",visibility:Li?null:"hidden"},Wt={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ht?(Qt.height=8,Qt.left=0,Qt.right=0,Qt.bottom=0,Wt.height="100%",Wt.width=ut,qr?Wt.left=Tr:Wt.right=Tr):(Qt.width=8,Qt.top=0,Qt.bottom=0,qr?Qt.right=0:Qt.left=0,Wt.width="100%",Wt.height=ut,Wt.top=Tr),me.createElement("div",{ref:er,className:Ee()(Kn,(0,He.Z)((0,He.Z)((0,He.Z)({},"".concat(Kn,"-horizontal"),ht),"".concat(Kn,"-vertical"),!ht),"".concat(Kn,"-visible"),Li)),style:(0,oe.Z)((0,oe.Z)({},Qt),Et),onMouseDown:wr,onMouseMove:mi},me.createElement("div",{ref:si,className:Ee()("".concat(Kn,"-thumb"),(0,He.Z)({},"".concat(Kn,"-thumb-moving"),Vt)),style:(0,oe.Z)((0,oe.Z)({},Wt),Ft),onMouseDown:kr}))}),bt=Ct,ct=20;function xt(){var We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ne=We/we*We;return isNaN(Ne)&&(Ne=0),Ne=Math.max(Ne,ct),Math.floor(Ne)}var dt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Mt=[],yt={overflowY:"auto",overflowAnchor:"none"};function Dt(We,we){var Ne=We.prefixCls,Xe=Ne===void 0?"rc-virtual-list":Ne,nt=We.className,Ie=We.height,_e=We.itemHeight,Ge=We.fullHeight,tt=Ge===void 0?!0:Ge,ht=We.style,ut=We.data,Ot=We.children,Et=We.itemKey,Ft=We.virtual,qt=We.direction,Xt=We.scrollWidth,Kt=We.component,Vt=Kt===void 0?"div":Kt,hn=We.onScroll,on=We.onVirtualScroll,cn=We.onVisibleChange,Sn=We.innerProps,Cn=We.extraRender,kn=We.styles,In=We.showScrollBar,_r=In===void 0?"optional":In,xr=(0,de.Z)(We,dt),qr=me.useCallback(function(wn){return typeof Et=="function"?Et(wn):wn==null?void 0:wn[Et]},[Et]),er=Ze(qr,null,null),si=(0,Re.Z)(er,4),ei=si[0],vi=si[1],Li=si[2],Pi=si[3],Xr=!!(Ft!==!1&&Ie&&_e),mi=me.useMemo(function(){return Object.values(Li.maps).reduce(function(wn,Rn){return wn+Rn},0)},[Li.id,Li.maps]),Qe=Xr&&ut&&(Math.max(_e*ut.length,mi)>Ie||!!Xt),ii=qt==="rtl",Tr=Ee()(Xe,(0,He.Z)({},"".concat(Xe,"-rtl"),ii),nt),wr=ut||Mt,Er=(0,me.useRef)(),kr=(0,me.useRef)(),Hi=(0,me.useRef)(),pr=(0,me.useState)(0),Kn=(0,Re.Z)(pr,2),Qt=Kn[0],Wt=Kn[1],zt=(0,me.useState)(0),Nn=(0,Re.Z)(zt,2),Vn=Nn[0],vr=Nn[1],yn=(0,me.useState)(!1),zn=(0,Re.Z)(yn,2),Ht=zn[0],Yt=zn[1],qn=function(){Yt(!0)},jt=function(){Yt(!1)},un={getKey:qr};function An(wn){Wt(function(Rn){var Gn;typeof wn=="function"?Gn=wn(Rn):Gn=wn;var Wn=Ar(Gn);return Er.current.scrollTop=Wn,Wn})}var Yn=(0,me.useRef)({start:0,end:wr.length}),ln=(0,me.useRef)(),fn=ce(wr,qr),Hn=(0,Re.Z)(fn,1),tr=Hn[0];ln.current=tr;var Zn=me.useMemo(function(){if(!Xr)return{scrollHeight:void 0,start:0,end:wr.length-1,offset:void 0};if(!Qe){var wn;return{scrollHeight:((wn=kr.current)===null||wn===void 0?void 0:wn.offsetHeight)||0,start:0,end:wr.length-1,offset:void 0}}for(var Rn=0,Gn,Wn,Xn,Lr=wr.length,mr=0;mr<Lr;mr+=1){var lr=wr[mr],vn=qr(lr),fr=Li.get(vn),Or=Rn+(fr===void 0?_e:fr);Or>=Qt&&Gn===void 0&&(Gn=mr,Wn=Rn),Or>Qt+Ie&&Xn===void 0&&(Xn=mr),Rn=Or}return Gn===void 0&&(Gn=0,Wn=0,Xn=Math.ceil(Ie/_e)),Xn===void 0&&(Xn=wr.length-1),Xn=Math.min(Xn+1,wr.length-1),{scrollHeight:Rn,start:Gn,end:Xn,offset:Wn}},[Qe,Xr,Qt,wr,Pi,Ie]),ir=Zn.scrollHeight,Un=Zn.start,dr=Zn.end,Fr=Zn.offset;Yn.current.start=Un,Yn.current.end=dr,me.useLayoutEffect(function(){var wn=Li.getRecord();if(wn.size===1){var Rn=Array.from(wn)[0],Gn=wr[Un];if(Gn){var Wn=qr(Gn);if(Wn===Rn){var Xn=Li.get(Rn),Lr=Xn-_e;An(function(mr){return mr+Lr})}}}Li.resetRecord()},[ir]);var Nr=me.useState({width:0,height:Ie}),Rr=(0,Re.Z)(Nr,2),gn=Rr[0],Fi=Rr[1],ti=function(Rn){Fi({width:Rn.offsetWidth,height:Rn.offsetHeight})},Mi=(0,me.useRef)(),an=(0,me.useRef)(),Qn=me.useMemo(function(){return xt(gn.width,Xt)},[gn.width,Xt]),or=me.useMemo(function(){return xt(gn.height,ir)},[gn.height,ir]),yr=ir-Ie,br=(0,me.useRef)(yr);br.current=yr;function Ar(wn){var Rn=wn;return Number.isNaN(br.current)||(Rn=Math.min(Rn,br.current)),Rn=Math.max(Rn,0),Rn}var ri=Qt<=0,Yr=Qt>=yr,Jr=Vn<=0,sr=Vn>=Xt,rn=De(ri,Yr,Jr,sr),nr=function(){return{x:ii?-Vn:Vn,y:Qt}},sn=(0,me.useRef)(nr()),hr=(0,Se.zX)(function(wn){if(on){var Rn=(0,oe.Z)((0,oe.Z)({},nr()),wn);(sn.current.x!==Rn.x||sn.current.y!==Rn.y)&&(on(Rn),sn.current=Rn)}});function Pr(wn,Rn){var Gn=wn;Rn?((0,Pe.flushSync)(function(){vr(Gn)}),hr()):An(Gn)}function zr(wn){var Rn=wn.currentTarget.scrollTop;Rn!==Qt&&An(Rn),hn==null||hn(wn),hr()}var Ri=function(Rn){var Gn=Rn,Wn=Xt?Xt-gn.width:0;return Gn=Math.max(Gn,0),Gn=Math.min(Gn,Wn),Gn},Oi=(0,Se.zX)(function(wn,Rn){Rn?((0,Pe.flushSync)(function(){vr(function(Gn){var Wn=Gn+(ii?-wn:wn);return Ri(Wn)})}),hr()):An(function(Gn){var Wn=Gn+wn;return Wn})}),Si=Fe(Xr,ri,Yr,Jr,sr,!!Xt,Oi),Di=(0,Re.Z)(Si,2),en=Di[0],pn=Di[1];lt(Xr,Er,function(wn,Rn,Gn,Wn){var Xn=Wn;return rn(wn,Rn,Gn)?!1:!Xn||!Xn._virtualHandled?(Xn&&(Xn._virtualHandled=!0),en({preventDefault:function(){},deltaX:wn?Rn:0,deltaY:wn?0:Rn}),!0):!1}),qe(Qe,Er,function(wn){An(function(Rn){return Rn+wn})}),(0,Ae.Z)(function(){function wn(Gn){var Wn=ri&&Gn.detail<0,Xn=Yr&&Gn.detail>0;Xr&&!Wn&&!Xn&&Gn.preventDefault()}var Rn=Er.current;return Rn.addEventListener("wheel",en,{passive:!1}),Rn.addEventListener("DOMMouseScroll",pn,{passive:!0}),Rn.addEventListener("MozMousePixelScroll",wn,{passive:!1}),function(){Rn.removeEventListener("wheel",en),Rn.removeEventListener("DOMMouseScroll",pn),Rn.removeEventListener("MozMousePixelScroll",wn)}},[Xr,ri,Yr]),(0,Ae.Z)(function(){if(Xt){var wn=Ri(Vn);vr(wn),hr({x:wn})}},[gn.width,Xt]);var tn=function(){var Rn,Gn;(Rn=Mi.current)===null||Rn===void 0||Rn.delayHidden(),(Gn=an.current)===null||Gn===void 0||Gn.delayHidden()},st=wt(Er,wr,Li,_e,qr,function(){return vi(!0)},An,tn);me.useImperativeHandle(we,function(){return{nativeElement:Hi.current,getScrollInfo:nr,scrollTo:function(Rn){function Gn(Wn){return Wn&&(0,Ut.Z)(Wn)==="object"&&("left"in Wn||"top"in Wn)}Gn(Rn)?(Rn.left!==void 0&&vr(Ri(Rn.left)),st(Rn.top)):st(Rn)}}}),(0,Ae.Z)(function(){if(cn){var wn=wr.slice(Un,dr+1);cn(wn,wr)}},[Un,dr,wr]);var Bn=Te(wr,qr,Li,_e),Pn=Cn==null?void 0:Cn({start:Un,end:dr,virtual:Qe,offsetX:Vn,offsetY:Fr,rtl:ii,getSize:Bn}),Fn=se(wr,Un,dr,Xt,Vn,ei,Ot,un),Jn=null;Ie&&(Jn=(0,oe.Z)((0,He.Z)({},tt?"height":"maxHeight",Ie),yt),Xr&&(Jn.overflowY="hidden",Xt&&(Jn.overflowX="hidden"),Ht&&(Jn.pointerEvents="none")));var ar={};return ii&&(ar.dir="rtl"),me.createElement("div",(0,at.Z)({ref:Hi,style:(0,oe.Z)((0,oe.Z)({},ht),{},{position:"relative"}),className:Tr},ar,xr),me.createElement(ke.Z,{onResize:ti},me.createElement(Vt,{className:"".concat(Xe,"-holder"),style:Jn,ref:Er,onScroll:zr,onMouseEnter:tn},me.createElement(z,{prefixCls:Xe,height:ir,offsetX:Vn,offsetY:Fr,scrollWidth:Xt,onInnerResize:vi,ref:kr,innerProps:Sn,rtl:ii,extra:Pn},Fn))),Qe&&ir>Ie&&me.createElement(bt,{ref:Mi,prefixCls:Xe,scrollOffset:Qt,scrollRange:ir,rtl:ii,onScroll:Pr,onStartMove:qn,onStopMove:jt,spinSize:or,containerSize:gn.height,style:kn==null?void 0:kn.verticalScrollBar,thumbStyle:kn==null?void 0:kn.verticalScrollBarThumb,showScrollBar:_r}),Qe&&Xt>gn.width&&me.createElement(bt,{ref:an,prefixCls:Xe,scrollOffset:Vn,scrollRange:Xt,rtl:ii,onScroll:Pr,onStartMove:qn,onStopMove:jt,spinSize:Qn,containerSize:gn.width,horizontal:!0,style:kn==null?void 0:kn.horizontalScrollBar,thumbStyle:kn==null?void 0:kn.horizontalScrollBarThumb,showScrollBar:_r}))}var mt=me.forwardRef(Dt);mt.displayName="List";var vt=mt,et=vt},93314:function(Dn){"use strict";Dn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},96908:function(Dn){"use strict";Dn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6ufS1soxaW1Si0KBaFVWy2ittqqdQ9xpYq4tLgVFWUThYQlJIEkkJXs63u333lzL+/mrfeF9/KSeM/35Xv3zZw5c+bM/83MOTN3ouGQY4EuZAGtC+niqOJYAAeQDgi6lAU0fUayHqCR5gJXEriS/T6TICkZNOMzIN/gFx7/8vvLiFxDtpfP4G2Xb5Ej6SaPKddav6mPtb5g9e/PF9nSvmTVlpD1S36Sr63WOj1ukD/d+PR+b1NpAekmj5Gve8Dd5lc2ivK4G2lzV4K7Eo/8eSrQ3ZW424rw6J/ST1utTb2jtkuhLAplwgDS7BDj09txdgFqgsjCbwVOKMCYAPH+IAzABIDf8qPYz+OygMus0+8HFQDmYDpaypj1mp+m/qKbgMoKQO+zxwIyCzhNPhOIQQFrAas/uK3l5dlt/SEY9bbn0ZsrS1obynfXNJQXFTeUbPugua5utQZrM7PZHgU2EsIaHJAJUcWp1JYFklKgVx/fX0oqpPSBgw6BASOh/xAlxgC+u6WJqh0bqdi2nrb66gI0sjQXL2W8xHpb9XUykwPITjZ43KuTpcnBw2HA4TBwFBw81Dt66+42aoq2U7FjAw0Ve8R52KxpLB6v86KWjTvuetmswAGkTUN1W7aDBsHIieiHjkVDlhpuavbkU7ThE9wtjQLMbTosyFzGc5pGoD/RyQ13ANnJBk9YdSm9YVg6+tB0NC2ZtqZ6dn/1P+rKirwqaRqrknVuSM9mZ8J0FD2CetmJ1MipO74WkPXn0VOg72CvY1ZRuJU9uRvQPW4ZLes0jdszlvG3+CoRWroDyERZPtH1Dk1HH56B5vHQWFvJzrUf42lrUaMlPJ4BMxOxtnQAmWhgJLL+3gPQR5+E1qsPDdXl5G9YjUdipIreGpzGFUOfpb4zVXQA2ZnW7op1paSiH30qWlIqdVWlFGz6Al1ipmqkXH0wnD0ym8bOUt0BZGdZuivXk9IH/ajJaK4Uasr3UJizUQX/Fb2WOZ7LtfniosefHEDG38bdo4bUvuijJqG5XFQU5VOSv22/3hr8NTObWzqjIQ4gO8PK3aWO3v3RR57gHR13blpHQ121FZTTM7N5Od5NcQAZbwt3N/mDjvDu8jQ11rHj6/XoskevqKxXMuOPfZHyeDbJAWQ8rdsdZct2zYjj0VJS2bu7gLLiXdZRMiszmx/Hs1kOIONp3e4qO60/+rBx6O5WdmzeRHOTz8lO0pg2fhkr4tU0B5Dxsmx3lytTd99B1FZVUZC31dqanMzxTNDmsz9gGcumOoCMpTV7kixXEvrwCV4HZ1vuZlqamqytu2VCNn+NR3MdQMbDqj1Epj5wBFqfgVSU7qWkWB3CENKgEhibme39jCklBpCysf/H3aohrY1w64CYNqrLCJOziRJg1hN+qqtjJklJQx88xrudmJuzBY+cVveBcmlmNr/qmODQpRIHyPuKlVYtjXBL/1i3K7HyDh4Gp94IU2+Ee0+A+pgPJJ3WPn3QEWgpvSkpKaaiosJabxsuJk7IYksslXEAGUtrmrIW5sHAkerb7UO6NSBJ6wcDhnvXkFu354HlDK8GKzOzOS+WJnQAGUtrmrIW5atXCHoCIDXwDDwSlyuJvIICGhran7OIdRjIAaQDyIgW0PsNRkvtR2l5OaXlAcuPmIaBuh4gp1wP/QYrI338ODRUBRpM0+Cc36p0OVT6nwd9PIcdAydcqr7nroL8NXDi5TBmKoyepPgL16n0dS+3dzgGjoaTjY0If7n+Wow+GdK/p1Jr9sC+Ihg1SX0X3Xob6+K3F0FLg0r/egUUbWovSRy8SdNh5PEw4jho2Ae71sOuDbDhVaWvP1nbWLIZvvo3TLwQvjtDvdQlaf+eB2Uxeuu1V2/oP4yGhnryCn3etqmWS+PmjGUsiYhsGwxdD5C/WwsjJirV7xkX3KjyPvZSY+poqoXbBvqaetzF8HPjDMAbc2HIWDjlp8FNsfldePIaH+iTU2FxIRxkyHvgu5D3afCyM5dDprF8emuBN4jM6TPDm/zZG+HTf/l4xpwG1z/nXaMFpYIv4fHpUGVEJEwmaxu/eBFyP4Br/t5exMPnwZb3bUDADouGPmiU9+3FnLxC3BZvW0rHMgzUswEpI5O8Q9LaDAVroHgzDE2H0SdB6kGqJyryYdFJ0GicbLnsfjjLOGn1yT/ghRmBPSajmgBXLg+Qwwd3j4WzboXTDV4J95jkPZxghH2e+xl89ozKEVDdlKVu8RAq/lqNikm91Eg++GiVXlsGD52tRr1ggCz+BgaPAXk/20oxBSTo/YagJfdiV8lequuMEd9SnwYxCQP1bECKwerK4ZELQUYbk2RbbNZbMOQYlbJyMSy/Wz3LdDjvG/XcWAN3Hg6t7XYp4IxZ8CNjmSCj7NJp7cEQyamRH8m8zT7H54WZ8MkTPhlyO4ZM+xcvUGkb3oDHLw8OSDP1m3fgw0ehtlSBWUb2ysL2eh3It7T+iMddVV1LUVnQMFZMwkA9H5CPXQqb3gzsChlVBBSyHm2uh7ljFHiFbn4Pjj1DPT/1U5Bp0Uq/XQ1HnKxSnrgC1r8aHSAvnAfn3aXKfPYsPHN9cKiYywIJrC+a5Ft/WqfsSDIOBITWsnJjRr/DaG1pIbewJKjUWISBejYgZTqeOzZ0l9zyPhxzusp/7BLY9JZ6FifjhhfUc85/YckPfDKsI6iMRnNGq3t+rBRphJyzBuQgrNBD34etHwTXcfLVcN3TKu/d++H136lnKyDlx3TXkcGdv1iB0ZTT7zDv0/aiMppaWoNKP9AwUM8G5Fdvwt8MjzuY+ab/Bc40dr+yfw2rDEdRRgMBlXSArAFl9KwyzgVaR7f3HoDX5gRKjgTIh6rV2lZow+uBSwJTojhX489R32QUltHYH5A7P4P7T4s19ILLk2k7JY3SqhpK99WFqvOAwkA9G5Af/R1emhW6s865HS5ZpPJXLYXsW328Fy+EH9yhvi+/B1YafH/YCoceqdLnZUBpu6NZKj0cICVgLvnRkoSCFk8OBOSXy+DJq6OV1jH+5F6Q1p/G5mZ2lAQJxxlSDyQMFHtATpgGR56iVNvyHmz7KLDxstcrXqpQUx3cdoiPJ5ZhnzUvwNPXhjb+tLth2lyV/86f4I3f+3jF8Zmfq+6SLNsB96TDUVPgNx8qHmnXg2cFlx0OkDIyPrhPrV2FJNbqe8MvtK4S3go2Zcv6Vta5nUGicp9B3vuBcooraXMHfxHxQMJAsQfkRQvg3DuVeazeq9Vgo06EOz9XKXu3wvwMX651fbXgeCgxPF5reQlgLzSCvuHikOJpSiwxFF3zBEy5TuU+exN8aqzXTP5fvgkZxvrxz2fC5CvhtJ+p3KevgzXPRw9IKWHd6w41yoYDmH8csrMAKTql9vWGqoqr6qisaw6pZUfDQLEH5Hd+Atc+qRRdmw3/vCpQaStPzn9gybk+nl+8BhMvUN+XXgCb3wksf+1T8J1rVHo4QMoux7xxwcMfElwXUJt7zg+cDnmr29clux+/MDxoGW0zzlVBc9lNmTMy9Nov0hpy1goY/31Vl3/Ix6rB8ZfACT9UKRJe+vw59ZxIQMq0nZJGbUMzBRVhL7XoUBgo9oCUoPMdxu6GBKQXTIByy4VaKWnwm4/VVpnQf5fAy7/2dcP0B+FMY90XbMo9fCLM+UJNpZEAKflfZqndGH8SZ0acGiEJSC82wjhWPokH3pvnA62ZJ/G+rJsDZZop1nWmePni7VvpuIvg56+oFNlynJ8JzX5OgswCd63zbUH+5Xuw/ePEA1KWGvIOt9vNlr21eDyhz3p2JAwUe0CKyWavhHRjfVVXoUAni38x8ik/geHGFC33yMgIZu2wcWfDr972dZ/slnz+PNTuhaNPhUvuVd6vSeFGSPGQBbjrXoH3/gxl22BIOpz0I593LXIevQi+ttRpBc/5c+ECI2hupt8rMcGvQgPSGk6SsFHO+2rPXLxyk2a8DrLeFirdrtaHEryXy0ZlmTD5Kt9uzTcrVXDfpESOkKKD7G3rOruqmqhuCv9qjcvF+RlZhDBuoAnjA0iJ1ckoaR4wCNV1794HrxsBYivPze/CsWcGLyUgWz5XAVMoHCAFiEInXhZcloBkxQKQvehQJFP6wh2+Lb78L+C+KaH5JUeWE7Ks8KdZaeqqZaFDRsCMN3z79qEk7t4IMjo21XQdQLpSvP8QoKaxlcJ9odeRorCmsSVjHBPtvhQWH0CKJtKRVz3mO4BgNXhFgQrHyC8/GMmhUNlTPvWG9rnVJarcphX2DleIByrOxxVL1Mhsxv5EqkyVWbNh4/Lw4JLc2e/4TvbI3raM2pFo6k1wxkwYPNa3z2wFpJSXeOf5v1d751bdJE/WqfJDkeWBf+A90SOkTNtJvdA9bWwpa8ET4RWNaMJA8QOk2WF9DlEHGmS6FhDszVX7rXao76EwdJy6yF2OjJXLieUIFKqzpPMlHCWjdsFadWTMDglQFhVAnwFqi/HOEYHrPTtywvFIBx96FAzPVODbk6PW3XbCQQdad0fLiz11D7urW9nXHP4eqmjCQPEHZEcb3NFysR49JMxz5SNKm9VPgZzYcQjE4ZOzKy1u8qtt3Jmv8fCEZcyOZDoHkJEsNHcjDBuvuO6bCvlG/DRSuW9Dvly74tHZUumOOG3LUWo7L4U5gAwHHHGsxMESkvOKC40DEd8GsEXRxqI6D1VNka+P1ODtzGzOD7t66XGX3sdyypaguATHhbJvg1UPR9FN3x7WxjbYsc/ezSqRwkA9b4QclqE8aiEJeH/5UseQITs5F81X/+tQSPa6g73f0zHpPaqUhMa3VrppDRMkNxscKQzU8wDZo7q6+zSmtFGntN6GcwOECwM5gOw+fd6lNW31QG6lADLytTHhwkAOILt0N3cv5XZWe6gXZNqhEGEgB5B2jOfw2LLAvmad3bX2pu1QYSAHkLZM7TDZsYD4NDn2YpJeccHCQA4g7Vja4bFtgeJ6D5WNNqdtcXD8TgM5gLRtaofRjgWa3LC9yl5M0jtK+p0GcgBpx8oOT1QWyKt209Aa2ds2hbpczM7Iwrvr4AAyKlM7zHYsEKVz0+5uIAeQdizs8Ni2gIyL8icxSbeNnZv9go0wkANI26Z2GKOxwJ56D+VRODdmGMgBZDRWdnhtW6C6WWeX/Zjk/jDQ/wHkSLPJ/mcrgQAAAABJRU5ErkJggg=="},57177:function(Dn){"use strict";Dn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDdrx3HxWnnEnz1eevhOf/79HpNdrAs6wrQr9VvtiMc+/kc0HSan9Nrq8Uzt9hquuZjv8kPev26r8x16X5VPYDHDYT7Vy/L8vo94d7P8u5mcV+w+1U34GEZ7a+5Tg/vV31tbrmu36ff23JcB9VdBo9a5v2rekq14/1wN30GNXGzctPKKgf7eExVKUGBpJsSEkgWYPMHXEuH0sHlB5iW8jrAtE6sd9AW8GidVD9mR/fvxDrAzJ3Yp/ObAGL3srC1XweJnf0awHUQWgGJ52i3P+D9OyOP/QHSAjYT8Lwd3gRGH3Bp5dza34D7LUDsD04vmPzuN9cZGkSAF3xm4JttNoFWdasNlRVNta4SV21l6YHakvyPGurrNivA12kZ2B1TdLSisvAA1QrF8hbpAUsP8EWVkAwkdgMSugHxiUB8EpDcC+g1AOjeG+BciSBWPXA3NaA8Pxel+7LRXF+bCwXpShxeTX0V33ZED0tAdcRW+X+2iaN3j35Ar/7iX/e+XnCpbg9cZfkozctBrauci/9tioIlKSpeUTLg7iguk4DqKC0h7bD2QPJBQP/hUHsNhsIVv+qBq7QI+7O2w93USGDtUoEFaavxoqJ4x7Z2FQmodnW/rDxsD3Ba2PcwqL0PhaLEobmxAXnZmaiuKPOqUBRsSlBx06gM7AlbZxQKSkBFwalSZRQ9kJAEDD4GSD7Yyz6WFu5HQV4uVI+Ho1W1ouCe1NV4OooWBFUtAdVenpf1ts0DfQ6F2mcoOMurq6nCnp2Z8DAMwNEKWJEKTG+PtZUEVNuaVd7dnh5I6gF1wFFQEpJQW+1CTtYueBgeEPLuwGRcNWQVamJpogRULL0t63LeA/GJUAeNhBKXgOpqF3Kzs6Ey3iVGqs29gQnDMlDnfMXWGiWgYuVpWU/0PBCfBHXQ0VCUeLgqK7B3b67I4BDyZloKrlTmQ6AsyiIBFWUHS/Ux8kBCMtT+w70MYGlJMfILCloqVoDH0jIwMxaWSEDFwsuyjth4IKk71D7DGKzCnj05qK0zZnoKMDUtA69F2xAJqGh7WOqPrQeYvtSjL+rr65C1JxeqMfUrTkpAyrGvoCSaBklARdO7UnfsPaAAat/DocTFo7C4FMWlIvBLUYD0tAz8KppGSUBF07tSd/t4ILE71N5DoHrcyMrJQ0NjY4sd8QompazGumgZJgEVLc9Kve3rgZ79gW49UVVdg9wDhWZbMtNSMEaZDxEFdlgkoBx2qFTXQTygxHnz/gAPdu3NR2Njk9mwmWMy8Fg0LJWAioZXpU7DA/0OB479hTguyQZ2/Sdm3lF79IWS2B2llVXILylvqVcBuLAamZbh/euotA+geg0E/ponHqSpDrizj6MP1WGU8WM671eq7fhVweTFwIQ/Cpe8PRfY8NfYuue4y4BbNbb6y1eA534Tu/rjEqEeNAAejxs7cgvg4VfGmijA8rQM3Oa0Me0HqKUHxLM01gEzD3b6udpXX+9DgNNvBs64GVh0PFDj+Isw/Oe7fAlw3t2i/NoHgPVLwr/XiZLtCShGpHr29zJ++aWVKHX5pPU1Iw5jx6RjuxOP2QLUsPaUcLJG6uII1ZUBtTAb6McAI4B7BktAtdcIRf/zM/vkg9HY3IydeQxBGbMFBVifloELnezecoRy0pu6rsU5QJ/DJKDogXYeoWiCp2c/7mWF7MJy1Nb7kBNwmkaXgJKAioYHDJ0dAFBqt55Q4ruhyFWDooqArzkcpdE7HqBOuxE4aKBokE9WALUGO9PSStxc4Px7xWFzI/DhI0YDDjoGOP5ycbxjE5CzBRh/JTDiDGD4CaL83m/E+W9e8yUM+g0HTtIC6f56/bvd8JOAURp75SoAKvYDh58gStG27tq68L3FQGOtOP/TOmD/j76aOP09YSowbBww9DigtgLY9y2w7zvguzeEvf5ifsb8bcAPbwNjLwF+Pg3oPQTgubfnAcW7ASfXUAOOBH52PTB0nKiHn6UXZwFFu4DPVwEFFssRK0BRz7gpwn/0U+7XQM6XwFfpYrsxpyUhEUjqhdqGJmQXVgRoj1NwR+pqLHOi2o4HqD99DQwdK55t7mjRKfyF++4t1xIf66uAu/oZJcwNuGYOMHgkcKoNs7TtfWDltQZoOd9eshfoqel76OdA9mfWfp6+FkjTpt/vLhA79Jw1PXibrLoZ+OwFo8yIM4EbXwT6MF5iIblfASumAuUaI6oX8e+kOz4Crn3GV8HjFwLbP3AOUJfMBybO9m7eYCnuJmDjQ4L4MIu/rR8+Bty2zvCxuezuT4AVVwHVxU70bR8dao8+XsY1c38F3Ca2j4WcpNG7NqA4MiT1AJoagNwtwIFtwJBRwPATvVF0r5TmAItPBOoqxfEVDwLnapn+n/4DeHlaYONyVCHw4hPErqoPjATOvRM4Syvr3RVWE2/jaQvhF38HfP4vcYEd7ZZ0sWsu5cBPYlTiW58j6cCjxfmqYuDRCWLU0cXcSQ9sBQaOEPvcmcVJQF08F7joz4b2sr3iRcOX2eHjxT9dVl4HfPWqta0cnRmX4r58WZ8CRbsD24Mvj8UnOE7kqN16eT/t2FdWjcrawFHfKRq9awOKzVpdAjxxCcC3vS79jwBmvCs2+6CQStbfrJxOzdsqzte5gFmHAU31vp317BnAL7VpJke55ZN8r4ciJQjyedsM4uLl6cCnzxo6uDcdp42XLRDnvlsDrLjSupPqZ7duAD5+EqgqEmBkh2fHb+uUjy+eJXliI0rK6/f6TrF5ji+TK5aK65wCzh1lbyvb48nJQM4XRpkBRwHT3gIOGS3Obfw78OYsX5+29YgvnLgklNc0YH+FNgX31ekIjd71AfXU5cCP7wQ2B9/q7NScwjTUAHNGCPBR7tgIHHu2+D8DkQxImuXezcARJ4kzz14FfPuG7/VQgLpkHnDh/eIerj3+daN1d9GnlQwM862tr7/MI1QoHW0FFNdLE+8ToQ6uFTlFtpJFe4C+Q8WVmb2NdaO/rS/cCHyxyro95m4Ve9ozNsn24MvBKeHW10nd0dTsxo5C663TnaDRuzagOJ2bM9K+SWZ+ABxzlrj+1GTgx3fF/0kS3PSy+H/mv4FlFxg6zCMYG3z28MCFdChAzd4CDDte6Hz0PGDnR9Y2nvxr4IbnxbX3HwTe+pP4v7mT8mVw/5HW5A3LthVQ4XboO94Hjj1HlF403hr8ZfsEULQ9HwJUz1gHpJwnTj89RZAtTgpHW9WD3cU1qG+y/iK+rTR61wbUD+8AT2uMn1XDTH0YOEfLPsn4I7BJI3q43zZBcdAgsUZiJyjfJzSYRxcuwt+cHag5FKAerRRrO8p3bwVOKXWNJEdSzhdHHAU5GvoDas/nwINn2nc7JwHF2NrxUwCydP2PFEQMiRzulcdjfV1Ke2iXv61b14vpt52Y169v3Ad88LCTcBJ2KvEoqmpAUbUFeypqaxON3rUB9Z9ngFdn2DfK+fcAzHWjbFoOZNxplL1sIXDBfeJ47VxgvVbuLztFh6LMSwWKdgbqDwYodkpej1RIpS85ObCTfrUaWPnr6AKKDNlVy4DxUwURE0rsABWqPZhzOEXLNfz4KSD99lA1RXbd+1NCiahrdCOrzH4jpLbQ6M4Daswk4MhTxYNu32idXcxcN7JklPpq4K6+hmOcpM23vAw8f7290yc9AEyaI65v+BuwxsRkkbiYv0PM6fWF9lGnAXd/LMoza/qRc611BwMUR6ZHKgz6mbE2uymQWTsZNaspX6iE07aOUInJwO0bgKNPM9qL8bHCXUBVoRhdmxuAibOMaawdoL54EXjht/btYR791y0E3pkfGWBClSbjH0c21IPM4no0e6yTlttCozsPqEsXCOdSzOyZ+WFJs87SWJ7CncD8VOOqeX2xYByQrzFu5vsZgF2oxaeCxaHIdDGWZCfXPgucdoO4uuoW4DNtvaKX/8M7QKq2fvr7OcDJVwNn/k5cff4GYMtLkQOKd5hz/exGuWCdI5Lsg7YCimzj5EXCmrzvBYXP4LO/zPrcCGzbASrYS4j6rvuHCBxT7MiLUKAJdZ3Teag44GpCWZ39j3a0lkZ3HlCnXAdcv1I81tcZwD+vCXxEc5nMD4FlE40yv38TGHuxOF5+MbBtQ+D91z8HnKKxTcEAxSyDeaMFfewvDA4TlHrO3UNnAdmbfUsx++D3GoPH0S51oghIskPNHma/9gm1hjIvvv0pc7MF4yaLNQuF9Dzf8JRYAop0NmcdlGeuBL5fE+hL/qbT0gJjOmgHKLbHn48CXD5f0Ap9bA/67eDB4njp6SKbxWnRfjmzqr4ZuZVBszJaRaM7DygGTe/TsgsYUF0wBigx/SACpxB3fyJSbSj/Xga8pn2vw+OpjwDnaOseqynbYWOB2V+KqRglGKB4neksVlQvyQiSEhQGVJdoNLi5ARkPWpRtgE6/xnhP+h32TW1eZ5FlJNtoluMuBW59XZxhytL8NKCh2rcMR+H7vzFSmB7+BcBMAkosAWWegvPlyJekv5hBx2t2gOK1/64EXro1UMeEu4ApfxPnmYa0VJti2nu59Vfi4r27y24vaYYnyLdqraHRnQcUH/P29cAobX1RXSpAw8U7O8mp1wGHalM8bu7OEcTc4UZPAG57z3AWsxW+eEnM148+XUw/yL7pEgxQZOgIvG9eF8HC4l3A4FHAib802D3qefJS4CdTneamumgOcLFfOs0ixoR+sG9QMx1P2j3zA5EzSFZQF3MnZMYA10cMPvOzbU4zT77GyJbwZ8daCyjq58sjHPlhrfDJb1aKNqMU7gBemgZk/VdkeHCtfPliY82s6w0GKJYhkULSgdN5Zq4wTKGzrbzOGQtnLtES9gmPB/uqPKhsCL6hbFwcLkpNh03nCDQwOoBirIajlJ4gaueY95cCb2kBTnMZc0zD/16CZO0cY14fDFAEEmX8FdYWsJOvWwAwF89OOCVcmGWkCIXz9uR0lNNSf5mRLH6rlsIg6LQ1Rt6iXf1ct3B0qncZJVoLqEg6qM5sWrUlM0hIruiM386PBdj09aUdoLZtFOSGTq8HtK1bZKywX0RVvL/cBlejir2u4D9+qCjYnjoaY8Pd1CU6gKIz2BGvecpIIDU7qDRX0Nl881oJf7WOMYnTb/K9Wpkv7vtxXXjJsWTASB6Q8uVbVo/9UCunWqRlv18buunIcumZ5czt46gZSs64BTh7OjBwpJFnZwYU7+cCmTlyzB0028ZrXKcR6Jxe+mdgxxJQtOWIU4CrHzdYPP3Z2Y7fvi5GV+b7MXmWYgcopi0xiM2g+aARvh7kfhP0LUf0GAk5vu2l7qDTPpoSCY0ePUDpTunRVwzrnO6xE/NNFm5KCXcBHTJaLFT5yQWdHkrsOhs7L6co+ucCTKMJR9jRF+cCjMUwK2HW0MD1Tjh6gpVh+hPz2Q5NE+ApyBTrznDo9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},81378:function(Dn){"use strict";Dn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQeuFsCr/gh45wmsbXHzsPrcvAfAfV6yn18FjgN8YmUInKiAd4TMJObUlNQj42wWutq7SNtXA9zrIVC88nts7Bgsq+AB8GDZiUEyDrm/BAFj5PBLUAASniNnpeSgvLCSjZADl8dBev8ubD41GIbsAfBg2IVBOAaSnUNnK6GM5DlyQ5UKmSlZ6GjvJBiT5epdGRSP7MRGzbUcvgfA13L1h0DfPtFyBE9VMKuMVqNH2rl0NNapBG78vQ98b9+B2xuu1VQ8AL5WKz+E+pV6cQiaqoAyXAp9tx5pyZfQUNdoBDEKAG5VEhJzrsWUPAC+Fqs+RPsMnOgF3xg5dBod0i9eRmM9D2IAFYB03m5sKRnoqXkAPNArPsT7CxingE+UFDqdHpfSMtHYYJIecn2hnL8DG+sGcooeAA/kav9M+gpIkEMZJYdBq0PqxXS0NDcLMvEFKRTzB1Kx8wD4ZwKqgZ6G/2g5vCPlaGttR+rFZMaRiSSQvLILW58YqPF4ADxQK/1z64cDs05IlByqqiqRX5gvKHV6gLspCYknB2LKHgAPxCr/TPuQ+XAImOQFzsDh0pVLUDcJ5jWUSaGcuBMbW9099WsOYDKYU8Qbi5zqshnZ6e41uGrtSxScU3NQhErR1UBhae4hstkaBiiWzDtSykSJri4NLmYmQ6s1dfz6bmx7xD0z7Gn1mgN4bX48CyapP9eBI/NLXZ5v3JYAzHlnOGvnyMJSqNO7TG36xMjYe41KB22r+GGR+nC48aNIVrb4780o2+OYkYTOVWLRnijk/JcKee+qoVHzMqE5zXlvOGLW+0MRIsXBGUVouuweJ9bys7HwjpJBldaJk2vcH/brP9aLRb1V11aisLzAKEpwWimks3Zic4bLm2qngUED4K5GHWpOttuda+U3bSj83ya7ZeLvCcD1f+HBd3hOMVQXeQDL/DhsVI1l71MerUXOm/zjzhYRV1lfmsC+Sn28FtmviZcV6t/wUSRGbQ5g/575RRWKPuE1c3Ma8+sgXPcmf7gynqvH5d3OO7DkARIowigzwDEtPxcLryApmrK7cGqtYwB31evQ3Wx94Bz3xJcgOThwrBd0Wj1Ssi6gW8sfTA44swuJ8zje9ewWGjQAdmZ2OW+rkPIwRfeJ09UAsH+CHGuuxLNOzj9Yjfz37R8axTAp1hWPBnmsOuu02BtXCL3Ges8IhOvLRkPmI0FjSie+ud55u//YB4Iw+w0e/Febkh+qQe47apea9Y2VQeYrQXlNGcpqeubFQfKrJGz9wKXG7VQeNADuqNKi6FNrrmU+9rqfOlDxtf3HudMAfkuFmPV+iN0QgMyXG6BK6xE1gqYpsDI5jnX9071VKHYwrklPhWDa88NY+csvNiDj2XrRJZ/7fgRG3xfIvv8qrgAdFc4Jq4MdwHQoCcQkA6fmXIBOz8v4HNAog2zcc9gsviguoNutAKZHsdRHYnd4y76LgU+UHKr0TvxwFx+y54iIu7WX9Ww8SwGS8/mp8YkBmPNuBHv/7fwSHph6A0jBshQhVqbGIWiKAgUfqnFue42p22HzvHHzyZHs/+83VKB8r/ihoRQjkuMp6IVShvYlFGLyjlCEzVXanIZXiJS5Y4laizSij+78/2lisrRA8kAJCz53RKO2BLL+ic5tr0btaftiGZXrrNGhu6n/IoQwJt+RMrbOJTVFqG4030vJX3dj632Oxt6f790K4CWHohF5s29/xmW3DoH98Oyex9TY3wRh9mvij1f15S4cWVBiBWCBW2vb9fhqZIFpEyNv9sGSQzFsDCdWlqHqqDgIiIsv+DyKlS39/xac3lSJpd9EI+Im1+Z9+YUGZPyHbaYVMlOB0DneNtdo5J3+GL7Ih31HcraYtYPmXPSx/SdeXzeORAifETJ0dnYivTgFBoMgRpEMLF24G5tP97VNR+WHJIBL97TgtBm37i+AJV4c1hbEsywEc8XOHJRHl5Si7rTtBASZLwfi4n7xXmydT60rR8XBNkx/IQwhM3s4cMgsJVOqCDT1Z5xLZij6W7MowMxFFkcbLPZ9R7UWX8XwFoOrSd4jOUilMuRWZkHdZq78cpdliJ5xtZNFBwTAxAW+u7nMap1uOhbDTEo1p9qR8oh95Ywe9YJp68fESpT8oyc9K+x6JUas8GPtB09TIGoV/55Eg45qHTprtSj8qMmmFWLKs6GY8scwNOdqcGBSEas3KjEAN3xotGRcV9xLPjafBJnFEv4tyPTRsZtKUfu9NUBJTApf6NOrD1dAYw7gikOt0Hc7r+SHTFcys6W7AOwVLIFXoBQ16iqU1BdaTvOJ3dj2iitzt6w7IADuqNHiq2jr0357xWgow2UoP9CK8/9eDZ8YOXxjZPAZaXyNkcN7uBRHF5dh7gcRGH1vIHQaA/ZE5ovKjk4rcUYzmt9oOW7L5i0Ox28tQ/Xxdkz+YyimPhvGPvsyPA8albV8GLXaF4u+iu61nqIAPhGD8Pk+aM7R4MBk/pC4QuYA3juqAJo+yK/XvRUOkpPdBWB6qpHuo9F0I73sgsU0uTYZFOShc93gb2x5wAD89YQiDLteyUBKDgVSZGI3+bOUb0e0L6EAEx8PRfQaP6gyOnFytbhts68Apr5vOT0SYXO9Uba3BT9sqMSNn0QiblMAOuu12BNpffDIbLYqLY4dPnMSA/CKlFgET1UyRdVcdnc0b7HvB7MIQWP2jiJlk8OVqgy0a6wU4H27sW1df+d+zTjwiRXlTF60R6TFd1Rq0VbSjbYyLdpLu9FW2s2UoxG3+qK1RIumzC67GnN/AEwmqmlJw5D3ngppO+pBjgCSYet+bGfc35IW7olih4mIQK4M44EsBuC1hfHswDYkd+LECuv2zNunC0wcORXMAaxR060nzsNB6ith9mp3cWAaiVewFBQnUaEqRVVzudXgOEjWJGHrAedHLV5ywDjw/rGFWF86Gu2lWrSV8cCM3xbIjPoElB+3VjHw0gbaIsHlXPyPZvyUWCU6I0sAtxV3Y/QvApH332pRTxx56TgJZwLOBtUYyP0kKPhrE87dX92rL6k3hzvrEtiTgwBZ+HGTybsmBuCN6jHMyO8M0eElU5w9MgfwF2F5fTKBCXZodwKY3MoE4rauVmTX2vQkF4dCOfFqpOcPGIBtycArLsQieLoS3a16ZL/WaFOWkyo4hN3gjejVPMdLe7oOWa+YUlms9tkcwAR2Uuh0HXrsH1folCuZYgjWF4/m+9pRh6w/Wfe1+EAUgiYp8M0NJezJILiubQGYAmvu7hjnDHZZmeY8DQ5MtC8nmwOY5Gq6b81Z8o6UMYuIOwFM3gvv4TLGjDJqkqHVWcd8SICXdmHbU86OW6zcNQWwI/OX5aAJ6IdnFqO1yPZNR8RJJz8dhomPhfSqShz/4NQipwAcscwHSw/zNuDv76hA+X5rJwYFDJFtmQKFzA+MLQCbx1VUHmlD9bE2m3sx/qFg5tBRZ3bh0PRipzlwfwHgVgADkAdL2F1zZc1FqG/v/RQzjrmbg9e0JGy60t85UD23AniZUfsmj9P+sdZchTRWAgxxMb943jtli7Tt5HnrRsnnLWg4T/cS9KaEXwZi5EZ/pulLjB45KkHyYe7bauS8pWIXdDgTzDPrtXCM+00w62BPTD46q+2HPToCcNQqXyzay1srLM1/5rNYkRyL4GlKNKZ24pu59mMkzDnwoZnF0DQ5H5o546VhzH3ubgBLlRLI/Tk0dzQjX51pc185cCeTkLhk0AL4ttxR8BvlxdyZx5bwygu5Q8l1KRDJpxTk0pKnYU4Aoti7/EEu1/Zyba/YB3Kn2nJ5Lvh8BAtTtKRvbyxBwwUe8M5Go60rjudd2xmdODzLcbCNIwBPfT4Mk5/iXbv2QihXpsUxsaTuTAeOLrRvZTIHcOmXLcy06CyRJYgcL+4GMF1XJQ+RsvvWLjcmQ0fXadogCbh7diHxY2fHb1nOrRz4rtYxTNkp+byZhQ7OejUc4Yt9cHBKEVryeDFAUM7MvWurMuIQOEGB6hNtOH4Lr8WS6eq23HhUHm5F+tP1vcSIcb8NwqQdoaDNNHQD437Lc1BnwinZ3b7G8xS+0BvLvuNjILLfaETqY44TbB0BeOmRaEQs8WXOhs8CckUDzVdfHoWAcV6oOtYGstjYo8FuRhPGToyJ4lRKW4rQ2NUTa2I+N7o8UAq/cTuxvl/hcG4DMGUd3FHNx9ReebWRKV7ktiVtPPcdFZIf4j1vzgJ4WlIYJj0RCl0nKWRFzGIhELl0dZ383bt9MaORy3j6i8NwfHk5yFohgI3abS3U4OCMYuja7XM3ewCmw3Fn3RjQfWP15ztwZJ44Z70tLx5+cXKTLdpZAP90TxW0rc4H4ox9MAgRS33dzoFp/BTYQ0p4i6YZha1Z9qb03m5s+3V/uLDbAEw3uaxM4e2+KY/VIucNFWb+aRjGPxzCrA57YwuY2coZAFMg9205o9j9tln/2Yi0p8Q5oxiAzZUpciuTB45kZqLkR2qgvtSFZcd47isQZVc4cnHbA/DIDf6Y/7cRrDlH1hMyMZKFoOj/mnDmvt5KD3FmWk+BYtb5IXYjHzx/9pdVIB3BWRqzPYgF+5B+cP6BHq6ozuhinsKrSSRGyPwl7B7izJZU6ETynDhAL4X0hp3Ycr6v/bsNwObKy+m7K9njnUxUxIVJO039Qy2yX1c5BeDrP4xAfGIgU1b2jym06doVJi4GYOK0ltYJqlN9vA2Xkhow+9VwZtKjCKqa4+0smozeH1taJhrMQ/XtAfjmUyMx7EY+auzriYUmscnWJt1Zn8BiCLLfVCH10d5xIRMeDcaMl8L7urd9Kn/xyVpc+bPjzJM+NUpc2FsCCQeUdRRA1S3OeDjg4lQor9uIjc5rpO60Qlz39nCM+RUf6GKuTC3aH4WoFX4sFpZEgbV5fE6cmAx8OanBJJemP1uHzBfFbcCWgBJkYP8xcqzJ4uMdiAiYFBif+VIjU/JINhfk5rz31YzDr8kZxTxsZJc9NKNYNFlTDMAhsxRYfpZ/AjnjQt7UOZYd7LRn6pD1cu85DmUAc3L6SQgJ2rXNKOiwK0ZQbu9Du7Dtzb4cErdwYDLe316eAJKDyQa7L77HsxS9zg8Lv4hC7Q/tOL25EreejrULYJKdKZWGLBDkzeuLTGquxJFiSMmHJZ+1IOvlBjRl8Y9LYTz0XrAXU8KneQaEvYMjBmDzWGjhCSS2MaSg3lHJ6wskEhR+ZB2nS8qQJUUs8wVF01Ecx8Wn6pD9qu3DPeU53hJCQVXkkcx/X42uut6MTswD2hcwiZUlzxz9NkduZxq6DeJiCgeu2RsY/zTsuFotOnELgEes9MXifbzt0zLFhsBNFgaSOYmckYFJGfIf44XmbMcy2vTdYSzwh+jgtCITUClIvTmvmylrAo1Y7osFX45glhLiyidXlZuC16nPVem8ZYBk9q8nFNq0CdsCsLmVwBnuO/EPIZj+Ap+SRFkkDeesbd3CmAkMI1b4ghwfw+bxMjwRJcSeWF1u/aTggDlvDwc5X8htT0Q28eK/tzD7OMm+7ibBNl+tKUO9zn7WDQd8loRtm5wdk1sALERz0SBI9qOYh/GP8KYtSxKi0djPTxnjWsnBwXEcA5Wt5Ehq48y91UyuJgpf5I15n4xgSiEBjoiSK/dEFYgGukTe4ouFe3rAe+GBGuT/pXfyprkcbysugvqxBDB9tvRIDBMHaPxkEqv+js/oGLbAGzNfCYeuXQ9dFz9fUlDDjNkVFAdB4ZZkUbEkGi/FKUet9mNxGgK1FGhw8ck6u2lPVJZMWgRicvpQZJwJ+KfaWYZ2OeUaOq8LOosvVo7iTCgxuVuvQW53msO6UnC3PI/Eow4LuksGnvnncIz/XTDqz3bgyIJSZqqypUA5M0CxMj9urWTiABFpuhvqE/iFMpKjDGaSUZedGMnuM7jwYA3yP7CdeXzT0RgMX+xjU7myBWAy7y0+EA3/0V649Hw9Lu3qSZ2nQKA7ahLYD6pYEkXiHVtSivqztrmv5RqSKzv/AzX70/fxN4ToYFL0XdBk3rJBThvy/rnzMhT62TNyahTpMtFhsO1OF9aEfsYgHKFTfoeVDh8PbuHANJCJj4ewC0QIGOQgEMvh6i+IKw609hIpxv8+mAWp0O0+ZftanLo0hOKRyUYrBl4aG5mvKOWo6ojtRY+72x+z3+Lz8egOhrofOxhXpUd8+h+tc9oS7g9EAF0EYvwJLNJc6n/qQOW3bb0SVS3XhTyYK5LjUL6vlUXJNSaLixlOrSnHZ55MeSaU5fE1pjrEilPNOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},16722:function(Dn,jn,pt){"use strict";pt.d(jn,{Z:function(){return Ee}});const at=ke=>typeof ke=="object"&&ke!=null&&ke.nodeType===1,Ut=(ke,Se)=>(!Se||ke!=="hidden")&&ke!=="visible"&&ke!=="clip",oe=(ke,Se)=>{if(ke.clientHeight<ke.scrollHeight||ke.clientWidth<ke.scrollWidth){const Ae=getComputedStyle(ke,null);return Ut(Ae.overflowY,Se)||Ut(Ae.overflowX,Se)||(me=>{const Pe=(fe=>{if(!fe.ownerDocument||!fe.ownerDocument.defaultView)return null;try{return fe.ownerDocument.defaultView.frameElement}catch(z){return null}})(me);return!!Pe&&(Pe.clientHeight<me.scrollHeight||Pe.clientWidth<me.scrollWidth)})(ke)}return!1},He=(ke,Se,Ae,me,Pe,fe,z,te)=>fe<ke&&z>Se||fe>ke&&z<Se?0:fe<=ke&&te<=Ae||z>=Se&&te>=Ae?fe-ke-me:z>Se&&te<Ae||fe<ke&&te>Ae?z-Se+Pe:0,Re=ke=>{const Se=ke.parentElement;return Se==null?ke.getRootNode().host||null:Se},de=(ke,Se)=>{var Ae,me,Pe,fe;if(typeof document=="undefined")return[];const{scrollMode:z,block:te,inline:se,boundary:ie,skipOverflowHiddenElements:le}=Se,ce=typeof ie=="function"?ie:bt=>bt!==ie;if(!at(ke))throw new TypeError("Invalid target");const pe=document.scrollingElement||document.documentElement,xe=[];let je=ke;for(;at(je)&&ce(je);){if(je=Re(je),je===pe){xe.push(je);break}je!=null&&je===document.body&&oe(je)&&!oe(document.documentElement)||je!=null&&oe(je,le)&&xe.push(je)}const De=(me=(Ae=window.visualViewport)==null?void 0:Ae.width)!=null?me:innerWidth,Fe=(fe=(Pe=window.visualViewport)==null?void 0:Pe.height)!=null?fe:innerHeight,{scrollX:Te,scrollY:Me}=window,{height:Be,width:Ue,top:Ye,right:Ve,bottom:Ze,left:ot}=ke.getBoundingClientRect(),{top:lt,right:ft,bottom:St,left:qe}=(bt=>{const ct=window.getComputedStyle(bt);return{top:parseFloat(ct.scrollMarginTop)||0,right:parseFloat(ct.scrollMarginRight)||0,bottom:parseFloat(ct.scrollMarginBottom)||0,left:parseFloat(ct.scrollMarginLeft)||0}})(ke);let rt=te==="start"||te==="nearest"?Ye-lt:te==="end"?Ze+St:Ye+Be/2-lt+St,wt=se==="center"?ot+Ue/2-qe+ft:se==="end"?Ve+ft:ot-qe;const Ct=[];for(let bt=0;bt<xe.length;bt++){const ct=xe[bt],{height:xt,width:dt,top:Mt,right:yt,bottom:Dt,left:mt}=ct.getBoundingClientRect();if(z==="if-needed"&&Ye>=0&&ot>=0&&Ze<=Fe&&Ve<=De&&(ct===pe&&!oe(ct)||Ye>=Mt&&Ze<=Dt&&ot>=mt&&Ve<=yt))return Ct;const vt=getComputedStyle(ct),et=parseInt(vt.borderLeftWidth,10),We=parseInt(vt.borderTopWidth,10),we=parseInt(vt.borderRightWidth,10),Ne=parseInt(vt.borderBottomWidth,10);let Xe=0,nt=0;const Ie="offsetWidth"in ct?ct.offsetWidth-ct.clientWidth-et-we:0,_e="offsetHeight"in ct?ct.offsetHeight-ct.clientHeight-We-Ne:0,Ge="offsetWidth"in ct?ct.offsetWidth===0?0:dt/ct.offsetWidth:0,tt="offsetHeight"in ct?ct.offsetHeight===0?0:xt/ct.offsetHeight:0;if(pe===ct)Xe=te==="start"?rt:te==="end"?rt-Fe:te==="nearest"?He(Me,Me+Fe,Fe,We,Ne,Me+rt,Me+rt+Be,Be):rt-Fe/2,nt=se==="start"?wt:se==="center"?wt-De/2:se==="end"?wt-De:He(Te,Te+De,De,et,we,Te+wt,Te+wt+Ue,Ue),Xe=Math.max(0,Xe+Me),nt=Math.max(0,nt+Te);else{Xe=te==="start"?rt-Mt-We:te==="end"?rt-Dt+Ne+_e:te==="nearest"?He(Mt,Dt,xt,We,Ne+_e,rt,rt+Be,Be):rt-(Mt+xt/2)+_e/2,nt=se==="start"?wt-mt-et:se==="center"?wt-(mt+dt/2)+Ie/2:se==="end"?wt-yt+we+Ie:He(mt,yt,dt,et,we+Ie,wt,wt+Ue,Ue);const{scrollLeft:ht,scrollTop:ut}=ct;Xe=tt===0?0:Math.max(0,Math.min(ut+Xe/tt,ct.scrollHeight-xt/tt+_e)),nt=Ge===0?0:Math.max(0,Math.min(ht+nt/Ge,ct.scrollWidth-dt/Ge+Ie)),rt+=ut-Xe,wt+=ht-nt}Ct.push({el:ct,top:Xe,left:nt})}return Ct},ve=ke=>ke===!1?{block:"end",inline:"nearest"}:(Se=>Se===Object(Se)&&Object.keys(Se).length!==0)(ke)?ke:{block:"start",inline:"nearest"};function Ee(ke,Se){if(!ke.isConnected||!(Pe=>{let fe=Pe;for(;fe&&fe.parentNode;){if(fe.parentNode===document)return!0;fe=fe.parentNode instanceof ShadowRoot?fe.parentNode.host:fe.parentNode}return!1})(ke))return;const Ae=(Pe=>{const fe=window.getComputedStyle(Pe);return{top:parseFloat(fe.scrollMarginTop)||0,right:parseFloat(fe.scrollMarginRight)||0,bottom:parseFloat(fe.scrollMarginBottom)||0,left:parseFloat(fe.scrollMarginLeft)||0}})(ke);if((Pe=>typeof Pe=="object"&&typeof Pe.behavior=="function")(Se))return Se.behavior(de(ke,Se));const me=typeof Se=="boolean"||Se==null?void 0:Se.behavior;for(const{el:Pe,top:fe,left:z}of de(ke,ve(Se))){const te=fe-Ae.top+Ae.bottom,se=z-Ae.left+Ae.right;Pe.scroll({top:te,left:se,behavior:me})}}}}]);
|