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

1239 lines
2.6 MiB

(self.webpackChunk=self.webpackChunk||[]).push([[5382],{8336:function(){"use strict"},12469:function(){"use strict"},99587:function(Gn,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"}},63720:function(){"use strict";function Gn(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(Gn.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(Gn.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(Gn.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(Gn.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 Gn))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 ft(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 Gt(fe){jn.push(fe)}function oe(fe,z,te,se,ie,le,ce,pe,xe){xe||(xe=new go.Point);var Ae=fe-te,De=ie-ce,Fe=NaN,Te=NaN;if(Ae===0)if(De===0)fe===te&&(Fe=fe,Te=z);else{var Ne=(le-pe)/De,Be=le-Ne*ie;Fe=fe,Te=Ne*Fe+Be}else if(De===0){var Ge=(z-se)/Ae,Ye=z-Ge*fe;Fe=ie,Te=Ge*Fe+Ye}else{var Ge=(z-se)/Ae,Ne=(le-pe)/De,Ye=z-Ge*fe,Be=le-Ne*ie;Fe=(Be-Ye)/(Ge-Ne),Te=Ge*Fe+Ye}return xe.x=Fe,xe.y=Te,xe}function Ue(fe,z,te,se,ie,le,ce,pe,xe,Ae,De,Fe,Te,Ne){var Be=1-xe,Ge=xe,Ye=fe*Be+te*Ge,Ke=z*Be+se*Ge,Xe=te*Be+ie*Ge,ot=se*Be+le*Ge,lt=ie*Be+ce*Ge,ut=le*Be+pe*Ge,Ct=Ye*Be+Xe*Ge,Je=Ke*Be+ot*Ge,nt=Xe*Be+lt*Ge,St=ot*Be+ut*Ge,wt=Ct*Be+nt*Ge,bt=Je*Be+St*Ge;Ae.x=Ye,Ae.y=Ke,De.x=Ct,De.y=Je,Fe.x=wt,Fe.y=bt,Te.x=nt,Te.y=St,Ne.x=lt,Ne.y=ut}var Ie=new go.Spot(.156,.156),de=new go.Spot(.844,.844),ve=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Gn("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=Ie,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 Gn("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 Gn("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 Gn("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 Gn("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 Gn("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 je(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=je(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],Ae=z[(se+ce-1)%ie],De=z[(se+ce+le)%ie];te[ce*2]=pe,te[ce*2+1]=oe(pe.x,pe.y,Ae.x,Ae.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=je(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=je(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=je(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=je(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=je(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=je(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=je(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 Gn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Gn("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 Gn("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=Ie,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 Gn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Gn("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 Gn("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 Gn("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 Gn("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),Ae=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,Ae)),De.add(new go.PathSegment(go.PathSegment.Line,.8*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,z,te-Ae)),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-Ae)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,0,Ae).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new Gn("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 Gn("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 Gn("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 Ae=at(),De=at(),Fe=at(),Te=at();Ue(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.42,Ae,De,Fe,Te,Te);var Ne=at(),Be=at(),Ge=at();Ue(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.58,Te,Te,Ge,Ne,Be);var Ye=at(),Ke=at(),Xe=at();Ue(ce,pe+le,ce-ie,pe+le,ce-le,pe+ie,ce-le,pe,.42,Ye,Ke,Xe,Te,Te);var ot=at(),lt=at(),ut=at();return Ue(ce,pe+le,ce-ie,pe+le,ce-le,pe+ie,ce-le,pe,.58,Te,Te,ut,ot,lt),xe.add(new go.PathSegment(go.PathSegment.Move,ut.x*z,ut.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,Ae.x*z,Ae.y*te,De.x*z,De.y*te)),xe.add(new go.PathSegment(go.PathSegment.Line,ut.x*z,ut.y*te).close()),xe.add(new go.PathSegment(go.PathSegment.Move,Xe.x*z,Xe.y*te)),xe.add(new go.PathSegment(go.PathSegment.Line,Ge.x*z,Ge.y*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,Ne.x*z,Ne.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,Xe.x*z,Xe.y*te,Ye.x*z,Ye.y*te,Ke.x*z,Ke.y*te).close()),Gt(Ae),Gt(De),Gt(Fe),Gt(Te),Gt(Ne),Gt(Be),Gt(Ge),Gt(Ye),Gt(Ke),Gt(Xe),Gt(ot),Gt(lt),Gt(ut),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 Gn("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(),Ae=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)),Ue(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.44,De,Fe,Ae,xe,xe),Te.add(new go.PathSegment(go.PathSegment.Bezier,Ae.x*z,Ae.y*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te));var Ne=ft(Ae.x,Ae.y);Ue(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.56,xe,xe,Ae,De,Fe);var Be=ft(Ae.x,Ae.y);Te.add(new go.PathSegment(go.PathSegment.Line,(Ne.x*.1+.95*.9)*z,Ne.y*.1*te)),Te.add(new go.PathSegment(go.PathSegment.Line,.85*z,Ne.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 Ge=new go.PathFigure(ce*z,(pe-le)*te,!1);se.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),Ge.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),Gt(xe),Gt(Ae),Gt(De),Gt(Fe),Gt(Ne),Gt(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 Gn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Gn("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,Ae=new go.PathFigure(0,ce,!0);xe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,le,ce)),Ae.add(new go.PathSegment(go.PathSegment.Line,le,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),Ae.add(new go.PathSegment(go.PathSegment.Line,le,te)),Ae.add(new go.PathSegment(go.PathSegment.Line,le,pe)),Ae.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),Gt(De),xe}),go.Shape.setFigureParameter("Arrow2",0,new Gn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Gn("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,Ae=new go.PathFigure(0,ce,!0);xe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,le,ce)),Ae.add(new go.PathSegment(go.PathSegment.Line,le,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),Ae.add(new go.PathSegment(go.PathSegment.Line,le,te)),Ae.add(new go.PathSegment(go.PathSegment.Line,le,pe)),Ae.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),Gt(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 Gn("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),Gt(xe),ce}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Gn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Gn("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 Ae=new go.Geometry,De=new go.PathFigure(z,.5*te,!0);Ae.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 Ae.spot1=new go.Spot(Fe.x,Fe.y),Fe=oe(.7,xe/te,1,.5,0,ce/te,1,ce/te,Fe),Ae.spot2=new go.Spot(Fe.x,Fe.y),Gt(Fe),Ae}),go.Shape.setFigureParameter("IBeamArrow",0,new Gn("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),Gt(xe),ce}),go.Shape.setFigureParameter("IBeamArrow2",0,new Gn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Gn("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 Ae=new go.Geometry,De=new go.PathFigure(z,.5*te,!0);Ae.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()),Ae.spot1=new go.Spot(0,le/te);var Fe=oe(.7,xe/te,1,.5,0,ce/te,1,ce/te,at());return Ae.spot2=new go.Spot(Fe.x,Fe.y),Gt(Fe),Ae}),go.Shape.setFigureParameter("Pointer",0,new Gn("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),Gt(ce),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new Gn("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),Gt(ce),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new Gn("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),Gt(xe),ce}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Gn("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),Gt(xe),ce}),go.Shape.setFigureParameter("SquareArrow",0,new Gn("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,Ae=.1,De=new go.PathFigure(xe*z,(Ae+le)*te,!0);se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe-ie)*z,Ae*te,(xe-ce)*z,(Ae+le)*te,(xe-ie)*z,(Ae+pe)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(Ae-le)*te,(xe-ie)*z,(Ae-pe)*te,(xe-ce)*z,(Ae-le)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe+ie)*z,Ae*te,(xe+ce)*z,(Ae-le)*te,(xe+ie)*z,(Ae-pe)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(Ae+le)*te,(xe+ie)*z,(Ae+pe)*te,(xe+ce)*z,(Ae+le)*te));var Fe=.05,Te=ve*Fe;xe=.05,Ae=.25;var Ne=new go.PathFigure(.5*z,.2*te,!0);return se.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*te)),xe=.95,Ae=.25,Ne.add(new go.PathSegment(go.PathSegment.Bezier,(xe+Fe)*z,Ae*te,(xe+Te)*z,(Ae-Fe)*te,(xe+Fe)*z,(Ae-Te)*te)),Ne.add(new go.PathSegment(go.PathSegment.Line,z,.6*te)),Ne.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*te)),Ne.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*te)),Fe=.025,Te=ve*Fe,xe=.825,Ae=.35,Ne.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(Ae-Fe)*te,(xe+Fe)*z,(Ae-Te)*te,(xe+Te)*z,(Ae-Fe)*te)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*z,Ae*te,(xe-Te)*z,(Ae-Fe)*te,(xe-Fe)*z,(Ae-Te)*te)),Ne.add(new go.PathSegment(go.PathSegment.Line,.8*z,te)),Ne.add(new go.PathSegment(go.PathSegment.Line,.55*z,te)),Ne.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*te)),Fe=.05,Te=ve*Fe,xe=.5,Ae=.7,Ne.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(Ae-Fe)*te,(xe+Fe)*z,(Ae-Te)*te,(xe+Te)*z,(Ae-Fe)*te)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*z,Ae*te,(xe-Te)*z,(Ae-Fe)*te,(xe-Fe)*z,(Ae-Te)*te)),Ne.add(new go.PathSegment(go.PathSegment.Line,.45*z,te)),Ne.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),Ne.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*te)),Fe=.025,Te=ve*Fe,xe=.175,Ae=.35,Ne.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(Ae-Fe)*te,(xe+Fe)*z,(Ae-Te)*te,(xe+Te)*z,(Ae-Fe)*te)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*z,Ae*te,(xe-Te)*z,(Ae-Fe)*te,(xe-Fe)*z,(Ae-Te)*te)),Ne.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*te)),Ne.add(new go.PathSegment(go.PathSegment.Line,0,.6*te)),Ne.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),Fe=.05,Te=ve*Fe,xe=.05,Ae=.25,Ne.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(Ae-Fe)*te,(xe-Fe)*z,(Ae-Te)*te,(xe-Te)*z,(Ae-Fe)*te)),Ne.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 Gn("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 Ae=new go.PathFigure((le+ie)*z,(le+ie)*te,!1);return se.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,le*z,le*te)),Ae.add(new go.PathSegment(go.PathSegment.Move,le*z,(le+ie)*te)),Ae.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 Ae=new go.PathFigure((ce+le)*z,pe*te,!0);return se.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te)),Ae.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,Ae=.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,Ae*te,!0);return se.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(Ae+pe)*te,(xe+pe)*z,(Ae+ce)*te,(xe+ce)*z,(Ae+pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z,Ae*te,(xe-ce)*z,(Ae+pe)*te,(xe-pe)*z,(Ae+ce)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(Ae-pe)*te,(xe-pe)*z,(Ae-ce)*te,(xe-ce)*z,(Ae-pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z,Ae*te,(xe+ce)*z,(Ae-pe)*te,(xe+pe)*z,(Ae-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 Ae=new go.PathFigure((ce-ie)*z,pe*te,!0);return se.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),Ae.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 Ae=new go.PathFigure(.8*z,.5*te,!0);se.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,te,.7*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*te,.45*z,.25*te)),Ae.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 Ae=new go.PathFigure(.2*z,0,!0);return se.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,(ce+le)*z,(pe-ie)*te,.9*z,(pe-le)*te)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,te,.9*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),Ae.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,Ae=.5,De=(ie-z)/2,Fe=(le-te)/2,Te=new go.PathFigure(xe*z+De,(Ae+pe)*te+Fe,!0);se.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z+De,Ae*te+Fe,(xe-ce)*z+De,(Ae+pe)*te+Fe,(xe-pe)*z+De,(Ae+ce)*te+Fe)),Te.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(Ae-pe)*te+Fe,(xe-pe)*z+De,(Ae-ce)*te+Fe,(xe-ce)*z+De,(Ae-pe)*te+Fe)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe+ce*.5)*z+De,Ae*te+Fe,xe*z+De,(Ae-pe)*te+Fe,(xe-pe+ce*.5)*z+De,(Ae-ce)*te+Fe)),Te.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(Ae+pe)*te+Fe,(xe-pe+ce*.5)*z+De,(Ae+ce)*te+Fe,xe*z+De,(Ae+pe)*te+Fe).close()),ce=ve*.4,pe=.4,xe=.2,Ae=.5;var Ne=new go.PathFigure(xe*z+De,(Ae+pe)*te+Fe,!0);se.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z+De,Ae*te+Fe,(xe-ce)*z+De,(Ae+pe)*te+Fe,(xe-pe)*z+De,(Ae+ce)*te+Fe)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(Ae-pe)*te+Fe,(xe-pe)*z+De,(Ae-ce)*te+Fe,(xe-ce)*z+De,(Ae-pe)*te+Fe)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe+ce*.5)*z+De,Ae*te+Fe,xe*z+De,(Ae-pe)*te+Fe,(xe-pe+ce*.5)*z+De,(Ae-ce)*te+Fe)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(Ae+pe)*te+Fe,(xe-pe+ce*.5)*z+De,(Ae+ce)*te+Fe,xe*z+De,(Ae+pe)*te+Fe).close()),ce=ve*.2,pe=.2,xe=.5,Ae=.5;var Be=new go.PathFigure((xe-pe)*z+De,Ae*te+Fe,!0);se.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(Ae-pe)*te+Fe,(xe-pe)*z+De,(Ae-ce)*te+Fe,(xe-ce)*z+De,(Ae-pe)*te+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z+De,Ae*te+Fe,(xe+ce)*z+De,(Ae-pe)*te+Fe,(xe+pe)*z+De,(Ae-ce)*te+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(Ae+pe)*te+Fe,(xe+pe)*z+De,(Ae+ce)*te+Fe,(xe+ce)*z+De,(Ae+pe)*te+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z+De,Ae*te+Fe,(xe-ce)*z+De,(Ae+pe)*te+Fe,(xe-pe)*z+De,(Ae+ce)*te+Fe)),ce=ve*.4,pe=.4,xe=.8,Ae=.5;var Ge=new go.PathFigure(xe*z+De,(Ae-pe)*te+Fe,!0);se.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z+De,Ae*te+Fe,(xe+ce)*z+De,(Ae-pe)*te+Fe,(xe+pe)*z+De,(Ae-ce)*te+Fe)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(Ae+pe)*te+Fe,(xe+pe)*z+De,(Ae+ce)*te+Fe,(xe+ce)*z+De,(Ae+pe)*te+Fe)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe-ce*.5)*z+De,Ae*te+Fe,xe*z+De,(Ae+pe)*te+Fe,(xe+pe-ce*.5)*z+De,(Ae+ce)*te+Fe)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(Ae-pe)*te+Fe,(xe+pe-ce*.5)*z+De,(Ae-ce)*te+Fe,xe*z+De,(Ae-pe)*te+Fe).close()),ce=ve*.8,pe=.8,xe=1,Ae=.5;var Ye=new go.PathFigure(xe*z+De,(Ae-pe)*te+Fe,!0);return se.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z+De,Ae*te+Fe,(xe+ce)*z+De,(Ae-pe)*te+Fe,(xe+pe)*z+De,(Ae-ce)*te+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(Ae+pe)*te+Fe,(xe+pe)*z+De,(Ae+ce)*te+Fe,(xe+ce)*z+De,(Ae+pe)*te+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe-ce*.5)*z+De,Ae*te+Fe,xe*z+De,(Ae+pe)*te+Fe,(xe+pe-ce*.5)*z+De,(Ae+ce)*te+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(Ae-pe)*te+Fe,(xe+pe-ce*.5)*z+De,(Ae-ce)*te+Fe,xe*z+De,(Ae-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(),Ae=at(),De=at(),Fe=at();Ue(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.5,xe,xe,Ae,De,Fe);var Te=ft(Ae.x,Ae.y),Ne=new go.PathFigure(Ae.x*z,Ae.y*te,!0);se.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te)),Ne.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(ce-le,pe,ce-le,pe-ie,ce-ie,pe-le,ce,pe-le,.5,De,Fe,Ae,xe,xe),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ae.x*z,Ae.y*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te)),ie=ve*.3,le=.3,Ue(ce-le,pe,ce-le,pe-ie,ce-ie,pe-le,ce,pe-le,.5,De,Fe,Ae,xe,xe),Ne.add(new go.PathSegment(go.PathSegment.Line,Ae.x*z,Ae.y*te)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,Fe.x*z,Fe.y*te,De.x*z,De.y*te)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te)),Ne.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(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.5,xe,xe,Ae,De,Fe),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ae.x*z,Ae.y*te,Fe.x*z,Fe.y*te,De.x*z,De.y*te).close());var Ne=new go.PathFigure(.45*z,0,!0);return se.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*te)),Ne.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*te)),Ne.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),Gt(xe),Gt(Ae),Gt(De),Gt(Fe),Gt(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,Ae=.5-.5*Math.SQRT2/2,De=1,Fe=.5,Te=.5,Ne=0,Be=new go.PathFigure(xe*z,(1-Ae)*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,(Ne+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,Ae=Math.PI/4,De=4*(1-Math.cos(Ae))/(3*Math.sin(Ae)),Fe=De*.5,Te=ce,Ne=ce,Be=De*Te,Ge=De*Ne;le.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Te)*z,xe*te,(pe-(Be+Te)/2)*z,(xe+(Ne+Ge)/2)*te,(pe-Te)*z,(xe+Ge)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,(xe-Ne)*te,(pe-Te)*z,(xe-Ge)*te,(pe-Be)*z,(xe-Ne)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Te)*z,xe*te,(pe+Be)*z,(xe-Ne)*te,(pe+Te)*z,(xe-Ge)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*te,(pe+Te)*z,(xe+Ge)*te,(pe+(Be+Te)/2)*z,(xe+(Ne+Ge)/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 Ke=new go.PathFigure(.8*z,te,!1);return se.add(Ke),Ke.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,Ae=.9,De=new go.PathFigure((xe-ce)*z,Ae*te,!0);se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(Ae-ce)*te,(xe-ce)*z,(Ae-pe)*te,(xe-pe)*z,(Ae-ce)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe+ce)*z,Ae*te,(xe+pe)*z,(Ae-ce)*te,(xe+ce)*z,(Ae-pe)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(Ae+ce)*te,(xe+ce)*z,(Ae+pe)*te,(xe+pe)*z,(Ae+ce)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe-ce)*z,Ae*te,(xe-pe)*z,(Ae+ce)*te,(xe-ce)*z,(Ae+pe)*te).close()),ce=.1,pe=ve*.1,xe=.8,Ae=.9;var Fe=new go.PathFigure((xe-ce)*z,Ae*te,!0);return se.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(Ae-ce)*te,(xe-ce)*z,(Ae-pe)*te,(xe-pe)*z,(Ae-ce)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe+ce)*z,Ae*te,(xe+pe)*z,(Ae-ce)*te,(xe+ce)*z,(Ae-pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(Ae+ce)*te,(xe+ce)*z,(Ae+pe)*te,(xe+pe)*z,(Ae+ce)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe-ce)*z,Ae*te,(xe-pe)*z,(Ae+ce)*te,(xe-ce)*z,(Ae+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,Ae=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-Ae)*te,(De-Ae)*z,(Fe-xe)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(De+xe)*z,Fe*te,(De+Ae)*z,(Fe-xe)*te,(De+xe)*z,(Fe-Ae)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe+xe)*te,(De+xe)*z,(Fe+Ae)*te,(De+Ae)*z,(Fe+xe)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(De-xe)*z,Fe*te,(De-Ae)*z,(Fe+xe)*te,(De-xe)*z,(Fe+Ae)*te)),xe=.1,Ae=ve*.1,De=.4,Fe=.9;var Ne=new go.PathFigure((De-xe)*z,Fe*te,!0);return se.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe-xe)*te,(De-xe)*z,(Fe-Ae)*te,(De-Ae)*z,(Fe-xe)*te)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(De+xe)*z,Fe*te,(De+Ae)*z,(Fe-xe)*te,(De+xe)*z,(Fe-Ae)*te)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe+xe)*te,(De+xe)*z,(Fe+Ae)*te,(De+Ae)*z,(Fe+xe)*te)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(De-xe)*z,Fe*te,(De-Ae)*z,(Fe+xe)*te,(De-xe)*z,(Fe+Ae)*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,Ne=.95,pe=new go.PathFigure((Te-De)*z,Ne*te,!0);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Ne-De)*te,(Te-De)*z,(Ne-Fe)*te,(Te-Fe)*z,(Ne-De)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Ne*te,(Te+Fe)*z,(Ne-De)*te,(Te+De)*z,(Ne-Fe)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Ne+De)*te,(Te+De)*z,(Ne+Fe)*te,(Te+Fe)*z,(Ne+De)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Ne*te,(Te-Fe)*z,(Ne+De)*te,(Te-De)*z,(Ne+Fe)*te));var De=.05,Fe=ve*.05,Te=.375,Ne=.95,xe=new go.PathFigure((Te-De)*z,Ne*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Ne-De)*te,(Te-De)*z,(Ne-Fe)*te,(Te-Fe)*z,(Ne-De)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Ne*te,(Te+Fe)*z,(Ne-De)*te,(Te+De)*z,(Ne-Fe)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Ne+De)*te,(Te+De)*z,(Ne+Fe)*te,(Te+Fe)*z,(Ne+De)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Ne*te,(Te-Fe)*z,(Ne+De)*te,(Te-De)*z,(Ne+Fe)*te));var De=.05,Fe=ve*.05,Te=.625,Ne=.95,Ae=new go.PathFigure((Te-De)*z,Ne*te,!0);se.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Ne-De)*te,(Te-De)*z,(Ne-Fe)*te,(Te-Fe)*z,(Ne-De)*te)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Ne*te,(Te+Fe)*z,(Ne-De)*te,(Te+De)*z,(Ne-Fe)*te)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Ne+De)*te,(Te+De)*z,(Ne+Fe)*te,(Te+Fe)*z,(Ne+De)*te)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Ne*te,(Te-Fe)*z,(Ne+De)*te,(Te-De)*z,(Ne+Fe)*te));var De=.05,Fe=ve*.05,Te=.825,Ne=.95,Be=new go.PathFigure((Te-De)*z,Ne*te,!0);se.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Ne-De)*te,(Te-De)*z,(Ne-Fe)*te,(Te-Fe)*z,(Ne-De)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Ne*te,(Te+Fe)*z,(Ne-De)*te,(Te+De)*z,(Ne-Fe)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Ne+De)*te,(Te+De)*z,(Ne+Fe)*te,(Te+Fe)*z,(Ne+De)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Ne*te,(Te-Fe)*z,(Ne+De)*te,(Te-De)*z,(Ne+Fe)*te).close());var Ge=new go.PathFigure(0,te,!1);return se.add(Ge),Ge.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,Ae=.35,De=.775,Fe=new go.PathFigure((Ae-pe)*z,De*te,!0);return se.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(De-pe)*te,(Ae-pe)*z,(De-xe)*te,(Ae-xe)*z,(De-pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+pe)*z,De*te,(Ae+xe)*z,(De-pe)*te,(Ae+pe)*z,(De-xe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(De+pe)*te,(Ae+pe)*z,(De+xe)*te,(Ae+xe)*z,(De+pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-pe)*z,De*te,(Ae-xe)*z,(De+pe)*te,(Ae-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 Ae=new go.PathFigure(0,.7*te,!1);return se.add(Ae),Ae.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 Ae=new go.PathFigure(.15*z,.5*te,!1);return se.add(Ae),Ae.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 Ae=new go.PathFigure((ce-ie)*z,pe*te,!1);return se.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),Ae.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()),Ae.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*te)),Ae.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*te,.75*z,.475*te,.75*z,.225*te)),Ae.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 Ae=new go.PathFigure(z*.78,te*.05,!1);return se.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.05)),Ae.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.25)),Ae.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")},43001: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 Gn={},jn="5.0",ft={},at=null,Gt=!1,oe=!1,Ue=null,Ie=!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:Ue=ke;break;case"object":typeof ke.is3D!="undefined"?at=ke:ft=ke;break;case"boolean":Gt=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},ft.material_id!==void 0&&!oe&&(Gt=!0)),Ue!==null&&ft.id===void 0&&(ft.id=Ue);var Se="",je="",me=!1,Pe=null,fe=null,z=null,te=!1,se=null,ie=null,le=null,ce=null,pe=null;ft.height!==void 0&&(ft.height=Math.round(ft.height)),ft.width!==void 0&&(ft.width=Math.round(ft.width));var xe=function(ct){return parseFloat(ct)>4?parseFloat(ct):5};Gn.setHTML5Codebase=function(ct,vt){ve=ct,St(ct,vt)},Gn.setJavaCodebase=Gn.setJavaCodebaseVersion=Gn.isCompiledInstalled=Gn.setPreCompiledScriptPath=Gn.setPreCompiledResourcePath=function(){},Gn.setHTML5CodebaseVersion=function(ct,vt){var ht=parseFloat(ct);if(ht!==NaN&&ht<5){console.log("The GeoGebra HTML5 codebase version "+ht+" is deprecated. Using version latest instead.");return}de=ct,nt(ct,vt)},Gn.getHTML5CodebaseVersion=function(){return fe},Gn.getParameters=function(){return ft},Gn.setFontsCSSURL=function(ct){ce=ct},Gn.setGiacJSURL=function(ct){},Gn.setJNLPFile=function(ct){Se=ct},Gn.setJNLPBaseDir=function(ct){},Gn.inject=function(){function ct(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var vt="auto",ht=ft.id,Lt,dt=!1,mt=0;mt<arguments.length;mt++){var Et=arguments[mt];typeof Et=="string"?(Et=Et.toLowerCase(),Et.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?vt=Et:ht=arguments[mt]):typeof Et=="boolean"?dt=Et:Et instanceof HTMLElement&&(Lt=Et)}gt();function gt(){if(!Ie){setTimeout(gt,200);return}vt=Ct(vt);var $e=Lt||document.getElementById(ht);if(!$e){console.log("possibly bug on ajax loading? ");return}if(Gn.removeExistingApplet($e,!1),ft.width===void 0&&$e.clientWidth&&(ft.width=$e.clientWidth),ft.height===void 0&&$e.clientHeight&&(ft.height=$e.clientHeight),!(ft.width&&ft.height)&&vt==="html5"&&(delete ft.width,delete ft.height),Pe=vt,vt==="screenshot")Ke($e,ft);else{var He=!1;ft.hasOwnProperty("playButton")&&ft.playButton||ft.hasOwnProperty("clickToLoad")&&ft.clickToLoad?He=!0:ft.hasOwnProperty("playButtonAutoDecide")&&ft.playButtonAutoDecide&&(He=(!Ae()||ct())&&De()),He?(Pe="screenshot",ot($e,ft,dt,vt)):Ye($e,ft,dt)}}};function Ae(){try{return window.self!==window.top}catch(ct){return!0}}function De(){return ft.hasOwnProperty("screenshotGenerator")&&ft.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Gn.getViews=function(){return at},Gn.isJavaInstalled=function(){return!1};var Fe=function(ct){var vt=function(mt){var Et=JSON.parse(mt),gt=function(we){return we.type=="G"||we.type=="E"},$e=Et.elements?Et.elements.filter(gt)[0]:Et;if(!$e||!$e.url){ht();return}ft.fileName=$e.url,Te($e.settings||{}),at.is3D=!0;var He="https://www.geogebra.org/images/";Gn.setPreviewImage(se||$e.previewUrl,He+"GeoGebra_loading.png",He+"applet_play.png"),ct()},ht=function(){ft.onError&&ft.onError(),wt("Error: Fetching material (id "+ft.material_id+") failed.",ft)},Lt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",dt="/materials/"+ft.material_id+"?scope=basic";Ne("https://"+Lt+"/api/proxy.php?path="+encodeURIComponent(dt),vt,ht)};function Te(ct){var vt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ht){ct[ht]=!!ct[ht]}),vt.forEach(function(ht){ft[ht]===void 0&&ct[ht]!==void 0&&(ft[ht]=ct[ht])}),ft.showToolBarHelp===void 0&&(ft.showToolBarHelp=ft.showToolBar)}function Ne(ct,vt,ht){var Lt=new XMLHttpRequest;Lt.open("GET",ct),Lt.onload=function(){vt(Lt.responseText)},Lt.onerror=ht,Lt.send()}Gn.isHTML5Installed=function(){return!0},Gn.getLoadedAppletType=function(){return Pe},Gn.setPreviewImage=function(ct,vt,ht){se=ct,ie=vt,le=ht},Gn.removeExistingApplet=function(ct,vt){var ht;typeof ct=="string"&&(ct=document.getElementById(ct)),Pe=null;var Lt=null;for(ht=0;ht<ct.childNodes.length;ht++){var dt=ct.childNodes[ht],mt=dt.className;mt==="applet_screenshot"?vt?(dt.style.display="block",Pe="screenshot"):dt.style.display="none":mt!=="applet_scaler prerender"&&(ct.removeChild(dt),Lt=mt&&mt.indexOf("appletParameters")!=-1?dt.id:null,ht--)}var Et=ft.id!==void 0?ft.id:Lt,gt=window[Et];gt&&typeof gt.getBase64=="function"&&(gt.remove(),window[Et]=null)},Gn.refreshHitPoints=function(){if(xe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ct=Gn.getAppletObject();return ct&&typeof ct.recalculateEnvironments=="function"?(ct.recalculateEnvironments(),!0):!1},Gn.startAnimation=function(){var ct=Gn.getAppletObject();return ct&&typeof ct.startAnimation=="function"?(ct.startAnimation(),!0):!1},Gn.stopAnimation=function(){var ct=Gn.getAppletObject();return ct&&typeof ct.stopAnimation=="function"?(ct.stopAnimation(),!0):!1},Gn.getAppletObject=function(){var ct=ft.id!==void 0?ft.id:"ggbApplet";return window[ct]},Gn.resize=function(){};var Be=function(ct,vt,ht){var Lt=document.createElement("param");Lt.setAttribute("name",vt),Lt.setAttribute("value",ht),ct.appendChild(Lt)},Ge=function(ct){return ct&&ct!=="false"},Ye=function(ct,vt,ht){xe(fe)<=4.2&&(ht=!0);var Lt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==fe||ggbHTML5LoadedCodebaseIsWebSimple&&!te)&&(Lt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var dt=document.createElement("div");dt.classList.add("appletParameters","notranslate");var mt=vt.width,Et=vt.height;if(vt.disableAutoScale=vt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():vt.disableAutoScale,vt.width!==void 0)if(xe(fe)<=4.4)Ge(vt.showToolBar)&&(vt.height-=7),Ge(vt.showAlgebraInput)&&(vt.height-=37),vt.width<605&&Ge(vt.showToolBar)&&(vt.width=605,mt=605);else{var gt=100;(Ge(vt.showToolBar)||Ge(vt.showMenuBar))&&(vt.hasOwnProperty("customToolBar")&&(vt.customToolbar=vt.customToolBar),gt=Ge(vt.showMenuBar)?245:155),mt<gt&&(vt.width=gt,mt=gt)}dt.style.border="none",dt.style.display="inline-block";for(var $e in vt)vt.hasOwnProperty($e)&&$e!=="appletOnLoad"&&dt.setAttribute("data-param-"+$e,vt[$e]);ce&&dt.setAttribute("data-param-fontscssurl",ce),Gn.resize=function(){GGBAppletUtils.responsiveResize(ct,vt)},window.addEventListener("resize",function(Nt){Gn.resize()});var He=typeof vt.appletOnLoad=="function"?vt.appletOnLoad:function(){};if(!ht&&vt.width!==void 0){vt.hasOwnProperty("showSplash")||dt.setAttribute("data-param-showSplash","false");var we=ct.querySelector(".applet_scaler.prerender"),Le=we!==null;if(Le)var We=we.querySelector(".ggb_preview");else{var We=ut(mt,Et,vt.borderColor,!1);we=document.createElement("div"),we.className="applet_scaler",we.style.position="relative",we.style.display="block",we.style.width=mt+"px",we.style.height=Et+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(we,"66%"),xe(fe)>=5?(vt.appletOnLoad=function(Nt){var Bt=ct.querySelector(".ggb_preview");Bt&&Bt.parentNode.removeChild(Bt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(we),window.GGBT_wsf_view&&$(window).trigger("resize"),He(Nt)},Le||we.appendChild(We)):dt.appendChild(We),we.appendChild(dt),Le||ct.appendChild(we),setTimeout(function(){Gn.resize()},1)}else{var tt=document.createElement("div");tt.className="applet_scaler",tt.style.position="relative",tt.style.display="block",tt.appendChild(dt),ct.appendChild(tt),vt.appletOnLoad=function(Nt){Gn.resize(),He(Nt)}}function Re(Nt,Bt){Bt&&typeof Bt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Nt,Bt.appletOnLoad):renderGGBElement(Nt),wt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Bt)}function _e(Nt,Bt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Nt,params:Bt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function($t){Re($t.article,$t.params)}),html5AppletsToProcess=null)},xe(fe)<5&&(Nt.className+=" geogebraweb")):Re(Nt,Bt)}if(Lt){scriptLoadStarted=!0;for(var Ve=0;Ve<dt.childNodes.length;Ve++){var it=dt.childNodes[Ve].tagName;it==="TABLE"&&(dt.removeChild(dt.childNodes[Ve]),Ve--)}if(ggbHTML5LoadedScript!==null){var yt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');yt!=null&&yt.parentNode.removeChild(yt)}var Pt=document.createElement("script"),jt=function(){_e(dt,vt)};Pt.src=je+z,ggbHTML5LoadedCodebaseIsWebSimple=te,ggbHTML5LoadedCodebaseVersion=fe,ggbHTML5LoadedScript=Pt.src,wt("GeoGebra HTML5 codebase loaded: '"+je+"'.",vt),!ve&&(!de||de=="5.0")?(te?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),jt()):je.requirejs?__webpack_require__.e(7963).then(function(){var Nt=[__webpack_require__(87963)];jt.apply(null,Nt)}.bind(this)).catch(__webpack_require__.oe):(Pt.onload=jt,ct.appendChild(Pt))}else _e(dt,vt);vt.height=Et,vt.width=mt},Ke=function(ct,vt,ht){var Lt=ut(vt.width,vt.height,vt.borderColor,ht),dt=document.createElement("div");dt.style.position="relative",dt.style.display="block",dt.style.width=vt.width+"px",dt.style.height=vt.height+"px",dt.className="applet_screenshot applet_scaler"+(ht?" applet_screenshot_play":""),dt.appendChild(Lt);var mt=GGBAppletUtils.getScale(vt,ct,ht);ht?(ct.appendChild(lt()),window.GGBT_wsf_view||(ct.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(dt,"66%"),ct.appendChild(dt),mt!==1&&!isNaN(mt)&&(GGBAppletUtils.scaleElement(dt,mt),dt.style.width=vt.width+"px",dt.style.height=vt.height+"px",dt.parentNode.style.width=vt.width*mt+"px",dt.parentNode.style.height=vt.height*mt+"px"),Gn.resize=function(){Xe(ct,Lt,dt,ht)},window.addEventListener("resize",function(Et){Gn.resize()}),Gn.resize()};function Xe(ct,vt,ht,Lt){if(ct.contains(vt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ct.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ct)}var dt=GGBAppletUtils.getScale(ft,ct,Lt);ht.parentNode!==null&&(!isNaN(dt)&&dt!==1?(GGBAppletUtils.scaleElement(ht,dt),ht.parentNode.style.width=ft.width*dt+"px",ht.parentNode.style.height=ft.height*dt+"px"):(GGBAppletUtils.scaleElement(ht,1),ht.parentNode.style.width=ft.width+"px",ht.parentNode.style.height=ft.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()}}Gn.onExitFullscreen=function(ct,vt){vt.appendChild(ct)};var ot=function(ct,vt,ht,Lt){Ke(ct,vt,!0);for(var dt=function(){var gt=[];for(Et=0;Et<ct.childNodes.length;Et++)gt.push(ct.childNodes[Et]);if(window.GGBT_wsf_view){var $e=window.GGBT_wsf_view.renderFullScreen(ct,vt.id),He=document.getElementById("fullscreencontainer"),we=jQuery(ct).find(".fullscreencontent");we.length>0?($e.remove(),we.attr("id","fullscreencontent").show(),jQuery(He).append(we),window.dispatchEvent(new Event("resize"))):Ye($e,vt,!1),window.GGBT_wsf_view.launchFullScreen(He)}else Pe=Lt,Ye(ct,vt,!1);if(!window.GGBT_wsf_view)for(Et=0;Et<gt.length;Et++)ct.removeChild(gt[Et])},mt=ct.getElementsByClassName("ggb_preview_play"),Et=0;Et<mt.length;Et++)mt[Et].addEventListener("click",dt,!1),mt[Et].addEventListener("ontouchstart",dt,!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 vt='.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");}',ht=document.createElement("style");ht.styleSheet?ht.styleSheet.cssText=vt:ht.appendChild(document.createTextNode(vt)),document.getElementsByTagName("head")[0].appendChild(ht)}return ct},ut=function(ct,vt,ht,Lt){var dt=document.createElement("div");dt.className="ggb_preview",dt.style.position="absolute",dt.style.zIndex="90",dt.style.width=ct-2+"px",dt.style.height=vt-2+"px",dt.style.top="0px",dt.style.left="0px",dt.style.overflow="hidden",dt.style.backgroundColor="white";var mt="lightgrey";ht!==void 0&&(ht==="none"?mt="transparent":mt=ht),dt.style.border="1px solid "+mt;var Et=document.createElement("img");if(Et.style.position="relative",Et.style.zIndex="1000",Et.style.top="-1px",Et.style.left="-1px",se!==null&&Et.setAttribute("src",se),Et.style.opacity=.7,ie!==null){var gt,$e,He;if(!Lt){gt=document.createElement("img"),gt.style.position="absolute",gt.style.zIndex="1001",gt.style.opacity=1,Et.style.opacity=.3,$e=360,$e>ct/4*3&&($e=ct/4*3),He=$e/5.8,gt.setAttribute("src",ie),gt.setAttribute("width",$e),gt.setAttribute("height",He);var we=(ct-$e)/2,Le=(vt-He)/2;gt.style.left=we+"px",gt.style.top=Le+"px",dt.appendChild(gt)}}return dt.appendChild(Et),dt},Ct=function(ct){return ct=ct.toLowerCase(),ct==="html5"||ct==="screenshot"?ct:"html5"},Je=["web","webSimple","web3d","tablet","tablet3d","phone"],nt=function(ct,vt){if(fe=ct,vt){St(fe,!0);return}var ht=!Gt;if(ht){var Lt=xe(fe);!isNaN(Lt)&&Lt<4.4&&(ht=!1)}var dt,mt;window.location.protocol.substr(0,4)==="http"?dt=window.location.protocol:dt="http:";var Et=fe.indexOf("//");Et>0?mt=fe:Et===0?mt=dt+fe:mt="https://www.geogebra.org/apps/5.2.814.0/";for(var gt in Je)if(fe.slice(Je[gt].length*-1)===Je[gt]||fe.slice((Je[gt].length+1)*-1)===Je[gt]+"/"){St(mt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ht&&!at.is3D&&!at.AV&&!at.SV&&!at.CV&&!at.EV2&&!at.CP&&!at.PC&&!at.DA&&!at.FI&&!at.PV&&!Ge(ft.showToolBar)&&!Ge(ft.showMenuBar)&&!Ge(ft.showAlgebraInput)&&!Ge(ft.enableRightClick)&&(!ft.appName||ft.appName=="classic")?mt+="webSimple/":mt+="web3d/",St(mt,!1)},St=function(ct,vt){if(ct.requirejs){je=ct;return}ct.slice(-1)!=="/"&&(ct+="/"),je=ct,vt===null&&(vt=ct.indexOf("http")===-1),me=vt,z="web.nocache.js",te=!1;var ht=je.split("/");ht.length>1&&(!vt&&ht[ht.length-2]==="webSimple"?(z="webSimple.nocache.js",te=!0):Je.indexOf(ht[ht.length-2])>=0&&(z=ht[ht.length-2]+".nocache.js")),ht=ct.split("/"),fe=ht[ht.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 Lt=parseFloat(fe);Lt!==NaN&&Lt<5&&ct.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Lt+" is deprecated. Using version latest instead."),nt("5.0",vt))},wt=function(ct,vt){window.console&&window.console.log&&(!vt||typeof vt.showLogging=="undefined"||vt.showLogging&&vt.showLogging!=="false")&&console.log(ct)};ft.material_id!==void 0?Fe(bt):bt();function bt(){var ct=jn;de!==null?ct=de:parseFloat(ct)<5&&(ct="5.0"),nt(ct,!1),ve!==null&&St(ve,me),Ie=!0}return Gn},GGBAppletUtils=function(){"use strict";function Gn(){return window.GGBT_wsf_edit!==void 0}function jn(Ie,de){de!=1?(Ie.style.transformOrigin="0% 0% 0px",Ie.style.webkitTransformOrigin="0% 0% 0px",Ie.style.transform="scale("+de+","+de+")",Ie.style.webkitTransform="scale("+de+","+de+")",Ie.style.maxWidth="initial",Ie.querySelector(".ggb_preview")!==null&&(Ie.querySelector(".ggb_preview").style.maxWidth="initial"),Ie.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ie.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ie.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ie.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ie.style.transform="none",Ie.style.webkitTransform="none")}function ft(Ie,de,ve,Ee,ke,Se){var je=null;if(Se!=null&&Se!="")for(var me=Ie.parentNode;me!=null;)if((" "+me.className+" ").indexOf(" "+Se+" ")>-1){je=me;break}else me=me.parentNode;var Pe=0,fe=0,z=0,te=0,se=0,ie=0,le=0;if(je)Pe=je.offsetWidth,fe=Math.max(Ee?je.offsetWidth:0,je.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),Ie){var ce=Ie.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(Ie&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var pe=Ie.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(te=40,le=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(te=0,le=40)}}return Ie&&((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(Ie,de,ve,Ee,ke){if(Ie.isScreenshoGenerator)return 1;var Se=Ee!==void 0&&Ee,je=Ie.noScaleMargin!=null&&Ie.noScaleMargin,me=function(pe){return pe&&pe!=="false"},Pe=me(Ie.autoHeight),fe=ft(de,Ie.width,ve,Pe,Se&&window.GGBT_wsf_view||je,ke),z=parseInt(fe.width),te=Ie.width,se=Ie.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 Gt(Ie,de,ve){var Ee=1,ke,Se=!1;if(Ie.hasOwnProperty("allowUpscale")&&(Se=Ie.allowUpscale),Ie.hasOwnProperty("scale")&&(Ee=parseFloat(Ie.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),!(Ie.hasOwnProperty("disableAutoScale")&&Ie.disableAutoScale))ke=at(Ie,de,Se,ve,Ie.scaleContainerClass);else return Ee;return Se&&(!Ie.hasOwnProperty("scale")||Ee===1)?ke:Math.min(Ee,ke)}function oe(Ie){var de=Math.min(window.innerWidth,document.documentElement.clientWidth),ve=Math.min(window.innerHeight,document.documentElement.clientHeight),Ee=Ie.getBoundingClientRect(),ke=(de-Ee.width)/2,Se=(ve-Ee.height)/2;Se<0&&(Se=0),Ie.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ke<40?Ie.style.left="40px":Ie.style.left=ke+"px",Ie.style.top=Se+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Se<40?Ie.style.top="40px":Ie.style.top=Se+"px",Ie.style.left=ke+"px")}function Ue(Ie,de){var ve=Ie.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(Ie)}if(ve.parentElement&&/fullscreen/.test(ve.parentElement.className))return;var Ee=Gt(de,Ie);Gn()&&ve.setAttribute("data-param-scale",Ee);for(var ke=null,Se=0;Se<Ie.childNodes.length;Se++)if(Ie.childNodes[Se].className!==void 0&&Ie.childNodes[Se].className.match(/^applet_scaler/)){ke=Ie.childNodes[Se];break}if(ke!==null&&ke.querySelector(".noscale")!==null)return;var je=de.id!==void 0?de.id:"ggbApplet",me=window[je];(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(Ie),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ve).parents(".content-added-content"))}}return{responsiveResize:Ue,isFlexibleWorksheetEditor:Gn,positionCenter:oe,getScale:Gt,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 Gn=n.location.search;return Gn.indexOf(J)!=-1||Gn.indexOf(K)!=-1}function q(Gn,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(Gn){var jn=s[L].bindings;s[L].bindings=function(){for(var ft=jn?jn():{},at=Gn[webModule.__softPermutationId],Gt=O;Gt<at.length;Gt++){var oe=at[Gt];ft[oe[O]]=oe[P]}return ft}};var t;function u(){return v(),t}function v(){if(!t){var Gn=o.createElement(Q);if(Gn.id=L,Gn.style.cssText=R+S,Gn.tabIndex=-1,o.body.appendChild(Gn),t=Gn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var jn=document.compatMode==U?V:W;t.write(jn+X),t.close()}}}function w(Gn){function jn(at){function Gt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var oe=Gt();if(oe){at();return}function Ue(){if(!oe){if(!Gt())return;oe=!0,at(),o.removeEventListener&&o.removeEventListener(Z,Ue,!1),Ie&&clearInterval(Ie)}}o.addEventListener&&o.addEventListener(Z,Ue,!1);var Ie=setInterval(function(){Ue()},$)}function ft(at){var Gt=u(),oe=Gt.body,Ue=Gt.createElement(_);Ue.language=ab,Ue.crossOrigin=W,Ue.src=at,webModule.__errFn&&(Ue.onerror=function(){webModule.__errFn(L,new Error(bb+at))}),oe.appendChild(Ue)}jn(function(){ft(Gn)})}webModule.__startLoadingFragment=function(Gn){return C(Gn)},webModule.__installRunAsyncCode=function(Gn){var jn=u(),ft=jn.body,at=jn.createElement(_);at.language=ab,at.text=Gn,ft.appendChild(at),ft.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(Gn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Gn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Gn){var jn=c[Gn];return jn==null?null:jn},r=d,webModule.__errFn=e}function B(){function Gn(Ie){var de=Ie.lastIndexOf(rb);de==-1&&(de=Ie.length);var ve=Ie.indexOf(sb);ve==-1&&(ve=Ie.length);var Ee=Ie.lastIndexOf(tb,Math.min(ve,de));return Ee>=O?Ie.substring(O,Ee+P):W}function jn(Ie){if(!Ie.match(/^\w+:\/\//)){var de=o.createElement(ub);de.src=Ie+vb,Ie=Gn(de.src)}return Ie}function ft(){var Ie=__gwt_getMetaProperty(wb);return Ie!=null?Ie:W}function at(){for(var Ie=o.getElementsByTagName(_),de=O;de<Ie.length;++de)if(Ie[de].src.indexOf(xb)!=-1)return Gn(Ie[de].src);return W}function Gt(){var Ie=o.getElementsByTagName(yb);return Ie.length>O?Ie[Ie.length-P].href:W}function oe(){var Ie=o.location;return Ie.href==Ie.protocol+zb+Ie.host+Ie.pathname+Ie.search+Ie.hash}var Ue=ft();return Ue==W&&(Ue=at()),Ue==W&&(Ue=Gt()),Ue==W&&oe()&&(Ue=Gn(o.location.href)),Ue=jn(Ue),Ue}function C(Gn){return Gn.match(/^\//)||Gn.match(/^[a-zA-Z]+:\/\//)?Gn:webModule.__moduleBase+Gn}function D(){var Gn=[],jn=O,ft=[],at=[];function Gt(Ie){var de=at[Ie](),ve=ft[Ie];if(de in ve)return de;var Ee=[];for(var ke in ve)Ee[ve[ke]]=ke;throw r&&r(Ie,Ee,de),null}if(__gwt_isKnownPropertyValue=function(Ie,de){return de in ft[Ie]},webModule.__getPropMap=function(){var Ie={};for(var de in ft)ft.hasOwnProperty(de)&&(Ie[de]=Gt(de));return Ie},webModule.__computePropValue=Gt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var oe;try{oe=Cb;var Ue=oe.indexOf(Db);Ue!=-1&&(jn=parseInt(oe.substring(Ue+P),$),oe=oe.substring(O,Ue))}catch(Ie){}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})()},46699:function(Gn,jn,ft){"use strict";ft.d(jn,{Ax:function(){return Ue},Ds:function(){return Ie},KI:function(){return ve},SI:function(){return oe},f1:function(){return Gt}});var at=ft(346);function Gt(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 je=0;je<Ee.length;je++){let me=Ee[je],Pe=ke?`${ke}/${me.name}`:`${me.name}`;Se.push({title:me.name,type:me.type,isLeaf:me.type!=="tree",key:Pe})}return Se}function Ue(Ee,ke,Se){for(let je=0;je<Ee.length;je++){let me=Ee[je];if(me.key===ke){me.children=Se;break}me.children&&Ue(me.children,ke,Se)}return Ee}function Ie(Ee,ke,Se){let je;return function(){let me=this,Pe=arguments,fe=function(){je=null,Se||Ee.apply(me,Pe)},z=Se&&!je;clearTimeout(je),je=setTimeout(fe,ke),z&&Ee.apply(me,Pe)}}const de=!0,ve=at.Z.API_SERVER},9507:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return je}});var at=ft(59301),Gt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},oe=ft(92310),Ue=ft.n(oe),Ie=ft(29787),de=ft(2859),ve=ft(38986),Ee=ft(51257),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())}),je=({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),Ae=(0,at.useRef)(null),[De,Fe]=(0,at.useState)(!1),[Te,Ne]=(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),Ne("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Xe=yield(0,Ee.ZJ)(me==null?void 0:me.src);ce.current.src="",ce.current.src=Xe,ce.current.onload=function(){Ke()},Fe(!1),Ne("")}),Ge=Xe=>ke(void 0,null,function*(){Fe(!0),Ne("\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:Xe.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(Xe.state)}})).status===0&&se():ot!=null&&ot.id&&se(ot),Fe(!1),Ne("")}),Ye=()=>{const Xe=document.querySelector('a[href="https://markerjs.com/"]');Xe&&Xe.parentNode&&(Xe.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 ut=document.querySelector(lt.name);ut&&ut.setAttribute("title",lt.title)})},Ke=()=>{pe.current=new de.hP(ce.current),pe.current.targetRoot=Ae.current,pe.current.addEventListener("render",Ge),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(Ie.Z,{spinning:De,tip:Te,style:{position:"absolute",width:"100vw"}},at.createElement("div",{ref:Ae,className:Ue()(Gt.imageDimensions,Pe,fe?Gt.fullWidth:""),style:z},at.createElement("img",{className:Gt.img,ref:ce}))))}},76562:function(Gn,jn,ft){"use strict";var at=ft(59301),Gt=ft(77019),oe=ft(5269),Ue=ft(20554),Ie=ft(99571),de=ft(76902),ve=ft(99587),Ee=ft(48136),ke=ft(59301);const Se=(0,at.forwardRef)(({callback:je,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(Gt.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((Ae,De)=>ke.createElement("div",{key:De},ke.createElement("h1",null,Ae.name),ke.createElement(Gt.Z,{gutter:[10,10]},Ae.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(Gt.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((Ae,De)=>ke.createElement("div",{key:De},Ae.name&&ke.createElement("h1",null,Ae.name),ke.createElement(Gt.Z,{gutter:[10,10]},Ae.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 je&&je(xe),xe};return(0,at.useImperativeHandle)(fe,()=>({getData:ce})),ke.createElement("div",{className:ve.Z.mathWrap},ke.createElement(Ue.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(Ie.ZP,{size:"large",onClick:ce,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});jn.Z=Se},28426:function(Gn,jn,ft){"use strict";var at=ft(59301),Gt=ft(93314),oe=ft(99571),Ue=Object.defineProperty,Ie=Object.defineProperties,de=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,Se=(fe,z,te)=>z in fe?Ue(fe,z,{enumerable:!0,configurable:!0,writable:!0,value:te}):fe[z]=te,je=(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)=>Ie(fe,de(z));const Pe=({img:fe,buttonProps:z={},styles:te={},customText:se,ButtonText:ie,ButtonClick:le,Buttonclass:ce,ButtonTwo:pe,imgStyles:xe,loading:Ae=!1,className:De=""})=>at.createElement("section",{className:`tc animated fadeIn ${De}`,style:je({color:"#999",margin:"100px auto",visibility:Ae?"hidden":"visible"},te)},at.createElement("img",{src:fe||Gt,style:me(je({},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,je({className:ce,onClick:le},z),ie),pe&&pe);jn.Z=Pe},45677:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return ce}});var at=ft(59301),Gt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},oe=ft(99571),Ue=ft(70557),Ie=ft(75975),de=ft(25399),ve=ft(51257),Ee=ft(81722),ke=ft(28426),Se=ft(346),je=ft(44203),me=ft(59301),Pe=Object.defineProperty,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,se=(pe,xe,Ae)=>xe in pe?Pe(pe,xe,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):pe[xe]=Ae,ie=(pe,xe)=>{for(var Ae in xe||(xe={}))z.call(xe,Ae)&&se(pe,Ae,xe[Ae]);if(fe)for(var Ae of fe(xe))te.call(xe,Ae)&&se(pe,Ae,xe[Ae]);return pe},le=(pe,xe,Ae)=>new Promise((De,Fe)=>{var Te=Ge=>{try{Be(Ae.next(Ge))}catch(Ye){Fe(Ye)}},Ne=Ge=>{try{Be(Ae.throw(Ge))}catch(Ye){Fe(Ye)}},Be=Ge=>Ge.done?De(Ge.value):Promise.resolve(Ge.value).then(Te,Ne);Be((Ae=Ae.apply(pe,xe)).next())}),ce=({editOffice:pe="view",data:xe,issaver:Ae,onSaver:De,theme:Fe,type:Te,filename:Ne,monacoEditor:Be,className:Ge,style:Ye,close:Ke,onClose:Xe,hasMask:ot,disabledDownload:lt,onImgDimensions:ut,showNodata:Ct,recordInfo:Je})=>{const[nt,St]=(0,at.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[wt,bt]=(0,at.useState)(""),[ct,vt]=(0,at.useState)(),ht=window.ENV==="build"?"/react/build":"",Lt=location.host.startsWith("localhost")?Se.Z.PROXY_SERVER:Se.Z.API_SERVER,mt=10*(1024*1024),Et=(0,at.useRef)();xe!=null&&xe.startsWith("/api")&&Te!=="txt"&&(xe=Se.Z.API_SERVER+xe);const gt=We=>We.substring(We.lastIndexOf("/")+1).split(".").pop();Ne&&Be&&(Be.filename=Ne),(0,at.useEffect)(()=>{var We,tt;const Re=(tt=(We=document.cookie)==null?void 0:We.replace(/\s/g,""))==null?void 0:tt.split(";");Re==null||Re.map(_e=>{let Ve=_e.split("=");Ve[0]==="_educoder_session"&&bt(Ve[1])})},[]),(0,at.useEffect)(()=>{Te==="office"&&(xe.indexOf("bigfilescdn.")>-1||xe.indexOf("bigfiles1")>-1?vt({url:xe,fileType:gt(xe),model:xe.indexOf("model=edit")?"edit":"view"}):He())},[Te,xe]);function $e(We){return le(this,null,function*(){We.data.type==="pdfdata"&&(De(We.data.data),window.removeEventListener("message",$e,!1)),console.log("mess---:",We.data)})}const He=()=>le(void 0,null,function*(){console.log("data:",xe);let We=xe;xe.startsWith("http")||(We=location.origin+We);let tt=new URL(We).pathname.split("/").pop();const Re=yield(0,Ee.gJ)({attachment_id:tt});Re.url=Lt+Re.url,vt(Re)}),we=()=>{if(xe.startsWith("http")||xe.startsWith("blob:")){Le();return}(0,ve.Sv)(Ne||"educoder",xe,Ne)},Le=()=>{Je&&(0,je.fc)({id:Je==null?void 0:Je.id,watch_type:1,course_id:Je==null?void 0:Je.course_id}),(0,ve.Nd)(Ne||"educoder",decodeURIComponent(xe))};return me.createElement("div",{style:ie({},Ye||{}),className:`${ot&&Gt.bgBlack} ${Te?Gt.wrp:"hide"}`},Ke&&me.createElement("div",{className:Gt.close,ref:Et},!!ut&&me.createElement(de.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Et.current},me.createElement("span",{onClick:()=>{Xe(),ut()}},me.createElement("i",{className:"icon-yulanpizhu"}))),!lt&&me.createElement(de.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Et.current},me.createElement("span",{onClick:Le},me.createElement("i",{className:"icon-quxiaozhiding"}))),Ae&&me.createElement(de.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Et.current},me.createElement("span",{className:"",onClick:()=>{const We=document.getElementById("pdfiframe");window.addEventListener("message",$e,!1),setTimeout(()=>{We.contentWindow.postMessage("getData","*")},300)}},me.createElement("i",{className:"icon-baocun"}))),me.createElement(de.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Et.current},me.createElement("span",{className:"",onClick:()=>{Xe()}},me.createElement("i",{className:"icon-guanbi1"})))),me.createElement("div",{className:`${Gt[Ge]} ${Ge} ${Gt.monaco} ${Te==="txt"?"show":"hide"}`},Te==="txt"&&me.createElement(me.Fragment,null,me.createElement(Ie.ZP,ie({},Be)))),Te==="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}),Te==="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})),Te==="office"&&ct&&me.createElement("iframe",{src:`${ht}/office.html?key=${ct.key}&url=${btoa(ct.url)}&callbackUrl=${Lt+(ct.callbackUrl||"")}&fileType=${ct.fileType}&title=${ct.title||""}&model=${pe}&officeServer=${Se.Z.ONLYOFFICE}&disabledDownload=${!!lt}`}),Te==="html"&&me.createElement("iframe",{src:xe+"&disposition=inline"}),Te==="pdf"&&me.createElement("iframe",{id:"pdfiframe",src:`${ht}/js/pdfview/index.html?filename=${Ne||"educoder.pdf"}&url=${encodeURIComponent(xe)}&disabledDownload=${!!lt}&model=${pe}`}),Te==="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}`}),(Te==="other"||Te==="download")&&me.createElement(me.Fragment,null,Ct?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:we,disabled:lt},"\u4E0B\u8F7D")}):me.createElement(oe.ZP,{type:"primary",size:"middle",onClick:we,disabled:lt},me.createElement(Ue.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},76902:function(Gn,jn,ft){"use strict";ft.d(jn,{z:function(){return Fe},Z:function(){return Te}});var at=ft(59301),Gt=ft(8944),oe=ft(81428),Ue=ft(64018),Ie=ft(81168),de=ft(346),ve=ft(51257),Ee=ft(15342),ke=ft(1012),Se=ft(45677),je=ft(59301),Pe=({html:Ne})=>{const Be=(0,at.useRef)(null),Ge=(0,at.useRef)(null),Ye=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 56px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,at.useEffect)(()=>{const Ke=Be.current.attachShadow({mode:"open"});Ge.current=document.createElement("div"),Ge.current.className="markdown-body",Ge.current.innerHTML=Ne,Ke.appendChild(Ge.current);const Xe=document.createElement("style");return Xe.textContent=Ye,Ke.appendChild(Xe),()=>{Ke.innerHTML=""}},[]),(0,at.useEffect)(()=>{Ge.current&&(Ge.current.innerHTML=Ne)},[Ne]),je.createElement("div",{ref:Be})};function fe(Ne){const Be=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],Ge=new RegExp(`\\b(${Be.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ne.replace(Ge,"").trim()}var z=Object.defineProperty,te=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,le=(Ne,Be,Ge)=>Be in Ne?z(Ne,Be,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ne[Be]=Ge,ce=(Ne,Be)=>{for(var Ge in Be||(Be={}))se.call(Be,Ge)&&le(Ne,Ge,Be[Ge]);if(te)for(var Ge of te(Be))ie.call(Be,Ge)&&le(Ne,Ge,Be[Ge]);return Ne};const pe="@\u2581\u2581@",xe="@\u2581@",Ae=/<pre[^>]*>/g;function De(Ne){let Be=document.createElement("div");return Be.innerHTML=Ne,Be.childNodes.length===0?"":Be.childNodes[0].nodeValue}const Fe=(Ne,Be)=>{Ne=Ne||"";const Ge=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ye=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ke=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Xe=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Be?Ne.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Ge,(ot,lt,ut,Ct,Je,nt,St)=>{const wt=lt||Ct||nt,bt=ut||Je||St||"?";return de.Z.API_SERVER+"/api/attachments/"+wt+bt+"&t="+(0,ve.Jn)(wt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ne=Ne.replace(Xe,(ot,lt,ut,Ct,Je,nt,St)=>{const wt=lt||Ct||nt,bt=ut||Je||St||"?";return de.Z.API_SERVER+"/attachments/download/"+wt+bt+"&t="+(0,ve.Jn)(wt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replace(Ge,(ot,lt,ut,Ct,Je,nt,St)=>{const wt=lt||Ct||nt,bt=ut||Je||St||"?";return de.Z.API_SERVER+"/api/attachments/"+wt+bt+"&t="+(0,ve.Jn)(wt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replace(Ye,(ot,lt,ut,Ct,Je)=>{const nt=lt||Ct,St=ut||Je||"";return'"'+de.Z.API_SERVER+"/api/attachments/"+nt+St+nt+St+"&t="+(0,ve.Jn)(nt,Date.now())}).replace(Ke,(ot,lt,ut,Ct,Je)=>{const nt=lt||Ct,St=ut||Je||"";return"("+de.Z.API_SERVER+"/files/uploads/"+nt+St+nt+St+"&t="+(0,ve.Jn)(nt,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,`
`),Ne)};var Te=({value:Ne="",className:Be,showTextOnly:Ge,showLines:Ye,style:Ke={},stylesPrev:Xe={},highlightKeywords:ot,showProgramFill:lt,isProgramFill:ut,disabledFill:Ct=!1,programFillValue:Je,onFillChange:nt=bt=>{},onFillBlur:St=()=>{},onFillFocus:wt=()=>{}})=>{let bt=fe(String(Ne||""));const[ct,vt]=(0,at.useState)(""),[ht,Lt]=(0,at.useState)("office"),[dt,mt]=(0,at.useState)([]),Et=(0,at.useRef)("a"+(0,ke.Z)()),gt={},$e=jt=>/<style[\s\S]*?>/i.test(jt||""),He=(jt,Nt,Bt)=>{const $t=document.createElement(jt===xe?"input":"textarea");$t.style.width="100%",$t.style.height=jt===xe?"40px":"151px",$t.rows=5,$t.spellcheck=!1,$t.name="edu-program-fill",$t.placeholder="\u8BF7\u8F93\u5165",$t.dataset.id=Nt;const en=Object.keys(gt).length;return gt[en]=$t,`<span class="edu-program-fill-wrap ${jt===xe?"":"show"}" style="width:${jt===xe?"600px":"100%"}" title=${Bt||""}><span>${$t.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function we(jt){return jt=jt.replace(/!\[.*?\]\(.*?\)/g,""),jt=jt.replace(/\[.*?\]\(.*?\)/g,""),jt=jt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),jt=jt.replace(/<embed.*?>/g,""),jt=jt.replace(/<img.*?>/g,""),jt=jt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),jt=jt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),jt=jt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),jt=jt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),jt}const Le=jt=>!Ge&&$e(bt)?jt:jt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Nt,Bt){let $t=Bt.replace(/(\n|\r)/g,"").split("}"),en=[];return $t.map(qt=>{qt!=""&&en.push(`.${Et.current} ${qt}`)}),`<style>${en.join("}")}</style>`}),We=(0,at.useMemo)(()=>{try{const $t=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,en=/\"\/api\/attachments\/|\"\/attachments\/download\//g,qt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Zt=/\(\/attachments\/download\//g;bt=bt.replace(Zt,"("+de.Z.API_SERVER+"/attachments/download/").replace($t,"("+de.Z.API_SERVER+"/api/attachments/").replace(en,'"'+de.Z.API_SERVER+"/api/attachments/").replace(qt,'"'+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($t){}if(lt){let $t=-1;return bt=bt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(en,qt,Zt){var hn;return++$t,He(en,$t,(hn=Je==null?void 0:Je[$t])==null?void 0:hn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Le(bt||"")}</pre>`}let jt=Le(bt);jt=(0,oe.ZP)(jt);const Nt=(0,oe.ez)();bt.match(/\[TOC\]/)&&(jt=jt.replace("<p>[TOC]</p>",(0,oe.Qv)()),(0,oe.Iy)()),jt=jt.replace(/(__special_katext_id_\d+__)/g,($t,en)=>{const{type:qt,expression:Zt}=Nt[en];return(0,Ee.renderToString)(De(Zt)||"",{displayMode:qt==="block",throwOnError:!1,output:"html"})}),jt=jt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,oe.AL)();const Bt=document.createElement("div");if(Bt.innerHTML=jt,Ge)return Bt.innerText;if(ot){const $t=ot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ve(Bt,$t),Bt.innerHTML}return setTimeout(()=>Pt(),500),Bt.innerHTML},[bt,ot]);(0,at.useEffect)(()=>{it.current&&it.current.querySelectorAll(["input","textarea"]).forEach(Nt=>{Nt.oninput=tt,Nt.onblur=Re,Nt.onfocus=_e})},[dt]),(0,at.useEffect)(()=>{var jt,Nt,Bt,$t,en;if(Je!=null&&Je.length)try{const qt=it.current.querySelectorAll(".edu-program-fill-score"),Zt=it.current.querySelectorAll('[name="edu-program-fill"]');for(const[hn,an]of Zt.entries())an.value=((jt=Je==null?void 0:Je[hn])==null?void 0:jt.value)||"",((Nt=Je==null?void 0:Je[hn])==null?void 0:Nt.type)==="warning"?an.className="program-fill-warning":((Bt=Je==null?void 0:Je[hn])==null?void 0:Bt.type)==="success"?an.className="program-fill-success":an.className="";for(const[hn,an]of qt.entries())an.innerHTML=($t=Je==null?void 0:Je[hn])!=null&&$t.score?`${(en=Je==null?void 0:Je[hn])==null?void 0:en.score}\u5206`:"";mt(Je)}catch(qt){console.log(qt,"error")}},[Je]);const tt=jt=>{dt[jt.target.dataset.id]=dt[jt.target.dataset.id]||{},dt[jt.target.dataset.id].value=jt.target.value,mt([...dt]),nt(dt,jt.target.dataset.id)},Re=jt=>{dt[jt.target.dataset.id]=dt[jt.target.dataset.id]||{},dt[jt.target.dataset.id].value=jt.target.value,mt([...dt]),St(dt,jt.target.dataset.id)},_e=jt=>{dt[jt.target.dataset.id]=dt[jt.target.dataset.id]||{},dt[jt.target.dataset.id].value=jt.target.value,mt([...dt]),wt(dt,jt.target.dataset.id)};function Ve(jt,Nt){return jt.childNodes.forEach(Bt=>{var $t;if(Bt.childNodes.length>0)Ve(Bt,Nt);else if(Bt.nodeName!=="IMG")if(Bt.innerHTML)Bt.innerHTML=($t=Bt.innerHTML)==null?void 0:$t.replace(new RegExp(Nt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const en=document.createElement("span");en.innerHTML=Bt.textContent.replace(new RegExp(Nt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Bt.replaceWith(en)}})}const it=(0,at.useRef)();oe.jb.WebkitLineClamp=Ye,Ye&&(Ke=ce(ce({},Ke),oe.jb));function yt(jt){let Nt=jt.target;if(Nt.tagName.toUpperCase()==="A"){let Bt=Nt.getAttribute("href");if(Bt.indexOf("office")>-1)jt.preventDefault(),vt(Bt),Lt("office");else if(Bt.indexOf("application/pdf")>-1)jt.preventDefault(),vt(Bt),Lt("pdf");else if(Bt.indexOf("text/html")>-1)jt.preventDefault(),vt(Bt),Lt("html");else if(Bt.startsWith("#")){jt.preventDefault();let $t=document.getElementById(Bt.replace("#",""));$t&&$t.scrollIntoView(!0)}}}const Pt=()=>{var jt;const Nt=(jt=it.current)==null?void 0:jt.querySelectorAll("video");Nt==null||Nt.forEach(Bt=>{if(Bt.oncontextmenu=()=>!1,Bt.src.indexOf(".m3u8")>-1&&!Bt.canPlayType("application/vnd.apple.mpegurl")){if(Ie.ZP.isSupported()){var $t=new Ie.ZP;$t.loadSource(Bt.src),$t.attachMedia(Bt)}}})};return(0,at.useEffect)(()=>{if(it.current&&We&&We.match(Ae)&&window.PR.prettyPrint(),it.current)return it.current.addEventListener("click",yt),()=>{var jt;(jt=it.current)==null||jt.removeEventListener("click",yt),(0,oe.AL)(),(0,oe.Iy)()}},[We,it.current,yt]),(0,at.useEffect)(()=>{var jt;const Nt=Bt=>{Bt.preventDefault(),Bt.clipboardData.setData("text",window.getSelection().toString())};return(jt=it.current)==null||jt.addEventListener("copy",Nt),()=>{var Bt;(Bt=it.current)==null||Bt.removeEventListener("copy",Nt)}},[it.current]),at.createElement(at.Fragment,null,Ge&&at.createElement("div",{ref:it},We),!Ge&&!$e(We)&&at.createElement("div",{ref:it,style:ce({},Ke),className:`${Be||""} ${Ct?"disabled-fill":""} markdown-body ${Et.current}`,dangerouslySetInnerHTML:{__html:We}}),!Ge&&$e(We)&&at.createElement(Pe,{html:We}),at.createElement(Se.Z,{close:!0,data:ct,type:ct!=null&&ct.length?ht:"",style:ce({},Xe),onClose:()=>vt("")}))}},16253:function(Gn,jn,ft){"use strict";ft.d(jn,{cT:function(){return Te},pe:function(){return Ae}});var at=ft(59301),Gt=ft(14566),oe=ft(6767),Ue=ft(38986),Ie=ft(28209),de=ft.n(Ie),ve=ft(1012),Ee=ft(25690),ke=ft(47257),Se=ft.n(ke),je=Object.defineProperty,me=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,se=(Be,Ge,Ye)=>Ge in Be?je(Be,Ge,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Be[Ge]=Ye,ie=(Be,Ge)=>{for(var Ye in Ge||(Ge={}))z.call(Ge,Ye)&&se(Be,Ye,Ge[Ye]);if(fe)for(var Ye of fe(Ge))te.call(Ge,Ye)&&se(Be,Ye,Ge[Ye]);return Be},le=(Be,Ge)=>me(Be,Pe(Ge)),ce=(Be,Ge)=>{var Ye={};for(var Ke in Be)z.call(Be,Ke)&&Ge.indexOf(Ke)<0&&(Ye[Ke]=Be[Ke]);if(Be!=null&&fe)for(var Ke of fe(Be))Ge.indexOf(Ke)<0&&te.call(Be,Ke)&&(Ye[Ke]=Be[Ke]);return Ye},pe=(Be,Ge,Ye)=>new Promise((Ke,Xe)=>{var ot=Ct=>{try{ut(Ye.next(Ct))}catch(Je){Xe(Je)}},lt=Ct=>{try{ut(Ye.throw(Ct))}catch(Je){Xe(Je)}},ut=Ct=>Ct.done?Ke(Ct.value):Promise.resolve(Ct.value).then(ot,lt);ut((Ye=Ye.apply(Be,Ge)).next())});const{Dragger:xe}=Gt.default,Ae=Be=>{const Ge="bf3c199c2470cb477d907b1e0917c17b",Ye="5183666c72eec9e4";var Ke=de().enc.Utf8.parse(Ge);let Xe=de().enc.Utf8.parse(Ye);var ot=de().AES.decrypt(Be,Ke,{iv:Xe,mode:de().mode.CBC});return ot.toString(de().enc.Utf8)};let De;const Fe=Be=>pe(void 0,[Be],function*({identifier:Ge,oldFilename:Ye,newFilename:Ke}){var Xe,ot,lt,ut,Ct,Je;const nt=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});nt.data=JSON.parse(Ae(nt.data));const St=new OSS({endpoint:(Xe=nt==null?void 0:nt.data)==null?void 0:Xe.end_point,region:(ot=nt==null?void 0:nt.data)==null?void 0:ot.region,accessKeyId:(lt=nt==null?void 0:nt.data)==null?void 0:lt.access_key_id,accessKeySecret:(ut=nt==null?void 0:nt.data)==null?void 0:ut.access_key_secret,bucket:(Ct=nt==null?void 0:nt.data)==null?void 0:Ct.bucket,stsToken:(Je=nt==null?void 0:nt.data)==null?void 0:Je.security_token});return new Promise((wt,bt)=>{console.log(11111,`${Ge}/${Ye}`,`${Ge}/${Ke}`,nt.data),St.copy(`/${Ge}/${Ye}`,`/${Ge}/${Ke}`).then(ct=>{console.log("\u62F7\u8D1D\u6210\u529F",ct)}).catch(ct=>{console.log(ct)})})}),Te=(Be,Ge,Ye)=>pe(void 0,null,function*(){var Ke,Xe,ot,lt,ut,Ct;Ge.file_name=Be.name;const Je=yield(0,Ue.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",Ae(Je.data)),Je.data=JSON.parse(Ae(Je.data));const nt=Be.name.split(".");nt.pop();const St=Ge.realFileName?nt.join(""):(0,ve.Z)(),wt=new(Se())({endpoint:(Ke=Je==null?void 0:Je.data)==null?void 0:Ke.end_point,region:(Xe=Je==null?void 0:Je.data)==null?void 0:Xe.region,accessKeyId:(ot=Je==null?void 0:Je.data)==null?void 0:ot.access_key_id,accessKeySecret:(lt=Je==null?void 0:Je.data)==null?void 0:lt.access_key_secret,bucket:(ut=Je==null?void 0:Je.data)==null?void 0:ut.bucket,stsToken:(Ct=Je==null?void 0:Je.data)==null?void 0:Ct.security_token});return new Promise((bt,ct)=>{var vt;wt.multipartUpload(`${St}`,new Blob([Be],{type:Be.type}),le(ie({timeout:200*1e3,partSize:102400},Ye),{callback:{url:(vt=Je==null?void 0:Je.data)==null?void 0:vt.callback_url,host:Je==null?void 0:Je.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Ue.rz)(Ge)}})).then(function(ht){var Lt;Be.response=(Lt=ht.data)==null?void 0:Lt.data,bt(ht==null?void 0:ht.data)}).catch(function(ht){ct(ht),console.log("err:",ht)})})}),Ne=Be=>{var Ge=Be,{user:Ye,cancelUpload:Ke}=Ge,Xe=ce(Ge,["user","cancelUpload"]);const[ot,lt]=(0,at.useState)([]);let[ut,Ct]=(0,at.useState)();const Je={onRemove:St=>{lt([...ot.filter(wt=>wt.name!==St.name)]),Xe.onChange(ot.filter(wt=>wt.name!==St.name))},disabled:Xe.disabled,multiple:!0,fileList:ot==null?void 0:ot.map(St=>St.file),customRequest:()=>{},beforeUpload:St=>pe(void 0,null,function*(){let wt=Xe.maxSize||1073741824;if(ot.filter(bt=>bt.name===St.name).length){oe.ZP.info(`${St.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(St==null?void 0:St.size)>wt?(oe.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${wt/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(ot.push({name:St.name,file:St}),lt([...ot]),Xe.onChange(ot),!1)})},nt=(St,wt)=>pe(void 0,null,function*(){var bt,ct,vt,ht,Lt,dt;wt.file_name=St.name;const mt=St.name,Et=yield(0,Ue.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(Et.data=JSON.parse(Ae(Et.data)),(Et==null?void 0:Et.status)!==0){ot[ot.findIndex(He=>He.name===mt)].status="error",ot[ot.findIndex(He=>He.name===mt)].file.status="error",Xe.onChange(ot),oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}ut=new(Se())({endpoint:(bt=Et==null?void 0:Et.data)==null?void 0:bt.end_point,region:(ct=Et==null?void 0:Et.data)==null?void 0:ct.region,accessKeyId:(vt=Et==null?void 0:Et.data)==null?void 0:vt.access_key_id,accessKeySecret:(ht=Et==null?void 0:Et.data)==null?void 0:ht.access_key_secret,bucket:(Lt=Et==null?void 0:Et.data)==null?void 0:Lt.bucket,stsToken:(dt=Et==null?void 0:Et.data)==null?void 0:dt.security_token}),console.log(St,"file"),Ct(ut);const gt=St.name.split(".");gt.pop();const $e=mt.indexOf(".")>-1?wt.realFileName?gt.join("."):(0,ve.Z)():mt;return new Promise((He,we)=>{var Le;try{ut.multipartUpload(`${Xe.identifier}/${$e}${mt.indexOf(".")>-1?"."+mt.split(".").pop():""}`,new Blob([St.file],{type:St.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(We,tt,Re)=>{try{console.log("\u8FDB\u5EA6",We,tt,Re);const _e=ot.findIndex(Ve=>Ve.name===mt);ot[_e].file.percent=We*100,ot[_e].tempCheckpoint=tt,lt([...ot])}catch(_e){}},checkpoint:ot[ot.findIndex(We=>We.name===mt)].tempCheckpoint,callback:{customValue:{id:mt+""},url:(Le=Et==null?void 0:Et.data)==null?void 0:Le.callback_url,host:Et==null?void 0:Et.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Ue.rz)(wt)}}).then(function(We){var tt,Re,_e;const Ve=ot.findIndex(yt=>yt.name===mt);let it="done";if(((tt=We.data)==null?void 0:tt.status)===0){St.response=(Re=We.data)==null?void 0:Re.data;const yt=ot.findIndex(Pt=>Pt.name===mt);ot[yt].status="done",ot[yt].file.status="done"}else oe.ZP.warning((_e=We.data)==null?void 0:_e.message),it="error";ot[Ve].status=it,ot[Ve].file.status=it,Xe.onChange(ot),He(We==null?void 0:We.data)}).catch(function(We){ot[ot.findIndex(tt=>tt.name===mt)].status="error",ot[ot.findIndex(tt=>tt.name===mt)].file.status="error",oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),lt([...ot]),Xe.onChange(ot),we(We),console.log("err:",We)})}catch(We){}})});return(0,at.useEffect)(()=>{ot.every(St=>St==="done"||St==="error")&&Xe.onComplete(ot)},[ot]),(0,at.useEffect)(()=>{Ke&&(ut==null||ut.cancel())},[Ke]),(0,at.useEffect)(()=>{Xe.uploading&&ot.map(St=>pe(void 0,null,function*(){var wt;if((!St.status||St.status==="error")&&!Ke){St.status="uploading",St.file.status="uploading";const bt=yield nt(St,{login:(wt=Ye==null?void 0:Ye.userInfo)==null?void 0:wt.login,container_type:Xe.container_type,container_id:Xe.container_id,description:Xe.description,realFileName:Xe.realFileName})}}))},[Xe.uploading]),at.createElement(xe,le(ie({},Je),{height:Xe.height,className:Xe.className}),at.createElement("p",{className:"ant-upload-hint"},Xe.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};jn.ZP=(0,Ee.connect)(({loading:Be,globalSetting:Ge,user:Ye})=>({globalSetting:Ge,loading:Be.models.competitions,user:Ye}))(Ne)},69720:function(Gn,jn,ft){"use strict";ft.d(jn,{h:function(){return pe}});var at=ft(59301),Gt=ft(82326),oe=ft(28284),Ue=ft(99571),Ie=ft(89780),de=ft.n(Ie),ve=ft(8336),Ee=ft(12469),ke=Object.defineProperty,Se=Object.defineProperties,je=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,z=(xe,Ae,De)=>Ae in xe?ke(xe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:De}):xe[Ae]=De,te=(xe,Ae)=>{for(var De in Ae||(Ae={}))Pe.call(Ae,De)&&z(xe,De,Ae[De]);if(me)for(var De of me(Ae))fe.call(Ae,De)&&z(xe,De,Ae[De]);return xe},se=(xe,Ae)=>Se(xe,je(Ae));const ie=Gt.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:Ae})=>{const[De,Fe]=(0,at.useState)("python");function Te(Be){Fe(ce[Be][1])}function Ne(Be){xe(Be)}return at.createElement(oe.default,se(te({},le),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ne,style:{width:500}}),at.createElement(oe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},at.createElement(Gt.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(Ue.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),at.createElement(Ue.ZP,{type:"ghost",onClick:Ae},"\u53D6\u6D88")))};function pe({value:xe,onChange:Ae,mode:De,options:Fe={}}){const Te=(0,at.useRef)(),[Ne,Be]=(0,at.useState)();return(0,at.useEffect)(()=>{if(Ne){let Ge=function(Ye){const Ke=Ye.getValue();Ae&&Ae(Ke)};return Ne.on("change",Ge),()=>{Ne.off("change",Ge)}}},[Ne,Ae]),(0,at.useEffect)(()=>{Ne&&Ne.setOption("mode",De)},[Ne,De]),(0,at.useEffect)(()=>{Ne&&(xe!==Ne.getValue()||xe==="")&&setTimeout(()=>{Ne.setValue(xe||"")},300)},[Ne,xe]),(0,at.useEffect)(()=>{if(Te.current&&!Ne){const Ge=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(Ge)}},[Te.current,Ne]),at.createElement("div",{className:"my-codemirror-container"},at.createElement("textarea",{ref:Te}))}},39793:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return zr}});var at=ft(59301),Gt=ft(89780),oe=ft.n(Gt),Ue=ft(76374),Ie=ft(8336),de=ft(6313),ve=ft(25717),Ee=ft(99498),ke=ft(25419),Se=ft(67549),je=ft(76902),me=({value:nn="",className:sn,showTextOnly:Ht,showLines:rn,style:tr={}})=>{const cr=(0,at.useMemo)(()=>"",[nn]);return at.createElement(at.Fragment,null,at.createElement("div",{dangerouslySetInnerHTML:{__html:cr}}))},Pe=Object.defineProperty,fe=Object.defineProperties,z=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,le=(nn,sn,Ht)=>sn in nn?Pe(nn,sn,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):nn[sn]=Ht,ce=(nn,sn)=>{for(var Ht in sn||(sn={}))se.call(sn,Ht)&&le(nn,Ht,sn[Ht]);if(te)for(var Ht of te(sn))ie.call(sn,Ht)&&le(nn,Ht,sn[Ht]);return nn},pe=(nn,sn)=>fe(nn,z(sn));let xe=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ae({onActionCallback:nn,title:sn,icon:Ht,actionName:rn,className:tr="",children:cr}){function Nr(){nn(rn)}return at.createElement("a",{title:sn,className:tr,onClick:Nr},at.createElement("i",{className:`${Ht}`}),cr)}var De=({watch:nn,showNullButton:sn,showNullProgramButton:Ht,onActionCallback:rn,fullScreen:tr,insertTemp:cr,hidetoolBar:Nr,extraUse:ln})=>{const vn=[...xe,{title:`${nn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${nn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return at.createElement("ul",{className:"markdown-toolbar-container"},!Nr&&vn.map((kn,Rr)=>at.createElement("li",{key:Rr},kn.actionName?at.createElement(Ae,pe(ce({},kn),{onActionCallback:rn})):at.createElement("span",{className:"v-line"}))),sn?at.createElement("li",null,at.createElement(Ae,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:rn},at.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ht?at.createElement(at.Fragment,null,at.createElement("li",null,at.createElement(Ae,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:rn},at.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),at.createElement("li",null,at.createElement(Ae,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:rn},at.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,cr&&at.createElement("li",null,at.createElement(Ae,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${cr}`,onActionCallback:rn},at.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),ln&&at.createElement("li",null,ln),at.createElement("li",{className:"btn-full-screen"},at.createElement(Ae,{icon:`${tr?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:tr?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:rn})))},Fe=ft(91558),Te=ft(28284),Ne=ft(37568),Be=ft(99571),Ge=Object.defineProperty,Ye=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,ut=(nn,sn,Ht)=>sn in nn?Ge(nn,sn,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):nn[sn]=Ht,Ct=(nn,sn)=>{for(var Ht in sn||(sn={}))ot.call(sn,Ht)&&ut(nn,Ht,sn[Ht]);if(Xe)for(var Ht of Xe(sn))lt.call(sn,Ht)&&ut(nn,Ht,sn[Ht]);return nn},Je=(nn,sn)=>Ye(nn,Ke(sn));const nt={labelCol:{span:4},wrapperCol:{span:20}};var St=({callback:nn,onCancel:sn})=>{function Ht(rn){nn(rn)}return at.createElement(Te.default,Je(Ct({},nt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ht,style:{width:500}}),at.createElement(Te.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},at.createElement(Ne.default,null)),at.createElement(Te.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},at.createElement(Ne.default,null)),at.createElement("div",{className:"flex-container flex-end"},at.createElement(Be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),at.createElement(Be.ZP,{type:"ghost",onClick:sn},"\u53D6\u6D88")))},wt=ft(69720),bt=ft(17077),ct=ft(62957),vt=ft(77019),ht=ft(9507),Lt=ft(59301),dt=({callback:nn,onCancel:sn})=>{const Ht=document.createElement("canvas"),rn=Ht.getContext("2d");Ht.width=1e3,Ht.height=800,rn.fillStyle="#ffffff",rn.fillRect(0,0,Ht.width,Ht.height);const tr=Ht.toDataURL("image/png");return Lt.createElement(ct.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Lt.createElement(vt.Z,{style:{height:"100vh"}},Lt.createElement(ht.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:tr,visible:!0,title:String(Date.now())},onOk:cr=>{nn({src:cr.url})},onClose:sn})))},mt=ft(12378);function Et(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Et,go.CommandHandler),Et.prototype.canAlignSelection=function(){var nn=this.diagram;return!(nn===null||nn.isReadOnly||nn.isModelReadOnly||nn.selection.count<2)},Et.prototype.alignLeft=function(){var nn=this.diagram;nn.startTransaction("aligning left");var sn=1/0;nn.selection.each(function(Ht){Ht instanceof go.Link||(sn=Math.min(Ht.position.x,sn))}),nn.selection.each(function(Ht){Ht instanceof go.Link||Ht.move(new go.Point(sn,Ht.position.y))}),nn.commitTransaction("aligning left")},Et.prototype.alignRight=function(){var nn=this.diagram;nn.startTransaction("aligning right");var sn=-1/0;nn.selection.each(function(Ht){if(!(Ht instanceof go.Link)){var rn=Ht.actualBounds.x+Ht.actualBounds.width;sn=Math.max(rn,sn)}}),nn.selection.each(function(Ht){Ht instanceof go.Link||Ht.move(new go.Point(sn-Ht.actualBounds.width,Ht.position.y))}),nn.commitTransaction("aligning right")},Et.prototype.alignTop=function(){var nn=this.diagram;nn.startTransaction("alignTop");var sn=1/0;nn.selection.each(function(Ht){Ht instanceof go.Link||(sn=Math.min(Ht.position.y,sn))}),nn.selection.each(function(Ht){Ht instanceof go.Link||Ht.move(new go.Point(Ht.position.x,sn))}),nn.commitTransaction("alignTop")},Et.prototype.alignBottom=function(){var nn=this.diagram;nn.startTransaction("aligning bottom");var sn=-1/0;nn.selection.each(function(Ht){if(!(Ht instanceof go.Link)){var rn=Ht.actualBounds.y+Ht.actualBounds.height;sn=Math.max(rn,sn)}}),nn.selection.each(function(Ht){Ht instanceof go.Link||Ht.move(new go.Point(Ht.actualBounds.x,sn-Ht.actualBounds.height))}),nn.commitTransaction("aligning bottom")},Et.prototype.alignCenterX=function(){var nn=this.diagram,sn=nn.selection.first();if(sn){nn.startTransaction("aligning Center X");var Ht=sn.actualBounds.x+sn.actualBounds.width/2;nn.selection.each(function(rn){rn instanceof go.Link||rn.move(new go.Point(Ht-rn.actualBounds.width/2,rn.actualBounds.y))}),nn.commitTransaction("aligning Center X")}},Et.prototype.alignCenterY=function(){var nn=this.diagram,sn=nn.selection.first();if(sn){nn.startTransaction("aligning Center Y");var Ht=sn.actualBounds.y+sn.actualBounds.height/2;nn.selection.each(function(rn){rn instanceof go.Link||rn.move(new go.Point(rn.actualBounds.x,Ht-rn.actualBounds.height/2))}),nn.commitTransaction("aligning Center Y")}},Et.prototype.alignColumn=function(nn){var sn=this.diagram;sn.startTransaction("align Column"),nn===void 0&&(nn=0),nn=parseFloat(nn);var Ht=new Array;sn.selection.each(function(ln){ln instanceof go.Link||Ht.push(ln)});for(var rn=0;rn<Ht.length-1;rn++){var tr=Ht[rn],cr=tr.actualBounds.y+tr.actualBounds.height+nn,Nr=Ht[rn+1];Nr.move(new go.Point(tr.actualBounds.x,cr))}sn.commitTransaction("align Column")},Et.prototype.alignRow=function(nn){nn===void 0&&(nn=0),nn=parseFloat(nn);var sn=this.diagram;sn.startTransaction("align Row");var Ht=new Array;sn.selection.each(function(ln){ln instanceof go.Link||Ht.push(ln)});for(var rn=0;rn<Ht.length-1;rn++){var tr=Ht[rn],cr=tr.actualBounds.x+tr.actualBounds.width+nn,Nr=Ht[rn+1];Nr.move(new go.Point(cr,tr.actualBounds.y))}sn.commitTransaction("align Row")},Et.prototype.canRotate=function(nn){var sn=this.diagram;return!(sn===null||sn.isReadOnly||sn.isModelReadOnly||sn.selection.count<1)},Et.prototype.rotate=function(nn){nn===void 0&&(nn=90);var sn=this.diagram;sn.startTransaction("rotate "+nn.toString());var sn=this.diagram;sn.selection.each(function(Ht){Ht instanceof go.Link||Ht instanceof go.Group||(Ht.angle+=nn)}),sn.commitTransaction("rotate "+nn.toString())},Et.prototype.pullToFront=function(){var nn=this.diagram;nn.startTransaction("pullToFront");var sn=new go.Map;nn.selection.each(function(Ht){sn.set(Ht.layer,0)}),sn.iteratorKeys.each(function(Ht){var rn=0;Ht.parts.each(function(tr){if(!tr.isSelected){var cr=tr.zOrder;isNaN(cr)?tr.zOrder=0:rn=Math.max(rn,cr)}}),sn.set(Ht,rn)}),nn.selection.each(function(Ht){Et._assignZOrder(Ht,sn.get(Ht.layer)+1)}),nn.commitTransaction("pullToFront")},Et.prototype.pushToBack=function(){var nn=this.diagram;nn.startTransaction("pushToBack");var sn=new go.Map;nn.selection.each(function(Ht){sn.set(Ht.layer,0)}),sn.iteratorKeys.each(function(Ht){var rn=0;Ht.parts.each(function(tr){if(!tr.isSelected){var cr=tr.zOrder;isNaN(cr)?tr.zOrder=0:rn=Math.min(rn,cr)}}),sn.set(Ht,rn)}),nn.selection.each(function(Ht){Et._assignZOrder(Ht,sn.get(Ht.layer)-1-Et._findGroupDepth(Ht))}),nn.commitTransaction("pushToBack")},Et._assignZOrder=function(nn,sn,Ht){Ht===void 0&&(Ht=nn),nn.layer===Ht.layer&&(nn.zOrder=sn),nn instanceof go.Group&&nn.memberParts.each(function(rn){Et._assignZOrder(rn,sn+1,Ht)})},Et._findGroupDepth=function(nn){if(nn instanceof go.Group){var sn=0;return nn.memberParts.each(function(Ht){sn=Math.max(sn,Et._findGroupDepth(Ht))}),sn+1}else return 0},Et.prototype.doKeyDown=function(){var nn=this.diagram;if(nn!==null){var sn=nn.lastInput;if(sn.key==="Up"||sn.key==="Down"||sn.key==="Left"||sn.key==="Right"){var Ht=this.arrowKeyBehavior;if(Ht==="none")return;if(Ht==="select"){this._arrowKeySelect();return}else if(Ht==="move"){this._arrowKeyMove();return}else if(Ht==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Et.prototype._getAllParts=function(){var nn=new Array;return this.diagram.nodes.each(function(sn){nn.push(sn)}),this.diagram.parts.each(function(sn){nn.push(sn)}),nn},Et.prototype._arrowKeyMove=function(){var nn=this.diagram,sn=nn.lastInput,Ht=0,rn=0;if(sn.control||sn.meta)Ht=1,rn=1;else if(nn.grid!==null){var tr=nn.grid.gridCellSize;rn=tr.width,Ht=tr.height}nn.startTransaction("arrowKeyMove"),nn.selection.each(function(cr){sn.key==="Up"?cr.move(new go.Point(cr.actualBounds.x,cr.actualBounds.y-Ht)):sn.key==="Down"?cr.move(new go.Point(cr.actualBounds.x,cr.actualBounds.y+Ht)):sn.key==="Left"?cr.move(new go.Point(cr.actualBounds.x-rn,cr.actualBounds.y)):sn.key==="Right"&&cr.move(new go.Point(cr.actualBounds.x+rn,cr.actualBounds.y))}),nn.commitTransaction("arrowKeyMove")},Et.prototype._arrowKeySelect=function(){var nn=this.diagram,sn=nn.lastInput,Ht=null;sn.key==="Up"?Ht=this._findNearestPartTowards(270):sn.key==="Down"?Ht=this._findNearestPartTowards(90):sn.key==="Left"?Ht=this._findNearestPartTowards(180):sn.key==="Right"&&(Ht=this._findNearestPartTowards(0)),Ht!==null&&(sn.shift?Ht.isSelected=!0:sn.control||sn.meta?Ht.isSelected=!Ht.isSelected:nn.select(Ht))},Et.prototype._findNearestPartTowards=function(nn){var sn=this.diagram.selection.first();if(sn===null)return null;for(var Ht=sn.actualBounds.center,rn=this._getAllParts(),tr=1/0,cr=sn,Nr=0;Nr<rn.length;Nr++){var ln=rn[Nr];if(ln!==sn&&ln.canSelect()){var vn=ln.actualBounds.center,kn=Ht.directionPoint(vn),Rr=this._angleCloseness(kn,nn);if(Rr<=45){var Hn=Ht.distanceSquaredPoint(vn);Hn*=1+Math.sin(Rr*Math.PI/180),Hn<tr&&(tr=Hn,cr=ln)}}}return cr},Et.prototype._angleCloseness=function(nn,sn){return Math.min(Math.abs(sn-nn),Math.min(Math.abs(sn+360-nn),Math.abs(sn-360-nn)))},Et.prototype._arrowKeyTree=function(){var nn=this.diagram,sn=nn.selection.first();if(sn instanceof go.Node){var Ht=nn.lastInput;if(Ht.key==="Right"){if(!sn.isTreeLeaf)if(!sn.isTreeExpanded)nn.commandHandler.canExpandTree(sn)&&nn.commandHandler.expandTree(sn);else{var rn=this._sortTreeChildrenByY(sn).first();rn!==null&&nn.select(rn)}}else if(Ht.key==="Left")if(!sn.isTreeLeaf&&sn.isTreeExpanded)nn.commandHandler.canCollapseTree(sn)&&nn.commandHandler.collapseTree(sn);else{var tr=sn.findTreeParentNode();tr!==null&&nn.select(tr)}else if(Ht.key==="Up"){var tr=sn.findTreeParentNode();if(tr!==null){var cr=this._sortTreeChildrenByY(tr),Nr=cr.indexOf(sn);if(Nr>0){for(var ln=cr.elt(Nr-1);ln!==null&&ln.isTreeExpanded&&!ln.isTreeLeaf;){var vn=this._sortTreeChildrenByY(ln);ln=vn.last()}ln!==null&&nn.select(ln)}else nn.select(tr)}}else if(Ht.key==="Down")if(sn.isTreeExpanded&&!sn.isTreeLeaf){var rn=this._sortTreeChildrenByY(sn).first();rn!==null&&nn.select(rn)}else for(;sn!==null;){var tr=sn.findTreeParentNode();if(tr===null)break;var cr=this._sortTreeChildrenByY(tr),Nr=cr.indexOf(sn);if(Nr<cr.length-1){nn.select(cr.elt(Nr+1));break}else sn=tr}var kn=nn.selection.first();kn!==null&&nn.scrollToRect(kn.actualBounds)}},Et.prototype._sortTreeChildrenByY=function(nn){var sn=new go.List().addAll(nn.findTreeChildrenNodes());return sn.sort(function(Ht,rn){var tr=Ht.location,cr=rn.location;return tr.y<cr.y?-1:tr.y>cr.y?1:tr.x<cr.x?-1:tr.x>cr.x?1:0}),sn},Et.prototype.copyToClipboard=function(nn){go.CommandHandler.prototype.copyToClipboard.call(this,nn),this._lastPasteOffset.set(this.pasteOffset)},Et.prototype.pasteFromClipboard=function(){var nn=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(nn,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),nn},Object.defineProperty(Et.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(nn){if(nn!=="move"&&nn!=="select"&&nn!=="scroll"&&nn!=="tree"&&nn!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+nn);this._arrowKeyBehavior=nn}}),Object.defineProperty(Et.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(nn){if(!(nn instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+nn);this._pasteOffset.set(nn)}});var gt=Et,$e=ft(63720),He=ft(5269),we=ft(38986),Le={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},We=ft(48790),tt=ft(59301),Re=(nn,sn,Ht)=>new Promise((rn,tr)=>{var cr=vn=>{try{ln(Ht.next(vn))}catch(kn){tr(kn)}},Nr=vn=>{try{ln(Ht.throw(vn))}catch(kn){tr(kn)}},ln=vn=>vn.done?rn(vn.value):Promise.resolve(vn.value).then(cr,Nr);ln((Ht=Ht.apply(nn,sn)).next())});function _e({onCancel:nn,callback:sn}){let Ht=(0,at.useRef)(),rn=(0,at.useRef)(),tr=(0,at.useRef)(),cr=(0,at.useRef)(!1);const Nr=(0,at.useRef)(!1),[ln,vn]=(0,at.useState)(0);function kn(){const Hn=mt.bx.make,Ot={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"};Ht.current=new mt.S0(rn.current,{padding:20,grid:Hn(mt.s_,"Grid",Hn(mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Hn(mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Yt=>{var Pr=Yt.diagram.commandHandler.addTopLevelParts(Yt.diagram.selection,!0);Pr||Yt.diagram.currentTool.doCancel()},commandHandler:Hn(gt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Yt=>{var Pr=Yt.subject;Pr.location=Pr.location.copy().snapToGridPoint(Yt.diagram.grid.gridOrigin,Yt.diagram.grid.gridCellSize),setTimeout(()=>{Yt.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Yt=>{var Pr=Yt.subject;setTimeout(()=>{Yt.diagram.commandHandler.editTextBlock()})},LinkRelinked:Yt=>{var Pr=Yt.parameter.part;Pr.invalidateConnectedLinks();var Mr=Yt.subject;Yt.diagram.toolManager.linkingTool.isForwards?Mr.toNode.invalidateConnectedLinks():Mr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ht.current.nodeTemplate=Hn(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),Hn(mt.bn,{name:"SHAPE",fill:Ot.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")),Hn(mt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Hn(mt.al,{margin:1,textAlign:"center",overflow:mt.al.OverflowEllipsis,editable:!0},new mt.KX("text").makeTwoWay(),new mt.KX("stroke","color"))),Ht.current.nodeTemplate.toolTip=Hn("ToolTip",Hn(mt.s_,"Vertical",{maxSize:new mt.$u(200,NaN)},Hn(mt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new mt.KX("text")),Hn(mt.al,{font:"10pt sans-serif",textAlign:"center"},new mt.KX("text","details"))));function Ut(Yt,Pr){var Mr=(ar,mi)=>{ar.handled=!0,ar.diagram.model.commit(ii=>{var pi=mi.part.adornedPart,ei=new mt.E9().setRectSpot(pi.actualBounds,Yt);ei.subtract(pi.location),ei.scale(2,2),ei.x+=Math.sign(ei.x)*130,ei.y+=Math.sign(ei.y)*130,ei.add(pi.location),ei.snapToGridPoint(ar.diagram.grid.gridOrigin,ar.diagram.grid.gridCellSize);var ti=ii.copyNodeData(pi.data);ii.setGroupKeyForNodeData(ti,ii.getGroupKeyForNodeData(pi.data)),ii.addNodeData(ti);var yr={from:pi.key,to:ii.getKeyForNodeData(ti)};ii.addLinkData(yr);var on=ar.diagram.findNodeForData(ti);on.location=ei,ar.diagram.select(on),setTimeout(()=>{ar.diagram.commandHandler.editTextBlock()},20)})};return Hn(mt.bn,{figure:Pr,alignment:Yt,alignmentFocus:Yt.opposite(),width:Yt.equals(mt.z6.Top)||Yt.equals(mt.z6.Bottom)?25:18,height:Yt.equals(mt.z6.Top)||Yt.equals(mt.z6.Bottom)?18:25,fill:"orange",stroke:Ot.white,strokeWidth:4,mouseEnter:(ar,mi)=>mi.fill="dodgerblue",mouseLeave:(ar,mi)=>mi.fill="orange",isActionable:!0,click:Mr,contextClick:Mr})}function Dn(Yt){return Hn(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:(Pr,Mr)=>Mr.fill="dodgerblue",mouseLeave:(Pr,Mr)=>Mr.fill="orange",click:(Pr,Mr)=>{Pr.diagram.commandHandler.showContextMenu(Mr.part.adornedPart)}},Yt||{})}Ht.current.nodeTemplate.selectionAdornmentTemplate=Hn(mt.uz,"Spot",Hn(mt.Vm,{padding:10}),Ut(mt.z6.Top,"TriangleUp"),Ut(mt.z6.Left,"TriangleLeft"),Ut(mt.z6.Right,"TriangleRight"),Ut(mt.z6.Bottom,"TriangleDown"),Dn({alignment:new mt.z6(.75,0)}));function Tn(Yt,Pr){return(Mr,ar)=>{Mr.handled=!0,Mr.diagram.model.commit(mi=>{mi.set(ar.part.adornedPart.data,Yt,Pr)})}}function Qt(Yt,Pr){return Pr||(Pr="color"),Hn(mt.bn,{width:16,height:16,stroke:"lightgray",fill:Yt,margin:1,background:"transparent",mouseEnter:(Mr,ar)=>ar.stroke="dodgerblue",mouseLeave:(Mr,ar)=>ar.stroke="lightgray",click:Tn(Pr,Yt),contextClick:Tn(Pr,Yt)})}function Fn(){return[Hn("ContextMenuButton",Hn(mt.s_,"Horizontal",Qt(Ot.white,"fill"),Qt(Ot.beige,"fill"),Qt(Ot.extralightblue,"fill"),Qt(Ot.extralightred,"fill"))),Hn("ContextMenuButton",Hn(mt.s_,"Horizontal",Qt(Ot.lightgray,"fill"),Qt(Ot.lightgreen,"fill"),Qt(Ot.lightblue,"fill"),Qt(Ot.lightred,"fill")))]}function vr(){return[Hn("ContextMenuButton",Hn(mt.s_,"Horizontal",Qt(Ot.black),Qt(Ot.green),Qt(Ot.blue),Qt(Ot.red))),Hn("ContextMenuButton",Hn(mt.s_,"Horizontal",Qt(Ot.white),Qt(Ot.magenta),Qt(Ot.purple),Qt(Ot.orange)))]}function mr(Yt,Pr){return Pr||(Pr="thickness"),Hn(mt.bn,"LineH",{width:16,height:16,strokeWidth:Yt,margin:1,background:"transparent",mouseEnter:(Mr,ar)=>ar.background="dodgerblue",mouseLeave:(Mr,ar)=>ar.background="transparent",click:Tn(Pr,Yt),contextClick:Tn(Pr,Yt)})}function er(Yt,Pr){return Pr||(Pr="dash"),Hn(mt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Yt,margin:1,background:"transparent",mouseEnter:(Mr,ar)=>ar.background="dodgerblue",mouseLeave:(Mr,ar)=>ar.background="transparent",click:Tn(Pr,Yt),contextClick:Tn(Pr,Yt)})}function Un(){return[Hn("ContextMenuButton",Hn(mt.s_,"Horizontal",mr(1),mr(2),mr(3),mr(4))),Hn("ContextMenuButton",Hn(mt.s_,"Horizontal",er(null),er([2,4]),er([4,4])))]}function Rn(Yt,Pr){return Pr||(Pr="figure"),Hn(mt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Yt,margin:1,background:"transparent",mouseEnter:(Mr,ar)=>ar.fill="dodgerblue",mouseLeave:(Mr,ar)=>ar.fill="lightgray",click:Tn(Pr,Yt),contextClick:Tn(Pr,Yt)})}Ht.current.nodeTemplate.contextMenu=Hn("ContextMenu",Hn("ContextMenuButton",Hn(mt.s_,"Horizontal",Rn("Rectangle"),Rn("RoundedRectangle"),Rn("Ellipse"),Rn("Diamond"))),Hn("ContextMenuButton",Hn(mt.s_,"Horizontal",Rn("Parallelogram2"),Rn("ManualOperation"),Rn("Procedure"),Rn("Cylinder1"))),Hn("ContextMenuButton",Hn(mt.s_,"Horizontal",Rn("Terminator"),Rn("CreateRequest"),Rn("Document"),Rn("TriangleDown"))),Fn(),vr(),Un()),Ht.current.groupTemplate=Hn(mt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:mt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Yt,Pr)=>{var Mr=Pr.addMembers(Pr.diagram.selection,!0);Mr||Pr.diagram.currentTool.doCancel()},avoidable:!1},new mt.KX("location","loc",mt.E9.parse).makeTwoWay(mt.E9.stringify),Hn(mt.s_,"Auto",{name:"BODY"},Hn(mt.bn,{parameter1:10,fill:Ot.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")),Hn(mt.Vm,{background:"transparent",margin:20})),Hn(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"))),Ht.current.groupTemplate.selectionAdornmentTemplate=Hn(mt.uz,"Spot",Hn(mt.s_,"Auto",Hn(mt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Hn(mt.Vm,{margin:1.5})),Dn({alignment:mt.z6.TopRight,alignmentFocus:mt.z6.BottomRight})),Ht.current.groupTemplate.contextMenu=Hn("ContextMenu",Fn(),vr(),Un()),Ht.current.linkTemplate=Hn(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",Yt=>Yt>=1?10:0),new mt.KX("toShortLength","dir",Yt=>Yt>=1?10:0),new mt.KX("points").makeTwoWay(),Hn(mt.bn,{strokeWidth:2},new mt.KX("stroke","color"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),Hn(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",Yt=>Yt===1)),Hn(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",Yt=>Yt>=1),new mt.KX("width","thickness",Yt=>7+3*Yt),new mt.KX("height","thickness",Yt=>7+3*Yt),new mt.KX("segmentOffset","thickness",Yt=>new mt.E9(-15,4+1.5*Yt))),Hn(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",Yt=>Yt===2),new mt.KX("width","thickness",Yt=>7+3*Yt),new mt.KX("height","thickness",Yt=>7+3*Yt),new mt.KX("segmentOffset","thickness",Yt=>new mt.E9(-15,4+1.5*Yt))),Hn(mt.al,{alignmentFocus:new mt.z6(0,1,-4,0),editable:!0},new mt.KX("text").makeTwoWay(),new mt.KX("stroke","color"))),Ht.current.linkTemplate.selectionAdornmentTemplate=Hn(mt.uz,Hn(mt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:$n(2)},new mt.KX("pathPattern","thickness",$n)),Dn({alignmentFocus:new mt.z6(0,0,-6,-4)}));function $n(Yt){return Hn(mt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Yt+4).toString()+" H3"})}function Fr(Yt){var Pr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Yt===0?Pr="M0 0 M16 16 M0 8 L16 8":Yt===2&&(Pr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Hn(mt.bn,{geometryString:Pr,margin:2,background:"transparent",mouseEnter:(Mr,ar)=>ar.background="dodgerblue",mouseLeave:(Mr,ar)=>ar.background="transparent",click:Tn("dir",Yt),contextClick:Tn("dir",Yt)})}function br(Yt){var Pr=(Mr,ar)=>{Mr.handled=!0,Mr.diagram.model.commit(mi=>{var ii=ar.part.adornedPart;mi.set(ii.data,Yt?"toSpot":"fromSpot",mt.z6.stringify(mt.z6.AllSides)),(Yt?ii.toNode:ii.fromNode).invalidateConnectedLinks()})};return Hn(mt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Mr,ar)=>ar.background="dodgerblue",mouseLeave:(Mr,ar)=>ar.background="transparent",click:Pr,contextClick:Pr})}function Pn(Yt,Pr){var Mr=0,ar=mt.z6.RightSide;Yt.equals(mt.z6.Top)?(Mr=270,ar=mt.z6.TopSide):Yt.equals(mt.z6.Left)?(Mr=180,ar=mt.z6.LeftSide):Yt.equals(mt.z6.Bottom)&&(Mr=90,ar=mt.z6.BottomSide),Pr||(Mr-=180);var mi=(ii,pi)=>{ii.handled=!0,ii.diagram.model.commit(ei=>{var ti=pi.part.adornedPart;ei.set(ti.data,Pr?"toSpot":"fromSpot",mt.z6.stringify(ar)),(Pr?ti.toNode:ti.fromNode).invalidateConnectedLinks()})};return Hn(mt.bn,{alignment:Yt,alignmentFocus:Yt.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Mr,background:"transparent",mouseEnter:(ii,pi)=>pi.background="dodgerblue",mouseLeave:(ii,pi)=>pi.background="transparent",click:mi,contextClick:mi})}Ht.current.linkTemplate.contextMenu=Hn("ContextMenu",vr(),Un(),Hn("ContextMenuButton",Hn(mt.s_,"Horizontal",Fr(0),Fr(1),Fr(2))),Hn("ContextMenuButton",Hn(mt.s_,"Horizontal",Hn(mt.s_,"Spot",br(!1),Pn(mt.z6.Top,!1),Pn(mt.z6.Left,!1),Pn(mt.z6.Right,!1),Pn(mt.z6.Bottom,!1)),Hn(mt.s_,"Spot",{margin:new mt.Zt(0,0,0,2)},br(!0),Pn(mt.z6.Top,!0),Pn(mt.z6.Left,!0),Pn(mt.z6.Right,!0),Pn(mt.z6.Bottom,!0)))));const fr=`{ "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 si=["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 xi(Yt){return console.log("shapeName:",Yt),si.indexOf(Yt)>=0}var zi=new mt.YI(tr.current,{maxSelectionCount:1,linkTemplate:Hn(mt.rU,{locationSpot:mt.z6.Center,selectionAdornmentTemplate:Hn(mt.uz,"Link",{locationSpot:mt.z6.Center},Hn(mt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Hn(mt.bn,{toArrow:"Standard",stroke:null}))},{routing:mt.rU.AvoidsNodes,curve:mt.rU.JumpOver,corner:5,toShortLength:4},new mt.KX("points"),Hn(mt.bn,{isPanelMain:!0,strokeWidth:2}),Hn(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(Yt=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Yt.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ht.current.addDiagramListener("TextEdited",function(Yt){var Pr;const Mr=Yt.subject.part;var ar=(Pr=document.activeElement)==null?void 0:Pr.value;typeof ar=="string"&&ar.trim()===""&&Ht.current.model.commit(function(mi){mi.set(Mr.data,"text","\u672A\u547D\u540D"),Ht.current.commandHandler.stopCommand()},"increment")}),zi.nodeTemplate=Hn(mt.NB,"Auto",{locationSpot:mt.z6.Center},new mt.KX("location","location",mt.E9.parse).makeTwoWay(mt.E9.stringify),Hn(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")),Hn(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(()=>{Ht.current.grid=Hn(mt.s_,"Grid",Hn(mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Hn(mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ht.current.grid.visible=!0,Ht.current.grid.gridCellStroke="darkgray",Ht.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ht.current,Ht.current}const Rr=()=>Re(this,null,function*(){var Hn,Ot=Ht.current.makeImage();const Ut=yield(0,we.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Ot.src,file_data:JSON.stringify({login:(Hn=(0,We.eY)())==null?void 0:Hn.login,data:JSON.parse(Ht.current.model.toJson())})}});sn({src:Ut.url})});return(0,at.useEffect)(()=>(setTimeout(()=>{kn()},500),vn(ln+1),()=>{Ht.current=null}),[]),tt.createElement("div",{ref:Nr,className:"body-overflow-initial"},tt.createElement(ct.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!ln,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:tt.createElement(vt.Z,null,tt.createElement(He.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),tt.createElement(He.Z,{onClick:()=>{var Hn,Ot,Ut=Ht.current.selection.first();if(cr.current=!cr.current,document.activeElement&&Ut){let Dn=(Ot=(Hn=document.activeElement)==null?void 0:Hn.value)==null?void 0:Ot.trim();typeof Dn=="string"&&Ht.current.model.commit(function(Tn){Tn.set(Ut.data,"text",Dn||"\u672A\u547D\u540D"),Ht.current.commandHandler.stopCommand()},"increment")}vn(ln+1)}},tt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:nn},tt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:cr.current?"none":"block"},className:Le.flowChartWrp},tt.createElement("div",{style:{display:"flex",height:"100%"}},tt.createElement("div",{style:{width:"300px",height:"100%"}},tt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),tt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Le.myPaletteDiv,ref:tr})),tt.createElement("div",{style:{flex:1,position:"relative"}},tt.createElement("div",{ref:rn,style:{height:"80vh"}}))),tt.createElement("div",{className:"tr"},tt.createElement(Be.ZP,{size:"large",onClick:Rr,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Ve=_e,it=ft(47889),yt=ft(71051);const Pt=it.ZP.Group,jt={margin:"0 8px"};var Nt=({callback:nn,onCancel:sn})=>{function Ht(rn){nn(rn)}return at.createElement(Te.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ht},at.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},at.createElement("span",{style:jt},"\u5355\u5143\u683C\u6570\uFF1A"),at.createElement("span",{style:jt},"\u884C\u6570"),at.createElement(Te.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},at.createElement(yt.Z,null)),at.createElement("span",{style:jt},"\u5217\u6570"),at.createElement(Te.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},at.createElement(yt.Z,null))),at.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},at.createElement("span",{style:jt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),at.createElement(Te.default.Item,{name:"align"},at.createElement(Pt,null,at.createElement(it.ZP,{value:"default"},at.createElement("i",{className:"fa fa-align-justify"})),at.createElement(it.ZP,{value:"left"},at.createElement("i",{className:"fa fa-align-left"})),at.createElement(it.ZP,{value:"center"},at.createElement("i",{className:"fa fa-align-center"})),at.createElement(it.ZP,{value:"right"},at.createElement("i",{className:"fa fa-align-right"}))))),at.createElement("div",{className:"flex-container flex-end"},at.createElement(Be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),at.createElement(Be.ZP,{type:"ghost",onClick:sn},"\u53D6\u6D88")))},Bt=ft(71411),$t=ft(43001),en=ft.n($t),Zt=(0,at.forwardRef)(({use3d:nn,width:sn,height:Ht,callback:rn,showSaveButton:tr},cr)=>{const Nr=(0,at.useRef)(),ln=(0,at.useRef)(),[vn,kn]=(0,at.useState)(!1),Rr=(0,at.useRef)({id:Nr,appName:"graphing",width:sn||1e3,height:Ht||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)(()=>{ln.current=new(en())(Rr.current,!0),window.onload=function(){ln.current.inject("applet_container")}},[]);const Hn=()=>{var Ot=window.ggbApplet.getPNGBase64(1,!0,72);return rn&&rn(Ot),Ot};return(0,at.useEffect)(()=>{Rr.current.appName=vn?"3D":"graphing",ln.current.inject("applet_container")},[vn]),(0,at.useEffect)(()=>{kn(nn)},[nn]),(0,at.useImperativeHandle)(cr,()=>({getImgData:Hn})),at.createElement(at.Fragment,null,at.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Nr}),at.createElement(vt.Z,{align:"middle"},at.createElement(He.Z,{flex:1},at.createElement(Bt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:vn,onChange:Ot=>kn(Ot)})),at.createElement(He.Z,null,at.createElement(Be.ZP,{size:"large",onClick:Hn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),hn=ft(76562),an=ft(6767);const cn="link",wn="upload-image",xn="add-flowchart",Nn="draw-image",Zn="add-flowchart",Tr="code-block",qn="add-table",qr="------------",nr={default:qr,left:`:${qr}`,center:`:${qr}:`,right:`${qr}:`};var $r=ft(37808);function hi(){}let Si=0;const Li=1e4,Ei="\u2581",Lr="@\u2581\u2581@",Ci="@\u2581@",et=`
**\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`,ai=["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 Er(nn){return/^\d+$/.test(nn)?`${nn}px`:nn}const An=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Bn={[An+"-B"]:"bold",[An+"-I"]:"italic"},xr={[cn]:"\u6DFB\u52A0\u94FE\u63A5",[Tr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[wn]:"\u6DFB\u52A0\u56FE\u7247",[Nn]:"\u6DFB\u52A0\u753B\u56FE",[xn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[qn]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var zr=({defaultValue:nn="",onChange:sn,width:Ht="100%",height:rn=400,miniToolbar:tr=!1,isFocus:cr=!1,watch:Nr,insertTemp:ln,mode:vn="markdown",id:kn="markdown-editor-id",showResizeBar:Rr=!1,noStorage:Hn=!1,showNullButton:Ot=!1,showNullProgramButton:Ut=!1,hidetoolBar:Dn=!1,fullScreen:Tn=!1,onBlur:Qt,onCMBeforeChange:Fn,onFullScreen:vr,className:mr="",disablePaste:er=!1,disabled:Un=!1,disabledFill:Rn=!1,placeholder:$n="",values:Fr="",extraUse:br})=>{const[Pn,fr]=(0,at.useState)(null),[si,xi]=(0,at.useState)(nn),[zi,Yt]=(0,at.useState)(Nr),[Pr,Mr]=(0,at.useState)(Tn),[ar,mi]=(0,at.useState)(""),[ii,pi]=(0,at.useState)(0),[ei,ti]=(0,at.useState)(rn),[yr,on]=(0,at.useState)(!1),[sr,un]=(0,at.useState)(0),[gr,Kr]=(0,at.useState)(0),Yr=(0,at.useRef)(),Di=(0,at.useRef)(),oi=(0,at.useRef)(),Zr=(0,at.useRef)();(0,at.useEffect)(()=>{const In=window.scrollY||window.pageYOffset;xi(Fr),Pn==null||Pn.setValue(Fr),window.scrollTo(0,In)},[Fr]),(0,at.useEffect)(()=>{vr==null||vr(Pr)},[Pr]),(0,at.useEffect)(()=>{if(Yr.current){let In=function(ir,fn){var Ar;if(er){fn.preventDefault();return}const Dr=fn.clipboardData;if(Dr){const fi=Dr.types.toString(),Ir=Dr.items;if(fi==="Files"||Dr.types.indexOf("Files")>-1){if(fn.preventDefault(),vn=="stex")return;try{let Mi=Ir[1];((Ar=Ir[0])==null?void 0:Ar.kind)==="file"&&(Mi=Ir[0]);const Pi=Mi.getAsFile(),Bi=Pi.name.split(".").pop();(0,bt.I)(Pi,ki=>{var Hi,qi,Xt;ki.id?((Hi=Pi==null?void 0:Pi.type)==null?void 0:Hi.indexOf("image"))>-1?Jn.replaceSelection(`<img width="100%" src="/api/attachments/${ki.id}?type=${ki.content_type})" alt="" />`):((qi=Pi==null?void 0:Pi.type)==null?void 0:qi.indexOf("video"))>-1?Jn.replaceSelection(`<video width="100%" controls src="/api/attachments/${ki.id}"></video>`):((Xt=Pi==null?void 0:Pi.type)==null?void 0:Xt.indexOf("pdf"))>-1?Jn.replaceSelection(`<a href="/api/attachments/${ki.id}?type=${Pi.type}&disposition=inline" target="_blank">${Pi.name}</a>`):ai.includes(Bi)?Jn.replaceSelection(`<a href="/api/attachments/${ki.id}?type=office&disposition=inline" target="_blank">${Pi.name}</a>`):Jn.replaceSelection(`[${Pi.name}](/api/attachments/${ki.id}?type=${ki.content_type})`):(ki==null?void 0:ki.status)===401&&(document.location.href="/user/login")})}catch(Mi){an.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Jn=oe().fromTextArea(Yr.current,{mode:vn,lineNumbers:!tr,lineWrapping:!0,value:nn,autoCloseTags:!0,autoCloseBrackets:!0});return Jn.on("keyup",function(ir,fn){fn.keyCode===8&&(ir.getValue()==""?Jn.setOption("placeholder",$n):Jn.setOption("placeholder",null))}),Jn.on("keydown",function(ir,fn){if(fn.keyCode===8){var Ar=Jt(ir);Ar&&fn.preventDefault()}}),cr&&Jn.focus(),Jn.on("paste",In),Un&&Jn.on("beforeChange",function(ir,fn){(fn.origin==="paste"||fn.origin==="+input")&&fn.cancel()}),fr(Jn),()=>{Jn.off("paste",In)}}},[]);const Wi=(0,at.useCallback)(()=>{if(Di.current)try{}catch(In){console.log(In,"---- to set md editor body height")}},[ei,Di,Pr]);(0,at.useEffect)(()=>{function In(){let Jn=new Ue.Z(ir=>{for(let fn of ir)(fn.target.offsetHeight>0||fn.target.offsetWidth>0)&&(Wi(),Pn.setSize("100%","100%"),Pn.refresh())});return Jn.observe(Yr.current.parentElement),Jn}if(Pn){const Jn=In();return()=>{var ir,fn;(ir=Yr.current)!=null&&ir.parentElement&&Jn.unobserve((fn=Yr.current)==null?void 0:fn.parentElement)}}},[Pn,Wi]),(0,at.useEffect)(()=>{if(Pn){let In=[];for(const[Jn,ir]of Object.entries(Bn)){let fn={[Jn]:()=>{pn(ir)}};In.push(fn),Pn.addKeyMap(fn)}return()=>{for(let Jn of In)Pn.removeKeyMap(Jn)}}},[Pn]),(0,at.useEffect)(()=>{Tn!==Pr&&Mr(Tn)},[Tn]),(0,$r.Z)(()=>{if(!Hn&&ii>0){let In=new Date().getTime(),Jn=window.sessionStorage.getItem(kn);In>=ii+Li&&(!Jn||Jn!==si)&&(window.sessionStorage.setItem(kn,si),on(!0))}},Li),(0,at.useEffect)(()=>{Yt(Nr)},[Pn,Nr]),(0,at.useEffect)(()=>{Pn&&cr&&Pn.focus()},[Pn,cr]),(0,at.useEffect)(()=>{if(zi&&Pn){let In=function(ir){let fn=ir.target;if(Zr.current){let Ar=fn.scrollTop/fn.scrollHeight;Zr.current.scrollTop=Zr.current.scrollHeight*Ar}};const Jn=Pn.getScrollerElement();return Jn.addEventListener("scroll",In),()=>{Jn.removeEventListener("scroll",In)}}},[Pn,zi]),(0,at.useEffect)(()=>{if(Pn&&Fn){let In=function(Jn,ir){Fn(Jn,ir)};return Pn.on("beforeChange",In),()=>{Pn.off("beforeChange",In)}}},[Pn,Fn]),(0,at.useEffect)(()=>{if(Pn&&Qt){let In=function(){Qt(Pn.getValue())};return Pn.on("blur",In),()=>{Pn.off("blur",In)}}},[Pn,Qt]);function Jt(In,Jn){var ir=In.getDoc(),fn=ir.getCursor(),Ar=ir.getLine(fn.line),Dr=Ar.charAt(fn.ch-1),fi=Ar.lastIndexOf("@\u2581@",fn.ch),Ir=Ar.lastIndexOf("@\u2581\u2581@",fn.ch),Mi=fi>Ir?fi:Ir,Pi=fi>Ir?3:4;if(Lr.indexOf(Dr)===-1)return null;if(console.log("change1:",Jn,In,Ar,fn,Mi,fi,Ir,Dr),Mi>=0&&fn.ch-Mi<5){var Bi=Mi+Pi;return ir.replaceRange("",{line:fn.line,ch:Mi},{line:fn.line,ch:Bi}),{line:fn.line,ch:Bi}}return null}(0,at.useEffect)(()=>{if(Pn){let In=function(Jn,ir){const fn=Jn.getValue();xi(fn),pi(new Date().getTime()),Jn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),sn&&(Ut?sn(fn,mn(fn)):sn(fn))};return Pn.on("change",In),()=>{Pn.off("change",In)}}},[Pn,sn]),(0,at.useEffect)(()=>{if(Pn)if(nn==null)Pn.setValue(""),xi("");else{const In=window.scrollY||window.pageYOffset;nn!==Pn.getValue()&&(Pn.setValue(nn),xi(nn),Pn.setCursor(Un?1:Pn.lineCount(),0),window.scrollTo(0,In))}},[Pn,nn]);const pn=(0,at.useCallback)(In=>{const Jn=Pn.getCursor(),ir=Pn.getSelection();let fn=ir.split(`
`);switch(In){case"bold":return Pn.replaceSelection("**"+ir+"**"),ir===""&&Pn.setCursor(Jn.line,Jn.ch+2),Pn.focus();case"italic":return Pn.replaceSelection("*"+ir+"*"),ir===""&&Pn.setCursor(Jn.line,Jn.ch+1),Pn.focus();case"code":return Pn.replaceSelection("`"+ir+"`"),ir===""&&Pn.setCursor(Jn.line,Jn.ch+1),Pn.focus();case"inline-latex":return mi("inline-latex"),Pn.focus();case"latex":return Pn.replaceSelection("```latex\n"+ir+"\n```"),Pn.setCursor(Jn.line+1,ir.length+1),Pn.focus();case"line-break":return Pn.replaceSelection(`<br/>
`),Pn.focus();case"list-ul":return ir===""?Pn.replaceSelection("- "+ir):Pn.replaceSelection(fn.map(Ar=>Ar===""?"":`- ${Ar}`).join(`
`)),Pn.focus();case"list-ol":return ir===""?Pn.replaceSelection("1. "+ir):Pn.replaceSelection(fn.map((Ar,Dr)=>Ar===""?"":`${Dr+1}. ${Ar}`).join(`
`)),Pn.focus();case"add-null-ch":return ir===""&&Pn.setCursor(Jn.line,Jn.ch),Pn.replaceSelection(Ei),Pn.focus();case"add-signal":return ir===""&&Pn.setCursor(Jn.line,Jn.ch),Pn.replaceSelection(Ci),Pn.focus();case"add-multiple":return ir===""&&Pn.setCursor(Jn.line,Jn.ch),Pn.replaceSelection(Lr),Pn.focus();case"inster-template-1":return ir===""&&Pn.setCursor(Jn.line,Jn.ch),Pn.replaceSelection(et),Pn.focus();case"eraser":return Pn.setValue(""),Pn.focus();case"trigger-watch":return Yt(!zi),Pn.focus();case"trigger-full-screen":return Mr(!Pr),Pn.focus();case cn:mi(cn);return;case Tr:mi(Tr);return;case wn:mi(wn);return;case Nn:mi(Nn);return;case"maths-latex":mi("maths-latex");return;case xn:mi(xn);return;case qn:mi(qn);return;default:throw new Error}},[Pn,zi,Pr]),Vt=(0,at.useCallback)((In,Jn)=>{var ir,fn,Ar,Dr,fi,Ir;switch(mi(""),ar){case cn:const{title:Hi,link:qi}=In;return Pn.replaceSelection(`[${Hi}](${qi})`),Pn.focus();case Tr:const{language:Xt,content:Ni}=In;return Pn.replaceSelection(["```"+Xt,Ni,"```"].join(`
`)),Pn.focus();case"maths-latex":for(var Mi=atob(In),Pi=new Uint8Array(Mi.length),Bi=0;Bi<Mi.length;Bi++)Pi[Bi]=Mi.charCodeAt(Bi);var ki=new Blob([Pi],{type:"image/png"});(0,bt.I)(ki,_o=>{_o.id?Pn.replaceSelection(`![,](/api/attachments/${_o.id}?type=${_o.content_type})`):(_o==null?void 0:_o.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Pn.replaceSelection("`$$"+In+"$$`");break;case wn:case Nn:case Zn:const{src:gi,alt:Jr}=In,Hr=Jn,Ti=(Ar=(fn=(ir=Hr==null?void 0:Hr.name)==null?void 0:ir.split("."))==null?void 0:fn.pop)==null?void 0:Ar.call(fn);return((Dr=Hr==null?void 0:Hr.type)==null?void 0:Dr.indexOf("image"))>-1||!(Hr!=null&&Hr.type)?Hr!=null&&Hr.align||Hr!=null&&Hr.width?Pn.replaceSelection(`<p style="text-align:${Hr.align||"initial"}"><img width="${Hr.width?Hr.width+"%":"initial"}" src="${gi}" alt="${Jr||""}" /></p>`):Pn.replaceSelection(`<img width="100%" src="${gi}" alt="${Jr||""}" />`):((fi=Hr==null?void 0:Hr.type)==null?void 0:fi.indexOf("video"))>-1?Pn.replaceSelection(`<video width="100%" controls src="${gi}"></video>`):((Ir=Hr==null?void 0:Hr.type)==null?void 0:Ir.indexOf("pdf"))>-1?Pn.replaceSelection(`<a href="${gi}?type=${Hr.type}&disposition=inline" target="_blank">${Hr.name}</a>`):ai.includes(Ti)?Pn.replaceSelection(`<a href="${gi}?type=office&disposition=inline" target="_blank">${Hr.name}</a>`):Pn.replaceSelection(`[${Hr.name}](${gi})`),Pn.focus();case qn:const{row:Gi,col:_i,align:li}=In;let Ji=`
`;for(let _o=0;_o<Gi;_o++){let fa=[],bs=[];for(let wa=0;wa<_i;wa++)_o===1&&bs.push(nr[li]),fa.push(" ");_o===1&&(Ji+=`| ${bs.join(" | ")} |
`),Ji+=`| ${fa.join(_i===1?"":" | ")} |
`}return Pn.replaceSelection(Ji+`
`),Pn.focus();default:throw new Error}},[Pn,ar]),st=(0,at.useMemo)(()=>{switch(ar){case cn:return at.createElement(St,{callback:Vt,onCancel:On});case Tr:return at.createElement(wt.Z,{callback:Vt,onCancel:On});case wn:return at.createElement(bt.Z,{callback:Vt,onCancel:On});case xn:return at.createElement(Ve,{callback:Vt,onCancel:On});case qn:return at.createElement(Nt,{callback:Vt,onCancel:On});case"maths-latex":return at.createElement(Zt,{showSaveButton:!0,callback:Vt});case"inline-latex":return at.createElement(hn.Z,{showSaveButton:!0,callback:Vt});default:return null}},[ar]);function On(){mi("")}(0,at.useEffect)(()=>{if(oi.current){let In=function(fi){Ar=!0,Dr=fi.pageY},Jn=function(){Ar=!1},ir=function(fi){if(Ar){let Ir=fi.pageY-Dr;Ir<0&&(Ir=0),Ir>300&&(Ir=300);let Mi=rn+Ir+"px";ti(Mi)}},fn=oi.current,Ar=!1,Dr=0;return fn.addEventListener("mousedown",In),document.addEventListener("mousemove",ir),document.addEventListener("mouseup",Jn),()=>{fn.removeEventListener("mousedown",In),document.removeEventListener("mousemove",ir),document.removeEventListener("mouseup",Jn)}}},[Pn,oi]),(0,at.useEffect)(()=>{ti(rn)},[rn]);const Xn=Er(Ht),dr=Er(ei),ur={width:Xn,height:dr},Qn=(0,at.useMemo)(()=>{if(ii){let In=new Date(ii),Jn=In.getHours(),ir=In.getMinutes(),fn=In.getSeconds();return Jn=Jn<10?"0"+Jn:Jn,ir=ir<10?"0"+ir:ir,fn=fn<10?"0"+fn:fn,`${Jn}:${ir}:${fn}`}return 0},[ii]),mn=In=>{const Jn=[];if(Ut){let ir=-1;In=In.replace(/(@▁▁@|@▁@)/g,function(fn,Ar,Dr){Jn.push({multiLine:fn!==Ci})})}return Jn};function zn(){window.sessionStorage.removeItem(kn),on(!1),pi(0)}function Vn(){on(!1),pi(0),Pn.setValue(window.sessionStorage.getItem(kn))}(0,at.useEffect)(()=>{xr[ar]&&ar!==Nn&&ar!==xn&&setTimeout(()=>{const In=document.getElementsByClassName("markdown-popup-form")[0],Jn=window.innerWidth/2-In.offsetWidth/2,ir=window.innerHeight/2-In.offsetHeight/2;un(Jn),Kr(ir)},0)},[ar]);const Mn=In=>{In.preventDefault();const Jn=In.clientX-sr,ir=In.clientY-gr;document.body.onmousemove=fn=>{let Ar=fn.clientX-Jn,Dr=fn.clientY-ir;const fi=document.getElementsByClassName("markdown-popup-form")[0],Ir=window.innerWidth-fi.offsetWidth,Mi=window.innerHeight-fi.offsetHeight;Ar=Math.max(0,Math.min(Ar,Ir)),Dr=Math.max(0,Math.min(Dr,Mi)),Kn(fn.clientX,fn.clientY,Jn,ir)&&(un(Ar),Kr(Dr))},document.body.onmouseup=function(){document.body.onmousemove=null}},Kn=(In,Jn,ir,fn)=>{const Ar=document.body.clientHeight,Dr=document.body.clientWidth;return In<20&&ir>In||In>Dr-20&&ir<In||Jn<20&&fn>Jn||Jn>Ar-20&&fn<Jn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return at.createElement(at.Fragment,null,at.createElement("div",{className:"markdown-editor-wrapper",ref:Di},at.createElement("div",{className:`markdown-editor-container ${mr} ${zi?"on-preview":""} ${tr?"mini":""} ${Pr?"full-screen":""}`,style:ur},at.createElement(De,{insertTemp:ln,watch:zi,fullScreen:Pr,showNullButton:Ot,showNullProgramButton:Ut,onActionCallback:pn,hidetoolBar:Dn,extraUse:br}),at.createElement("div",{className:"markdown-editor-body"},at.createElement("div",{className:"codemirror-container"},at.createElement("textarea",{ref:Yr,placeholder:$n})),zi?at.createElement("div",{ref:Zr,className:"preview-container"},vn==="stex"&&at.createElement(me,{value:si}),vn!=="stex"&&at.createElement(je.Z,{disabledFill:Rn,showProgramFill:Ut,value:si})):null))),Rr?at.createElement("a",{ref:oi,className:"editor-resize"}):null,ar===Nn&&at.createElement(dt,{callback:Vt,onCancel:On}),ar===xn&&at.createElement(Ve,{callback:Vt,onCancel:On}),at.createElement(Fe.Z,null,xr[ar]&&ar!==Nn&&ar!==xn?at.createElement(ct.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:sr,top:gr},title:at.createElement("div",{style:{cursor:"move"},onMouseDown:Mn},xr[ar]),open:!0,onCancel:On,footer:null,destroyOnClose:!0,width:ar===xn?"1200px":null,height:ar===xn?"80vh":null,className:"markdown-popup-form"},st):null))}},17077:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return Ae},I:function(){return Fe}});var at=ft(28284),Gt=ft(6767),oe=ft(37568),Ue=ft(77736),Ie=ft(71051),de=ft(47889),ve=ft(99571),Ee=ft(46699),ke=ft(59301),Se=ft(59301),je=Object.defineProperty,me=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,se=(Te,Ne,Be)=>Ne in Te?je(Te,Ne,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Te[Ne]=Be,ie=(Te,Ne)=>{for(var Be in Ne||(Ne={}))z.call(Ne,Be)&&se(Te,Be,Ne[Be]);if(fe)for(var Be of fe(Ne))te.call(Ne,Be)&&se(Te,Be,Ne[Be]);return Te},le=(Te,Ne)=>me(Te,Pe(Ne));const{useForm:ce}=at.default,pe={width:280,marginRight:10},xe={labelCol:{span:5},wrapperCol:{span:19}};var Ae=({callback:Te,onCancel:Ne})=>{const[Be]=ce();let Ge=(0,ke.useRef)();function Ye(ot){Ge.current.width=Be.getFieldValue("width"),Ge.current.align=Be.getFieldValue("align"),Te(ot,Ge.current)}function Ke(ot,lt){if(ot.status===-1){Gt.ZP.error(ot.message);return}Be.setFieldsValue({src:`/api/attachments/${ot.id}`,type:lt.type})}function Xe(ot){let lt=ot.target.files[0];Ge.current=lt,Fe(lt,Ke)}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:Xe}))),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(Ue.Z,null,Se.createElement(at.default.Item,{name:"width",style:{margin:0}},Se.createElement(Ie.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:Ne},"\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,Ne){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 Ge=new window.XMLHttpRequest;Ge.withCredentials=!0,Ge.addEventListener("load",function(Ye){Ne(JSON.parse(Ye.target.responseText),Te)},!1),Ge.addEventListener("error",function(Ye){console.error(Ye)},!1),Ge.open("POST",`${Ee.KI}/api/attachments.json`),Ge.send(Be)}},91558:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return oe}});var at=ft(59301),Gt=ft(4676);class oe extends at.Component{constructor(Ie){super(Ie);const de=window.document;this.node=de.createElement("div"),de.body.appendChild(this.node)}render(){const{children:Ie}=this.props;return(0,Gt.createPortal)(Ie,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},75975:function(Gn,jn,ft){"use strict";ft.d(jn,{SV:function(){return mt},ZP:function(){return dt}});var at=ft(59301),Gt=ft(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"]},Ue={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"]},Ie={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=ft(53184),ke=ft.n(Ee),Se=(Et,gt,$e)=>new Promise((He,we)=>{var Le=Re=>{try{tt($e.next(Re))}catch(_e){we(_e)}},We=Re=>{try{tt($e.throw(Re))}catch(_e){we(_e)}},tt=Re=>Re.done?He(Re.value):Promise.resolve(Re.value).then(Le,We);tt(($e=$e.apply(Et,gt)).next())});const je={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"]}},me=(Et,gt,$e,He)=>{const we=gt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:$e.lineNumber,endColumn:$e.column});return Array.from(new Set(we.match(/\b\w{2,}\b/g)||[])).map(We=>({label:We,kind:Et.languages.CompletionItemKind.Text,insertText:We,range:He}))},Pe=(Et,gt,$e,He)=>{Et.languages.registerCompletionItemProvider(gt,{provideCompletionItems(we,Le){const We=we.getWordUntilPosition(Le),tt={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:We.startColumn,endColumn:We.endColumn},Re=we.getLineContent(Le.lineNumber).substring(We.startColumn-2,We.endColumn);return{suggestions:[...me(Et,we,Le,tt),...$e.map(Ve=>({label:Ve,kind:Et.languages.CompletionItemKind.Keyword,documentation:Ve,insertText:Ve,insertTextRules:Et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tt})),...He.map(Ve=>({label:Ve.label,kind:Et.languages.CompletionItemKind.Snippet,documentation:Ve.content,insertText:Re.startsWith("#")?Ve.content.replace(/#/,""):Ve.content,insertTextRules:Et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tt}))]}}})};var fe=Et=>{je.languages.forEach(gt=>{Et.languages.registerDocumentFormattingEditProvider(gt,{provideDocumentFormattingEdits($e){return Se(this,null,function*(){const He=ke()($e.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:$e.getFullModelRange(),text:He}]})}})}),Pe(Et,"java",Ue.keywords,Ue.quickKey),Pe(Et,"cpp",Ie.keywords,Ie.quickKey),Pe(Et,"c",oe.keywords,[]),Pe(Et,"python",de.keywords,de.quickKey),Pe(Et,"scala",ve.keywords,ve.quickKey)};const z="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var te=Object.defineProperty,se=(Et,gt,$e)=>gt in Et?te(Et,gt,{enumerable:!0,configurable:!0,writable:!0,value:$e}):Et[gt]=$e,ie=(Et,gt,$e)=>se(Et,typeof gt!="symbol"?gt+"":gt,$e);const le=class mx{constructor(gt,$e,He){this.placeholder=gt,this.editor=$e,this.monaco=He,$e.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)}};ie(le,"ID","editor.widget.placeholderHint");var pe=le,xe=ft(96236),Ae=ft(6767),De=ft(25399),Fe=ft(89392),Te=ft(49535),Ne=ft(56102),Be=Object.defineProperty,Ge=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,lt=(Et,gt,$e)=>gt in Et?Be(Et,gt,{enumerable:!0,configurable:!0,writable:!0,value:$e}):Et[gt]=$e,ut=(Et,gt)=>{for(var $e in gt||(gt={}))Xe.call(gt,$e)&&lt(Et,$e,gt[$e]);if(Ke)for(var $e of Ke(gt))ot.call(gt,$e)&&lt(Et,$e,gt[$e]);return Et},Ct=(Et,gt)=>Ge(Et,Ye(gt)),Je=(Et,gt)=>{var $e={};for(var He in Et)Xe.call(Et,He)&&gt.indexOf(He)<0&&($e[He]=Et[He]);if(Et!=null&&Ke)for(var He of Ke(Et))gt.indexOf(He)<0&&ot.call(Et,He)&&($e[He]=Et[He]);return $e},nt=(Et,gt,$e)=>new Promise((He,we)=>{var Le=Re=>{try{tt($e.next(Re))}catch(_e){we(_e)}},We=Re=>{try{tt($e.throw(Re))}catch(_e){we(_e)}},tt=Re=>Re.done?He(Re.value):Promise.resolve(Re.value).then(Le,We);tt(($e=$e.apply(Et,gt)).next())});function St(Et){return/^\d+$/.test(Et)?`${Et}px`:Et}function wt(){}let bt=!1;const ct={"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 vt(Et=[]){let gt=Et;if(Array.isArray(Et)){for(let $e=0;$e<Et.length;$e++){let He=ct[Et[$e]];if(He)return He}return gt[0]}return ct[gt]||gt}let ht=null;const Lt=()=>nt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Et){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Et)}});var dt=Et=>{var gt=Et,{width:$e="100%",height:He="100%",value:we,language:Le="javascript",style:We={},options:tt={},overrideServices:Re={},theme:_e="vs-dark",onEditBlur:Ve,isCopy:it=!1,onSave:yt,autoHeight:Pt=!1,forbidCopy:jt=!1,onChange:Nt=wt,editorDidMount:Bt=wt,onFocus:$t=wt,onBreakPoint:en=wt,breakPointValue:qt=[],filename:Zt="educoder.txt",errorLine:hn,errorContent:an="",highlightLine:cn,openBreakPoint:wn=!1,placeholder:xn="",showMiniMap:Nn=!0}=gt,Zn=Je(gt,["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 Tr=(0,at.useRef)(),qn=(0,at.useRef)({}),qr=(0,at.useRef)(),nr=(0,at.useRef)(),$r=(0,at.useRef)([]),hi=(0,at.useRef)(!1),Si=(0,at.useRef)(),Li=(0,at.useRef)(),Ei=(0,at.useRef)(!1),[Lr,Ci]=(0,at.useState)(!1);function et(){let ln;return Tr.current&&(ln=new Gt.Z(vn=>{for(let kn of vn)(kn.target.offsetHeight>0||kn.target.offsetWidth>0)&&qn.current.instance.layout()}),ln.observe(Tr.current)),ln}function ai(){Ae.ZP.warning({content:decodeURIComponent(z),key:"monaco-editor-tip"})}const Er=()=>{let ln=qn.current.instance;if(we!=null&&ln&&Lr){const vn=ln.getModel();vn&&we!==vn.getValue()&&(bt=!0,vn.setValue(we),ln.layout(),bt=!1)}};(0,at.useEffect)(()=>{const ln=Te.Z.subscribe("formatDocument",vn=>{var kn;let Rr=qn.current.instance;(kn=Rr==null?void 0:Rr.getAction)==null||kn.call(Rr,"editor.action.formatDocument").run()});return window.updateMonacoValue=vn=>{Nt(vn)},ln},[]),(0,at.useEffect)(()=>{var ln;let vn=qn.current.instance;nr.current&&clearTimeout(nr.current),nr.current=setTimeout(()=>{Er()},500),we&&(we!=null&&we.length)&&((ln=vn==null?void 0:vn.updateOptions)==null||ln.call(vn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(we.split(/\r\n|\r|\n/g).length))+3,5)}))},[we,Lr,qn.current]),(0,at.useEffect)(()=>{if(hn&&qn.current&&qn.current.instance){let vn=qn.current.instance;vn.changeViewZones(function(kn){var Rr=document.createElement("div");Rr.style.padding="10px 20px",Rr.style.width="calc(100% - 20px)",Rr.className="my-error-line-wrp",Rr.innerHTML=an,kn.addZone({afterLineNumber:hn||11,heightInLines:3,domNode:Rr})});var ln={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}};vn.addOverlayWidget(ln),vn.revealPositionInCenter({lineNumber:20,column:1})}},[hn,qn.current,Lr]);const Ln=(ln="",vn)=>{if(!ln||ln.trim()==="")return!0;const Rr=qn.current.instance.getModel().getLineTokens(vn);let Hn=!1;for(let Ot=0;Ot<2;Ot++)Rr.getStandardTokenType(Ot)===1&&(Hn=!0);return Hn};(0,at.useEffect)(()=>{var ln;const vn=(ln=qn.current)==null?void 0:ln.instance;if(vn&&Lr&&jt){const kn=vn.onDidBlurEditorWidget(()=>{Ei.current=!1}),Rr=vn.onDidFocusEditorText(()=>{Ei.current=!0});return()=>{kn.dispose(),Rr.dispose()}}},[qn.current,Lr,jt]),(0,at.useEffect)(()=>{var ln;if((ln=qn.current)!=null&&ln.instance&&Lr&&wn){let vn=qn.current.instance,kn=vn.getModel();if(!kn)return;(()=>{var Un;let Rn=[],$n=[];const Fr=kn.getAllDecorations();for(let Pn of Fr)Pn.options.className==="highlighted-line"&&(Rn.push((Un=Pn==null?void 0:Pn.range)==null?void 0:Un.startLineNumber),$n.push(Pn==null?void 0:Pn.id));if(cn===Rn[0])return;kn.deltaDecorations($n,[]);const br=kn.getLineCount();cn&&cn<=br&&(vn.deltaDecorations([],[{range:new ht.Range(cn,1,cn,kn.getLineMaxColumn(cn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),vn.revealLineInCenter(cn))})();const Hn=(Un=!1)=>{var Rn;let $n=[],Fr=[];const br=kn.getAllDecorations();for(let Pn of br)Pn.options.linesDecorationsClassName==="breakpoints-select"&&($n.push((Rn=Pn==null?void 0:Pn.range)==null?void 0:Rn.startLineNumber),Fr.push(Pn==null?void 0:Pn.id));if(Un)return{lines:$n,ids:Fr};en($n)},Ot=Un=>nt(void 0,null,function*(){let Rn={range:new ht.Range(Un,1,Un,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield kn.deltaDecorations([],[Rn]),Hn()}),Ut=Un=>nt(void 0,null,function*(){let Rn=[];const $n=vn.getLineDecorations(Un);for(let Fr of $n)Fr.options.linesDecorationsClassName==="breakpoints-select"&&Rn.push(Fr.id);yield kn.deltaDecorations(Rn,[]),Hn()}),Dn=Un=>{let Rn=vn.getLineDecorations(Un);for(let $n of Rn)if($n.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Fe.isEqual)(qt,Hn(!0).lines)){kn.deltaDecorations(Hn(!0).ids,[]);const Un=qt.map(Rn=>({range:new ht.Range(Rn,1,Rn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));kn.deltaDecorations([],Un)}const Tn=vn.onDidChangeModelContent(Un=>{let Rn=vn.getPosition();if(Rn){let $n=Rn.lineNumber;clearTimeout(Li.current),Li.current=setTimeout(()=>{Ln(kn.getLineContent($n),$n)?Ut($n):Dn($n)?(Ut($n),Ot($n)):Hn()},100)}}),Qt=vn.onMouseDown(Un=>{var Rn,$n,Fr;if(Un.target.detail&&((Fr=($n=(Rn=Un.target)==null?void 0:Rn.element)==null?void 0:$n.className)!=null&&Fr.includes("line-numbers"))){let br=Un.target.position.lineNumber;if(Ln(kn.getLineContent(br),br))return;Dn(br)?Ut(br):Ot(br)}}),Fn=Un=>{let Rn={range:new ht.Range(Un,1,Un,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};$r.current=vn.deltaDecorations($r.current,[Rn])},vr=()=>{$r.current=vn.deltaDecorations($r.current,[])},mr=vn.onMouseMove(Un=>{var Rn,$n,Fr;if(vr(),Un.target.detail&&((Fr=($n=(Rn=Un.target)==null?void 0:Rn.element)==null?void 0:$n.className)!=null&&Fr.includes("line-numbers"))){let br=Un.target.position.lineNumber;if(Ln(kn.getLineContent(br),br))return;Fn(br)}}),er=vn.onMouseLeave(()=>{vr()});return()=>{Tn.dispose(),Qt.dispose(),mr.dispose(),er.dispose()}}},[qn.current,Lr,qt,cn,wn,Le]),(0,at.useEffect)(()=>{var ln;(ln=qn.current)!=null&&ln.instance&&wn&&qn.current.instance.setPosition({lineNumber:0,column:0})},[cn]);function An(){let ln=qn.current.instance;if(ln){const vn=ln.getSelection(),kn=qn.current.pastePos||{},Rr=new ht.Range(kn.startLineNumber||vn.endLineNumber,kn.startColumn||vn.endColumn,kn.endLineNumber||vn.endLineNumber,kn.endColumn||vn.endColumn);setTimeout(()=>{ln.executeEdits("",[{range:Rr,text:""}])},300)}}function Bn(ln){(window.navigator.platform.match("Mac")?ln.metaKey:ln.ctrlKey)&&ln.keyCode==83&&(ln.preventDefault(),yt())}const xr=()=>{if(Pt&&qn.current.instance){const ln=qn.current.instance.getContentHeight();cr(ln<He?He:ln)}else cr(He)};function zr(ln){var vn=document.createEvent("MouseEvents");vn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ln.dispatchEvent(vn)}const nn=ln=>{if(!Ei.current)return;const{keyCode:vn,ctrlKey:kn,metaKey:Rr,target:Hn,type:Ot}=ln;return(Ot==="paste"||(vn===67||vn===86)&&(Rr||kn))&&Hn.nodeName==="TEXTAREA"&&(ai(),ln.preventDefault()),!1};function sn(ln,vn){var kn=window.URL||window.webkitURL||window,Rr=new Blob([vn]),Hn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Hn.href=kn.createObjectURL(Rr),Hn.download=ln,zr(Hn)}(0,at.useEffect)(()=>{xr()},[xr]),(0,at.useEffect)(()=>{Tr.current&&!Lr&&Promise.all([ft.e(8909),ft.e(6656)]).then(ft.bind(ft,71448)).then(ln=>{try{ht=ln,qn.current.instance=ht.editor.create(Tr.current,{value:we,language:vt(Le),theme:_e,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Nn||!1}},Re);const vn=qn.current.instance;let Hn=[...xe.BH._menuItems].find(Tn=>Tn[0]._debugName=="EditorContext")[1],Ot=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ut=(Tn,Qt)=>{var Fn,vr;let mr=Tn._first;do Qt.includes((vr=(Fn=mr.element)==null?void 0:Fn.command)==null?void 0:vr.id)&&Tn._remove(mr);while(mr=mr.next)};if(Bt(vn,ht),setTimeout(()=>{xr(),qn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{sn(Zt||"educoder.txt",vn.getValue())}})},500),qn.current.subscription=vn.onDidChangeModelContent(Tn=>{hi.current?clearTimeout(Si.current):(xr(),Nt(vn.getValue(),Tn)),Si.current=setTimeout(()=>{hi.current=!1},500)}),window.Monaco||fe(ht,vt(Le)),jt&&(Ut(Hn,Ot),Tr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",nn),window.removeEventListener("paste",nn),window.addEventListener("keydown",nn),window.addEventListener("paste",nn)),window.Monaco=ht,Ve&&vn.onDidBlurEditorWidget(()=>{Ve(vn.getValue())}),$t&&vn.onDidFocusEditorText(()=>{jt&&Lt(),$t(vn.getValue())}),jt){Lt();try{vn.onDidPaste(Tn=>{const Qt=vn.getSelection(),Fn=qn.current.pastePos||{},vr=new ht.Range(Fn.startLineNumber||Qt.endLineNumber,Fn.startColumn||Qt.endColumn,Fn.endLineNumber||Qt.endLineNumber,Fn.endColumn||Qt.endColumn);vn.executeEdits("",[{range:Tn.range,text:""}])})}catch(Tn){}}let Dn=et();return xn&&typeof xn=="string"&&new pe(xn,vn,ht),Ci(!0),()=>{const Tn=qn.current.instance;Tn.dispose();const Qt=Tn.getModel();Qt&&Qt.dispose(),qn.current.subscription&&qn.current.subscription.dispose(),Dn.unobserve(Tr.current)}}catch(vn){}})},[]),(0,at.useEffect)(()=>{if(qn.current.instance&&Lr)return document.addEventListener("keydown",Bn,!1),()=>{document.removeEventListener("keydown",Bn)}},[yt,Lr]),(0,at.useEffect)(()=>{let ln=qn.current.instance;if(ln&&Lr){let vn=vt(Le);ht.editor.setModelLanguage(ln.getModel(),vn)}},[Le,Lr]),(0,at.useEffect)(()=>{qn.current.instance&&Lr&&ht.editor.setTheme(_e)},[_e,Lr]),(0,at.useEffect)(()=>{let ln=qn.current.instance;qr.current=tt,ln&&Lr&&(ln.updateOptions(ut({},tt)),setTimeout(()=>{ln.getModel().updateOptions(ut({},tt))},200))},[JSON.stringify(tt),Lr]),(0,at.useEffect)(()=>{let ln=qn.current.instance;ln&&Lr&&ln.layout()},[$e,He,Lr]);const[Ht,rn]=(0,at.useState)(St($e)),[tr,cr]=(0,at.useState)(St(He)),Nr=Ct(ut({},We),{width:Ht,height:tr,position:"relative"});return at.createElement("div",{className:"my-monaco-editor",ref:Tr,style:Nr},it&&at.createElement(Ne.CopyToClipboard,{text:we,onCopy:()=>Ae.ZP.success("\u590D\u5236\u6210\u529F")},at.createElement(De.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 mt({width:Et="100%",height:gt="100%",original:$e,modified:He,language:we,options:Le={}}){const We=(0,at.useRef)(),[tt,Re]=(0,at.useState)(null);function _e(Pt){let jt;return We.current&&(jt=new Gt.Z(Nt=>{for(let Bt of Nt)(Bt.target.offsetHeight>0||Bt.target.offsetWidth>0)&&Pt.layout()}),jt.observe(We.current)),jt}(0,at.useEffect)(()=>(We.current&&Promise.all([ft.e(8909),ft.e(9404)]).then(ft.bind(ft,2550)).then(Pt=>{ht=Pt;const jt=ht.editor.createDiffEditor(We.current,Ct(ut({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},Le),{wordWrap:!0}));Re(jt);let Nt=_e(jt);return()=>{jt.dispose();const Bt=jt.getModel();Bt&&Bt.dispose(),Nt.unobserve(We.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,at.useEffect)(()=>{tt&&tt.setModel({original:ht.editor.createModel($e,we),modified:ht.editor.createModel(He,we)})},[$e,He,we,tt]);const Ve=St(Et),it=St(gt),yt={width:Ve,height:it};return at.createElement("div",{className:"my-diff-editor",ref:We,style:yt})}},10661:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return me}});var at={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",wrapisCurrent:"wrapisCurrent___qIfQT"},Gt=ft(29787),oe=ft(25399),Ue=ft(60242),Ie=ft(92310),de=ft.n(Ie),ve=ft(51257),Ee=ft(28426),ke=ft(48790),Se=ft(59301),me=({className:Pe,dataSource:fe=[],col:z=4,right:te,bottom:se=23,precision:ie=0,wrapWidth:le=1200,trackEventItems:ce,loading:pe,onRemove:xe=()=>{},isCurrent:Ae=!0,showProgress:De=!1,showAlias:Fe=!1})=>{const Te=Math.floor((le-(z-1)*te)/z),Ne=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return Se.createElement(Gt.Z,{spinning:pe},Se.createElement("div",{className:de()(at.list,Pe)},!!(fe!=null&&fe.length)&&(fe==null?void 0:fe.map((Be,Ge)=>{var Ye,Ke,Xe,ot,lt,ut;const{name:Ct,id:Je,identifier:nt,featured:St,school_name:wt,image_url:bt,excellent:ct,is_plan:vt}=Be;return Se.createElement("div",{key:Je,className:Ae&&De?at.wrapisCurrent:at.wrap,style:{width:Te,marginRight:(1+Ge)%z===0?0:te+ie,marginBottom:se}},Se.createElement("a",{className:at.li,onClick:ht=>{ht.preventDefault(),ht.stopPropagation(),ce&&(0,ve.L9)([ce]),(0,ve.xg)(`/paths/${nt}`)}},Se.createElement("div",{className:at.img},Se.createElement("img",{className:at.cover,src:`${bt}`}),Ae&&(0,ke.bg)()&&(Be==null?void 0:Be.studying)&&Se.createElement("div",{className:`${at.movebq} user-path-items`,onClick:ht=>{ht.stopPropagation(),xe(Be)}},Se.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Se.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Ye=Be==null?void 0:Be.subject_tags)==null?void 0:Ye.map((ht,Lt)=>{var dt,mt;if(Lt===0){const gt=(dt=Ne.find($e=>$e.name==ht))==null?void 0:dt.swimg;return Se.createElement("img",{className:at.sign,src:gt,style:{left:"-4px"}})}const Et=(mt=Ne.find(gt=>gt.name==ht))==null?void 0:mt.ptimg;return Se.createElement("img",{className:at.sign,src:Et,style:{left:`${48+52*(Lt-1)+2*Lt}px`}})}),Se.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Be==null?void 0:Be.excellent)&&Se.createElement("div",{className:at.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Se.createElement("div",{className:at.name},Se.createElement(oe.Z,{title:Fe&&(Be!=null&&Be.excellent_alias_name)?Se.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Ct}`,Se.createElement("br",null),Se.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Be==null?void 0:Be.excellent_alias_name}`)):Ct},Se.createElement("span",{className:at.e},Fe&&(Be==null?void 0:Be.excellent_alias_name)||Ct))),Ae&&De&&((Ke=Be==null?void 0:Be.progress)==null?void 0:Ke.all_score)!=0&&Se.createElement("div",{style:{padding:"0px 10px",color:"#333",marginTop:10}},Se.createElement(Ue.Z,{strokeColor:"#44d7b6",gap:"small",percent:(((Xe=Be==null?void 0:Be.progress)==null?void 0:Xe.my_score)/((ot=Be==null?void 0:Be.progress)==null?void 0:ot.all_score)*100).toFixed(),showInfo:!1}),"\u5DF2\u5B8C\u6210 ",(lt=Be==null?void 0:Be.progress)==null?void 0:lt.my_score,"/",(ut=Be==null?void 0:Be.progress)==null?void 0:ut.all_score),(!Ae||!De)&&Se.createElement(oe.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${wt}`},Se.createElement("div",{className:at.unit},Se.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),wt)),(!Ae||!De)&&Se.createElement("div",{className:at.tags},Se.createElement("div",null,Se.createElement(oe.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Se.createElement("span",null,Se.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Se.createElement("span",null,Be.stages_count))),Se.createElement(oe.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Se.createElement("span",null,Se.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Se.createElement("span",null,Be.members_count)))))))})),!fe.length&&Se.createElement(Ee.Z,null)))}},9148:function(Gn,jn,ft){"use strict";ft.d(jn,{jL:function(){return Ie},w9:function(){return St},QD:function(){return hn},cQ:function(){return lt.Z},op:function(){return Nt},O5:function(){return Er},_b:function(){return Zn},t7:function(){return ie},Gi:function(){return Lt},YG:function(){return vt},qp:function(){return je},vr:function(){return wn},qE:function(){return en},Je:function(){return pe},wb:function(){return ot},cq:function(){return He},tp:function(){return fe}});var at=ft(59301),Gt={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==",Ie=({dataSource:Ln=[],img:An,imgWidth:Bn=346,title:xr,sunTitle:zr,bannerExtraContent:nn})=>at.createElement("div",{className:Gt.banner},at.createElement("div",{className:Gt.content},at.createElement("aside",null,at.createElement("p",null,at.createElement("b",null,xr),at.createElement("span",null,zr)),Ln.length>0&&at.createElement("div",{className:Gt.btns},Ln.map((sn,Ht)=>at.createElement("div",{key:Ht,onClick:sn.click},sn.name,sn.sign?at.createElement("img",{src:oe,width:39}):null))),nn),An&&at.createElement("img",{style:{marginTop:33,marginRight:38},src:An,width:Bn}))),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=ft(92310),Ee=ft.n(ve),ke=ft(89392),je=({dataSource:Ln=[],value:An,onChange:Bn,onTitleChange:xr,className:zr,title:nn,titleWidth:sn=41,style:Ht={},fontColor:rn="#6A7283",showCount:tr})=>{const[cr,Nr]=(0,at.useState)(0),[ln,vn]=(0,at.useState)(!1),kn=(0,at.useRef)(null),Rr=(0,at.useRef)(null);return(0,at.useEffect)(()=>{var Hn;Ln.length!==0&&(((Hn=kn==null?void 0:kn.current)==null?void 0:Hn.clientHeight)>97?Nr(1):Nr(0)),Ln.length===0&&Nr(0),vn(!1)},[Ln]),at.createElement("div",{className:Ee()(de.row,zr),style:Ht},at.createElement("div",{onClick:(0,ke.throttle)(()=>xr==null?void 0:xr(),2e3),style:{width:sn,marginTop:ln?12:4},className:`${de.title} ${xr?"current":""}`},nn),at.createElement("div",{className:ln?`${de.tagsWrap} ${de.tagsBorderWrap}`:de.tagsWrap},at.createElement("div",{className:de.bar,ref:Rr,style:cr>0?{height:cr===1?97:"auto",overflow:cr===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},at.createElement("div",{className:de.tag,ref:kn},Ln==null?void 0:Ln.map(Hn=>at.createElement("span",{onClick:()=>Bn(Hn.id),key:Hn.id,style:{color:rn},className:An===Hn.id?de.active:""},at.createElement("span",{title:Hn.name,className:de.name},Hn.name),!!tr&&at.createElement("span",{className:de.num},Hn.count))))),!!cr&&at.createElement(at.Fragment,null,cr===1?at.createElement("div",{onClick:()=>{var Hn;Nr(2),((Hn=kn==null?void 0:kn.current)==null?void 0:Hn.clientHeight)>245?vn(!0):vn(!1)},className:de.action},"\u5C55\u5F00",at.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):at.createElement("div",{onClick:()=>{Rr.current.scrollTop=0,Nr(1),vn(!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:Ln=[],value:An,onChange:Bn,className:xr,style:zr={}})=>at.createElement("div",{style:zr,className:Ee()(me.tabs,xr)},Ln.map(nn=>at.createElement("span",{onClick:()=>Bn(nn.id),className:An===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=ft(37568),ie=({dataSource:Ln=[],value:An="",onChange:Bn,onInputChange:xr=()=>{},className:zr,style:nn={},placeholder:sn,allowClear:Ht=!1})=>{var rn;const[tr,cr]=(0,at.useState)(""),[Nr,ln]=(0,at.useState)("");(0,at.useEffect)(()=>{var Rr;let Hn=An;(Rr=JSON.stringify(An))!=null&&Rr.includes("{")&&(cr(An.id),Hn=An.value||"");try{ln(decodeURIComponent(Hn||""))}catch(Ot){ln(decodeURIComponent(Hn||""))}},[An]);const vn=()=>{Bn(encodeURIComponent(Nr),tr||null)},kn=Rr=>{Rr!==tr&&(cr(Rr),Bn(encodeURIComponent(Nr),Rr))};return at.createElement("div",{className:Ee()(z.input,zr),style:nn},!!Ln.length&&at.createElement("div",{className:z.dropdown},at.createElement("div",{className:z.text},(rn=Ln.find(Rr=>Rr.id===tr))==null?void 0:rn.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},Ln.map((Rr,Hn)=>at.createElement("div",{key:Hn,onClick:()=>kn(Rr.id)},Rr.name)))),at.createElement(te.default,{onPressEnter:vn,value:Nr,onChange:Rr=>{ln(Rr.target.value),xr(encodeURIComponent(Rr.target.value),tr||null)},bordered:!1,placeholder:sn}),at.createElement("i",{onClick:vn,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:Ln,onChange:An,className:Bn,total:xr,pageSize:zr,style:nn={}})=>{const sn=Ln<2,Ht=Ln>=Math.ceil(xr/zr);return xr<=zr?at.createElement(at.Fragment,null):at.createElement("div",{className:Ee()(le.quickPager,Bn),style:nn},at.createElement("div",{onClick:()=>{sn||An(Ln-1,"prev")},className:sn?le.disabled:""},"\u4E0A\u4E00\u9875"),at.createElement("div",{onClick:()=>{Ht||An(Ln+1,"next")},className:Ht?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"},Ae=ft(29787),De=ft(25399),Fe=ft(58018),Te=ft(346),Ne=ft(51257),Be=ft(96908),Ge=ft(57177),Ye=ft(81378),Ke=ft(28426),ot=({className:Ln,dataSource:An=[],col:Bn=4,right:xr,bottom:zr=23,precision:nn=0,wrapWidth:sn=1200,trackEventItems:Ht,loading:rn})=>{const tr=Math.floor((sn-(Bn-1)*xr)/Bn);return at.createElement(Ae.Z,{spinning:rn},at.createElement("div",{className:Ee()(xe.list,Ln)},!!An.length&&An.map((cr,Nr)=>{const{name:ln,id:vn,identifier:kn,power:Rr,cover_image_id:Hn,pic:Ot}=cr;return at.createElement("div",{className:xe.wrap,key:vn,style:{width:tr,marginRight:(1+Nr)%Bn===0?0:xr+nn,marginBottom:zr}},at.createElement("a",{target:"_blank",href:`/shixuns/${kn}/challenges`,className:xe.li,onClick:Ut=>{Ut.preventDefault(),Ht&&(0,Ne.L9)([Ht]),Rr&&(0,Ne.xg)(`/shixuns/${kn}/challenges`)}},at.createElement("div",{className:xe.img},at.createElement("img",{className:xe.cover,src:`${Ot}`}),cr.is_jupyter&&at.createElement("img",{className:xe.sign,src:Be}),cr.is_jupyter_lab&&at.createElement("img",{className:xe.sign,src:Ge}),cr.is_unity_3d&&at.createElement("img",{className:xe.sign,src:Ye})),at.createElement("div",{className:xe.name},at.createElement(De.Z,{title:ln||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},at.createElement("span",{className:xe.e},ln||"\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,cr.challenges_count))),!!cr.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,cr.myshixuns_count))),at.createElement(De.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},at.createElement("span",null,at.createElement("span",null,cr.level))),at.createElement("div",{className:xe.rate},at.createElement(Fe.Z,{allowHalf:!0,disabled:!0,defaultValue:cr.score_info}),at.createElement("span",null,"\xA0",cr.score_info?`${cr.score_info}\u5206`:"5\u5206")))),!Rr&&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")))}),!An.length&&at.createElement(Ke.Z,null)))},lt=ft(10661),ut={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",Je=ft(59301),St=({className:Ln,dataSource:An=[],col:Bn=4,right:xr,bottom:zr=23,precision:nn=0,wrapWidth:sn=1200,trackEventItems:Ht,loading:rn,handleVery:tr=()=>!0})=>{const cr=Math.floor((sn-(Bn-1)*xr)/Bn);return Je.createElement(Ae.Z,{spinning:rn},Je.createElement("div",{className:Ee()(ut.list,Ln)},!!An.length&&An.map((Nr,ln)=>{const{subject_identifier:vn,id:kn,identifier:Rr,power:Hn}=Nr,Ot=Nr.is_public!=0&&Nr.is_public;return Je.createElement("div",{className:ut.wrap,key:kn,style:{width:cr,marginRight:(1+ln)%Bn===0?0:xr+nn,marginBottom:zr}},Je.createElement("a",{className:ut.li,onClick:Ut=>{Ut.preventDefault(),tr(Nr==null?void 0:Nr.first_category_url)&&(Ht&&(0,Ne.L9)([Ht]),(0,Ne.xg)(Nr.first_category_url))}},Je.createElement("div",{className:ut.top},Je.createElement(De.Z,{title:Nr.name},Je.createElement("div",{className:ut.name},Nr.name)),Je.createElement("img",{className:ut.img,src:Te.Z.IMG_SERVER+"/images/"+Nr.avatar_url}),Je.createElement("div",{className:ut.text,title:Nr.creator},Nr.creator),vn&&Je.createElement("div",{className:ut.btns},Je.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Je.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Ot&&Je.createElement("div",{className:ut.sign},"\u516C\u5F00")),Je.createElement("div",{className:ut.bottom},Nr.visits>0&&Je.createElement(De.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Je.createElement("span",null,Je.createElement("i",{className:"iconfont icon-liulanyan"}),Je.createElement("span",null,Nr.visits))),Nr.course_members_count>0&&Je.createElement(De.Z,{title:"\u6210\u5458",placement:"bottom"},Je.createElement("span",null,Je.createElement("i",{className:"iconfont icon-chengyuan"}),Nr.course_members_count)),Nr.tasks_count>0&&Je.createElement(De.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Je.createElement("span",null,Je.createElement("i",{className:"iconfont icon-zuoye"}),Nr.tasks_count)),Nr.is_end?Je.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Je.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Nr.is_accessible&&Je.createElement("div",{className:ut.lockWrap},Je.createElement("img",{src:`${Te.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Je.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!An.length&&Je.createElement(Ke.Z,null)))},wt={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"},bt=ft(25690),vt=({dataSource:Ln=[],value:An,onChange:Bn,className:xr,style:zr={},tabBarExtraContent:nn})=>at.createElement("div",{className:Ee()(wt.tabs,xr),style:zr},at.createElement("div",{className:wt.tabsWrap},Ln.map((sn,Ht)=>!(sn!=null&&sn.hide)&&at.createElement("aside",{className:wt.tab,onClick:()=>{Bn(sn.id),sn.link&&bt.history.push(sn.link)},key:Ht},at.createElement("div",{className:An===sn.id?wt.active:""},sn.name),(sn==null?void 0:sn.resetCount)==null&&(sn==null?void 0:sn.total)!==void 0&&at.createElement("span",null,"\uFF08",sn==null?void 0:sn.total,"\uFF09"),(sn==null?void 0:sn.resetCount)!==void 0&&(sn==null?void 0:sn.total)!==void 0&&at.createElement(De.Z,{title:(sn==null?void 0:sn.tip)!=null?sn==null?void 0:sn.tip:""},at.createElement("span",{style:{color:"#9096A3"}},"\uFF08",at.createElement("span",{style:{color:"#000"}},sn==null?void 0:sn.resetCount),"/",at.createElement("span",null,sn==null?void 0:sn.total),"\uFF09"))))),at.createElement("div",{className:wt.tabBar},nn)),Lt=({className:Ln,style:An={},children:Bn})=>at.createElement("div",{className:Ee()(Ln),style:An},Bn),dt={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"},mt=ft(75727),Et=ft(93041);const gt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var He=({sortValue:Ln,dropValue:An,className:Bn,onSort:xr,onDrop:zr,dataSource:nn=gt})=>{var sn;return at.createElement("div",{className:Ee()(dt.orderWrap,Bn)},at.createElement(mt.Z,{dropdownRender:()=>at.createElement(Et.default,null,nn.map((Ht,rn)=>at.createElement(Et.default.Item,{key:rn,onClick:()=>zr(Ht.id)},Ht.name)))},at.createElement("span",{className:dt.orderTextWrap},(sn=nn.find(Ht=>An===Ht.id))==null?void 0:sn.name)),at.createElement("span",{className:dt.orderIconWrap},at.createElement("span",{className:dt.orderAsc},at.createElement("i",{className:Ln==="asc"?`iconfont icon-sanjiaoxing-up font12 ${dt.cursorPointer} ${dt.active}`:`iconfont icon-sanjiaoxing-up font12 ${dt.cursorPointer}`,onClick:()=>xr(Ln==="asc"?"desc":"asc")})),at.createElement("span",{className:dt.orderDesc},at.createElement("i",{className:Ln==="desc"?`iconfont icon-sanjiaoxing-down font12 ${dt.cursorPointer} ${dt.active}`:`iconfont icon-sanjiaoxing-down font12 ${dt.cursorPointer}`,onClick:()=>xr(Ln==="asc"?"desc":"asc")}))))},we={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"},Le=ft(99571),We=Object.defineProperty,tt=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Ve=(Ln,An,Bn)=>An in Ln?We(Ln,An,{enumerable:!0,configurable:!0,writable:!0,value:Bn}):Ln[An]=Bn,it=(Ln,An)=>{for(var Bn in An||(An={}))Re.call(An,Bn)&&Ve(Ln,Bn,An[Bn]);if(tt)for(var Bn of tt(An))_e.call(An,Bn)&&Ve(Ln,Bn,An[Bn]);return Ln},yt=(Ln,An)=>{var Bn={};for(var xr in Ln)Re.call(Ln,xr)&&An.indexOf(xr)<0&&(Bn[xr]=Ln[xr]);if(Ln!=null&&tt)for(var xr of tt(Ln))An.indexOf(xr)<0&&_e.call(Ln,xr)&&(Bn[xr]=Ln[xr]);return Bn},Pt=(Ln,An,Bn)=>new Promise((xr,zr)=>{var nn=rn=>{try{Ht(Bn.next(rn))}catch(tr){zr(tr)}},sn=rn=>{try{Ht(Bn.throw(rn))}catch(tr){zr(tr)}},Ht=rn=>rn.done?xr(rn.value):Promise.resolve(rn.value).then(nn,sn);Ht((Bn=Bn.apply(Ln,An)).next())}),Nt=Ln=>{var An=Ln,{className:Bn,style:xr,children:zr,loading:nn=!1,openLoading:sn,onClick:Ht=()=>{},size:rn="middle",shape:tr="round"}=An,cr=yt(An,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Nr,ln]=(0,at.useState)(!1);return at.createElement(Le.ZP,it({onClick:(0,ke.throttle)(vn=>Pt(void 0,null,function*(){sn&&ln(!0);try{yield Ht(vn)}catch(kn){console.log("error",kn)}sn&&ln(!1)}),2e3,{leading:!0,trailing:!1}),className:Ee()(we.btn,we[`${rn}-${tr}`],Bn),style:xr,size:rn,shape:tr,loading:Nr||nn},cr),zr)},Bt={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"},en=({className:Ln,style:An,children:Bn=null,onClick:xr,title:zr})=>at.createElement("div",{className:Ee()(Bt.head,Ln),style:An},at.createElement("span",{className:"primary-hover",onClick:xr},at.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),at.createElement("b",{title:zr},zr),at.createElement("div",{className:Bt.node},Bn)),qt={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"},hn=({confirmShow:Ln=!0,confirmTitle:An,confirmClick:Bn,cancelShow:xr=!0,cancelTitle:zr,cancelClick:nn,className:sn,style:Ht,confirmLoading:rn=!1})=>at.createElement("div",{className:Ee()(qt.btns,sn),style:Ht},Ln&&at.createElement(Le.ZP,{loading:rn,onClick:Bn,type:"primary",className:qt.confirm},An),xr&&at.createElement(Le.ZP,{onClick:nn,className:qt.cancel},zr)),an={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"},wn=({className:Ln,style:An={},LeftContent:Bn,children:xr,RightContent:zr})=>at.createElement("div",{className:Ee()(an.fixedBottom,Ln),style:An},at.createElement("div",{className:an.wrap},at.createElement("div",{className:an.left},Bn),at.createElement("div",{className:an.center},xr),at.createElement("div",{className:an.right},zr))),xn={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"},Zn=({className:Ln,style:An={},dataSource:Bn=[]})=>at.createElement("div",{className:Ee()(xn.crumbs,Ln),style:An},Bn.map((xr,zr)=>zr<Bn.length-1?at.createElement(at.Fragment,{key:zr},xr.path||xr.onClick?at.createElement("span",{className:xn.hover,onClick:xr!=null&&xr.onClick?xr.onClick:()=>bt.history.push(xr.path)},xr.name):at.createElement("span",null,xr.name),at.createElement("span",null,"\xA0",">","\xA0")):at.createElement("span",{key:zr,style:{color:"#5F6368"}},xr.name))),Tr=ft(11938),qn=Object.defineProperty,qr=Object.defineProperties,nr=Object.getOwnPropertyDescriptors,$r=Object.getOwnPropertySymbols,hi=Object.prototype.hasOwnProperty,Si=Object.prototype.propertyIsEnumerable,Li=(Ln,An,Bn)=>An in Ln?qn(Ln,An,{enumerable:!0,configurable:!0,writable:!0,value:Bn}):Ln[An]=Bn,Ei=(Ln,An)=>{for(var Bn in An||(An={}))hi.call(An,Bn)&&Li(Ln,Bn,An[Bn]);if($r)for(var Bn of $r(An))Si.call(An,Bn)&&Li(Ln,Bn,An[Bn]);return Ln},Lr=(Ln,An)=>qr(Ln,nr(An)),Ci=(Ln,An)=>{var Bn={};for(var xr in Ln)hi.call(Ln,xr)&&An.indexOf(xr)<0&&(Bn[xr]=Ln[xr]);if(Ln!=null&&$r)for(var xr of $r(Ln))An.indexOf(xr)<0&&Si.call(Ln,xr)&&(Bn[xr]=Ln[xr]);return Bn};const{Countdown:et}=Tr.default;var Er=Ln=>{var An=Ln,{onChange:Bn}=An,xr=Ci(An,["onChange"]);const[zr,nn]=(0,at.useState)(null);(0,at.useEffect)(()=>{typeof zr=="number"&&zr>=0&&Bn(zr)},[zr]);const sn=Ht=>{const rn=Math.floor(Ht/1e3);nn(rn)};return at.createElement(et,Lr(Ei({},xr),{onChange:sn}))}},37808:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return Gt}});var at=ft(59301);function Gt(oe,Ue){const Ie=(0,at.useRef)();(0,at.useEffect)(()=>{Ie.current=oe}),(0,at.useEffect)(()=>{function de(){Ie.current()}if(Ue!==null){let ve=setInterval(de,Ue);return()=>clearInterval(ve)}},[Ue])}},33633:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return Xe}});var at=ft(59301),Gt=ft(37568),oe=ft(28284),Ue=ft(6767),Ie=ft(62957),de=ft(29787),ve=ft(14566),Ee=ft(25399),ke=ft(60242),Se=ft(47889),je={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=ft(38986),Pe=ft(51257),fe=ft(16253),z=ft(1012),te=ft(47257),se=ft.n(te),ie=ft(58118),le=ft(9148),ce=ft(48790),pe=ft(25690),xe=ft(59301),Ae=Object.defineProperty,De=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Ne=(ot,lt,ut)=>lt in ot?Ae(ot,lt,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ot[lt]=ut,Be=(ot,lt)=>{for(var ut in lt||(lt={}))Fe.call(lt,ut)&&Ne(ot,ut,lt[ut]);if(De)for(var ut of De(lt))Te.call(lt,ut)&&Ne(ot,ut,lt[ut]);return ot},Ge=(ot,lt,ut)=>new Promise((Ct,Je)=>{var nt=bt=>{try{wt(ut.next(bt))}catch(ct){Je(ct)}},St=bt=>{try{wt(ut.throw(bt))}catch(ct){Je(ct)}},wt=bt=>bt.done?Ct(bt.value):Promise.resolve(bt.value).then(nt,St);wt((ut=ut.apply(ot,lt)).next())});const Ye=Gt.default.TextArea,Ke=({dataSetInfo:ot,attachmentInfo:lt,visible:ut,user:Ct,dispatch:Je,onClose:nt=()=>{},onSuccess:St=()=>{}})=>{var wt,bt;const[ct,vt]=(0,at.useState)([]),[ht,Lt]=(0,at.useState)(!1),[dt,mt]=(0,at.useState)(!1),[Et]=oe.default.useForm(),[gt,$e]=(0,at.useState)([]),[He,we]=(0,at.useState)({}),Le=(0,at.useRef)([]);(0,at.useEffect)(()=>{if(ut){if(ot){const{title:Nt,is_public:Bt,desc:$t,attachments:en,data_set_tags:qt}=ot||{},Zt=en.map(an=>({id:String(Math.random()).slice(-6),name:an.title,response:{attachment_id:an.id},size:an.size,description:an.description||"",percent:100,status:"done"}));vt(Zt),$e(qt);const hn={title:Nt,is_public:Bt,desc:$t};Et.setFieldsValue(hn)}if(lt){const Nt=lt.map(Bt=>({id:String(Math.random()).slice(-6),name:Bt.title,response:{attachment_id:Bt.id},size:Bt.size,description:Bt.description||"",percent:100,status:"done"}));vt(Nt)}We()}},[ut]),(0,at.useEffect)(()=>{Le.current=ct},[ct]),(0,at.useEffect)(()=>{ct!=null&&ct.length?Et.setFields([{name:"attachments",errors:[]}]):Et.setFields([{name:"attachments",errors:["\u6570\u636E\u96C6\u4E0D\u80FD\u4E3A\u7A7A"]}])},[ct.length]),(0,at.useEffect)(()=>{gt!=null&&gt.length?Et.setFields([{name:"tag_ids",errors:[]}]):Et.setFields([{name:"tag_ids",errors:["\u6570\u636E\u96C6\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A"]}])},[gt.length]);const We=()=>Ge(void 0,null,function*(){mt(!0);const Nt=yield(0,me.ZP)("/api/data_sets/extra_info.jsoin",{method:"get"});Nt.status===0&&(we(Nt==null?void 0:Nt.data),mt(!1))}),tt={multiple:!0,withCredentials:!0,showUploadList:!1,beforeUpload:Nt=>Ge(void 0,null,function*(){var Bt,$t,en,qt,Zt,hn;if(((qt=(en=($t=(Bt=Nt.name)==null?void 0:Bt.split("."))==null?void 0:$t.slice(0,-1))==null?void 0:en.join("."))==null?void 0:qt.length)>60)return Ue.ZP.warning(`\u300A${Nt.name}\u300B\u6587\u4EF6\u540D\u79F0\u8FC7\u957F\uFF0C\u65E0\u6CD5\u4E0A\u4F20`),Promise.reject();if([...He.data_set_filenames,...Le.current.map(Zn=>Zn.name)].includes(Nt.name))return Ue.ZP.warning(`\u300A${Nt.name}\u300B\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`),Promise.reject();const cn=Nt.size/1024/1024/1024;let wn=He==null?void 0:He.data_sets_filesize;if(Le.current.forEach(Zn=>{wn+=Zn==null?void 0:Zn.size}),wn=wn/1024/1024/1024,(0,ce.Ny)()){if(cn>50)return Ue.ZP.warning(`\u300A${Nt.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 Ue.ZP.warning(`\u300A${Nt.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(wn+cn>((Zt=Ct==null?void 0:Ct.userInfo)==null?void 0:Zt.cloud_space)&&!(He!=null&&He.current_user_no_limit))return Ue.ZP.warning(`\u300A${Nt.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u50A8\u5B58\u7A7A\u95F4\u5927\u5C0F\u9650\u5236(${(hn=Ct==null?void 0:Ct.userInfo)==null?void 0:hn.cloud_space}GB)`),Promise.reject();const Nn={id:String(Math.random()).slice(-6),name:Nt.name,size:Nt.size,file:Nt,description:"",percent:0,status:"uploading"};return Ve(Nn,{login:He==null?void 0:He.login,container_type:"DataSet",container_id:null,description:"",realFileName:!1}),vt(Zn=>[...Zn,Nn]),Promise.reject()})},Re=Nt=>Ge(void 0,null,function*(){var Bt,$t,en;const qt=Le.current.find(Zt=>Zt.name===Nt.name);(Bt=qt==null?void 0:qt.response)!=null&&Bt.attachment_id&&(yield(0,me.ZP)("/api/data_sets/single_destroy_files.json",{method:"delete",body:{attachment_id:($t=qt==null?void 0:qt.response)==null?void 0:$t.attachment_id}})),qt!=null&&qt.client&&((en=qt==null?void 0:qt.client)==null||en.cancel()),vt(Zt=>Zt.filter(hn=>hn.name!==Nt.name))}),_e=()=>{var Nt;(Nt=Le.current)==null||Nt.forEach(Bt=>{var $t;Bt!=null&&Bt.client&&(($t=Bt==null?void 0:Bt.client)==null||$t.cancel())})};console.log(ct,"fileList1");const Ve=(Nt,Bt)=>Ge(void 0,null,function*(){var $t,en,qt,Zt,hn,an,cn,wn,xn;Bt.file_name=Nt.name;const Nn=Nt.name,Zn=yield(0,me.ZP)("/api/buckets/get_data_set_token.json",{method:"get"});if((Zn==null?void 0:Zn.status)!==0){vt(nr=>(nr[nr.findIndex($r=>$r.name===Nn)].status="error",[...nr])),Ue.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}Zn.data=JSON.parse((0,fe.pe)(Zn.data));const Tr=new(se())({endpoint:($t=Zn==null?void 0:Zn.data)==null?void 0:$t.end_point,region:(en=Zn==null?void 0:Zn.data)==null?void 0:en.region,accessKeyId:(qt=Zn==null?void 0:Zn.data)==null?void 0:qt.access_key_id,accessKeySecret:(Zt=Zn==null?void 0:Zn.data)==null?void 0:Zt.access_key_secret,bucket:(hn=Zn==null?void 0:Zn.data)==null?void 0:hn.bucket,stsToken:(an=Zn==null?void 0:Zn.data)==null?void 0:an.security_token}),qn=Nt.name.split(".");qn.pop();const qr=Bt.realFileName?qn.join("."):(0,z.Z)();Tr.multipartUpload(`datasets/${Bt==null?void 0:Bt.login}/${qr}${Nn.indexOf(".")>-1?"."+Nn.split(".").pop():""}`,new Blob([Nt.file],{type:Nt.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(nr,$r,hi)=>{console.log("\u8FDB\u5EA6",nr,$r,hi),vt(Si=>{const Li=Si.findIndex(Ei=>Ei.name===Nn);return Si[Li].client=Tr,Si[Li].percent=nr*100,Si[Li].checkpoint=$r,[...Si]})},checkpoint:(wn=Le.current[(cn=Le.current)==null?void 0:cn.findIndex(nr=>nr.name===Nn)])==null?void 0:wn.checkpoint,callback:{customValue:{id:Nn+""},url:(xn=Zn==null?void 0:Zn.data)==null?void 0:xn.callback_url,host:Zn==null?void 0:Zn.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,me.rz)(Bt)}}).then(function(nr){vt($r=>{var hi,Si,Li;const Ei=$r.findIndex(Ci=>Ci.name===Nn);let Lr="done";return((hi=nr.data)==null?void 0:hi.status)===0?$r[Ei].response=(Si=nr.data)==null?void 0:Si.data:(Ue.ZP.warning((Li=nr.data)==null?void 0:Li.message),Lr="error"),$r[Ei].status=Lr,[...$r]})}).catch(function(nr){console.log("\u63A5\u53E3\u9519\u8BEF\uFF1A",nr),(nr==null?void 0:nr.name)!=="cancel"&&vt($r=>{const hi=$r.findIndex(Si=>Si.name===Nn);return $r[hi].status="error",[...$r]})})}),it=Nt=>(Nt=Nt||"",Nt=String(Nt),Nt=Nt.replace(/\s+/g,""),Nt),yt=()=>Ge(void 0,null,function*(){var Nt;const Bt=Et.getFieldsValue(),{title:$t,is_public:en,desc:qt}=Bt,Zt=[];if(it($t)||Zt.push({name:"title",errors:["\u6570\u636E\u96C6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"]}),ct!=null&&ct.length||Zt.push({name:"attachments",errors:["\u6570\u636E\u96C6\u4E0D\u80FD\u4E3A\u7A7A"]}),gt!=null&&gt.length||Zt.push({name:"tag_ids",errors:["\u6570\u636E\u96C6\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A"]}),Zt.length){Et.setFields(Zt);return}const hn=ct.map(xn=>{var Nn;return{attachment_id:(Nn=xn.response)==null?void 0:Nn.attachment_id,description:xn.description}});Lt(!0);const an=(0,Pe.TG)(),cn={title:Bt.title,attachments:hn,tag_ids:gt.map(xn=>xn.id),is_public:en,desc:qt,homework_common_id:an||void 0};let wn;ot?wn=yield(0,me.ZP)(`/api/data_sets/${ot==null?void 0:ot.id}.json`,{method:"put",body:cn}):wn=yield(0,me.ZP)("/api/data_sets.json",{method:"post",body:cn}),wn.status===0&&(Ue.ZP.success("\u64CD\u4F5C\u6210\u529F"),St((Nt=wn==null?void 0:wn.data)==null?void 0:Nt.data_set_id),Je({type:"user/getUserInfo"})),Lt(!1)}),Pt=Nt=>{$e(Nt)},jt=ct.some(Nt=>Nt.status==="uploading");return console.log("fileList",ct),xe.createElement(Ie.default,{destroyOnClose:!0,confirmLoading:ht,bodyStyle:{paddingLeft:16,paddingTop:20},okButtonProps:{disabled:jt},title:ot?"\u7F16\u8F91\u6570\u636E\u96C6":"\u521B\u5EFA\u6570\u636E\u96C6",width:660,onCancel:()=>{if(jt){Ie.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:()=>{nt()}});return}nt()},okText:"\u786E\u5B9A",onOk:yt,open:ut,afterClose:()=>{vt([]),$e([]),Lt(!1),mt(!1),_e(),Et.resetFields()}},xe.createElement(de.Z,{spinning:dt},!(He!=null&&He.current_user_no_limit)&&!dt&&xe.createElement("div",{className:je.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"}},(wt=Ct==null?void 0:Ct.userInfo)==null?void 0:wt.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"}},((He==null?void 0:He.data_sets_filesize)/(1024*1024*1024)).toFixed(2),"GB")),xe.createElement(oe.default,{form:Et,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(Gt.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({},tt),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.",He!=null&&He.current_user_no_limit?"":`\u4E2A\u4EBA\u4E0A\u4F20\u603B\u4F53\u79EF\u4E0D\u8D85\u8FC7${(bt=Ct==null?void 0:Ct.userInfo)==null?void 0:bt.cloud_space}GB\uFF0C`,"\u6587\u4EF6\u540D\u4E0D\u8D85\u8FC760\u5B57")))),xe.createElement("div",{className:je.box},ct.map(Nt=>xe.createElement("div",{key:Nt.id,className:je.row},xe.createElement("div",{className:je.icon},Nt.status==="done"&&xe.createElement("i",{className:"iconfont icon-wancheng",style:{color:"#19CB70"}}),Nt.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:Nt==null?void 0:Nt.name},xe.createElement("div",{style:{color:Nt.status==="error"?"#E30000":"#3061D0",textDecoration:"underline"}},(0,Pe.tP)(Nt==null?void 0:Nt.name,9))),Nt.status==="uploading"&&xe.createElement(ke.Z,{strokeColor:"#3061D0",trailColor:"rgba(144, 150, 163, 0.1)",percent:Nt.percent,showInfo:!1,size:[168,4]})),xe.createElement("i",{onClick:()=>Re(Nt),className:"iconfont icon-shanchu14 font14 ml20 mr20",style:{cursor:"pointer",color:"#F65160"}}),xe.createElement(Gt.default,{value:Nt.description,onChange:Bt=>{vt($t=>{const en=$t.findIndex(qt=>qt.name===Nt.name);return $t[en].description=Bt.target.value,[...$t]})},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:Pt,tags:gt})),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 Xe=(0,pe.connect)(({user:ot,dispatch:lt})=>({user:ot,dispatch:lt}))(Ke)},73171:function(Gn,jn,ft){"use strict";ft.r(jn),ft.d(jn,{default:function(){return Er}});var at=ft(59301),Gt=ft(25690),oe=ft(29787),Ue=ft(91882),Ie=ft(25399),de=ft(62957),ve=ft(62673),Ee=ft(6767),ke=ft(75727),Se=ft(47889),je=ft(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=ft(346),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=ft(39793),te=ft(76902),se=ft(28284),ie=ft(37568),le=ft(14566),ce=ft(60242),pe=ft(84816),xe=ft(61186),Ae=ft.n(xe),De=ft(51257),Fe=ft(79809),Te=ft(38986),Ne=ft(47257),Be=ft.n(Ne),Ge=ft(16253),Ye=ft(1012),Ke=ft(48790),Xe=ft(59301),ot=Object.defineProperty,lt=Object.defineProperties,ut=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,St=(Ln,An,Bn)=>An in Ln?ot(Ln,An,{enumerable:!0,configurable:!0,writable:!0,value:Bn}):Ln[An]=Bn,wt=(Ln,An)=>{for(var Bn in An||(An={}))Je.call(An,Bn)&&St(Ln,Bn,An[Bn]);if(Ct)for(var Bn of Ct(An))nt.call(An,Bn)&&St(Ln,Bn,An[Bn]);return Ln},bt=(Ln,An)=>lt(Ln,ut(An)),ct=(Ln,An,Bn)=>new Promise((xr,zr)=>{var nn=rn=>{try{Ht(Bn.next(rn))}catch(tr){zr(tr)}},sn=rn=>{try{Ht(Bn.throw(rn))}catch(tr){zr(tr)}},Ht=rn=>rn.done?xr(rn.value):Promise.resolve(rn.value).then(nn,sn);Ht((Bn=Bn.apply(Ln,An)).next())});const vt=({polls:Ln,globalSetting:An,loading:Bn,dispatch:xr,user:zr,dataSetInfo:nn,indexType:sn,getInfo:Ht})=>{const rn=(0,Gt.useParams)(),[tr,cr]=(0,at.useState)(!1),[Nr,ln]=(0,at.useState)(0),vn=(0,at.useRef)(null),kn=(0,at.useRef)(null),[Rr,Hn]=(0,at.useState)(""),[Ot,Ut]=(0,at.useState)(""),[Dn]=se.default.useForm(),[Tn,Qt]=(0,at.useState)([]),Fn=(0,at.useRef)([]),[vr,mr]=(0,at.useState)(!1),[er,Un]=(0,at.useState)(!1),[Rn,$n]=(0,at.useState)(""),Fr=Tn.some(yr=>yr.status==="uploading"),[br,Pn]=(0,at.useState)(!1),[fr,si]=(0,at.useState)([]),[xi,zi]=(0,at.useState)(!1),[Yt,Pr]=(0,at.useState)(0),[Mr,ar]=(0,at.useState)({page:1,limit:10,type:"",id:""}),mi=(yr,on)=>ct(void 0,null,function*(){zi(!0);const sr=yield(0,pe.iw)({container_type:yr||(Mr==null?void 0:Mr.type),container_id:on||(Mr==null?void 0:Mr.id),page:Mr.page,limit:Mr.limit});si(sr==null?void 0:sr.data),Pr(sr==null?void 0:sr.total_count),zi(!1)});(0,at.useEffect)(()=>{var yr;((yr=vn==null?void 0:vn.current)==null?void 0:yr.clientHeight)>80?ln(1):ln(0)},[Rr]),(0,at.useEffect)(()=>{Fn.current=Tn},[Tn]),(0,at.useEffect)(()=>{Hn(nn==null?void 0:nn.introduce),Ut(nn==null?void 0:nn.introduce)},[nn==null?void 0:nn.introduce]);const ii={multiple:!1,withCredentials:!0,showUploadList:!1,fileList:Tn==null?void 0:Tn.map(yr=>yr.file),beforeUpload:yr=>ct(void 0,null,function*(){var on,sr,un,gr,Kr;if(((gr=(un=(sr=(on=yr.name)==null?void 0:on.split("."))==null?void 0:sr.slice(0,-1))==null?void 0:un.join("."))==null?void 0:gr.length)>60)return Ee.ZP.warning(`\u300A${yr.name}\u300B\u6587\u4EF6\u540D\u79F0\u8FC7\u957F\uFF0C\u65E0\u6CD5\u4E0A\u4F20`),Promise.reject();if([...Fn.current.map(Zr=>Zr.name)].includes(yr.name))return Ee.ZP.warning(`\u300A${yr.name}\u300B\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`),Promise.reject();if(yr.size/1024/1024/1024>2)return Ee.ZP.warning(`\u300A${yr.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:yr.name,size:yr.size,file:yr,description:"",percent:0,status:"uploading"};return ti(oi,{login:(Kr=zr==null?void 0:zr.userInfo)==null?void 0:Kr.login,container_type:"DataSet",container_id:null,description:"",realFileName:!1}),Qt(Zr=>[...Zr,oi]),Promise.reject()})},pi=yr=>ct(void 0,null,function*(){var on,sr,un;const gr=Fn.current.find(Kr=>Kr.name===yr.name);(on=gr==null?void 0:gr.response)!=null&&on.attachment_id&&(yield(0,Te.ZP)("/api/data_sets/single_destroy_files.json",{method:"delete",body:{attachment_id:(sr=gr==null?void 0:gr.response)==null?void 0:sr.attachment_id}})),gr!=null&&gr.client&&((un=gr==null?void 0:gr.client)==null||un.cancel()),Qt(Kr=>Kr.filter(Yr=>Yr.name!==yr.name))}),ei=()=>{var yr;(yr=Fn.current)==null||yr.forEach(on=>{var sr;on!=null&&on.client&&((sr=on==null?void 0:on.client)==null||sr.cancel())})},ti=(yr,on)=>ct(void 0,null,function*(){var sr,un,gr,Kr,Yr,Di,oi,Zr,Wi;on.file_name=yr.name;const Jt=yr.name,pn=yield(0,Te.ZP)("/api/buckets/get_data_set_token.json",{method:"get"});if((pn==null?void 0:pn.status)!==0){Qt(Xn=>(Xn[Xn.findIndex(dr=>dr.name===Jt)].status="error",[...Xn])),Ee.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}pn.data=JSON.parse((0,Ge.pe)(pn.data));const Vt=new(Be())({endpoint:(sr=pn==null?void 0:pn.data)==null?void 0:sr.end_point,region:(un=pn==null?void 0:pn.data)==null?void 0:un.region,accessKeyId:(gr=pn==null?void 0:pn.data)==null?void 0:gr.access_key_id,accessKeySecret:(Kr=pn==null?void 0:pn.data)==null?void 0:Kr.access_key_secret,bucket:(Yr=pn==null?void 0:pn.data)==null?void 0:Yr.bucket,stsToken:(Di=pn==null?void 0:pn.data)==null?void 0:Di.security_token}),st=yr.name.split(".");st.pop();const On=on.realFileName?st.join("."):(0,Ye.Z)();Vt.multipartUpload(`datasets/${on==null?void 0:on.login}/${On}${Jt.indexOf(".")>-1?"."+Jt.split(".").pop():""}`,new Blob([yr.file],{type:yr.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Xn,dr,ur)=>{console.log("\u8FDB\u5EA6",Xn,dr,ur),console.log("client--",Vt),Qt(Qn=>{const mn=Qn.findIndex(zn=>zn.name===Jt);return mn!==-1&&(Qn[mn].client=Vt,Qn[mn].percent=Xn*100,Qn[mn].checkpoint=dr),[...Qn]})},checkpoint:(Zr=Fn.current[(oi=Fn.current)==null?void 0:oi.findIndex(Xn=>Xn.name===Jt)])==null?void 0:Zr.checkpoint,callback:{customValue:{id:Jt+""},url:(Wi=pn==null?void 0:pn.data)==null?void 0:Wi.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)(on)}}).then(function(Xn){Qt(dr=>{var ur,Qn,mn;const zn=dr.findIndex(Mn=>Mn.name===Jt);let Vn="done";return zn!==-1&&(((ur=Xn.data)==null?void 0:ur.status)===0?dr[zn].response=(Qn=Xn.data)==null?void 0:Qn.data:(Ee.ZP.warning((mn=Xn.data)==null?void 0:mn.message),Vn="error"),dr[zn].status=Vn),[...dr]})}).catch(function(Xn){console.log("\u63A5\u53E3\u9519\u8BEF\uFF1A",Xn),(Xn==null?void 0:Xn.name)!=="cancel"&&Qt(dr=>{const ur=dr.findIndex(Qn=>Qn.name===Jt);return ur!==-1&&(dr[ur].status="error"),[...dr]})})});return Xe.createElement("div",{className:fe.content},!tr&&!Rr&&sn&&Xe.createElement("div",{className:fe.introduceNoData,onClick:()=>{cr(!0)}},Xe.createElement("div",{className:fe.introduceAdd},Xe.createElement("i",{className:"icon icon-tianjia4 mr5 font12"})," \u6DFB\u52A0\u6570\u636E\u96C6\u4ECB\u7ECD"),Xe.createElement("div",{className:fe.introduceText},"\u8BA9\u4F60\u7684\u6570\u636E\u96C6\u66F4\u53D7\u6B22\u8FCE")),!tr&&Rr&&Xe.createElement("div",{className:fe.introduceContent},Xe.createElement("div",{className:fe.introduceTitle},"\u6570\u636E\u96C6\u4ECB\u7ECD",sn&&Xe.createElement("i",{className:"icon icon-bianji9 font14 ml10",style:{color:"#3061D0",cursor:"pointer"},onClick:()=>{cr(!0)}})),Xe.createElement("div",{className:fe.introContentWrap},Xe.createElement("div",null,Xe.createElement("div",{ref:kn,style:Nr>0?{height:Nr===1?80:"auto",overflow:Nr===1?"hidden":"auto"}:{paddingRight:0}},Xe.createElement("div",{ref:vn},Xe.createElement(te.Z,{value:Rr,style:{fontSize:"14px"}}))),!!Nr&&Xe.createElement(at.Fragment,null,Nr===1?Xe.createElement("div",{onClick:()=>{ln(2)},className:fe.action},"\u5C55\u5F00",Xe.createElement("i",{className:"iconfont icon-zhankaixiaojiantou",style:{fontSize:"10px",marginLeft:"3px"}})):Xe.createElement("div",{onClick:()=>{ln(1)},className:fe.action},"\u6536\u8D77",Xe.createElement("i",{className:"iconfont icon-shouqixiaojiantou",style:{fontSize:"10px",marginLeft:"3px"}})))))),tr&&Xe.createElement("div",{style:{marginTop:"30px"}},Xe.createElement(z.Z,{watch:!0,onChange:yr=>{Ut(yr)},defaultValue:Ot,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u5185\u5BB9\uFF0C\u6700\u591A5000\u4E2A\u5B57\u7B26"}),Xe.createElement("div",{className:fe.introduceButton},Xe.createElement("div",{className:fe.close,onClick:yr=>{yr.stopPropagation(),cr(!1)}},"\u53D6\u6D88"),Xe.createElement("div",{className:fe.submit,onClick:yr=>{yr.stopPropagation(),(0,pe.R2)({id:rn==null?void 0:rn.id,introduce:Ot}).then(on=>{(on==null?void 0:on.status)==0&&(Ee.ZP.success("\u64CD\u4F5C\u6210\u529F"),cr(!1),Ht(!0))})}},"\u786E\u8BA4"))),Xe.createElement("div",{className:fe.fileTable},Xe.createElement("div",null,"\u6587\u4EF6\u5217\u8868"),sn&&Xe.createElement("div",{className:fe.addBtn,onClick:()=>{mr(!0)}},"\u4E0A\u4F20\u6587\u4EF6")),Xe.createElement(je.default,{dataSource:nn==null?void 0:nn.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:yr=>Xe.createElement("span",{style:{color:"#666666"}},yr?Ae()(yr).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:(yr,on)=>Xe.createElement("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:()=>ct(void 0,null,function*(){var sr;((0,Ke.Ny)()||((sr=zr==null?void 0:zr.userInfo)==null?void 0:sr.login)==="mfflo3p2e")&&(Pn(!0),Mr.type=on==null?void 0:on.container_type,Mr.id=on==null?void 0:on.container_id,Mr.page=1,Mr.limit=10,ar(wt({},Mr)),yield mi(on==null?void 0:on.container_type,on==null?void 0:on.container_id))})},yr||"0")},{title:"\u64CD\u4F5C",align:"right",dataIndex:"role",width:sn?130:60,render:(yr,on,sr)=>Xe.createElement("span",{style:{color:"#3061D0"}},Xe.createElement("div",{style:{display:"flex"}},Xe.createElement("div",{style:{marginRight:"10px",color:"#3061D0",cursor:"pointer"},onClick:()=>ct(void 0,null,function*(){yield(0,De.Nd)(on.title,on==null?void 0:on.download_url),yield(0,pe.SG)({id:on==null?void 0:on.id}),Ht()})},"\u4E0B\u8F7D"),sn&&Xe.createElement("div",{style:{marginRight:"10px",color:"#3061D0",cursor:"pointer"},onClick:()=>{var un,gr,Kr,Yr;let Di=(gr=on==null?void 0:on.title)==null?void 0:gr.substring(((un=on==null?void 0:on.title)==null?void 0:un.lastIndexOf("."))+1);Dn.setFieldsValue({title:(Yr=on==null?void 0:on.title)==null?void 0:Yr.substring(0,(Kr=on==null?void 0:on.title)==null?void 0:Kr.lastIndexOf(".")),description:on==null?void 0:on.description}),de.default.confirm({icon:null,title:"\u7F16\u8F91",width:700,centered:!0,content:Xe.createElement("div",null,Xe.createElement(se.default,{form:Dn,colon:!1,labelCol:{span:3},style:{marginBottom:"-20px"},wrapperCol:{span:21}},Xe.createElement(se.default.Item,{label:"\u6587\u4EF6\u540D\u79F0",name:"title",rules:[{required:!0,message:"\u5FC5\u586B\u9879"}]},Xe.createElement(ie.default,{placeholder:"\u6587\u4EF6\u540D\u79F0\u6700\u591A\u53EF\u8F93\u5165255\u5B57",size:"large",suffix:Xe.createElement("span",null,".",Di)})),Xe.createElement(se.default.Item,{label:"\u5907\u6CE8",name:"description"},Xe.createElement(Fe.Z,{placeholder:"\u5907\u6CE8\u8BF4\u660E\uFF0C\u6700\u591A255\u5B57",size:"large"})))),onOk:()=>ct(void 0,null,function*(){yield Dn.validateFields(),(0,pe.A0)({id:rn==null?void 0:rn.id,attachment_id:on.id,filename:Dn.getFieldValue("title")+"."+Di,description:Dn.getFieldValue("description")}).then(oi=>{(oi==null?void 0:oi.status)==0&&(Ee.ZP.success("\u7F16\u8F91\u6210\u529F"),Ht())})})})}},"\u7F16\u8F91"),sn&&Xe.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:on==null?void 0:on.id}).then(un=>{(un==null?void 0:un.status)==0&&(Ee.ZP.success("\u5220\u9664\u6210\u529F"),xr({type:"user/getUserInfo"}),Ht(!0))})})})}},"\u5220\u9664")))}]}),Xe.createElement(de.default,{centered:!0,keyboard:!1,maskClosable:!1,destroyOnClose:!0,open:vr,title:"\u4E0A\u4F20\u6587\u4EF6",okButtonProps:{loading:er,disabled:Fr},width:"1000px",onOk:()=>ct(void 0,null,function*(){const yr=Tn.map(sr=>{var un;return{attachment_id:(un=sr.response)==null?void 0:un.attachment_id,description:Rn}});if(Tn.length===0){Ee.ZP.info("\u8BF7\u5148\u4E0A\u4F20\u6587\u4EF6\uFF01");return}Un(!0);const on=yield(0,Te.ZP)(`/api/data_sets/${rn==null?void 0:rn.id}/upload_attachments.json`,{method:"post",body:{attachments:yr}});(on==null?void 0:on.status)==0&&(Ee.ZP.success("\u4E0A\u4F20\u6210\u529F\uFF01"),Ht(),mr(!1),xr({type:"user/getUserInfo"})),Un(!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:()=>{mr(!1)}});return}mr(!1)},afterClose:()=>{Qt([]),$n(""),Un(!1),ei()}},Xe.createElement("div",{className:fe.wrap},Xe.createElement("div",{className:"mb10"},Xe.createElement("span",{style:{color:"#ff4d4f",marginRight:"5px"}},"*"),"\u9009\u62E9\u6587\u4EF6 ",Xe.createElement("span",{className:"c-light-black"},"(\u5355\u4E2A\u6587\u4EF6\u4E0D\u8D85\u8FC72GB)")),Xe.createElement("div",null,Xe.createElement(le.default.Dragger,bt(wt({},ii),{height:300}),Xe.createElement("div",null,Xe.createElement("i",{className:`iconfont icon-shangchuan font50 ${fe.colorBlue}`})),Xe.createElement("div",{className:"font14 mt30"},"\u62D6\u62FD\u6587\u4EF6\u6216",Xe.createElement("span",{className:`${fe.colorBlue} ml5`},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))),Xe.createElement("div",{className:fe.box},Tn.map(yr=>Xe.createElement("div",{key:yr.id,className:fe.row},Xe.createElement("div",{style:{display:"flex",alignItems:"center"}},Xe.createElement("div",{className:fe.icon},yr.status==="done"&&Xe.createElement("i",{className:"iconfont icon-wancheng",style:{color:"#19CB70"}}),yr.status==="error"&&Xe.createElement("i",{className:"iconfont icon-cuowu",style:{color:"#E30000",marginLeft:1,fontSize:13}})),Xe.createElement("div",{style:{flex:1}},Xe.createElement(Ie.Z,{title:yr==null?void 0:yr.name},Xe.createElement("div",{style:{width:"100%",color:yr.status==="error"?"#E30000":"#3061D0",textDecoration:"underline"}},(0,De.tP)(yr==null?void 0:yr.name,9))),yr.status==="uploading"&&Xe.createElement(ce.Z,{strokeColor:"#3061D0",trailColor:"rgba(144, 150, 163, 0.1)",percent:yr.percent,showInfo:!1,style:{width:"900px"}}))),Xe.createElement("i",{onClick:()=>pi(yr),className:"iconfont icon-shanchu14 font14 ml20",style:{cursor:"pointer",color:"#F65160"}})))),Xe.createElement("div",{style:{marginTop:"20px"}},"\u5907\u6CE8\uFF1A"),Xe.createElement("div",null,Xe.createElement(ie.default,{allowClear:!0,value:Rn,onChange:yr=>{$n(yr.target.value)},bordered:!1,showCount:!0,maxLength:255,placeholder:"\u8BF7\u586B\u5199\u5907\u6CE8\u4FE1\u606F"})))),Xe.createElement(de.default,{centered:!0,keyboard:!1,maskClosable:!1,destroyOnClose:!0,open:br,title:"\u4E0B\u8F7D\u4FE1\u606F",width:"730px",onCancel:()=>{Pn(!1)},footer:null},Xe.createElement("div",null,Xe.createElement(je.default,{dataSource:fr,scroll:{y:47*6},className:"mt10 mb10",loading:xi,pagination:{total:Yt||0,onChange:(yr,on)=>ct(void 0,null,function*(){Mr.page=yr,Mr.limit=on,ar(wt({},Mr)),yield mi()}),onShowSizeChange:(yr,on)=>ct(void 0,null,function*(){Mr.page=1,Mr.limit=on,ar(wt({},Mr)),yield mi()}),current:Mr==null?void 0:Mr.page,pageSize:Mr==null?void 0:Mr.limit,showTotal:yr=>Xe.createElement(Xe.Fragment,null,"\u5171",Xe.createElement("span",{className:"ml5 mr5",style:{color:"#3061d0"}},yr),"\u6761\u6570\u636E")},columns:[{title:"\u67E5\u770B\u4EBA",align:"left",width:150,dataIndex:"real_name",ellipsis:!0,render:yr=>Xe.createElement("span",null,yr||"--")},{title:"\u5355\u4F4D",align:"left",width:260,ellipsis:!0,dataIndex:"school_name",render:yr=>Xe.createElement("span",null,yr||"--")},{title:"\u90E8\u95E8",align:"left",width:150,ellipsis:!0,dataIndex:"department_name",render:yr=>Xe.createElement("span",null,yr||"--")},{title:"\u6240\u9009\u65F6\u95F4",dataIndex:"created_at",ellipsis:!0,render:yr=>Xe.createElement("span",{style:{color:"#666666"}},yr?Ae()(yr).format("YYYY-MM-DD"):"--")}]}))))};var ht=(0,Gt.connect)(({polls:Ln,loading:An,user:Bn,globalSetting:xr})=>({polls:Ln,globalSetting:xr,user:Bn,loading:An.effects}))(vt),Lt=ft(26227),dt=ft(77019),mt=ft(5269),Et=ft(99571),gt={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"},$e=ft(94670),He=ft(59301),we=Object.defineProperty,Le=Object.defineProperties,We=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Ve=(Ln,An,Bn)=>An in Ln?we(Ln,An,{enumerable:!0,configurable:!0,writable:!0,value:Bn}):Ln[An]=Bn,it=(Ln,An)=>{for(var Bn in An||(An={}))Re.call(An,Bn)&&Ve(Ln,Bn,An[Bn]);if(tt)for(var Bn of tt(An))_e.call(An,Bn)&&Ve(Ln,Bn,An[Bn]);return Ln},yt=(Ln,An)=>Le(Ln,We(An)),Pt=(Ln,An,Bn)=>new Promise((xr,zr)=>{var nn=rn=>{try{Ht(Bn.next(rn))}catch(tr){zr(tr)}},sn=rn=>{try{Ht(Bn.throw(rn))}catch(tr){zr(tr)}},Ht=rn=>rn.done?xr(rn.value):Promise.resolve(rn.value).then(nn,sn);Ht((Bn=Bn.apply(Ln,An)).next())});Ae().locale("ZH-cn");function jt({user:Ln,vlist:An=[],dispatch:Bn,params:xr,id:zr,memo_replies:nn,forumsDetail:sn}){return He.createElement("aside",{className:gt.comment},An.map(function(Ht,rn){var tr,cr;return He.createElement(dt.Z,{key:rn,className:gt.commentItem},He.createElement(mt.Z,{span:24},He.createElement(dt.Z,null,He.createElement(mt.Z,{flex:"1"},He.createElement("a",{href:`/users/${Ht.user_login}`,target:"_blank",style:{color:"#9096A3",fontSize:"12px"}},Ht==null?void 0:Ht.username),He.createElement("span",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px"}},Ht.time)),(Ht.can_delete||Ht.user_id===((tr=Ln.userInfo)==null?void 0:tr.user_id)||Ht.user_login===((cr=Ln.userInfo)==null?void 0:cr.login))&&He.createElement(mt.Z,{className:"forums-comment-delete",style:{display:"none"}},He.createElement(Ie.Z,{title:"\u5220\u9664"},He.createElement(Lt.Z,{className:"current",onClick:()=>{de.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:He.createElement("div",{className:"font16 tc"},"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"),onOk:()=>Pt(this,null,function*(){const Nr=yield(0,$e.sW)({id:Ht.id,memo_type:"data_set"}),ln=nn.find(vn=>vn.id===zr).children.filter(vn=>vn.id!==Ht.id);nn.find(vn=>vn.id===zr).children=ln,Bn({type:"forumsDetail/setForumsDetailData",payload:yt(it({},sn.forumsDetailData),{memo_replies:[...nn],memo_type:"data_set"})})})})}}))))),He.createElement(mt.Z,null,He.createElement(te.Z,{value:Ht.content,style:{color:"#232B40",fontSize:"14px"}})))}))}var Nt=jt,Bt=ft(59301),$t=Object.defineProperty,en=Object.defineProperties,qt=Object.getOwnPropertyDescriptors,Zt=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,an=Object.prototype.propertyIsEnumerable,cn=(Ln,An,Bn)=>An in Ln?$t(Ln,An,{enumerable:!0,configurable:!0,writable:!0,value:Bn}):Ln[An]=Bn,wn=(Ln,An)=>{for(var Bn in An||(An={}))hn.call(An,Bn)&&cn(Ln,Bn,An[Bn]);if(Zt)for(var Bn of Zt(An))an.call(An,Bn)&&cn(Ln,Bn,An[Bn]);return Ln},xn=(Ln,An)=>en(Ln,qt(An)),Nn=(Ln,An,Bn)=>new Promise((xr,zr)=>{var nn=rn=>{try{Ht(Bn.next(rn))}catch(tr){zr(tr)}},sn=rn=>{try{Ht(Bn.throw(rn))}catch(tr){zr(tr)}},Ht=rn=>rn.done?xr(rn.value):Promise.resolve(rn.value).then(nn,sn);Ht((Bn=Bn.apply(Ln,An)).next())});Ae().locale("ZH-cn");const Zn=({user:Ln,forumsDetail:An,globalSetting:Bn,loading:xr,dispatch:zr,handleClick:nn,memoId:sn},Ht)=>{const{memo:rn,memo_replies:tr}=An.forumsDetailData||{},cr=(0,Gt.useParams)(),[Nr,ln]=(0,at.useState)(""),[vn,kn]=(0,at.useState)(""),[Rr,Hn]=(0,at.useState)(-1),[Ot,Ut]=(0,at.useState)(!1),[Dn,Tn]=(0,at.useState)(!1),[Qt,Fn]=(0,at.useState)(1);(0,at.useEffect)(()=>{Ut((rn==null?void 0:rn.reply_for_memo_count)>10)},[rn==null?void 0:rn.reply_for_memo_count]),(0,at.useEffect)(()=>{zr({type:"forumsDetail/getForumsDetailData",payload:{id:sn,memo_type:"data_set"}})},[]);const vr=()=>Nn(void 0,null,function*(){var er;const Un=Qt+1;Fn(Un);const Rn=yield(0,$e.z5)({id:sn,page:Un,memo_type:"data_set"});Rn!=null&&Rn.memo_replies&&(zr({type:"forumsDetail/setForumsDetailData",payload:xn(wn({},An.forumsDetailData),{memo_replies:[...tr,...Rn.memo_replies]})}),Ut(((er=Rn.memo_replies)==null?void 0:er.length)===10))}),mr=er=>{var Un,Rn,$n,Fr;return xn(wn({},er),{image_url:(Un=Ln.userInfo)==null?void 0:Un.image_url,children:[],user_id:(Rn=Ln.userInfo)==null?void 0:Rn.user_id,user_login:($n=Ln.userInfo)==null?void 0:$n.login,username:(Fr=Ln.userInfo)==null?void 0:Fr.username,time:`${(0,De.li)((new Date().getTime()-new Date(er.created_at).getTime())/1e3)}\u524D`})};return Bt.createElement("section",{className:gt.wrap},!!(tr!=null&&tr.length)&&Bt.createElement("aside",{className:gt.content},Bt.createElement("aside",{className:gt.replyList},tr==null?void 0:tr.map(function(er,Un){var Rn,$n,Fr;return Bt.createElement(dt.Z,{gutter:[12,12],key:Un},Bt.createElement(mt.Z,{flex:"40px"},Bt.createElement("a",{href:`/users/${er.user_login}`,target:"_blank"},Bt.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",width:"46",height:"46",src:`${Pe.Z.IMG_SERVER}/images/${er==null?void 0:er.image_url}`}))),Bt.createElement(mt.Z,{flex:"1"},Bt.createElement(dt.Z,{align:"middle",className:gt.commentParItem},Bt.createElement(mt.Z,{span:24},Bt.createElement(dt.Z,null,Bt.createElement(mt.Z,{flex:"1"},Bt.createElement("a",{href:`/users/${er.user_login}`,target:"_blank"},Bt.createElement("span",{style:{color:"#9096A3",fontSize:"12px"}},er==null?void 0:er.username)),Bt.createElement("span",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px"}},er.time)),(er.can_delete||er.user_id===((Rn=Ln.userInfo)==null?void 0:Rn.user_id)||er.user_login===(($n=Ln.userInfo)==null?void 0:$n.login))&&Bt.createElement(mt.Z,{className:"forums-comment-par-delete",style:{display:"none"}},Bt.createElement(Ie.Z,{title:"\u5220\u9664"},Bt.createElement(Lt.Z,{className:"current",onClick:()=>{de.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Bt.createElement("div",{className:"font16 tc"},"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"),onOk:()=>Nn(this,null,function*(){const br=yield(0,$e.sW)({id:er.id,memo_type:"data_set"}),Pn=tr.filter(fr=>fr.id!==er.id);zr({type:"forumsDetail/setForumsDetailData",payload:xn(wn({},An.forumsDetailData),{memo_replies:[...Pn],memo_type:"data_set"})})})})}}))))),Bt.createElement(mt.Z,{span:24,style:{marginTop:"5px"}},Bt.createElement("div",{onClick:nn},Bt.createElement(te.Z,{value:er.content,style:{color:"#232B40",fontSize:"14px"}}))),!!((Fr=er==null?void 0:er.children)!=null&&Fr.length)&&Bt.createElement(Nt,{user:Ln,id:er==null?void 0:er.id,vlist:er==null?void 0:er.children,dispatch:zr,params:cr,memo_replies:tr,forumsDetail:An}),Bt.createElement(mt.Z,{span:24,className:"mt5 c-light-black"},Rr===Un?Bt.createElement("aside",null,Bt.createElement(z.Z,{onChange:br=>{kn(br)},height:150,isFocus:!0,placeholder:"\u6211\u8981\u56DE\u590D..."}),Bt.createElement(dt.Z,null,Bt.createElement(mt.Z,{span:24,className:"tr"},Bt.createElement(Et.ZP,{type:"primary",size:"middle",onClick:()=>Nn(this,null,function*(){if(vn==="")Ee.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const br=yield(0,$e.ts)({parent_id:er.id,content:vn,memo_type:"data_set"});kn(null),br&&(Hn(-1),tr.find(Pn=>Pn.id===br.parent_id).children.push(mr(br)),zr({type:"forumsDetail/setForumsDetailData",payload:xn(wn({},An.forumsDetailData),{memo:xn(wn({},rn),{reply_for_memo_count:(rn==null?void 0:rn.reply_for_memo_count)+1}),memo_replies:[...tr],memo_type:"data_set"})}))}})},"\u53D1\u9001")))):Bt.createElement("div",{className:"tr",style:{textAlign:"left"}},Bt.createElement("span",{className:"iconfont icon-xiaopinglun mr30 current font14",onClick:()=>Hn(Un)}),Bt.createElement(Ie.Z,{title:er.user_praise?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},Bt.createElement("span",{className:er.user_praise?"c-orange":"c-gery-888"},Bt.createElement("i",{className:"iconfont icon-dianzan4 mr5 current font14",onClick:()=>Nn(this,null,function*(){const br=yield(0,$e.vL)({id:er.id,container_type:"Memo",type:er.user_praise?0:1,memo_type:"data_set"});(br==null?void 0:br.praise_count)>=0&&(tr.find(Pn=>Pn.id===er.id).user_praise=!er.user_praise,tr.find(Pn=>Pn.id===er.id).praise_count=br==null?void 0:br.praise_count,zr({type:"forumsDetail/setForumsDetailData",payload:xn(wn({},An.forumsDetailData),{memo_replies:[...tr],memo_type:"data_set"})}))})}),er.praise_count>0?er.praise_count:"")))))))}))),Ot&&Bt.createElement("aside",{className:"bg-white pb20",style:{display:"flex",justifyContent:"center",marginTop:"20px"}},Bt.createElement(dt.Z,{justify:"space-between"},Bt.createElement(mt.Z,null),Bt.createElement(mt.Z,null,Ot&&Bt.createElement("a",{style:{color:"#3061D0",fontSize:"14px"},onClick:vr},"\u67E5\u770B\u66F4\u591A\u8BC4\u8BBA",Bt.createElement("i",{className:"icon icon-zhankaixiaojiantou ",style:{fontSize:"10px",marginLeft:"3px"}}))))),Bt.createElement("aside",{className:gt.reply},Bt.createElement(z.Z,{onBlur:()=>Tn(!1),isFocus:Dn,defaultValue:Nr,id:"writeForumsReviewId",onChange:er=>{ln(er)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Bt.createElement(dt.Z,null,Bt.createElement(mt.Z,{flex:"1"}),Bt.createElement(mt.Z,null,Bt.createElement("div",{className:gt.submitStyle,style:{width:"60px",height:"32px",textAlign:"center"},onClick:()=>Nn(void 0,null,function*(){if(Nr==="")Ee.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const er=yield(0,$e.ts)({parent_id:rn==null?void 0:rn.id,content:Nr,memo_type:"data_set"});ln(null),er&&zr({type:"forumsDetail/setForumsDetailData",payload:xn(wn({},An.forumsDetailData),{memo:xn(wn({},rn),{reply_for_memo_count:(rn==null?void 0:rn.reply_for_memo_count)+1}),memo_replies:[mr(er),...tr],memo_type:"data_set"})})}})},"\u53D1\u9001")))))};var Tr=(0,Gt.connect)(({user:Ln,forumsDetail:An,loading:Bn,globalSetting:xr})=>({user:Ln,forumsDetail:An,globalSetting:xr,loading:Bn.models.forumsDetail}),null,null,{forwardRef:!0})((0,at.forwardRef)(Zn)),qn=ft(9148),qr=ft(33633),nr=ft(59301),$r=Object.defineProperty,hi=Object.getOwnPropertySymbols,Si=Object.prototype.hasOwnProperty,Li=Object.prototype.propertyIsEnumerable,Ei=(Ln,An,Bn)=>An in Ln?$r(Ln,An,{enumerable:!0,configurable:!0,writable:!0,value:Bn}):Ln[An]=Bn,Lr=(Ln,An)=>{for(var Bn in An||(An={}))Si.call(An,Bn)&&Ei(Ln,Bn,An[Bn]);if(hi)for(var Bn of hi(An))Li.call(An,Bn)&&Ei(Ln,Bn,An[Bn]);return Ln},Ci=(Ln,An,Bn)=>new Promise((xr,zr)=>{var nn=rn=>{try{Ht(Bn.next(rn))}catch(tr){zr(tr)}},sn=rn=>{try{Ht(Bn.throw(rn))}catch(tr){zr(tr)}},Ht=rn=>rn.done?xr(rn.value):Promise.resolve(rn.value).then(nn,sn);Ht((Bn=Bn.apply(Ln,An)).next())});let et={public:"\u516C\u5F00\u6570\u636E\u96C6",mine:"\u6211\u7684\u6570\u636E\u96C6",share:"\u56E2\u961F\u5171\u4EAB",collect:"\u6211\u6536\u85CF\u7684"};const ai=({polls:Ln,globalSetting:An,loading:Bn,dispatch:xr,user:zr})=>{var nn,sn,Ht;const rn=(0,Gt.useParams)(),[tr]=(0,Gt.useSearchParams)(),[cr,Nr]=(0,at.useState)(!1),[ln,vn]=(0,at.useState)(1),[kn,Rr]=(0,at.useState)(null),[Hn,Ot]=(0,at.useState)(""),[Ut,Dn]=(0,at.useState)(),[Tn,Qt]=(0,at.useState)(1),[Fn,vr]=(0,at.useState)(1),mr=(0,at.useRef)([]),[er,Un]=(0,at.useState)([]),[Rn,$n]=(0,at.useState)(!1),[Fr,br]=(0,at.useState)(!1),[Pn,fr]=(0,at.useState)(!1),[si,xi]=(0,at.useState)([]),[zi,Yt]=(0,at.useState)(!1),[Pr,Mr]=(0,at.useState)(0),[ar,mi]=(0,at.useState)({page:1,limit:10}),ii=()=>Ci(void 0,null,function*(){Yt(!0);const sr=yield(0,pe.iw)({container_type:kn==null?void 0:kn.container_type,container_id:kn==null?void 0:kn.container_id,page:ar==null?void 0:ar.page,limit:ar==null?void 0:ar.limit});(sr==null?void 0:sr.status)==0&&(xi(sr==null?void 0:sr.data),Mr(sr==null?void 0:sr.total_count),Yt(!1))});(0,at.useEffect)(()=>{ti(),(0,Te.ZP)("/api/teach_group_shares.json",{method:"get"}).then(sr=>{(sr==null?void 0:sr.status)==0&&Un(sr==null?void 0:sr.groups)})},[]),(0,at.useEffect)(()=>{ln==2&&ei()},[ln,Tn]);const pi=(sr,un)=>(sr=Math.max(sr,0),un=Math.max(un,1),Math.ceil(sr/un)),ei=()=>{(0,pe.Ce)({id:rn==null?void 0:rn.id,page:Tn,limit:16}).then(sr=>{var un,gr;(sr==null?void 0:sr.status)==0&&(Dn((un=sr==null?void 0:sr.data)==null?void 0:un.shixuns),vr(pi((gr=sr==null?void 0:sr.data)==null?void 0:gr.count,16)))})},ti=(sr=!1)=>{br(!0),(0,pe.Ru)(rn==null?void 0:rn.id).then(un=>{var gr,Kr;(un==null?void 0:un.status)==0&&(Rr(un==null?void 0:un.data),Nr((0,Ke.Ny)()||((gr=un==null?void 0:un.data)==null?void 0:gr.is_creator)),mr.current=(Kr=un==null?void 0:un.data)==null?void 0:Kr.share_group_ids,sr&&Ot(new Date),br(!1))})},yr=()=>{$n(!1)},on=()=>{ti(),$n(!1)};return nr.createElement(oe.Z,{spinning:Fr},nr.createElement("section",{className:me.bg},kn&&nr.createElement(nr.Fragment,null,nr.createElement("div",{className:"edu-container"},nr.createElement("aside",{className:"mt10"},nr.createElement(Ue.Z,{separator:">"},nr.createElement(Ue.Z.Item,null,nr.createElement(Gt.Link,{to:"/dataset"},"\u6570\u636E\u96C6")),nr.createElement(Ue.Z.Item,null,nr.createElement(Gt.Link,{to:`/dataset?tabId=${tr.get("tabId")}`},et[tr.get("tabId")])),nr.createElement(Ue.Z.Item,null,kn==null?void 0:kn.title))),nr.createElement("aside",{className:me.wrap},nr.createElement("div",{className:me.leftContent,style:{width:cr?"78%":"87%"}},nr.createElement("div",{className:me.header},nr.createElement("div",{className:me.headerBack,onClick:()=>{Gt.history.push(`/dataset?tabId=${tr.get("tabId")}`)}},nr.createElement("i",{className:"iconfont icon-fanhui4 ",style:{fontSize:"10px",margin:"0 3px 0 5px"}}),"\u8FD4\u56DE"),nr.createElement("div",{className:me.title},kn==null?void 0:kn.title),nr.createElement("div",{className:me.time},kn==null?void 0:kn.create_at)),nr.createElement("div",{className:me.introduction},kn==null?void 0:kn.desc),nr.createElement("div",{className:me.bottom},((nn=kn==null?void 0:kn.user_info)==null?void 0:nn.image_url)&&nr.createElement("img",{className:me.user_img,alt:"\u7528\u6237\u5934\u50CF",src:`${Pe.Z.IMG_SERVER}/images/${(sn=kn==null?void 0:kn.user_info)==null?void 0:sn.image_url}`}),nr.createElement("div",{className:me.user_name},kn==null?void 0:kn.user_info_name),(Ht=kn==null?void 0:kn.data_set_tags)==null?void 0:Ht.map((sr,un)=>{var gr;return un<3?nr.createElement("div",{key:un,className:me.tags_name},sr==null?void 0:sr.tag_name):un==3?nr.createElement(Ie.Z,{key:un,title:(gr=kn==null?void 0:kn.data_set_tags)==null?void 0:gr.map((Kr,Yr)=>{var Di;if(Yr>2)return(Kr==null?void 0:Kr.tag_name)+(Yr===((Di=kn==null?void 0:kn.data_set_tags)==null?void 0:Di.length)-1?"":"\u3001")}).join("")},nr.createElement("div",{key:un,className:me.tags_name},"...")):null}),nr.createElement("div",{className:me.buttonList},nr.createElement(Ie.Z,{title:`\u5F15\u7528\u6570\uFF1A${kn==null?void 0:kn.used_count}`},nr.createElement("div",{className:`${me.buttonItem} current`},nr.createElement("i",{className:"iconfont icon-yinyong font12 mr5"}),kn==null?void 0:kn.used_count)),nr.createElement(Ie.Z,{title:`\u6D4F\u89C8\u6570\uFF1A${kn==null?void 0:kn.visited_count}`},nr.createElement("div",{className:`${me.buttonItem} current`,onClick:()=>Ci(void 0,null,function*(){var sr;((0,Ke.Ny)()||((sr=zr==null?void 0:zr.userInfo)==null?void 0:sr.login)==="mfflo3p2e")&&(fr(!0),ar.page=1,ar.limit=10,mi(Lr({},ar)),yield ii())})},nr.createElement("i",{className:"iconfont icon-chakanrenshu font12 mr5"}),kn==null?void 0:kn.visited_count)),nr.createElement(Ie.Z,{title:`\u8BC4\u8BBA\u6570\uFF1A${kn==null?void 0:kn.comment_count}`},nr.createElement("div",{className:`${me.buttonItem} current`},nr.createElement("i",{className:"iconfont icon-xiaopinglun font12 mr5"}),kn==null?void 0:kn.comment_count))))),nr.createElement("div",{className:me.rightContent,style:{width:cr?"22%":"13%"}},cr?nr.createElement("div",{style:{display:"flex",marginLeft:"auto"}},nr.createElement("div",{className:me.share,onClick:()=>Ci(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:nr.createElement("div",{className:`font14 ${me.overflow}`},nr.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"),nr.createElement(ve.default.Group,{style:{marginTop:"10px"},defaultValue:kn==null?void 0:kn.share_group_ids,onChange:sr=>{mr.current=sr}},er==null?void 0:er.map(sr=>nr.createElement(ve.default,{key:sr==null?void 0:sr.group_id,value:sr==null?void 0:sr.group_id},sr==null?void 0:sr.name)))),onOk:()=>{(0,pe.l5)({ids:[kn==null?void 0:kn.id],clazz:"DataSet",group_ids:mr.current}).then(sr=>{(sr==null?void 0:sr.status)==0&&(Ee.ZP.success("\u5171\u4EAB\u6210\u529F"),ti())})}})})},"\u5171\u4EAB"),nr.createElement("div",{className:me.publicStyle,onClick:()=>{de.default.confirm({centered:!0,okText:"\u786E\u5B9A",icon:null,cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:(kn==null?void 0:kn.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":(kn==null?void 0:kn.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:()=>Ci(void 0,null,function*(){let sr;switch(kn==null?void 0:kn.public_status){case 0:sr=(0,pe.To)(kn==null?void 0:kn.id);break;case 1:sr=(0,pe.a6)(kn==null?void 0:kn.id);break;case 2:sr=(0,pe.Dx)(kn==null?void 0:kn.id);break;default:return}sr.then(un=>{(un==null?void 0:un.status)===0&&(Ee.ZP.success("\u64CD\u4F5C\u6210\u529F"),ti())})})})}},(kn==null?void 0:kn.public_status)==0?"\u7533\u8BF7\u516C\u5F00":(kn==null?void 0:kn.public_status)==1?"\u53D6\u6D88\u516C\u5F00":"\u64A4\u9500\u7533\u8BF7\u516C\u5F00"),nr.createElement(ke.Z,{menu:{items:[{label:nr.createElement("div",null,"\u7F16\u8F91"),key:"4",onClick:()=>{$n(!0)}},{label:nr.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 Ci(this,null,function*(){(0,pe.pP)(kn==null?void 0:kn.id).then(sr=>{(sr==null?void 0:sr.status)==0&&(Ee.ZP.success("\u5220\u9664\u6210\u529F"),Gt.history.push("/dataset"))})})}})}},"\u5220\u9664"),key:"5"}]}},nr.createElement("div",{className:me.more},nr.createElement("i",{className:"iconfont icon-gengduo6 font12"})))):nr.createElement("div",{className:kn!=null&&kn.current_user_is_collect?me.collectActiveStyle:me.collectStyle,onClick:()=>{let sr;kn!=null&&kn.current_user_is_collect?sr=(0,pe.R9)({container_id:kn==null?void 0:kn.id,container_type:"DataSet"}):sr=(0,pe.nW)({container_id:kn==null?void 0:kn.id,container_type:"DataSet"}),sr.then(un=>{(un==null?void 0:un.status)===0&&ti()})}},nr.createElement("i",{className:"iconfont icon-shoucang4 font12"})," ",kn==null?void 0:kn.collect_count))),nr.createElement("div",{className:me.content},nr.createElement("div",{style:{display:"flex",alignItems:"center"}},nr.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:sr=>{var un;vn((un=sr==null?void 0:sr.target)==null?void 0:un.value)},value:ln}),nr.createElement("div",{className:me.addBtn,onClick:()=>{window.open(`/shixuns/new?dataSetId=${rn==null?void 0:rn.id}`)}},"\u521B\u5EFA\u5B9E\u8DF5\u9879\u76EE")),ln==1&&nr.createElement(ht,{dataSetInfo:kn,getInfo:ti,key:Hn,indexType:cr}),ln==2&&nr.createElement("div",null,nr.createElement("div",{className:me.shixunTooltip},nr.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"),nr.createElement(qn.wb,{dataSource:Ut,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&&nr.createElement("div",{className:me.pageStyle},nr.createElement("div",{className:Tn==1?me.pageUnCan:me.pageCan,style:{marginRight:"10px"},onClick:()=>{Tn>1&&Qt(Tn-1)}},"\u4E0A\u4E00\u9875"),nr.createElement("div",{className:Tn==Fn?me.pageUnCan:me.pageCan,style:{marginLeft:"10px"},onClick:()=>{Tn<Fn&&Qt(Tn+1)}},"\u4E0B\u4E00\u9875"))),ln==3&&nr.createElement(Tr,{memoId:kn==null?void 0:kn.memo_id})))),nr.createElement(qr.Z,{dataSetInfo:kn,visible:Rn,onClose:yr,onSuccess:on}),nr.createElement(de.default,{centered:!0,keyboard:!1,maskClosable:!1,destroyOnClose:!0,open:Pn,title:"\u6D4F\u89C8\u4FE1\u606F",width:"730px",onCancel:()=>{fr(!1)},footer:null},nr.createElement("div",null,nr.createElement(je.default,{dataSource:si,loading:zi,className:"mt10 mb10",scroll:{y:47*6},pagination:{total:Pr||0,onChange:(sr,un)=>{ar.page=sr,ar.limit=un,mi(Lr({},ar)),ii()},current:ar==null?void 0:ar.page,pageSize:ar==null?void 0:ar.limit,showTotal:sr=>nr.createElement(nr.Fragment,null,"\u5171",nr.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=>nr.createElement("span",null,sr||"--")},{title:"\u5355\u4F4D",align:"left",width:260,ellipsis:!0,dataIndex:"school_name",render:sr=>nr.createElement("span",null,sr||"--")},{title:"\u90E8\u95E8",align:"left",width:150,ellipsis:!0,dataIndex:"department_name",render:sr=>nr.createElement("span",null,sr||"--")},{title:"\u6240\u9009\u65F6\u95F4",dataIndex:"created_at",ellipsis:!0,render:sr=>nr.createElement("span",{style:{color:"#666666"}},sr?Ae()(sr).format("YYYY-MM-DD"):"--")}]})))))};var Er=(0,Gt.connect)(({polls:Ln,loading:An,user:Bn,globalSetting:xr})=>({polls:Ln,globalSetting:xr,user:Bn,loading:An.effects}))(ai)},58118:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return je}});var at=ft(59301),Gt=ft(25690),oe=ft(82326),Ue=ft(29787),Ie=ft(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=ft(84816),Ee=ft(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)([]),[Ae,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)}),Ne=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"},Ne):`\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(Ue.Z,{spinning:Ae},Ee.createElement("div",{className:de.selectContent},le==null?void 0:le.map((Be,Ge)=>{var Ye;return Ee.createElement("aside",{key:Ge},Ee.createElement("div",{className:de.contentTitle,style:{marginTop:Ge>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((Ke,Xe)=>{var ot;return Ee.createElement("div",{key:Xe,className:(ot=pe==null?void 0:pe.map(lt=>lt==null?void 0:lt.id))!=null&&ot.includes(Ke==null?void 0:Ke.id)?de.tagNameActive:de.tagName,onClick:()=>{var lt;(lt=pe==null?void 0:pe.map(ut=>ut==null?void 0:ut.id))!=null&&lt.includes(Ke==null?void 0:Ke.id)?xe(pe.filter(ut=>(ut==null?void 0:ut.id)!=(Ke==null?void 0:Ke.id))):(pe==null?void 0:pe.length)<5?xe([...pe,Ke]):Ie.ZP.warning("\u6700\u591A\u53EF\u9009\u62E95\u4E2A\u6807\u7B7E")}},Ke==null?void 0:Ke.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,Ge)=>Ee.createElement("div",{key:Ge,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 je=(0,Gt.connect)(({user:me})=>({user:me}))(Se)},84816:function(Gn,jn,ft){"use strict";ft.d(jn,{A0:function(){return Ae},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 je},_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=ft(38986),Gt=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,de=(Te,Ne,Be)=>Ne in Te?Gt(Te,Ne,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Te[Ne]=Be,ve=(Te,Ne)=>{for(var Be in Ne||(Ne={}))Ue.call(Ne,Be)&&de(Te,Be,Ne[Be]);if(oe)for(var Be of oe(Ne))Ie.call(Ne,Be)&&de(Te,Be,Ne[Be]);return Te},Ee=(Te,Ne,Be)=>new Promise((Ge,Ye)=>{var Ke=lt=>{try{ot(Be.next(lt))}catch(ut){Ye(ut)}},Xe=lt=>{try{ot(Be.throw(lt))}catch(ut){Ye(ut)}},ot=lt=>lt.done?Ge(lt.value):Promise.resolve(lt.value).then(Ke,Xe);ot((Be=Be.apply(Te,Ne)).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 je(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 Ae(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"})})}},81428:function(Gn,jn,ft){"use strict";ft.d(jn,{AL:function(){return pe},Iy:function(){return je},Qv:function(){return fe},ez:function(){return ce},jb:function(){return me}});var at=ft(32834),Gt=ft.n(at),oe=ft(11690),Ue=ft.n(oe);let Ie=1;function de(Te,Ne){const Be=Te.match(/^(\s+)(?:```)/);if(Be===null)return Ne;const Ge=Be[1];return Ne.split(`
`).map(Ye=>{const Ke=Ye.match(/^\s+/);if(Ke===null)return Ye;const[Xe]=Ke;return Xe.length>=Ge.length?Ye.slice(Ge.length):Ye}).join(`
`)}let ve=[],Ee=["<ul>"];const ke=new(Gt()).Renderer,Se=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function je(){ve.length=0,Ee=["<ul>"]}const me={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Pe(Te,Ne,Be,Ge){if(Ne>=Te.length||Te[Ne].level<=Be)return Ne;var Ye=Te[Ne];Ge.push("<li><a href='#"+Ie+Ye.anchor+"'>"+Ye.text+"</a>"),Ne++;var Ke=[];return Ne=Pe(Te,Ne,Ye.level,Ke),Ke.length>0&&(Ge.push("<ul>"),Ke.forEach(function(Xe){Ge.push(Xe)}),Ge.push("</ul>")),Ge.push("</li>"),Ne=Pe(Te,Ne,Be,Ge),Ne}function fe(){return Pe(ve,0,0,Ee),Ee.push("</ul>"),Ee.join("")}const z={heading(Te){const Ne=Se.exec(Te);if(Ie+=1,Ne)return{type:"heading",raw:Ne[0],depth:Ne[1].length,text:Ne[2]}},fences(Te){const Ne=this.rules.block.fences.exec(Te);if(Ne){const Be=Ne[0];let Ge=de(Be,Ne[3]||"");const Ye=Ne[2]?Ne[2].trim():Ne[2];if(["latex","katex","math"].indexOf(Ye)>=0){const Ke=ie(),Xe=Ge;Ge=Ke,le[Ke]={type:"block",expression:Xe}}return{type:"code",raw:Be,lang:Ye,text:Ge}}}},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,(Ne,Be)=>{const Ge=ie();return le[Ge]={type:"inline",expression:Be},Ge}),Te}const Ae=ke.listitem;ke.listitem=function(Te){return Ae(xe(Te))};const De=ke.paragraph;ke.paragraph=function(Te){return De(xe(Te))};const Fe=ke.tablecell;ke.tablecell=function(Te,Ne){return Fe(xe(Te),Ne)},ke.code=function(Te,Ne,Be){const Ge=(Ne||"").match(/\S*/)[0];return Ge?["latex","katex","math"].indexOf(Ge)>=0?`<p class='editormd-tex'>${Te}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ne}">${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,Ne,Be){let Ge=this.options.headerPrefix+Be.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ve.push({anchor:Ge,level:Ne,text:Te}),"<h"+Ne+' id="'+Ie+Ge+'">'+Te+"</h"+Ne+">"},Gt().setOptions({silent:!0,gfm:!0,pedantic:!1}),Gt().use({tokenizer:z,renderer:ke}),jn.ZP=Gt()},47257:function(Gn){(function(jn){(function(ft){if(1)Gn.exports=ft();else var at})(function(){var ft,at,Gt;return function(){function oe(Ue,Ie,de){function ve(Se,je){if(!Ie[Se]){if(!Ue[Se]){var me=void 0;if(!je&&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=Ie[Se]={exports:{}};Ue[Se][0].call(fe.exports,function(z){var te=Ue[Se][1][z];return ve(te||z)},fe,fe.exports,oe,Ue,Ie,de)}return Ie[Se].exports}for(var Ee=void 0,ke=0;ke<de.length;ke++)ve(de[ke]);return ve}return oe}()({1:[function(oe,Ue,Ie){"use strict";var de=oe("./browser/client");de.Buffer=oe("buffer").Buffer,de.urllib=oe("../shims/xhr"),de.version=oe("./browser/version").version,Ue.exports=de},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(oe,Ue,Ie){"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"),je=Se.checkBucketName,me=Ie;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 je(te),this.options.bucket=te,this},me.setBucket=function(te){return je(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(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return ce=this._bucketRequestParams("DELETE",ie,"",le),Ae.next=3,this.request(ce);case 3:if(pe=Ae.sent,!(pe.status===200||pe.status===204)){Ae.next=6;break}return Ae.abrupt("return",{res:pe.res});case 6:return Ae.next=8,this.requestError(pe);case 8:throw Ae.sent;case 9:case"end":return Ae.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(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return ce=this._bucketRequestParams("GET",ie,"acl",le),ce.successStatuses=[200],ce.xmlResponse=!0,Ae.next=5,this.request(ce);case 5:return pe=Ae.sent,Ae.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 Ae.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,Ae;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 Ae=Fe.sent,Fe.abrupt("return",{res:Ae.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(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return ce=this._bucketRequestParams("DELETE",ie,"logging",le),ce.successStatuses=[204,200],Ae.next=4,this.request(ce);case 4:return pe=Ae.sent,Ae.abrupt("return",{res:pe.res});case 6:case"end":return Ae.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,Ae,De,Fe,Te,Ne,Be,Ge,Ye;return ve.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.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>`,Ae=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>")},Ne=0,Be=le.length;Ne<Be;Ne++)Ge=le[Ne],xe+="<CORSRule>",fe(Ge.allowedOrigin).forEach(Ae),fe(Ge.allowedMethod).forEach(De),fe(Ge.allowedHeader).forEach(Fe),fe(Ge.exposeHeader).forEach(Te),Ge.maxAgeSeconds&&(xe+="<MaxAgeSeconds>".concat(Ge.maxAgeSeconds,"</MaxAgeSeconds>")),xe+="</CORSRule>";return xe+="</CORSConfiguration>",pe.content=xe,pe.mime="xml",pe.successStatuses=[200],Xe.next=16,this.request(pe);case 16:return Ye=Xe.sent,Xe.abrupt("return",{res:Ye.res});case 18:case"end":return Xe.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,Ae;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&&(Ae=pe.data.CORSRule,Pe(Ae)||(Ae=[Ae]),Ae.forEach(function(Te){var Ne={};Object.keys(Te).forEach(function(Be){Ne[Be.slice(0,1).toLowerCase()+Be.slice(1,Be.length)]=Te[Be]}),xe.push(Ne)})),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(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return ce=this._bucketRequestParams("DELETE",ie,"cors",le),ce.successStatuses=[204],Ae.next=4,this.request(ce);case 4:return pe=Ae.sent,Ae.abrupt("return",{res:pe.res});case 6:case"end":return Ae.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,Ae,De,Fe;return ve.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:if(xe=this._bucketRequestParams("PUT",ie,"referer",pe),Ae=`<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
`,Ae+=" <AllowEmptyReferer>".concat(le?"true":"false",`</AllowEmptyReferer>
`),ce&&ce.length>0){for(Ae+=` <RefererList>
`,De=0;De<ce.length;De++)Ae+=" <Referer>".concat(ce[De],`</Referer>
`);Ae+=` </RefererList>
`}else Ae+=` <RefererList />
`;return Ae+="</RefererConfiguration>",xe.content=Ae,xe.mime="xml",xe.successStatuses=[200],Ne.next=10,this.request(xe);case 10:return Fe=Ne.sent,Ne.abrupt("return",{res:Fe.res});case 12:case"end":return Ne.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,Ue,Ie){(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 je=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"),Ae=xe.createRequest,De=oe("../common/utils/encoder"),Fe=De.encoder,Te=oe("../common/client/getReqUrl"),Ne=Te.getReqUrl,Be=oe("../common/utils/setSTSToken"),Ge=Be.setSTSToken,Ye=oe("../common/utils/retry"),Ke=Ye.retry,Xe=oe("../common/utils/isFunction"),ot=Xe.isFunction,lt=new Pe;function ut(){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 Ct(){return location&&location.protocol==="https:"}function Je(bt,ct){if(ut(),!(this instanceof Je))return new Je(bt,ct);bt&&bt.inited?this.options=bt:this.options=Je.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}Ue.exports=Je,Je.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 vt=Object.assign({secure:Ct(),useFetch:!1},ct);return pe(vt)};var nt=Je.prototype;nt.debug=je,fe(nt,oe("./object")),fe(nt,oe("./bucket")),fe(nt,oe("../common/bucket/getBucketWebsite")),fe(nt,oe("../common/bucket/putBucketWebsite")),fe(nt,oe("../common/bucket/deleteBucketWebsite")),fe(nt,oe("../common/bucket/getBucketLifecycle")),fe(nt,oe("../common/bucket/putBucketLifecycle")),fe(nt,oe("../common/bucket/deleteBucketLifecycle")),fe(nt,oe("../common/bucket/putBucketVersioning")),fe(nt,oe("../common/bucket/getBucketVersioning")),fe(nt,oe("../common/bucket/getBucketInventory")),fe(nt,oe("../common/bucket/deleteBucketInventory")),fe(nt,oe("../common/bucket/listBucketInventory")),fe(nt,oe("../common/bucket/putBucketInventory")),fe(nt,oe("../common/bucket/abortBucketWorm")),fe(nt,oe("../common/bucket/completeBucketWorm")),fe(nt,oe("../common/bucket/extendBucketWorm")),fe(nt,oe("../common/bucket/getBucketWorm")),fe(nt,oe("../common/bucket/initiateBucketWorm")),fe(nt,oe("./managed-upload")),fe(nt,oe("../common/multipart-copy")),fe(nt,oe("../common/multipart")),fe(nt,oe("../common/parallel")),nt.signature=function(ct){return this.debug("authorization stringToSign: %s",ct,"info"),ce.computeSignature(this.options.accessKeySecret,ct,this.options.headerEncoding)},nt._getReqUrl=Ne,nt.authorization=function(ct,vt,ht,Lt){var dt=ce.buildCanonicalString(ct.toUpperCase(),vt,{headers:Lt,parameters:ht});return ce.authorization(this.options.accessKeyId,this.options.accessKeySecret,dt,this.options.headerEncoding)},nt.request=function(){var bt=(0,Se.default)(ke.default.mark(function ct(vt){var ht=this;return ke.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:if(!this.options.retryMax){dt.next=6;break}return dt.next=3,Ke(St.bind(this),this.options.retryMax,{errorHandler:function(Et){var gt=function(He){if(vt.stream)return!1;var we=[-1,-2].includes(He.status),Le=ht.options.requestErrorRetryHandle||function(){return!0};return we&&Le(He)};return!!gt(Et)}})(vt);case 3:return dt.abrupt("return",dt.sent);case 6:return dt.abrupt("return",St.call(this,vt));case 7:case"end":return dt.stop()}},ct,this)}));return function(ct){return bt.apply(this,arguments)}}();function St(bt){return wt.apply(this,arguments)}function wt(){return wt=(0,Se.default)(ke.default.mark(function bt(ct){var vt,ht,Lt,dt,mt,Et;return ke.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:if(!(this.options.stsToken&&ot(this.options.refreshSTSToken))){$e.next=3;break}return $e.next=3,Ge.call(this);case 3:return vt=Ae.call(this,ct),this.options.useFetch||(vt.params.mode="disable-fetch"),dt=!!ct.stream,$e.prev=6,$e.next=9,this.urllib.request(vt.url,vt.params);case 9:ht=$e.sent,this.debug("response %s %s, got %s, headers: %j",ct.method,vt.url,ht.status,ht.headers,"info"),$e.next=16;break;case 13:$e.prev=13,$e.t0=$e.catch(6),Lt=$e.t0;case 16:if(!(ht&&ct.successStatuses&&ct.successStatuses.indexOf(ht.status)===-1)){$e.next=28;break}return $e.next=19,this.requestError(ht);case 19:if(mt=$e.sent,!(mt.code==="RequestTimeTooSkewed"&&!dt)){$e.next=25;break}return this.options.amendTimeSkewed=+new Date(mt.serverTime)-new Date,$e.next=24,this.request(ct);case 24:return $e.abrupt("return",$e.sent);case 25:mt.params=ct,$e.next=32;break;case 28:if(!Lt){$e.next=32;break}return $e.next=31,this.requestError(Lt);case 31:mt=$e.sent;case 32:if(!mt){$e.next=34;break}throw mt;case 34:if(!ct.xmlResponse){$e.next=39;break}return $e.next=37,this.parseXML(ht.data);case 37:Et=$e.sent,ht.data=Et;case 39:return $e.abrupt("return",ht);case 40:case"end":return $e.stop()}},bt,this,[[6,13]])})),wt.apply(this,arguments)}nt._getResource=function(ct){var vt="/";return ct.bucket&&(vt+="".concat(ct.bucket,"/")),ct.object&&(vt+=Fe(ct.object,this.options.headerEncoding)),vt},nt._escape=function(ct){return te.encodeURIComponent(ct).replace(/%2F/g,"/")},nt._getUserAgent=function(){var ct=ve&&ve.browser?"js":"nodejs",vt="aliyun-sdk-".concat(ct,"/").concat(ie.version),ht=z.description;return!ht&&ve&&(ht="Node.js ".concat(ve.version.slice(1)," on ").concat(ve.platform," ").concat(ve.arch)),this._checkUserAgent("".concat(vt," ").concat(ht))},nt._checkUserAgent=function(ct){var vt=ct.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return vt},nt.checkBrowserAndVersion=function(ct,vt){return le.name===ct&&le.version.split(".")[0]===vt},nt.parseXML=function(ct){return new Promise(function(vt,ht){de.isBuffer(ct)&&(ct=ct.toString()),me.parseString(ct,{explicitRoot:!1,explicitArray:!1},function(Lt,dt){Lt?ht(Lt):vt(dt)})})},nt.requestError=function(){var bt=(0,Se.default)(ke.default.mark(function vt(ht){var Lt,dt,mt,Et;return ke.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:if(Lt=null,!(!ht.data||!ht.data.length)){$e.next=5;break}ht.status===-1||ht.status===-2?(Lt=new Error(ht.message),Lt.name=ht.name,Lt.status=ht.status,Lt.code=ht.name):(ht.status===404?(Lt=new Error("Object not exists"),Lt.name="NoSuchKeyError",Lt.status=404,Lt.code="NoSuchKey"):ht.status===412?(Lt=new Error("Pre condition failed"),Lt.name="PreconditionFailedError",Lt.status=412,Lt.code="PreconditionFailed"):(Lt=new Error("Unknow error, status: ".concat(ht.status)),Lt.name="UnknownError",Lt.status=ht.status),Lt.requestId=ht.headers["x-oss-request-id"],Lt.host=""),$e.next=32;break;case 5:return dt=String(ht.data),this.debug("request response error data: %s",dt,"error"),$e.prev=7,$e.next=10,this.parseXML(dt);case 10:if($e.t0=$e.sent,$e.t0){$e.next=13;break}$e.t0={};case 13:mt=$e.t0,$e.next=23;break;case 16:return $e.prev=16,$e.t1=$e.catch(7),this.debug(dt,"error"),$e.t1.message+=`
raw xml: `.concat(dt),$e.t1.status=ht.status,$e.t1.requestId=ht.headers["x-oss-request-id"],$e.abrupt("return",$e.t1);case 23:Et=mt.Message||"unknow request error, status: ".concat(ht.status),mt.Condition&&(Et+=" (condition: ".concat(mt.Condition,")")),Lt=new Error(Et),Lt.name=mt.Code?"".concat(mt.Code,"Error"):"UnknownError",Lt.status=ht.status,Lt.code=mt.Code,Lt.requestId=mt.RequestId,Lt.hostId=mt.HostId,Lt.serverTime=mt.ServerTime;case 32:return this.debug("generate error %j",Lt,"error"),$e.abrupt("return",Lt);case 34:case"end":return $e.stop()}},vt,this,[[7,16]])}));function ct(vt){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,Ue,Ie){(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"),je=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=Ie;ce.multipartUpload=function(){var Fe=(0,ke.default)(Ee.default.mark(function Ne(Be,Ge){var Ye,Ke,Xe,ot,lt,ut,Ct,Je,nt,St=arguments;return Ee.default.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(Ye=St.length>2&&St[2]!==void 0?St[2]:{},this.resetCancelFlag(),Ye.disabledMD5=Ye.disabledMD5===void 0?!0:!!Ye.disabledMD5,!(Ye.checkpoint&&Ye.checkpoint.uploadId)){bt.next=8;break}return Ge&&se(Ge)&&(Ye.checkpoint.file=Ge),bt.next=7,this._resumeMultipart(Ye.checkpoint,Ye);case 7:return bt.abrupt("return",bt.sent);case 8:return Ke=102400,Ye.mime||(se(Ge)?Ye.mime=me.getType(je.extname(Ge.name)):z(Ge)?Ye.mime=Ge.type:le(Ge)?Ye.mime="":Ye.mime=me.getType(je.extname(Ge))),Ye.headers=Ye.headers||{},this._convertMetaToHeaders(Ye.meta,Ye.headers),bt.next=14,this._getFileSize(Ge);case 14:if(Xe=bt.sent,!(Xe<Ke)){bt.next=26;break}return Ye.contentLength=Xe,bt.next=19,this.put(Be,Ge,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<Ke)){bt.next=30;break}throw new Error("partSize must not be smaller than ".concat(Ke));case 30:return bt.next=32,this.initMultipartUpload(Be,Ye);case 32:if(ut=bt.sent,Ct=ut.uploadId,Je=this._getPartSize(Xe,Ye.partSize),nt={file:Ge,name:Be,fileSize:Xe,partSize:Je,uploadId:Ct,doneParts:[]},!(Ye&&Ye.progress)){bt.next=39;break}return bt.next=39,Ye.progress(0,nt,ut.res);case 39:return bt.next=41,this._resumeMultipart(nt,Ye);case 41:return bt.abrupt("return",bt.sent);case 42:case"end":return bt.stop()}},Ne,this)}));function Te(Ne,Be){return Fe.apply(this,arguments)}return Te}(),ce._resumeMultipart=function(){var Fe=(0,ke.default)(Ee.default.mark(function Ne(Be,Ge){var Ye,Ke,Xe,ot,lt,ut,Ct,Je,nt,St,wt,bt,ct,vt,ht,Lt,dt,mt,Et;return Ee.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:if(Ye=this,!this.isCancel()){$e.next=3;break}throw this._makeCancelEvent();case 3:return Ke=Be.file,Xe=Be.fileSize,ot=Be.partSize,lt=Be.uploadId,ut=Be.doneParts,Ct=Be.name,Je=[],ut.length>0&&Pe(ut).to(Je),nt=this._divideParts(Xe,ot),St=nt.length,wt=!1,bt=function(we,Le){return new Promise(function(){var We=(0,ke.default)(Ee.default.mark(function tt(Re,_e){var Ve,it,yt,Pt,jt;return Ee.default.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:if(Bt.prev=0,we.isCancel()){Bt.next=29;break}return Ve=nt[Le-1],Bt.next=5,we._createBuffer(Ke,Ve.start,Ve.end);case 5:return it=Bt.sent,yt={content:it,size:Ve.end-Ve.start},Bt.prev=7,Bt.next=10,we._uploadPart(Ct,lt,Le,yt,Ge);case 10:Pt=Bt.sent,Bt.next=18;break;case 13:if(Bt.prev=13,Bt.t0=Bt.catch(7),Bt.t0.status!==404){Bt.next=17;break}throw we._makeAbortEvent();case 17:throw Bt.t0;case 18:if(!(!we.isCancel()&&!wt)){Bt.next=26;break}if(Be.doneParts.push({number:Le,etag:Pt.res.headers.etag}),!Ge.progress){Bt.next=23;break}return Bt.next=23,Ge.progress(ut.length/(St+1),Be,Pt.res);case 23:Re({number:Le,etag:Pt.res.headers.etag}),Bt.next=27;break;case 26:Re();case 27:Bt.next=30;break;case 29:Re();case 30:Bt.next=41;break;case 32:Bt.prev=32,Bt.t1=Bt.catch(0),jt=new Error,jt.name=Bt.t1.name,jt.message=Bt.t1.message,jt.stack=Bt.t1.stack,jt.partNum=Le,Pe(Bt.t1).to(jt),_e(jt);case 41:case"end":return Bt.stop()}},tt,null,[[0,32],[7,13]])}));return function(tt,Re){return We.apply(this,arguments)}}())},ct=Array.from(new Array(St),function(He,we){return we+1}),vt=Je.map(function(He){return He.number}),ht=ct.filter(function(He){return vt.indexOf(He)<0}),Lt=5,dt=Ge.parallel||Lt,$e.next=17,this._parallel(ht,dt,function(He){return new Promise(function(we,Le){bt(Ye,He).then(function(We){We&&Je.push(We),we()}).catch(function(We){Le(We)})})});case 17:if(mt=$e.sent,wt=!0,Et=mt.find(function(He){return He.name==="abort"}),!Et){$e.next=22;break}throw Et;case 22:if(!this.isCancel()){$e.next=25;break}throw bt=null,this._makeCancelEvent();case 25:if(!(mt&&mt.length>0)){$e.next=28;break}throw mt[0].message="Failed to upload some parts with error: ".concat(mt[0].toString()," part_num: ").concat(mt[0].partNum),mt[0];case 28:return $e.next=30,this.completeMultipartUpload(Ct,lt,Je,Ge);case 30:return $e.abrupt("return",$e.sent);case 31:case"end":return $e.stop()}},Ne,this)}));function Te(Ne,Be){return Fe.apply(this,arguments)}return Te}(),ce._getFileSize=function(){var Fe=(0,ke.default)(Ee.default.mark(function Ne(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()}},Ne)}));function Te(Ne){return Fe.apply(this,arguments)}return Te}();var pe=oe("stream"),xe=pe.Readable;function Ae(Fe,Te){if(!(this instanceof Ae))return new Ae(Fe,Te);xe.call(this,Te),this.file=Fe,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}Se.inherits(Ae,xe),Ae.prototype.readFileAndPush=function(Te){if(this.fileBuffer)for(var Ne=!0;Ne&&this.fileBuffer&&this.start<this.fileBuffer.length;){var Be=this.start,Ge=Be+Te;Ge=Ge>this.fileBuffer.length?this.fileBuffer.length:Ge,this.start=Ge,Ne=this.push(this.fileBuffer.slice(Be,Ge))}},Ae.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 Ne=16*1024;Te=Te||Ne;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,Ne){var Be=new FileReader;Be.onload=function(Ge){Te(Ge.target.result)},Be.onerror=function(Ge){Ne(Ge)},Be.readAsArrayBuffer(Fe)})}ce._createBuffer=function(){var Fe=(0,ke.default)(Ee.default.mark(function Ne(Be,Ge,Ye){var Ke,Xe;return Ee.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:if(!(z(Be)||se(Be))){lt.next=8;break}return Ke=Be.slice(Ge,Ye),lt.next=4,De(Ke);case 4:return Xe=lt.sent,lt.abrupt("return",de.from(Xe));case 8:if(!le(Be)){lt.next=12;break}return lt.abrupt("return",Be.subarray(Ge,Ye));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return lt.stop()}},Ne)}));function Te(Ne,Be,Ge){return Fe.apply(this,arguments)}return Te}(),ce._getPartSize=function(Te,Ne){var Be=1e4,Ge=1*1024*1024;Ne||(Ne=Ge);var Ye=Math.ceil(Te/Be);return Ne<Ye&&(Ne=Ye,console.warn("partSize has been set to ".concat(Ne,", because the partSize you provided causes partNumber to be greater than 10,000"))),Ne},ce._divideParts=function(Te,Ne){for(var Be=Math.ceil(Te/Ne),Ge=[],Ye=0;Ye<Be;Ye++){var Ke=Ne*Ye,Xe=Math.min(Ke+Ne,Te);Ge.push({start:Ke,end:Xe})}return Ge}}).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,Ue,Ie){"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"),je=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,Ae=Ie;Ae.append=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Ne,Be,Ge){var Ye;return ve.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Ge=Ge||{},Ge.position===void 0&&(Ge.position="0"),Ge.subres={append:"",position:Ge.position},Ge.method="POST",Xe.next=6,this.put(Ne,Be,Ge);case 6:return Ye=Xe.sent,Ye.nextAppendPosition=Ye.res.headers["x-oss-next-append-position"],Xe.abrupt("return",Ye);case 9:case"end":return Xe.stop()}},Te,this)}));function Fe(Te,Ne,Be){return De.apply(this,arguments)}return Fe}(),Ae.put=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Ne,Be,Ge){var Ye,Ke,Xe,ot,lt;return ve.default.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(Ge=Ge||{},Ge.disabledMD5=Ge.disabledMD5===void 0?!0:!!Ge.disabledMD5,Ge.headers=Ge.headers||{},Ne=this._objectName(Ne),!ce(Be)){Ct.next=8;break}Ye=Be,Ct.next=19;break;case 8:if(!(te(Be)||ie(Be))){Ct.next=18;break}return Ge.mime||(ie(Be)?Ge.mime=me.getType(je.extname(Be.name)):Ge.mime=Be.type),Ct.next=12,this._createBuffer(Be,0,Be.size);case 12:return Ye=Ct.sent,Ct.next=15,this._getFileSize(Be);case 15:Ge.contentLength=Ct.sent,Ct.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(Ge.meta,Ge.headers),Ke=Ge.method||"PUT",Xe=this._objectRequestParams(Ke,Ne,Ge),Pe.encodeCallback(Xe,Ge),Xe.mime=Ge.mime,Xe.disabledMD5=Ge.disabledMD5,Xe.content=Ye,Xe.successStatuses=[200],Ct.next=29,this.request(Xe);case 29:return ot=Ct.sent,lt={name:Ne,url:this._objectUrl(Ne),res:ot.res},Xe.headers&&Xe.headers["x-oss-callback"]&&(lt.data=JSON.parse(ot.data.toString())),Ct.abrupt("return",lt);case 33:case"end":return Ct.stop()}},Te,this)}));function Fe(Te,Ne,Be){return De.apply(this,arguments)}return Fe}(),Ae.putStream=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Ne,Be,Ge){var Ye,Ke,Xe,ot;return ve.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return Ge=Ge||{},Ge.headers=Ge.headers||{},Ne=this._objectName(Ne),Ge.contentLength?Ge.headers["Content-Length"]=Ge.contentLength:Ge.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(Ge.meta,Ge.headers),Ye=Ge.method||"PUT",Ke=this._objectRequestParams(Ye,Ne,Ge),Pe.encodeCallback(Ke,Ge),Ke.mime=Ge.mime,Ke.stream=Be,Ke.successStatuses=[200],ut.next=13,this.request(Ke);case 13:return Xe=ut.sent,ot={name:Ne,url:this._objectUrl(Ne),res:Xe.res},Ke.headers&&Ke.headers["x-oss-callback"]&&(ot.data=JSON.parse(Xe.data.toString())),ut.abrupt("return",ot);case 17:case"end":return ut.stop()}},Te,this)}));function Fe(Te,Ne,Be){return De.apply(this,arguments)}return Fe}(),fe(Ae,oe("../common/object/copyObject")),fe(Ae,oe("../common/object/getObjectTagging")),fe(Ae,oe("../common/object/putObjectTagging")),fe(Ae,oe("../common/object/deleteObjectTagging")),fe(Ae,oe("../common/image")),fe(Ae,oe("../common/object/getBucketVersions")),fe(Ae,oe("../common/object/getACL")),fe(Ae,oe("../common/object/putACL")),fe(Ae,oe("../common/object/head")),fe(Ae,oe("../common/object/delete")),fe(Ae,oe("../common/object/get")),fe(Ae,oe("../common/object/putSymlink")),fe(Ae,oe("../common/object/getSymlink")),fe(Ae,oe("../common/object/deleteMulti")),fe(Ae,oe("../common/object/getObjectMeta")),fe(Ae,oe("../common/object/getObjectUrl")),fe(Ae,oe("../common/object/generateObjectUrl")),fe(Ae,oe("../common/object/signatureUrl")),fe(Ae,oe("../common/object/asyncSignatureUrl")),Ae.putMeta=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Ne,Be,Ge){var Ye;return ve.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Xe.next=2,this.copy(Ne,Ne,{meta:Be||{},timeout:Ge&&Ge.timeout,ctx:Ge&&Ge.ctx});case 2:return Ye=Xe.sent,Xe.abrupt("return",Ye);case 4:case"end":return Xe.stop()}},Te,this)}));function Fe(Te,Ne,Be){return De.apply(this,arguments)}return Fe}(),Ae.list=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Ne,Be){var Ge,Ye,Ke,Xe,ot;return ve.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return Ge=this._objectRequestParams("GET","",Be),Ge.query=Ne,Ge.xmlResponse=!0,Ge.successStatuses=[200],ut.next=6,this.request(Ge);case 6:return Ye=ut.sent,Ke=Ye.data.Contents||[],Xe=this,Ke&&(Array.isArray(Ke)||(Ke=[Ke]),Ke=Ke.map(function(Ct){return{name:Ct.Key,url:Xe._objectUrl(Ct.Key),lastModified:Ct.LastModified,etag:Ct.ETag,type:Ct.Type,size:Number(Ct.Size),storageClass:Ct.StorageClass,owner:{id:Ct.Owner.ID,displayName:Ct.Owner.DisplayName}}})),ot=Ye.data.CommonPrefixes||null,ot&&(Array.isArray(ot)||(ot=[ot]),ot=ot.map(function(Ct){return Ct.Prefix})),ut.abrupt("return",{res:Ye.res,objects:Ke,prefixes:ot,nextMarker:Ye.data.NextMarker||null,isTruncated:Ye.data.IsTruncated==="true"});case 13:case"end":return ut.stop()}},Te,this)}));function Fe(Te,Ne){return De.apply(this,arguments)}return Fe}(),Ae.listV2=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Ne){var Be,Ge,Ye,Ke,Xe,ot,lt,ut=arguments;return ve.default.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Be=ut.length>1&&ut[1]!==void 0?ut[1]:{},Ge=Ne["continuation-token"]||Ne.continuationToken,Ge&&(Be.subres=Object.assign({"continuation-token":Ge},Be.subres)),Ye=this._objectRequestParams("GET","",Be),Ye.query=Object.assign({"list-type":2},Ne),delete Ye.query["continuation-token"],delete Ye.query.continuationToken,Ye.xmlResponse=!0,Ye.successStatuses=[200],Je.next=11,this.request(Ye);case 11:return Ke=Je.sent,Xe=Ke.data.Contents||[],ot=this,Xe&&(Array.isArray(Xe)||(Xe=[Xe]),Xe=Xe.map(function(nt){var St=null;return nt.Owner&&(St={id:nt.Owner.ID,displayName:nt.Owner.DisplayName}),{name:nt.Key,url:ot._objectUrl(nt.Key),lastModified:nt.LastModified,etag:nt.ETag,type:nt.Type,size:Number(nt.Size),storageClass:nt.StorageClass,owner:St}})),lt=Ke.data.CommonPrefixes||null,lt&&(Array.isArray(lt)||(lt=[lt]),lt=lt.map(function(nt){return nt.Prefix})),Je.abrupt("return",{res:Ke.res,objects:Xe,prefixes:lt,isTruncated:Ke.data.IsTruncated==="true",keyCount:+Ke.data.KeyCount,continuationToken:Ke.data.ContinuationToken||null,nextContinuationToken:Ke.data.NextContinuationToken||null});case 18:case"end":return Je.stop()}},Te,this)}));function Fe(Te){return De.apply(this,arguments)}return Fe}(),Ae.restore=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Ne){var Be,Ge,Ye,Ke,Xe=arguments;return ve.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return Be=Xe.length>1&&Xe[1]!==void 0?Xe[1]:{type:"Archive"},Be=Be||{},Be.subres=Object.assign({restore:""},Be.subres),Be.versionId&&(Be.subres.versionId=Be.versionId),Ge=this._objectRequestParams("POST",Ne,Be),Be.type==="ColdArchive"&&(Ye={RestoreRequest:{Days:Be.Days?Be.Days:2,JobParameters:{Tier:Be.JobParameters?Be.JobParameters:"Standard"}}},Ge.content=xe(Ye,{headers:!0}),Ge.mime="xml"),Ge.successStatuses=[202],lt.next=9,this.request(Ge);case 9:return Ke=lt.sent,lt.abrupt("return",{res:Ke.res});case 11:case"end":return lt.stop()}},Te,this)}));function Fe(Te){return De.apply(this,arguments)}return Fe}(),Ae._objectUrl=function(Fe){return this._getReqUrl({bucket:this.options.bucket,object:Fe})},Ae._objectRequestParams=function(Fe,Te,Ne){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");Ne=Ne||{},Te=this._objectName(Te);var Be={object:Te,bucket:this.options.bucket,method:Fe,subres:Ne&&Ne.subres,timeout:Ne&&Ne.timeout,ctx:Ne&&Ne.ctx};return Ne.headers&&(Be.headers={},Se(Ne.headers).to(Be.headers)),Be},Ae._objectName=function(Fe){return Fe.replace(/^\/+/,"")},Ae._convertMetaToHeaders=function(Fe,Te){Fe&&Object.keys(Fe).forEach(function(Ne){Te["x-oss-meta-".concat(Ne)]=Fe[Ne]})},Ae._deleteFileSafe=function(Fe){var Te=this;return new Promise(function(Ne){ke.exists(Fe,function(Be){Be?ke.unlink(Fe,function(Ge){Ge&&Te.debug("unlink %j error: %s",Fe,Ge,"error"),Ne()}):Ne()})})}},{"../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,Ue,Ie){"use strict";Ie.version="6.18.1"},{}],7:[function(oe,Ue,Ie){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.abortBucketWorm=void 0;var ke=oe("../utils/checkBucketName");function Se(me,Pe){return je.apply(this,arguments)}function je(){return je=(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)})),je.apply(this,arguments)}Ie.abortBucketWorm=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(oe,Ue,Ie){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.completeBucketWorm=void 0;var ke=oe("../utils/checkBucketName");function Se(me,Pe,fe){return je.apply(this,arguments)}function je(){return je=(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)})),je.apply(this,arguments)}Ie.completeBucketWorm=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(oe,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.deleteBucketInventory=void 0;var ke=oe("../utils/checkBucketName");function Se(me,Pe){return je.apply(this,arguments)}function je(){return je=(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)})),je.apply(this,arguments)}Ie.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,Ue,Ie){"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,je=Ie;je.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,Ue,Ie){"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,je=Ie;je.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,Ue,Ie){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.extendBucketWorm=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/obj2xml");function je(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)}Ie.extendBucketWorm=je},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(oe,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.getBucketInventory=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/formatInventoryConfig");function je(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)}Ie.getBucketInventory=je},{"../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,Ue,Ie){"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,je=oe("../utils/isArray"),me=je.isArray,Pe=oe("../utils/formatObjKey"),fe=Pe.formatObjKey,z=Ie;z.getBucketLifecycle=function(){var te=(0,Ee.default)(ve.default.mark(function ie(le,ce){var pe,xe,Ae;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,Ae=xe.data.Rule||null,Ae&&(me(Ae)||(Ae=[Ae]),Ae=Ae.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:Ae,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,Ue,Ie){"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,je=Ie;je.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,Ue,Ie){"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,je=oe("../utils/isObject"),me=je.isObject,Pe=Ie;Pe.getBucketWebsite=function(){var fe=(0,Ee.default)(ve.default.mark(function te(se,ie){var le,ce,pe;return ve.default.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return Se(se),le=this._bucketRequestParams("GET",se,"website",ie),le.successStatuses=[200],le.xmlResponse=!0,Ae.next=6,this.request(le);case 6:return ce=Ae.sent,pe=[],ce.data.RoutingRules&&ce.data.RoutingRules.RoutingRule&&(me(ce.data.RoutingRules.RoutingRule)?pe=[ce.data.RoutingRules.RoutingRule]:pe=ce.data.RoutingRules.RoutingRule),Ae.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 Ae.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,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.getBucketWorm=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/dataFix");function je(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)}Ie.getBucketWorm=je},{"../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,Ue,Ie){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.initiateBucketWorm=void 0;var ke=oe("../utils/obj2xml"),Se=oe("../utils/checkBucketName");function je(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)}Ie.initiateBucketWorm=je},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(oe,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.listBucketInventory=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/formatInventoryConfig");function je(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,Ae=arguments;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return z=Ae.length>1&&Ae[1]!==void 0?Ae[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)}Ie.listBucketInventory=je},{"../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,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.putBucketInventory=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/obj2xml");function je(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,Ae,De,Fe,Te,Ne=arguments;return ve.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return te=Ne.length>2&&Ne[2]!==void 0?Ne[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/"),Ae={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(Ae,{headers:!0,firstUpperCase:!0}),Fe=this._bucketRequestParams("PUT",fe,se,te),Fe.successStatuses=[200],Fe.mime="xml",Fe.content=De,Ge.next=14,this.request(Fe);case 14:return Te=Ge.sent,Ge.abrupt("return",{status:Te.status,res:Te.res});case 16:case"end":return Ge.stop()}},Pe,this)})),me.apply(this,arguments)}Ie.putBucketInventory=je},{"../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,Ue,Ie){"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,je=oe("../utils/isArray"),me=je.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,Ae=Ie;Ae.putBucketLifecycle=function(){var Be=(0,Ee.default)(ve.default.mark(function Ye(Ke,Xe,ot){var lt,ut,Ct,Je,nt;return ve.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(Se(Ke),me(Xe)){wt.next=3;break}throw new Error("rules must be Array");case 3:return lt=this._bucketRequestParams("PUT",Ke,"lifecycle",ot),ut=[],Ct={LifecycleConfiguration:{Rule:ut}},Xe.forEach(function(bt){De(bt),Ne(bt),bt.id&&(bt.ID=bt.id,delete bt.id),ut.push(bt)}),Je=ie(Ct,{headers:!0,firstUpperCase:!0}),lt.content=Je,lt.mime="xml",lt.successStatuses=[200],wt.next=13,this.request(lt);case 13:return nt=wt.sent,wt.abrupt("return",{res:nt.res});case 15:case"end":return wt.stop()}},Ye,this)}));function Ge(Ye,Ke,Xe){return Be.apply(this,arguments)}return Ge}();function De(Be){Be.days&&(Be.expiration={days:Be.days}),Be.date&&(Be.expiration={createdBeforeDate:Be.date})}function Fe(Be,Ge){var Ye=Be.days,Ke=Be.createdBeforeDate;if(!Ye&&!Ke)throw new Error("".concat(Ge," must includes days or createdBeforeDate"));if(Ye&&!/^[1-9][0-9]*$/.test(Ye))throw new Error("days must be a positive integer");if(Ke&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(Ke))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 Ge={},Ye=fe(Be);Ye.forEach(function(Ke){Ge[Ke.key]=Ke.value}),ce(Ge)}function Ne(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,Ue,Ie){"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,je=oe("../utils/obj2xml"),me=je.obj2xml,Pe=Ie;Pe.putBucketVersioning=function(){var fe=(0,Ee.default)(ve.default.mark(function te(se,ie){var le,ce,pe,xe,Ae=arguments;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:if(le=Ae.length>2&&Ae[2]!==void 0?Ae[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,Ue,Ie){"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,je=oe("../utils/obj2xml"),me=je.obj2xml,Pe=oe("../utils/isArray"),fe=Pe.isArray,z=Ie;z.putBucketWebsite=function(){var te=(0,Ee.default)(ve.default.mark(function ie(le){var ce,pe,xe,Ae,De,Fe,Te,Ne=arguments;return ve.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:if(ce=Ne.length>1&&Ne[1]!==void 0?Ne[1]:{},pe=Ne.length>2?Ne[2]:void 0,Se(le),xe=this._bucketRequestParams("PUT",le,"website",pe),Ae={Suffix:ce.index||"index.html"},De={IndexDocument:Ae},Fe={WebsiteConfiguration:De},ce.supportSubDir&&(Ae.SupportSubDir=ce.supportSubDir),ce.type&&(Ae.Type=ce.type),ce.error&&(De.ErrorDocument={Key:ce.error}),ce.routingRules===void 0){Ge.next=14;break}if(fe(ce.routingRules)){Ge.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],Ge.next=20,this.request(xe);case 20:return Te=Ge.sent,Ge.abrupt("return",{res:Te.res});case 22:case"end":return Ge.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,Ue,Ie){(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"),Ie.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 je=de.from(JSON.stringify(Se)).toString("base64");if(Ee.headers["x-oss-callback"]=je,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,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.getReqUrl=void 0;var ve=de(oe("copy-to")),Ee=de(oe("url")),ke=de(oe("merge-descriptors")),Se=de(oe("is-type-of")),je=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&&!je.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)}Ie.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,Ue,Ie){"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"),je=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}Ue.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=je(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,Ue,Ie){"use strict";var de=oe("merge-descriptors"),ve=Ie;de(ve,oe("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(oe,Ue,Ie){"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,je=oe("querystring"),me=oe("js-base64"),Pe=me.Base64.encode,fe=Ie;fe.processObjectSave=function(){var te=(0,Ee.default)(ve.default.mark(function ie(le,ce,pe,xe){var Ae,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),Ae=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)},Ae.content=je.stringify(Fe),Be.next=12,this.request(Ae);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,Ue,Ie){"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"),je=Ie;je.uploadPartCopy=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se,ie,le){var ce,pe,xe,Ae,De,Fe=arguments;return ve.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.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},Ae=this._objectRequestParams("PUT",z,ce),Ae.mime=ce.mime,Ae.successStatuses=[200],Ne.next=12,this.request(Ae);case 12:return De=Ne.sent,Ne.abrupt("return",{name:z,etag:De.res.headers.etag,res:De.res});case 14:case"end":return Ne.stop()}},fe,this)}));function Pe(fe,z,te,se,ie){return me.apply(this,arguments)}return Pe}(),je.multipartUploadCopy=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te){var se,ie,le,ce,pe,xe,Ae,De,Fe,Te,Ne,Be,Ge=arguments;return ve.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return se=Ge.length>2&&Ge[2]!==void 0?Ge[2]:{},this.resetCancelFlag(),ie=se.versionId,le=ie===void 0?null:ie,ce={versionId:le},Ke.next=6,this._getObjectMeta(te.sourceBucketName,te.sourceKey,ce);case 6:if(pe=Ke.sent,xe=pe.res.headers["content-length"],te.startOffset=te.startOffset||0,te.endOffset=te.endOffset||xe,!(se.checkpoint&&se.checkpoint.uploadId)){Ke.next=14;break}return Ke.next=13,this._resumeMultipartCopy(se.checkpoint,te,se);case 13:return Ke.abrupt("return",Ke.sent);case 14:if(Ae=102400,De=te.endOffset-te.startOffset,!(De<Ae)){Ke.next=18;break}throw new Error("copySize must not be smaller than ".concat(Ae));case 18:if(!(se.partSize&&se.partSize<Ae)){Ke.next=20;break}throw new Error("partSize must not be smaller than ".concat(Ae));case 20:return Ke.next=22,this.initMultipartUpload(z,se);case 22:if(Fe=Ke.sent,Te=Fe.uploadId,Ne=this._getPartSize(De,se.partSize),Be={name:z,copySize:De,partSize:Ne,uploadId:Te,doneParts:[]},!(se&&se.progress)){Ke.next=29;break}return Ke.next=29,se.progress(0,Be,Fe.res);case 29:return Ke.next=31,this._resumeMultipartCopy(Be,te,se);case 31:return Ke.abrupt("return",Ke.sent);case 32:case"end":return Ke.stop()}},fe,this)}));function Pe(fe,z){return me.apply(this,arguments)}return Pe}(),je._resumeMultipartCopy=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se){var ie,le,ce,pe,xe,Ae,De,Fe,Te,Ne,Be,Ge,Ye,Ke,Xe,ot,lt,ut,Ct,Je,nt;return ve.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(!this.isCancel()){wt.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,Ae=z.uploadId,De=z.doneParts,Fe=z.name,Te=this._divideMultipartCopyParts(pe,xe,te.startOffset),Ne=Te.length,Be={headers:{}},se.copyheaders&&Se(se.copyheaders).to(Be.headers),le&&Se(ce).to(Be),Ge=function(ct,vt,ht){return new Promise(function(){var Lt=(0,Ee.default)(ve.default.mark(function dt(mt,Et){var gt,$e,He;return ve.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(Le.prev=0,ct.isCancel()){Le.next=22;break}return gt=Te[vt-1],$e="".concat(gt.start,"-").concat(gt.end-1),Le.prev=4,Le.next=7,ct.uploadPartCopy(Fe,Ae,vt,$e,ht,Be);case 7:He=Le.sent,Le.next=15;break;case 10:if(Le.prev=10,Le.t0=Le.catch(4),Le.t0.status!==404){Le.next=14;break}throw ct._makeAbortEvent();case 14:throw Le.t0;case 15:if(ct.isCancel()){Le.next=22;break}if(ke("content-range ".concat(He.res.headers["content-range"])),De.push({number:vt,etag:He.res.headers.etag}),z.doneParts=De,!(se&&se.progress)){Le.next=22;break}return Le.next=22,se.progress(De.length/Ne,z,He.res);case 22:mt(),Le.next=29;break;case 25:Le.prev=25,Le.t1=Le.catch(0),Le.t1.partNum=vt,Et(Le.t1);case 29:case"end":return Le.stop()}},dt,null,[[0,25],[4,10]])}));return function(dt,mt){return Lt.apply(this,arguments)}}())},Ye=Array.from(new Array(Ne),function(bt,ct){return ct+1}),Ke=De.map(function(bt){return bt.number}),Xe=Ye.filter(function(bt){return Ke.indexOf(bt)<0}),ot=5,lt=se.parallel||ot,!(this.checkBrowserAndVersion("Internet Explorer","10")||lt===1)){wt.next=28;break}ut=0;case 18:if(!(ut<Xe.length)){wt.next=26;break}if(!this.isCancel()){wt.next=21;break}throw this._makeCancelEvent();case 21:return wt.next=23,Ge(this,Xe[ut],te);case 23:ut++,wt.next=18;break;case 26:wt.next=40;break;case 28:return wt.next=30,this._parallelNode(Xe,lt,Ge,te);case 30:if(Ct=wt.sent,Je=Ct.find(function(bt){return bt.name==="abort"}),!Je){wt.next=34;break}throw Je;case 34:if(!this.isCancel()){wt.next=36;break}throw this._makeCancelEvent();case 36:if(!(Ct&&Ct.length>0)){wt.next=40;break}throw nt=Ct[0],nt.message="Failed to copy some parts with error: ".concat(nt.toString()," part_num: ").concat(nt.partNum),nt;case 40:return wt.next=42,this.completeMultipartUpload(Fe,Ae,De,se);case 42:return wt.abrupt("return",wt.sent);case 43:case"end":return wt.stop()}},fe,this)}));function Pe(fe,z,te){return me.apply(this,arguments)}return Pe}(),je._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},je._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,Ue,Ie){(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"),je=oe("./callback"),me=oe("./utils/deepCopy"),Pe=me.deepCopyWith,fe=oe("./utils/isBuffer"),z=fe.isBuffer,te=oe("./utils/omit"),se=te.omit,ie=Ie;ie.listUploads=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,Ae){var De,Fe,Te,Ne;return Ee.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return Ae=Ae||{},De={},Se(Ae).to(De),De.subres="uploads",Fe=this._objectRequestParams("GET","",De),Fe.query=xe,Fe.xmlResponse=!0,Fe.successStatuses=[200],Ge.next=10,this.request(Fe);case 10:return Te=Ge.sent,Ne=Te.data.Upload||[],Array.isArray(Ne)||(Ne=[Ne]),Ne=Ne.map(function(Ye){return{name:Ye.Key,uploadId:Ye.UploadId,initiated:Ye.Initiated}}),Ge.abrupt("return",{res:Te.res,uploads:Ne,bucket:Te.data.Bucket,nextKeyMarker:Te.data.NextKeyMarker,nextUploadIdMarker:Te.data.NextUploadIdMarker,isTruncated:Te.data.IsTruncated==="true"});case 15:case"end":return Ge.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,Ae,De,Fe){var Te,Ne,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:Ae},Ne=this._objectRequestParams("GET",xe,Te),Ne.query=De,Ne.xmlResponse=!0,Ne.successStatuses=[200],Ye.next=10,this.request(Ne);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,Ae,De){return le.apply(this,arguments)}return ce}(),ie.abortMultipartUpload=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,Ae,De){var Fe,Te,Ne;return Ee.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return this._stop(),De=De||{},Fe={},Se(De).to(Fe),Fe.subres={uploadId:Ae},Te=this._objectRequestParams("DELETE",xe,Fe),Te.successStatuses=[204],Ge.next=9,this.request(Te);case 9:return Ne=Ge.sent,Ge.abrupt("return",{res:Ne.res});case 11:case"end":return Ge.stop()}},pe,this)}));function ce(pe,xe,Ae){return le.apply(this,arguments)}return ce}(),ie.initMultipartUpload=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,Ae){var De,Fe,Te;return Ee.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return Ae=Ae||{},De={},Se(Ae).to(De),De.headers=De.headers||{},this._convertMetaToHeaders(Ae.meta,De.headers),De.subres="uploads",Fe=this._objectRequestParams("POST",xe,De),Fe.mime=Ae.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,Ae,De,Fe,Te,Ne,Be){var Ge,Ye;return Ee.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:if(Ge={size:Ne-Te},Ye=de&&de.browser,!Ye){Xe.next=8;break}return Xe.next=5,this._createBuffer(Fe,Te,Ne);case 5:Ge.content=Xe.sent,Xe.next=11;break;case 8:return Xe.next=10,this._createStream(Fe,Te,Ne);case 10:Ge.stream=Xe.sent;case 11:return Xe.next=13,this._uploadPart(xe,Ae,De,Ge,Be);case 13:return Xe.abrupt("return",Xe.sent);case 14:case"end":return Xe.stop()}},pe,this)}));function ce(pe,xe,Ae,De,Fe,Te,Ne){return le.apply(this,arguments)}return ce}(),ie.completeMultipartUpload=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,Ae,De,Fe){var Te,Ne,Be,Ge,Ye,Ke,Xe,ot;return Ee.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:for(Te=De.concat().sort(function(Ct,Je){return Ct.number-Je.number}).filter(function(Ct,Je,nt){return!Je||Ct.number!==nt[Je-1].number}),Ne=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,Be=0;Be<Te.length;Be++)Ge=Te[Be],Ne+=`<Part>
`,Ne+="<PartNumber>".concat(Ge.number,`</PartNumber>
`),Ne+="<ETag>".concat(Ge.etag,`</ETag>
`),Ne+=`</Part>
`;return Ne+="</CompleteMultipartUpload>",Fe=Fe||{},Ye={},Ye=Pe(Fe,function(Ct){if(z(Ct))return null}),Ye.subres={uploadId:Ae},Ye.headers=se(Ye.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),Ke=this._objectRequestParams("POST",xe,Ye),je.encodeCallback(Ke,Ye),Ke.mime="xml",Ke.content=Ne,Ke.headers&&Ke.headers["x-oss-callback"]||(Ke.xmlResponse=!0),Ke.successStatuses=[200],ut.next=17,this.request(Ke);case 17:if(Xe=ut.sent,!Fe.progress){ut.next=21;break}return ut.next=21,Fe.progress(1,null,Xe.res);case 21:return ot={res:Xe.res,bucket:Ke.bucket,name:xe,etag:Xe.res.headers.etag},Ke.headers&&Ke.headers["x-oss-callback"]&&(ot.data=JSON.parse(Xe.data.toString())),ut.abrupt("return",ot);case 24:case"end":return ut.stop()}},pe,this)}));function ce(pe,xe,Ae,De){return le.apply(this,arguments)}return ce}(),ie._uploadPart=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,Ae,De,Fe,Te){var Ne,Be,Ge,Ye;return Ee.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Te=Te||{},Ne={},Se(Te).to(Ne),Ne.headers=Ne.headers||{},Ne.headers["Content-Length"]=Fe.size,Ne.headers=se(Ne.headers,["x-oss-server-side-encryption"]),Ne.subres={partNumber:De,uploadId:Ae},Be=this._objectRequestParams("PUT",xe,Ne),Be.mime=Ne.mime,Ge=de&&de.browser,Ge?Be.content=Fe.content:Be.stream=Fe.stream,Be.successStatuses=[200],Be.disabledMD5=Te.disabledMD5,Xe.next=15,this.request(Be);case 15:if(Ye=Xe.sent,Ye.res.headers.etag){Xe.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),Xe.abrupt("return",{name:xe,etag:Ye.res.headers.etag,res:Ye.res});case 20:case"end":return Xe.stop()}},pe,this)}));function ce(pe,xe,Ae,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,Ue,Ie){"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"),je=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=Ie;le.asyncSignatureUrl=function(){var ce=(0,Ee.default)(ve.default.mark(function xe(Ae,De){var Fe,Te,Ne,Be,Ge;return ve.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(!fe(this.options.endpoint.hostname)){Ke.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(De=De||{},Ae=this._objectName(Ae),De.method=De.method||"GET",Fe=Se.timestamp()+(De.expires||1800),Te={bucket:this.options.bucket,object:Ae},Ne=this._getResource(Te),!(this.options.stsToken&&ie(this.options.refreshSTSToken))){Ke.next=11;break}return Ke.next=11,te.call(this);case 11:return this.options.stsToken&&(De["security-token"]=this.options.stsToken),Be=me._signatureForURL(this.options.accessKeySecret,De,Ne,Fe),Ge=ke.parse(this._getReqUrl(Te)),Ge.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Fe,Signature:Be.Signature},je(Be.subResource).to(Ge.query),Ke.abrupt("return",Ge.format());case 17:case"end":return Ke.stop()}},xe,this)}));function pe(xe,Ae){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,Ue,Ie){"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"),je=Se.checkBucketName,me=Ie,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,Ae;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,Ae=xe.data,Ae&&(Ae={etag:Ae.ETag,lastModified:Ae.LastModified}),Fe.abrupt("return",{data:Ae,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")),je(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,Ue,Ie){"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=Ie;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 je(me){return Se.apply(this,arguments)}return je}()},{"@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,Ue,Ie){"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"),je=Se.obj2xml,me=Ie;me.deleteMulti=function(){var Pe=(0,Ee.default)(ve.default.mark(function z(te){var se,ie,le,ce,pe,xe,Ae,De,Fe,Te,Ne,Be,Ge,Ye=arguments;return ve.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:if(se=Ye.length>1&&Ye[1]!==void 0?Ye[1]:{},ie=[],!(!te||!te.length)){Xe.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,Ae=pe.versionId,ce.Key=ke.escape(this._objectName(xe)),ce.VersionId=Ae),ie.push(ce);return De={Delete:{Quiet:!!se.quiet,Object:ie}},Fe=je(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],Xe.next=16,this.request(Te);case 16:return Ne=Xe.sent,Be=Ne.data,Ge=Be&&Be.Deleted||null,Ge&&(Array.isArray(Ge)||(Ge=[Ge])),Xe.abrupt("return",{res:Ne.res,deleted:Ge||[]});case 21:case"end":return Xe.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,Ue,Ie){"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=Ie;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 je(me){return Se.apply(this,arguments)}return je}()},{"@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,Ue,Ie){"use strict";oe("core-js/modules/es.array.concat.js");var de=oe("url"),ve=oe("../utils/isIP"),Ee=ve.isIP,ke=Ie;ke.generateObjectUrl=function(je,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(je))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(oe,Ue,Ie){(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"),je=oe("is-type-of"),me=Ie;me.get=function(){var Pe=(0,ke.default)(Ee.default.mark(function z(te,se){var ie,le,ce,pe,xe,Ae,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,je.writableStream(se)?le=se:je.string(se)?(le=Se.createWriteStream(se),ce=!0):ie=se,ie=ie||{},pe=de&&de.browser,xe=ie.responseCacheControl===null?"":"no-cache",Ae=pe&&xe?{"response-cache-control":xe}:{},ie.subres=Object.assign(Ae,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,Ue,Ie){"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=Ie;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 je(me){return Se.apply(this,arguments)}return je}()},{"@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,Ue,Ie){"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=Ie,Se=oe("../utils/isObject"),je=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,Ae,De,Fe,Te,Ne=arguments;return ve.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:if(le=Ne.length>0&&Ne[0]!==void 0?Ne[0]:{},ce=Ne.length>1&&Ne[1]!==void 0?Ne[1]:{},!(le.versionIdMarker&&le.keyMarker===void 0)){Ge.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),Ge.next=12,this.request(pe);case 12:return xe=Ge.sent,Ae=xe.data.Version||[],De=xe.data.DeleteMarker||[],Fe=this,Ae&&(Array.isArray(Ae)||(Ae=[Ae]),Ae=Ae.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})),Ge.abrupt("return",{res:xe.res,objects:Ae,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 Ge.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 je(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,Ue,Ie){"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=Ie;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 je(me,Pe){return Se.apply(this,arguments)}return je}()},{"@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,Ue,Ie){"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=Ie,Se=oe("../utils/isObject"),je=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&&je(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,Ue,Ie){"use strict";var de=oe("../utils/isIP"),ve=de.isIP,Ee=Ie;Ee.getObjectUrl=function(Se,je){if(ve(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return je?je[je.length-1]!=="/"&&(je+="/"):je=this.options.endpoint.format(),je+this._escape(this._objectName(Se))}},{"../utils/isIP":69}],43:[function(oe,Ue,Ie){"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=Ie;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 je(me){return Se.apply(this,arguments)}return je}()},{"@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,Ue,Ie){"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,je=Ie;je.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(Ae){Ae.indexOf("x-oss-meta-")===0&&(le.meta||(le.meta={}),le.meta[Ae.substring(11)]=ie.headers[Ae])}),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,Ue,Ie){"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=Ie;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 je(me,Pe,fe){return Se.apply(this,arguments)}return je}()},{"@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,Ue,Ie){"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,je=oe("../utils/checkObjectTag"),me=je.checkObjectTag,Pe=Ie;Pe.putObjectTagging=function(){var fe=(0,Ee.default)(ve.default.mark(function te(se,ie){var le,ce,pe,xe,Ae=arguments;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return le=Ae.length>2&&Ae[2]!==void 0?Ae[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,Ue,Ie){"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=Ie;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 je(me,Pe,fe){return Se.apply(this,arguments)}return je}()},{"@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,Ue,Ie){"use strict";var de=oe("url"),ve=oe("utility"),Ee=oe("copy-to"),ke=oe("../../common/signUtils"),Se=oe("../utils/isIP"),je=Se.isIP,me=Ie;me.signatureUrl=function(fe,z){if(je(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,Ue,Ie){"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,je=Ie;je._parallelNode=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se,ie){var le,ce,pe,xe,Ae,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,Ae=z.length%te,De=Ae===0?xe:(z.length-Ae)/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}(),je._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 Ge=Be;Be=null;for(var Ye=arguments.length,Ke=new Array(Ye),Xe=0;Xe<Ye;Xe++)Ke[Xe]=arguments[Xe];Ge.apply(this,Ke)}}function ce(Be){var Ge=-1,Ye=Be.length;return function(){return++Ge<Ye&&!te.isCancel()?{value:Be[Ge],key:Ge}:null}}var pe=ce(Pe),xe=!1,Ae=0,De=!1;function Fe(Be){Ae-=1,Be?(xe=!0,ie.push(Be),se(ie)):xe&&Ae<=0?(xe=!0,se(ie)):De||(te.isCancel()?se(ie):Ne())}function Te(Be,Ge){z(Be).then(function(Ye){Ge(null,Ye)}).catch(function(Ye){Ge(Ye)})}function Ne(){for(De=!0;Ae<fe&&!xe&&!te.isCancel();){var Be=pe();if(Be===null||ie.length>0){xe=!0,Ae<=0&&se(ie);return}Ae+=1,Te(Be.value,le(Fe))}De=!1}Ne()})},je.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)},je.isCancel=function(){return this.options.cancelFlag},je.resetCancelFlag=function(){this.options.cancelFlag=!1},je._stop=function(){this.options.cancelFlag=!0},je._makeCancelEvent=function(){var Pe={status:0,name:"cancel"};return Pe},je._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,Ue,Ie){(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;Ie.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},Ie.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(`
`)},Ie.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")},Ie.authorization=function(me,Pe,fe,z){return"OSS ".concat(me,":").concat(this.computeSignature(Pe,fe,z))},Ie._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(),Ne=Pe[Fe];Te.indexOf("x-oss-")===0?se[Te]=Ne:(Te.indexOf("content-md5")===0||Te.indexOf("content-type")===0)&&(se[Fe]=Ne)}),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 Ae={};Object.keys(Pe.callback.customValue).forEach(function(Fe){Ae["x:".concat(Fe)]=Pe.callback.customValue[Fe]}),le["callback-var"]=de.from(JSON.stringify(Ae)).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,Ue,Ie){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.checkBucketName=void 0,Ie.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,Ue,Ie){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}Ie.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,Ue,Ie){(function(de){(function(){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.checkEnv=void 0;function ve(Ee){de.browser&&console.warn(Ee)}Ie.checkEnv=ve}).call(this)}).call(this,oe("_process"))},{_process:467}],54:[function(oe,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.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 (/)"}],je={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,je[z[ie]])})})}Ie.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,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.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)})}Ie.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,Ue,Ie){(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(Ie,"__esModule",{value:!0}),Ie.createRequest=void 0;var ve=oe("./../../../shims/crypto/crypto.js"),Ee=oe("debug")("ali-oss"),ke=oe("mime"),Se=oe("dateformat"),je=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 Ae(Te,Ne){return Te[Ne]||Te[Ne.toLowerCase()]}function De(Te,Ne){delete Te[Ne],delete Te[Ne.toLowerCase()]}function Fe(Te){var Ne=new Date;this.options.amendTimeSkewed&&(Ne=+new Date+this.options.amendTimeSkewed);var Be={"x-oss-date":Se(Ne,"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),je(Te.headers).to(Be),Ae(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||""))),Ae(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 Ge=Object.prototype.hasOwnProperty;for(var Ye in Be)Be[Ye]&&Ge.call(Be,Ye)&&(Be[Ye]=fe(String(Be[Ye]),this.options.headerEncoding));var Ke=this._getResource(Te);if(Be.authorization=this.authorization(Te.method,Ke,Te.subres,Be,this.options.headerEncoding),te(this.options.endpoint.hostname)){var Xe=this.options,ot=Xe.region,lt=Xe.internal,ut=Xe.secure,Ct=ie(ot,lt,ut);Be.host="".concat(Te.bucket,".").concat(Ct.host)}var Je=ce.bind(this)(Te);Ee("request %s %s, with headers %j, !!stream: %s",Te.method,Je,Be,!!Te.stream);var nt=Te.timeout||this.options.timeout,St={method:Te.method,content:Te.content,stream:Te.stream,headers:Be,timeout:nt,writeStream:Te.writeStream,customResponse:Te.customResponse,ctx:Te.ctx||this.ctx};return this.agent&&(St.agent=this.agent),this.httpsAgent&&(St.httpsAgent=this.httpsAgent),St.enableProxy=!!this.options.enableProxy,St.proxy=this.options.proxy?this.options.proxy:null,{url:Je,params:St}}Ie.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,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.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,Ae=Pe.lowerFirst,De=Ae===void 0?!1:Ae;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(Ne){return Ne.toLowerCase()}).replace(/-(\w)/g,function(Ne,Be){return Be.toUpperCase()});me[Te]||(me[Te]=me[Fe])}}),xe.forEach(function(Fe){me[Fe]=Se(me[Fe])}),typeof fe=="function"&&fe(me),je(me,De),ke}}Ie.dataFix=ke;function Se(me){return me?ve.includes(me)?!0:Ee.includes(me)?!1:me:!1}function je(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,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.deepCopyWith=Ie.deepCopy=void 0;var Ee=oe("./isBuffer");Ie.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(je){Se[je]=Ie.deepCopy(ke[je])}),Se},Ie.deepCopyWith=function(ke,Se){function je(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]=je(me[se],se,me)}),te}return Se?je(ke,"",null):Ie.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,Ue,Ie){(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(Ie,"__esModule",{value:!0}),Ie.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")}Ie.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,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.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(je):me=je(me),me}Ie.formatInventoryConfig=Se;function je(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,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.formatObjKey=void 0;function Ee(Se,je,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],je,me))}else Pe={},Object.keys(Se).forEach(function(z){Pe[ke(z,je,me)]=Ee(Se[z],je,me)});return Pe}Ie.formatObjKey=Ee;function ke(Se,je,me){return me&&me.exclude&&me.exclude.includes(Se)||(je==="firstUpperCase"?Se=Se.replace(/^./,function(Pe){return Pe.toUpperCase()}):je==="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,Ue,Ie){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}Ie.getStrBytesCount=de},{"core-js/modules/es.regexp.exec.js":300}],63:[function(oe,Ue,Ie){"use strict";oe("core-js/modules/es.object.to-string.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isArray=void 0,Ie.isArray=function(de){return Object.prototype.toString.call(de)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(oe,Ue,Ie){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isBlob=void 0;function de(ve){return typeof Blob!="undefined"&&ve instanceof Blob}Ie.isBlob=de},{}],65:[function(oe,Ue,Ie){(function(de){(function(){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isBuffer=void 0;function ve(Ee){return de.isBuffer(Ee)}Ie.isBuffer=ve}).call(this)}).call(this,{isBuffer:oe("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(oe,Ue,Ie){(function(de){(function(){"use strict";oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isDingTalk=void 0;function ve(){return!!(de.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}Ie.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,Ue,Ie){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isFile=void 0,Ie.isFile=function(de){return typeof File!="undefined"&&de instanceof File}},{}],68:[function(oe,Ue,Ie){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isFunction=void 0,Ie.isFunction=function(de){return typeof de=="function"}},{}],69:[function(oe,Ue,Ie){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isIP=void 0,Ie.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,Ue,Ie){"use strict";oe("core-js/modules/es.object.to-string.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isObject=void 0,Ie.isObject=function(de){return Object.prototype.toString.call(de)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(oe,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.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}Ie.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,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.obj2xml=void 0;var de=oe("./formatObjKey");function ve(ke){return Object.prototype.toString.call(ke).replace(/(.*? |])/g,"").toLowerCase()}function Ee(ke,Se){var je="";return Se&&Se.headers&&(je=`<?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"?je+="<".concat(me,">").concat(ke[me],"</").concat(me,">"):ve(ke[me])==="object"?je+="<".concat(me,">").concat(Ee(ke[me]),"</").concat(me,">"):ve(ke[me])==="array"?je+=ke[me].map(function(Pe){return"<".concat(me,">").concat(Ee(Pe),"</").concat(me,">")}).join(""):je+="<".concat(me,">").concat(ke[me].toString(),"</").concat(me,">"))}):je+=ke.toString(),je}Ie.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,Ue,Ie){"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,je){var me=typeof Symbol!="undefined"&&Se[Symbol.iterator]||Se["@@iterator"];if(!me){if(Array.isArray(Se)||(me=ve(Se))||je&&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,je){if(Se){if(typeof Se=="string")return Ee(Se,je);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,je)}}function Ee(Se,je){(je==null||je>Se.length)&&(je=Se.length);for(var me=0,Pe=new Array(je);me<je;me++)Pe[me]=Se[me];return Pe}Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.omit=void 0;function ke(Se,je){var me=Object.assign({},Se),Pe=de(je),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}Ie.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,Ue,Ie){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.retry=void 0;function de(ve,Ee){var ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Se=0,je=ke.retryDelay,me=je===void 0?500:je,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}Ie.retry=de},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(oe,Ue,Ie){"use strict";var de=function(Se){return Se&&Se.__esModule?Se:{default:Se}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.setRegion=void 0;var ve=de(oe("url")),Ee=oe("./checkConfigValid");function ke(Se){var je=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=je?"-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)}Ie.setRegion=ke},{"./checkConfigValid":52,url:472}],76:[function(oe,Ue,Ie){"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(Ie,"__esModule",{value:!0}),Ie.checkCredentials=Ie.setSTSToken=void 0;var ke=oe("./formatObjKey");function Se(){return je.apply(this,arguments)}function je(){return je=(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)})),je.apply(this,arguments)}Ie.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))})}Ie.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,Ue,Ie){function de(Ee,ke,Se,je,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(je,me)}function ve(Ee){return function(){var ke=this,Se=arguments;return new Promise(function(je,me){var Pe=Ee.apply(ke,Se);function fe(te){de(Pe,je,me,fe,z,"next",te)}function z(te){de(Pe,je,me,fe,z,"throw",te)}fe(void 0)})}}Ue.exports=ve,Ue.exports.__esModule=!0,Ue.exports.default=Ue.exports},{}],78:[function(oe,Ue,Ie){function de(ve){return ve&&ve.__esModule?ve:{default:ve}}Ue.exports=de,Ue.exports.__esModule=!0,Ue.exports.default=Ue.exports},{}],79:[function(oe,Ue,Ie){function de(ve){"@babel/helpers - typeof";return Ue.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},Ue.exports.__esModule=!0,Ue.exports.default=Ue.exports,de(ve)}Ue.exports=de,Ue.exports.__esModule=!0,Ue.exports.default=Ue.exports},{}],80:[function(oe,Ue,Ie){Ue.exports=oe("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(oe,Ue,Ie){Ue.exports=de,Ue.exports.HttpsAgent=de;function de(){}},{}],82:[function(oe,Ue,Ie){(function(de){(function(){"use strict";var ve=oe("object-assign");function Ee(ot,lt){if(ot===lt)return 0;for(var ut=ot.length,Ct=lt.length,Je=0,nt=Math.min(ut,Ct);Je<nt;++Je)if(ot[Je]!==lt[Je]){ut=ot[Je],Ct=lt[Je];break}return ut<Ct?-1:Ct<ut?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/"),je=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=Ue.exports=Ae,se=/\s*function\s+([^\(\s]*)\s*/;function ie(ot){if(Se.isFunction(ot)){if(Pe)return ot.name;var lt=ot.toString(),ut=lt.match(se);return ut&&ut[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 ut=lt.stackStartFunction||xe;if(Error.captureStackTrace)Error.captureStackTrace(this,ut);else{var Ct=new Error;if(Ct.stack){var Je=Ct.stack,nt=ie(ut),St=Je.indexOf(`
`+nt);if(St>=0){var wt=Je.indexOf(`
`,St+1);Je=Je.substring(wt+1)}this.stack=Je}}},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),ut=lt?": "+lt:"";return"[Function"+ut+"]"}function pe(ot){return le(ce(ot.actual),128)+" "+ot.operator+" "+le(ce(ot.expected),128)}function xe(ot,lt,ut,Ct,Je){throw new te.AssertionError({message:ut,actual:ot,expected:lt,operator:Ct,stackStartFunction:Je})}te.fail=xe;function Ae(ot,lt){ot||xe(ot,!0,lt,"==",te.ok)}te.ok=Ae,te.equal=function(lt,ut,Ct){lt!=ut&&xe(lt,ut,Ct,"==",te.equal)},te.notEqual=function(lt,ut,Ct){lt==ut&&xe(lt,ut,Ct,"!=",te.notEqual)},te.deepEqual=function(lt,ut,Ct){De(lt,ut,!1)||xe(lt,ut,Ct,"deepEqual",te.deepEqual)},te.deepStrictEqual=function(lt,ut,Ct){De(lt,ut,!0)||xe(lt,ut,Ct,"deepStrictEqual",te.deepStrictEqual)};function De(ot,lt,ut,Ct){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 ut?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;Ct=Ct||{actual:[],expected:[]};var Je=Ct.actual.indexOf(ot);return Je!==-1&&Je===Ct.expected.indexOf(lt)?!0:(Ct.actual.push(ot),Ct.expected.push(lt),Te(ot,lt,ut,Ct))}function Fe(ot){return Object.prototype.toString.call(ot)=="[object Arguments]"}function Te(ot,lt,ut,Ct){if(ot==null||lt===null||lt===void 0)return!1;if(Se.isPrimitive(ot)||Se.isPrimitive(lt))return ot===lt;if(ut&&Object.getPrototypeOf(ot)!==Object.getPrototypeOf(lt))return!1;var Je=Fe(ot),nt=Fe(lt);if(Je&&!nt||!Je&&nt)return!1;if(Je)return ot=me.call(ot),lt=me.call(lt),De(ot,lt,ut);var St=Xe(ot),wt=Xe(lt),bt,ct;if(St.length!==wt.length)return!1;for(St.sort(),wt.sort(),ct=St.length-1;ct>=0;ct--)if(St[ct]!==wt[ct])return!1;for(ct=St.length-1;ct>=0;ct--)if(bt=St[ct],!De(ot[bt],lt[bt],ut,Ct))return!1;return!0}te.notDeepEqual=function(lt,ut,Ct){De(lt,ut,!1)&&xe(lt,ut,Ct,"notDeepEqual",te.notDeepEqual)},te.notDeepStrictEqual=Ne;function Ne(ot,lt,ut){De(ot,lt,!0)&&xe(ot,lt,ut,"notDeepStrictEqual",Ne)}te.strictEqual=function(lt,ut,Ct){lt!==ut&&xe(lt,ut,Ct,"===",te.strictEqual)},te.notStrictEqual=function(lt,ut,Ct){lt===ut&&xe(lt,ut,Ct,"!==",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(ut){}return Error.isPrototypeOf(lt)?!1:lt.call({},ot)===!0}function Ge(ot){var lt;try{ot()}catch(ut){lt=ut}return lt}function Ye(ot,lt,ut,Ct){var Je;if(typeof lt!="function")throw new TypeError('"block" argument must be a function');typeof ut=="string"&&(Ct=ut,ut=null),Je=Ge(lt),Ct=(ut&&ut.name?" ("+ut.name+").":".")+(Ct?" "+Ct:"."),ot&&!Je&&xe(Je,ut,"Missing expected exception"+Ct);var nt=typeof Ct=="string",St=!ot&&Se.isError(Je),wt=!ot&&Je&&!ut;if((St&&nt&&Be(Je,ut)||wt)&&xe(Je,ut,"Got unwanted exception"+Ct),ot&&Je&&ut&&!Be(Je,ut)||!ot&&Je)throw Je}te.throws=function(ot,lt,ut){Ye(!0,ot,lt,ut)},te.doesNotThrow=function(ot,lt,ut){Ye(!1,ot,lt,ut)},te.ifError=function(ot){if(ot)throw ot};function Ke(ot,lt){ot||xe(ot,!0,lt,"==",Ke)}te.strict=ve(Ke,te,{equal:te.strictEqual,deepEqual:te.deepStrictEqual,notEqual:te.notStrictEqual,notDeepEqual:te.notDeepStrictEqual}),te.strict.strict=te.strict;var Xe=Object.keys||function(ot){var lt=[];for(var ut in ot)je.call(ot,ut)&&lt.push(ut);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,Ue,Ie){typeof Object.create=="function"?Ue.exports=function(ve,Ee){ve.super_=Ee,ve.prototype=Object.create(Ee.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}})}:Ue.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,Ue,Ie){Ue.exports=function(ve){return ve&&typeof ve=="object"&&typeof ve.copy=="function"&&typeof ve.fill=="function"&&typeof ve.readUInt8=="function"}},{}],85:[function(oe,Ue,Ie){(function(de,ve){(function(){var Ee=/%[sdj%]/g;Ie.format=function(wt){if(!Te(wt)){for(var bt=[],ct=0;ct<arguments.length;ct++)bt.push(je(arguments[ct]));return bt.join(" ")}for(var ct=1,vt=arguments,ht=vt.length,Lt=String(wt).replace(Ee,function(mt){if(mt==="%%")return"%";if(ct>=ht)return mt;switch(mt){case"%s":return String(vt[ct++]);case"%d":return Number(vt[ct++]);case"%j":try{return JSON.stringify(vt[ct++])}catch(Et){return"[Circular]"}default:return mt}}),dt=vt[ct];ct<ht;dt=vt[++ct])Ae(dt)||!Ye(dt)?Lt+=" "+dt:Lt+=" "+je(dt);return Lt},Ie.deprecate=function(wt,bt){if(Be(ve.process))return function(){return Ie.deprecate(wt,bt).apply(this,arguments)};if(de.noDeprecation===!0)return wt;var ct=!1;function vt(){if(!ct){if(de.throwDeprecation)throw new Error(bt);de.traceDeprecation?console.trace(bt):console.error(bt),ct=!0}return wt.apply(this,arguments)}return vt};var ke={},Se;Ie.debuglog=function(wt){if(Be(Se)&&(Se=de.env.NODE_DEBUG||""),wt=wt.toUpperCase(),!ke[wt])if(new RegExp("\\b"+wt+"\\b","i").test(Se)){var bt=de.pid;ke[wt]=function(){var ct=Ie.format.apply(Ie,arguments);console.error("%s %d: %s",wt,bt,ct)}}else ke[wt]=function(){};return ke[wt]};function je(wt,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&&Ie._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,wt,ct.depth)}Ie.inspect=je,je.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]},je.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function me(wt,bt){var ct=je.styles[bt];return ct?"\x1B["+je.colors[ct][0]+"m"+wt+"\x1B["+je.colors[ct][1]+"m":wt}function Pe(wt,bt){return wt}function fe(wt){var bt={};return wt.forEach(function(ct,vt){bt[ct]=!0}),bt}function z(wt,bt,ct){if(wt.customInspect&&bt&&ot(bt.inspect)&&bt.inspect!==Ie.inspect&&!(bt.constructor&&bt.constructor.prototype===bt)){var vt=bt.inspect(ct,wt);return Te(vt)||(vt=z(wt,vt,ct)),vt}var ht=te(wt,bt);if(ht)return ht;var Lt=Object.keys(bt),dt=fe(Lt);if(wt.showHidden&&(Lt=Object.getOwnPropertyNames(bt)),Xe(bt)&&(Lt.indexOf("message")>=0||Lt.indexOf("description")>=0))return se(bt);if(Lt.length===0){if(ot(bt)){var mt=bt.name?": "+bt.name:"";return wt.stylize("[Function"+mt+"]","special")}if(Ge(bt))return wt.stylize(RegExp.prototype.toString.call(bt),"regexp");if(Ke(bt))return wt.stylize(Date.prototype.toString.call(bt),"date");if(Xe(bt))return se(bt)}var Et="",gt=!1,$e=["{","}"];if(pe(bt)&&(gt=!0,$e=["[","]"]),ot(bt)){var He=bt.name?": "+bt.name:"";Et=" [Function"+He+"]"}if(Ge(bt)&&(Et=" "+RegExp.prototype.toString.call(bt)),Ke(bt)&&(Et=" "+Date.prototype.toUTCString.call(bt)),Xe(bt)&&(Et=" "+se(bt)),Lt.length===0&&(!gt||bt.length==0))return $e[0]+Et+$e[1];if(ct<0)return Ge(bt)?wt.stylize(RegExp.prototype.toString.call(bt),"regexp"):wt.stylize("[Object]","special");wt.seen.push(bt);var we;return gt?we=ie(wt,bt,ct,dt,Lt):we=Lt.map(function(Le){return le(wt,bt,ct,dt,Le,gt)}),wt.seen.pop(),ce(we,Et,$e)}function te(wt,bt){if(Be(bt))return wt.stylize("undefined","undefined");if(Te(bt)){var ct="'"+JSON.stringify(bt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return wt.stylize(ct,"string")}if(Fe(bt))return wt.stylize(""+bt,"number");if(xe(bt))return wt.stylize(""+bt,"boolean");if(Ae(bt))return wt.stylize("null","null")}function se(wt){return"["+Error.prototype.toString.call(wt)+"]"}function ie(wt,bt,ct,vt,ht){for(var Lt=[],dt=0,mt=bt.length;dt<mt;++dt)St(bt,String(dt))?Lt.push(le(wt,bt,ct,vt,String(dt),!0)):Lt.push("");return ht.forEach(function(Et){Et.match(/^\d+$/)||Lt.push(le(wt,bt,ct,vt,Et,!0))}),Lt}function le(wt,bt,ct,vt,ht,Lt){var dt,mt,Et;if(Et=Object.getOwnPropertyDescriptor(bt,ht)||{value:bt[ht]},Et.get?Et.set?mt=wt.stylize("[Getter/Setter]","special"):mt=wt.stylize("[Getter]","special"):Et.set&&(mt=wt.stylize("[Setter]","special")),St(vt,ht)||(dt="["+ht+"]"),mt||(wt.seen.indexOf(Et.value)<0?(Ae(ct)?mt=z(wt,Et.value,null):mt=z(wt,Et.value,ct-1),mt.indexOf(`
`)>-1&&(Lt?mt=mt.split(`
`).map(function(gt){return" "+gt}).join(`
`).substr(2):mt=`
`+mt.split(`
`).map(function(gt){return" "+gt}).join(`
`))):mt=wt.stylize("[Circular]","special")),Be(dt)){if(Lt&&ht.match(/^\d+$/))return mt;dt=JSON.stringify(""+ht),dt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(dt=dt.substr(1,dt.length-2),dt=wt.stylize(dt,"name")):(dt=dt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),dt=wt.stylize(dt,"string"))}return dt+": "+mt}function ce(wt,bt,ct){var vt=0,ht=wt.reduce(function(Lt,dt){return vt++,dt.indexOf(`
`)>=0&&vt++,Lt+dt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ht>60?ct[0]+(bt===""?"":bt+`
`)+" "+wt.join(`,
`)+" "+ct[1]:ct[0]+bt+" "+wt.join(", ")+" "+ct[1]}function pe(wt){return Array.isArray(wt)}Ie.isArray=pe;function xe(wt){return typeof wt=="boolean"}Ie.isBoolean=xe;function Ae(wt){return wt===null}Ie.isNull=Ae;function De(wt){return wt==null}Ie.isNullOrUndefined=De;function Fe(wt){return typeof wt=="number"}Ie.isNumber=Fe;function Te(wt){return typeof wt=="string"}Ie.isString=Te;function Ne(wt){return typeof wt=="symbol"}Ie.isSymbol=Ne;function Be(wt){return wt===void 0}Ie.isUndefined=Be;function Ge(wt){return Ye(wt)&&ut(wt)==="[object RegExp]"}Ie.isRegExp=Ge;function Ye(wt){return typeof wt=="object"&&wt!==null}Ie.isObject=Ye;function Ke(wt){return Ye(wt)&&ut(wt)==="[object Date]"}Ie.isDate=Ke;function Xe(wt){return Ye(wt)&&(ut(wt)==="[object Error]"||wt instanceof Error)}Ie.isError=Xe;function ot(wt){return typeof wt=="function"}Ie.isFunction=ot;function lt(wt){return wt===null||typeof wt=="boolean"||typeof wt=="number"||typeof wt=="string"||typeof wt=="symbol"||typeof wt=="undefined"}Ie.isPrimitive=lt,Ie.isBuffer=oe("./support/isBuffer");function ut(wt){return Object.prototype.toString.call(wt)}function Ct(wt){return wt<10?"0"+wt.toString(10):wt.toString(10)}var Je=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function nt(){var wt=new Date,bt=[Ct(wt.getHours()),Ct(wt.getMinutes()),Ct(wt.getSeconds())].join(":");return[wt.getDate(),Je[wt.getMonth()],bt].join(" ")}Ie.log=function(){console.log("%s - %s",nt(),Ie.format.apply(Ie,arguments))},Ie.inherits=oe("inherits"),Ie._extend=function(wt,bt){if(!bt||!Ye(bt))return wt;for(var ct=Object.keys(bt),vt=ct.length;vt--;)wt[ct[vt]]=bt[ct[vt]];return wt};function St(wt,bt){return Object.prototype.hasOwnProperty.call(wt,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,Ue,Ie){(function(de){(function(){"use strict";var ve=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],Ee=typeof globalThis=="undefined"?de:globalThis;Ue.exports=function(){for(var Se=[],je=0;je<ve.length;je++)typeof Ee[ve[je]]=="function"&&(Se[Se.length]=ve[je]);return Se}}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(oe,Ue,Ie){"use strict";Ie.byteLength=Pe,Ie.toByteArray=z,Ie.fromByteArray=ie;for(var de=[],ve=[],Ee=typeof Uint8Array!="undefined"?Uint8Array:Array,ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Se=0,je=ke.length;Se<je;++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],Ae=pe[1],De=new Ee(fe(le,xe,Ae)),Fe=0,Te=Ae>0?xe-4:xe,Ne;for(Ne=0;Ne<Te;Ne+=4)ce=ve[le.charCodeAt(Ne)]<<18|ve[le.charCodeAt(Ne+1)]<<12|ve[le.charCodeAt(Ne+2)]<<6|ve[le.charCodeAt(Ne+3)],De[Fe++]=ce>>16&255,De[Fe++]=ce>>8&255,De[Fe++]=ce&255;return Ae===2&&(ce=ve[le.charCodeAt(Ne)]<<2|ve[le.charCodeAt(Ne+1)]>>4,De[Fe++]=ce&255),Ae===1&&(ce=ve[le.charCodeAt(Ne)]<<10|ve[le.charCodeAt(Ne+1)]<<4|ve[le.charCodeAt(Ne+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,Ae=[],De=ce;De<pe;De+=3)xe=(le[De]<<16&16711680)+(le[De+1]<<8&65280)+(le[De+2]&255),Ae.push(te(xe));return Ae.join("")}function ie(le){for(var ce,pe=le.length,xe=pe%3,Ae=[],De=16383,Fe=0,Te=pe-xe;Fe<Te;Fe+=De)Ae.push(se(le,Fe,Fe+De>Te?Te:Fe+De));return xe===1?(ce=le[pe-1],Ae.push(de[ce>>2]+de[ce<<4&63]+"==")):xe===2&&(ce=(le[pe-2]<<8)+le[pe-1],Ae.push(de[ce>>10]+de[ce>>4&63]+de[ce<<2&63]+"=")),Ae.join("")}},{}],88:[function(oe,Ue,Ie){(function(de,ve,Ee){typeof Ue!="undefined"&&Ue.exports?Ue.exports=Ee():typeof ft=="function"&&ft.amd?ft(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),Ae=/silk/i.test(fe),De=/sailfish/i.test(fe),Fe=/tizen/i.test(fe),Te=/(web|hpw)(o|0)s/i.test(fe),Ne=/windows phone/i.test(fe),Be=/SamsungBrowser/i.test(fe),Ge=!Ne&&/windows/i.test(fe),Ye=!se&&!Ae&&/macintosh/i.test(fe),Ke=!le&&!De&&!Fe&&!Te&&/linux/i.test(fe),Xe=te(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),ot=z(/version\/(\d+(\.\d+)?)/i),lt=/tablet/i.test(fe)&&!/tablet pc/i.test(fe),ut=!lt&&/[^-]mobi/i.test(fe),Ct=/xbox/i.test(fe),Je;/opera/i.test(fe)?Je={name:"Opera",opera:de,version:ot||z(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(fe)?Je={name:"Opera",opera:de,version:z(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||ot}:/SamsungBrowser/i.test(fe)?Je={name:"Samsung Internet for Android",samsungBrowser:de,version:ot||z(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(fe)?Je={name:"NAVER Whale browser",whale:de,version:z(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(fe)?Je={name:"MZ Browser",mzbrowser:de,version:z(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(fe)?Je={name:"Opera Coast",coast:de,version:ot||z(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(fe)?Je={name:"Focus",focus:de,version:z(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(fe)?Je={name:"Yandex Browser",yandexbrowser:de,version:ot||z(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(fe)?Je={name:"UC Browser",ucbrowser:de,version:z(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(fe)?Je={name:"Maxthon",maxthon:de,version:z(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(fe)?Je={name:"Epiphany",epiphany:de,version:z(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(fe)?Je={name:"Puffin",puffin:de,version:z(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(fe)?Je={name:"Sleipnir",sleipnir:de,version:z(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(fe)?Je={name:"K-Meleon",kMeleon:de,version:z(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Ne?(Je={name:"Windows Phone",osname:"Windows Phone",windowsphone:de},Xe?(Je.msedge=de,Je.version=Xe):(Je.msie=de,Je.version=z(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(fe)?Je={name:"Internet Explorer",msie:de,version:z(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:xe?Je={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)?Je={name:"Microsoft Edge",msedge:de,version:Xe}:/vivaldi/i.test(fe)?Je={name:"Vivaldi",vivaldi:de,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||ot}:De?Je={name:"Sailfish",osname:"Sailfish OS",sailfish:de,version:z(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(fe)?Je={name:"SeaMonkey",seamonkey:de,version:z(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(fe)?(Je={name:"Firefox",firefox:de,version:z(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(fe)&&(Je.firefoxos=de,Je.osname="Firefox OS")):Ae?Je={name:"Amazon Silk",silk:de,version:z(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(fe)?Je={name:"PhantomJS",phantom:de,version:z(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(fe)?Je={name:"SlimerJS",slimer:de,version:z(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(fe)||/rim\stablet/i.test(fe)?Je={name:"BlackBerry",osname:"BlackBerry OS",blackberry:de,version:ot||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Te?(Je={name:"WebOS",osname:"WebOS",webos:de,version:ot||z(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(fe)&&(Je.touchpad=de)):/bada/i.test(fe)?Je={name:"Bada",osname:"Bada",bada:de,version:z(/dolfin\/(\d+(\.\d+)?)/i)}:Fe?Je={name:"Tizen",osname:"Tizen",tizen:de,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||ot}:/qupzilla/i.test(fe)?Je={name:"QupZilla",qupzilla:de,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||ot}:/chromium/i.test(fe)?Je={name:"Chromium",chromium:de,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||ot}:/chrome|crios|crmo/i.test(fe)?Je={name:"Chrome",chrome:de,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:le?Je={name:"Android",version:ot}:/safari|applewebkit/i.test(fe)?(Je={name:"Safari",safari:de},ot&&(Je.version=ot)):se?(Je={name:se=="iphone"?"iPhone":se=="ipad"?"iPad":"iPod"},ot&&(Je.version=ot)):/googlebot/i.test(fe)?Je={name:"Googlebot",googlebot:de,version:z(/googlebot\/(\d+(\.\d+))/i)||ot}:Je={name:z(/^(.*)\/(.*) /),version:te(/^(.*)\/(.*) /)},!Je.msedge&&/(apple)?webkit/i.test(fe)?(/(apple)?webkit\/537\.36/i.test(fe)?(Je.name=Je.name||"Blink",Je.blink=de):(Je.name=Je.name||"Webkit",Je.webkit=de),!Je.version&&ot&&(Je.version=ot)):!Je.opera&&/gecko\//i.test(fe)&&(Je.name=Je.name||"Gecko",Je.gecko=de,Je.version=Je.version||z(/gecko\/(\d+(\.\d+)?)/i)),!Je.windowsphone&&(le||Je.silk)?(Je.android=de,Je.osname="Android"):!Je.windowsphone&&se?(Je[se]=de,Je.ios=de,Je.osname="iOS"):Ye?(Je.mac=de,Je.osname="macOS"):Ct?(Je.xbox=de,Je.osname="Xbox"):Ge?(Je.windows=de,Je.osname="Windows"):Ke&&(Je.linux=de,Je.osname="Linux");function nt(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 St="";Je.windows?St=nt(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):Je.windowsphone?St=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):Je.mac?(St=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),St=St.replace(/[_\s]/g,".")):se?(St=z(/os (\d+([_\s]\d+)*) like mac os x/i),St=St.replace(/[_\s]/g,".")):le?St=z(/android[ \/-](\d+(\.\d+)*)/i):Je.webos?St=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):Je.blackberry?St=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):Je.bada?St=z(/bada\/(\d+(\.\d+)*)/i):Je.tizen&&(St=z(/tizen[\/\s](\d+(\.\d+)*)/i)),St&&(Je.osversion=St);var wt=!Je.windows&&St.split(".")[0];return lt||pe||se=="ipad"||le&&(wt==3||wt>=4&&!ut)||Je.silk?Je.tablet=de:(ut||se=="iphone"||se=="ipod"||le||ce||Je.blackberry||Je.webos||Je.bada)&&(Je.mobile=de),Je.msedge||Je.msie&&Je.version>=10||Je.yandexbrowser&&Je.version>=15||Je.vivaldi&&Je.version>=1||Je.chrome&&Je.version>=20||Je.samsungBrowser&&Je.version>=4||Je.whale&&je([Je.version,"1.0"])===1||Je.mzbrowser&&je([Je.version,"6.0"])===1||Je.focus&&je([Je.version,"1.0"])===1||Je.firefox&&Je.version>=20||Je.safari&&Je.version>=6||Je.opera&&Je.version>=10||Je.ios&&Je.osversion&&Je.osversion.split(".")[0]>=6||Je.blackberry&&Je.version>=10.1||Je.chromium&&Je.version>=20?Je.a=de:Je.msie&&Je.version<10||Je.chrome&&Je.version<20||Je.firefox&&Je.version<20||Je.safari&&Je.version<6||Je.opera&&Je.version<10||Je.ios&&Je.osversion&&Je.osversion.split(".")[0]<6||Je.chromium&&Je.version<20?Je.c=de:Je.x=de,Je}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 je(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 je([ie,fe[le]])<0}return z}function Pe(fe,z,te){return!me(fe,z,te)}return Ee.isUnsupportedBrowser=me,Ee.compareVersions=je,Ee.check=Pe,Ee._detect=ve,Ee.detect=ve,Ee})},{}],89:[function(oe,Ue,Ie){},{}],90:[function(oe,Ue,Ie){(function(de){(function(){"use strict";var ve=oe("base64-js"),Ee=oe("ieee754");Ie.Buffer=me,Ie.SlowBuffer=xe,Ie.INSPECT_MAX_BYTES=50;var ke=2147483647;Ie.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(Ve){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 je(_e){if(_e>ke)throw new RangeError('The value "'+_e+'" is invalid for option "size"');var Ve=new Uint8Array(_e);return Ve.__proto__=me.prototype,Ve}function me(_e,Ve,it){if(typeof _e=="number"){if(typeof Ve=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return te(_e)}return Pe(_e,Ve,it)}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,Ve,it){if(typeof _e=="string")return se(_e,Ve);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(tt(_e,ArrayBuffer)||_e&&tt(_e.buffer,ArrayBuffer))return le(_e,Ve,it);if(typeof _e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var yt=_e.valueOf&&_e.valueOf();if(yt!=null&&yt!==_e)return me.from(yt,Ve,it);var Pt=ce(_e);if(Pt)return Pt;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof _e[Symbol.toPrimitive]=="function")return me.from(_e[Symbol.toPrimitive]("string"),Ve,it);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,Ve,it){return Pe(_e,Ve,it)},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,Ve,it){return fe(_e),_e<=0?je(_e):Ve!==void 0?typeof it=="string"?je(_e).fill(Ve,it):je(_e).fill(Ve):je(_e)}me.alloc=function(_e,Ve,it){return z(_e,Ve,it)};function te(_e){return fe(_e),je(_e<0?0:pe(_e)|0)}me.allocUnsafe=function(_e){return te(_e)},me.allocUnsafeSlow=function(_e){return te(_e)};function se(_e,Ve){if((typeof Ve!="string"||Ve==="")&&(Ve="utf8"),!me.isEncoding(Ve))throw new TypeError("Unknown encoding: "+Ve);var it=Ae(_e,Ve)|0,yt=je(it),Pt=yt.write(_e,Ve);return Pt!==it&&(yt=yt.slice(0,Pt)),yt}function ie(_e){for(var Ve=_e.length<0?0:pe(_e.length)|0,it=je(Ve),yt=0;yt<Ve;yt+=1)it[yt]=_e[yt]&255;return it}function le(_e,Ve,it){if(Ve<0||_e.byteLength<Ve)throw new RangeError('"offset" is outside of buffer bounds');if(_e.byteLength<Ve+(it||0))throw new RangeError('"length" is outside of buffer bounds');var yt;return Ve===void 0&&it===void 0?yt=new Uint8Array(_e):it===void 0?yt=new Uint8Array(_e,Ve):yt=new Uint8Array(_e,Ve,it),yt.__proto__=me.prototype,yt}function ce(_e){if(me.isBuffer(_e)){var Ve=pe(_e.length)|0,it=je(Ve);return it.length===0||_e.copy(it,0,0,Ve),it}if(_e.length!==void 0)return typeof _e.length!="number"||Re(_e.length)?je(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(Ve){return Ve!=null&&Ve._isBuffer===!0&&Ve!==me.prototype},me.compare=function(Ve,it){if(tt(Ve,Uint8Array)&&(Ve=me.from(Ve,Ve.offset,Ve.byteLength)),tt(it,Uint8Array)&&(it=me.from(it,it.offset,it.byteLength)),!me.isBuffer(Ve)||!me.isBuffer(it))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ve===it)return 0;for(var yt=Ve.length,Pt=it.length,jt=0,Nt=Math.min(yt,Pt);jt<Nt;++jt)if(Ve[jt]!==it[jt]){yt=Ve[jt],Pt=it[jt];break}return yt<Pt?-1:Pt<yt?1:0},me.isEncoding=function(Ve){switch(String(Ve).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(Ve,it){if(!Array.isArray(Ve))throw new TypeError('"list" argument must be an Array of Buffers');if(Ve.length===0)return me.alloc(0);var yt;if(it===void 0)for(it=0,yt=0;yt<Ve.length;++yt)it+=Ve[yt].length;var Pt=me.allocUnsafe(it),jt=0;for(yt=0;yt<Ve.length;++yt){var Nt=Ve[yt];if(tt(Nt,Uint8Array)&&(Nt=me.from(Nt)),!me.isBuffer(Nt))throw new TypeError('"list" argument must be an Array of Buffers');Nt.copy(Pt,jt),jt+=Nt.length}return Pt};function Ae(_e,Ve){if(me.isBuffer(_e))return _e.length;if(ArrayBuffer.isView(_e)||tt(_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 it=_e.length,yt=arguments.length>2&&arguments[2]===!0;if(!yt&&it===0)return 0;for(var Pt=!1;;)switch(Ve){case"ascii":case"latin1":case"binary":return it;case"utf8":case"utf-8":return $e(_e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return it*2;case"hex":return it>>>1;case"base64":return Le(_e).length;default:if(Pt)return yt?-1:$e(_e).length;Ve=(""+Ve).toLowerCase(),Pt=!0}}me.byteLength=Ae;function De(_e,Ve,it){var yt=!1;if((Ve===void 0||Ve<0)&&(Ve=0),Ve>this.length||((it===void 0||it>this.length)&&(it=this.length),it<=0)||(it>>>=0,Ve>>>=0,it<=Ve))return"";for(_e||(_e="utf8");;)switch(_e){case"hex":return wt(this,Ve,it);case"utf8":case"utf-8":return ut(this,Ve,it);case"ascii":return nt(this,Ve,it);case"latin1":case"binary":return St(this,Ve,it);case"base64":return lt(this,Ve,it);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bt(this,Ve,it);default:if(yt)throw new TypeError("Unknown encoding: "+_e);_e=(_e+"").toLowerCase(),yt=!0}}me.prototype._isBuffer=!0;function Fe(_e,Ve,it){var yt=_e[Ve];_e[Ve]=_e[it],_e[it]=yt}me.prototype.swap16=function(){var Ve=this.length;if(Ve%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var it=0;it<Ve;it+=2)Fe(this,it,it+1);return this},me.prototype.swap32=function(){var Ve=this.length;if(Ve%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var it=0;it<Ve;it+=4)Fe(this,it,it+3),Fe(this,it+1,it+2);return this},me.prototype.swap64=function(){var Ve=this.length;if(Ve%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var it=0;it<Ve;it+=8)Fe(this,it,it+7),Fe(this,it+1,it+6),Fe(this,it+2,it+5),Fe(this,it+3,it+4);return this},me.prototype.toString=function(){var Ve=this.length;return Ve===0?"":arguments.length===0?ut(this,0,Ve):De.apply(this,arguments)},me.prototype.toLocaleString=me.prototype.toString,me.prototype.equals=function(Ve){if(!me.isBuffer(Ve))throw new TypeError("Argument must be a Buffer");return this===Ve?!0:me.compare(this,Ve)===0},me.prototype.inspect=function(){var Ve="",it=Ie.INSPECT_MAX_BYTES;return Ve=this.toString("hex",0,it).replace(/(.{2})/g,"$1 ").trim(),this.length>it&&(Ve+=" ... "),"<Buffer "+Ve+">"},me.prototype.compare=function(Ve,it,yt,Pt,jt){if(tt(Ve,Uint8Array)&&(Ve=me.from(Ve,Ve.offset,Ve.byteLength)),!me.isBuffer(Ve))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ve);if(it===void 0&&(it=0),yt===void 0&&(yt=Ve?Ve.length:0),Pt===void 0&&(Pt=0),jt===void 0&&(jt=this.length),it<0||yt>Ve.length||Pt<0||jt>this.length)throw new RangeError("out of range index");if(Pt>=jt&&it>=yt)return 0;if(Pt>=jt)return-1;if(it>=yt)return 1;if(it>>>=0,yt>>>=0,Pt>>>=0,jt>>>=0,this===Ve)return 0;for(var Nt=jt-Pt,Bt=yt-it,$t=Math.min(Nt,Bt),en=this.slice(Pt,jt),qt=Ve.slice(it,yt),Zt=0;Zt<$t;++Zt)if(en[Zt]!==qt[Zt]){Nt=en[Zt],Bt=qt[Zt];break}return Nt<Bt?-1:Bt<Nt?1:0};function Te(_e,Ve,it,yt,Pt){if(_e.length===0)return-1;if(typeof it=="string"?(yt=it,it=0):it>2147483647?it=2147483647:it<-2147483648&&(it=-2147483648),it=+it,Re(it)&&(it=Pt?0:_e.length-1),it<0&&(it=_e.length+it),it>=_e.length){if(Pt)return-1;it=_e.length-1}else if(it<0)if(Pt)it=0;else return-1;if(typeof Ve=="string"&&(Ve=me.from(Ve,yt)),me.isBuffer(Ve))return Ve.length===0?-1:Ne(_e,Ve,it,yt,Pt);if(typeof Ve=="number")return Ve=Ve&255,typeof Uint8Array.prototype.indexOf=="function"?Pt?Uint8Array.prototype.indexOf.call(_e,Ve,it):Uint8Array.prototype.lastIndexOf.call(_e,Ve,it):Ne(_e,[Ve],it,yt,Pt);throw new TypeError("val must be string, number or Buffer")}function Ne(_e,Ve,it,yt,Pt){var jt=1,Nt=_e.length,Bt=Ve.length;if(yt!==void 0&&(yt=String(yt).toLowerCase(),yt==="ucs2"||yt==="ucs-2"||yt==="utf16le"||yt==="utf-16le")){if(_e.length<2||Ve.length<2)return-1;jt=2,Nt/=2,Bt/=2,it/=2}function $t(an,cn){return jt===1?an[cn]:an.readUInt16BE(cn*jt)}var en;if(Pt){var qt=-1;for(en=it;en<Nt;en++)if($t(_e,en)===$t(Ve,qt===-1?0:en-qt)){if(qt===-1&&(qt=en),en-qt+1===Bt)return qt*jt}else qt!==-1&&(en-=en-qt),qt=-1}else for(it+Bt>Nt&&(it=Nt-Bt),en=it;en>=0;en--){for(var Zt=!0,hn=0;hn<Bt;hn++)if($t(_e,en+hn)!==$t(Ve,hn)){Zt=!1;break}if(Zt)return en}return-1}me.prototype.includes=function(Ve,it,yt){return this.indexOf(Ve,it,yt)!==-1},me.prototype.indexOf=function(Ve,it,yt){return Te(this,Ve,it,yt,!0)},me.prototype.lastIndexOf=function(Ve,it,yt){return Te(this,Ve,it,yt,!1)};function Be(_e,Ve,it,yt){it=Number(it)||0;var Pt=_e.length-it;yt?(yt=Number(yt),yt>Pt&&(yt=Pt)):yt=Pt;var jt=Ve.length;yt>jt/2&&(yt=jt/2);for(var Nt=0;Nt<yt;++Nt){var Bt=parseInt(Ve.substr(Nt*2,2),16);if(Re(Bt))return Nt;_e[it+Nt]=Bt}return Nt}function Ge(_e,Ve,it,yt){return We($e(Ve,_e.length-it),_e,it,yt)}function Ye(_e,Ve,it,yt){return We(He(Ve),_e,it,yt)}function Ke(_e,Ve,it,yt){return Ye(_e,Ve,it,yt)}function Xe(_e,Ve,it,yt){return We(Le(Ve),_e,it,yt)}function ot(_e,Ve,it,yt){return We(we(Ve,_e.length-it),_e,it,yt)}me.prototype.write=function(Ve,it,yt,Pt){if(it===void 0)Pt="utf8",yt=this.length,it=0;else if(yt===void 0&&typeof it=="string")Pt=it,yt=this.length,it=0;else if(isFinite(it))it=it>>>0,isFinite(yt)?(yt=yt>>>0,Pt===void 0&&(Pt="utf8")):(Pt=yt,yt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var jt=this.length-it;if((yt===void 0||yt>jt)&&(yt=jt),Ve.length>0&&(yt<0||it<0)||it>this.length)throw new RangeError("Attempt to write outside buffer bounds");Pt||(Pt="utf8");for(var Nt=!1;;)switch(Pt){case"hex":return Be(this,Ve,it,yt);case"utf8":case"utf-8":return Ge(this,Ve,it,yt);case"ascii":return Ye(this,Ve,it,yt);case"latin1":case"binary":return Ke(this,Ve,it,yt);case"base64":return Xe(this,Ve,it,yt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,Ve,it,yt);default:if(Nt)throw new TypeError("Unknown encoding: "+Pt);Pt=(""+Pt).toLowerCase(),Nt=!0}},me.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function lt(_e,Ve,it){return Ve===0&&it===_e.length?ve.fromByteArray(_e):ve.fromByteArray(_e.slice(Ve,it))}function ut(_e,Ve,it){it=Math.min(_e.length,it);for(var yt=[],Pt=Ve;Pt<it;){var jt=_e[Pt],Nt=null,Bt=jt>239?4:jt>223?3:jt>191?2:1;if(Pt+Bt<=it){var $t,en,qt,Zt;switch(Bt){case 1:jt<128&&(Nt=jt);break;case 2:$t=_e[Pt+1],($t&192)===128&&(Zt=(jt&31)<<6|$t&63,Zt>127&&(Nt=Zt));break;case 3:$t=_e[Pt+1],en=_e[Pt+2],($t&192)===128&&(en&192)===128&&(Zt=(jt&15)<<12|($t&63)<<6|en&63,Zt>2047&&(Zt<55296||Zt>57343)&&(Nt=Zt));break;case 4:$t=_e[Pt+1],en=_e[Pt+2],qt=_e[Pt+3],($t&192)===128&&(en&192)===128&&(qt&192)===128&&(Zt=(jt&15)<<18|($t&63)<<12|(en&63)<<6|qt&63,Zt>65535&&Zt<1114112&&(Nt=Zt))}}Nt===null?(Nt=65533,Bt=1):Nt>65535&&(Nt-=65536,yt.push(Nt>>>10&1023|55296),Nt=56320|Nt&1023),yt.push(Nt),Pt+=Bt}return Je(yt)}var Ct=4096;function Je(_e){var Ve=_e.length;if(Ve<=Ct)return String.fromCharCode.apply(String,_e);for(var it="",yt=0;yt<Ve;)it+=String.fromCharCode.apply(String,_e.slice(yt,yt+=Ct));return it}function nt(_e,Ve,it){var yt="";it=Math.min(_e.length,it);for(var Pt=Ve;Pt<it;++Pt)yt+=String.fromCharCode(_e[Pt]&127);return yt}function St(_e,Ve,it){var yt="";it=Math.min(_e.length,it);for(var Pt=Ve;Pt<it;++Pt)yt+=String.fromCharCode(_e[Pt]);return yt}function wt(_e,Ve,it){var yt=_e.length;(!Ve||Ve<0)&&(Ve=0),(!it||it<0||it>yt)&&(it=yt);for(var Pt="",jt=Ve;jt<it;++jt)Pt+=gt(_e[jt]);return Pt}function bt(_e,Ve,it){for(var yt=_e.slice(Ve,it),Pt="",jt=0;jt<yt.length;jt+=2)Pt+=String.fromCharCode(yt[jt]+yt[jt+1]*256);return Pt}me.prototype.slice=function(Ve,it){var yt=this.length;Ve=~~Ve,it=it===void 0?yt:~~it,Ve<0?(Ve+=yt,Ve<0&&(Ve=0)):Ve>yt&&(Ve=yt),it<0?(it+=yt,it<0&&(it=0)):it>yt&&(it=yt),it<Ve&&(it=Ve);var Pt=this.subarray(Ve,it);return Pt.__proto__=me.prototype,Pt};function ct(_e,Ve,it){if(_e%1!==0||_e<0)throw new RangeError("offset is not uint");if(_e+Ve>it)throw new RangeError("Trying to access beyond buffer length")}me.prototype.readUIntLE=function(Ve,it,yt){Ve=Ve>>>0,it=it>>>0,yt||ct(Ve,it,this.length);for(var Pt=this[Ve],jt=1,Nt=0;++Nt<it&&(jt*=256);)Pt+=this[Ve+Nt]*jt;return Pt},me.prototype.readUIntBE=function(Ve,it,yt){Ve=Ve>>>0,it=it>>>0,yt||ct(Ve,it,this.length);for(var Pt=this[Ve+--it],jt=1;it>0&&(jt*=256);)Pt+=this[Ve+--it]*jt;return Pt},me.prototype.readUInt8=function(Ve,it){return Ve=Ve>>>0,it||ct(Ve,1,this.length),this[Ve]},me.prototype.readUInt16LE=function(Ve,it){return Ve=Ve>>>0,it||ct(Ve,2,this.length),this[Ve]|this[Ve+1]<<8},me.prototype.readUInt16BE=function(Ve,it){return Ve=Ve>>>0,it||ct(Ve,2,this.length),this[Ve]<<8|this[Ve+1]},me.prototype.readUInt32LE=function(Ve,it){return Ve=Ve>>>0,it||ct(Ve,4,this.length),(this[Ve]|this[Ve+1]<<8|this[Ve+2]<<16)+this[Ve+3]*16777216},me.prototype.readUInt32BE=function(Ve,it){return Ve=Ve>>>0,it||ct(Ve,4,this.length),this[Ve]*16777216+(this[Ve+1]<<16|this[Ve+2]<<8|this[Ve+3])},me.prototype.readIntLE=function(Ve,it,yt){Ve=Ve>>>0,it=it>>>0,yt||ct(Ve,it,this.length);for(var Pt=this[Ve],jt=1,Nt=0;++Nt<it&&(jt*=256);)Pt+=this[Ve+Nt]*jt;return jt*=128,Pt>=jt&&(Pt-=Math.pow(2,8*it)),Pt},me.prototype.readIntBE=function(Ve,it,yt){Ve=Ve>>>0,it=it>>>0,yt||ct(Ve,it,this.length);for(var Pt=it,jt=1,Nt=this[Ve+--Pt];Pt>0&&(jt*=256);)Nt+=this[Ve+--Pt]*jt;return jt*=128,Nt>=jt&&(Nt-=Math.pow(2,8*it)),Nt},me.prototype.readInt8=function(Ve,it){return Ve=Ve>>>0,it||ct(Ve,1,this.length),this[Ve]&128?(255-this[Ve]+1)*-1:this[Ve]},me.prototype.readInt16LE=function(Ve,it){Ve=Ve>>>0,it||ct(Ve,2,this.length);var yt=this[Ve]|this[Ve+1]<<8;return yt&32768?yt|4294901760:yt},me.prototype.readInt16BE=function(Ve,it){Ve=Ve>>>0,it||ct(Ve,2,this.length);var yt=this[Ve+1]|this[Ve]<<8;return yt&32768?yt|4294901760:yt},me.prototype.readInt32LE=function(Ve,it){return Ve=Ve>>>0,it||ct(Ve,4,this.length),this[Ve]|this[Ve+1]<<8|this[Ve+2]<<16|this[Ve+3]<<24},me.prototype.readInt32BE=function(Ve,it){return Ve=Ve>>>0,it||ct(Ve,4,this.length),this[Ve]<<24|this[Ve+1]<<16|this[Ve+2]<<8|this[Ve+3]},me.prototype.readFloatLE=function(Ve,it){return Ve=Ve>>>0,it||ct(Ve,4,this.length),Ee.read(this,Ve,!0,23,4)},me.prototype.readFloatBE=function(Ve,it){return Ve=Ve>>>0,it||ct(Ve,4,this.length),Ee.read(this,Ve,!1,23,4)},me.prototype.readDoubleLE=function(Ve,it){return Ve=Ve>>>0,it||ct(Ve,8,this.length),Ee.read(this,Ve,!0,52,8)},me.prototype.readDoubleBE=function(Ve,it){return Ve=Ve>>>0,it||ct(Ve,8,this.length),Ee.read(this,Ve,!1,52,8)};function vt(_e,Ve,it,yt,Pt,jt){if(!me.isBuffer(_e))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ve>Pt||Ve<jt)throw new RangeError('"value" argument is out of bounds');if(it+yt>_e.length)throw new RangeError("Index out of range")}me.prototype.writeUIntLE=function(Ve,it,yt,Pt){if(Ve=+Ve,it=it>>>0,yt=yt>>>0,!Pt){var jt=Math.pow(2,8*yt)-1;vt(this,Ve,it,yt,jt,0)}var Nt=1,Bt=0;for(this[it]=Ve&255;++Bt<yt&&(Nt*=256);)this[it+Bt]=Ve/Nt&255;return it+yt},me.prototype.writeUIntBE=function(Ve,it,yt,Pt){if(Ve=+Ve,it=it>>>0,yt=yt>>>0,!Pt){var jt=Math.pow(2,8*yt)-1;vt(this,Ve,it,yt,jt,0)}var Nt=yt-1,Bt=1;for(this[it+Nt]=Ve&255;--Nt>=0&&(Bt*=256);)this[it+Nt]=Ve/Bt&255;return it+yt},me.prototype.writeUInt8=function(Ve,it,yt){return Ve=+Ve,it=it>>>0,yt||vt(this,Ve,it,1,255,0),this[it]=Ve&255,it+1},me.prototype.writeUInt16LE=function(Ve,it,yt){return Ve=+Ve,it=it>>>0,yt||vt(this,Ve,it,2,65535,0),this[it]=Ve&255,this[it+1]=Ve>>>8,it+2},me.prototype.writeUInt16BE=function(Ve,it,yt){return Ve=+Ve,it=it>>>0,yt||vt(this,Ve,it,2,65535,0),this[it]=Ve>>>8,this[it+1]=Ve&255,it+2},me.prototype.writeUInt32LE=function(Ve,it,yt){return Ve=+Ve,it=it>>>0,yt||vt(this,Ve,it,4,4294967295,0),this[it+3]=Ve>>>24,this[it+2]=Ve>>>16,this[it+1]=Ve>>>8,this[it]=Ve&255,it+4},me.prototype.writeUInt32BE=function(Ve,it,yt){return Ve=+Ve,it=it>>>0,yt||vt(this,Ve,it,4,4294967295,0),this[it]=Ve>>>24,this[it+1]=Ve>>>16,this[it+2]=Ve>>>8,this[it+3]=Ve&255,it+4},me.prototype.writeIntLE=function(Ve,it,yt,Pt){if(Ve=+Ve,it=it>>>0,!Pt){var jt=Math.pow(2,8*yt-1);vt(this,Ve,it,yt,jt-1,-jt)}var Nt=0,Bt=1,$t=0;for(this[it]=Ve&255;++Nt<yt&&(Bt*=256);)Ve<0&&$t===0&&this[it+Nt-1]!==0&&($t=1),this[it+Nt]=(Ve/Bt>>0)-$t&255;return it+yt},me.prototype.writeIntBE=function(Ve,it,yt,Pt){if(Ve=+Ve,it=it>>>0,!Pt){var jt=Math.pow(2,8*yt-1);vt(this,Ve,it,yt,jt-1,-jt)}var Nt=yt-1,Bt=1,$t=0;for(this[it+Nt]=Ve&255;--Nt>=0&&(Bt*=256);)Ve<0&&$t===0&&this[it+Nt+1]!==0&&($t=1),this[it+Nt]=(Ve/Bt>>0)-$t&255;return it+yt},me.prototype.writeInt8=function(Ve,it,yt){return Ve=+Ve,it=it>>>0,yt||vt(this,Ve,it,1,127,-128),Ve<0&&(Ve=255+Ve+1),this[it]=Ve&255,it+1},me.prototype.writeInt16LE=function(Ve,it,yt){return Ve=+Ve,it=it>>>0,yt||vt(this,Ve,it,2,32767,-32768),this[it]=Ve&255,this[it+1]=Ve>>>8,it+2},me.prototype.writeInt16BE=function(Ve,it,yt){return Ve=+Ve,it=it>>>0,yt||vt(this,Ve,it,2,32767,-32768),this[it]=Ve>>>8,this[it+1]=Ve&255,it+2},me.prototype.writeInt32LE=function(Ve,it,yt){return Ve=+Ve,it=it>>>0,yt||vt(this,Ve,it,4,2147483647,-2147483648),this[it]=Ve&255,this[it+1]=Ve>>>8,this[it+2]=Ve>>>16,this[it+3]=Ve>>>24,it+4},me.prototype.writeInt32BE=function(Ve,it,yt){return Ve=+Ve,it=it>>>0,yt||vt(this,Ve,it,4,2147483647,-2147483648),Ve<0&&(Ve=4294967295+Ve+1),this[it]=Ve>>>24,this[it+1]=Ve>>>16,this[it+2]=Ve>>>8,this[it+3]=Ve&255,it+4};function ht(_e,Ve,it,yt,Pt,jt){if(it+yt>_e.length)throw new RangeError("Index out of range");if(it<0)throw new RangeError("Index out of range")}function Lt(_e,Ve,it,yt,Pt){return Ve=+Ve,it=it>>>0,Pt||ht(_e,Ve,it,4,34028234663852886e22,-34028234663852886e22),Ee.write(_e,Ve,it,yt,23,4),it+4}me.prototype.writeFloatLE=function(Ve,it,yt){return Lt(this,Ve,it,!0,yt)},me.prototype.writeFloatBE=function(Ve,it,yt){return Lt(this,Ve,it,!1,yt)};function dt(_e,Ve,it,yt,Pt){return Ve=+Ve,it=it>>>0,Pt||ht(_e,Ve,it,8,17976931348623157e292,-17976931348623157e292),Ee.write(_e,Ve,it,yt,52,8),it+8}me.prototype.writeDoubleLE=function(Ve,it,yt){return dt(this,Ve,it,!0,yt)},me.prototype.writeDoubleBE=function(Ve,it,yt){return dt(this,Ve,it,!1,yt)},me.prototype.copy=function(Ve,it,yt,Pt){if(!me.isBuffer(Ve))throw new TypeError("argument should be a Buffer");if(yt||(yt=0),!Pt&&Pt!==0&&(Pt=this.length),it>=Ve.length&&(it=Ve.length),it||(it=0),Pt>0&&Pt<yt&&(Pt=yt),Pt===yt||Ve.length===0||this.length===0)return 0;if(it<0)throw new RangeError("targetStart out of bounds");if(yt<0||yt>=this.length)throw new RangeError("Index out of range");if(Pt<0)throw new RangeError("sourceEnd out of bounds");Pt>this.length&&(Pt=this.length),Ve.length-it<Pt-yt&&(Pt=Ve.length-it+yt);var jt=Pt-yt;if(this===Ve&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(it,yt,Pt);else if(this===Ve&&yt<it&&it<Pt)for(var Nt=jt-1;Nt>=0;--Nt)Ve[Nt+it]=this[Nt+yt];else Uint8Array.prototype.set.call(Ve,this.subarray(yt,Pt),it);return jt},me.prototype.fill=function(Ve,it,yt,Pt){if(typeof Ve=="string"){if(typeof it=="string"?(Pt=it,it=0,yt=this.length):typeof yt=="string"&&(Pt=yt,yt=this.length),Pt!==void 0&&typeof Pt!="string")throw new TypeError("encoding must be a string");if(typeof Pt=="string"&&!me.isEncoding(Pt))throw new TypeError("Unknown encoding: "+Pt);if(Ve.length===1){var jt=Ve.charCodeAt(0);(Pt==="utf8"&&jt<128||Pt==="latin1")&&(Ve=jt)}}else typeof Ve=="number"&&(Ve=Ve&255);if(it<0||this.length<it||this.length<yt)throw new RangeError("Out of range index");if(yt<=it)return this;it=it>>>0,yt=yt===void 0?this.length:yt>>>0,Ve||(Ve=0);var Nt;if(typeof Ve=="number")for(Nt=it;Nt<yt;++Nt)this[Nt]=Ve;else{var Bt=me.isBuffer(Ve)?Ve:me.from(Ve,Pt),$t=Bt.length;if($t===0)throw new TypeError('The value "'+Ve+'" is invalid for argument "value"');for(Nt=0;Nt<yt-it;++Nt)this[Nt+it]=Bt[Nt%$t]}return this};var mt=/[^+/0-9A-Za-z-_]/g;function Et(_e){if(_e=_e.split("=")[0],_e=_e.trim().replace(mt,""),_e.length<2)return"";for(;_e.length%4!==0;)_e=_e+"=";return _e}function gt(_e){return _e<16?"0"+_e.toString(16):_e.toString(16)}function $e(_e,Ve){Ve=Ve||1/0;for(var it,yt=_e.length,Pt=null,jt=[],Nt=0;Nt<yt;++Nt){if(it=_e.charCodeAt(Nt),it>55295&&it<57344){if(!Pt){if(it>56319){(Ve-=3)>-1&&jt.push(239,191,189);continue}else if(Nt+1===yt){(Ve-=3)>-1&&jt.push(239,191,189);continue}Pt=it;continue}if(it<56320){(Ve-=3)>-1&&jt.push(239,191,189),Pt=it;continue}it=(Pt-55296<<10|it-56320)+65536}else Pt&&(Ve-=3)>-1&&jt.push(239,191,189);if(Pt=null,it<128){if((Ve-=1)<0)break;jt.push(it)}else if(it<2048){if((Ve-=2)<0)break;jt.push(it>>6|192,it&63|128)}else if(it<65536){if((Ve-=3)<0)break;jt.push(it>>12|224,it>>6&63|128,it&63|128)}else if(it<1114112){if((Ve-=4)<0)break;jt.push(it>>18|240,it>>12&63|128,it>>6&63|128,it&63|128)}else throw new Error("Invalid code point")}return jt}function He(_e){for(var Ve=[],it=0;it<_e.length;++it)Ve.push(_e.charCodeAt(it)&255);return Ve}function we(_e,Ve){for(var it,yt,Pt,jt=[],Nt=0;Nt<_e.length&&!((Ve-=2)<0);++Nt)it=_e.charCodeAt(Nt),yt=it>>8,Pt=it%256,jt.push(Pt),jt.push(yt);return jt}function Le(_e){return ve.toByteArray(Et(_e))}function We(_e,Ve,it,yt){for(var Pt=0;Pt<yt&&!(Pt+it>=Ve.length||Pt>=_e.length);++Pt)Ve[Pt+it]=_e[Pt];return Pt}function tt(_e,Ve){return _e instanceof Ve||_e!=null&&_e.constructor!=null&&_e.constructor.name!=null&&_e.constructor.name===Ve.name}function Re(_e){return _e!==_e}}).call(this)}).call(this,oe("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(oe,Ue,Ie){Ue.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,Ue,Ie){"use strict";var de=oe("get-intrinsic"),ve=oe("./"),Ee=ve(de("String.prototype.indexOf"));Ue.exports=function(Se,je){var me=de(Se,!!je);return typeof me=="function"&&Ee(Se,".prototype.")>-1?ve(me):me}},{"./":93,"get-intrinsic":348}],93:[function(oe,Ue,Ie){"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),je=ve("%Object.getOwnPropertyDescriptor%",!0),me=ve("%Object.defineProperty%",!0),Pe=ve("%Math.max%");if(me)try{me({},"a",{value:1})}catch(z){me=null}Ue.exports=function(te){var se=Se(de,ke,arguments);if(je&&me){var ie=je(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(Ue.exports,"apply",{value:fe}):Ue.exports.apply=fe},{"function-bind":347,"get-intrinsic":348}],94:[function(oe,Ue,Ie){"use strict";var de=Array.prototype.slice;Ue.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 je=0;je<Se.length;je++)me=Se[je],ke[me]===void 0&&(ke[me]=this.src[me]);return ke}for(var je=0;je<Se.length;je++){var me=Se[je];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),je=0;je<Se.length;je++){var me=Se[je];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,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=oe("../internals/try-to-string"),ke=de.TypeError;Ue.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,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/is-constructor"),Ee=oe("../internals/try-to-string"),ke=de.TypeError;Ue.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,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=de.String,ke=de.TypeError;Ue.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,Ue,Ie){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)}),Ue.exports=function(je){Se[ke][je]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(oe,Ue,Ie){"use strict";var de=oe("../internals/string-multibyte").charAt;Ue.exports=function(ve,Ee,ke){return Ee+(ke?de(ve,Ee).length:1)}},{"../internals/string-multibyte":239}],100:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/object-is-prototype-of"),Ee=de.TypeError;Ue.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,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/is-object"),Ee=de.String,ke=de.TypeError;Ue.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,Ue,Ie){Ue.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(oe,Ue,Ie){"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"),je=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,Ae=xe&&xe.prototype,De=Ee.Uint8ClampedArray,Fe=De&&De.prototype,Te=xe&&ie(xe),Ne=Ae&&ie(Ae),Be=Object.prototype,Ge=Ee.TypeError,Ye=ce("toStringTag"),Ke=pe("TYPED_ARRAY_TAG"),Xe=pe("TYPED_ARRAY_CONSTRUCTOR"),ot=de&&!!le&&me(Ee.opera)!=="Opera",lt=!1,ut,Ct,Je,nt={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},St={BigInt64Array:8,BigUint64Array:8},wt=function(mt){if(!Se(mt))return!1;var Et=me(mt);return Et==="DataView"||je(nt,Et)||je(St,Et)},bt=function(dt){if(!Se(dt))return!1;var mt=me(dt);return je(nt,mt)||je(St,mt)},ct=function(dt){if(bt(dt))return dt;throw Ge("Target is not a typed array")},vt=function(dt){if(ke(dt)&&(!le||se(Te,dt)))return dt;throw Ge(Pe(dt)+" is not a typed array constructor")},ht=function(dt,mt,Et,gt){if(ve){if(Et)for(var $e in nt){var He=Ee[$e];if(He&&je(He.prototype,dt))try{delete He.prototype[dt]}catch(we){try{He.prototype[dt]=mt}catch(Le){}}}(!Ne[dt]||Et)&&z(Ne,dt,Et?mt:ot&&Ae[dt]||mt,gt)}},Lt=function(dt,mt,Et){var gt,$e;if(ve){if(le){if(Et){for(gt in nt)if($e=Ee[gt],$e&&je($e,dt))try{delete $e[dt]}catch(He){}}if(!Te[dt]||Et)try{return z(Te,dt,Et?mt:ot&&Te[dt]||mt)}catch(He){}else return}for(gt in nt)$e=Ee[gt],$e&&(!$e[dt]||Et)&&z($e,dt,mt)}};for(ut in nt)Ct=Ee[ut],Je=Ct&&Ct.prototype,Je?fe(Je,Xe,Ct):ot=!1;for(ut in St)Ct=Ee[ut],Je=Ct&&Ct.prototype,Je&&fe(Je,Xe,Ct);if((!ot||!ke(Te)||Te===Function.prototype)&&(Te=function(){throw Ge("Incorrect invocation")},ot))for(ut in nt)Ee[ut]&&le(Ee[ut],Te);if((!ot||!Ne||Ne===Be)&&(Ne=Te.prototype,ot))for(ut in nt)Ee[ut]&&le(Ee[ut].prototype,Ne);if(ot&&ie(Fe)!==Ne&&le(Fe,Ne),ve&&!je(Ne,Ye)){lt=!0,te(Ne,Ye,{get:function(){return Se(this)?this[Ke]:void 0}});for(ut in nt)Ee[ut]&&fe(Ee[ut],Ke,ut)}Ue.exports={NATIVE_ARRAY_BUFFER_VIEWS:ot,TYPED_ARRAY_CONSTRUCTOR:Xe,TYPED_ARRAY_TAG:lt&&Ke,aTypedArray:ct,aTypedArrayConstructor:vt,exportTypedArrayMethod:ht,exportTypedArrayStaticMethod:Lt,isView:wt,isTypedArray:bt,TypedArray:Te,TypedArrayPrototype:Ne}},{"../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,Ue,Ie){"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"),je=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,Ae=oe("../internals/array-fill"),De=oe("../internals/array-slice-simple"),Fe=oe("../internals/set-to-string-tag"),Te=oe("../internals/internal-state"),Ne=Se.PROPER,Be=Se.CONFIGURABLE,Ge=Te.get,Ye=Te.set,Ke="ArrayBuffer",Xe="DataView",ot="prototype",lt="Wrong length",ut="Wrong index",Ct=de[Ke],Je=Ct,nt=Je&&Je[ot],St=de[Xe],wt=St&&St[ot],bt=Object.prototype,ct=de.Array,vt=de.RangeError,ht=ve(Ae),Lt=ve([].reverse),dt=ie.pack,mt=ie.unpack,Et=function(Nt){return[Nt&255]},gt=function(Nt){return[Nt&255,Nt>>8&255]},$e=function(Nt){return[Nt&255,Nt>>8&255,Nt>>16&255,Nt>>24&255]},He=function(Nt){return Nt[3]<<24|Nt[2]<<16|Nt[1]<<8|Nt[0]},we=function(Nt){return dt(Nt,23,4)},Le=function(Nt){return dt(Nt,52,8)},We=function(Nt,Bt){xe(Nt[ot],Bt,{get:function(){return Ge(this)[Bt]}})},tt=function(Nt,Bt,$t,en){var qt=se($t),Zt=Ge(Nt);if(qt+Bt>Zt.byteLength)throw vt(ut);var hn=Ge(Zt.buffer).bytes,an=qt+Zt.byteOffset,cn=De(hn,an,an+Bt);return en?cn:Lt(cn)},Re=function(Nt,Bt,$t,en,qt,Zt){var hn=se($t),an=Ge(Nt);if(hn+Bt>an.byteLength)throw vt(ut);for(var cn=Ge(an.buffer).bytes,wn=hn+an.byteOffset,xn=en(+qt),Nn=0;Nn<Bt;Nn++)cn[wn+Nn]=xn[Zt?Nn:Bt-Nn-1]};if(!ke)Je=function(Bt){fe(this,nt);var $t=se(Bt);Ye(this,{bytes:ht(ct($t),0),byteLength:$t}),Ee||(this.byteLength=$t)},nt=Je[ot],St=function(Bt,$t,en){fe(this,wt),fe(Bt,nt);var qt=Ge(Bt).byteLength,Zt=z($t);if(Zt<0||Zt>qt)throw vt("Wrong offset");if(en=en===void 0?qt-Zt:te(en),Zt+en>qt)throw vt(lt);Ye(this,{buffer:Bt,byteLength:en,byteOffset:Zt}),Ee||(this.buffer=Bt,this.byteLength=en,this.byteOffset=Zt)},wt=St[ot],Ee&&(We(Je,"byteLength"),We(St,"buffer"),We(St,"byteLength"),We(St,"byteOffset")),me(wt,{getInt8:function(Bt){return tt(this,1,Bt)[0]<<24>>24},getUint8:function(Bt){return tt(this,1,Bt)[0]},getInt16:function(Bt){var $t=tt(this,2,Bt,arguments.length>1?arguments[1]:void 0);return($t[1]<<8|$t[0])<<16>>16},getUint16:function(Bt){var $t=tt(this,2,Bt,arguments.length>1?arguments[1]:void 0);return $t[1]<<8|$t[0]},getInt32:function(Bt){return He(tt(this,4,Bt,arguments.length>1?arguments[1]:void 0))},getUint32:function(Bt){return He(tt(this,4,Bt,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Bt){return mt(tt(this,4,Bt,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Bt){return mt(tt(this,8,Bt,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Bt,$t){Re(this,1,Bt,Et,$t)},setUint8:function(Bt,$t){Re(this,1,Bt,Et,$t)},setInt16:function(Bt,$t){Re(this,2,Bt,gt,$t,arguments.length>2?arguments[2]:void 0)},setUint16:function(Bt,$t){Re(this,2,Bt,gt,$t,arguments.length>2?arguments[2]:void 0)},setInt32:function(Bt,$t){Re(this,4,Bt,$e,$t,arguments.length>2?arguments[2]:void 0)},setUint32:function(Bt,$t){Re(this,4,Bt,$e,$t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Bt,$t){Re(this,4,Bt,we,$t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Bt,$t){Re(this,8,Bt,Le,$t,arguments.length>2?arguments[2]:void 0)}});else{var _e=Ne&&Ct.name!==Ke;if(!Pe(function(){Ct(1)})||!Pe(function(){new Ct(-1)})||Pe(function(){return new Ct,new Ct(1.5),new Ct(NaN),_e&&!Be})){Je=function(Bt){return fe(this,nt),new Ct(se(Bt))},Je[ot]=nt;for(var Ve=pe(Ct),it=0,yt;Ve.length>it;)(yt=Ve[it++])in Je||je(Je,yt,Ct[yt]);nt.constructor=Je}else _e&&Be&&je(Ct,"name",Ke);ce&&le(wt)!==bt&&ce(wt,bt);var Pt=new St(new Je(2)),jt=ve(wt.setInt8);Pt.setInt8(0,2147483648),Pt.setInt8(1,2147483649),(Pt.getInt8(0)||!Pt.getInt8(1))&&me(wt,{setInt8:function(Bt,$t){jt(this,Bt,$t<<24>>24)},setUint8:function(Bt,$t){jt(this,Bt,$t<<24>>24)}},{unsafe:!0})}Fe(Je,Ke),Fe(St,Xe),Ue.exports={ArrayBuffer:Je,DataView:St}},{"../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,Ue,Ie){"use strict";var de=oe("../internals/to-object"),ve=oe("../internals/to-absolute-index"),Ee=oe("../internals/length-of-array-like"),ke=Math.min;Ue.exports=[].copyWithin||function(je,me){var Pe=de(this),fe=Ee(Pe),z=ve(je,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,Ue,Ie){"use strict";var de=oe("../internals/to-object"),ve=oe("../internals/to-absolute-index"),Ee=oe("../internals/length-of-array-like");Ue.exports=function(Se){for(var je=de(this),me=Ee(je),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;)je[fe++]=Se;return je}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(oe,Ue,Ie){"use strict";var de=oe("../internals/array-iteration").forEach,ve=oe("../internals/array-method-is-strict"),Ee=ve("forEach");Ue.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,Ue,Ie){var de=oe("../internals/length-of-array-like");Ue.exports=function(ve,Ee){for(var ke=0,Se=de(Ee),je=new ve(Se);Se>ke;)je[ke]=Ee[ke++];return je}},{"../internals/length-of-array-like":188}],109:[function(oe,Ue,Ie){"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"),je=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;Ue.exports=function(le){var ce=ke(le),pe=me(this),xe=arguments.length,Ae=xe>1?arguments[1]:void 0,De=Ae!==void 0;De&&(Ae=ve(Ae,xe>2?arguments[2]:void 0));var Fe=te(ce),Te=0,Ne,Be,Ge,Ye,Ke,Xe;if(Fe&&!(this==se&&je(Fe)))for(Ye=z(ce,Fe),Ke=Ye.next,Be=pe?new this:[];!(Ge=Ee(Ke,Ye)).done;Te++)Xe=De?Se(Ye,Ae,[Ge.value,Te],!0):Ge.value,fe(Be,Te,Xe);else for(Ne=Pe(ce),Be=pe?new this(Ne):se(Ne);Ne>Te;Te++)Xe=De?Ae(ce[Te],Te):ce[Te],fe(Be,Te,Xe);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,Ue,Ie){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(je,me,Pe){var fe=de(je),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}};Ue.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,Ue,Ie){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"),je=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,Ae,De,Fe){for(var Te=ke(xe),Ne=Ee(Te),Be=de(Ae,De),Ge=Se(Ne),Ye=0,Ke=Fe||je,Xe=z?Ke(xe,Ge):te||ce?Ke(xe,0):void 0,ot,lt;Ge>Ye;Ye++)if((pe||Ye in Ne)&&(ot=Ne[Ye],lt=Be(ot,Ye,Te),fe))if(z)Xe[Ye]=lt;else if(lt)switch(fe){case 3:return!0;case 5:return ot;case 6:return Ye;case 2:me(Xe,ot)}else switch(fe){case 4:return!1;case 7:me(Xe,ot)}return le?-1:se||ie?ie:Xe}};Ue.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,Ue,Ie){"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"),je=Math.min,me=[].lastIndexOf,Pe=!!me&&1/[1].lastIndexOf(1,-0)<0,fe=Se("lastIndexOf"),z=Pe||!fe;Ue.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=je(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,Ue,Ie){var de=oe("../internals/fails"),ve=oe("../internals/well-known-symbol"),Ee=oe("../internals/engine-v8-version"),ke=ve("species");Ue.exports=function(Se){return Ee>=51||!de(function(){var je=[],me=je.constructor={};return me[ke]=function(){return{foo:1}},je[Se](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(oe,Ue,Ie){"use strict";var de=oe("../internals/fails");Ue.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,Ue,Ie){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"),je=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 je("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}};Ue.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,Ue,Ie){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,je=Math.max;Ue.exports=function(me,Pe,fe){for(var z=Ee(me),te=ve(Pe,z),se=ve(fe===void 0?z:fe,z),ie=Se(je(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,Ue,Ie){var de=oe("../internals/function-uncurry-this");Ue.exports=de([].slice)},{"../internals/function-uncurry-this":157}],118:[function(oe,Ue,Ie){var de=oe("../internals/array-slice-simple"),ve=Math.floor,Ee=function(je,me){var Pe=je.length,fe=ve(Pe/2);return Pe<8?ke(je,me):Se(je,Ee(de(je,0,fe),me),Ee(de(je,fe),me),me)},ke=function(je,me){for(var Pe=je.length,fe=1,z,te;fe<Pe;){for(te=fe,z=je[fe];te&&me(je[te-1],z)>0;)je[te]=je[--te];te!==fe++&&(je[te]=z)}return je},Se=function(je,me,Pe,fe){for(var z=me.length,te=Pe.length,se=0,ie=0;se<z||ie<te;)je[se+ie]=se<z&&ie<te?fe(me[se],Pe[ie])<=0?me[se++]:Pe[ie++]:se<z?me[se++]:Pe[ie++];return je};Ue.exports=Ee},{"../internals/array-slice-simple":116}],119:[function(oe,Ue,Ie){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"),je=Se("species"),me=de.Array;Ue.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[je],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,Ue,Ie){var de=oe("../internals/array-species-constructor");Ue.exports=function(ve,Ee){return new(de(ve))(Ee===0?0:Ee)}},{"../internals/array-species-constructor":119}],121:[function(oe,Ue,Ie){var de=oe("../internals/an-object"),ve=oe("../internals/iterator-close");Ue.exports=function(Ee,ke,Se,je){try{return je?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,Ue,Ie){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(je){}Ue.exports=function(je,me){if(!me&&!Ee)return!1;var Pe=!1;try{var fe={};fe[ve]=function(){return{next:function(){return{done:Pe=!0}}}},je(fe)}catch(z){}return Pe}},{"../internals/well-known-symbol":268}],123:[function(oe,Ue,Ie){var de=oe("../internals/function-uncurry-this"),ve=de({}.toString),Ee=de("".slice);Ue.exports=function(ke){return Ee(ve(ke),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(oe,Ue,Ie){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"),je=Se("toStringTag"),me=de.Object,Pe=ke(function(){return arguments}())=="Arguments",fe=function(z,te){try{return z[te]}catch(se){}};Ue.exports=ve?ke:function(z){var te,se,ie;return z===void 0?"Undefined":z===null?"Null":typeof(se=fe(te=me(z),je))=="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,Ue,Ie){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");Ue.exports=function(Se,je,me){for(var Pe=ve(je),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(je,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,Ue,Ie){var de=oe("../internals/well-known-symbol"),ve=de("match");Ue.exports=function(Ee){var ke=/./;try{"/./"[Ee](ke)}catch(Se){try{return ke[ve]=!1,"/./"[Ee](ke)}catch(je){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(oe,Ue,Ie){var de=oe("../internals/fails");Ue.exports=!de(function(){function ve(){}return ve.prototype.constructor=null,Object.getPrototypeOf(new ve)!==ve.prototype})},{"../internals/fails":150}],128:[function(oe,Ue,Ie){"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"),je=function(){return this};Ue.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]=je,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,Ue,Ie){var de=oe("../internals/descriptors"),ve=oe("../internals/object-define-property"),Ee=oe("../internals/create-property-descriptor");Ue.exports=de?function(ke,Se,je){return ve.f(ke,Se,Ee(1,je))}:function(ke,Se,je){return ke[Se]=je,ke}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(oe,Ue,Ie){Ue.exports=function(de,ve){return{enumerable:!(de&1),configurable:!(de&2),writable:!(de&4),value:ve}}},{}],131:[function(oe,Ue,Ie){"use strict";var de=oe("../internals/to-property-key"),ve=oe("../internals/object-define-property"),Ee=oe("../internals/create-property-descriptor");Ue.exports=function(ke,Se,je){var me=de(Se);me in ke?ve.f(ke,me,Ee(0,je)):ke[me]=je}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(oe,Ue,Ie){"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"),je=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,Ae=le.BUGGY_SAFARI_ITERATORS,De=se("iterator"),Fe="keys",Te="values",Ne="entries",Be=function(){return this};Ue.exports=function(Ge,Ye,Ke,Xe,ot,lt,ut){je(Ke,Ye,Xe);var Ct=function(dt){if(dt===ot&&bt)return bt;if(!Ae&&dt in St)return St[dt];switch(dt){case Fe:return function(){return new Ke(this,dt)};case Te:return function(){return new Ke(this,dt)};case Ne:return function(){return new Ke(this,dt)}}return function(){return new Ke(this)}},Je=Ye+" Iterator",nt=!1,St=Ge.prototype,wt=St[De]||St["@@iterator"]||ot&&St[ot],bt=!Ae&&wt||Ct(ot),ct=Ye=="Array"&&St.entries||wt,vt,ht,Lt;if(ct&&(vt=me(ct.call(new Ge)),vt!==Object.prototype&&vt.next&&(!Ee&&me(vt)!==xe&&(Pe?Pe(vt,xe):Se(vt[De])||te(vt,De,Be)),fe(vt,Je,!0,!0),Ee&&(ie[Je]=Be))),ce&&ot==Te&&wt&&wt.name!==Te&&(!Ee&&pe?z(St,"name",Te):(nt=!0,bt=function(){return ve(wt,this)})),ot)if(ht={values:Ct(Te),keys:lt?bt:Ct(Fe),entries:Ct(Ne)},ut)for(Lt in ht)(Ae||nt||!(Lt in St))&&te(St,Lt,ht[Lt]);else de({target:Ye,proto:!0,forced:Ae||nt},ht);return(!Ee||ut)&&St[De]!==bt&&te(St,De,bt,{name:ot}),ie[Ye]=bt,ht}},{"../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,Ue,Ie){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;Ue.exports=function(Se){var je=de.Symbol||(de.Symbol={});ve(je,Se)||ke(je,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,Ue,Ie){var de=oe("../internals/fails");Ue.exports=!de(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/is-object"),Ee=de.document,ke=ve(Ee)&&ve(Ee.createElement);Ue.exports=function(Se){return ke?Ee.createElement(Se):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(oe,Ue,Ie){Ue.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,Ue,Ie){var de=oe("../internals/document-create-element"),ve=de("span").classList,Ee=ve&&ve.constructor&&ve.constructor.prototype;Ue.exports=Ee===Object.prototype?void 0:Ee},{"../internals/document-create-element":135}],138:[function(oe,Ue,Ie){var de=oe("../internals/engine-user-agent"),ve=de.match(/firefox\/(\d+)/i);Ue.exports=!!ve&&+ve[1]},{"../internals/engine-user-agent":145}],139:[function(oe,Ue,Ie){Ue.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(oe,Ue,Ie){var de=oe("../internals/engine-user-agent");Ue.exports=/MSIE|Trident/.test(de)},{"../internals/engine-user-agent":145}],141:[function(oe,Ue,Ie){var de=oe("../internals/engine-user-agent"),ve=oe("../internals/global");Ue.exports=/ipad|iphone|ipod/i.test(de)&&ve.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(oe,Ue,Ie){var de=oe("../internals/engine-user-agent");Ue.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(de)},{"../internals/engine-user-agent":145}],143:[function(oe,Ue,Ie){var de=oe("../internals/classof-raw"),ve=oe("../internals/global");Ue.exports=de(ve.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(oe,Ue,Ie){var de=oe("../internals/engine-user-agent");Ue.exports=/web0s(?!.*chrome)/i.test(de)},{"../internals/engine-user-agent":145}],145:[function(oe,Ue,Ie){var de=oe("../internals/get-built-in");Ue.exports=de("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/engine-user-agent"),Ee=de.process,ke=de.Deno,Se=Ee&&Ee.versions||ke&&ke.version,je=Se&&Se.v8,me,Pe;je&&(me=je.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]))),Ue.exports=Pe},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(oe,Ue,Ie){var de=oe("../internals/engine-user-agent"),ve=de.match(/AppleWebKit\/(\d+)\./);Ue.exports=!!ve&&+ve[1]},{"../internals/engine-user-agent":145}],148:[function(oe,Ue,Ie){Ue.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(oe,Ue,Ie){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"),je=oe("../internals/copy-constructor-properties"),me=oe("../internals/is-forced");Ue.exports=function(Pe,fe){var z=Pe.target,te=Pe.global,se=Pe.stat,ie,le,ce,pe,xe,Ae;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?(Ae=ve(le,ce),pe=Ae&&Ae.value):pe=le[ce],ie=me(te?ce:z+(se?".":"#")+ce,Pe.forced),!ie&&pe!==void 0){if(typeof xe==typeof pe)continue;je(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,Ue,Ie){Ue.exports=function(de){try{return!!de()}catch(ve){return!0}}},{}],151:[function(oe,Ue,Ie){"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"),je=oe("../internals/create-non-enumerable-property"),me=Se("species"),Pe=RegExp.prototype;Ue.exports=function(fe,z,te,se){var ie=Se(fe),le=!ke(function(){var Ae={};return Ae[ie]=function(){return 7},""[fe](Ae)!=7}),ce=le&&!ke(function(){var Ae=!1,De=/a/;return fe==="split"&&(De={},De.constructor={},De.constructor[me]=function(){return De},De.flags="",De[ie]=/./[ie]),De.exec=function(){return Ae=!0,null},De[ie](""),!Ae});if(!le||!ce||te){var pe=de(/./[ie]),xe=z(ie,""[fe],function(Ae,De,Fe,Te,Ne){var Be=de(Ae),Ge=De.exec;return Ge===Ee||Ge===Pe.exec?le&&!Ne?{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&&je(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,Ue,Ie){var de=oe("../internals/function-bind-native"),ve=Function.prototype,Ee=ve.apply,ke=ve.call;Ue.exports=typeof Reflect=="object"&&Reflect.apply||(de?ke.bind(Ee):function(){return ke.apply(Ee,arguments)})},{"../internals/function-bind-native":154}],153:[function(oe,Ue,Ie){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/a-callable"),Ee=oe("../internals/function-bind-native"),ke=de(de.bind);Ue.exports=function(Se,je){return ve(Se),je===void 0?Se:Ee?ke(Se,je):function(){return Se.apply(je,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(oe,Ue,Ie){var de=oe("../internals/fails");Ue.exports=!de(function(){var ve=function(){}.bind();return typeof ve!="function"||ve.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(oe,Ue,Ie){var de=oe("../internals/function-bind-native"),ve=Function.prototype.call;Ue.exports=de?ve.bind(ve):function(){return ve.apply(ve,arguments)}},{"../internals/function-bind-native":154}],156:[function(oe,Ue,Ie){var de=oe("../internals/descriptors"),ve=oe("../internals/has-own-property"),Ee=Function.prototype,ke=de&&Object.getOwnPropertyDescriptor,Se=ve(Ee,"name"),je=Se&&function(){}.name==="something",me=Se&&(!de||de&&ke(Ee,"name").configurable);Ue.exports={EXISTS:Se,PROPER:je,CONFIGURABLE:me}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(oe,Ue,Ie){var de=oe("../internals/function-bind-native"),ve=Function.prototype,Ee=ve.bind,ke=ve.call,Se=de&&Ee.bind(ke,ke);Ue.exports=de?function(je){return je&&Se(je)}:function(je){return je&&function(){return ke.apply(je,arguments)}}},{"../internals/function-bind-native":154}],158:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=function(ke){return ve(ke)?ke:void 0};Ue.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,Ue,Ie){var de=oe("../internals/classof"),ve=oe("../internals/get-method"),Ee=oe("../internals/iterators"),ke=oe("../internals/well-known-symbol"),Se=ke("iterator");Ue.exports=function(je){if(je!=null)return ve(je,Se)||ve(je,"@@iterator")||Ee[de(je)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(oe,Ue,Ie){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"),je=oe("../internals/get-iterator-method"),me=de.TypeError;Ue.exports=function(Pe,fe){var z=arguments.length<2?je(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,Ue,Ie){var de=oe("../internals/a-callable");Ue.exports=function(ve,Ee){var ke=ve[Ee];return ke==null?void 0:de(ke)}},{"../internals/a-callable":95}],162:[function(oe,Ue,Ie){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/to-object"),Ee=Math.floor,ke=de("".charAt),Se=de("".replace),je=de("".slice),me=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Pe=/\$([$&'`]|\d{1,2})/g;Ue.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(Ae,De){var Fe;switch(ke(De,0)){case"$":return"$";case"&":return fe;case"`":return je(z,0,te);case"'":return je(z,ce);case"<":Fe=ie[je(De,1,-1)];break;default:var Te=+De;if(Te===0)return Ae;if(Te>pe){var Ne=Ee(Te/10);return Ne===0?Ae:Ne<=pe?se[Ne-1]===void 0?ke(De,1):se[Ne-1]+ke(De,1):Ae}Fe=se[Te-1]}return Fe===void 0?"":Fe})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(oe,Ue,Ie){(function(de){(function(){var ve=function(Ee){return Ee&&Ee.Math==Math&&Ee};Ue.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,Ue,Ie){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/to-object"),Ee=de({}.hasOwnProperty);Ue.exports=Object.hasOwn||function(Se,je){return Ee(ve(Se),je)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(oe,Ue,Ie){Ue.exports={}},{}],166:[function(oe,Ue,Ie){var de=oe("../internals/global");Ue.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,Ue,Ie){var de=oe("../internals/get-built-in");Ue.exports=de("document","documentElement")},{"../internals/get-built-in":158}],168:[function(oe,Ue,Ie){var de=oe("../internals/descriptors"),ve=oe("../internals/fails"),Ee=oe("../internals/document-create-element");Ue.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,Ue,Ie){var de=oe("../internals/global"),ve=de.Array,Ee=Math.abs,ke=Math.pow,Se=Math.floor,je=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,Ae=z<0||z===0&&1/z<0?1:0,De=0,Fe,Te,Ne;for(z=Ee(z),z!=z||z===1/0?(Te=z!=z?1:0,Fe=ce):(Fe=Se(je(z)/me),Ne=ke(2,-Fe),z*Ne<1&&(Fe--,Ne*=2),Fe+pe>=1?z+=xe/Ne:z+=xe*ke(2,1-pe),z*Ne>=2&&(Fe++,Ne/=2),Fe+pe>=ce?(Te=0,Fe=ce):Fe+pe>=1?(Te=(z*Ne-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]|=Ae*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,Ae=z[xe--],De=Ae&127,Fe;for(Ae>>=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:Ae?-1/0:1/0;Fe=Fe+ke(2,te),De=De-ce}return(Ae?-1:1)*Fe*ke(2,De-te)};Ue.exports={pack:Pe,unpack:fe}},{"../internals/global":163}],170:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/fails"),ke=oe("../internals/classof-raw"),Se=de.Object,je=ve("".split);Ue.exports=Ee(function(){return!Se("z").propertyIsEnumerable(0)})?function(me){return ke(me)=="String"?je(me,""):Se(me)}:Se},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(oe,Ue,Ie){var de=oe("../internals/is-callable"),ve=oe("../internals/is-object"),Ee=oe("../internals/object-set-prototype-of");Ue.exports=function(ke,Se,je){var me,Pe;return Ee&&de(me=Se.constructor)&&me!==je&&ve(Pe=me.prototype)&&Pe!==je.prototype&&Ee(ke,Pe),ke}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(oe,Ue,Ie){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)}),Ue.exports=Ee.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(oe,Ue,Ie){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"),je=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(Ge){var Ye;if(!ke(Ge)||(Ye=le(Ge)).type!==Be)throw te("Incompatible receiver, "+Be+" required");return Ye}};if(de||me.state){var Ae=me.state||(me.state=new se),De=Ee(Ae.get),Fe=Ee(Ae.has),Te=Ee(Ae.set);ie=function(Be,Ge){if(Fe(Ae,Be))throw new te(z);return Ge.facade=Be,Te(Ae,Be,Ge),Ge},le=function(Be){return De(Ae,Be)||{}},ce=function(Be){return Fe(Ae,Be)}}else{var Ne=Pe("state");fe[Ne]=!0,ie=function(Be,Ge){if(je(Be,Ne))throw new te(z);return Ge.facade=Be,Se(Be,Ne,Ge),Ge},le=function(Be){return je(Be,Ne)?Be[Ne]:{}},ce=function(Be){return je(Be,Ne)}}Ue.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,Ue,Ie){var de=oe("../internals/well-known-symbol"),ve=oe("../internals/iterators"),Ee=de("iterator"),ke=Array.prototype;Ue.exports=function(Se){return Se!==void 0&&(ve.Array===Se||ke[Ee]===Se)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(oe,Ue,Ie){var de=oe("../internals/classof-raw");Ue.exports=Array.isArray||function(Ee){return de(Ee)=="Array"}},{"../internals/classof-raw":123}],176:[function(oe,Ue,Ie){Ue.exports=function(de){return typeof de=="function"}},{}],177:[function(oe,Ue,Ie){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"),je=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,je(pe))}catch(xe){return!0}};le.sham=!0,Ue.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,Ue,Ie){var de=oe("../internals/fails"),ve=oe("../internals/is-callable"),Ee=/#|\.prototype\./,ke=function(fe,z){var te=je[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()},je=ke.data={},me=ke.NATIVE="N",Pe=ke.POLYFILL="P";Ue.exports=ke},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(oe,Ue,Ie){var de=oe("../internals/is-object"),ve=Math.floor;Ue.exports=Number.isInteger||function(ke){return!de(ke)&&isFinite(ke)&&ve(ke)===ke}},{"../internals/is-object":180}],180:[function(oe,Ue,Ie){var de=oe("../internals/is-callable");Ue.exports=function(ve){return typeof ve=="object"?ve!==null:de(ve)}},{"../internals/is-callable":176}],181:[function(oe,Ue,Ie){Ue.exports=!1},{}],182:[function(oe,Ue,Ie){var de=oe("../internals/is-object"),ve=oe("../internals/classof-raw"),Ee=oe("../internals/well-known-symbol"),ke=Ee("match");Ue.exports=function(Se){var je;return de(Se)&&((je=Se[ke])!==void 0?!!je:ve(Se)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(oe,Ue,Ie){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"),je=de.Object;Ue.exports=Se?function(me){return typeof me=="symbol"}:function(me){var Pe=ve("Symbol");return Ee(Pe)&&ke(Pe.prototype,je(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,Ue,Ie){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"),je=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;Ue.exports=function(ce,pe,xe){var Ae=xe&&xe.that,De=!!(xe&&xe.AS_ENTRIES),Fe=!!(xe&&xe.IS_ITERATOR),Te=!!(xe&&xe.INTERRUPTED),Ne=ve(pe,Ae),Be,Ge,Ye,Ke,Xe,ot,lt,ut=function(Je){return Be&&te(Be,"normal",Je),new ie(!0,Je)},Ct=function(Je){return De?(ke(Je),Te?Ne(Je[0],Je[1],ut):Ne(Je[0],Je[1])):Te?Ne(Je,ut):Ne(Je)};if(Fe)Be=ce;else{if(Ge=z(ce),!Ge)throw se(Se(ce)+" is not iterable");if(je(Ge)){for(Ye=0,Ke=me(ce);Ke>Ye;Ye++)if(Xe=Ct(ce[Ye]),Xe&&Pe(le,Xe))return Xe;return new ie(!1)}Be=fe(ce,Ge)}for(ot=Be.next;!(lt=Ee(ot,Be)).done;){try{Xe=Ct(lt.value)}catch(Je){te(Be,"throw",Je)}if(typeof Xe=="object"&&Xe&&Pe(le,Xe))return Xe}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,Ue,Ie){var de=oe("../internals/function-call"),ve=oe("../internals/an-object"),Ee=oe("../internals/get-method");Ue.exports=function(ke,Se,je){var me,Pe;ve(ke);try{if(me=Ee(ke,"return"),!me){if(Se==="throw")throw je;return je}me=de(me,ke)}catch(fe){Pe=!0,me=fe}if(Se==="throw")throw je;if(Pe)throw me;return ve(me),je}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(oe,Ue,Ie){"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"),je=oe("../internals/well-known-symbol"),me=oe("../internals/is-pure"),Pe=je("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}),Ue.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,Ue,Ie){arguments[4][165][0].apply(Ie,arguments)},{dup:165}],188:[function(oe,Ue,Ie){var de=oe("../internals/to-length");Ue.exports=function(ve){return de(ve.length)}},{"../internals/to-length":249}],189:[function(oe,Ue,Ie){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"),je=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,Ae,De,Fe,Te,Ne;le||(ce=function(){var Be,Ge;for(Pe&&(Be=te.domain)&&Be.exit();pe;){Ge=pe.fn,pe=pe.next;try{Ge()}catch(Ye){throw pe?Ae():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}),Ae=function(){Fe.data=De=!De}):!je&&se&&se.resolve?(Te=se.resolve(void 0),Te.constructor=se,Ne=ve(Te.then,Te),Ae=function(){Ne(ce)}):Pe?Ae=function(){te.nextTick(ce)}:(ke=ve(ke,de),Ae=function(){ke(ce)})),Ue.exports=le||function(Be){var Ge={fn:Be,next:void 0};xe&&(xe.next=Ge),pe||(pe=Ge,Ae()),xe=Ge}},{"../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,Ue,Ie){var de=oe("../internals/native-symbol");Ue.exports=de&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(oe,Ue,Ie){var de=oe("../internals/engine-v8-version"),ve=oe("../internals/fails");Ue.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,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=oe("../internals/inspect-source"),ke=de.WeakMap;Ue.exports=ve(ke)&&/native code/.test(Ee(ke))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(oe,Ue,Ie){"use strict";var de=oe("../internals/a-callable"),ve=function(Ee){var ke,Se;this.promise=new Ee(function(je,me){if(ke!==void 0||Se!==void 0)throw TypeError("Bad Promise constructor");ke=je,Se=me}),this.resolve=de(ke),this.reject=de(Se)};Ue.exports.f=function(Ee){return new ve(Ee)}},{"../internals/a-callable":95}],194:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/is-regexp"),Ee=de.TypeError;Ue.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,Ue,Ie){"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"),je=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);Ue.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,Ae=1,De=je.f,Fe=me.f;xe>Ae;)for(var Te=fe(arguments[Ae++]),Ne=De?se(Se(Te),De(Te)):Se(Te),Be=Ne.length,Ge=0,Ye;Be>Ge;)Ye=Ne[Ge++],(!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,Ue,Ie){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"),je=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=je("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,Ae=function(){try{xe=new ActiveXObject("htmlfile")}catch(Fe){}Ae=typeof document!="undefined"?document.domain&&xe?ce(xe):pe():ce(xe);for(var De=Ee.length;De--;)delete Ae[z][Ee[De]];return Ae()};ke[se]=!0,Ue.exports=Object.create||function(Fe,Te){var Ne;return Fe!==null?(ie[z]=de(Fe),Ne=new ie,ie[z]=null,Ne[se]=Fe):Ne=Ae(),Te===void 0?Ne:ve.f(Ne,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,Ue,Ie){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"),je=oe("../internals/object-keys");Ie.f=de&&!ve?Object.defineProperties:function(Pe,fe){ke(Pe);for(var z=Se(fe),te=je(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,Ue,Ie){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"),je=oe("../internals/to-property-key"),me=de.TypeError,Pe=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,z="enumerable",te="configurable",se="writable";Ie.f=ve?ke?function(le,ce,pe){if(Se(le),ce=je(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=je(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,Ue,Ie){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"),je=oe("../internals/to-property-key"),me=oe("../internals/has-own-property"),Pe=oe("../internals/ie8-dom-define"),fe=Object.getOwnPropertyDescriptor;Ie.f=de?fe:function(te,se){if(te=Se(te),se=je(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,Ue,Ie){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):[],je=function(me){try{return Ee(me)}catch(Pe){return ke(Se)}};Ue.exports.f=function(Pe){return Se&&de(Pe)=="Window"?je(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,Ue,Ie){var de=oe("../internals/object-keys-internal"),ve=oe("../internals/enum-bug-keys"),Ee=ve.concat("length","prototype");Ie.f=Object.getOwnPropertyNames||function(Se){return de(Se,Ee)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(oe,Ue,Ie){Ie.f=Object.getOwnPropertySymbols},{}],203:[function(oe,Ue,Ie){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"),je=oe("../internals/correct-prototype-getter"),me=Se("IE_PROTO"),Pe=de.Object,fe=Pe.prototype;Ue.exports=je?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,Ue,Ie){var de=oe("../internals/function-uncurry-this");Ue.exports=de({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(oe,Ue,Ie){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"),je=de([].push);Ue.exports=function(me,Pe){var fe=Ee(me),z=0,te=[],se;for(se in fe)!ve(Se,se)&&ve(fe,se)&&je(te,se);for(;Pe.length>z;)ve(fe,se=Pe[z++])&&(~ke(te,se)||je(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,Ue,Ie){var de=oe("../internals/object-keys-internal"),ve=oe("../internals/enum-bug-keys");Ue.exports=Object.keys||function(ke){return de(ke,ve)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(oe,Ue,Ie){"use strict";var de={}.propertyIsEnumerable,ve=Object.getOwnPropertyDescriptor,Ee=ve&&!de.call({1:2},1);Ie.f=Ee?function(Se){var je=ve(this,Se);return!!je&&je.enumerable}:de},{}],208:[function(oe,Ue,Ie){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/an-object"),Ee=oe("../internals/a-possible-prototype");Ue.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var ke=!1,Se={},je;try{je=de(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),je(Se,[]),ke=Se instanceof Array}catch(me){}return function(Pe,fe){return ve(Pe),Ee(fe),ke?je(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,Ue,Ie){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,je=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||je(te,pe))&&me(ce,fe?[pe,te[pe]]:te[pe]);return ce}};Ue.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,Ue,Ie){"use strict";var de=oe("../internals/to-string-tag-support"),ve=oe("../internals/classof");Ue.exports=de?{}.toString:function(){return"[object "+ve(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/function-call"),Ee=oe("../internals/is-callable"),ke=oe("../internals/is-object"),Se=de.TypeError;Ue.exports=function(je,me){var Pe,fe;if(me==="string"&&Ee(Pe=je.toString)&&!ke(fe=ve(Pe,je))||Ee(Pe=je.valueOf)&&!ke(fe=ve(Pe,je))||me!=="string"&&Ee(Pe=je.toString)&&!ke(fe=ve(Pe,je)))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,Ue,Ie){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"),je=ve([].concat);Ue.exports=de("Reflect","ownKeys")||function(Pe){var fe=Ee.f(Se(Pe)),z=ke.f;return z?je(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,Ue,Ie){var de=oe("../internals/global");Ue.exports=de},{"../internals/global":163}],214:[function(oe,Ue,Ie){Ue.exports=function(de){try{return{error:!1,value:de()}}catch(ve){return{error:!0,value:ve}}}},{}],215:[function(oe,Ue,Ie){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"),je=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=je("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)}),Ae=function(Fe){Fe(function(){},function(){})},De=xe.constructor={};return De[te]=Ae,se=xe.then(function(){})instanceof Ae,se?!pe&&me&&!ie:!0});Ue.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,Ue,Ie){var de=oe("../internals/global");Ue.exports=de.Promise},{"../internals/global":163}],217:[function(oe,Ue,Ie){var de=oe("../internals/an-object"),ve=oe("../internals/is-object"),Ee=oe("../internals/new-promise-capability");Ue.exports=function(ke,Se){if(de(ke),ve(Se)&&Se.constructor===ke)return Se;var je=Ee.f(ke),me=je.resolve;return me(Se),je.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(oe,Ue,Ie){var de=oe("../internals/promise-native-constructor"),ve=oe("../internals/check-correctness-of-iteration"),Ee=oe("../internals/promise-constructor-detection").CONSTRUCTOR;Ue.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,Ue,Ie){var de=oe("../internals/object-define-property").f;Ue.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,Ue,Ie){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}},Ue.exports=de},{}],221:[function(oe,Ue,Ie){var de=oe("../internals/redefine");Ue.exports=function(ve,Ee,ke){for(var Se in Ee)de(ve,Se,Ee[Se],ke);return ve}},{"../internals/redefine":222}],222:[function(oe,Ue,Ie){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"),je=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");(Ue.exports=function(se,ie,le,ce){var pe=ce?!!ce.unsafe:!1,xe=ce?!!ce.enumerable:!1,Ae=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?!Ae&&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||je(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,Ue,Ie){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"),je=oe("../internals/regexp-exec"),me=de.TypeError;Ue.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(je,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,Ue,Ie){"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"),je=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=je("native-string-replace",String.prototype.replace),se=RegExp.prototype.exec,ie=se,le=ve("".charAt),ce=ve("".indexOf),pe=ve("".replace),xe=ve("".slice),Ae=function(){var Ne=/a/,Be=/b*/g;return de(se,Ne,"a"),de(se,Be,"a"),Ne.lastIndex!==0||Be.lastIndex!==0}(),De=Se.BROKEN_CARET,Fe=/()??/.exec("")[1]!==void 0,Te=Ae||Fe||De||fe||z;Te&&(ie=function(Be){var Ge=this,Ye=Pe(Ge),Ke=Ee(Be),Xe=Ye.raw,ot,lt,ut,Ct,Je,nt,St;if(Xe)return Xe.lastIndex=Ge.lastIndex,ot=de(ie,Xe,Ke),Ge.lastIndex=Xe.lastIndex,ot;var wt=Ye.groups,bt=De&&Ge.sticky,ct=de(ke,Ge),vt=Ge.source,ht=0,Lt=Ke;if(bt&&(ct=pe(ct,"y",""),ce(ct,"g")===-1&&(ct+="g"),Lt=xe(Ke,Ge.lastIndex),Ge.lastIndex>0&&(!Ge.multiline||Ge.multiline&&le(Ke,Ge.lastIndex-1)!==`
`)&&(vt="(?: "+vt+")",Lt=" "+Lt,ht++),lt=new RegExp("^(?:"+vt+")",ct)),Fe&&(lt=new RegExp("^"+vt+"$(?!\\s)",ct)),Ae&&(ut=Ge.lastIndex),Ct=de(se,bt?lt:Ge,Lt),bt?Ct?(Ct.input=xe(Ct.input,ht),Ct[0]=xe(Ct[0],ht),Ct.index=Ge.lastIndex,Ge.lastIndex+=Ct[0].length):Ge.lastIndex=0:Ae&&Ct&&(Ge.lastIndex=Ge.global?Ct.index+Ct[0].length:ut),Fe&&Ct&&Ct.length>1&&de(te,Ct[0],lt,function(){for(Je=1;Je<arguments.length-2;Je++)arguments[Je]===void 0&&(Ct[Je]=void 0)}),Ct&&wt)for(Ct.groups=nt=me(null),Je=0;Je<wt.length;Je++)St=wt[Je],nt[St[0]]=Ct[St[1]];return Ct}),Ue.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,Ue,Ie){"use strict";var de=oe("../internals/an-object");Ue.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,Ue,Ie){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;Ue.exports=function(je){var me=je.flags;return me===void 0&&!("flags"in Se)&&!ve(je,"flags")&&Ee(Se,je)?de(ke,je):me}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(oe,Ue,Ie){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}),je=ke||de(function(){var me=Ee("^r","gy");return me.lastIndex=2,me.exec("str")!=null});Ue.exports={BROKEN_CARET:je,MISSED_STICKY:Se,UNSUPPORTED_Y:ke}},{"../internals/fails":150,"../internals/global":163}],228:[function(oe,Ue,Ie){var de=oe("../internals/fails"),ve=oe("../internals/global"),Ee=ve.RegExp;Ue.exports=de(function(){var ke=Ee(".","s");return!(ke.dotAll&&ke.exec(`
`)&&ke.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(oe,Ue,Ie){var de=oe("../internals/fails"),ve=oe("../internals/global"),Ee=ve.RegExp;Ue.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,Ue,Ie){var de=oe("../internals/global"),ve=de.TypeError;Ue.exports=function(Ee){if(Ee==null)throw ve("Can't call method on "+Ee);return Ee}},{"../internals/global":163}],231:[function(oe,Ue,Ie){Ue.exports=Object.is||function(ve,Ee){return ve===Ee?ve!==0||1/ve===1/Ee:ve!=ve&&Ee!=Ee}},{}],232:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=Object.defineProperty;Ue.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,Ue,Ie){"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");Ue.exports=function(je){var me=de(je),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,Ue,Ie){var de=oe("../internals/object-define-property").f,ve=oe("../internals/has-own-property"),Ee=oe("../internals/well-known-symbol"),ke=Ee("toStringTag");Ue.exports=function(Se,je,me){Se&&!me&&(Se=Se.prototype),Se&&!ve(Se,ke)&&de(Se,ke,{configurable:!0,value:je})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(oe,Ue,Ie){var de=oe("../internals/shared"),ve=oe("../internals/uid"),Ee=de("keys");Ue.exports=function(ke){return Ee[ke]||(Ee[ke]=ve(ke))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/set-global"),Ee="__core-js_shared__",ke=de[Ee]||ve(Ee,{});Ue.exports=ke},{"../internals/global":163,"../internals/set-global":232}],237:[function(oe,Ue,Ie){var de=oe("../internals/is-pure"),ve=oe("../internals/shared-store");(Ue.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,Ue,Ie){var de=oe("../internals/an-object"),ve=oe("../internals/a-constructor"),Ee=oe("../internals/well-known-symbol"),ke=Ee("species");Ue.exports=function(Se,je){var me=de(Se).constructor,Pe;return me===void 0||(Pe=de(me)[ke])==null?je:ve(Pe)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(oe,Ue,Ie){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),je=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=je(se,ie),ce<55296||ce>56319||ie+1===le||(pe=je(se,ie+1))<56320||pe>57343?fe?Se(se,ie):ce:fe?me(se,ie,ie+2):(ce-55296<<10)+(pe-56320)+65536)}};Ue.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,Ue,Ie){var de=oe("../internals/function-name").PROPER,ve=oe("../internals/fails"),Ee=oe("../internals/whitespaces"),ke="\u200B\x85\u180E";Ue.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,Ue,Ie){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),je="["+ke+"]",me=RegExp("^"+je+je+"*"),Pe=RegExp(je+je+"*$"),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}};Ue.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,Ue,Ie){var de=oe("../internals/function-call"),ve=oe("../internals/get-built-in"),Ee=oe("../internals/well-known-symbol"),ke=oe("../internals/redefine");Ue.exports=function(){var Se=ve("Symbol"),je=Se&&Se.prototype,me=je&&je.valueOf,Pe=Ee("toPrimitive");je&&!je[Pe]&&ke(je,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,Ue,Ie){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"),je=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,Ae=de.MessageChannel,De=de.String,Fe=0,Te={},Ne="onreadystatechange",Be,Ge,Ye,Ke;try{Be=de.location}catch(Ct){}var Xe=function(Ct){if(Se(Te,Ct)){var Je=Te[Ct];delete Te[Ct],Je()}},ot=function(Ct){return function(){Xe(Ct)}},lt=function(Ct){Xe(Ct.data)},ut=function(Ct){de.postMessage(De(Ct),Be.protocol+"//"+Be.host)};(!ie||!le)&&(ie=function(Je){z(arguments.length,1);var nt=ke(Je)?Je:xe(Je),St=Pe(arguments,1);return Te[++Fe]=function(){ve(nt,void 0,St)},Ge(Fe),Fe},le=function(Je){delete Te[Je]},se?Ge=function(Ct){ce.nextTick(ot(Ct))}:pe&&pe.now?Ge=function(Ct){pe.now(ot(Ct))}:Ae&&!te?(Ye=new Ae,Ke=Ye.port2,Ye.port1.onmessage=lt,Ge=Ee(Ke.postMessage,Ke)):de.addEventListener&&ke(de.postMessage)&&!de.importScripts&&Be&&Be.protocol!=="file:"&&!je(ut)?(Ge=ut,de.addEventListener("message",lt,!1)):Ne in fe("script")?Ge=function(Ct){me.appendChild(fe("script"))[Ne]=function(){me.removeChild(this),Xe(Ct)}}:Ge=function(Ct){setTimeout(ot(Ct),0)}),Ue.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,Ue,Ie){var de=oe("../internals/function-uncurry-this");Ue.exports=de(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(oe,Ue,Ie){var de=oe("../internals/to-integer-or-infinity"),ve=Math.max,Ee=Math.min;Ue.exports=function(ke,Se){var je=de(ke);return je<0?ve(je+Se,0):Ee(je,Se)}},{"../internals/to-integer-or-infinity":248}],246:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/to-integer-or-infinity"),Ee=oe("../internals/to-length"),ke=de.RangeError;Ue.exports=function(Se){if(Se===void 0)return 0;var je=ve(Se),me=Ee(je);if(je!==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,Ue,Ie){var de=oe("../internals/indexed-object"),ve=oe("../internals/require-object-coercible");Ue.exports=function(Ee){return de(ve(Ee))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(oe,Ue,Ie){var de=Math.ceil,ve=Math.floor;Ue.exports=function(Ee){var ke=+Ee;return ke!==ke||ke===0?0:(ke>0?ve:de)(ke)}},{}],249:[function(oe,Ue,Ie){var de=oe("../internals/to-integer-or-infinity"),ve=Math.min;Ue.exports=function(Ee){return Ee>0?ve(de(Ee),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/require-object-coercible"),Ee=de.Object;Ue.exports=function(ke){return Ee(ve(ke))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/to-positive-integer"),Ee=de.RangeError;Ue.exports=function(ke,Se){var je=ve(ke);if(je%Se)throw Ee("Wrong offset");return je}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/to-integer-or-infinity"),Ee=de.RangeError;Ue.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,Ue,Ie){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"),je=oe("../internals/ordinary-to-primitive"),me=oe("../internals/well-known-symbol"),Pe=de.TypeError,fe=me("toPrimitive");Ue.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"),je(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,Ue,Ie){var de=oe("../internals/to-primitive"),ve=oe("../internals/is-symbol");Ue.exports=function(Ee){var ke=de(Ee,"string");return ve(ke)?ke:ke+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(oe,Ue,Ie){var de=oe("../internals/well-known-symbol"),ve=de("toStringTag"),Ee={};Ee[ve]="z",Ue.exports=String(Ee)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/classof"),Ee=de.String;Ue.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,Ue,Ie){var de=oe("../internals/global"),ve=de.String;Ue.exports=function(Ee){try{return ve(Ee)}catch(ke){return"Object"}}},{"../internals/global":163}],258:[function(oe,Ue,Ie){"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"),je=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"),Ae=oe("../internals/is-object"),De=oe("../internals/is-symbol"),Fe=oe("../internals/object-create"),Te=oe("../internals/object-is-prototype-of"),Ne=oe("../internals/object-set-prototype-of"),Be=oe("../internals/object-get-own-property-names").f,Ge=oe("../internals/typed-array-from"),Ye=oe("../internals/array-iteration").forEach,Ke=oe("../internals/set-species"),Xe=oe("../internals/object-define-property"),ot=oe("../internals/object-get-own-property-descriptor"),lt=oe("../internals/internal-state"),ut=oe("../internals/inherit-if-required"),Ct=lt.get,Je=lt.set,nt=Xe.f,St=ot.f,wt=Math.round,bt=ve.RangeError,ct=me.ArrayBuffer,vt=ct.prototype,ht=me.DataView,Lt=je.NATIVE_ARRAY_BUFFER_VIEWS,dt=je.TYPED_ARRAY_CONSTRUCTOR,mt=je.TYPED_ARRAY_TAG,Et=je.TypedArray,gt=je.TypedArrayPrototype,$e=je.aTypedArrayConstructor,He=je.isTypedArray,we="BYTES_PER_ELEMENT",Le="Wrong length",We=function(yt,Pt){$e(yt);for(var jt=0,Nt=Pt.length,Bt=new yt(Nt);Nt>jt;)Bt[jt]=Pt[jt++];return Bt},tt=function(yt,Pt){nt(yt,Pt,{get:function(){return Ct(this)[Pt]}})},Re=function(yt){var Pt;return Te(vt,yt)||(Pt=xe(yt))=="ArrayBuffer"||Pt=="SharedArrayBuffer"},_e=function(yt,Pt){return He(yt)&&!De(Pt)&&Pt in yt&&te(+Pt)&&Pt>=0},Ve=function(Pt,jt){return jt=ce(jt),_e(Pt,jt)?fe(2,Pt[jt]):St(Pt,jt)},it=function(Pt,jt,Nt){return jt=ce(jt),_e(Pt,jt)&&Ae(Nt)&&pe(Nt,"value")&&!pe(Nt,"get")&&!pe(Nt,"set")&&!Nt.configurable&&(!pe(Nt,"writable")||Nt.writable)&&(!pe(Nt,"enumerable")||Nt.enumerable)?(Pt[jt]=Nt.value,Pt):nt(Pt,jt,Nt)};ke?(Lt||(ot.f=Ve,Xe.f=it,tt(gt,"buffer"),tt(gt,"byteOffset"),tt(gt,"byteLength"),tt(gt,"length")),de({target:"Object",stat:!0,forced:!Lt},{getOwnPropertyDescriptor:Ve,defineProperty:it}),Ue.exports=function(yt,Pt,jt){var Nt=yt.match(/\d+$/)[0]/8,Bt=yt+(jt?"Clamped":"")+"Array",$t="get"+yt,en="set"+yt,qt=ve[Bt],Zt=qt,hn=Zt&&Zt.prototype,an={},cn=function(Nn,Zn){var Tr=Ct(Nn);return Tr.view[$t](Zn*Nt+Tr.byteOffset,!0)},wn=function(Nn,Zn,Tr){var qn=Ct(Nn);jt&&(Tr=(Tr=wt(Tr))<0?0:Tr>255?255:Tr&255),qn.view[en](Zn*Nt+qn.byteOffset,Tr,!0)},xn=function(Nn,Zn){nt(Nn,Zn,{get:function(){return cn(this,Zn)},set:function(Tr){return wn(this,Zn,Tr)},enumerable:!0})};Lt?Se&&(Zt=Pt(function(Nn,Zn,Tr,qn){return Pe(Nn,hn),ut(function(){return Ae(Zn)?Re(Zn)?qn!==void 0?new qt(Zn,le(Tr,Nt),qn):Tr!==void 0?new qt(Zn,le(Tr,Nt)):new qt(Zn):He(Zn)?We(Zt,Zn):Ee(Ge,Zt,Zn):new qt(ie(Zn))}(),Nn,Zt)}),Ne&&Ne(Zt,Et),Ye(Be(qt),function(Nn){Nn in Zt||z(Zt,Nn,qt[Nn])}),Zt.prototype=hn):(Zt=Pt(function(Nn,Zn,Tr,qn){Pe(Nn,hn);var qr=0,nr=0,$r,hi,Si;if(!Ae(Zn))Si=ie(Zn),hi=Si*Nt,$r=new ct(hi);else if(Re(Zn)){$r=Zn,nr=le(Tr,Nt);var Li=Zn.byteLength;if(qn===void 0){if(Li%Nt||(hi=Li-nr,hi<0))throw bt(Le)}else if(hi=se(qn)*Nt,hi+nr>Li)throw bt(Le);Si=hi/Nt}else return He(Zn)?We(Zt,Zn):Ee(Ge,Zt,Zn);for(Je(Nn,{buffer:$r,byteOffset:nr,byteLength:hi,length:Si,view:new ht($r)});qr<Si;)xn(Nn,qr++)}),Ne&&Ne(Zt,Et),hn=Zt.prototype=Fe(gt)),hn.constructor!==Zt&&z(hn,"constructor",Zt),z(hn,dt,Zt),mt&&z(hn,mt,Bt),an[Bt]=Zt,de({global:!0,forced:Zt!=qt,sham:!Lt},an),we in Zt||z(Zt,we,Nt),we in hn||z(hn,we,Nt),Ke(Bt)}):Ue.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,Ue,Ie){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,je=de.Int8Array;Ue.exports=!ke||!ve(function(){je(1)})||!ve(function(){new je(-1)})||!Ee(function(me){new je,new je(null),new je(1.5),new je(me)},!0)||ve(function(){return new je(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,Ue,Ie){var de=oe("../internals/array-from-constructor-and-list"),ve=oe("../internals/typed-array-species-constructor");Ue.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,Ue,Ie){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"),je=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;Ue.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),Ae,De,Fe,Te,Ne,Be;if(xe&&!Pe(xe))for(Ne=je(ie,xe),Be=Ne.next,ie=[];!(Te=ve(Be,Ne)).done;)ie.push(Te.value);for(pe&&le>2&&(ce=de(ce,arguments[2])),De=Se(ie),Fe=new(fe(se))(De),Ae=0;De>Ae;Ae++)Fe[Ae]=pe?ce(ie[Ae],Ae):ie[Ae];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,Ue,Ie){var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/species-constructor"),Ee=de.TYPED_ARRAY_CONSTRUCTOR,ke=de.aTypedArrayConstructor;Ue.exports=function(Se){return ke(ve(Se,Se[Ee]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(oe,Ue,Ie){var de=oe("../internals/function-uncurry-this"),ve=0,Ee=Math.random(),ke=de(1 .toString);Ue.exports=function(Se){return"Symbol("+(Se===void 0?"":Se)+")_"+ke(++ve+Ee,36)}},{"../internals/function-uncurry-this":157}],264:[function(oe,Ue,Ie){var de=oe("../internals/native-symbol");Ue.exports=de&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(oe,Ue,Ie){var de=oe("../internals/descriptors"),ve=oe("../internals/fails");Ue.exports=de&&ve(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=de.TypeError;Ue.exports=function(Ee,ke){if(Ee<ke)throw ve("Not enough arguments");return Ee}},{"../internals/global":163}],267:[function(oe,Ue,Ie){var de=oe("../internals/well-known-symbol");Ie.f=de},{"../internals/well-known-symbol":268}],268:[function(oe,Ue,Ie){var de=oe("../internals/global"),ve=oe("../internals/shared"),Ee=oe("../internals/has-own-property"),ke=oe("../internals/uid"),Se=oe("../internals/native-symbol"),je=oe("../internals/use-symbol-as-uid"),me=ve("wks"),Pe=de.Symbol,fe=Pe&&Pe.for,z=je?Pe:Pe&&Pe.withoutSetter||ke;Ue.exports=function(te){if(!Ee(me,te)||!(Se||typeof me[te]=="string")){var se="Symbol."+te;Se&&Ee(Pe,te)?me[te]=Pe[te]:je&&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,Ue,Ie){Ue.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,Ue,Ie){"use strict";var de=oe("../internals/export"),ve=oe("../internals/global"),Ee=oe("../internals/array-buffer"),ke=oe("../internals/set-species"),Se="ArrayBuffer",je=Ee[Se],me=ve[Se];de({global:!0,forced:me!==je},{ArrayBuffer:je}),ke(Se)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(oe,Ue,Ie){"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"),je=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,Ae){if(se&&Ae===void 0)return se(Se(this),xe);for(var De=Se(this).byteLength,Fe=je(xe,De),Te=je(Ae===void 0?De:Ae,De),Ne=new(Pe(this,fe))(me(Te-Fe)),Be=new z(this),Ge=new z(Ne),Ye=0;Fe<Te;)le(Ge,Ye++,ie(Be,Fe++));return Ne}})},{"../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,Ue,Ie){"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"),je=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}),Ae=z("concat"),De=function(Te){if(!Se(Te))return!1;var Ne=Te[ie];return Ne!==void 0?!!Ne:ke(Te)},Fe=!xe||!Ae;de({target:"Array",proto:!0,forced:Fe},{concat:function(Ne){var Be=je(this),Ge=fe(Be,0),Ye=0,Ke,Xe,ot,lt,ut;for(Ke=-1,ot=arguments.length;Ke<ot;Ke++)if(ut=Ke===-1?Be:arguments[Ke],De(ut)){if(lt=me(ut),Ye+lt>le)throw pe(ce);for(Xe=0;Xe<lt;Xe++,Ye++)Xe in ut&&Pe(Ge,Ye,ut[Xe])}else{if(Ye>=le)throw pe(ce);Pe(Ge,Ye++,ut)}return Ge.length=Ye,Ge}})},{"../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,Ue,Ie){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,Ue,Ie){"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(je){return ve(this,je,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(oe,Ue,Ie){"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,Ue,Ie){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,Ue,Ie){"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,Ue,Ie){"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,je=oe("../internals/define-iterator"),me=oe("../internals/is-pure"),Pe=oe("../internals/descriptors"),fe="Array Iterator",z=ke.set,te=ke.getterFor(fe);Ue.exports=je(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,Ue,Ie){"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"),je=ve([].join),me=Ee!=Object,Pe=Se("join",",");de({target:"Array",proto:!0,forced:me||!Pe},{join:function(z){return je(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,Ue,Ie){"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(je){return ve(this,je,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(oe,Ue,Ie){"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"),je=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(Ae,De){var Fe=Pe(this),Te=me(Fe),Ne=je(Ae,Te),Be=je(De===void 0?Te:De,Te),Ge,Ye,Ke;if(Ee(Fe)&&(Ge=Fe.constructor,ke(Ge)&&(Ge===ce||Ee(Ge.prototype))?Ge=void 0:Se(Ge)&&(Ge=Ge[le],Ge===null&&(Ge=void 0)),Ge===ce||Ge===void 0))return se(Fe,Ne,Be);for(Ye=new(Ge===void 0?ce:Ge)(pe(Be-Ne,0)),Ke=0;Ne<Be;Ne++,Ke++)Ne in Fe&&fe(Ye,Ke,Fe[Ne]);return Ye.length=Ke,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,Ue,Ie){"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"),je=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)}),Ae=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="",Ge,Ye,Ke,Xe;for(Ge=65;Ge<76;Ge++){switch(Ye=String.fromCharCode(Ge),Ge){case 66:case 69:case 70:case 72:Ke=3;break;case 68:case 71:Ke=4;break;default:Ke=2}for(Xe=0;Xe<47;Xe++)le.push({k:Ye+Xe,v:Ke})}for(le.sort(function(ot,lt){return lt.v-ot.v}),Xe=0;Xe<le.length;Xe++)Ye=le[Xe].k.charAt(0),Be.charAt(Be.length-1)!==Ye&&(Be+=Ye);return Be!=="DGBEFHACIJK"}}),Te=xe||!Ae||!De||!Fe,Ne=function(Be){return function(Ge,Ye){return Ye===void 0?-1:Ge===void 0?1:Be!==void 0?+Be(Ge,Ye)||0:je(Ge)>je(Ye)?1:-1}};de({target:"Array",proto:!0,forced:Te},{sort:function(Ge){Ge!==void 0&&Ee(Ge);var Ye=ke(this);if(Fe)return Ge===void 0?ce(Ye):ce(Ye,Ge);var Ke=[],Xe=Se(Ye),ot,lt;for(lt=0;lt<Xe;lt++)lt in Ye&&pe(Ke,Ye[lt]);for(Pe(Ke,Ne(Ge)),ot=Ke.length,lt=0;lt<ot;)Ye[lt]=Ke[lt++];for(;lt<Xe;)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,Ue,Ie){"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"),je=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,Ae){var De=je(this),Fe=Se(De),Te=Ee(xe,Fe),Ne=arguments.length,Be,Ge,Ye,Ke,Xe,ot;if(Ne===0?Be=Ge=0:Ne===1?(Be=0,Ge=Fe-Te):(Be=Ne-2,Ge=ie(se(ke(Ae),0),Fe-Te)),Fe+Be-Ge>le)throw te(ce);for(Ye=me(De,Ge),Ke=0;Ke<Ge;Ke++)Xe=Te+Ke,Xe in De&&Pe(Ye,Ke,De[Xe]);if(Ye.length=Ge,Be<Ge){for(Ke=Te;Ke<Fe-Ge;Ke++)Xe=Ke+Ge,ot=Ke+Be,Xe in De?De[ot]=De[Xe]:delete De[ot];for(Ke=Fe;Ke>Fe-Ge+Be;Ke--)delete De[Ke-1]}else if(Be>Ge)for(Ke=Fe-Ge;Ke>Te;Ke--)Xe=Ke+Ge-1,ot=Ke+Be-1,Xe in De?De[ot]=De[Xe]:delete De[ot];for(Ke=0;Ke<Be;Ke++)De[Ke+Te]=arguments[Ke+2];return De.length=Fe-Ge+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,Ue,Ie){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,je=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,je(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,Ue,Ie){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"),je=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),Ae=Se(1 .toString),De=/[\uD800-\uDFFF]/g,Fe=/^[\uD800-\uDBFF]$/,Te=/^[\uDC00-\uDFFF]$/,Ne=!se||je(function(){var Ke=ve("Symbol")();return ie([Ke])!="[null]"||ie({a:Ke})!="{}"||ie(Object(Ke))!="{}"}),Be=je(function(){return ie("\uDF06\uD834")!=='"\\udf06\\ud834"'||ie("\uDEAD")!=='"\\udead"'}),Ge=function(Ke,Xe){var ot=te(arguments),lt=Xe;if(!(!fe(Xe)&&Ke===void 0||z(Ke)))return me(Xe)||(Xe=function(ut,Ct){if(Pe(lt)&&(Ct=ke(lt,this,ut,Ct)),!z(Ct))return Ct}),ot[1]=Xe,Ee(ie,null,ot)},Ye=function(Ke,Xe,ot){var lt=ce(ot,Xe-1),ut=ce(ot,Xe+1);return le(Fe,Ke)&&!le(Te,ut)||le(Te,Ke)&&!le(Fe,lt)?"\\u"+Ae(pe(Ke,0),16):Ke};ie&&de({target:"JSON",stat:!0,forced:Ne||Be},{stringify:function(Xe,ot,lt){var ut=te(arguments),Ct=Ee(Ne?Ge:ie,null,ut);return Be&&typeof Ct=="string"?xe(Ct,De,Ye):Ct}})},{"../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,Ue,Ie){"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"),je=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",Ae=ve[xe],De=Ae.prototype,Fe=ve.TypeError,Te=Ee("".slice),Ne=Ee("".charCodeAt),Be=function(lt){var ut=z(lt,"number");return typeof ut=="bigint"?ut:Ge(ut)},Ge=function(lt){var ut=z(lt,"number"),Ct,Je,nt,St,wt,bt,ct,vt;if(fe(ut))throw Fe("Cannot convert a Symbol value to a number");if(typeof ut=="string"&&ut.length>2){if(ut=pe(ut),Ct=Ne(ut,0),Ct===43||Ct===45){if(Je=Ne(ut,2),Je===88||Je===120)return NaN}else if(Ct===48){switch(Ne(ut,1)){case 66:case 98:nt=2,St=49;break;case 79:case 111:nt=8,St=55;break;default:return+ut}for(wt=Te(ut,2),bt=wt.length,ct=0;ct<bt;ct++)if(vt=Ne(wt,ct),vt<48||vt>St)return NaN;return parseInt(wt,nt)}}return+ut};if(ke(xe,!Ae(" 0o1")||!Ae("0b1")||Ae("+0x1"))){for(var Ye=function(ut){var Ct=arguments.length<1?0:Ae(Be(ut)),Je=this;return Pe(De,Je)&&te(function(){ce(Je)})?me(Object(Ct),Je,Ye):Ct},Ke=de?se(Ae):"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(","),Xe=0,ot;Ke.length>Xe;Xe++)je(Ae,ot=Ke[Xe])&&!je(Ye,ot)&&le(Ye,ot,ie(Ae,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,Ue,Ie){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,Ue,Ie){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,Ue,Ie){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"),je=!ve||Ee(function(){ke.f(1)});de({target:"Object",stat:!0,forced:je},{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,Ue,Ie){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,Ue,Ie){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,Ue,Ie){"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"),je=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,Ae=1;je(fe,function(De){var Fe=xe++,Te=!1;Ae++,ve(ce,z,De).then(function(Ne){Te||(Te=!0,pe[Fe]=Ne,--Ae||se(pe))},ie)}),--Ae||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,Ue,Ie){"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"),je=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&&je(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,Ue,Ie){"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"),je=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"),Ae=oe("../internals/host-report-errors"),De=oe("../internals/perform"),Fe=oe("../internals/queue"),Te=oe("../internals/internal-state"),Ne=oe("../internals/promise-native-constructor"),Be=oe("../internals/promise-constructor-detection"),Ge=oe("../internals/new-promise-capability"),Ye="Promise",Ke=Be.CONSTRUCTOR,Xe=Be.REJECTION_EVENT,ot=Be.SUBCLASSING,lt=Te.getterFor(Ye),ut=Te.set,Ct=Ne&&Ne.prototype,Je=Ne,nt=Ct,St=ke.TypeError,wt=ke.document,bt=ke.process,ct=Ge.f,vt=ct,ht=!!(wt&&wt.createEvent&&ke.dispatchEvent),Lt="unhandledrejection",dt="rejectionhandled",mt=0,Et=1,gt=2,$e=1,He=2,we,Le,We,tt,Re=function(en){var qt;return ie(en)&&se(qt=en.then)?qt:!1},_e=function(en,qt){var Zt=qt.value,hn=qt.state==Et,an=hn?en.ok:en.fail,cn=en.resolve,wn=en.reject,xn=en.domain,Nn,Zn,Tr;try{an?(hn||(qt.rejection===He&&jt(qt),qt.rejection=$e),an===!0?Nn=Zt:(xn&&xn.enter(),Nn=an(Zt),xn&&(xn.exit(),Tr=!0)),Nn===en.promise?wn(St("Promise-chain cycle")):(Zn=Re(Nn))?Se(Zn,Nn,cn,wn):cn(Nn)):wn(Zt)}catch(qn){xn&&!Tr&&xn.exit(),wn(qn)}},Ve=function(en,qt){en.notified||(en.notified=!0,xe(function(){for(var Zt=en.reactions,hn;hn=Zt.get();)_e(hn,en);en.notified=!1,qt&&!en.rejection&&yt(en)}))},it=function(en,qt,Zt){var hn,an;ht?(hn=wt.createEvent("Event"),hn.promise=qt,hn.reason=Zt,hn.initEvent(en,!1,!0),ke.dispatchEvent(hn)):hn={promise:qt,reason:Zt},!Xe&&(an=ke["on"+en])?an(hn):en===Lt&&Ae("Unhandled promise rejection",Zt)},yt=function(en){Se(pe,ke,function(){var qt=en.facade,Zt=en.value,hn=Pt(en),an;if(hn&&(an=De(function(){Ee?bt.emit("unhandledRejection",Zt,qt):it(Lt,qt,Zt)}),en.rejection=Ee||Pt(en)?He:$e,an.error))throw an.value})},Pt=function(en){return en.rejection!==$e&&!en.parent},jt=function(en){Se(pe,ke,function(){var qt=en.facade;Ee?bt.emit("rejectionHandled",qt):it(dt,qt,en.value)})},Nt=function(en,qt,Zt){return function(hn){en(qt,hn,Zt)}},Bt=function(en,qt,Zt){en.done||(en.done=!0,Zt&&(en=Zt),en.value=qt,en.state=gt,Ve(en,!0))},$t=function(en,qt,Zt){if(!en.done){en.done=!0,Zt&&(en=Zt);try{if(en.facade===qt)throw St("Promise can't be resolved itself");var hn=Re(qt);hn?xe(function(){var an={done:!1};try{Se(hn,qt,Nt($t,an,en),Nt(Bt,an,en))}catch(cn){Bt(an,cn,en)}}):(en.value=qt,en.state=Et,Ve(en,!1))}catch(an){Bt({done:!1},an,en)}}};if(Ke&&(Je=function(qt){le(this,nt),te(qt),Se(we,this);var Zt=lt(this);try{qt(Nt($t,Zt),Nt(Bt,Zt))}catch(hn){Bt(Zt,hn)}},nt=Je.prototype,we=function(qt){ut(this,{type:Ye,done:!1,notified:!1,parent:!1,reactions:new Fe,rejection:!1,state:mt,value:void 0})},we.prototype=me(nt,{then:function(qt,Zt){var hn=lt(this),an=ct(ce(this,Je));return hn.parent=!0,an.ok=se(qt)?qt:!0,an.fail=se(Zt)&&Zt,an.domain=Ee?bt.domain:void 0,hn.state==mt?hn.reactions.add(an):xe(function(){_e(an,hn)}),an.promise}}),Le=function(){var en=new we,qt=lt(en);this.promise=en,this.resolve=Nt($t,qt),this.reject=Nt(Bt,qt)},Ge.f=ct=function(en){return en===Je||en===We?new Le(en):vt(en)},!ve&&se(Ne)&&Ct!==Object.prototype)){tt=Ct.then,ot||je(Ct,"then",function(qt,Zt){var hn=this;return new Je(function(an,cn){Se(tt,hn,an,cn)}).then(qt,Zt)},{unsafe:!0});try{delete Ct.constructor}catch(en){}Pe&&Pe(Ct,nt)}de({global:!0,wrap:!0,forced:Ke},{Promise:Je}),fe(Je,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,Ue,Ie){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,Ue,Ie){"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"),je=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);je(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,Ue,Ie){"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(je){var me=Ee.f(this);return ve(me.reject,void 0,je),me.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(oe,Ue,Ie){"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,je=oe("../internals/promise-resolve"),me=ve("Promise"),Pe=Ee&&!Se;de({target:"Promise",stat:!0,forced:Ee||Se},{resolve:function(z){return je(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,Ue,Ie){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"),je=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,Ae=oe("../internals/set-species"),De=oe("../internals/well-known-symbol"),Fe=oe("../internals/regexp-unsupported-dot-all"),Te=oe("../internals/regexp-unsupported-ncg"),Ne=De("match"),Be=ve.RegExp,Ge=Be.prototype,Ye=ve.SyntaxError,Ke=Ee(Ge.exec),Xe=Ee("".charAt),ot=Ee("".replace),lt=Ee("".indexOf),ut=Ee("".slice),Ct=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Je=/a/g,nt=/a/g,St=new Be(Je)!==Je,wt=se.MISSED_STICKY,bt=se.UNSUPPORTED_Y,ct=de&&(!St||wt||Fe||Te||ce(function(){return nt[Ne]=!1,Be(Je)!=Je||Be(nt)==nt||Be(Je,"i")!="/a/i"})),vt=function(Et){for(var gt=Et.length,$e=0,He="",we=!1,Le;$e<=gt;$e++){if(Le=Xe(Et,$e),Le==="\\"){He+=Le+Xe(Et,++$e);continue}!we&&Le==="."?He+="[\\s\\S]":(Le==="["?we=!0:Le==="]"&&(we=!1),He+=Le)}return He},ht=function(Et){for(var gt=Et.length,$e=0,He="",we=[],Le={},We=!1,tt=!1,Re=0,_e="",Ve;$e<=gt;$e++){if(Ve=Xe(Et,$e),Ve==="\\")Ve=Ve+Xe(Et,++$e);else if(Ve==="]")We=!1;else if(!We)switch(!0){case Ve==="[":We=!0;break;case Ve==="(":Ke(Ct,ut(Et,$e+1))&&($e+=2,tt=!0),He+=Ve,Re++;continue;case(Ve===">"&&tt):if(_e===""||pe(Le,_e))throw new Ye("Invalid capture group name");Le[_e]=!0,we[we.length]=[_e,Re],tt=!1,_e="";continue}tt?_e+=Ve:He+=Ve}return[He,we]};if(ke("RegExp",ct)){for(var Lt=function(gt,$e){var He=Pe(Ge,this),we=fe(gt),Le=$e===void 0,We=[],tt=gt,Re,_e,Ve,it,yt,Pt;if(!He&&we&&Le&&gt.constructor===Lt)return gt;if((we||Pe(Ge,gt))&&(gt=gt.source,Le&&($e=te(tt))),gt=gt===void 0?"":z(gt),$e=$e===void 0?"":z($e),tt=gt,Fe&&"dotAll"in Je&&(_e=!!$e&&lt($e,"s")>-1,_e&&($e=ot($e,/s/g,""))),Re=$e,wt&&"sticky"in Je&&(Ve=!!$e&&lt($e,"y")>-1,Ve&&bt&&($e=ot($e,/y/g,""))),Te&&(it=ht(gt),gt=it[0],We=it[1]),yt=Se(Be(gt,$e),He?this:Ge,Lt),(_e||Ve||We.length)&&(Pt=xe(yt),_e&&(Pt.dotAll=!0,Pt.raw=Lt(vt(gt),Re)),Ve&&(Pt.sticky=!0),We.length&&(Pt.groups=We)),gt!==tt)try{je(yt,"source",tt===""?"(?:)":tt)}catch(jt){}return yt},dt=me(Be),mt=0;dt.length>mt;)ie(Lt,Be,dt[mt++]);Ge.constructor=Lt,Lt.prototype=Ge,le(ve,"RegExp",Lt)}Ae("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,Ue,Ie){"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,Ue,Ie){"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"),je=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(je(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,Ue,Ie){"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"),je=oe("../internals/correct-is-regexp-logic"),me=ve("".indexOf);de({target:"String",proto:!0,forced:!je("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,Ue,Ie){"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",je=Ee.set,me=Ee.getterFor(Se);ke(String,"String",function(Pe){je(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,Ue,Ie){"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"),je=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=je(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 Ae=[],De=0,Fe;(Fe=fe(le,ce))!==null;){var Te=Se(Fe[0]);Ae[De]=Te,Te===""&&(le.lastIndex=Pe(ce,ke(le.lastIndex),xe)),De++}return De===0?null:Ae}]})},{"../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,Ue,Ie){"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"),je=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"),Ae=Math.max,De=Math.min,Fe=Ee([].concat),Te=Ee([].push),Ne=Ee("".indexOf),Be=Ee("".slice),Ge=function(ot){return ot===void 0?ot:String(ot)},Ye=function(){return"a".replace(/./,"$0")==="$0"}(),Ke=function(){return/./[xe]?/./[xe]("a","$0")==="":!1}(),Xe=!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,ut){var Ct=Ke?"$":"$0";return[function(nt,St){var wt=te(this),bt=nt==null?void 0:ie(nt,xe);return bt?ve(bt,nt,wt,St):ve(lt,z(wt),nt,St)},function(Je,nt){var St=je(this),wt=z(Je);if(typeof nt=="string"&&Ne(nt,Ct)===-1&&Ne(nt,"$<")===-1){var bt=ut(lt,St,wt,nt);if(bt.done)return bt.value}var ct=me(nt);ct||(nt=z(nt));var vt=St.global;if(vt){var ht=St.unicode;St.lastIndex=0}for(var Lt=[];;){var dt=ce(St,wt);if(dt===null||(Te(Lt,dt),!vt))break;var mt=z(dt[0]);mt===""&&(St.lastIndex=se(wt,fe(St.lastIndex),ht))}for(var Et="",gt=0,$e=0;$e<Lt.length;$e++){dt=Lt[$e];for(var He=z(dt[0]),we=Ae(De(Pe(dt.index),wt.length),0),Le=[],We=1;We<dt.length;We++)Te(Le,Ge(dt[We]));var tt=dt.groups;if(ct){var Re=Fe([He],Le,we,wt);tt!==void 0&&Te(Re,tt);var _e=z(de(nt,void 0,Re))}else _e=le(He,wt,we,Le,tt,nt);we>=gt&&(Et+=Be(wt,gt,we)+_e,gt=we+He.length)}return Et+Be(wt,gt)}]},!Xe||!Ye||Ke)},{"../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,Ue,Ie){"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"),je=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](je(le))},function(se){var ie=Ee(this),le=je(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,Ue,Ie){"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"),je=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"),Ae=pe.UNSUPPORTED_Y,De=4294967295,Fe=Math.min,Te=[].push,Ne=Ee(/./.exec),Be=Ee(Te),Ge=Ee("".slice),Ye=!xe(function(){var Ke=/(?:)/,Xe=Ke.exec;Ke.exec=function(){return Xe.apply(this,arguments)};var ot="ab".split(Ke);return ot.length!==2||ot[0]!=="a"||ot[1]!=="b"});ke("split",function(Ke,Xe,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(ut,Ct){var Je=te(me(this)),nt=Ct===void 0?De:Ct>>>0;if(nt===0)return[];if(ut===void 0)return[Je];if(!Se(ut))return ve(Xe,Je,ut,nt);for(var St=[],wt=(ut.ignoreCase?"i":"")+(ut.multiline?"m":"")+(ut.unicode?"u":"")+(ut.sticky?"y":""),bt=0,ct=new RegExp(ut.source,wt+"g"),vt,ht,Lt;(vt=ve(ce,ct,Je))&&(ht=ct.lastIndex,!(ht>bt&&(Be(St,Ge(Je,bt,vt.index)),vt.length>1&&vt.index<Je.length&&de(Te,St,ie(vt,1)),Lt=vt[0].length,bt=ht,St.length>=nt)));)ct.lastIndex===vt.index&&ct.lastIndex++;return bt===Je.length?(Lt||!Ne(ct,""))&&Be(St,""):Be(St,Ge(Je,bt)),St.length>nt?ie(St,0,nt):St}:"0".split(void 0,0).length?lt=function(ut,Ct){return ut===void 0&&Ct===0?[]:ve(Xe,this,ut,Ct)}:lt=Xe,[function(Ct,Je){var nt=me(this),St=Ct==null?void 0:se(Ct,Ke);return St?ve(St,Ct,nt,Je):ve(lt,te(nt),Ct,Je)},function(ut,Ct){var Je=je(this),nt=te(ut),St=ot(lt,Je,nt,Ct,lt!==Xe);if(St.done)return St.value;var wt=Pe(Je,RegExp),bt=Je.unicode,ct=(Je.ignoreCase?"i":"")+(Je.multiline?"m":"")+(Je.unicode?"u":"")+(Ae?"g":"y"),vt=new wt(Ae?"^(?:"+Je.source+")":Je,ct),ht=Ct===void 0?De:Ct>>>0;if(ht===0)return[];if(nt.length===0)return le(vt,nt)===null?[nt]:[];for(var Lt=0,dt=0,mt=[];dt<nt.length;){vt.lastIndex=Ae?0:dt;var Et=le(vt,Ae?Ge(nt,dt):nt),gt;if(Et===null||(gt=Fe(z(vt.lastIndex+(Ae?dt:0)),nt.length))===Lt)dt=fe(nt,dt,bt);else{if(Be(mt,Ge(nt,Lt,dt)),mt.length===ht)return mt;for(var $e=1;$e<=Et.length-1;$e++)if(Be(mt,Et[$e]),mt.length===ht)return mt;dt=Lt=gt}}return Be(mt,Ge(nt,Lt)),mt}]},!Ye,Ae)},{"../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,Ue,Ie){"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,Ue,Ie){"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"),je=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"),Ae=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"),Ne=oe("../internals/object-define-property"),Be=oe("../internals/object-define-properties"),Ge=oe("../internals/object-property-is-enumerable"),Ye=oe("../internals/redefine"),Ke=oe("../internals/shared"),Xe=oe("../internals/shared-key"),ot=oe("../internals/hidden-keys"),lt=oe("../internals/uid"),ut=oe("../internals/well-known-symbol"),Ct=oe("../internals/well-known-symbol-wrapped"),Je=oe("../internals/define-well-known-symbol"),nt=oe("../internals/symbol-define-to-primitive"),St=oe("../internals/set-to-string-tag"),wt=oe("../internals/internal-state"),bt=oe("../internals/array-iteration").forEach,ct=Xe("hidden"),vt="Symbol",ht="prototype",Lt=wt.set,dt=wt.getterFor(vt),mt=Object[ht],Et=ve.Symbol,gt=Et&&Et[ht],$e=ve.TypeError,He=ve.QObject,we=Te.f,Le=Ne.f,We=De.f,tt=Ge.f,Re=ke([].push),_e=Ke("symbols"),Ve=Ke("op-symbols"),it=Ke("wks"),yt=!He||!He[ht]||!He[ht].findChild,Pt=je&&Pe(function(){return pe(Le({},"a",{get:function(){return Le(this,"a",{value:7}).a}})).a!=7})?function(an,cn,wn){var xn=we(mt,cn);xn&&delete mt[cn],Le(an,cn,wn),xn&&an!==mt&&Le(mt,cn,xn)}:Le,jt=function(an,cn){var wn=_e[an]=pe(gt);return Lt(wn,{type:vt,tag:an,description:cn}),je||(wn.description=cn),wn},Nt=function(cn,wn,xn){cn===mt&&Nt(Ve,wn,xn),te(cn);var Nn=ie(wn);return te(xn),fe(_e,Nn)?(xn.enumerable?(fe(cn,ct)&&cn[ct][Nn]&&(cn[ct][Nn]=!1),xn=pe(xn,{enumerable:ce(0,!1)})):(fe(cn,ct)||Le(cn,ct,ce(1,{})),cn[ct][Nn]=!0),Pt(cn,Nn,xn)):Le(cn,Nn,xn)},Bt=function(cn,wn){te(cn);var xn=se(wn),Nn=xe(xn).concat(hn(xn));return bt(Nn,function(Zn){(!je||Ee(en,xn,Zn))&&Nt(cn,Zn,xn[Zn])}),cn},$t=function(cn,wn){return wn===void 0?pe(cn):Bt(pe(cn),wn)},en=function(cn){var wn=ie(cn),xn=Ee(tt,this,wn);return this===mt&&fe(_e,wn)&&!fe(Ve,wn)?!1:xn||!fe(this,wn)||!fe(_e,wn)||fe(this,ct)&&this[ct][wn]?xn:!0},qt=function(cn,wn){var xn=se(cn),Nn=ie(wn);if(!(xn===mt&&fe(_e,Nn)&&!fe(Ve,Nn))){var Zn=we(xn,Nn);return Zn&&fe(_e,Nn)&&!(fe(xn,ct)&&xn[ct][Nn])&&(Zn.enumerable=!0),Zn}},Zt=function(cn){var wn=We(se(cn)),xn=[];return bt(wn,function(Nn){!fe(_e,Nn)&&!fe(ot,Nn)&&Re(xn,Nn)}),xn},hn=function(an){var cn=an===mt,wn=We(cn?Ve:se(an)),xn=[];return bt(wn,function(Nn){fe(_e,Nn)&&(!cn||fe(mt,Nn))&&Re(xn,_e[Nn])}),xn};me||(Et=function(){if(z(gt,this))throw $e("Symbol is not a constructor");var cn=!arguments.length||arguments[0]===void 0?void 0:le(arguments[0]),wn=lt(cn),xn=function(Nn){this===mt&&Ee(xn,Ve,Nn),fe(this,ct)&&fe(this[ct],wn)&&(this[ct][wn]=!1),Pt(this,wn,ce(1,Nn))};return je&&yt&&Pt(mt,wn,{configurable:!0,set:xn}),jt(wn,cn)},gt=Et[ht],Ye(gt,"toString",function(){return dt(this).tag}),Ye(Et,"withoutSetter",function(an){return jt(lt(an),an)}),Ge.f=en,Ne.f=Nt,Be.f=Bt,Te.f=qt,Ae.f=De.f=Zt,Fe.f=hn,Ct.f=function(an){return jt(ut(an),an)},je&&(Le(gt,"description",{configurable:!0,get:function(){return dt(this).description}}),Se||Ye(mt,"propertyIsEnumerable",en,{unsafe:!0}))),de({global:!0,wrap:!0,forced:!me,sham:!me},{Symbol:Et}),bt(xe(it),function(an){Je(an)}),de({target:vt,stat:!0,forced:!me},{useSetter:function(){yt=!0},useSimple:function(){yt=!1}}),de({target:"Object",stat:!0,forced:!me,sham:!je},{create:$t,defineProperty:Nt,defineProperties:Bt,getOwnPropertyDescriptor:qt}),de({target:"Object",stat:!0,forced:!me},{getOwnPropertyNames:Zt}),nt(),St(Et,vt),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,Ue,Ie){"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"),je=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&&je(te)&&(!("description"in se)||te().description!==void 0)){var ie={},le=function(){var Ne=arguments.length<1||arguments[0]===void 0?void 0:Pe(arguments[0]),Be=me(se,this)?new te(Ne):Ne===void 0?te():te(Ne);return Ne===""&&(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),Ae=/^Symbol\((.*)\)[^)]+$/,De=ke("".replace),Fe=ke("".slice);fe(se,"description",{configurable:!0,get:function(){var Ne=xe(this),Be=pe(Ne);if(Se(ie,Ne))return"";var Ge=ce?Fe(Be,7,-1):De(Be,Ae,"$1");return Ge===""?void 0:Ge}}),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,Ue,Ie){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"),je=oe("../internals/native-symbol-registry"),me=Se("string-to-symbol-registry"),Pe=Se("symbol-to-string-registry");de({target:"Symbol",stat:!0,forced:!je},{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,Ue,Ie){var de=oe("../internals/define-well-known-symbol");de("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(oe,Ue,Ie){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,Ue,Ie){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"),je=oe("../internals/native-symbol-registry"),me=Se("symbol-to-string-registry");de({target:"Symbol",stat:!0,forced:!je},{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,Ue,Ie){"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,je=ve.exportTypedArrayMethod;je("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,Ue,Ie){"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(je){return ve(Ee(this),je,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(oe,Ue,Ie){"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,Ue,Ie){"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,Ue,Ie){"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(je){return ve(Ee(this),je,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(oe,Ue,Ie){"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(je){return ve(Ee(this),je,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(oe,Ue,Ie){"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(je){ve(Ee(this),je,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(oe,Ue,Ie){"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(je){return ve(Ee(this),je,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(oe,Ue,Ie){"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(je){return ve(Ee(this),je,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(oe,Ue,Ie){"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"),je=oe("../internals/well-known-symbol"),me=je("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,Ue,Ie){"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,Ue,Ie){"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,Ue,Ie){"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,Ue,Ie){"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(je){var me=arguments.length;return ve(Ee(this),je,me,me>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(oe,Ue,Ie){"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(je){var me=arguments.length;return ve(Ee(this),je,me,me>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(oe,Ue,Ie){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=de.aTypedArray,Ee=de.exportTypedArrayMethod,ke=Math.floor;Ee("reverse",function(){for(var je=this,me=ve(je).length,Pe=ke(me/2),fe=0,z;fe<Pe;)z=je[fe],je[fe++]=je[--me],je[me]=z;return je})},{"../internals/array-buffer-view-core":103}],331:[function(oe,Ue,Ie){"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"),je=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 Ae=Se(arguments.length>1?arguments[1]:void 0,1),De=je(xe);if(le)return ve(te,this,De,Ae);var Fe=this.length,Te=ke(De),Ne=0;if(Te+Ae>Fe)throw Pe("Wrong length");for(;Ne<Te;)this[Ae+Ne]=De[Ne++]},!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,Ue,Ie){"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,je=de.exportTypedArrayMethod,me=Ee(function(){new Int8Array(1).slice()});je("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,Ue,Ie){"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(je){return ve(Ee(this),je,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(oe,Ue,Ie){"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"),je=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=je.aTypedArray,se=je.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 Ae=new ie(516),De=Array(516),Fe,Te;for(Fe=0;Fe<516;Fe++)Te=Fe%4,Ae[Fe]=515-Fe,De[Fe]=Fe-2*Te+3;for(le(Ae,function(Ne,Be){return(Ne/4|0)-(Be/4|0)}),Fe=0;Fe<516;Fe++)if(Ae[Fe]!==De[Fe])return!0}),xe=function(Ae){return function(De,Fe){return Ae!==void 0?+Ae(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,Ue,Ie){"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,je=de.exportTypedArrayMethod;je("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,Ue,Ie){"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"),je=de.Int8Array,me=Ee.aTypedArray,Pe=Ee.exportTypedArrayMethod,fe=[].toLocaleString,z=!!je&&ke(function(){fe.call(new je(1))}),te=ke(function(){return[1,2].toLocaleString()!=new je([1,2]).toLocaleString()})||!ke(function(){je.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,Ue,Ie){"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,je=Se&&Se.prototype||{},me=[].toString,Pe=ke([].join);ve(function(){me.call({})})&&(me=function(){return Pe(this)});var fe=je.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,Ue,Ie){var de=oe("../internals/typed-array-constructor");de("Uint8",function(ve){return function(ke,Se,je){return ve(this,ke,Se,je)}})},{"../internals/typed-array-constructor":258}],339:[function(oe,Ue,Ie){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"),je=function(Pe){if(Pe&&Pe.forEach!==ke)try{Se(Pe,"forEach",ke)}catch(fe){Pe.forEach=ke}};for(var me in ve)ve[me]&&je(de[me]&&de[me].prototype);je(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,Ue,Ie){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"),je=oe("../internals/well-known-symbol"),me=je("iterator"),Pe=je("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,Ue,Ie){function de(pe){return Array.isArray?Array.isArray(pe):ce(pe)==="[object Array]"}Ie.isArray=de;function ve(pe){return typeof pe=="boolean"}Ie.isBoolean=ve;function Ee(pe){return pe===null}Ie.isNull=Ee;function ke(pe){return pe==null}Ie.isNullOrUndefined=ke;function Se(pe){return typeof pe=="number"}Ie.isNumber=Se;function je(pe){return typeof pe=="string"}Ie.isString=je;function me(pe){return typeof pe=="symbol"}Ie.isSymbol=me;function Pe(pe){return pe===void 0}Ie.isUndefined=Pe;function fe(pe){return ce(pe)==="[object RegExp]"}Ie.isRegExp=fe;function z(pe){return typeof pe=="object"&&pe!==null}Ie.isObject=z;function te(pe){return ce(pe)==="[object Date]"}Ie.isDate=te;function se(pe){return ce(pe)==="[object Error]"||pe instanceof Error}Ie.isError=se;function ie(pe){return typeof pe=="function"}Ie.isFunction=ie;function le(pe){return pe===null||typeof pe=="boolean"||typeof pe=="number"||typeof pe=="string"||typeof pe=="symbol"||typeof pe=="undefined"}Ie.isPrimitive=le,Ie.isBuffer=oe("buffer").Buffer.isBuffer;function ce(pe){return Object.prototype.toString.call(pe)}},{buffer:90}],342:[function(oe,Ue,Ie){(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&&je(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"](),Ae=z[ce+"Month"](),De=z[ce+"FullYear"](),Fe=z[ce+"Hours"](),Te=z[ce+"Minutes"](),Ne=z[ce+"Seconds"](),Be=z[ce+"Milliseconds"](),Ge=se?0:z.getTimezoneOffset(),Ye=ke(z),Ke=Se(z),Xe={d:pe,dd:Ee(pe),ddd:ve.i18n.dayNames[xe],dddd:ve.i18n.dayNames[xe+7],m:Ae+1,mm:Ee(Ae+1),mmm:ve.i18n.monthNames[Ae],mmmm:ve.i18n.monthNames[Ae+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:Ne,ss:Ee(Ne),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:(Ge>0?"-":"+")+Ee(Math.floor(Math.abs(Ge)/60)*100+Math.abs(Ge)%60,4),S:["th","st","nd","rd"][pe%10>3?0:(pe%100-pe%10!=10)*pe%10],W:Ye,N:Ke};return te.replace(me,function(ot){return ot in Xe?Xe[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 je(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 ft=="function"&&ft.amd?ft(function(){return ve}):typeof Ie=="object"?Ue.exports=ve:de.dateFormat=ve})(this)},{}],343:[function(oe,Ue,Ie){"use strict";var de=/["'&<>]/;Ue.exports=ve;function ve(Ee){var ke=""+Ee,Se=de.exec(ke);if(!Se)return ke;var je,me="",Pe=0,fe=0;for(Pe=Se.index;Pe<ke.length;Pe++){switch(ke.charCodeAt(Pe)){case 34:je="&quot;";break;case 38:je="&amp;";break;case 39:je="&#39;";break;case 60:je="&lt;";break;case 62:je="&gt;";break;default:continue}fe!==Pe&&(me+=ke.substring(fe,Pe)),fe=Pe+1,me+=je}return fe!==Pe?me+ke.substring(fe,Pe):me}},{}],344:[function(oe,Ue,Ie){"use strict";var de=typeof Reflect=="object"?Reflect:null,ve=de&&typeof de.apply=="function"?de.apply:function(Ne,Be,Ge){return Function.prototype.apply.call(Ne,Be,Ge)},Ee;de&&typeof de.ownKeys=="function"?Ee=de.ownKeys:Object.getOwnPropertySymbols?Ee=function(Ne){return Object.getOwnPropertyNames(Ne).concat(Object.getOwnPropertySymbols(Ne))}:Ee=function(Ne){return Object.getOwnPropertyNames(Ne)};function ke(Te){console&&console.warn&&console.warn(Te)}var Se=Number.isNaN||function(Ne){return Ne!==Ne};function je(){je.init.call(this)}Ue.exports=je,Ue.exports.once=Ae,je.EventEmitter=je,je.prototype._events=void 0,je.prototype._eventsCount=0,je.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(je,"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}}),je.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},je.prototype.setMaxListeners=function(Ne){if(typeof Ne!="number"||Ne<0||Se(Ne))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Ne+".");return this._maxListeners=Ne,this};function fe(Te){return Te._maxListeners===void 0?je.defaultMaxListeners:Te._maxListeners}je.prototype.getMaxListeners=function(){return fe(this)},je.prototype.emit=function(Ne){for(var Be=[],Ge=1;Ge<arguments.length;Ge++)Be.push(arguments[Ge]);var Ye=Ne==="error",Ke=this._events;if(Ke!==void 0)Ye=Ye&&Ke.error===void 0;else if(!Ye)return!1;if(Ye){var Xe;if(Be.length>0&&(Xe=Be[0]),Xe instanceof Error)throw Xe;var ot=new Error("Unhandled error."+(Xe?" ("+Xe.message+")":""));throw ot.context=Xe,ot}var lt=Ke[Ne];if(lt===void 0)return!1;if(typeof lt=="function")ve(lt,this,Be);else for(var ut=lt.length,Ct=ce(lt,ut),Ge=0;Ge<ut;++Ge)ve(Ct[Ge],this,Be);return!0};function z(Te,Ne,Be,Ge){var Ye,Ke,Xe;if(Pe(Be),Ke=Te._events,Ke===void 0?(Ke=Te._events=Object.create(null),Te._eventsCount=0):(Ke.newListener!==void 0&&(Te.emit("newListener",Ne,Be.listener?Be.listener:Be),Ke=Te._events),Xe=Ke[Ne]),Xe===void 0)Xe=Ke[Ne]=Be,++Te._eventsCount;else if(typeof Xe=="function"?Xe=Ke[Ne]=Ge?[Be,Xe]:[Xe,Be]:Ge?Xe.unshift(Be):Xe.push(Be),Ye=fe(Te),Ye>0&&Xe.length>Ye&&!Xe.warned){Xe.warned=!0;var ot=new Error("Possible EventEmitter memory leak detected. "+Xe.length+" "+String(Ne)+" listeners added. Use emitter.setMaxListeners() to increase limit");ot.name="MaxListenersExceededWarning",ot.emitter=Te,ot.type=Ne,ot.count=Xe.length,ke(ot)}return Te}je.prototype.addListener=function(Ne,Be){return z(this,Ne,Be,!1)},je.prototype.on=je.prototype.addListener,je.prototype.prependListener=function(Ne,Be){return z(this,Ne,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,Ne,Be){var Ge={fired:!1,wrapFn:void 0,target:Te,type:Ne,listener:Be},Ye=te.bind(Ge);return Ye.listener=Be,Ge.wrapFn=Ye,Ye}je.prototype.once=function(Ne,Be){return Pe(Be),this.on(Ne,se(this,Ne,Be)),this},je.prototype.prependOnceListener=function(Ne,Be){return Pe(Be),this.prependListener(Ne,se(this,Ne,Be)),this},je.prototype.removeListener=function(Ne,Be){var Ge,Ye,Ke,Xe,ot;if(Pe(Be),Ye=this._events,Ye===void 0)return this;if(Ge=Ye[Ne],Ge===void 0)return this;if(Ge===Be||Ge.listener===Be)--this._eventsCount===0?this._events=Object.create(null):(delete Ye[Ne],Ye.removeListener&&this.emit("removeListener",Ne,Ge.listener||Be));else if(typeof Ge!="function"){for(Ke=-1,Xe=Ge.length-1;Xe>=0;Xe--)if(Ge[Xe]===Be||Ge[Xe].listener===Be){ot=Ge[Xe].listener,Ke=Xe;break}if(Ke<0)return this;Ke===0?Ge.shift():pe(Ge,Ke),Ge.length===1&&(Ye[Ne]=Ge[0]),Ye.removeListener!==void 0&&this.emit("removeListener",Ne,ot||Be)}return this},je.prototype.off=je.prototype.removeListener,je.prototype.removeAllListeners=function(Ne){var Be,Ge,Ye;if(Ge=this._events,Ge===void 0)return this;if(Ge.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Ge[Ne]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Ge[Ne]),this;if(arguments.length===0){var Ke=Object.keys(Ge),Xe;for(Ye=0;Ye<Ke.length;++Ye)Xe=Ke[Ye],Xe!=="removeListener"&&this.removeAllListeners(Xe);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Be=Ge[Ne],typeof Be=="function")this.removeListener(Ne,Be);else if(Be!==void 0)for(Ye=Be.length-1;Ye>=0;Ye--)this.removeListener(Ne,Be[Ye]);return this};function ie(Te,Ne,Be){var Ge=Te._events;if(Ge===void 0)return[];var Ye=Ge[Ne];return Ye===void 0?[]:typeof Ye=="function"?Be?[Ye.listener||Ye]:[Ye]:Be?xe(Ye):ce(Ye,Ye.length)}je.prototype.listeners=function(Ne){return ie(this,Ne,!0)},je.prototype.rawListeners=function(Ne){return ie(this,Ne,!1)},je.listenerCount=function(Te,Ne){return typeof Te.listenerCount=="function"?Te.listenerCount(Ne):le.call(Te,Ne)},je.prototype.listenerCount=le;function le(Te){var Ne=this._events;if(Ne!==void 0){var Be=Ne[Te];if(typeof Be=="function")return 1;if(Be!==void 0)return Be.length}return 0}je.prototype.eventNames=function(){return this._eventsCount>0?Ee(this._events):[]};function ce(Te,Ne){for(var Be=new Array(Ne),Ge=0;Ge<Ne;++Ge)Be[Ge]=Te[Ge];return Be}function pe(Te,Ne){for(;Ne+1<Te.length;Ne++)Te[Ne]=Te[Ne+1];Te.pop()}function xe(Te){for(var Ne=new Array(Te.length),Be=0;Be<Ne.length;++Be)Ne[Be]=Te[Be].listener||Te[Be];return Ne}function Ae(Te,Ne){return new Promise(function(Be,Ge){function Ye(Xe){Te.removeListener(Ne,Ke),Ge(Xe)}function Ke(){typeof Te.removeListener=="function"&&Te.removeListener("error",Ye),Be([].slice.call(arguments))}Fe(Te,Ne,Ke,{once:!0}),Ne!=="error"&&De(Te,Ye,{once:!0})})}function De(Te,Ne,Be){typeof Te.on=="function"&&Fe(Te,"error",Ne,Be)}function Fe(Te,Ne,Be,Ge){if(typeof Te.on=="function")Ge.once?Te.once(Ne,Be):Te.on(Ne,Be);else if(typeof Te.addEventListener=="function")Te.addEventListener(Ne,function Ye(Ke){Ge.once&&Te.removeEventListener(Ne,Ye),Be(Ke)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof Te)}},{}],345:[function(oe,Ue,Ie){"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)},je=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):je(fe,z,se)};Ue.exports=me},{"is-callable":367}],346:[function(oe,Ue,Ie){"use strict";var de="Function.prototype.bind called on incompatible ",ve=Array.prototype.slice,Ee=Object.prototype.toString,ke="[object Function]";Ue.exports=function(je){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(je,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,Ue,Ie){"use strict";var de=oe("./implementation");Ue.exports=Function.prototype.bind||de},{"./implementation":346}],348:[function(oe,Ue,Ie){"use strict";var de,ve=SyntaxError,Ee=Function,ke=TypeError,Se=function(lt){try{return Ee('"use strict"; return ('+lt+").constructor;")()}catch(ut){}},je=Object.getOwnPropertyDescriptor;if(je)try{je({},"")}catch(lt){je=null}var me=function(){throw new ke},Pe=je?function(){try{return arguments.callee,me}catch(lt){try{return je(arguments,"callee").get}catch(ut){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(ut){var Ct;if(ut==="%AsyncFunction%")Ct=Se("async function () {}");else if(ut==="%GeneratorFunction%")Ct=Se("function* () {}");else if(ut==="%AsyncGeneratorFunction%")Ct=Se("async function* () {}");else if(ut==="%AsyncGenerator%"){var Je=lt("%AsyncGeneratorFunction%");Je&&(Ct=Je.prototype)}else if(ut==="%AsyncIteratorPrototype%"){var nt=lt("%AsyncGenerator%");nt&&te&&(Ct=te(nt.prototype))}return le[ut]=Ct,Ct},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"]},Ae=oe("function-bind"),De=oe("has"),Fe=Ae.call(Function.call,Array.prototype.concat),Te=Ae.call(Function.apply,Array.prototype.splice),Ne=Ae.call(Function.call,String.prototype.replace),Be=Ae.call(Function.call,String.prototype.slice),Ge=Ae.call(Function.call,RegExp.prototype.exec),Ye=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ke=/\\(\\)?/g,Xe=function(ut){var Ct=Be(ut,0,1),Je=Be(ut,-1);if(Ct==="%"&&Je!=="%")throw new ve("invalid intrinsic syntax, expected closing `%`");if(Je==="%"&&Ct!=="%")throw new ve("invalid intrinsic syntax, expected opening `%`");var nt=[];return Ne(ut,Ye,function(St,wt,bt,ct){nt[nt.length]=bt?Ne(ct,Ke,"$1"):wt||St}),nt},ot=function(ut,Ct){var Je=ut,nt;if(De(xe,Je)&&(nt=xe[Je],Je="%"+nt[0]+"%"),De(le,Je)){var St=le[Je];if(St===se&&(St=pe(Je)),typeof St=="undefined"&&!Ct)throw new ke("intrinsic "+ut+" exists, but is not available. Please file an issue!");return{alias:nt,name:Je,value:St}}throw new ve("intrinsic "+ut+" does not exist!")};Ue.exports=function(ut,Ct){if(typeof ut!="string"||ut.length===0)throw new ke("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ct!="boolean")throw new ke('"allowMissing" argument must be a boolean');if(Ge(/^%?[^%]*%?$/,ut)===null)throw new ve("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Je=Xe(ut),nt=Je.length>0?Je[0]:"",St=ot("%"+nt+"%",Ct),wt=St.name,bt=St.value,ct=!1,vt=St.alias;vt&&(nt=vt[0],Te(Je,Fe([0,1],vt)));for(var ht=1,Lt=!0;ht<Je.length;ht+=1){var dt=Je[ht],mt=Be(dt,0,1),Et=Be(dt,-1);if((mt==='"'||mt==="'"||mt==="`"||Et==='"'||Et==="'"||Et==="`")&&mt!==Et)throw new ve("property names with quotes must have matching quotes");if((dt==="constructor"||!Lt)&&(ct=!0),nt+="."+dt,wt="%"+nt+"%",De(le,wt))bt=le[wt];else if(bt!=null){if(!(dt in bt)){if(!Ct)throw new ke("base intrinsic for "+ut+" exists, but the property is not available.");return}if(je&&ht+1>=Je.length){var gt=je(bt,dt);Lt=!!gt,Lt&&"get"in gt&&!("originalValue"in gt.get)?bt=gt.get:bt=bt[dt]}else Lt=De(bt,dt),bt=bt[dt];Lt&&!ct&&(le[wt]=bt)}}return bt}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(oe,Ue,Ie){"use strict";var de=oe("get-intrinsic"),ve=de("%Object.getOwnPropertyDescriptor%",!0);if(ve)try{ve([],"length")}catch(Ee){ve=null}Ue.exports=ve},{"get-intrinsic":348}],350:[function(oe,Ue,Ie){"use strict";var de={foo:{}},ve=Object;Ue.exports=function(){return{__proto__:de}.foo===de.foo&&!({__proto__:null}instanceof ve)}},{}],351:[function(oe,Ue,Ie){"use strict";var de=typeof Symbol!="undefined"&&Symbol,ve=oe("./shams");Ue.exports=function(){return typeof de!="function"||typeof Symbol!="function"||typeof de("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ve()}},{"./shams":352}],352:[function(oe,Ue,Ie){"use strict";Ue.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 je=Object.getOwnPropertySymbols(ve);if(je.length!==1||je[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,Ue,Ie){"use strict";var de=oe("has-symbols/shams");Ue.exports=function(){return de()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(oe,Ue,Ie){"use strict";var de=oe("function-bind");Ue.exports=de.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(oe,Ue,Ie){var de=oe("http"),ve=oe("url"),Ee=Ue.exports;for(var ke in de)de.hasOwnProperty(ke)&&(Ee[ke]=de[ke]);Ee.request=function(je,me){return je=Se(je),de.request.call(this,je,me)},Ee.get=function(je,me){return je=Se(je),de.get.call(this,je,me)};function Se(je){if(typeof je=="string"&&(je=ve.parse(je)),je.protocol||(je.protocol="https:"),je.protocol!=="https:")throw new Error('Protocol "'+je.protocol+'" not supported. Expected "https:"');return je}},{http:468,url:472}],356:[function(oe,Ue,Ie){"use strict";var de=oe("util"),ve=oe("ms");Ue.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,Ue,Ie){Ie.read=function(de,ve,Ee,ke,Se){var je,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,je=le&(1<<-te)-1,le>>=-te,te+=Pe;te>0;je=je*256+de[ve+se],se+=ie,te-=8);for(me=je&(1<<-te)-1,je>>=-te,te+=ke;te>0;me=me*256+de[ve+se],se+=ie,te-=8);if(je===0)je=1-z;else{if(je===fe)return me?NaN:(le?-1:1)*(1/0);me=me+Math.pow(2,ke),je=je-z}return(le?-1:1)*me*Math.pow(2,je-ke)},Ie.write=function(de,ve,Ee,ke,Se,je){var me,Pe,fe,z=je*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:je-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,Ue,Ie){"use strict";var de=[oe("./nextTick"),oe("./queueMicrotask"),oe("./mutation.js"),oe("./messageChannel"),oe("./stateChange"),oe("./timeout")],ve,Ee,ke=-1,Se=[],je=!1;function me(){!ve||!Ee||(ve=!1,Ee.length?Se=Ee.concat(Se):ke=-1,Se.length&&Pe())}function Pe(){if(!ve){je=!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)}},Ue.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)),!je&&!ve&&(je=!0,fe())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(oe,Ue,Ie){(function(de){(function(){"use strict";Ie.test=function(){return de.setImmediate?!1:typeof de.MessageChannel!="undefined"},Ie.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,Ue,Ie){(function(de){(function(){"use strict";var ve=de.MutationObserver||de.WebKitMutationObserver;Ie.test=function(){return ve},Ie.install=function(Ee){var ke=0,Se=new ve(Ee),je=de.document.createTextNode("");return Se.observe(je,{characterData:!0}),function(){je.data=ke=++ke%2}}}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(oe,Ue,Ie){(function(de){(function(){"use strict";Ie.test=function(){return typeof de.queueMicrotask=="function"},Ie.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,Ue,Ie){(function(de){(function(){"use strict";Ie.test=function(){return"document"in de&&"onreadystatechange"in de.document.createElement("script")},Ie.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,Ue,Ie){"use strict";Ie.test=function(){return!0},Ie.install=function(de){return function(){setTimeout(de,0)}}},{}],364:[function(oe,Ue,Ie){typeof Object.create=="function"?Ue.exports=function(ve,Ee){Ee&&(ve.super_=Ee,ve.prototype=Object.create(Ee.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}}))}:Ue.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,Ue,Ie){"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]"},je=function(){return ke(arguments)}();ke.isLegacyArguments=Se,Ue.exports=je?ke:Se},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(oe,Ue,Ie){Ue.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,Ue,Ie){"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/,je=function(Fe){try{var Te=de.call(Fe);return Se.test(Te)}catch(Ne){return!1}},me=function(Fe){try{return je(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 Ae=document.all;Pe.call(Ae)===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(Ne){}return!1})}Ue.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!je(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(je(Fe))return!1;var Te=Pe.call(Fe);return Te!==z&&Te!==te&&!/^\[object HTML/.test(Te)?!1:me(Fe)}},{}],368:[function(oe,Ue,Ie){"use strict";var de=Object.prototype.toString,ve=Function.prototype.toString,Ee=/^\s*(?:function)?\*/,ke=oe("has-tostringtag/shams")(),Se=Object.getPrototypeOf,je=function(){if(!ke)return!1;try{return Function("return function*() {}")()}catch(Pe){}},me;Ue.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=je();me=te?Se(te):!1}return Se(fe)===me}},{"has-tostringtag/shams":353}],369:[function(oe,Ue,Ie){"use strict";var de=oe("which-typed-array");Ue.exports=function(Ee){return!!de(Ee)}},{"which-typed-array":420}],370:[function(oe,Ue,Ie){var de={}.toString;Ue.exports=Array.isArray||function(ve){return de.call(ve)=="[object Array]"}},{}],371:[function(oe,Ue,Ie){(function(de){(function(){(function(ve,Ee){typeof Ie=="object"&&typeof Ue!="undefined"?Ue.exports=Ee(ve):typeof ft=="function"&&ft.amd?ft(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+/",je=function(ut){for(var Ct={},Je=0,nt=ut.length;Je<nt;Je++)Ct[ut.charAt(Je)]=Je;return Ct}(Se),me=String.fromCharCode,Pe=function(ut){if(ut.length<2){var Ct=ut.charCodeAt(0);return Ct<128?ut:Ct<2048?me(192|Ct>>>6)+me(128|Ct&63):me(224|Ct>>>12&15)+me(128|Ct>>>6&63)+me(128|Ct&63)}else{var Ct=65536+(ut.charCodeAt(0)-55296)*1024+(ut.charCodeAt(1)-56320);return me(240|Ct>>>18&7)+me(128|Ct>>>12&63)+me(128|Ct>>>6&63)+me(128|Ct&63)}},fe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(ut){return ut.replace(fe,Pe)},te=function(ut){var Ct=[0,2,1][ut.length%3],Je=ut.charCodeAt(0)<<16|(ut.length>1?ut.charCodeAt(1):0)<<8|(ut.length>2?ut.charCodeAt(2):0),nt=[Se.charAt(Je>>>18),Se.charAt(Je>>>12&63),Ct>=2?"=":Se.charAt(Je>>>6&63),Ct>=1?"=":Se.charAt(Je&63)];return nt.join("")},se=ve.btoa&&typeof ve.btoa=="function"?function(ut){return ve.btoa(ut)}:function(ut){if(ut.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ut.replace(/[\s\S]{1,3}/g,te)},ie=function(ut){return se(z(String(ut)))},le=function(ut){return ut.replace(/[+\/]/g,function(Ct){return Ct=="+"?"-":"_"}).replace(/=/g,"")},ce=function(ut,Ct){return Ct?le(ie(ut)):ie(ut)},pe=function(ut){return ce(ut,!0)},xe;ve.Uint8Array&&(xe=function(ut,Ct){for(var Je="",nt=0,St=ut.length;nt<St;nt+=3){var wt=ut[nt],bt=ut[nt+1],ct=ut[nt+2],vt=wt<<16|bt<<8|ct;Je+=Se.charAt(vt>>>18)+Se.charAt(vt>>>12&63)+(typeof bt!="undefined"?Se.charAt(vt>>>6&63):"=")+(typeof ct!="undefined"?Se.charAt(vt&63):"=")}return Ct?le(Je):Je});var Ae=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,De=function(ut){switch(ut.length){case 4:var Ct=(7&ut.charCodeAt(0))<<18|(63&ut.charCodeAt(1))<<12|(63&ut.charCodeAt(2))<<6|63&ut.charCodeAt(3),Je=Ct-65536;return me((Je>>>10)+55296)+me((Je&1023)+56320);case 3:return me((15&ut.charCodeAt(0))<<12|(63&ut.charCodeAt(1))<<6|63&ut.charCodeAt(2));default:return me((31&ut.charCodeAt(0))<<6|63&ut.charCodeAt(1))}},Fe=function(ut){return ut.replace(Ae,De)},Te=function(ut){var Ct=ut.length,Je=Ct%4,nt=(Ct>0?je[ut.charAt(0)]<<18:0)|(Ct>1?je[ut.charAt(1)]<<12:0)|(Ct>2?je[ut.charAt(2)]<<6:0)|(Ct>3?je[ut.charAt(3)]:0),St=[me(nt>>>16),me(nt>>>8&255),me(nt&255)];return St.length-=[0,0,2,1][Je],St.join("")},Ne=ve.atob&&typeof ve.atob=="function"?function(ut){return ve.atob(ut)}:function(ut){return ut.replace(/\S{1,4}/g,Te)},Be=function(ut){return Ne(String(ut).replace(/[^A-Za-z0-9\+\/]/g,""))},Ge=function(ut){return Fe(Ne(ut))},Ye=function(ut){return String(ut).replace(/[-_]/g,function(Ct){return Ct=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ke=function(ut){return Ge(Ye(ut))},Xe;ve.Uint8Array&&(Xe=function(ut){return Uint8Array.from(Be(Ye(ut)),function(Ct){return Ct.charCodeAt(0)})});var ot=function(){var ut=ve.Base64;return ve.Base64=Ee,ut};if(ve.Base64={VERSION:ke,atob:Be,btoa:se,fromBase64:Ke,toBase64:ce,utob:z,encode:ce,encodeURI:pe,btou:Fe,decode:Ke,noConflict:ot,fromUint8Array:xe,toUint8Array:Xe},typeof Object.defineProperty=="function"){var lt=function(ut){return{value:ut,enumerable:!1,writable:!0,configurable:!0}};ve.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",lt(function(){return Ke(this)})),Object.defineProperty(String.prototype,"toBase64",lt(function(ut){return ce(this,ut)})),Object.defineProperty(String.prototype,"toBase64URI",lt(function(){return ce(this,!0)}))}}return ve.Meteor&&(Base64=ve.Base64),typeof Ue!="undefined"&&Ue.exports?Ue.exports.Base64=ve.Base64:typeof ft=="function"&&ft.amd&&ft([],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,Ue,Ie){"use strict";Ue.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,Ue,Ie){"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 je=0;je<Se.length;je++){var me=Se[je];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,je=ke.length<Ee.length-1;return(je||!Se)&&this._types[ke]||null},de.prototype.getExtension=function(ve){return ve=/^\s*([^;\s]*)/.test(ve)&&RegExp.$1,ve&&this._extensions[ve.toLowerCase()]||null},Ue.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,Ue,Ie){"use strict";var de=oe("./Mime");Ue.exports=new de(oe("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(oe,Ue,Ie){"use strict";Ue.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,Ue,Ie){var de=1e3,ve=de*60,Ee=ve*60,ke=Ee*24,Se=ke*7,je=ke*365.25;Ue.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*je;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,Ue,Ie){"use strict";var de=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;function ke(je){if(je==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(je)}function Se(){try{if(!Object.assign)return!1;var je=new String("abc");if(je[5]="de",Object.getOwnPropertyNames(je)[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}}Ue.exports=Se()?Object.assign:function(je,me){for(var Pe,fe=ke(je),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,Ue,Ie){(function(de){(function(){"use strict";function ve(je){if(typeof je!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(je))}function Ee(je,me){for(var Pe="",fe=0,z=-1,te=0,se,ie=0;ie<=je.length;++ie){if(ie<je.length)se=je.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+="/"+je.slice(z+1,ie):Pe=je.slice(z+1,ie),fe=ie-z-1;z=ie,te=0}else se===46&&te!==-1?++te:te=-1}return Pe}function ke(je,me){var Pe=me.dir||me.root,fe=me.base||(me.name||"")+(me.ext||"");return Pe?Pe===me.root?Pe+fe:Pe+je+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 Ae=me.charCodeAt(fe+xe),De=Pe.charCodeAt(se+xe);if(Ae!==De)break;Ae===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,Ue.exports=Se}).call(this)}).call(this,oe("_process"))},{_process:467}],379:[function(oe,Ue,Ie){(function(de){(function(){(function(){"use strict";var ve={function:!0,object:!0},Ee=ve[typeof window]&&window||this,ke=Ee,Se=ve[typeof Ie]&&Ie,je=ve[typeof Ue]&&Ue&&!Ue.nodeType&&Ue,me=Se&&je&&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(Ke){return Ke=String(Ke),Ke.charAt(0).toUpperCase()+Ke.slice(1)}function ce(Ke,Xe,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 Xe&&ot&&/^Win/i.test(Ke)&&!/^Windows Phone /i.test(Ke)&&(lt=lt[/[\d.]+$/.exec(Ke)])&&(Ke="Windows "+lt),Ke=String(Ke),Xe&&ot&&(Ke=Ke.replace(RegExp(Xe,"i"),ot)),Ke=xe(Ke.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]),Ke}function pe(Ke,Xe){var ot=-1,lt=Ke?Ke.length:0;if(typeof lt=="number"&&lt>-1&&lt<=Pe)for(;++ot<lt;)Xe(Ke[ot],ot,Ke);else Ae(Ke,Xe)}function xe(Ke){return Ke=Be(Ke),/^(?:webOS|i(?:OS|P))/.test(Ke)?Ke:le(Ke)}function Ae(Ke,Xe){for(var ot in Ke)se.call(Ke,ot)&&Xe(Ke[ot],ot,Ke)}function De(Ke){return Ke==null?le(Ke):ie.call(Ke).slice(8,-1)}function Fe(Ke,Xe){var ot=Ke!=null?typeof Ke[Xe]:"number";return!/^(?:boolean|number|string|undefined)$/.test(ot)&&(ot=="object"?!!Ke[Xe]:!0)}function Te(Ke){return String(Ke).replace(/([ -])(?!$)/g,"$1?")}function Ne(Ke,Xe){var ot=null;return pe(Ke,function(lt,ut){ot=Xe(ot,lt,ut,Ke)}),ot}function Be(Ke){return String(Ke).replace(/^ +| +$/g,"")}function Ge(Ke){var Xe=Ee,ot=Ke&&typeof Ke=="object"&&De(Ke)!="String";ot&&(Xe=Ke,Ke=null);var lt=Xe.navigator||{},ut=lt.userAgent||"";Ke||(Ke=ut);var Ct=ot||z==ke,Je=ot?!!lt.likeChrome:/\bChrome\b/.test(Ke)&&!/internal|\n/i.test(ie.toString()),nt="Object",St=ot?nt:"ScriptBridgingProxyObject",wt=ot?nt:"Environment",bt=ot&&Xe.java?"JavaPackage":De(Xe.java),ct=ot?nt:"RuntimeObject",vt=/\bJava/.test(bt)&&Xe.java,ht=vt&&De(Xe.environment)==wt,Lt=vt?"a":"\u03B1",dt=vt?"b":"\u03B2",mt=Xe.document||{},Et=Xe.operamini||Xe.opera,gt=fe.test(gt=ot&&Et?Et["[[Class]]"]:De(Et))?gt:Et=null,$e,He=Ke,we=[],Le=null,We=Ke==ut,tt=We&&Et&&typeof Et.version=="function"&&Et.version(),Re,_e=jt([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Ve=Bt(["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"]),it=en([{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"]),yt=Nt({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}}),Pt=$t(["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 jt(an){return Ne(an,function(cn,wn){return cn||RegExp("\\b"+(wn.pattern||Te(wn))+"\\b","i").exec(Ke)&&(wn.label||wn)})}function Nt(an){return Ne(an,function(cn,wn,xn){return cn||(wn[it]||wn[/^[a-z]+(?: +[a-z]+\b)*/i.exec(it)]||RegExp("\\b"+Te(xn)+"(?:\\b|\\w*\\d)","i").exec(Ke))&&xn})}function Bt(an){return Ne(an,function(cn,wn){return cn||RegExp("\\b"+(wn.pattern||Te(wn))+"\\b","i").exec(Ke)&&(wn.label||wn)})}function $t(an){return Ne(an,function(cn,wn){var xn=wn.pattern||Te(wn);return!cn&&(cn=RegExp("\\b"+xn+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Ke))&&(cn=ce(cn,xn,wn.label||wn)),cn})}function en(an){return Ne(an,function(cn,wn){var xn=wn.pattern||Te(wn);return!cn&&(cn=RegExp("\\b"+xn+" *\\d+[.\\w_]*","i").exec(Ke)||RegExp("\\b"+xn+" *\\w+-[\\w]*","i").exec(Ke)||RegExp("\\b"+xn+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Ke))&&((cn=String(wn.label&&!RegExp(xn,"i").test(wn.label)?wn.label:cn).split("/"))[1]&&!/[\d.]+/.test(cn[0])&&(cn[0]+=" "+cn[1]),wn=wn.label||wn,cn=xe(cn[0].replace(RegExp(xn,"i"),wn).replace(RegExp("; *(?:"+wn+"[_-])?","i")," ").replace(RegExp("("+wn+")[-_.]?(\\w)","i"),"$1 $2"))),cn})}function qt(an){return Ne(an,function(cn,wn){return cn||(RegExp(wn+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Ke)||0)[1]||null})}function Zt(){return this.description||""}if(_e&&(_e=[_e]),/\bAndroid\b/.test(Pt)&&!it&&($e=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(Ke))&&(it=Be($e[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),yt&&!it?it=en([yt]):yt&&it&&(it=it.replace(RegExp("^("+Te(yt)+")[-_.\\s]","i"),yt+" ").replace(RegExp("^("+Te(yt)+")[-_.]?(\\w)","i"),yt+" $2")),($e=/\bGoogle TV\b/.exec(it))&&(it=$e[0]),/\bSimulator\b/i.test(Ke)&&(it=(it?it+" ":"")+"Simulator"),Ve=="Opera Mini"&&/\bOPiOS\b/.test(Ke)&&we.push("running in Turbo/Uncompressed mode"),Ve=="IE"&&/\blike iPhone OS\b/.test(Ke)?($e=Ge(Ke.replace(/like iPhone OS/,"")),yt=$e.manufacturer,it=$e.product):/^iP/.test(it)?(Ve||(Ve="Safari"),Pt="iOS"+(($e=/ OS ([\d_]+)/i.exec(Ke))?" "+$e[1].replace(/_/g,"."):"")):Ve=="Konqueror"&&/^Linux\b/i.test(Pt)?Pt="Kubuntu":yt&&yt!="Google"&&(/Chrome/.test(Ve)&&!/\bMobile Safari\b/i.test(Ke)||/\bVita\b/.test(it))||/\bAndroid\b/.test(Pt)&&/^Chrome/.test(Ve)&&/\bVersion\//i.test(Ke)?(Ve="Android Browser",Pt=/\bAndroid\b/.test(Pt)?Pt:"Android"):Ve=="Silk"?(/\bMobi/i.test(Ke)||(Pt="Android",we.unshift("desktop mode")),/Accelerated *= *true/i.test(Ke)&&we.unshift("accelerated")):Ve=="UC Browser"&&/\bUCWEB\b/.test(Ke)?we.push("speed mode"):Ve=="PaleMoon"&&($e=/\bFirefox\/([\d.]+)\b/.exec(Ke))?we.push("identifying as Firefox "+$e[1]):Ve=="Firefox"&&($e=/\b(Mobile|Tablet|TV)\b/i.exec(Ke))?(Pt||(Pt="Firefox OS"),it||(it=$e[1])):!Ve||($e=!/\bMinefield\b/i.test(Ke)&&/\b(?:Firefox|Safari)\b/.exec(Ve))?(Ve&&!it&&/[\/,]|^[^(]+?\)/.test(Ke.slice(Ke.indexOf($e+"/")+8))&&(Ve=null),($e=it||yt||Pt)&&(it||yt||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Pt))&&(Ve=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Pt)?Pt:$e)+" Browser")):Ve=="Electron"&&($e=(/\bChrome\/([\d.]+)\b/.exec(Ke)||0)[1])&&we.push("Chromium "+$e),tt||(tt=qt(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",Te(Ve),"(?:Firefox|Minefield|NetFront)"])),($e=_e=="iCab"&&parseFloat(tt)>3&&"WebKit"||/\bOpera\b/.test(Ve)&&(/\bOPR\b/.test(Ke)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Ke)&&!/^(?:Trident|EdgeHTML)$/.test(_e)&&"WebKit"||!_e&&/\bMSIE\b/i.test(Ke)&&(Pt=="Mac OS"?"Tasman":"Trident")||_e=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ve)&&"NetFront")&&(_e=[$e]),Ve=="IE"&&($e=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Ke)||0)[1])?(Ve+=" Mobile",Pt="Windows Phone "+(/\+$/.test($e)?$e:$e+".x"),we.unshift("desktop mode")):/\bWPDesktop\b/i.test(Ke)?(Ve="IE Mobile",Pt="Windows Phone 8.x",we.unshift("desktop mode"),tt||(tt=(/\brv:([\d.]+)/.exec(Ke)||0)[1])):Ve!="IE"&&_e=="Trident"&&($e=/\brv:([\d.]+)/.exec(Ke))&&(Ve&&we.push("identifying as "+Ve+(tt?" "+tt:"")),Ve="IE",tt=$e[1]),We){if(Fe(Xe,"global"))if(vt&&($e=vt.lang.System,He=$e.getProperty("os.arch"),Pt=Pt||$e.getProperty("os.name")+" "+$e.getProperty("os.version")),ht){try{tt=Xe.require("ringo/engine").version.join("."),Ve="RingoJS"}catch(an){($e=Xe.system)&&$e.global.system==Xe.system&&(Ve="Narwhal",Pt||(Pt=$e[0].os||null))}Ve||(Ve="Rhino")}else typeof Xe.process=="object"&&!Xe.process.browser&&($e=Xe.process)&&(typeof $e.versions=="object"&&(typeof $e.versions.electron=="string"?(we.push("Node "+$e.versions.node),Ve="Electron",tt=$e.versions.electron):typeof $e.versions.nw=="string"&&(we.push("Chromium "+tt,"Node "+$e.versions.node),Ve="NW.js",tt=$e.versions.nw)),Ve||(Ve="Node.js",He=$e.arch,Pt=$e.platform,tt=/[\d.]+/.exec($e.version),tt=tt?tt[0]:null));else De($e=Xe.runtime)==St?(Ve="Adobe AIR",Pt=$e.flash.system.Capabilities.os):De($e=Xe.phantom)==ct?(Ve="PhantomJS",tt=($e=$e.version||null)&&$e.major+"."+$e.minor+"."+$e.patch):typeof mt.documentMode=="number"&&($e=/\bTrident\/(\d+)/i.exec(Ke))?(tt=[tt,mt.documentMode],($e=+$e[1]+4)!=tt[1]&&(we.push("IE "+tt[1]+" mode"),_e&&(_e[1]=""),tt[1]=$e),tt=Ve=="IE"?String(tt[1].toFixed(1)):tt[0]):typeof mt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ve)&&(we.push("masking as "+Ve+" "+tt),Ve="IE",tt="11.0",_e=["Trident"],Pt="Windows");Pt=Pt&&xe(Pt)}if(tt&&($e=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(tt)||/(?:alpha|beta)(?: ?\d)?/i.exec(Ke+";"+(We&&lt.appMinorVersion))||/\bMinefield\b/i.test(Ke)&&"a")&&(Le=/b/i.test($e)?"beta":"alpha",tt=tt.replace(RegExp($e+"\\+?$"),"")+(Le=="beta"?dt:Lt)+(/\d+\+?/.exec($e)||"")),Ve=="Fennec"||Ve=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(Pt))Ve="Firefox Mobile";else if(Ve=="Maxthon"&&tt)tt=tt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(it))it=="Xbox 360"&&(Pt=null),it=="Xbox 360"&&/\bIEMobile\b/.test(Ke)&&we.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Ve)||Ve&&!it&&!/Browser|Mobi/.test(Ve))&&(Pt=="Windows CE"||/Mobi/i.test(Ke)))Ve+=" Mobile";else if(Ve=="IE"&&We)try{Xe.external===null&&we.unshift("platform preview")}catch(an){we.unshift("embedded")}else(/\bBlackBerry\b/.test(it)||/\bBB10\b/.test(Ke))&&($e=(RegExp(it.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Ke)||0)[1]||tt)?($e=[$e,/BB10/.test(Ke)],Pt=($e[1]?(it=null,yt="BlackBerry"):"Device Software")+" "+$e[0],tt=null):this!=Ae&&it!="Wii"&&(We&&Et||/Opera/.test(Ve)&&/\b(?:MSIE|Firefox)\b/i.test(Ke)||Ve=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Pt)||Ve=="IE"&&(Pt&&!/^Win/.test(Pt)&&tt>5.5||/\bWindows XP\b/.test(Pt)&&tt>8||tt==8&&!/\bTrident\b/.test(Ke)))&&!fe.test($e=Ge.call(Ae,Ke.replace(fe,"")+";"))&&$e.name&&($e="ing as "+$e.name+(($e=$e.version)?" "+$e:""),fe.test(Ve)?(/\bIE\b/.test($e)&&Pt=="Mac OS"&&(Pt=null),$e="identify"+$e):($e="mask"+$e,gt?Ve=xe(gt.replace(/([a-z])([A-Z])/g,"$1 $2")):Ve="Opera",/\bIE\b/.test($e)&&(Pt=null),We||(tt=null)),_e=["Presto"],we.push($e));($e=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Ke)||0)[1])&&($e=[parseFloat($e.replace(/\.(\d)$/,".0$1")),$e],Ve=="Safari"&&$e[1].slice(-1)=="+"?(Ve="WebKit Nightly",Le="alpha",tt=$e[1].slice(0,-1)):(tt==$e[1]||tt==($e[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Ke)||0)[1]))&&(tt=null),$e[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(Ke)||0)[1],$e[0]==537.36&&$e[2]==537.36&&parseFloat($e[1])>=28&&_e=="WebKit"&&(_e=["Blink"]),!We||!Je&&!$e[1]?(_e&&(_e[1]="like Safari"),$e=($e=$e[0],$e<400?1:$e<500?2:$e<526?3:$e<533?4:$e<534?"4+":$e<535?5:$e<537?6:$e<538?7:$e<601?8:$e<602?9:$e<604?10:$e<606?11:$e<608?12:"12")):(_e&&(_e[1]="like Chrome"),$e=$e[1]||($e=$e[0],$e<530?1:$e<532?2:$e<532.05?3:$e<533?4:$e<534.03?5:$e<534.07?6:$e<534.1?7:$e<534.13?8:$e<534.16?9:$e<534.24?10:$e<534.3?11:$e<535.01?12:$e<535.02?"13+":$e<535.07?15:$e<535.11?16:$e<535.19?17:$e<536.05?18:$e<536.1?19:$e<537.01?20:$e<537.11?"21+":$e<537.13?23:$e<537.18?24:$e<537.24?25:$e<537.36?26:_e!="Blink"?"27":"28")),_e&&(_e[1]+=" "+($e+=typeof $e=="number"?".x":/[.+]/.test($e)?"":"+")),Ve=="Safari"&&(!tt||parseInt(tt)>45)?tt=$e:Ve=="Chrome"&&/\bHeadlessChrome/i.test(Ke)&&we.unshift("headless")),Ve=="Opera"&&($e=/\bzbov|zvav$/.exec(Pt))?(Ve+=" ",we.unshift("desktop mode"),$e=="zvav"?(Ve+="Mini",tt=null):Ve+="Mobile",Pt=Pt.replace(RegExp(" *"+$e+"$"),"")):Ve=="Safari"&&/\bChrome\b/.exec(_e&&_e[1])?(we.unshift("desktop mode"),Ve="Chrome Mobile",tt=null,/\bOS X\b/.test(Pt)?(yt="Apple",Pt="iOS 4.3+"):Pt=null):/\bSRWare Iron\b/.test(Ve)&&!tt&&(tt=qt("Chrome")),tt&&tt.indexOf($e=/[\d.]+$/.exec(Pt))==0&&Ke.indexOf("/"+$e+"-")>-1&&(Pt=Be(Pt.replace($e,""))),Pt&&Pt.indexOf(Ve)!=-1&&!RegExp(Ve+" OS").test(Pt)&&(Pt=Pt.replace(RegExp(" *"+Te(Ve)+" *"),"")),_e&&!/\b(?:Avant|Nook)\b/.test(Ve)&&(/Browser|Lunascape|Maxthon/.test(Ve)||Ve!="Safari"&&/^iOS/.test(Pt)&&/\bSafari\b/.test(_e[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(Ve)&&_e[1])&&($e=_e[_e.length-1])&&we.push($e),we.length&&(we=["("+we.join("; ")+")"]),yt&&it&&it.indexOf(yt)<0&&we.push("on "+yt),it&&we.push((/^on /.test(we[we.length-1])?"":"on ")+it),Pt&&($e=/ ([\d.+]+)$/.exec(Pt),Re=$e&&Pt.charAt(Pt.length-$e[0].length-1)=="/",Pt={architecture:32,family:$e&&!Re?Pt.replace($e[0],""):Pt,version:$e?$e[1]:null,toString:function(){var an=this.version;return this.family+(an&&!Re?" "+an:"")+(this.architecture==64?" 64-bit":"")}}),($e=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(He))&&!/\bi686\b/i.test(He)?(Pt&&(Pt.architecture=64,Pt.family=Pt.family.replace(RegExp(" *"+$e),"")),Ve&&(/\bWOW64\b/i.test(Ke)||We&&/\w(?:86|32)$/.test(lt.cpuClass||lt.platform)&&!/\bWin64; x64\b/i.test(Ke))&&we.unshift("32-bit")):Pt&&/^OS X/.test(Pt.family)&&Ve=="Chrome"&&parseFloat(tt)>=39&&(Pt.architecture=64),Ke||(Ke=null);var hn={};return hn.description=Ke,hn.layout=_e&&_e[0],hn.manufacturer=yt,hn.name=Ve,hn.prerelease=Le,hn.product=it,hn.ua=Ke,hn.version=Ve&&tt,hn.os=Pt||{architecture:null,family:null,version:null,toString:function(){return"null"}},hn.parse=Ge,hn.toString=Zt,hn.version&&we.unshift(tt),hn.name&&we.unshift(Ve),Pt&&Ve&&!(Pt==String(Pt).split(" ")[0]&&(Pt==Ve.split(" ")[0]||it))&&we.push(it?"("+Pt+")":"on "+Pt),we.length&&(hn.description=we.join(" ")),hn}var Ye=Ge();typeof ft=="function"&&typeof ft.amd=="object"&&ft.amd?(Ee.platform=Ye,ft(function(){return Ye})):Se&&je?Ae(Ye,function(Ke,Xe){Se[Xe]=Ke}):Ee.platform=Ye}).call(this)}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(oe,Ue,Ie){(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?Ue.exports={nextTick:ve}:Ue.exports=de;function ve(Ee,ke,Se,je){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,je)});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,Ue,Ie){var de=Ue.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 je(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(Ae){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(Ae){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=je(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 Ae=1;Ae<arguments.length;Ae++)xe[Ae-1]=arguments[Ae];Pe.push(new le(pe,xe)),Pe.length===1&&!fe&&je(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,Ue,Ie){(function(de){(function(){(function(ve){var Ee=typeof Ie=="object"&&Ie&&!Ie.nodeType&&Ie,ke=typeof Ue=="object"&&Ue&&!Ue.nodeType&&Ue,Se=typeof de=="object"&&de;(Se.global===Se||Se.window===Se||Se.self===Se)&&(ve=Se);var je,me=2147483647,Pe=36,fe=1,z=26,te=38,se=700,ie=72,le=128,ce="-",pe=/^xn--/,xe=/[^\x20-\x7E]/,Ae=/[\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,Ne=String.fromCharCode,Be;function Ge(bt){throw new RangeError(De[bt])}function Ye(bt,ct){for(var vt=bt.length,ht=[];vt--;)ht[vt]=ct(bt[vt]);return ht}function Ke(bt,ct){var vt=bt.split("@"),ht="";vt.length>1&&(ht=vt[0]+"@",bt=vt[1]),bt=bt.replace(Ae,".");var Lt=bt.split("."),dt=Ye(Lt,ct).join(".");return ht+dt}function Xe(bt){for(var ct=[],vt=0,ht=bt.length,Lt,dt;vt<ht;)Lt=bt.charCodeAt(vt++),Lt>=55296&&Lt<=56319&&vt<ht?(dt=bt.charCodeAt(vt++),(dt&64512)==56320?ct.push(((Lt&1023)<<10)+(dt&1023)+65536):(ct.push(Lt),vt--)):ct.push(Lt);return ct}function ot(bt){return Ye(bt,function(ct){var vt="";return ct>65535&&(ct-=65536,vt+=Ne(ct>>>10&1023|55296),ct=56320|ct&1023),vt+=Ne(ct),vt}).join("")}function lt(bt){return bt-48<10?bt-22:bt-65<26?bt-65:bt-97<26?bt-97:Pe}function ut(bt,ct){return bt+22+75*(bt<26)-((ct!=0)<<5)}function Ct(bt,ct,vt){var ht=0;for(bt=vt?Te(bt/se):bt>>1,bt+=Te(bt/ct);bt>Fe*z>>1;ht+=Pe)bt=Te(bt/Fe);return Te(ht+(Fe+1)*bt/(bt+te))}function Je(bt){var ct=[],vt=bt.length,ht,Lt=0,dt=le,mt=ie,Et,gt,$e,He,we,Le,We,tt,Re;for(Et=bt.lastIndexOf(ce),Et<0&&(Et=0),gt=0;gt<Et;++gt)bt.charCodeAt(gt)>=128&&Ge("not-basic"),ct.push(bt.charCodeAt(gt));for($e=Et>0?Et+1:0;$e<vt;){for(He=Lt,we=1,Le=Pe;$e>=vt&&Ge("invalid-input"),We=lt(bt.charCodeAt($e++)),(We>=Pe||We>Te((me-Lt)/we))&&Ge("overflow"),Lt+=We*we,tt=Le<=mt?fe:Le>=mt+z?z:Le-mt,!(We<tt);Le+=Pe)Re=Pe-tt,we>Te(me/Re)&&Ge("overflow"),we*=Re;ht=ct.length+1,mt=Ct(Lt-He,ht,He==0),Te(Lt/ht)>me-dt&&Ge("overflow"),dt+=Te(Lt/ht),Lt%=ht,ct.splice(Lt++,0,dt)}return ot(ct)}function nt(bt){var ct,vt,ht,Lt,dt,mt,Et,gt,$e,He,we,Le=[],We,tt,Re,_e;for(bt=Xe(bt),We=bt.length,ct=le,vt=0,dt=ie,mt=0;mt<We;++mt)we=bt[mt],we<128&&Le.push(Ne(we));for(ht=Lt=Le.length,Lt&&Le.push(ce);ht<We;){for(Et=me,mt=0;mt<We;++mt)we=bt[mt],we>=ct&&we<Et&&(Et=we);for(tt=ht+1,Et-ct>Te((me-vt)/tt)&&Ge("overflow"),vt+=(Et-ct)*tt,ct=Et,mt=0;mt<We;++mt)if(we=bt[mt],we<ct&&++vt>me&&Ge("overflow"),we==ct){for(gt=vt,$e=Pe;He=$e<=dt?fe:$e>=dt+z?z:$e-dt,!(gt<He);$e+=Pe)_e=gt-He,Re=Pe-He,Le.push(Ne(ut(He+_e%Re,0))),gt=Te(_e/Re);Le.push(Ne(ut(gt,0))),dt=Ct(vt,tt,ht==Lt),vt=0,++ht}++vt,++ct}return Le.join("")}function St(bt){return Ke(bt,function(ct){return pe.test(ct)?Je(ct.slice(4).toLowerCase()):ct})}function wt(bt){return Ke(bt,function(ct){return xe.test(ct)?"xn--"+nt(ct):ct})}if(je={version:"1.4.1",ucs2:{decode:Xe,encode:ot},decode:Je,encode:nt,toASCII:wt,toUnicode:St},typeof ft=="function"&&typeof ft.amd=="object"&&ft.amd)ft("punycode",function(){return je});else if(Ee&&ke)if(Ue.exports==Ee)ke.exports=je;else for(Be in je)je.hasOwnProperty(Be)&&(Ee[Be]=je[Be]);else ve.punycode=je})(this)}).call(this)}).call(this,typeof jn!="undefined"?jn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(oe,Ue,Ie){"use strict";function de(Ee,ke){return Object.prototype.hasOwnProperty.call(Ee,ke)}Ue.exports=function(Ee,ke,Se,je){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;je&&typeof je.maxKeys=="number"&&(fe=je.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,Ue,Ie){"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""}};Ue.exports=function(Se,je,me,Pe){return je=je||"&",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(je):z+encodeURIComponent(de(Se[fe]))}).join(je):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,je){if(Se.map)return Se.map(je);for(var me=[],Pe=0;Pe<Se.length;Pe++)me.push(je(Se[Pe],Pe));return me}var ke=Object.keys||function(Se){var je=[];for(var me in Se)Object.prototype.hasOwnProperty.call(Se,me)&&je.push(me);return je}},{}],385:[function(oe,Ue,Ie){"use strict";Ie.decode=Ie.parse=oe("./decode"),Ie.encode=Ie.stringify=oe("./encode")},{"./decode":383,"./encode":384}],386:[function(oe,Ue,Ie){"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};Ue.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 je=ve(Se.prototype),me=0;me<je.length;me++){var Pe=je[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,Ue,Ie){"use strict";Ue.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,je){je(null,ke)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(oe,Ue,Ie){(function(de,ve){(function(){"use strict";var Ee=oe("process-nextick-args");Ue.exports=Ne;var ke=oe("isarray"),Se;Ne.ReadableState=Te;var je=oe("events").EventEmitter,me=function(we,Le){return we.listeners(Le).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"),Ae;ie.inherits(Ne,Pe);var De=["error","close","destroy","pause","resume"];function Fe(we,Le,We){if(typeof we.prependListener=="function")return we.prependListener(Le,We);!we._events||!we._events[Le]?we.on(Le,We):ke(we._events[Le])?we._events[Le].unshift(We):we._events[Le]=[We,we._events[Le]]}function Te(we,Le){Se=Se||oe("./_stream_duplex"),we=we||{};var We=Le instanceof Se;this.objectMode=!!we.objectMode,We&&(this.objectMode=this.objectMode||!!we.readableObjectMode);var tt=we.highWaterMark,Re=we.readableHighWaterMark,_e=this.objectMode?16:16*1024;tt||tt===0?this.highWaterMark=tt:We&&(Re||Re===0)?this.highWaterMark=Re: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&&(Ae||(Ae=oe("string_decoder/").StringDecoder),this.decoder=new Ae(we.encoding),this.encoding=we.encoding)}function Ne(we){if(Se=Se||oe("./_stream_duplex"),!(this instanceof Ne))return new Ne(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(Ne.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(we){this._readableState&&(this._readableState.destroyed=we)}}),Ne.prototype.destroy=xe.destroy,Ne.prototype._undestroy=xe.undestroy,Ne.prototype._destroy=function(we,Le){this.push(null),Le(we)},Ne.prototype.push=function(we,Le){var We=this._readableState,tt;return We.objectMode?tt=!0:typeof we=="string"&&(Le=Le||We.defaultEncoding,Le!==We.encoding&&(we=fe.from(we,Le),Le=""),tt=!0),Be(this,we,Le,!1,tt)},Ne.prototype.unshift=function(we){return Be(this,we,null,!0,!1)};function Be(we,Le,We,tt,Re){var _e=we._readableState;if(Le===null)_e.reading=!1,ut(we,_e);else{var Ve;Re||(Ve=Ye(_e,Le)),Ve?we.emit("error",Ve):_e.objectMode||Le&&Le.length>0?(typeof Le!="string"&&!_e.objectMode&&Object.getPrototypeOf(Le)!==fe.prototype&&(Le=te(Le)),tt?_e.endEmitted?we.emit("error",new Error("stream.unshift() after end event")):Ge(we,_e,Le,!0):_e.ended?we.emit("error",new Error("stream.push() after EOF")):(_e.reading=!1,_e.decoder&&!We?(Le=_e.decoder.write(Le),_e.objectMode||Le.length!==0?Ge(we,_e,Le,!1):nt(we,_e)):Ge(we,_e,Le,!1))):tt||(_e.reading=!1)}return Ke(_e)}function Ge(we,Le,We,tt){Le.flowing&&Le.length===0&&!Le.sync?(we.emit("data",We),we.read(0)):(Le.length+=Le.objectMode?1:We.length,tt?Le.buffer.unshift(We):Le.buffer.push(We),Le.needReadable&&Ct(we)),nt(we,Le)}function Ye(we,Le){var We;return!se(Le)&&typeof Le!="string"&&Le!==void 0&&!we.objectMode&&(We=new TypeError("Invalid non-string/buffer chunk")),We}function Ke(we){return!we.ended&&(we.needReadable||we.length<we.highWaterMark||we.length===0)}Ne.prototype.isPaused=function(){return this._readableState.flowing===!1},Ne.prototype.setEncoding=function(we){return Ae||(Ae=oe("string_decoder/").StringDecoder),this._readableState.decoder=new Ae(we),this._readableState.encoding=we,this};var Xe=8388608;function ot(we){return we>=Xe?we=Xe:(we--,we|=we>>>1,we|=we>>>2,we|=we>>>4,we|=we>>>8,we|=we>>>16,we++),we}function lt(we,Le){return we<=0||Le.length===0&&Le.ended?0:Le.objectMode?1:we!==we?Le.flowing&&Le.length?Le.buffer.head.data.length:Le.length:(we>Le.highWaterMark&&(Le.highWaterMark=ot(we)),we<=Le.length?we:Le.ended?Le.length:(Le.needReadable=!0,0))}Ne.prototype.read=function(we){ce("read",we),we=parseInt(we,10);var Le=this._readableState,We=we;if(we!==0&&(Le.emittedReadable=!1),we===0&&Le.needReadable&&(Le.length>=Le.highWaterMark||Le.ended))return ce("read: emitReadable",Le.length,Le.ended),Le.length===0&&Le.ended?gt(this):Ct(this),null;if(we=lt(we,Le),we===0&&Le.ended)return Le.length===0&&gt(this),null;var tt=Le.needReadable;ce("need readable",tt),(Le.length===0||Le.length-we<Le.highWaterMark)&&(tt=!0,ce("length less than watermark",tt)),Le.ended||Le.reading?(tt=!1,ce("reading or ended",tt)):tt&&(ce("do read"),Le.reading=!0,Le.sync=!0,Le.length===0&&(Le.needReadable=!0),this._read(Le.highWaterMark),Le.sync=!1,Le.reading||(we=lt(We,Le)));var Re;return we>0?Re=Lt(we,Le):Re=null,Re===null?(Le.needReadable=!0,we=0):Le.length-=we,Le.length===0&&(Le.ended||(Le.needReadable=!0),We!==we&&Le.ended&&gt(this)),Re!==null&&this.emit("data",Re),Re};function ut(we,Le){if(!Le.ended){if(Le.decoder){var We=Le.decoder.end();We&&We.length&&(Le.buffer.push(We),Le.length+=Le.objectMode?1:We.length)}Le.ended=!0,Ct(we)}}function Ct(we){var Le=we._readableState;Le.needReadable=!1,Le.emittedReadable||(ce("emitReadable",Le.flowing),Le.emittedReadable=!0,Le.sync?Ee.nextTick(Je,we):Je(we))}function Je(we){ce("emit readable"),we.emit("readable"),ht(we)}function nt(we,Le){Le.readingMore||(Le.readingMore=!0,Ee.nextTick(St,we,Le))}function St(we,Le){for(var We=Le.length;!Le.reading&&!Le.flowing&&!Le.ended&&Le.length<Le.highWaterMark&&(ce("maybeReadMore read 0"),we.read(0),We!==Le.length);)We=Le.length;Le.readingMore=!1}Ne.prototype._read=function(we){this.emit("error",new Error("_read() is not implemented"))},Ne.prototype.pipe=function(we,Le){var We=this,tt=this._readableState;switch(tt.pipesCount){case 0:tt.pipes=we;break;case 1:tt.pipes=[tt.pipes,we];break;default:tt.pipes.push(we);break}tt.pipesCount+=1,ce("pipe count=%d opts=%j",tt.pipesCount,Le);var Re=(!Le||Le.end!==!1)&&we!==de.stdout&&we!==de.stderr,_e=Re?it:Zt;tt.endEmitted?Ee.nextTick(_e):We.once("end",_e),we.on("unpipe",Ve);function Ve(hn,an){ce("onunpipe"),hn===We&&an&&an.hasUnpiped===!1&&(an.hasUnpiped=!0,jt())}function it(){ce("onend"),we.end()}var yt=wt(We);we.on("drain",yt);var Pt=!1;function jt(){ce("cleanup"),we.removeListener("close",en),we.removeListener("finish",qt),we.removeListener("drain",yt),we.removeListener("error",$t),we.removeListener("unpipe",Ve),We.removeListener("end",it),We.removeListener("end",Zt),We.removeListener("data",Bt),Pt=!0,tt.awaitDrain&&(!we._writableState||we._writableState.needDrain)&&yt()}var Nt=!1;We.on("data",Bt);function Bt(hn){ce("ondata"),Nt=!1;var an=we.write(hn);an===!1&&!Nt&&((tt.pipesCount===1&&tt.pipes===we||tt.pipesCount>1&&He(tt.pipes,we)!==-1)&&!Pt&&(ce("false write response, pause",We._readableState.awaitDrain),We._readableState.awaitDrain++,Nt=!0),We.pause())}function $t(hn){ce("onerror",hn),Zt(),we.removeListener("error",$t),me(we,"error")===0&&we.emit("error",hn)}Fe(we,"error",$t);function en(){we.removeListener("finish",qt),Zt()}we.once("close",en);function qt(){ce("onfinish"),we.removeListener("close",en),Zt()}we.once("finish",qt);function Zt(){ce("unpipe"),We.unpipe(we)}return we.emit("pipe",We),tt.flowing||(ce("pipe resume"),We.resume()),we};function wt(we){return function(){var Le=we._readableState;ce("pipeOnDrain",Le.awaitDrain),Le.awaitDrain&&Le.awaitDrain--,Le.awaitDrain===0&&me(we,"data")&&(Le.flowing=!0,ht(we))}}Ne.prototype.unpipe=function(we){var Le=this._readableState,We={hasUnpiped:!1};if(Le.pipesCount===0)return this;if(Le.pipesCount===1)return we&&we!==Le.pipes?this:(we||(we=Le.pipes),Le.pipes=null,Le.pipesCount=0,Le.flowing=!1,we&&we.emit("unpipe",this,We),this);if(!we){var tt=Le.pipes,Re=Le.pipesCount;Le.pipes=null,Le.pipesCount=0,Le.flowing=!1;for(var _e=0;_e<Re;_e++)tt[_e].emit("unpipe",this,We);return this}var Ve=He(Le.pipes,we);return Ve===-1?this:(Le.pipes.splice(Ve,1),Le.pipesCount-=1,Le.pipesCount===1&&(Le.pipes=Le.pipes[0]),we.emit("unpipe",this,We),this)},Ne.prototype.on=function(we,Le){var We=Pe.prototype.on.call(this,we,Le);if(we==="data")this._readableState.flowing!==!1&&this.resume();else if(we==="readable"){var tt=this._readableState;!tt.endEmitted&&!tt.readableListening&&(tt.readableListening=tt.needReadable=!0,tt.emittedReadable=!1,tt.reading?tt.length&&Ct(this):Ee.nextTick(bt,this))}return We},Ne.prototype.addListener=Ne.prototype.on;function bt(we){ce("readable nexttick read 0"),we.read(0)}Ne.prototype.resume=function(){var we=this._readableState;return we.flowing||(ce("resume"),we.flowing=!0,ct(this,we)),this};function ct(we,Le){Le.resumeScheduled||(Le.resumeScheduled=!0,Ee.nextTick(vt,we,Le))}function vt(we,Le){Le.reading||(ce("resume read 0"),we.read(0)),Le.resumeScheduled=!1,Le.awaitDrain=0,we.emit("resume"),ht(we),Le.flowing&&!Le.reading&&we.read(0)}Ne.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 ht(we){var Le=we._readableState;for(ce("flow",Le.flowing);Le.flowing&&we.read()!==null;);}Ne.prototype.wrap=function(we){var Le=this,We=this._readableState,tt=!1;we.on("end",function(){if(ce("wrapped end"),We.decoder&&!We.ended){var Ve=We.decoder.end();Ve&&Ve.length&&Le.push(Ve)}Le.push(null)}),we.on("data",function(Ve){if(ce("wrapped data"),We.decoder&&(Ve=We.decoder.write(Ve)),!(We.objectMode&&Ve==null)&&!(!We.objectMode&&(!Ve||!Ve.length))){var it=Le.push(Ve);it||(tt=!0,we.pause())}});for(var Re in we)this[Re]===void 0&&typeof we[Re]=="function"&&(this[Re]=function(Ve){return function(){return we[Ve].apply(we,arguments)}}(Re));for(var _e=0;_e<De.length;_e++)we.on(De[_e],this.emit.bind(this,De[_e]));return this._read=function(Ve){ce("wrapped _read",Ve),tt&&(tt=!1,we.resume())},this},Object.defineProperty(Ne.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Ne._fromList=Lt;function Lt(we,Le){if(Le.length===0)return null;var We;return Le.objectMode?We=Le.buffer.shift():!we||we>=Le.length?(Le.decoder?We=Le.buffer.join(""):Le.buffer.length===1?We=Le.buffer.head.data:We=Le.buffer.concat(Le.length),Le.buffer.clear()):We=dt(we,Le.buffer,Le.decoder),We}function dt(we,Le,We){var tt;return we<Le.head.data.length?(tt=Le.head.data.slice(0,we),Le.head.data=Le.head.data.slice(we)):we===Le.head.data.length?tt=Le.shift():tt=We?mt(we,Le):Et(we,Le),tt}function mt(we,Le){var We=Le.head,tt=1,Re=We.data;for(we-=Re.length;We=We.next;){var _e=We.data,Ve=we>_e.length?_e.length:we;if(Ve===_e.length?Re+=_e:Re+=_e.slice(0,we),we-=Ve,we===0){Ve===_e.length?(++tt,We.next?Le.head=We.next:Le.head=Le.tail=null):(Le.head=We,We.data=_e.slice(Ve));break}++tt}return Le.length-=tt,Re}function Et(we,Le){var We=fe.allocUnsafe(we),tt=Le.head,Re=1;for(tt.data.copy(We),we-=tt.data.length;tt=tt.next;){var _e=tt.data,Ve=we>_e.length?_e.length:we;if(_e.copy(We,We.length-we,0,Ve),we-=Ve,we===0){Ve===_e.length?(++Re,tt.next?Le.head=tt.next:Le.head=Le.tail=null):(Le.head=tt,tt.data=_e.slice(Ve));break}++Re}return Le.length-=Re,We}function gt(we){var Le=we._readableState;if(Le.length>0)throw new Error('"endReadable()" called on non-empty stream');Le.endEmitted||(Le.ended=!0,Ee.nextTick($e,Le,we))}function $e(we,Le){!we.endEmitted&&we.length===0&&(we.endEmitted=!0,Le.readable=!1,Le.emit("end"))}function He(we,Le){for(var We=0,tt=we.length;We<tt;We++)if(we[We]===Le)return We;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,Ue,Ie){"use strict";Ue.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){je(me,Pe,fe)}):je(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 je(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,Ue,Ie){(function(de,ve,Ee){(function(){"use strict";var ke=oe("process-nextick-args");Ue.exports=Fe;function Se(vt,ht,Lt){this.chunk=vt,this.encoding=ht,this.callback=Lt,this.next=null}function je(vt){var ht=this;this.next=null,this.entry=null,this.finish=function(){ct(ht,vt)}}var me=!de.browser&&["v0.10","v0.9."].indexOf(de.version.slice(0,5))>-1?Ee:ke.nextTick,Pe;Fe.WritableState=Ae;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(vt){return se.from(vt)}function ce(vt){return se.isBuffer(vt)||vt instanceof ie}var pe=oe("./internal/streams/destroy");fe.inherits(Fe,te);function xe(){}function Ae(vt,ht){Pe=Pe||oe("./_stream_duplex"),vt=vt||{};var Lt=ht instanceof Pe;this.objectMode=!!vt.objectMode,Lt&&(this.objectMode=this.objectMode||!!vt.writableObjectMode);var dt=vt.highWaterMark,mt=vt.writableHighWaterMark,Et=this.objectMode?16:16*1024;dt||dt===0?this.highWaterMark=dt:Lt&&(mt||mt===0)?this.highWaterMark=mt:this.highWaterMark=Et,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 gt=vt.decodeStrings===!1;this.decodeStrings=!gt,this.defaultEncoding=vt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function($e){ot(ht,$e)},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 je(this)}Ae.prototype.getBuffer=function(){for(var ht=this.bufferedRequest,Lt=[];ht;)Lt.push(ht),ht=ht.next;return Lt},function(){try{Object.defineProperty(Ae.prototype,"buffer",{get:z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(vt){}}();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(vt){return De.call(this,vt)?!0:this!==Fe?!1:vt&&vt._writableState instanceof Ae}})):De=function(vt){return vt instanceof this};function Fe(vt){if(Pe=Pe||oe("./_stream_duplex"),!De.call(Fe,this)&&!(this instanceof Pe))return new Fe(vt);this._writableState=new Ae(vt,this),this.writable=!0,vt&&(typeof vt.write=="function"&&(this._write=vt.write),typeof vt.writev=="function"&&(this._writev=vt.writev),typeof vt.destroy=="function"&&(this._destroy=vt.destroy),typeof vt.final=="function"&&(this._final=vt.final)),te.call(this)}Fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Te(vt,ht){var Lt=new Error("write after end");vt.emit("error",Lt),ke.nextTick(ht,Lt)}function Ne(vt,ht,Lt,dt){var mt=!0,Et=!1;return Lt===null?Et=new TypeError("May not write null values to stream"):typeof Lt!="string"&&Lt!==void 0&&!ht.objectMode&&(Et=new TypeError("Invalid non-string/buffer chunk")),Et&&(vt.emit("error",Et),ke.nextTick(dt,Et),mt=!1),mt}Fe.prototype.write=function(vt,ht,Lt){var dt=this._writableState,mt=!1,Et=!dt.objectMode&&ce(vt);return Et&&!se.isBuffer(vt)&&(vt=le(vt)),typeof ht=="function"&&(Lt=ht,ht=null),Et?ht="buffer":ht||(ht=dt.defaultEncoding),typeof Lt!="function"&&(Lt=xe),dt.ended?Te(this,Lt):(Et||Ne(this,dt,vt,Lt))&&(dt.pendingcb++,mt=Ge(this,dt,Et,vt,ht,Lt)),mt},Fe.prototype.cork=function(){var vt=this._writableState;vt.corked++},Fe.prototype.uncork=function(){var vt=this._writableState;vt.corked&&(vt.corked--,!vt.writing&&!vt.corked&&!vt.finished&&!vt.bufferProcessing&&vt.bufferedRequest&&Ct(this,vt))},Fe.prototype.setDefaultEncoding=function(ht){if(typeof ht=="string"&&(ht=ht.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ht+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ht);return this._writableState.defaultEncoding=ht,this};function Be(vt,ht,Lt){return!vt.objectMode&&vt.decodeStrings!==!1&&typeof ht=="string"&&(ht=se.from(ht,Lt)),ht}Object.defineProperty(Fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ge(vt,ht,Lt,dt,mt,Et){if(!Lt){var gt=Be(ht,dt,mt);dt!==gt&&(Lt=!0,mt="buffer",dt=gt)}var $e=ht.objectMode?1:dt.length;ht.length+=$e;var He=ht.length<ht.highWaterMark;if(He||(ht.needDrain=!0),ht.writing||ht.corked){var we=ht.lastBufferedRequest;ht.lastBufferedRequest={chunk:dt,encoding:mt,isBuf:Lt,callback:Et,next:null},we?we.next=ht.lastBufferedRequest:ht.bufferedRequest=ht.lastBufferedRequest,ht.bufferedRequestCount+=1}else Ye(vt,ht,!1,$e,dt,mt,Et);return He}function Ye(vt,ht,Lt,dt,mt,Et,gt){ht.writelen=dt,ht.writecb=gt,ht.writing=!0,ht.sync=!0,Lt?vt._writev(mt,ht.onwrite):vt._write(mt,Et,ht.onwrite),ht.sync=!1}function Ke(vt,ht,Lt,dt,mt){--ht.pendingcb,Lt?(ke.nextTick(mt,dt),ke.nextTick(wt,vt,ht),vt._writableState.errorEmitted=!0,vt.emit("error",dt)):(mt(dt),vt._writableState.errorEmitted=!0,vt.emit("error",dt),wt(vt,ht))}function Xe(vt){vt.writing=!1,vt.writecb=null,vt.length-=vt.writelen,vt.writelen=0}function ot(vt,ht){var Lt=vt._writableState,dt=Lt.sync,mt=Lt.writecb;if(Xe(Lt),ht)Ke(vt,Lt,dt,ht,mt);else{var Et=Je(Lt);!Et&&!Lt.corked&&!Lt.bufferProcessing&&Lt.bufferedRequest&&Ct(vt,Lt),dt?me(lt,vt,Lt,Et,mt):lt(vt,Lt,Et,mt)}}function lt(vt,ht,Lt,dt){Lt||ut(vt,ht),ht.pendingcb--,dt(),wt(vt,ht)}function ut(vt,ht){ht.length===0&&ht.needDrain&&(ht.needDrain=!1,vt.emit("drain"))}function Ct(vt,ht){ht.bufferProcessing=!0;var Lt=ht.bufferedRequest;if(vt._writev&&Lt&&Lt.next){var dt=ht.bufferedRequestCount,mt=new Array(dt),Et=ht.corkedRequestsFree;Et.entry=Lt;for(var gt=0,$e=!0;Lt;)mt[gt]=Lt,Lt.isBuf||($e=!1),Lt=Lt.next,gt+=1;mt.allBuffers=$e,Ye(vt,ht,!0,ht.length,mt,"",Et.finish),ht.pendingcb++,ht.lastBufferedRequest=null,Et.next?(ht.corkedRequestsFree=Et.next,Et.next=null):ht.corkedRequestsFree=new je(ht),ht.bufferedRequestCount=0}else{for(;Lt;){var He=Lt.chunk,we=Lt.encoding,Le=Lt.callback,We=ht.objectMode?1:He.length;if(Ye(vt,ht,!1,We,He,we,Le),Lt=Lt.next,ht.bufferedRequestCount--,ht.writing)break}Lt===null&&(ht.lastBufferedRequest=null)}ht.bufferedRequest=Lt,ht.bufferProcessing=!1}Fe.prototype._write=function(vt,ht,Lt){Lt(new Error("_write() is not implemented"))},Fe.prototype._writev=null,Fe.prototype.end=function(vt,ht,Lt){var dt=this._writableState;typeof vt=="function"?(Lt=vt,vt=null,ht=null):typeof ht=="function"&&(Lt=ht,ht=null),vt!=null&&this.write(vt,ht),dt.corked&&(dt.corked=1,this.uncork()),!dt.ending&&!dt.finished&&bt(this,dt,Lt)};function Je(vt){return vt.ending&&vt.length===0&&vt.bufferedRequest===null&&!vt.finished&&!vt.writing}function nt(vt,ht){vt._final(function(Lt){ht.pendingcb--,Lt&&vt.emit("error",Lt),ht.prefinished=!0,vt.emit("prefinish"),wt(vt,ht)})}function St(vt,ht){!ht.prefinished&&!ht.finalCalled&&(typeof vt._final=="function"?(ht.pendingcb++,ht.finalCalled=!0,ke.nextTick(nt,vt,ht)):(ht.prefinished=!0,vt.emit("prefinish")))}function wt(vt,ht){var Lt=Je(ht);return Lt&&(St(vt,ht),ht.pendingcb===0&&(ht.finished=!0,vt.emit("finish"))),Lt}function bt(vt,ht,Lt){ht.ending=!0,wt(vt,ht),Lt&&(ht.finished?ke.nextTick(Lt):vt.once("finish",Lt)),ht.ended=!0,vt.writable=!1}function ct(vt,ht,Lt){var dt=vt.entry;for(vt.entry=null;dt;){var mt=dt.callback;ht.pendingcb--,mt(Lt),dt=dt.next}ht.corkedRequestsFree?ht.corkedRequestsFree.next=vt:ht.corkedRequestsFree=vt}Object.defineProperty(Fe.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(vt){this._writableState&&(this._writableState.destroyed=vt)}}),Fe.prototype.destroy=pe.destroy,Fe.prototype._undestroy=pe.undestroy,Fe.prototype._destroy=function(vt,ht){this.end(),ht(vt)}}).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,Ue,Ie){"use strict";function de(Se,je){if(!(Se instanceof je))throw new TypeError("Cannot call a class as a function")}var ve=oe("safe-buffer").Buffer,Ee=oe("util");function ke(Se,je,me){Se.copy(je,me)}Ue.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&&(Ue.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,Ue,Ie){"use strict";var de=oe("process-nextick-args");function ve(Se,je){var me=this,Pe=this._readableState&&this._readableState.destroyed,fe=this._writableState&&this._writableState.destroyed;return Pe||fe?(je?je(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){!je&&z?(de.nextTick(ke,me,z),me._writableState&&(me._writableState.errorEmitted=!0)):je&&je(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,je){Se.emit("error",je)}Ue.exports={destroy:ve,undestroy:Ee}},{"process-nextick-args":380}],393:[function(oe,Ue,Ie){Ue.exports=oe("events").EventEmitter},{events:344}],394:[function(oe,Ue,Ie){Ie=Ue.exports=oe("./lib/_stream_readable.js"),Ie.Stream=Ie,Ie.Readable=Ie,Ie.Writable=oe("./lib/_stream_writable.js"),Ie.Duplex=oe("./lib/_stream_duplex.js"),Ie.Transform=oe("./lib/_stream_transform.js"),Ie.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,Ue,Ie){var de=function(ve){"use strict";var Ee=Object.prototype,ke=Ee.hasOwnProperty,Se,je=typeof Symbol=="function"?Symbol:{},me=je.iterator||"@@iterator",Pe=je.asyncIterator||"@@asyncIterator",fe=je.toStringTag||"@@toStringTag";function z(St,wt,bt){return Object.defineProperty(St,wt,{value:bt,enumerable:!0,configurable:!0,writable:!0}),St[wt]}try{z({},"")}catch(St){z=function(wt,bt,ct){return wt[bt]=ct}}function te(St,wt,bt,ct){var vt=wt&&wt.prototype instanceof Ae?wt:Ae,ht=Object.create(vt.prototype),Lt=new Ct(ct||[]);return ht._invoke=Xe(St,bt,Lt),ht}ve.wrap=te;function se(St,wt,bt){try{return{type:"normal",arg:St.call(wt,bt)}}catch(ct){return{type:"throw",arg:ct}}}var ie="suspendedStart",le="suspendedYield",ce="executing",pe="completed",xe={};function Ae(){}function De(){}function Fe(){}var Te={};z(Te,me,function(){return this});var Ne=Object.getPrototypeOf,Be=Ne&&Ne(Ne(Je([])));Be&&Be!==Ee&&ke.call(Be,me)&&(Te=Be);var Ge=Fe.prototype=Ae.prototype=Object.create(Te);De.prototype=Fe,z(Ge,"constructor",Fe),z(Fe,"constructor",De),De.displayName=z(Fe,fe,"GeneratorFunction");function Ye(St){["next","throw","return"].forEach(function(wt){z(St,wt,function(bt){return this._invoke(wt,bt)})})}ve.isGeneratorFunction=function(St){var wt=typeof St=="function"&&St.constructor;return wt?wt===De||(wt.displayName||wt.name)==="GeneratorFunction":!1},ve.mark=function(St){return Object.setPrototypeOf?Object.setPrototypeOf(St,Fe):(St.__proto__=Fe,z(St,fe,"GeneratorFunction")),St.prototype=Object.create(Ge),St},ve.awrap=function(St){return{__await:St}};function Ke(St,wt){function bt(ht,Lt,dt,mt){var Et=se(St[ht],St,Lt);if(Et.type==="throw")mt(Et.arg);else{var gt=Et.arg,$e=gt.value;return $e&&typeof $e=="object"&&ke.call($e,"__await")?wt.resolve($e.__await).then(function(He){bt("next",He,dt,mt)},function(He){bt("throw",He,dt,mt)}):wt.resolve($e).then(function(He){gt.value=He,dt(gt)},function(He){return bt("throw",He,dt,mt)})}}var ct;function vt(ht,Lt){function dt(){return new wt(function(mt,Et){bt(ht,Lt,mt,Et)})}return ct=ct?ct.then(dt,dt):dt()}this._invoke=vt}Ye(Ke.prototype),z(Ke.prototype,Pe,function(){return this}),ve.AsyncIterator=Ke,ve.async=function(St,wt,bt,ct,vt){vt===void 0&&(vt=Promise);var ht=new Ke(te(St,wt,bt,ct),vt);return ve.isGeneratorFunction(wt)?ht:ht.next().then(function(Lt){return Lt.done?Lt.value:ht.next()})};function Xe(St,wt,bt){var ct=ie;return function(ht,Lt){if(ct===ce)throw new Error("Generator is already running");if(ct===pe){if(ht==="throw")throw Lt;return nt()}for(bt.method=ht,bt.arg=Lt;;){var dt=bt.delegate;if(dt){var mt=ot(dt,bt);if(mt){if(mt===xe)continue;return mt}}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 Et=se(St,wt,bt);if(Et.type==="normal"){if(ct=bt.done?pe:le,Et.arg===xe)continue;return{value:Et.arg,done:bt.done}}else Et.type==="throw"&&(ct=pe,bt.method="throw",bt.arg=Et.arg)}}}function ot(St,wt){var bt=St.iterator[wt.method];if(bt===Se){if(wt.delegate=null,wt.method==="throw"){if(St.iterator.return&&(wt.method="return",wt.arg=Se,ot(St,wt),wt.method==="throw"))return xe;wt.method="throw",wt.arg=new TypeError("The iterator does not provide a 'throw' method")}return xe}var ct=se(bt,St.iterator,wt.arg);if(ct.type==="throw")return wt.method="throw",wt.arg=ct.arg,wt.delegate=null,xe;var vt=ct.arg;if(!vt)return wt.method="throw",wt.arg=new TypeError("iterator result is not an object"),wt.delegate=null,xe;if(vt.done)wt[St.resultName]=vt.value,wt.next=St.nextLoc,wt.method!=="return"&&(wt.method="next",wt.arg=Se);else return vt;return wt.delegate=null,xe}Ye(Ge),z(Ge,fe,"Generator"),z(Ge,me,function(){return this}),z(Ge,"toString",function(){return"[object Generator]"});function lt(St){var wt={tryLoc:St[0]};1 in St&&(wt.catchLoc=St[1]),2 in St&&(wt.finallyLoc=St[2],wt.afterLoc=St[3]),this.tryEntries.push(wt)}function ut(St){var wt=St.completion||{};wt.type="normal",delete wt.arg,St.completion=wt}function Ct(St){this.tryEntries=[{tryLoc:"root"}],St.forEach(lt,this),this.reset(!0)}ve.keys=function(St){var wt=[];for(var bt in St)wt.push(bt);return wt.reverse(),function ct(){for(;wt.length;){var vt=wt.pop();if(vt in St)return ct.value=vt,ct.done=!1,ct}return ct.done=!0,ct}};function Je(St){if(St){var wt=St[me];if(wt)return wt.call(St);if(typeof St.next=="function")return St;if(!isNaN(St.length)){var bt=-1,ct=function vt(){for(;++bt<St.length;)if(ke.call(St,bt))return vt.value=St[bt],vt.done=!1,vt;return vt.value=Se,vt.done=!0,vt};return ct.next=ct}}return{next:nt}}ve.values=Je;function nt(){return{value:Se,done:!0}}return Ct.prototype={constructor:Ct,reset:function(St){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(ut),!St)for(var wt in this)wt.charAt(0)==="t"&&ke.call(this,wt)&&!isNaN(+wt.slice(1))&&(this[wt]=Se)},stop:function(){this.done=!0;var St=this.tryEntries[0],wt=St.completion;if(wt.type==="throw")throw wt.arg;return this.rval},dispatchException:function(St){if(this.done)throw St;var wt=this;function bt(mt,Et){return ht.type="throw",ht.arg=St,wt.next=mt,Et&&(wt.method="next",wt.arg=Se),!!Et}for(var ct=this.tryEntries.length-1;ct>=0;--ct){var vt=this.tryEntries[ct],ht=vt.completion;if(vt.tryLoc==="root")return bt("end");if(vt.tryLoc<=this.prev){var Lt=ke.call(vt,"catchLoc"),dt=ke.call(vt,"finallyLoc");if(Lt&&dt){if(this.prev<vt.catchLoc)return bt(vt.catchLoc,!0);if(this.prev<vt.finallyLoc)return bt(vt.finallyLoc)}else if(Lt){if(this.prev<vt.catchLoc)return bt(vt.catchLoc,!0)}else if(dt){if(this.prev<vt.finallyLoc)return bt(vt.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(St,wt){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 vt=ct;break}}vt&&(St==="break"||St==="continue")&&vt.tryLoc<=wt&&wt<=vt.finallyLoc&&(vt=null);var ht=vt?vt.completion:{};return ht.type=St,ht.arg=wt,vt?(this.method="next",this.next=vt.finallyLoc,xe):this.complete(ht)},complete:function(St,wt){if(St.type==="throw")throw St.arg;return St.type==="break"||St.type==="continue"?this.next=St.arg:St.type==="return"?(this.rval=this.arg=St.arg,this.method="return",this.next="end"):St.type==="normal"&&wt&&(this.next=wt),xe},finish:function(St){for(var wt=this.tryEntries.length-1;wt>=0;--wt){var bt=this.tryEntries[wt];if(bt.finallyLoc===St)return this.complete(bt.completion,bt.afterLoc),ut(bt),xe}},catch:function(St){for(var wt=this.tryEntries.length-1;wt>=0;--wt){var bt=this.tryEntries[wt];if(bt.tryLoc===St){var ct=bt.completion;if(ct.type==="throw"){var vt=ct.arg;ut(bt)}return vt}}throw new Error("illegal catch attempt")},delegateYield:function(St,wt,bt){return this.delegate={iterator:Je(St),resultName:wt,nextLoc:bt},this.method==="next"&&(this.arg=Se),xe}},ve}(typeof Ue=="object"?Ue.exports:{});try{regeneratorRuntime=de}catch(ve){typeof globalThis=="object"?globalThis.regeneratorRuntime=de:Function("r","regeneratorRuntime = r")(de)}},{}],396:[function(oe,Ue,Ie){var de=oe("buffer"),ve=de.Buffer;function Ee(Se,je){for(var me in Se)je[me]=Se[me]}ve.from&&ve.alloc&&ve.allocUnsafe&&ve.allocUnsafeSlow?Ue.exports=de:(Ee(de,Ie),Ie.Buffer=ke);function ke(Se,je,me){return ve(Se,je,me)}Ee(ve,ke),ke.from=function(Se,je,me){if(typeof Se=="number")throw new TypeError("Argument must not be a number");return ve(Se,je,me)},ke.alloc=function(Se,je,me){if(typeof Se!="number")throw new TypeError("Argument must be a number");var Pe=ve(Se);return je!==void 0?typeof me=="string"?Pe.fill(je,me):Pe.fill(je):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,Ue,Ie){(function(de){(function(){(function(ve){ve.parser=function(gt,$e){return new ke(gt,$e)},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(gt,$e){if(!(this instanceof ke))return new ke(gt,$e);var He=this;je(He),He.q=He.c="",He.bufferCheckPosition=ve.MAX_BUFFER_LENGTH,He.opt=$e||{},He.opt.lowercase=He.opt.lowercase||He.opt.lowercasetags,He.looseCase=He.opt.lowercase?"toLowerCase":"toUpperCase",He.tags=[],He.closed=He.closedRoot=He.sawRoot=!1,He.tag=He.error=null,He.strict=!!gt,He.noscript=!!(gt||He.opt.noscript),He.state=Ke.BEGIN,He.strictEntities=He.opt.strictEntities,He.ENTITIES=He.strictEntities?Object.create(ve.XML_ENTITIES):Object.create(ve.ENTITIES),He.attribList=[],He.opt.xmlns&&(He.ns=Object.create(pe)),He.trackPosition=He.opt.position!==!1,He.trackPosition&&(He.position=He.line=He.column=0),ot(He,"onready")}Object.create||(Object.create=function(gt){function $e(){}$e.prototype=gt;var He=new $e;return He}),Object.keys||(Object.keys=function(gt){var $e=[];for(var He in gt)gt.hasOwnProperty(He)&&$e.push(He);return $e});function Se(gt){for(var $e=Math.max(ve.MAX_BUFFER_LENGTH,10),He=0,we=0,Le=Ee.length;we<Le;we++){var We=gt[Ee[we]].length;if(We>$e)switch(Ee[we]){case"textNode":ut(gt);break;case"cdata":lt(gt,"oncdata",gt.cdata),gt.cdata="";break;case"script":lt(gt,"onscript",gt.script),gt.script="";break;default:Je(gt,"Max buffer length exceeded: "+Ee[we])}He=Math.max(He,We)}var tt=ve.MAX_BUFFER_LENGTH-He;gt.bufferCheckPosition=tt+gt.position}function je(gt){for(var $e=0,He=Ee.length;$e<He;$e++)gt[Ee[$e]]=""}function me(gt){ut(gt),gt.cdata!==""&&(lt(gt,"oncdata",gt.cdata),gt.cdata=""),gt.script!==""&&(lt(gt,"onscript",gt.script),gt.script="")}ke.prototype={end:function(){nt(this)},write:Et,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(gt){Pe=function(){}}var fe=ve.EVENTS.filter(function(gt){return gt!=="error"&&gt!=="end"});function z(gt,$e){return new te(gt,$e)}function te(gt,$e){if(!(this instanceof te))return new te(gt,$e);Pe.apply(this),this._parser=new ke(gt,$e),this.writable=!0,this.readable=!0;var He=this;this._parser.onend=function(){He.emit("end")},this._parser.onerror=function(we){He.emit("error",we),He._parser.error=null},this._decoder=null,fe.forEach(function(we){Object.defineProperty(He,"on"+we,{get:function(){return He._parser["on"+we]},set:function(Le){if(!Le)return He.removeAllListeners(we),He._parser["on"+we]=Le,Le;He.on(we,Le)},enumerable:!0,configurable:!1})})}te.prototype=Object.create(Pe.prototype,{constructor:{value:te}}),te.prototype.write=function(gt){if(typeof de=="function"&&typeof de.isBuffer=="function"&&de.isBuffer(gt)){if(!this._decoder){var $e=oe("string_decoder").StringDecoder;this._decoder=new $e("utf8")}gt=this._decoder.write(gt)}return this._parser.write(gt.toString()),this.emit("data",gt),!0},te.prototype.end=function(gt){return gt&&gt.length&&this.write(gt),this._parser.end(),!0},te.prototype.on=function(gt,$e){var He=this;return!He._parser["on"+gt]&&fe.indexOf(gt)!==-1&&(He._parser["on"+gt]=function(){var we=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);we.splice(0,0,gt),He.emit.apply(He,we)}),Pe.prototype.on.call(He,gt,$e)};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]/,Ae=/[:_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(gt){return gt===" "||gt===`
`||gt==="\r"||gt===" "}function Ne(gt){return gt==='"'||gt==="'"}function Be(gt){return gt===">"||Te(gt)}function Ge(gt,$e){return gt.test($e)}function Ye(gt,$e){return!Ge(gt,$e)}var Ke=0;ve.STATE={BEGIN:Ke++,BEGIN_WHITESPACE:Ke++,TEXT:Ke++,TEXT_ENTITY:Ke++,OPEN_WAKA:Ke++,SGML_DECL:Ke++,SGML_DECL_QUOTED:Ke++,DOCTYPE:Ke++,DOCTYPE_QUOTED:Ke++,DOCTYPE_DTD:Ke++,DOCTYPE_DTD_QUOTED:Ke++,COMMENT_STARTING:Ke++,COMMENT:Ke++,COMMENT_ENDING:Ke++,COMMENT_ENDED:Ke++,CDATA:Ke++,CDATA_ENDING:Ke++,CDATA_ENDING_2:Ke++,PROC_INST:Ke++,PROC_INST_BODY:Ke++,PROC_INST_ENDING:Ke++,OPEN_TAG:Ke++,OPEN_TAG_SLASH:Ke++,ATTRIB:Ke++,ATTRIB_NAME:Ke++,ATTRIB_NAME_SAW_WHITE:Ke++,ATTRIB_VALUE:Ke++,ATTRIB_VALUE_QUOTED:Ke++,ATTRIB_VALUE_CLOSED:Ke++,ATTRIB_VALUE_UNQUOTED:Ke++,ATTRIB_VALUE_ENTITY_Q:Ke++,ATTRIB_VALUE_ENTITY_U:Ke++,CLOSE_TAG:Ke++,CLOSE_TAG_SAW_WHITE:Ke++,SCRIPT:Ke++,SCRIPT_ENDING:Ke++},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(gt){var $e=ve.ENTITIES[gt],He=typeof $e=="number"?String.fromCharCode($e):$e;ve.ENTITIES[gt]=He});for(var Xe in ve.STATE)ve.STATE[ve.STATE[Xe]]=Xe;Ke=ve.STATE;function ot(gt,$e,He){gt[$e]&&gt[$e](He)}function lt(gt,$e,He){gt.textNode&&ut(gt),ot(gt,$e,He)}function ut(gt){gt.textNode=Ct(gt.opt,gt.textNode),gt.textNode&&ot(gt,"ontext",gt.textNode),gt.textNode=""}function Ct(gt,$e){return gt.trim&&($e=$e.trim()),gt.normalize&&($e=$e.replace(/\s+/g," ")),$e}function Je(gt,$e){return ut(gt),gt.trackPosition&&($e+=`
Line: `+gt.line+`
Column: `+gt.column+`
Char: `+gt.c),$e=new Error($e),gt.error=$e,ot(gt,"onerror",$e),gt}function nt(gt){return gt.sawRoot&&!gt.closedRoot&&St(gt,"Unclosed root tag"),gt.state!==Ke.BEGIN&&gt.state!==Ke.BEGIN_WHITESPACE&&gt.state!==Ke.TEXT&&Je(gt,"Unexpected end"),ut(gt),gt.c="",gt.closed=!0,ot(gt,"onend"),ke.call(gt,gt.strict,gt.opt),gt}function St(gt,$e){if(typeof gt!="object"||!(gt instanceof ke))throw new Error("bad call to strictFail");gt.strict&&Je(gt,$e)}function wt(gt){gt.strict||(gt.tagName=gt.tagName[gt.looseCase]());var $e=gt.tags[gt.tags.length-1]||gt,He=gt.tag={name:gt.tagName,attributes:{}};gt.opt.xmlns&&(He.ns=$e.ns),gt.attribList.length=0,lt(gt,"onopentagstart",He)}function bt(gt,$e){var He=gt.indexOf(":"),we=He<0?["",gt]:gt.split(":"),Le=we[0],We=we[1];return $e&&gt==="xmlns"&&(Le="xmlns",We=""),{prefix:Le,local:We}}function ct(gt){if(gt.strict||(gt.attribName=gt.attribName[gt.looseCase]()),gt.attribList.indexOf(gt.attribName)!==-1||gt.tag.attributes.hasOwnProperty(gt.attribName)){gt.attribName=gt.attribValue="";return}if(gt.opt.xmlns){var $e=bt(gt.attribName,!0),He=$e.prefix,we=$e.local;if(He==="xmlns")if(we==="xml"&&gt.attribValue!==le)St(gt,"xml: prefix must be bound to "+le+`
Actual: `+gt.attribValue);else if(we==="xmlns"&&gt.attribValue!==ce)St(gt,"xmlns: prefix must be bound to "+ce+`
Actual: `+gt.attribValue);else{var Le=gt.tag,We=gt.tags[gt.tags.length-1]||gt;Le.ns===We.ns&&(Le.ns=Object.create(We.ns)),Le.ns[we]=gt.attribValue}gt.attribList.push([gt.attribName,gt.attribValue])}else gt.tag.attributes[gt.attribName]=gt.attribValue,lt(gt,"onattribute",{name:gt.attribName,value:gt.attribValue});gt.attribName=gt.attribValue=""}function vt(gt,$e){if(gt.opt.xmlns){var He=gt.tag,we=bt(gt.tagName);He.prefix=we.prefix,He.local=we.local,He.uri=He.ns[we.prefix]||"",He.prefix&&!He.uri&&(St(gt,"Unbound namespace prefix: "+JSON.stringify(gt.tagName)),He.uri=we.prefix);var Le=gt.tags[gt.tags.length-1]||gt;He.ns&&Le.ns!==He.ns&&Object.keys(He.ns).forEach(function(Bt){lt(gt,"onopennamespace",{prefix:Bt,uri:He.ns[Bt]})});for(var We=0,tt=gt.attribList.length;We<tt;We++){var Re=gt.attribList[We],_e=Re[0],Ve=Re[1],it=bt(_e,!0),yt=it.prefix,Pt=it.local,jt=yt===""?"":He.ns[yt]||"",Nt={name:_e,value:Ve,prefix:yt,local:Pt,uri:jt};yt&&yt!=="xmlns"&&!jt&&(St(gt,"Unbound namespace prefix: "+JSON.stringify(yt)),Nt.uri=yt),gt.tag.attributes[_e]=Nt,lt(gt,"onattribute",Nt)}gt.attribList.length=0}gt.tag.isSelfClosing=!!$e,gt.sawRoot=!0,gt.tags.push(gt.tag),lt(gt,"onopentag",gt.tag),$e||(!gt.noscript&&gt.tagName.toLowerCase()==="script"?gt.state=Ke.SCRIPT:gt.state=Ke.TEXT,gt.tag=null,gt.tagName=""),gt.attribName=gt.attribValue="",gt.attribList.length=0}function ht(gt){if(!gt.tagName){St(gt,"Weird empty close tag."),gt.textNode+="</>",gt.state=Ke.TEXT;return}if(gt.script){if(gt.tagName!=="script"){gt.script+="</"+gt.tagName+">",gt.tagName="",gt.state=Ke.SCRIPT;return}lt(gt,"onscript",gt.script),gt.script=""}var $e=gt.tags.length,He=gt.tagName;gt.strict||(He=He[gt.looseCase]());for(var we=He;$e--;){var Le=gt.tags[$e];if(Le.name!==we)St(gt,"Unexpected close tag");else break}if($e<0){St(gt,"Unmatched closing tag: "+gt.tagName),gt.textNode+="</"+gt.tagName+">",gt.state=Ke.TEXT;return}gt.tagName=He;for(var We=gt.tags.length;We-- >$e;){var tt=gt.tag=gt.tags.pop();gt.tagName=gt.tag.name,lt(gt,"onclosetag",gt.tagName);var Re={};for(var _e in tt.ns)Re[_e]=tt.ns[_e];var Ve=gt.tags[gt.tags.length-1]||gt;gt.opt.xmlns&&tt.ns!==Ve.ns&&Object.keys(tt.ns).forEach(function(it){var yt=tt.ns[it];lt(gt,"onclosenamespace",{prefix:it,uri:yt})})}$e===0&&(gt.closedRoot=!0),gt.tagName=gt.attribValue=gt.attribName="",gt.attribList.length=0,gt.state=Ke.TEXT}function Lt(gt){var $e=gt.entity,He=$e.toLowerCase(),we,Le="";return gt.ENTITIES[$e]?gt.ENTITIES[$e]:gt.ENTITIES[He]?gt.ENTITIES[He]:($e=He,$e.charAt(0)==="#"&&($e.charAt(1)==="x"?($e=$e.slice(2),we=parseInt($e,16),Le=we.toString(16)):($e=$e.slice(1),we=parseInt($e,10),Le=we.toString(10))),$e=$e.replace(/^0+/,""),isNaN(we)||Le.toLowerCase()!==$e?(St(gt,"Invalid character entity"),"&"+gt.entity+";"):String.fromCodePoint(we))}function dt(gt,$e){$e==="<"?(gt.state=Ke.OPEN_WAKA,gt.startTagPosition=gt.position):Te($e)||(St(gt,"Non-whitespace before first tag."),gt.textNode=$e,gt.state=Ke.TEXT)}function mt(gt,$e){var He="";return $e<gt.length&&(He=gt.charAt($e)),He}function Et(gt){var $e=this;if(this.error)throw this.error;if($e.closed)return Je($e,"Cannot write after close. Assign an onready handler.");if(gt===null)return nt($e);typeof gt=="object"&&(gt=gt.toString());for(var He=0,we="";we=mt(gt,He++),$e.c=we,!!we;)switch($e.trackPosition&&($e.position++,we===`
`?($e.line++,$e.column=0):$e.column++),$e.state){case Ke.BEGIN:if($e.state=Ke.BEGIN_WHITESPACE,we==="\uFEFF")continue;dt($e,we);continue;case Ke.BEGIN_WHITESPACE:dt($e,we);continue;case Ke.TEXT:if($e.sawRoot&&!$e.closedRoot){for(var Le=He-1;we&&we!=="<"&&we!=="&";)we=mt(gt,He++),we&&$e.trackPosition&&($e.position++,we===`
`?($e.line++,$e.column=0):$e.column++);$e.textNode+=gt.substring(Le,He-1)}we==="<"&&!($e.sawRoot&&$e.closedRoot&&!$e.strict)?($e.state=Ke.OPEN_WAKA,$e.startTagPosition=$e.position):(!Te(we)&&(!$e.sawRoot||$e.closedRoot)&&St($e,"Text data outside of root node."),we==="&"?$e.state=Ke.TEXT_ENTITY:$e.textNode+=we);continue;case Ke.SCRIPT:we==="<"?$e.state=Ke.SCRIPT_ENDING:$e.script+=we;continue;case Ke.SCRIPT_ENDING:we==="/"?$e.state=Ke.CLOSE_TAG:($e.script+="<"+we,$e.state=Ke.SCRIPT);continue;case Ke.OPEN_WAKA:if(we==="!")$e.state=Ke.SGML_DECL,$e.sgmlDecl="";else if(!Te(we))if(Ge(xe,we))$e.state=Ke.OPEN_TAG,$e.tagName=we;else if(we==="/")$e.state=Ke.CLOSE_TAG,$e.tagName="";else if(we==="?")$e.state=Ke.PROC_INST,$e.procInstName=$e.procInstBody="";else{if(St($e,"Unencoded <"),$e.startTagPosition+1<$e.position){var We=$e.position-$e.startTagPosition;we=new Array(We).join(" ")+we}$e.textNode+="<"+we,$e.state=Ke.TEXT}continue;case Ke.SGML_DECL:($e.sgmlDecl+we).toUpperCase()===se?(lt($e,"onopencdata"),$e.state=Ke.CDATA,$e.sgmlDecl="",$e.cdata=""):$e.sgmlDecl+we==="--"?($e.state=Ke.COMMENT,$e.comment="",$e.sgmlDecl=""):($e.sgmlDecl+we).toUpperCase()===ie?($e.state=Ke.DOCTYPE,($e.doctype||$e.sawRoot)&&St($e,"Inappropriately located doctype declaration"),$e.doctype="",$e.sgmlDecl=""):we===">"?(lt($e,"onsgmldeclaration",$e.sgmlDecl),$e.sgmlDecl="",$e.state=Ke.TEXT):(Ne(we)&&($e.state=Ke.SGML_DECL_QUOTED),$e.sgmlDecl+=we);continue;case Ke.SGML_DECL_QUOTED:we===$e.q&&($e.state=Ke.SGML_DECL,$e.q=""),$e.sgmlDecl+=we;continue;case Ke.DOCTYPE:we===">"?($e.state=Ke.TEXT,lt($e,"ondoctype",$e.doctype),$e.doctype=!0):($e.doctype+=we,we==="["?$e.state=Ke.DOCTYPE_DTD:Ne(we)&&($e.state=Ke.DOCTYPE_QUOTED,$e.q=we));continue;case Ke.DOCTYPE_QUOTED:$e.doctype+=we,we===$e.q&&($e.q="",$e.state=Ke.DOCTYPE);continue;case Ke.DOCTYPE_DTD:$e.doctype+=we,we==="]"?$e.state=Ke.DOCTYPE:Ne(we)&&($e.state=Ke.DOCTYPE_DTD_QUOTED,$e.q=we);continue;case Ke.DOCTYPE_DTD_QUOTED:$e.doctype+=we,we===$e.q&&($e.state=Ke.DOCTYPE_DTD,$e.q="");continue;case Ke.COMMENT:we==="-"?$e.state=Ke.COMMENT_ENDING:$e.comment+=we;continue;case Ke.COMMENT_ENDING:we==="-"?($e.state=Ke.COMMENT_ENDED,$e.comment=Ct($e.opt,$e.comment),$e.comment&&lt($e,"oncomment",$e.comment),$e.comment=""):($e.comment+="-"+we,$e.state=Ke.COMMENT);continue;case Ke.COMMENT_ENDED:we!==">"?(St($e,"Malformed comment"),$e.comment+="--"+we,$e.state=Ke.COMMENT):$e.state=Ke.TEXT;continue;case Ke.CDATA:we==="]"?$e.state=Ke.CDATA_ENDING:$e.cdata+=we;continue;case Ke.CDATA_ENDING:we==="]"?$e.state=Ke.CDATA_ENDING_2:($e.cdata+="]"+we,$e.state=Ke.CDATA);continue;case Ke.CDATA_ENDING_2:we===">"?($e.cdata&&lt($e,"oncdata",$e.cdata),lt($e,"onclosecdata"),$e.cdata="",$e.state=Ke.TEXT):we==="]"?$e.cdata+="]":($e.cdata+="]]"+we,$e.state=Ke.CDATA);continue;case Ke.PROC_INST:we==="?"?$e.state=Ke.PROC_INST_ENDING:Te(we)?$e.state=Ke.PROC_INST_BODY:$e.procInstName+=we;continue;case Ke.PROC_INST_BODY:if(!$e.procInstBody&&Te(we))continue;we==="?"?$e.state=Ke.PROC_INST_ENDING:$e.procInstBody+=we;continue;case Ke.PROC_INST_ENDING:we===">"?(lt($e,"onprocessinginstruction",{name:$e.procInstName,body:$e.procInstBody}),$e.procInstName=$e.procInstBody="",$e.state=Ke.TEXT):($e.procInstBody+="?"+we,$e.state=Ke.PROC_INST_BODY);continue;case Ke.OPEN_TAG:Ge(Ae,we)?$e.tagName+=we:(wt($e),we===">"?vt($e):we==="/"?$e.state=Ke.OPEN_TAG_SLASH:(Te(we)||St($e,"Invalid character in tag name"),$e.state=Ke.ATTRIB));continue;case Ke.OPEN_TAG_SLASH:we===">"?(vt($e,!0),ht($e)):(St($e,"Forward-slash in opening tag not followed by >"),$e.state=Ke.ATTRIB);continue;case Ke.ATTRIB:if(Te(we))continue;we===">"?vt($e):we==="/"?$e.state=Ke.OPEN_TAG_SLASH:Ge(xe,we)?($e.attribName=we,$e.attribValue="",$e.state=Ke.ATTRIB_NAME):St($e,"Invalid attribute name");continue;case Ke.ATTRIB_NAME:we==="="?$e.state=Ke.ATTRIB_VALUE:we===">"?(St($e,"Attribute without value"),$e.attribValue=$e.attribName,ct($e),vt($e)):Te(we)?$e.state=Ke.ATTRIB_NAME_SAW_WHITE:Ge(Ae,we)?$e.attribName+=we:St($e,"Invalid attribute name");continue;case Ke.ATTRIB_NAME_SAW_WHITE:if(we==="=")$e.state=Ke.ATTRIB_VALUE;else{if(Te(we))continue;St($e,"Attribute without value"),$e.tag.attributes[$e.attribName]="",$e.attribValue="",lt($e,"onattribute",{name:$e.attribName,value:""}),$e.attribName="",we===">"?vt($e):Ge(xe,we)?($e.attribName=we,$e.state=Ke.ATTRIB_NAME):(St($e,"Invalid attribute name"),$e.state=Ke.ATTRIB)}continue;case Ke.ATTRIB_VALUE:if(Te(we))continue;Ne(we)?($e.q=we,$e.state=Ke.ATTRIB_VALUE_QUOTED):(St($e,"Unquoted attribute value"),$e.state=Ke.ATTRIB_VALUE_UNQUOTED,$e.attribValue=we);continue;case Ke.ATTRIB_VALUE_QUOTED:if(we!==$e.q){we==="&"?$e.state=Ke.ATTRIB_VALUE_ENTITY_Q:$e.attribValue+=we;continue}ct($e),$e.q="",$e.state=Ke.ATTRIB_VALUE_CLOSED;continue;case Ke.ATTRIB_VALUE_CLOSED:Te(we)?$e.state=Ke.ATTRIB:we===">"?vt($e):we==="/"?$e.state=Ke.OPEN_TAG_SLASH:Ge(xe,we)?(St($e,"No whitespace between attributes"),$e.attribName=we,$e.attribValue="",$e.state=Ke.ATTRIB_NAME):St($e,"Invalid attribute name");continue;case Ke.ATTRIB_VALUE_UNQUOTED:if(!Be(we)){we==="&"?$e.state=Ke.ATTRIB_VALUE_ENTITY_U:$e.attribValue+=we;continue}ct($e),we===">"?vt($e):$e.state=Ke.ATTRIB;continue;case Ke.CLOSE_TAG:if($e.tagName)we===">"?ht($e):Ge(Ae,we)?$e.tagName+=we:$e.script?($e.script+="</"+$e.tagName,$e.tagName="",$e.state=Ke.SCRIPT):(Te(we)||St($e,"Invalid tagname in closing tag"),$e.state=Ke.CLOSE_TAG_SAW_WHITE);else{if(Te(we))continue;Ye(xe,we)?$e.script?($e.script+="</"+we,$e.state=Ke.SCRIPT):St($e,"Invalid tagname in closing tag."):$e.tagName=we}continue;case Ke.CLOSE_TAG_SAW_WHITE:if(Te(we))continue;we===">"?ht($e):St($e,"Invalid characters in closing tag");continue;case Ke.TEXT_ENTITY:case Ke.ATTRIB_VALUE_ENTITY_Q:case Ke.ATTRIB_VALUE_ENTITY_U:var tt,Re;switch($e.state){case Ke.TEXT_ENTITY:tt=Ke.TEXT,Re="textNode";break;case Ke.ATTRIB_VALUE_ENTITY_Q:tt=Ke.ATTRIB_VALUE_QUOTED,Re="attribValue";break;case Ke.ATTRIB_VALUE_ENTITY_U:tt=Ke.ATTRIB_VALUE_UNQUOTED,Re="attribValue";break}we===";"?($e[Re]+=Lt($e),$e.entity="",$e.state=tt):Ge($e.entity.length?Fe:De,we)?$e.entity+=we:(St($e,"Invalid character in entity name"),$e[Re]+="&"+$e.entity+we,$e.entity="",$e.state=tt);continue;default:throw new Error($e,"Unknown state: "+$e.state)}return $e.position>=$e.bufferCheckPosition&&Se($e),$e}String.fromCodePoint||function(){var gt=String.fromCharCode,$e=Math.floor,He=function(){var we=16384,Le=[],We,tt,Re=-1,_e=arguments.length;if(!_e)return"";for(var Ve="";++Re<_e;){var it=Number(arguments[Re]);if(!isFinite(it)||it<0||it>1114111||$e(it)!==it)throw RangeError("Invalid code point: "+it);it<=65535?Le.push(it):(it-=65536,We=(it>>10)+55296,tt=it%1024+56320,Le.push(We,tt)),(Re+1===_e||Le.length>we)&&(Ve+=gt.apply(null,Le),Le.length=0)}return Ve};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:He,configurable:!0,writable:!0}):String.fromCodePoint=He}()})(typeof Ie=="undefined"?this.sax={}:Ie)}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(oe,Ue,Ie){Ue.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 je=this;function me(le){ke.writable&&ke.write(le)===!1&&je.pause&&je.pause()}je.on("data",me);function Pe(){je.readable&&je.resume&&je.resume()}ke.on("drain",Pe),!ke._isStdio&&(!Se||Se.end!==!1)&&(je.on("end",z),je.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}je.on("error",se),ke.on("error",se);function ie(){je.removeListener("data",me),ke.removeListener("drain",Pe),je.removeListener("end",z),je.removeListener("close",te),je.removeListener("error",se),ke.removeListener("error",se),je.removeListener("end",ie),je.removeListener("close",ie),ke.removeListener("close",ie)}return je.on("end",ie),je.on("close",ie),ke.on("close",ie),ke.emit("pipe",je),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,Ue,Ie){"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 je(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(je(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"),Ue.exports.codes=ve},{}],400:[function(oe,Ue,Ie){(function(de){(function(){"use strict";var ve=Object.keys||function(te){var se=[];for(var ie in te)se.push(ie);return se};Ue.exports=Pe;var Ee=oe("./_stream_readable"),ke=oe("./_stream_writable");oe("inherits")(Pe,Ee);for(var Se=ve(ke.prototype),je=0;je<Se.length;je++){var me=Se[je];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,Ue,Ie){"use strict";Ue.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,Ue,Ie){(function(de,ve){(function(){"use strict";Ue.exports=lt;var Ee;lt.ReadableState=ot;var ke=oe("events").EventEmitter,Se=function(_e,Ve){return _e.listeners(Ve).length},je=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(Re){return me.from(Re)}function z(Re){return me.isBuffer(Re)||Re 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,Ae=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,Ne,Be,Ge;oe("inherits")(lt,je);var Ye=le.errorOrDestroy,Ke=["error","close","destroy","pause","resume"];function Xe(Re,_e,Ve){if(typeof Re.prependListener=="function")return Re.prependListener(_e,Ve);!Re._events||!Re._events[_e]?Re.on(_e,Ve):Array.isArray(Re._events[_e])?Re._events[_e].unshift(Ve):Re._events[_e]=[Ve,Re._events[_e]]}function ot(Re,_e,Ve){Ee=Ee||oe("./_stream_duplex"),Re=Re||{},typeof Ve!="boolean"&&(Ve=_e instanceof Ee),this.objectMode=!!Re.objectMode,Ve&&(this.objectMode=this.objectMode||!!Re.readableObjectMode),this.highWaterMark=pe(this,Re,"readableHighWaterMark",Ve),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=Re.emitClose!==!1,this.autoDestroy=!!Re.autoDestroy,this.destroyed=!1,this.defaultEncoding=Re.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Re.encoding&&(Ne||(Ne=oe("string_decoder/").StringDecoder),this.decoder=new Ne(Re.encoding),this.encoding=Re.encoding)}function lt(Re){if(Ee=Ee||oe("./_stream_duplex"),!(this instanceof lt))return new lt(Re);var _e=this instanceof Ee;this._readableState=new ot(Re,this,_e),this.readable=!0,Re&&(typeof Re.read=="function"&&(this._read=Re.read),typeof Re.destroy=="function"&&(this._destroy=Re.destroy)),je.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(Re,_e){_e(Re)},lt.prototype.push=function(Re,_e){var Ve=this._readableState,it;return Ve.objectMode?it=!0:typeof Re=="string"&&(_e=_e||Ve.defaultEncoding,_e!==Ve.encoding&&(Re=me.from(Re,_e),_e=""),it=!0),ut(this,Re,_e,!1,it)},lt.prototype.unshift=function(Re){return ut(this,Re,null,!0,!1)};function ut(Re,_e,Ve,it,yt){se("readableAddChunk",_e);var Pt=Re._readableState;if(_e===null)Pt.reading=!1,bt(Re,Pt);else{var jt;if(yt||(jt=Je(Pt,_e)),jt)Ye(Re,jt);else if(Pt.objectMode||_e&&_e.length>0)if(typeof _e!="string"&&!Pt.objectMode&&Object.getPrototypeOf(_e)!==me.prototype&&(_e=fe(_e)),it)Pt.endEmitted?Ye(Re,new Te):Ct(Re,Pt,_e,!0);else if(Pt.ended)Ye(Re,new De);else{if(Pt.destroyed)return!1;Pt.reading=!1,Pt.decoder&&!Ve?(_e=Pt.decoder.write(_e),Pt.objectMode||_e.length!==0?Ct(Re,Pt,_e,!1):ht(Re,Pt)):Ct(Re,Pt,_e,!1)}else it||(Pt.reading=!1,ht(Re,Pt))}return!Pt.ended&&(Pt.length<Pt.highWaterMark||Pt.length===0)}function Ct(Re,_e,Ve,it){_e.flowing&&_e.length===0&&!_e.sync?(_e.awaitDrain=0,Re.emit("data",Ve)):(_e.length+=_e.objectMode?1:Ve.length,it?_e.buffer.unshift(Ve):_e.buffer.push(Ve),_e.needReadable&&ct(Re)),ht(Re,_e)}function Je(Re,_e){var Ve;return!z(_e)&&typeof _e!="string"&&_e!==void 0&&!Re.objectMode&&(Ve=new Ae("chunk",["string","Buffer","Uint8Array"],_e)),Ve}lt.prototype.isPaused=function(){return this._readableState.flowing===!1},lt.prototype.setEncoding=function(Re){Ne||(Ne=oe("string_decoder/").StringDecoder);var _e=new Ne(Re);this._readableState.decoder=_e,this._readableState.encoding=this._readableState.decoder.encoding;for(var Ve=this._readableState.buffer.head,it="";Ve!==null;)it+=_e.write(Ve.data),Ve=Ve.next;return this._readableState.buffer.clear(),it!==""&&this._readableState.buffer.push(it),this._readableState.length=it.length,this};var nt=1073741824;function St(Re){return Re>=nt?Re=nt:(Re--,Re|=Re>>>1,Re|=Re>>>2,Re|=Re>>>4,Re|=Re>>>8,Re|=Re>>>16,Re++),Re}function wt(Re,_e){return Re<=0||_e.length===0&&_e.ended?0:_e.objectMode?1:Re!==Re?_e.flowing&&_e.length?_e.buffer.head.data.length:_e.length:(Re>_e.highWaterMark&&(_e.highWaterMark=St(Re)),Re<=_e.length?Re:_e.ended?_e.length:(_e.needReadable=!0,0))}lt.prototype.read=function(Re){se("read",Re),Re=parseInt(Re,10);var _e=this._readableState,Ve=Re;if(Re!==0&&(_e.emittedReadable=!1),Re===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?Le(this):ct(this),null;if(Re=wt(Re,_e),Re===0&&_e.ended)return _e.length===0&&Le(this),null;var it=_e.needReadable;se("need readable",it),(_e.length===0||_e.length-Re<_e.highWaterMark)&&(it=!0,se("length less than watermark",it)),_e.ended||_e.reading?(it=!1,se("reading or ended",it)):it&&(se("do read"),_e.reading=!0,_e.sync=!0,_e.length===0&&(_e.needReadable=!0),this._read(_e.highWaterMark),_e.sync=!1,_e.reading||(Re=wt(Ve,_e)));var yt;return Re>0?yt=we(Re,_e):yt=null,yt===null?(_e.needReadable=_e.length<=_e.highWaterMark,Re=0):(_e.length-=Re,_e.awaitDrain=0),_e.length===0&&(_e.ended||(_e.needReadable=!0),Ve!==Re&&_e.ended&&Le(this)),yt!==null&&this.emit("data",yt),yt};function bt(Re,_e){if(se("onEofChunk"),!_e.ended){if(_e.decoder){var Ve=_e.decoder.end();Ve&&Ve.length&&(_e.buffer.push(Ve),_e.length+=_e.objectMode?1:Ve.length)}_e.ended=!0,_e.sync?ct(Re):(_e.needReadable=!1,_e.emittedReadable||(_e.emittedReadable=!0,vt(Re)))}}function ct(Re){var _e=Re._readableState;se("emitReadable",_e.needReadable,_e.emittedReadable),_e.needReadable=!1,_e.emittedReadable||(se("emitReadable",_e.flowing),_e.emittedReadable=!0,de.nextTick(vt,Re))}function vt(Re){var _e=Re._readableState;se("emitReadable_",_e.destroyed,_e.length,_e.ended),!_e.destroyed&&(_e.length||_e.ended)&&(Re.emit("readable"),_e.emittedReadable=!1),_e.needReadable=!_e.flowing&&!_e.ended&&_e.length<=_e.highWaterMark,He(Re)}function ht(Re,_e){_e.readingMore||(_e.readingMore=!0,de.nextTick(Lt,Re,_e))}function Lt(Re,_e){for(;!_e.reading&&!_e.ended&&(_e.length<_e.highWaterMark||_e.flowing&&_e.length===0);){var Ve=_e.length;if(se("maybeReadMore read 0"),Re.read(0),Ve===_e.length)break}_e.readingMore=!1}lt.prototype._read=function(Re){Ye(this,new Fe("_read()"))},lt.prototype.pipe=function(Re,_e){var Ve=this,it=this._readableState;switch(it.pipesCount){case 0:it.pipes=Re;break;case 1:it.pipes=[it.pipes,Re];break;default:it.pipes.push(Re);break}it.pipesCount+=1,se("pipe count=%d opts=%j",it.pipesCount,_e);var yt=(!_e||_e.end!==!1)&&Re!==de.stdout&&Re!==de.stderr,Pt=yt?Nt:cn;it.endEmitted?de.nextTick(Pt):Ve.once("end",Pt),Re.on("unpipe",jt);function jt(wn,xn){se("onunpipe"),wn===Ve&&xn&&xn.hasUnpiped===!1&&(xn.hasUnpiped=!0,en())}function Nt(){se("onend"),Re.end()}var Bt=dt(Ve);Re.on("drain",Bt);var $t=!1;function en(){se("cleanup"),Re.removeListener("close",hn),Re.removeListener("finish",an),Re.removeListener("drain",Bt),Re.removeListener("error",Zt),Re.removeListener("unpipe",jt),Ve.removeListener("end",Nt),Ve.removeListener("end",cn),Ve.removeListener("data",qt),$t=!0,it.awaitDrain&&(!Re._writableState||Re._writableState.needDrain)&&Bt()}Ve.on("data",qt);function qt(wn){se("ondata");var xn=Re.write(wn);se("dest.write",xn),xn===!1&&((it.pipesCount===1&&it.pipes===Re||it.pipesCount>1&&tt(it.pipes,Re)!==-1)&&!$t&&(se("false write response, pause",it.awaitDrain),it.awaitDrain++),Ve.pause())}function Zt(wn){se("onerror",wn),cn(),Re.removeListener("error",Zt),Se(Re,"error")===0&&Ye(Re,wn)}Xe(Re,"error",Zt);function hn(){Re.removeListener("finish",an),cn()}Re.once("close",hn);function an(){se("onfinish"),Re.removeListener("close",hn),cn()}Re.once("finish",an);function cn(){se("unpipe"),Ve.unpipe(Re)}return Re.emit("pipe",Ve),it.flowing||(se("pipe resume"),Ve.resume()),Re};function dt(Re){return function(){var Ve=Re._readableState;se("pipeOnDrain",Ve.awaitDrain),Ve.awaitDrain&&Ve.awaitDrain--,Ve.awaitDrain===0&&Se(Re,"data")&&(Ve.flowing=!0,He(Re))}}lt.prototype.unpipe=function(Re){var _e=this._readableState,Ve={hasUnpiped:!1};if(_e.pipesCount===0)return this;if(_e.pipesCount===1)return Re&&Re!==_e.pipes?this:(Re||(Re=_e.pipes),_e.pipes=null,_e.pipesCount=0,_e.flowing=!1,Re&&Re.emit("unpipe",this,Ve),this);if(!Re){var it=_e.pipes,yt=_e.pipesCount;_e.pipes=null,_e.pipesCount=0,_e.flowing=!1;for(var Pt=0;Pt<yt;Pt++)it[Pt].emit("unpipe",this,{hasUnpiped:!1});return this}var jt=tt(_e.pipes,Re);return jt===-1?this:(_e.pipes.splice(jt,1),_e.pipesCount-=1,_e.pipesCount===1&&(_e.pipes=_e.pipes[0]),Re.emit("unpipe",this,Ve),this)},lt.prototype.on=function(Re,_e){var Ve=je.prototype.on.call(this,Re,_e),it=this._readableState;return Re==="data"?(it.readableListening=this.listenerCount("readable")>0,it.flowing!==!1&&this.resume()):Re==="readable"&&!it.endEmitted&&!it.readableListening&&(it.readableListening=it.needReadable=!0,it.flowing=!1,it.emittedReadable=!1,se("on readable",it.length,it.reading),it.length?ct(this):it.reading||de.nextTick(Et,this)),Ve},lt.prototype.addListener=lt.prototype.on,lt.prototype.removeListener=function(Re,_e){var Ve=je.prototype.removeListener.call(this,Re,_e);return Re==="readable"&&de.nextTick(mt,this),Ve},lt.prototype.removeAllListeners=function(Re){var _e=je.prototype.removeAllListeners.apply(this,arguments);return(Re==="readable"||Re===void 0)&&de.nextTick(mt,this),_e};function mt(Re){var _e=Re._readableState;_e.readableListening=Re.listenerCount("readable")>0,_e.resumeScheduled&&!_e.paused?_e.flowing=!0:Re.listenerCount("data")>0&&Re.resume()}function Et(Re){se("readable nexttick read 0"),Re.read(0)}lt.prototype.resume=function(){var Re=this._readableState;return Re.flowing||(se("resume"),Re.flowing=!Re.readableListening,gt(this,Re)),Re.paused=!1,this};function gt(Re,_e){_e.resumeScheduled||(_e.resumeScheduled=!0,de.nextTick($e,Re,_e))}function $e(Re,_e){se("resume",_e.reading),_e.reading||Re.read(0),_e.resumeScheduled=!1,Re.emit("resume"),He(Re),_e.flowing&&!_e.reading&&Re.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 He(Re){var _e=Re._readableState;for(se("flow",_e.flowing);_e.flowing&&Re.read()!==null;);}lt.prototype.wrap=function(Re){var _e=this,Ve=this._readableState,it=!1;Re.on("end",function(){if(se("wrapped end"),Ve.decoder&&!Ve.ended){var jt=Ve.decoder.end();jt&&jt.length&&_e.push(jt)}_e.push(null)}),Re.on("data",function(jt){if(se("wrapped data"),Ve.decoder&&(jt=Ve.decoder.write(jt)),!(Ve.objectMode&&jt==null)&&!(!Ve.objectMode&&(!jt||!jt.length))){var Nt=_e.push(jt);Nt||(it=!0,Re.pause())}});for(var yt in Re)this[yt]===void 0&&typeof Re[yt]=="function"&&(this[yt]=function(Nt){return function(){return Re[Nt].apply(Re,arguments)}}(yt));for(var Pt=0;Pt<Ke.length;Pt++)Re.on(Ke[Pt],this.emit.bind(this,Ke[Pt]));return this._read=function(jt){se("wrapped _read",jt),it&&(it=!1,Re.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(Re,_e){if(_e.length===0)return null;var Ve;return _e.objectMode?Ve=_e.buffer.shift():!Re||Re>=_e.length?(_e.decoder?Ve=_e.buffer.join(""):_e.buffer.length===1?Ve=_e.buffer.first():Ve=_e.buffer.concat(_e.length),_e.buffer.clear()):Ve=_e.buffer.consume(Re,_e.decoder),Ve}function Le(Re){var _e=Re._readableState;se("endReadable",_e.endEmitted),_e.endEmitted||(_e.ended=!0,de.nextTick(We,_e,Re))}function We(Re,_e){if(se("endReadableNT",Re.endEmitted,Re.length),!Re.endEmitted&&Re.length===0&&(Re.endEmitted=!0,_e.readable=!1,_e.emit("end"),Re.autoDestroy)){var Ve=_e._writableState;(!Ve||Ve.autoDestroy&&Ve.finished)&&_e.destroy()}}typeof Symbol=="function"&&(lt.from=function(Re,_e){return Ge===void 0&&(Ge=oe("./internal/streams/from")),Ge(lt,Re,_e)});function tt(Re,_e){for(var Ve=0,it=Re.length;Ve<it;Ve++)if(Re[Ve]===_e)return Ve;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,Ue,Ie){"use strict";Ue.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,je=oe("./_stream_duplex");oe("inherits")(Pe,je);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);je.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,je.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){je.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,Ue,Ie){(function(de,ve){(function(){"use strict";Ue.exports=ot;function Ee(He,we,Le){this.chunk=He,this.encoding=we,this.callback=Le,this.next=null}function ke(He){var we=this;this.next=null,this.entry=null,this.finish=function(){$e(we,He)}}var Se;ot.WritableState=Ke;var je={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(He){return Pe.from(He)}function te(He){return Pe.isBuffer(He)||He 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,Ae=ce.ERR_MULTIPLE_CALLBACK,De=ce.ERR_STREAM_CANNOT_PIPE,Fe=ce.ERR_STREAM_DESTROYED,Te=ce.ERR_STREAM_NULL_VALUES,Ne=ce.ERR_STREAM_WRITE_AFTER_END,Be=ce.ERR_UNKNOWN_ENCODING,Ge=se.errorOrDestroy;oe("inherits")(ot,me);function Ye(){}function Ke(He,we,Le){Se=Se||oe("./_stream_duplex"),He=He||{},typeof Le!="boolean"&&(Le=we instanceof Se),this.objectMode=!!He.objectMode,Le&&(this.objectMode=this.objectMode||!!He.writableObjectMode),this.highWaterMark=le(this,He,"writableHighWaterMark",Le),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var We=He.decodeStrings===!1;this.decodeStrings=!We,this.defaultEncoding=He.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(tt){bt(we,tt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=He.emitClose!==!1,this.autoDestroy=!!He.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new ke(this)}Ke.prototype.getBuffer=function(){for(var we=this.bufferedRequest,Le=[];we;)Le.push(we),we=we.next;return Le},function(){try{Object.defineProperty(Ke.prototype,"buffer",{get:je.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(He){}}();var Xe;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Xe=Function.prototype[Symbol.hasInstance],Object.defineProperty(ot,Symbol.hasInstance,{value:function(we){return Xe.call(this,we)?!0:this!==ot?!1:we&&we._writableState instanceof Ke}})):Xe=function(we){return we instanceof this};function ot(He){Se=Se||oe("./_stream_duplex");var we=this instanceof Se;if(!we&&!Xe.call(ot,this))return new ot(He);this._writableState=new Ke(He,this,we),this.writable=!0,He&&(typeof He.write=="function"&&(this._write=He.write),typeof He.writev=="function"&&(this._writev=He.writev),typeof He.destroy=="function"&&(this._destroy=He.destroy),typeof He.final=="function"&&(this._final=He.final)),me.call(this)}ot.prototype.pipe=function(){Ge(this,new De)};function lt(He,we){var Le=new Ne;Ge(He,Le),de.nextTick(we,Le)}function ut(He,we,Le,We){var tt;return Le===null?tt=new Te:typeof Le!="string"&&!we.objectMode&&(tt=new pe("chunk",["string","Buffer"],Le)),tt?(Ge(He,tt),de.nextTick(We,tt),!1):!0}ot.prototype.write=function(He,we,Le){var We=this._writableState,tt=!1,Re=!We.objectMode&&te(He);return Re&&!Pe.isBuffer(He)&&(He=z(He)),typeof we=="function"&&(Le=we,we=null),Re?we="buffer":we||(we=We.defaultEncoding),typeof Le!="function"&&(Le=Ye),We.ending?lt(this,Le):(Re||ut(this,We,He,Le))&&(We.pendingcb++,tt=Je(this,We,Re,He,we,Le)),tt},ot.prototype.cork=function(){this._writableState.corked++},ot.prototype.uncork=function(){var He=this._writableState;He.corked&&(He.corked--,!He.writing&&!He.corked&&!He.bufferProcessing&&He.bufferedRequest&&ht(this,He))},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 Ct(He,we,Le){return!He.objectMode&&He.decodeStrings!==!1&&typeof we=="string"&&(we=Pe.from(we,Le)),we}Object.defineProperty(ot.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Je(He,we,Le,We,tt,Re){if(!Le){var _e=Ct(we,We,tt);We!==_e&&(Le=!0,tt="buffer",We=_e)}var Ve=we.objectMode?1:We.length;we.length+=Ve;var it=we.length<we.highWaterMark;if(it||(we.needDrain=!0),we.writing||we.corked){var yt=we.lastBufferedRequest;we.lastBufferedRequest={chunk:We,encoding:tt,isBuf:Le,callback:Re,next:null},yt?yt.next=we.lastBufferedRequest:we.bufferedRequest=we.lastBufferedRequest,we.bufferedRequestCount+=1}else nt(He,we,!1,Ve,We,tt,Re);return it}function nt(He,we,Le,We,tt,Re,_e){we.writelen=We,we.writecb=_e,we.writing=!0,we.sync=!0,we.destroyed?we.onwrite(new Fe("write")):Le?He._writev(tt,we.onwrite):He._write(tt,Re,we.onwrite),we.sync=!1}function St(He,we,Le,We,tt){--we.pendingcb,Le?(de.nextTick(tt,We),de.nextTick(Et,He,we),He._writableState.errorEmitted=!0,Ge(He,We)):(tt(We),He._writableState.errorEmitted=!0,Ge(He,We),Et(He,we))}function wt(He){He.writing=!1,He.writecb=null,He.length-=He.writelen,He.writelen=0}function bt(He,we){var Le=He._writableState,We=Le.sync,tt=Le.writecb;if(typeof tt!="function")throw new Ae;if(wt(Le),we)St(He,Le,We,we,tt);else{var Re=Lt(Le)||He.destroyed;!Re&&!Le.corked&&!Le.bufferProcessing&&Le.bufferedRequest&&ht(He,Le),We?de.nextTick(ct,He,Le,Re,tt):ct(He,Le,Re,tt)}}function ct(He,we,Le,We){Le||vt(He,we),we.pendingcb--,We(),Et(He,we)}function vt(He,we){we.length===0&&we.needDrain&&(we.needDrain=!1,He.emit("drain"))}function ht(He,we){we.bufferProcessing=!0;var Le=we.bufferedRequest;if(He._writev&&Le&&Le.next){var We=we.bufferedRequestCount,tt=new Array(We),Re=we.corkedRequestsFree;Re.entry=Le;for(var _e=0,Ve=!0;Le;)tt[_e]=Le,Le.isBuf||(Ve=!1),Le=Le.next,_e+=1;tt.allBuffers=Ve,nt(He,we,!0,we.length,tt,"",Re.finish),we.pendingcb++,we.lastBufferedRequest=null,Re.next?(we.corkedRequestsFree=Re.next,Re.next=null):we.corkedRequestsFree=new ke(we),we.bufferedRequestCount=0}else{for(;Le;){var it=Le.chunk,yt=Le.encoding,Pt=Le.callback,jt=we.objectMode?1:it.length;if(nt(He,we,!1,jt,it,yt,Pt),Le=Le.next,we.bufferedRequestCount--,we.writing)break}Le===null&&(we.lastBufferedRequest=null)}we.bufferedRequest=Le,we.bufferProcessing=!1}ot.prototype._write=function(He,we,Le){Le(new xe("_write()"))},ot.prototype._writev=null,ot.prototype.end=function(He,we,Le){var We=this._writableState;return typeof He=="function"?(Le=He,He=null,we=null):typeof we=="function"&&(Le=we,we=null),He!=null&&this.write(He,we),We.corked&&(We.corked=1,this.uncork()),We.ending||gt(this,We,Le),this},Object.defineProperty(ot.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Lt(He){return He.ending&&He.length===0&&He.bufferedRequest===null&&!He.finished&&!He.writing}function dt(He,we){He._final(function(Le){we.pendingcb--,Le&&Ge(He,Le),we.prefinished=!0,He.emit("prefinish"),Et(He,we)})}function mt(He,we){!we.prefinished&&!we.finalCalled&&(typeof He._final=="function"&&!we.destroyed?(we.pendingcb++,we.finalCalled=!0,de.nextTick(dt,He,we)):(we.prefinished=!0,He.emit("prefinish")))}function Et(He,we){var Le=Lt(we);if(Le&&(mt(He,we),we.pendingcb===0&&(we.finished=!0,He.emit("finish"),we.autoDestroy))){var We=He._readableState;(!We||We.autoDestroy&&We.endEmitted)&&He.destroy()}return Le}function gt(He,we,Le){we.ending=!0,Et(He,we),Le&&(we.finished?de.nextTick(Le):He.once("finish",Le)),we.ended=!0,He.writable=!1}function $e(He,we,Le){var We=He.entry;for(He.entry=null;We;){var tt=We.callback;we.pendingcb--,tt(Le),We=We.next}we.corkedRequestsFree.next=He}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(He,we){we(He)}}).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,Ue,Ie){(function(de){(function(){"use strict";var ve;function Ee(Te,Ne,Be){return Ne=ke(Ne),Ne in Te?Object.defineProperty(Te,Ne,{value:Be,enumerable:!0,configurable:!0,writable:!0}):Te[Ne]=Be,Te}function ke(Te){var Ne=Se(Te,"string");return typeof Ne=="symbol"?Ne:String(Ne)}function Se(Te,Ne){if(typeof Te!="object"||Te===null)return Te;var Be=Te[Symbol.toPrimitive];if(Be!==void 0){var Ge=Be.call(Te,Ne||"default");if(typeof Ge!="object")return Ge;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ne==="string"?String:Number)(Te)}var je=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,Ne){return{value:Te,done:Ne}}function ce(Te){var Ne=Te[me];if(Ne!==null){var Be=Te[ie].read();Be!==null&&(Te[te]=null,Te[me]=null,Te[Pe]=null,Ne(le(Be,!1)))}}function pe(Te){de.nextTick(ce,Te)}function xe(Te,Ne){return function(Be,Ge){Te.then(function(){if(Ne[z]){Be(le(void 0,!0));return}Ne[se](Be,Ge)},Ge)}}var Ae=Object.getPrototypeOf(function(){}),De=Object.setPrototypeOf((ve={get stream(){return this[ie]},next:function(){var Ne=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(Xe,ot){de.nextTick(function(){Ne[fe]?ot(Ne[fe]):Xe(le(void 0,!0))})});var Ge=this[te],Ye;if(Ge)Ye=new Promise(xe(Ge,this));else{var Ke=this[ie].read();if(Ke!==null)return Promise.resolve(le(Ke,!1));Ye=new Promise(this[se])}return this[te]=Ye,Ye}},Ee(ve,Symbol.asyncIterator,function(){return this}),Ee(ve,"return",function(){var Ne=this;return new Promise(function(Be,Ge){Ne[ie].destroy(null,function(Ye){if(Ye){Ge(Ye);return}Be(le(void 0,!0))})})}),ve),Ae),Fe=function(Ne){var Be,Ge=Object.create(De,(Be={},Ee(Be,ie,{value:Ne,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:Ne._readableState.endEmitted,writable:!0}),Ee(Be,se,{value:function(Ke,Xe){var ot=Ge[ie].read();ot?(Ge[te]=null,Ge[me]=null,Ge[Pe]=null,Ke(le(ot,!1))):(Ge[me]=Ke,Ge[Pe]=Xe)},writable:!0}),Be));return Ge[te]=null,je(Ne,function(Ye){if(Ye&&Ye.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Ke=Ge[Pe];Ke!==null&&(Ge[te]=null,Ge[me]=null,Ge[Pe]=null,Ke(Ye)),Ge[fe]=Ye;return}var Xe=Ge[me];Xe!==null&&(Ge[te]=null,Ge[me]=null,Ge[Pe]=null,Xe(le(void 0,!0))),Ge[z]=!0}),Ne.on("readable",pe.bind(null,Ge)),Ge};Ue.exports=Fe}).call(this)}).call(this,oe("_process"))},{"./end-of-stream":408,_process:467}],406:[function(oe,Ue,Ie){"use strict";function de(ce,pe){var xe=Object.keys(ce);if(Object.getOwnPropertySymbols){var Ae=Object.getOwnPropertySymbols(ce);pe&&(Ae=Ae.filter(function(De){return Object.getOwnPropertyDescriptor(ce,De).enumerable})),xe.push.apply(xe,Ae)}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(Ae){Ee(ce,Ae,xe[Ae])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ce,Object.getOwnPropertyDescriptors(xe)):de(Object(xe)).forEach(function(Ae){Object.defineProperty(ce,Ae,Object.getOwnPropertyDescriptor(xe,Ae))})}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 Ae=pe[xe];Ae.enumerable=Ae.enumerable||!1,Ae.configurable=!0,"value"in Ae&&(Ae.writable=!0),Object.defineProperty(ce,me(Ae.key),Ae)}}function je(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 Ae=xe.call(ce,pe||"default");if(typeof Ae!="object")return Ae;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)}Ue.exports=function(){function ce(){ke(this,ce),this.head=null,this.tail=null,this.length=0}return je(ce,[{key:"push",value:function(xe){var Ae={data:xe,next:null};this.length>0?this.tail.next=Ae:this.head=Ae,this.tail=Ae,++this.length}},{key:"unshift",value:function(xe){var Ae={data:xe,next:this.head};this.length===0&&(this.tail=Ae),this.head=Ae,++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 Ae=this.head,De=""+Ae.data;Ae=Ae.next;)De+=xe+Ae.data;return De}},{key:"concat",value:function(xe){if(this.length===0)return z.alloc(0);for(var Ae=z.allocUnsafe(xe>>>0),De=this.head,Fe=0;De;)le(De.data,Ae,Fe),Fe+=De.data.length,De=De.next;return Ae}},{key:"consume",value:function(xe,Ae){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=Ae?this._getString(xe):this._getBuffer(xe),De}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(xe){var Ae=this.head,De=1,Fe=Ae.data;for(xe-=Fe.length;Ae=Ae.next;){var Te=Ae.data,Ne=xe>Te.length?Te.length:xe;if(Ne===Te.length?Fe+=Te:Fe+=Te.slice(0,xe),xe-=Ne,xe===0){Ne===Te.length?(++De,Ae.next?this.head=Ae.next:this.head=this.tail=null):(this.head=Ae,Ae.data=Te.slice(Ne));break}++De}return this.length-=De,Fe}},{key:"_getBuffer",value:function(xe){var Ae=z.allocUnsafe(xe),De=this.head,Fe=1;for(De.data.copy(Ae),xe-=De.data.length;De=De.next;){var Te=De.data,Ne=xe>Te.length?Te.length:xe;if(Te.copy(Ae,Ae.length-xe,0,Ne),xe-=Ne,xe===0){Ne===Te.length?(++Fe,De.next?this.head=De.next:this.head=this.tail=null):(this.head=De,De.data=Te.slice(Ne));break}++Fe}return this.length-=Fe,Ae}},{key:ie,value:function(xe,Ae){return se(this,ve(ve({},Ae),{},{depth:0,customInspect:!1}))}}]),ce}()},{buffer:90,util:89}],407:[function(oe,Ue,Ie){(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(je,this,Pe)):de.nextTick(je,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){je(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 je(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)}Ue.exports={destroy:ve,undestroy:Se,errorOrDestroy:me}}).call(this)}).call(this,oe("_process"))},{_process:467}],408:[function(oe,Ue,Ie){"use strict";var de=oe("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function ve(je){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];je.apply(this,fe)}}}function Ee(){}function ke(je){return je.setHeader&&typeof je.abort=="function"}function Se(je,me,Pe){if(typeof me=="function")return Se(je,null,me);me||(me={}),Pe=ve(Pe||Ee);var fe=me.readable||me.readable!==!1&&je.readable,z=me.writable||me.writable!==!1&&je.writable,te=function(){je.writable||ie()},se=je._writableState&&je._writableState.finished,ie=function(){z=!1,se=!0,fe||Pe.call(je)},le=je._readableState&&je._readableState.endEmitted,ce=function(){fe=!1,le=!0,z||Pe.call(je)},pe=function(Fe){Pe.call(je,Fe)},xe=function(){var Fe;if(fe&&!le)return(!je._readableState||!je._readableState.ended)&&(Fe=new de),Pe.call(je,Fe);if(z&&!se)return(!je._writableState||!je._writableState.ended)&&(Fe=new de),Pe.call(je,Fe)},Ae=function(){je.req.on("finish",ie)};return ke(je)?(je.on("complete",ie),je.on("abort",xe),je.req?Ae():je.on("request",Ae)):z&&!je._writableState&&(je.on("end",te),je.on("close",te)),je.on("end",ce),je.on("finish",ie),me.error!==!1&&je.on("error",pe),je.on("close",xe),function(){je.removeListener("complete",ie),je.removeListener("abort",xe),je.removeListener("request",Ae),je.req&&je.req.removeListener("finish",ie),je.removeListener("end",te),je.removeListener("close",te),je.removeListener("finish",ie),je.removeListener("end",ce),je.removeListener("error",pe),je.removeListener("close",xe)}}Ue.exports=Se},{"../../../errors":399}],409:[function(oe,Ue,Ie){Ue.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(oe,Ue,Ie){"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 je(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 Ae=!1;return function(De){if(!xe&&!Ae){if(Ae=!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"?je: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,Ae=le.map(function(De,Fe){var Te=Fe<le.length-1,Ne=Fe>0;return Pe(De,Te,Ne,function(Be){xe||(xe=Be),Be&&Ae.forEach(fe),!Te&&(Ae.forEach(fe),pe(xe))})});return le.reduce(z)}Ue.exports=se},{"../../../errors":399,"./end-of-stream":408}],411:[function(oe,Ue,Ie){"use strict";var de=oe("../../../errors").codes.ERR_INVALID_OPT_VALUE;function ve(ke,Se,je){return ke.highWaterMark!=null?ke.highWaterMark:Se?ke[je]:null}function Ee(ke,Se,je,me){var Pe=ve(Se,me,je);if(Pe!=null){if(!(isFinite(Pe)&&Math.floor(Pe)===Pe)||Pe<0){var fe=me?je:"highWaterMark";throw new de(fe,Pe)}return Math.floor(Pe)}return ke.objectMode?16:16*1024}Ue.exports={getHighWaterMark:Ee}},{"../../../errors":399}],412:[function(oe,Ue,Ie){arguments[4][393][0].apply(Ie,arguments)},{dup:393,events:344}],413:[function(oe,Ue,Ie){"use strict";var de=oe("safe-buffer").Buffer,ve=de.isEncoding||function(Ae){switch(Ae=""+Ae,Ae&&Ae.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(Ae){if(!Ae)return"utf8";for(var De;;)switch(Ae){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 Ae;default:if(De)return;Ae=(""+Ae).toLowerCase(),De=!0}}function ke(Ae){var De=Ee(Ae);if(typeof De!="string"&&(de.isEncoding===ve||!ve(Ae)))throw new Error("Unknown encoding: "+Ae);return De||Ae}Ie.StringDecoder=Se;function Se(Ae){this.encoding=ke(Ae);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(Ae){if(Ae.length===0)return"";var De,Fe;if(this.lastNeed){if(De=this.fillLast(Ae),De===void 0)return"";Fe=this.lastNeed,this.lastNeed=0}else Fe=0;return Fe<Ae.length?De?De+this.text(Ae,Fe):this.text(Ae,Fe):De||""},Se.prototype.end=te,Se.prototype.text=z,Se.prototype.fillLast=function(Ae){if(this.lastNeed<=Ae.length)return Ae.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);Ae.copy(this.lastChar,this.lastTotal-this.lastNeed,0,Ae.length),this.lastNeed-=Ae.length};function je(Ae){return Ae<=127?0:Ae>>5===6?2:Ae>>4===14?3:Ae>>3===30?4:Ae>>6===2?-1:-2}function me(Ae,De,Fe){var Te=De.length-1;if(Te<Fe)return 0;var Ne=je(De[Te]);return Ne>=0?(Ne>0&&(Ae.lastNeed=Ne-1),Ne):--Te<Fe||Ne===-2?0:(Ne=je(De[Te]),Ne>=0?(Ne>0&&(Ae.lastNeed=Ne-2),Ne):--Te<Fe||Ne===-2?0:(Ne=je(De[Te]),Ne>=0?(Ne>0&&(Ne===2?Ne=0:Ae.lastNeed=Ne-3),Ne):0))}function Pe(Ae,De,Fe){if((De[0]&192)!==128)return Ae.lastNeed=0,"\uFFFD";if(Ae.lastNeed>1&&De.length>1){if((De[1]&192)!==128)return Ae.lastNeed=1,"\uFFFD";if(Ae.lastNeed>2&&De.length>2&&(De[2]&192)!==128)return Ae.lastNeed=2,"\uFFFD"}}function fe(Ae){var De=this.lastTotal-this.lastNeed,Fe=Pe(this,Ae,De);if(Fe!==void 0)return Fe;if(this.lastNeed<=Ae.length)return Ae.copy(this.lastChar,De,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);Ae.copy(this.lastChar,De,0,Ae.length),this.lastNeed-=Ae.length}function z(Ae,De){var Fe=me(this,Ae,De);if(!this.lastNeed)return Ae.toString("utf8",De);this.lastTotal=Fe;var Te=Ae.length-(Fe-this.lastNeed);return Ae.copy(this.lastChar,0,Te),Ae.toString("utf8",De,Te)}function te(Ae){var De=Ae&&Ae.length?this.write(Ae):"";return this.lastNeed?De+"\uFFFD":De}function se(Ae,De){if((Ae.length-De)%2===0){var Fe=Ae.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]=Ae[Ae.length-2],this.lastChar[1]=Ae[Ae.length-1],Fe.slice(0,-1)}return Fe}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=Ae[Ae.length-1],Ae.toString("utf16le",De,Ae.length-1)}function ie(Ae){var De=Ae&&Ae.length?this.write(Ae):"";if(this.lastNeed){var Fe=this.lastTotal-this.lastNeed;return De+this.lastChar.toString("utf16le",0,Fe)}return De}function le(Ae,De){var Fe=(Ae.length-De)%3;return Fe===0?Ae.toString("base64",De):(this.lastNeed=3-Fe,this.lastTotal=3,Fe===1?this.lastChar[0]=Ae[Ae.length-1]:(this.lastChar[0]=Ae[Ae.length-2],this.lastChar[1]=Ae[Ae.length-1]),Ae.toString("base64",De,Ae.length-Fe))}function ce(Ae){var De=Ae&&Ae.length?this.write(Ae):"";return this.lastNeed?De+this.lastChar.toString("base64",0,3-this.lastNeed):De}function pe(Ae){return Ae.toString(this.encoding)}function xe(Ae){return Ae&&Ae.length?this.write(Ae):""}},{"safe-buffer":396}],414:[function(oe,Ue,Ie){(function(de,ve){(function(){var Ee=oe("process/browser.js").nextTick,ke=Function.prototype.apply,Se=Array.prototype.slice,je={},me=0;Ie.setTimeout=function(){return new Pe(ke.call(setTimeout,window,arguments),clearTimeout)},Ie.setInterval=function(){return new Pe(ke.call(setInterval,window,arguments),clearInterval)},Ie.clearTimeout=Ie.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)},Ie.enroll=function(fe,z){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=z},Ie.unenroll=function(fe){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=-1},Ie._unrefActive=Ie.active=function(fe){clearTimeout(fe._idleTimeoutId);var z=fe._idleTimeout;z>=0&&(fe._idleTimeoutId=setTimeout(function(){fe._onTimeout&&fe._onTimeout()},z))},Ie.setImmediate=typeof de=="function"?de:function(fe){var z=me++,te=arguments.length<2?!1:Se.call(arguments,1);return je[z]=!0,Ee(function(){je[z]&&(te?fe.apply(null,te):fe.call(null),Ie.clearImmediate(z))}),z},Ie.clearImmediate=typeof ve=="function"?ve:function(fe){delete je[fe]}}).call(this)}).call(this,oe("timers").setImmediate,oe("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(oe,Ue,Ie){var de=oe("buffer").Buffer;Ue.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,Ue,Ie){(function(de){(function(){Ue.exports=ve;function ve(ke,Se){if(Ee("noDeprecation"))return ke;var je=!1;function me(){if(!je){if(Ee("throwDeprecation"))throw new Error(Se);Ee("traceDeprecation")?console.trace(Se):console.warn(Se),je=!0}return ke.apply(this,arguments)}return me}function Ee(ke){try{if(!de.localStorage)return!1}catch(je){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,Ue,Ie){arguments[4][84][0].apply(Ie,arguments)},{dup:84}],418:[function(oe,Ue,Ie){"use strict";var de=oe("is-arguments"),ve=oe("is-generator-function"),Ee=oe("which-typed-array"),ke=oe("is-typed-array");function Se(yt){return yt.call.bind(yt)}var je=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(je)var se=Se(BigInt.prototype.valueOf);if(me)var ie=Se(Symbol.prototype.valueOf);function le(yt,Pt){if(typeof yt!="object")return!1;try{return Pt(yt),!0}catch(jt){return!1}}Ie.isArgumentsObject=de,Ie.isGeneratorFunction=ve,Ie.isTypedArray=ke;function ce(yt){return typeof Promise!="undefined"&&yt instanceof Promise||yt!==null&&typeof yt=="object"&&typeof yt.then=="function"&&typeof yt.catch=="function"}Ie.isPromise=ce;function pe(yt){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(yt):ke(yt)||ht(yt)}Ie.isArrayBufferView=pe;function xe(yt){return Ee(yt)==="Uint8Array"}Ie.isUint8Array=xe;function Ae(yt){return Ee(yt)==="Uint8ClampedArray"}Ie.isUint8ClampedArray=Ae;function De(yt){return Ee(yt)==="Uint16Array"}Ie.isUint16Array=De;function Fe(yt){return Ee(yt)==="Uint32Array"}Ie.isUint32Array=Fe;function Te(yt){return Ee(yt)==="Int8Array"}Ie.isInt8Array=Te;function Ne(yt){return Ee(yt)==="Int16Array"}Ie.isInt16Array=Ne;function Be(yt){return Ee(yt)==="Int32Array"}Ie.isInt32Array=Be;function Ge(yt){return Ee(yt)==="Float32Array"}Ie.isFloat32Array=Ge;function Ye(yt){return Ee(yt)==="Float64Array"}Ie.isFloat64Array=Ye;function Ke(yt){return Ee(yt)==="BigInt64Array"}Ie.isBigInt64Array=Ke;function Xe(yt){return Ee(yt)==="BigUint64Array"}Ie.isBigUint64Array=Xe;function ot(yt){return Pe(yt)==="[object Map]"}ot.working=typeof Map!="undefined"&&ot(new Map);function lt(yt){return typeof Map=="undefined"?!1:ot.working?ot(yt):yt instanceof Map}Ie.isMap=lt;function ut(yt){return Pe(yt)==="[object Set]"}ut.working=typeof Set!="undefined"&&ut(new Set);function Ct(yt){return typeof Set=="undefined"?!1:ut.working?ut(yt):yt instanceof Set}Ie.isSet=Ct;function Je(yt){return Pe(yt)==="[object WeakMap]"}Je.working=typeof WeakMap!="undefined"&&Je(new WeakMap);function nt(yt){return typeof WeakMap=="undefined"?!1:Je.working?Je(yt):yt instanceof WeakMap}Ie.isWeakMap=nt;function St(yt){return Pe(yt)==="[object WeakSet]"}St.working=typeof WeakSet!="undefined"&&St(new WeakSet);function wt(yt){return St(yt)}Ie.isWeakSet=wt;function bt(yt){return Pe(yt)==="[object ArrayBuffer]"}bt.working=typeof ArrayBuffer!="undefined"&&bt(new ArrayBuffer);function ct(yt){return typeof ArrayBuffer=="undefined"?!1:bt.working?bt(yt):yt instanceof ArrayBuffer}Ie.isArrayBuffer=ct;function vt(yt){return Pe(yt)==="[object DataView]"}vt.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&vt(new DataView(new ArrayBuffer(1),0,1));function ht(yt){return typeof DataView=="undefined"?!1:vt.working?vt(yt):yt instanceof DataView}Ie.isDataView=ht;var Lt=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function dt(yt){return Pe(yt)==="[object SharedArrayBuffer]"}function mt(yt){return typeof Lt=="undefined"?!1:(typeof dt.working=="undefined"&&(dt.working=dt(new Lt)),dt.working?dt(yt):yt instanceof Lt)}Ie.isSharedArrayBuffer=mt;function Et(yt){return Pe(yt)==="[object AsyncFunction]"}Ie.isAsyncFunction=Et;function gt(yt){return Pe(yt)==="[object Map Iterator]"}Ie.isMapIterator=gt;function $e(yt){return Pe(yt)==="[object Set Iterator]"}Ie.isSetIterator=$e;function He(yt){return Pe(yt)==="[object Generator]"}Ie.isGeneratorObject=He;function we(yt){return Pe(yt)==="[object WebAssembly.Module]"}Ie.isWebAssemblyCompiledModule=we;function Le(yt){return le(yt,fe)}Ie.isNumberObject=Le;function We(yt){return le(yt,z)}Ie.isStringObject=We;function tt(yt){return le(yt,te)}Ie.isBooleanObject=tt;function Re(yt){return je&&le(yt,se)}Ie.isBigIntObject=Re;function _e(yt){return me&&le(yt,ie)}Ie.isSymbolObject=_e;function Ve(yt){return Le(yt)||We(yt)||tt(yt)||Re(yt)||_e(yt)}Ie.isBoxedPrimitive=Ve;function it(yt){return typeof Uint8Array!="undefined"&&(ct(yt)||mt(yt))}Ie.isAnyArrayBuffer=it,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(yt){Object.defineProperty(Ie,yt,{enumerable:!1,value:function(){throw new Error(yt+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(oe,Ue,Ie){(function(de){(function(){var ve=Object.getOwnPropertyDescriptors||function(Lt){for(var dt=Object.keys(Lt),mt={},Et=0;Et<dt.length;Et++)mt[dt[Et]]=Object.getOwnPropertyDescriptor(Lt,dt[Et]);return mt},Ee=/%[sdj%]/g;Ie.format=function(ht){if(!Ne(ht)){for(var Lt=[],dt=0;dt<arguments.length;dt++)Lt.push(me(arguments[dt]));return Lt.join(" ")}for(var dt=1,mt=arguments,Et=mt.length,gt=String(ht).replace(Ee,function(He){if(He==="%%")return"%";if(dt>=Et)return He;switch(He){case"%s":return String(mt[dt++]);case"%d":return Number(mt[dt++]);case"%j":try{return JSON.stringify(mt[dt++])}catch(we){return"[Circular]"}default:return He}}),$e=mt[dt];dt<Et;$e=mt[++dt])De($e)||!Ke($e)?gt+=" "+$e:gt+=" "+me($e);return gt},Ie.deprecate=function(ht,Lt){if(typeof de!="undefined"&&de.noDeprecation===!0)return ht;if(typeof de=="undefined")return function(){return Ie.deprecate(ht,Lt).apply(this,arguments)};var dt=!1;function mt(){if(!dt){if(de.throwDeprecation)throw new Error(Lt);de.traceDeprecation?console.trace(Lt):console.error(Lt),dt=!0}return ht.apply(this,arguments)}return mt};var ke={},Se=/^$/;if(de.env.NODE_DEBUG){var je=de.env.NODE_DEBUG;je=je.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Se=new RegExp("^"+je+"$","i")}Ie.debuglog=function(ht){if(ht=ht.toUpperCase(),!ke[ht])if(Se.test(ht)){var Lt=de.pid;ke[ht]=function(){var dt=Ie.format.apply(Ie,arguments);console.error("%s %d: %s",ht,Lt,dt)}}else ke[ht]=function(){};return ke[ht]};function me(ht,Lt){var dt={seen:[],stylize:fe};return arguments.length>=3&&(dt.depth=arguments[2]),arguments.length>=4&&(dt.colors=arguments[3]),Ae(Lt)?dt.showHidden=Lt:Lt&&Ie._extend(dt,Lt),Ge(dt.showHidden)&&(dt.showHidden=!1),Ge(dt.depth)&&(dt.depth=2),Ge(dt.colors)&&(dt.colors=!1),Ge(dt.customInspect)&&(dt.customInspect=!0),dt.colors&&(dt.stylize=Pe),te(dt,ht,dt.depth)}Ie.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(ht,Lt){var dt=me.styles[Lt];return dt?"\x1B["+me.colors[dt][0]+"m"+ht+"\x1B["+me.colors[dt][1]+"m":ht}function fe(ht,Lt){return ht}function z(ht){var Lt={};return ht.forEach(function(dt,mt){Lt[dt]=!0}),Lt}function te(ht,Lt,dt){if(ht.customInspect&&Lt&&lt(Lt.inspect)&&Lt.inspect!==Ie.inspect&&!(Lt.constructor&&Lt.constructor.prototype===Lt)){var mt=Lt.inspect(dt,ht);return Ne(mt)||(mt=te(ht,mt,dt)),mt}var Et=se(ht,Lt);if(Et)return Et;var gt=Object.keys(Lt),$e=z(gt);if(ht.showHidden&&(gt=Object.getOwnPropertyNames(Lt)),ot(Lt)&&(gt.indexOf("message")>=0||gt.indexOf("description")>=0))return ie(Lt);if(gt.length===0){if(lt(Lt)){var He=Lt.name?": "+Lt.name:"";return ht.stylize("[Function"+He+"]","special")}if(Ye(Lt))return ht.stylize(RegExp.prototype.toString.call(Lt),"regexp");if(Xe(Lt))return ht.stylize(Date.prototype.toString.call(Lt),"date");if(ot(Lt))return ie(Lt)}var we="",Le=!1,We=["{","}"];if(xe(Lt)&&(Le=!0,We=["[","]"]),lt(Lt)){var tt=Lt.name?": "+Lt.name:"";we=" [Function"+tt+"]"}if(Ye(Lt)&&(we=" "+RegExp.prototype.toString.call(Lt)),Xe(Lt)&&(we=" "+Date.prototype.toUTCString.call(Lt)),ot(Lt)&&(we=" "+ie(Lt)),gt.length===0&&(!Le||Lt.length==0))return We[0]+we+We[1];if(dt<0)return Ye(Lt)?ht.stylize(RegExp.prototype.toString.call(Lt),"regexp"):ht.stylize("[Object]","special");ht.seen.push(Lt);var Re;return Le?Re=le(ht,Lt,dt,$e,gt):Re=gt.map(function(_e){return ce(ht,Lt,dt,$e,_e,Le)}),ht.seen.pop(),pe(Re,we,We)}function se(ht,Lt){if(Ge(Lt))return ht.stylize("undefined","undefined");if(Ne(Lt)){var dt="'"+JSON.stringify(Lt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ht.stylize(dt,"string")}if(Te(Lt))return ht.stylize(""+Lt,"number");if(Ae(Lt))return ht.stylize(""+Lt,"boolean");if(De(Lt))return ht.stylize("null","null")}function ie(ht){return"["+Error.prototype.toString.call(ht)+"]"}function le(ht,Lt,dt,mt,Et){for(var gt=[],$e=0,He=Lt.length;$e<He;++$e)wt(Lt,String($e))?gt.push(ce(ht,Lt,dt,mt,String($e),!0)):gt.push("");return Et.forEach(function(we){we.match(/^\d+$/)||gt.push(ce(ht,Lt,dt,mt,we,!0))}),gt}function ce(ht,Lt,dt,mt,Et,gt){var $e,He,we;if(we=Object.getOwnPropertyDescriptor(Lt,Et)||{value:Lt[Et]},we.get?we.set?He=ht.stylize("[Getter/Setter]","special"):He=ht.stylize("[Getter]","special"):we.set&&(He=ht.stylize("[Setter]","special")),wt(mt,Et)||($e="["+Et+"]"),He||(ht.seen.indexOf(we.value)<0?(De(dt)?He=te(ht,we.value,null):He=te(ht,we.value,dt-1),He.indexOf(`
`)>-1&&(gt?He=He.split(`
`).map(function(Le){return" "+Le}).join(`
`).slice(2):He=`
`+He.split(`
`).map(function(Le){return" "+Le}).join(`
`))):He=ht.stylize("[Circular]","special")),Ge($e)){if(gt&&Et.match(/^\d+$/))return He;$e=JSON.stringify(""+Et),$e.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?($e=$e.slice(1,-1),$e=ht.stylize($e,"name")):($e=$e.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),$e=ht.stylize($e,"string"))}return $e+": "+He}function pe(ht,Lt,dt){var mt=0,Et=ht.reduce(function(gt,$e){return mt++,$e.indexOf(`
`)>=0&&mt++,gt+$e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Et>60?dt[0]+(Lt===""?"":Lt+`
`)+" "+ht.join(`,
`)+" "+dt[1]:dt[0]+Lt+" "+ht.join(", ")+" "+dt[1]}Ie.types=oe("./support/types");function xe(ht){return Array.isArray(ht)}Ie.isArray=xe;function Ae(ht){return typeof ht=="boolean"}Ie.isBoolean=Ae;function De(ht){return ht===null}Ie.isNull=De;function Fe(ht){return ht==null}Ie.isNullOrUndefined=Fe;function Te(ht){return typeof ht=="number"}Ie.isNumber=Te;function Ne(ht){return typeof ht=="string"}Ie.isString=Ne;function Be(ht){return typeof ht=="symbol"}Ie.isSymbol=Be;function Ge(ht){return ht===void 0}Ie.isUndefined=Ge;function Ye(ht){return Ke(ht)&&Ct(ht)==="[object RegExp]"}Ie.isRegExp=Ye,Ie.types.isRegExp=Ye;function Ke(ht){return typeof ht=="object"&&ht!==null}Ie.isObject=Ke;function Xe(ht){return Ke(ht)&&Ct(ht)==="[object Date]"}Ie.isDate=Xe,Ie.types.isDate=Xe;function ot(ht){return Ke(ht)&&(Ct(ht)==="[object Error]"||ht instanceof Error)}Ie.isError=ot,Ie.types.isNativeError=ot;function lt(ht){return typeof ht=="function"}Ie.isFunction=lt;function ut(ht){return ht===null||typeof ht=="boolean"||typeof ht=="number"||typeof ht=="string"||typeof ht=="symbol"||typeof ht=="undefined"}Ie.isPrimitive=ut,Ie.isBuffer=oe("./support/isBuffer");function Ct(ht){return Object.prototype.toString.call(ht)}function Je(ht){return ht<10?"0"+ht.toString(10):ht.toString(10)}var nt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function St(){var ht=new Date,Lt=[Je(ht.getHours()),Je(ht.getMinutes()),Je(ht.getSeconds())].join(":");return[ht.getDate(),nt[ht.getMonth()],Lt].join(" ")}Ie.log=function(){console.log("%s - %s",St(),Ie.format.apply(Ie,arguments))},Ie.inherits=oe("inherits"),Ie._extend=function(ht,Lt){if(!Lt||!Ke(Lt))return ht;for(var dt=Object.keys(Lt),mt=dt.length;mt--;)ht[dt[mt]]=Lt[dt[mt]];return ht};function wt(ht,Lt){return Object.prototype.hasOwnProperty.call(ht,Lt)}var bt=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;Ie.promisify=function(Lt){if(typeof Lt!="function")throw new TypeError('The "original" argument must be of type Function');if(bt&&Lt[bt]){var dt=Lt[bt];if(typeof dt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(dt,bt,{value:dt,enumerable:!1,writable:!1,configurable:!0}),dt}function dt(){for(var mt,Et,gt=new Promise(function(we,Le){mt=we,Et=Le}),$e=[],He=0;He<arguments.length;He++)$e.push(arguments[He]);$e.push(function(we,Le){we?Et(we):mt(Le)});try{Lt.apply(this,$e)}catch(we){Et(we)}return gt}return Object.setPrototypeOf(dt,Object.getPrototypeOf(Lt)),bt&&Object.defineProperty(dt,bt,{value:dt,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(dt,ve(Lt))},Ie.promisify.custom=bt;function ct(ht,Lt){if(!ht){var dt=new Error("Promise was rejected with a falsy value");dt.reason=ht,ht=dt}return Lt(ht)}function vt(ht){if(typeof ht!="function")throw new TypeError('The "original" argument must be of type Function');function Lt(){for(var dt=[],mt=0;mt<arguments.length;mt++)dt.push(arguments[mt]);var Et=dt.pop();if(typeof Et!="function")throw new TypeError("The last argument must be of type Function");var gt=this,$e=function(){return Et.apply(gt,arguments)};ht.apply(this,dt).then(function(He){de.nextTick($e.bind(null,null,He))},function(He){de.nextTick(ct.bind(null,He,$e))})}return Object.setPrototypeOf(Lt,Object.getPrototypeOf(ht)),Object.defineProperties(Lt,ve(ht)),Lt}Ie.callbackify=vt}).call(this)}).call(this,oe("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(oe,Ue,Ie){(function(de){(function(){"use strict";var ve=oe("for-each"),Ee=oe("available-typed-arrays"),ke=oe("call-bind"),Se=oe("call-bind/callBound"),je=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(Ae,De){for(var Fe=0;Fe<Ae.length;Fe+=1)if(Ae[Fe]===De)return Fe;return-1},le={__proto__:null};Pe&&je&&se?ve(z,function(xe){var Ae=new fe[xe];if(Symbol.toStringTag in Ae){var De=se(Ae),Fe=je(De,Symbol.toStringTag);if(!Fe){var Te=se(De);Fe=je(Te,Symbol.toStringTag)}le["$"+xe]=ke(Fe.get)}}):ve(z,function(xe){var Ae=new fe[xe];le["$"+xe]=ke(Ae.slice)});var ce=function(Ae){var De=!1;return ve(le,function(Fe,Te){if(!De)try{"$"+Fe(Ae)===Te&&(De=te(Te,1))}catch(Ne){}}),De},pe=function(Ae){var De=!1;return ve(le,function(Fe,Te){if(!De)try{Fe(Ae),De=te(Te,1)}catch(Ne){}}),De};Ue.exports=function(Ae){if(!Ae||typeof Ae!="object")return!1;if(!Pe){var De=te(me(Ae),8,-1);return ie(z,De)>-1?De:De!=="Object"?!1:pe(Ae)}return je?ce(Ae):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,Ue,Ie){(function(){"use strict";Ie.stripBOM=function(de){return de[0]==="\uFEFF"?de.substring(1):de}}).call(this)},{}],422:[function(oe,Ue,Ie){(function(){"use strict";var de,ve,Ee,ke,Se,je={}.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[>")},Ie.Builder=function(){function me(Pe){var fe,z,te;this.options={},z=ve["0.2"];for(fe in z)je.call(z,fe)&&(te=z[fe],this.options[fe]=te);for(fe in Pe)je.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,Ae,De,Fe,Te,Ne;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(je.call(pe,Fe)){Ae=pe[Fe];for(Te in Ae)De=Ae[Te],ce=te(ce.ele(Te),De).up()}}else for(Te in pe)if(je.call(pe,Te))if(Ae=pe[Te],Te===fe){if(typeof Ae=="object")for(xe in Ae)Ne=Ae[xe],ce=ce.att(xe,Ne)}else if(Te===z)le.options.cdata&&ke(Ae)?ce=ce.raw(Se(Ae)):ce=ce.txt(Ae);else if(Array.isArray(Ae))for(Fe in Ae)je.call(Ae,Fe)&&(De=Ae[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 Ae=="object"?ce=te(ce.ele(Te),Ae).up():typeof Ae=="string"&&le.options.cdata&&ke(Ae)?ce=ce.ele(Te).raw(Se(Ae)).up():(Ae==null&&(Ae=""),ce=ce.ele(Te,Ae.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,Ue,Ie){(function(){Ie.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,Ue,Ie){(function(){"use strict";var de,ve,Ee,ke,Se,je,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},je=function(ie,le,ce){var pe,xe,Ae;for(pe=0,xe=ie.length;pe<xe;pe++)Ae=ie[pe],le=Ae(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)},Ie.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,Ae;if(!(this instanceof Ie.Parser))return new Ie.Parser(ce);this.options={},xe=ve["0.2"];for(pe in xe)se.call(xe,pe)&&(Ae=xe[pe],this.options[pe]=Ae);for(pe in ce)se.call(ce,pe)&&(Ae=ce[pe],this.options[pe]=Ae);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,Ae;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,Ae=[],ce=this.options.attrkey,pe=this.options.charkey,this.saxParser.onopentag=function(De){return function(Fe){var Te,Ne,Be,Ge,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]={}),Ne=De.options.attrValueProcessors?je(De.options.attrValueProcessors,Fe.attributes[Te],Te):Fe.attributes[Te],Ge=De.options.attrNameProcessors?je(De.options.attrNameProcessors,Te):Te,De.options.mergeAttrs?De.assignOrPush(Be,Ge,Ne):Ee(Be[ce],Ge,Ne))}return Be["#name"]=De.options.tagNameProcessors?je(De.options.tagNameProcessors,Fe.name):Fe.name,De.options.xmlns&&(Be[De.options.xmlnskey]={uri:Fe.uri,local:Fe.local}),Ae.push(Be)}}(this),this.saxParser.onclosetag=function(De){return function(){var Fe,Te,Ne,Be,Ge,Ye,Ke,Xe,ot,lt;if(Ye=Ae.pop(),Ge=Ye["#name"],(!De.options.explicitChildren||!De.options.preserveChildrenOrder)&&delete Ye["#name"],Ye.cdata===!0&&(Fe=Ye.cdata,delete Ye.cdata),ot=Ae[Ae.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?je(De.options.valueProcessors,Ye[pe],Ge):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 ut,Ct,Je;for(Je=[],ut=0,Ct=Ae.length;ut<Ct;ut++)Be=Ae[ut],Je.push(Be["#name"]);return Je}().concat(Ge).join("/"),function(){var ut;try{return Ye=De.options.validator(lt,ot&&ot[Ge],Ye)}catch(Ct){return ut=Ct,De.emit("error",ut)}}()),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]||[],Ke={};for(Ne in Ye)se.call(Ye,Ne)&&Ee(Ke,Ne,Ye[Ne]);ot[De.options.childkey].push(Ke),delete Ye["#name"],Object.keys(Ye).length===1&&pe in Ye&&!De.EXPLICIT_CHARKEY&&(Ye=Ye[pe])}}return Ae.length>0?De.assignOrPush(ot,Ge,Ye):(De.options.explicitRoot&&(Xe=Ye,Ye={},Ee(Ye,Ge,Xe)),De.resultObject=Ye,De.saxParser.ended=!0,De.emit("end",De.resultObject))}}(this),xe=function(De){return function(Fe){var Te,Ne;if(Ne=Ae[Ae.length-1],Ne)return Ne[pe]+=Fe,De.options.explicitChildren&&De.options.preserveChildrenOrder&&De.options.charsAsChildren&&(De.options.includeWhiteChars||Fe.replace(/\\n/g,"").trim()!=="")&&(Ne[De.options.childkey]=Ne[De.options.childkey]||[],Te={"#name":"__text__"},Te[pe]=Fe,De.options.normalize&&(Te[pe]=Te[pe].replace(/\s{2,}/g," ").trim()),Ne[De.options.childkey].push(Te)),Ne}}(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(Ae){return this.reset(),pe(null,Ae)}),this.on("error",function(Ae){return this.reset(),pe(Ae)}));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(Ae){if(xe=Ae,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,Ae){return pe.parseString(ce,function(De,Fe){return De?Ae(De):xe(Fe)})}}(this))},le}(ke),Ie.parseString=function(ie,le,ce){var pe,xe,Ae;return ce!=null?(typeof ce=="function"&&(pe=ce),typeof le=="object"&&(xe=le)):(typeof le=="function"&&(pe=le),xe={}),Ae=new Ie.Parser(xe),Ae.parseString(ie,pe)},Ie.parseStringPromise=function(ie,le){var ce,pe;return typeof le=="object"&&(ce=le),pe=new Ie.Parser(ce),pe.parseStringPromise(ie)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(oe,Ue,Ie){(function(){"use strict";var de;de=new RegExp(/(?!xmlns)^.*:/),Ie.normalize=function(ve){return ve.toLowerCase()},Ie.firstCharLowerCase=function(ve){return ve.charAt(0).toLowerCase()+ve.slice(1)},Ie.stripPrefix=function(ve){return ve.replace(de,"")},Ie.parseNumbers=function(ve){return isNaN(ve)||(ve=ve%1===0?parseInt(ve,10):parseFloat(ve)),ve},Ie.parseBooleans=function(ve){return/^(?:true|false)$/i.test(ve)&&(ve=ve.toLowerCase()==="true"),ve}}).call(this)},{}],426:[function(oe,Ue,Ie){(function(){"use strict";var de,ve,Ee,ke,Se=function(me,Pe){for(var fe in Pe)je.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},je={}.hasOwnProperty;ve=oe("./defaults"),de=oe("./builder"),Ee=oe("./parser"),ke=oe("./processors"),Ie.defaults=ve.defaults,Ie.processors=ke,Ie.ValidationError=function(me){Se(Pe,me);function Pe(fe){this.message=fe}return Pe}(Error),Ie.Builder=de.Builder,Ie.Parser=Ee.Parser,Ie.parseString=Ee.parseString,Ie.parseStringPromise=Ee.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(oe,Ue,Ie){(function(){Ue.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(oe,Ue,Ie){(function(){Ue.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,Ue,Ie){(function(){var de,ve,Ee,ke,Se,je,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]"},je=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 je(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},Ue.exports.assign=de,Ue.exports.isFunction=Se,Ue.exports.isObject=je,Ue.exports.isArray=Ee,Ue.exports.isEmpty=ke,Ue.exports.isPlainObject=me,Ue.exports.getValue=ve}).call(this)},{}],430:[function(oe,Ue,Ie){(function(){Ue.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(oe,Ue,Ie){(function(){var de,ve,Ee;de=oe("./NodeType"),Ee=oe("./XMLNode"),Ue.exports=ve=function(){function ke(Se,je,me){if(this.parent=Se,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),je==null)throw new Error("Missing attribute name. "+this.debugInfo(je));this.name=this.stringify.name(je),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,Ue,Ie){(function(){var de,ve,Ee,ke=function(je,me){for(var Pe in me)Se.call(me,Pe)&&(je[Pe]=me[Pe]);function fe(){this.constructor=je}return fe.prototype=me.prototype,je.prototype=new fe,je.__super__=me.prototype,je},Se={}.hasOwnProperty;de=oe("./NodeType"),Ee=oe("./XMLCharacterData"),Ue.exports=ve=function(je){ke(me,je);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,Ue,Ie){(function(){var de,ve,Ee=function(Se,je){for(var me in je)ke.call(je,me)&&(Se[me]=je[me]);function Pe(){this.constructor=Se}return Pe.prototype=je.prototype,Se.prototype=new Pe,Se.__super__=je.prototype,Se},ke={}.hasOwnProperty;ve=oe("./XMLNode"),Ue.exports=de=function(Se){Ee(je,Se);function je(me){je.__super__.constructor.call(this,me),this.value=""}return Object.defineProperty(je.prototype,"data",{get:function(){return this.value},set:function(me){return this.value=me||""}}),Object.defineProperty(je.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(je.prototype,"textContent",{get:function(){return this.value},set:function(me){return this.value=me||""}}),je.prototype.clone=function(){return Object.create(this)},je.prototype.substringData=function(me,Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.appendData=function(me){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.insertData=function(me,Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.deleteData=function(me,Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.replaceData=function(me,Pe,fe){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.isEqualNode=function(me){return!(!je.__super__.isEqualNode.apply(this,arguments).isEqualNode(me)||me.data!==this.data)},je}(ve)}).call(this)},{"./XMLNode":450}],434:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke=function(je,me){for(var Pe in me)Se.call(me,Pe)&&(je[Pe]=me[Pe]);function fe(){this.constructor=je}return fe.prototype=me.prototype,je.prototype=new fe,je.__super__=me.prototype,je},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLCharacterData"),Ue.exports=Ee=function(je){ke(me,je);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,Ue,Ie){(function(){var de,ve,Ee;ve=oe("./XMLDOMErrorHandler"),Ee=oe("./XMLDOMStringList"),Ue.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,je){return!0},ke.prototype.setParameter=function(Se,je){return je!=null?this.params[Se]=je:delete this.params[Se]},ke}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(oe,Ue,Ie){(function(){var de;Ue.exports=de=function(){function ve(){}return ve.prototype.handleError=function(Ee){throw new Error(Ee)},ve}()}).call(this)},{}],437:[function(oe,Ue,Ie){(function(){var de;Ue.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,Ue,Ie){(function(){var de;Ue.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,Ue,Ie){(function(){var de,ve,Ee,ke=function(je,me){for(var Pe in me)Se.call(me,Pe)&&(je[Pe]=me[Pe]);function fe(){this.constructor=je}return fe.prototype=me.prototype,je.prototype=new fe,je.__super__=me.prototype,je},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(je){ke(me,je);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,Ue,Ie){(function(){var de,ve,Ee,ke=function(je,me){for(var Pe in me)Se.call(me,Pe)&&(je[Pe]=me[Pe]);function fe(){this.constructor=je}return fe.prototype=me.prototype,je.prototype=new fe,je.__super__=me.prototype,je},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(je){ke(me,je);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,Ue,Ie){(function(){var de,ve,Ee,ke,Se=function(me,Pe){for(var fe in Pe)je.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},je={}.hasOwnProperty;ke=oe("./Utility").isObject,Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.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,Ue,Ie){(function(){var de,ve,Ee,ke=function(je,me){for(var Pe in me)Se.call(me,Pe)&&(je[Pe]=me[Pe]);function fe(){this.constructor=je}return fe.prototype=me.prototype,je.prototype=new fe,je.__super__=me.prototype,je},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(je){ke(me,je);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,Ue,Ie){(function(){var de,ve,Ee,ke,Se=function(me,Pe){for(var fe in Pe)je.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},je={}.hasOwnProperty;ke=oe("./Utility").isObject,Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.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,Ue,Ie){(function(){var de,ve,Ee,ke,Se,je,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"),Ue.exports=je=function(se){z(ie,se);function ie(le,ce,pe){var xe,Ae,De,Fe,Te,Ne;if(ie.__super__.constructor.call(this,le),this.type=de.DocType,le.children){for(Fe=le.children,Ae=0,De=Fe.length;Ae<De;Ae++)if(xe=Fe[Ae],xe.type===de.Element){this.name=xe.name;break}}this.documentObject=le,fe(ce)&&(Te=ce,ce=Te.pubID,pe=Te.sysID),pe==null&&(Ne=[ce,pe],pe=Ne[0],ce=Ne[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,Ae;for(xe={},Ae=this.children,ce=0,pe=Ae.length;ce<pe;ce++)le=Ae[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,Ae;for(xe={},Ae=this.children,ce=0,pe=Ae.length;ce<pe;ce++)le=Ae[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,Ae){var De;return De=new ve(this,le,ce,pe,xe,Ae),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,Ae){return this.attList(le,ce,pe,xe,Ae)},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,Ue,Ie){(function(){var de,ve,Ee,ke,Se,je,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"),je=oe("./XMLStringWriter"),Ue.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 je),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,Ue,Ie){(function(){var de,ve,Ee,ke,Se,je,me,Pe,fe,z,te,se,ie,le,ce,pe,xe,Ae,De,Fe,Te,Ne,Be,Ge,Ye={}.hasOwnProperty;Ge=oe("./Utility"),Ne=Ge.isObject,Te=Ge.isFunction,Be=Ge.isPlainObject,Fe=Ge.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"),je=oe("./XMLDTDAttList"),Pe=oe("./XMLDTDEntity"),me=oe("./XMLDTDElement"),fe=oe("./XMLDTDNotation"),Ee=oe("./XMLAttribute"),Ae=oe("./XMLStringifier"),xe=oe("./XMLStringWriter"),ve=oe("./WriterState"),Ue.exports=ie=function(){function Ke(Xe,ot,lt){var ut;this.name="?xml",this.type=de.Document,Xe||(Xe={}),ut={},Xe.writer?Be(Xe.writer)&&(ut=Xe.writer,Xe.writer=new xe):Xe.writer=new xe,this.options=Xe,this.writer=Xe.writer,this.writerOptions=this.writer.filterOptions(ut),this.stringify=new Ae(Xe),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 Ke.prototype.createChildNode=function(Xe){var ot,lt,ut,Ct,Je,nt,St,wt;switch(Xe.type){case de.CData:this.cdata(Xe.value);break;case de.Comment:this.comment(Xe.value);break;case de.Element:ut={},St=Xe.attribs;for(lt in St)Ye.call(St,lt)&&(ot=St[lt],ut[lt]=ot.value);this.node(Xe.name,ut);break;case de.Dummy:this.dummy();break;case de.Raw:this.raw(Xe.value);break;case de.Text:this.text(Xe.value);break;case de.ProcessingInstruction:this.instruction(Xe.target,Xe.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+Xe.constructor.name)}for(wt=Xe.children,Je=0,nt=wt.length;Je<nt;Je++)Ct=wt[Je],this.createChildNode(Ct),Ct.type===de.Element&&this.up();return this},Ke.prototype.dummy=function(){return this},Ke.prototype.node=function(Xe,ot,lt){var ut;if(Xe==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(Xe));return this.openCurrent(),Xe=Fe(Xe),ot==null&&(ot={}),ot=Fe(ot),Ne(ot)||(ut=[ot,lt],lt=ut[0],ot=ut[1]),this.currentNode=new le(this,Xe,ot),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,lt!=null&&this.text(lt),this},Ke.prototype.element=function(Xe,ot,lt){var ut,Ct,Je,nt,St,wt;if(this.currentNode&&this.currentNode.type===de.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Xe)||Ne(Xe)||Te(Xe))for(nt=this.options.noValidation,this.options.noValidation=!0,wt=new se(this.options).element("TEMP_ROOT"),wt.element(Xe),this.options.noValidation=nt,St=wt.children,Ct=0,Je=St.length;Ct<Je;Ct++)ut=St[Ct],this.createChildNode(ut),ut.type===de.Element&&this.up();else this.node(Xe,ot,lt);return this},Ke.prototype.attribute=function(Xe,ot){var lt,ut;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Xe));if(Xe!=null&&(Xe=Fe(Xe)),Ne(Xe))for(lt in Xe)Ye.call(Xe,lt)&&(ut=Xe[lt],this.attribute(lt,ut));else Te(ot)&&(ot=ot.apply()),this.options.keepNullAttributes&&ot==null?this.currentNode.attribs[Xe]=new Ee(this,Xe,""):ot!=null&&(this.currentNode.attribs[Xe]=new Ee(this,Xe,ot));return this},Ke.prototype.text=function(Xe){var ot;return this.openCurrent(),ot=new De(this,Xe),this.onData(this.writer.text(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.cdata=function(Xe){var ot;return this.openCurrent(),ot=new ke(this,Xe),this.onData(this.writer.cdata(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.comment=function(Xe){var ot;return this.openCurrent(),ot=new Se(this,Xe),this.onData(this.writer.comment(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.raw=function(Xe){var ot;return this.openCurrent(),ot=new pe(this,Xe),this.onData(this.writer.raw(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.instruction=function(Xe,ot){var lt,ut,Ct,Je,nt;if(this.openCurrent(),Xe!=null&&(Xe=Fe(Xe)),ot!=null&&(ot=Fe(ot)),Array.isArray(Xe))for(lt=0,Je=Xe.length;lt<Je;lt++)ut=Xe[lt],this.instruction(ut);else if(Ne(Xe))for(ut in Xe)Ye.call(Xe,ut)&&(Ct=Xe[ut],this.instruction(ut,Ct));else Te(ot)&&(ot=ot.apply()),nt=new ce(this,Xe,ot),this.onData(this.writer.processingInstruction(nt,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},Ke.prototype.declaration=function(Xe,ot,lt){var ut;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ut=new z(this,Xe,ot,lt),this.onData(this.writer.declaration(ut,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.doctype=function(Xe,ot,lt){if(this.openCurrent(),Xe==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=Xe,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Ke.prototype.dtdElement=function(Xe,ot){var lt;return this.openCurrent(),lt=new me(this,Xe,ot),this.onData(this.writer.dtdElement(lt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.attList=function(Xe,ot,lt,ut,Ct){var Je;return this.openCurrent(),Je=new je(this,Xe,ot,lt,ut,Ct),this.onData(this.writer.dtdAttList(Je,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.entity=function(Xe,ot){var lt;return this.openCurrent(),lt=new Pe(this,!1,Xe,ot),this.onData(this.writer.dtdEntity(lt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.pEntity=function(Xe,ot){var lt;return this.openCurrent(),lt=new Pe(this,!0,Xe,ot),this.onData(this.writer.dtdEntity(lt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.notation=function(Xe,ot){var lt;return this.openCurrent(),lt=new fe(this,Xe,ot),this.onData(this.writer.dtdNotation(lt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.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},Ke.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Ke.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Ke.prototype.openNode=function(Xe){var ot,lt,ut,Ct;if(!Xe.isOpen){if(!this.root&&this.currentLevel===0&&Xe.type===de.Element&&(this.root=Xe),lt="",Xe.type===de.Element){this.writerOptions.state=ve.OpenTag,lt=this.writer.indent(Xe,this.writerOptions,this.currentLevel)+"<"+Xe.name,Ct=Xe.attribs;for(ut in Ct)Ye.call(Ct,ut)&&(ot=Ct[ut],lt+=this.writer.attribute(ot,this.writerOptions,this.currentLevel));lt+=(Xe.children?">":"/>")+this.writer.endline(Xe,this.writerOptions,this.currentLevel),this.writerOptions.state=ve.InsideTag}else this.writerOptions.state=ve.OpenTag,lt=this.writer.indent(Xe,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+Xe.rootNodeName,Xe.pubID&&Xe.sysID?lt+=' PUBLIC "'+Xe.pubID+'" "'+Xe.sysID+'"':Xe.sysID&&(lt+=' SYSTEM "'+Xe.sysID+'"'),Xe.children?(lt+=" [",this.writerOptions.state=ve.InsideTag):(this.writerOptions.state=ve.CloseTag,lt+=">"),lt+=this.writer.endline(Xe,this.writerOptions,this.currentLevel);return this.onData(lt,this.currentLevel),Xe.isOpen=!0}},Ke.prototype.closeNode=function(Xe){var ot;if(!Xe.isClosed)return ot="",this.writerOptions.state=ve.CloseTag,Xe.type===de.Element?ot=this.writer.indent(Xe,this.writerOptions,this.currentLevel)+"</"+Xe.name+">"+this.writer.endline(Xe,this.writerOptions,this.currentLevel):ot=this.writer.indent(Xe,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(Xe,this.writerOptions,this.currentLevel),this.writerOptions.state=ve.None,this.onData(ot,this.currentLevel),Xe.isClosed=!0},Ke.prototype.onData=function(Xe,ot){return this.documentStarted=!0,this.onDataCallback(Xe,ot+1)},Ke.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Ke.prototype.debugInfo=function(Xe){return Xe==null?"":"node: <"+Xe+">"},Ke.prototype.ele=function(){return this.element.apply(this,arguments)},Ke.prototype.nod=function(Xe,ot,lt){return this.node(Xe,ot,lt)},Ke.prototype.txt=function(Xe){return this.text(Xe)},Ke.prototype.dat=function(Xe){return this.cdata(Xe)},Ke.prototype.com=function(Xe){return this.comment(Xe)},Ke.prototype.ins=function(Xe,ot){return this.instruction(Xe,ot)},Ke.prototype.dec=function(Xe,ot,lt){return this.declaration(Xe,ot,lt)},Ke.prototype.dtd=function(Xe,ot,lt){return this.doctype(Xe,ot,lt)},Ke.prototype.e=function(Xe,ot,lt){return this.element(Xe,ot,lt)},Ke.prototype.n=function(Xe,ot,lt){return this.node(Xe,ot,lt)},Ke.prototype.t=function(Xe){return this.text(Xe)},Ke.prototype.d=function(Xe){return this.cdata(Xe)},Ke.prototype.c=function(Xe){return this.comment(Xe)},Ke.prototype.r=function(Xe){return this.raw(Xe)},Ke.prototype.i=function(Xe,ot){return this.instruction(Xe,ot)},Ke.prototype.att=function(){return this.currentNode&&this.currentNode.type===de.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ke.prototype.a=function(){return this.currentNode&&this.currentNode.type===de.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ke.prototype.ent=function(Xe,ot){return this.entity(Xe,ot)},Ke.prototype.pent=function(Xe,ot){return this.pEntity(Xe,ot)},Ke.prototype.not=function(Xe,ot){return this.notation(Xe,ot)},Ke}()}).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,Ue,Ie){(function(){var de,ve,Ee,ke=function(je,me){for(var Pe in me)Se.call(me,Pe)&&(je[Pe]=me[Pe]);function fe(){this.constructor=je}return fe.prototype=me.prototype,je.prototype=new fe,je.__super__=me.prototype,je},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(je){ke(me,je);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,Ue,Ie){(function(){var de,ve,Ee,ke,Se,je,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,je=fe.getValue,Se=oe("./XMLNode"),de=oe("./NodeType"),ve=oe("./XMLAttribute"),ke=oe("./XMLNamedNodeMap"),Ue.exports=Ee=function(se){z(ie,se);function ie(le,ce,pe){var xe,Ae,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,Ae=0,De=Fe.length;Ae<De;Ae++)if(xe=Fe[Ae],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(Ae){var De;return De=Ae.clone(),De.parent=pe,pe.children.push(De)}),pe},ie.prototype.attribute=function(le,ce){var pe,xe;if(le!=null&&(le=je(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=je(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,Ue,Ie){(function(){var de;Ue.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,Ue,Ie){(function(){var de,ve,Ee,ke,Se,je,me,Pe,fe,z,te,se,ie,le,ce,pe,xe,Ae,De,Fe={}.hasOwnProperty;De=oe("./Utility"),Ae=De.isObject,xe=De.isFunction,pe=De.isEmpty,ce=De.getValue,Pe=null,Ee=null,ke=null,Se=null,je=null,ie=null,le=null,se=null,me=null,ve=null,te=null,fe=null,de=null,Ue.exports=z=function(){function Te(Ne){this.parent=Ne,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"),je=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 Ne;return Ne=this.parent.children.indexOf(this),this.parent.children[Ne-1]||null}}),Object.defineProperty(Te.prototype,"nextSibling",{get:function(){var Ne;return Ne=this.parent.children.indexOf(this),this.parent.children[Ne+1]||null}}),Object.defineProperty(Te.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(Te.prototype,"textContent",{get:function(){var Ne,Be,Ge,Ye,Ke;if(this.nodeType===ve.Element||this.nodeType===ve.DocumentFragment){for(Ke="",Ye=this.children,Be=0,Ge=Ye.length;Be<Ge;Be++)Ne=Ye[Be],Ne.textContent&&(Ke+=Ne.textContent);return Ke}else return null},set:function(Ne){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Te.prototype.setParent=function(Ne){var Be,Ge,Ye,Ke,Xe;for(this.parent=Ne,Ne&&(this.options=Ne.options,this.stringify=Ne.stringify),Ke=this.children,Xe=[],Ge=0,Ye=Ke.length;Ge<Ye;Ge++)Be=Ke[Ge],Xe.push(Be.setParent(this));return Xe},Te.prototype.element=function(Ne,Be,Ge){var Ye,Ke,Xe,ot,lt,ut,Ct,Je,nt,St,wt;if(ut=null,Be===null&&Ge==null&&(nt=[{},null],Be=nt[0],Ge=nt[1]),Be==null&&(Be={}),Be=ce(Be),Ae(Be)||(St=[Be,Ge],Ge=St[0],Be=St[1]),Ne!=null&&(Ne=ce(Ne)),Array.isArray(Ne))for(Xe=0,Ct=Ne.length;Xe<Ct;Xe++)Ke=Ne[Xe],ut=this.element(Ke);else if(xe(Ne))ut=this.element(Ne.apply());else if(Ae(Ne)){for(lt in Ne)if(Fe.call(Ne,lt))if(wt=Ne[lt],xe(wt)&&(wt=wt.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&lt.indexOf(this.stringify.convertAttKey)===0)ut=this.attribute(lt.substr(this.stringify.convertAttKey.length),wt);else if(!this.options.separateArrayItems&&Array.isArray(wt)&&pe(wt))ut=this.dummy();else if(Ae(wt)&&pe(wt))ut=this.element(lt);else if(!this.options.keepNullNodes&&wt==null)ut=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(wt))for(ot=0,Je=wt.length;ot<Je;ot++)Ke=wt[ot],Ye={},Ye[lt]=Ke,ut=this.element(Ye);else Ae(wt)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&lt.indexOf(this.stringify.convertTextKey)===0?ut=this.element(wt):(ut=this.element(lt),ut.element(wt)):ut=this.element(lt,wt)}else!this.options.keepNullNodes&&Ge===null?ut=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Ne.indexOf(this.stringify.convertTextKey)===0?ut=this.text(Ge):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Ne.indexOf(this.stringify.convertCDataKey)===0?ut=this.cdata(Ge):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Ne.indexOf(this.stringify.convertCommentKey)===0?ut=this.comment(Ge):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Ne.indexOf(this.stringify.convertRawKey)===0?ut=this.raw(Ge):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Ne.indexOf(this.stringify.convertPIKey)===0?ut=this.instruction(Ne.substr(this.stringify.convertPIKey.length),Ge):ut=this.node(Ne,Be,Ge);if(ut==null)throw new Error("Could not create any elements with: "+Ne+". "+this.debugInfo());return ut},Te.prototype.insertBefore=function(Ne,Be,Ge){var Ye,Ke,Xe,ot,lt;if(Ne!=null&&Ne.type)return Xe=Ne,ot=Be,Xe.setParent(this),ot?(Ke=children.indexOf(ot),lt=children.splice(Ke),children.push(Xe),Array.prototype.push.apply(children,lt)):children.push(Xe),Xe;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Ne));return Ke=this.parent.children.indexOf(this),lt=this.parent.children.splice(Ke),Ye=this.parent.element(Ne,Be,Ge),Array.prototype.push.apply(this.parent.children,lt),Ye},Te.prototype.insertAfter=function(Ne,Be,Ge){var Ye,Ke,Xe;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Ne));return Ke=this.parent.children.indexOf(this),Xe=this.parent.children.splice(Ke+1),Ye=this.parent.element(Ne,Be,Ge),Array.prototype.push.apply(this.parent.children,Xe),Ye},Te.prototype.remove=function(){var Ne,Be;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return Ne=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[Ne,Ne-Ne+1].concat(Be=[])),this.parent},Te.prototype.node=function(Ne,Be,Ge){var Ye,Ke;return Ne!=null&&(Ne=ce(Ne)),Be||(Be={}),Be=ce(Be),Ae(Be)||(Ke=[Be,Ge],Ge=Ke[0],Be=Ke[1]),Ye=new Pe(this,Ne,Be),Ge!=null&&Ye.text(Ge),this.children.push(Ye),Ye},Te.prototype.text=function(Ne){var Be;return Ae(Ne)&&this.element(Ne),Be=new le(this,Ne),this.children.push(Be),this},Te.prototype.cdata=function(Ne){var Be;return Be=new Ee(this,Ne),this.children.push(Be),this},Te.prototype.comment=function(Ne){var Be;return Be=new ke(this,Ne),this.children.push(Be),this},Te.prototype.commentBefore=function(Ne){var Be,Ge,Ye;return Ge=this.parent.children.indexOf(this),Ye=this.parent.children.splice(Ge),Be=this.parent.comment(Ne),Array.prototype.push.apply(this.parent.children,Ye),this},Te.prototype.commentAfter=function(Ne){var Be,Ge,Ye;return Ge=this.parent.children.indexOf(this),Ye=this.parent.children.splice(Ge+1),Be=this.parent.comment(Ne),Array.prototype.push.apply(this.parent.children,Ye),this},Te.prototype.raw=function(Ne){var Be;return Be=new ie(this,Ne),this.children.push(Be),this},Te.prototype.dummy=function(){var Ne;return Ne=new me(this),Ne},Te.prototype.instruction=function(Ne,Be){var Ge,Ye,Ke,Xe,ot;if(Ne!=null&&(Ne=ce(Ne)),Be!=null&&(Be=ce(Be)),Array.isArray(Ne))for(Xe=0,ot=Ne.length;Xe<ot;Xe++)Ge=Ne[Xe],this.instruction(Ge);else if(Ae(Ne))for(Ge in Ne)Fe.call(Ne,Ge)&&(Ye=Ne[Ge],this.instruction(Ge,Ye));else xe(Be)&&(Be=Be.apply()),Ke=new se(this,Ne,Be),this.children.push(Ke);return this},Te.prototype.instructionBefore=function(Ne,Be){var Ge,Ye,Ke;return Ye=this.parent.children.indexOf(this),Ke=this.parent.children.splice(Ye),Ge=this.parent.instruction(Ne,Be),Array.prototype.push.apply(this.parent.children,Ke),this},Te.prototype.instructionAfter=function(Ne,Be){var Ge,Ye,Ke;return Ye=this.parent.children.indexOf(this),Ke=this.parent.children.splice(Ye+1),Ge=this.parent.instruction(Ne,Be),Array.prototype.push.apply(this.parent.children,Ke),this},Te.prototype.declaration=function(Ne,Be,Ge){var Ye,Ke;return Ye=this.document(),Ke=new Se(Ye,Ne,Be,Ge),Ye.children.length===0?Ye.children.unshift(Ke):Ye.children[0].type===ve.Declaration?Ye.children[0]=Ke:Ye.children.unshift(Ke),Ye.root()||Ye},Te.prototype.dtd=function(Ne,Be){var Ge,Ye,Ke,Xe,ot,lt,ut,Ct,Je,nt;for(Ye=this.document(),Ke=new je(Ye,Ne,Be),Je=Ye.children,Xe=ot=0,ut=Je.length;ot<ut;Xe=++ot)if(Ge=Je[Xe],Ge.type===ve.DocType)return Ye.children[Xe]=Ke,Ke;for(nt=Ye.children,Xe=lt=0,Ct=nt.length;lt<Ct;Xe=++lt)if(Ge=nt[Xe],Ge.isRoot)return Ye.children.splice(Xe,0,Ke),Ke;return Ye.children.push(Ke),Ke},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 Ne;for(Ne=this;Ne;){if(Ne.type===ve.Document)return Ne.rootObject;if(Ne.isRoot)return Ne;Ne=Ne.parent}},Te.prototype.document=function(){var Ne;for(Ne=this;Ne;){if(Ne.type===ve.Document)return Ne;Ne=Ne.parent}},Te.prototype.end=function(Ne){return this.document().end(Ne)},Te.prototype.prev=function(){var Ne;if(Ne=this.parent.children.indexOf(this),Ne<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[Ne-1]},Te.prototype.next=function(){var Ne;if(Ne=this.parent.children.indexOf(this),Ne===-1||Ne===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[Ne+1]},Te.prototype.importDocument=function(Ne){var Be;return Be=Ne.root().clone(),Be.parent=this,Be.isRoot=!1,this.children.push(Be),this},Te.prototype.debugInfo=function(Ne){var Be,Ge;return Ne=Ne||this.name,Ne==null&&!((Be=this.parent)!=null&&Be.name)?"":Ne==null?"parent: <"+this.parent.name+">":(Ge=this.parent)!=null&&Ge.name?"node: <"+Ne+">, parent: <"+this.parent.name+">":"node: <"+Ne+">"},Te.prototype.ele=function(Ne,Be,Ge){return this.element(Ne,Be,Ge)},Te.prototype.nod=function(Ne,Be,Ge){return this.node(Ne,Be,Ge)},Te.prototype.txt=function(Ne){return this.text(Ne)},Te.prototype.dat=function(Ne){return this.cdata(Ne)},Te.prototype.com=function(Ne){return this.comment(Ne)},Te.prototype.ins=function(Ne,Be){return this.instruction(Ne,Be)},Te.prototype.doc=function(){return this.document()},Te.prototype.dec=function(Ne,Be,Ge){return this.declaration(Ne,Be,Ge)},Te.prototype.e=function(Ne,Be,Ge){return this.element(Ne,Be,Ge)},Te.prototype.n=function(Ne,Be,Ge){return this.node(Ne,Be,Ge)},Te.prototype.t=function(Ne){return this.text(Ne)},Te.prototype.d=function(Ne){return this.cdata(Ne)},Te.prototype.c=function(Ne){return this.comment(Ne)},Te.prototype.r=function(Ne){return this.raw(Ne)},Te.prototype.i=function(Ne,Be){return this.instruction(Ne,Be)},Te.prototype.u=function(){return this.up()},Te.prototype.importXMLBuilder=function(Ne){return this.importDocument(Ne)},Te.prototype.replaceChild=function(Ne,Be){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.removeChild=function(Ne){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.appendChild=function(Ne){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.hasChildNodes=function(){return this.children.length!==0},Te.prototype.cloneNode=function(Ne){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(Ne,Be){return!0},Te.prototype.hasAttributes=function(){return this.attribs.length!==0},Te.prototype.compareDocumentPosition=function(Ne){var Be,Ge;return Be=this,Be===Ne?0:this.document()!==Ne.document()?(Ge=de.Disconnected|de.ImplementationSpecific,Math.random()<.5?Ge|=de.Preceding:Ge|=de.Following,Ge):Be.isAncestor(Ne)?de.Contains|de.Preceding:Be.isDescendant(Ne)?de.Contains|de.Following:Be.isPreceding(Ne)?de.Preceding:de.Following},Te.prototype.isSameNode=function(Ne){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.lookupPrefix=function(Ne){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.isDefaultNamespace=function(Ne){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.lookupNamespaceURI=function(Ne){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.isEqualNode=function(Ne){var Be,Ge,Ye;if(Ne.nodeType!==this.nodeType||Ne.children.length!==this.children.length)return!1;for(Be=Ge=0,Ye=this.children.length-1;0<=Ye?Ge<=Ye:Ge>=Ye;Be=0<=Ye?++Ge:--Ge)if(!this.children[Be].isEqualNode(Ne.children[Be]))return!1;return!0},Te.prototype.getFeature=function(Ne,Be){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.setUserData=function(Ne,Be,Ge){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.getUserData=function(Ne){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.contains=function(Ne){return Ne?Ne===this||this.isDescendant(Ne):!1},Te.prototype.isDescendant=function(Ne){var Be,Ge,Ye,Ke,Xe;for(Xe=this.children,Ye=0,Ke=Xe.length;Ye<Ke;Ye++)if(Be=Xe[Ye],Ne===Be||(Ge=Be.isDescendant(Ne),Ge))return!0;return!1},Te.prototype.isAncestor=function(Ne){return Ne.isDescendant(this)},Te.prototype.isPreceding=function(Ne){var Be,Ge;return Be=this.treePosition(Ne),Ge=this.treePosition(this),Be===-1||Ge===-1?!1:Be<Ge},Te.prototype.isFollowing=function(Ne){var Be,Ge;return Be=this.treePosition(Ne),Ge=this.treePosition(this),Be===-1||Ge===-1?!1:Be>Ge},Te.prototype.treePosition=function(Ne){var Be,Ge;return Ge=0,Be=!1,this.foreachTreeNode(this.document(),function(Ye){if(Ge++,!Be&&Ye===Ne)return Be=!0}),Be?Ge:-1},Te.prototype.foreachTreeNode=function(Ne,Be){var Ge,Ye,Ke,Xe,ot;for(Ne||(Ne=this.document()),Xe=Ne.children,Ye=0,Ke=Xe.length;Ye<Ke;Ye++){if(Ge=Xe[Ye],ot=Be(Ge))return ot;if(ot=this.foreachTreeNode(Ge,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,Ue,Ie){(function(){var de;Ue.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,Ue,Ie){(function(){var de,ve,Ee,ke=function(je,me){for(var Pe in me)Se.call(me,Pe)&&(je[Pe]=me[Pe]);function fe(){this.constructor=je}return fe.prototype=me.prototype,je.prototype=new fe,je.__super__=me.prototype,je},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLCharacterData"),Ue.exports=Ee=function(je){ke(me,je);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,Ue,Ie){(function(){var de,ve,Ee,ke=function(je,me){for(var Pe in me)Se.call(me,Pe)&&(je[Pe]=me[Pe]);function fe(){this.constructor=je}return fe.prototype=me.prototype,je.prototype=new fe,je.__super__=me.prototype,je},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLNode"),Ue.exports=Ee=function(je){ke(me,je);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,Ue,Ie){(function(){var de,ve,Ee,ke,Se=function(me,Pe){for(var fe in Pe)je.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},je={}.hasOwnProperty;de=oe("./NodeType"),ke=oe("./XMLWriterBase"),ve=oe("./WriterState"),Ue.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,Ae,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),Ae=fe.children,De=[],le=0,pe=Ae.length;le<pe;le++)te=Ae[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,Ae,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(Ae in Fe)je.call(Fe,Ae)&&(se=Fe[Ae],this.attribute(se,z,te));if(le=fe.children.length,ce=le===0?null:fe.children[0],le===0||fe.children.every(function(Ne){return(Ne.type===de.Text||Ne.type===de.Raw)&&Ne.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,Ue,Ie){(function(){var de,ve,Ee=function(Se,je){for(var me in je)ke.call(je,me)&&(Se[me]=je[me]);function Pe(){this.constructor=Se}return Pe.prototype=je.prototype,Se.prototype=new Pe,Se.__super__=je.prototype,Se},ke={}.hasOwnProperty;ve=oe("./XMLWriterBase"),Ue.exports=de=function(Se){Ee(je,Se);function je(me){je.__super__.constructor.call(this,me)}return je.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},je}(ve)}).call(this)},{"./XMLWriterBase":458}],456:[function(oe,Ue,Ie){(function(){var de,ve=function(ke,Se){return function(){return ke.apply(Se,arguments)}},Ee={}.hasOwnProperty;Ue.exports=de=function(){function ke(Se){this.assertLegalName=ve(this.assertLegalName,this),this.assertLegalChar=ve(this.assertLegalChar,this);var je,me,Pe;Se||(Se={}),this.options=Se,this.options.version||(this.options.version="1.0"),me=Se.stringify||{};for(je in me)Ee.call(me,je)&&(Pe=me[je],this[je]=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 je,me;if(this.options.noValidation)return Se;if(je="",this.options.version==="1.0"){if(je=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,me=Se.match(je))throw new Error("Invalid character in string: "+Se+" at index "+me.index)}else if(this.options.version==="1.1"&&(je=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,me=Se.match(je)))throw new Error("Invalid character in string: "+Se+" at index "+me.index);return Se},ke.prototype.assertLegalName=function(Se){var je;if(this.options.noValidation)return Se;if(this.assertLegalChar(Se),je=/^([: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(je))throw new Error("Invalid character in name");return Se},ke.prototype.textEscape=function(Se){var je;return this.options.noValidation?Se:(je=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(je,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},ke.prototype.attEscape=function(Se){var je;return this.options.noValidation?Se:(je=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(je,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},ke}()}).call(this)},{}],457:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke=function(je,me){for(var Pe in me)Se.call(me,Pe)&&(je[Pe]=me[Pe]);function fe(){this.constructor=je}return fe.prototype=me.prototype,je.prototype=new fe,je.__super__=me.prototype,je},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLCharacterData"),Ue.exports=Ee=function(je){ke(me,je);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,Ue,Ie){(function(){var de,ve,Ee,ke,Se,je,me,Pe,fe,z,te,se,ie,le,ce,pe,xe,Ae={}.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"),je=oe("./XMLDTDElement"),me=oe("./XMLDTDEntity"),Pe=oe("./XMLDTDNotation"),ve=oe("./WriterState"),Ue.exports=pe=function(){function De(Fe){var Te,Ne,Be;Fe||(Fe={}),this.options=Fe,Ne=Fe.writer||{};for(Te in Ne)Ae.call(Ne,Te)&&(Be=Ne[Te],this["_"+Te]=this[Te],this[Te]=Be)}return De.prototype.filterOptions=function(Fe){var Te,Ne,Be,Ge,Ye,Ke,Xe,ot;return Fe||(Fe={}),Fe=xe({},this.options,Fe),Te={writer:this},Te.pretty=Fe.pretty||!1,Te.allowEmpty=Fe.allowEmpty||!1,Te.indent=(Ne=Fe.indent)!=null?Ne:" ",Te.newline=(Be=Fe.newline)!=null?Be:`
`,Te.offset=(Ge=Fe.offset)!=null?Ge:0,Te.dontPrettyTextNodes=(Ye=(Ke=Fe.dontPrettyTextNodes)!=null?Ke:Fe.dontprettytextnodes)!=null?Ye:0,Te.spaceBeforeSlash=(Xe=(ot=Fe.spaceBeforeSlash)!=null?ot:Fe.spacebeforeslash)!=null?Xe:"",Te.spaceBeforeSlash===!0&&(Te.spaceBeforeSlash=" "),Te.suppressPrettyCount=0,Te.user={},Te.state=ve.None,Te},De.prototype.indent=function(Fe,Te,Ne){var Be;return!Te.pretty||Te.suppressPrettyCount?"":Te.pretty&&(Be=(Ne||0)+Te.offset+1,Be>0)?new Array(Be).join(Te.indent):""},De.prototype.endline=function(Fe,Te,Ne){return!Te.pretty||Te.suppressPrettyCount?"":Te.newline},De.prototype.attribute=function(Fe,Te,Ne){var Be;return this.openAttribute(Fe,Te,Ne),Be=" "+Fe.name+'="'+Fe.value+'"',this.closeAttribute(Fe,Te,Ne),Be},De.prototype.cdata=function(Fe,Te,Ne){var Be;return this.openNode(Fe,Te,Ne),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Ne)+"<![CDATA[",Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+="]]>"+this.endline(Fe,Te,Ne),Te.state=ve.None,this.closeNode(Fe,Te,Ne),Be},De.prototype.comment=function(Fe,Te,Ne){var Be;return this.openNode(Fe,Te,Ne),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Ne)+"<!-- ",Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+=" -->"+this.endline(Fe,Te,Ne),Te.state=ve.None,this.closeNode(Fe,Te,Ne),Be},De.prototype.declaration=function(Fe,Te,Ne){var Be;return this.openNode(Fe,Te,Ne),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Ne)+"<?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,Ne),Te.state=ve.None,this.closeNode(Fe,Te,Ne),Be},De.prototype.docType=function(Fe,Te,Ne){var Be,Ge,Ye,Ke,Xe;if(Ne||(Ne=0),this.openNode(Fe,Te,Ne),Te.state=ve.OpenTag,Ke=this.indent(Fe,Te,Ne),Ke+="<!DOCTYPE "+Fe.root().name,Fe.pubID&&Fe.sysID?Ke+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Ke+=' SYSTEM "'+Fe.sysID+'"'),Fe.children.length>0){for(Ke+=" [",Ke+=this.endline(Fe,Te,Ne),Te.state=ve.InsideTag,Xe=Fe.children,Ge=0,Ye=Xe.length;Ge<Ye;Ge++)Be=Xe[Ge],Ke+=this.writeChildNode(Be,Te,Ne+1);Te.state=ve.CloseTag,Ke+="]"}return Te.state=ve.CloseTag,Ke+=Te.spaceBeforeSlash+">",Ke+=this.endline(Fe,Te,Ne),Te.state=ve.None,this.closeNode(Fe,Te,Ne),Ke},De.prototype.element=function(Fe,Te,Ne){var Be,Ge,Ye,Ke,Xe,ot,lt,ut,Ct,Je,nt,St,wt,bt;Ne||(Ne=0),Je=!1,nt="",this.openNode(Fe,Te,Ne),Te.state=ve.OpenTag,nt+=this.indent(Fe,Te,Ne)+"<"+Fe.name,St=Fe.attribs;for(Ct in St)Ae.call(St,Ct)&&(Be=St[Ct],nt+=this.attribute(Be,Te,Ne));if(Ye=Fe.children.length,Ke=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?(nt+=">",Te.state=ve.CloseTag,nt+="</"+Fe.name+">"+this.endline(Fe,Te,Ne)):(Te.state=ve.CloseTag,nt+=Te.spaceBeforeSlash+"/>"+this.endline(Fe,Te,Ne));else if(Te.pretty&&Ye===1&&(Ke.type===de.Text||Ke.type===de.Raw)&&Ke.value!=null)nt+=">",Te.state=ve.InsideTag,Te.suppressPrettyCount++,Je=!0,nt+=this.writeChildNode(Ke,Te,Ne+1),Te.suppressPrettyCount--,Je=!1,Te.state=ve.CloseTag,nt+="</"+Fe.name+">"+this.endline(Fe,Te,Ne);else{if(Te.dontPrettyTextNodes){for(wt=Fe.children,Xe=0,lt=wt.length;Xe<lt;Xe++)if(Ge=wt[Xe],(Ge.type===de.Text||Ge.type===de.Raw)&&Ge.value!=null){Te.suppressPrettyCount++,Je=!0;break}}for(nt+=">"+this.endline(Fe,Te,Ne),Te.state=ve.InsideTag,bt=Fe.children,ot=0,ut=bt.length;ot<ut;ot++)Ge=bt[ot],nt+=this.writeChildNode(Ge,Te,Ne+1);Te.state=ve.CloseTag,nt+=this.indent(Fe,Te,Ne)+"</"+Fe.name+">",Je&&Te.suppressPrettyCount--,nt+=this.endline(Fe,Te,Ne),Te.state=ve.None}return this.closeNode(Fe,Te,Ne),nt},De.prototype.writeChildNode=function(Fe,Te,Ne){switch(Fe.type){case de.CData:return this.cdata(Fe,Te,Ne);case de.Comment:return this.comment(Fe,Te,Ne);case de.Element:return this.element(Fe,Te,Ne);case de.Raw:return this.raw(Fe,Te,Ne);case de.Text:return this.text(Fe,Te,Ne);case de.ProcessingInstruction:return this.processingInstruction(Fe,Te,Ne);case de.Dummy:return"";case de.Declaration:return this.declaration(Fe,Te,Ne);case de.DocType:return this.docType(Fe,Te,Ne);case de.AttributeDeclaration:return this.dtdAttList(Fe,Te,Ne);case de.ElementDeclaration:return this.dtdElement(Fe,Te,Ne);case de.EntityDeclaration:return this.dtdEntity(Fe,Te,Ne);case de.NotationDeclaration:return this.dtdNotation(Fe,Te,Ne);default:throw new Error("Unknown XML node type: "+Fe.constructor.name)}},De.prototype.processingInstruction=function(Fe,Te,Ne){var Be;return this.openNode(Fe,Te,Ne),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Ne)+"<?",Te.state=ve.InsideTag,Be+=Fe.target,Fe.value&&(Be+=" "+Fe.value),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+"?>",Be+=this.endline(Fe,Te,Ne),Te.state=ve.None,this.closeNode(Fe,Te,Ne),Be},De.prototype.raw=function(Fe,Te,Ne){var Be;return this.openNode(Fe,Te,Ne),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Ne),Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+=this.endline(Fe,Te,Ne),Te.state=ve.None,this.closeNode(Fe,Te,Ne),Be},De.prototype.text=function(Fe,Te,Ne){var Be;return this.openNode(Fe,Te,Ne),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Ne),Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+=this.endline(Fe,Te,Ne),Te.state=ve.None,this.closeNode(Fe,Te,Ne),Be},De.prototype.dtdAttList=function(Fe,Te,Ne){var Be;return this.openNode(Fe,Te,Ne),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Ne)+"<!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,Ne),Te.state=ve.None,this.closeNode(Fe,Te,Ne),Be},De.prototype.dtdElement=function(Fe,Te,Ne){var Be;return this.openNode(Fe,Te,Ne),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Ne)+"<!ELEMENT",Te.state=ve.InsideTag,Be+=" "+Fe.name+" "+Fe.value,Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+">"+this.endline(Fe,Te,Ne),Te.state=ve.None,this.closeNode(Fe,Te,Ne),Be},De.prototype.dtdEntity=function(Fe,Te,Ne){var Be;return this.openNode(Fe,Te,Ne),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Ne)+"<!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,Ne),Te.state=ve.None,this.closeNode(Fe,Te,Ne),Be},De.prototype.dtdNotation=function(Fe,Te,Ne){var Be;return this.openNode(Fe,Te,Ne),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Ne)+"<!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,Ne),Te.state=ve.None,this.closeNode(Fe,Te,Ne),Be},De.prototype.openNode=function(Fe,Te,Ne){},De.prototype.closeNode=function(Fe,Te,Ne){},De.prototype.openAttribute=function(Fe,Te,Ne){},De.prototype.closeAttribute=function(Fe,Te,Ne){},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,Ue,Ie){(function(){var de,ve,Ee,ke,Se,je,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"),je=oe("./XMLStreamWriter"),de=oe("./NodeType"),ve=oe("./WriterState"),Ue.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},Ue.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)},Ue.exports.stringWriter=function(te){return new me(te)},Ue.exports.streamWriter=function(te,se){return new je(te,se)},Ue.exports.implementation=new Ee,Ue.exports.nodeType=de,Ue.exports.writerState=ve}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(oe,Ue,Ie){Ue.exports=ve;var de=Object.prototype.hasOwnProperty;function ve(){for(var Ee={},ke=0;ke<arguments.length;ke++){var Se=arguments[ke];for(var je in Se)de.call(Se,je)&&(Ee[je]=Se[je])}return Ee}},{}],461:[function(oe,Ue,Ie){"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,je=de.alloc(Se);je.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,je],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),Ae=te?me(se,te,xe):se(xe);return ie=null,pe?Ae.toString(pe):Ae}}}function fe(){var z=[].slice.call(arguments).join(" ");throw new Error([z,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}Ie.createHash=function(z){return Pe(z)},Ie.createHmac=function(z,te){return Pe(z,te)},Ie.createCredentials=function(){fe("sorry,createCredentials is not implemented yet")},Ie.createCipher=function(){fe("sorry,createCipher is not implemented yet")},Ie.createCipheriv=function(){fe("sorry,createCipheriv is not implemented yet")},Ie.createDecipher=function(){fe("sorry,createDecipher is not implemented yet")},Ie.createDecipheriv=function(){fe("sorry,createDecipheriv is not implemented yet")},Ie.createSign=function(){fe("sorry,createSign is not implemented yet")},Ie.createVerify=function(){fe("sorry,createVerify is not implemented yet")},Ie.createDiffieHellman=function(){fe("sorry,createDiffieHellman is not implemented yet")},Ie.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,Ue,Ie){"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 je(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 je(se,z,te)}Ue.exports={hash:me}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(oe,Ue,Ie){"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 Ae=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=je(ie,le,ce,pe,te[xe+1],5,-165796510),pe=je(pe,ie,le,ce,te[xe+6],9,-1069501632),ce=je(ce,pe,ie,le,te[xe+11],14,643717713),le=je(le,ce,pe,ie,te[xe+0],20,-373897302),ie=je(ie,le,ce,pe,te[xe+5],5,-701558691),pe=je(pe,ie,le,ce,te[xe+10],9,38016083),ce=je(ce,pe,ie,le,te[xe+15],14,-660478335),le=je(le,ce,pe,ie,te[xe+4],20,-405537848),ie=je(ie,le,ce,pe,te[xe+9],5,568446438),pe=je(pe,ie,le,ce,te[xe+14],9,-1019803690),ce=je(ce,pe,ie,le,te[xe+3],14,-187363961),le=je(le,ce,pe,ie,te[xe+8],20,1163531501),ie=je(ie,le,ce,pe,te[xe+13],5,-1444681467),pe=je(pe,ie,le,ce,te[xe+2],9,-51403784),ce=je(ce,pe,ie,le,te[xe+7],14,1735328473),le=je(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,Ae),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 je(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}Ue.exports=function(se){return de.hash(se,Ee,16)}},{"./helpers":462}],464:[function(oe,Ue,Ie){"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,Ae=se,De=ie,Fe=le,Te=0;Te<80;Te++){Te<16?fe[Te]=me[ce+Te]:fe[Te]=je(fe[Te-3]^fe[Te-8]^fe[Te-14]^fe[Te-16],1);var Ne=Se(Se(je(z,5),Ee(Te,te,se,ie)),Se(Se(le,fe[Te]),ke(Te)));le=ie,ie=se,se=je(te,30),te=z,z=Ne}z=Se(z,pe),te=Se(te,xe),se=Se(se,Ae),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 je(me,Pe){return me<<Pe|me>>>32-Pe}Ue.exports=function(Pe){return de.hash(Pe,ve,20,!0)}},{"./helpers":462}],465:[function(oe,Ue,Ie){"use strict";Ue.exports=function(){return function(){}}},{}],466:[function(oe,Ue,Ie){(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,je=oe("../lib/common/utils/isArray"),me=je.isArray;Ue.exports.string=function(z){return typeof z=="string"},Ue.exports.array=me,Ue.exports.buffer=de.isBuffer;function Pe(fe){return fe instanceof Se}Ue.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,Ue,Ie){"use strict";var de=oe("immediate"),ve=Ue.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,Ue,Ie){(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"),je=oe("url"),me=Ie;me.request=function(Pe,fe){typeof Pe=="string"?Pe=je.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,Ue,Ie){(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"),Ie.fetch=me(de.fetch)&&me(de.ReadableStream),Ie.writableStream=me(de.WritableStream),Ie.abortController=me(de.AbortController),Ie.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),Ie.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",je=Se&&me(de.ArrayBuffer.prototype.slice);Ie.arraybuffer=Ie.fetch||Se&&ke("arraybuffer"),Ie.msstream=!Ie.fetch&&je&&ke("ms-stream"),Ie.mozchunkedarraybuffer=!Ie.fetch&&Se&&ke("moz-chunked-arraybuffer"),Ie.overrideMimeType=Ie.fetch||(Ee()?me(Ee().overrideMimeType):!1),Ie.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,Ue,Ie){(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"),je=oe("./response"),me=oe("readable-stream"),Pe=oe("to-arraybuffer"),fe=je.IncomingMessage,z=je.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=Ue.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,Ae=!0;if(ce.mode==="disable-fetch"||"requestTimeout"in ce&&!ke.abortController)Ae=!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,Ae),pe._fetchTimer=null,pe.on("finish",function(){pe._onFinish()})};Se(se,me.Writable),se.prototype.setHeader=function(ce,pe){var xe=this,Ae=ce.toLowerCase();le.indexOf(Ae)===-1&&(xe._headers[Ae]={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,Ae=null;pe.method!=="GET"&&pe.method!=="HEAD"&&(ke.arraybuffer?Ae=Pe(Ee.concat(ce._body)):ke.blobConstructor?Ae=new ve.Blob(ce._body.map(function(Ge){return Pe(Ge)}),{type:(xe["content-type"]||{}).value||""}):Ae=Ee.concat(ce._body).toString());var De=[];if(Object.keys(xe).forEach(function(Ge){var Ye=xe[Ge].name,Ke=xe[Ge].value;Array.isArray(Ke)?Ke.forEach(function(Xe){De.push([Ye,Xe])}):De.push([Ye,Ke])}),ce._mode==="fetch"){var Fe=null,Te=null;if(ke.abortController){var Ne=new AbortController;Fe=Ne.signal,ce._fetchAbortController=Ne,"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:Ae||void 0,mode:"cors",credentials:pe.withCredentials?"include":"same-origin",signal:Fe}).then(function(Ge){ce._fetchResponse=Ge,ce._connect()},function(Ge){ve.clearTimeout(ce._fetchTimer),ce._destroyed||ce.emit("error",Ge)})}else{var Be=ce._xhr=new ve.XMLHttpRequest;try{Be.open(ce._opts.method,ce._opts.url,!0)}catch(Ge){de.nextTick(function(){ce.emit("error",Ge)});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(Ge){Be.setRequestHeader(Ge[0],Ge[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(Ae)}catch(Ge){de.nextTick(function(){ce.emit("error",Ge)});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 Ae=this;Ae._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 Ae=this;typeof ce=="function"&&(xe=ce,ce=void 0),me.Writable.prototype.end.call(Ae,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,Ue,Ie){(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"),je=oe("readable-stream"),me=Ie.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},Pe=Ie.IncomingMessage=function(fe,z,te,se){var ie=this;if(je.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(Ne,Be){ie._destroyed?Be():ie.push(new Ee(Te))?Ne():ie._resumeFetch=Ne})},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 Ne=Te[1].toLowerCase();Ne==="set-cookie"?(ie.headers[Ne]===void 0&&(ie.headers[Ne]=[]),ie.headers[Ne].push(Te[2])):ie.headers[Ne]!==void 0?ie.headers[Ne]+=", "+Te[2]:ie.headers[Ne]=Te[2],ie.rawHeaders.push(Te[1],Te[2])}}),ie._charset="x-user-defined",!ke.overrideMimeType){var Ae=ie.rawHeaders["mime-type"];if(Ae){var De=Ae.match(/;\s*charset=([^;])(;|$)/);De&&(ie._charset=De[1].toLowerCase())}ie._charset||(ie._charset="utf-8")}}};Se(Pe,je.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,Ue,Ie){"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");Ie.parse=Te,Ie.resolve=Be,Ie.resolveObject=Ge,Ie.format=Ne,Ie.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 je=/^([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},Ae={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,Ke,Xe){if(Ye&&ke.isObject(Ye)&&Ye instanceof Se)return Ye;var ot=new Se;return ot.parse(Ye,Ke,Xe),ot}Se.prototype.parse=function(Ye,Ke,Xe){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("#")?"?":"#",ut=Ye.split(lt),Ct=/\\/g;ut[0]=ut[0].replace(Ct,"/"),Ye=ut.join(lt);var Je=Ye;if(Je=Je.trim(),!Xe&&Ye.split("#").length===1){var nt=Pe.exec(Je);if(nt)return this.path=Je,this.href=Je,this.pathname=nt[1],nt[2]?(this.search=nt[2],Ke?this.query=Fe.parse(this.search.substr(1)):this.query=this.search.substr(1)):Ke&&(this.search="",this.query={}),this}var St=je.exec(Je);if(St){St=St[0];var wt=St.toLowerCase();this.protocol=wt,Je=Je.substr(St.length)}if(Xe||St||Je.match(/^\/\/[^@\/]+@[^@\/]+/)){var bt=Je.substr(0,2)==="//";bt&&!(St&&Ae[St])&&(Je=Je.substr(2),this.slashes=!0)}if(!Ae[St]&&(bt||St&&!De[St])){for(var ct=-1,vt=0;vt<ie.length;vt++){var ht=Je.indexOf(ie[vt]);ht!==-1&&(ct===-1||ht<ct)&&(ct=ht)}var Lt,dt;ct===-1?dt=Je.lastIndexOf("@"):dt=Je.lastIndexOf("@",ct),dt!==-1&&(Lt=Je.slice(0,dt),Je=Je.slice(dt+1),this.auth=decodeURIComponent(Lt)),ct=-1;for(var vt=0;vt<se.length;vt++){var ht=Je.indexOf(se[vt]);ht!==-1&&(ct===-1||ht<ct)&&(ct=ht)}ct===-1&&(ct=Je.length),this.host=Je.slice(0,ct),Je=Je.slice(ct),this.parseHost(),this.hostname=this.hostname||"";var mt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!mt)for(var Et=this.hostname.split("."),vt=0,gt=Et.length;vt<gt;vt++){var $e=Et[vt];if($e&&!$e.match(ce)){for(var He="",we=0,Le=$e.length;we<Le;we++)$e.charCodeAt(we)>127?He+="x":He+=$e[we];if(!He.match(ce)){var We=Et.slice(0,vt),tt=Et.slice(vt+1),Re=$e.match(pe);Re&&(We.push(Re[1]),tt.unshift(Re[2])),tt.length&&(Je="/"+tt.join(".")+Je),this.hostname=We.join(".");break}}}this.hostname.length>le?this.hostname="":this.hostname=this.hostname.toLowerCase(),mt||(this.hostname=Ee.toASCII(this.hostname));var _e=this.port?":"+this.port:"",Ve=this.hostname||"";this.host=Ve+_e,this.href+=this.host,mt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Je[0]!=="/"&&(Je="/"+Je))}if(!xe[wt])for(var vt=0,gt=te.length;vt<gt;vt++){var it=te[vt];if(Je.indexOf(it)!==-1){var yt=encodeURIComponent(it);yt===it&&(yt=escape(it)),Je=Je.split(it).join(yt)}}var Pt=Je.indexOf("#");Pt!==-1&&(this.hash=Je.substr(Pt),Je=Je.slice(0,Pt));var jt=Je.indexOf("?");if(jt!==-1?(this.search=Je.substr(jt),this.query=Je.substr(jt+1),Ke&&(this.query=Fe.parse(this.query)),Je=Je.slice(0,jt)):Ke&&(this.search="",this.query={}),Je&&(this.pathname=Je),De[wt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _e=this.pathname||"",Nt=this.search||"";this.path=_e+Nt}return this.href=this.format(),this};function Ne(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 Ke=this.protocol||"",Xe=this.pathname||"",ot=this.hash||"",lt=!1,ut="";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&&(ut=Fe.stringify(this.query));var Ct=this.search||ut&&"?"+ut||"";return Ke&&Ke.substr(-1)!==":"&&(Ke+=":"),this.slashes||(!Ke||De[Ke])&&lt!==!1?(lt="//"+(lt||""),Xe&&Xe.charAt(0)!=="/"&&(Xe="/"+Xe)):lt||(lt=""),ot&&ot.charAt(0)!=="#"&&(ot="#"+ot),Ct&&Ct.charAt(0)!=="?"&&(Ct="?"+Ct),Xe=Xe.replace(/[?#]/g,function(Je){return encodeURIComponent(Je)}),Ct=Ct.replace("#","%23"),Ke+lt+Xe+Ct+ot};function Be(Ye,Ke){return Te(Ye,!1,!0).resolve(Ke)}Se.prototype.resolve=function(Ye){return this.resolveObject(Te(Ye,!1,!0)).format()};function Ge(Ye,Ke){return Ye?Te(Ye,!1,!0).resolveObject(Ke):Ke}Se.prototype.resolveObject=function(Ye){if(ke.isString(Ye)){var Ke=new Se;Ke.parse(Ye,!1,!0),Ye=Ke}for(var Xe=new Se,ot=Object.keys(this),lt=0;lt<ot.length;lt++){var ut=ot[lt];Xe[ut]=this[ut]}if(Xe.hash=Ye.hash,Ye.href==="")return Xe.href=Xe.format(),Xe;if(Ye.slashes&&!Ye.protocol){for(var Ct=Object.keys(Ye),Je=0;Je<Ct.length;Je++){var nt=Ct[Je];nt!=="protocol"&&(Xe[nt]=Ye[nt])}return De[Xe.protocol]&&Xe.hostname&&!Xe.pathname&&(Xe.path=Xe.pathname="/"),Xe.href=Xe.format(),Xe}if(Ye.protocol&&Ye.protocol!==Xe.protocol){if(!De[Ye.protocol]){for(var St=Object.keys(Ye),wt=0;wt<St.length;wt++){var bt=St[wt];Xe[bt]=Ye[bt]}return Xe.href=Xe.format(),Xe}if(Xe.protocol=Ye.protocol,!Ye.host&&!Ae[Ye.protocol]){for(var gt=(Ye.pathname||"").split("/");gt.length&&!(Ye.host=gt.shift()););Ye.host||(Ye.host=""),Ye.hostname||(Ye.hostname=""),gt[0]!==""&&gt.unshift(""),gt.length<2&&gt.unshift(""),Xe.pathname=gt.join("/")}else Xe.pathname=Ye.pathname;if(Xe.search=Ye.search,Xe.query=Ye.query,Xe.host=Ye.host||"",Xe.auth=Ye.auth,Xe.hostname=Ye.hostname||Ye.host,Xe.port=Ye.port,Xe.pathname||Xe.search){var ct=Xe.pathname||"",vt=Xe.search||"";Xe.path=ct+vt}return Xe.slashes=Xe.slashes||Ye.slashes,Xe.href=Xe.format(),Xe}var ht=Xe.pathname&&Xe.pathname.charAt(0)==="/",Lt=Ye.host||Ye.pathname&&Ye.pathname.charAt(0)==="/",dt=Lt||ht||Xe.host&&Ye.pathname,mt=dt,Et=Xe.pathname&&Xe.pathname.split("/")||[],gt=Ye.pathname&&Ye.pathname.split("/")||[],$e=Xe.protocol&&!De[Xe.protocol];if($e&&(Xe.hostname="",Xe.port=null,Xe.host&&(Et[0]===""?Et[0]=Xe.host:Et.unshift(Xe.host)),Xe.host="",Ye.protocol&&(Ye.hostname=null,Ye.port=null,Ye.host&&(gt[0]===""?gt[0]=Ye.host:gt.unshift(Ye.host)),Ye.host=null),dt=dt&&(gt[0]===""||Et[0]==="")),Lt)Xe.host=Ye.host||Ye.host===""?Ye.host:Xe.host,Xe.hostname=Ye.hostname||Ye.hostname===""?Ye.hostname:Xe.hostname,Xe.search=Ye.search,Xe.query=Ye.query,Et=gt;else if(gt.length)Et||(Et=[]),Et.pop(),Et=Et.concat(gt),Xe.search=Ye.search,Xe.query=Ye.query;else if(!ke.isNullOrUndefined(Ye.search)){if($e){Xe.hostname=Xe.host=Et.shift();var He=Xe.host&&Xe.host.indexOf("@")>0?Xe.host.split("@"):!1;He&&(Xe.auth=He.shift(),Xe.host=Xe.hostname=He.shift())}return Xe.search=Ye.search,Xe.query=Ye.query,(!ke.isNull(Xe.pathname)||!ke.isNull(Xe.search))&&(Xe.path=(Xe.pathname?Xe.pathname:"")+(Xe.search?Xe.search:"")),Xe.href=Xe.format(),Xe}if(!Et.length)return Xe.pathname=null,Xe.search?Xe.path="/"+Xe.search:Xe.path=null,Xe.href=Xe.format(),Xe;for(var we=Et.slice(-1)[0],Le=(Xe.host||Ye.host||Et.length>1)&&(we==="."||we==="..")||we==="",We=0,tt=Et.length;tt>=0;tt--)we=Et[tt],we==="."?Et.splice(tt,1):we===".."?(Et.splice(tt,1),We++):We&&(Et.splice(tt,1),We--);if(!dt&&!mt)for(;We--;We)Et.unshift("..");dt&&Et[0]!==""&&(!Et[0]||Et[0].charAt(0)!=="/")&&Et.unshift(""),Le&&Et.join("/").substr(-1)!=="/"&&Et.push("");var Re=Et[0]===""||Et[0]&&Et[0].charAt(0)==="/";if($e){Xe.hostname=Xe.host=Re?"":Et.length?Et.shift():"";var He=Xe.host&&Xe.host.indexOf("@")>0?Xe.host.split("@"):!1;He&&(Xe.auth=He.shift(),Xe.host=Xe.hostname=He.shift())}return dt=dt||Xe.host&&Et.length,dt&&!Re&&Et.unshift(""),Et.length?Xe.pathname=Et.join("/"):(Xe.pathname=null,Xe.path=null),(!ke.isNull(Xe.pathname)||!ke.isNull(Xe.search))&&(Xe.path=(Xe.pathname?Xe.pathname:"")+(Xe.search?Xe.search:"")),Xe.auth=Ye.auth||Xe.auth,Xe.slashes=Xe.slashes||Ye.slashes,Xe.href=Xe.format(),Xe},Se.prototype.parseHost=function(){var Ye=this.host,Ke=me.exec(Ye);Ke&&(Ke=Ke[0],Ke!==":"&&(this.port=Ke.substr(1)),Ye=Ye.substr(0,Ye.length-Ke.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,Ue,Ie){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/helpers/typeof"));Ue.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,Ue,Ie){"use strict";oe("core-js/modules/es.number.constructor.js"),Ie.encodeURIComponent=function(de){try{return encodeURIComponent(de)}catch(ve){return de}},Ie.escape=oe("escape-html"),Ie.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,Ue,Ie){(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"),je=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(Ae,De){return Ae===void 0?De:Ae}function ce(Ae){return Ae?Ae.split(";")[0].trim().toLowerCase():""}function pe(Ae,De){return function(Fe,Te,Ne){if(Fe)return De(Fe);Ae({data:Te,status:Ne.statusCode,headers:Ne.headers,res:Ne})}}Ie.TIMEOUTS=[z("300s"),z("300s")];var xe=["json","text"];Ie.request=function(De,Fe,Te){return arguments.length===2&&typeof Fe=="function"&&(Te=Fe,Fe=null),typeof Te=="function"?Ie.requestWithCallback(De,Fe,Te):new Promise(function(Ne,Be){Ie.requestWithCallback(De,Fe,pe(Ne,Be))})},Ie.requestWithCallback=function(De,Fe,Te){if(!De||typeof De!="string"&&(0,ke.default)(De)!=="object"){var Ne=Se.format("expect request url to be a string or a http request options, but got %j",De);throw new Error(Ne)}arguments.length===2&&typeof Fe=="function"&&(Te=Fe,Fe=null),Fe=Fe||{},te>=se&&(te=0);var Be=++te;Fe.requestUrls=Fe.requestUrls||[];var Ge={requestId:Be,url:De,args:Fe,ctx:Fe.ctx};Fe.emitter&&Fe.emitter.emit("request",Ge),Fe.timeout=Fe.timeout||Ie.TIMEOUTS,Fe.maxRedirects=Fe.maxRedirects||10,Fe.streaming=Fe.streaming||Fe.customResponse;var Ye=Date.now(),Ke;typeof De=="string"?(ie.test(De)||(De="https://"+De),Ke=je.parse(De)):Ke=De;var Xe=(Fe.type||Fe.method||Ke.method||"GET").toUpperCase(),ot=Ke.port||80,lt=me,ut=le(Fe.agent,Ie.agent),Ct=Fe.fixJSONCtlChars;Ke.protocol==="https:"&&(lt=Pe,ut=le(Fe.httpsAgent,Ie.httpsAgent),Ke.port||(ot=443));var Je={host:Ke.hostname||Ke.host||"localhost",path:Ke.path||"/",method:Xe,port:ot,agent:ut,headers:Fe.headers||{},lookup:Fe.lookup};Array.isArray(Fe.timeout)?Je.requestTimeout=Fe.timeout[Fe.timeout.length-1]:typeof Fe.timeout!="undefined"&&(Je.requestTimeout=Fe.timeout);var nt=Fe.auth||Ke.auth;nt&&(Je.auth=nt);var St=Fe.content||Fe.data,wt=Xe==="GET"||Xe==="HEAD"||Fe.dataAsQueryString;if(!Fe.content&&St&&!(typeof St=="string"||ve.isBuffer(St)))if(wt)St=Fe.nestedQuerystring?qs.stringify(St):querystring.stringify(St);else{var bt=Je.headers["Content-Type"]||Je.headers["content-type"];bt||(Fe.contentType==="json"?bt="application/json":bt="application/x-www-form-urlencoded",Je.headers["Content-Type"]=bt),ce(bt)==="application/json"?St=JSON.stringify(St):St=Fe.nestedQuerystring?qs.stringify(St):querystring.stringify(St)}wt&&St&&(Je.path+=(Ke.query?"&":"?")+St,St=null);var ct=0;if(St){var vt=St.length;ve.isBuffer(St)||(vt=ve.byteLength(St)),ct=Je.headers["Content-Length"]=vt}Fe.dataType==="json"&&(Je.headers.Accept="application/json"),typeof Fe.beforeRequest=="function"&&Fe.beforeRequest(Je);var ht=null,Lt=null,dt=null,mt=!1,Et=!1,gt=0,$e=-1,He=!1,we="",Le="",We=null;Fe.timing&&(We={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function tt(){ht&&(clearTimeout(ht),ht=null)}function Re(){Lt&&(clearTimeout(Lt),Lt=null)}function _e(Zt,hn,an){if(Re(),!Te){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Be,de.pid,Je.method,De),Zt&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),Be,de.pid,Zt.name,Zt.message,Zt.stack);return}var cn=Te;Te=null;var wn={};an&&($e=an.statusCode,wn=an.headers);var xn=Date.now()-Ye;We&&(We.contentDownload=xn),fe("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",xn,gt,$e,Je.method,Je.host,Je.path,Et,We);var Nn={status:$e,statusCode:$e,headers:wn,size:gt,aborted:He,rt:xn,keepAliveSocket:Et,data:hn,requestUrls:Fe.requestUrls,timing:We,remoteAddress:we,remotePort:Le};if(Zt){var Zn="";ut&&typeof ut.getCurrentStatus=="function"&&(Zn=", agent status: "+JSON.stringify(ut.getCurrentStatus())),Zt.message+=", "+Je.method+" "+De+" "+$e+" (connected: "+mt+", keepalive socket: "+Et+Zn+`)
headers: `+JSON.stringify(wn),Zt.data=hn,Zt.path=Je.path,Zt.status=$e,Zt.headers=wn,Zt.res=Nn}cn(Zt,hn,Fe.streaming?an:Nn),Fe.emitter&&(Ge.url=De,Ge.socket=en&&en.connection,Ge.options=Je,Ge.size=ct,Fe.emitter.emit("response",{requestId:Be,error:Zt,ctx:Fe.ctx,req:Ge,res:Nn}))}function Ve(Zt){var hn=null;if(Fe.followRedirect&&statuses.redirect[Zt.statusCode]){Fe._followRedirectCount=(Fe._followRedirectCount||0)+1;var an=Zt.headers.location;if(!an)hn=new Error("Got statusCode "+Zt.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,an):je.resolve(De,an);fe("Request#%d %s: `redirected` from %s to %s",Be,Je.path,De,cn),Re(),Fe.headers&&Fe.headers.Host&&ie.test(an)&&(Fe.headers.Host=null);var wn=Te;return Te=null,Ie.requestWithCallback(cn,Fe,wn),{redirect:!0,error:null}}}return{redirect:!1,error:hn}}Fe.gzip&&!Je.headers["Accept-Encoding"]&&!Je.headers["accept-encoding"]&&(Je.headers["Accept-Encoding"]="gzip");function it(Zt,hn,an){var cn=Zt.headers["content-encoding"];return an(null,hn,cn)}var yt=Fe.writeStream;fe("Request#%d %s %s with headers %j, options.path: %s",Be,Xe,De,Je.headers,Je.path),Fe.requestUrls.push(De);function Pt(Zt){if(We&&(We.waiting=Date.now()-Ye),fe("Request#%d %s `req response` event emit: status %d, headers: %j",Be,De,Zt.statusCode,Zt.headers),Fe.streaming){var hn=Ve(Zt);if(hn.redirect){Zt.resume();return}return hn.error?(Zt.resume(),_e(hn.error,null,Zt)):_e(null,null,Zt)}if(Zt.on("close",function(){fe("Request#%d %s: `res close` event emit, total size %d",Be,De,gt)}),Zt.on("error",function(){fe("Request#%d %s: `res error` event emit, total size %d",Be,De,gt)}),Zt.on("aborted",function(){He=!0,fe("Request#%d %s: `res aborted` event emit, total size %d",Be,De,gt)}),yt){var an=Ve(Zt);if(an.redirect){Zt.resume();return}return an.error?(Zt.resume(),yt.end(),_e(an.error,null,Zt)):(Fe.consumeWriteStream===!1?Zt.on("end",_e.bind(null,null,null,Zt)):yt.on("close",function(){fe("Request#%d %s: writeStream close event emitted",Be,De),_e(dt||null,null,Zt)}),Zt.pipe(yt))}var cn=[];Zt.on("data",function(wn){fe("Request#%d %s: `res data` event emit, size %d",Be,De,wn.length),gt+=wn.length,cn.push(wn)}),Zt.on("end",function(){var wn=ve.concat(cn,gt);if(fe("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Be,De,gt,Zt._dumped),dt)return _e(dt,wn,Zt);var xn=Ve(Zt);if(xn.error)return _e(xn.error,wn,Zt);xn.redirect||it(Zt,wn,function(Nn,Zn,Tr){if(Nn)return _e(Nn,wn,Zt);if(!Tr&&xe.indexOf(Fe.dataType)>=0){try{Zn=decodeBodyByCharset(Zn,Zt)}catch(qr){return fe("decodeBodyByCharset error: %s",qr),_e(null,Zn,Zt)}if(Fe.dataType==="json")if(gt===0)Zn=null;else{var qn=parseJSON(Zn,Ct);qn.error?Nn=qn.error:Zn=qn.data}}He&&fe("Request#%d %s: Remote socket was terminated before `response.end()` was called",Be,De),_e(Nn,Zn,Zt)})})}var jt,Nt;Array.isArray(Fe.timeout)?(jt=z(Fe.timeout[0]),Nt=z(Fe.timeout[1])):jt=Nt=z(Fe.timeout),fe("ConnectTimeout: %d, ResponseTimeout: %d",jt,Nt);function Bt(){fe("Connect timer ticking, timeout: %d",jt),ht=setTimeout(function(){ht=null,$e===-1&&($e=-2);var Zt="Connect timeout for "+jt+"ms",hn="ConnectionTimeoutError";en.socket||(hn="SocketAssignTimeoutError",Zt+=", working sockets is full"),dt=new Error(Zt),dt.name=hn,dt.requestId=Be,fe("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Be,De,dt.name,Zt,mt),qt()},jt)}function $t(){fe("Response timer ticking, timeout: %d",Nt),Lt=setTimeout(function(){Lt=null;var Zt="Response timeout for "+Nt+"ms",hn="ResponseTimeoutError";dt=new Error(Zt),dt.name=hn,dt.requestId=Be,fe("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Be,De,dt.name,Zt,mt),qt()},Nt)}var en;Je.mode=Fe.mode?Fe.mode:"";try{en=lt.request(Je,Pt)}catch(Zt){return _e(Zt)}typeof window=="undefined"?Bt():en.on("requestTimeout",function(){$e===-1&&($e=-2);var Zt="Connect timeout for "+jt+"ms",hn="ConnectionTimeoutError";dt=new Error(Zt),dt.name=hn,dt.requestId=Be,qt()});function qt(){fe("Request#%d %s abort, connected: %s",Be,De,mt),en.socket||(dt.noSocket=!0,_e(dt)),en.abort()}return We&&en.on("finish",function(){We.requestSent=Date.now()-Ye}),en.once("socket",function(Zt){We&&(We.queuing=Date.now()-Ye);var hn=Zt.readyState;if(hn==="opening"){Zt.once("lookup",function(an,cn,wn){fe("Request#%d %s lookup: %s, %s, %s",Be,De,an,cn,wn),We&&(We.dnslookup=Date.now()-Ye),cn&&(we=cn)}),Zt.once("connect",function(){We&&(We.connected=Date.now()-Ye),tt(),$t(),fe("Request#%d %s new socket connected",Be,De),mt=!0,we||(we=Zt.remoteAddress),Le=Zt.remotePort});return}fe("Request#%d %s reuse socket connected, readyState: %s",Be,De,hn),mt=!0,Et=!0,we||(we=Zt.remoteAddress),Le=Zt.remotePort,tt(),$t()}),en.on("error",function(Zt){(Zt.name==="Error"||Zt.name==="TypeError")&&(Zt.name=mt?"ResponseError":"RequestError"),Zt.message+=' (req "error")',fe("Request#%d %s `req error` event emit, %s: %s",Be,De,Zt.name,Zt.message),_e(dt||Zt)}),yt&&yt.once("error",function(Zt){Zt.message+=' (writeStream "error")',dt=Zt,fe("Request#%d %s `writeStream error` event emit, %s: %s",Be,De,Zt.name,Zt.message),qt()}),Fe.stream?(Fe.stream.pipe(en),Fe.stream.once("error",function(Zt){Zt.message+=' (stream "error")',dt=Zt,fe("Request#%d %s `readStream error` event emit, %s: %s",Be,De,Zt.name,Zt.message),qt()})):en.end(St),en.requestId=Be,en}}).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(Gn,jn,ft){(function(at){at(ft(89780))})(function(at){at.defineOption("placeholder","",function(Ee,ke,Se){var je=Se&&Se!=at.Init;if(ke&&!je)Ee.on("blur",Ie),Ee.on("change",de),Ee.on("swapDoc",de),at.on(Ee.getInputField(),"compositionupdate",Ee.state.placeholderCompose=function(){Ue(Ee)}),de(Ee);else if(!ke&&je){Ee.off("blur",Ie),Ee.off("change",de),Ee.off("swapDoc",de),at.off(Ee.getInputField(),"compositionupdate",Ee.state.placeholderCompose),Gt(Ee);var me=Ee.getWrapperElement();me.className=me.className.replace(" CodeMirror-empty","")}ke&&!Ee.hasFocus()&&Ie(Ee)});function Gt(Ee){Ee.state.placeholder&&(Ee.state.placeholder.parentNode.removeChild(Ee.state.placeholder),Ee.state.placeholder=null)}function oe(Ee){Gt(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 Ue(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):Gt(Ee)},20)}function Ie(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):Gt(Ee)}function ve(Ee){return Ee.lineCount()===1&&Ee.getLine(0)===""}})},25717:function(Gn,jn,ft){(function(at){at(ft(89780))})(function(at){var Gt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},oe=at.Pos;at.defineOption("autoCloseBrackets",!1,function(z,te,se){se&&se!=at.Init&&(z.removeKeyMap(Ie),z.state.closeBrackets=null),te&&(de(Ue(te,"pairs")),z.state.closeBrackets=te,z.addKeyMap(Ie))});function Ue(z,te){return te=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[te]!=null?z[te]:Gt[te]}var Ie={Backspace:ke,Enter:Se};function de(z){for(var te=0;te<z.length;te++){var se=z.charAt(te),ie="'"+se+"'";Ie[ie]||(Ie[ie]=ve(se))}}de(Gt.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=Ue(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&&Ue(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 Ae=ie[xe].head.line;z.indentLine(Ae,null,!0),z.indentLine(Ae+1,null,!0)}})}function je(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=Ue(se,"pairs"),le=ie.indexOf(te);if(le==-1)return at.Pass;for(var ce=Ue(se,"closeBefore"),pe=Ue(se,"triples"),xe=ie.charAt(le+1)==te,Ae=z.listSelections(),De=le%2==0,Fe,Te=0;Te<Ae.length;Te++){var Ne=Ae[Te],Be=Ne.head,Ge,Ye=z.getRange(Be,oe(Be.line,Be.ch+1));if(De&&!Ne.empty())Ge="surround";else if((xe||!De)&&Ye==te)xe&&fe(z,Be)?Ge="both":pe.indexOf(te)>=0&&z.getRange(Be,oe(Be.line,Be.ch+3))==te+te+te?Ge="skipThree":Ge="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;Ge="addFour"}else if(xe){var Ke=Be.ch==0?" ":z.getRange(oe(Be.line,Be.ch-1),Be);if(!at.isWordChar(Ye)&&Ke!=te&&!at.isWordChar(Ke))Ge="both";else return at.Pass}else if(De&&(Ye.length===0||/\s/.test(Ye)||ce.indexOf(Ye)>-1))Ge="both";else return at.Pass;if(!Fe)Fe=Ge;else if(Fe!=Ge)return at.Pass}var Xe=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 ut=z.getSelections(),lt=0;lt<ut.length;lt++)ut[lt]=Xe+ut[lt]+ot;z.replaceSelections(ut,"around"),ut=z.listSelections().slice();for(var lt=0;lt<ut.length;lt++)ut[lt]=je(ut[lt]);z.setSelections(ut)}else Fe=="both"?(z.replaceSelection(Xe+ot,null),z.triggerElectric(Xe+ot),z.execCommand("goCharLeft")):Fe=="addFour"&&(z.replaceSelection(Xe+Xe+Xe+Xe,"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(Gn,jn,ft){(function(at){at(ft(89780),ft(32855))})(function(at){at.defineOption("autoCloseTags",!1,function(ke,Se,je){if(je!=at.Init&&je&&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 Ue(Pe)}),ke.addKeyMap(me)}});var Gt=["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 Ue(ke){if(ke.getOption("disableInput"))return at.Pass;for(var Se=ke.listSelections(),je=[],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&&Gt,xe=typeof me=="object"&&me.indentTags||ce&&oe;z.end>fe.ch&&(le=le.slice(0,le.length-z.end+fe.ch));var Ae=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,Ae)>-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){je[Pe]={text:"/>",newPos:at.Pos(fe.line,fe.ch+2)};continue}var Fe=xe&&ve(xe,Ae)>-1;je[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 Ne=je[Pe];ke.replaceRange(Ne.text,Se[Pe].head,Se[Pe].anchor,"+insert");var Be=ke.listSelections().slice(0);Be[Pe]={head:Ne.newPos,anchor:Ne.newPos},ke.setSelections(Be),!Te&&Ne.indent&&(ke.indentLine(Ne.newPos.line,null,!0),ke.indentLine(Ne.newPos.line+1,null,!0))}}function Ie(ke,Se){for(var je=ke.listSelections(),me=[],Pe=Se?"/":"</",fe=ke.getOption("autoCloseTags"),z=typeof fe=="object"&&fe.dontIndentOnSlash,te=0;te<je.length;te++){if(!je[te].empty())return at.Pass;var se=je[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 Ae=le.mode.xmlCurrentContext&&le.mode.xmlCurrentContext(ce);if(!Ae||Ae.length&&Ee(ke,Ae,Ae[Ae.length-1],se))return at.Pass;pe=Pe+Ae[Ae.length-1]}ke.getLine(se.line).charAt(ie.end)!=">"&&(pe+=">"),me[te]=pe}if(ke.replaceSelections(me),je=ke.listSelections(),!z)for(var te=0;te<je.length;te++)(te==je.length-1||je[te].head.line<je[te+1].head.line)&&ke.indentLine(je[te].head.line)}function de(ke){return ke.getOption("disableInput")?at.Pass:Ie(ke,!0)}at.commands.closeTag=function(ke){return Ie(ke)};function ve(ke,Se){if(ke.indexOf)return ke.indexOf(Se);for(var je=0,me=ke.length;je<me;++je)if(ke[je]==Se)return je;return-1}function Ee(ke,Se,je,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!=je)return!1;for(var te=Pe?1:0,se=Se.length-1;se>=0&&Se[se]==je;se--)++te;me=z.to;for(var se=1;se<te;se++){var ie=at.scanForClosingTag(ke,me,null,fe);if(!ie||ie.tag!=je)return!1;me=ie.to}return!0}})},32855:function(Gn,jn,ft){(function(at){at(ft(89780))})(function(at){"use strict";var Gt=at.Pos;function oe(se,ie){return se.line-ie.line||se.ch-ie.ch}var Ue="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",Ie=Ue+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",de=new RegExp("<(/?)(["+Ue+"]["+Ie+"]*)","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(Gt(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 je(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,Ae=se.ch-(ce?ce[0].length:0);if(!ce||!(pe=je(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:Gt(xe,Ae),to:Gt(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,Ae=me(se);if(!Ae)return;if(Ae[1])le.push(Ae[2]);else{for(var De=le.length-1;De>=0;--De)if(le[De]==Ae[2]){le.length=De;break}if(De<0&&(!ie||ie==Ae[2]))return{tag:Ae[2],from:Gt(se.line,se.ch),to:Gt(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=je(le);if(!pe)return;if(!ce[1]&&pe!="selfClose"){var xe=Gt(le.line,le.ch),Ae=z(le,ce[2]);return Ae&&oe(Ae.from,xe)>0?{from:xe,to:Ae.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=je(ce),xe=pe&&Gt(ce.line,ce.ch),Ae=pe&&me(ce);if(!(!pe||!Ae||oe(ce,ie)>0)){var De={from:Gt(ce.line,ce.ch),to:xe,tag:Ae[2]};return pe=="selfClose"?{open:De,close:null,at:"open"}:Ae[1]?{open:te(ce,Ae[2]),close:De,at:"close"}:(ce=new ve(se,xe.line,xe.ch,le),{open:De,close:z(ce,Ae[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 Ae=new ve(se,ie.line,ie.ch,le),De=z(Ae,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(Gn){(function(jn,ft){Gn.exports=ft()})(this,function(){"use strict";var jn=navigator.userAgent,ft=navigator.platform,at=/gecko\/\d/i.test(jn),Gt=/MSIE \d/.test(jn),oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jn),Ue=/Edge\/(\d+)/.exec(jn),Ie=Gt||oe||Ue,de=Ie&&(Gt?document.documentMode||6:+(Ue||oe)[1]),ve=!Ue&&/WebKit\//.test(jn),Ee=ve&&/Qt\/\d+\.\d+/.test(jn),ke=!Ue&&/Chrome\//.test(jn),Se=/Opera\//.test(jn),je=/Apple Computer/.test(navigator.vendor),me=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(jn),Pe=/PhantomJS/.test(jn),fe=!Ue&&/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(ft),ie=/\bCrOS\b/.test(jn),le=/win/i.test(ft),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||Ie&&de>=9;function Ae(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var De=function(re,he){var Ce=re.className,be=Ae(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 Ne(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 qe=0;qe<he.length;++qe)Oe.appendChild(he[qe]);return Oe}function Be(re,he,Ce,be){var Oe=Ne(re,he,Ce,be);return Oe.setAttribute("role","presentation"),Oe}var Ge;document.createRange?Ge=function(re,he,Ce,be){var Oe=document.createRange();return Oe.setEnd(be||re,Ce),Oe.setStart(re,he),Oe}:Ge=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 Ke(){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 Xe(re,he){var Ce=re.className;Ae(he).test(Ce)||(re.className+=(Ce?" ":"")+he)}function ot(re,he){for(var Ce=re.split(" "),be=0;be<Ce.length;be++)Ce[be]&&!Ae(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}:Ie&&(lt=function(re){try{re.select()}catch(he){}});function ut(re){var he=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,he)}}function Ct(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 Je(re,he,Ce,be,Oe){he==null&&(he=re.search(/[^\s\u00a0]/),he==-1&&(he=re.length));for(var qe=be||0,pt=Oe||0;;){var Mt=re.indexOf(" ",qe);if(Mt<0||Mt>=he)return pt+(he-qe);pt+=Mt-qe,pt+=Ce-pt%Ce,qe=Mt+1}}var nt=function(){this.id=null,this.f=null,this.time=0,this.handler=ut(this.onTimeout,this)};nt.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},nt.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 St(re,he){for(var Ce=0;Ce<re.length;++Ce)if(re[Ce]==he)return Ce;return-1}var wt=50,bt={toString:function(){return"CodeMirror.Pass"}},ct={scroll:!1},vt={origin:"*mouse"},ht={origin:"+move"};function Lt(re,he,Ce){for(var be=0,Oe=0;;){var qe=re.indexOf(" ",be);qe==-1&&(qe=re.length);var pt=qe-be;if(qe==re.length||Oe+pt>=he)return be+Math.min(pt,he-Oe);if(Oe+=qe-be,Oe+=Ce-Oe%Ce,be=qe+1,Oe>=he)return be}}var dt=[""];function mt(re){for(;dt.length<=re;)dt.push(Et(dt)+" ");return dt[re]}function Et(re){return re[re.length-1]}function gt(re,he){for(var Ce=[],be=0;be<re.length;be++)Ce[be]=he(re[be],be);return Ce}function $e(re,he,Ce){for(var be=0,Oe=Ce(he);be<re.length&&Ce(re[be])<=Oe;)be++;re.splice(be,0,he)}function He(){}function we(re,he){var Ce;return Object.create?Ce=Object.create(re):(He.prototype=re,Ce=new He),he&&Ct(he,Ce),Ce}var Le=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function We(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||Le.test(re))}function tt(re,he){return he?he.source.indexOf("\\w")>-1&&We(re)?!0:he.test(re):We(re)}function Re(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 Ve(re){return re.charCodeAt(0)>=768&&_e.test(re)}function it(re,he,Ce){for(;(Ce<0?he>0:he<re.length)&&Ve(re.charAt(he));)he+=Ce;return he}function yt(re,he,Ce){for(var be=he>Ce?-1:1;;){if(he==Ce)return he;var Oe=(he+Ce)/2,qe=be<0?Math.ceil(Oe):Math.floor(Oe);if(qe==he)return re(qe)?he:Ce;re(qe)?Ce=qe:he=qe+be}}function Pt(re,he,Ce,be){if(!re)return be(he,Ce,"ltr",0);for(var Oe=!1,qe=0;qe<re.length;++qe){var pt=re[qe];(pt.from<Ce&&pt.to>he||he==Ce&&pt.to==he)&&(be(Math.max(pt.from,he),Math.min(pt.to,Ce),pt.level==1?"rtl":"ltr",qe),Oe=!0)}Oe||be(he,Ce,"ltr")}var jt=null;function Nt(re,he,Ce){var be;jt=null;for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe];if(qe.from<he&&qe.to>he)return Oe;qe.to==he&&(qe.from!=qe.to&&Ce=="before"?be=Oe:jt=Oe),qe.from==he&&(qe.from!=qe.to&&Ce!="before"?be=Oe:jt=Oe)}return be!=null?be:jt}var Bt=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",he="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Ce(Rt){return Rt<=247?re.charAt(Rt):1424<=Rt&&Rt<=1524?"R":1536<=Rt&&Rt<=1785?he.charAt(Rt-1536):1774<=Rt&&Rt<=2220?"r":8192<=Rt&&Rt<=8203?"w":Rt==8204?"b":"L"}var be=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Oe=/[stwN]/,qe=/[LRr]/,pt=/[Lb1n]/,Mt=/[1n]/;function kt(Rt,tn,_t){this.level=Rt,this.from=tn,this.to=_t}return function(Rt,tn){var _t=tn=="ltr"?"L":"R";if(Rt.length==0||tn=="ltr"&&!be.test(Rt))return!1;for(var yn=Rt.length,gn=[],lr=0;lr<yn;++lr)gn.push(Ce(Rt.charCodeAt(lr)));for(var pr=0,wr=_t;pr<yn;++pr){var Br=gn[pr];Br=="m"?gn[pr]=wr:wr=Br}for(var ri=0,Xr=_t;ri<yn;++ri){var ci=gn[ri];ci=="1"&&Xr=="r"?gn[ri]="n":qe.test(ci)&&(Xr=ci,ci=="r"&&(gn[ri]="R"))}for(var Ii=1,Vr=gn[0];Ii<yn-1;++Ii){var to=gn[Ii];to=="+"&&Vr=="1"&&gn[Ii+1]=="1"?gn[Ii]="1":to==","&&Vr==gn[Ii+1]&&(Vr=="1"||Vr=="n")&&(gn[Ii]=Vr),Vr=to}for(var Yo=0;Yo<yn;++Yo){var Ra=gn[Yo];if(Ra==",")gn[Yo]="N";else if(Ra=="%"){var ia=void 0;for(ia=Yo+1;ia<yn&&gn[ia]=="%";++ia);for(var Is=Yo&&gn[Yo-1]=="!"||ia<yn&&gn[ia]=="1"?"1":"N",ms=Yo;ms<ia;++ms)gn[ms]=Is;Yo=ia-1}}for(var Ma=0,Xs=_t;Ma<yn;++Ma){var as=gn[Ma];Xs=="L"&&as=="1"?gn[Ma]="L":qe.test(as)&&(Xs=as)}for(var La=0;La<yn;++La)if(Oe.test(gn[La])){var mo=void 0;for(mo=La+1;mo<yn&&Oe.test(gn[mo]);++mo);for(var ua=(La?gn[La-1]:_t)=="L",Xa=(mo<yn?gn[mo]:_t)=="L",ss=ua==Xa?ua?"L":"R":_t,Bl=La;Bl<mo;++Bl)gn[Bl]=ss;La=mo-1}for(var oa=[],Pl,pa=0;pa<yn;)if(pt.test(gn[pa])){var Af=pa;for(++pa;pa<yn&&pt.test(gn[pa]);++pa);oa.push(new kt(0,Af,pa))}else{var cl=pa,Ys=oa.length,_s=tn=="rtl"?1:0;for(++pa;pa<yn&&gn[pa]!="L";++pa);for(var Bo=cl;Bo<pa;)if(Mt.test(gn[Bo])){cl<Bo&&(oa.splice(Ys,0,new kt(1,cl,Bo)),Ys+=_s);var Ya=Bo;for(++Bo;Bo<pa&&Mt.test(gn[Bo]);++Bo);oa.splice(Ys,0,new kt(2,Ya,Bo)),Ys+=_s,cl=Bo}else++Bo;cl<pa&&oa.splice(Ys,0,new kt(1,cl,pa))}return tn=="ltr"&&(oa[0].level==1&&(Pl=Rt.match(/^\s+/))&&(oa[0].from=Pl[0].length,oa.unshift(new kt(0,0,Pl[0].length))),Et(oa).level==1&&(Pl=Rt.match(/\s+$/))&&(Et(oa).to-=Pl[0].length,oa.push(new kt(0,yn-Pl[0].length,yn)))),tn=="rtl"?oa.reverse():oa}}();function $t(re,he){var Ce=re.order;return Ce==null&&(Ce=re.order=Bt(re.text,he)),Ce}var en=[],qt=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]||en).concat(Ce)}};function Zt(re,he){return re._handlers&&re._handlers[he]||en}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 qe=St(Oe,Ce);qe>-1&&(be[he]=Oe.slice(0,qe).concat(Oe.slice(qe+1)))}}}function an(re,he){var Ce=Zt(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}}),an(re,Ce||he.type,re,he),qn(he)||he.codemirrorIgnore}function wn(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)St(Ce,he[be])==-1&&Ce.push(he[be])}function xn(re,he){return Zt(re,he).length>0}function Nn(re){re.prototype.on=function(he,Ce){qt(this,he,Ce)},re.prototype.off=function(he,Ce){hn(this,he,Ce)}}function Zn(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function Tr(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function qn(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function qr(re){Zn(re),Tr(re)}function nr(re){return re.target||re.srcElement}function $r(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 hi=function(){if(Ie&&de<9)return!1;var re=Ne("div");return"draggable"in re||"dragDrop"in re}(),Si;function Li(re){if(Si==null){var he=Ne("span","\u200B");Te(re,Ne("span",[he,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(Si=he.offsetWidth<=1&&he.offsetHeight>2&&!(Ie&&de<8))}var Ce=Si?Ne("span","\u200B"):Ne("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Ce.setAttribute("cm-text",""),Ce}var Ei;function Lr(re){if(Ei!=null)return Ei;var he=Te(re,document.createTextNode("A\u062EA")),Ce=Ge(he,0,1).getBoundingClientRect(),be=Ge(he,1,2).getBoundingClientRect();return Fe(re),!Ce||Ce.left==Ce.right?!1:Ei=be.right-Ce.right<3}var Ci=`
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 qe=re.slice(he,re.charAt(Oe-1)=="\r"?Oe-1:Oe),pt=qe.indexOf("\r");pt!=-1?(Ce.push(qe.slice(0,pt)),he+=pt+1):(Ce.push(qe),he=Oe+1)}return Ce}:function(re){return re.split(/\r\n?|\n/)},et=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},ai=function(){var re=Ne("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),Er=null;function Ln(re){if(Er!=null)return Er;var he=Te(re,Ne("span","x")),Ce=he.getBoundingClientRect(),be=Ge(he,0,1).getBoundingClientRect();return Er=Math.abs(Ce.left-be.left)>1}var An={},Bn={};function xr(re,he){arguments.length>2&&(he.dependencies=Array.prototype.slice.call(arguments,2)),An[re]=he}function zr(re,he){Bn[re]=he}function nn(re){if(typeof re=="string"&&Bn.hasOwnProperty(re))re=Bn[re];else if(re&&typeof re.name=="string"&&Bn.hasOwnProperty(re.name)){var he=Bn[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 nn("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return nn("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function sn(re,he){he=nn(he);var Ce=An[he.name];if(!Ce)return sn(re,"text/plain");var be=Ce(re,he);if(Ht.hasOwnProperty(he.name)){var Oe=Ht[he.name];for(var qe in Oe)Oe.hasOwnProperty(qe)&&(be.hasOwnProperty(qe)&&(be["_"+qe]=be[qe]),be[qe]=Oe[qe])}if(be.name=he.name,he.helperType&&(be.helperType=he.helperType),he.modeProps)for(var pt in he.modeProps)be[pt]=he.modeProps[pt];return be}var Ht={};function rn(re,he){var Ce=Ht.hasOwnProperty(re)?Ht[re]:Ht[re]={};Ct(he,Ce)}function tr(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 cr(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 Nr(re,he,Ce){return re.startState?re.startState(he,Ce):!0}var ln=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};ln.prototype.eol=function(){return this.pos>=this.string.length},ln.prototype.sol=function(){return this.pos==this.lineStart},ln.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ln.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ln.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},ln.prototype.eatWhile=function(re){for(var he=this.pos;this.eat(re););return this.pos>he},ln.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},ln.prototype.skipToEnd=function(){this.pos=this.string.length},ln.prototype.skipTo=function(re){var he=this.string.indexOf(re,this.pos);if(he>-1)return this.pos=he,!0},ln.prototype.backUp=function(re){this.pos-=re},ln.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Je(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Je(this.string,this.lineStart,this.tabSize):0)},ln.prototype.indentation=function(){return Je(this.string,null,this.tabSize)-(this.lineStart?Je(this.string,this.lineStart,this.tabSize):0)},ln.prototype.match=function(re,he,Ce){if(typeof re=="string"){var be=function(pt){return Ce?pt.toLowerCase():pt},Oe=this.string.substr(this.pos,re.length);if(be(Oe)==be(re))return he!==!1&&(this.pos+=re.length),!0}else{var qe=this.string.slice(this.pos).match(re);return qe&&qe.index>0?null:(qe&&he!==!1&&(this.pos+=qe[0].length),qe)}},ln.prototype.current=function(){return this.string.slice(this.start,this.pos)},ln.prototype.hideFirstChars=function(re,he){this.lineStart+=re;try{return he()}finally{this.lineStart-=re}},ln.prototype.lookAhead=function(re){var he=this.lineOracle;return he&&he.lookAhead(re)},ln.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function vn(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],qe=Oe.chunkSize();if(he<qe){Ce=Oe;break}he-=qe}return Ce.lines[he]}function kn(re,he,Ce){var be=[],Oe=he.line;return re.iter(he.line,Ce.line+1,function(qe){var pt=qe.text;Oe==Ce.line&&(pt=pt.slice(0,Ce.ch)),Oe==he.line&&(pt=pt.slice(he.ch)),be.push(pt),++Oe}),be}function Rr(re,he,Ce){var be=[];return re.iter(he,Ce,function(Oe){be.push(Oe.text)}),be}function Hn(re,he){var Ce=he-re.height;if(Ce)for(var be=re;be;be=be.parent)be.height+=Ce}function Ot(re){if(re.parent==null)return null;for(var he=re.parent,Ce=St(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 Ut(re,he){var Ce=re.first;e:do{for(var be=0;be<re.children.length;++be){var Oe=re.children[be],qe=Oe.height;if(he<qe){re=Oe;continue e}he-=qe,Ce+=Oe.chunkSize()}return Ce}while(!re.lines);for(var pt=0;pt<re.lines.length;++pt){var Mt=re.lines[pt],kt=Mt.height;if(he<kt)break;he-=kt}return Ce+pt}function Dn(re,he){return he>=re.first&&he<re.first+re.size}function Tn(re,he){return String(re.lineNumberFormatter(he+re.firstLineNumber))}function Qt(re,he,Ce){if(Ce===void 0&&(Ce=null),!(this instanceof Qt))return new Qt(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 vr(re,he){return re.sticky==he.sticky&&Fn(re,he)==0}function mr(re){return Qt(re.line,re.ch)}function er(re,he){return Fn(re,he)<0?he:re}function Un(re,he){return Fn(re,he)<0?re:he}function Rn(re,he){return Math.max(re.first,Math.min(he,re.first+re.size-1))}function $n(re,he){if(he.line<re.first)return Qt(re.first,0);var Ce=re.first+re.size-1;return he.line>Ce?Qt(Ce,vn(re,Ce).text.length):Fr(he,vn(re,he.line).text.length)}function Fr(re,he){var Ce=re.ch;return Ce==null||Ce>he?Qt(re.line,he):Ce<0?Qt(re.line,0):re}function br(re,he){for(var Ce=[],be=0;be<he.length;be++)Ce[be]=$n(re,he[be]);return Ce}var Pn=function(re,he){this.state=re,this.lookAhead=he},fr=function(re,he,Ce,be){this.state=he,this.doc=re,this.line=Ce,this.maxLookAhead=be||0,this.baseTokens=null,this.baseTokenPos=1};fr.prototype.lookAhead=function(re){var he=this.doc.getLine(this.line+re);return he!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),he},fr.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}},fr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},fr.fromSaved=function(re,he,Ce){return he instanceof Pn?new fr(re,tr(re.mode,he.state),Ce,he.lookAhead):new fr(re,tr(re.mode,he),Ce)},fr.prototype.save=function(re){var he=re!==!1?tr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Pn(he,this.maxLookAhead):he};function si(re,he,Ce,be){var Oe=[re.state.modeGen],qe={};pi(re,he.text,re.doc.mode,Ce,function(Rt,tn){return Oe.push(Rt,tn)},qe,be);for(var pt=Ce.state,Mt=function(Rt){Ce.baseTokens=Oe;var tn=re.state.overlays[Rt],_t=1,yn=0;Ce.state=!0,pi(re,he.text,tn.mode,Ce,function(gn,lr){for(var pr=_t;yn<gn;){var wr=Oe[_t];wr>gn&&Oe.splice(_t,1,gn,Oe[_t+1],wr),_t+=2,yn=Math.min(gn,wr)}if(lr)if(tn.opaque)Oe.splice(pr,_t-pr,gn,"overlay "+lr),_t=pr+2;else for(;pr<_t;pr+=2){var Br=Oe[pr+1];Oe[pr+1]=(Br?Br+" ":"")+"overlay "+lr}},qe),Ce.state=pt,Ce.baseTokens=null,Ce.baseTokenPos=1},kt=0;kt<re.state.overlays.length;++kt)Mt(kt);return{styles:Oe,classes:qe.bgClass||qe.textClass?qe:null}}function xi(re,he,Ce){if(!he.styles||he.styles[0]!=re.state.modeGen){var be=zi(re,Ot(he)),Oe=he.text.length>re.options.maxHighlightLength&&tr(re.doc.mode,be.state),qe=si(re,he,be);Oe&&(be.state=Oe),he.stateAfter=be.save(!Oe),he.styles=qe.styles,qe.classes?he.styleClasses=qe.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 zi(re,he,Ce){var be=re.doc,Oe=re.display;if(!be.mode.startState)return new fr(be,!0,he);var qe=ei(re,he,Ce),pt=qe>be.first&&vn(be,qe-1).stateAfter,Mt=pt?fr.fromSaved(be,pt,qe):new fr(be,Nr(be.mode),qe);return be.iter(qe,he,function(kt){Yt(re,kt.text,Mt);var Rt=Mt.line;kt.stateAfter=Rt==he-1||Rt%5==0||Rt>=Oe.viewFrom&&Rt<Oe.viewTo?Mt.save():null,Mt.nextLine()}),Ce&&(be.modeFrontier=Mt.line),Mt}function Yt(re,he,Ce,be){var Oe=re.doc.mode,qe=new ln(he,re.options.tabSize,Ce);for(qe.start=qe.pos=be||0,he==""&&Pr(Oe,Ce.state);!qe.eol();)Mr(Oe,qe,Ce.state),qe.start=qe.pos}function Pr(re,he){if(re.blankLine)return re.blankLine(he);if(re.innerMode){var Ce=cr(re,he);if(Ce.mode.blankLine)return Ce.mode.blankLine(Ce.state)}}function Mr(re,he,Ce,be){for(var Oe=0;Oe<10;Oe++){be&&(be[0]=cr(re,Ce).mode);var qe=re.token(he,Ce);if(he.pos>he.start)return qe}throw new Error("Mode "+re.name+" failed to advance stream.")}var ar=function(re,he,Ce){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=he||null,this.state=Ce};function mi(re,he,Ce,be){var Oe=re.doc,qe=Oe.mode,pt;he=$n(Oe,he);var Mt=vn(Oe,he.line),kt=zi(re,he.line,Ce),Rt=new ln(Mt.text,re.options.tabSize,kt),tn;for(be&&(tn=[]);(be||Rt.pos<he.ch)&&!Rt.eol();)Rt.start=Rt.pos,pt=Mr(qe,Rt,kt.state),be&&tn.push(new ar(Rt,pt,tr(Oe.mode,kt.state)));return be?tn:new ar(Rt,pt,kt.state)}function ii(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 pi(re,he,Ce,be,Oe,qe,pt){var Mt=Ce.flattenSpans;Mt==null&&(Mt=re.options.flattenSpans);var kt=0,Rt=null,tn=new ln(he,re.options.tabSize,be),_t,yn=re.options.addModeClass&&[null];for(he==""&&ii(Pr(Ce,be.state),qe);!tn.eol();){if(tn.pos>re.options.maxHighlightLength?(Mt=!1,pt&&Yt(re,he,be,tn.pos),tn.pos=he.length,_t=null):_t=ii(Mr(Ce,tn,be.state,yn),qe),yn){var gn=yn[0].name;gn&&(_t="m-"+(_t?gn+" "+_t:gn))}if(!Mt||Rt!=_t){for(;kt<tn.start;)kt=Math.min(tn.start,kt+5e3),Oe(kt,Rt);Rt=_t}tn.start=tn.pos}for(;kt<tn.pos;){var lr=Math.min(tn.pos,kt+5e3);Oe(lr,Rt),kt=lr}}function ei(re,he,Ce){for(var be,Oe,qe=re.doc,pt=Ce?-1:he-(re.doc.mode.innerMode?1e3:100),Mt=he;Mt>pt;--Mt){if(Mt<=qe.first)return qe.first;var kt=vn(qe,Mt-1),Rt=kt.stateAfter;if(Rt&&(!Ce||Mt+(Rt instanceof Pn?Rt.lookAhead:0)<=qe.modeFrontier))return Mt;var tn=Je(kt.text,null,re.options.tabSize);(Oe==null||be>tn)&&(Oe=Mt-1,be=tn)}return Oe}function ti(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=vn(re,be).stateAfter;if(Oe&&(!(Oe instanceof Pn)||be+Oe.lookAhead<he)){Ce=be+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,Ce)}}var yr=!1,on=!1;function sr(){yr=!0}function un(){on=!0}function gr(re,he,Ce){this.marker=re,this.from=he,this.to=Ce}function Kr(re,he){if(re)for(var Ce=0;Ce<re.length;++Ce){var be=re[Ce];if(be.marker==he)return be}}function Yr(re,he){for(var Ce,be=0;be<re.length;++be)re[be]!=he&&(Ce||(Ce=[])).push(re[be]);return Ce}function Di(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 qe=re[Oe],pt=qe.marker,Mt=qe.from==null||(pt.inclusiveLeft?qe.from<=he:qe.from<he);if(Mt||qe.from==he&&pt.type=="bookmark"&&(!Ce||!qe.marker.insertLeft)){var kt=qe.to==null||(pt.inclusiveRight?qe.to>=he:qe.to>he);(be||(be=[])).push(new gr(pt,qe.from,kt?null:qe.to))}}return be}function Zr(re,he,Ce){var be;if(re)for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe],pt=qe.marker,Mt=qe.to==null||(pt.inclusiveRight?qe.to>=he:qe.to>he);if(Mt||qe.from==he&&pt.type=="bookmark"&&(!Ce||qe.marker.insertLeft)){var kt=qe.from==null||(pt.inclusiveLeft?qe.from<=he:qe.from<he);(be||(be=[])).push(new gr(pt,kt?null:qe.from-he,qe.to==null?null:qe.to-he))}}return be}function Wi(re,he){if(he.full)return null;var Ce=Dn(re,he.from.line)&&vn(re,he.from.line).markedSpans,be=Dn(re,he.to.line)&&vn(re,he.to.line).markedSpans;if(!Ce&&!be)return null;var Oe=he.from.ch,qe=he.to.ch,pt=Fn(he.from,he.to)==0,Mt=oi(Ce,Oe,pt),kt=Zr(be,qe,pt),Rt=he.text.length==1,tn=Et(he.text).length+(Rt?Oe:0);if(Mt)for(var _t=0;_t<Mt.length;++_t){var yn=Mt[_t];if(yn.to==null){var gn=Kr(kt,yn.marker);gn?Rt&&(yn.to=gn.to==null?null:gn.to+tn):yn.to=Oe}}if(kt)for(var lr=0;lr<kt.length;++lr){var pr=kt[lr];if(pr.to!=null&&(pr.to+=tn),pr.from==null){var wr=Kr(Mt,pr.marker);wr||(pr.from=tn,Rt&&(Mt||(Mt=[])).push(pr))}else pr.from+=tn,Rt&&(Mt||(Mt=[])).push(pr)}Mt&&(Mt=Jt(Mt)),kt&&kt!=Mt&&(kt=Jt(kt));var Br=[Mt];if(!Rt){var ri=he.text.length-2,Xr;if(ri>0&&Mt)for(var ci=0;ci<Mt.length;++ci)Mt[ci].to==null&&(Xr||(Xr=[])).push(new gr(Mt[ci].marker,null,null));for(var Ii=0;Ii<ri;++Ii)Br.push(Xr);Br.push(kt)}return Br}function Jt(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(gn){if(gn.markedSpans)for(var lr=0;lr<gn.markedSpans.length;++lr){var pr=gn.markedSpans[lr].marker;pr.readOnly&&(!be||St(be,pr)==-1)&&(be||(be=[])).push(pr)}}),!be)return null;for(var Oe=[{from:he,to:Ce}],qe=0;qe<be.length;++qe)for(var pt=be[qe],Mt=pt.find(0),kt=0;kt<Oe.length;++kt){var Rt=Oe[kt];if(!(Fn(Rt.to,Mt.from)<0||Fn(Rt.from,Mt.to)>0)){var tn=[kt,1],_t=Fn(Rt.from,Mt.from),yn=Fn(Rt.to,Mt.to);(_t<0||!pt.inclusiveLeft&&!_t)&&tn.push({from:Rt.from,to:Mt.from}),(yn>0||!pt.inclusiveRight&&!yn)&&tn.push({from:Mt.to,to:Rt.to}),Oe.splice.apply(Oe,tn),kt+=tn.length-3}}return Oe}function Vt(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 On(re){return re.inclusiveLeft?-1:0}function Xn(re){return re.inclusiveRight?1:0}function dr(re,he){var Ce=re.lines.length-he.lines.length;if(Ce!=0)return Ce;var be=re.find(),Oe=he.find(),qe=Fn(be.from,Oe.from)||On(re)-On(he);if(qe)return-qe;var pt=Fn(be.to,Oe.to)||Xn(re)-Xn(he);return pt||he.id-re.id}function ur(re,he){var Ce=on&&re.markedSpans,be;if(Ce)for(var Oe=void 0,qe=0;qe<Ce.length;++qe)Oe=Ce[qe],Oe.marker.collapsed&&(he?Oe.from:Oe.to)==null&&(!be||dr(be,Oe.marker)<0)&&(be=Oe.marker);return be}function Qn(re){return ur(re,!0)}function mn(re){return ur(re,!1)}function zn(re,he){var Ce=on&&re.markedSpans,be;if(Ce)for(var Oe=0;Oe<Ce.length;++Oe){var qe=Ce[Oe];qe.marker.collapsed&&(qe.from==null||qe.from<he)&&(qe.to==null||qe.to>he)&&(!be||dr(be,qe.marker)<0)&&(be=qe.marker)}return be}function Vn(re,he,Ce,be,Oe){var qe=vn(re,he),pt=on&&qe.markedSpans;if(pt)for(var Mt=0;Mt<pt.length;++Mt){var kt=pt[Mt];if(kt.marker.collapsed){var Rt=kt.marker.find(0),tn=Fn(Rt.from,Ce)||On(kt.marker)-On(Oe),_t=Fn(Rt.to,be)||Xn(kt.marker)-Xn(Oe);if(!(tn>=0&&_t<=0||tn<=0&&_t>=0)&&(tn<=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?Fn(Rt.to,Ce)>=0:Fn(Rt.to,Ce)>0)||tn>=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?Fn(Rt.from,be)<=0:Fn(Rt.from,be)<0)))return!0}}}function Mn(re){for(var he;he=Qn(re);)re=he.find(-1,!0).line;return re}function Kn(re){for(var he;he=mn(re);)re=he.find(1,!0).line;return re}function In(re){for(var he,Ce;he=mn(re);)re=he.find(1,!0).line,(Ce||(Ce=[])).push(re);return Ce}function Jn(re,he){var Ce=vn(re,he),be=Mn(Ce);return Ce==be?he:Ot(be)}function ir(re,he){if(he>re.lastLine())return he;var Ce=vn(re,he),be;if(!fn(re,Ce))return he;for(;be=mn(Ce);)Ce=be.find(1,!0).line;return Ot(Ce)+1}function fn(re,he){var Ce=on&&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&&Ar(re,he,be))return!0}}}function Ar(re,he,Ce){if(Ce.to==null){var be=Ce.marker.find(1,!0);return Ar(re,be.line,Kr(be.line.markedSpans,Ce.marker))}if(Ce.marker.inclusiveRight&&Ce.to==he.text.length)return!0;for(var Oe=void 0,qe=0;qe<he.markedSpans.length;++qe)if(Oe=he.markedSpans[qe],Oe.marker.collapsed&&!Oe.marker.widgetNode&&Oe.from==Ce.to&&(Oe.to==null||Oe.to!=Ce.from)&&(Oe.marker.inclusiveLeft||Ce.marker.inclusiveRight)&&Ar(re,he,Oe))return!0}function Dr(re){re=Mn(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 qe=Ce.parent;qe;Ce=qe,qe=Ce.parent)for(var pt=0;pt<qe.children.length;++pt){var Mt=qe.children[pt];if(Mt==Ce)break;he+=Mt.height}return he}function fi(re){if(re.height==0)return 0;for(var he=re.text.length,Ce,be=re;Ce=Qn(be);){var Oe=Ce.find(0,!0);be=Oe.from.line,he+=Oe.from.ch-Oe.to.ch}for(be=re;Ce=mn(be);){var qe=Ce.find(0,!0);he-=be.text.length-qe.from.ch,be=qe.to.line,he+=be.text.length-qe.to.ch}return he}function Ir(re){var he=re.display,Ce=re.doc;he.maxLine=vn(Ce,Ce.first),he.maxLineLength=fi(he.maxLine),he.maxLineChanged=!0,Ce.iter(function(be){var Oe=fi(be);Oe>he.maxLineLength&&(he.maxLineLength=Oe,he.maxLine=be)})}var Mi=function(re,he,Ce){this.text=re,st(this,he),this.height=Ce?Ce(this):1};Mi.prototype.lineNo=function(){return Ot(this)},Nn(Mi);function Pi(re,he,Ce,be){re.text=he,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),Vt(re),st(re,Ce);var Oe=be?be(re):1;Oe!=re.height&&Hn(re,Oe)}function Bi(re){re.parent=null,Vt(re)}var ki={},Hi={};function qi(re,he){if(!re||/^\s*$/.test(re))return null;var Ce=he.addModeClass?Hi:ki;return Ce[re]||(Ce[re]=re.replace(/\S+/g,"cm-$&"))}function Xt(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 qe=Oe?he.rest[Oe-1]:he.line,pt=void 0;be.pos=0,be.addToken=gi,Lr(re.display.measure)&&(pt=$t(qe,re.doc.direction))&&(be.addToken=Hr(be.addToken,pt)),be.map=[];var Mt=he!=re.display.externalMeasured&&Ot(qe);Gi(qe,be,xi(re,qe,Mt)),qe.styleClasses&&(qe.styleClasses.bgClass&&(be.bgClass=ot(qe.styleClasses.bgClass,be.bgClass||"")),qe.styleClasses.textClass&&(be.textClass=ot(qe.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 an(re,"renderLine",re,he.line,be.pre),be.pre.className&&(be.textClass=ot(be.pre.className,be.textClass||"")),be}function Ni(re){var he=Ne("span","\u2022","cm-invalidchar");return he.title="\\u"+re.charCodeAt(0).toString(16),he.setAttribute("aria-label",he.title),he}function gi(re,he,Ce,be,Oe,qe,pt){if(he){var Mt=re.splitSpaces?Jr(he,re.trailingSpace):he,kt=re.cm.state.specialChars,Rt=!1,tn;if(!kt.test(he))re.col+=he.length,tn=document.createTextNode(Mt),re.map.push(re.pos,re.pos+he.length,tn),Ie&&de<9&&(Rt=!0),re.pos+=he.length;else{tn=document.createDocumentFragment();for(var _t=0;;){kt.lastIndex=_t;var yn=kt.exec(he),gn=yn?yn.index-_t:he.length-_t;if(gn){var lr=document.createTextNode(Mt.slice(_t,_t+gn));Ie&&de<9?tn.appendChild(Ne("span",[lr])):tn.appendChild(lr),re.map.push(re.pos,re.pos+gn,lr),re.col+=gn,re.pos+=gn}if(!yn)break;_t+=gn+1;var pr=void 0;if(yn[0]==" "){var wr=re.cm.options.tabSize,Br=wr-re.col%wr;pr=tn.appendChild(Ne("span",mt(Br),"cm-tab")),pr.setAttribute("role","presentation"),pr.setAttribute("cm-text"," "),re.col+=Br}else yn[0]=="\r"||yn[0]==`
`?(pr=tn.appendChild(Ne("span",yn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),pr.setAttribute("cm-text",yn[0]),re.col+=1):(pr=re.cm.options.specialCharPlaceholder(yn[0]),pr.setAttribute("cm-text",yn[0]),Ie&&de<9?tn.appendChild(Ne("span",[pr])):tn.appendChild(pr),re.col+=1);re.map.push(re.pos,re.pos+1,pr),re.pos++}}if(re.trailingSpace=Mt.charCodeAt(he.length-1)==32,Ce||be||Oe||Rt||qe||pt){var ri=Ce||"";be&&(ri+=be),Oe&&(ri+=Oe);var Xr=Ne("span",[tn],ri,qe);if(pt)for(var ci in pt)pt.hasOwnProperty(ci)&&ci!="style"&&ci!="class"&&Xr.setAttribute(ci,pt[ci]);return re.content.appendChild(Xr)}re.content.appendChild(tn)}}function Jr(re,he){if(re.length>1&&!/ /.test(re))return re;for(var Ce=he,be="",Oe=0;Oe<re.length;Oe++){var qe=re.charAt(Oe);qe==" "&&Ce&&(Oe==re.length-1||re.charCodeAt(Oe+1)==32)&&(qe="\xA0"),be+=qe,Ce=qe==" "}return be}function Hr(re,he){return function(Ce,be,Oe,qe,pt,Mt,kt){Oe=Oe?Oe+" cm-force-border":"cm-force-border";for(var Rt=Ce.pos,tn=Rt+be.length;;){for(var _t=void 0,yn=0;yn<he.length&&(_t=he[yn],!(_t.to>Rt&&_t.from<=Rt));yn++);if(_t.to>=tn)return re(Ce,be,Oe,qe,pt,Mt,kt);re(Ce,be.slice(0,_t.to-Rt),Oe,qe,null,Mt,kt),qe=null,be=be.slice(_t.to-Rt),Rt=_t.to}}}function Ti(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 Gi(re,he,Ce){var be=re.markedSpans,Oe=re.text,qe=0;if(!be){for(var pt=1;pt<Ce.length;pt+=2)he.addToken(he,Oe.slice(qe,qe=Ce[pt]),qi(Ce[pt+1],he.cm.options));return}for(var Mt=Oe.length,kt=0,Rt=1,tn="",_t,yn,gn=0,lr,pr,wr,Br,ri;;){if(gn==kt){lr=pr=wr=yn="",ri=null,Br=null,gn=1/0;for(var Xr=[],ci=void 0,Ii=0;Ii<be.length;++Ii){var Vr=be[Ii],to=Vr.marker;if(to.type=="bookmark"&&Vr.from==kt&&to.widgetNode)Xr.push(to);else if(Vr.from<=kt&&(Vr.to==null||Vr.to>kt||to.collapsed&&Vr.to==kt&&Vr.from==kt)){if(Vr.to!=null&&Vr.to!=kt&&gn>Vr.to&&(gn=Vr.to,pr=""),to.className&&(lr+=" "+to.className),to.css&&(yn=(yn?yn+";":"")+to.css),to.startStyle&&Vr.from==kt&&(wr+=" "+to.startStyle),to.endStyle&&Vr.to==gn&&(ci||(ci=[])).push(to.endStyle,Vr.to),to.title&&((ri||(ri={})).title=to.title),to.attributes)for(var Yo in to.attributes)(ri||(ri={}))[Yo]=to.attributes[Yo];to.collapsed&&(!Br||dr(Br.marker,to)<0)&&(Br=Vr)}else Vr.from>kt&&gn>Vr.from&&(gn=Vr.from)}if(ci)for(var Ra=0;Ra<ci.length;Ra+=2)ci[Ra+1]==gn&&(pr+=" "+ci[Ra]);if(!Br||Br.from==kt)for(var ia=0;ia<Xr.length;++ia)Ti(he,0,Xr[ia]);if(Br&&(Br.from||0)==kt){if(Ti(he,(Br.to==null?Mt+1:Br.to)-kt,Br.marker,Br.from==null),Br.to==null)return;Br.to==kt&&(Br=!1)}}if(kt>=Mt)break;for(var Is=Math.min(Mt,gn);;){if(tn){var ms=kt+tn.length;if(!Br){var Ma=ms>Is?tn.slice(0,Is-kt):tn;he.addToken(he,Ma,_t?_t+lr:lr,wr,kt+Ma.length==gn?pr:"",yn,ri)}if(ms>=Is){tn=tn.slice(Is-kt),kt=Is;break}kt=ms,wr=""}tn=Oe.slice(qe,qe=Ce[Rt++]),_t=qi(Ce[Rt++],he.cm.options)}}}function _i(re,he,Ce){this.line=he,this.rest=In(he),this.size=this.rest?Ot(Et(this.rest))-Ce+1:1,this.node=this.text=null,this.hidden=fn(re,he)}function li(re,he,Ce){for(var be=[],Oe,qe=he;qe<Ce;qe=Oe){var pt=new _i(re.doc,vn(re.doc,qe),qe);Oe=qe+pt.size,be.push(pt)}return be}var Ji=null;function _o(re){Ji?Ji.ops.push(re):re.ownsGroup=Ji={ops:[re],delayedCallbacks:[]}}function fa(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 bs(re,he){var Ce=re.ownsGroup;if(Ce)try{fa(Ce)}finally{Ji=null,he(Ce)}}var wa=null;function Wr(re,he){var Ce=Zt(re,he);if(Ce.length){var be=Array.prototype.slice.call(arguments,2),Oe;Ji?Oe=Ji.delayedCallbacks:wa?Oe=wa:(Oe=wa=[],setTimeout(bo,0));for(var qe=function(Mt){Oe.push(function(){return Ce[Mt].apply(null,be)})},pt=0;pt<Ce.length;++pt)qe(pt)}}function bo(){var re=wa;wa=null;for(var he=0;he<re.length;++he)re[he]()}function Po(re,he,Ce,be){for(var Oe=0;Oe<he.changes.length;Oe++){var qe=he.changes[Oe];qe=="text"?or(re,he):qe=="gutter"?ni(re,he,Ce,be):qe=="class"?_r(re,he):qe=="widget"&&bi(re,he,be)}he.changes=null}function ta(re){return re.node==re.text&&(re.node=Ne("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),Ie&&de<8&&(re.node.style.zIndex=2)),re.node}function Ao(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=ta(he);he.background=be.insertBefore(Ne("div",null,Ce),be.firstChild),re.display.input.setUneditable(he.background)}}function Vo(re,he){var Ce=re.display.externalMeasured;return Ce&&Ce.line==he.line?(re.display.externalMeasured=null,he.measure=Ce.measure,Ce.built):Xt(re,he)}function or(re,he){var Ce=he.text.className,be=Vo(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,_r(re,he)):Ce&&(he.text.className=Ce)}function _r(re,he){Ao(re,he),he.line.wrapClass?ta(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 ni(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=ta(he);he.gutterBackground=Ne("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 qe=he.line.gutterMarkers;if(re.options.lineNumbers||qe){var pt=ta(he),Mt=he.gutter=Ne("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?be.fixedPos:-be.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Mt),pt.insertBefore(Mt,he.text),he.line.gutterClass&&(Mt.className+=" "+he.line.gutterClass),re.options.lineNumbers&&(!qe||!qe["CodeMirror-linenumbers"])&&(he.lineNumber=Mt.appendChild(Ne("div",Tn(re.options,Ce),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+be.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),qe)for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var Rt=re.display.gutterSpecs[kt].className,tn=qe.hasOwnProperty(Rt)&&qe[Rt];tn&&Mt.appendChild(Ne("div",[tn],"CodeMirror-gutter-elt","left: "+be.gutterLeft[Rt]+"px; width: "+be.gutterWidth[Rt]+"px"))}}}function bi(re,he,Ce){he.alignable&&(he.alignable=null);for(var be=Ae("CodeMirror-linewidget"),Oe=he.node.firstChild,qe=void 0;Oe;Oe=qe)qe=Oe.nextSibling,be.test(Oe.className)&&he.node.removeChild(Oe);no(re,he,Ce)}function Ai(re,he,Ce,be){var Oe=Vo(re,he);return he.text=he.node=Oe.pre,Oe.bgClass&&(he.bgClass=Oe.bgClass),Oe.textClass&&(he.textClass=Oe.textClass),_r(re,he),ni(re,he,Ce,be),no(re,he,be),he.node}function no(re,he,Ce){if(Gr(re,he.line,he,Ce,!0),he.rest)for(var be=0;be<he.rest.length;be++)Gr(re,he.rest[be],he,Ce,!1)}function Gr(re,he,Ce,be,Oe){if(he.widgets)for(var qe=ta(Ce),pt=0,Mt=he.widgets;pt<Mt.length;++pt){var kt=Mt[pt],Rt=Ne("div",[kt.node],"CodeMirror-linewidget"+(kt.className?" "+kt.className:""));kt.handleMouseEvents||Rt.setAttribute("cm-ignore-events","true"),Aa(kt,Rt,Ce,be),re.display.input.setUneditable(Rt),Oe&&kt.above?qe.insertBefore(Rt,Ce.gutter||Ce.text):qe.appendChild(Rt),Wr(kt,"redraw")}}function Aa(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 zo(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,Ne("div",[re.node],null,Ce))}return re.height=re.node.parentNode.offsetHeight}function jo(re,he){for(var Ce=nr(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 Ri(re){return re.lineSpace.offsetTop}function Ko(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function ja(re){if(re.cachedPaddingH)return re.cachedPaddingH;var he=Te(re.measure,Ne("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 vo(re){return wt-re.display.nativeBarWidth}function fs(re){return re.display.scroller.clientWidth-vo(re)-re.display.barWidth}function ds(re){return re.display.scroller.clientHeight-vo(re)-re.display.barHeight}function Ps(re,he,Ce){var be=re.options.lineWrapping,Oe=be&&fs(re);if(!he.measure.heights||be&&he.measure.width!=Oe){var qe=he.measure.heights=[];if(be){he.measure.width=Oe;for(var pt=he.text.firstChild.getClientRects(),Mt=0;Mt<pt.length-1;Mt++){var kt=pt[Mt],Rt=pt[Mt+1];Math.abs(kt.bottom-Rt.bottom)>2&&qe.push((kt.bottom+Rt.top)/2-Ce.top)}}qe.push(Ce.bottom-Ce.top)}}function na(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(Ot(re.rest[Oe])>Ce)return{map:re.measure.maps[Oe],cache:re.measure.caches[Oe],before:!0}}function eh(re,he){he=Mn(he);var Ce=Ot(he),be=re.display.externalMeasured=new _i(re.doc,he,Ce);be.lineN=Ce;var Oe=be.built=Xt(re,be);return be.text=Oe.pre,Te(re.display.lineMeasure,Oe.pre),be}function ju(re,he,Ce,be){return Os(re,Sl(re,he),Ce,be)}function il(re,he){if(he>=re.display.viewFrom&&he<re.display.viewTo)return re.display.view[Ds(re,he)];var Ce=re.display.externalMeasured;if(Ce&&he>=Ce.lineN&&he<Ce.lineN+Ce.size)return Ce}function Sl(re,he){var Ce=Ot(he),be=il(re,Ce);be&&!be.text?be=null:be&&be.changes&&(Po(re,be,Ce,ol(re)),re.curOp.forceUpdate=!0),be||(be=eh(re,he));var Oe=na(be,he,Ce);return{line:he,view:be,rect:null,map:Oe.map,cache:Oe.cache,before:Oe.before,hasHeights:!1}}function Os(re,he,Ce,be,Oe){he.before&&(Ce=-1);var qe=Ce+(be||""),pt;return he.cache.hasOwnProperty(qe)?pt=he.cache[qe]:(he.rect||(he.rect=he.view.text.getBoundingClientRect()),he.hasHeights||(Ps(re,he.view,he.rect),he.hasHeights=!0),pt=Zo(re,he,Ce,be),pt.bogus||(he.cache[qe]=pt)),{left:pt.left,right:pt.right,top:Oe?pt.rtop:pt.top,bottom:Oe?pt.rbottom:pt.bottom}}var Kl={left:0,right:0,top:0,bottom:0};function th(re,he,Ce){for(var be,Oe,qe,pt,Mt,kt,Rt=0;Rt<re.length;Rt+=3)if(Mt=re[Rt],kt=re[Rt+1],he<Mt?(Oe=0,qe=1,pt="left"):he<kt?(Oe=he-Mt,qe=Oe+1):(Rt==re.length-3||he==kt&&re[Rt+3]>he)&&(qe=kt-Mt,Oe=qe-1,he>=kt&&(pt="right")),Oe!=null){if(be=re[Rt+2],Mt==kt&&Ce==(be.insertLeft?"left":"right")&&(pt=Ce),Ce=="left"&&Oe==0)for(;Rt&&re[Rt-2]==re[Rt-3]&&re[Rt-1].insertLeft;)be=re[(Rt-=3)+2],pt="left";if(Ce=="right"&&Oe==kt-Mt)for(;Rt<re.length-3&&re[Rt+3]==re[Rt+4]&&!re[Rt+5].insertLeft;)be=re[(Rt+=3)+2],pt="right";break}return{node:be,start:Oe,end:qe,collapse:pt,coverStart:Mt,coverEnd:kt}}function nh(re,he){var Ce=Kl;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 Zo(re,he,Ce,be){var Oe=th(he.map,Ce,be),qe=Oe.node,pt=Oe.start,Mt=Oe.end,kt=Oe.collapse,Rt;if(qe.nodeType==3){for(var tn=0;tn<4;tn++){for(;pt&&Ve(he.line.text.charAt(Oe.coverStart+pt));)--pt;for(;Oe.coverStart+Mt<Oe.coverEnd&&Ve(he.line.text.charAt(Oe.coverStart+Mt));)++Mt;if(Ie&&de<9&&pt==0&&Mt==Oe.coverEnd-Oe.coverStart?Rt=qe.parentNode.getBoundingClientRect():Rt=nh(Ge(qe,pt,Mt).getClientRects(),be),Rt.left||Rt.right||pt==0)break;Mt=pt,pt=pt-1,kt="right"}Ie&&de<11&&(Rt=Ou(re.display.measure,Rt))}else{pt>0&&(kt=be="right");var _t;re.options.lineWrapping&&(_t=qe.getClientRects()).length>1?Rt=_t[be=="right"?_t.length-1:0]:Rt=qe.getBoundingClientRect()}if(Ie&&de<9&&!pt&&(!Rt||!Rt.left&&!Rt.right)){var yn=qe.parentNode.getClientRects()[0];yn?Rt={left:yn.left,right:yn.left+Fs(re.display),top:yn.top,bottom:yn.bottom}:Rt=Kl}for(var gn=Rt.top-he.rect.top,lr=Rt.bottom-he.rect.top,pr=(gn+lr)/2,wr=he.view.measure.heights,Br=0;Br<wr.length-1&&!(pr<wr[Br]);Br++);var ri=Br?wr[Br-1]:0,Xr=wr[Br],ci={left:(kt=="right"?Rt.right:Rt.left)-he.rect.left,right:(kt=="left"?Rt.left:Rt.right)-he.rect.left,top:ri,bottom:Xr};return!Rt.left&&!Rt.right&&(ci.bogus=!0),re.options.singleCursorHeightPerLine||(ci.rtop=gn,ci.rbottom=lr),ci}function Ou(re,he){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ln(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 Zl(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 uu(re){Zl(re),re.display.cachedCharWidth=re.display.cachedTextHeight=re.display.cachedPaddingH=null,re.options.lineWrapping||(re.display.maxLineChanged=!0),re.display.lineNumChars=null}function Ca(){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 aa(re){var he=0;if(re.widgets)for(var Ce=0;Ce<re.widgets.length;++Ce)re.widgets[Ce].above&&(he+=zo(re.widgets[Ce]));return he}function ga(re,he,Ce,be,Oe){if(!Oe){var qe=aa(he);Ce.top+=qe,Ce.bottom+=qe}if(be=="line")return Ce;be||(be="local");var pt=Dr(he);if(be=="local"?pt+=Ri(re.display):pt-=re.display.viewOffset,be=="page"||be=="window"){var Mt=re.display.lineSpace.getBoundingClientRect();pt+=Mt.top+(be=="window"?0:Oa());var kt=Mt.left+(be=="window"?0:Ca());Ce.left+=kt,Ce.right+=kt}return Ce.top+=pt,Ce.bottom+=pt,Ce}function Xl(re,he,Ce){if(Ce=="div")return he;var be=he.left,Oe=he.top;if(Ce=="page")be-=Ca(),Oe-=Oa();else if(Ce=="local"||!Ce){var qe=re.display.sizer.getBoundingClientRect();be+=qe.left,Oe+=qe.top}var pt=re.display.lineSpace.getBoundingClientRect();return{left:be-pt.left,top:Oe-pt.top}}function Ga(re,he,Ce,be,Oe){return be||(be=vn(re.doc,he.line)),ga(re,be,ju(re,be,he.ch,Oe),Ce)}function co(re,he,Ce,be,Oe,qe){be=be||vn(re.doc,he.line),Oe||(Oe=Sl(re,be));function pt(lr,pr){var wr=Os(re,Oe,lr,pr?"right":"left",qe);return pr?wr.left=wr.right:wr.right=wr.left,ga(re,be,wr,Ce)}var Mt=$t(be,re.doc.direction),kt=he.ch,Rt=he.sticky;if(kt>=be.text.length?(kt=be.text.length,Rt="before"):kt<=0&&(kt=0,Rt="after"),!Mt)return pt(Rt=="before"?kt-1:kt,Rt=="before");function tn(lr,pr,wr){var Br=Mt[pr],ri=Br.level==1;return pt(wr?lr-1:lr,ri!=wr)}var _t=Nt(Mt,kt,Rt),yn=jt,gn=tn(kt,_t,Rt=="before");return yn!=null&&(gn.other=tn(kt,yn,Rt!="before")),gn}function oo(re,he){var Ce=0;he=$n(re.doc,he),re.options.lineWrapping||(Ce=Fs(re.display)*he.ch);var be=vn(re.doc,he.line),Oe=Dr(be)+Ri(re.display);return{left:Ce,right:Ce,top:Oe,bottom:Oe+be.height}}function Qi(re,he,Ce,be,Oe){var qe=Qt(re,he,Ce);return qe.xRel=Oe,be&&(qe.outside=be),qe}function sa(re,he,Ce){var be=re.doc;if(Ce+=re.display.viewOffset,Ce<0)return Qi(be.first,0,null,-1,-1);var Oe=Ut(be,Ce),qe=be.first+be.size-1;if(Oe>qe)return Qi(be.first+be.size-1,vn(be,qe).text.length,null,1,1);he<0&&(he=0);for(var pt=vn(be,Oe);;){var Mt=bn(re,pt,Oe,he,Ce),kt=zn(pt,Mt.ch+(Mt.xRel>0||Mt.outside>0?1:0));if(!kt)return Mt;var Rt=kt.find(1);if(Rt.line==Oe)return Rt;pt=vn(be,Oe=Rt.line)}}function Cr(re,he,Ce,be){be-=aa(he);var Oe=he.text.length,qe=yt(function(pt){return Os(re,Ce,pt-1).bottom<=be},Oe,0);return Oe=yt(function(pt){return Os(re,Ce,pt).top>be},qe,Oe),{begin:qe,end:Oe}}function da(re,he,Ce,be){Ce||(Ce=Sl(re,he));var Oe=ga(re,he,Os(re,Ce,be),"line").top;return Cr(re,he,Ce,Oe)}function zt(re,he,Ce,be){return re.bottom<=Ce?!1:re.top>Ce?!0:(be?re.left:re.right)>he}function bn(re,he,Ce,be,Oe){Oe-=Dr(he);var qe=Sl(re,he),pt=aa(he),Mt=0,kt=he.text.length,Rt=!0,tn=$t(he,re.doc.direction);if(tn){var _t=(re.options.lineWrapping?jl:Ws)(re,he,Ce,qe,tn,be,Oe);Rt=_t.level!=1,Mt=Rt?_t.from:_t.to-1,kt=Rt?_t.to:_t.from-1}var yn=null,gn=null,lr=yt(function(Ii){var Vr=Os(re,qe,Ii);return Vr.top+=pt,Vr.bottom+=pt,zt(Vr,be,Oe,!1)?(Vr.top<=Oe&&Vr.left<=be&&(yn=Ii,gn=Vr),!0):!1},Mt,kt),pr,wr,Br=!1;if(gn){var ri=be-gn.left<gn.right-be,Xr=ri==Rt;lr=yn+(Xr?0:1),wr=Xr?"after":"before",pr=ri?gn.left:gn.right}else{!Rt&&(lr==kt||lr==Mt)&&lr++,wr=lr==0?"after":lr==he.text.length?"before":Os(re,qe,lr-(Rt?1:0)).bottom+pt<=Oe==Rt?"after":"before";var ci=co(re,Qt(Ce,lr,wr),"line",he,qe);pr=ci.left,Br=Oe<ci.top?-1:Oe>=ci.bottom?1:0}return lr=it(he.text,lr,1),Qi(Ce,lr,wr,Br,be-pr)}function Ws(re,he,Ce,be,Oe,qe,pt){var Mt=yt(function(_t){var yn=Oe[_t],gn=yn.level!=1;return zt(co(re,Qt(Ce,gn?yn.to:yn.from,gn?"before":"after"),"line",he,be),qe,pt,!0)},0,Oe.length-1),kt=Oe[Mt];if(Mt>0){var Rt=kt.level!=1,tn=co(re,Qt(Ce,Rt?kt.from:kt.to,Rt?"after":"before"),"line",he,be);zt(tn,qe,pt,!0)&&tn.top>pt&&(kt=Oe[Mt-1])}return kt}function jl(re,he,Ce,be,Oe,qe,pt){var Mt=Cr(re,he,be,pt),kt=Mt.begin,Rt=Mt.end;/\s/.test(he.text.charAt(Rt-1))&&Rt--;for(var tn=null,_t=null,yn=0;yn<Oe.length;yn++){var gn=Oe[yn];if(!(gn.from>=Rt||gn.to<=kt)){var lr=gn.level!=1,pr=Os(re,be,lr?Math.min(Rt,gn.to)-1:Math.max(kt,gn.from)).right,wr=pr<qe?qe-pr+1e9:pr-qe;(!tn||_t>wr)&&(tn=gn,_t=wr)}}return tn||(tn=Oe[Oe.length-1]),tn.from<kt&&(tn={from:kt,to:tn.to,level:tn.level}),tn.to>Rt&&(tn={from:tn.from,to:Rt,level:tn.level}),tn}var $o;function ba(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if($o==null){$o=Ne("pre",null,"CodeMirror-line-like");for(var he=0;he<49;++he)$o.appendChild(document.createTextNode("x")),$o.appendChild(Ne("br"));$o.appendChild(document.createTextNode("x"))}Te(re.measure,$o);var Ce=$o.offsetHeight/50;return Ce>3&&(re.cachedTextHeight=Ce),Fe(re.measure),Ce||1}function Fs(re){if(re.cachedCharWidth!=null)return re.cachedCharWidth;var he=Ne("span","xxxxxxxxxx"),Ce=Ne("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 ol(re){for(var he=re.display,Ce={},be={},Oe=he.gutters.clientLeft,qe=he.gutters.firstChild,pt=0;qe;qe=qe.nextSibling,++pt){var Mt=re.display.gutterSpecs[pt].className;Ce[Mt]=qe.offsetLeft+qe.clientLeft+Oe,be[Mt]=qe.clientWidth}return{fixedPos:Fu(he),gutterTotalWidth:he.gutters.offsetWidth,gutterLeft:Ce,gutterWidth:be,wrapperWidth:he.wrapper.clientWidth}}function Fu(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function Oo(re){var he=ba(re.display),Ce=re.options.lineWrapping,be=Ce&&Math.max(5,re.display.scroller.clientWidth/Fs(re.display)-3);return function(Oe){if(fn(re.doc,Oe))return 0;var qe=0;if(Oe.widgets)for(var pt=0;pt<Oe.widgets.length;pt++)Oe.widgets[pt].height&&(qe+=Oe.widgets[pt].height);return Ce?qe+(Math.ceil(Oe.text.length/be)||1)*he:qe+he}}function vi(re){var he=re.doc,Ce=Oo(re);he.iter(function(be){var Oe=Ce(be);Oe!=be.height&&Hn(be,Oe)})}function Ua(re,he,Ce,be){var Oe=re.display;if(!Ce&&nr(he).getAttribute("cm-not-content")=="true")return null;var qe,pt,Mt=Oe.lineSpace.getBoundingClientRect();try{qe=he.clientX-Mt.left,pt=he.clientY-Mt.top}catch(_t){return null}var kt=sa(re,qe,pt),Rt;if(be&&kt.xRel>0&&(Rt=vn(re.doc,kt.line).text).length==kt.ch){var tn=Je(Rt,Rt.length,re.options.tabSize)-Rt.length;kt=Qt(kt.line,Math.max(0,Math.round((qe-ja(re.display).left)/Fs(re.display))-tn))}return kt}function Ds(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)on&&Jn(re.doc,he)<Oe.viewTo&&Go(re);else if(Ce<=Oe.viewFrom)on&&ir(re.doc,Ce+be)>Oe.viewFrom?Go(re):(Oe.viewFrom+=be,Oe.viewTo+=be);else if(he<=Oe.viewFrom&&Ce>=Oe.viewTo)Go(re);else if(he<=Oe.viewFrom){var qe=ps(re,Ce,Ce+be,1);qe?(Oe.view=Oe.view.slice(qe.index),Oe.viewFrom=qe.lineN,Oe.viewTo+=be):Go(re)}else if(Ce>=Oe.viewTo){var pt=ps(re,he,he,-1);pt?(Oe.view=Oe.view.slice(0,pt.index),Oe.viewTo=pt.lineN):Go(re)}else{var Mt=ps(re,he,he,-1),kt=ps(re,Ce,Ce+be,1);Mt&&kt?(Oe.view=Oe.view.slice(0,Mt.index).concat(li(re,Mt.lineN,kt.lineN)).concat(Oe.view.slice(kt.index)),Oe.viewTo+=be):Go(re)}var Rt=Oe.externalMeasured;Rt&&(Ce<Rt.lineN?Rt.lineN+=be:he<Rt.lineN+Rt.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 qe=be.view[Ds(re,he)];if(qe.node!=null){var pt=qe.changes||(qe.changes=[]);St(pt,Ce)==-1&&pt.push(Ce)}}}function Go(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function ps(re,he,Ce,be){var Oe=Ds(re,he),qe,pt=re.display.view;if(!on||Ce==re.doc.first+re.doc.size)return{index:Oe,lineN:Ce};for(var Mt=re.display.viewFrom,kt=0;kt<Oe;kt++)Mt+=pt[kt].size;if(Mt!=he){if(be>0){if(Oe==pt.length-1)return null;qe=Mt+pt[Oe].size-he,Oe++}else qe=Mt-he;he+=qe,Ce+=qe}for(;Jn(re.doc,Ce)!=Ce;){if(Oe==(be<0?0:pt.length-1))return null;Ce+=be*pt[Oe-(be<0?1:0)].size,Oe+=be}return{index:Oe,lineN:Ce}}function xo(re,he,Ce){var be=re.display,Oe=be.view;Oe.length==0||he>=be.viewTo||Ce<=be.viewFrom?(be.view=li(re,he,Ce),be.viewFrom=he):(be.viewFrom>he?be.view=li(re,he,be.viewFrom).concat(be.view):be.viewFrom<he&&(be.view=be.view.slice(Ds(re,he))),be.viewFrom=he,be.viewTo<Ce?be.view=be.view.concat(li(re,be.viewTo,Ce)):be.viewTo>Ce&&(be.view=be.view.slice(0,Ds(re,Ce)))),be.viewTo=Ce}function Cs(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 ma(re){re.display.input.showSelection(re.display.input.prepareSelection())}function hu(re,he){he===void 0&&(he=!0);for(var Ce=re.doc,be={},Oe=be.cursors=document.createDocumentFragment(),qe=be.selection=document.createDocumentFragment(),pt=0;pt<Ce.sel.ranges.length;pt++)if(!(!he&&pt==Ce.sel.primIndex)){var Mt=Ce.sel.ranges[pt];if(!(Mt.from().line>=re.display.viewTo||Mt.to().line<re.display.viewFrom)){var kt=Mt.empty();(kt||re.options.showCursorWhenSelecting)&&ao(re,Mt.head,Oe),kt||ro(re,Mt,qe)}}return be}function ao(re,he,Ce){var be=co(re,he,"div",null,null,!re.options.singleCursorHeightPerLine),Oe=Ce.appendChild(Ne("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 qe=Ce.appendChild(Ne("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));qe.style.display="",qe.style.left=be.other.left+"px",qe.style.top=be.other.top+"px",qe.style.height=(be.other.bottom-be.other.top)*.85+"px"}}function Ea(re,he){return re.top-he.top||re.left-he.left}function ro(re,he,Ce){var be=re.display,Oe=re.doc,qe=document.createDocumentFragment(),pt=ja(re.display),Mt=pt.left,kt=Math.max(be.sizerWidth,fs(re)-be.sizer.offsetLeft)-pt.right,Rt=Oe.direction=="ltr";function tn(Xr,ci,Ii,Vr){ci<0&&(ci=0),ci=Math.round(ci),Vr=Math.round(Vr),qe.appendChild(Ne("div",null,"CodeMirror-selected","position: absolute; left: "+Xr+`px;
top: `+ci+"px; width: "+(Ii==null?kt-Xr:Ii)+`px;
height: `+(Vr-ci)+"px"))}function _t(Xr,ci,Ii){var Vr=vn(Oe,Xr),to=Vr.text.length,Yo,Ra;function ia(Ma,Xs){return Ga(re,Qt(Xr,Ma),"div",Vr,Xs)}function Is(Ma,Xs,as){var La=da(re,Vr,null,Ma),mo=Xs=="ltr"==(as=="after")?"left":"right",ua=as=="after"?La.begin:La.end-(/\s/.test(Vr.text.charAt(La.end-1))?2:1);return ia(ua,mo)[mo]}var ms=$t(Vr,Oe.direction);return Pt(ms,ci||0,Ii==null?to:Ii,function(Ma,Xs,as,La){var mo=as=="ltr",ua=ia(Ma,mo?"left":"right"),Xa=ia(Xs-1,mo?"right":"left"),ss=ci==null&&Ma==0,Bl=Ii==null&&Xs==to,oa=La==0,Pl=!ms||La==ms.length-1;if(Xa.top-ua.top<=3){var pa=(Rt?ss:Bl)&&oa,Af=(Rt?Bl:ss)&&Pl,cl=pa?Mt:(mo?ua:Xa).left,Ys=Af?kt:(mo?Xa:ua).right;tn(cl,ua.top,Ys-cl,ua.bottom)}else{var _s,Bo,Ya,yu;mo?(_s=Rt&&ss&&oa?Mt:ua.left,Bo=Rt?kt:Is(Ma,as,"before"),Ya=Rt?Mt:Is(Xs,as,"after"),yu=Rt&&Bl&&Pl?kt:Xa.right):(_s=Rt?Is(Ma,as,"before"):Mt,Bo=!Rt&&ss&&oa?kt:ua.right,Ya=!Rt&&Bl&&Pl?Mt:Xa.left,yu=Rt?Is(Xs,as,"after"):kt),tn(_s,ua.top,Bo-_s,ua.bottom),ua.bottom<Xa.top&&tn(Mt,ua.bottom,null,Xa.top),tn(Ya,Xa.top,yu-Ya,Xa.bottom)}(!Yo||Ea(ua,Yo)<0)&&(Yo=ua),Ea(Xa,Yo)<0&&(Yo=Xa),(!Ra||Ea(ua,Ra)<0)&&(Ra=ua),Ea(Xa,Ra)<0&&(Ra=Xa)}),{start:Yo,end:Ra}}var yn=he.from(),gn=he.to();if(yn.line==gn.line)_t(yn.line,yn.ch,gn.ch);else{var lr=vn(Oe,yn.line),pr=vn(Oe,gn.line),wr=Mn(lr)==Mn(pr),Br=_t(yn.line,yn.ch,wr?lr.text.length+1:null).end,ri=_t(gn.line,wr?0:null,gn.ch).start;wr&&(Br.top<ri.top-2?(tn(Br.right,Br.top,null,Br.bottom),tn(Mt,ri.top,ri.left,ri.bottom)):tn(Br.right,Br.top,ri.left-Br.right,Br.bottom)),Br.bottom<ri.top&&tn(Mt,Br.bottom,null,ri.top)}Ce.appendChild(qe)}function wo(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()||Du(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 Uo(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Du(re))},100)}function ho(re,he){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(an(re,"focus",re,he),re.state.focused=!0,Xe(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()),wo(re))}function Du(re,he){re.state.delayingBlurEvent||(re.state.focused&&(an(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 di(re){for(var he=re.display,Ce=he.lineDiv.offsetTop,be=0;be<he.view.length;be++){var Oe=he.view[be],qe=re.options.lineWrapping,pt=void 0,Mt=0;if(!Oe.hidden){if(Ie&&de<8){var kt=Oe.node.offsetTop+Oe.node.offsetHeight;pt=kt-Ce,Ce=kt}else{var Rt=Oe.node.getBoundingClientRect();pt=Rt.bottom-Rt.top,!qe&&Oe.text.firstChild&&(Mt=Oe.text.firstChild.getBoundingClientRect().right-Rt.left-1)}var tn=Oe.line.height-pt;if((tn>.005||tn<-.005)&&(Hn(Oe.line,pt),uf(Oe.line),Oe.rest))for(var _t=0;_t<Oe.rest.length;_t++)uf(Oe.rest[_t]);if(Mt>re.display.sizerWidth){var yn=Math.ceil(Mt/Fs(re.display));yn>re.display.maxLineLength&&(re.display.maxLineLength=yn,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 $i(re,he,Ce){var be=Ce&&Ce.top!=null?Math.max(0,Ce.top):re.scroller.scrollTop;be=Math.floor(be-Ri(re));var Oe=Ce&&Ce.bottom!=null?Ce.bottom:be+re.wrapper.clientHeight,qe=Ut(he,be),pt=Ut(he,Oe);if(Ce&&Ce.ensure){var Mt=Ce.ensure.from.line,kt=Ce.ensure.to.line;Mt<qe?(qe=Mt,pt=Ut(he,Dr(vn(he,Mt))+re.wrapper.clientHeight)):Math.min(kt,he.lastLine())>=pt&&(qe=Ut(he,Dr(vn(he,kt))-re.wrapper.clientHeight),pt=kt)}return{from:qe,to:Math.max(pt,qe+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 qe=Ne("div","\u200B",null,`position: absolute;
top: `+(he.top-Ce.viewOffset-Ri(re.display))+`px;
height: `+(he.bottom-he.top+vo(re)+Ce.barHeight)+`px;
left: `+he.left+"px; width: "+Math.max(2,he.right-he.left)+"px;");re.display.lineSpace.appendChild(qe),qe.scrollIntoView(Oe),re.display.lineSpace.removeChild(qe)}}}function cu(re,he,Ce,be){be==null&&(be=0);var Oe;!re.options.lineWrapping&&he==Ce&&(he=he.ch?Qt(he.line,he.sticky=="before"?he.ch-1:he.ch,"after"):he,Ce=he.sticky=="before"?Qt(he.line,he.ch+1,"before"):he);for(var qe=0;qe<5;qe++){var pt=!1,Mt=co(re,he),kt=!Ce||Ce==he?Mt:co(re,Ce);Oe={left:Math.min(Mt.left,kt.left),top:Math.min(Mt.top,kt.top)-be,right:Math.max(Mt.left,kt.left),bottom:Math.max(Mt.bottom,kt.bottom)+be};var Rt=Ec(re,Oe),tn=re.doc.scrollTop,_t=re.doc.scrollLeft;if(Rt.scrollTop!=null&&(Yl(re,Rt.scrollTop),Math.abs(re.doc.scrollTop-tn)>1&&(pt=!0)),Rt.scrollLeft!=null&&(Jl(re,Rt.scrollLeft),Math.abs(re.doc.scrollLeft-_t)>1&&(pt=!0)),!pt)break}return Oe}function ih(re,he){var Ce=Ec(re,he);Ce.scrollTop!=null&&Yl(re,Ce.scrollTop),Ce.scrollLeft!=null&&Jl(re,Ce.scrollLeft)}function Ec(re,he){var Ce=re.display,be=ba(re.display);he.top<0&&(he.top=0);var Oe=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:Ce.scroller.scrollTop,qe=ds(re),pt={};he.bottom-he.top>qe&&(he.bottom=he.top+qe);var Mt=re.doc.height+Ko(Ce),kt=he.top<be,Rt=he.bottom>Mt-be;if(he.top<Oe)pt.scrollTop=kt?0:he.top;else if(he.bottom>Oe+qe){var tn=Math.min(he.top,(Rt?Mt:he.bottom)-qe);tn!=Oe&&(pt.scrollTop=tn)}var _t=re.options.fixedGutter?0:Ce.gutters.offsetWidth,yn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:Ce.scroller.scrollLeft-_t,gn=fs(re)-Ce.gutters.offsetWidth,lr=he.right-he.left>gn;return lr&&(he.right=he.left+gn),he.left<10?pt.scrollLeft=0:he.left<yn?pt.scrollLeft=Math.max(0,he.left+_t-(lr?0:10)):he.right>gn+yn-3&&(pt.scrollLeft=he.right+(lr?0:10)-gn),pt}function _h(re,he){he!=null&&(al(re),re.curOp.scrollTop=(re.curOp.scrollTop==null?re.doc.scrollTop:re.curOp.scrollTop)+he)}function Ol(re){al(re);var he=re.getCursor();re.curOp.scrollToPos={from:he,to:he,margin:re.options.cursorScrollMargin}}function Bu(re,he,Ce){(he!=null||Ce!=null)&&al(re),he!=null&&(re.curOp.scrollLeft=he),Ce!=null&&(re.curOp.scrollTop=Ce)}function uo(re,he){al(re),re.curOp.scrollToPos=he}function al(re){var he=re.curOp.scrollToPos;if(he){re.curOp.scrollToPos=null;var Ce=oo(re,he.from),be=oo(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});Bu(re,Oe.scrollLeft,Oe.scrollTop)}function Yl(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 Jl(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 Vi(re){var he=re.display,Ce=he.gutters.offsetWidth,be=Math.round(re.doc.height+Ko(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+vo(re)+he.barHeight,nativeBarWidth:he.nativeBarWidth,gutterWidth:Ce}}var so=function(re,he,Ce){this.cm=Ce;var be=this.vert=Ne("div",[Ne("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Oe=this.horiz=Ne("div",[Ne("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");be.tabIndex=Oe.tabIndex=-1,re(be),re(Oe),qt(be,"scroll",function(){be.clientHeight&&he(be.scrollTop,"vertical")}),qt(Oe,"scroll",function(){Oe.clientWidth&&he(Oe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ie&&de<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};so.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 qe=re.viewWidth-re.barLeft-(Ce?be:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+qe)+"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}},so.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},so.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},so.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 nt,this.disableVert=new nt},so.prototype.enableZeroWidthBar=function(re,he,Ce){re.style.pointerEvents="auto";function be(){var Oe=re.getBoundingClientRect(),qe=Ce=="vert"?document.elementFromPoint(Oe.right-1,(Oe.top+Oe.bottom)/2):document.elementFromPoint((Oe.right+Oe.left)/2,Oe.bottom-1);qe!=re?re.style.pointerEvents="none":he.set(1e3,be)}he.set(1e3,be)},so.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var Xo=function(){};Xo.prototype.update=function(){return{bottom:0,right:0}},Xo.prototype.setScrollLeft=function(){},Xo.prototype.setScrollTop=function(){},Xo.prototype.clear=function(){};function Fa(re,he){he||(he=Vi(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&&di(re),ka(re,Vi(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 fu={native:so,null:Xo};function Ql(re){re.display.scrollbars&&(re.display.scrollbars.clear(),re.display.scrollbars.addClass&&De(re.display.wrapper,re.display.scrollbars.addClass)),re.display.scrollbars=new fu[re.options.scrollbarStyle](function(he){re.display.wrapper.insertBefore(he,re.display.scrollbarFiller),qt(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"?Jl(re,he):Yl(re,he)},re),re.display.scrollbars.addClass&&Xe(re.display.wrapper,re.display.scrollbars.addClass)}var du=0;function sl(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:++du},_o(re.curOp)}function Fl(re){var he=re.curOp;he&&bs(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++)Ig(he[Oe]);for(var qe=0;qe<he.length;qe++)la(he[qe]);for(var pt=0;pt<he.length;pt++)oh(he[pt])}function $v(re){var he=re.cm,Ce=he.display;_g(he),re.updateMaxLine&&Ir(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 Ig(re){var he=re.cm,Ce=he.display;re.updatedDisplay&&di(he),re.barMeasure=Vi(he),Ce.maxLineChanged&&!he.options.lineWrapping&&(re.adjustWidthTo=ju(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+vo(he)+he.display.barWidth),re.maxScrollLeft=Math.max(0,Ce.sizer.offsetLeft+re.adjustWidthTo-fs(he))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=Ce.input.prepareSelection())}function la(re){var he=re.cm;re.adjustWidthTo!=null&&(he.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<he.doc.scrollLeft&&Jl(he,Math.min(he.display.scroller.scrollLeft,re.maxScrollLeft),!0),he.display.maxLineChanged=!1);var Ce=re.focus&&re.focus==Ke();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&&wo(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&&Jl(he,re.scrollLeft,!0,!0),re.scrollToPos){var Oe=cu(he,$n(be,re.scrollToPos.from),$n(be,re.scrollToPos.to),re.scrollToPos.margin);Cc(he,Oe)}var qe=re.maybeHiddenMarkers,pt=re.maybeUnhiddenMarkers;if(qe)for(var Mt=0;Mt<qe.length;++Mt)qe[Mt].lines.length||an(qe[Mt],"hide");if(pt)for(var kt=0;kt<pt.length;++kt)pt[kt].lines.length&&an(pt[kt],"unhide");Ce.wrapper.offsetHeight&&(be.scrollTop=he.display.scroller.scrollTop),re.changeObjs&&an(he,"changes",he,re.changeObjs),re.update&&re.update.finish()}function yo(re,he){if(re.curOp)return he();sl(re);try{return he()}finally{Fl(re)}}function Da(re,he){return function(){if(re.curOp)return he.apply(re,arguments);sl(re);try{return he.apply(re,arguments)}finally{Fl(re)}}}function Ha(re){return function(){if(this.curOp)return re.apply(this,arguments);sl(this);try{return re.apply(this,arguments)}finally{Fl(this)}}}function Wa(re){return function(){var he=this.cm;if(!he||he.curOp)return re.apply(this,arguments);sl(he);try{return re.apply(this,arguments)}finally{Fl(he)}}}function Tc(re,he){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(he,ut(Va,re))}function Va(re){var he=re.doc;if(!(he.highlightFrontier>=re.display.viewTo)){var Ce=+new Date+re.options.workTime,be=zi(re,he.highlightFrontier),Oe=[];he.iter(be.line,Math.min(he.first+he.size,re.display.viewTo+500),function(qe){if(be.line>=re.display.viewFrom){var pt=qe.styles,Mt=qe.text.length>re.options.maxHighlightLength?tr(he.mode,be.state):null,kt=si(re,qe,be,!0);Mt&&(be.state=Mt),qe.styles=kt.styles;var Rt=qe.styleClasses,tn=kt.classes;tn?qe.styleClasses=tn:Rt&&(qe.styleClasses=null);for(var _t=!pt||pt.length!=qe.styles.length||Rt!=tn&&(!Rt||!tn||Rt.bgClass!=tn.bgClass||Rt.textClass!=tn.textClass),yn=0;!_t&&yn<pt.length;++yn)_t=pt[yn]!=qe.styles[yn];_t&&Oe.push(be.line),qe.stateAfter=be.save(),be.nextLine()}else qe.text.length<=re.options.maxHighlightLength&&Yt(re,qe.text,be),qe.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&&yo(re,function(){for(var qe=0;qe<Oe.length;qe++)Ui(re,Oe[qe],"text")})}}var Gh=function(re,he,Ce){var be=re.display;this.viewport=he,this.visible=$i(be,re.doc,he),this.editorIsHidden=!be.wrapper.offsetWidth,this.wrapperHeight=be.wrapper.clientHeight,this.wrapperWidth=be.wrapper.clientWidth,this.oldDisplayWidth=fs(re),this.force=Ce,this.dims=ol(re),this.events=[]};Gh.prototype.signal=function(re,he){xn(re,he)&&this.events.push(arguments)},Gh.prototype.finish=function(){for(var re=0;re<this.events.length;re++)an.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=vo(re)+"px",he.sizer.style.marginBottom=-he.nativeBarWidth+"px",he.sizer.style.borderRightWidth=vo(re)+"px",he.scrollbarsClipped=!0)}function zg(re){if(re.hasFocus())return null;var he=Ke();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 Bs(re){if(!(!re||!re.activeElt||re.activeElt==Ke())&&(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 Go(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&&Cs(re)==0)return!1;Pa(re)&&(Go(re),he.dims=ol(re));var Oe=be.first+be.size,qe=Math.max(he.visible.from-re.options.viewportMargin,be.first),pt=Math.min(Oe,he.visible.to+re.options.viewportMargin);Ce.viewFrom<qe&&qe-Ce.viewFrom<20&&(qe=Math.max(be.first,Ce.viewFrom)),Ce.viewTo>pt&&Ce.viewTo-pt<20&&(pt=Math.min(Oe,Ce.viewTo)),on&&(qe=Jn(re.doc,qe),pt=ir(re.doc,pt));var Mt=qe!=Ce.viewFrom||pt!=Ce.viewTo||Ce.lastWrapHeight!=he.wrapperHeight||Ce.lastWrapWidth!=he.wrapperWidth;xo(re,qe,pt),Ce.viewOffset=Dr(vn(re.doc,Ce.viewFrom)),re.display.mover.style.top=Ce.viewOffset+"px";var kt=Cs(re);if(!Mt&&kt==0&&!he.force&&Ce.renderedView==Ce.view&&(Ce.updateLineNumbers==null||Ce.updateLineNumbers>=Ce.viewTo))return!1;var Rt=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,Bs(Rt),Fe(Ce.cursorDiv),Fe(Ce.selectionDiv),Ce.gutters.style.height=Ce.sizer.style.minHeight=0,Mt&&(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==fs(re)){if(Ce&&Ce.top!=null&&(Ce={top:Math.min(re.doc.height+Ko(re.display)-ds(re),Ce.top)}),he.visible=$i(re.display,re.doc,Ce),he.visible.from>=re.display.viewFrom&&he.visible.to<=re.display.viewTo)break}else be&&(he.visible=$i(re.display,re.doc,Ce));if(!ed(re,he))break;di(re);var Oe=Vi(re);ma(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)){di(re),ko(re,Ce);var be=Vi(re);ma(re),Fa(re,be),lh(re,be),Ce.finish()}}function lp(re,he,Ce){var be=re.display,Oe=re.options.lineNumbers,qe=be.lineDiv,pt=qe.firstChild;function Mt(lr){var pr=lr.nextSibling;return ve&&se&&re.display.currentWheelTarget==lr?lr.style.display="none":lr.parentNode.removeChild(lr),pr}for(var kt=be.view,Rt=be.viewFrom,tn=0;tn<kt.length;tn++){var _t=kt[tn];if(!_t.hidden)if(!_t.node||_t.node.parentNode!=qe){var yn=Ai(re,_t,Rt,Ce);qe.insertBefore(yn,pt)}else{for(;pt!=_t.node;)pt=Mt(pt);var gn=Oe&&he!=null&&he<=Rt&&_t.lineNumber;_t.changes&&(St(_t.changes,"gutter")>-1&&(gn=!1),Po(re,_t,Rt,Ce)),gn&&(Fe(_t.lineNumber),_t.lineNumber.appendChild(document.createTextNode(Tn(re.options,Rt)))),pt=_t.node.nextSibling}Rt+=_t.size}for(;pt;)pt=Mt(pt)}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+vo(re)+"px"}function td(re){var he=re.display,Ce=he.view;if(!(!he.alignWidgets&&(!he.gutters.firstChild||!re.options.fixedGutter))){for(var be=Fu(he)-he.scroller.scrollLeft+re.doc.scrollLeft,Oe=he.gutters.offsetWidth,qe=be+"px",pt=0;pt<Ce.length;pt++)if(!Ce[pt].hidden){re.options.fixedGutter&&(Ce[pt].gutter&&(Ce[pt].gutter.style.left=qe),Ce[pt].gutterBackground&&(Ce[pt].gutterBackground.style.left=qe));var Mt=Ce[pt].alignable;if(Mt)for(var kt=0;kt<Mt.length;kt++)Mt[kt].style.left=qe}re.options.fixedGutter&&(he.gutters.style.left=be+Oe+"px")}}function Pa(re){if(!re.options.lineNumbers)return!1;var he=re.doc,Ce=Tn(re.options,he.first+he.size-1),be=re.display;if(Ce.length!=be.lineNumChars){var Oe=be.measure.appendChild(Ne("div",[Ne("div",Ce)],"CodeMirror-linenumber CodeMirror-gutter-elt")),qe=Oe.firstChild.offsetWidth,pt=Oe.offsetWidth-qe;return be.lineGutter.style.width="",be.lineNumInnerWidth=Math.max(qe,be.lineGutter.offsetWidth-pt)+1,be.lineNumWidth=be.lineNumInnerWidth+pt,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 qe=re[Oe],pt=null;if(typeof qe!="string"&&(pt=qe.style,qe=qe.className),qe=="CodeMirror-linenumbers")if(he)be=!0;else continue;Ce.push({className:qe,style:pt})}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],qe=Oe.className,pt=Oe.style,Mt=he.appendChild(Ne("div",null,"CodeMirror-gutter "+qe));pt&&(Mt.style.cssText=pt),qe=="CodeMirror-linenumbers"&&(re.lineGutter=Mt,Mt.style.width=(re.lineNumWidth||1)+"px")}he.style.display=Ce.length?"":"none",sh(re)}function ll(re){Uh(re.display),Fo(re),td(re)}function uh(re,he,Ce,be){var Oe=this;this.input=Ce,Oe.scrollbarFiller=Ne("div",null,"CodeMirror-scrollbar-filler"),Oe.scrollbarFiller.setAttribute("cm-not-content","true"),Oe.gutterFiller=Ne("div",null,"CodeMirror-gutter-filler"),Oe.gutterFiller.setAttribute("cm-not-content","true"),Oe.lineDiv=Be("div",null,"CodeMirror-code"),Oe.selectionDiv=Ne("div",null,null,"position: relative; z-index: 1"),Oe.cursorDiv=Ne("div",null,"CodeMirror-cursors"),Oe.measure=Ne("div",null,"CodeMirror-measure"),Oe.lineMeasure=Ne("div",null,"CodeMirror-measure"),Oe.lineSpace=Be("div",[Oe.measure,Oe.lineMeasure,Oe.selectionDiv,Oe.cursorDiv,Oe.lineDiv],null,"position: relative; outline: none");var qe=Be("div",[Oe.lineSpace],"CodeMirror-lines");Oe.mover=Ne("div",[qe],null,"position: relative"),Oe.sizer=Ne("div",[Oe.mover],"CodeMirror-sizer"),Oe.sizerWidth=null,Oe.heightForcer=Ne("div",null,null,"position: absolute; height: "+wt+"px; width: 1px;"),Oe.gutters=Ne("div",null,"CodeMirror-gutters"),Oe.lineGutter=null,Oe.scroller=Ne("div",[Oe.sizer,Oe.heightForcer,Oe.gutters],"CodeMirror-scroll"),Oe.scroller.setAttribute("tabIndex","-1"),Oe.wrapper=Ne("div",[Oe.scrollbarFiller,Oe.gutterFiller,Oe.scroller],"CodeMirror"),Ie&&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 Vs=0,va=null;Ie?va=-.53:at?va=15:ke?va=-.7:je&&(va=-1/3);function $l(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 ul(re){var he=$l(re);return he.x*=va,he.y*=va,he}function Za(re,he){var Ce=$l(he),be=Ce.x,Oe=Ce.y,qe=re.display,pt=qe.scroller,Mt=pt.scrollWidth>pt.clientWidth,kt=pt.scrollHeight>pt.clientHeight;if(be&&Mt||Oe&&kt){if(Oe&&se&&ve){e:for(var Rt=he.target,tn=qe.view;Rt!=pt;Rt=Rt.parentNode)for(var _t=0;_t<tn.length;_t++)if(tn[_t].node==Rt){re.display.currentWheelTarget=Rt;break e}}if(be&&!at&&!Se&&va!=null){Oe&&kt&&Yl(re,Math.max(0,pt.scrollTop+Oe*va)),Jl(re,Math.max(0,pt.scrollLeft+be*va)),(!Oe||Oe&&kt)&&Zn(he),qe.wheelStartX=null;return}if(Oe&&va!=null){var yn=Oe*va,gn=re.doc.scrollTop,lr=gn+qe.wrapper.clientHeight;yn<0?gn=Math.max(0,gn+yn-50):lr=Math.min(re.doc.height,lr+yn+50),ah(re,{top:gn,bottom:lr})}Vs<20&&(qe.wheelStartX==null?(qe.wheelStartX=pt.scrollLeft,qe.wheelStartY=pt.scrollTop,qe.wheelDX=be,qe.wheelDY=Oe,setTimeout(function(){if(qe.wheelStartX!=null){var pr=pt.scrollLeft-qe.wheelStartX,wr=pt.scrollTop-qe.wheelStartY,Br=wr&&qe.wheelDY&&wr/qe.wheelDY||pr&&qe.wheelDX&&pr/qe.wheelDX;qe.wheelStartX=qe.wheelStartY=null,Br&&(va=(va*Vs+Br)/(Vs+1),++Vs)}},200)):(qe.wheelDX+=be,qe.wheelDY+=Oe))}}var xl=function(re,he){this.ranges=re,this.primIndex=he};xl.prototype.primary=function(){return this.ranges[this.primIndex]},xl.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(!vr(Ce.anchor,be.anchor)||!vr(Ce.head,be.head))return!1}return!0},xl.prototype.deepCopy=function(){for(var re=[],he=0;he<this.ranges.length;he++)re[he]=new To(mr(this.ranges[he].anchor),mr(this.ranges[he].head));return new xl(re,this.primIndex)},xl.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},xl.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 Un(this.anchor,this.head)},To.prototype.to=function(){return er(this.anchor,this.head)},To.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Dl(re,he,Ce){var be=re&&re.options.selectionsMayTouch,Oe=he[Ce];he.sort(function(yn,gn){return Fn(yn.from(),gn.from())}),Ce=St(he,Oe);for(var qe=1;qe<he.length;qe++){var pt=he[qe],Mt=he[qe-1],kt=Fn(Mt.to(),pt.from());if(be&&!pt.empty()?kt>0:kt>=0){var Rt=Un(Mt.from(),pt.from()),tn=er(Mt.to(),pt.to()),_t=Mt.empty()?pt.from()==pt.head:Mt.from()==Mt.head;qe<=Ce&&--Ce,he.splice(--qe,2,new To(_t?tn:Rt,_t?Rt:tn))}}return new xl(he,Ce)}function Ru(re,he){return new xl([new To(re,he||re)],0)}function hh(re){return re.text?Qt(re.from.line+re.text.length-1,Et(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),Qt(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 Dl(re.cm,Ce,re.sel.primIndex)}function Mc(re,he,Ce){return re.line==he.line?Qt(Ce.line,re.ch-he.ch+Ce.ch):Qt(Ce.line+(re.line-he.line),re.ch)}function cf(re,he,Ce){for(var be=[],Oe=Qt(re.first,0),qe=Oe,pt=0;pt<he.length;pt++){var Mt=he[pt],kt=Mc(Mt.from,Oe,qe),Rt=Mc(hh(Mt),Oe,qe);if(Oe=Mt.to,qe=Rt,Ce=="around"){var tn=re.sel.ranges[pt],_t=Fn(tn.head,tn.anchor)<0;be[pt]=new To(_t?Rt:kt,_t?kt:Rt)}else be[pt]=new To(kt,kt)}return new xl(be,re.sel.primIndex)}function eo(re){re.doc.mode=sn(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&&Et(he.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function nd(re,he,Ce,be){function Oe(ri){return Ce?Ce[ri]:null}function qe(ri,Xr,ci){Pi(ri,Xr,ci,be),Wr(ri,"change",ri,he)}function pt(ri,Xr){for(var ci=[],Ii=ri;Ii<Xr;++Ii)ci.push(new Mi(Rt[Ii],Oe(Ii),be));return ci}var Mt=he.from,kt=he.to,Rt=he.text,tn=vn(re,Mt.line),_t=vn(re,kt.line),yn=Et(Rt),gn=Oe(Rt.length-1),lr=kt.line-Mt.line;if(he.full)re.insert(0,pt(0,Rt.length)),re.remove(Rt.length,re.size-Rt.length);else if(up(re,he)){var pr=pt(0,Rt.length-1);qe(_t,_t.text,gn),lr&&re.remove(Mt.line,lr),pr.length&&re.insert(Mt.line,pr)}else if(tn==_t)if(Rt.length==1)qe(tn,tn.text.slice(0,Mt.ch)+yn+tn.text.slice(kt.ch),gn);else{var wr=pt(1,Rt.length-1);wr.push(new Mi(yn+tn.text.slice(kt.ch),gn,be)),qe(tn,tn.text.slice(0,Mt.ch)+Rt[0],Oe(0)),re.insert(Mt.line+1,wr)}else if(Rt.length==1)qe(tn,tn.text.slice(0,Mt.ch)+Rt[0]+_t.text.slice(kt.ch),Oe(0)),re.remove(Mt.line+1,lr);else{qe(tn,tn.text.slice(0,Mt.ch)+Rt[0],Oe(0)),qe(_t,yn+_t.text.slice(kt.ch),gn);var Br=pt(1,Rt.length-1);lr>1&&re.remove(Mt.line+1,lr-1),re.insert(Mt.line+1,Br)}Wr(re,"change",re,he)}function ql(re,he,Ce){function be(Oe,qe,pt){if(Oe.linked)for(var Mt=0;Mt<Oe.linked.length;++Mt){var kt=Oe.linked[Mt];if(kt.doc!=qe){var Rt=pt&&kt.sharedHist;Ce&&!Rt||(he(kt.doc,Rt),be(kt.doc,Oe,Rt))}}}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,vi(re),eo(re),df(re),re.options.lineWrapping||Ir(re),re.options.mode=he.modeOption,Fo(re)}function df(re){(re.doc.direction=="rtl"?Xe:De)(re.display.lineDiv,"CodeMirror-rtl")}function e0(re){yo(re,function(){df(re),Fo(re)})}function Lc(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:mr(he.from),to:hh(he),text:kn(re,he.from,he.to)};return ch(re,Ce,he.from.line,he.to.line+1),ql(re,function(be){return ch(be,Ce,he.from.line,he.to.line+1)},!0),Ce}function Nc(re){for(;re.length;){var he=Et(re);if(he.ranges)re.pop();else break}}function pf(re,he){if(he)return Nc(re.done),Et(re.done);if(re.done.length&&!Et(re.done).ranges)return Et(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),Et(re.done)}function gf(re,he,Ce,be){var Oe=re.history;Oe.undone.length=0;var qe=+new Date,pt,Mt;if((Oe.lastOp==be||Oe.lastOrigin==he.origin&&he.origin&&(he.origin.charAt(0)=="+"&&Oe.lastModTime>qe-(re.cm?re.cm.options.historyEventDelay:500)||he.origin.charAt(0)=="*"))&&(pt=pf(Oe,Oe.lastOp==be)))Mt=Et(pt.changes),Fn(he.from,he.to)==0&&Fn(he.from,Mt.to)==0?Mt.to=hh(he):pt.changes.push(id(re,he));else{var kt=Et(Oe.done);for((!kt||!kt.ranges)&&Ac(re.sel,Oe.done),pt={changes:[id(re,he)],generation:Oe.generation},Oe.done.push(pt);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=qe,Oe.lastOp=Oe.lastSelOp=be,Oe.lastOrigin=Oe.lastSelOrigin=he.origin,Mt||an(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,qe=be&&be.origin;Ce==Oe.lastSelOp||qe&&Oe.lastSelOrigin==qe&&(Oe.lastModTime==Oe.lastSelTime&&Oe.lastOrigin==qe||hp(re,qe,Et(Oe.done),he))?Oe.done[Oe.done.length-1]=he:Ac(he,Oe.done),Oe.lastSelTime=+new Date,Oe.lastSelOrigin=qe,Oe.lastSelOp=Ce,be&&be.clearRedo!==!1&&Nc(Oe.undone)}function Ac(re,he){var Ce=Et(he);Ce&&Ce.ranges&&Ce.equals(re)||he.push(re)}function ch(re,he,Ce,be){var Oe=he["spans_"+re.id],qe=0;re.iter(Math.max(re.first,Ce),Math.min(re.first+re.size,be),function(pt){pt.markedSpans&&((Oe||(Oe=he["spans_"+re.id]={}))[qe]=pt.markedSpans),++qe})}function Es(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 pu(re,he){var Ce=he["spans_"+re.id];if(!Ce)return null;for(var be=[],Oe=0;Oe<he.text.length;++Oe)be.push(Es(Ce[Oe]));return be}function od(re,he){var Ce=pu(re,he),be=Wi(re,he);if(!Ce)return be;if(!be)return Ce;for(var Oe=0;Oe<Ce.length;++Oe){var qe=Ce[Oe],pt=be[Oe];if(qe&&pt)e:for(var Mt=0;Mt<pt.length;++Mt){for(var kt=pt[Mt],Rt=0;Rt<qe.length;++Rt)if(qe[Rt].marker==kt.marker)continue e;qe.push(kt)}else pt&&(Ce[Oe]=pt)}return Ce}function Iu(re,he,Ce){for(var be=[],Oe=0;Oe<re.length;++Oe){var qe=re[Oe];if(qe.ranges){be.push(Ce?xl.prototype.deepCopy.call(qe):qe);continue}var pt=qe.changes,Mt=[];be.push({changes:Mt});for(var kt=0;kt<pt.length;++kt){var Rt=pt[kt],tn=void 0;if(Mt.push({from:Rt.from,to:Rt.to,text:Rt.text}),he)for(var _t in Rt)(tn=_t.match(/^spans_(\d+)$/))&&St(he,Number(tn[1]))>-1&&(Et(Mt)[_t]=Rt[_t],delete Rt[_t])}}return be}function ad(re,he,Ce,be){if(be){var Oe=re.anchor;if(Ce){var qe=Fn(he,Oe)<0;qe!=Fn(Ce,Oe)<0?(Oe=he,he=Ce):qe!=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)),gs(re,new xl([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),qe=0;qe<re.sel.ranges.length;qe++)be[qe]=ad(re.sel.ranges[qe],he[qe],null,Oe);var pt=Dl(re.cm,be,re.sel.primIndex);gs(re,pt,Ce)}function fh(re,he,Ce,be){var Oe=re.sel.ranges.slice(0);Oe[he]=Ce,gs(re,Dl(re.cm,Oe,re.sel.primIndex),be)}function Wh(re,he,Ce,be){gs(re,Ru(he,Ce),be)}function Ug(re,he,Ce){var be={ranges:he.ranges,update:function(Oe){this.ranges=[];for(var qe=0;qe<Oe.length;qe++)this.ranges[qe]=new To($n(re,Oe[qe].anchor),$n(re,Oe[qe].head))},origin:Ce&&Ce.origin};return an(re,"beforeSelectionChange",re,be),re.cm&&an(re.cm,"beforeSelectionChange",re.cm,be),be.ranges!=he.ranges?Dl(re.cm,be.ranges,be.ranges.length-1):he}function ld(re,he,Ce){var be=re.history.done,Oe=Et(be);Oe&&Oe.ranges?(be[be.length-1]=he,Vh(re,he,Ce)):gs(re,he,Ce)}function gs(re,he,Ce){Vh(re,he,Ce),mf(re,re.sel,re.cm?re.cm.curOp.id:NaN,Ce)}function Vh(re,he,Ce){(xn(re,"beforeSelectionChange")||re.cm&&xn(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&&Ol(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,wn(re.cm)),Wr(re,"cursorActivity",re))}function vf(re){cp(re,yf(re,re.sel,null,!1))}function yf(re,he,Ce,be){for(var Oe,qe=0;qe<he.ranges.length;qe++){var pt=he.ranges[qe],Mt=he.ranges.length==re.sel.ranges.length&&re.sel.ranges[qe],kt=Sf(re,pt.anchor,Mt&&Mt.anchor,Ce,be),Rt=Sf(re,pt.head,Mt&&Mt.head,Ce,be);(Oe||kt!=pt.anchor||Rt!=pt.head)&&(Oe||(Oe=he.ranges.slice(0,qe)),Oe[qe]=new To(kt,Rt))}return Oe?Dl(re.cm,Oe,he.primIndex):he}function _u(re,he,Ce,be,Oe){var qe=vn(re,he.line);if(qe.markedSpans)for(var pt=0;pt<qe.markedSpans.length;++pt){var Mt=qe.markedSpans[pt],kt=Mt.marker,Rt="selectLeft"in kt?!kt.selectLeft:kt.inclusiveLeft,tn="selectRight"in kt?!kt.selectRight:kt.inclusiveRight;if((Mt.from==null||(Rt?Mt.from<=he.ch:Mt.from<he.ch))&&(Mt.to==null||(tn?Mt.to>=he.ch:Mt.to>he.ch))){if(Oe&&(an(kt,"beforeCursorEnter"),kt.explicitlyCleared))if(qe.markedSpans){--pt;continue}else break;if(!kt.atomic)continue;if(Ce){var _t=kt.find(be<0?1:-1),yn=void 0;if((be<0?tn:Rt)&&(_t=fp(re,_t,-be,_t&&_t.line==he.line?qe:null)),_t&&_t.line==he.line&&(yn=Fn(_t,Ce))&&(be<0?yn<0:yn>0))return _u(re,_t,he,be,Oe)}var gn=kt.find(be<0?-1:1);return(be<0?Rt:tn)&&(gn=fp(re,gn,be,gn.line==he.line?qe:null)),gn?_u(re,gn,he,be,Oe):null}}return he}function Sf(re,he,Ce,be,Oe){var qe=be||1,pt=_u(re,he,Ce,qe,Oe)||!Oe&&_u(re,he,Ce,qe,!0)||_u(re,he,Ce,-qe,Oe)||!Oe&&_u(re,he,Ce,-qe,!0);return pt||(re.cantEdit=!0,Qt(re.first,0))}function fp(re,he,Ce,be){return Ce<0&&he.ch==0?he.line>re.first?$n(re,Qt(he.line-1)):null:Ce>0&&he.ch==(be||vn(re,he.line)).text.length?he.line<re.first+re.size-1?Qt(he.line+1,0):null:new Qt(he.line,he.ch+Ce)}function ya(re){re.setSelection(Qt(re.firstLine(),0),Qt(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,qe,pt,Mt){Oe&&(be.from=$n(re,Oe)),qe&&(be.to=$n(re,qe)),pt&&(be.text=pt),Mt!==void 0&&(be.origin=Mt)}),an(re,"beforeChange",re,be),re.cm&&an(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(!((xn(re,"beforeChange")||re.cm&&xn(re.cm,"beforeChange"))&&(he=xf(re,he,!0),!he))){var be=yr&&!Ce&&pn(re,he.from,he.to);if(be)for(var Oe=be.length-1;Oe>=0;--Oe)Kh(re,{from:be[Oe].from,to:be[Oe].to,text:Oe?[""]:he.text,origin:he.origin});else Kh(re,he)}}function Kh(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,Wi(re,he));var be=[];ql(re,function(Oe,qe){!qe&&St(be,Oe.history)==-1&&(pp(Oe.history,he),be.push(Oe.history)),jc(Oe,he,null,Wi(Oe,he))})}}function wf(re,he,Ce){var be=re.cm&&re.cm.state.suppressEdits;if(!(be&&!Ce)){for(var Oe=re.history,qe,pt=re.sel,Mt=he=="undo"?Oe.done:Oe.undone,kt=he=="undo"?Oe.undone:Oe.done,Rt=0;Rt<Mt.length&&(qe=Mt[Rt],!(Ce?qe.ranges&&!qe.equals(re.sel):!qe.ranges));Rt++);if(Rt!=Mt.length){for(Oe.lastOrigin=Oe.lastSelOrigin=null;;)if(qe=Mt.pop(),qe.ranges){if(Ac(qe,kt),Ce&&!qe.equals(re.sel)){gs(re,qe,{clearRedo:!1});return}pt=qe}else if(be){Mt.push(qe);return}else break;var tn=[];Ac(pt,kt),kt.push({changes:tn,generation:Oe.generation}),Oe.generation=qe.generation||++Oe.maxGeneration;for(var _t=xn(re,"beforeChange")||re.cm&&xn(re.cm,"beforeChange"),yn=function(pr){var wr=qe.changes[pr];if(wr.origin=he,_t&&!xf(re,wr,!1))return Mt.length=0,{};tn.push(id(re,wr));var Br=pr?hf(re,wr):Et(Mt);jc(re,wr,Br,od(re,wr)),!pr&&re.cm&&re.cm.scrollIntoView({from:wr.from,to:hh(wr)});var ri=[];ql(re,function(Xr,ci){!ci&&St(ri,Xr.history)==-1&&(pp(Xr.history,wr),ri.push(Xr.history)),jc(Xr,wr,null,od(Xr,wr))})},gn=qe.changes.length-1;gn>=0;--gn){var lr=yn(gn);if(lr)return lr.v}}}}function dp(re,he){if(he!=0&&(re.first+=he,re.sel=new xl(gt(re.sel.ranges,function(Oe){return new To(Qt(Oe.anchor.line+he,Oe.anchor.ch),Qt(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:Qt(re.first,0),to:Qt(he.to.line+Oe,he.to.ch),text:[Et(he.text)],origin:he.origin}}var qe=re.lastLine();he.to.line>qe&&(he={from:he.from,to:Qt(qe,vn(re,qe).text.length),text:[he.text[0]],origin:he.origin}),he.removed=kn(re,he.from,he.to),Ce||(Ce=hf(re,he)),re.cm?Hg(re.cm,he,be):nd(re,he,be),Vh(re,Ce,ct),re.cantEdit&&Sf(re,Qt(re.firstLine(),0))&&(re.cantEdit=!1)}}function Hg(re,he,Ce){var be=re.doc,Oe=re.display,qe=he.from,pt=he.to,Mt=!1,kt=qe.line;re.options.lineWrapping||(kt=Ot(Mn(vn(be,qe.line))),be.iter(kt,pt.line+1,function(gn){if(gn==Oe.maxLine)return Mt=!0,!0})),be.sel.contains(he.from,he.to)>-1&&wn(re),nd(be,he,Ce,Oo(re)),re.options.lineWrapping||(be.iter(kt,qe.line+he.text.length,function(gn){var lr=fi(gn);lr>Oe.maxLineLength&&(Oe.maxLine=gn,Oe.maxLineLength=lr,Oe.maxLineChanged=!0,Mt=!1)}),Mt&&(re.curOp.updateMaxLine=!0)),ti(be,qe.line),Tc(re,400);var Rt=he.text.length-(pt.line-qe.line)-1;he.full?Fo(re):qe.line==pt.line&&he.text.length==1&&!up(re.doc,he)?Ui(re,qe.line,"text"):Fo(re,qe.line,pt.line+1,Rt);var tn=xn(re,"changes"),_t=xn(re,"change");if(_t||tn){var yn={from:qe,to:pt,text:he.text,removed:he.removed,origin:he.origin};_t&&Wr(re,"change",re,yn),tn&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(yn)}re.display.selForContextMenu=null}function Zh(re,he,Ce,be,Oe){var qe;be||(be=Ce),Fn(be,Ce)<0&&(qe=[be,Ce],Ce=qe[0],be=qe[1]),typeof he=="string"&&(he=re.splitLines(he)),dh(re,{from:Ce,to:be,text:he,origin:Oe})}function wl(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 qe=re[Oe],pt=!0;if(qe.ranges){qe.copied||(qe=re[Oe]=qe.deepCopy(),qe.copied=!0);for(var Mt=0;Mt<qe.ranges.length;Mt++)wl(qe.ranges[Mt].anchor,he,Ce,be),wl(qe.ranges[Mt].head,he,Ce,be);continue}for(var kt=0;kt<qe.changes.length;++kt){var Rt=qe.changes[kt];if(Ce<Rt.from.line)Rt.from=Qt(Rt.from.line+be,Rt.from.ch),Rt.to=Qt(Rt.to.line+be,Rt.to.ch);else if(he<=Rt.to.line){pt=!1;break}}pt||(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,qe=he;return typeof he=="number"?qe=vn(re,Rn(re,he)):Oe=Ot(he),Oe==null?null:(be(qe,Oe)&&re.cm&&Ui(re.cm,Oe,Ce),qe)}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,Bi(Oe),Wr(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 qe=Math.min(he,Oe-re),pt=be.height;if(be.removeInner(re,qe),this.height-=pt-be.height,Oe==qe&&(this.children.splice(Ce--,1),be.parent=null),(he-=qe)==0)break;re=0}else re-=Oe}if(this.size-he<25&&(this.children.length>1||!(this.children[0]instanceof Oc))){var Mt=[];this.collapse(Mt),this.children=[new Oc(Mt)],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],qe=Oe.chunkSize();if(re<=qe){if(Oe.insertInner(re,he,Ce),Oe.lines&&Oe.lines.length>50){for(var pt=Oe.lines.length%25+25,Mt=pt;Mt<Oe.lines.length;){var kt=new Oc(Oe.lines.slice(Mt,Mt+=25));Oe.height-=kt.height,this.children.splice(++be,0,kt),kt.parent=this}Oe.lines=Oe.lines.slice(0,pt),this.maybeSpill()}break}re-=qe}},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=St(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],qe=Oe.chunkSize();if(re<qe){var pt=Math.min(he,qe-re);if(Oe.iterN(re,pt,Ce))return!0;if((he-=pt)==0)break;re=0}else re-=qe}}};var zu=function(re,he,Ce){if(Ce)for(var be in Ce)Ce.hasOwnProperty(be)&&(this[be]=Ce[be]);this.doc=re,this.node=he};zu.prototype.clear=function(){var re=this.doc.cm,he=this.line.widgets,Ce=this.line,be=Ot(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 qe=zo(this);Hn(Ce,Math.max(0,Ce.height-qe)),re&&(yo(re,function(){Vg(re,Ce,-qe),Ui(re,be,"widget")}),Wr(re,"lineWidgetCleared",re,this,be))}},zu.prototype.changed=function(){var re=this,he=this.height,Ce=this.doc.cm,be=this.line;this.height=null;var Oe=zo(this)-he;Oe&&(fn(this.doc,be)||Hn(be,be.height+Oe),Ce&&yo(Ce,function(){Ce.curOp.forceUpdate=!0,Vg(Ce,be,Oe),Wr(Ce,"lineWidgetChanged",Ce,re,Ot(be))}))},Nn(zu);function Vg(re,he,Ce){Dr(he)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&_h(re,Ce)}function ud(re,he,Ce,be){var Oe=new zu(re,Ce,be),qe=re.cm;return qe&&Oe.noHScroll&&(qe.display.alignWidgets=!0),Xh(re,he,"widget",function(pt){var Mt=pt.widgets||(pt.widgets=[]);if(Oe.insertAt==null?Mt.push(Oe):Mt.splice(Math.min(Mt.length-1,Math.max(0,Oe.insertAt)),0,Oe),Oe.line=pt,qe&&!fn(re,pt)){var kt=Dr(pt)<re.scrollTop;Hn(pt,pt.height+zo(Oe)),kt&&_h(qe,Oe.height),qe.curOp.forceUpdate=!0}return!0}),qe&&Wr(qe,"lineWidgetAdded",qe,Oe,typeof he=="number"?he:Ot(he)),Oe}var Kg=0,Kt=function(re,he){this.lines=[],this.type=he,this.doc=re,this.id=++Kg};Kt.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,he=re&&!re.curOp;if(he&&sl(re),xn(this,"clear")){var Ce=this.find();Ce&&Wr(this,"clear",Ce.from,Ce.to)}for(var be=null,Oe=null,qe=0;qe<this.lines.length;++qe){var pt=this.lines[qe],Mt=Kr(pt.markedSpans,this);re&&!this.collapsed?Ui(re,Ot(pt),"text"):re&&(Mt.to!=null&&(Oe=Ot(pt)),Mt.from!=null&&(be=Ot(pt))),pt.markedSpans=Yr(pt.markedSpans,Mt),Mt.from==null&&this.collapsed&&!fn(this.doc,pt)&&re&&Hn(pt,ba(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var kt=0;kt<this.lines.length;++kt){var Rt=Mn(this.lines[kt]),tn=fi(Rt);tn>re.display.maxLineLength&&(re.display.maxLine=Rt,re.display.maxLineLength=tn,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&&Wr(re,"markerCleared",re,this,be,Oe),he&&Fl(re),this.parent&&this.parent.clear()}},Kt.prototype.find=function(re,he){re==null&&this.type=="bookmark"&&(re=1);for(var Ce,be,Oe=0;Oe<this.lines.length;++Oe){var qe=this.lines[Oe],pt=Kr(qe.markedSpans,this);if(pt.from!=null&&(Ce=Qt(he?qe:Ot(qe),pt.from),re==-1))return Ce;if(pt.to!=null&&(be=Qt(he?qe:Ot(qe),pt.to),re==1))return be}return Ce&&{from:Ce,to:be}},Kt.prototype.changed=function(){var re=this,he=this.find(-1,!0),Ce=this,be=this.doc.cm;!he||!be||yo(be,function(){var Oe=he.line,qe=Ot(he.line),pt=il(be,qe);if(pt&&(rh(pt),be.curOp.selectionChanged=be.curOp.forceUpdate=!0),be.curOp.updateMaxLine=!0,!fn(Ce.doc,Oe)&&Ce.height!=null){var Mt=Ce.height;Ce.height=null;var kt=zo(Ce)-Mt;kt&&Hn(Oe,Oe.height+kt)}Wr(be,"markerChanged",be,re)})},Kt.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var he=this.doc.cm.curOp;(!he.maybeHiddenMarkers||St(he.maybeHiddenMarkers,this)==-1)&&(he.maybeUnhiddenMarkers||(he.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},Kt.prototype.detachLine=function(re){if(this.lines.splice(St(this.lines,re),1),!this.lines.length&&this.doc.cm){var he=this.doc.cm.curOp;(he.maybeHiddenMarkers||(he.maybeHiddenMarkers=[])).push(this)}},Nn(Kt);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 qe=new Kt(re,Oe),pt=Fn(he,Ce);if(be&&Ct(be,qe,!1),pt>0||pt==0&&qe.clearWhenEmpty!==!1)return qe;if(qe.replacedWith&&(qe.collapsed=!0,qe.widgetNode=Be("span",[qe.replacedWith],"CodeMirror-widget"),be.handleMouseEvents||qe.widgetNode.setAttribute("cm-ignore-events","true"),be.insertLeft&&(qe.widgetNode.insertLeft=!0)),qe.collapsed){if(Vn(re,he.line,he,Ce,qe)||he.line!=Ce.line&&Vn(re,Ce.line,he,Ce,qe))throw new Error("Inserting collapsed marker partially overlapping an existing one");un()}qe.addToHistory&&gf(re,{from:he,to:Ce,origin:"markText"},re.sel,NaN);var Mt=he.line,kt=re.cm,Rt;if(re.iter(Mt,Ce.line+1,function(_t){kt&&qe.collapsed&&!kt.options.lineWrapping&&Mn(_t)==kt.display.maxLine&&(Rt=!0),qe.collapsed&&Mt!=he.line&&Hn(_t,0),Di(_t,new gr(qe,Mt==he.line?he.ch:null,Mt==Ce.line?Ce.ch:null)),++Mt}),qe.collapsed&&re.iter(he.line,Ce.line+1,function(_t){fn(re,_t)&&Hn(_t,0)}),qe.clearOnEnter&&qt(qe,"beforeCursorEnter",function(){return qe.clear()}),qe.readOnly&&(sr(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),qe.collapsed&&(qe.id=++Kg,qe.atomic=!0),kt){if(Rt&&(kt.curOp.updateMaxLine=!0),qe.collapsed)Fo(kt,he.line,Ce.line+1);else if(qe.className||qe.startStyle||qe.endStyle||qe.css||qe.attributes||qe.title)for(var tn=he.line;tn<=Ce.line;tn++)Ui(kt,tn,"text");qe.atomic&&vf(kt.doc),Wr(kt,"markerAdded",kt,qe)}return qe}var gu=function(re,he){this.markers=re,this.primary=he;for(var Ce=0;Ce<re.length;++Ce)re[Ce].parent=this};gu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var re=0;re<this.markers.length;++re)this.markers[re].clear();Wr(this,"clear")}},gu.prototype.find=function(re,he){return this.primary.find(re,he)},Nn(gu);function Zg(re,he,Ce,be,Oe){be=Ct(be),be.shared=!1;var qe=[Yh(re,he,Ce,be,Oe)],pt=qe[0],Mt=be.widgetNode;return ql(re,function(kt){Mt&&(be.widgetNode=Mt.cloneNode(!0)),qe.push(Yh(kt,$n(kt,he),$n(kt,Ce),be,Oe));for(var Rt=0;Rt<kt.linked.length;++Rt)if(kt.linked[Rt].isParent)return;pt=Et(qe)}),new gu(qe,pt)}function gp(re){return re.findMarks(Qt(re.first,0),re.clipPos(Qt(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(),qe=re.clipPos(Oe.from),pt=re.clipPos(Oe.to);if(Fn(qe,pt)){var Mt=Yh(re,qe,pt,be.primary,be.primary.type);be.markers.push(Mt),Mt.parent=be}}}function mp(re){for(var he=function(be){var Oe=re[be],qe=[Oe.primary.doc];ql(Oe.primary.doc,function(kt){return qe.push(kt)});for(var pt=0;pt<Oe.markers.length;pt++){var Mt=Oe.markers[pt];St(qe,Mt.doc)==-1&&(Mt.parent=null,Oe.markers.splice(pt--,1))}},Ce=0;Ce<re.length;Ce++)he(Ce)}var t0=0,os=function(re,he,Ce,be,Oe){if(!(this instanceof os))return new os(re,he,Ce,be,Oe);Ce==null&&(Ce=0),ra.call(this,[new Oc([new Mi("",null)])]),this.first=Ce,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Ce;var qe=Qt(Ce,0);this.sel=Ru(qe),this.history=new Lc(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:qe,to:qe,text:re}),gs(this,Ru(qe),ct)};os.prototype=we(ra.prototype,{constructor:os,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=Rr(this,this.first,this.first+this.size);return re===!1?he:he.join(re||this.lineSeparator())},setValue:Wa(function(re){var he=Qt(this.first,0),Ce=this.first+this.size-1;dh(this,{from:he,to:Qt(Ce,vn(this,Ce).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&Bu(this.cm,0,0),gs(this,Ru(he),ct)}),replaceRange:function(re,he,Ce,be){he=$n(this,he),Ce=Ce?$n(this,Ce):he,Zh(this,re,he,Ce,be)},getRange:function(re,he,Ce){var be=kn(this,$n(this,re),$n(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(Dn(this,re))return vn(this,re)},getLineNumber:function(re){return Ot(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=vn(this,re)),Mn(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return $n(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:Wa(function(re,he,Ce){Wh(this,$n(this,typeof re=="number"?Qt(re,he||0):re),null,Ce)}),setSelection:Wa(function(re,he,Ce){Wh(this,$n(this,re),$n(this,he||re),Ce)}),extendSelection:Wa(function(re,he,Ce){sd(this,$n(this,re),he&&$n(this,he),Ce)}),extendSelections:Wa(function(re,he){Gg(this,br(this,re),he)}),extendSelectionsBy:Wa(function(re,he){var Ce=gt(this.sel.ranges,re);Gg(this,br(this,Ce),he)}),setSelections:Wa(function(re,he,Ce){if(re.length){for(var be=[],Oe=0;Oe<re.length;Oe++)be[Oe]=new To($n(this,re[Oe].anchor),$n(this,re[Oe].head));he==null&&(he=Math.min(re.length-1,this.sel.primIndex)),gs(this,Dl(this.cm,be,he),Ce)}}),addSelection:Wa(function(re,he,Ce){var be=this.sel.ranges.slice(0);be.push(new To($n(this,re),$n(this,he||re))),gs(this,Dl(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=kn(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=kn(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:Wa(function(re,he,Ce){for(var be=[],Oe=this.sel,qe=0;qe<Oe.ranges.length;qe++){var pt=Oe.ranges[qe];be[qe]={from:pt.from(),to:pt.to(),text:this.splitLines(re[qe]),origin:Ce}}for(var Mt=he&&he!="end"&&cf(this,be,he),kt=be.length-1;kt>=0;kt--)dh(this,be[kt]);Mt?ld(this,Mt):this.cm&&Ol(this.cm)}),undo:Wa(function(){wf(this,"undo")}),redo:Wa(function(){wf(this,"redo")}),undoSelection:Wa(function(){wf(this,"undo",!0)}),redoSelection:Wa(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 Lc(this.history.maxGeneration),ql(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:Iu(this.history.done),undone:Iu(this.history.undone)}},setHistory:function(re){var he=this.history=new Lc(this.history.maxGeneration);he.done=Iu(re.done.slice(0),null,!0),he.undone=Iu(re.undone.slice(0),null,!0)},setGutterMarker:Wa(function(re,he,Ce){return Xh(this,re,"gutter",function(be){var Oe=be.gutterMarkers||(be.gutterMarkers={});return Oe[he]=Ce,!Ce&&Re(Oe)&&(be.gutterMarkers=null),!0})}),clearGutter:Wa(function(re){var he=this;this.iter(function(Ce){Ce.gutterMarkers&&Ce.gutterMarkers[re]&&Xh(he,Ce,"gutter",function(){return Ce.gutterMarkers[re]=null,Re(Ce.gutterMarkers)&&(Ce.gutterMarkers=null),!0})})}),lineInfo:function(re){var he;if(typeof re=="number"){if(!Dn(this,re)||(he=re,re=vn(this,re),!re))return null}else if(he=Ot(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:Wa(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(Ae(Ce).test(be[Oe]))return!1;be[Oe]+=" "+Ce}return!0})}),removeLineClass:Wa(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",qe=be[Oe];if(qe)if(Ce==null)be[Oe]=null;else{var pt=qe.match(Ae(Ce));if(!pt)return!1;var Mt=pt.index+pt[0].length;be[Oe]=qe.slice(0,pt.index)+(!pt.index||Mt==qe.length?"":" ")+qe.slice(Mt)||null}else return!1;return!0})}),addLineWidget:Wa(function(re,he,Ce){return ud(this,re,he,Ce)}),removeLineWidget:function(re){re.clear()},markText:function(re,he,Ce){return Yh(this,$n(this,re),$n(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=$n(this,re),Yh(this,re,re,Ce,"bookmark")},findMarksAt:function(re){re=$n(this,re);var he=[],Ce=vn(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=$n(this,re),he=$n(this,he);var be=[],Oe=re.line;return this.iter(re.line,he.line+1,function(qe){var pt=qe.markedSpans;if(pt)for(var Mt=0;Mt<pt.length;Mt++){var kt=pt[Mt];!(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 qe=Oe.text.length+be;if(qe>re)return he=re,!0;re-=qe,++Ce}),$n(this,Qt(Ce,he))},indexFromPos:function(re){re=$n(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 os(Rr(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 os(Rr(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 po&&(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];ql(re,function(Oe){return be.push(Oe.id)},!0),re.history=new Lc(null),re.history.done=Iu(this.history.done,be),re.history.undone=Iu(this.history.undone,be)}},iterLinkedDocs:function(re){ql(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):Ci(re)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Wa(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))})}),os.prototype.eachLine=os.prototype.iter;var bf=0;function vp(re){var he=this;if(Qg(he),!(cn(he,re)||jo(he.display,re))){Zn(re),Ie&&(bf=+new Date);var Ce=Ua(he,re,!0),be=re.dataTransfer.files;if(!(!Ce||he.isReadOnly()))if(be&&be.length&&window.FileReader&&window.File)for(var Oe=be.length,qe=Array(Oe),pt=0,Mt=function(){++pt==Oe&&Da(he,function(){Ce=$n(he.doc,Ce);var gn={from:Ce,to:Ce,text:he.doc.splitLines(qe.filter(function(lr){return lr!=null}).join(he.doc.lineSeparator())),origin:"paste"};dh(he.doc,gn),ld(he.doc,Ru($n(he.doc,Ce),$n(he.doc,hh(gn))))})()},kt=function(gn,lr){if(he.options.allowDropFileTypes&&St(he.options.allowDropFileTypes,gn.type)==-1){Mt();return}var pr=new FileReader;pr.onerror=function(){return Mt()},pr.onload=function(){var wr=pr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(wr)){Mt();return}qe[lr]=wr,Mt()},pr.readAsText(gn)},Rt=0;Rt<be.length;Rt++)kt(be[Rt],Rt);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 tn=re.dataTransfer.getData("Text");if(tn){var _t;if(he.state.draggingText&&!he.state.draggingText.copy&&(_t=he.listSelections()),Vh(he.doc,Ru(Ce,Ce)),_t)for(var yn=0;yn<_t.length;++yn)Zh(he.doc,"",_t[yn].anchor,_t[yn].head,"drag");he.replaceSelection(tn,"around","paste"),he.display.input.focus()}}catch(gn){}}}}function Yg(re,he){if(Ie&&(!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&&!je)){var Ce=Ne("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=Ua(re,he);if(Ce){var be=document.createDocumentFragment();ao(re,Ce,be),re.display.dragCursor||(re.display.dragCursor=Ne("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 qe=0;qe<Ce.length;qe++)re(Ce[qe])})}}var yp=!1;function hl(){yp||(Fc(),yp=!0)}function Fc(){var re;qt(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,$g(Sp)},100))}),qt(window,"blur",function(){return $g(Du)})}function Sp(re){var he=re.display;he.cachedCharWidth=he.cachedTextHeight=he.cachedPaddingH=null,he.scrollbarsClipped=!1,re.setSize()}for(var mu={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++)mu[Pf+48]=mu[Pf+96]=String(Pf);for(var hd=65;hd<=90;hd++)mu[hd]=String.fromCharCode(hd);for(var Cf=1;Cf<=12;Cf++)mu[Cf+111]=mu[Cf+63235]="F"+Cf;var Ks={};Ks.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"},Ks.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"},Ks.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"},Ks.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"]},Ks.default=se?Ks.macDefault:Ks.pcDefault;function xp(re){var he=re.split(/-(?!$)/);re=he[he.length-1];for(var Ce,be,Oe,qe,pt=0;pt<he.length-1;pt++){var Mt=he[pt];if(/^(cmd|meta|m)$/i.test(Mt))qe=!0;else if(/^a(lt)?$/i.test(Mt))Ce=!0;else if(/^(c|ctrl|control)$/i.test(Mt))be=!0;else if(/^s(hift)?$/i.test(Mt))Oe=!0;else throw new Error("Unrecognized modifier name: "+Mt)}return Ce&&(re="Alt-"+re),be&&(re="Ctrl-"+re),qe&&(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=gt(Ce.split(" "),xp),qe=0;qe<Oe.length;qe++){var pt=void 0,Mt=void 0;qe==Oe.length-1?(Mt=Oe.join(" "),pt=be):(Mt=Oe.slice(0,qe+1).join(" "),pt="...");var kt=he[Mt];if(!kt)he[Mt]=pt;else if(kt!=pt)throw new Error("Inconsistent bindings for "+Mt)}delete re[Ce]}for(var Rt in he)re[Rt]=he[Rt];return re}function bl(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 bl(re,he.fallthrough,Ce,be);for(var qe=0;qe<he.fallthrough.length;qe++){var pt=bl(re,he.fallthrough[qe],Ce,be);if(pt)return pt}}}function Dc(re){var he=typeof re=="string"?re:mu[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=mu[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"?Ks[re]:re}function Zs(re,he){for(var Ce=re.doc.sel.ranges,be=[],Oe=0;Oe<Ce.length;Oe++){for(var qe=he(Ce[Oe]);be.length&&Fn(qe.from,Et(be).to)<=0;){var pt=be.pop();if(Fn(pt.from,qe.from)<0){qe.from=pt.from;break}}be.push(qe)}yo(re,function(){for(var Mt=be.length-1;Mt>=0;Mt--)Zh(re.doc,"",be[Mt].from,be[Mt].to,"+delete");Ol(re)})}function Pp(re,he,Ce){var be=it(re.text,he+Ce,Ce);return be<0||be>re.text.length?null:be}function Sa(re,he,Ce){var be=Pp(re,he.ch,Ce);return be==null?null:new Qt(he.line,be,Ce<0?"after":"before")}function Ef(re,he,Ce,be,Oe){if(re){he.doc.direction=="rtl"&&(Oe=-Oe);var qe=$t(Ce,he.doc.direction);if(qe){var pt=Oe<0?Et(qe):qe[0],Mt=Oe<0==(pt.level==1),kt=Mt?"after":"before",Rt;if(pt.level>0||he.doc.direction=="rtl"){var tn=Sl(he,Ce);Rt=Oe<0?Ce.text.length-1:0;var _t=Os(he,tn,Rt).top;Rt=yt(function(yn){return Os(he,tn,yn).top==_t},Oe<0==(pt.level==1)?pt.from:pt.to-1,Rt),kt=="before"&&(Rt=Pp(Ce,Rt,1))}else Rt=Oe<0?pt.to:pt.from;return new Qt(be,Rt,kt)}}return new Qt(be,Oe<0?Ce.text.length:0,Oe<0?"before":"after")}function cd(re,he,Ce,be){var Oe=$t(he,re.doc.direction);if(!Oe)return Sa(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 qe=Nt(Oe,Ce.ch,Ce.sticky),pt=Oe[qe];if(re.doc.direction=="ltr"&&pt.level%2==0&&(be>0?pt.to>Ce.ch:pt.from<Ce.ch))return Sa(he,Ce,be);var Mt=function(Br,ri){return Pp(he,Br instanceof Qt?Br.ch:Br,ri)},kt,Rt=function(Br){return re.options.lineWrapping?(kt=kt||Sl(re,he),da(re,he,kt,Br)):{begin:0,end:he.text.length}},tn=Rt(Ce.sticky=="before"?Mt(Ce,-1):Ce.ch);if(re.doc.direction=="rtl"||pt.level==1){var _t=pt.level==1==be<0,yn=Mt(Ce,_t?1:-1);if(yn!=null&&(_t?yn<=pt.to&&yn<=tn.end:yn>=pt.from&&yn>=tn.begin)){var gn=_t?"before":"after";return new Qt(Ce.line,yn,gn)}}var lr=function(Br,ri,Xr){for(var ci=function(Yo,Ra){return Ra?new Qt(Ce.line,Mt(Yo,1),"before"):new Qt(Ce.line,Yo,"after")};Br>=0&&Br<Oe.length;Br+=ri){var Ii=Oe[Br],Vr=ri>0==(Ii.level!=1),to=Vr?Xr.begin:Mt(Xr.end,-1);if(Ii.from<=to&&to<Ii.to||(to=Vr?Ii.from:Mt(Ii.to,-1),Xr.begin<=to&&to<Xr.end))return ci(to,Vr)}},pr=lr(qe+be,be,tn);if(pr)return pr;var wr=be>0?tn.end:Mt(tn.begin,-1);return wr!=null&&!(be>0&&wr==he.text.length)&&(pr=lr(be>0?0:Oe.length-1,be,Rt(wr)),pr)?pr:null}var ph={selectAll:ya,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),ct)},killLine:function(re){return Zs(re,function(he){if(he.empty()){var Ce=vn(re.doc,he.head.line).text.length;return he.head.ch==Ce&&he.head.line<re.lastLine()?{from:he.head,to:Qt(he.head.line+1,0)}:{from:he.head,to:Qt(he.head.line,Ce)}}else return{from:he.from(),to:he.to()}})},deleteLine:function(re){return Zs(re,function(he){return{from:Qt(he.from().line,0),to:$n(re.doc,Qt(he.to().line+1,0))}})},delLineLeft:function(re){return Zs(re,function(he){return{from:Qt(he.from().line,0),to:he.from()}})},delWrappedLineLeft:function(re){return Zs(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 Zs(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(Qt(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(Qt(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 Rc(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")},ht)},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")},ht)},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},ht)},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 qe=Ce[Oe].from(),pt=Je(re.getLine(qe.line),qe.ch,be);he.push(mt(be-pt%be))}re.replaceSelections(he)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return yo(re,function(){for(var he=re.listSelections(),Ce=[],be=0;be<he.length;be++)if(he[be].empty()){var Oe=he[be].head,qe=vn(re.doc,Oe.line).text;if(qe){if(Oe.ch==qe.length&&(Oe=new Qt(Oe.line,Oe.ch-1)),Oe.ch>0)Oe=new Qt(Oe.line,Oe.ch+1),re.replaceRange(qe.charAt(Oe.ch-1)+qe.charAt(Oe.ch-2),Qt(Oe.line,Oe.ch-2),Oe,"+transpose");else if(Oe.line>re.doc.first){var pt=vn(re.doc,Oe.line-1).text;pt&&(Oe=new Qt(Oe.line,1),re.replaceRange(qe.charAt(0)+re.doc.lineSeparator()+pt.charAt(pt.length-1),Qt(Oe.line-1,pt.length-1),Oe,"+transpose"))}}Ce.push(new To(Oe,Oe))}re.setSelections(Ce)})},newlineAndIndent:function(re){return yo(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);Ol(re)})},openLine:function(re){return re.replaceSelection(`
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function Bc(re,he){var Ce=vn(re.doc,he),be=Mn(Ce);return be!=Ce&&(he=Ot(be)),Ef(!0,re,be,he,1)}function Rc(re,he){var Ce=vn(re.doc,he),be=Kn(Ce);return be!=Ce&&(he=Ot(be)),Ef(!0,re,Ce,he,-1)}function Cp(re,he){var Ce=Bc(re,he.line),be=vn(re.doc,Ce.line),Oe=$t(be,re.doc.direction);if(!Oe||Oe[0].level==0){var qe=Math.max(Ce.ch,be.text.search(/\S/)),pt=he.line==Ce.line&&he.ch<=qe&&he.ch;return Qt(Ce.line,pt?0:qe,Ce.sticky)}return Ce}function Ic(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=bl(he,re.state.keyMaps[be],Ce,re);if(Oe)return Oe}return re.options.extraKeys&&bl(he,re.options.extraKeys,Ce,re)||bl(he,re.options.keyMap,Ce,re)}var vu=new nt;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:vu.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"&&Wr(re,"keyHandled",re,he,Ce),(Oe=="handled"||Oe=="multi")&&(Zn(Ce),wo(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 Ic(re,be,!0)})||Qh(re,Ce,he,function(be){if(typeof be=="string"?/^go[A-Z]/.test(be):be.motion)return Ic(re,be)}):Qh(re,Ce,he,function(be){return Ic(re,be)}):!1}function pd(re,he,Ce){return Qh(re,"'"+Ce+"'",he,function(be){return Ic(re,be,!0)})}var $h=null;function kp(re){var he=this;if(!(re.target&&re.target!=he.display.input.getField())&&(he.curOp.focus=Ke(),!cn(he,re))){Ie&&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&&!ai&&(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;Xe(he,"CodeMirror-crosshair");function Ce(be){(be.keyCode==18||!be.altKey)&&(De(he,"CodeMirror-crosshair"),hn(document,"keyup",Ce),hn(document,"mouseover",Ce))}qt(document,"keyup",Ce),qt(document,"mouseover",Ce)}function Mp(re){re.keyCode==16&&(this.doc.sel.shift=!1),cn(this,re)}function eu(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,Zn(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,Lp=function(re,he,Ce){this.time=re,this.pos=he,this.button=Ce};Lp.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 Lp(Ce,re,he),_c=null,"double"):(_c=new Lp(Ce,re,he),qh=null,"single")}function tu(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=Ua(he,re),Oe=$r(re),qe=be?Np(be,Oe):"single";window.focus(),Oe==1&&he.state.selectingText&&he.state.selectingText(re),!(be&&Ap(he,Oe,be,qe,re))&&(Oe==1?be?tm(he,be,qe,re):nr(re)==Ce.scroller&&Zn(re):Oe==2?(be&&sd(he.doc,be),setTimeout(function(){return Ce.input.focus()},20)):Oe==3&&(xe?he.display.input.onContextMenu(re):Uo(he)))}}}function Ap(re,he,Ce,be,Oe){var qe="Click";return be=="double"?qe="Double"+qe:be=="triple"&&(qe="Triple"+qe),qe=(he==1?"Left":he==2?"Middle":"Right")+qe,Qh(re,bp(qe,Oe),Oe,function(pt){if(typeof pt=="string"&&(pt=ph[pt]),!pt)return!1;var Mt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Mt=pt(re,Ce)!=bt}finally{re.state.suppressEdits=!1}return Mt})}function gd(re,he,Ce){var be=re.getOption("configureMouse"),Oe=be?be(re,he,Ce):{};if(Oe.unit==null){var qe=ie?Ce.shiftKey&&Ce.metaKey:Ce.altKey;Oe.unit=qe?"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){Ie?setTimeout(ut(Eo,re),0):re.curOp.focus=Ke();var Oe=gd(re,Ce,be),qe=re.doc.sel,pt;re.options.dragDrop&&hi&&!re.isReadOnly()&&Ce=="single"&&(pt=qe.contains(he))>-1&&(Fn((pt=qe.ranges[pt]).from(),he)<0||he.xRel>0)&&(Fn(pt.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,qe=!1,pt=Da(re,function(Rt){ve&&(Oe.scroller.draggable=!1),re.state.draggingText=!1,hn(Oe.wrapper.ownerDocument,"mouseup",pt),hn(Oe.wrapper.ownerDocument,"mousemove",Mt),hn(Oe.scroller,"dragstart",kt),hn(Oe.scroller,"drop",pt),qe||(Zn(Rt),be.addNew||sd(re.doc,Ce,null,null,be.extend),ve&&!je||Ie&&de==9?setTimeout(function(){Oe.wrapper.ownerDocument.body.focus({preventScroll:!0}),Oe.input.focus()},20):Oe.input.focus())}),Mt=function(Rt){qe=qe||Math.abs(he.clientX-Rt.clientX)+Math.abs(he.clientY-Rt.clientY)>=10},kt=function(){return qe=!0};ve&&(Oe.scroller.draggable=!0),re.state.draggingText=pt,pt.copy=!be.moveOnDrag,Oe.scroller.dragDrop&&Oe.scroller.dragDrop(),qt(Oe.wrapper.ownerDocument,"mouseup",pt),qt(Oe.wrapper.ownerDocument,"mousemove",Mt),qt(Oe.scroller,"dragstart",kt),qt(Oe.scroller,"drop",pt),Uo(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(Qt(he.line,0),$n(re.doc,Qt(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,qe=re.doc;Zn(he);var pt,Mt,kt=qe.sel,Rt=kt.ranges;if(be.addNew&&!be.extend?(Mt=qe.sel.contains(Ce),Mt>-1?pt=Rt[Mt]:pt=new To(Ce,Ce)):(pt=qe.sel.primary(),Mt=qe.sel.primIndex),be.unit=="rectangle")be.addNew||(pt=new To(Ce,Ce)),Ce=Ua(re,he,!0,!0),Mt=-1;else{var tn=Op(re,Ce,be.unit);be.extend?pt=ad(pt,tn.anchor,tn.head,be.extend):pt=tn}be.addNew?Mt==-1?(Mt=Rt.length,gs(qe,Dl(re,Rt.concat([pt]),Mt),{scroll:!1,origin:"*mouse"})):Rt.length>1&&Rt[Mt].empty()&&be.unit=="char"&&!be.extend?(gs(qe,Dl(re,Rt.slice(0,Mt).concat(Rt.slice(Mt+1)),0),{scroll:!1,origin:"*mouse"}),kt=qe.sel):fh(qe,Mt,pt,vt):(Mt=0,gs(qe,new xl([pt],0),vt),kt=qe.sel);var _t=Ce;function yn(Xr){if(Fn(_t,Xr)!=0)if(_t=Xr,be.unit=="rectangle"){for(var ci=[],Ii=re.options.tabSize,Vr=Je(vn(qe,Ce.line).text,Ce.ch,Ii),to=Je(vn(qe,Xr.line).text,Xr.ch,Ii),Yo=Math.min(Vr,to),Ra=Math.max(Vr,to),ia=Math.min(Ce.line,Xr.line),Is=Math.min(re.lastLine(),Math.max(Ce.line,Xr.line));ia<=Is;ia++){var ms=vn(qe,ia).text,Ma=Lt(ms,Yo,Ii);Yo==Ra?ci.push(new To(Qt(ia,Ma),Qt(ia,Ma))):ms.length>Ma&&ci.push(new To(Qt(ia,Ma),Qt(ia,Lt(ms,Ra,Ii))))}ci.length||ci.push(new To(Ce,Ce)),gs(qe,Dl(re,kt.ranges.slice(0,Mt).concat(ci),Mt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(Xr)}else{var Xs=pt,as=Op(re,Xr,be.unit),La=Xs.anchor,mo;Fn(as.anchor,La)>0?(mo=as.head,La=Un(Xs.from(),as.anchor)):(mo=as.anchor,La=er(Xs.to(),as.head));var ua=kt.ranges.slice(0);ua[Mt]=nm(re,new To($n(qe,La),mo)),gs(qe,Dl(re,ua,Mt),vt)}}var gn=Oe.wrapper.getBoundingClientRect(),lr=0;function pr(Xr){var ci=++lr,Ii=Ua(re,Xr,!0,be.unit=="rectangle");if(Ii)if(Fn(Ii,_t)!=0){re.curOp.focus=Ke(),yn(Ii);var Vr=$i(Oe,qe);(Ii.line>=Vr.to||Ii.line<Vr.from)&&setTimeout(Da(re,function(){lr==ci&&pr(Xr)}),150)}else{var to=Xr.clientY<gn.top?-20:Xr.clientY>gn.bottom?20:0;to&&setTimeout(Da(re,function(){lr==ci&&(Oe.scroller.scrollTop+=to,pr(Xr))}),50)}}function wr(Xr){re.state.selectingText=!1,lr=1/0,Xr&&(Zn(Xr),Oe.input.focus()),hn(Oe.wrapper.ownerDocument,"mousemove",Br),hn(Oe.wrapper.ownerDocument,"mouseup",ri),qe.history.lastSelOrigin=null}var Br=Da(re,function(Xr){Xr.buttons===0||!$r(Xr)?wr(Xr):pr(Xr)}),ri=Da(re,wr);re.state.selectingText=ri,qt(Oe.wrapper.ownerDocument,"mousemove",Br),qt(Oe.wrapper.ownerDocument,"mouseup",ri)}function nm(re,he){var Ce=he.anchor,be=he.head,Oe=vn(re.doc,Ce.line);if(Fn(Ce,be)==0&&Ce.sticky==be.sticky)return he;var qe=$t(Oe);if(!qe)return he;var pt=Nt(qe,Ce.ch,Ce.sticky),Mt=qe[pt];if(Mt.from!=Ce.ch&&Mt.to!=Ce.ch)return he;var kt=pt+(Mt.from==Ce.ch==(Mt.level!=1)?0:1);if(kt==0||kt==qe.length)return he;var Rt;if(be.line!=Ce.line)Rt=(be.line-Ce.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var tn=Nt(qe,be.ch,be.sticky),_t=tn-pt||(be.ch-Ce.ch)*(Mt.level==1?-1:1);tn==kt-1||tn==kt?Rt=_t<0:Rt=_t>0}var yn=qe[kt+(Rt?-1:0)],gn=Rt==(yn.level==1),lr=gn?yn.from:yn.to,pr=gn?"after":"before";return Ce.ch==lr&&Ce.sticky==pr?he:new To(new Qt(Ce.line,lr,pr),be)}function md(re,he,Ce,be){var Oe,qe;if(he.touches)Oe=he.touches[0].clientX,qe=he.touches[0].clientY;else try{Oe=he.clientX,qe=he.clientY}catch(yn){return!1}if(Oe>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;be&&Zn(he);var pt=re.display,Mt=pt.lineDiv.getBoundingClientRect();if(qe>Mt.bottom||!xn(re,Ce))return qn(he);qe-=Mt.top-pt.viewOffset;for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var Rt=pt.gutters.childNodes[kt];if(Rt&&Rt.getBoundingClientRect().right>=Oe){var tn=Ut(re.doc,qe),_t=re.display.gutterSpecs[kt];return an(re,Ce,re,tn,_t.className,he),qn(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 xn(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-"),uu(re)}var gh={toString:function(){return"CodeMirror.Init"}},Fp={},kf={};function im(re){var he=re.optionHandlers;function Ce(be,Oe,qe,pt){re.defaults[be]=Oe,qe&&(he[be]=pt?function(Mt,kt,Rt){Rt!=gh&&qe(Mt,kt,Rt)}:qe)}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,eo(be)},!0),Ce("indentUnit",2,eo,!0),Ce("indentWithTabs",!1),Ce("smartIndent",!0),Ce("tabSize",4,function(be){ff(be),uu(be),Fo(be)},!0),Ce("lineSeparator",null,function(be,Oe){if(be.doc.lineSep=Oe,!!Oe){var qe=[],pt=be.doc.first;be.doc.iter(function(kt){for(var Rt=0;;){var tn=kt.text.indexOf(Oe,Rt);if(tn==-1)break;Rt=tn+Oe.length,qe.push(Qt(pt,tn))}pt++});for(var Mt=qe.length-1;Mt>=0;Mt--)Zh(be.doc,Oe,qe[Mt],Qt(qe[Mt].line,qe[Mt].ch+Oe.length))}}),Ce("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(be,Oe,qe){be.state.specialChars=new RegExp(Oe.source+(Oe.test(" ")?"":"| "),"g"),qe!=gh&&be.refresh()}),Ce("specialCharPlaceholder",Ni,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),ll(be)},!0),Ce("keyMap","default",function(be,Oe,qe){var pt=Jh(Oe),Mt=qe!=gh&&Jh(qe);Mt&&Mt.detach&&Mt.detach(be,pt),pt.attach&&pt.attach(be,Mt||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),ll(be)},!0),Ce("fixedGutter",!0,function(be,Oe){be.display.gutters.style.left=Oe?Fu(be.display)+"px":"0",be.refresh()},!0),Ce("coverGutterNextToScrollbar",!1,function(be){return Fa(be)},!0),Ce("scrollbarStyle","native",function(be){Ql(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),ll(be)},!0),Ce("firstLineNumber",1,ll,!0),Ce("lineNumberFormatter",function(be){return be},ll,!0),Ce("showCursorWhenSelecting",!1,ma,!0),Ce("resetSelectionOnContextMenu",!0),Ce("lineWiseCopyCut",!0),Ce("pasteLinesPerSelection",!0),Ce("selectionsMayTouch",!1),Ce("readOnly",!1,function(be,Oe){Oe=="nocursor"&&(Du(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,ma,!0),Ce("singleCursorHeightPerLine",!0,ma,!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,qe=he?qt:hn;qe(re.display.scroller,"dragstart",Oe.start),qe(re.display.scroller,"dragenter",Oe.enter),qe(re.display.scroller,"dragover",Oe.over),qe(re.display.scroller,"dragleave",Oe.leave),qe(re.display.scroller,"drop",Oe.drop)}}function om(re){re.options.lineWrapping?(Xe(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(De(re.display.wrapper,"CodeMirror-wrap"),Ir(re)),vi(re),Fo(re),uu(re),setTimeout(function(){return Fa(re)},100)}function po(re,he){var Ce=this;if(!(this instanceof po))return new po(re,he);this.options=he=he?Ct(he):{},Ct(Fp,he,!1);var be=he.value;typeof be=="string"?be=new os(be,he.mode,null,he.lineSeparator,he.direction):he.mode&&(be.modeOption=he.mode),this.doc=be;var Oe=new po.inputStyles[he.inputStyle](this),qe=this.display=new uh(re,be,Oe,he);qe.wrapper.CodeMirror=this,Sd(this),he.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ql(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 nt,keySeq:null,specialChars:null},he.autofocus&&!te&&qe.input.focus(),Ie&&de<11&&setTimeout(function(){return Ce.display.input.reset(!0)},20),zc(this),hl(),sl(this),this.curOp.forceUpdate=!0,rd(this,be),he.autofocus&&!te||this.hasFocus()?setTimeout(function(){Ce.hasFocus()&&!Ce.state.focused&&ho(Ce)},20):Du(this);for(var pt in kf)kf.hasOwnProperty(pt)&&kf[pt](this,he[pt],gh);Pa(this),he.finishInit&&he.finishInit(this);for(var Mt=0;Mt<ec.length;++Mt)ec[Mt](this);Fl(this),ve&&he.lineWrapping&&getComputedStyle(qe.lineDiv).textRendering=="optimizelegibility"&&(qe.lineDiv.style.textRendering="auto")}po.defaults=Fp,po.optionHandlers=kf;function zc(re){var he=re.display;qt(he.scroller,"mousedown",Da(re,tu)),Ie&&de<11?qt(he.scroller,"dblclick",Da(re,function(kt){if(!cn(re,kt)){var Rt=Ua(re,kt);if(!(!Rt||vd(re,kt)||jo(re.display,kt))){Zn(kt);var tn=re.findWordAt(Rt);sd(re.doc,tn.anchor,tn.head)}}})):qt(he.scroller,"dblclick",function(kt){return cn(re,kt)||Zn(kt)}),qt(he.scroller,"contextmenu",function(kt){return yd(re,kt)}),qt(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 qe(kt){if(kt.touches.length!=1)return!1;var Rt=kt.touches[0];return Rt.radiusX<=1&&Rt.radiusY<=1}function pt(kt,Rt){if(Rt.left==null)return!0;var tn=Rt.left-kt.left,_t=Rt.top-kt.top;return tn*tn+_t*_t>20*20}qt(he.scroller,"touchstart",function(kt){if(!cn(re,kt)&&!qe(kt)&&!vd(re,kt)){he.input.ensurePolled(),clearTimeout(Ce);var Rt=+new Date;he.activeTouch={start:Rt,moved:!1,prev:Rt-be.end<=300?be:null},kt.touches.length==1&&(he.activeTouch.left=kt.touches[0].pageX,he.activeTouch.top=kt.touches[0].pageY)}}),qt(he.scroller,"touchmove",function(){he.activeTouch&&(he.activeTouch.moved=!0)}),qt(he.scroller,"touchend",function(kt){var Rt=he.activeTouch;if(Rt&&!jo(he,kt)&&Rt.left!=null&&!Rt.moved&&new Date-Rt.start<300){var tn=re.coordsChar(he.activeTouch,"page"),_t;!Rt.prev||pt(Rt,Rt.prev)?_t=new To(tn,tn):!Rt.prev.prev||pt(Rt,Rt.prev.prev)?_t=re.findWordAt(tn):_t=new To(Qt(tn.line,0),$n(re.doc,Qt(tn.line+1,0))),re.setSelection(_t.anchor,_t.head),re.focus(),Zn(kt)}Oe()}),qt(he.scroller,"touchcancel",Oe),qt(he.scroller,"scroll",function(){he.scroller.clientHeight&&(Yl(re,he.scroller.scrollTop),Jl(re,he.scroller.scrollLeft,!0),an(re,"scroll",re))}),qt(he.scroller,"mousewheel",function(kt){return Za(re,kt)}),qt(he.scroller,"DOMMouseScroll",function(kt){return Za(re,kt)}),qt(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 Mt=he.input.getField();qt(Mt,"keyup",function(kt){return Mp.call(re,kt)}),qt(Mt,"keydown",Da(re,kp)),qt(Mt,"keypress",Da(re,eu)),qt(Mt,"focus",function(kt){return ho(re,kt)}),qt(Mt,"blur",function(kt){return Du(re,kt)})}var ec=[];po.defineInitHook=function(re){return ec.push(re)};function Ba(re,he,Ce,be){var Oe=re.doc,qe;Ce==null&&(Ce="add"),Ce=="smart"&&(Oe.mode.indent?qe=zi(re,he).state:Ce="prev");var pt=re.options.tabSize,Mt=vn(Oe,he),kt=Je(Mt.text,null,pt);Mt.stateAfter&&(Mt.stateAfter=null);var Rt=Mt.text.match(/^\s*/)[0],tn;if(!be&&!/\S/.test(Mt.text))tn=0,Ce="not";else if(Ce=="smart"&&(tn=Oe.mode.indent(qe,Mt.text.slice(Rt.length),Mt.text),tn==bt||tn>150)){if(!be)return;Ce="prev"}Ce=="prev"?he>Oe.first?tn=Je(vn(Oe,he-1).text,null,pt):tn=0:Ce=="add"?tn=kt+re.options.indentUnit:Ce=="subtract"?tn=kt-re.options.indentUnit:typeof Ce=="number"&&(tn=kt+Ce),tn=Math.max(0,tn);var _t="",yn=0;if(re.options.indentWithTabs)for(var gn=Math.floor(tn/pt);gn;--gn)yn+=pt,_t+=" ";if(yn<tn&&(_t+=mt(tn-yn)),_t!=Rt)return Zh(Oe,_t,Qt(he,0),Qt(he,Rt.length),"+input"),Mt.stateAfter=null,!0;for(var lr=0;lr<Oe.sel.ranges.length;lr++){var pr=Oe.sel.ranges[lr];if(pr.head.line==he&&pr.head.ch<Rt.length){var wr=Qt(he,Rt.length);fh(Oe,lr,new To(wr,wr));break}}}var Rs=null;function tc(re){Rs=re}function Tf(re,he,Ce,be,Oe){var qe=re.doc;re.display.shift=!1,be||(be=qe.sel);var pt=+new Date-200,Mt=Oe=="paste"||re.state.pasteIncoming>pt,kt=Ci(he),Rt=null;if(Mt&&be.ranges.length>1)if(Rs&&Rs.text.join(`
`)==he){if(be.ranges.length%Rs.text.length==0){Rt=[];for(var tn=0;tn<Rs.text.length;tn++)Rt.push(qe.splitLines(Rs.text[tn]))}}else kt.length==be.ranges.length&&re.options.pasteLinesPerSelection&&(Rt=gt(kt,function(Br){return[Br]}));for(var _t=re.curOp.updateInput,yn=be.ranges.length-1;yn>=0;yn--){var gn=be.ranges[yn],lr=gn.from(),pr=gn.to();gn.empty()&&(Ce&&Ce>0?lr=Qt(lr.line,lr.ch-Ce):re.state.overwrite&&!Mt?pr=Qt(pr.line,Math.min(vn(qe,pr.line).text.length,pr.ch+Et(kt).length)):Mt&&Rs&&Rs.lineWise&&Rs.text.join(`
`)==kt.join(`
`)&&(lr=pr=Qt(lr.line,0)));var wr={from:lr,to:pr,text:Rt?Rt[yn%Rt.length]:kt,origin:Oe||(Mt?"paste":re.state.cutIncoming>pt?"cut":"+input")};dh(re.doc,wr),Wr(re,"inputRead",re,wr)}he&&!Mt&&Bp(re,he),Ol(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&&yo(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 qe=re.getModeAt(Oe.head),pt=!1;if(qe.electricChars){for(var Mt=0;Mt<qe.electricChars.length;Mt++)if(he.indexOf(qe.electricChars.charAt(Mt))>-1){pt=Ba(re,Oe.head.line,"smart");break}}else qe.electricInput&&qe.electricInput.test(vn(re.doc,Oe.head.line).text.slice(0,Oe.head.ch))&&(pt=Ba(re,Oe.head.line,"smart"));pt&&Wr(re,"electricInput",re,Oe.head.line)}}}function Rp(re){for(var he=[],Ce=[],be=0;be<re.doc.sel.ranges.length;be++){var Oe=re.doc.sel.ranges[be].head.line,qe={anchor:Qt(Oe,0),head:Qt(Oe+1,0)};Ce.push(qe),he.push(re.getRange(qe.anchor,qe.head))}return{text:he,ranges:Ce}}function Ip(re,he,Ce,be){re.setAttribute("autocorrect",Ce?"":"off"),re.setAttribute("autocapitalize",be?"":"off"),re.setAttribute("spellcheck",!!he)}function _p(){var re=Ne("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),he=Ne("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"),Ip(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 qe=this.options,pt=qe[be];qe[be]==Oe&&be!="mode"||(qe[be]=Oe,he.hasOwnProperty(be)&&Da(this,he[be])(this,Oe,pt),an(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,qe=0;qe<Oe.length;++qe)if(Oe[qe]==be||Oe[qe].name==be)return Oe.splice(qe,1),!0},addOverlay:Ha(function(be,Oe){var qe=be.token?be:re.getMode(this.options,be);if(qe.startState)throw new Error("Overlays may not be stateful.");$e(this.state.overlays,{mode:qe,modeSpec:be,opaque:Oe&&Oe.opaque,priority:Oe&&Oe.priority||0},function(pt){return pt.priority}),this.state.modeGen++,Fo(this)}),removeOverlay:Ha(function(be){for(var Oe=this.state.overlays,qe=0;qe<Oe.length;++qe){var pt=Oe[qe].modeSpec;if(pt==be||typeof be=="string"&&pt.name==be){Oe.splice(qe,1),this.state.modeGen++,Fo(this);return}}}),indentLine:Ha(function(be,Oe,qe){typeof Oe!="string"&&typeof Oe!="number"&&(Oe==null?Oe=this.options.smartIndent?"smart":"prev":Oe=Oe?"add":"subtract"),Dn(this.doc,be)&&Ba(this,be,Oe,qe)}),indentSelection:Ha(function(be){for(var Oe=this.doc.sel.ranges,qe=-1,pt=0;pt<Oe.length;pt++){var Mt=Oe[pt];if(Mt.empty())Mt.head.line>qe&&(Ba(this,Mt.head.line,be,!0),qe=Mt.head.line,pt==this.doc.sel.primIndex&&Ol(this));else{var kt=Mt.from(),Rt=Mt.to(),tn=Math.max(qe,kt.line);qe=Math.min(this.lastLine(),Rt.line-(Rt.ch?0:1))+1;for(var _t=tn;_t<qe;++_t)Ba(this,_t,be);var yn=this.doc.sel.ranges;kt.ch==0&&Oe.length==yn.length&&yn[pt].from().ch>0&&fh(this.doc,pt,new To(kt,yn[pt].to()),ct)}}}),getTokenAt:function(be,Oe){return mi(this,be,Oe)},getLineTokens:function(be,Oe){return mi(this,Qt(be),Oe,!0)},getTokenTypeAt:function(be){be=$n(this.doc,be);var Oe=xi(this,vn(this.doc,be.line)),qe=0,pt=(Oe.length-1)/2,Mt=be.ch,kt;if(Mt==0)kt=Oe[2];else for(;;){var Rt=qe+pt>>1;if((Rt?Oe[Rt*2-1]:0)>=Mt)pt=Rt;else if(Oe[Rt*2+1]<Mt)qe=Rt+1;else{kt=Oe[Rt*2+2];break}}var tn=kt?kt.indexOf("overlay "):-1;return tn<0?kt:tn==0?null:kt.slice(0,tn-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 qe=[];if(!Ce.hasOwnProperty(Oe))return qe;var pt=Ce[Oe],Mt=this.getModeAt(be);if(typeof Mt[Oe]=="string")pt[Mt[Oe]]&&qe.push(pt[Mt[Oe]]);else if(Mt[Oe])for(var kt=0;kt<Mt[Oe].length;kt++){var Rt=pt[Mt[Oe][kt]];Rt&&qe.push(Rt)}else Mt.helperType&&pt[Mt.helperType]?qe.push(pt[Mt.helperType]):pt[Mt.name]&&qe.push(pt[Mt.name]);for(var tn=0;tn<pt._global.length;tn++){var _t=pt._global[tn];_t.pred(Mt,this)&&St(qe,_t.val)==-1&&qe.push(_t.val)}return qe},getStateAfter:function(be,Oe){var qe=this.doc;return be=Rn(qe,be==null?qe.first+qe.size-1:be),zi(this,be+1,Oe).state},cursorCoords:function(be,Oe){var qe,pt=this.doc.sel.primary();return be==null?qe=pt.head:typeof be=="object"?qe=$n(this.doc,be):qe=be?pt.from():pt.to(),co(this,qe,Oe||"page")},charCoords:function(be,Oe){return Ga(this,$n(this.doc,be),Oe||"page")},coordsChar:function(be,Oe){return be=Xl(this,be,Oe||"page"),sa(this,be.left,be.top)},lineAtHeight:function(be,Oe){return be=Xl(this,{top:be,left:0},Oe||"page").top,Ut(this.doc,be+this.display.viewOffset)},heightAtLine:function(be,Oe,qe){var pt=!1,Mt;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,pt=!0),Mt=vn(this.doc,be)}else Mt=be;return ga(this,Mt,{top:0,left:0},Oe||"page",qe||pt).top+(pt?this.doc.height-Dr(Mt):0)},defaultTextHeight:function(){return ba(this.display)},defaultCharWidth:function(){return Fs(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(be,Oe,qe,pt,Mt){var kt=this.display;be=co(this,$n(this.doc,be));var Rt=be.bottom,tn=be.left;if(Oe.style.position="absolute",Oe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Oe),kt.sizer.appendChild(Oe),pt=="over")Rt=be.top;else if(pt=="above"||pt=="near"){var _t=Math.max(kt.wrapper.clientHeight,this.doc.height),yn=Math.max(kt.sizer.clientWidth,kt.lineSpace.clientWidth);(pt=="above"||be.bottom+Oe.offsetHeight>_t)&&be.top>Oe.offsetHeight?Rt=be.top-Oe.offsetHeight:be.bottom+Oe.offsetHeight<=_t&&(Rt=be.bottom),tn+Oe.offsetWidth>yn&&(tn=yn-Oe.offsetWidth)}Oe.style.top=Rt+"px",Oe.style.left=Oe.style.right="",Mt=="right"?(tn=kt.sizer.clientWidth-Oe.offsetWidth,Oe.style.right="0px"):(Mt=="left"?tn=0:Mt=="middle"&&(tn=(kt.sizer.clientWidth-Oe.offsetWidth)/2),Oe.style.left=tn+"px"),qe&&ih(this,{left:tn,top:Rt,right:tn+Oe.offsetWidth,bottom:Rt+Oe.offsetHeight})},triggerOnKeyDown:Ha(kp),triggerOnKeyPress:Ha(eu),triggerOnKeyUp:Mp,triggerOnMouseDown:Ha(tu),execCommand:function(be){if(ph.hasOwnProperty(be))return ph[be].call(null,this)},triggerElectric:Ha(function(be){Bp(this,be)}),findPosH:function(be,Oe,qe,pt){var Mt=1;Oe<0&&(Mt=-1,Oe=-Oe);for(var kt=$n(this.doc,be),Rt=0;Rt<Oe&&(kt=Mf(this.doc,kt,Mt,qe,pt),!kt.hitSide);++Rt);return kt},moveH:Ha(function(be,Oe){var qe=this;this.extendSelectionsBy(function(pt){return qe.display.shift||qe.doc.extend||pt.empty()?Mf(qe.doc,pt.head,be,Oe,qe.options.rtlMoveVisually):be<0?pt.from():pt.to()},ht)}),deleteH:Ha(function(be,Oe){var qe=this.doc.sel,pt=this.doc;qe.somethingSelected()?pt.replaceSelection("",null,"+delete"):Zs(this,function(Mt){var kt=Mf(pt,Mt.head,be,Oe,!1);return be<0?{from:kt,to:Mt.head}:{from:Mt.head,to:kt}})}),findPosV:function(be,Oe,qe,pt){var Mt=1,kt=pt;Oe<0&&(Mt=-1,Oe=-Oe);for(var Rt=$n(this.doc,be),tn=0;tn<Oe;++tn){var _t=co(this,Rt,"div");if(kt==null?kt=_t.left:_t.left=kt,Rt=vh(this,_t,Mt,qe),Rt.hitSide)break}return Rt},moveV:Ha(function(be,Oe){var qe=this,pt=this.doc,Mt=[],kt=!this.display.shift&&!pt.extend&&pt.sel.somethingSelected();if(pt.extendSelectionsBy(function(tn){if(kt)return be<0?tn.from():tn.to();var _t=co(qe,tn.head,"div");tn.goalColumn!=null&&(_t.left=tn.goalColumn),Mt.push(_t.left);var yn=vh(qe,_t,be,Oe);return Oe=="page"&&tn==pt.sel.primary()&&_h(qe,Ga(qe,yn,"div").top-_t.top),yn},ht),Mt.length)for(var Rt=0;Rt<pt.sel.ranges.length;Rt++)pt.sel.ranges[Rt].goalColumn=Mt[Rt]}),findWordAt:function(be){var Oe=this.doc,qe=vn(Oe,be.line).text,pt=be.ch,Mt=be.ch;if(qe){var kt=this.getHelper(be,"wordChars");(be.sticky=="before"||Mt==qe.length)&&pt?--pt:++Mt;for(var Rt=qe.charAt(pt),tn=tt(Rt,kt)?function(_t){return tt(_t,kt)}:/\s/.test(Rt)?function(_t){return/\s/.test(_t)}:function(_t){return!/\s/.test(_t)&&!tt(_t)};pt>0&&tn(qe.charAt(pt-1));)--pt;for(;Mt<qe.length&&tn(qe.charAt(Mt));)++Mt}return new To(Qt(be.line,pt),Qt(be.line,Mt))},toggleOverwrite:function(be){be!=null&&be==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Xe(this.display.cursorDiv,"CodeMirror-overwrite"):De(this.display.cursorDiv,"CodeMirror-overwrite"),an(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ke()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ha(function(be,Oe){Bu(this,be,Oe)}),getScrollInfo:function(){var be=this.display.scroller;return{left:be.scrollLeft,top:be.scrollTop,height:be.scrollHeight-vo(this)-this.display.barHeight,width:be.scrollWidth-vo(this)-this.display.barWidth,clientHeight:ds(this),clientWidth:fs(this)}},scrollIntoView:Ha(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:Qt(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?uo(this,be):zh(this,be.from,be.to,be.margin)}),setSize:Ha(function(be,Oe){var qe=this,pt=function(kt){return typeof kt=="number"||/^\d+$/.test(String(kt))?kt+"px":kt};be!=null&&(this.display.wrapper.style.width=pt(be)),Oe!=null&&(this.display.wrapper.style.height=pt(Oe)),this.options.lineWrapping&&Zl(this);var Mt=this.display.viewFrom;this.doc.iter(Mt,this.display.viewTo,function(kt){if(kt.widgets){for(var Rt=0;Rt<kt.widgets.length;Rt++)if(kt.widgets[Rt].noHScroll){Ui(qe,Mt,"widget");break}}++Mt}),this.curOp.forceUpdate=!0,an(this,"refresh",this)}),operation:function(be){return yo(this,be)},startOperation:function(){return sl(this)},endOperation:function(){return Fl(this)},refresh:Ha(function(){var be=this.display.cachedTextHeight;Fo(this),this.curOp.forceUpdate=!0,uu(this),Bu(this,this.doc.scrollLeft,this.doc.scrollTop),sh(this.display),(be==null||Math.abs(be-ba(this.display))>.5||this.options.lineWrapping)&&vi(this),an(this,"refresh",this)}),swapDoc:Ha(function(be){var Oe=this.doc;return Oe.cm=null,this.state.selectingText&&this.state.selectingText(),rd(this,be),uu(this),this.display.input.reset(),Bu(this,be.scrollLeft,be.scrollTop),this.curOp.forceScroll=!0,Wr(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}},Nn(re),re.registerHelper=function(be,Oe,qe){Ce.hasOwnProperty(be)||(Ce[be]=re[be]={_global:[]}),Ce[be][Oe]=qe},re.registerGlobalHelper=function(be,Oe,qe,pt){re.registerHelper(be,Oe,pt),Ce[be]._global.push({pred:qe,val:pt})}}function Mf(re,he,Ce,be,Oe){var qe=he,pt=Ce,Mt=vn(re,he.line),kt=Oe&&re.direction=="rtl"?-Ce:Ce;function Rt(){var ri=he.line+kt;return ri<re.first||ri>=re.first+re.size?!1:(he=new Qt(ri,he.ch,he.sticky),Mt=vn(re,ri))}function tn(ri){var Xr;if(be=="codepoint"){var ci=Mt.text.charCodeAt(he.ch+(be>0?0:-1));isNaN(ci)?Xr=null:Xr=new Qt(he.line,Math.max(0,Math.min(Mt.text.length,he.ch+Ce*(ci>=55296&&ci<56320?2:1))),-Ce)}else Oe?Xr=cd(re.cm,Mt,he,Ce):Xr=Sa(Mt,he,Ce);if(Xr==null)if(!ri&&Rt())he=Ef(Oe,re.cm,Mt,he.line,kt);else return!1;else he=Xr;return!0}if(be=="char"||be=="codepoint")tn();else if(be=="column")tn(!0);else if(be=="word"||be=="group")for(var _t=null,yn=be=="group",gn=re.cm&&re.cm.getHelper(he,"wordChars"),lr=!0;!(Ce<0&&!tn(!lr));lr=!1){var pr=Mt.text.charAt(he.ch)||`
`,wr=tt(pr,gn)?"w":yn&&pr==`
`?"n":!yn||/\s/.test(pr)?null:"p";if(yn&&!lr&&!wr&&(wr="s"),_t&&_t!=wr){Ce<0&&(Ce=1,tn(),he.sticky="after");break}if(wr&&(_t=wr),Ce>0&&!tn(!lr))break}var Br=Sf(re,he,qe,pt,!0);return vr(qe,Br)&&(Br.hitSide=!0),Br}function vh(re,he,Ce,be){var Oe=re.doc,qe=he.left,pt;if(be=="page"){var Mt=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),kt=Math.max(Mt-.5*ba(re.display),3);pt=(Ce>0?he.bottom:he.top)+Ce*kt}else be=="line"&&(pt=Ce>0?he.bottom+3:he.top-3);for(var Rt;Rt=sa(re,qe,pt),!!Rt.outside;){if(Ce<0?pt<=0:pt>=Oe.height){Rt.hitSide=!0;break}pt+=Ce*5}return Rt}var Do=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new nt,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;Ip(Oe,be.options.spellcheck,be.options.autocorrect,be.options.autocapitalize);function qe(Mt){for(var kt=Mt.target;kt;kt=kt.parentNode){if(kt==Oe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(kt.className))break}return!1}qt(Oe,"paste",function(Mt){!qe(Mt)||cn(be,Mt)||Dp(Mt,be)||de<=11&&setTimeout(Da(be,function(){return he.updateFromDOM()}),20)}),qt(Oe,"compositionstart",function(Mt){he.composing={data:Mt.data,done:!1}}),qt(Oe,"compositionupdate",function(Mt){he.composing||(he.composing={data:Mt.data,done:!1})}),qt(Oe,"compositionend",function(Mt){he.composing&&(Mt.data!=he.composing.data&&he.readFromDOMSoon(),he.composing.done=!0)}),qt(Oe,"touchstart",function(){return Ce.forceCompositionEnd()}),qt(Oe,"input",function(){he.composing||he.readFromDOMSoon()});function pt(Mt){if(!(!qe(Mt)||cn(be,Mt))){if(be.somethingSelected())tc({lineWise:!1,text:be.getSelections()}),Mt.type=="cut"&&be.replaceSelection("",null,"cut");else if(be.options.lineWiseCopyCut){var kt=Rp(be);tc({lineWise:!0,text:kt.text}),Mt.type=="cut"&&be.operation(function(){be.setSelections(kt.ranges,0,ct),be.replaceSelection("",null,"cut")})}else return;if(Mt.clipboardData){Mt.clipboardData.clearData();var Rt=Rs.text.join(`
`);if(Mt.clipboardData.setData("Text",Rt),Mt.clipboardData.getData("Text")==Rt){Mt.preventDefault();return}}var tn=_p(),_t=tn.firstChild;be.display.lineSpace.insertBefore(tn,be.display.lineSpace.firstChild),_t.value=Rs.text.join(`
`);var yn=document.activeElement;lt(_t),setTimeout(function(){be.display.lineSpace.removeChild(tn),yn.focus(),yn==Oe&&Ce.showPrimarySelection()},50)}}qt(Oe,"copy",pt),qt(Oe,"cut",pt)},Do.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Do.prototype.prepareSelection=function(){var re=hu(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 qe=Lf(he,re.anchorNode,re.anchorOffset),pt=Lf(he,re.focusNode,re.focusOffset);if(!(qe&&!qe.bad&&pt&&!pt.bad&&Fn(Un(qe,pt),be)==0&&Fn(er(qe,pt),Oe)==0)){var Mt=he.display.view,kt=be.line>=he.display.viewFrom&&wd(he,be)||{node:Mt[0].measure.map[2],offset:0},Rt=Oe.line<he.display.viewTo&&wd(he,Oe);if(!Rt){var tn=Mt[Mt.length-1].measure,_t=tn.maps?tn.maps[tn.maps.length-1]:tn.map;Rt={node:_t[_t.length-1],offset:_t[_t.length-2]-_t[_t.length-3]}}if(!kt||!Rt){re.removeAllRanges();return}var yn=re.rangeCount&&re.getRangeAt(0),gn;try{gn=Ge(kt.node,kt.offset,Rt.offset,Rt.node)}catch(lr){}gn&&(!at&&he.state.focused?(re.collapse(kt.node,kt.offset),gn.collapsed||(re.removeAllRanges(),re.addRange(gn))):(re.removeAllRanges(),re.addRange(gn)),yn&&re.anchorNode==null?re.addRange(yn):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():yo(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=Lf(he,re.anchorNode,re.anchorOffset),be=Lf(he,re.focusNode,re.focusOffset);Ce&&be&&yo(he,function(){gs(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=Qt(be.line-1,vn(re.doc,be.line-1).length)),Oe.ch==vn(re.doc,Oe.line).text.length&&Oe.line<re.lastLine()&&(Oe=Qt(Oe.line+1,0)),be.line<he.viewFrom||Oe.line>he.viewTo-1)return!1;var qe,pt,Mt;be.line==he.viewFrom||(qe=Ds(re,be.line))==0?(pt=Ot(he.view[0].line),Mt=he.view[0].node):(pt=Ot(he.view[qe].line),Mt=he.view[qe-1].node.nextSibling);var kt=Ds(re,Oe.line),Rt,tn;if(kt==he.view.length-1?(Rt=he.viewTo-1,tn=he.lineDiv.lastChild):(Rt=Ot(he.view[kt+1].line)-1,tn=he.view[kt+1].node.previousSibling),!Mt)return!1;for(var _t=re.doc.splitLines(Uc(re,Mt,tn,pt,Rt)),yn=kn(re.doc,Qt(pt,0),Qt(Rt,vn(re.doc,Rt).text.length));_t.length>1&&yn.length>1;)if(Et(_t)==Et(yn))_t.pop(),yn.pop(),Rt--;else if(_t[0]==yn[0])_t.shift(),yn.shift(),pt++;else break;for(var gn=0,lr=0,pr=_t[0],wr=yn[0],Br=Math.min(pr.length,wr.length);gn<Br&&pr.charCodeAt(gn)==wr.charCodeAt(gn);)++gn;for(var ri=Et(_t),Xr=Et(yn),ci=Math.min(ri.length-(_t.length==1?gn:0),Xr.length-(yn.length==1?gn:0));lr<ci&&ri.charCodeAt(ri.length-lr-1)==Xr.charCodeAt(Xr.length-lr-1);)++lr;if(_t.length==1&&yn.length==1&&pt==be.line)for(;gn&&gn>be.ch&&ri.charCodeAt(ri.length-lr-1)==Xr.charCodeAt(Xr.length-lr-1);)gn--,lr++;_t[_t.length-1]=ri.slice(0,ri.length-lr).replace(/^\u200b+/,""),_t[0]=_t[0].slice(gn).replace(/\u200b+$/,"");var Ii=Qt(pt,gn),Vr=Qt(Rt,yn.length?Et(yn).length-lr:0);if(_t.length>1||_t[0]||Fn(Ii,Vr))return Zh(re.doc,_t,Ii,Vr,"+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())&&yo(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=il(re,he.line);if(!Ce||Ce.hidden)return null;var be=vn(re.doc,he.line),Oe=na(Ce,be,he.line),qe=$t(be,re.doc.direction),pt="left";if(qe){var Mt=Nt(qe,he.ch);pt=Mt%2?"right":"left"}var kt=th(Oe.map,he.ch,pt);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 qe="",pt=!1,Mt=re.doc.lineSeparator(),kt=!1;function Rt(gn){return function(lr){return lr.id==gn}}function tn(){pt&&(qe+=Mt,kt&&(qe+=Mt),pt=kt=!1)}function _t(gn){gn&&(tn(),qe+=gn)}function yn(gn){if(gn.nodeType==1){var lr=gn.getAttribute("cm-text");if(lr){_t(lr);return}var pr=gn.getAttribute("cm-marker"),wr;if(pr){var Br=re.findMarks(Qt(be,0),Qt(Oe+1,0),Rt(+pr));Br.length&&(wr=Br[0].find(0))&&_t(kn(re.doc,wr.from,wr.to).join(Mt));return}if(gn.getAttribute("contenteditable")=="false")return;var ri=/^(pre|div|p|li|table|br)$/i.test(gn.nodeName);if(!/^br$/i.test(gn.nodeName)&&gn.textContent.length==0)return;ri&&tn();for(var Xr=0;Xr<gn.childNodes.length;Xr++)yn(gn.childNodes[Xr]);/^(pre|p)$/i.test(gn.nodeName)&&(kt=!0),ri&&(pt=!0)}else gn.nodeType==3&&_t(gn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;yn(he),he!=Ce;)he=he.nextSibling,kt=!1;return qe}function Lf(re,he,Ce){var be;if(he==re.display.lineDiv){if(be=re.display.lineDiv.childNodes[Ce],!be)return Gc(re.clipPos(Qt(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 qe=re.display.view[Oe];if(qe.node==be)return am(qe,he,Ce)}}function am(re,he,Ce){var be=re.text.firstChild,Oe=!1;if(!he||!Ye(be,he))return Gc(Qt(Ot(re.line),0),!0);if(he==be&&(Oe=!0,he=be.childNodes[Ce],Ce=0,!he)){var qe=re.rest?Et(re.rest):re.line;return Gc(Qt(Ot(qe),qe.text.length),Oe)}var pt=he.nodeType==3?he:null,Mt=he;for(!pt&&he.childNodes.length==1&&he.firstChild.nodeType==3&&(pt=he.firstChild,Ce&&(Ce=pt.nodeValue.length));Mt.parentNode!=be;)Mt=Mt.parentNode;var kt=re.measure,Rt=kt.maps;function tn(wr,Br,ri){for(var Xr=-1;Xr<(Rt?Rt.length:0);Xr++)for(var ci=Xr<0?kt.map:Rt[Xr],Ii=0;Ii<ci.length;Ii+=3){var Vr=ci[Ii+2];if(Vr==wr||Vr==Br){var to=Ot(Xr<0?re.line:re.rest[Xr]),Yo=ci[Ii]+ri;return(ri<0||Vr!=wr)&&(Yo=ci[Ii+(ri?1:0)]),Qt(to,Yo)}}}var _t=tn(pt,Mt,Ce);if(_t)return Gc(_t,Oe);for(var yn=Mt.nextSibling,gn=pt?pt.nodeValue.length-Ce:0;yn;yn=yn.nextSibling){if(_t=tn(yn,yn.firstChild,0),_t)return Gc(Qt(_t.line,_t.ch-gn),Oe);gn+=yn.textContent.length}for(var lr=Mt.previousSibling,pr=Ce;lr;lr=lr.previousSibling){if(_t=tn(lr,lr.firstChild,-1),_t)return Gc(Qt(_t.line,_t.ch+pr),Oe);pr+=lr.textContent.length}}var Ta=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new nt,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"),qt(Oe,"input",function(){Ie&&de>=9&&he.hasSelection&&(he.hasSelection=null),Ce.poll()}),qt(Oe,"paste",function(pt){cn(be,pt)||Dp(pt,be)||(be.state.pasteIncoming=+new Date,Ce.fastPoll())});function qe(pt){if(!cn(be,pt)){if(be.somethingSelected())tc({lineWise:!1,text:be.getSelections()});else if(be.options.lineWiseCopyCut){var Mt=Rp(be);tc({lineWise:!0,text:Mt.text}),pt.type=="cut"?be.setSelections(Mt.ranges,null,ct):(Ce.prevInput="",Oe.value=Mt.text.join(`
`),lt(Oe))}else return;pt.type=="cut"&&(be.state.cutIncoming=+new Date)}}qt(Oe,"cut",qe),qt(Oe,"copy",qe),qt(re.scroller,"paste",function(pt){if(!(jo(re,pt)||cn(be,pt))){if(!Oe.dispatchEvent){be.state.pasteIncoming=+new Date,Ce.focus();return}var Mt=new Event("paste");Mt.clipboardData=pt.clipboardData,Oe.dispatchEvent(Mt)}}),qt(re.lineSpace,"selectstart",function(pt){jo(re,pt)||Zn(pt)}),qt(Oe,"compositionstart",function(){var pt=be.getCursor("from");Ce.composing&&Ce.composing.range.clear(),Ce.composing={start:pt,range:be.markText(pt,be.getCursor("to"),{className:"CodeMirror-composing"})}}),qt(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=hu(re);if(re.options.moveInputWithCursor){var Oe=co(re,Ce.sel.primary().head,"div"),qe=he.wrapper.getBoundingClientRect(),pt=he.lineDiv.getBoundingClientRect();be.teTop=Math.max(0,Math.min(he.wrapper.clientHeight-10,Oe.top+pt.top-qe.top)),be.teLeft=Math.max(0,Math.min(he.wrapper.clientWidth-10,Oe.left+pt.left-qe.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&&lt(this.textarea),Ie&&de>=9&&(this.hasSelection=Ce)}else re||(this.prevInput=this.textarea.value="",Ie&&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||Ke()!=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||et(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(Ie&&de>=9&&this.hasSelection===Oe||se&&/[\uf700-\uf7ff]/.test(Oe))return he.display.input.reset(),!1;if(he.doc.sel==he.display.selForContextMenu){var qe=Oe.charCodeAt(0);if(qe==8203&&!be&&(be="\u200B"),qe==8666)return this.reset(),this.cm.execCommand("undo")}for(var pt=0,Mt=Math.min(be.length,Oe.length);pt<Mt&&be.charCodeAt(pt)==Oe.charCodeAt(pt);)++pt;return yo(he,function(){Tf(he,Oe.slice(pt),be.length-pt,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(){Ie&&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 qe=Ua(Ce,re),pt=be.scroller.scrollTop;if(!qe||Se)return;var Mt=Ce.options.resetSelectionOnContextMenu;Mt&&Ce.doc.sel.contains(qe)==-1&&Da(Ce,gs)(Ce.doc,Ru(qe),ct);var kt=Oe.style.cssText,Rt=he.wrapper.style.cssText,tn=he.wrapper.offsetParent.getBoundingClientRect();he.wrapper.style.cssText="position: static",Oe.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(re.clientY-tn.top-5)+"px; left: "+(re.clientX-tn.left-5)+`px;
z-index: 1000; background: `+(Ie?"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=gn,be.selForContextMenu=Ce.doc.sel,clearTimeout(be.detectingSelectAll);function yn(){if(Oe.selectionStart!=null){var pr=Ce.somethingSelected(),wr="\u200B"+(pr?Oe.value:"");Oe.value="\u21DA",Oe.value=wr,he.prevInput=pr?"":"\u200B",Oe.selectionStart=1,Oe.selectionEnd=wr.length,be.selForContextMenu=Ce.doc.sel}}function gn(){if(he.contextMenuPending==gn&&(he.contextMenuPending=!1,he.wrapper.style.cssText=Rt,Oe.style.cssText=kt,Ie&&de<9&&be.scrollbars.setScrollTop(be.scroller.scrollTop=pt),Oe.selectionStart!=null)){(!Ie||Ie&&de<9)&&yn();var pr=0,wr=function(){be.selForContextMenu==Ce.doc.sel&&Oe.selectionStart==0&&Oe.selectionEnd>0&&he.prevInput=="\u200B"?Da(Ce,ya)(Ce):pr++<10?be.detectingSelectAll=setTimeout(wr,500):(be.selForContextMenu=null,be.input.reset())};be.detectingSelectAll=setTimeout(wr,200)}}if(Ie&&de>=9&&yn(),xe){qr(re);var lr=function(){hn(window,"mouseup",lr),setTimeout(gn,20)};qt(window,"mouseup",lr)}else setTimeout(gn,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?Ct(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=Ke();he.autofocus=Ce==re||re.getAttribute("autofocus")!=null&&Ce==document.body}function be(){re.value=Mt.getValue()}var Oe;if(re.form&&(qt(re.form,"submit",be),!he.leaveSubmitMethodAlone)){var qe=re.form;Oe=qe.submit;try{var pt=qe.submit=function(){be(),qe.submit=Oe,qe.submit(),qe.submit=pt}}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 Mt=po(function(kt){return re.parentNode.insertBefore(kt,re.nextSibling)},he);return Mt}function Hc(re){re.off=hn,re.on=qt,re.wheelEventPixels=ul,re.Doc=os,re.splitLines=Ci,re.countColumn=Je,re.findColumn=Lt,re.isWordChar=We,re.Pass=bt,re.signal=an,re.Line=Mi,re.changeEnd=hh,re.scrollbarModel=fu,re.Pos=Qt,re.cmpPos=Fn,re.modes=An,re.mimeModes=Bn,re.resolveMode=nn,re.getMode=sn,re.modeExtensions=Ht,re.extendMode=rn,re.copyState=tr,re.startState=Nr,re.innerMode=cr,re.commands=ph,re.keyMap=Ks,re.keyName=qg,re.isModifierKey=Dc,re.lookupKey=bl,re.normalizeKeyMap=wp,re.StringStream=ln,re.SharedTextMarker=gu,re.TextMarker=Kt,re.LineWidget=zu,re.e_preventDefault=Zn,re.e_stopPropagation=Tr,re.e_stop=qr,re.addClass=Xe,re.contains=Ye,re.rmClass=De,re.keyNames=mu}im(po),mh(po);var Gu="iter insert remove copy getEditor constructor".split(" ");for(var Nf in os.prototype)os.prototype.hasOwnProperty(Nf)&&St(Gu,Nf)<0&&(po.prototype[Nf]=function(re){return function(){return re.apply(this.doc,arguments)}}(os.prototype[Nf]));return Nn(os),po.inputStyles={textarea:Ta,contenteditable:Do},po.defineMode=function(re){!po.defaults.mode&&re!="null"&&(po.defaults.mode=re),xr.apply(this,arguments)},po.defineMIME=zr,po.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),po.defineMIME("text/plain","null"),po.defineExtension=function(re,he){po.prototype[re]=he},po.defineDocExtension=function(re,he){os.prototype[re]=he},po.fromTextArea=sm,Hc(po),po.version="5.58.2",po})},25419:function(Gn,jn,ft){(function(at){at(ft(89780),ft(15525),ft(98101))})(function(at){"use strict";at.defineMode("markdown",function(Gt,oe){var Ue=at.getMode(Gt,"text/html"),Ie=Ue.name=="null";function de(Je){if(at.findModeByName){var nt=at.findModeByName(Je);nt&&(Je=nt.mime||nt.mimes[0])}var St=at.getMode(Gt,Je);return St.name=="null"?null:St}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+/,je=/^\[(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(Je,nt,St){return nt.f=nt.inline=St,St(Je,nt)}function ce(Je,nt,St){return nt.f=nt.block=St,St(Je,nt)}function pe(Je){return!Je||!/\S/.test(Je.string)}function xe(Je){if(Je.linkTitle=!1,Je.linkHref=!1,Je.linkText=!1,Je.em=!1,Je.strong=!1,Je.strikethrough=!1,Je.quote=0,Je.indentedCode=!1,Je.f==De){var nt=Ie;if(!nt){var St=at.innerMode(Ue,Je.htmlState);nt=St.mode.name=="xml"&&St.state.tagStart===null&&!St.state.context&&St.state.tokenize.isInText}nt&&(Je.f=Be,Je.block=Ae,Je.htmlState=null)}return Je.trailingSpace=0,Je.trailingSpaceNewLine=!1,Je.prevLine=Je.thisLine,Je.thisLine={stream:null},null}function Ae(Je,nt){var St=Je.column()===nt.indentation,wt=pe(nt.prevLine.stream),bt=nt.indentedCode,ct=nt.prevLine.hr,vt=nt.list!==!1,ht=(nt.listStack[nt.listStack.length-1]||0)+3;nt.indentedCode=!1;var Lt=nt.indentation;if(nt.indentationDiff===null&&(nt.indentationDiff=nt.indentation,vt)){for(nt.list=null;Lt<nt.listStack[nt.listStack.length-1];)nt.listStack.pop(),nt.listStack.length?nt.indentation=nt.listStack[nt.listStack.length-1]:nt.list=!1;nt.list!==!1&&(nt.indentationDiff=Lt-nt.listStack[nt.listStack.length-1])}var dt=!wt&&!ct&&!nt.prevLine.header&&(!vt||!bt)&&!nt.prevLine.fencedCodeEnd,mt=(nt.list===!1||ct||wt)&&nt.indentation<=ht&&Je.match(ke),Et=null;if(nt.indentationDiff>=4&&(bt||nt.prevLine.fencedCodeEnd||nt.prevLine.header||wt))return Je.skipToEnd(),nt.indentedCode=!0,ve.code;if(Je.eatSpace())return null;if(St&&nt.indentation<=ht&&(Et=Je.match(me))&&Et[1].length<=6)return nt.quote=0,nt.header=Et[1].length,nt.thisLine.header=!0,oe.highlightFormatting&&(nt.formatting="header"),nt.f=nt.inline,Te(nt);if(nt.indentation<=ht&&Je.eat(">"))return nt.quote=St?1:nt.quote+1,oe.highlightFormatting&&(nt.formatting="quote"),Je.eatSpace(),Te(nt);if(!mt&&!nt.setext&&St&&nt.indentation<=ht&&(Et=Je.match(Se))){var gt=Et[1]?"ol":"ul";return nt.indentation=Lt+Je.current().length,nt.list=!0,nt.quote=0,nt.listStack.push(nt.indentation),nt.em=!1,nt.strong=!1,nt.code=!1,nt.strikethrough=!1,oe.taskLists&&Je.match(je,!1)&&(nt.taskList=!0),nt.f=nt.inline,oe.highlightFormatting&&(nt.formatting=["list","list-"+gt]),Te(nt)}else{if(St&&nt.indentation<=ht&&(Et=Je.match(z,!0)))return nt.quote=0,nt.fencedEndRE=new RegExp(Et[1]+"+ *$"),nt.localMode=oe.fencedCodeBlockHighlighting&&de(Et[2]||oe.fencedCodeBlockDefaultMode),nt.localMode&&(nt.localState=at.startState(nt.localMode)),nt.f=nt.block=Fe,oe.highlightFormatting&&(nt.formatting="code-block"),nt.code=-1,Te(nt);if(nt.setext||(!dt||!vt)&&!nt.quote&&nt.list===!1&&!nt.code&&!mt&&!te.test(Je.string)&&(Et=Je.lookAhead(1))&&(Et=Et.match(Pe)))return nt.setext?(nt.header=nt.setext,nt.setext=0,Je.skipToEnd(),oe.highlightFormatting&&(nt.formatting="header")):(nt.header=Et[0].charAt(0)=="="?1:2,nt.setext=nt.header),nt.thisLine.header=!0,nt.f=nt.inline,Te(nt);if(mt)return Je.skipToEnd(),nt.hr=!0,nt.thisLine.hr=!0,ve.hr;if(Je.peek()==="[")return le(Je,nt,ot)}return le(Je,nt,nt.inline)}function De(Je,nt){var St=Ue.token(Je,nt.htmlState);if(!Ie){var wt=at.innerMode(Ue,nt.htmlState);(wt.mode.name=="xml"&&wt.state.tagStart===null&&!wt.state.context&&wt.state.tokenize.isInText||nt.md_inside&&Je.current().indexOf(">")>-1)&&(nt.f=Be,nt.block=Ae,nt.htmlState=null)}return St}function Fe(Je,nt){var St=nt.listStack[nt.listStack.length-1]||0,wt=nt.indentation<St,bt=St+3;if(nt.fencedEndRE&&nt.indentation<=bt&&(wt||Je.match(nt.fencedEndRE))){oe.highlightFormatting&&(nt.formatting="code-block");var ct;return wt||(ct=Te(nt)),nt.localMode=nt.localState=null,nt.block=Ae,nt.f=Be,nt.fencedEndRE=null,nt.code=0,nt.thisLine.fencedCodeEnd=!0,wt?ce(Je,nt,nt.block):ct}else return nt.localMode?nt.localMode.token(Je,nt.localState):(Je.skipToEnd(),ve.code)}function Te(Je){var nt=[];if(Je.formatting){nt.push(ve.formatting),typeof Je.formatting=="string"&&(Je.formatting=[Je.formatting]);for(var St=0;St<Je.formatting.length;St++)nt.push(ve.formatting+"-"+Je.formatting[St]),Je.formatting[St]==="header"&&nt.push(ve.formatting+"-"+Je.formatting[St]+"-"+Je.header),Je.formatting[St]==="quote"&&(!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=Je.quote?nt.push(ve.formatting+"-"+Je.formatting[St]+"-"+Je.quote):nt.push("error"))}if(Je.taskOpen)return nt.push("meta"),nt.length?nt.join(" "):null;if(Je.taskClosed)return nt.push("property"),nt.length?nt.join(" "):null;if(Je.linkHref?nt.push(ve.linkHref,"url"):(Je.strong&&nt.push(ve.strong),Je.em&&nt.push(ve.em),Je.strikethrough&&nt.push(ve.strikethrough),Je.emoji&&nt.push(ve.emoji),Je.linkText&&nt.push(ve.linkText),Je.code&&nt.push(ve.code),Je.image&&nt.push(ve.image),Je.imageAltText&&nt.push(ve.imageAltText,"link"),Je.imageMarker&&nt.push(ve.imageMarker)),Je.header&&nt.push(ve.header,ve.header+"-"+Je.header),Je.quote&&(nt.push(ve.quote),!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=Je.quote?nt.push(ve.quote+"-"+Je.quote):nt.push(ve.quote+"-"+oe.maxBlockquoteDepth)),Je.list!==!1){var wt=(Je.listStack.length-1)%3;wt?wt===1?nt.push(ve.list2):nt.push(ve.list3):nt.push(ve.list1)}return Je.trailingSpaceNewLine?nt.push("trailing-space-new-line"):Je.trailingSpace&&nt.push("trailing-space-"+(Je.trailingSpace%2?"a":"b")),nt.length?nt.join(" "):null}function Ne(Je,nt){if(Je.match(fe,!0))return Te(nt)}function Be(Je,nt){var St=nt.text(Je,nt);if(typeof St!="undefined")return St;if(nt.list)return nt.list=null,Te(nt);if(nt.taskList){var wt=Je.match(je,!0)[1]===" ";return wt?nt.taskOpen=!0:nt.taskClosed=!0,oe.highlightFormatting&&(nt.formatting="task"),nt.taskList=!1,Te(nt)}if(nt.taskOpen=!1,nt.taskClosed=!1,nt.header&&Je.match(/^#+$/,!0))return oe.highlightFormatting&&(nt.formatting="header"),Te(nt);var bt=Je.next();if(nt.linkTitle){nt.linkTitle=!1;var ct=bt;bt==="("&&(ct=")"),ct=(ct+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var vt="^\\s*(?:[^"+ct+"\\\\]+|\\\\\\\\|\\\\.)"+ct;if(Je.match(new RegExp(vt),!0))return ve.linkHref}if(bt==="`"){var ht=nt.formatting;oe.highlightFormatting&&(nt.formatting="code"),Je.eatWhile("`");var Lt=Je.current().length;if(nt.code==0&&(!nt.quote||Lt==1))return nt.code=Lt,Te(nt);if(Lt==nt.code){var dt=Te(nt);return nt.code=0,dt}else return nt.formatting=ht,Te(nt)}else if(nt.code)return Te(nt);if(bt==="\\"&&(Je.next(),oe.highlightFormatting)){var mt=Te(nt),Et=ve.formatting+"-escape";return mt?mt+" "+Et:Et}if(bt==="!"&&Je.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return nt.imageMarker=!0,nt.image=!0,oe.highlightFormatting&&(nt.formatting="image"),Te(nt);if(bt==="["&&nt.imageMarker&&Je.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return nt.imageMarker=!1,nt.imageAltText=!0,oe.highlightFormatting&&(nt.formatting="image"),Te(nt);if(bt==="]"&&nt.imageAltText){oe.highlightFormatting&&(nt.formatting="image");var mt=Te(nt);return nt.imageAltText=!1,nt.image=!1,nt.inline=nt.f=Ye,mt}if(bt==="["&&!nt.image)return nt.linkText&&Je.match(/^.*?\]/)||(nt.linkText=!0,oe.highlightFormatting&&(nt.formatting="link")),Te(nt);if(bt==="]"&&nt.linkText){oe.highlightFormatting&&(nt.formatting="link");var mt=Te(nt);return nt.linkText=!1,nt.inline=nt.f=Je.match(/\(.*?\)| ?\[.*?\]/,!1)?Ye:Be,mt}if(bt==="<"&&Je.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){nt.f=nt.inline=Ge,oe.highlightFormatting&&(nt.formatting="link");var mt=Te(nt);return mt?mt+=" ":mt="",mt+ve.linkInline}if(bt==="<"&&Je.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){nt.f=nt.inline=Ge,oe.highlightFormatting&&(nt.formatting="link");var mt=Te(nt);return mt?mt+=" ":mt="",mt+ve.linkEmail}if(oe.xml&&bt==="<"&&Je.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var gt=Je.string.indexOf(">",Je.pos);if(gt!=-1){var $e=Je.string.substring(Je.start,gt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test($e)&&(nt.md_inside=!0)}return Je.backUp(1),nt.htmlState=at.startState(Ue),ce(Je,nt,De)}if(oe.xml&&bt==="<"&&Je.match(/^\/\w*?>/))return nt.md_inside=!1,"tag";if(bt==="*"||bt==="_"){for(var He=1,we=Je.pos==1?" ":Je.string.charAt(Je.pos-2);He<3&&Je.eat(bt);)He++;var Le=Je.peek()||" ",We=!/\s/.test(Le)&&(!se.test(Le)||/\s/.test(we)||se.test(we)),tt=!/\s/.test(we)&&(!se.test(we)||/\s/.test(Le)||se.test(Le)),Re=null,_e=null;if(He%2&&(!nt.em&&We&&(bt==="*"||!tt||se.test(we))?Re=!0:nt.em==bt&&tt&&(bt==="*"||!We||se.test(Le))&&(Re=!1)),He>1&&(!nt.strong&&We&&(bt==="*"||!tt||se.test(we))?_e=!0:nt.strong==bt&&tt&&(bt==="*"||!We||se.test(Le))&&(_e=!1)),_e!=null||Re!=null){oe.highlightFormatting&&(nt.formatting=Re==null?"strong":_e==null?"em":"strong em"),Re===!0&&(nt.em=bt),_e===!0&&(nt.strong=bt);var dt=Te(nt);return Re===!1&&(nt.em=!1),_e===!1&&(nt.strong=!1),dt}}else if(bt===" "&&(Je.eat("*")||Je.eat("_"))){if(Je.peek()===" ")return Te(nt);Je.backUp(1)}if(oe.strikethrough){if(bt==="~"&&Je.eatWhile(bt)){if(nt.strikethrough){oe.highlightFormatting&&(nt.formatting="strikethrough");var dt=Te(nt);return nt.strikethrough=!1,dt}else if(Je.match(/^[^\s]/,!1))return nt.strikethrough=!0,oe.highlightFormatting&&(nt.formatting="strikethrough"),Te(nt)}else if(bt===" "&&Je.match(/^~~/,!0)){if(Je.peek()===" ")return Te(nt);Je.backUp(2)}}if(oe.emoji&&bt===":"&&Je.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){nt.emoji=!0,oe.highlightFormatting&&(nt.formatting="emoji");var Ve=Te(nt);return nt.emoji=!1,Ve}return bt===" "&&(Je.match(/^ +$/,!1)?nt.trailingSpace++:nt.trailingSpace&&(nt.trailingSpaceNewLine=!0)),Te(nt)}function Ge(Je,nt){var St=Je.next();if(St===">"){nt.f=nt.inline=Be,oe.highlightFormatting&&(nt.formatting="link");var wt=Te(nt);return wt?wt+=" ":wt="",wt+ve.linkInline}return Je.match(/^[^>]+/,!0),ve.linkInline}function Ye(Je,nt){if(Je.eatSpace())return null;var St=Je.next();return St==="("||St==="["?(nt.f=nt.inline=Xe(St==="("?")":"]"),oe.highlightFormatting&&(nt.formatting="link-string"),nt.linkHref=!0,Te(nt)):"error"}var Ke={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Xe(Je){return function(nt,St){var wt=nt.next();if(wt===Je){St.f=St.inline=Be,oe.highlightFormatting&&(St.formatting="link-string");var bt=Te(St);return St.linkHref=!1,bt}return nt.match(Ke[Je]),St.linkHref=!0,Te(St)}}function ot(Je,nt){return Je.match(/^([^\]\\]|\\.)*\]:/,!1)?(nt.f=lt,Je.next(),oe.highlightFormatting&&(nt.formatting="link"),nt.linkText=!0,Te(nt)):le(Je,nt,Be)}function lt(Je,nt){if(Je.match(/^\]:/,!0)){nt.f=nt.inline=ut,oe.highlightFormatting&&(nt.formatting="link");var St=Te(nt);return nt.linkText=!1,St}return Je.match(/^([^\]\\]|\\.)+/,!0),ve.linkText}function ut(Je,nt){return Je.eatSpace()?null:(Je.match(/^[^\s]+/,!0),Je.peek()===void 0?nt.linkTitle=!0:Je.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),nt.f=nt.inline=Be,ve.linkHref+" url")}var Ct={startState:function(){return{f:Ae,prevLine:{stream:null},thisLine:{stream:null},block:Ae,htmlState:null,indentation:0,inline:Be,text:Ne,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(Je){return{f:Je.f,prevLine:Je.prevLine,thisLine:Je.thisLine,block:Je.block,htmlState:Je.htmlState&&at.copyState(Ue,Je.htmlState),indentation:Je.indentation,localMode:Je.localMode,localState:Je.localMode?at.copyState(Je.localMode,Je.localState):null,inline:Je.inline,text:Je.text,formatting:!1,linkText:Je.linkText,linkTitle:Je.linkTitle,linkHref:Je.linkHref,code:Je.code,em:Je.em,strong:Je.strong,strikethrough:Je.strikethrough,emoji:Je.emoji,header:Je.header,setext:Je.setext,hr:Je.hr,taskList:Je.taskList,list:Je.list,listStack:Je.listStack.slice(0),quote:Je.quote,indentedCode:Je.indentedCode,trailingSpace:Je.trailingSpace,trailingSpaceNewLine:Je.trailingSpaceNewLine,md_inside:Je.md_inside,fencedEndRE:Je.fencedEndRE}},token:function(Je,nt){if(nt.formatting=!1,Je!=nt.thisLine.stream){if(nt.header=0,nt.hr=!1,Je.match(/^\s*$/,!0))return xe(nt),null;if(nt.prevLine=nt.thisLine,nt.thisLine={stream:Je},nt.taskList=!1,nt.trailingSpace=0,nt.trailingSpaceNewLine=!1,!nt.localState&&(nt.f=nt.block,nt.f!=De)){var St=Je.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(nt.indentation=St,nt.indentationDiff=null,St>0)return null}}return nt.f(Je,nt)},innerMode:function(Je){return Je.block==De?{state:Je.htmlState,mode:Ue}:Je.localState?{state:Je.localState,mode:Je.localMode}:{state:Je,mode:Ct}},indent:function(Je,nt,St){return Je.block==De&&Ue.indent?Ue.indent(Je.htmlState,nt,St):Je.localState&&Je.localMode.indent?Je.localMode.indent(Je.localState,nt,St):at.Pass},blankLine:xe,getType:Te,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ct},"xml"),at.defineMIME("text/markdown","markdown"),at.defineMIME("text/x-markdown","markdown")})},98101:function(Gn,jn,ft){(function(at){at(ft(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 Gt=0;Gt<at.modeInfo.length;Gt++){var oe=at.modeInfo[Gt];oe.mimes&&(oe.mime=oe.mimes[0])}at.findModeByMIME=function(Ue){Ue=Ue.toLowerCase();for(var Ie=0;Ie<at.modeInfo.length;Ie++){var de=at.modeInfo[Ie];if(de.mime==Ue)return de;if(de.mimes){for(var ve=0;ve<de.mimes.length;ve++)if(de.mimes[ve]==Ue)return de}}if(/\+xml$/.test(Ue))return at.findModeByMIME("application/xml");if(/\+json$/.test(Ue))return at.findModeByMIME("application/json")},at.findModeByExtension=function(Ue){Ue=Ue.toLowerCase();for(var Ie=0;Ie<at.modeInfo.length;Ie++){var de=at.modeInfo[Ie];if(de.ext){for(var ve=0;ve<de.ext.length;ve++)if(de.ext[ve]==Ue)return de}}},at.findModeByFileName=function(Ue){for(var Ie=0;Ie<at.modeInfo.length;Ie++){var de=at.modeInfo[Ie];if(de.file&&de.file.test(Ue))return de}var ve=Ue.lastIndexOf("."),Ee=ve>-1&&Ue.substring(ve+1,Ue.length);if(Ee)return at.findModeByExtension(Ee)},at.findModeByName=function(Ue){Ue=Ue.toLowerCase();for(var Ie=0;Ie<at.modeInfo.length;Ie++){var de=at.modeInfo[Ie];if(de.name.toLowerCase()==Ue)return de;if(de.alias){for(var ve=0;ve<de.alias.length;ve++)if(de.alias[ve].toLowerCase()==Ue)return de}}}})},67549:function(Gn,jn,ft){(function(at){at(ft(89780))})(function(at){"use strict";at.defineMode("stex",function(Gt,oe){"use strict";function Ue(fe,z){fe.cmdState.push(z)}function Ie(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 je(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,Ue(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=Ie(z),te)te.closeBracket(ie),Se(z,Pe);else return"error";return"bracket"}else return ie=="{"||ie=="["?(te=ke.DEFAULT,te=new te,Ue(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,je),"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=Ie(z),se.openBracket(te),fe.eat(te),Se(z,je),"bracket"):/[ \t\r]/.test(te)?(fe.eat(te),null):(Se(z,je),de(z),je(fe,z))}return{startState:function(){var fe=oe.inMathMode?function(z,te){return me(z,te)}:je;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=je,fe.cmdState.length=0},lineComment:"%"}}),at.defineMIME("text/x-stex","stex"),at.defineMIME("text/x-latex","stex")})},15525:function(Gn,jn,ft){(function(at){at(ft(89780))})(function(at){"use strict";var Gt={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(Ue,Ie){var de=Ue.indentUnit,ve={},Ee=Ie.htmlMode?Gt:oe;for(var ke in Ee)ve[ke]=Ee[ke];for(var ke in Ie)ve[ke]=Ie[ke];var Se,je;function me(Ge,Ye){function Ke(lt){return Ye.tokenize=lt,lt(Ge,Ye)}var Xe=Ge.next();if(Xe=="<")return Ge.eat("!")?Ge.eat("[")?Ge.match("CDATA[")?Ke(z("atom","]]>")):null:Ge.match("--")?Ke(z("comment","-->")):Ge.match("DOCTYPE",!0,!0)?(Ge.eatWhile(/[\w\._\-]/),Ke(te(1))):null:Ge.eat("?")?(Ge.eatWhile(/[\w\._\-]/),Ye.tokenize=z("meta","?>"),"meta"):(Se=Ge.eat("/")?"closeTag":"openTag",Ye.tokenize=Pe,"tag bracket");if(Xe=="&"){var ot;return Ge.eat("#")?Ge.eat("x")?ot=Ge.eatWhile(/[a-fA-F\d]/)&&Ge.eat(";"):ot=Ge.eatWhile(/[\d]/)&&Ge.eat(";"):ot=Ge.eatWhile(/[\w\.\-:]/)&&Ge.eat(";"),ot?"atom":"error"}else return Ge.eatWhile(/[^&<]/),null}me.isInText=!0;function Pe(Ge,Ye){var Ke=Ge.next();if(Ke==">"||Ke=="/"&&Ge.eat(">"))return Ye.tokenize=me,Se=Ke==">"?"endTag":"selfcloseTag","tag bracket";if(Ke=="=")return Se="equals",null;if(Ke=="<"){Ye.tokenize=me,Ye.state=ce,Ye.tagName=Ye.tagStart=null;var Xe=Ye.tokenize(Ge,Ye);return Xe?Xe+" tag error":"tag error"}else return/[\'\"]/.test(Ke)?(Ye.tokenize=fe(Ke),Ye.stringStartCol=Ge.column(),Ye.tokenize(Ge,Ye)):(Ge.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function fe(Ge){var Ye=function(Ke,Xe){for(;!Ke.eol();)if(Ke.next()==Ge){Xe.tokenize=Pe;break}return"string"};return Ye.isInAttribute=!0,Ye}function z(Ge,Ye){return function(Ke,Xe){for(;!Ke.eol();){if(Ke.match(Ye)){Xe.tokenize=me;break}Ke.next()}return Ge}}function te(Ge){return function(Ye,Ke){for(var Xe;(Xe=Ye.next())!=null;){if(Xe=="<")return Ke.tokenize=te(Ge+1),Ke.tokenize(Ye,Ke);if(Xe==">")if(Ge==1){Ke.tokenize=me;break}else return Ke.tokenize=te(Ge-1),Ke.tokenize(Ye,Ke)}return"meta"}}function se(Ge,Ye,Ke){this.prev=Ge.context,this.tagName=Ye,this.indent=Ge.indented,this.startOfLine=Ke,(ve.doNotIndent.hasOwnProperty(Ye)||Ge.context&&Ge.context.noIndent)&&(this.noIndent=!0)}function ie(Ge){Ge.context&&(Ge.context=Ge.context.prev)}function le(Ge,Ye){for(var Ke;;){if(!Ge.context||(Ke=Ge.context.tagName,!ve.contextGrabbers.hasOwnProperty(Ke)||!ve.contextGrabbers[Ke].hasOwnProperty(Ye)))return;ie(Ge)}}function ce(Ge,Ye,Ke){return Ge=="openTag"?(Ke.tagStart=Ye.column(),pe):Ge=="closeTag"?xe:ce}function pe(Ge,Ye,Ke){return Ge=="word"?(Ke.tagName=Ye.current(),je="tag",Fe):ve.allowMissingTagName&&Ge=="endTag"?(je="tag bracket",Fe(Ge,Ye,Ke)):(je="error",pe)}function xe(Ge,Ye,Ke){if(Ge=="word"){var Xe=Ye.current();return Ke.context&&Ke.context.tagName!=Xe&&ve.implicitlyClosed.hasOwnProperty(Ke.context.tagName)&&ie(Ke),Ke.context&&Ke.context.tagName==Xe||ve.matchClosing===!1?(je="tag",Ae):(je="tag error",De)}else return ve.allowMissingTagName&&Ge=="endTag"?(je="tag bracket",Ae(Ge,Ye,Ke)):(je="error",De)}function Ae(Ge,Ye,Ke){return Ge!="endTag"?(je="error",Ae):(ie(Ke),ce)}function De(Ge,Ye,Ke){return je="error",Ae(Ge,Ye,Ke)}function Fe(Ge,Ye,Ke){if(Ge=="word")return je="attribute",Te;if(Ge=="endTag"||Ge=="selfcloseTag"){var Xe=Ke.tagName,ot=Ke.tagStart;return Ke.tagName=Ke.tagStart=null,Ge=="selfcloseTag"||ve.autoSelfClosers.hasOwnProperty(Xe)?le(Ke,Xe):(le(Ke,Xe),Ke.context=new se(Ke,Xe,ot==Ke.indented)),ce}return je="error",Fe}function Te(Ge,Ye,Ke){return Ge=="equals"?Ne:(ve.allowMissing||(je="error"),Fe(Ge,Ye,Ke))}function Ne(Ge,Ye,Ke){return Ge=="string"?Be:Ge=="word"&&ve.allowUnquoted?(je="string",Fe):(je="error",Fe(Ge,Ye,Ke))}function Be(Ge,Ye,Ke){return Ge=="string"?Be:Fe(Ge,Ye,Ke)}return{startState:function(Ge){var Ye={tokenize:me,state:ce,indented:Ge||0,tagName:null,tagStart:null,context:null};return Ge!=null&&(Ye.baseIndent=Ge),Ye},token:function(Ge,Ye){if(!Ye.tagName&&Ge.sol()&&(Ye.indented=Ge.indentation()),Ge.eatSpace())return null;Se=null;var Ke=Ye.tokenize(Ge,Ye);return(Ke||Se)&&Ke!="comment"&&(je=null,Ye.state=Ye.state(Se||Ke,Ge,Ye),je&&(Ke=je=="error"?Ke+" error":je)),Ke},indent:function(Ge,Ye,Ke){var Xe=Ge.context;if(Ge.tokenize.isInAttribute)return Ge.tagStart==Ge.indented?Ge.stringStartCol+1:Ge.indented+de;if(Xe&&Xe.noIndent)return at.Pass;if(Ge.tokenize!=Pe&&Ge.tokenize!=me)return Ke?Ke.match(/^(\s*)/)[0].length:0;if(Ge.tagName)return ve.multilineTagIndentPastTag!==!1?Ge.tagStart+Ge.tagName.length+2:Ge.tagStart+de*(ve.multilineTagIndentFactor||1);if(ve.alignCDATA&&/<!\[CDATA\[/.test(Ye))return 0;var ot=Ye&&/^<(\/)?([\w_:\.-]*)/.exec(Ye);if(ot&&ot[1])for(;Xe;)if(Xe.tagName==ot[2]){Xe=Xe.prev;break}else if(ve.implicitlyClosed.hasOwnProperty(Xe.tagName))Xe=Xe.prev;else break;else if(ot)for(;Xe;){var lt=ve.contextGrabbers[Xe.tagName];if(lt&&lt.hasOwnProperty(ot[2]))Xe=Xe.prev;else break}for(;Xe&&Xe.prev&&!Xe.startOfLine;)Xe=Xe.prev;return Xe?Xe.indent+de:Ge.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ve.htmlMode?"html":"xml",helperType:ve.htmlMode?"html":"xml",skipAttribute:function(Ge){Ge.state==Ne&&(Ge.state=Fe)},xmlCurrentTag:function(Ge){return Ge.tagName?{name:Ge.tagName,close:Ge.type=="closeTag"}:null},xmlCurrentContext:function(Ge){for(var Ye=[],Ke=Ge.context;Ke;Ke=Ke.prev)Ke.tagName&&Ye.push(Ke.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(Gn,jn,ft){"use strict";ft.d(jn,{$u:function(){return ke},BD:function(){return He},E9:function(){return Ee},FF:function(){return Si},FJ:function(){return ce},Hn:function(){return le},KX:function(){return xe},NB:function(){return Pt},S0:function(){return Et},UL:function(){return Se},Vk:function(){return ie},Vm:function(){return Nt},YI:function(){return gt},ZA:function(){return oe},Zt:function(){return je},al:function(){return Re},bn:function(){return tt},bx:function(){return we},g2:function(){return $e},h1:function(){return Ne},hD:function(){return Nn},l4:function(){return de},rU:function(){return jt},s_:function(){return Le},uz:function(){return yt},z6:function(){return me}}),Gn=ft.hmd(Gn),function(){var et;function ai(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Er(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:ai(a)}}function Ln(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var An=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Bn;if(typeof Object.setPrototypeOf=="function")Bn=Object.setPrototypeOf;else{var xr;e:{var zr={a:!0},nn={};try{nn.__proto__=zr,xr=nn.a;break e}catch(a){}xr=!1}Bn=xr?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var sn=Bn;function Ht(a,y){if(a.prototype=An(y.prototype),a.prototype.constructor=a,sn)sn(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 rn=typeof ft.g!="undefined"&&ft.g!=null?ft.g:self,tr=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},cr=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Nr(a,y){if(y){var x=rn;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&&cr(x,a,{writable:!0,value:y})}}Nr("Object.assign",function(a){return a||tr}),Nr("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 ln=typeof globalThis=="object"&&globalThis||typeof ft.g=="object"&&ft.g.global===ft.g&&ft.g||typeof self=="object"&&self.self===self&&self||{};ln.requestAnimationFrame===void 0&&(ln.setImmediate===void 0?ln.requestAnimationFrame=function(a){ln.setTimeout(a,0)}:ln.requestAnimationFrame=ln.setImmediate);function vn(){}function kn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&ln.clearTimeout(x),x=Rr(function(){x=-1,a.apply(b,E)},y)}}function Rr(a,y){return ln.setTimeout(a,y)}function Hn(a){return ln.document.createElement(a)}function Ot(a){throw Error(a)}function Ut(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Ot(a)}function Dn(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),Ot(x+" is not in the range "+y+": "+a)}function Tn(a){ln.console&&ln.console.log(a)}function Qt(a){return typeof a=="object"&&a!==null}function Fn(a){return Array.isArray(a)||ln.NodeList&&a instanceof ln.NodeList||ln.HTMLCollection&&a instanceof ln.HTMLCollection}function vr(a){return Array.prototype.slice.call(a)}function mr(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Ot("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function er(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Ot("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Un(){var a=zi.pop();return a===void 0?[]:a}function Rn(a){a.length=0,zi.push(a)}function $n(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(Qt(a)&&a.constructor)return $n(a.constructor);return typeof a}function Fr(a){var y=a;return Qt(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 br(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 Pn(a,y,x){Object.defineProperty($i.prototype,a,{get:y,set:x})}function fr(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 si=ln.navigator!==void 0&&0<ln.navigator.userAgent.indexOf("Trident/7"),xi=ln.navigator!==void 0&&ln.navigator.platform!==void 0&&ln.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,zi=[];Object.freeze([]),vn.className="Util",vn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",vn.adym="gojs.net",vn.vfo="28e645fdb266",vn.className="Util";function Yt(a,y,x){gr(this),this.j=a,this.xa=y,this.o=x}Yt.prototype.toString=function(){return"EnumValue."+this.xa};function Pr(a,y){return y==null||y===""?null:a[y]}rn.Object.defineProperties(Yt.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Yt.className="EnumValue";function Mr(){this.ew=[]}Mr.prototype.toString=function(){return this.ew.join("")},Mr.prototype.add=function(a){a!==""&&this.ew.push(a)},Mr.className="StringBuilder";function ar(){}ar.className="PropertyCollection";var mi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){ln.console&&ln.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 ii(){}ii.prototype.reset=function(){},ii.prototype.next=function(){return!1},ii.prototype.Ad=function(){return!1},ii.prototype.first=function(){return null},ii.prototype.any=function(){return!1},ii.prototype.all=function(){return!0},ii.prototype.each=function(){return this},ii.prototype.map=function(){return this},ii.prototype.filter=function(){return this},ii.prototype.de=function(){},ii.prototype.toString=function(){return"EmptyIterator"},rn.Object.defineProperties(ii.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),ii.prototype.first=ii.prototype.first,ii.prototype.hasNext=ii.prototype.Ad,ii.prototype.next=ii.prototype.next,ii.prototype.reset=ii.prototype.reset;var pi=null;ii.className="EmptyIterator",pi=new ii;function ei(a){this.key=-1,this.value=a}ei.prototype.reset=function(){this.key=-1},ei.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},ei.prototype.Ad=function(){return this.next()},ei.prototype.first=function(){return this.key=0,this.value},ei.prototype.any=function(a){return this.key=-1,a(this.value)},ei.prototype.all=function(a){return this.key=-1,a(this.value)},ei.prototype.each=function(a){return this.key=-1,a(this.value),this},ei.prototype.map=function(a){return new ei(a(this.value))},ei.prototype.filter=function(a){return a(this.value)?new ei(this.value):pi},ei.prototype.de=function(){this.value=null},ei.prototype.toString=function(){return"SingletonIterator("+this.value+")"},rn.Object.defineProperties(ei.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),ei.prototype.first=ei.prototype.first,ei.prototype.hasNext=ei.prototype.Ad,ei.prototype.next=ei.prototype.next,ei.prototype.reset=ei.prototype.reset,ei.className="SingletonIterator";function ti(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}ti.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},ti.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},ti.prototype.Ad=function(){return this.next()},ti.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},ti.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},ti.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},ti.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},ti.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 on,a.s=x,a.xb(),a.iterator},ti.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 on,a.s=x,a.xb(),a.iterator},ti.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},ti.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},rn.Object.defineProperties(ti.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}}}),ti.prototype.first=ti.prototype.first,ti.prototype.hasNext=ti.prototype.Ad,ti.prototype.next=ti.prototype.next,ti.prototype.reset=ti.prototype.reset,ti.className="ListIterator";function yr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}yr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},yr.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)},yr.prototype.Ad=function(){return this.next()},yr.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},yr.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},yr.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},yr.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},yr.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 on,a.s=x,a.xb(),a.iterator},yr.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 on,a.s=x,a.xb(),a.iterator},yr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},yr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},rn.Object.defineProperties(yr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),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="ListIteratorBackwards";function on(a){gr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Ot("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=on.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"List()#"+Yr(this)},et.add=function(a){return a===null?this:(this._isFrozen&&Ut(this,a),this.s.push(a),this.xb(),this)},et.push=function(a){this.add(a)},et.addAll=function(a){if(a===null)return this;this._isFrozen&&Ut(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},et.clear=function(){this._isFrozen&&Ut(this),this.s.length=0,this.xb()},et.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},et.has=function(a){return this.contains(a)},et.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},et.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Dn(a,"0 <= i < length",on,"elt:i"),y[a]},et.get=function(a){return this.M(a)},et.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Dn(a,"0 <= i < length",on,"setElt:i"),this._isFrozen&&Ut(this,a),x[a]=y},et.set=function(a,y){this.cd(a,y)},et.first=function(){var a=this.s;return a.length===0?null:a[0]},et.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},et.pop=function(){this._isFrozen&&Ut(this);var a=this.s;return 0<a.length?a.pop():null},on.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},on.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},on.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},on.prototype.map=function(a){for(var y=new on,x=[],b=this.s,E=b.length,ee=0;ee<E;ee++)x.push(a(b[ee]));return y.s=x,y.xb(),y},on.prototype.filter=function(a){for(var y=new on,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},et=on.prototype,et.Gb=function(a,y){0>a&&Dn(a,">= 0",on,"insertAt:i"),this._isFrozen&&Ut(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},et.remove=function(a){if(a===null)return!1;this._isFrozen&&Ut(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)},et.delete=function(a){return this.remove(a)},et.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Dn(a,"0 <= i < length",on,"removeAt:i"),this._isFrozen&&Ut(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},et.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&&Ut(this);for(var E=a,ee=y+1;ee<b;)x[E++]=x[ee++];return x.length=b-(y-a+1),this.xb(),this},on.prototype.copy=function(){var a=new on,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},et=on.prototype,et.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},et.Iv=function(){for(var a=new un,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},et.sort=function(a){return this._isFrozen&&Ut(this),this.s.sort(a),this.xb(),this},et.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&Ut(this);var ee=x-y;if(1>=ee)return this;if((0>y||y>=E-1)&&Dn(y,"0 <= from < length",on,"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},et.reverse=function(){return this._isFrozen&&Ut(this),this.s.reverse(),this.xb(),this},rn.Object.defineProperties(on.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 pi;var a=this.Sa;return a!==null?(a.reset(),a):new ti(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return pi;var a=this.Hg;return a!==null?(a.reset(),a):new yr(this)}}}),on.prototype.reverse=on.prototype.reverse,on.prototype.sortRange=on.prototype.zi,on.prototype.sort=on.prototype.sort,on.prototype.toSet=on.prototype.Iv,on.prototype.toArray=on.prototype.Fa,on.prototype.removeRange=on.prototype.removeRange,on.prototype.removeAt=on.prototype.mb,on.prototype.delete=on.prototype.delete,on.prototype.remove=on.prototype.remove,on.prototype.insertAt=on.prototype.Gb,on.prototype.pop=on.prototype.pop,on.prototype.last=on.prototype.jc,on.prototype.first=on.prototype.first,on.prototype.set=on.prototype.set,on.prototype.setElt=on.prototype.cd,on.prototype.get=on.prototype.get,on.prototype.elt=on.prototype.M,on.prototype.indexOf=on.prototype.indexOf,on.prototype.has=on.prototype.has,on.prototype.contains=on.prototype.contains,on.prototype.clear=on.prototype.clear,on.prototype.addAll=on.prototype.addAll,on.prototype.push=on.prototype.push,on.prototype.add=on.prototype.add,on.prototype.thaw=on.prototype.ka,on.prototype.freeze=on.prototype.freeze,on.className="List";function sr(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}sr.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},sr.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)},sr.prototype.Ad=function(){return this.next()},sr.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},sr.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},sr.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},sr.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},sr.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new on;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},sr.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new on;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},sr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},sr.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},rn.Object.defineProperties(sr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),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="SetIterator";function un(a){gr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Ot("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=un.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"Set()#"+Yr(this)},et.add=function(a){if(a===null)return this;this._isFrozen&&Ut(this,a);var y=a;return Qt(a)&&(y=Kr(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Jt(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},et.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Ut(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},et.contains=function(a){if(a===null)return!1;var y=a;return Qt(a)&&(y=Yr(a),y===void 0)?!1:this.Tb[y]!==void 0},et.has=function(a){return this.contains(a)},et.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},et.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},et.first=function(){var a=this.ea;return a===null?null:a.value},un.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},un.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},un.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},un.prototype.map=function(a){for(var y=new un,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},un.prototype.filter=function(a){for(var y=new un,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},et=un.prototype,et.remove=function(a){if(a===null)return!1;this._isFrozen&&Ut(this,a);var y=a;if(Qt(a)&&(y=Yr(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},et.delete=function(a){return this.remove(a)},et.hp=function(a){if(a===null)return this;if(this._isFrozen&&Ut(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},et.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Ut(this);var y=new un;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},et.clear=function(){this._isFrozen&&Ut(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},un.prototype.copy=function(){var a=new un,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},un.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},un.prototype.Hv=function(){var a=new on,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function gr(a){a.__gohashid=Di++}function Kr(a){var y=a.__gohashid;return y===void 0&&(y=Di++,a.__gohashid=y),y}function Yr(a){return a.__gohashid}rn.Object.defineProperties(un.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return pi;var a=this.Sa;return a!==null?(a.reset(),a):new sr(this)}}}),un.prototype.toList=un.prototype.Hv,un.prototype.toArray=un.prototype.Fa,un.prototype.clear=un.prototype.clear,un.prototype.retainAll=un.prototype.pA,un.prototype.removeAll=un.prototype.hp,un.prototype.delete=un.prototype.delete,un.prototype.remove=un.prototype.remove,un.prototype.first=un.prototype.first,un.prototype.containsAny=un.prototype.Ty,un.prototype.containsAll=un.prototype.Sy,un.prototype.has=un.prototype.has,un.prototype.contains=un.prototype.contains,un.prototype.addAll=un.prototype.addAll,un.prototype.add=un.prototype.add,un.prototype.thaw=un.prototype.ka,un.prototype.freeze=un.prototype.freeze;var Di=1;un.className="Set",un.uniqueHash=gr,un.hashIdUnique=Kr,un.hashId=Yr;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 on;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 on;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"},rn.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 Zr(a){un.call(this),gr(this),this._isFrozen=!0,this.ma=a}Ht(Zr,un),et=Zr.prototype,et.freeze=function(){return this},et.ka=function(){return this},et.toString=function(){return"MapKeySet("+this.ma.toString()+")"},et.add=function(){Ot("This Set is read-only: "+this.toString())},et.contains=function(a){return this.ma.contains(a)},et.has=function(a){return this.contains(a)},et.remove=function(){Ot("This Set is read-only: "+this.toString())},et.delete=function(a){return this.remove(a)},et.clear=function(){Ot("This Set is read-only: "+this.toString())},et.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Zr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Zr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Zr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Zr.prototype.map=function(a){for(var y=new un,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Zr.prototype.filter=function(a){for(var y=new un,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Zr.prototype.copy=function(){return new Zr(this.ma)},Zr.prototype.Iv=function(){var a=new un,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Zr.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},Zr.prototype.Hv=function(){var a=new on,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},rn.Object.defineProperties(Zr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?pi:new oi(this.ma)}}}),Zr.prototype.toList=Zr.prototype.Hv,Zr.prototype.toArray=Zr.prototype.Fa,Zr.prototype.toSet=Zr.prototype.Iv,Zr.prototype.first=Zr.prototype.first,Zr.prototype.clear=Zr.prototype.clear,Zr.prototype.delete=Zr.prototype.delete,Zr.prototype.remove=Zr.prototype.remove,Zr.prototype.has=Zr.prototype.has,Zr.prototype.contains=Zr.prototype.contains,Zr.prototype.add=Zr.prototype.add,Zr.prototype.thaw=Zr.prototype.ka,Zr.prototype.freeze=Zr.prototype.freeze,Zr.className="MapKeySet";function Wi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Wi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Wi.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)},Wi.prototype.Ad=function(){return this.next()},Wi.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},Wi.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},Wi.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},Wi.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},Wi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new on;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Wi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new on;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Wi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Wi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},rn.Object.defineProperties(Wi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Wi.prototype.first=Wi.prototype.first,Wi.prototype.hasNext=Wi.prototype.Ad,Wi.prototype.next=Wi.prototype.next,Wi.prototype.reset=Wi.prototype.reset,Wi.className="MapValueSetIterator";function Jt(a,y){this.key=a,this.value=y,this.ll=this.va=null}Jt.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Jt.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 on;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 on;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"},rn.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 Vt(a){gr(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"&&Ot("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=Vt.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"Map()#"+Yr(this)},et.add=function(a,y){this._isFrozen&&Ut(this,a);var x=a;Qt(a)&&(x=Kr(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new Jt(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},et.set=function(a,y){return this.add(a,y)},et.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 Vt)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},et.first=function(){return this.ea},Vt.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Vt.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Vt.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Vt.prototype.map=function(a){for(var y=new Vt,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Vt.prototype.filter=function(a){for(var y=new Vt,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},et=Vt.prototype,et.contains=function(a){var y=a;return Qt(a)&&(y=Yr(a),y===void 0)?!1:this.Tb[y]!==void 0},et.has=function(a){return this.contains(a)},et.I=function(a){var y=a;return Qt(a)&&(y=Yr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},et.get=function(a){return this.I(a)},et.remove=function(a){if(a===null)return!1;this._isFrozen&&Ut(this,a);var y=a;if(Qt(a)&&(y=Yr(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},et.delete=function(a){return this.remove(a)},et.clear=function(){this._isFrozen&&Ut(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()},Vt.prototype.copy=function(){var a=new Vt,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Vt.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 Jt(E.key,E.value),x++}return y},Vt.prototype.Lf=function(){return new Zr(this)},rn.Object.defineProperties(Vt.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return pi;var a=this.Sa;return a!==null?(a.reset(),a):new pn(this)}},iteratorKeys:{get:function(){return 0>=this.count?pi:new oi(this)}},iteratorValues:{get:function(){if(0>=this.count)return pi;var a=this.jf;return a!==null?(a.reset(),a):new Wi(this)}}}),Vt.prototype.toKeySet=Vt.prototype.Lf,Vt.prototype.toArray=Vt.prototype.Fa,Vt.prototype.clear=Vt.prototype.clear,Vt.prototype.delete=Vt.prototype.delete,Vt.prototype.remove=Vt.prototype.remove,Vt.prototype.get=Vt.prototype.get,Vt.prototype.getValue=Vt.prototype.I,Vt.prototype.has=Vt.prototype.has,Vt.prototype.contains=Vt.prototype.contains,Vt.prototype.first=Vt.prototype.first,Vt.prototype.addAll=Vt.prototype.addAll,Vt.prototype.set=Vt.prototype.set,Vt.prototype.add=Vt.prototype.add,Vt.prototype.thaw=Vt.prototype.ka,Vt.prototype.freeze=Vt.prototype.freeze,Vt.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):Ot("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var On,Xn,dr,ur,Qn;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},et=st.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function mn(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 zn(a){return a.x.toString()+" "+a.y.toString()}et.toString=function(){return"Point("+this.x+","+this.y+")"},et.D=function(a){return a instanceof st?this.x===a.x&&this.y===a.y:!1},et.hi=function(a,y){return this.x===a&&this.y===y},et.Xa=function(a){return zt.B(this.x,a.x)&&zt.B(this.y,a.y)},et.add=function(a){return this.x+=a.x,this.y+=a.y,this},et.re=function(a){return this.x-=a.x,this.y-=a.y,this},et.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},et=st.prototype,et.scale=function(a,y){return this.x*=a,this.y*=y,this},et.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},et.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},et.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},et.ab=function(a){return Vn(a.x-this.x,a.y-this.y)},et.direction=function(a,y){return Vn(a-this.x,y-this.y)};function Vn(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}et.Ry=function(a,y){return zt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},et.fA=function(a,y,x,b){return zt.qh(a,y,x,b,this.x,this.y,this),this},et.gA=function(a,y){return zt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},et.uA=function(a,y,x,b){return zt.No(this.x,this.y,a,y,x,b,this),this},et.vA=function(a,y){return zt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},et.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},et.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},et.transform=function(a){return a.Ga(this),this};function Mn(a,y){return y.Cd(a),a}function Kn(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 In(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Jn(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)}et.w=function(){return isFinite(this.x)&&isFinite(this.y)},st.alloc=function(){var a=ir.pop();return a===void 0?new st:a},st.allocAt=function(a,y){var x=ir.pop();return x===void 0?new st(a,y):(x.x=a,x.y=y,x)},st.free=function(a){ir.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 zt.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 zt.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 ir=[];st.className="Point",st.parse=mn,st.stringify=zn,st.distanceLineSegmentSquared=Kn,st.distanceSquared=In,st.direction=Jn,st.Origin=On=new st(0,0).ja(),st.InfiniteTopLeft=Xn=new st(-1/0,-1/0).ja(),st.InfiniteBottomRight=dr=new st(1/0,1/0).ja(),st.SixPoint=ur=new st(6,6).ja(),st.NoPoint=Qn=new st(NaN,NaN).ja(),st.parse=mn,st.stringify=zn,st.distanceLineSegmentSquared=Kn,st.distanceSquared=In,st.direction=Jn;function fn(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):Ot("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Ar,Dr,fi,Ir,Mi,Pi,Bi;fn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},fn.prototype.h=function(a,y){return this.width=a,this.height=y,this},fn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},fn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},fn.prototype.copy=function(){var a=new fn;return a.width=this.width,a.height=this.height,a},et=fn.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function ki(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 fn(x,E)}return new fn}function Hi(a){return a.width.toString()+" "+a.height.toString()}et.toString=function(){return"Size("+this.width+","+this.height+")"},et.D=function(a){return a instanceof fn?this.width===a.width&&this.height===a.height:!1},et.hi=function(a,y){return this.width===a&&this.height===y},et.Xa=function(a){return zt.B(this.width,a.width)&&zt.B(this.height,a.height)},et.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},et.w=function(){return isFinite(this.width)&&isFinite(this.height)},fn.alloc=function(){var a=qi.pop();return a===void 0?new fn:a},fn.free=function(a){qi.push(a)},fn.prototype.isReal=fn.prototype.w,fn.prototype.inflate=fn.prototype.Bc,fn.prototype.equalsApprox=fn.prototype.Xa,fn.prototype.equalTo=fn.prototype.hi,fn.prototype.equals=fn.prototype.D,fn.prototype.set=fn.prototype.set,fn.prototype.setTo=fn.prototype.sg;var qi=[];fn.className="Size",fn.parse=ki,fn.stringify=Hi,fn.ZeroSize=Ar=new fn(0,0).ja(),fn.OneSize=Dr=new fn(1,1).ja(),fn.SixSize=fi=new fn(6,6).ja(),fn.EightSize=Ir=new fn(8,8).ja(),fn.TenSize=Mi=new fn(10,10).ja(),fn.InfiniteSize=Pi=new fn(1/0,1/0).ja(),fn.NoSize=Bi=new fn(NaN,NaN).ja(),fn.parse=ki,fn.stringify=Hi;function Xt(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 fn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Ot("Incorrect second argument supplied to Rect constructor "+y)):Ot("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}et=Xt.prototype,et.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},et.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Ni(a,y,x){a.width=y,a.height=x}et.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},et.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},et.dd=function(a){return this.x=a.x,this.y=a.y,this},et.tA=function(a){return this.width=a.width,this.height=a.height,this},Xt.prototype.copy=function(){var a=new Xt;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},et=Xt.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function gi(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 Xt(x,E,ee,ne)}return new Xt}function Jr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}et.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},et.D=function(a){return a instanceof Xt?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},et.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},et.Xa=function(a){return zt.B(this.x,a.x)&&zt.B(this.y,a.y)&&zt.B(this.width,a.width)&&zt.B(this.height,a.height)};function Hr(a,y){return zt.$(a.x,y.x)&&zt.$(a.y,y.y)&&zt.$(a.width,y.width)&&zt.$(a.height,y.height)}et.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},et.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},et.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},et.offset=function(a,y){return this.x+=a,this.y+=y,this},et.Bc=function(a,y){return Ti(this,y,a,y,a)},et.Co=function(a){return Ti(this,a.top,a.right,a.bottom,a.left)},et.Fv=function(a){return Ti(this,-a.top,-a.right,-a.bottom,-a.left)},et.Hz=function(a,y,x,b){return Ti(this,a,y,x,b)};function Ti(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}et.Ex=function(a){return Gi(this,a.x,a.y,a.width,a.height)},et.Uu=function(a,y,x,b){return Gi(this,a,y,x,b)};function Gi(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}et.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},et.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 _i(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))}et.Ye=function(a){return li(this,a.x,a.y,0,0)},et.ed=function(a){return li(this,a.x,a.y,a.width,a.height)},et.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),li(this,a,y,x,b)};function li(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}et.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 Ji(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 _o(a,y,x,b,E,ee,ne,ae){return a>ne+E||E>x+a?!1:!(y>ae+ee||ee>b+y)}et.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},et.Mz=function(){return this.width===0&&this.height===0},Xt.alloc=function(){var a=wa.pop();return a===void 0?new Xt:a},Xt.allocAt=function(a,y,x,b){var E=wa.pop();return E===void 0?new Xt(a,y,x,b):E.h(a,y,x,b)},Xt.free=function(a){wa.push(a)},rn.Object.defineProperties(Xt.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 fn(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}}}),Xt.prototype.isEmpty=Xt.prototype.Mz,Xt.prototype.isReal=Xt.prototype.w,Xt.intersectsLineSegment=function(a,y,x,b,E,ee,ne,ae){return zt.Fx(a,y,x,b,E,ee,ne,ae)},Xt.prototype.setSpot=Xt.prototype.yi,Xt.prototype.union=Xt.prototype.Kv,Xt.prototype.unionRect=Xt.prototype.ed,Xt.prototype.unionPoint=Xt.prototype.Ye,Xt.prototype.intersects=Xt.prototype.Vu,Xt.prototype.intersectsRect=Xt.prototype.Yc,Xt.prototype.intersect=Xt.prototype.Uu,Xt.prototype.intersectRect=Xt.prototype.Ex,Xt.prototype.grow=Xt.prototype.Hz,Xt.prototype.subtractMargin=Xt.prototype.Fv,Xt.prototype.addMargin=Xt.prototype.Co,Xt.prototype.inflate=Xt.prototype.Bc,Xt.prototype.offset=Xt.prototype.offset,Xt.prototype.contains=Xt.prototype.contains,Xt.prototype.containsRect=Xt.prototype.Re,Xt.prototype.containsPoint=Xt.prototype.ca,Xt.prototype.equalsApprox=Xt.prototype.Xa,Xt.prototype.equalTo=Xt.prototype.hi,Xt.prototype.equals=Xt.prototype.D,Xt.prototype.setSize=Xt.prototype.tA,Xt.prototype.setPoint=Xt.prototype.dd,Xt.prototype.set=Xt.prototype.set,Xt.prototype.setTo=Xt.prototype.sg;var fa=null,bs=null,wa=[];Xt.className="Rect",Xt.parse=gi,Xt.stringify=Jr,Xt.contains=Ji,Xt.intersects=_o,Xt.ZeroRect=fa=new Xt(0,0,0,0).ja(),Xt.NoRect=bs=new Xt(NaN,NaN,NaN,NaN).ja(),Xt.parse=gi,Xt.stringify=Jr,Xt.contains=Ji,Xt.intersects=_o;function Wr(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):Ot("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Wr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Wr.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Wr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Wr.prototype.copy=function(){var a=new Wr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},et=Wr.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function bo(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 Wr;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Wr(x);for(var ee=NaN;a[y]==="";)y++;if((b=a[y++])&&(ee=parseFloat(b)),isNaN(ee))return new Wr(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Wr(x,E):new Wr(x,E,ee,ne)}return new Wr}function Po(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}et.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},et.D=function(a){return a instanceof Wr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},et.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},et.Xa=function(a){return zt.B(this.top,a.top)&&zt.B(this.right,a.right)&&zt.B(this.bottom,a.bottom)&&zt.B(this.left,a.left)},et.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Wr.alloc=function(){var a=Vo.pop();return a===void 0?new Wr:a},Wr.free=function(a){Vo.push(a)},Wr.prototype.isReal=Wr.prototype.w,Wr.prototype.equalsApprox=Wr.prototype.Xa,Wr.prototype.equalTo=Wr.prototype.hi,Wr.prototype.equals=Wr.prototype.D,Wr.prototype.set=Wr.prototype.set,Wr.prototype.setTo=Wr.prototype.sg;var ta=null,Ao=null,Vo=[];Wr.className="Margin",Wr.parse=bo,Wr.stringify=Po,Wr.ZeroMargin=ta=new Wr(0,0,0,0).ja(),Wr.TwoMargin=Ao=new Wr(2,2,2,2).ja(),Wr.parse=bo,Wr.stringify=Po;function or(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 _r,ni,bi,Ai,no,Gr,Aa,zo,jo,Ri,Ko,ja,vo,fs,ds,Ps,na,eh,ju,il,Sl,Os,Kl,th,nh,Zo,Ou,rh,Zl,uu,Ca,Oa,aa,ga,Xl,Ga;or.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},or.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},or.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},or.prototype.copy=function(){var a=new or;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},et=or.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function co(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function oo(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return _r;if(a==="TopLeft")return ni;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return bi;if(a==="TopRight")return Ai;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return no;if(a==="Center")return Gr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Aa;if(a==="BottomLeft")return zo;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return jo;if(a==="BottomRight")return Ri;if(a==="TopSide")return Ko;if(a==="LeftSide")return ja;if(a==="RightSide")return vo;if(a==="BottomSide")return fs;if(a==="TopBottomSides")return ds;if(a==="LeftRightSides")return Ps;if(a==="TopLeftSides")return na;if(a==="TopRightSides")return eh;if(a==="BottomLeftSides")return ju;if(a==="BottomRightSides")return il;if(a==="NotTopSide")return Sl;if(a==="NotLeftSide")return Os;if(a==="NotRightSide")return Kl;if(a==="NotBottomSide")return th;if(a==="AllSides")return nh;if(a==="Default")return Zo;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 or(x,E,ee,ne)}return new or}function Qi(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}et.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(_r)?"None":this.D(ni)?"TopLeft":this.D(bi)?"Top":this.D(Ai)?"TopRight":this.D(no)?"Left":this.D(Gr)?"Center":this.D(Aa)?"Right":this.D(zo)?"BottomLeft":this.D(jo)?"Bottom":this.D(Ri)?"BottomRight":this.D(Ko)?"TopSide":this.D(ja)?"LeftSide":this.D(vo)?"RightSide":this.D(fs)?"BottomSide":this.D(ds)?"TopBottomSides":this.D(Ps)?"LeftRightSides":this.D(na)?"TopLeftSides":this.D(eh)?"TopRightSides":this.D(ju)?"BottomLeftSides":this.D(il)?"BottomRightSides":this.D(Sl)?"NotTopSide":this.D(Os)?"NotLeftSide":this.D(Kl)?"NotRightSide":this.D(th)?"NotBottomSide":this.D(nh)?"AllSides":this.D(Zo)?"Default":"None"},et.D=function(a){return a instanceof or?(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},et.gv=function(){return new or(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},et.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Ou))a=ja;else if(a.D(rh))a=vo;else if(a.D(Zl))a=Ko;else if(a.D(uu))a=fs;else return!1;return a=a.offsetY,(this.offsetY&a)===a},et.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},et.Mc=function(){return isNaN(this.x)||isNaN(this.y)},et.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},et.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},et.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},or.alloc=function(){var a=sa.pop();return a===void 0?new or:a},or.free=function(a){sa.push(a)},or.prototype.isDefault=or.prototype.Xb,or.prototype.isNone=or.prototype.ys,or.prototype.isSide=or.prototype.$c,or.prototype.isNoSpot=or.prototype.Mc,or.prototype.isSpot=or.prototype.sb,or.prototype.includesSide=or.prototype.Hf,or.prototype.opposite=or.prototype.gv,or.prototype.equals=or.prototype.D,or.prototype.set=or.prototype.set,or.prototype.setTo=or.prototype.sg;var sa=[];or.className="Spot",or.parse=oo,or.stringify=Qi,or.None=_r=co(new or(0,0,0,0),0).ja(),or.Default=Zo=co(new or(0,0,-1,0),-1).ja(),or.TopLeft=ni=new or(0,0,0,0).ja(),or.TopCenter=bi=new or(.5,0,0,0).ja(),or.TopRight=Ai=new or(1,0,0,0).ja(),or.LeftCenter=no=new or(0,.5,0,0).ja(),or.Center=Gr=new or(.5,.5,0,0).ja(),or.RightCenter=Aa=new or(1,.5,0,0).ja(),or.BottomLeft=zo=new or(0,1,0,0).ja(),or.BottomCenter=jo=new or(.5,1,0,0).ja(),or.BottomRight=Ri=new or(1,1,0,0).ja(),or.MiddleTop=Ca=bi,or.MiddleLeft=Oa=no,or.MiddleRight=aa=Aa,or.MiddleBottom=ga=jo,or.Top=Zl=bi,or.Left=Ou=no,or.Right=rh=Aa,or.Bottom=uu=jo,or.TopSide=Ko=co(new or(0,0,1,1),1).ja(),or.LeftSide=ja=co(new or(0,0,1,2),1).ja(),or.RightSide=vo=co(new or(0,0,1,4),1).ja(),or.BottomSide=fs=co(new or(0,0,1,8),1).ja(),or.TopBottomSides=ds=co(new or(0,0,1,9),1).ja(),or.LeftRightSides=Ps=co(new or(0,0,1,6),1).ja(),or.TopLeftSides=na=co(new or(0,0,1,3),1).ja(),or.TopRightSides=eh=co(new or(0,0,1,5),1).ja(),or.BottomLeftSides=ju=co(new or(0,0,1,10),1).ja(),or.BottomRightSides=il=co(new or(0,0,1,12),1).ja(),or.NotTopSide=Sl=co(new or(0,0,1,14),1).ja(),or.NotLeftSide=Os=co(new or(0,0,1,13),1).ja(),or.NotRightSide=Kl=co(new or(0,0,1,11),1).ja(),or.NotBottomSide=th=co(new or(0,0,1,7),1).ja(),or.AllSides=nh=co(new or(0,0,1,15),1).ja(),Xl=new or(.156,.156).ja(),Ga=new or(.844,.844).ja(),or.parse=oo,or.stringify=Qi;function Cr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Cr.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},Cr.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},Cr.prototype.copy=function(){var a=new Cr;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},Cr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Cr.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},Cr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Cr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Cr.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},Cr.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},Cr.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},Cr.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},et=Cr.prototype,et.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},et.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},et.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)},et.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))},et.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))},et.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,Me=y*ee+x*ae+ge,ze=y*ne+x*ue+ye,Ze=b*ee+x*ae+ge,Qe=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(Me,Ze),Me=Math.max(Me,Ze),Ze=Math.min(ze,Qe),ze=Math.max(ze,Qe),E=Math.min(E,x),Me=Math.max(Me,x),Ze=Math.min(Ze,y),ze=Math.max(ze,y),E=Math.min(E,ee),Me=Math.max(Me,ee),Ze=Math.min(Ze,b),ze=Math.max(ze,b),a.h(E,Ze,Me-E,ze-Ze),a},Cr.alloc=function(){var a=da.pop();return a===void 0?new Cr:a},Cr.free=function(a){da.push(a)},Cr.prototype.transformRect=Cr.prototype.pp,Cr.prototype.transformPoint=Cr.prototype.Ga,Cr.prototype.scale=Cr.prototype.scale,Cr.prototype.translate=Cr.prototype.translate,Cr.prototype.rotate=Cr.prototype.rotate,Cr.prototype.invert=Cr.prototype.Vj,Cr.prototype.multiplyInverted=Cr.prototype.bv,Cr.prototype.multiply=Cr.prototype.multiply,Cr.prototype.reset=Cr.prototype.reset,Cr.prototype.isIdentity=Cr.prototype.ws,Cr.prototype.equals=Cr.prototype.D,Cr.prototype.setTransform=Cr.prototype.setTransform,Cr.prototype.set=Cr.prototype.set;var da=[];Cr.className="Transform",Cr.xF="54a702f3e53909c447824c6706603faf4c";var zt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=zt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);zt.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,Me){if(zt.Yb(a,y,ne,ae,Me,x,b)&&zt.Yb(a,y,ne,ae,Me,E,ee))return zt.Yb(a,y,ne,ae,Me,ge,ye);var ze=(a+x)/2,Ze=(y+b)/2,Qe=(x+E)/2,rt=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(ze+Qe)/2,x=(Ze+rt)/2,Qe=(Qe+E)/2,rt=(rt+ee)/2;var Tt=(b+Qe)/2,xt=(x+rt)/2;return zt.cs(a,y,ze,Ze,b,x,Tt,xt,ue,ge,ye,Me)||zt.cs(Tt,xt,Qe,rt,E,ee,ne,ae,ue,ge,ye,Me)},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 Jn(((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(zt.Yb(a,y,ne,ae,ue,x,b)&&zt.Yb(a,y,ne,ae,ue,E,ee))li(ge,a,y,0,0),li(ge,ne,ae,0,0);else{var ye=(a+x)/2,Me=(y+b)/2,ze=(x+E)/2,Ze=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(ye+ze)/2,x=(Me+Ze)/2,ze=(ze+E)/2,Ze=(Ze+ee)/2;var Qe=(b+ze)/2,rt=(x+Ze)/2;zt.Dl(a,y,ye,Me,b,x,Qe,rt,ue,ge),zt.Dl(Qe,rt,ze,Ze,E,ee,ne,ae,ue,ge)}return ge},Qe:function(a,y,x,b,E,ee,ne,ae,ue,ge){if(zt.Yb(a,y,ne,ae,ue,x,b)&&zt.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,Me=(y+b)/2,ze=(x+E)/2,Ze=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(ye+ze)/2,x=(Me+Ze)/2,ze=(ze+E)/2,Ze=(Ze+ee)/2;var Qe=(b+ze)/2,rt=(x+Ze)/2;zt.Qe(a,y,ye,Me,b,x,Qe,rt,ue,ge),zt.Qe(Qe,rt,ze,Ze,E,ee,ne,ae,ue,ge)}return ge},jv:function(a,y,x,b,E,ee,ne,ae,ue,ge){if(zt.Yb(a,y,E,ee,ge,x,b))return zt.Yb(a,y,E,ee,ge,ae,ue);var ye=(a+x)/2,Me=(y+b)/2;x=(x+E)/2,b=(b+ee)/2;var ze=(ye+x)/2,Ze=(Me+b)/2;return zt.jv(a,y,ye,Me,ze,Ze,ne,ae,ue,ge)||zt.jv(ze,Ze,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(zt.Yb(a,y,E,ee,ne,x,b))li(ae,a,y,0,0),li(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,Me=(ge+b)/2;zt.iv(a,y,ue,ge,ye,Me,ne,ae),zt.iv(ye,Me,x,b,E,ee,ne,ae)}return ae},ep:function(a,y,x,b,E,ee,ne,ae){if(zt.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,Me=(ge+b)/2;zt.ep(a,y,ue,ge,ye,Me,ne,ae),zt.ep(ye,Me,x,b,E,ee,ne,ae)}return ae},Eo:function(a,y,x,b,E,ee,ne,ae,ue,ge,ye,Me,ze,Ze){if(zt.Yb(a,y,ne,ae,ze,x,b)&&zt.Yb(a,y,ne,ae,ze,E,ee))return!zt.Rl(a,y,ne,ae,ue,ge,ye,Me)||(ze=(a-ne)*(ge-Me)-(y-ae)*(ue-ye),ze===0)?!1:(Ze.h(((a*ae-y*ne)*(ue-ye)-(a-ne)*(ue*Me-ge*ye))/ze,((a*ae-y*ne)*(ge-Me)-(y-ae)*(ue*Me-ge*ye))/ze),!0);var Qe=(a+x)/2,rt=(y+b)/2,Tt=(x+E)/2,xt=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(Qe+Tt)/2,x=(rt+xt)/2,Tt=(Tt+E)/2,xt=(xt+ee)/2;var At=(b+Tt)/2,Ft=(x+xt)/2,Dt=1/0,It=!1,Wt=0,_n=0;return zt.Eo(a,y,Qe,rt,b,x,At,Ft,ue,ge,ye,Me,ze,Ze)&&(a=(Ze.x-ue)*(Ze.x-ue)+(Ze.y-ge)*(Ze.y-ge),a<Dt&&(Dt=a,It=!0,Wt=Ze.x,_n=Ze.y)),zt.Eo(At,Ft,Tt,xt,E,ee,ne,ae,ue,ge,ye,Me,ze,Ze)&&(Ze.x-ue)*(Ze.x-ue)+(Ze.y-ge)*(Ze.y-ge)<Dt&&(It=!0,Wt=Ze.x,_n=Ze.y),It&&(Ze.x=Wt,Ze.y=_n),It},Fo:function(a,y,x,b,E,ee,ne,ae,ue,ge,ye,Me,ze){var Ze=0;if(zt.Yb(a,y,ne,ae,ze,x,b)&&zt.Yb(a,y,ne,ae,ze,E,ee)){if(ze=(a-ne)*(ge-Me)-(y-ae)*(ue-ye),ze===0)return Ze;var Qe=((a*ae-y*ne)*(ue-ye)-(a-ne)*(ue*Me-ge*ye))/ze,rt=((a*ae-y*ne)*(ge-Me)-(y-ae)*(ue*Me-ge*ye))/ze;if(Qe>=ye)return Ze;if((ue>ye?ue-ye:ye-ue)<(ge>Me?ge-Me:Me-ge)){if(y<ae?(ue=y,a=ae):(ue=ae,a=y),rt<ue||rt>a)return Ze}else if(a<ne?(ue=a,a=ne):ue=ne,Qe<ue||Qe>a)return Ze;0<ze?Ze++:0>ze&&Ze--}else{Qe=(a+x)/2,rt=(y+b)/2;var Tt=(x+E)/2,xt=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(Qe+Tt)/2,x=(rt+xt)/2,Tt=(Tt+E)/2,xt=(xt+ee)/2;var At=(b+Tt)/2,Ft=(x+xt)/2;Ze+=zt.Fo(a,y,Qe,rt,b,x,At,Ft,ue,ge,ye,Me,ze),Ze+=zt.Fo(At,Ft,Tt,xt,E,ee,ne,ae,ue,ge,ye,Me,ze)}return Ze},qh:function(a,y,x,b,E,ee,ne){return zt.$(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)):zt.$(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 zt.B(a,x)&&zt.B(y,b)?(ue.h(a,y),!1):zt.$(E,ne)?zt.$(a,x)?(zt.qh(a,y,x,b,E,ee,ue),!1):zt.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,ue):(ae=(ae-ee)/(ne-E),zt.$(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),zt.$(ae,ne)?(zt.qh(a,y,x,b,E,ee,ue),!1):(E=(ne*a-ae*E+ee-y)/(ne-ae),zt.$(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)):zt.qh(a,y,x,b,E,ne*(E-a)+y,ue))))},MA:function(a,y,x,b,E){return zt.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,xt){var At=(Tt-a)*(Tt-a)+(xt-y)*(xt-y);At<Me&&(Me=At,ue.h(Tt,xt))}var Me=1/0;ye(ue.x,ue.y);var ze=0,Ze=0,Qe=0,rt=0;if(E<ne?(ze=E,Ze=ne):(ze=ne,Ze=E),ee<ae?(Qe=E,rt=ne):(Qe=ne,rt=E),ze=(Ze-ze)/2+ge,ge=(rt-Qe)/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,Me=y;if(zt.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,Me=ue.y)}return zt.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,Me=ue.y)),zt.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,Me=ue.y)),zt.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,Me=ue.y)),ue.h(ye,Me),1e21>ge},us:function(a,y,x){return zt.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):!!(Ji(a,y,x,b,E,ee)||Ji(a,y,x,b,ne,ae)||zt.Rl(a,y,ue,y,E,ee,ne,ae)||zt.Rl(ue,y,ue,ge,E,ee,ne,ae)||zt.Rl(ue,ge,a,ge,E,ee,ne,ae)||zt.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>=zt.Fl(a,y,x,b,E,ee)*zt.Fl(a,y,x,b,ne,ae)&&0>=zt.Fl(E,ee,ne,ae,a,y)*zt.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(zt.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),zt.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),Me=ne/(y+ee);if(ye=ye*ye+Me*Me-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 ar,um:new ar,Mf:new ar,Nf:0,vm:100};zt.za=zt.AA;function bn(a){gr(this),this.l=2,a===void 0&&(a=bn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===bn.o?this.ee=new on:(bn.V===null&&(bn.V=new on().freeze()),this.ee=bn.V),this.aq=this.ee.Ja,this.Ip=new Xt().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=ni,this.gg=Ri,this.Rk=this.Sk=NaN,this.Uf=yn}bn.prototype.copy=function(){var a=new bn;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===bn.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},bn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},bn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==bn.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},bn.prototype.ka=function(){if(Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==bn.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},bn.prototype.Xa=function(a){if(!(a instanceof bn))return!1;if(this.type!==a.type)return this.type===bn.j&&a.type===bn.o?Ws(this,a):a.type===bn.j&&this.type===bn.o?Ws(a,this):!1;if(this.type===bn.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 zt.B(this.startX,a.startX)&&zt.B(this.startY,a.startY)&&zt.B(this.endX,a.endX)&&zt.B(this.endY,a.endY)};function Ws(a,y){return a.type!==bn.j||y.type!==bn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&zt.B(a.startX,y.startX)&&zt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Ui&&zt.B(a.endX,y.endX)&&zt.B(a.endY,y.endY))))}bn.ia=function(a){return a.toString()},bn.prototype.qb=function(a){a.classType===bn&&(this.type=a)},bn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case bn.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 bn.u:var y=new Xt(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 bn.F:if(y=new Xt(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 bn.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()}},bn.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},bn.parse=function(a,y){function x(){return rt>=Dt-1?!0:ge[rt+1].match(It)!==null}function b(){return rt++,ge[rt]}function E(jr){var kr=parseFloat(b()),wi=parseFloat(b());Tt===Tt.toLowerCase()&&(kr=Ft.x+kr,wi=Ft.y+wi),jr.h(kr,wi)}function ee(){return E(Ft),Ft}function ne(){return E(At),At}function ae(){var jr=xt.toLowerCase();return jr!=="c"&&jr!=="s"&&jr!=="q"&&jr!=="t"?Ft:new st(2*Ft.x-At.x,2*Ft.y-At.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=Un();for(var Me="",ze=!1,Ze=0;Ze<ye.length;Ze++){var Qe=ye[Ze];Qe!=="."||ze?Qe==="."?(ue.push(Me),Me="."):Me+=Qe:(ze=!0,Me+=Qe)}for(ue.push(Me),ge.splice(a,1),ye=0;ye<ue.length;ye++)ge.splice(a+ye,0,ue[ye]);a+=ue.length-1,Rn(ue)}}var rt=-1,Tt="",xt="";ue=new st(0,0);var At=new st(0,0),Ft=new st(0,0),Dt=ge.length;a=A1(null),ze=Me=ye=!1,Ze=!0,Qe=null;for(var It=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(rt>=Dt-1);)if(xt=Tt,Tt=b(),Tt!=="")switch(Tt.toUpperCase()){case"X":Ze=!0,Me=ye=!1;break;case"M":for(Qe=ee(),a.mc===null||Ze===!0?(Dd(a,Qe.x,Qe.y,ye,!Me,ze),Ze=!1):a.moveTo(Qe.x,Qe.y),ue.assign(Ft);!x();)Qe=ee(),a.lineTo(Qe.x,Qe.y);break;case"L":for(;!x();)Qe=ee(),a.lineTo(Qe.x,Qe.y);break;case"H":for(;!x();)Ft=new st((Tt===Tt.toLowerCase()?Ft.x:0)+parseFloat(b()),Ft.y),a.lineTo(Ft.x,Ft.y);break;case"V":for(;!x();)Ft=new st(Ft.x,(Tt===Tt.toLowerCase()?Ft.y:0)+parseFloat(b())),a.lineTo(Ft.x,Ft.y);break;case"C":for(;!x();){Qe=new st,E(Qe);var Wt=ne(),_n=ee();wh(a,Qe.x,Qe.y,Wt.x,Wt.y,_n.x,_n.y)}break;case"S":for(;!x();)Qe=ae(),Wt=ne(),_n=ee(),wh(a,Qe.x,Qe.y,Wt.x,Wt.y,_n.x,_n.y);break;case"Q":for(;!x();)Qe=ne(),Wt=ee(),Rm(a,Qe.x,Qe.y,Wt.x,Wt.y);break;case"T":for(;!x();)At=Qe=ae(),Wt=ee(),Rm(a,Qe.x,Qe.y,Wt.x,Wt.y);break;case"B":for(;!x();){Qe=parseFloat(b()),Wt=parseFloat(b()),_n=parseFloat(b());var rr=parseFloat(b()),Yn=parseFloat(b()),Cn=Yn,dn=!1;x()||(Cn=parseFloat(b()),x()||(dn=parseFloat(b())!==0)),Tt===Tt.toLowerCase()&&(_n+=Ft.x,rr+=Ft.y),a.arcTo(Qe,Wt,_n,rr,Yn,Cn,dn)}break;case"A":for(;!x();)Qe=Math.abs(parseFloat(b())),Wt=Math.abs(parseFloat(b())),_n=parseFloat(b()),Yn=rr=!1,dn=Cn=0,Cn=b(),Cn.length===1?(rr=!!parseFloat(Cn),Yn=!!parseFloat(b()),Cn=parseFloat(b())):Cn.length===2?(rr=!!parseFloat(Cn[0]),Yn=!!parseFloat(Cn[1]),Cn=parseFloat(b())):(rr=!!parseFloat(Cn[0]),Yn=!!parseFloat(Cn[1]),Cn=parseFloat(Cn.slice(2))),dn=parseFloat(b()),Tt===Tt.toLowerCase()&&(Cn=Ft.x+Cn,dn=Ft.y+dn),Ft.h(Cn,dn),Px(a,Qe,Wt,_n,rr,Yn,Cn,dn);break;case"Z":bx(a),Ft.assign(ue);break;case"F":for(Qe="",Wt=1;ge[rt+Wt];)if(ge[rt+Wt]==="0")ze=!0,Wt++;else if(ge[rt+Wt].match(/[Uu]/)!==null)Wt++;else if(ge[rt+Wt].match(It)===null)Wt++;else{Qe=ge[rt+Wt];break}Qe.match(/[Mm]/)?ye=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Qe="",Wt=1;ge[rt+Wt];)if(ge[rt+Wt].match(/[Ff]/)!==null)Wt++;else if(ge[rt+Wt].match(It)===null)Wt++;else{Qe=ge[rt+Wt];break}Qe.match(/[Mm]/)?Me=!0:a.mc.isShadowed=!1}if(ue=a.os,Im=a,y)for(y=ue.figures.iterator;y.next();)y.value.isFilled=!0;return ue},bn.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)},bn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===bn.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},bn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===bn.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),jl(this,a,!1),li(a,0,0,0,0),a.freeze()},bn.prototype.ix=function(){var a=new Xt;return jl(this,a,!0),a};function jl(a,y,x){switch(a.type){case bn.j:case bn.u:case bn.F:x?y.h(a.od,a.pd,0,0):li(y,a.od,a.pd,0,0),li(y,a.Dc,a.Ec,0,0);break;case bn.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):li(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 Me=ne[ye];switch(Me.type){case Ui:case Fo:ue=Me.endX,ge=Me.endY,li(y,ue,ge,0,0);break;case Go:zt.Dl(ue,ge,Me.point1X,Me.point1Y,Me.point2X,Me.point2Y,Me.endX,Me.endY,.5,y),ue=Me.endX,ge=Me.endY;break;case ps:zt.iv(ue,ge,Me.point1X,Me.point1Y,Me.endX,Me.endY,.5,y),ue=Me.endX,ge=Me.endY;break;case xo:case Cs:var ze=Me.type===xo?Ua(Me,ee):Ds(Me,ee,ue,ge),Ze=ze.length;if(Ze===0){ue=Me.type===xo?Me.centerX:Me.endX,ge=Me.type===xo?Me.centerY:Me.endY,li(y,ue,ge,0,0);break}Me=null;for(var Qe=0;Qe<Ze;Qe++)Me=ze[Qe],zt.Dl(Me[0],Me[1],Me[2],Me[3],Me[4],Me[5],Me[6],Me[7],.5,y);Me!==null&&(ue=Me[6],ge=Me[7]);break;default:Ot("Unknown Segment type: "+Me.type)}}}break;default:Ot("Unknown Geometry type: "+a.type)}}bn.prototype.normalize=function(){this._isFrozen&&Ut(this);var a=this.ix();return this.offset(-a.x,-a.y),new st(-a.x,-a.y)},bn.prototype.offset=function(a,y){return this._isFrozen&&Ut(this),this.transform(1,0,0,1,a,y),this},bn.prototype.scale=function(a,y){return this._isFrozen&&Ut(this),this.transform(a,0,0,y,0,0),this},bn.prototype.rotate=function(a,y,x){this._isFrozen&&Ut(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=Cr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),Cr.free(b),this},et=bn.prototype,et.transform=function(a,y,x,b,E,ee){switch(this.type){case bn.j:case bn.u:case bn.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 bn.o:for(var ue=this.figures.s,ge=ue.length,ye=0;ye<ge;ye++){var Me=ue[ye];ne=Me.startX,ae=Me.startY,Me.startX=ne*a+ae*x+E,Me.startY=ne*y+ae*b+ee,Me=Me.segments.s;for(var ze=Me.length,Ze=0;Ze<ze;Ze++){var Qe=Me[Ze];switch(Qe.type){case Ui:case Fo:ne=Qe.endX,ae=Qe.endY,Qe.endX=ne*a+ae*x+E,Qe.endY=ne*y+ae*b+ee;break;case Go:ne=Qe.point1X,ae=Qe.point1Y,Qe.point1X=ne*a+ae*x+E,Qe.point1Y=ne*y+ae*b+ee,ne=Qe.point2X,ae=Qe.point2Y,Qe.point2X=ne*a+ae*x+E,Qe.point2Y=ne*y+ae*b+ee,ne=Qe.endX,ae=Qe.endY,Qe.endX=ne*a+ae*x+E,Qe.endY=ne*y+ae*b+ee;break;case ps:ne=Qe.point1X,ae=Qe.point1Y,Qe.point1X=ne*a+ae*x+E,Qe.point1Y=ne*y+ae*b+ee,ne=Qe.endX,ae=Qe.endY,Qe.endX=ne*a+ae*x+E,Qe.endY=ne*y+ae*b+ee;break;case xo:ne=Qe.centerX,ae=Qe.centerY,Qe.centerX=ne*a+ae*x+E,Qe.centerY=ne*y+ae*b+ee,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Qe.startAngle+=ne),0>a&&(Qe.startAngle=180-Qe.startAngle,Qe.sweepAngle=-Qe.sweepAngle),0>b&&(Qe.startAngle=-Qe.startAngle,Qe.sweepAngle=-Qe.sweepAngle),Qe.radiusX*=Math.sqrt(a*a+x*x),Qe.radiusY!==void 0&&(Qe.radiusY*=Math.sqrt(y*y+b*b));break;case Cs:if(ne=Qe.endX,ae=Qe.endY,Qe.endX=ne*a+ae*x+E,Qe.endY=ne*y+ae*b+ee,Qe.radiusX===0||Qe.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Qe.xAxisRotation+=ne),0>a&&(Qe.xAxisRotation=180-Qe.xAxisRotation,Qe.isClockwiseArc=!Qe.isClockwiseArc),0>b&&(Qe.xAxisRotation=-Qe.xAxisRotation,Qe.isClockwiseArc=!Qe.isClockwiseArc),Qe.radiusX*=Math.sqrt(a*a+x*x),Qe.radiusY*=Math.sqrt(y*y+b*b);break;default:Ot("Unknown Segment type: "+Qe.type)}}}}return this._isInvalidBounds=!0,this},et.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 bn.j:return zt.Yb(x,b,E,ee,y,a.x,a.y);case bn.u:var ne=Xt.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),Xt.free(ne),a;case bn.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 bn.o:return $o(this,a,y,!0,!1);default:return!1}};function $o(a,y,x,b,E){var ee=y.x;y=y.y;for(var ne=a.bounds.x-20,ae=0,ue,ge,ye,Me,ze=a.figures.s,Ze=ze.length,Qe=0;Qe<Ze;Qe++){var rt=ze[Qe],Tt=!rt.isEvenOdd;if(rt.isFilled){if(b&&rt.ca(ee,y,x))return!0;var xt=rt.segments;ue=rt.startX,ge=rt.startY;for(var At=ue,Ft=ge,Dt=xt.s,It=0;It<=xt.length;It++){var Wt=void 0;if(It!==xt.length){Wt=Dt[It];var _n=Wt.type;a=Wt.endX,Me=Wt.endY}else _n=Ui,a=At,Me=Ft;switch(_n){case Fo:if(At=ba(ee,y,ne,y,ue,ge,At,Ft),isNaN(At))return!0;ae+=At,At=a,Ft=Me;break;case Ui:if(ue=ba(ee,y,ne,y,ue,ge,a,Me),isNaN(ue))return!0;ae+=ue;break;case Go:ye=zt.Fo(ue,ge,Wt.point1X,Wt.point1Y,Wt.point2X,Wt.point2Y,a,Me,ne,y,ee,y,.5),ae+=ye;break;case ps:ye=zt.Fo(ue,ge,(ue+2*Wt.point1X)/3,(ge+2*Wt.point1Y)/3,(2*Wt.point1X+a)/3,(2*Wt.point1Y+Me)/3,a,Me,ne,y,ee,y,.5),ae+=ye;break;case xo:case Cs:_n=Wt.type===xo?Ua(Wt,rt):Ds(Wt,rt,ue,ge);var rr=_n.length;if(rr===0){if(ue=ba(ee,y,ne,y,ue,ge,Wt.type===xo?Wt.centerX:Wt.endX,Wt.type===xo?Wt.centerY:Wt.endY),isNaN(ue))return!0;ae+=ue;break}Wt=null;for(var Yn=0;Yn<rr;Yn++){if(Wt=_n[Yn],Yn===0){if(ye=ba(ee,y,ne,y,ue,ge,Wt[0],Wt[1]),isNaN(ye))return!0;ae+=ye}ye=zt.Fo(Wt[0],Wt[1],Wt[2],Wt[3],Wt[4],Wt[5],Wt[6],Wt[7],ne,y,ee,y,.5),ae+=ye}Wt!==null&&(a=Wt[6],Me=Wt[7]);break;default:Ot("Unknown Segment type: "+Wt.type)}ue=a,ge=Me}if(Tt){if(ae!==0)return!0}else if(ae%2!==0)return!0;ae=0}else if(rt.ca(ee,y,E?x:x+2))return!0}return!1}function ba(a,y,x,b,E,ee,ne,ae){if(zt.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 Fs(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}et.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new st),this.type===bn.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},et.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===bn.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},et.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===bn.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},et.xx=function(a){if(this.type===bn.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 zt.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===bn.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,Me=0;Me<ue;Me++)for(var ze=y[Me],Ze=x[Me],Qe=ze.length,rt=0;rt<Qe;rt+=2){var Tt=ze[rt],xt=ze[rt+1];if(rt!==0){zt.qh(ge,ye,Tt,xt,a.x,a.y,b);var At=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);At<E&&(E=At,ne=ae,ne+=Math.sqrt((b.x-ge)*(b.x-ge)+(b.y-ye)*(b.y-ye))),ae+=Ze[(rt-2)/2]}ge=Tt,ye=xt}return st.free(b),a=ne/ee,0>a?0:1<a?1:a}return 0};function ol(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===bn.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===bn.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===bn.F){var ee=new Oo;ee.startX=a.endX,ee.startY=(a.startY+a.endY)/2;var ne=new vi(xo);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=Ua(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];zt.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(Fu(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,Me=0;Me<ye;Me++){var ze=ge[Me];switch(ze.type){case Fo:4<=b.length&&(y.push(b),x.push(Fu(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 Go:zt.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 ps:zt.ep(ne,ee,ze.point1X,ze.point1Y,ze.endX,ze.endY,.5,b),ne=ze.endX,ee=ze.endY;break;case xo:var Ze=Ua(ze,E),Qe=Ze.length;if(Qe===0){b.push(ze.centerX),b.push(ze.centerY),ne=ze.centerX,ee=ze.centerY;break}for(var rt=0;rt<Qe;rt++){var Tt=Ze[rt];zt.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 Cs:if(Ze=Ds(ze,E,ne,ee),Qe=Ze.length,rt=ze.endX,Tt=ze.endY,Qe===0){b.push(rt),b.push(Tt),ne=rt,ee=Tt;break}for(rt=0;rt<Qe;rt++)Tt=Ze[rt],zt.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:Ot("Segment not of valid type: "+ze.type)}ze.isClosed&&(b.push(ae),b.push(ue))}4<=b.length&&(y.push(b),x.push(Fu(b)))}}}function Fu(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(In(x,b,ne,ae))),x=ne,b=ae}return y}et.add=function(a){return this.ee.add(a),this},et.pm=function(a,y,x,b,E,ee,ne,ae){return this._isFrozen&&Ut(this),this.fg=new or(a,y,E,ee).freeze(),this.gg=new or(x,b,ne,ae).freeze(),this},rn.Object.defineProperties(bn.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 ol(this),this.tk}},flattenedLengths:{get:function(){return ol(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===bn.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===bn.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&&Ut(this,a),this.na=a,a===bn.o?this.ee=new on:(bn.V===null&&(bn.V=new on().freeze()),this.ee=bn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Ut(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Ut(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Ut(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Ut(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Ut(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Ut(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Ut(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Ut(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),bn.prototype.setSpots=bn.prototype.pm,bn.prototype.add=bn.prototype.add,bn.prototype.getFractionForPoint=bn.prototype.xx,bn.prototype.getPointAndAngleAlongPath=bn.prototype.Qu,bn.prototype.getAngleAlongPath=bn.prototype.wx,bn.prototype.getPointAlongPath=bn.prototype.Pu,bn.prototype.containsPoint=bn.prototype.ca,bn.prototype.transform=bn.prototype.transform,bn.prototype.rotate=bn.prototype.rotate,bn.prototype.scale=bn.prototype.scale,bn.prototype.offset=bn.prototype.offset,bn.prototype.normalize=bn.prototype.normalize,bn.prototype.computeBoundsWithoutOrigin=bn.prototype.ix,bn.prototype.equalsApprox=bn.prototype.Xa,bn.className="Geometry",bn.j=new Yt(bn,"Line",0),bn.u=new Yt(bn,"Rectangle",1),bn.F=new Yt(bn,"Ellipse",2),bn.o=new Yt(bn,"Path",3),bn.V=null,bn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",bn.className="Geometry",bn.stringify=bn.ia,bn.fillPath=bn.nb,bn.parse=bn.parse,bn.Line=bn.j,bn.Rectangle=bn.u,bn.Ellipse=bn.F,bn.Path=bn.o;function Oo(a,y,x,b,E){gr(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 on,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},et=Oo.prototype,et.Xa=function(a){if(!(a instanceof Oo&&zt.B(this.startX,a.startX)&&zt.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},et.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},et.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},et.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},et.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},et.add=function(a){return this.pl.add(a),this},et.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(zt.Yb(b,E,ye.endX,ye.endY,x,a,y))return!0;b=ye.endX,E=ye.endY;break;case Go:if(zt.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 ps:if(zt.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 xo:case Cs:var Me=ye.type===xo?Ua(ye,this):Ds(ye,this,b,E),ze=Me.length,Ze=ye.type===xo?ye.centerX:ye.endX,Qe=ye.type===xo?ye.centerY:ye.endY;if(ze===0){if(zt.Yb(b,E,Ze,Qe,x,a,y))return!0;b=Ze,E=Qe;break}for(Ze=null,Qe=0;Qe<ze;Qe++)if(Ze=Me[Qe],Qe===0&&zt.Yb(b,E,Ze[0],Ze[1],x,a,y)||zt.cs(Ze[0],Ze[1],Ze[2],Ze[3],Ze[4],Ze[5],Ze[6],Ze[7],.5,a,y,x))return!0;Ze!==null&&(b=Ze[6],E=Ze[7]);break;default:Ot("Unknown Segment type: "+ye.type)}if(ye.isClosed&&(b!==ee||E!==ne)&&zt.Yb(b,E,ee,ne,x,a,y))return!0}return!1},rn.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&&Ut(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Ut(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Ut(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Ut(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Ut(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Ut(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Oo.prototype.add=Oo.prototype.add,Oo.prototype.equalsApprox=Oo.prototype.Xa,Oo.className="PathFigure";function vi(a,y,x,b,E,ee,ne,ae){gr(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===Cs?(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===xo&&(ee=Math.max(ee,0)),this.Wh=ee,typeof ne=="number"?(a===xo&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}vi.prototype.copy=function(){var a=new vi;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},et=vi.prototype,et.Xa=function(a){if(!(a instanceof vi)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Fo:case Ui:return zt.B(this.endX,a.endX)&&zt.B(this.endY,a.endY);case Go:return zt.B(this.endX,a.endX)&&zt.B(this.endY,a.endY)&&zt.B(this.point1X,a.point1X)&&zt.B(this.point1Y,a.point1Y)&&zt.B(this.point2X,a.point2X)&&zt.B(this.point2Y,a.point2Y);case ps:return zt.B(this.endX,a.endX)&&zt.B(this.endY,a.endY)&&zt.B(this.point1X,a.point1X)&&zt.B(this.point1Y,a.point1Y);case xo:return zt.B(this.startAngle,a.startAngle)&&zt.B(this.sweepAngle,a.sweepAngle)&&zt.B(this.centerX,a.centerX)&&zt.B(this.centerY,a.centerY)&&zt.B(this.radiusX,a.radiusX)&&zt.B(this.radiusY,a.radiusY);case Cs:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&zt.B(this.xAxisRotation,a.xAxisRotation)&&zt.B(this.endX,a.endX)&&zt.B(this.endY,a.endY)&&zt.B(this.radiusX,a.radiusX)&&zt.B(this.radiusY,a.radiusY);default:return!1}},et.qb=function(a){a.classType===vi&&(this.type=a)},et.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 Go: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 ps: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 xo: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 Cs: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":"")},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.close=function(){return this.isClosed=!0,this};function Ua(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=zt.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=Cr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),bn.Ha(ee,ne),Cr.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 Ds(a,y,x,b){function E(rt,Tt,xt,At){return(rt*At<Tt*xt?-1:1)*Math.acos((rt*xt+Tt*At)/(Math.sqrt(rt*rt+Tt*Tt)*Math.sqrt(xt*xt+At*At)))}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,Me=Math.cos(ne),ze=Math.sin(ne),Ze=Me*(x-ge)/2+ze*(b-ye)/2;ne=-ze*(x-ge)/2+Me*(b-ye)/2;var Qe=Ze*Ze/(y*y)+ne*ne/(ee*ee);return 1<Qe&&(y*=Math.sqrt(Qe),ee*=Math.sqrt(Qe)),Qe=(ae===ue?-1:1)*Math.sqrt((y*y*ee*ee-y*y*ne*ne-ee*ee*Ze*Ze)/(y*y*ne*ne+ee*ee*Ze*Ze)),isNaN(Qe)&&(Qe=0),ae=Qe*y*ne/ee,Qe=Qe*-ee*Ze/y,isNaN(ae)&&(ae=0),isNaN(Qe)&&(Qe=0),x=(x+ge)/2+Me*ae-ze*Qe,b=(b+ye)/2+ze*ae+Me*Qe,ye=E(1,0,(Ze-ae)/y,(ne-Qe)/ee),Me=(Ze-ae)/y,ge=(ne-Qe)/ee,Ze=(-Ze-ae)/y,ae=(-ne-Qe)/ee,ne=E(Me,ge,Ze,ae),Ze=(Me*Ze+ge*ae)/(Math.sqrt(Me*Me+ge*ge)*Math.sqrt(Ze*Ze+ae*ae)),-1>=Ze?ne=Math.PI:1<=Ze&&(ne=0),!ue&&0<ne&&(ne-=2*Math.PI),ue&&0>ne&&(ne+=2*Math.PI),ue=y>ee?1:y/ee,Ze=y>ee?ee/y:1,y=zt.jx(0,0,y>ee?y:ee,ye,ye+ne,!0),ee=Cr.alloc(),ee.reset(),ee.translate(x,b),ee.rotate(a.Ne,0,0),ee.scale(ue,Ze),bn.Ha(y,ee),Cr.free(ee),a.ae=y,a.ae}rn.Object.defineProperties(vi.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&&Ut(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Ut(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Ut(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Ut(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Ut(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Ut(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Ut(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Ut(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Ut(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Dn(a,">= zero",vi,"radiusX"),this._isFrozen&&Ut(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Dn(a,">= zero",vi,"radiusY"),this._isFrozen&&Ut(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Ut(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&&Ut(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&&Ut(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&&Ut(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&&Ut(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),vi.prototype.equalsApprox=vi.prototype.Xa;var Fo=new Yt(vi,"Move",0),Ui=new Yt(vi,"Line",1),Go=new Yt(vi,"Bezier",2),ps=new Yt(vi,"QuadraticBezier",3),xo=new Yt(vi,"Arc",4),Cs=new Yt(vi,"SvgArc",4);vi.className="PathSegment",vi.Move=Fo,vi.Line=Ui,vi.Bezier=Go,vi.QuadraticBezier=ps,vi.Arc=xo,vi.SvgArc=Cs;function ma(){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}ma.prototype.copy=function(){var a=new ma;return this.clone(a)},ma.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},ma.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},ma.prototype.So=function(a,y){var x=this.diagram;return x===null||bp(x,a,y),y},ma.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(bp(x,a,y),y.assign(x.Ps(y))),y},rn.Object.defineProperties(ma.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}}}),ma.prototype.getMultiTouchDocumentPoint=ma.prototype.Bz,ma.prototype.getMultiTouchViewPoint=ma.prototype.So,ma.className="InputEvent";function hu(){this.H=null,this.xa="",this.ar=this.Lr=null}hu.prototype.copy=function(){var a=new hu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},hu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},rn.Object.defineProperties(hu.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}}}),hu.className="DiagramEvent";function ao(){this.Fm=ro,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}ao.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},ao.prototype.copy=function(){var a=new ao;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=Qt(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Qt(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Qt(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Qt(y)&&typeof y.J=="function"?y.J():y,a},ao.prototype.qb=function(a){a.classType===ao&&(this.change=a)},ao.prototype.toString=function(){var a="";return a=this.change===Ea?a+"* ":this.change===ro?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},ao.prototype.I=function(a){return a?this.oldValue:this.newValue},ao.prototype.Dz=function(a){return a?this.oldParam:this.newParam},ao.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},ao.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},ao.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},ao.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},rn.Object.defineProperties(ao.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}}}),ao.prototype.redo=ao.prototype.redo,ao.prototype.canRedo=ao.prototype.canRedo,ao.prototype.undo=ao.prototype.undo,ao.prototype.canUndo=ao.prototype.canUndo,ao.prototype.getParam=ao.prototype.Dz,ao.prototype.getValue=ao.prototype.I,ao.prototype.clear=ao.prototype.clear;var Ea=new Yt(ao,"Transaction",-1),ro=new Yt(ao,"Property",0),wo=new Yt(ao,"Insert",1),Eo=new Yt(ao,"Remove",2);ao.className="ChangedEvent",ao.Transaction=Ea,ao.Property=ro,ao.Insert=wo,ao.Remove=Eo;function Uo(){this.o=new on().freeze(),this.xa="",this.j=!1}Uo.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},Uo.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()},Uo.prototype.canUndo=function(){return this.isComplete},Uo.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()}},Uo.prototype.canRedo=function(){return this.isComplete},Uo.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()}},Uo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Vt,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===ro&&b.object){var E=y.get(b.object);E||(E=new Vt,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()}},rn.Object.defineProperties(Uo.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}}}),Uo.prototype.optimize=Uo.prototype.ak,Uo.prototype.redo=Uo.prototype.redo,Uo.prototype.canRedo=Uo.prototype.canRedo,Uo.prototype.undo=Uo.prototype.undo,Uo.prototype.canUndo=Uo.prototype.canUndo,Uo.prototype.clear=Uo.prototype.clear,Uo.className="Transaction";function ho(){this.Pt=new un,this.Jd=!1,this.u=new on().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new on().freeze(),this.hl=new on,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},et=ho.prototype,et.Xw=function(a){this.Pt.add(a)},et.Rx=function(a){this.Pt.remove(a)},et.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},et.eb=function(a){return a===void 0&&(a=""),Du(this,!0,a)},et.Kf=function(){return Du(this,!1,"")};function Du(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Tn("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}et.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){Tn("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){Tn("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 ao;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 Uo);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||Tn("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},rn.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 di(){gr(this),this.H=gu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new ma,this.Zr=-1}di.prototype.toString=function(){return this.name!==""?this.name+" Tool":$n(this.constructor)},di.prototype.updateAdornments=function(){},di.prototype.canStart=function(){return this.isEnabled},di.prototype.doStart=function(){},di.prototype.doActivate=function(){this.isActive=!0},di.prototype.doDeactivate=function(){this.isActive=!1},di.prototype.doStop=function(){},di.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},di.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},di.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},di.prototype.doMouseMove=function(){},di.prototype.doMouseUp=function(){this.stopTool()},di.prototype.doMouseWheel=function(){},di.prototype.canStartMultiTouch=function(){return!0},di.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)},di.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)},di.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},di.prototype.doKeyUp=function(){},di.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},di.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},di.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(xi?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||(xi?y.meta:y.control)||y.shift||a.clearSelection()}},di.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)}}}di.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}},di.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},di.prototype.doCurrentObjectChanged=function(){},di.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===cu&&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===cu&&!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)}}},di.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},di.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Rr(function(){x.doWaitAfter(b)},a)},di.prototype.cancelWaitAfter=function(){this.Zr!==-1&&ln.clearTimeout(this.Zr),this.Zr=-1},di.prototype.doWaitAfter=function(){},di.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof yi);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},di.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},rn.Object.defineProperties(di.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Kt&&(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}}}),di.prototype.startTransaction=di.prototype.Ea,di.className="Tool";function $i(){di.call(this),this.name="ToolManager",this.hb=new on,this.ob=new on,this.Hb=new on,this.F=this.V=850,this.o=new fn(2,2).ja(),this.Ha=5e3,this.ia=cu,this.u=_h,this.Mp=this.j=null,this.zj=-1}Ht($i,di),$i.prototype.initializeStandardTools=function(){},$i.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof yi&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},$i.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Ol&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Bu){y.bubbles=!0;return}if(this.gestureBehavior===Ol)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===cu?this.mouseWheelBehavior=ih:this.mouseWheelBehavior===ih&&(this.mouseWheelBehavior=cu)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},$i.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Bu){y.bubbles=!0;return}if(this.gestureBehavior===Ol)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)}$i.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof yi&&(y===a||y.rg(a))||this.hideToolTip()},$i.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()))},$i.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)},$i.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 yi)||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()},$i.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof yi){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 $l&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(ln.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Rr(function(){E.hideToolTip()},a)}},$i.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}},$i.prototype.hideToolTip=function(){this.zj!==-1&&(ln.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof yi?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof $l&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},$i.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()},$i.prototype.doMouseWheel=function(){this.standardMouseWheel()},$i.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},$i.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},$i.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},$i.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},$i.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)},rn.Object.defineProperties($i.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 yi?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}}}),$i.prototype.replaceStandardTool=$i.prototype.gb;var cu=new Yt($i,"WheelScroll",0),ih=new Yt($i,"WheelZoom",1),Ec=new Yt($i,"WheelNone",2),_h=new Yt($i,"GestureZoom",3),Ol=new Yt($i,"GestureCancel",4),Bu=new Yt($i,"GestureNone",5);$i.className="ToolManager",$i.WheelScroll=cu,$i.WheelZoom=ih,$i.WheelNone=Ec,$i.GestureZoom=_h,$i.GestureCancel=Ol,$i.GestureNone=Bu;function uo(){di.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 un().freeze(),this.ia=new he,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var al;Ht(uo,di),uo.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},uo.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},uo.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,(xi?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},uo.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),la=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&&os(a),pd(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,la=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 En?(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 Bs,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}uo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},uo.prototype.Pd=function(a){return a===void 0?new Gu(On):this.isGridSnapEnabled?new Gu(new st(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Gu(a.copy())},uo.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Yl(this),$h(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<al.count){for(var y=al,x=y.length,b=0;b<x;b++){var E=y.M(b);so(E),Vi(E),Yl(E),E.diagram.ug()}y.clear()}so(this),this.tl.h(NaN,NaN),oh!==null&&(oh.currentCursor=""),la=oh=null,Vi(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),bf(a,!0)},uo.prototype.stopTransaction=function(){var a=this.diagram,y=di.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Yl(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,fu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function kc(){var a=la;Vi(a),Fa(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}uo.prototype.doCancel=function(){Vi(this),Fa(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},uo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},uo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Jl(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 Vt,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 En&&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 Vi(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 En&&(x.value.point=new st(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function so(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 Xo(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&&(os(b),b.hk())}uo.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 En&&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),sl(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=fu(a,E,b),!a.isActive&&la===null)return;var ae=b!==null?b.part:null;if(ae===null||x.handlesDragDropForTopLevelParts&&ae.isTopLevel&&!(ae instanceof Or)){var ue=x.mouseDragOver;ue!==null&&(ue(E),ne=!0)}if(!a.isActive&&la===null||(a.doDragOver(y,b),!a.isActive&&la===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)}uo.prototype.findDragOverObject=function(a){var y=this;return mu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof yi||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},uo.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 fu(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&&la===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=Ql(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 Ql(a){var y=a.panel;return y!==null?y:a instanceof Sr&&!(a instanceof Or)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function du(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(Gr,a);ue=y.Bf(ue),ue<ee&&(ne=ae,ee=ue)}}return st.free(a),ne}function sl(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=du(a,x.i(0),!1),ee!==null&&(ne=ee.part));var ae=null,ue=null;x.toNode===null&&(ae=du(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)}}}}uo.prototype.doDragOver=function(){};function Fl(a,y){var x=a.diagram;a.dragsLink&&sl(a,!0),Yl(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=Ql(ee)}}else ee=x.mouseDrop,ee!==null&&ee(E);if(a.isActive||la!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)ee=E.key,ee instanceof Wn&&ee.linksConnected.each(function(ae){ae.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||la!==null){for(a=Xt.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Wn&&$v(x,b,a);Xt.free(a)}}}function Qv(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Or||(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 En},!0,function(E){return E instanceof En},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}uo.prototype.doDropOnto=function(){},uo.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()?(Jl(this,!1),pd(a,this.copiedParts),Xo(this,this.copiedParts,!1),$h(a,this.copiedParts)):this.mayMove()?(Vi(this),Xo(this,this.draggedParts,!0)):this.mayDragOut()?(Jl(this,!1),Xo(this,this.copiedParts,!1)):Vi(this),ka(this,a.lastInput.documentPoint))}},uo.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?(Vi(this),Jl(this,!0),pd(a,this.copiedParts),Xo(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,Vi(this),this.mayMove()&&(Xo(this,this.draggedParts,!0),ka(this,a.lastInput.documentPoint))),this.Ym=!0,Fl(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)}}},uo.prototype.simulatedMouseMove=function(a,y,x){if(la===null)return!1;var b=la.diagram;x instanceof Kt||(x=null);var E=oh;return x!==E&&(E!==null&&E!==b&&(E.ug(),la.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&&(al.contains(E)||al.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)},uo.prototype.simulatedMouseUp=function(a,y,x){if(la===null)return!1;var b=oh,E=la.diagram;if(x===null)return la.doCancel(),!0;if(x!==b){var ee=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&ee!==null)return b.ug(),la.isDragOutStarted=!1,ee.doSimulatedDragLeave(),!1;oh=x,b=x.toolManager.findTool("Dragging"),b!==null&&(kc(),al.contains(b)||al.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=la,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 Wn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}uo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(xi?!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())},uo.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())},uo.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())},uo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},uo.prototype.Az=function(){return la},uo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=la;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},uo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Zs(a),a.animationManager.Cc(),a=la,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},uo.prototype.doSimulatedDragLeave=function(){var a=la;a!==null&&a.doSimulatedDragOut(),this.doCancel()},uo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=la;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Ig(this,y.draggedParts.Lf(),!1,a.firstInput),Xo(this,this.copiedParts,!1),ka(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},uo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=la;if(y!==null){var x=y.diagram;if(y.Ym=!0,Vi(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Ig(this,y.draggedParts.Lf(),!0,a.lastInput),Xo(this,this.copiedParts,!1);var b=new un;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Fl(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 Ig(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=Xt.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,Xt.free(ee),ee=a.Fr,ne=new Vt,ae=st.alloc(),ue=y.iterator;ue.next();)ge=ue.value,ge instanceof En&&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)}}}uo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},uo.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new st},rn.Object.defineProperties(uo.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}}}),uo.prototype.getDraggingSource=uo.prototype.Az;var la=null,oh=null;uo.className="DraggingTool",al=new on,Pn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),$i.prototype.doCancel=function(){la!==null&&la.doCancel(),di.prototype.doCancel.call(this)};function yo(){di.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new En,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 Wn,y=new Ur,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Dr,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Wn,y=new Ur,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Dr,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 Vt,this.Of=this.gj=this.Pf=null}Ht(yo,di),yo.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},yo.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var ee=y.Df(),ne=fn.alloc();ne.width=y.naturalBounds.width*ee,ne.height=y.naturalBounds.height*ee,b.desiredSize=ne,fn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Gr,ee=st.alloc(),x.location=y.ga(Gr,ee),st.free(ee),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},yo.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Dr,y.fromSpot=_r,y.toSpot=_r),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},yo.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},yo.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Wn){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)}},yo.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Wn))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Wn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},yo.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(Me){return E.findValidLinkablePort(Me,a)},null,!0);for(b=1/0,y=null,ee=ee.iterator;ee.next();){var ne=ee.value,ae=ne.part;if(ae instanceof Wn){var ue=ne.ga(Gr,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 Wn&&(x.layer===null||x.layer.allowLink))?y:null},yo.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},yo.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},yo.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},yo.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Wn))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Wn))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},yo.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)},yo.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 un;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))))}yo.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===Ip){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!Ha(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!Ha(this,a,y,x,!0)}if(b===Dp)return a===y?a=!0:(b=new un,b.add(y),a=Wa(this,b,a,y,x)),!a;if(b===Bp)return!Ha(this,a,y,x,!1);if(b===Rp)return a===y?a=!0:(b=new un,b.add(y),a=Tc(this,b,a,y,x)),!a}return!0};function Ha(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&&Ha(a,ne,x,b,E)))return!0}return!1}function Wa(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&&Wa(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}rn.Object.defineProperties(yo.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}}}),yo.className="LinkingBaseTool";function Va(){yo.call(this),this.name="Linking",this.V={},this.F=null,this.K=Gh,this.Xd=null}Ht(Va,yo),Va.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},Va.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 Wn)))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},Va.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 Wn&&(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 Wn&&(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)},Va.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()},Va.prototype.doStop=function(){yo.prototype.doStop.call(this),this.startObject=null},Va.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 Wn&&(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)}}},Va.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof En)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)},Va.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Va.prototype.doNoLink=function(){},rn.Object.defineProperties(Va.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 Yt(Va,"Either",0),_g=new Yt(Va,"ForwardsOnly",0),zg=new Yt(Va,"BackwardsOnly",0);Va.className="LinkingTool",Va.Either=Gh,Va.ForwardsOnly=_g,Va.BackwardsOnly=zg;function Bs(){yo.call(this),this.name="Relinking";var a=new Ur;a.figure="Diamond",a.desiredSize=Ir,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Ur,a.figure="Diamond",a.desiredSize=Ir,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Xt}Ht(Bs,yo),Bs.prototype.updateAdornments=function(a){if(a!==null&&a instanceof En){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)}},Bs.prototype.makeAdornment=function(a,y){var x=new yi;return x.type=Sn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Bs.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},Bs.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 yi&&x.adornedPart instanceof En))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=Ar),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Ar),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},Bs.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Id||x===Eh)&&(x=$a),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}},Bs.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()},Bs.prototype.doStop=function(){yo.prototype.doStop.call(this),this.handle=null},Bs.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 Wn&&(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()}}},Bs.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},Bs.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)}rn.Object.defineProperties(Bs.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 yi))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Bs.className="RelinkingTool",Pn("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Pn("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function ko(){di.call(this),this.name="LinkReshaping";var a=new Ur;a.figure="Rectangle",a.desiredSize=fi,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Ur,a.figure="Diamond",a.desiredSize=Ir,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 on}Ht(ko,di),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 En){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 yi,E.type=Sn.Link,x=y.firstPickIndex;var ee=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==Gs)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);zt.B(ue.x,ge.x)&&zt.B(ue.y,ge.y)&&(ge=y.i(x-1)),zt.B(ue.x,ge.x)?(this.om(ae,lh),ae.cursor="n-resize"):zt.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),zt.B(ue.x,ge.x)&&zt.B(ue.y,ge.y)&&(ue=y.i(ee+1)),zt.B(ue.x,ge.x)?(this.om(ae,lh),ae.cursor="n-resize"):zt.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 En){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=di.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(Gr)},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(),zt.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);zt.B(ee.x,E.x)&&zt.B(E.y,ne.y)?(zt.B(ee.x,y.i(b-2).x)&&!zt.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),zt.B(ne.y,y.i(b+2).y)&&!zt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):zt.B(ee.y,E.y)&&zt.B(E.x,ne.x)?(zt.B(ee.y,y.i(b-2).y)&&!zt.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),zt.B(ne.x,y.i(b+2).x)&&!zt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):zt.B(ee.x,E.x)&&zt.B(E.x,ne.x)?(zt.B(ee.x,y.i(b-2).x)&&!zt.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),zt.B(ne.x,y.i(b+2).x)&&!zt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):zt.B(ee.y,E.y)&&zt.B(E.y,ne.y)&&(zt.B(ee.y,y.i(b-2).y)&&!zt.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),zt.B(ne.y,y.i(b+2).y)&&!zt.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(Gr,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(Gr,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)}},rn.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 yi))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 Yt(ko,"None",0),sh=new Yt(ko,"Horizontal",1),lh=new Yt(ko,"Vertical",2),td=new Yt(ko,"All",3);ko.className="LinkReshapingTool",ko.None=lp,ko.Horizontal=sh,ko.Vertical=lh,ko.All=td,Pn("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Pa(){di.call(this),this.name="Resizing",this.o=new fn(1,1).freeze(),this.j=new fn(9999,9999).freeze(),this.yg=new fn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Ur;a.alignmentFocus=Gr,a.figure="Rectangle",a.desiredSize=fi,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 fn,this.Tn=new st,this.rt=new fn(0,0),this.qt=new fn(1/0,1/0),this.pt=new fn(1,1)}Ht(Pa,di),Pa.prototype.updateAdornments=function(a){if(!(a===null||a instanceof En)){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)}},Pa.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new yi,y.type=Sn.Spot,y.locationSpot=Gr;var x=new Qa;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,ni)),y.add(this.makeHandle(a,Ai)),y.add(this.makeHandle(a,Ri)),y.add(this.makeHandle(a,zo)),y.add(this.makeHandle(a,Ca)),y.add(this.makeHandle(a,aa)),y.add(this.makeHandle(a,ga)),y.add(this.makeHandle(a,Oa))}else if(dl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Pa.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Pa.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=Gr),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 Sn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Pa.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},Pa.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))},Pa.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Pa.prototype.stopTransaction=function(){var a=this.diagram,y=di.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Pa.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Pa.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)}},Pa.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()},Pa.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 Or){var b=new on;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()}},Pa.prototype.computeResize=function(a,y,x,b,E,ee){y.Mc()&&(y=Gr);var ne=this.adornedObject.naturalBounds,ae=ne.x,ue=ne.y,ge=ne.x+ne.width,ye=ne.y+ne.height,Me=1;if(!ee){Me=ne.width;var ze=ne.height;0>=Me&&(Me=1),0>=ze&&(ze=1),Me=ze/Me}return ze=st.alloc(),zt.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(Me*a.width,b.height),x.height),a.width=a.height/Me):(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*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(Me*a.width,b.height),x.height),a.width=a.height/Me):(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*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(Me*a.width,b.height),x.height),a.width=a.height/Me,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(Me*a.width,b.height),x.height),a.width=a.height/Me):(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*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(Me*a.width,b.height),x.height),a.width=a.height/Me):(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*a.width))):(a.width=Math.max(Math.min(ze.x-ae,b.width),x.width),ee||(a.height=Math.max(Math.min(Me*a.width,b.height),x.height),a.width=a.height/Me,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/Me,b.width),x.width),a.height=Me*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/Me,b.width),x.width),a.height=Me*a.width,a.x=ae+.5*(ge-ae-a.width))),st.free(ze),a},Pa.prototype.computeReshape=function(){var a=gn;return this.adornedObject instanceof Ur&&(a=E0(this.adornedObject)),!(a===lr||this.diagram.lastInput.shift)},Pa.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},Pa.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},Pa.prototype.computeCellSize=function(){var a=new fn(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},rn.Object.defineProperties(Pa.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 yi))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 yi)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}}}),Pa.className="ResizingTool",Pn("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ka(){di.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=Ir,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}Ht(Ka,di),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 yi,y.type=Sn.Position,y.locationSpot=Gr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(dl(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(Gr)},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=di.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},rn.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 yi))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 yi)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",Pn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Uh(){di.call(this),this.name="ClickSelecting"}Ht(Uh,di),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 ll(){di.call(this),this.name="Action",this.pk=null}Ht(ll,di),ll.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},ll.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()},ll.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))}},ll.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()},ll.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())},ll.prototype.doStop=function(){this.pk=null},ll.className="ActionTool";function uh(){di.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new st(0,0)}Ht(uh,di),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()&&(dl(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);Qt(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},rn.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 Vs(){di.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}Ht(Vs,di),Vs.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))},Vs.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Vs.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Vs.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=fn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),fn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Vs.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()},Vs.prototype.computeBoxBounds=function(){var a=this.diagram;return new Xt(a.firstInput.documentPoint,a.lastInput.documentPoint)},Vs.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),xi?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 on,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)}},rn.Object.defineProperties(Vs.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}}}),Vs.className="DragSelectingTool";function va(){di.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(ln.document,"scroll",a.Kw,!1),a.stopTool()}}Ht(va,di),va.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())},va.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(ln.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},va.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},va.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},va.prototype.doMouseMove=function(){this.move()},va.prototype.doMouseUp=function(){this.move(),this.stopTool()},va.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)}},rn.Object.defineProperties(va.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),va.className="PanningTool",Pn("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Pn("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Pn("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Pn("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Pn("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function $l(){this.F=this.u=this.j=this.o=null}rn.Object.defineProperties($l.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}}}),$l.className="HTMLInfo";function ul(a,y,x){this.text=a,this.hx=y,this.visible=x}ul.className="ContextMenuButtonInfo";function Za(){di.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()}}Ht(Za,di);function xl(a){var y=new $l;y.show=function(E,ee,ne){ne.showDefaultContextMenu()},y.hide=function(E,ee){ee.hideDefaultContextMenu()},Hh=y,a.tu=function(){a.stopTool()},y=Hn("div");var x=Hn("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=Hn("style");ln.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",ln.document.body&&(ln.document.body.appendChild(y),ln.document.body.appendChild(x)),cf=y,Mc=x,hf=!0}function To(a){return a.preventDefault(),!1}Za.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)},Za.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Za.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Za.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof Kt||(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},Za.prototype.doActivate=function(){},Za.prototype.doMouseDown=function(){if(di.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof yi){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Dl(this)},Za.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof yi){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Dl(this)};function Dl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof $l||(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())}Za.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 yi&&!a.currentContextMenu.visible&&a.stopTool()}}Za.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Za.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof yi){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 $l&&a.show(y,x,this);this.currentContextMenu=a},Za.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}},Za.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof yi?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof $l&&(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 on;return y.add(new ul("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new ul("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new ul("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new ul("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new ul("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new ul("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new ul("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new ul("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new ul("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new ul("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new ul("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new ul("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new ul("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Za.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=hh(this)),cf.innerHTML="",Mc.addEventListener("pointerdown",this.tu,!1);var y=this,x=Hn("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=Hn("li"),ee.className="goCXli";var ne=Hn("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",Mc.style.display="block"},Za.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Hh){cf.style.display="none",Mc.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Mc,"pointerdown",this.tu,!1),this.currentContextMenu=null}},rn.Object.defineProperties(Za.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof yi?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return hf===!1&&Hh===null&&po&&xl(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,Mc=null,cf=null;Za.className="ContextMenuTool",Pn("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function eo(){di.call(this),this.name="TextEditing",this.Zh=new Zi,this.ia=null,this.V=Lc,this.vj=null,this.qa=Nc,this.u=1,this.F=!0,this.o=null,this.j=new $l,this.kt=null,ff(this,this.j)}Ht(eo,di);function ff(a,y){if(po){var x=Hn("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 eo)if(ee.state===mf)x.style.border="3px solid red",x.focus();else{var ne=b.ga(Gr),ae=E.position,ue=E.scale,ge=b.Df()*ue;ge<ee.minimumEditorScale&&(ge=ee.minimumEditorScale);var ye=b.naturalBounds.width*ge+6,Me=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,Me=ae.y*Me-ae.y*ue+ae.offsetY-(.5*Me-.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+Me|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)}}}eo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||ch&&ch!==this&&(ch.acceptText(ql),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===Lc&&!y.isSelected||this.starting===id&&2>a.lastInput.clickCount)):!1},eo.prototype.doStart=function(){ch=this,this.textBlock!==null&&this.doActivate()},eo.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 Xt(this.textBlock.ga(ni),this.textBlock.ga(Ri));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},eo.prototype.doCancel=function(){this.stopTool()},eo.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},eo.prototype.doMouseDown=function(){this.isActive&&this.acceptText(ql)},eo.prototype.acceptText=function(a){switch(a){case ql: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))}}eo.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)},eo.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},eo.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)},eo.prototype.doStop=function(){ch=null},eo.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)))},eo.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},rn.Object.defineProperties(eo.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)}}}),eo.prototype.measureTemporaryTextBlock=eo.prototype.Lx;var nd=new Yt(eo,"LostFocus",0),ql=new Yt(eo,"MouseDown",1),rd=new Yt(eo,"Tab",2),df=new Yt(eo,"Enter",3),e0=new Yt(eo,"SingleClick",0),Lc=new Yt(eo,"SingleClickSelected",1),id=new Yt(eo,"DoubleClick",2),Nc=new Yt(eo,"StateNone",0),pf=new Yt(eo,"StateActive",1),gf=new Yt(eo,"StateEditing",2),hp=new Yt(eo,"StateValidating",3),mf=new Yt(eo,"StateInvalid",4),Ac=new Yt(eo,"StateValidated",5),ch=null;eo.className="TextEditingTool",eo.LostFocus=nd,eo.MouseDown=ql,eo.Tab=rd,eo.Enter=df,eo.SingleClick=e0,eo.SingleClickSelected=Lc,eo.DoubleClick=id,eo.StateNone=Nc,eo.StateActive=pf,eo.StateEditing=gf,eo.StateValidating=hp,eo.StateInvalid=mf,eo.StateValidated=Ac,Pn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Es(a){yf||(cp(),yf=!0),this.H=gu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=_u,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new un,this.ce=new ya,this.ce.Yd=this,this.Ei=new un,this.pu=new un,this.Sr=new un,this.pr=new un,a&&Object.assign(this,a)}Es.prototype.Xe=function(a){this.H=a},Es.prototype.canStart=function(){return!0};function pu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Sa(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===_u?(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),ln.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&os(x),vp(x),a.zb=!1,y.start(),y.bc&&(fh(a),x.Ya(),dp(y,0),Zs(x,!0),Wh(a),x.R("AnimationStarting",a)))}))}}function Iu(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function ad(a,y,x,b){a.isTicking||Iu(a)||y instanceof En&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}et=Es.prototype,et.fv=function(a){return this.ce.fv(a)},et.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 Kt){ae=!0;break e}}ae=!1}ae?wf(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(fh(E),Zs(E.H),Wh(E)),ln.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),ln.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}et.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)},et.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))},et.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),gs(this,a))},et.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),gs(this,a))};function Ug(a,y,x){!a.zb||y.D(x)||Iu(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 gs(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Vh(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 Vt;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 Xt(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=Vh(b,E,ne,ae,ee)}),y.add("stroke",function(x,b,E,ee,ne,ae){x.stroke=Vh(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=Vh(b,E,ne,ae,ee)}),y.add("areaBackground",function(x,b,E,ee,ne,ae){x.areaBackground=Vh(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}rn.Object.defineProperties(Es.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&&Dn(a,">= 1",Es,"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}}}),Es.prototype.stopAnimation=Es.prototype.Cc;var vf=null,yf=!1,_u=new Yt(Es,"Default",1),Sf=new Yt(Es,"AnimateLocations",2),fp=new Yt(Es,"None",3);Es.className="AnimationManager",Es.defineAnimationEffect=function(a,y){yf||(cp(),yf=!0),vf.add(a,y)},Es.Default=_u,Es.AnimateLocations=Sf,Es.None=fp;function ya(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=On,this.vc=new Vt,this.Tt=new Vt,this.yl=new un,this.Ut=new un,this.dw=mh,a&&Object.assign(this,a)}ya.prototype.suspend=function(){this.Xk=!0},ya.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),Zs(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}et=ya.prototype,et.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 Kt?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===_u&&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=Mf),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)},et.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},et.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof Kt?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 Kt&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Hu(b),s0(),b=[zs.j,zs.u,zs.o,zs.F],Hu(E),s0(),E=[zs.j,zs.u,zs.o,zs.F]),ne.contains(y)){var ae=ne.I(y),ue=ae.start,ge=ae.end;ue[x]===void 0&&(ue[x]=Kh(b)),ge[x]=Kh(E)}else ue={},ge={},ue[x]=Kh(b),ge[x]=Kh(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=Kh(y.location):ee&&(ae.Ku[x]=Kh(b))}function Kh(a){return a instanceof st||a instanceof fn?a.copy():a}et.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},et.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),Zs(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)}}}et.stop=function(){return this.bc?(this.Ml(!0),this):this},et.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,Me;for(Me in ge)if(ee.get(Me)!==null){var ze=Me;!ae.Hu||ze!=="position:nodeCollapse"&&ze!=="position:placeholder"||(ze="position"),ee.get(ze)(ne,ue[Me],ye[Me]!==void 0?ye[Me]:ae.Hu?ue[Me]:ge[Me],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(),Zs(y,!0),x.defaultAnimation===this){for(Me=x.pr.iterator;Me.next();)E=Me.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Zs(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())}},et.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Or&&(b=y.placeholder),b!==null?(x=b.ga(ni),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 Or)for(a=a.memberParts;a.next();)b=a.value,b instanceof Wn&&this.Cj(b,y)},et.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Or&&(x=y.placeholder),x!==null){var b=x.ga(ni);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 Or)for(a=a.memberParts;a.next();)b=a.value,b instanceof Wn&&this.Aj(b,y)}},et.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},rn.Object.defineProperties(ya.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Dn(a,">= 1",ya,"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:Ot("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}}}),ya.prototype.getTemporaryState=ya.prototype.Ez,ya.prototype.stop=ya.prototype.stop,ya.prototype.add=ya.prototype.add,ya.prototype.addTemporaryPart=ya.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}ya.className="Animation",ya.EaseLinear=function(a,y,x,b){return x*a/b+y},ya.EaseInOutQuad=jc,ya.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},ya.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},ya.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},ya.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 wl(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))}wl.prototype.copy=function(){var a=new wl(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))}rn.Object.defineProperties(wl.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 Yt(wl,"Default",1),Xh=new Yt(wl,"Immediate",2),Oc=new Yt(wl,"Bundled",3);wl.className="AnimationTrigger",wl.Default=pp,wl.Immediate=Xh,wl.Bundled=Oc;function ra(a){gr(this),this.H=null,this.Pa=new on,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)}et=ra.prototype,et.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,La(x)}a.clear(),this.Zq.length=0},et.Xe=function(a){this.H=a},et.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 Or?E++:ue instanceof Wn?b++:ue instanceof En?ee++:ue instanceof yi?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&&Yr(b)&&(ae+=" #"+Yr(b)),x instanceof Wn?ae+=" "+Fr(b):x instanceof En&&(ae+=" "+Fr(x.fromNode)+" "+Fr(x.toNode));return y+" "+this.Pa.count+": "+ae},et.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),Mn(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},et.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof on||b instanceof un||(b=new un),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),Mn(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},et.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 on||E instanceof un||(E=new un),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},et.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},et.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 on||E instanceof un)&&(ee=E),E=!0),ee instanceof on||ee instanceof un||(ee=new un),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 Me=ge[ye];if((ne!==!0||ic(Me)!==!1)&&Me.isVisible()){ae.assign(a),Mn(ae,Me.oe),ue.h(a.x+y,a.y),Mn(ue,Me.oe);var ze=Me;Me.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},et.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Un();for(var E=Un(),ee=0;ee<b;ee++){var ne=x[ee];if(ne.vw=ee,ne instanceof En){if(ne.fd===!1)continue}else if(ne instanceof yi&&ne.adornedPart!==null)continue;var ae=ne.actualBounds;ne.isVisible()&&_i(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]);Rn(a),Rn(E)}}};function zu(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}et.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=zu(this,a);var ee=this.Zq;ee.length=0;for(var ne=y.scale,ae=Xt.alloc(),ue=0;ue<b;ue++)this.Oj(a,x[ue],y,ee,ne,ae,!0);if(Xt.free(ae),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Vg(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=zu(a,y),ae=a.Zq;ae.length=0;for(var ue=x.scale,ge=Xt.alloc(),ye=0;ye<ee;ye++){var Me=E[ye];b.contains(Me)&&a.Oj(y,Me,x,ae,ue,ge,!1)}Xt.free(ge),y.globalAlpha=ne}}}et.Oj=function(a,y,x,b,E,ee,ne){if(ne&&!ic(y))a.Hs(y);else{if(b!==null&&y instanceof En&&(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 ks?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&&(mo(y,a,y.areaBackground,!0,!0,ee,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(mo(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),mo(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))}},et.g=function(a,y,x,b,E){var ee=this.diagram;ee!==null&&ee.cb(ro,a,this,y,x,b,E)},et.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&La(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},et.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,La(y),a};function ud(a,y,x){if(y=Kg(a,y,x),x instanceof Or&&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 Kg(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}rn.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===""&&Ot("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Ot("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)&&Dn(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 Kt(a,y){if(am||(Ta(),am=!0),gr(this),gu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,po){var x=this,b=function(){x.removeEventListener(ln.document,"DOMContentLoaded",b,!1),x.setRTL()};ln.document.body!==null?this.setRTL():x.addEventListener(ln.document,"DOMContentLoaded",b,!1)}this.ol=null,xd.add("Model",Oi);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===ro&&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 lo,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"||ln.Element&&a instanceof Element?mp(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Yh,gu;function Zg(a){a.Yd=new Es,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new on,a.pj=new Vt,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 Cr,a.zu=new st(NaN,NaN).freeze(),a.ut=new Xt(NaN,NaN,NaN,NaN).freeze(),a.rj=new Wr(0,0,0,0).freeze(),a.sj=mh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ba,a.zk=Zo,a.Fg=Ba,a.pq=Zo,a.yt=ni,a.Bt=ni,a.Fc=!0,a.pn=!1,a.De=new un,a.Eh=new Vt,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Wr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new ma,a.bq.diagram=a,a.Qg=new ma,a.Qg.diagram=a,a.cj=new ma,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,n0(a),a.ai=new un,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 Vt,a.Xn=new on,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 Wr(5).freeze(),a.Hw=new un().freeze(),a.Nt=999999999,a.nw=new un().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 un,a.ow=new un,a.Xh=null,a.aw=new fn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new st,bounds:new Xt,Py:new fn,bA:new fn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Xt(NaN,NaN,NaN,NaN).freeze(),a.wo=new fn(NaN,NaN).freeze(),a.Sp=new Xt(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Vt;var y=new Wn,x=new Zi;x.bind(new Mo("text","",Fr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Wn,x=new Zi,x.stroke="brown",x.bind(new Mo("text","",Fr)),y.add(x),a.Lg.add("Comment",y),y=new Wn,y.selectable=!1,y.avoidable=!1,x=new Ur,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new fn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Vt,y=new Or,y.selectionObjectName="GROUPPANEL",y.type=Sn.Vertical,x=new Zi,x.font="bold 12pt sans-serif",x.bind(new Mo("text","",Fr)),y.add(x),x=new Sn(Sn.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 Qa,b.padding=new Wr(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Vt,y=new En,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 En,x=new Ur,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new yi,y.type=Sn.Auto,x=new Ur,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Qa,x.margin=new Wr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new yi,y.type=Sn.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 Oi,a.toolManager=new $i,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=Qn,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}Kt.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 un().freeze(),a.nw=new un().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(),zi=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),ee}function Xg(){return null}Kt.prototype.reset=function(){this.clear(),this.vb=!0,Zg(this),tu(this),this.Wg=!0,Yg(this),this.layout=new lo,this.Wg=!1,this.model=cy(),this.model.undoManager=new ho,this.vb=this.rn=!1,this.N()},Kt.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=ln.document.body);var y=Hn("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},Kt.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=ln.document.body);var y=0;if(po){var x=om;y=Yh,x===null&&(x=om=Hn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Yh=Hn("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||xi||(y=11)}this.Db=y,this.Gw=!0},Kt.prototype.qb=function(a){a.classType===Kt&&(this.autoScale=a)},Kt.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(po){if(y!=null||Ot("Diagram setup requires an argument DIV."),a.Ka!==null&&Ot("Diagram has already completed setup."),typeof y=="string"?a.Ka=ln.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Ot("No DIV or DIV id supplied: "+y),a.Ka===null&&Ot("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Ot("Invalid div id; div already has a Diagram associated with it."),!a.ol&&ln.ResizeObserver){var x=kn(function(){a.$b()},250);a.ol=new ln.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}ln.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=ln.go;var E=new fl(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",ln.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 fl(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,po){E=Hn("div");var ee=Hn("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=kn(function(){a.Yh=null,a.N()},300),a.Ov=kn(function(){vp(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var ae=Ks(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(),bl(ae,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Ks(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():bl(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=ln.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(),bl(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=ln.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 Kt&&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(),bl(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,Lf,y,y),b.Vc(!0),t0(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Kt.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Kt.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(ln,"resize",a.Ov,!1)}function os(a){30<a.Sq&&(a.Yh=1)}function bf(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),mi&&mi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Kt.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:ln.devicePixelRatio||1},Kt.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Kt.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Kt.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Kt.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Kt.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Kt.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Kt.prototype.doFocus=function(){this.focus()},Kt.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=ln.scrollX||ln.pageXOffset,y=ln.scrollY||ln.pageYOffset;this.ta.focus(),ln.scrollTo(a,y)}},Kt.prototype.Oy=function(){this.H.R("GainedFocus")},Kt.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 Sn(Sn.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):Ic(this.H)}function $g(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Ic(this.H)}Kt.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 Me=E.x;b=E.y;var ze=E.width,Ze=E.height,Qe=E.right,rt=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 xt=Tt;ze<ue||Ze<ge?(Tt=st.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==xt&&(Tt.x=xt/E+ne,this.ju=xt),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<Me&&(this.position=Tt.h(xt+ne,this.position.y)),ye>Qe&&(this.position=Tt.h(-(y.scrollWidth-this.Aa)+xt-this.Aa/E+ye,this.position.y))),a.vy&&this.allowVerticalScroll&&(ae<b&&(this.position=Tt.h(this.position.x,a.scrollTop+ae)),ee>rt&&(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,Qe=E.right,ee=b.bottom,rt=E.bottom,ne=b.x,Me=E.x,ae=b.y,b=E.y,ze>=ue&&ne>=Me&&ye<=Qe&&(x.style.width="1px"),Ze>=ge&&ae>=b&&ee<=rt&&(x.style.height="1px"))}},Kt.prototype.computeBounds=function(a){return a===void 0&&(a=new Xt),Sa(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}Kt.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 En||(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 En||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new Xt(NaN,NaN,0,0):x};function hl(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=Xt.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,Xt.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()?Gr:ue),Sp(a,a.documentBounds,E,ne,ae,y),y=a.scale,a.scale=ee,a.vb=!1,ee=a.viewportBounds,zt.B(ee.x,x)&&zt.B(ee.y,b)&&zt.B(ee.width,E)&&zt.B(ee.height,ne)||a.onViewportBoundsChanged(new Xt(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===Rs?(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}Kt.prototype.zoomToFit=function(){var a=this.sj;this.sj=mh,this.scale=Fc(this,Rs),a!==mh&&(hl(this,!1),Sp(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},et=Kt.prototype,et.BA=function(a,y){y===void 0&&(y=Rs);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Rs||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)}},et.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))},et.zz=function(a){if(a instanceof _t){this.eq=a;var y=st.alloc();this.fq=this.op(a.ga(ni,y)),st.free(y)}else this.eq=null,this.fq=Qn};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(ni,ge),ae=ge.x-a.fq.x/a.scale,ue=ge.y-a.fq.y/a.scale,E=_r,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),tu(a),st.free(ne)}et.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=mu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Sr)return a}else if(a=mu(this,a,function(x){return x.part}),a instanceof Sr)return a;return null},et.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Sa(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 mu(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),Sa(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}et.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 on||E instanceof un||(E=new un),Sa(a),a=a.Wa.iteratorBackwards;a.next();){var ee=a.value;ee.visible&&!ee.isTemporary&&ee.ji(y,x,b,E)}return E}et.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof on||b instanceof un||(b=new un),Sa(this);for(var E=this.Wa.iteratorBackwards;E.next();){var ee=E.value;ee.visible&&ee.ji(a,y,x,b)}return b},et.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)},et.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof on||E instanceof un||(E=new un),Sa(this);for(var ee=this.Wa.iteratorBackwards;ee.next();){var ne=ee.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},et.Nu=function(a,y,x,b,E,ee){var ne=new un;Sa(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 on||E instanceof un||(E=new un),Sa(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,ee,x,b,E)}return E}et.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)},et.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 on||E instanceof un)&&(ee=E),E=!0),ee instanceof on||ee instanceof un||(ee=new un),Sa(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 on||E instanceof un)&&(ee=E),E=!0),ee instanceof on||ee instanceof un||(ee=new un),Sa(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}Kt.prototype.acceptEvent=function(a){return Ks(this,a,a instanceof MouseEvent)};function Ks(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),xi&&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,xi&&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 bl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Kt.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Ks(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(),bl(x,a)},Kt.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ks(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(),bl(x,a)},Kt.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ks(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),bl(x,a)},Kt.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ks(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),bl(x,a)},Kt.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?Mn(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))}}Kt.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function qg(a){a.ld||Sa(a),a.Va()}Kt.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},et=Kt.prototype,et.Pz=function(){return this.kg},et.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Zs(this),this.hf=!1,this.du=new st(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Rr(function(){b.ld=!1,pu(y,"Model"),a(b)},1)},et.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;ln.requestAnimationFrame(function(){y.kg&&y.bd()})}},et.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Zs(this))};function Jh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Ic(a)||(y&&Sa(a),x&&hl(a,!1))}function Zs(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&&(eu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Sa(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,Sa(a),a.ou||qg(a),Jh(a,!0,!1),ne=!1,ee?(x=Xt.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),Xt.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)),hl(a,!0)),ee&&ne&&a.eb("Initial Layout"),Sa(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)}hl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),eu(a)}function Sa(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 un,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Or&&b.U&65536&&(b.U=b.U^65536)})}}et.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Or||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Or&&x.isVisible()&&Ef(this,x);for(a.reset();a.next();)x=a.value,x instanceof En&&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 yi&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function Ef(a,y){for(var x=Un(),b=Un(),E=y.memberParts;E.next();){var ee=E.value;ee.isVisible()&&(ee instanceof Or?(_s(ee)||Ya(ee)||rc(ee))&&Ef(a,ee):ee instanceof En?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(Rn(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();Rn(b)}et.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},et.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Ot("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Rc(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&&(Cr.prototype.Cd=Cr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(ee=this.animationManager,!ee.zb&&(!ee.isAnimating||ee.isTicking)&&(x=new Date,Rc(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&&(Cr.prototype.Cd=Cr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=mi&&mi.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&&Ot("No canvas specified"),ne===void 0&&(ne=null),ae===void 0&&(ae=null),ue===void 0&&(ue=!1),ge===void 0&&(ge=!1),Rc(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ye=a.Ca;a.Ca=E;var Me=a.Wa.s,ze=Me.length;try{var Ze=new Xt(ee.x,ee.y,b.width/E,b.height/E),Qe=Ze.copy();Qe.Co(x),eu(a,Qe),Sa(a),a.Fd(Me,ze,a,Ze),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 rt=a.Mb;y.scale(rt,rt);var Tt=Cr.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 ks&&Yy(y,Tt.m11,Tt.m12,Tt.m21,Tt.m22,Tt.dx,Tt.dy),Cr.free(Tt),ph(a,y),y.globalAlpha=a.pb;var xt=a.Qj("Grid");if(ne){var At=new un,Ft=ne.iterator;for(Ft.reset();Ft.next();){var Dt=Ft.value;Dt instanceof Sr&&(ge||Dt.layer!==xt)&&(Dt.Gj(),At.add(Dt))}for(ge=0;ge<ze;ge++)Vg(Me[ge],y,a,At,ue);At.each(function(Wt){return Wt.Gj()})}else for(At=0;At<ze;At++){var It=Me[At];It===xt?ge&&It.gc(y,a,!0):It.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(Me,ze,a,a.viewportBounds),eu(a),a.ib instanceof ks&&(a.ib.Nj.PA(),a.redraw())}}}et.Gf=function(a){return this.Rg[a]},et.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},et.Tx=function(){this.Rg=new ar,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(xi||si),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))}et.Ql=function(a){return this.on[a]},et.sA=function(a,y){this.on[a]=y},et.Sx=function(){this.on=new ar,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},et.set=function(a){return Object.assign(this,a),this},et.Du=function(a){return this.nm(a)},et.nm=function(a){return Bc(this,a),this};function Bc(a,y){var x=a instanceof Sn,b=a instanceof Kt,E;for(E in y){E===""&&Ot("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])),Qt(ee)?ne=E.substr(ae+1):Ot("Unable to find object named: "+ue+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!br(ee,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&br(a.toolManager,ne))ee=a.toolManager;else if(b&&nm(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof hr&&ne==="Changed"){a.Pe(y[ne]);continue}else Ot('Trying to set undefined property "'+ne+'" on object: '+ee.toString());ee[ne]=y[E],ne[0]==="_"&&ee instanceof _t&&ee.Vw(ne)}}et.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Vt,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},et.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")},Kt.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!==Mf&&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=Xt.alloc(),Ap(this,this.computeBounds(b)),Xt.free(b)),b=this.ta,b===null||b instanceof nu)))){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),Me=Math.max(y,0),ze=Math.floor(E-ye),Ze=Math.floor(ae-Me);a.drawImage(b.Oa,ye,Me,ze,Ze,0,0,ze,Ze),Hc(this.Yf,this)&&a.clearRect(0,0,ue,ge),b=Un(),a=Un(),Ze=Math.abs(ee),ze=Math.abs(y);var Qe=ye===0?0:E-Ze;ye=st.allocAt(Qe,0),Ze=st.allocAt(Ze+Qe,ae),a.push(new Xt(Math.min(ye.x,Ze.x),Math.min(ye.y,Ze.y),Math.abs(ye.x-Ze.x),Math.abs(ye.y-Ze.y)));var rt=this.Ab;if(rt.reset(),rt.scale(ne,ne),this.Ca!==1&&rt.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&rt.translate(-ne.x,-ne.y),Mn(ye,rt),Mn(Ze,rt),b.push(new Xt(Math.min(ye.x,Ze.x),Math.min(ye.y,Ze.y),Math.abs(ye.x-Ze.x),Math.abs(ye.y-Ze.y))),Qe=Me===0?0:ae-ze,ye.h(0,Qe),Ze.h(E,ze+Qe),a.push(new Xt(Math.min(ye.x,Ze.x),Math.min(ye.y,Ze.y),Math.abs(ye.x-Ze.x),Math.abs(ye.y-Ze.y))),Mn(ye,rt),Mn(Ze,rt),b.push(new Xt(Math.min(ye.x,Ze.x),Math.min(ye.y,Ze.y),Math.abs(ye.x-Ze.x),Math.abs(ye.y-Ze.y))),Hc(this.Yf,this)&&(E=0<ee?0:-ee,ae=0<y?0:-y,ye.h(E,ae),Ze.h(ue+E,ge+ae),a.push(new Xt(Math.min(ye.x,Ze.x),Math.min(ye.y,Ze.y),Math.abs(ye.x-Ze.x),Math.abs(ye.y-Ze.y))),Mn(ye,rt),Mn(Ze,rt),b.push(new Xt(Math.min(ye.x,Ze.x),Math.min(ye.y,Ze.y),Math.abs(ye.x-Ze.x),Math.abs(ye.y-Ze.y)))),st.free(ye),st.free(Ze),Jh(this,!1,!0),this.Ka===null&&Ot("No div specified"),this.ta===null&&Ot("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(Rc(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=zu(ne,E),Me=ne.Zq,Me.length=0,ye=this.scale,ze=Xt.alloc(),Ze=ne.Pa.s,rt=Ze.length,Qe=ue.length;for(var Tt=0;Tt<rt;Tt++){var xt=Ze[Tt],At=Jc(xt,xt.actualBounds);e:{for(var Ft=2/ye,Dt=4/ye,It=0;It<Qe;It++){var Wt=ue[It];if(Wt.width!==0&&Wt.height!==0&&At.Vu(Wt.x-Ft,Wt.y-Ft,Wt.width+Dt,Wt.height+Dt)){At=!0;break e}}At=!1}At&&ne.Oj(E,xt,this,Me,ye,ze,!0)}Xt.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()}Rn(b),Rn(a),this.ld=!1}}else this.bd();x&&(os(this),this.bd(),bf(this,!0))}else x?(os(this),this.bd(),bf(this,!0)):this.bd()}};function Rc(a){a.pn!==!1&&(a.pn=!1,Cp(a,a.Aa,a.ya))}function Cp(a,y,x){tu(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Ic(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 Me=ye.y,ze=ye.width,Ze=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,tu(a)),!a.hf||!a.viewportBounds.w())return!0;var Qe=a.ku,rt=a.hu;if(a.Ee=!1,!(ee||a.gf||a.Be||a.mn||a.nn))return!0;var Tt=a.documentBounds,xt=0,At=0,Ft=0,Dt=0,It=ye.width,Wt=ye.height,_n=a.rj;a.contentAlignment.sb()?(Tt.width>It&&(xt=_n.left,At=_n.right),Tt.height>Wt&&(Ft=_n.top,Dt=_n.bottom)):(xt=_n.left,At=_n.right,Ft=_n.top,Dt=_n.bottom);var rr=Tt.width+xt+At,Yn=Tt.height+Ft+Dt;_n=a.scale;var Cn=rr>ue/_n,dn=Yn>ge/_n;if(!(ee||a.gf||a.Be||Cn||dn))return!0;xt=Tt.x-xt,ue=ye.x,At=Tt.right+At,ge=ye.right+ne,Ft=Tt.y-Ft;var jr=ye.y;Tt=Tt.bottom+Dt,ye=ye.bottom+ae;var kr="1px";if(Dt="1px",a.scrollMode===mh&&(Cn||dn)&&(Cn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Cn=1,xt+1<ue&&(Cn=Math.max((ue-xt)*_n+a.Aa,Cn)),At>ge+1&&(Cn=Math.max((At-ge)*_n+a.Aa,Cn)),It+ne+1<rr&&(Cn=Math.max((rr-It)*_n+a.Aa,Cn)),kr=Cn.toString()+"px"),dn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Cn=1,Ft+1<jr&&(Cn=Math.max((jr-Ft)*_n+a.ya,Cn)),Tt>ye+1&&(Cn=Math.max((Tt-ye)*_n+a.ya,Cn)),Wt+ae+1<Yn&&(Cn=Math.max((Yn-Wt)*_n+a.ya,Cn)),Dt=Cn.toString()+"px")),Cn=kr!=="1px",dn=Dt!=="1px",Cn&&dn||!Cn&&!dn||(dn&&(ge-=a.Db),Cn&&(ye-=a.Db),rr<It+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,xt+1<ue&&(ne=Math.max((ue-xt)*_n+a.Aa,ne)),At>ge+1&&(ne=Math.max((At-ge)*_n+a.Aa,ne)),It+1<rr&&(ne=Math.max((rr-It)*_n+a.Aa,ne)),kr=ne.toString()+"px"),Cn=kr!=="1px",ne=a.ya,Cn!==a.Be&&(ne=Cn?a.ya-a.Db:a.ya+a.Db),Yn<Wt+ae||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ae=1,Ft+1<jr&&(ae=Math.max((jr-Ft)*_n+ne,ae)),Tt>ye+1&&(ae=Math.max((Tt-ye)*_n+ne,ae)),Wt+1<Yn&&(ae=Math.max((Yn-Wt)*_n+ne,ae)),Dt=ae.toString()+"px"),dn=Dt!=="1px"),a.qr&&Cn===a.Be&&dn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Cn!==a.Be&&(kr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),ee=!0),a.Be=Cn,rt.style.width=kr,dn!==a.gf&&(Dt==="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&&tu(a),a.gf=dn,rt.style.height=Dt,a.gu=!0,ee&&(a.pn=!0),y=Qe.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(It+1<rr?y=(a.position.x-xt)*_n:xt+1<ue?y=Qe.scrollWidth-Qe.clientWidth:At>ge+1&&(y=a.position.x*_n)),a.tn)switch(a.bu){case"negative":y=-(Qe.scrollWidth-y-Qe.clientWidth);break;case"reverse":y=Qe.scrollWidth-y-Qe.clientWidth}return Qe.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Wt+1<Yn?Qe.scrollTop=(a.position.y-Ft)*_n:Ft+1<jr?Qe.scrollTop=Qe.scrollHeight-Qe.clientHeight:Tt>ye+1&&(Qe.scrollTop=a.position.y*_n)),ue=a.Aa,ge=a.ya,Qe.style.width=ue+(a.gf?a.Db:0)+"px",Qe.style.height=ge+(a.Be?a.Db:0)+"px",x!==ue||b!==ge||a.animationManager.zb?(x=Xt.allocAt(E,Me,ze,Ze),a.onViewportBoundsChanged(x,a.viewportBounds,_n,ee),Xt.free(x),!1):!0}et=Kt.prototype,et.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Ot("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&&Ot('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(wo,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},et.oi=function(a){this.partManager.oi(a);var y=this;Zc(a,function(x){_c(y,x)}),(a instanceof yi||a instanceof Or&&a.placeholder!==null)&&a.v(),a.data!==null&&Zc(a,function(x){ly(y.partManager,x)}),Ya(a)!==!0&&rc(a)!==!0||this.De.add(a),I1(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()},et.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()},et.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))}et.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 un,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},et.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Kt.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 Vt;if(a!==null)if(Fn(a))for(var ee=0;ee<a.length;ee++)vu(this,E,a[ee],x,b);else for(a=a.iterator;a.next();)vu(this,E,a.value,x,b);else{for(a=this.parts;a.next();)vu(this,E,a.value,x,b);for(a=this.nodes;a.next();)vu(this,E,a.value,x,b);for(a=this.links;a.next();)vu(this,E,a.value,x,b)}Qh(this,E,y,b,x)}};function vu(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 Wn){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Or&&(x.placeholder!==null||E.dragsMembers))for(ee=x.memberParts;ee.next();)vu(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)&&vu(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)vu(a,y,x.value,b,E)}else if(x instanceof En)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)vu(a,y,x.value,b,E);else x instanceof yi||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=Un(),ue=Un(),ge=y.iterator,ye=st.alloc();ge.next();){var Me=ge.key,ze=ge.value;if(Me.Zc()){var Ze=kp(a,Me,y);Ze!==null?ae.push(new re(Me,ze,Ze)):(!E||Me.canMove())&&(Ze=ze.point,ee.assign(Ze),a.computeMove(Me,ee.add(ne),b,ye),Me.location=ye,ze.shifted===void 0&&(ze.shifted=new st),ze.shifted.assign(ye.re(Ze)))}else ge.key instanceof En&&ue.push(ge.sa)}for(st.free(ye),E=ae.length,ge=0;ge<E;ge++)Me=ae[ge],ee.assign(Me.info.point),Me.Su.shifted===void 0&&(Me.Su.shifted=new st),Me.node.location=ee.add(Me.Su.shifted);for(E=st.alloc(),ge=st.alloc(),Me=ue.length,ze=0;ze<Me;ze++){var Qe=ue[ze];if(Ze=Qe.key,Ze instanceof En)if(Ze.suspendsRouting){Ze.Tg=null,ye=Ze.fromNode;var rt=Ze.toNode;if(a.draggedLink!==null&&b.dragsLink)if(rt=Qe.value.point,Ze.dragComputation===null)y.add(Ze,a.Pd(b,Ze,ne)),Ch(Ze,ne.x-rt.x,ne.y-rt.y);else{Qe=st.allocAt(0,0),(ye=Ze.i(0))&&ye.w()&&Qe.assign(ye);var Tt=ye=st.alloc().assign(Qe).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Tt=st.alloc(),dd(a,Ze,ye,Tt,b)),ye.assign(Ze.dragComputation(Ze,ye,Tt)).re(Qe),y.add(Ze,a.Pd(b,Ze,ye)),Ch(Ze,ye.x-rt.x,ye.y-rt.y),st.free(Qe),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)),rt!==null&&(ge.assign(rt.location),Tt=y.I(rt),Tt!==null&&ge.re(Tt.point)),ye!==null&&rt!==null?E.Xa(ge)?(ye=Qe.value.point,rt=ee,rt.assign(E),rt.re(ye),y.add(Ze,a.Pd(b,Ze,E)),Ch(Ze,rt.x,rt.y)):(Ze.suspendsRouting=!1,Ze.bb()):(Qe=Qe.value.point,ye=ye!==null?E:rt!==null?ge:ne,y.add(Ze,a.Pd(b,Ze,ye)),Ch(Ze,ye.x-Qe.x,ye.y-Qe.y))}else(Ze.fromNode===null||Ze.toNode===null)&&(ye=Qe.value.point,y.add(Ze,a.Pd(b,Ze,ne)),Ch(Ze,ne.x-ye.x,ne.y-ye.y))}st.free(ee),st.free(ne),st.free(E),st.free(ge),Rn(ae),Rn(ue),x||(Sa(a),$h(a,y))}}Kt.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),zt.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 En&&(y.suspendsRouting=!0)}function $h(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof En&&(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}et=Kt.prototype,et.Pd=function(a,y,x){if(x===void 0)return new Gu(On);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Gu(new st(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Gu(x.copy())};function Tp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Ot("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Ot("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Ot("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Ot("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&&Ot("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}et.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(wo,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},et.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(wo,"layers",this,null,a,null,ee),this.N(),0>b&&this.Ya(),this},et.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(wo,"layers",this,null,a,null,ee+1),this.N(),0>b&&this.Ya(),this},et.kA=function(a){if(a.diagram!==this&&Ot("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()}}},et.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},et.Yw=function(a){return this.pf===null&&(this.pf=new on),this.pf.add(a),this.model.Pe(a),this},et.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},et.Pe=function(a){return this.zg===null&&(this.zg=new on),this.zg.add(a),this},et.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},et.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)},et.cb=function(a,y,x,b,E,ee,ne){ee===void 0&&(ee=null),ne===void 0&&(ne=null);var ae=new ao;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)},et.g=function(a,y,x,b,E){this.cb(ro,a,this,y,x,b,E)},Kt.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===ro){var E=a.object;if(io(E,a.propertyName,a.I(y)),E instanceof _t){var ee=E.part;ee!==null&&ee.Wb()}this.isModified=!0}else if(b===wo){var ne=a.object,ae=a.newParam,ue=a.newValue;if(ne instanceof Sn)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 Ro&&(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 Kt?typeof ae=="number"&&ue instanceof ra&&(y?this.Wa.mb(ae):(ue.Xe(this),this.Wa.Gb(ae,ue))):Ot("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===Eo){var Me=a.object,ze=a.oldParam,Ze=a.oldValue;if(Me instanceof Sn)typeof ze=="number"&&Ze instanceof _t?y?Me.Gb(ze,Ze):Me.pc(ze):typeof ze=="number"&&Ze instanceof Ro&&(Ze.isRow?c1(Me,ze,y?Ze:void 0):f1(Me,ze,y?Ze:void 0));else if(Me instanceof ra){var Qe=a.newParam===!0;typeof ze=="number"&&Ze instanceof Sr&&(y?0>Me.Pa.indexOf(Ze)&&Me.oi(ze,Ze,Qe):(Ze.isSelected=!1,Ze.isHighlighted=!1,Ze.Wb(),Me.pc(Qe?ze:-1,Ze,Qe)))}else Me instanceof Kt?typeof ze=="number"&&Ze instanceof ra&&(y?(Ze.Xe(this),this.Wa.Gb(ze,Ze)):this.Wa.mb(ze)):Ot("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ea&&Ot("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Kt.prototype.Ea=function(a){return this.undoManager.Ea(a)},Kt.prototype.eb=function(a){return this.undoManager.eb(a)},Kt.prototype.Kf=function(){return this.undoManager.Kf()},Kt.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}},Kt.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Kt.prototype.rp=function(){this.partManager.rp()};function Mp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,tu(a),a.N(),a.Ee=!0,b.zb&&(Iu(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,tu(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(ja)?ae=0:ge.Hf(vo)&&(ae=ee-1):ae=ge.sb()?ge.x*(ee-1):ee/2),isNaN(ue)&&(ge.$c()?ge.Hf(Ko)?ue=0:ge.Hf(fs)&&(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,tu(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),hl(a,!1),b.zb&&(Iu(b)||b.ce.add(b.H,"scale",y,a.Ca))}}Kt.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 $i&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Cc(E,this)),this.vb||this.invalidateViewport(a,y),eu(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 eu(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=fn.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/zt.vx(ee,ye):E=E*ye/zt.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=Xt.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Xt.free(y);return}E=y.width,ee=y.height,a=y.x,ne=y.y,Xt.free(y)}x.width=E+2*b.width,x.height=ee+2*b.height,y=st.alloc(),zt.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),fn.free(b),x.part.location=y,st.free(y)}}Kt.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)}},Kt.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))},Kt.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||Ot("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||Ot("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Kt.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()}},et=Kt.prototype,et.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},et.Jz=function(a){a=new un().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||Ot("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},et.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}Ot("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):Ot("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),st.free(ee)},et.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)},et.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},et.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)},et.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,Me=y.dy,ze=x*ne+b*ue+ye;y=x*ae+b*ge+Me;var Ze=E*ne+b*ue+ye;return a=E*ae+b*ge+Me,b=x*ne+ee*ue+ye,x=x*ae+ee*ge+Me,ne=E*ne+ee*ue+ye,E=E*ae+ee*ge+Me,ee=Math.min(ze,Ze),ze=Math.max(ze,Ze),Ze=Math.min(y,a),y=Math.max(y,a),ee=Math.min(ee,b),ze=Math.max(ze,b),Ze=Math.min(Ze,x),y=Math.max(y,x),ee=Math.min(ee,ne),ze=Math.max(ze,ne),Ze=Math.min(Ze,E),y=Math.max(y,E),new Xt(ee,Ze,ze-ee,y-Ze)},et.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),Mn(a.copy(),this.Ab)};function em(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Lp(a){return a=xd.get(a),a!==null?new a:new Oi}Kt.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),Sa(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;Rr(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 us){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof un&&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 us){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 un&&x.Bg.remove(a),Od(b));break}}}}}Kt.prototype.Wd=function(){this.partManager.Wd()},Kt.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Kt.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Kt.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Kt.prototype.Vb=function(a){return this.partManager.Vb(a)},Kt.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},et=Kt.prototype,et.Lc=function(a){return this.partManager.Lc(a)},et.ii=function(a){return this.partManager.ii(a)},et.Kc=function(a){return this.partManager.Kc(a)},et.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:Ln(Er(y)))},et.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:Ln(Er(y)))};function tu(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),hl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}et.Va=function(){if(this.Zi){var a=Xt.alloc();Ap(this,this.computeBounds(a)),Xt.free(a)}},et.rz=function(){for(var a=new un,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},et.qz=function(){return this.ai.iterator},et.Uz=function(a){Sa(this),a&&gd(this,!0),this.ld?jp(this,!1):(this.Jk=!0,Zs(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||pu(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),Sa(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)}}et.yz=function(){for(var a=new on,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 on;x.add(E,ne),x.add(ee,ne),b.add(E,E),b.add(ee,E)}var x=new Vt,b=new Vt;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;Ot("Unknown DiagramEvent name: "+y)}et.Bj=function(a,y){return a=md(this,a),a!==null&&a.add(y),this},et.am=function(a,y){a=md(this,a),a!==null&&a.remove(y)},et.R=function(a,y,x){var b=md(this,a),E=new hu;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}et.Yj=function(a,y){return yd(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Kt.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=Xt.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)}Xt.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=Xt.alloc(),ee=x.memberParts;ee.next();)ne=ee.value,ne instanceof Wn&&Sd(a,ne,b,y);Xt.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 Or)for(y=y.memberParts;y.next();)E=y.value,E instanceof Wn&&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)}Kt.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=Rr(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=Xt.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Ap(a,y),Xt.free(y),a.Fc=!0,a.bd(),Fp(a))}},a.vp))}Kt.prototype.ug=function(){this.vk!==-1&&(ln.clearTimeout(this.vk),this.vk=-1)},Kt.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=Xt.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(On)||(y=new st(y.x+ee.x/E,y.y+ee.y/E)),Xt.free(b),st.free(ee),y},et=Kt.prototype,et.Cs=function(){return null},et.av=function(){return null},et.bs=function(a,y){this.pj.add(a,y)},et.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Or&&(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):ln.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 ln.requestAnimationFrame(function(){b()}),null}et.Wz=function(a){return po?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},et.Jx=function(a){return a===void 0&&(a={}),kf(this,this.Xz,a)},et.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"&&Ot('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"&&Ot("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 fn(1/0,1/0):new fn(2e3,2e3));var ae=y.position||null,ue=y.parts||null,ge=y.padding===void 0?1:y.padding,ye=y.background||null,Me=y.omitTemporary;Me===void 0&&(Me=!0);var ze=y.document||document,Ze=y.elementFinished||null,Qe=y.showTemporary;Qe===void 0&&(Qe=!Me),y=y.showGrid,y===void 0&&(y=Qe),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof ge=="number"?ge=new Wr(ge):ge instanceof Wr||Ot("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),Me=new fl(null,ze,void 0,!0);var rt=Me.context;if(!(E||ee||ue||ae))return Me.width=a.Aa+Math.ceil(ge.left+ge.right),Me.height=a.ya+Math.ceil(ge.top+ge.bottom),x==="SVG"?b===null?null:(b.resize(Me.width,Me.height,Me.width,Me.height),b.ownerDocument=ze,b.hs=Ze,cd(a,b.context,ge,new fn(Me.width,Me.height),a.Ca,a.pa,ue,ye,Qe,y),b.context):(a.Xm=!1,cd(a,rt,ge,new fn(Me.width,Me.height),a.Ca,a.pa,ue,ye,Qe,y),a.Xm=!0,Me.context);var Tt=a.Pp,xt=a.documentBounds.copy();if(xt.Fv(a.yb),Qe)for(var At=a.Wa.s,Ft=At.length,Dt=0;Dt<Ft;Dt++){var It=At[Dt];if(It.visible&&It.isTemporary){It=It.Pa.s;for(var Wt=It.length,_n=0;_n<Wt;_n++){var rr=It[_n];rr.isInDocumentBounds&&rr.isVisible()&&(rr=rr.actualBounds,rr.w()&&xt.ed(rr))}}}if(At=new st(xt.x,xt.y),ue!==null){for(Ft=new Xt(0,0,0,0),Dt=!0,It=ue.iterator,It.reset();It.next();)Wt=It.value,Wt instanceof Sr&&(_n=Wt.layer,_n!==null&&!_n.visible||_n!==null&&!Qe&&_n.isTemporary||!Wt.isVisible()||(Wt=Wt.actualBounds,Wt.w()&&(Dt?(Dt=!1,Ft.assign(Wt)):Ft.ed(Wt))));xt.width=Ft.width,xt.height=Ft.height,At.x=Ft.x,At.y=Ft.y}return ae!==null&&ae.w()&&(At=ae,ee||(ee=Tt)),Ft=ae=0,ge!==null&&(ae=ge.left+ge.right,Ft=ge.top+ge.bottom),Dt=It=0,E!==null&&(It=E.width,Dt=E.height,isFinite(It)&&(It=Math.max(0,It-ae)),isFinite(Dt)&&(Dt=Math.max(0,Dt-Ft))),E!==null&&ee!==null?(ee==="NaN"&&(ee=Tt),E.w()?(E=It,xt=Dt):isNaN(Dt)?(E=It,xt=xt.height*ee):(E=xt.width*ee,xt=Dt)):E!==null?E.w()?(ee=Math.min(It/xt.width,Dt/xt.height),E=It,xt=Dt):isNaN(Dt)?(ee=It/xt.width,E=It,xt=xt.height*ee):(ee=Dt/xt.height,E=xt.width*ee,xt=Dt):ee!==null?ee==="NaN"&&ne.w()?(ee=Math.min((ne.width-ae)/xt.width,(ne.height-Ft)/xt.height),ee>Tt?(ee=Tt,E=xt.width,xt=xt.height):(E=ne.width,xt=ne.height)):(E=xt.width*ee,xt=xt.height*ee):(ee=Tt,E=xt.width,xt=xt.height),ge!==null?(E+=ae,xt+=Ft):ge=new Wr(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)&&(xt=Math.min(xt,ne))),Me.width=Math.ceil(E),Me.height=Math.ceil(xt),x==="SVG"?b===null?null:(b.resize(Me.width,Me.height,Me.width,Me.height),b.ownerDocument=ze,b.hs=Ze,cd(a,b.context,ge,new fn(Math.ceil(E),Math.ceil(xt)),ee,At,ue,ye,Qe,y),b.context):(a.Xm=!1,cd(a,rt,ge,new fn(Math.ceil(E),Math.ceil(xt)),ee,At,ue,ye,Qe,y),a.Xm=!0,Me.context)}rn.Object.defineProperties(Kt.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 nu(this,ln.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 nu(this,ln.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(ln,"resize",this.Ov,!1),this.removeEventListener(ln,"wheel",this.$j,!0),gu===this&&(gu=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)&&Dn(a,"0 <= value <= 1",Kt,"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),hl(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),hl(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),hl(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),hl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Dn(a,">= 0",Kt,"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&&Dn(a,">= 0",Kt,"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 Dn(a,">= 0",Kt,"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&&Ot("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,pu(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=Lp(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(ln,"pointermove",this.dk,!0),this.addEventListener(ln,"pointerdown",this.ui,!0),this.addEventListener(ln,"pointerup",this.fk,!0),this.addEventListener(ln,"pointerout",this.ek,!0),this.addEventListener(ln,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(ln,"wheel",this.$j,!0),this.addEventListener(ln,"selectstart",this.preventDefault,!1)):(this.removeEventListener(ln,"pointermove",this.dk,!0),this.removeEventListener(ln,"pointerdown",this.ui,!0),this.removeEventListener(ln,"pointerup",this.fk,!0),this.removeEventListener(ln,"pointerout",this.ek,!0),this.removeEventListener(ln,"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(ln,"wheel",this.$j,!0),this.removeEventListener(ln,"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()?tu(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!==Sn.Grid&&Ot("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),eu(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),tu(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||Ot("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 Wr(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&&hl(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,hl(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,Mp(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&&Mp(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&&hl(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()||Ot("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()||Ot("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)):Dn(a,"> 0",Kt,"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)):Dn(a,"> 0",Kt,"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),hl(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 Wr(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&&Ot("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&&Ot("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 fn(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 Wr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),rn.Object.defineProperties(Kt,{licenseKey:{get:function(){return zp.jc()},set:function(a){zp.add(a.replace(/\s/g,""))}},version:{get:function(){return Gc}}}),Kt.prototype.makeImageData=Kt.prototype.Jx,Kt.prototype.makeImage=Kt.prototype.Wz,Kt.prototype.cacheGroupExternalLinks=Kt.prototype.Fu,Kt.prototype.addRenderer=Kt.prototype.bs,Kt.prototype.makeSVG=Kt.prototype.av,Kt.prototype.makeSvg=Kt.prototype.Cs,Kt.prototype.stopAutoScroll=Kt.prototype.ug,Kt.prototype.doAutoScroll=Kt.prototype.gs,Kt.prototype.isUnoccupied=Kt.prototype.Yj,Kt.prototype.raiseDiagramEvent=Kt.prototype.R,Kt.prototype.removeDiagramListener=Kt.prototype.am,Kt.prototype.addDiagramListener=Kt.prototype.Bj,Kt.prototype.findTreeRoots=Kt.prototype.yz,Kt.prototype.layoutDiagram=Kt.prototype.Uz,Kt.prototype.findTopLevelGroups=Kt.prototype.qz,Kt.prototype.findTopLevelNodesAndLinks=Kt.prototype.rz,Kt.prototype.ensureBounds=Kt.prototype.Va,Kt.prototype.findLinksByExample=Kt.prototype.ls,Kt.prototype.findNodesByExample=Kt.prototype.ms,Kt.prototype.findLinkForData=Kt.prototype.Kc,Kt.prototype.findNodeForData=Kt.prototype.ii,Kt.prototype.findPartForData=Kt.prototype.Lc,Kt.prototype.findLinkForKey=Kt.prototype.findLinkForKey,Kt.prototype.findNodeForKey=Kt.prototype.Vb,Kt.prototype.findPartForKey=Kt.prototype.findPartForKey,Kt.prototype.rebuildParts=Kt.prototype.Wd,Kt.prototype.transformViewToDoc=Kt.prototype.Ps,Kt.prototype.transformRectDocToView=Kt.prototype.zA,Kt.prototype.transformDocToView=Kt.prototype.op,Kt.prototype.centerRect=Kt.prototype.es,Kt.prototype.scrollToRect=Kt.prototype.tv,Kt.prototype.scroll=Kt.prototype.scroll,Kt.prototype.highlightCollection=Kt.prototype.Jz,Kt.prototype.highlight=Kt.prototype.Iz,Kt.prototype.selectCollection=Kt.prototype.rA,Kt.prototype.select=Kt.prototype.select,Kt.prototype.updateAllRelationshipsFromData=Kt.prototype.rp,Kt.prototype.updateAllTargetBindings=Kt.prototype.updateAllTargetBindings,Kt.prototype.commit=Kt.prototype.commit,Kt.prototype.rollbackTransaction=Kt.prototype.Kf,Kt.prototype.commitTransaction=Kt.prototype.eb,Kt.prototype.startTransaction=Kt.prototype.Ea,Kt.prototype.raiseChanged=Kt.prototype.g,Kt.prototype.raiseChangedEvent=Kt.prototype.cb,Kt.prototype.removeChangedListener=Kt.prototype.ik,Kt.prototype.addChangedListener=Kt.prototype.Pe,Kt.prototype.removeModelChangedListener=Kt.prototype.mA,Kt.prototype.addModelChangedListener=Kt.prototype.Yw,Kt.prototype.findLayer=Kt.prototype.Qj,Kt.prototype.removeLayer=Kt.prototype.kA,Kt.prototype.addLayerAfter=Kt.prototype.Cy,Kt.prototype.addLayerBefore=Kt.prototype.Ww,Kt.prototype.addLayer=Kt.prototype.Al,Kt.prototype.moveParts=Kt.prototype.moveParts,Kt.prototype.copyParts=Kt.prototype.Kj,Kt.prototype.removeParts=Kt.prototype.Is,Kt.prototype.remove=Kt.prototype.remove,Kt.prototype.add=Kt.prototype.add,Kt.prototype.clearDelayedGeometries=Kt.prototype.bx,Kt.prototype.setProperties=Kt.prototype.nm,Kt.prototype.attach=Kt.prototype.Du,Kt.prototype.set=Kt.prototype.set,Kt.prototype.resetInputOptions=Kt.prototype.Sx,Kt.prototype.setInputOption=Kt.prototype.sA,Kt.prototype.getInputOption=Kt.prototype.Ql,Kt.prototype.resetRenderingHints=Kt.prototype.Tx,Kt.prototype.setRenderingHint=Kt.prototype.Xx,Kt.prototype.getRenderingHint=Kt.prototype.Gf,Kt.prototype.maybeUpdate=Kt.prototype.bd,Kt.prototype.requestUpdate=Kt.prototype.$b,Kt.prototype.delayInitialization=Kt.prototype.Xy,Kt.prototype.isUpdateRequested=Kt.prototype.Pz,Kt.prototype.invalidateDocumentBounds=Kt.prototype.Ya,Kt.prototype.findObjectsNear=Kt.prototype.og,Kt.prototype.findPartsNear=Kt.prototype.mz,Kt.prototype.findObjectsIn=Kt.prototype.Cf,Kt.prototype.findPartsIn=Kt.prototype.ux,Kt.prototype.findObjectsAt=Kt.prototype.ji,Kt.prototype.findPartsAt=Kt.prototype.lz,Kt.prototype.findObjectAt=Kt.prototype.ic,Kt.prototype.findPartAt=Kt.prototype.Ol,Kt.prototype.focusObject=Kt.prototype.zz,Kt.prototype.alignDocument=Kt.prototype.Jy,Kt.prototype.zoomToRect=Kt.prototype.BA,Kt.prototype.zoomToFit=Kt.prototype.zoomToFit,Kt.prototype.diagramScroll=Kt.prototype.kx,Kt.prototype.focus=Kt.prototype.focus;var xd=new Vt,om=null,po=ln.document!==void 0,zc=null,ec="",Ba=new Yt(Kt,"None",0),Rs=new Yt(Kt,"Uniform",1),tc=new Yt(Kt,"UniformToFill",2),Tf=new Yt(Kt,"CycleAll",10),Dp=new Yt(Kt,"CycleNotDirected",11),Bp=new Yt(Kt,"CycleNotDirectedFast",12),Rp=new Yt(Kt,"CycleNotUndirected",13),Ip=new Yt(Kt,"CycleDestinationTree",14),_p=new Yt(Kt,"CycleSourceTree",15),mh=new Yt(Kt,"DocumentScroll",1),Mf=new Yt(Kt,"InfiniteScroll",2),vh=new Yt(Kt,"TreeParentCollapsed",21),Do=new Yt(Kt,"AllParentsCollapsed",22),wd=new Yt(Kt,"AnyParentsCollapsed",23),zp=new on,Gc="2.3.10",Uc="image",Lf=null,am=!1;function Ta(){if(po){var a=ln.document.createElement("canvas"),y=a.getContext("2d"),x=fr("7ca11abfd022028846");y[x]=fr("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",vn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Cr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",zt.za],E=1;5>E;E++)y[fr("7ca11abfd7330390")](fr(b[E-1]),10,15*E);for(y[x]=fr("39f046ebb36e4b"),x=1;5>x;x++)y[fr("7ca11abfd7330390")](fr(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(Cr.prototype.Cd=Cr.prototype.Eu),Lf=a}}Kt.className="Diagram",Kt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=ln.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Kt?y.H:null},Kt.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},Kt.useDOM=function(a){po=a?ln.document!==void 0:!1},Kt.isUsingDOM=function(){return po},Kt.None=Ba,Kt.Uniform=Rs,Kt.UniformToFill=tc,Kt.CycleAll=Tf,Kt.CycleNotDirected=Dp,Kt.CycleNotDirectedFast=Bp,Kt.CycleNotUndirected=Rp,Kt.CycleDestinationTree=Ip,Kt.CycleSourceTree=_p,Kt.DocumentScroll=mh,Kt.InfiniteScroll=Mf,Kt.TreeParentCollapsed=vh,Kt.AllParentsCollapsed=Do,Kt.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=ln[fr("76a715b2f73f148a")][fr("72ba13b5")]||"";if(a.Rc=!0,po){var b=Kt[fr("76a115b6ed251eaf4692")];if(b)for(var E=zp.iterator;E.next()&&(b=E.value,b=fr(b).split(fr("39e9")),!(6>b.length));){var ee=fr(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=fr(vn[fr("6cae19")]).split(".");if(ee[0]>ne[0]||ee[0]===ne[0]&&ee[1]>=ne[1]){var ae=ln[fr("74a900bae4370f8b51")][fr("6fbb13a1c2311e8a57")].toLowerCase();if(ne=ae[fr("73a612b6fb191d")](fr("3aad1ab6e022098b4dc4")),ee=fr(b[2]),-1<ne&&(ae=ae[fr("73a612b6fb191d")](ee.toLowerCase()+"/"),a.Rc=!(-1<ae&&ae<ne),!a.Rc))break;for(ne=x[fr("76ad18b4f73e")],ae=x[fr("73a612b6fb191d")](fr("35e7"))+2;ae<ne;ae++)y+=x[ae];if(ne=y[fr("73a612b6fb191d")](ee),0>ne&&ee!==fr("7da71ca0ad381e90")&&(ne=y[fr("73a612b6fb191d")](fr("76a715b2ef3e149757"))),0>ne&&(ne=y[fr("73a612b6fb191d")](fr("76a715b2ef3e149757"))),0>ne&&(ne=y[fr("73a612b6fb191d")](fr("2bfa41fdb3784bca12"))),0>ne&&(ne=x[fr("73a612b6fb191d")](fr("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[fr("73a612b6fb191d")](fr("35"))||y[fr("73a612b6fb191d")](fr("35"))===-1),!a.Rc||x[fr("73a612b6fb191d")](fr("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[fr("73a612b6fb191d")](ee)),!a.Rc)||(ne=ln[fr("76a715b2f73f148a")][fr("69ad17a1e03e")],ae=ne[fr("73a612b6fb191d")](fr("7fb002b6ed25128b4da25b2e")),-1<ae&&(a.Rc=!(ne[fr("73a612b6fb191d")](ee)>ae),!a.Rc)))break;if(ee[0]==="#"){ne=ln.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[fr("79a417a0f0181a8946")]=b,ln.document[fr("78a712aa")]){ln.document[fr("78a712aa")][fr("7bb806b6ed32388c4a875b")](ne),ue=ln.getComputedStyle(ne).getPropertyValue(fr("78a704b7e62456904c9b12701b6532a8"));var ge=ln.getComputedStyle(ne).getPropertyValue(fr("75b817b0ea2202"));if(ln.document[fr("78a712aa")][fr("68ad1bbcf533388c4a875b")](ne),ue){if(ne=ln[fr("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(fr("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[fr("76ad18b4f73e")],E=x[fr("73a612b6fb191d")](fr("35e7"))+2;E<ye;E++)y+=x[E];x=y[fr("73a612b6fb191d")](fr("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[fr("73a612b6fb191d")](fr("35")))}}}return 0<a.Rc&&a!==a.wy}sm.className="DiagramHelper";function Gu(a){this.j=a===void 0?new st:a,this.o=new st}rn.Object.defineProperties(Gu.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";Gu.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 fn(NaN,NaN).freeze(),this.gridSnapCellSpot=ni,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"||ln.Element&&a instanceof Element)var x=Kt.call(this,a)||this;else x=Kt.call(this)||this,y=a;return be(x),y&&x.nm(y),x}Ht(Ce,Kt);function be(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=bi,a.layout=new ha}Ce.prototype.reset=function(){Kt.prototype.reset.call(this),be(this)},Ce.className="Palette";function Oe(a,y){if(typeof a=="string"||ln.Element&&a instanceof Element)var x=Kt.call(this,a)||this;else x=Kt.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 Wr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Mt,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(),pt(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&&pt(b)},x.autoScale=Rs,x.vb=!1,y&&Object.assign(x,y),x}Ht(Oe,Kt),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(Rc(this),this.ql===null){var x=new fl(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),qe(this)}finally{this.ta=a,this.ib=y}}}Kt.prototype.redraw.call(this)},Oe.prototype.gc=function(){if(this.Ka===null&&Ot("No div specified"),this.ta===null&&Ot("No canvas specified"),!(this.ta instanceof nu)&&(B0(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Rc(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?qe(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 qe(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=Xt.alloc().assign(a.viewportBounds).ed(y.viewportBounds),eu(y,E),Xt.free(E),Sa(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=zu(ae,E),ge.gc(E,ue),E.globalAlpha=ae);else{for(var ye=zu(ae,E),Me=ue.scale,ze=Xt.alloc(),Ze=ae.Pa.s,Qe=Ze.length,rt=0;rt<Qe;rt++){var Tt=Ze[rt];(b||Tt!==ge)&&ae.Oj(E,Tt,ue,null,Me,ze,!1)}Xt.free(ze),E.globalAlpha=ye}}}}}function pt(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=fn.alloc();E.h(x.width,x.height),b.desiredSize=E,fn.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 fa;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(),pt(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))},rn.Object.defineProperties(Oe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Oe&&Ot("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),pt(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),pt(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 Mt(){uo.call(this),this.j=null}Ht(Mt,uo),Mt.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)},Mt.prototype.doActivate=function(){this.j=null,uo.prototype.doActivate.call(this)},Mt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Mt.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)}}},Mt.className="OverviewDraggingTool";function kt(){gr(this),this.H=gu,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=fa,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=xi?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 $i&&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 un,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 un;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 on,x.addAll(ee),zc=x,ec=y.model.dataFormat}}y.R("ClipboardChanged",x)},kt.prototype.pasteFromClipboard=function(){var a=new un,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;pu(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=fa):(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;pu(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Rt(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 Wn&&ue.isTreeExpanded&&(!(ue instanceof Or)||ue.isSubGraphExpanded);)ue=E.pop();0<E.length?(ue instanceof Sr&&y.tv(ue.actualBounds),ue instanceof Wn&&!ue.isTreeExpanded&&(ue.isTreeExpanded=!0),ue instanceof Or&&!ue.isSubGraphExpanded&&(ue.isSubGraphExpanded=!0)):(ue instanceof Sr&&y.es(ue.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Rr(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 Rt(a,y,x){if(y.isVisible())return x;if(y instanceof yi)Rt(a,y.adornedPart,x);else if(y instanceof En){var b=y.fromNode;b!==null&&Rt(a,b,x),y=y.toNode,y!==null&&Rt(a,y,x)}else y instanceof Wn&&(b=y.labeledLink,b!==null&&Rt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Rt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Rt(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"),pu(y.animationManager,"Collapse Tree");var x=new on;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 Wn&&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 Wn&&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 Wn&&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"),pu(y.animationManager,"Expand Tree");var x=new on;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 Wn&&!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 Wn)||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 Wn&&!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 on,ee=a.selection.iterator;ee.next();){var ne=ee.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var ae=new on,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 Me=ae.first().containingGroup;if(Me!==null)for(;Me!==null;){E=!1;for(var ze=ae.iterator;ze.next();)if(!ze.value.Td(Me)){E=!0;break}if(E)Me=Me.containingGroup;else break}if(x instanceof Or)dl(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Ze=y.copyNodeData(x);Qt(Ze)&&(y.xf(Ze),b=a.ii(Ze))}if(b!==null){Me!==null&&this.isValidMember(Me,b)&&(b.containingGroup=Me);for(var Qe=ae.iterator;Qe.next();){var rt=Qe.value;this.isValidMember(b,rt)&&(rt.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 tn(a){var y=Un();for(a=a.iterator;a.next();){var x=a.value;x instanceof En||y.push(x)}a=new un,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 Rn(y),a}kt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof En)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 on;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var ee=E.value;ee instanceof Or&&ee.canUngroup()&&b.add(ee)}var ne=new on;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 Me=ne.iterator;Me.next();){var ze=Me.value;if(ze.isSelected=!0,!(ze instanceof En)){var Ze=ze.data;Ze!==null?x.mp(Ze,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 Or))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Or&&y.canUngroup())return!0;return!1},kt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=tn(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"),pu(y.animationManager,"Collapse SubGraph");var x=new on;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 Or&&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 Or&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Or&&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"),pu(y.animationManager,"Expand SubGraph");var x=new on;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 Or&&!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 Or&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Or&&!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(Gr):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 Vt,a===null)return b;for(var ee=a.iterator;ee.next();)vu(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 En&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},rn.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||Ot("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(){gr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new st(NaN,NaN).freeze(),this.jd=Bi,this.Ab=new Cr,this.wh=new Cr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ta,this.uc=new Xt(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Xt(NaN,NaN,NaN,NaN).freeze(),this.dc=new Xt(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Zo,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 yn,gn,lr,pr,wr,Br,ri,Xr,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=vr(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()},et=_t.prototype,et.qb=function(a){a.classType===En?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Ot("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===_t&&(this.stretch=a)},et.toString=function(){return $n(this.constructor)+"#"+Yr(this)},et.th=function(){this.A!==null&&(this.A.nc=!0)};function Vr(a){a.A===null?a.A=new jf:a.A.nc&&(a.A=a.A.copy())}et.Xc=function(){if(this.ba===null){var a=new Gp;a.Xi=_r,a.yj=_r,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},et.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===ro&&pa(this)&&to(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 Vt),ne=ee.undoManager.transactionLevel===0,a.startCondition===Xh?ne=!0:a.startCondition===Oc&&(ne=!1),ne?(ee=new ya,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()):(pu(ee.animationManager,"Trigger"),ee.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Sn&&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 Sn&&Zc(ae,function(ue){ue.data!==null&&ue.l&16777216&&ue.La(y)})};function to(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))}}et.ks=function(a){return this.bindingId===a?this:null},et.g=function(a,y,x){this.cb(ro,a,this,y,x)},et.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 Cr);var ee=this.Lb;ee.reset(),this.no(ee,a,y,x,b),ee.pp(E)}};function Yo(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}et.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?Kn(a.x,a.y,0,0,0,b.height)<=y||Kn(a.x,a.y,0,b.height,b.width,b.height)<=y||Kn(a.x,a.y,b.width,b.height,b.width,0)<=y||Kn(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},et.se=function(){return!0},et.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=Ji(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 yi||this instanceof Ur?Ji(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},et.gh=function(a){var y=this.naturalBounds;return Ji(0,0,y.width,y.height,a.x,a.y)},et.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Xt.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),Xt.free(y),b},et.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},et.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=Xt.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),Xt.free(x),!ae&&(zt.us(a,b,E)||zt.us(a,E,ee)||zt.us(a,ee,ne)||zt.us(a,ne,b))&&(ae=!0)}return st.free(b),st.free(E),st.free(ee),st.free(ne),ae},et.ga=function(a,y){if(y===void 0&&(y=new st),a instanceof or){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},et.mi=function(a){a===void 0&&(a=new Xt);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),li(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),li(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),li(a,b.x,b.y,0,0),st.free(b),a},et.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},et.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},et.qs=function(a,y){return y===void 0&&(y=new st),y.assign(a),this.oe.Cd(y),y},et.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},et.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,Me=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,zt.Ff(ee.left,ee.top,ee.right,ee.bottom,a,y,x,b,E)):(ne=a*ae+y*ge+Me,a=a*ue+y*ye+ze,y=x*ae+b*ge+Me,x=x*ue+b*ye+ze,E.h(0,0),b=this.naturalBounds,x=zt.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(_s(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 Sn;switch(ss(this,!0)){case gn:ne=E=0,ae&&(y=a=1/0);break;case yn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case pr:isFinite(a)&&a>x&&(E=a),ne=0,ae&&(y=1/0);break;case wr: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()||Ot("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=Xt.alloc();ee.assign(this.Ib),this.Ib.ka(),Ya(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()||Ot("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(ee,this.Ib),yu(this,!1),Xt.free(ee)},et=_t.prototype,et.eh=function(){};function Ra(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=ss(a,!0),x===b&&ee===E&&(y=gn),y){case gn:(x>b||ee>E)&&(Bo(a,!0),a.measure(x>b?b:x,ee>E?E:ee,0,0));break;case yn:Bo(a,!0),a.measure(b,E,0,0);break;case pr:Bo(a,!0),a.measure(b,ee,0,0);break;case wr:Bo(a,!0),a.measure(x,E,0,0)}}}et.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(),Hr(a,y)||(x.oh(),this.Pn(x)))},et.Pn=function(a){this.portId!==null&&(_0(a,!0),a instanceof Wn&&W1(a,this))},et.gc=function(a,y){if(!Xs(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 Sn&&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&&(mo(this,a,ge,!0,!0,ue,ae),ge instanceof ji&&ge.type===Qs?(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&&(mo(this,a,ye,!0,!1,ue,ae),ye instanceof ji&&ye.type===Qs?(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&&ua(this),ge=this.part,ue=!1;var Me=0;ge&&y.Gf("drawShadows")&&(ue=ge.isShadowed)&&(ye=ge.shadowOffset,Me=Math.max(ye.y,ye.x)*y.scale*y.Mb),ye=this.Dd();var ze;if(!(ze=y.$i||!ye)){var Ze=this.naturalBounds;ze=this.wh;var Qe=ze.m11,rt=ze.m21,Tt=ze.dx,xt=ze.m12,At=ze.m22,Ft=ze.dy,Dt,It=Dt=0;ze=Dt*Qe+It*rt+Tt;var Wt=Dt*xt+It*At+Ft;Dt=Ze.width+Me,It=0;var _n=Dt*Qe+It*rt+Tt;Dt=Dt*xt+It*At+Ft,It=Math.min(ze,_n);var rr=Math.min(Wt,Dt),Yn=Math.max(ze+0,_n)-It,Cn=Math.max(Wt+0,Dt)-rr;ze=It,Wt=rr,Dt=Ze.width+Me,It=Ze.height+Me,_n=Dt*Qe+It*rt+Tt,Dt=Dt*xt+It*At+Ft,It=Math.min(ze,_n),rr=Math.min(Wt,Dt),Yn=Math.max(ze+Yn,_n)-It,Cn=Math.max(Wt+Cn,Dt)-rr,ze=It,Wt=rr,Dt=0,It=Ze.height+Me,_n=Dt*Qe+It*rt+Tt,Dt=Dt*xt+It*At+Ft,It=Math.min(ze,_n),rr=Math.min(Wt,Dt),Yn=Math.max(ze+Yn,_n)-It,Cn=Math.max(Wt+Cn,Dt)-rr,ze=It,Wt=rr,Me=y.viewportBounds,Ze=Me.x,Qe=Me.y,ze=!(ze>Me.width+Ze||Ze>Yn+ze||Wt>Me.height+Qe||Qe>Cn+Wt)}if(ze){if(ze=(this.l&256)!==0,a.clipInsteadOfFill&&(ze=!1),this instanceof Zi&&(a.font=this.font),ze){if(Wt=ae.se()?ae.naturalBounds:ae.actualBounds,Yn=Math.max(ne.x,Wt.x),Cn=Math.max(ne.y,Wt.y),Me=Math.min(ne.right,Wt.right)-Yn,Ze=Math.min(ne.bottom,Wt.bottom)-Cn,Qe=this.tb,Qe!==null&&(Yn=Qe.x,Cn=Qe.y,Me=Qe.width,Ze=Qe.height),Yn>ne.width+ne.x||ne.x>Wt.width+Wt.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(Yn,Cn,Me,Ze),a.clip()}if(ye){if(!ge.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}ue&&(Wt=ge.shadowOffset,a.Ev(Wt.x*y.scale*this.scale*y.Mb,Wt.y*y.scale*this.scale*y.Mb,ge.shadowBlur),Uu(a),a.shadowColor=ge.shadowColor)}ue&&this.shadowVisible===!0?Uu(a):ue&&this.shadowVisible===!1&&Su(a),ge=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Is(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&&Su(a),this.Ma!==null&&(a.yc(),ms(this,a,ge,ne)),ue&&(this.Ma!==null||this.areaBackground!==null||ia(this,ae))?(Pl(this,!0),this.shadowVisible===null&&Su(a)):Pl(this,!1),this.hh(a,y),ue&&this.l&512&&Uu(a),ye&&ue&&Su(a),ze&&(a.restore(),a.Vc(this instanceof Sn)),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===Sn.Auto||y.type===Sn.Spot)&&y.Pb()!==a)}et.Dv=function(){};function Is(a,y,x,b){mo(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof ji&&a.areaBackground.type===Qs?(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 ms(a,y,x,b){var E=a.kq(),ee=x.x,ne=x.y,ae=x.width+E,ue=x.height+E;mo(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof ji&&a.Ma.type===Qs?(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 Ma(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===Sn.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 Xs(a,y,x){if(!(y instanceof ks))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&&Ma(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),Uu(y),y.shadowColor=a.shadowColor}a instanceof Zi&&(y.font=a.font),y.yd=null;var ne=a.transform;ee=a instanceof Sn;var ae=a instanceof Sn?xh(a):!1;a.l&4096&&ua(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],Is(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]),ms(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],ms(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&&Uu(y),ae&&a.shadowVisible===!0?Uu(y):ae&&a.shadowVisible===!1&&Su(y),E=a.panel,ae&&ia(a,E)&&a.shadowVisible===null&&Su(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))?(Pl(a,!0),a.shadowVisible===null&&Su(y)):Pl(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),as(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&&Uu(y),a.Dd()&&Su(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&&Ma(a,b,ae),ne!==null&&ne(a,ae)),!0)}et.$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"+Di++,ae=a.Ud("clipPath",{id:ee}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Sn&&(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"),as(a,b)};function as(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function La(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Er(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()}}et.hh=function(){},et.lv=function(){this.Uc=!0},et.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 Sn?xh(this):!1;if(!(this instanceof Sn&&E))if(this instanceof us){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 Sn)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],Is(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 Sn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),ms(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},et.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 mo(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 Kc)&&x.xe&&(x.type===Md||x.yk===ae&&x.ft===ue))var ye=x.xe;else{var Me=0,ze=0,Ze=0,Qe=0,rt=0,Tt=0;if(Tt=rt=0,E?(rt=ne.x,Tt=ne.y):b||(rt-=ge/2,Tt-=ge/2),Me=x.start.x*ae+x.start.offsetX,ze=x.start.y*ue+x.start.offsetY,Ze=x.end.x*ae+x.end.offsetX,Qe=x.end.y*ue+x.end.offsetY,Me+=rt,Ze+=rt,ze+=Tt,Qe+=Tt,x.type===Wu)ye=y.createLinearGradient(Me,ze,Ze,Qe);else if(x.type===Qs)Tt=isNaN(x.endRadius)?Math.max(ae,ue)/2:x.endRadius,isNaN(x.startRadius)?(rt=0,Tt=Math.max(ae,ue)/2):rt=x.startRadius,ye=y.createRadialGradient(Me,ze,rt,Ze,Qe,Tt);else if(x.type===Md)try{ye=y.createPattern(x.pattern,"repeat")}catch(At){ye=null}if(x.type!==Md&&(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===Md&&x.yk!==-1)){x.yk=-1;var xt=a.diagram;xt!==null&&x.yk===-1&&Rr(function(){xt.redraw()},600)}}b?y.fillStyle=ye:y.strokeStyle=ye}}}et.rg=function(a){if(a instanceof Sn)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},et.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},et.If=function(){for(var a=this instanceof Sn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function ua(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){cl(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)}cl(a,!1),Ys(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Ys(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,Ys(a,!1)))}et.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,Gr),a.rotate(this.Kb,ee.x,ee.y),st.free(ee)}},et.v=function(a){if(!_s(this)){a===void 0&&(a=!1),Bo(this,!0),yu(this,!0);var y=this.panel;y===null||a||y.v()}},et.Uj=function(){_s(this)||(Bo(this,!0),yu(this,!0))};function Xa(a){if(!Ya(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Wn&&a.Bd(),y.$b())),yu(a,!0)}}et.Uk=function(){!(this.l&2048)&&(cl(this,!0),Ys(this,!0))},et.Wu=function(){Ys(this,!0)},et.N=function(){var a=this.part;a!==null&&a.N()};function ss(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Sn.Table?Bl(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Sn.Auto&&b.Pb()===a?oa(a,yn,y):x===Br?b!==null?b.type===Sn.Spot&&b.Pb()===a?oa(a,yn,y):(x=b.defaultStretch,x===Br?oa(a,gn,y):oa(a,x,y)):oa(a,gn,y):oa(a,x,y)}function Bl(a,y,x,b){var E=a.stretch;if(E!==Br)return oa(a,E,b);var ee=E=null;switch(y.stretch){case wr:ee=!0;break;case yn:ee=!0}switch(x.stretch){case pr:E=!0;break;case yn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===pr||y===yn),ee===null&&(ee=y===wr||y===yn),E===!0&&ee===!0?oa(a,yn,b):E===!0?oa(a,pr,b):ee===!0?oa(a,wr,b):oa(a,gn,b)}function oa(a,y,x){if(x)return y;if(y===gn||(x=a.desiredSize,x.w()))return gn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===pr)return gn;if(y===yn)return wr}else{if(y===wr)return gn;if(y===yn)return pr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===wr)return gn;if(y===yn)return pr}else{if(y===pr)return gn;if(y===yn)return wr}return y}function Pl(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 cl(a,y){a.l=y?a.l|2048:a.l&-2049}function Ys(a,y){a.l=y?a.l|4096:a.l&-4097}function _s(a){return(a.l&8192)!==0}function Bo(a,y){a.l=y?a.l|8192:a.l&-8193}function Ya(a){return(a.l&16384)!==0}function yu(a,y){a.l=y?a.l|16384:a.l&-16385}et.Gj=function(){this.svg=null},et.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},et.Av=function(){},et.zv=function(a){return this.pa=a,Xa(this),!0},et.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},et.kq=function(){return 0};function Wc(a){var y=a.part;if(y instanceof Wn&&(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 Sn?a instanceof Wn?a.Bd():a.qm(a,function(x){Wc(x)}):Wc(a))}et.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Mo(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&d1(a)&&Ot("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new on),this.localBindings.add(E),this},et.set=function(a){return Object.assign(this,a),this},et.Du=function(a){return r0(this,a),this},et.apply=function(a){return a(this),this},et.nm=function(a){return Bc(this,a),this},et.pz=function(){return this.ih()},et.ih=function(){for(var a=this instanceof Sn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},et.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Vt),this.animationTriggers.add(a.propertyName,a),this};function Js(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=vr(arguments),b=ee(x),Qt(b)||Ot('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=ln.go[a]}if(b===null&&(E!=null&&E.constructor||Ot("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 Kt&&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?Ot("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 us)a.source=y;else if(a instanceof Sn)y=Cl.I(y),y!==null&&(a.type=y);else if(a instanceof ji){var x=Pr(ji,y);x!==null?a.type=x:Ot("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof bn?(y=Pr(bn,y),y!==null&&(a.type=y)):a instanceof vi&&(y=Pr(vi,y),y!==null&&(a.type=y));else if(y instanceof _t)a instanceof Sn||Ot("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Ro){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 Ro?km(b,y):Ot("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Yt)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Ho)a.type=y;else if(y instanceof Mo)a instanceof _t||a instanceof Ro?a.bind(y):Ot("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof wl)a instanceof _t?a.Jv(y):Ot("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Oo)a instanceof bn&&a.type===bn.o?a.figures.add(y):Ot("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof vi)a instanceof Oo?a.segments.add(y):Ot("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof lo)a instanceof Kt||a instanceof Or?a.layout=y:Ot("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 ji){x=new ar;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 Ro){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Ot("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)&&Ot("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new ar;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Bc(a,E)}else Bc(a,y);else Ot('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}rn.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&&(Vr(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&&(Vr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:$a},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===$a&&(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:On},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:Br},set:function(a){var y=this.stretch;y!==a&&(Vr(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&&(Vr(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)&&Dn(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 ji&&a.freeze(),Vr(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 ji&&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&&Ot("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&&(to(this,a,"width"),to(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 fn(a,this.jd.height).freeze(),this.v(),this instanceof Ur&&this.qc(),this.g("desiredSize",y,a),pa(this)&&(a=this.part,a!==null&&to(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 fn(this.jd.width,a).freeze(),this.v(),this instanceof Ur&&this.qc(),this.g("desiredSize",y,a),pa(this)&&(a=this.part,a!==null&&to(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Ar},set:function(a){var y=this.minSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),Vr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Pi},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(),Vr(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 Wr(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&&ua(this),this.Ab}},oe:{get:function(){return this.l&4096&&ua(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Vr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:gn},set:function(a){this.reshapingBehavior!==a&&(Vr(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()&&Ot("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Xa(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&&Dn(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&&Dn(a,">= 1",_t,"columnSpan"),Vr(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&&Dn(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&&Dn(a,">= 1",_t,"rowSpan"),Vr(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&&(Vr(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 Wn||Ot("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:_r},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&&Dn(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&&Dn(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:_r},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&&Dn(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&&Dn(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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&&(Vr(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 Vt,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=Js(Sn,Sn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Sn){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"},Js(Ur,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new or(0,0,2.76142374915397,2.761423749153969),spot2:new or(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 Sn&&(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 Sn&&(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 Sn&&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 Sn&&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 Sn&&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 Sn&&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=Js("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Js(Ur,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ir},new Mo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Mo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof yi&&(x=x.adornedPart),x instanceof Wn){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=Js("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Js(Ur,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ir},new Mo("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 yi&&(x=x.adornedPart),x instanceof Or){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 Js(yi,Sn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},Js(Ur,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new or(0,0,4,6),spot2:new or(1,1,-4,-4)}))}),yh("ContextMenu",function(){return Js(yi,Sn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},new Mo("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),yh("ContextMenuButton",function(){var a=Js("Button");a.stretch=pr;var y=a.fb("ButtonBorder");return y instanceof Ur&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new or(0,0,2,3),y.spot2=new or(1,1,-2,-2)),a}),yh("PanelExpanderButton",function(a){var y=lm(a,"COLLAPSIBLE"),x=Js("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},Js(Ur,{name:"ButtonIcon",strokeWidth:2},new Mo("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=Js("Button",{desiredSize:new fn(14,14)},Js(Ur,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:yn,geometryStretch:lr,visible:!1},y!==""?new Mo("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Sn){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=Js("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Wr(0,1,0,0)});var y=Js(Sn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Wr(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=gn=new Yt(_t,"None",0),_t.Default=Br=new Yt(_t,"Default",0),_t.Vertical=wr=new Yt(_t,"Vertical",4),_t.Horizontal=pr=new Yt(_t,"Horizontal",5),_t.Fill=yn=new Yt(_t,"Fill",3),_t.Uniform=lr=new Yt(_t,"Uniform",1),_t.UniformToFill=ri=new Yt(_t,"UniformToFill",2),_t.FlipVertical=Xr=new Yt(_t,"FlipVertical",1),_t.FlipHorizontal=ci=new Yt(_t,"FlipHorizontal",2),_t.FlipBoth=Ii=new Yt(_t,"FlipBoth",3),_t.make=Js,_t.getBuilders=function(){var a=new Vt,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;Ot('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=Ar,this.o=Pi,this.hg=Br,this.ob=this.Bi=1,this.Pf=gn,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=On,this.rr=$a,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=Zo,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 Vc(){this.ha=[1,0,0,1,0,0]}Vc.prototype.copy=function(){var a=new Vc;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},Vc.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},Vc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Vc.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)}},Vc.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 nu(a,y,x){this.ownerDocument=a=y===void 0?ln.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 ks(this,x)}nu.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},nu.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Qt(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},nu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},nu.prototype.focus=function(){this.Oa.focus()},nu.prototype.mx=function(){this.ownerDocument=null},rn.Object.defineProperties(nu.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}}}),nu.className="SVGSurface";function ks(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 Vc,this.j=um(this),this.Nj=um(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Di++,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+")")}et=ks.prototype,et.arc=function(a,y,x,b,E,ee,ne,ae){var ue=2*Math.PI,ge=ue-1e-6,ye=x*Math.cos(b),Me=x*Math.sin(b),ze=a+ye,Ze=y+Me,Qe=ee?0:1;b=ee?b-E:E-b,(1e-6<Math.abs(ne-ze)||1e-6<Math.abs(ae-Ze))&&this.path.push(["L",ze,+Ze]),0>b&&(b=b%ue+ue),b>ge?(this.path.push(["A",x,x,0,1,Qe,a-ye,y-Me]),this.path.push(["A",x,x,0,1,Qe,ze,Ze])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),Qe,a+x*Math.cos(E),y+x*Math.sin(E)])},et.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},et.Se=function(a){this.addPath(this.path,this.rb,a||0)},et.bezierCurveTo=function(a,y,x,b,E,ee){this.path.push(["C",a,y,x,b,E,ee])},et.clearRect=function(){},et.clip=function(){this.Yl.clipPath=!0},et.closePath=function(){this.path.push(["z"])},et.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},et.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"+Di++,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+")"},et.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)}et.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},zt.$(b,ae)&&zt.$(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)},et.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),i0(this,this.Yl)},et.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},et.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)},et.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))},et.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])},et.lineTo=function(a,y){this.path.push(["L",a,y])},et.moveTo=function(a,y){this.path.push(["M",a,y])},et.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},et.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"])},et.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},et.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())},et.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]+")"}et.scale=function(a,y){this.rb.scale(a,y)},et.translate=function(a,y){this.rb.translate(a,y)},et.transform=function(){},et.yc=function(){},et.stroke=function(){qy(this,this.Yl)},et.jk=function(){this.clipInsteadOfFill||this.stroke()},et.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},et.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"+Di++,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+")"}et.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var ee=vr(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 Vc;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}et.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Su(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Uu(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}et.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},et.fs=function(){this.Ct=!1},et.Vc=function(){},et.Wx=function(){},ks.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},ks.prototype.getImageData=function(){return null},ks.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()))}ks.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},ks.className="SVGContext",Kt.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new nu(this,ln.document));var y=new nu(this,ln.document,!0);a===void 0&&(a=new ar);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)},Kt.prototype.makeSvg=Kt.prototype.Cs,Kt.prototype.av=function(a){return this.Cs(a)},Kt.prototype.makeSVG=Kt.prototype.av;function fl(a,y,x,b){this.ownerDocument=y=y===void 0?ln.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Kc(y,x,b),y.H=a}fl.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},fl.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},fl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},fl.prototype.focus=function(){this.Oa.focus()},fl.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},rn.Object.defineProperties(fl.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}}}),fl.className="CanvasSurface";function Kc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Ot("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 Cr,this.isTemporary=!!x}et=Kc.prototype,et.Wx=function(a){this.Z.imageSmoothingEnabled=a},et.arc=function(a,y,x,b,E,ee){this.Z.arc(a,y,x,b,E,ee)},et.beginPath=function(){this.Z.beginPath()},et.Se=function(){},et.bezierCurveTo=function(a,y,x,b,E,ee){this.Z.bezierCurveTo(a,y,x,b,E,ee)},et.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},et.clip=function(){this.Z.clip()},et.closePath=function(){this.Z.closePath()},et.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},et.createPattern=function(a,y){return this.Z.createPattern(a,y)},et.createRadialGradient=function(a,y,x,b,E,ee){return this.Z.createRadialGradient(a,y,x,b,E,ee)},et.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)},et.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},et.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},et.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},et.fillText=function(a,y,x){this.Z.fillText(a,y,x)},et.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},et.lineTo=function(a,y){this.Z.lineTo(a,y)},et.measureText=function(a){return this.Z.measureText(a)},et.moveTo=function(a,y){this.Z.moveTo(a,y)},et.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},et.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},et.restore=function(){this.Z.restore()},et.save=function(){this.yc(),this.Z.save()},Kc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},et=Kc.prototype,et.setTransform=function(a,y,x,b,E,ee){this.El.setTransform(a,y,x,b,E,ee)},et.scale=function(a,y){this.El.scale(a,y)},et.translate=function(a,y){this.El.translate(a,y)},et.stroke=function(){this.Z.stroke()},et.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}},et.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},et.ng=function(a,y){if(a instanceof ji&&a.type===Qs){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)},et.jk=function(){this.Hm||this.stroke()},et.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},et.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},et.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},et.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},et.Hs=function(){},rn.Object.defineProperties(Kc.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([]);Kc.className="CanvasSurfaceContext";function Hp(){this.F=this.o=this.u=this.j=0}Hp.className="ColorNumbers";function ji(a,y){Td||(c0(),Td=!0),gr(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===Wu?(this.Qd=bi,this.Lk=jo):this.Lk=a===Qs?this.Qd=Gr:this.Qd=_r,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}ji.prototype.copy=function(){var a=new ji;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},et=ji.prototype,et.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},et.qb=function(a){a.classType===ji&&(this.type=a)},et.toString=function(){var a="Brush(";if(this.type===Sh)a+=this.color;else if(a=this.type===Wu?a+"Linear ":this.type===Qs?a+"Radial ":this.type===Md?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+")"},et.addColorStop=function(a,y){return this._isFrozen&&Ut(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Dn(a,"0 <= loc <= 1",ji,"addColorStop:loc"),this.we===null&&(this.we=new Vt),this.we.add(a,y),this.na===Sh&&(this.type=Wu),this.xe=null,this},et.Vz=function(a,y){if(this._isFrozen&&Ut(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Ld:y,this.type===Sh)Hu(this.color),this.color=Ed(a,y);else if((this.type===Wu||this.type===Qs)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Hu(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?Ld:x,Hu(a),Ed(y,x)}et.Wy=function(a,y){if(this._isFrozen&&Ut(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Ld:y,this.type===Sh)Hu(this.color),this.color=Ed(-a,y);else if((this.type===Wu||this.type===Qs)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Hu(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?Ld:x,Hu(a),Ed(-y,x)}function a0(a,y,x){Hu(a),a=Yi.j;var b=Yi.u,E=Yi.o,ee=Yi.F;return Hu(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)+")"}et.Gx=function(){if(this.type===Sh)return Cd(this.color);if((this.type===Wu||this.type===Qs)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Qs)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 ji?a.Gx():(Hu(a),128>(299*Yi.j+587*Yi.u+114*Yi.o)/1e3):!1}function Ed(a,y){switch(y){case Ld:y=100*l0(Yi.j);var x=100*l0(Yi.u),b=100*l0(Yi.o);return Ja.j=.4124564*y+.3575761*x+.1804375*b,Ja.u=.2126729*y+.7151522*x+.072175*b,Ja.o=.0193339*y+.119192*x+.9503041*b,Ja.F=Yi.F,y=h0(Ja.j/kd[0]),x=h0(Ja.u/kd[1]),b=h0(Ja.o/kd[2]),xu.j=116*x-16,xu.u=500*(y-x),xu.o=200*(x-b),xu.F=Ja.F,xu.j=Math.min(100,Math.max(0,xu.j+100*a)),a=(xu.j+16)/116,y=a-xu.o/200,Ja.j=kd[0]*n1(xu.u/500+a),Ja.u=kd[1]*(xu.j>cm*f0?Math.pow(a,3):xu.j/cm),Ja.o=kd[2]*n1(y),Ja.F=xu.F,a=-.969266*Ja.j+1.8760108*Ja.u+.041556*Ja.o,y=.0556434*Ja.j+-.2040259*Ja.u+1.0572252*Ja.o,Yi.j=255*u0((3.2404542*Ja.j+-1.5371385*Ja.u+-.4985314*Ja.o)/100),Yi.u=255*u0(a/100),Yi.o=255*u0(y/100),Yi.F=Ja.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(),zs.o=Math.min(100,Math.max(0,zs.o+100*a)),"hsla("+zs.j+", "+zs.u+"%, "+zs.o+"%, "+zs.F+")";default:Ot("Unknown color space: "+y)}}function Hu(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))}zs.j=Math.round(ne),zs.u=Math.round(100*a),zs.o=Math.round(100*E),zs.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 ji||Ot("Value for "+y+" must be a color string or a Brush, not "+a))}function c0(){d0=po?new fl(null,void 0,{willReadFrequently:!0}).context:null}rn.Object.defineProperties(ji.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Ut(this,a),this.na=a,this.start.Mc()&&(a===Wu?this.start=bi:a===Qs&&(this.start=Gr)),this.end.Mc()&&(a===Wu?this.end=jo:a===Qs&&(this.end=Gr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Ut(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Ut(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Ut(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Ut(this,a),0>a&&Dn(a,">= zero",ji,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Ut(this,a),0>a&&Dn(a,">= zero",ji,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Ut(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Ut(this,a),this.cr=a,this.xe=null}}}),ji.prototype.isDark=ji.prototype.Gx,ji.prototype.darkenBy=ji.prototype.Wy,ji.prototype.lightenBy=ji.prototype.Vz,ji.prototype.addColorStop=ji.prototype.addColorStop;var f0=216/24389,cm=24389/27,kd=[95.047,100,108.883],d0=null,Yi=new Hp,zs=new Hp,Ja=new Hp,xu=new Hp,Td=!1;ji.className="Brush";var Sh;ji.Solid=Sh=new Yt(ji,"Solid",0);var Wu;ji.Linear=Wu=new Yt(ji,"Linear",1);var Qs;ji.Radial=Qs=new Yt(ji,"Radial",2);var Md;ji.Pattern=Md=new Yt(ji,"Pattern",4);var Ld;ji.Lab=Ld=new Yt(ji,"Lab",5);var r1;ji.HSL=r1=new Yt(ji,"HSL",6),ji.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},ji.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)},ji.lighten=function(a){return e1(a)},ji.lightenBy=e1,ji.darken=function(a){return t1(a)},ji.darkenBy=t1,ji.mix=a0,ji.isDark=Cd;function Ho(){this.xa="Base"}Ho.prototype.measure=function(){},Ho.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},Ho.prototype.arrange=function(){},Ho.prototype.Ly=function(a,y,x,b,E,ee){a.arrange(y,x,b,E,ee)},Ho.prototype.iA=function(a){a.Uj()},Ho.prototype.gc=function(){},rn.Object.defineProperties(Ho.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Sn}}}),Ho.prototype.remeasureObject=Ho.prototype.iA,Ho.prototype.arrangeElement=Ho.prototype.Ly,Ho.prototype.measureElement=Ho.prototype.Yz,Ho.className="PanelLayout";function fm(){this.xa="Base"}Ht(fm,Ho),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,Me=ye.right+ye.left;ye=ye.top+ye.bottom,ge.measure(y,x,ee,ne);var ze=ge.measuredBounds;Me=Math.max(ze.width+Me,0),ye=Math.max(ze.height+ye,0),ze=ge.position.x;var Ze=ge.position.y;isFinite(ze)||(ze=0),isFinite(Ze)||(Ze=0),ge instanceof Ur&&ge.isGeometryPositioned&&(ge=ge.strokeWidth/2,ze-=ge,Ze-=ge),li(E,ze,Ze,Me,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"}Ht(dm,Ho),dm.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=b.length;y=Un(),ee=Vu(a);for(var ue=0;ue<ae;ue++){var ge=b[ue];if(ge.visible||ge===ee){var ye=ss(ge,!1);if(ye!==gn&&ye!==pr)y.push(ge);else{ge.measure(1/0,x,0,ne),ye=ge.margin,ge=ge.measuredBounds;var Me=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,Me)}}}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));Rn(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 Me=ye.measuredBounds,ze=ye.margin,Ze=ze.top+ze.bottom,Qe=ee+E.bottom,rt=Me.height,Tt=ss(ye,!1);(isNaN(ye.desiredSize.height)&&Tt===yn||Tt===wr)&&(rt=Math.max(x.height-Ze-Qe,0)),Ze=rt+Ze+Qe,Qe=ye.alignment,Qe.Xb()&&(Qe=a.defaultAlignment),Qe.sb()||(Qe=Gr),ne&&(ae-=Me.width+ze.left+ze.right),ye.arrange(ae+Qe.offsetX+ze.left,ge+Qe.offsetY+ze.top+(x.height*Qe.y-Ze*Qe.y),Me.width,rt),ne||(ae+=Me.width+ze.left+ze.right)}}};function pm(){this.xa="Base"}Ht(pm,Ho),pm.prototype.measure=function(a,y,x,b,E,ee){var ne=b.length;x=Un();for(var ae=Vu(a),ue=0;ue<ne;ue++){var ge=b[ue];if(ge.visible||ge===ae){var ye=ss(ge,!1);if(ye!==gn&&ye!==wr)x.push(ge);else{var Me=ge.margin;ye=Me.right+Me.left,Me=Me.top+Me.bottom,ge.measure(y,1/0,ee,0),ge=ge.measuredBounds,Ni(E,Math.max(E.width,Math.max(ge.width+ye,0)),E.height+Math.max(ge.height+Me,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);Rn(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 Me=ye.measuredBounds,ze=ye.margin,Ze=ze.left+ze.right,Qe=ee+E.right,rt=Me.width,Tt=ss(ye,!1);(isNaN(ye.desiredSize.width)&&Tt===yn||Tt===pr)&&(rt=Math.max(x.width-Ze-Qe,0)),Ze=rt+Ze+Qe,Qe=ye.alignment,Qe.Xb()&&(Qe=a.defaultAlignment),Qe.sb()||(Qe=Gr),ne&&(ae-=Me.height+ze.bottom+ze.top),ye.arrange(ge+Qe.offsetX+ze.left+(x.width*Qe.x-Ze*Qe.x),ae+Qe.offsetY+ze.top,rt,Me.height),ne||(ae+=Me.height+ze.bottom+ze.top)}}};function gm(){this.xa="Base"}Ht(gm,Ho),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,Me=ge.top+ge.bottom;ue.measure(y,x,ee,ne);var ze=ue.measuredBounds;ee=ze.width,ne=ze.height;var Ze=Math.max(ee+ye,0),Qe=Math.max(ne+Me,0),rt=a.isClipping,Tt=Xt.allocAt(-ge.left,-ge.top,Ze,Qe),xt=Xt.allocAt(0,0,ee,ne);p0(ue,xt,!0),ee=xt.width,ne=xt.height;for(var At=!0,Ft=Vu(a),Dt=0;Dt<ae;Dt++){var It=b[Dt];ze=y;var Wt=x;if(It!==ue&&(It.visible||It===Ft)){ge=It.margin;var _n=ge.left,rr=ge.top;switch(Ze=ge.right+ge.left,Qe=ge.top+ge.bottom,ge=ss(It,!1),ge){case yn:ze=ee,Wt=ne,rr=_n=Qe=Ze=0;break;case pr:ze=ee,_n=Ze=0;break;case wr:Wt=ne,rr=Qe=0}It.measure(ze,Wt,0,0),ze=It.measuredBounds,Ze=Math.max(ze.width+Ze,0),Qe=Math.max(ze.height+Qe,0),ge=It.alignment,ge.Xb()&&(ge=a.defaultAlignment),ge.sb()||(ge=Gr);var Yn=It.alignmentFocus;if(Yn.Xb()&&(Yn=Gr),Wt=null,It instanceof Sn&&It.$e!==""&&(Wt=It.fb(It.$e),Wt===It&&(Wt=null)),_n=xt.x-_n,rr=xt.y-rr,Wt!==null){for(It.arrange(0,0,ze.width,ze.height),ze=Wt.actualBounds,ze=st.allocAt(ze.x+(Yn.x*ze.width-Yn.offsetX),ze.y+(Yn.y*ze.height-Yn.offsetY)),Wt=Wt.panel;Wt!==It;)Wt.transform.Ga(ze),Wt=Wt.panel;_n+=ge.x*ee+ge.offsetX-ze.x,rr+=ge.y*ne+ge.offsetY-ze.y,st.free(ze)}else _n+=ge.x*ee+ge.offsetX-(Yn.x*ze.width+Yn.offsetX),rr+=ge.y*ne+ge.offsetY-(Yn.y*ze.height+Yn.offsetY);At?(At=!1,E.h(_n,rr,Ze,Qe)):li(E,_n,rr,Ze,Qe)}}switch(At?E.assign(Tt):rt?E.Uu(xt.x,xt.y,xt.width,xt.height):li(E,Tt.x,Tt.y,Tt.width,Tt.height),Xt.free(Tt),Xt.free(xt),ge=ue.stretch,ge===Br&&(ge=ss(ue,!1)),ge){case gn:return;case yn:if(!isFinite(y)&&!isFinite(x))return;break;case pr:if(!isFinite(y))return;break;case wr:if(!isFinite(x))return}for(ze=ue.measuredBounds,ee=ze.width,ne=ze.height,Ze=Math.max(ee+ye,0),Qe=Math.max(ne+Me,0),ge=ue.margin,xt=Xt.allocAt(-ge.left,-ge.top,Ze,Qe),p0(ue,xt,!0),ee=xt.width,ne=xt.height,y=0;y<ae;y++)x=b[y],x===ue||!x.visible&&x!==Ft||(ge=x.margin,Ze=ge.right+ge.left,Qe=ge.top+ge.bottom,ze=x.measuredBounds,Ze=Math.max(ze.width+Ze,0),Qe=Math.max(ze.height+Qe,0),ye=x.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=Gr),x=x.alignmentFocus,x.Xb()&&(x=Gr),At?(At=!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,Ze,Qe)):li(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,Ze,Qe));At?E.assign(Tt):rt?E.Uu(xt.x,xt.y,xt.width,xt.height):li(E,Tt.x,Tt.y,Tt.width,Tt.height),Xt.free(xt)},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=Xt.allocAt(0,0,ne,ae),p0(E,ne,!1),ae=0;ae<b;ae++){var Me=y[ae];if(Me!==E){ge=Me.measuredBounds;var ze=ge.width,Ze=ge.height;ye=Me.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=Gr);var Qe=Me.alignmentFocus;if(Qe.Xb()&&(Qe=Gr),ge=null,Me instanceof Sn&&Me.$e!==""&&(ge=Me.fb(Me.$e),ge===Me&&(ge=null)),ge!==null){var rt=ge.actualBounds;for(Qe=st.allocAt(rt.x+(Qe.x*rt.width-Qe.offsetX),rt.y+(Qe.y*rt.height-Qe.offsetY)),ge=ge.panel;ge!==Me;)ge.transform.Ga(Qe),ge=ge.panel;ge=ye.x*ne.width+ye.offsetX-Qe.x,ye=ye.y*ne.height+ye.offsetY-Qe.y,st.free(Qe)}else ge=ye.x*ne.width+ye.offsetX-(Qe.x*ze+Qe.offsetX),ye=ye.y*ne.height+ye.offsetY-(Qe.y*Ze+Qe.offsetY);ge+=ne.x-x.x,ye+=ne.y-x.y,Me.visible&&Me.arrange(ee+ge,ue+ye,ze,Ze)}}Xt.free(ne)};function p0(a,y,x){var b=null;if(a instanceof Sn&&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"}Ht(mm,Ho),mm.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=b.length,ue=a.Pb(),ge=ue.margin,ye=y,Me=x,ze=ge.right+ge.left,Ze=ge.top+ge.bottom;ue.measure(y,x,ee,ne),ge=ue.measuredBounds;var Qe=0,rt=null;ue instanceof Ur&&(rt=ue,Qe=rt.strokeWidth*rt.scale);var Tt=Math.max(ge.width+ze,0);ge=Math.max(ge.height+Ze,0);var xt=y0(ue),At=xt.x*Tt+xt.offsetX;xt=xt.y*ge+xt.offsetY;var Ft=S0(ue),Dt=Ft.x*Tt+Ft.offsetX;for(Ft=Ft.y*ge+Ft.offsetY,isFinite(y)&&(ye=Math.max(Math.abs(At-Dt)-Qe,0)),isFinite(x)&&(Me=Math.max(Math.abs(xt-Ft)-Qe,0)),Qe=fn.alloc(),Qe.h(0,0),a=Vu(a),Ft=0;Ft<ae;Ft++)xt=b[Ft],xt===ue||!xt.visible&&xt!==a||(ge=xt.margin,Tt=ge.right+ge.left,At=ge.top+ge.bottom,xt.measure(ye,Me,0,0),ge=xt.measuredBounds,Tt=Math.max(ge.width+Tt,0),ge=Math.max(ge.height+At,0),Qe.h(Math.max(Tt,Qe.width),Math.max(ge,Qe.height)));if(ae===1)E.width=Tt,E.height=ge,fn.free(Qe);else{switch(xt=y0(ue),Ft=S0(ue),ae=b=0,Ft.x!==xt.x&&Ft.y!==xt.y&&(b=Qe.width/Math.abs(Ft.x-xt.x),ae=Qe.height/Math.abs(Ft.y-xt.y)),fn.free(Qe),Qe=0,rt!==null&&(Qe=rt.strokeWidth*rt.scale,E0(rt)===lr&&(b=ae=Math.max(b,ae))),b+=Math.abs(xt.offsetX)+Math.abs(Ft.offsetX)+Qe,ae+=Math.abs(xt.offsetY)+Math.abs(Ft.offsetY)+Qe,rt=ue.stretch,rt===Br&&(rt=ss(ue,!1)),rt){case gn:ne=ee=0;break;case yn:isFinite(y)&&(b=y),isFinite(x)&&(ae=x);break;case pr:isFinite(y)&&(b=y),ne=0;break;case wr: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+Ze}},mm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,ee=Xt.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),Me=S0(b),ze=ye.y*E.height+ye.offsetY,Ze=Me.x*E.width+Me.offsetX;for(Me=Me.y*E.height+Me.offsetY,ee.x=ye.x*E.width+ye.offsetX,ee.y=ze,li(ee,Ze,Me,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=Gr),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&&(Ji(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 Xt(ee.x,ee.y,ee.width,ee.height))));Xt.free(ee)};function vm(){this.xa="Base",this.name="Table"}Ht(vm,Ho),vm.prototype.measure=function(a,y,x,b,E){for(var ee=b.length,ne=Un(),ae=Un(),ue=0;ue<ee;ue++){var ge=b[ue],ye=ge instanceof Sn?ge:null;if(ye!==null&&xh(ye)&&ge.visible){ae.push(ye);for(var Me=ye.O.s,ze=Me.length,Ze=0;Ze<ze;Ze++){var Qe=Me[Ze];ye.type===Sn.TableRow?Qe.row=ge.row:ye.type===Sn.TableColumn&&(Qe.column=ge.column),ne.push(Qe)}}else ne.push(ge)}ee=ne.length,ee===0&&(a.Fb(0),a.Eb(0));for(var rt=[],Tt=0;Tt<ee;Tt++){var xt=ne[Tt];xt.visible&&(Bo(xt,!0),yu(xt,!0),rt[xt.row]||(rt[xt.row]=[]),rt[xt.row][xt.column]||(rt[xt.row][xt.column]=[]),rt[xt.row][xt.column].push(xt))}Rn(ne);var At=Un(),Ft=Un(),Dt=Un(),It={count:0},Wt={count:0},_n=y,rr=x,Yn=a.rowDefs,Cn=a.colDefs,dn=null;ee=Yn.length;for(var jr=0;jr<ee;jr++)dn=Yn[jr],dn!==void 0&&(dn.actual=0);ee=Cn.length;for(var kr=0;kr<ee;kr++)dn=Cn[kr],dn!==void 0&&(dn.actual=0);for(var wi=rt.length,Ki=0,Jo=0;Jo<wi;Jo++)rt[Jo]&&(Ki=Math.max(Ki,rt[Jo].length));var ea=Math.min(a.topIndex,wi-1),Ia=Math.min(a.leftIndex,Ki-1),Qo=0;wi=rt.length;for(var Nh=Vu(a),Lo=0;Lo<wi;Lo++)if(rt[Lo]){Ki=rt[Lo].length;var Gl=a.Fb(Lo);Gl.actual=0;for(var _a=Gl.oc=0;_a<Ki;_a++)if(rt[Lo][_a]){var Ah=a.Eb(_a);At[_a]===void 0&&(Ah.actual=0,Ah.oc=0,At[_a]=!0);for(var Hs=rt[Lo][_a],ml=Hs.length,Ls=0;Ls<ml;Ls++){var ys=Hs[Ls];if(ys.visible||ys===Nh){var mc=1<ys.rowSpan||1<ys.columnSpan;mc&&(Lo<ea||_a<Ia||Ft.push(ys));var Ul=ys.margin,$d=Ul.right+Ul.left,Ns=Ul.top+Ul.bottom,za=Bl(ys,Gl,Ah,!1),Ng=ys.desiredSize,Kf=!isNaN(Ng.height),ou=!isNaN(Ng.width)&&Kf;if(mc||za===gn||ou||Lo<ea||_a<Ia||(It[_a]!==void 0||za!==yn&&za!==pr||(It[_a]=-1,It.count++),Wt[Lo]!==void 0||za!==yn&&za!==wr||(Wt[Lo]=-1,Wt.count++),Dt.push(ys)),ys.measure(1/0,1/0,0,0),!(Lo<ea||_a<Ia)){var Ss=ys.measuredBounds,tf=Math.max(Ss.width+$d,0),As=Math.max(Ss.height+Ns,0);if(ys.rowSpan===1&&(za===gn||za===pr)){dn=a.Fb(Lo);var vc=dn.Wc();Qo=Math.max(As-dn.actual,0),Qo+vc>rr&&(Qo=Math.max(rr-vc,0));var zv=dn.oa===0;dn.oc=dn.oc+Qo,dn.actual=dn.oa+Qo,rr=Math.max(rr-(Qo+(zv?vc:0)),0)}if(ys.columnSpan===1&&(za===gn||za===wr)){dn=a.Eb(_a);var Ag=dn.Wc();Qo=Math.max(tf-dn.actual,0),Qo+Ag>_n&&(Qo=Math.max(_n-Ag,0));var Gy=dn.oa===0;dn.oc=dn.oc+Qo,dn.actual=dn.oa+Qo,_n=Math.max(_n-(Qo+(Gy?Ag:0)),0)}mc&&ys.Uj()}}}}}Rn(At);var Lu=0,Xu=0;ee=a.columnCount;for(var Zf=0;Zf<ee;Zf++){var yc=Cn[Zf];yc!==void 0&&(Lu+=isNaN(yc.Hc)?yc.oc:yc.Hc,yc.oc!==0&&(Lu+=yc.Wc()))}ee=a.rowCount;for(var qd=0;qd<ee;qd++){var Sc=Yn[qd];Sc!==void 0&&(Xu+=isNaN(Sc.Hc)?Sc.oc:Sc.Hc,Sc.oc!==0&&(Xu+=Sc.Wc()))}_n=Math.max(y-Lu,0);var Nu=rr=Math.max(x-Xu,0),jh=_n;ee=Dt.length;for(var xs=0;xs<ee;xs++){var au=Dt[xs],Gv=a.Fb(au.row),Yu=a.Eb(au.column),ep=au.measuredBounds,Hl=au.margin,nf=Hl.right+Hl.left,su=Hl.top+Hl.bottom;It[au.column]=Yu.oc===0&&It[au.column]!==void 0?Math.max(ep.width+nf,It[au.column]):null,Wt[au.row]=Gv.oc===0&&Wt[au.row]!==void 0?Math.max(ep.height+su,Wt[au.row]):null}var Xf=0,tp=0,Nl;for(Nl in Wt)Nl!=="count"&&(Xf+=Wt[Nl]);for(Nl in It)Nl!=="count"&&(tp+=It[Nl]);for(var ca=fn.alloc(),jg=0;jg<ee;jg++){var rs=Dt[jg];if(rs.visible||rs===Nh){var No=a.Fb(rs.row),is=a.Eb(rs.column),Ju=0;isFinite(is.width)?Ju=is.width:(isFinite(_n)&&It[rs.column]!==null?tp===0?Ju=is.actual+_n:Ju=It[rs.column]/tp*jh:It[rs.column]!==null?Ju=_n:Ju=is.actual||_n,Ju=Math.max(0,Ju-is.Wc()));var Oh=0;switch(isFinite(No.height)?Oh=No.height:(isFinite(rr)&&Wt[rs.row]!==null?Xf===0?Oh=No.actual+rr:Oh=Wt[rs.row]/Xf*Nu:Wt[rs.row]!==null?Oh=rr:Oh=No.actual||rr,Oh=Math.max(0,Oh-No.Wc())),ca.h(Math.max(is.minimum,Math.min(Ju,is.maximum)),Math.max(No.minimum,Math.min(Oh,No.maximum))),za=Bl(rs,No,is,!1),za){case pr:ca.height=Math.max(ca.height,No.actual+rr);break;case wr:ca.width=Math.max(ca.width,is.actual+_n)}var rf=rs.margin,Uy=rf.right+rf.left,Uv=rf.top+rf.bottom;rs.Uj(),rs.measure(ca.width,ca.height,is.minimum,No.minimum);var np=rs.measuredBounds,of=Math.max(np.width+Uy,0),Yf=Math.max(np.height+Uv,0);isFinite(_n)&&(of=Math.min(of,ca.width)),isFinite(rr)&&(Yf=Math.min(Yf,ca.height));var ws=0;ws=No.actual,No.actual=Math.max(No.actual,Yf),No.oc=Math.max(No.oc,Yf),Qo=No.actual-ws,rr=Math.max(rr-Qo,0),Wt[rs.row]===null&&(Nu=Math.max(Nu-Qo,0)),ws=is.actual,is.actual=Math.max(is.actual,of),is.oc=Math.max(is.oc,of),Qo=is.actual-ws,_n=Math.max(_n-Qo,0),It[rs.column]===null&&(jh=Math.max(jh-Qo,0))}}Rn(Dt);var Qu=fn.alloc(),Wl=Un(),rl=Un();if(ee=Ft.length,ee!==0){for(var xc=0;xc<wi;xc++)if(rt[xc]){Ki=rt[xc].length;var rp=a.Fb(xc);Wl[xc]=rp.actual;for(var wc=0;wc<Ki;wc++)if(rt[xc][wc]){var Hv=a.Eb(wc);rl[wc]=Hv.actual}}}for(var ip=0;ip<ee;ip++){var So=Ft[ip];if(So.visible||So===Nh){var Al=a.Fb(So.row),vl=a.Eb(So.column);switch(ca.h(Math.max(vl.minimum,Math.min(y,vl.maximum)),Math.max(Al.minimum,Math.min(x,Al.maximum))),za=Bl(So,Al,vl,!1),za){case yn:rl[vl.index]!==0&&(ca.width=Math.min(ca.width,rl[vl.index])),Wl[Al.index]!==0&&(ca.height=Math.min(ca.height,Wl[Al.index]));break;case pr:rl[vl.index]!==0&&(ca.width=Math.min(ca.width,rl[vl.index]));break;case wr:Wl[Al.index]!==0&&(ca.height=Math.min(ca.height,Wl[Al.index]))}isFinite(vl.width)&&(ca.width=vl.width),isFinite(Al.height)&&(ca.height=Al.height),Qu.h(0,0);for(var Wv=vl.minimum,js=Al.minimum,Fh=1;Fh<So.rowSpan&&!(So.row+Fh>=a.rowCount);Fh++)dn=a.Fb(So.row+Fh),Qo=0,Qo=za===yn||za===wr?Math.max(dn.minimum,Wl[So.row+Fh]===0?dn.maximum:Math.min(Wl[So.row+Fh],dn.maximum)):Math.max(dn.minimum,isNaN(dn.Hc)?dn.maximum:Math.min(dn.Hc,dn.maximum)),Qu.height+=Qo,js+=dn.minimum;for(var yl=1;yl<So.columnSpan&&!(So.column+yl>=a.columnCount);yl++)dn=a.Eb(So.column+yl),Qo=0,Qo=za===yn||za===pr?Math.max(dn.minimum,rl[So.column+yl]===0?dn.maximum:Math.min(rl[So.column+yl],dn.maximum)):Math.max(dn.minimum,isNaN(dn.Hc)?dn.maximum:Math.min(dn.Hc,dn.maximum)),Qu.width+=Qo,Wv+=dn.minimum;ca.width+=Qu.width,ca.height+=Qu.height;var op=So.margin,bc=op.right+op.left,Og=op.top+op.bottom;So.measure(ca.width,ca.height,Wv,js);for(var ap=So.measuredBounds,lu=Math.max(ap.width+bc,0),af=Math.max(ap.height+Og,0),Pc=0,sp=0;sp<So.rowSpan&&!(So.row+sp>=a.rowCount);sp++)dn=a.Fb(So.row+sp),Pc+=dn.total||0;if(Pc<af){var Dh=af-Pc,Au=af-Pc;if(So.spanAllocation!==null)for(var Bh=So.spanAllocation,$u=0;$u<So.rowSpan&&!(0>=Dh)&&!(So.row+$u>=a.rowCount);$u++){dn=a.Fb(So.row+$u);var Rh=dn.oa||0,sf=Bh(So,dn,Au);dn.actual=Math.min(dn.maximum,Rh+sf),dn.oa!==Rh&&(Dh-=dn.oa-Rh)}for(;0<Dh;){var Vl=dn.oa||0;if(isNaN(dn.height)&&dn.maximum>Vl&&(dn.actual=Math.min(dn.maximum,Vl+Dh),dn.oa!==Vl&&(Dh-=dn.oa-Vl)),dn.index===0)break;dn=a.Fb(dn.index-1)}}for(var Jf=0,Ih=0;Ih<So.columnSpan&&!(So.column+Ih>=a.columnCount);Ih++)dn=a.Eb(So.column+Ih),Jf+=dn.total||0;if(Jf<lu){var Qf=lu-Jf,Hy=lu-Jf;if(So.spanAllocation!==null)for(var qu=So.spanAllocation,lf=0;lf<So.columnSpan&&!(0>=Qf)&&!(So.column+lf>=a.columnCount);lf++){dn=a.Eb(So.column+lf);var Fg=dn.oa||0,Wy=qu(So,dn,Hy);dn.actual=Math.min(dn.maximum,Fg+Wy),dn.oa!==Fg&&(Qf-=dn.oa-Fg)}for(;0<Qf;){var Vv=dn.oa||0;if(isNaN(dn.width)&&dn.maximum>Vv&&(dn.actual=Math.min(dn.maximum,Vv+Qf),dn.oa!==Vv&&(Qf-=dn.oa-Vv)),dn.index===0)break;dn=a.Eb(dn.index-1)}}}}Rn(Ft),fn.free(Qu),fn.free(ca),Wl!==void 0&&Rn(Wl),rl!==void 0&&Rn(rl);var $f=0,qf=0,Kv=a.desiredSize,gx=a.maxSize;za=ss(a,!0);var Dg=Xu=Lu=0,Bg=0;ee=a.columnCount;for(var Zv=0;Zv<ee;Zv++)Cn[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&&(Lu+=dn.oa,Lu+=dn.Wc()));isFinite(Kv.width)?$f=Math.min(Kv.width,gx.width):$f=za!==gn&&isFinite(y)?y:Lu,$f=Math.max($f,a.minSize.width),$f=Math.max($f-Dg,0);for(var $x=Lu===0?1:Math.max($f/Lu,1),Xv=0;Xv<ee;Xv++)Cn[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++)Yn[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&&(Xu+=dn.oa,Xu+=dn.Wc()));isFinite(Kv.height)?qf=Math.min(Kv.height,gx.height):qf=za!==gn&&isFinite(x)?x:Xu,qf=Math.max(qf,a.minSize.height),qf=Math.max(qf-Bg,0);for(var qx=Xu===0?1:Math.max(qf/Xu,1),Jv=0;Jv<ee;Jv++)Yn[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 Vy=0;Vy<ee;Vy++){var Rg=ae[Vy],Ky=0,Zy=0;Rg.type===Sn.TableRow?(Ky=E.width,dn=a.Fb(Rg.row),Zy=dn.actual):(dn=a.Eb(Rg.column),Ky=dn.actual,Zy=E.height),Rg.measuredBounds.h(0,0,Ky,Zy),Bo(Rg,!1)}Rn(ae),a.inRowsCols=rt},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,Me=0;Me<ge;Me++)ne[Me]&&(ye=Math.max(ye,ne[Me].length));ue=a.rowDefs,ae=a.colDefs;var ze=Me=0,Ze=Math.min(a.topIndex,ge-1);if(0<ue.length){for(;Ze!==ge&&(ue[Ze]===void 0||ue[Ze].oa===0);)Ze++;Ze=Math.max(Math.min(Ze,ge-1),0),Me=-ue[Ze].position}var Qe=Math.min(a.leftIndex,ye-1);if(0<ae.length){for(;Qe!==ye&&(ae[Qe]===void 0||ae[Qe].oa===0);)Qe++;Qe=Math.max(Math.min(Qe,ye-1),0),ze=-ae[Qe].position}for(var rt=0,Tt=0;rt!==ge&&ue[rt]===void 0;)rt++;for(;Tt!==ge&&ae[Tt]===void 0;)Tt++;ye=a.part,a.Fb(rt),a.Eb(Tt);for(var xt=0;xt<y.length;xt++){var At=y[xt];if(At instanceof Sn&&At.visible&&xh(At)){if(At.type===Sn.TableRow){ae=a.Fb(At.row);var Ft=a.Eb(Tt)}else ae=a.Fb(rt),Ft=a.Eb(At.column);ue=ae.position+Me+E,ae.oa!==0&&(ue+=ae.Io(Math.max(rt,Ze))),ae=Ft.position+ze+ee,Ft.oa!==0&&(ae+=Ft.Io(Math.max(Tt,Qe))),Ft=At.measuredBounds,At.Uk(),At.actualBounds.ka();var Dt=At.actualBounds,It=Xt.allocAt(Dt.x,Dt.y,Dt.width,Dt.height);Dt.x=At.type===Sn.TableRow?ee:ae,Dt.y=At.type===Sn.TableColumn?E:ue,Dt.width=Ft.width,Dt.height=Ft.height,At.actualBounds.freeze(),yu(At,!1),Hr(It,Dt)||ye===null||(ye.oh(),At.Pn(ye)),Xt.free(It)}}for(xt=fn.alloc(),At=0;At<ge;At++)if(ne[At]){for(ye=ne[At].length,Ft=a.Fb(At),ue=Ft.position+Me+E,Ft.oa!==0&&(ue+=Ft.Io(Math.max(rt,Ze))),Dt=0;Dt<ye;Dt++)if(ne[At][Dt]){It=a.Eb(Dt),ae=It.position+ze+ee,It.oa!==0&&(ae+=It.Io(Math.max(Tt,Qe)));for(var Wt=ne[At][Dt],_n=Wt.length,rr=0;rr<_n;rr++){var Yn=Wt[rr],Cn=Yn.measuredBounds;xt.h(0,0);for(var dn=1;dn<Yn.rowSpan&&!(At+dn>=a.rowCount);dn++){var jr=a.Fb(At+dn);jr.oa!==0&&(xt.height+=jr.total)}for(dn=1;dn<Yn.columnSpan&&!(Dt+dn>=a.columnCount);dn++)jr=a.Eb(Dt+dn),jr.oa!==0&&(xt.width+=jr.total);var kr=It.oa+xt.width,wi=Ft.oa+xt.height;dn=ae,jr=ue;var Ki=kr,Jo=wi,ea=ae,Ia=ue,Qo=kr,Nh=wi;ae+kr>x.width&&(Qo=Math.max(x.width-ae,0)),ue+wi>x.height&&(Nh=Math.max(x.height-ue,0));var Lo=Yn.alignment;if(Lo.Xb()){Lo=a.defaultAlignment,Lo.sb()||(Lo=Gr);var Gl=Lo.x,_a=Lo.y,Ah=Lo.offsetX;Lo=Lo.offsetY;var Hs=It.alignment,ml=Ft.alignment;Hs.sb()&&(Gl=Hs.x,Ah=Hs.offsetX),ml.sb()&&(_a=ml.y,Lo=ml.offsetY)}else Gl=Lo.x,_a=Lo.y,Ah=Lo.offsetX,Lo=Lo.offsetY;(isNaN(Gl)||isNaN(_a))&&(_a=Gl=.5,Lo=Ah=0),Hs=Cn.width,ml=Cn.height;var Ls=Yn.margin,ys=Ls.left+Ls.right,mc=Ls.top+Ls.bottom,Ul=Bl(Yn,Ft,It,!1);!isNaN(Yn.desiredSize.width)||Ul!==yn&&Ul!==pr||(Hs=Math.max(kr-ys,0)),!isNaN(Yn.desiredSize.height)||Ul!==yn&&Ul!==wr||(ml=Math.max(wi-mc,0)),kr=Yn.maxSize,wi=Yn.minSize,Hs=Math.min(kr.width,Hs),ml=Math.min(kr.height,ml),Hs=Math.max(wi.width,Hs),ml=Math.max(wi.height,ml),kr=ml+mc,dn+=Ki*Gl-(Hs+ys)*Gl+Ah+Ls.left,jr+=Jo*_a-kr*_a+Lo+Ls.top,Yn.visible&&(Ji(ea,Ia,Qo,Nh,dn,jr,Cn.width,Cn.height)?Yn.arrange(dn,jr,Hs,ml):Yn.arrange(dn,jr,Hs,ml,new Xt(ea,Ia,Qo,Nh)))}}}for(fn.free(xt),a=0;a<b;a++)x=y[a],ee=x instanceof Sn?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"}Ht(ym,Ho),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}Ht(Sm,Ho),Sm.prototype.measure=function(){},Sm.prototype.arrange=function(){};function xm(){this.xa="Base"}Ht(xm,Ho),xm.prototype.measure=function(a,y,x,b,E,ee,ne){1<b.length&&Ot("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,Me=ae.width;ae=ae.height;var ze=Math.max(y-ge,0),Ze=Math.max(x-ue,0),Qe=1;a.viewboxStretch===lr?Me!==0&&ae!==0&&(Qe=Math.min(ze/Me,Ze/ae)):Me!==0&&ae!==0&&(Qe=Math.max(ze/Me,Ze/ae)),Qe===0&&(Qe=1e-4),b.Ca*=Qe,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=Gr),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"}Ht(Wp,Ho),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),Me=a.gridOrigin,ze=Me.x;Me=Me.y,y.save(),y.beginPath(),y.rect(0,0,ae,ue),y.clip(),y.Se();for(var Ze=[],Qe=a.O.s,rt=Qe.length,Tt=0;Tt<rt;Tt++){var xt=Qe[Tt],At=[];if(Ze.push(At),xt.visible){var Ft=xt.interval;if(!(0>Ft)){xt=m0(xt.figure);for(var Dt=0;Dt<rt;Dt++)if(Dt!==Tt){var It=Qe[Dt];It.visible&&m0(It.figure)===xt&&(It=It.interval,It>Ft&&At.push(It))}}}}for(Qe=a.O.s,rt=Qe.length,Tt=0;Tt<rt;Tt++){var Wt=Qe[Tt];if(Wt.visible&&(At=Wt.interval||1,xt=Math.abs(At),!(2>E*xt*x))){if(Ft=Wt.segmentIndex,(!isFinite(Ft)||isNaN(Ft))&&(Ft=0),0>Ft&&(Ft=xt-Math.min(-Ft,xt)),Ft=Math.round(Ft%xt),xt=Wt.opacity,Dt=1,xt!==1){if(xt===0)continue;Dt=y.globalAlpha,y.globalAlpha=Dt*xt}It=Ze[Tt];var _n=!1,rr=Wt.strokeDashArray;if(rr!==null&&(_n=!0,y.js(rr,Wt.strokeDashOffset)),Wt.figure==="LineV"&&Wt.stroke!==null&&0<Wt.strokeWidth){for(y.lineWidth=Wt.strokeWidth,mo(a,y,Wt.stroke,!1,!1,ee,ne),y.beginPath(),rr=Wt=Math.floor((ze-E)/E);rr<=Wt+ge;rr++){var Yn=rr*E+ze;0<=Yn&&Yn<=ae&&wm(rr,At,Ft,It)&&(y.moveTo(Yn,0),y.lineTo(Yn,ue))}y.stroke(),y.Se()}else if(Wt.figure==="LineH"&&Wt.stroke!==null&&0<Wt.strokeWidth){for(y.lineWidth=Wt.strokeWidth,mo(a,y,Wt.stroke,!1,!1,ee,ne),y.beginPath(),rr=Wt=Math.floor((Me-b)/b);rr<=Wt+ye;rr++)Yn=rr*b+Me,0<=Yn&&Yn<=ue&&wm(rr,At,Ft,It)&&(y.moveTo(0,Yn),y.lineTo(ae,Yn));y.stroke(),y.Se()}else if(Wt.figure==="BarV"&&Wt.fill!==null)for(mo(a,y,Wt.fill,!0,!1,ee,ne),Wt=Wt.width,isNaN(Wt)&&(Wt=E),Yn=rr=Math.floor((ze-E)/E);Yn<=rr+ge;Yn++){var Cn=Yn*E+ze;0<=Cn+Wt&&Cn<=ae&&wm(Yn,At,Ft,It)&&y.fillRect(Cn,0,Wt,ue)}else if(Wt.figure==="BarH"&&Wt.fill!==null)for(mo(a,y,Wt.fill,!0,!1,ee,ne),Wt=Wt.height,isNaN(Wt)&&(Wt=b),Yn=rr=Math.floor((Me-b)/b);Yn<=rr+ye;Yn++)Cn=Yn*b+Me,0<=Cn+Wt&&Cn<=ue&&wm(Yn,At,Ft,It)&&y.fillRect(0,Cn,ae,Wt);_n&&y.fs(),xt!==1&&(y.globalAlpha=Dt)}}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"}Ht(bm,Ho),bm.prototype.measure=function(a,y,x,b,E){var ee=b.length;if(a instanceof yi||a instanceof En){var ne=null,ae=null;if(a instanceof En&&(ne=a),a instanceof yi&&(ae=a,ne=ae.adornedPart,a.j===null&&(a.j=[])),ne instanceof En){var ue=ne;if(ee===0)Ni(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var ge=a instanceof yi?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ye=ue.points,Me=ne.pointsCount;ae!==null?ae.Ul(!1):ne!==null&&ne.Ul(!1),ae=y.width;var ze=y.height,Ze=a.j;if(Ze.length=0,ge!==null){i1(a,ae,ze,ge);var Qe=ge.measuredBounds;x.ed(Qe),Ze.push(Qe)}Qe=Cr.alloc();for(var rt=st.alloc(),Tt=st.alloc(),xt=0;xt<ee;xt++){var At=b[xt];if(At!==ge)if(At.isPanelMain&&At instanceof Ur){i1(a,ae,ze,At);var Ft=At.measuredBounds;x.ed(Ft),Ze.push(Ft)}else if(2>Me)At.measure(1/0,1/0,0,0),Ft=At.measuredBounds,x.ed(Ft),Ze.push(Ft);else{var Dt=At.segmentIndex,It=At.segmentFraction,Wt=At.alignmentFocus;Wt.Mc()&&(Wt=Gr);var _n=At.segmentOrientation,rr=At.segmentOffset;if(isNaN(Dt)){var Yn=ue.ua;Ft=Un(),Yn.Qu(It,Ft);var Cn=st.allocAt(Ft[0],Ft[1]);if(Cn.add(ue.i(0)),Yn.type===bn.j?Cn.offset(-Yn.startX,-Yn.startY):(Yn=Yn.figures.first(),Yn!==null&&Cn.offset(-Yn.startX,-Yn.startY)),Yn=Ft[2],_n!==$a){var dn=ue.computeAngle(At,_n,Yn);At.Kb=dn}dn=Cn.x-y.x;var jr=Cn.y-y.y;st.free(Cn),Rn(Ft)}else if(Dt<-Me||Dt>=Me)Ft=st.alloc(),ue.vg(),ue.computeMidPoint(Ft),Yn=ue.midAngle,_n!==$a&&(dn=ue.computeAngle(At,_n,Yn),At.Kb=dn),dn=Ft.x-y.x,jr=Ft.y-y.y,st.free(Ft);else{if(dn=0,0<=Dt?(jr=ye.M(Dt),Ft=Dt<Me-1?ye.M(Dt+1):jr):(dn=Me+Dt,jr=ye.M(dn),Ft=0<dn?ye.M(dn-1):jr),jr.Xa(Ft)){0<=Dt?(Yn=0<Dt?ye.M(Dt-1):jr,dn=Dt<Me-2?ye.M(Dt+2):Ft):(Yn=dn<Me-1?ye.M(dn+1):jr,dn=1<dn?ye.M(dn-2):Ft),Cn=Yn.Bf(jr);var kr=Ft.Bf(dn);Yn=Cn>kr+10?0<=Dt?Yn.ab(jr):jr.ab(Yn):kr>Cn+10?0<=Dt?Ft.ab(dn):dn.ab(Ft):0<=Dt?Yn.ab(dn):dn.ab(Yn)}else Yn=0<=Dt?jr.ab(Ft):Ft.ab(jr);_n!==$a&&(dn=ue.computeAngle(At,_n,Yn),At.Kb=dn),dn=jr.x+(Ft.x-jr.x)*It-y.x,jr=jr.y+(Ft.y-jr.y)*It-y.y}At.measure(1/0,1/0,0,0),Ft=At.measuredBounds,Cn=At.naturalBounds;var wi=0;At instanceof Ur&&(wi=At.strokeWidth),kr=Cn.width+wi;var Ki=Cn.height+wi;Qe.reset(),Qe.translate(-Ft.x,-Ft.y),Qe.scale(At.scale,At.scale),Qe.rotate(_n===$a?At.angle:Yn,kr/2,Ki/2),_n!==rg&&_n!==og||Qe.rotate(90,kr/2,Ki/2),_n!==ig&&_n!==ag||Qe.rotate(-90,kr/2,Ki/2),_n===$m&&(45<Yn&&135>Yn||225<Yn&&315>Yn)&&Qe.rotate(-Yn,kr/2,Ki/2),Cn=new Xt(0,0,kr,Ki),rt.xi(Cn,Wt),Qe.Ga(rt),Wt=-rt.x+wi/2*At.scale,At=-rt.y+wi/2*At.scale,Tt.assign(rr),wi=isNaN(rr.x);var Jo=isNaN(rr.y);if(wi||Jo){kr=kr/2+3,Ki=Ki/2+3;var ea=45<=Yn&&135>=Yn,Ia=225<=Yn&&315>=Yn;_n===$a&&(ea||Ia)?(Tt.x=Jo?kr:rr.y,Tt.y=wi?Ki:rr.x,ea?0<=Dt||isNaN(Dt)&&.5>It||!wi||(Tt.y=-Ki):Ia&&((0<=Dt||isNaN(Dt)&&.5>It)&&wi&&(Tt.y=-Ki),Jo&&(Tt.x=-kr))):(wi&&(Tt.x=0<=Dt||isNaN(Dt)&&.5>It?kr:-kr),Jo&&(Tt.y=-Ki),Tt.rotate(Yn))}else Tt.rotate(Yn);dn+=Tt.x,jr+=Tt.y,Cn.set(Ft),Cn.h(dn+Wt,jr+At,Ft.width,Ft.height),Ze.push(Cn),x.ed(Cn)}}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),Ni(E,x.width||0,x.height||0),Cr.free(Qe),st.free(rt),st.free(Tt)}}}},bm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof yi||a instanceof En){var b=a,E=null;a instanceof yi&&(E=a,b=E.adornedPart);var ee=a instanceof yi?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 En)for(ee=a.labelNodes;ee.next();){var Me=a;ne=ee.value,ae=ne.segmentIndex,ue=ne.segmentFraction;var ze=ne.alignmentFocus;if(ge=ne.segmentOrientation,ye=ne.segmentOffset,isNaN(ae)){var Ze=Me.ua,Qe=Un();Ze.Qu(ue,Qe);var rt=st.allocAt(Qe[0],Qe[1]);rt.add(Me.i(0)),Ze.type===bn.j||(Ze=Ze.figures.first()),rt.offset(-Ze.startX,-Ze.startY),Ze=Qe[2],ge!==$a&&(Me=Me.computeAngle(ne,ge,Ze),ne.angle=Me),Me=rt.x;var Tt=rt.y;st.free(rt),Rn(Qe)}else if(ae<-x||ae>=x)Qe=st.alloc(),Ze=Me,Tt=Qe,Ze.vg(),Ze.computeMidPoint(Tt),Ze=Me.midAngle,ge!==$a&&(Me=Me.computeAngle(ne,ge,Ze),ne.angle=Me),Me=Qe.x,Tt=Qe.y,st.free(Qe);else{if(rt=0,0<=ae?(Qe=y.s[ae],Tt=ae<x-1?y.s[ae+1]:Qe):(rt=x+ae,Qe=y.s[rt],Tt=0<rt?y.s[rt-1]:Qe),Qe.Xa(Tt)){0<=ae?(Ze=0<ae?y.s[ae-1]:Qe,rt=ae<x-2?y.s[ae+2]:Tt):(Ze=rt<x-1?y.s[rt+1]:Qe,rt=1<rt?y.s[rt-2]:Tt);var xt=Ze.Bf(Qe),At=Tt.Bf(rt);Ze=xt>At+10?0<=ae?Ze.ab(Qe):Qe.ab(Ze):At>xt+10?0<=ae?Tt.ab(rt):rt.ab(Tt):0<=ae?Ze.ab(rt):rt.ab(Ze)}else Ze=0<=ae?Qe.ab(Tt):Tt.ab(Qe);ge!==$a&&(Me=Me.computeAngle(ne,ge,Ze),ne.angle=Me),Me=Qe.x+(Tt.x-Qe.x)*ue,Tt=Qe.y+(Tt.y-Qe.y)*ue}if(ze.ys())ne.location=new st(Me,Tt);else{ze.Mc()&&(ze=Gr),Qe=Cr.alloc(),Qe.reset(),Qe.scale(ne.scale,ne.scale),Qe.rotate(ne.angle,0,0);var Ft=ne.naturalBounds;rt=Xt.allocAt(0,0,Ft.width,Ft.height),xt=st.alloc(),xt.xi(rt,ze),Qe.Ga(xt),ze=-xt.x,At=-xt.y;var Dt=Ft.width,It=Ft.height;Ft=st.alloc(),Ft.assign(ye);var Wt=isNaN(ye.x),_n=isNaN(ye.y);if(Wt||_n){Dt=Dt/2+3,It=It/2+3;var rr=45<=Ze&&135>=Ze,Yn=225<=Ze&&315>=Ze;ge===$a&&(rr||Yn)?(Ft.x=_n?Dt:ye.y,Ft.y=Wt?It:ye.x,rr?0<=ae||isNaN(ae)&&.5>ue||!Wt||(Ft.y=-It):Yn&&((0<=ae||isNaN(ae)&&.5>ue)&&Wt&&(Ft.y=-It),_n&&(Ft.x=-Dt))):(Wt&&(Ft.x=0<=ae||isNaN(ae)&&.5>ue?Dt:-Dt),_n&&(Ft.y=-It),Ft.rotate(Ze))}else Ft.rotate(Ze);Me+=Ft.x,Tt+=Ft.y,Qe.pp(rt),ze+=rt.x,At+=rt.y,ae=st.allocAt(Me+ze,Tt+At),ne.move(ae),st.free(ae),st.free(Ft),st.free(xt),Xt.free(rt),Cr.free(Qe)}}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(_s(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof yi&&a.type===Sn.Link&&a.adornedObject instanceof Ur&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof En&&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 yi&&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 Vp(){this.xa="Base"}Ht(Vp,Ho),Vp.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 Me=ae.measuredBounds,ze=new Xt(-ue.left,-ue.top,Math.max(Me.width+ge,0),Math.max(Me.height+ye,0));a.graduatedBounds.push(ze),E.assign(ze);for(var Ze=ae.geometry,Qe=ae.strokeWidth,rt=Ze.flattenedSegments,Tt=Ze.flattenedLengths,xt=Ze.flattenedTotalLength,At=rt.length,Ft=0,Dt=0,It=Un(),Wt=0;Wt<At;Wt++){var _n=rt[Wt],rr=[];Dt=Ft=0;for(var Yn=_n.length,Cn=0;Cn<Yn;Cn+=2){var dn=_n[Cn],jr=_n[Cn+1];if(Cn!==0){var kr=180*Math.atan2(jr-Dt,dn-Ft)/Math.PI;0>kr&&(kr+=360),rr.push(kr)}Ft=dn,Dt=jr}It.push(rr)}if(a.graduatedIntervals===null){for(var wi=[],Ki=a.O.s,Jo=Ki.length,ea=0;ea<Jo;ea++){var Ia=Ki[ea],Qo=[];if(wi.push(Qo),Ia.visible){var Nh=Ia.interval;if(!(0>Nh)){for(var Lo=0;Lo<Jo;Lo++)if(Lo!==ea){var Gl=Ki[Lo];if(Gl.visible&&Ia.constructor===Gl.constructor){var _a=Gl.interval;_a>Nh&&Qo.push(_a)}}}}}a.graduatedIntervals=wi}var Ah=a.graduatedIntervals,Hs=a.O.s,ml=Hs.length,Ls=0,ys=0,mc=xt;a.graduatedMarks=[];for(var Ul,$d=0;$d<ml;$d++){var Ns=Hs[$d];if(Ul=[],Ns.visible&&Ns!==ae){var za=Math.abs(Ns.interval),Ng=a.graduatedTickUnit;if(!(2>Ng*za*xt/a.graduatedRange&&Ns.graduatedSkip===null)){var Kf=Tt[0][0],ou=0,Ss=0;ys=xt*Ns.graduatedStart-1e-4,mc=xt*Ns.graduatedEnd+1e-4;var tf=Ng*za,As=a.graduatedTickBase;if(As<a.graduatedMin){var vc=(a.graduatedMin-As)/tf;vc=vc%1===0?vc:Math.floor(vc+1),As+=vc*tf}else As>a.graduatedMin+tf&&(As-=Math.floor((As-a.graduatedMin)/tf)*tf);for(var zv=Ah[$d],Ag=As,Gy=1e-6*a.graduatedMax,Lu=1;As<=a.graduatedMax+Gy;Lu++){e:{for(var Xu=zv.length,Zf=0;Zf<Xu;Zf++){var yc=(As-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&&(As>a.graduatedMax&&(As=a.graduatedMax),Ns.graduatedSkip===null||Ns instanceof Zi&&!Ns.graduatedSkip(As,Ns)||Ns instanceof Ur&&!Ns.graduatedSkip(As,Ns))&&(Ls=(As-a.graduatedMin)*xt/a.graduatedRange,Ls>xt&&(Ls=xt),ys<=Ls&&Ls<=mc)){for(var Nu=It[ou][Ss],jh=Tt[ou][Ss];ou<Tt.length;){for(;Ls>Kf&&Ss<Tt[ou].length-1;)Ss++,Nu=It[ou][Ss],jh=Tt[ou][Ss],Kf+=jh;if(Ls<=Kf)break;ou++,Ss=0,Nu=It[ou][Ss],jh=Tt[ou][Ss],Kf+=jh}var xs=rt[ou],au=xs[2*Ss],Gv=xs[2*Ss+1],Yu=(Ls-(Kf-jh))/jh,ep=new st(au+(xs[2*Ss+2]-au)*Yu+Qe/2-Ze.bounds.x,Gv+(xs[2*Ss+3]-Gv)*Yu+Qe/2-Ze.bounds.y);ep.scale(ae.scale,ae.scale);e:{var Hl=Nu,nf=It[ou];if(!(.5005>Yu&&.4995<Yu)){var su=Hl;if(.5>Yu?0<Ss?su=nf[Ss-1]:zt.$(xs[0],xs[xs.length-2])&&zt.$(xs[1],xs[xs.length-1])&&(su=nf[nf.length-1]):.5<Yu&&(Ss+1<nf.length?su=nf[Ss+1]:zt.$(xs[0],xs[xs.length-2])&&zt.$(xs[1],xs[xs.length-1])&&(su=nf[0])),Hl!==su){var Xf=Math.abs(Hl-su);if(180<Xf&&(Hl<su?Hl+=360:su+=360,Xf=Math.abs(Hl-su)),5e-4>Yu||.9995<Yu){Nu=(Hl+su)/2%360;break e}if(10>Xf){var tp=1-Math.abs(.5-Yu);Nu=(Hl*tp+su*(1-tp))%360;break e}}}Nu=Hl}if(Ns instanceof Zi){var Nl="";Ns.graduatedFunction!==null?(Nl=Ns.graduatedFunction(As,Ns),Nl=Nl!=null?Nl.toString():""):Nl=(+As.toFixed(2)).toString(),Nl!==""&&Ul.push({$l:ep,angle:Nu,text:Nl})}else Ul.push({$l:ep,angle:Nu})}As=Ag+Lu*tf}}}a.graduatedMarks.push(Ul)}Rn(It);var ca=a.graduatedMarks;if(ca!==null)for(var jg=b.length,rs=0;rs<jg;rs++){var No=b[rs],is=ca[rs];if(No.visible&&No!==ae&&is.length!==0){if(No instanceof Ur){var Ju=a,Oh=E,rf=No.alignmentFocus;rf.Mc()&&(rf=bi);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=Xt.allocAt(0,0,np,of),ws=st.alloc();ws.xi(Yf,rf),Xt.free(Yf);for(var Qu=-ws.x,Wl=-ws.y,rl=new Xt,xc=is.length,rp=0;rp<xc;rp++)for(var wc=is[rp],Hv=wc.$l.x,ip=wc.$l.y,So=wc.angle,Al=0;4>Al;Al++){switch(Al){case 0:ws.h(Qu,Wl);break;case 1:ws.h(Qu+np,Wl);break;case 2:ws.h(Qu,Wl+of);break;case 3:ws.h(Qu+np,Wl+of)}ws.rotate(So+No.angle),ws.offset(Hv,ip),rp===0&&Al===0?rl.h(ws.x,ws.y,0,0):rl.Ye(ws),ws.offset(-Hv,-ip),ws.rotate(-So-No.angle)}st.free(ws),Ju.graduatedBounds!==null&&Ju.graduatedBounds.push(rl),li(Oh,rl.x,rl.y,rl.width,rl.height)}else if(No instanceof Zi){var vl=a,Wv=E;vl.temporaryTextBlock===null&&(vl.temporaryTextBlock=new Zi);var js=vl.temporaryTextBlock;S1(js,No);var Fh=No.alignmentFocus;Fh.Mc()&&(Fh=bi);for(var yl=No.segmentOrientation,op=No.segmentOffset,bc=new Xt,Og=0,ap=0,lu=0,af=0,Pc=0,sp=is.length,Dh=0;Dh<sp;Dh++){var Au=is[Dh];Og=Au.$l.x,ap=Au.$l.y,lu=Au.angle,Pc=af=No.angle,yl!==$a&&(Pc=yl===ng||yl===Qm?lu+No.angle:lu,af=En.computeAngle(yl,Pc)),js.Kb=af,js.text=Au.text||"",js.measure(1/0,1/0,0,0);var Bh=js.measuredBounds,$u=js.naturalBounds,Rh=$u.width,sf=$u.height,Vl=Cr.alloc();Vl.reset(),Vl.translate(-Bh.x,-Bh.y),Vl.scale(js.scale,js.scale),Vl.rotate(Pc,Rh/2,sf/2),yl!==rg&&yl!==og||Vl.rotate(90,Rh/2,sf/2),yl!==ig&&yl!==ag||Vl.rotate(-90,Rh/2,sf/2),yl===$m&&(45<lu&&135>lu||225<lu&&315>lu)&&Vl.rotate(-lu,Rh/2,sf/2);var Jf=Xt.allocAt(0,0,Rh,sf),Ih=st.alloc();Ih.xi(Jf,Fh),Vl.Ga(Ih);var Qf=-Ih.x,Hy=-Ih.y,qu=st.alloc();qu.assign(op),isNaN(qu.x)&&(qu.x=Rh/2+3),isNaN(qu.y)&&(qu.y=-(sf/2+3)),qu.rotate(lu),Og+=qu.x+Qf,ap+=qu.y+Hy;var lf=new Xt(Og,ap,Bh.width,Bh.height),Fg=new Xt(Bh.x,Bh.y,Bh.width,Bh.height),Wy=new Xt($u.x,$u.y,$u.width,$u.height);Au.Sz=af,Au.lineCount=js.lineCount,Au.lines=[js.Cb,js.Ih,js.df,js.Le,js.Qc,js.Qb,js.ze],Au.actualBounds=lf,Au.measuredBounds=Fg,Au.naturalBounds=Wy,Dh===0?bc.assign(lf):bc.ed(lf),st.free(qu),st.free(Ih),Xt.free(Jf),Cr.free(Vl)}vl.graduatedBounds!==null&&vl.graduatedBounds.push(bc),li(Wv,bc.x,bc.y,bc.width,bc.height)}Bo(No,!1)}}},Vp.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}}},Vp.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 ks,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,Me=0;Me<ye;Me++){var ze=ue[Me],Ze=ge[Me],Qe=Ze.length;if(ze.visible&&ze!==ee&&Ze.length!==0){if(ze instanceof Ur){if(!(2>a.graduatedTickUnit*ze.interval*ee.geometry.flattenedTotalLength/a.graduatedRange*ne&&ze.graduatedSkip===null)){var rt=ze.measuredBounds,Tt=ze.strokeWidth*ze.scale,xt=ze.alignmentFocus;xt.Mc()&&(xt=bi);for(var At=0;At<Qe;At++){var Ft=Ze[At].$l,Dt=Ze[At].angle,It=xt,Wt=ze.Ab;Wt.reset(),Wt.translate(Ft.x+ae.x,Ft.y+ae.y),Wt.rotate(Dt+ze.angle,0,0),Wt.translate(-rt.width*It.x+It.offsetX+Tt/2,-rt.height*It.y+It.offsetY+Tt/2),Wt.scale(ze.scale,ze.scale),cl(ze,!1),ze.wh.set(ze.Ab),ze.Kk=ze.scale,Ys(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),rt=a.temporaryTextBlock,S1(rt,ze),Tt=0;Tt<Qe;Tt++)xt=Ze[Tt],xt.actualBounds&&xt.measuredBounds&&xt.naturalBounds&&(rt.ec=xt.text||"",rt.Kb=xt.Sz||0,rt.Gc=xt.lineCount||0,At=xt.lines,At!==void 0&&(rt.Cb=At[0],rt.Ih=At[1],rt.df=At[2],rt.Le=At[3],rt.Qc=At[4],rt.Qb=At[5],rt.ze=At[6]),xt.naturalBounds&&(rt.dc=xt.naturalBounds),xt.actualBounds&&(At=xt.actualBounds,rt.arrange(At.x,At.y,At.width,At.height)),At=xt.actualBounds,rt.arrange(At.x,At.y,At.width,At.height),Ft=xt.measuredBounds,xt=xt.naturalBounds,Dt=rt.Ab,Dt.reset(),Dt.translate(At.x+ae.x,At.y+ae.y),Dt.translate(-Ft.x,-Ft.y),rt.no(Dt,xt.x,xt.y,xt.width,xt.height),cl(rt,!1),rt.wh.set(rt.Ab),rt.Kk=rt.scale,Ys(rt,!1),rt.Ng=ze.part,rt.Me=ze.panel,rt.gc(y,x),rt.Me=null,rt.Ng=null,E&&(a.svg.appendChild(rt.svg),rt.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Sn(a,y){if(_t.call(this),this.na=null,a===void 0)this.na=Sn.Position;else if(typeof a=="string"){var x=Cl.I(a);x!==null&&(this.na=x)}else a instanceof Ho?this.na=a:a&&(this.na=Sn.Position,y=a);this.na===null&&Ot("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Sn.Grid?1048576:0),this.O=new on,this.yb=ta,this.Tm=Zo,this.Uf=Br,this.$g=null,this.$e="",this.jg=new Xt(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=lr,this.jn=Mi,this.kn=On,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Ht(Sn,_t),Sn.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},Sn.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},Sn.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 Wn&&(ee.Te=!0);var ae=a.diagram;ae!==null&&ae.undoManager.isUndoingRedoing||ee.cb(wo,"elements",a,null,E,null,ne)}}return a}return null},et=Sn.prototype,et.toString=function(){return"Panel("+this.type.name+")#"+Yr(this)},et.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)},et.hh=function(a,y){if(this.na===Sn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Sn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Sn.Table)if(a.yc(),a instanceof ks){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===Sn.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 Me=ge.separatorStroke;if(Me===null&&(Me=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ye!==0&&Me!==null){mo(a,y,Me,!1,!1,ne,ee),Me=!1;var ze=ge.separatorDashArray;ze===null&&(ze=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),ze!==null&&(Me=!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(),Me&&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 Me=b[ye];if(Me!==void 0&&Me.background!==null&&Me.coversSeparators!==E&&Me.actual!==0){var ze=x?ne.height:ne.width;if(!(Me.position>ze)){var Ze=Me.Wc(),Qe=Me.separatorStrokeWidth;isNaN(Qe)&&(Qe=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var rt=Me.separatorStroke;rt===null&&(rt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(rt===null||Me.index===(x?ue:ge))&&(Qe=0),Ze-=Qe,Qe=Me.position+Qe,Ze+=Me.actual,Qe+Ze>ze&&(Ze=ze-Qe),0>=Ze||(ze=a.yb,mo(a,y,Me.background,!0,!1,ae,ne),x?y.fillRect(ze.left,Qe+ze.top,ne.width-(ze.left+ze.right),Ze):y.fillRect(Qe+ze.left,ze.top,Ze,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"}et.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},et.kk=function(a,y,x){if(!_t.prototype.kk.call(this,a,y,x))return!1;if(this.type===Sn.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===Sn.Grid||this.na===Sn.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},et.nk=function(){return!0},et.$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)},et.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,Me=ne.m11*ae,ze=ae*(ne.m21*ne.dy-ne.m22*ne.dx),Ze=ae*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,zt.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*Me+Ze,a=x*ue+b*ye+ze,ue=x*ge+b*Me+Ze,E.h(0,0),x=this.naturalBounds,ee=zt.Ff(0,0,x.width,x.height,ee,ae,a,ue,E),E.transform(ne),ee;ee||(ue=1,ye=ge=0,Me=1,Ze=ze=0),ae=a*ue+y*ye+ze,a=a*ge+y*Me+Ze,ue=x*ue+b*ye+ze,x=x*ge+b*Me+Ze,E.h(ue,x),b=(ue-ae)*(ue-ae)+(x-a)*(x-a),ge=!1,Me=this.O.s,Ze=Me.length,ye=st.alloc(),ze=null,y=1/0;var Qe=null,rt=this.isClipping&&this.na===Sn.Spot;rt&&(Qe=st.alloc(),ze=this.Pb(),(ge=ze.Sj(ae,a,ue,x,Qe))&&(y=(ae-Qe.x)*(ae-Qe.x)+(a-Qe.y)*(a-Qe.y)));for(var Tt=0;Tt<Ze;Tt++){var xt=Me[Tt];xt.visible&&xt!==ze&&xt.Sj(ae,a,ue,x,ye)&&(ge=!0,xt=(ae-ye.x)*(ae-ye.x)+(a-ye.y)*(a-ye.y),xt<b&&(b=xt,E.set(ye)))}return rt&&(y>b&&E.set(Qe),st.free(Qe)),st.free(ye),ee&&E.transform(ne),ge},et.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();_t.prototype.Gj.call(this)},et.v=function(a){if(!_s(this)){_t.prototype.v.call(this,a),a=null,(this.na===Sn.Auto||this.na===Sn.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=ss(E,!1);(E instanceof Qa||E instanceof Sn||E instanceof Zi||ee!==gn)&&E.v(!0)}}}},et.Uj=function(){if(!_s(this)){Bo(this,!0),yu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},et.Uk=function(){if(!(this.l&2048)){cl(this,!0),Ys(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},et.Wu=function(){Ys(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},et.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),Ni(E,a,ue),Ni(this.naturalBounds,a,ue),this.Ge(0,0,a,ue)},et.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}et.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=ss(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=gn),a){case gn:(y>x||ee>b)&&(this.v(),this.measure(y>x?x:y,ee>b?b:ee,0,0));break;case yn:this.v(!0),this.measure(x+ae,b+ne,0,0);break;case pr:this.v(!0),this.measure(x+ae,ee+ne,0,0);break;case wr:this.v(!0),this.measure(y+ae,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},et.gh=function(a){var y=this.naturalBounds,x=Vu(this);if(Ji(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)&&(Mn(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},et.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},et.qm=function(a,y){if(y(this,a),a instanceof Sn){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 Sn&&s1(a,ee,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Sn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}et.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Sn){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}et.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Kp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Sn){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 Sn?x=Math.max(x,h1(E)):E instanceof Ur&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}et.se=function(){return!(this.type===Sn.TableRow||this.type===Sn.TableColumn)};function xh(a){return a.type===Sn.TableRow||a.type===Sn.TableColumn}et.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Ya(this)))return null;var b=this.naturalBounds,E=1/this.Df(),ee=this.se(),ne=ee?a:Mn(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),Ji(-(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===Sn.Spot)?this.Pb():null,ue&&(ge.se()?Mn(ae.set(a),ge.transform):ae.set(a),!ge.ca(ae)))return st.free(ae),ee||st.free(ne),null;for(var Me=Vu(this);ye--;){var ze=E[ye];if((ze.visible||ze===Me)&&(ze.se()?Mn(ae.set(a),ze.transform):ae.set(a),!ue||ze!==ge)){var Ze=null;if(ze instanceof Sn?Ze=ze.ic(ae,y,x):ze.pickable===!0&&ze.ca(ae)&&(Ze=ze),Ze!==null&&(y!==null&&(Ze=y(Ze)),Ze!==null&&(x===null||x(Ze))))return st.free(ae),ee||st.free(ne),Ze}}st.free(ae)}return this.background===null&&this.areaBackground===null?(ee||st.free(ne),null):(a=Ji(0,0,b.width,b.height,ne.x,ne.y)?this:null,ee||st.free(ne),a)}return ee||st.free(ne),null},et.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:Mn(st.allocAt(a.x,a.y),this.transform);if(E=Ji(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 Me=ae[ue];if(Me.visible||Me===ye){Me.se()?Mn(ge.set(a),Me.transform):ge.set(a);var ze=Me;Me=Me instanceof Sn?Me:null,(Me!==null?Me.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},et.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=Cr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return v0(this,y,x,E),ee===void 0&&Cr.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 Me=ye.actualBounds,ze=this.naturalBounds;Me.x>ze.width||Me.y>ze.height||0>Me.x+Me.width||0>Me.y+Me.height||(Me=ye,ye=ye instanceof Sn?ye:null,ze=Cr.alloc(),ze.set(ne),(ye!==null?ye.Cf(a,y,x,b,E,ze):Yo(Me,a,b,ze))&&(y!==null&&(Me=y(Me)),Me===null||x!==null&&!x(Me)||E.add(Me)),Cr.free(ze))}}return ee===void 0&&Cr.free(ne),b}return ee===void 0&&Cr.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 Sn&&v0(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}et.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:Mn(st.allocAt(a.x,a.y),this.transform),ge=ae?y:Mn(st.allocAt(y.x,y.y),this.transform),ye=ue.Bf(ge),Me=0<ue.x&&ue.x<ne.width&&0<ue.y&&ue.y<ne.height||Kn(ue.x,ue.y,0,0,0,ne.height)<=ye||Kn(ue.x,ue.y,0,ne.height,ne.width,ne.height)<=ye||Kn(ue.x,ue.y,ne.width,ne.height,ne.width,0)<=ye||Kn(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)),Me){if(!this.isAtomic){ue=st.alloc(),ge=st.alloc(),ye=Vu(this);for(var ze=this.O.s,Ze=ze.length;Ze--;){var Qe=ze[Ze];if(Qe.visible||Qe===ye){var rt=Qe.actualBounds,Tt=this.naturalBounds;(!ae||!(rt.x>Tt.width||rt.y>Tt.height||0>rt.x+rt.width||0>rt.y+rt.height))&&(Qe.se()?(rt=Qe.transform,Mn(ue.set(a),rt),Mn(ge.set(y),rt)):(ue.set(a),ge.set(y)),rt=Qe,Qe=Qe instanceof Sn?Qe:null,(Qe!==null?Qe.og(ue,ge,x,b,E,ee):rt.tx(ue,ge,E))&&(x!==null&&(rt=x(rt)),rt===null||b!==null&&!b(rt)||ee.add(rt)))}}st.free(ue),st.free(ge)}return E?Me:ne}return!1};function y0(a){var y=null;return a instanceof Ur&&(y=a.spot1,y===Zo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=ni),y}function S0(a){var y=null;return a instanceof Ur&&(y=a.spot2,y===Zo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Ri),y}et.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},et.M=function(a){return this.O.M(a)},et.Gb=function(a,y){y instanceof Sr&&Ot("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Ot("Cannot make a Panel contain itself: "+this.toString()),Ot("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Ot("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!==Sn.Grid||y instanceof Ur||Ot("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Sn.Graduated||y instanceof Ur||y instanceof Zi||Ot("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 Vt),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 Ot("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),_s(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Sn&&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 Wn&&(x.Te=!0),x.Te&&x instanceof Wn&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(Eo,"elements",this,y,null,b,null),x.cb(wo,"elements",this,null,y,null,a)))};function x0(a,y){a.l=y?a.l|16777216:a.l&-16777217}et.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)},et.mb=function(a){0<=a&&this.pc(a,!0)},et.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 Wn&&(b instanceof Sn?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))},et.Fb=function(a){0>a&&Dn(a,">= 0",Sn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Ro;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(wo,"rowdefs",this,null,x,null,a)}return y[a]},et.oA=function(a){if(0>a&&Dn(a,">= 0",Sn,"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 Ro?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}et.Eb=function(a){0>a&&Dn(a,">= 0",Sn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Ro;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(wo,"coldefs",this,null,x,null,a)}return y[a]},et.jA=function(a){if(0>a&&Dn(a,">= 0",Sn,"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 Ro?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}et.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},et.Hy=function(a,y){return(a=this.Fb(a))&&km(a,new Ro(y)),this},et.By=function(a,y){return(a=this.Eb(a))&&km(a,new Ro(y)),this},et.nz=function(a){if(0>a||this.type!==Sn.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},et.fz=function(a){if(0>a||this.type!==Sn.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},et.Fz=function(a,y){if(y===void 0&&(y=new st(NaN,NaN)),this.type!==Sn.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)},et.Gz=function(a){if(this.type!==Sn.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 dl(a){var y=a.allBindings;if(y===null)a.data!==null&&Ot("Template cannot have .data be non-null: "+a),a.allBindings=y=new on;else if(y._isFrozen)return;var x=new on;x0(a,!1),a.qm(a,function(ge,ye){ye.th();var Me=ye.localBindings;if(Me!==null)for(Af(ye,!1),Me=Me.iterator;Me.next();){var ze=Me.value;ze.mode===pg&&Af(ye,!0);var Ze=ze.sourceName;Ze!==null&&(Ze==="/"&&x0(ge,!0),Ze=TS(ze,ge,ye),Ze!==null&&(x.add(Ze),Ze.srcBindings===null&&(Ze.srcBindings=new on),Ze.srcBindings.add(ze))),y.add(ze)}if(ye instanceof Sn&&ye.type===Sn.Table){if(0<ye.rowCount){for(ge=ye.rowDefs,Me=ge.length,ze=0;ze<Me;ze++)if(Ze=ge[ze],Ze!==void 0&&Ze.be!==null)for(var Qe=Ze.be.iterator;Qe.next();){var rt=Qe.value;rt.xd=Ze,rt.to=2,rt.wl=Ze.index,y.add(rt)}}if(0<ye.columnCount){for(ye=ye.colDefs,ge=ye.length,Me=0;Me<ge;Me++)if(ze=ye[Me],ze!==void 0&&ze.be!==null)for(Ze=ze.be.iterator;Ze.next();)Qe=Ze.value,Qe.xd=ze,Qe.to=1,Qe.wl=ze.index,y.add(Qe)}}});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 on),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 Sn&&(ne=ae.substring(0,ue),ae=ae.substr(ue+1),ue=ee.fb(ne),ue!==null?(ee=ue,E.targetProperty=ae):Tn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),ee instanceof Ro?(ne=Yr(ee.panel),E.Ai=ne===void 0?-1:ne,ee.panel.bindingId=E.Ai):ee instanceof _t?(ne=Yr(ee),E.Ai=ne===void 0?-1:ne,ee.bindingId=E.Ai):Ot("Unknown type of binding target: "+ee)}y.freeze(),a instanceof Sr&&a.Zc()&&a.Va()}et.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Sn&&(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&&dl(y),y},et.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 Sn))continue;E===1?ee=ee.Eb(x.wl):E===2&&(ee=ee.Fb(x.wl))}ee!==void 0&&x.Mv(ee,b)}}},et.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 Sn&&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 Sn)||ee.data!==y[ne])return!0;E++,ne++}return!1}function Kp(a){if(a.type===Sn.Spot||a.type===Sn.Auto)return Math.min(a.O.length,1);if(a.type===Sn.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===Sn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Sn&&xh(a))?1:0}et.mv=function(){for(var a=Kp(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=Kp(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 Sn){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),_s(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 Wn&&(y.Te=!0),y.Te&&y instanceof Wn&&(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(dl(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 Vt),a.ge.add(y,E)),ee=x+Kp(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 Sn){var E=y,ee=x;b.type===Sn.TableRow?b.row=E:b.type===Sn.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=Co(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Ot("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,Tn('No item template Panel found for category "'+y+'" on '+a),Tn(" Using default item template."),a=new Sn,y=new Zi,y.bind(new Mo("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 Sn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var ee=y[E];x&&ee instanceof Sn&&!ee.isEnabled||Em(a,ee,x)}}}function ru(a,y){y.name=a,Cl.add(a,y)}rn.Object.defineProperties(Sn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Sn.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&&Dn(a,">= 0",Sn,"padding"),a=new Wr(a)):(0>a.left&&Dn(a.left,">= 0",Sn,"padding:value.left"),0>a.right&&Dn(a.right,">= 0",Sn,"padding:value.right"),0>a.top&&Dn(a.top,">= 0",Sn,"padding:value.top"),0>a.bottom&&Dn(a.bottom,">= 0",Sn,"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:ta},set:function(a){typeof a=="number"&&(a=new Wr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new $s),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 ji)&&(a instanceof ji&&a.freeze(),this.T===null&&(this.T=new $s),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 $s),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)||Ot("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 $s),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 ji)&&(a instanceof ji&&a.freeze(),this.T===null&&(this.T=new $s),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 $s),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)||Ot("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 $s),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 $s),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||Ot("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&eu(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()||Ot("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&eu(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 Ku),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),pa(this)&&(a=this.part,a!==null&&to(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 Ku),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),pa(this)&&(a=this.part,a!==null&&to(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 Ku),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 Ku),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 Ku,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 Ku,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 Ku,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 Ku,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 $s),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new $s),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Mm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new $s),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Mm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new $s),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)&&Ot("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new $s),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)&&Ot("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new $s),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 yi);dl(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof En?(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 Vt}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Sr||a.isPanelMain)&&Ot("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(););Vr(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&&(Vr(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 Or&&(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))}}}),rn.Object.defineProperties(Sn,{Position:{get:function(){return Cl.I("Position")}},Horizontal:{get:function(){return Cl.I("Horizontal")}},Vertical:{get:function(){return Cl.I("Vertical")}},Spot:{get:function(){return Cl.I("Spot")}},Auto:{get:function(){return Cl.I("Auto")}},Table:{get:function(){return Cl.I("Table")}},Viewbox:{get:function(){return Cl.I("Viewbox")}},TableRow:{get:function(){return Cl.I("TableRow")}},TableColumn:{get:function(){return Cl.I("TableColumn")}},Link:{get:function(){return Cl.I("Link")}},Grid:{get:function(){return Cl.I("Grid")}},Graduated:{get:function(){return Cl.I("Graduated")}}}),Sn.prototype.rebuildItemElements=Sn.prototype.mv,Sn.prototype.findItemPanelForData=Sn.prototype.sx,Sn.prototype.updateTargetBindings=Sn.prototype.La,Sn.prototype.copyTemplate=Sn.prototype.Uy,Sn.prototype.graduatedValueForPoint=Sn.prototype.Gz,Sn.prototype.graduatedPointForValue=Sn.prototype.Fz,Sn.prototype.findColumnForLocalX=Sn.prototype.fz,Sn.prototype.findRowForLocalY=Sn.prototype.nz,Sn.prototype.addColumnDefinition=Sn.prototype.By,Sn.prototype.addRowDefinition=Sn.prototype.Hy,Sn.prototype.addRowColumnDefinition=Sn.prototype.Gy,Sn.prototype.removeColumnDefinition=Sn.prototype.jA,Sn.prototype.getColumnDefinition=Sn.prototype.Eb,Sn.prototype.removeRowDefinition=Sn.prototype.oA,Sn.prototype.getRowDefinition=Sn.prototype.Fb,Sn.prototype.removeAt=Sn.prototype.mb,Sn.prototype.remove=Sn.prototype.remove,Sn.prototype.insertAt=Sn.prototype.Gb,Sn.prototype.elt=Sn.prototype.M,Sn.prototype.add=Sn.prototype.add,Sn.prototype.findObject=Sn.prototype.fb,Sn.prototype.findInVisualTree=Sn.prototype.Nl,Sn.prototype.walkVisualTreeFrom=Sn.prototype.qm,Sn.prototype.findMainElement=Sn.prototype.Pb;var g1=!1,m1=null,Cl=new Vt;Sn.className="Panel",Sn.definePanelLayout=ru,ru("Position",new fm),ru("Vertical",new pm),ru("Auto",new mm),ru("Link",new bm);function Ku(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Ku.prototype.copy=function(){var a=new Ku;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},Ku.className="GradPanelSettings";function $s(){this.Pc=[],this.Oc=[],this.j=this.ob=Mm,this.hb=this.Hb=0,this.Qp=ta,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}$s.prototype.copy=function(a){for(var y=new $s,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},$s.className="TablePanelSettings";function Ro(a){gr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Zo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=C0,this.hg=Br,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))}Ro.prototype.copy=function(){var a=new Ro;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=vr(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=vr(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}et=Ro.prototype,et.qb=function(a){a.classType===Ro&&(this.sizing=a)},et.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Yr(this)},et.wi=function(a){this.Me=a},et.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)},et.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Sn.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)},et.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(ro,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}et.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Mo(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&Ot("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new on),this.be.add(E),this},rn.Object.defineProperties(Ro.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&&Dn(a,">= 0",Ro,"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&&Dn(a,">= 0",Ro,"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))&&Dn(a,">= 0",Ro,"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&&Dn(a,">= 0",Ro,"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 Wr(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 ji&&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)||Ot("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 ji&&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}}}),Ro.prototype.computeEffectiveSpacing=Ro.prototype.Wc,Ro.prototype.computeEffectiveSpacingTop=Ro.prototype.Io;var C0=new Yt(Ro,"Default",0),Zp=new Yt(Ro,"None",1),Mm=new Yt(Ro,"ProportionalExtra",2);Ro.className="RowColumnDefinition",Ro.Default=C0,Ro.None=Zp,Ro.ProportionalExtra=Mm;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)}Ht(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=vr(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())}et=Ur.prototype,et.th=function(){_t.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},et.qb=function(a){a===gn||a===lr||a===ri||a===Br?this.geometryStretch=a:_t.prototype.qb.call(this,a)},et.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Yr(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,Me,ze,Ze,Qe,rt=0,Tt=Un(),xt=2;xt<E;xt+=2)ge=x[xt],ye=x[xt+1],Me=ge-ae,ae=ye-ue,Me===0&&(Me=.001),ze=ae/Me,Ze=Math.atan2(ae,Me),Qe=Math.sqrt(Me*Me+ae*ae),Tt.push([Me,Ze,ze,Qe]),rt+=Qe,ae=ge,ue=ye;ae=x[0],ue=x[1],Me=b.measuredBounds.width,b instanceof Ur&&(Me-=b.strokeWidth),1>Me&&(Me=1),E=x=Me,ge=ne/2,ye=ge!==0,xt=0,Qe=Tt[xt],Me=Qe[0],Ze=Qe[1],ze=Qe[2],Qe=Qe[3];for(var At=0;.1<=rt;){if(At===0&&(ye?(E=x,E-=ge,rt-=ge,ye=!1):E=x,E===0&&(E=1)),E>rt){Rn(Tt);return}E>Qe?(At=E-Qe,E=Qe):At=0;var Ft=Math.sqrt(E*E/(1+ze*ze));if(0>Me&&(Ft=-Ft),ae+=Ft,ue+=ze*Ft,a.translate(ae,ue),a.rotate(Ze),a.translate(-(ne/2),-(ee/2)),At===0&&b.hh(a,y),a.translate(ne/2,ee/2),a.rotate(-Ze),a.translate(-ae,-ue),rt-=E,Qe-=E,At!==0){if(xt++,xt===Tt.length){Rn(Tt);return}Qe=Tt[xt],Me=Qe[0],Ze=Qe[1],ze=Qe[2],Qe=Qe[3],E=At}}Rn(Tt)}}et.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&&mo(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===Sn.Link&&ae instanceof yi&&ae.category==="Selection"&&ae.adornedObject instanceof Ur&&ae.adornedPart.Pb()===ae.adornedObject?ae.adornedObject.strokeWidth:0),ue===0&&(x=null),x!==null&&ue!==0&&(mo(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===bn.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===bn.u){var ge=E.startX;ue=E.startY;var ye=E.endX,Me=E.endY;E=Math.min(ge,ye);var ze=Math.min(ue,Me);ge=Math.abs(ye-ge),ue=Math.abs(Me-ue),a.beginPath(),a.rect(E,ze,ge,ue),b!==null&&a.ng(b),x!==null&&(ae&&ee&&Su(a),a.jk(),ae&&ee&&Uu(a)),a.Se()}else if(E.type===bn.F)ge=E.startX,ue=E.startY,ye=E.endX,Me=E.endY,E=Math.abs(ye-ge)/2,ze=Math.abs(Me-ue)/2,ge=Math.min(ge,ye)+E,ue=Math.min(ue,Me)+ze,a.beginPath(),a.moveTo(ge,ue-ze),a.bezierCurveTo(ge+zt.wg*E,ue-ze,ge+E,ue-zt.wg*ze,ge+E,ue),a.bezierCurveTo(ge+E,ue+zt.wg*ze,ge+zt.wg*E,ue+ze,ge,ue+ze),a.bezierCurveTo(ge-zt.wg*E,ue+ze,ge-E,ue+zt.wg*ze,ge-E,ue),a.bezierCurveTo(ge-E,ue-zt.wg*ze,ge-zt.wg*E,ue-ze,ge,ue-ze),a.closePath(),b!==null&&a.ng(b),x!==null&&(ae&&ee&&Su(a),a.jk(),ae&&ee&&Uu(a)),a.Se();else if(E.type===bn.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,Me=ye.length;for(var Ze=null,Qe=0;Qe<Me;Qe++){var rt=ye[Qe];switch(rt.type){case Fo:a.moveTo(rt.endX,rt.endY);break;case Ui:a.lineTo(rt.endX,rt.endY);break;case Go:a.bezierCurveTo(rt.point1X,rt.point1Y,rt.point2X,rt.point2Y,rt.endX,rt.endY);break;case ps:a.quadraticCurveTo(rt.point1X,rt.point1Y,rt.endX,rt.endY);break;case xo:if(rt.radiusX===rt.radiusY){var Tt=Math.PI/180;a.arc(rt.point1X,rt.point1Y,rt.radiusX,rt.startAngle*Tt,(rt.startAngle+rt.sweepAngle)*Tt,0>rt.sweepAngle,Ze!==null?Ze.endX:ge.startX,Ze!==null?Ze.endY:ge.startY)}else if(Ze=Ua(rt,ge),Tt=Ze.length,Tt===0)a.lineTo(rt.centerX,rt.centerY);else for(var xt=0;xt<Tt;xt++){var At=Ze[xt];xt===0&&a.lineTo(At[0],At[1]),a.bezierCurveTo(At[2],At[3],At[4],At[5],At[6],At[7])}break;case Cs:if(xt=Tt=0,Ze!==null&&Ze.type===xo){if(Ze=Ua(Ze,ge),At=Ze.length,At===0){a.lineTo(rt.endX,rt.endY);break}Ze=Ze[At-1]||null,Ze!==null&&(Tt=Ze[6],xt=Ze[7])}else Tt=Ze!==null?Ze.endX:ge.startX,xt=Ze!==null?Ze.endY:ge.startY;if(Ze=Ds(rt,ge,Tt,xt),Tt=Ze.length,Tt===0){a.lineTo(rt.endX,rt.endY);break}for(xt=0;xt<Tt;xt++)At=Ze[xt],a.bezierCurveTo(At[2],At[3],At[4],At[5],At[6],At[7]);break;default:Ot("Segment not of valid type: "+rt.type)}rt.isClosed&&a.closePath(),Ze=rt}ye=ge.isFilled,ee?ge.isShadowed?(ye===!0&&b!=="transparent"&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&(ye&&ae&&Su(a),a.jk(),ye&&ae&&Uu(a))):(Su(a),ye&&b!=="transparent"&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&a.jk(),Uu(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=Un(),ee.type===bn.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===bn.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,Me=0;Me<ye;Me++){switch(Qe=ge[Me],Qe.type){case Fo:Nd(a,y,b,x),b.length=0,b.push(Qe.endX),b.push(Qe.endY),ne=Qe.endX,E=Qe.endY,ue=ne,ze=E;break;case Ui:b.push(Qe.endX),b.push(Qe.endY),ne=Qe.endX,E=Qe.endY;break;case Go:zt.Qe(ne,E,Qe.point1X,Qe.point1Y,Qe.point2X,Qe.point2Y,Qe.endX,Qe.endY,.5,b),ne=Qe.endX,E=Qe.endY;break;case ps:zt.ep(ne,E,Qe.point1X,Qe.point1Y,Qe.endX,Qe.endY,.5,b),ne=Qe.endX,E=Qe.endY;break;case xo:if(rt=Ua(Qe,ae),Ze=rt.length,Ze===0){b.push(Qe.centerX),b.push(Qe.centerY),ne=Qe.centerX,E=Qe.centerY;break}for(Tt=0;Tt<Ze;Tt++)xt=rt[Tt],zt.Qe(ne,E,xt[2],xt[3],xt[4],xt[5],xt[6],xt[7],.5,b),ne=xt[6],E=xt[7];break;case Cs:if(rt=Ds(Qe,ae,ne,E),Ze=rt.length,Ze===0){b.push(Qe.endX),b.push(Qe.endY),ne=Qe.endX,E=Qe.endY;break}for(Tt=0;Tt<Ze;Tt++)xt=rt[Tt],zt.Qe(ne,E,xt[2],xt[3],xt[4],xt[5],xt[6],xt[7],.5,b),ne=xt[6],E=xt[7];break;default:Ot("Segment not of valid type: "+Qe.type)}Qe.isClosed&&(b.push(ue),b.push(ze),Nd(a,y,b,x))}Nd(a,y,b,x)}else if(ee.type===bn.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===bn.F){if(E=new Oo,E.startX=ee.endX,E.startY=(ee.startY+ee.endY)/2,ne=new vi(xo),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=Ua(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],zt.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)}Rn(b),a.restore(),a.Vc(!1)}}}},et.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)},et.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:_t.prototype.nk.call(this,a)},et.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)}},et.ga=function(a,y){if(y===void 0&&(y=new st),a instanceof or){a.Mc()&&Ot("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},et.mi=function(a){a===void 0&&(a=new Xt);var y=this.naturalBounds,x=this.oe;y=Xt.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),li(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),li(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),li(a,b.x,b.y,0,0),Xt.free(y),st.free(b),a},et.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!==bn.j||y||(E+=2);var ee=Xt.alloc();if(ee.assign(b),ee.Bc(E+2,E+2),!ee.ca(a))return Xt.free(ee),!1;if(b=E+1e-4,x.type===bn.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:(Xt.free(ee),zt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===bn.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 Xt.free(ee),!1;ee.Bc(b,b)}return this.stroke!==null&&ee.Bc(E,E),a=ee.ca(a),Xt.free(ee),a}if(x.type===bn.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 Xt.free(ee),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),Xt.free(ee),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===bn.o)return Xt.free(ee),this.fill===null?Fs(x,a.x,a.y,E):$o(x,a,E,1<this.strokeWidth,y);Ot("Unknown Geometry type: "+x.type)},et.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=zt.Ze[ae];typeof ge=="string"&&(ge=zt.Ze[ge]),typeof ge=="function"?(ue=ge(null,100,100),k0[ae]=ue):Ot("Unsupported Figure: "+ae)}ne=ue.bounds}ae=ne.width,ue=ne.height,ge=ne.width;var ye=ne.height;switch(ss(this,!0)){case gn:b=x=0;break;case yn:ge=Math.max(a-ee,0),ye=Math.max(y-ee,0);break;case pr:ge=Math.max(a-ee,0),b=0;break;case wr:x=0,ye=Math.max(y-ee,0)}isFinite(E.width)&&(ge=E.width),isFinite(E.height)&&(ye=E.height);var Me=this.maxSize,ze=this.minSize;switch(x=Math.max(x-ee,ze.width),b=Math.max(b-ee,ze.height),ge=Math.min(Me.width,ge),ye=Math.min(Me.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 gn:break;case yn:ae=ge,ue=ye;break;case lr:x=Math.min(ge/ae,ye/ue),isFinite(x)||(x=1),ae*=x,ue*=x;break;default:Ot(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&&zt.$(this.ua.Sk,a-ee)&&zt.$(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(Me.width,ge),ye=Math.min(Me.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===Br?yn:y:y===Br?k0[a.figure].defaultStretch:y}et.eh=function(a,y,x,b){Ra(this,a,y,x,b)},et.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},et.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,Me=ne*(ee.m21*ee.dy-ee.m22*ee.dx),ze=ne*(ee.m12*ee.dx-ee.m11*ee.dy);ee=a*ae+y*ge+Me,ne=a*ue+y*ye+ze,ae=x*ae+b*ge+Me,ue=x*ue+b*ye+ze,Me=this.ig/2,ge=this.ua,ge===null&&(this.measure(1/0,1/0),ge=this.ua);var Ze=ge.bounds;if(ye=!1,ge.type===bn.j)if(1.5>=this.strokeWidth)ye=zt.Ve(ge.startX,ge.startY,ge.endX,ge.endY,ee,ne,ae,ue,E);else{if(ge.startX===ge.endX?(b=Me,ye=0):(y=(ge.endY-ge.startY)/(ge.endX-ge.startX),ye=Me/Math.sqrt(1+y*y),b=ye*y),y=Un(),a=new st,zt.Ve(ge.startX+b,ge.startY+ye,ge.endX+b,ge.endY+ye,ee,ne,ae,ue,a)&&y.push(a),a=new st,zt.Ve(ge.startX-b,ge.startY-ye,ge.endX-b,ge.endY-ye,ee,ne,ae,ue,a)&&y.push(a),a=new st,zt.Ve(ge.startX+b,ge.startY+ye,ge.startX-b,ge.startY-ye,ee,ne,ae,ue,a)&&y.push(a),a=new st,zt.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 Rn(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);Rn(y)}else if(ge.type===bn.u)ye=zt.Ff(Ze.x-Me,Ze.y-Me,Ze.x+Ze.width+Me,Ze.y+Ze.height+Me,ee,ne,ae,ue,E);else if(ge.type===bn.F){y=Xt.allocAt(Ze.x,Ze.y,Ze.width,Ze.height).Bc(Me,Me);e:if(y.width===0)ye=zt.Ve(y.x,y.y,y.x,y.y+y.height,ee,ne,ae,ue,E);else if(y.height===0)ye=zt.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}Me=Math.sqrt(a*a*x*x+ge*ge-ue*ue),ae=(-(a*a*x*ue)+a*ge*Me)/(ge*ge+a*a*x*x)+b,a=(-(a*a*x*ue)-a*ge*Me)/(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}Xt.free(y)}else if(ge.type===bn.o){ze=st.alloc();var Qe=ae-ee,rt=ue-ne,Tt=Qe*Qe+rt*rt,xt=ee,At=ne;if(0<Tt&&Ze.contains(xt,At)&&(ze.x=xt,ze.y=At,this.ca(ze)))for(Qe!==0&&.5>Math.abs(Qe)?(rt*=.5/Qe,Qe=.5):rt!==0&&.5>Math.abs(rt)&&(Qe*=.5/rt,rt=.5),xt-=Qe,At-=rt;Ze.contains(xt,At);)xt-=Qe,At-=rt;for(E.x=ae,E.y=ue,rt=0;rt<ge.figures.count;rt++){var Ft=ge.figures.s[rt],Dt=Ft.isFilled?xt:ee,It=Ft.isFilled?At:ne,Wt=Ft.segments;Ze=Ft.startX,Qe=Ft.startY;for(var _n=Ze,rr=Qe,Yn=0;Yn<Wt.count;Yn++){var Cn=Wt.s[Yn],dn=Cn.type,jr=Cn.endX,kr=Cn.endY,wi=!1;switch(dn){case Fo:_n=jr,rr=kr;break;case Ui:wi=Nm(Ze,Qe,jr,kr,Dt,It,ae,ue,ze);break;case Go:wi=zt.Eo(Ze,Qe,Cn.point1X,Cn.point1Y,Cn.point2X,Cn.point2Y,jr,kr,Dt,It,ae,ue,.6,ze);break;case ps:wi=zt.Eo(Ze,Qe,Ze+2/3*(Cn.point1X-Ze),Qe+2/3*(Cn.point1Y-Qe),jr+2/3*(Cn.point1X-jr),kr+2/3*(Cn.point1Y-kr),jr,kr,Dt,It,ae,ue,.6,ze);break;case xo:case Cs:dn=Cn.type===xo?Ua(Cn,Ft):Ds(Cn,Ft,Ze,Qe);var Ki=dn.length;if(Ki===0){wi=Nm(Ze,Qe,Cn.type===xo?Cn.centerX:Cn.endX,Cn.type===xo?Cn.centerY:Cn.endY,Dt,It,ae,ue,ze);break}for(kr=null,jr=0;jr<Ki;jr++){if(kr=dn[jr],jr===0&&Nm(Ze,Qe,kr[0],kr[1],Dt,It,ae,ue,ze)){var Jo=Lm(Dt,It,ze,Tt,E);Jo<Tt&&(Tt=Jo,ye=!0)}zt.Eo(kr[0],kr[1],kr[2],kr[3],kr[4],kr[5],kr[6],kr[7],Dt,It,ae,ue,.6,ze)&&(Jo=Lm(Dt,It,ze,Tt,E),Jo<Tt&&(Tt=Jo,ye=!0))}jr=kr[6],kr=kr[7];break;default:Ot("Unknown Segment type: "+dn)}Ze=jr,Qe=kr,wi&&(wi=Lm(Dt,It,ze,Tt,E),wi<Tt&&(Tt=wi,ye=!0)),Cn.isClosed&&(jr=_n,kr=rr,Nm(Ze,Qe,jr,kr,Dt,It,ae,ue,ze)&&(Cn=Lm(Dt,It,ze,Tt,E),Cn<Tt&&(Tt=Cn,ye=!0)))}}ee=x-a,ne=b-y,ae=Math.sqrt(ee*ee+ne*ne),ae!==0&&(ee/=ae,ne/=ae),E.x-=ee*Me,E.y-=ne*Me,st.free(ze)}else Ot("Unknown Geometry type: "+ge.type);return ye?(this.transform.Ga(E),!0):!1};function Lm(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(zt.$(a,x)&&zt.$(y,b)||zt.$(E,ne)&&zt.$(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||zt.$(ue.y,a))&&(ue.y<y||zt.$(ue.y,y))&&(ge=!0)):(y=a<x?a:x,a=a<x?x:a,(ue.x>y||zt.$(ue.x,y))&&(ue.x<a||zt.$(ue.x,a))&&(ge=!0)),ge)}et.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},et.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Cr.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),Cr.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)}et.tx=function(a,y,x){function b(Tt,xt){for(var At=Tt.length,Ft=0;Ft<At;Ft+=2)if(xt.zd(Tt[Ft],Tt[Ft+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,In(a.x,a.y,ae,ue)<=E&&In(a.x,a.y,ge,ue)<=E&&In(a.x,a.y,ae,ne)<=E&&In(a.x,a.y,ge,ne)<=E)return!0}if(ae=y.startX,ue=y.startY,ge=y.endX,ne=y.endY,y.type===bn.j){if(x=(ae-ge)*(a.x-ge)+(ue-ne)*(a.y-ne),Kn(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===bn.u)return y=!1,x&&(y=Kn(a.x,a.y,ae,ue,ae,ne)<=E||Kn(a.x,a.y,ae,ue,ge,ue)<=E||Kn(a.x,a.y,ge,ue,ge,ne)<=E||Kn(a.x,a.y,ae,ne,ge,ne)<=E),y;if(y.type===bn.F){y=a.x-(ae+ge)/2,ee=a.y-(ue+ne)/2;var ye=Math.abs(ge-ae)/2,Me=Math.abs(ne-ue)/2;if(ye===0||Me===0)return Kn(a.x,a.y,ae,ue,ge,ne)<=E;if(x){if(a=zt.$y(ye,Me,y,ee),a*a<=E)return!0}else return!(In(y,ee,-ye,0)>=E||In(y,ee,0,-Me)>=E||In(y,ee,0,Me)>=E||In(y,ee,ye,0)>=E)}else if(y.type===bn.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&&Kn(a.x,a.y,ee,ae,ee,ge)>E&&Kn(a.x,a.y,ee,ae,ue,ae)>E&&Kn(a.x,a.y,ue,ge,ee,ge)>E&&Kn(a.x,a.y,ue,ge,ue,ae)>E)return!1;if(ee=Math.sqrt(E),x){if(this.fill===null?Fs(y,a.x,a.y,ee):$o(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(Me=ae[ge],Me.type){case Fo:case Ui:if(ne=Me.endX,ye=Me.endY,a.zd(ne,ye)>E)return!1;break;case Go:var ze=Un();if(zt.Qe(ne,ye,Me.point1X,Me.point1Y,Me.point2X,Me.point2Y,Me.endX,Me.endY,.8,ze),ne=b(ze,a),Rn(ze),ne||(ne=Me.endX,ye=Me.endY,a.zd(ne,ye)>E))return!1;break;case ps:if(ze=Un(),zt.ep(ne,ye,Me.point1X,Me.point1Y,Me.endX,Me.endY,.8,ze),ne=b(ze,a),Rn(ze),ne||(ne=Me.endX,ye=Me.endY,a.zd(ne,ye)>E))return!1;break;case xo:case Cs:ze=Me.type===xo?Ua(Me,ee):Ds(Me,ee,ne,ye);var Ze=ze.length;if(Ze===0){if(ne=Me.type===xo?Me.centerX:Me.endX,ye=Me.type===xo?Me.centerY:Me.endY,a.zd(ne,ye)>E)return!1;break}Me=null;for(var Qe=Un(),rt=0;rt<Ze;rt++)if(Me=ze[rt],Qe.length=0,zt.Qe(Me[0],Me[1],Me[2],Me[3],Me[4],Me[5],Me[6],Me[7],.8,Qe),b(Qe,a))return Rn(Qe),!1;Rn(Qe),Me!==null&&(ne=Me[6],ye=Me[7]);break;default:Ot("Unknown Segment type: "+Me.type)}}return!0}}}return!1},et.qc=function(){this.ua=null},et.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=aa):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new or(1-aa.x,aa.y)))}Ur.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=wu[a.toArrow];else a.fromArrow!=="None"?b=wu[a.fromArrow]:(b=zt.Ze[a.figure],typeof b=="string"&&(b=zt.Ze[b]),b===void 0&&Ot("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=zt.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=wu[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=wu[x],y===void 0){var b=null,E;for(E in zt.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=bn.parse(zt.um[b],!1),wu[b]=a,x!==b&&(wu[x]=b),b}}return typeof y=="string"?y:y instanceof bn?a:null}rn.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&&to(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=bn.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 ji&&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 ji&&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 Dn(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"?Dn(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"?Dn(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)||Ot("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=zt.Ze[a];typeof x=="function"?x=a:(x=zt.Ze[a.toLowerCase()])||Ot("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?Ot("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?Ot("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:Zo},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:Zo},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:Br},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 bu),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&eu(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 bu),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 bu),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 bu),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 wu=new ar,k0=new ar;Ur.className="Shape",Ur.getFigureGenerators=function(){var a=new Vt,y;for(y in zt.Ze)y!==y.toLowerCase()&&a.add(y,zt.Ze[y]);return a.freeze(),a},Ur.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=zt.Ze;b[a]=y,b[x]=a},Ur.getArrowheadGeometries=function(){var a=new Vt;for(b in zt.um)if(wu[b]===void 0){var y=bn.parse(zt.um[b],!1);wu[b]=y,y=b.toLowerCase(),y!==b&&(wu[y]=b)}for(var x in wu)if(x!==x.toLowerCase()){var b=wu[x];b instanceof bn&&a.add(x,b)}return a.freeze(),a},Ur.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=bn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Ot("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=wu;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=Br,this.gg=this.fg=Zo}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||(ls=po?new fl(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}Ht(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 iu(a){a.da===null?a.da=new F0:a.da.nc&&(a.da=a.da.copy())}et=Zi.prototype,et.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}et.qb=function(a){a.classType===Zi?this.wrap=a:_t.prototype.qb.call(this,a)},et.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},et.v=function(){_t.prototype.v.call(this)},et.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;mo(this,a,this.xc,!0,!1,x,b),(ue||ge)&&mo(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var ye=this.oe,Me=ye.dx-(ne*ye.m21+ye.dx);ye=ye.dy-(ne*ye.m22+ye.dy);var ze=y.scale;switch(8>(Me*Me+ye*ye)*ze*ze&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof ks&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Me=this.spacingBelow,this.flip){case ci:a.translate(E,0),a.scale(-1,1);break;case Xr: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+Me)*ye,ee>ze&&(b=this.verticalAlignment,b=b.y*ee-b.y*ze+b.offsetY),ye===1&&this.ze!==null)Me=this.Cb,Me>E&&(Me=E),this.Oj(this.ze,a,0,b+y,E,ne,Me,x,ae,ue,ge);else if(this.Qc!==null&&this.Qb!==null)for(ze=0;ze<ye;ze++){var Ze=this.Qc[ze];Ze>E&&(Ze=E),b+=y,this.Oj(this.Qb[ze],a,0,b,E,ne,Ze,x,ae,ue,ge),b+=ne+Me}switch(this.flip){case ci:a.scale(-1,1),a.translate(-E,0);break;case Xr:a.scale(1,-1),a.translate(0,-ee);break;case Ii:a.scale(-1,-1),a.translate(-E,-ee)}}},et.Oj=function(a,y,x,b,E,ee,ne,ae,ue,ge,ye){var Me=0;if(ae)ue==="left"?Me=0:ue==="right"?Me=E-ne:ue==="center"&&(Me=(E-ne)/2),y.fillRect(x+Me,b+.25*ee,ne,1);else{if(ue==="left"?Me=0:ue==="right"?Me=E:ue==="center"&&(Me=E/2),E=Am!==null?Am(this,ee):.75*ee,y.fillText(a,x+Me,b+E),a=ee/20|0,a===0&&(a=1),ue==="right"?Me-=ne:ue==="center"&&(Me-=ne/2),ge){ae=jm!==null?jm(this,ee):.8*ee,ue=x+Me,ge=b+ae,E=x+Me+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 ks&&y.ad.classList.add("gojs-td")}ye&&(ye=b+ee-ee/2.2|0,a%2!==0&&(ye+=.5),b=x+Me,ee=ye,x=x+Me+ne,ne=ye,Me=a,y.beginPath(),y.lineWidth=Me,y.moveTo(b,ee),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof ks&&y.ad.classList.add("gojs-td"))}},et.kk=function(a,y,x){if(!_t.prototype.kk.call(this,a,y,x))return!1;if(mo(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},et.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:_t.prototype.nk.call(this,a)},et.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)}},et.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var ee=this.Ae;ls!==null&&k1!==ee&&(k1=ls.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,El(ae)),ae=ge+1}ee=ne}else ne=ee.indexOf(`
`,0),0<=ne&&(ee=ee.substr(0,ne)),ee=El(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);El(ge)>y&&1<ge.length;)ge=ge.substr(0,ge.length-1);ge+=Qp,y=El(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),Ni(this.dc,ee,ne),this.Ge(0,0,ee,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},et.eh=function(a,y,x,b){Ra(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 M0(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===L0){a.Le=1;var ge=El(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=El(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=El(ge);for(E&&(y=y.trim()),ee+=y,x=Math.max(1,x-ue);El(ee)>x&&1<ee.length;)ee=ee.substr(0,ee.length-1);a.l|=16777216,ee+=Qp;var ye=El(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);El(y)>x;){var Me=1;for(ge=El(y.substr(0,Me)),ye=0;ge<=x;)Me++,ye=ge,ge=El(y.substr(0,Me));if(Me===1){var ze=ge;ee=Math.max(ee,ge)}else ze=ye,ee=Math.max(ee,ye);if(Me--,1>Me&&(Me=1),Xp(a,y.substr(0,Me),ze),ue++,y=y.substr(Me),a.Gc+ue>a.maxLines)break}for(ye=Ad(a,ne),ge=El(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=El(ge);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ye.length===0?(Me=ge,ee=Math.max(ee,ge)):(Me=ye=El(y),ee=Math.max(ee,ye)),Xp(a,y,Me),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 El(a){return ls===null?8*a.length:ls.measureText(a).width}function Yp(a){if(a.df!==null)return a.df;var y=a.Ae;if(ls===null){var x=16;return a.df=x}return j0[y]!==void 0&&5e3>E1?x=j0[y]:(x=1.3*ls.measureText("M").width,j0[y]=x,E1++),a.df=x}function x1(a){if(ls===null)return 6;if(Fm[a]!==void 0&&5e3>O0)var y=Fm[a];else y=ls.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!==L0){a.Le=0;var ue=fn.alloc();M0(a,ee,y,ue),E+=ue.height,fn.free(ue),a.Gc+=a.Le}else M0(a,ee,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(ae=!0)}ee=ne+1}return a.Lq=E}rn.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"||(iu(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:gn},set:function(a){var y=this.flip;y!==a&&(iu(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Zl},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),iu(this),this.da.Yr=a,Xa(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=fn.alloc();M0(this,this.ec,999999,a);var y=a.width;fn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Ni(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&&(iu(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&&(iu(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 ji&&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&&(iu(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&&(iu(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 bu),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 bu),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 bu),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 bu),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 bu),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&&(iu(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&&(iu(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&&(iu(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&&(iu(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&&(iu(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&&Dn(a,"> 0",Zi,"maxLines"),iu(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,L0=new Yt(Zi,"None",0),b1=new Yt(Zi,"WrapFit",1),N0=new Yt(Zi,"WrapDesiredSize",2),P1=new Yt(Zi,"WrapBreakAll",3),A0=new Yt(Zi,"OverflowClip",0),Om=new Yt(Zi,"OverflowEllipsis",1),Jp=new Yt(Zi,"FormatTrim",0),C1=new Yt(Zi,"FormatNone",0),xx=/[ \u200b\u00ad]/,j0=new ar,E1=0,Fm=new ar,O0=0,Qp="...",k1="",ls=null,Dm=!1;Zi.className="TextBlock";function F0(){this.nc=!1,this.Hd=null,this.Xf=gn,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=Zl,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 ar,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||(ls=po?new fl(null).context:null,Dm=!0),ls===null)return!0;var y=ls.font;if(a===y||a==="10px sans-serif")return!0;ls.font="10px sans-serif",ls.font=a;var x=ls.font;if(x!=="10px sans-serif")return ls.font=y,!0;ls.font="19px serif";var b=ls.font;return ls.font=a,x=ls.font,ls.font=y,x!==b},Zi.FormatNone=C1,Zi.FormatTrim=Jp,Zi.None=L0,Zi.OverflowClip=A0,Zi.OverflowEllipsis=Om,Zi.WrapBreakAll=P1,Zi.WrapDesiredSize=N0,Zi.WrapFit=b1;function bu(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}bu.prototype.copy=function(){var a=new bu;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},bu.className="GradElementSettings";function us(a,y){_t.call(this),this.Eg=null,this.qo="",this.Xg=bs,this.Nk=yn,this.Zg=this.Hd=null,this.Mk=Gr,this.Xf=gn,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var jd;Ht(us,_t),us.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},us.prototype.qb=function(a){a===gn||a===lr||a===ri?this.imageStretch=a:_t.prototype.qb.call(this,a)},us.prototype.toString=function(){return"Picture("+this.source+")#"+Yr(this)};function Od(a){a===void 0&&(a=""),a!==""?jd[a]&&(delete jd[a],Bm--):(jd=new ar,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=Un();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);Rn(ee)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}us.prototype.hA=function(){if(this.source!==""){Od(this.source);var a=this.source;this.source="",this.source=a}},us.prototype.redraw=function(){this.N(),this.Uc=!0},us.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 Kc)){var E=a instanceof ks;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 Me=ue,ze=ae,Ze=this.Nk,Qe=this.Mk;switch(Ze){case gn:if(this.sourceRect.w())break;Me>=b.width&&(ee=ee+Qe.offsetX+(Me*Qe.x-b.width*Qe.x)),ze>=b.height&&(ne=ne+Qe.offsetY+(ze*Qe.y-b.height*Qe.y)),ue=Math.min(b.width,Me),ae=Math.min(b.height,ze);break;case yn:Me=b.width,ze=b.height;break;case lr:case ri:Ze===lr?(Ze=Math.min(b.height/ze,b.width/Me),Me*=Ze,ze*=Ze):Ze===ri&&(Ze=Math.max(b.height/ze,b.width/Me),Me*=Ze,ze*=Ze,Me>=b.width&&(ee=(ee+Qe.offsetX+(Me*Qe.x-b.width*Qe.x)/Me)*ue),ze>=b.height&&(ne=(ne+Qe.offsetY+(ze*Qe.y-b.height*Qe.y)/ze)*ae),ue*=1/(Me/b.width),ae*=1/(ze/b.height),Me=b.width,ze=b.height)}Ze=this.Df()*y.scale;var rt=Me*Ze*ze*Ze,Tt=ue*ae/rt,xt=x.__goCache;Ze=null;var At=wx;if(!E){if(x.sq&&xt!==void 0&&4<rt&&Tt>At*At)for(xt.gi===null&&(L1(xt,4,ge,ye,x),L1(xt,16,ge,ye,x)),E=xt.gi,ge=E.length,ye=0;ye<ge&&E[ye].ratio*E[ye].ratio<Tt;ye++)Ze=E[ye];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new fl(null).context;try{E.drawImage(this.Eg,0,0)}catch(Ft){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Ft){this.vl=!0}}if(this.vl)return}}switch(E=Me<b.width?Qe.offsetX+(b.width*Qe.x-Me*Qe.x):0,Qe=ze<b.height?Qe.offsetY+(b.height*Qe.y-ze*Qe.y):0,this.flip){case ci:a.translate(Math.min(b.width,Me),0),a.scale(-1,1);break;case Xr:a.translate(0,Math.min(b.height,ze)),a.scale(1,-1);break;case Ii:a.translate(Math.min(b.width,Me),Math.min(b.height,ze)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&xt!==void 0&&Ze!==null&&Ze.ratio!==1){a.save(),y=Ze.ratio;try{a.drawImage(Ze.source,ee/y,ne/y,Math.min(Ze.source.width,ue/y),Math.min(Ze.source.height,ae/y),E,Qe,Math.min(b.width,Me),Math.min(b.height,ze)),a instanceof ks&&(this.bt=[ee/y,ne/y,Math.min(Ze.source.width,ue/y),Math.min(Ze.source.height,ae/y),E,Qe,Math.min(b.width,Me),Math.min(b.height,ze)])}catch(Ft){this.en=!1}a.restore()}else try{a.drawImage(x,ee,ne,ue,ae,E,Qe,Math.min(b.width,Me),Math.min(b.height,ze)),a instanceof ks&&(this.bt=[ee,ne,ue,ae,E,Qe,Math.min(b.width,Me),Math.min(b.height,ze)])}catch(Ft){this.en=!1}switch(this.flip){case ci:a.scale(-1,1),a.translate(-Math.min(b.width,Me),0);break;case Xr: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,Me),-Math.min(b.height,ze))}}}}},us.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,ee=ss(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===yn||ee===pr?(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===yn||ee===wr?(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)),Ni(this.dc,a,y),this.Ge(0,0,a,y)},us.prototype.eh=function(a,y,x,b){Ra(this,a,y,x,b)},rn.Object.defineProperties(us.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||Ot("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 un),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(po){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Bm&&(Od(),x=jd),b=Hn("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 M1),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}}}),us.prototype.redraw=us.prototype.redraw,us.prototype.reloadSource=us.prototype.hA;var Bm=0,wx=4;us.className="Picture",jd=new ar,us.clearCache=Od;function M1(){this.gi=null}function L1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var ee=new fl(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))}M1.className="PictureCacheArray";function N1(a,y){this.source=a,this.ratio=y}N1.className="PictureCacheInstance";function Fd(){this.os=new bn,this.mc=null}Fd.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new bn,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 vi(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 vi(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 vi(Go);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 Rm(a,y,x,b,E){var ee;ee===void 0&&(ee=!1);var ne=new vi(ps);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 vi(xo);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 vi(Cs,ne,ae,y,x,b,E,ee),ue&&y.close(),a.mc.segments.add(y)}function A1(a){var y=Im;return y!==null?(Im=null,y.reset(a),y):(y=new Fd,y.reset(a),y)}var Im=null;Fd.className="StreamGeometryContext";function Na(a,y){var x=a.toLowerCase(),b=zt.Ze;b[a]=y,b[x]=a}Na("Rectangle",function(a,y,x){a="r"+y+","+x;var b=zt.Mf[a];return b!==void 0||(b=new bn(bn.u),b.endX=y,b.endY=x,zt.Nf<zt.vm&&(zt.Mf[a]=b,zt.Nf++)),b}),Na("Square",function(a,y,x){a="s"+y+","+x;var b=zt.Mf[a];return b!==void 0||(b=new bn(bn.u),b.endX=y,b.endY=x,b.defaultStretch=lr,zt.Nf<zt.vm&&(zt.Mf[a]=b,zt.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=zt.Mf[b];if(E!==void 0)return E;var ee=a*zt.wg;return E=new bn().add(new Oo(a,0,!0).add(new vi(Ui,y-a,0)).add(new vi(Go,y,a,y-ee,0,y,ee)).add(new vi(Ui,y,x-a)).add(new vi(Go,y-a,x,y,x-ee,y-ee,x)).add(new vi(Ui,a,x)).add(new vi(Go,0,x-a,ee,x,0,x-ee)).add(new vi(Ui,0,a)).add(new vi(Go,a,0,0,ee,ee,0).close())),1<ee&&(E.spot1=new or(0,0,ee,ee),E.spot2=new or(1,1,-ee,-ee)),zt.Nf<zt.vm&&(zt.Mf[b]=E,zt.Nf++),E}),Na("Border","RoundedRectangle"),Na("Ellipse",function(a,y,x){a="e"+y+","+x;var b=zt.Mf[a];return b!==void 0||(b=new bn(bn.F),b.endX=y,b.endY=x,b.spot1=Xl,b.spot2=Ga,zt.Nf<zt.vm&&(zt.Mf[a]=b,zt.Nf++)),b}),Na("Circle",function(a,y,x){a="c"+y+","+x;var b=zt.Mf[a];return b!==void 0||(b=new bn(bn.F),b.endX=y,b.endY=x,b.spot1=Xl,b.spot2=Ga,b.defaultStretch=lr,zt.Nf<zt.vm&&(zt.Mf[a]=b,zt.Nf++)),b}),Na("TriangleRight",function(a,y,x){return new bn().add(new Oo(0,0).add(new vi(Ui,y,.5*x)).add(new vi(Ui,0,x).close())).pm(0,.25,.5,.75)}),Na("TriangleDown",function(a,y,x){return new bn().add(new Oo(0,0).add(new vi(Ui,y,0)).add(new vi(Ui,.5*y,x).close())).pm(.25,0,.75,.5)}),Na("TriangleLeft",function(a,y,x){return new bn().add(new Oo(y,x).add(new vi(Ui,0,.5*x)).add(new vi(Ui,y,0).close())).pm(.5,.25,1,.75)}),Na("TriangleUp",function(a,y,x){return new bn().add(new Oo(y,x).add(new vi(Ui,0,x)).add(new vi(Ui,.5*y,0).close())).pm(.25,.5,.75,1)}),Na("Triangle","TriangleUp"),Na("Diamond",function(a,y,x){return new bn().add(new Oo(.5*y,0).add(new vi(Ui,0,.5*x)).add(new vi(Ui,.5*y,x)).add(new vi(Ui,y,.5*x).close())).pm(.25,.25,.75,.75)}),Na("LineH",function(a,y,x){return a=new bn(bn.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 bn(bn.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 bn().add(new Oo(0,x/2,!1).add(new vi(Ui,y,x/2)).add(new vi(Fo,y/2,0)).add(new vi(Ui,y/2,x)))}),Na("XLine",function(a,y,x){return new bn().add(new Oo(0,x,!1).add(new vi(Ui,y,0)).add(new vi(Fo,0,0)).add(new vi(Ui,y,x)))}),Na("LineRight",function(a,y,x){return new bn().add(new Oo(.25*y,0,!1).add(new vi(Ui,.75*y,.5*x)).add(new vi(Ui,.25*y,x)))}),Na("LineDown",function(a,y,x){return new bn().add(new Oo(0,.25*x,!1).add(new vi(Ui,.5*y,.75*x)).add(new vi(Ui,y,.25*x)))}),Na("LineLeft",function(a,y,x){return new bn().add(new Oo(.75*y,0,!1).add(new vi(Ui,.25*y,.5*x)).add(new vi(Ui,.75*y,x)))}),Na("LineUp",function(a,y,x){return new bn().add(new Oo(0,.75*x,!1).add(new vi(Ui,.5*y,.25*x)).add(new vi(Ui,y,.75*x)))}),zt.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=Bi,this.ir=null,this.jr="",this.lr=Zo,this.Gq="",this.Hq=ni,this.Pq=Xn,this.Kq=dr,this.Up=null,this.Cq=127,this.zr=ur,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 Ho||typeof a=="string"?Sn.call(this,a):(Sn.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 Xt,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Ht(Sr,Sn),Sr.prototype.cloneProtected=function(a){Sn.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},et=Sr.prototype,et.Af=function(a){Sn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},et.toString=function(){var a=$n(this.constructor)+"#"+Yr(this);return this.data!==null&&(a+="("+Fr(this.data)+")"),a};function hs(a){a.P===null?a.P=new D0:a.P.nc&&(a.P=a.P.copy())}et.th=function(){Sn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},et.gk=function(a,y,x,b,E,ee,ne){var ae=this.diagram;ae!==null&&(a===wo&&y==="elements"?E instanceof Sn?Zc(E,function(ue){ly(ae.partManager,ue),_c(ae,ue)}):qh(ae,E):a===Eo&&y==="elements"&&(E instanceof Sn?Zc(E,function(ue){uy(ae.partManager,ue,ae)}):Np(ae,E)),ae.cb(a,y,x,b,E,ee,ne))},et.La=function(a){if(Sn.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 Sn&&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 Vt),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=Un();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Rn(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 Or?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof yi))break e;dl(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Sn.Link),x.adornedObject=y)}if(x!==null){x.type===Sn.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){I0(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=Xt.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),Xt.free(b),I0(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 Cr);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=Gr;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 Vt),y.I(a)!==null)return y.I(a);var x=Sn.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()?Gr: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 Xt),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(Ya(this)===!1)j1(this);else{yu(this,!1);var a=this.Ib,y=Xt.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()||zt.B(y.width,a.width)&&zt.B(y.height,a.height)||0<=this.vw&&this.C(16),Xt.free(y),I0(this,!1)}},et=Sr.prototype,et.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=Xt.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),Xt.free(E)}!(this.G&65536)&&a.D(y)||I1(this,b,x),x.N(),!a.w()&&!y.w()||Hr(a,y)||(this instanceof Wn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},et.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&&Ya(this)===!1&&(_m(this),j1(this)),!0};function F1(a,y,x,b,E){y===null||a instanceof yi||(y=y.animationManager,y.zb&&ad(y,a,new st(b,E),x))}et.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;rc(this)||Ya(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)},et.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):R1(a,y,x,E,b):ee?B1(a,y,x,E,b):ne&&R1(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 yi||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 R1(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 I1(a,y,x){_0(a,!1),a instanceof Wn&&gh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?ic(a)?(_i(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}et.si=function(){return!0},et.Zc=function(){return!0},et.ph=function(){return!1},et.Dd=function(){return!0};function R0(a,y,x,b){y.constructor===a.constructor||G1||(G1=!0,Tn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Tn(" Old class: "+$n(a.constructor)+", new class: "+$n(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 Wn&&(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 Wn&&(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 I0(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}et=Sr.prototype,et.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}et.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},et.N=function(){var a=this.diagram;a!==null&&!Ya(this)&&!rc(this)&&this.isVisible()&&this.Ib.w()&&a.N(Jc(this,this.Ib))},et.v=function(){Sn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Wn&&this.labeledLink!==null&&Xa(this.labeledLink),a.$b(!0))},et.Vo=function(a){a||(a=this.Ah,a!==null&&V0(a,this))},et.Wo=function(a){a||(a=this.Ah,a!==null&&K0(a,this))},et.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},et.oz=function(){return z0(this,this)};function z0(a,y){var x=y.containingGroup;return x!==null?1+z0(a,x):y instanceof Wn&&(y=y.labeledLink,y!==null)?z0(a,y):0}et.sz=function(){return _1(this,this)};function _1(a,y){var x=y.containingGroup;return x!==null||y instanceof Wn&&(x=y.labeledLink,x!==null)?_1(a,x):y}et.Td=function(a){return a instanceof Or?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 Wn&&(y=y.labeledLink,y!==null)?G0(a,y,x):!1:!0}et.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Or&&zm(y,!0),y instanceof Wn){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 Wn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Or&&zm(y,!1),y instanceof Wn&&(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 Wn&&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 Wn&&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 yi)){if(a.add(y),y instanceof Wn){if(x&&y instanceof Or)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 En)for(y=y.labelNodes;y.next();)oc(a,y.value,x,b,E,ee)}}rn.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?pi: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(wo,"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&&(hs(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 yi?this.type!==Sn.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:Xn},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),hs(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:dr},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),hs(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&&(hs(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:ni},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),hs(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,Ya(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 yi)){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 yi?this instanceof yi&&(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&&(dl(x),x=x.copy(),x!==null&&R0(this,x,y,a))):(ee!==null&&ee.jm(b,a),x=fS(x.partManager,b,a),x!==null&&(dl(x),x=x.copy(),x===null||x instanceof En||(b=this.location.copy(),R0(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){R0(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&&(hs(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&&(hs(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&&(hs(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 En?(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&&(hs(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&&(hs(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&&(hs(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:Bi},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),hs(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&&(hs(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&&(hs(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:Zo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),hs(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&&Ot("Cannot make a Group a member of itself: "+this.toString()),Ot("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?K0(y,this):this instanceof Or&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?V0(a,this):this instanceof Or&&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 Or){for(x=new un,oc(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Wn)for(b=b.linksConnected;b.next();)Bd(b.value)}if(this instanceof Wn){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 Ot("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&&(hs(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Wn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(hs(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&&(hs(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:ur},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),hs(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&&(hs(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&&(hs(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 yi(a,y){a===void 0||a instanceof Ho||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)}Ht(yi,Sr),yi.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},yi.prototype.updateRelationshipsFromData=function(){},yi.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof En&&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)}}},yi.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Ya(a))},yi.prototype.Zc=function(){return!1},yi.prototype.gk=function(a,y,x,b,E,ee,ne){if(a===wo&&y==="elements"){if(E instanceof Qa)this.$a===null&&(this.$a=E);else if(E instanceof Sn){var ae=E.Nl(function(ue){return ue instanceof Qa});ae instanceof Qa&&this.$a===null&&(this.$a=ae)}}else a===Eo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Sn&&this.$a.rg(b)&&(this.$a=null));Sr.prototype.gk.call(this,a,y,x,b,E,ee,ne)},yi.prototype.updateAdornments=function(){},yi.prototype.Lj=function(){},rn.Object.defineProperties(yi.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}}}),yi.className="Adornment";function U0(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Ao,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 Wn(a,y){a===void 0||a instanceof Ho||typeof a=="string"?Sr.call(this,a):(Sr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new on,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Ht(Wn,Sr),Wn.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())},et=Wn.prototype,et.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())}et.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 un),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}et.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=H1(this,a,y,x),a!==null&&a.Sl()},et.gk=function(a,y,x,b,E,ee,ne){a===wo&&y==="elements"?this.wc=null:a===Eo&&y==="elements"&&(this.wc=null),Sr.prototype.gk.call(this,a,y,x,b,E,ee,ne)},et.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Ts(x.fromPort),Ts(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Ts(x.fromPort),Ts(x.toPort),x.bb())}}function Ts(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Ts(y.port)}}et.si=function(){return!0},Wn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Wn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Wn.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},Wn.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)}},Wn.prototype.qx=function(){var a=new un,y=new un;return V1(this,this,a,y),y.iterator};function V1(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)&&V1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}Wn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new ti(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},et=Wn.prototype,et.Mo=function(a){a===void 0&&(a=null);var y=new ti(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},et.Sd=function(a){a===void 0&&(a=null);var y=new ti(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},et.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 un,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 un,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new ei(x):pi},et.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 un,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new ei(x):pi},et.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 un,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new ei(x):pi},et.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new ti(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},et.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new ti(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){Ts(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){Ts(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}}}Wn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},et=Wn.prototype,et.Vo=function(a){Sr.prototype.Vo.call(this,a),a||($p(this),a=this.Yk,a!==null&&eS(a,this))},et.Wo=function(a){Sr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},et.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)},et.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;K1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function K1(a){a.wc===null?a.wc=new Vt: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=Un()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Rn(x)}}}et.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},et.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}},et.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},et.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},et.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Wn)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},et.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 un;return a(this,y),y},et.uz=function(){return X1(this,this)};function X1(a,y){return y=y.pg(),y===null?0:1+X1(a,y)}et.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new ti(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},et.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 on,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 on,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new ei(x):pi},et.wz=function(a){a===void 0&&(a=1/0);var y=new un;return oc(y,this,!1,a,!0),y},Wn.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 un;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 Me=x?ge.Oo():ge.Po();ue.uv=a,Me.all(function(ze){return function(Ze){return Ze===ze.uv||!Ze.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}Wn.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 un;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 Me=x?ye.Oo():ye.Po();ge.vv=a,Me.all(function(ze){return function(Ze){return Ze===ze.vv||!Ze.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}rn.Object.defineProperties(Wn.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:Ao},set:function(a){typeof a=="number"&&(a=new Wr(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),Xa(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&K1(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))}}}),Wn.prototype.expandTree=Wn.prototype.expandTree,Wn.prototype.collapseTree=Wn.prototype.collapseTree,Wn.prototype.findTreeParts=Wn.prototype.wz,Wn.prototype.findTreeChildrenNodes=Wn.prototype.Ou,Wn.prototype.findTreeChildrenLinks=Wn.prototype.Qo,Wn.prototype.findTreeLevel=Wn.prototype.uz,Wn.prototype.findTreeParentChain=Wn.prototype.vz,Wn.prototype.findTreeParentNode=Wn.prototype.pg,Wn.prototype.findTreeParentLink=Wn.prototype.kh,Wn.prototype.findCommonTreeParent=Wn.prototype.gz,Wn.prototype.findTreeRoot=Wn.prototype.xz,Wn.prototype.isInTreeOf=Wn.prototype.Nz,Wn.prototype.findPort=Wn.prototype.ns,Wn.prototype.findLinksTo=Wn.prototype.kz,Wn.prototype.findLinksBetween=Wn.prototype.jz,Wn.prototype.findNodesInto=Wn.prototype.Oo,Wn.prototype.findNodesOutOf=Wn.prototype.Po,Wn.prototype.findNodesConnected=Wn.prototype.Mu,Wn.prototype.findLinksInto=Wn.prototype.Sd,Wn.prototype.findLinksOutOf=Wn.prototype.Mo,Wn.prototype.findExternalTreeLinksConnected=Wn.prototype.qx,Wn.prototype.invalidateConnectedLinks=Wn.prototype.Bd,Wn.prototype.invalidateLinkBundle=Wn.prototype.Lz;var Ex=new Yt(Wn,"SpreadingNone",10),Hm=new Yt(Wn,"SpreadingEvenly",11),W0=new Yt(Wn,"SpreadingPacked",12);Wn.className="Node",Wn.SpreadingNone=Ex,Wn.SpreadingEvenly=Hm,Wn.SpreadingPacked=W0;function Or(a,y){a===void 0||a instanceof Ho||typeof a=="string"?Wn.call(this,a):(Wn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new un,this.$a=null,this.Sc=new lo,this.Sc.group=this,this.gl=new un,this.tb=this.$p=null,y&&Object.assign(this,y)}Ht(Or,Wn),Or.prototype.cloneProtected=function(a){Wn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Qa});y instanceof Qa?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())},et=Or.prototype,et.Af=function(a){Wn.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 Wn)x.Bd(y);else if(x instanceof En)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},et.gk=function(a,y,x,b,E,ee,ne){if(a===wo&&y==="elements"){if(E instanceof Qa)this.$a===null?this.$a=E:this.$a!==E&&Ot("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Sn){var ae=E.Nl(function(ue){return ue instanceof Qa});ae instanceof Qa&&(this.$a===null?this.$a=ae:this.$a!==ae&&Ot("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 Sn&&this.$a.rg(b)&&(this.$a=null));Wn.prototype.gk.call(this,a,y,x,b,E,ee,ne)},et.Xl=function(a,y){Wn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Sn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Sn&&(a=a.Pb()),this.tb===null&&(this.tb=new Xt),a.mi(this.tb),a instanceof Ur&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},et.eh=function(a,y,x,b){this.nf=this.$a,Wn.prototype.eh.call(this,a,y,x,b)},et.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof En||y.Va()}),Wn.prototype.Va.call(this)},et.si=function(){if(!Wn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Wn){if(y.isVisible()&&Ya(y))return!1}else if(y instanceof En&&y.isVisible()&&Ya(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function V0(a,y){if(a.Gn.add(y)){y instanceof Or&&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 En&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function K0(a,y){if(a.Gn.remove(y)){y instanceof Or&&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 En&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}et.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)}Wn.prototype.Lj.call(this)},Or.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=tn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Or.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=tn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Or.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))},et=Or.prototype,et.Bd=function(a){var y=(this.U&65536)!==0;if(Wn.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()?(Ts(x.fromPort),Ts(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Ts(x.fromPort),Ts(x.toPort),x.bb()))}}},et.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 un,b=y.iterator;b.next();){var E=b.value;if(E instanceof Wn)for(E=E.linksConnected;E.next();){var ee=E.value;y.contains(ee)||x.add(ee)}}return a&&(this.$p=x),x.iterator},et.iz=function(){var a=this.Rj();a.add(this);for(var y=new un,x=a.iterator;x.next();){var b=x.value;if(b instanceof Wn)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},et.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new un;return a(this,y),y},et.Rj=function(){var a=new un;return oc(a,this,!0,0,!0),a.remove(this),a},et.Zb=function(a){Wn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Or.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 Or&&ee.isSubGraphExpanded&&(ee.wasSubGraphExpanded=ee.isSubGraphExpanded,$1(ee,y,x,b)),ee instanceof Wn)ee.Bd(y),x.Aj(ee,b);else if(ee instanceof En)for(ee=ee.labelNodes;ee.next();)ee.value.Bd(y)}a.isSubGraphExpanded=!1}Or.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 Or&&ee.wasSubGraphExpanded&&(ee.wasSubGraphExpanded=!1,q1(ee,y,x,b)),ee instanceof Wn)ee.Bd(y),x.Cj(ee,b);else if(ee instanceof En)for(ee=ee.labelNodes;ee.next();)ee.value.Bd(y)}a.isSubGraphExpanded=!0}Or.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(),Wn.prototype.move.call(this,a,y),a=new un,y=this.Rj().iterator;y.next();)E=y.value,E instanceof En&&(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 Wn&&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 En&&(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)}},rn.Object.defineProperties(Or.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&&Ot("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)}}}),Or.prototype.expandSubGraph=Or.prototype.expandSubGraph,Or.prototype.collapseSubGraph=Or.prototype.collapseSubGraph,Or.prototype.findSubGraphParts=Or.prototype.Rj,Or.prototype.findContainingGroupChain=Or.prototype.hz,Or.prototype.findExternalNodesConnected=Or.prototype.iz,Or.prototype.findExternalLinksConnected=Or.prototype.Lu,Or.prototype.ensureBounds=Or.prototype.Va,Or.className="Group";function Qa(a){_t.call(this),this.yb=ta,this.ko=new Xt(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Ht(Qa,_t),Qa.prototype.cloneProtected=function(a){_t.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Qa.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Ji(0,0,y.width,y.height,a.x,a.y)},Qa.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Or||a instanceof yi)||Ot("Placeholder is not inside a Group or Adornment."),a instanceof Or){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Ni(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!==Sn.Link&&(ae=ee.ga(a.category==="Selection"?ni:a.locationSpot,st.alloc()),a.location=ae,st.free(ae)),isNaN(ge)||isNaN(ne)?(a=ee.ga(ni,st.alloc()),ge=Xt.allocAt(a.x,a.y,0,0),ge.Ye(ee.ga(Ri,a)),ge.Ye(ee.ga(Ai,a)),ge.Ye(ee.ga(zo,a)),Ni(y,ge.width+b||0,ge.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),st.free(a),Xt.free(ge)):(Ni(y,ge+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Qa.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Qa.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Or&&!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=Xt.alloc(),E=this.computeMemberBounds(x);var ee=this.yb;return y instanceof Or&&!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)),Xt.free(x),b&&y instanceof Or&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Qa.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Or))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 En&&(!y.computesBoundsIncludingLinks||_s(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},rn.Object.defineProperties(Qa.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Wr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Qa.className="Placeholder";function En(a){Sr.call(this,Sn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=$a,this.Om=0,this.Qm=$a,this.Rm=NaN,this.qj=Q0,this.po=.5,this.wd=null,this.Nb=new on().freeze(),this.Tg=this.Mg=null,this.ml=new Xt,this.ua=new bn,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)}Ht(En,Sr),En.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())},et=En.prototype,et.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&&Ts(y),a=a.toPort,a!==null&&Ts(a)},et.qb=function(a){a.classType===En?(a.value&2)===2?this.routing=a:a===Gs||a===Eh||a===Id?this.curve=a:a===tg||a===Ym||a===Jm?this.adjusting=a:a!==Q0&&a!==$a&&Ot("Unknown Link enum value for a Link property: "+a):Sr.prototype.qb.call(this,a)},et.Xc=function(){this.ba===null&&(this.ba=new Gp)},et.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Ya(a)||rc(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Ya(a)||rc(a)))},et.zv=function(){return!1},et.Av=function(){},et.Zc=function(){return!1},En.prototype.computeAngle=function(a,y,x){return En.computeAngle(y,x)},En.computeAngle=function(a,y){switch(a){default:case $a: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=zt.bp(y),90<a&&270>a&&(a-=180);break;case og:a=zt.bp(y+90),90<a&&270>a&&(a-=180);break;case ag:a=zt.bp(y-90),90<a&&270>a&&(a-=180);break;case $m:if(a=zt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return zt.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&&K0(x,a),a.Ah=y,y!==null&&V0(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}et=En.prototype,et.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Sr.prototype.oh.call(this)},et.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},et.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new un),a.wd.add(y),a.v()}et.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)}},et.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)}},et.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))},En.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},En.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)},En.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},En.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},En.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Qn),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()===Gs))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()===Gs){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return zt.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),zt.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},En.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()===Gs))return this.ua.wx(.5);if(this.computeCurve()===Gs&&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),zt.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)},et=En.prototype,et.i=function(a){return this.Nb.s[a]},et.dd=function(a,y){this.Nb.cd(a,y)},et.L=function(a,y,x){this.Nb.cd(a,new st(y,x))},et.Kz=function(a,y){this.Nb.Gb(a,y)},et.m=function(a,y,x){this.Nb.Gb(a,new st(y,x))},et.ne=function(a){this.Nb.add(a)},et.yf=function(a,y){this.Nb.add(new st(a,y))},et.pv=function(a){this.Nb.mb(a)},et.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 on,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),Xa(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)}}et.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},et.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 Me=ue[ye];ne=Math.min(Me.x,ne),ae=Math.min(Me.y,ae),Me.freeze()}if(y.freeze(),ge===ee){for(ee=0;ee<ge;ee++)if(ye=E[ee],Me=ue[ee],ye.x-x!==Me.x-ne||ye.y-b!==Me.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)}},et.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))}et.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())}},et.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()}}},En.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Rf||(Rf=new Wn,Rf.desiredSize=Ar,Rf.Va()),this.defaultFromPoint&&(Rf.location=this.defaultFromPoint,Rf.Va(),y=a=Rf)):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?(If||(If=new Wn,If.desiredSize=Ar,If.Va()),this.defaultToPoint&&(If.location=this.defaultToPoint,If.Va(),E=b=If)):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=Rd(ne),ue=Rd(x),ge=y===E&&y!==null,ye=this.isOrthogonal,Me=this.curve===Gs;this.Wf=ge&&!ye?Me=!0:!1;var ze=this.computeAdjusting()===$a||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(),Me){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(),Me=ye=0;var Ze=ee.x+ae/3,Qe=ee.y+ue/3,rt=Ze,Tt=Qe;zt.B(ue,0)?Tt=0<ae?Tt-ge:Tt+ge:(ye=-ae/ue,Me=Math.sqrt(ge*ge/(ye*ye+1)),0>ge&&(Me=-Me),rt=(0>ue?-1:1)*Me+Ze,Tt=ye*(rt-Ze)+Qe),Ze=ee.x+2*ae/3,Qe=ee.y+2*ue/3;var xt=Ze,At=Qe;zt.B(ue,0)?At=0<ae?At-ge:At+ge:(xt=(0>ue?-1:1)*Me+Ze,At=ye*(xt-Ze)+Qe),this.Fj(),this.ne(ee),this.yf(rt,Tt),this.yf(xt,At),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,zt.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=Xt.alloc(),y.mi(ae),ue=ae.ca(E),ze.mi(ae),ge=ae.ca(b),(ue||ge)&&(ne=y.ga(Km(ne),new st),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=ze.ga(Km(x),new st),this.dd(1,this.getLinkPointFromPoint(ee,ze,x,b,!1,x))),Xt.free(ae))}else{Me=this.isAvoiding,ze&&(ye&&Me||ge)&&this.Fj();var Ft=ge?this.computeCurviness():0;Me=this.getLinkPoint(a,y,ne,!0,ye,b,E),Ze=rt=Qe=0,(ye||!ae||ge)&&(Tt=this.computeEndSegmentLength(a,y,ne,!0),Ze=this.getLinkDirection(a,y,Me,ne,!0,ye,b,E),ge&&(ae||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ze-=ye?90:30,0>Ft&&(Ze-=180)),0>Ze?Ze+=360:360<=Ze&&(Ze-=360),ge&&(Tt+=Math.abs(Ft)*(ye?1:2)),Ze===0?Qe=Tt:Ze===90?rt=Tt:Ze===180?Qe=-Tt:Ze===270?rt=-Tt:(Qe=Tt*Math.cos(Ze*Math.PI/180),rt=Tt*Math.sin(Ze*Math.PI/180)),ne.Mc()&&ge&&(Tt=y.ga(Gr,st.alloc()),xt=st.allocAt(Tt.x+1e3*Qe,Tt.y+1e3*rt),this.getLinkPointFromPoint(a,y,Tt,xt,!0,Me),st.free(Tt),st.free(xt))),Tt=this.getLinkPoint(b,E,x,!1,ye,a,y);var Dt=At=xt=0;if(ye||!ue||ge){var It=this.computeEndSegmentLength(b,E,x,!1);Dt=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)&&(Dt+=ye?0:30,0>Ft&&(Dt+=180)),0>Dt?Dt+=360:360<=Dt&&(Dt-=360),ge&&(It+=Math.abs(Ft)*(ye?1:2)),Dt===0?xt=It:Dt===90?At=It:Dt===180?xt=-It:Dt===270?At=-It:(xt=It*Math.cos(Dt*Math.PI/180),At=It*Math.sin(Dt*Math.PI/180)),x.Mc()&&ge&&(x=E.ga(Gr,st.alloc()),ne=st.allocAt(x.x+1e3*xt,x.y+1e3*At),this.getLinkPointFromPoint(b,E,x,ne,!1,Tt),st.free(x),st.free(ne))}x=Me,(ye||!ae||ge)&&(x=new st(Me.x+Qe,Me.y+rt)),ne=Tt,(ye||!ue||ge)&&(ne=new st(Tt.x+xt,Tt.y+At)),!ze&&!ye&&ae&&3<ee&&this.adjustPoints(0,Me,ee-2,ne)?this.dd(ee-1,Tt):!ze&&!ye&&ue&&3<ee&&this.adjustPoints(1,x,ee-1,Tt)?this.dd(0,Me):!ze&&(ye?6<=ee:4<ee)&&this.adjustPoints(1,x,ee-2,ne)?(this.dd(0,Me),this.dd(ee-1,Tt)):(this.Fj(),this.ne(Me),(ye||!ae||ge)&&this.ne(x),ye&&this.addOrthoPoints(x,Ze,ne,Dt,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}En.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),Me=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*ue+ye,b=b.x*ae+b.y*ge+Me,ne=x.x*ne+x.y*ue+ye,x=x.x*ae+x.y*ge+Me}return y.Sj(E,b,ne,x,ee),a!==null&&ee.transform(a),ee};function Vm(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)}En.prototype.getLinkPoint=function(a,y,x,b,E,ee,ne,ae){if(ae===void 0&&(ae=new st),x.sb()&&!Rd(x))return y.ga(x,ae),ae;if(x.$c()){var ue=Vm(this,y);if(ue!==null){if(ae.assign(ue.Zo),E&&this.routing===nS){var ge=Vm(this,ne);if(ge!==null&&ue.Gl<ge.Gl){ue=st.alloc(),ge=st.alloc();var ye=new Xt(y.ga(ni,ue),y.ga(Ri,ge)),Me=this.computeSpot(!b,ne);a=this.getLinkPoint(ee,ne,Me,!b,E,a,y,ge),(x.Hf(ja)||x.Hf(vo))&&a.y>=ye.y&&a.y<=ye.y+ye.height?ae.y=a.y:(x.Hf(Ko)||x.Hf(fs))&&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(Km(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(Km(ue),ee),E&&(ne=Z0(x,ne)),st.free(ee)),this.getLinkPointFromPoint(a,y,x,ne,b,ae),st.free(x),ae},En.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=Vm(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(Gr,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(Gr,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)),Rd(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},En.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Vm(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)},En.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Gr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Zo?_r:y)):(a=y||this.toPort,a===null?a=Gr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Zo?_r:y)),a};function Rd(a){return a===_r||a.x===.5&&a.y===.5}function Km(a){return a.x===.5&&a.y===.5?a:Gr}En.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==$a&&4<this.pointsCount?this.computeMidPoint(new st):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(Gr))},En.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},En.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=Cr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return v0(this,y,x,E),ee===void 0&&Cr.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 Me=ye.actualBounds,ze=this.naturalBounds;if(!(Me.x>ze.width||Me.y>ze.height||0>Me.x+Me.width||0>Me.y+Me.height)){if(Me=Cr.alloc(),Me.set(ne),ye instanceof Sn)ae=ye.Cf(a,y,x,b,E,Me);else if(this.path===ye){if(ye instanceof Ur)if(ae=a,ze=b,ye.pickable===!1)ae=!1;else if(Me.multiply(ye.transform),ze)e:{var Ze=ae,Qe=Me;if(ye.fh(Ze,Qe))ae=!0;else{if(Qe===void 0&&(Qe=ye.transform,Ze.Re(ye.actualBounds))){ae=!0;break e}ae=Ze.left,ze=Ze.right;var rt=Ze.top;Ze=Ze.bottom;var Tt=st.alloc(),xt=st.alloc(),At=st.alloc(),Ft=Cr.alloc();Ft.set(Qe),Ft.bv(ye.transform),Ft.Vj(),xt.x=ze,xt.y=rt,xt.transform(Ft),Tt.x=ae,Tt.y=rt,Tt.transform(Ft),Qe=!1,Yc(ye,Tt,xt,At)?Qe=!0:(Tt.x=ze,Tt.y=Ze,Tt.transform(Ft),Yc(ye,Tt,xt,At)?Qe=!0:(xt.x=ae,xt.y=Ze,xt.transform(Ft),Yc(ye,Tt,xt,At)?Qe=!0:(Tt.x=ae,Tt.y=rt,Tt.transform(Ft),Yc(ye,Tt,xt,At)&&(Qe=!0)))),Cr.free(Ft),st.free(Tt),st.free(xt),st.free(At),ae=Qe}}else ae=ye.fh(ae,Me)}else ae=Yo(ye,a,b,Me);ae&&(ze=ye,y!==null&&(ze=y(ye)),ze&&(x===null||x(ze))&&E.add(ze)),Cr.free(Me)}}}return ee===void 0&&Cr.free(ne),ae||this.background!==null||this.areaBackground!==null}return ee===void 0&&Cr.free(ne),!1},En.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?Gs:this.curve},En.prototype.computeCorner=function(){if(this.curve===Gs)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},En.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},En.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(Gr).ab(x.ga(Gr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===Gs&&(a*=1.333)}}return a},En.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===$a&&x.bb()}},En.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=Un(),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),Rn(x)}}return a},En.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},En.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},En.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(!zt.$(ge,0)){if(zt.$(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 Me=y.y;ae=b.x-ne;var ze=b.y-Me;for(ue=Math.sqrt(ae*ae+ze*ze),zt.$(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),zt.$(y,0)||(zt.$(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),Me+y*Math.sin(ae)));this.dd(x,b)}}return!0;case Jm:if(ee=this.i(a),Me=this.i(x),!ee.Xa(y)||!Me.Xa(b)){E=ee.x,ee=ee.y,ne=Me.x,Me=Me.y,ge=(ne-E)*(ne-E)+(Me-ee)*(Me-ee),ae=y.x,ye=y.y,ue=b.x,ze=b.y;var Ze=1;if(ue-ae!==0){var Qe=(ze-ye)/(ue-ae);Ze=Math.sqrt(1+1/(Qe*Qe))}else Qe=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var rt=y.x,Tt=y.y,xt=.5;ge!==0&&(xt=((E-rt)*(E-ne)+(ee-Tt)*(ee-Me))/ge);var At=E+xt*(ne-E),Ft=ee+xt*(Me-ee);y=Math.sqrt((rt-At)*(rt-At)+(Tt-Ft)*(Tt-Ft)),Tt<Qe*(rt-At)+Ft&&(y=-y),0<Qe&&(y=-y),rt=ae+xt*(ue-ae),xt=ye+xt*(ze-ye),Qe!==0?(y=rt+y/Ze,this.L(a,y,xt-(y-rt)/Qe)):this.L(a,rt,xt+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,Me=ae,ge=ye,zt.B(E.y,ee.y)?zt.B(ee.x,ne.x)?ye=y.y:zt.B(ee.y,ne.y)&&(ae=y.x):zt.B(E.x,ee.x)&&(zt.B(ee.y,ne.y)?ae=y.x:zt.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,zt.B(E.y,ee.y)?zt.B(ee.x,ne.x)?ye=b.y:zt.B(ee.y,ne.y)&&(ae=b.x):zt.B(E.x,ee.x)&&(zt.B(ee.y,ne.y)?ae=b.x:zt.B(ee.x,ne.x)&&(ye=b.y)),this.L(x-1,ae,ye),X0(this))){this.L(a+1,Me,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}},En.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 Me=x;if(this.isAvoiding){var ze=this.diagram;if(ze===null||E===ee||this.layer.isTemporary||!vd(ze)||ae.ca(Me)&&!ee.Td(E)||ue.ca(a)&&!E.Td(ee))y=!1;else{var Ze=yd(ze,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Ze.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))&&Ze.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))&&Ze.Yj(Math.min(ye.x,Me.x),Math.min(ye.y,Me.y),Math.abs(ye.x-Me.x),Math.abs(ye.y-Me.y)))y=!1;else{E=a,ee=Me;var Qe=x=null;if(ze.isVirtualized){ze=Ze.bounds.copy(),ze.Bc(-Ze.Ho,-Ze.Go);var rt=st.alloc();_d(Ze,a.x,a.y)||(zt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,a.x,a.y,ge.x,ge.y,rt)?(x=a=rt.copy(),y=rt.ab(ge)):zt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ge.x,ge.y,ye.x,ye.y,rt)?(x=a=rt.copy(),y=rt.ab(ye)):zt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ye.x,ye.y,Me.x,Me.y,rt)&&(x=a=rt.copy(),y=rt.ab(Me))),_d(Ze,Me.x,Me.y)||(zt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,Me.x,Me.y,ye.x,ye.y,rt)?(Qe=Me=rt.copy(),b=ye.ab(rt)):zt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ye.x,ye.y,ge.x,ge.y,rt)?(Qe=Me=rt.copy(),b=ge.ab(rt)):zt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ge.x,ge.y,a.x,a.y,rt)&&(Qe=Me=rt.copy(),b=a.ab(rt))),st.free(rt)}ae=ae.copy().ed(ue),ae.Bc(Ze.Ho*Ze.Os,Ze.Go*Ze.Os),aS(Ze,a,y,Me,b,ae,!0),ue=Pu(Ze,Me.x,Me.y),!Ze.abort&&ue>=zd&&(oS(Ze),ae.Bc(Ze.Ho*Ze.Hx,Ze.Go*Ze.Ix),aS(Ze,a,y,Me,b,ae,!1),ue=Pu(Ze,Me.x,Me.y)),!Ze.abort&&ue<zd&&Pu(Ze,Me.x,Me.y)!==kh?(Y0(this,Ze,Me.x,Me.y,b,!0,ne),ae=this.i(2),4>this.pointsCount?(y===0||y===180?(ae.x=a.x,ae.y=Me.y):(ae.x=Me.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?zt.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)):zt.B(ae.y,ne.y)?(Math.abs(a.y-ae.y)<=Ze.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)&&(zt.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)):zt.B(ae.x,ne.x)?(Math.abs(a.x-ae.x)<=Ze.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)),Qe!==null&&(b===0||b===180?this.yf(ee.x,Qe.y):this.yf(Qe.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)}},En.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=Pu(y,x,b),ye=x,Me=b;for(E===0?ye+=ae:E===90?Me+=ue:E===180?ye-=ae:Me-=ue,E!==ne&&ge>$c&&Pu(y,ye,Me)!==ge-1&&(Pu(y,x-ae,b)===ge-1?(E=180,ye=x-ae,Me=b):Pu(y,x+ae,b)===ge-1?(E=0,ye=x+ae,Me=b):Pu(y,x,b-ue)===ge-1?(E=270,ye=x,Me=b-ue):Pu(y,x,b+ue)===ge-1&&(E=90,ye=x,Me=b+ue));ge>$c&&Pu(y,ye,Me)===ge-1;)x=ye,b=Me,E===0?ye+=ae:E===90?Me+=ue:E===180?ye-=ae:Me-=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),Pu(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),Pu(y,ne,ye)===ge-1&&Y0(a,y,ne,ye,ee,!1,ee))),a.yf(x,b)}En.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=Kn(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=Kn(y,a,b.x,b.y,x.x,x.y);b=x,ae<E&&(ee=ne,E=ae)}return ee},En.prototype.qc=function(){this.lk=!1,this.v()},En.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)}}},En.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===Gs&&3<=y&&!zt.$(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=bn.o,ae=A1(a),this.computeShortLength(!0)!==0&&(E=Df(this,E,!0,ee)),Dd(ae,E.x,E.y,!1),ne===Gs&&3<=y&&!zt.$(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,Me=1;Me<this.pointsCount-1;Me++){ge=this.i(Me);var ze=ne,Ze=ge,Qe=this.i(J0(this,ge,Me,!1));if((!zt.$(ze.x,Ze.x)||!zt.$(Ze.x,Qe.x))&&(!zt.$(ze.y,Ze.y)||!zt.$(Ze.y,Qe.y))){var rt=ye;isNaN(rt)&&(rt=this.smoothness/3);var Tt=ze.x;ze=ze.y;var xt=Ze.x;Ze=Ze.y;var At=Qe.x;Qe=Qe.y;var Ft=rt*Zm(Tt,ze,xt,Ze);rt*=Zm(xt,Ze,At,Qe),zt.$(ze,Ze)&&zt.$(xt,At)&&(xt>Tt?Qe>Ze?(ee.x=xt-Ft,ee.y=Ze-Ft,E.x=xt+rt,E.y=Ze+rt):(ee.x=xt-Ft,ee.y=Ze+Ft,E.x=xt+rt,E.y=Ze-rt):Qe>Ze?(ee.x=xt+Ft,ee.y=Ze-Ft,E.x=xt-rt,E.y=Ze+rt):(ee.x=xt+Ft,ee.y=Ze+Ft,E.x=xt-rt,E.y=Ze-rt)),zt.$(Tt,xt)&&zt.$(Ze,Qe)&&(Ze>ze?(At>xt?(ee.x=xt-Ft,ee.y=Ze-Ft,E.x=xt+rt):(ee.x=xt+Ft,ee.y=Ze-Ft,E.x=xt-rt),E.y=Ze+rt):(At>xt?(ee.x=xt-Ft,ee.y=Ze+Ft,E.x=xt+rt):(ee.x=xt+Ft,ee.y=Ze+Ft,E.x=xt-rt),E.y=Ze-rt)),(zt.$(Tt,xt)&&zt.$(xt,At)||zt.$(ze,Ze)&&zt.$(Ze,Qe))&&(Tt=.5*(Tt+At),ze=.5*(ze+Qe),ee.x=Tt,ee.y=ze,E.x=Tt,E.y=ze),(Me===1||Me===2&&zt.$(ne.x,this.i(0).x)&&zt.$(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,On)),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,On)),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(),Me=1,ge=0;Me<y;){if(Me=J0(this,ee,Me,1<Me),ye=this.i(Me),Me>=y-1){if(!ee.D(ye))this.computeShortLength(!1)!==0&&(ye=Df(this,ye.copy(),!1,On)),Bf(this,ae,-b,-ue,ee,ye,x);else if(ge===0)for(Me=1;Me<y;)E.assign(ee),ye=this.i(Me++),Bf(this,ae,-b,-ue,ee,ye,x),ee.assign(ye);break}if(ge=J0(this,ye,Me+1,Me<y-3),Me=-b,Tt=-ue,ze=ye,xt=this.i(ge),rt=x,zt.B(ee.y,ze.y)&&zt.B(ze.x,xt.x))if(Qe=Math.min(ne,Math.abs(ze.x-E.x)/2),Qe=Ft=Math.min(Qe,Math.abs(xt.y-ze.y)/2),zt.B(Qe,0))Bf(this,ae,Me,Tt,ee,ze,rt),ee.assign(ze);else{var Dt=ze.x,It=ze.y;Ze=Dt,At=It,ze.x>ee.x?Dt=ze.x-Qe:Dt=ze.x+Qe,xt.y>ze.y?At=ze.y+Ft:At=ze.y-Ft,xt=st.allocAt(Dt,It),Bf(this,ae,Me,Tt,ee,xt,rt),st.free(xt),Rm(ae,ze.x+Me,ze.y+Tt,Ze+Me,At+Tt),ee.h(Ze,At)}else zt.B(ee.x,ze.x)&&zt.B(ze.y,xt.y)?(Qe=Math.min(ne,Math.abs(ze.y-E.y)/2),Qe=Ft=Math.min(Qe,Math.abs(xt.x-ze.x)/2),zt.B(Ft,0)?(Bf(this,ae,Me,Tt,ee,ze,rt),ee.assign(ze)):(Dt=ze.x,It=ze.y,Ze=Dt,At=It,ze.y>ee.y?It=ze.y-Qe:It=ze.y+Qe,xt.x>ze.x?Ze=ze.x+Ft:Ze=ze.x-Ft,xt=st.allocAt(Dt,It),Bf(this,ae,Me,Tt,ee,xt,rt),st.free(xt),Rm(ae,ze.x+Me,ze.y+Tt,Ze+Me,At+Tt),ee.h(Ze,At))):(Bf(this,ae,Me,Tt,ee,ze,rt),ee.assign(ze));E.assign(ye),Me=ge}st.free(ee)}Im=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=bn.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),zt.$(a,0)?y:zt.$(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;zt.$(y.x,ee.x)&&zt.$(y.y,ee.y);){if(x>=E)return E-1;ee=a.i(x++)}if(!zt.$(y.x,ee.x)&&!zt.$(y.y,ee.y))return x-1;for(var ne=ee;zt.$(y.x,ee.x)&&zt.$(ee.x,ne.x)&&(!b||(y.y>=ee.y?ee.y>=ne.y:ee.y<=ne.y))||zt.$(y.y,ee.y)&&zt.$(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}En.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(zt.B(E.y,ee.y))if(E.x<ee.x)for(var ye=0;ye<ge;){var Me=Math.max(E.x,Math.min(ue[ye++]-ae,ee.x-ne));y.lineTo(Me+x,ee.y+b);for(var ze=Me+x,Ze=Math.min(Me+ne,ee.x);ye<ge&&(Me=ue[ye],Me<Ze+ne);)ye++,Ze=Math.min(Me+ae,ee.x);Me=ee.y-ne+b,Ze+=x;var Qe=ee.y+b;a.curve===Eh?Dd(y,Ze,Qe,!1):wh(y,ze,Me,Ze,Me,Ze,Qe)}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,Me=Math.max(ye-ne,ee.x);0<=ge&&(ye=ue[ge],ye>Me-ne);)ge--,Me=Math.max(ye-ae,ee.x);ye=ee.y-ne+b,Me+=x,Ze=ee.y+b,a.curve===Eh?Dd(y,Me,Ze,!1):wh(y,ze,ye,Me,ye,Me,Ze)}else if(zt.B(E.x,ee.x))if(E.y<ee.y)for(ye=0;ye<ge;){for(Me=Math.max(E.y,Math.min(ue[ye++]-ae,ee.y-ne)),y.lineTo(ee.x+x,Me+b),ze=Me+b,Me=Math.min(Me+ne,ee.y);ye<ge&&(Ze=ue[ye],Ze<Me+ne);)ye++,Me=Math.min(Ze+ae,ee.y);Ze=ee.x-ne+x,Qe=ee.x+x,Me+=b,a.curve===Eh?Dd(y,Qe,Me,!1):wh(y,Ze,ze,Ze,Me,Qe,Me)}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&&(Me=ue[ge],Me>ye-ne);)ge--,ye=Math.max(Me-ae,ee.y);Me=ee.x-ne+x,Ze=ee.x+x,ye+=b,a.curve===Eh?Dd(y,Ze,ye,!1):wh(y,Me,ze,Me,ye,Ze,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 En){if(ue===a)return 0<b.length&&b.sort(function(ye,Me){return ye-Me}),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,Me){return ye-Me}),b.length}function Tx(a,y,x,b){for(var E=zt.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 Me=a.y,ze=y.x,Ze=y.y,Qe=ne.x;ne=ne.y;var rt=ge.x,Tt=ge.y;if(zt.B(ye,ze)){if(!zt.B(Me,Ze)&&zt.B(ne,Tt)&&Math.min(Me,Ze)<ne&&Math.max(Me,Ze)>ne&&Math.min(Qe,rt)<ye&&Math.max(Qe,rt)>ye&&!zt.B(Qe,rt)){ae.x=ye,ae.y=ne,ye=!0;break e}}else if(zt.B(Me,Ze)&&zt.B(Qe,rt)&&Math.min(ye,ze)<Qe&&Math.max(ye,ze)>Qe&&Math.min(ne,Tt)<Me&&Math.max(ne,Tt)>Me&&!zt.B(ne,Tt)){ae.x=Qe,ae.y=Me,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===Id||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()))}En.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 En&&(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 En&&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())}}En.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},En.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},En.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)},En.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&&(er(y.links,a),y.Sl()))}En.prototype.ph=function(){return!0},rn.Object.defineProperties(En.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&&Ts(x),eg(this),this.ff=a;var b=this.fromPort;b!==null&&Ts(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&&Ts(x),eg(this),this.vf=a;var b=this.toPort;b!==null&&Ts(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:Zo},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&&Ts(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&&Dn(a,">= 0",En,"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:Zo},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&&Ts(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&&Dn(a,">= 0",En,"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?pi: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()===Gs&&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),zt.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);zt.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);zt.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):zt.$(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 on,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(!Qt(ee)||typeof ee.x!="number"||isNaN(ee.x)||typeof ee.y!="number"||isNaN(ee.y)){b=!1;break}}if(b)for(x=new on,b=0;b<a.length;b++)E=a[b],x.add(new st(E.x,E.y).freeze())}}else if(a instanceof on)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Ot("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||!Rd(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Rd(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===Id||a===Eh||a===Id),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)}}}),En.prototype.invalidateOtherJumpOvers=En.prototype.Xo,En.prototype.findClosestSegment=En.prototype.ez,En.prototype.updateRoute=En.prototype.vg,En.prototype.invalidateRoute=En.prototype.bb,En.prototype.rollbackRoute=En.prototype.rv,En.prototype.commitRoute=En.prototype.zf,En.prototype.startRoute=En.prototype.uh,En.prototype.clearPoints=En.prototype.Fj,En.prototype.removePoint=En.prototype.pv,En.prototype.addPointAt=En.prototype.yf,En.prototype.addPoint=En.prototype.ne,En.prototype.insertPointAt=En.prototype.m,En.prototype.insertPoint=En.prototype.Kz,En.prototype.setPointAt=En.prototype.L,En.prototype.setPoint=En.prototype.dd,En.prototype.getPoint=En.prototype.i,En.prototype.getOtherPort=En.prototype.Cz,En.prototype.getOtherNode=En.prototype.To;var Rf=null,If=null,Q0=new Yt(En,"Normal",1),Mx=new Yt(En,"Orthogonal",2),Lx=new Yt(En,"AvoidsNodes",6),nS=new Yt(En,"AvoidsNodesStraight",7),$a=new Yt(En,"None",0),Gs=new Yt(En,"Bezier",9),Eh=new Yt(En,"JumpGap",10),Id=new Yt(En,"JumpOver",11),tg=new Yt(En,"End",17),Ym=new Yt(En,"Scale",18),Jm=new Yt(En,"Stretch",19),ng=new Yt(En,"OrientAlong",21),rg=new Yt(En,"OrientPlus90",22),ig=new Yt(En,"OrientMinus90",23),$0=new Yt(En,"OrientOpposite",24),Qm=new Yt(En,"OrientUpright",25),og=new Yt(En,"OrientPlus90Upright",26),ag=new Yt(En,"OrientMinus90Upright",27),$m=new Yt(En,"OrientUpright45",28),rS=16,iS=14,sg=8;En.className="Link",En.Normal=Q0,En.Orthogonal=Mx,En.AvoidsNodes=Lx,En.AvoidsNodesStraight=nS,En.None=$a,En.Bezier=Gs,En.JumpGap=Eh,En.JumpOver=Id,En.End=tg,En.Scale=Ym,En.Stretch=Jm,En.OrientAlong=ng,En.OrientPlus90=rg,En.OrientMinus90=ig,En.OrientOpposite=$0,En.OrientUpright=Qm,En.OrientPlus90Upright=og,En.OrientMinus90Upright=ag,En.OrientUpright45=$m,En.EndSegmentStep=8,En.CurvinessStart=rS,En.SpacingMin=iS,En.OrthoShortCut=sg;function qm(a,y,x,b){gr(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){gr(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 Pu(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 Cu(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,Me=a.ac[ge][ye];if(Me>=$c&&Me<zd)for(E?ye+=b:ge+=b,Me+=1;ee<=ge&&ge<=ne&&ae<=ye&&ye<=ue&&!(Me>=a.ac[ge][ye]);)a.ac[ge][ye]=Me,Me+=1,E?ye+=b:ge+=b;if(ge=E?ye:ge,E)if(0<b)for(x+=b;x<ge;x+=b)Cu(a,y,x,1,!E,ee,ne,ae,ue),Cu(a,y,x,-1,!E,ee,ne,ae,ue);else for(x+=b;x>ge;x+=b)Cu(a,y,x,1,!E,ee,ne,ae,ue),Cu(a,y,x,-1,!E,ee,ne,ae,ue);else if(0<b)for(y+=b;y<ge;y+=b)Cu(a,y,x,1,!E,ee,ne,ae,ue),Cu(a,y,x,-1,!E,ee,ne,ae,ue);else for(y+=b;y>ge;y+=b)Cu(a,y,x,1,!E,ee,ne,ae,ue),Cu(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 Me=ee.x;b=ee.y,y=ee.x+ee.width;var ze=ee.y+ee.height;Me-=a.Nd,Me/=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,Me|0)),y=Math.min(a.di,Math.max(0,y|0)),Me=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 Ze=x===0||x===90?1:-1;if(x=x===90||x===270,b[ae][ue]===kh?(ev(a,ae,ue,Ze,x,ee,y,Me,ze),ev(a,ae,ue,1,!x,ee,y,Me,ze),ev(a,ae,ue,-1,!x,ee,y,Me,ze)):ev(a,ae,ue,Ze,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,Me,ze),tv(a,ge,ye,1,!(E===90||E===270),ee,y,Me,ze),tv(a,ge,ye,-1,!(E===90||E===270),ee,y,Me,ze)):tv(a,ge,ye,Ze,x,ge,ye,ge,ye),x=Un(),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 Cu(a,ae,ue,1,!1,ee,y,Me,ze),Cu(a,ae,ue,-1,!1,ee,y,Me,ze),Cu(a,ae,ue,1,!0,ee,y,Me,ze),Cu(a,ae,ue,-1,!0,ee,y,Me,ze);Rn(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,Me=ge;if(b===0)if(ye<E)ye++;else break;else if(b===90)if(Me<ee)Me++;else break;else if(b===180)if(ye>E)ye--;else break;else if(Me>ee)Me--;else break;var ze=ae[ye][Me];if(ze===0||ze===ey)break;ue=ye,ge=Me}for(;;){if(ye=b,Me=ue,ze=ge,b===0?ze<ee?(ye=90,ze++):ze>ee&&(ye=270,ze--):b===90?Me<E?(ye=0,Me++):Me>E&&(ye=180,Me--):b===180?ze<ee?(ye=90,ze++):ze>ee&&(ye=270,ze--):Me<E?(ye=0,Me++):Me>E&&(ye=180,Me--),Me=ae[Me][ze],ye!==b&&Me!==0&&Me!==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++}}}rn.Object.defineProperties(lg.prototype,{bounds:{get:function(){return new Xt(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(){gr(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 Or?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(ni,st.alloc()),ue=a.port.ga(Ri,st.alloc());for(E=Xt.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),Me=ge.computeSpot(ye,a.port);if(Me.$c()&&(ye=ye?ge.toPort:ge.fromPort,ye!==null)){var ze=ye.part;if(ze!==null){var Ze=ze.findVisibleNode();Ze!==null&&Ze!==ze&&(ze=Ze,ye=ze.port),ye=ge.computeOtherPoint(ze,ye),ze=ae.ab(ye),ze-=ue,0>ze?ze+=360:360<=ze&&(ze-=360),Me=Nx(E,Me,ze,ge.isOrthogonal),Me===0?(Me=4,180<ze&&(ze-=360)):Me===90?(Me=8,270<ze&&(ze-=360)):Me===180?Me=2:(Me=1,90>ze&&(ze+=360)),Ze=a.pe[ee],Ze===void 0?(Ze=new ty(ge,ze,Me),a.pe[ee]=Ze):(Ze.link=ge,Ze.angle=ze,Ze.Nc=Me),Ze.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,Me=a.port,b=a.node.portSpreading,ae=st.alloc(),ue=st.alloc(),ne=st.alloc(),ge=st.alloc(),Me.ga(ni,ae),Me.ga(Ai,ue),Me.ga(Ri,ne),Me.ga(zo,ge),Ze=ze=ye=Me=0,b===W0)for(var Qe=0;Qe<ee.length;Qe++){var rt=ee[Qe];if(rt!==null){var Tt=rt.link.computeThickness();switch(rt.Nc){case 8:ze+=Tt;break;case 2:Ze+=Tt;break;case 1:Me+=Tt;break;default:case 4:ye+=Tt}}}var xt=Qe=0,At=1,Ft=rt=0;for(Tt=0;Tt<ee.length;Tt++){var Dt=ee[Tt];if(Dt!==null){if(Qe!==Dt.Nc){switch(Qe=Dt.Nc,Qe){case 8:var It=ne;xt=ge;break;case 2:It=ge,xt=ae;break;case 1:It=ae,xt=ue;break;default:case 4:It=ue,xt=ne}switch(rt=xt.x-It.x,Ft=xt.y-It.y,Qe){case 8:ze>Math.abs(rt)?(At=Math.abs(rt)/ze,ze=Math.abs(rt)):At=1;break;case 2:Ze>Math.abs(Ft)?(At=Math.abs(Ft)/Ze,Ze=Math.abs(Ft)):At=1;break;case 1:Me>Math.abs(rt)?(At=Math.abs(rt)/Me,Me=Math.abs(rt)):At=1;break;default:case 4:ye>Math.abs(Ft)?(At=Math.abs(Ft)/ye,ye=Math.abs(Ft)):At=1}xt=0}var Wt=Dt.Zo;if(b===W0){switch(Dt=Dt.link.computeThickness(),Dt*=At,Wt.set(It),Qe){case 8:Wt.x=It.x+rt/2+ze/2-xt-Dt/2;break;case 2:Wt.y=It.y+Ft/2+Ze/2-xt-Dt/2;break;case 1:Wt.x=It.x+rt/2-Me/2+xt+Dt/2;break;default:case 4:Wt.y=It.y+Ft/2-ye/2+xt+Dt/2}xt+=Dt}else{var _n=.5;b===Hm&&(_n=(Dt.Uo+1)/(Dt.Gl+1)),Wt.x=It.x+rt*_n,Wt.y=It.y+Ft*_n}}}for(st.free(ae),st.free(ue),st.free(ne),st.free(ge),It=a.pe,ee=0;ee<It.length;ee++)b=It[ee],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,Xt.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,_r,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 lo(a){gr(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)}lo.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},lo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},lo.prototype.qb=function(){},lo.prototype.toString=function(){var a=$n(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},lo.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())}}},lo.prototype.createNetwork=function(){return new Xi(this)},lo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Kt?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Or?y.lg(a.memberParts):y.lg(a.iterator),y},lo.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")}},lo.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()}},lo.prototype.doLayout=function(a){var y=new un;a instanceof Kt?(ac(this,y,a.nodes,!0,this.rh,!0,!1,!0),ac(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Or?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},lo.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 Or&&(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++}},lo.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 En)&&(ug(ae),this.rh(ae))){var ue=ae.measuredBounds,ge=ue.width;ue=ue.height,ae.moveTo(x,b),ae instanceof Or&&(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++}}},lo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Or&&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 Wn?ue.isLinkLabel||(ue instanceof Or&&ue.layout===null?ac(a,y,ue.memberParts,!1,E,ee,ne,ae):(ug(ue),y.add(ue))):ne&&ue instanceof En?y.add(ue):!ae||!ue.Zc()||ue instanceof Wn||(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()}lo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Xt),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},lo.prototype.ex=function(a){var y=new un;return a instanceof Kt?(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 Or?ac(this,y,a.memberParts,!1,null,!0,!0,!0):ac(this,y,a.iterator,!1,null,!0,!0,!0),y},lo.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(ni),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},rn.Object.defineProperties(lo.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())}}}),lo.prototype.collectParts=lo.prototype.ex,lo.prototype.getLayoutBounds=lo.prototype.ni,lo.prototype.invalidateLayout=lo.prototype.C,lo.className="Layout";function Xi(a){gr(this),this.Sc=a,this.wf=new un,this.ye=new un,this.Es=new Vt,this.zs=new Vt}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 un,this.ye=new un,this.Es=new Vt,this.zs=new Vt},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 Wo(this)},Xi.prototype.createEdge=function(){return new Ms(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 Wn)return!ne.isLinkLabel;if(ne instanceof En){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 Wn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Or&&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 En&&(!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},et=Xi.prototype,et.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},et.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},et.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}et.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},et.ki=function(a){return a===null?null:this.Es.I(a)},et.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}}et.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},et.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))}et.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},et.Lo=function(a){return a===null?null:this.zs.I(a)},et.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},et.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))}},et.Ko=function(){for(var a=Un(),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]);Rn(a)},Xi.prototype.deleteArtificialVertexes=function(){for(var a=Un(),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=Un(),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]);Rn(a),Rn(y)};function Ax(a){for(var y=Un(),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]);Rn(y)}Xi.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new on;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 un,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},rn.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 Wo(a){gr(this),this.ob=a,this.j=new Xt(0,0,10,10).freeze(),this.o=new st(5,5).freeze(),this.Sh=this.ub=null,this.tg=new on,this.mg=new on}Wo.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new on,this.mg=new on},Wo.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Yr(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},Wo.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Qt(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 Or)){x=Xt.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(Gr);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),Xt.free(x);return}Xt.free(x)}a.moveTo(y.x,y.y)}},Wo.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Wo.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Wo.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Wo.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}rn.Object.defineProperties(Wo.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=Xt.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),Xt.free(x),!(a instanceof Or)&&(a=a.locationObject.ga(Gr),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 un,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new un,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new un,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 on,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}}}),Wo.prototype.deleteDestinationEdge=Wo.prototype.Jl,Wo.prototype.addDestinationEdge=Wo.prototype.zl,Wo.prototype.deleteSourceEdge=Wo.prototype.Kl,Wo.prototype.addSourceEdge=Wo.prototype.Cl,Wo.className="LayoutVertex",Wo.standardComparer=oy,Wo.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 Ms(a){gr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Ms.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Ms.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Yr(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},Ms.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Ms.prototype.commit=function(){},Ms.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},rn.Object.defineProperties(Ms.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)}}}),Ms.prototype.getOtherVertex=Ms.prototype.Ax,Ms.className="LayoutEdge";function ha(a){lo.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new fn(NaN,NaN).freeze(),this.tf=new fn(10,10).freeze(),this.Jb=hg,this.Rb=rv,this.nd=cg,this.hd=hS,a&&Object.assign(this,a)}Ht(ha,lo),ha.prototype.cloneProtected=function(a){lo.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},ha.prototype.qb=function(a){a.classType===ha?a===cg||a===ov||a===ay||a===iv?this.sorting=a:a===rv||a===Rl?this.arrangement=a:a===hg||a===nv?this.alignment=a:Ot("Unknown enum value: "+a):lo.prototype.qb.call(this,a)},ha.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 Or)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=Xt.alloc(),ye=Math.max(this.cellSize.width,1);if(!isFinite(ye))for(var Me=ye=0;Me<E.length;Me++){var ze=this.ni(E[Me],ge);ye=Math.max(ye,ze.width)}if(ye=Math.max(ye+ae,1),Me=Math.max(this.cellSize.height,1),!isFinite(Me))for(ze=Me=0;ze<E.length;ze++){var Ze=this.ni(E[ze],ge);Me=Math.max(Me,Ze.height)}Me=Math.max(Me+ue,1),ze=this.arrangement;for(var Qe=Ze=this.arrangementOrigin.x,rt=this.arrangementOrigin.y,Tt=0,xt=0,At=0;At<E.length;At++){var Ft=E[At],Dt=this.ni(Ft,ge),It=Math.ceil((Dt.width+ae)/ye)*ye,Wt=Math.ceil((Dt.height+ue)/Me)*Me;switch(ze){case Rl:var _n=Math.abs(Qe-Dt.width);break;default:_n=Qe+Dt.width}switch((0<ee&&Tt>ee-1||0<ne&&0<Tt&&_n-Ze>ne)&&(b.push(new Xt(0,rt,ne+ae,xt)),Tt=0,Qe=Ze,rt+=xt,xt=0),xt=Math.max(xt,Wt),ze){case Rl:Dt=-Dt.width;break;default:Dt=0}switch(Ft.moveTo(Qe+Dt,rt),ze){case Rl:Qe-=It;break;default:Qe+=It}Tt++}b.push(new Xt(0,rt,ne+ae,xt)),Xt.free(ge);break;case hg:for(ue=ne,ye=ee,Me=y,ze=x,ne=Xt.alloc(),Ze=Math.max(this.cellSize.width,1),ee=rt=ge=0,ae=st.alloc(),Qe=0;Qe<E.length;Qe++)xt=E[Qe],Tt=this.ni(xt,ne),xt=bh(xt,xt.locationObject,xt.locationSpot,ae),ge=Math.max(ge,xt.x),rt=Math.max(rt,Tt.width-xt.x),ee=Math.max(ee,xt.y);switch(Qe=this.arrangement,Qe){case Rl:ge+=Me;break;default:rt+=Me}Ze=isFinite(Ze)?Math.max(Ze+Me,1):Math.max(ge+rt,1);var rr=xt=this.arrangementOrigin.x;for(At=this.arrangementOrigin.y,rt=0,ue>=ge&&(ue-=ge),ge=Ft=0,It=Math.max(this.cellSize.height,1),Dt=ee=0,Wt=!0,Tt=st.alloc(),_n=0;_n<E.length;_n++){var Yn=E[_n],Cn=this.ni(Yn,ne),dn=bh(Yn,Yn.locationObject,Yn.locationSpot,ae);if(0<rt)switch(Qe){case Rl:rr=(rr-xt-(Cn.width-dn.x))/Ze,rr=zt.$(Math.round(rr),rr)?Math.round(rr):Math.floor(rr),rr=rr*Ze+xt;break;default:rr=(rr-xt+dn.x)/Ze,rr=zt.$(Math.round(rr),rr)?Math.round(rr):Math.ceil(rr),rr=rr*Ze+xt}else switch(Qe){case Rl:Ft=rr+dn.x+Cn.width;break;default:Ft=rr-dn.x}switch(Qe){case Rl:var jr=-(rr+dn.x)+Ft;break;default:jr=rr+Cn.width-dn.x-Ft}if(0<ye&&rt>ye-1||0<ue&&0<rt&&jr>ue){for(b.push(new Xt(0,Wt?At-ee:At,ue+Me,Dt+ee+ze)),rr=0;rr<rt&&_n!==rt;rr++){jr=E[_n-rt+rr];var kr=bh(jr,jr.locationObject,jr.locationSpot,Tt);jr.moveTo(jr.position.x,jr.position.y+ee-kr.y)}Dt+=ze,At=Wt?At+Dt:At+(Dt+ee),rt=Dt=ee=0,rr=xt,Wt=!1}switch(rr===xt&&(ge=Qe===Rl?Math.max(ge,Cn.width-dn.x):Math.min(ge,-dn.x)),ee=Math.max(ee,dn.y),Dt=Math.max(Dt,Cn.height-dn.y),isFinite(It)&&(Dt=Math.max(Dt,Math.max(Cn.height,It)-dn.y)),Wt?Yn.moveTo(rr-dn.x,At-dn.y):Yn.moveTo(rr-dn.x,At),Qe){case Rl:rr-=dn.x+Me;break;default:rr+=Cn.width-dn.x+Me}rt++}if(b.push(new Xt(0,At,ue+Me,(Wt?Dt:Dt+ee)+ze)),E.length!==rt)for(ue=0;ue<rt;ue++)ye=E[E.length-rt+ue],Me=bh(ye,ye.locationObject,ye.locationSpot,ae),ye.moveTo(ye.position.x,ye.position.y+ee-Me.y);if(st.free(ae),st.free(Tt),Qe===Rl)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);Xt.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===Rl?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}},ha.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}rn.Object.defineProperties(ha.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!==Rl||(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 Yt(ha,"Position",0),hg=new Yt(ha,"Location",1),rv=new Yt(ha,"LeftToRight",2),Rl=new Yt(ha,"RightToLeft",3),ay=new Yt(ha,"Forward",4),iv=new Yt(ha,"Reverse",5),cg=new Yt(ha,"Ascending",6),ov=new Yt(ha,"Descending",7);ha.className="GridLayout",ha.standardComparer=hS,ha.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},ha.Position=nv,ha.Location=hg,ha.LeftToRight=rv,ha.RightToLeft=Rl,ha.Forward=ay,ha.Reverse=iv,ha.Ascending=cg,ha.Descending=ov;function Oi(){this.On=new un,this.Dn=new un,this.Pa=new un,this.cf=new Vt,this.bf=new Vt,this.aj=new Vt,this.H=null,this.tp=!1}et=Oi.prototype,et.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},et.Xe=function(a){this.H=a},et.oi=function(a){if(a instanceof Wn){if(this.On.add(a),a instanceof Or){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 En?this.Dn.add(a):a instanceof yi||this.Pa.add(a);y=a.data,y===null||a instanceof yi||(a instanceof En?this.bf.add(y,a):this.cf.add(y,a))},et.pc=function(a){if(a.Ej(),a instanceof Wn){if(this.On.remove(a),a instanceof Or){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 En?this.Dn.remove(a):a instanceof yi||this.Pa.remove(a);y=a.data,y===null||a instanceof yi||(a instanceof En?this.bf.remove(y):this.cf.remove(y))},et.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 Or)&&Ot('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 Or||Ot('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 En||Ot('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Un(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Un(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Un(),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]);Rn(y),Rn(x),Rn(a)}},Oi.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Oi.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&&(dl(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)}}Oi.prototype.insertLink=function(){return null},Oi.prototype.resolveReferencesForData=function(){},Oi.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,Tn('No Group template found for category "'+x+'"'),Tn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,Tn('No Node template found for category "'+x+'"'),Tn(" Using default node template")),y=a.ny))),y}Oi.prototype.getLinkCategoryForData=function(){return""},Oi.prototype.setLinkCategoryForData=function(){},Oi.prototype.setFromNodeForLink=function(){},Oi.prototype.setToNodeForLink=function(){},Oi.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,Tn('No Link template found for category "'+a+'"'),Tn(" Using default link template")),x=y.my)),x},Oi.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Oi.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Oi.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Ep(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Oi.prototype.unresolveReferencesForPart=function(){},Oi.prototype.removeDataForLink=function(){},Oi.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Oi.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Wn?a:null)},Oi.prototype.findLinkForKey=function(){return null},et=Oi.prototype,et.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},et.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Wn?a:null)},et.Kc=function(a){return a===null?null:this.bf.I(a)},et.ms=function(a){for(var y=0;y<arguments.length;++y);y=new un;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(Qt(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator},et.ls=function(a){for(var y=0;y<arguments.length;++y);y=new un;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(Qt(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(Qt(y)&&Qt(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}Oi.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===ro){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===wo){var ne=a.newValue;b==="nodeDataArray"&&Qt(ne)&&cS(this,ne),y.isModified=!0}else if(x===Eo){var ae=a.oldValue;b==="nodeDataArray"&&Qt(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===ro){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===wo||x===Eo){var ye=a.change===wo,Me=ye?a.newParam:a.oldParam,ze=ye?a.newValue:a.oldValue,Ze=this.aj.I(a.object);if(Array.isArray(Ze))for(a=0;a<Ze.length;a++){var Qe=Ze[a];if(ye)Cm(Qe,ze,Me,!0);else if(!(0>Me)){var rt=Me+Kp(Qe);Qe.pc(rt,!0),w0(Qe,rt,Me)}}y.isModified=!0}}finally{y.aa=!0}}}}},Oi.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)},Oi.prototype.rp=function(){for(var a=this.H.model,y=new un,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()},Oi.prototype.refreshDataBoundLinks=function(){},Oi.prototype.updateRelationshipsFromData=function(){},Oi.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=Un()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Rn(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}}}}Oi.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new Vt;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 un;for(var ee=new Vt,ne=b.iterator;ne.next();){var ae=ne.value;if(ae instanceof En)a||ae.fromNode!==null&&ae.toNode!==null||E.add(ae);else if(ae instanceof Wn&&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 Vt;b.each(function(Me){Me.key.data!==null&&ye.add(Me.key.data,Me.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 Wn){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 Or&&ee instanceof Or)for(y=y.memberParts;y.next();)ne=av(a,y.value,x,b,E),ne instanceof En||ne===null||(ne.containingGroup=ee)}else if(y instanceof En&&ee instanceof En)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 Wn&&(ne.labeledLink=ee);return ee}Oi.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof En||(b=E.copyNodeData(b),Qt(b)&&(E.xf(b),x=y.Lc(b)))}else dl(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 En||(E=y.copyNodeData(b)),Qt(E)&&(x.data=E)));return x},rn.Object.defineProperties(Oi.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}}}),Oi.prototype.updateAllRelationshipsFromData=Oi.prototype.rp,Oi.prototype.findLinksByExample=Oi.prototype.ls,Oi.prototype.findNodesByExample=Oi.prototype.ms,Oi.prototype.findLinkForData=Oi.prototype.Kc,Oi.prototype.findNodeForData=Oi.prototype.ii,Oi.prototype.findPartForData=Oi.prototype.Lc,Oi.prototype.findNodeForKey=Oi.prototype.Vb,Oi.prototype.removeModeledPart=Oi.prototype.ip,Oi.prototype.removeModeledParts=Oi.prototype.Gs,Oi.prototype.rebuildParts=Oi.prototype.Wd;var pS=!1,gS=!1,mS=!1;Oi.className="PartManager";function qo(a){Oi.apply(this,arguments)}Ht(qo,Oi),qo.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},qo.prototype.addModeledParts=function(a){for(Oi.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){dl(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=Us(x,y,!0),ee!==void 0&&(ee=a.Vb(ee),ee instanceof Wn&&(E.fromNode=ee)),ee=hv(x,y,!1),ee!==""&&(E.toPortId=ee),ee=Us(x,y,!1),ee!==void 0&&(ee=a.Vb(ee),ee instanceof Wn&&(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}}}}qo.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)})}qo.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},qo.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},qo.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},qo.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},qo.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},qo.prototype.findPartForKey=function(a){var y=Oi.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},qo.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},qo.prototype.doModelChanged=function(a){var y=this;if(Oi.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===ro){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 Me=this.Kc(a.object);if(Me!==null){var ze=a.newValue;typeof ze=="string"&&(Me.toPortId=ze)}}else if(E==="nodeGroupKey"){var Ze=this.Lc(a.object);if(Ze!==null){var Qe=a.newValue;if(Qe!==void 0){var rt=this.Vb(Qe);rt instanceof Or?Ze.containingGroup=rt:Ze.containingGroup=null}else Ze.containingGroup=null}}else if(E==="linkLabelKeys"){var Tt=this.Kc(a.object);if(Tt!==null){var xt=a.oldValue,At=a.newValue;Array.isArray(xt)&&xt.forEach(function(dn){0<=At.indexOf(dn)||(dn=y.Vb(dn),dn!==null&&(dn.labeledLink=null))}),Array.isArray(At)&&At.forEach(function(dn){dn=y.Vb(dn),dn!==null&&(dn.labeledLink=Tt)})}}else if(E==="linkCategory"){var Ft=this.Kc(a.object),Dt=a.newValue;Ft!==null&&typeof Dt=="string"&&(Ft.category=Dt)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===wo){var It=a.newValue;if(E==="linkDataArray"&&typeof It=="object"&&It!==null)yS(this,It);else if(E==="linkLabelKeys"&&lc(It)){var Wt=this.Kc(a.object),_n=this.Vb(It);Wt!==null&&_n!==null&&(_n.labeledLink=Wt)}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 Yn=this.Vb(rr);Yn!==null&&(Yn.labeledLink=null)}x.isModified=!0}}else if(b===ro){var Cn=a.propertyName;a.object!==x.model||Cn!=="linkFromKeyProperty"&&Cn!=="linkToKeyProperty"&&Cn!=="linkFromPortIdProperty"&&Cn!=="linkToPortIdProperty"&&Cn!=="linkLabelKeysProperty"&&Cn!=="nodeIsGroupProperty"&&Cn!=="nodeGroupKeyProperty"&&Cn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},qo.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new un,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)})},qo.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 En){var E=Us(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Us(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 un().addAll(y);var ne=new un;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 yi)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Or)&&(a.containingGroup=y)}}},qo.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 Or&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(ee.link=this.Kc(ne),ee.link!==null&&E instanceof Wn&&(Us(y,ne,!0)===x&&(ee.link.fromNode=E),Us(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}}_l(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Or&&(E.containingGroup=a))}},qo.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Wn){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Il(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Il(y,x,b.data)),a instanceof Or)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Il(y,x,b)}}},qo.prototype.copyPartData=function(a,y){var x=Oi.prototype.copyPartData.call(this,a,y);if(a instanceof En)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},qo.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 En){if(dl(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 Wn&&(dl(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 Wn||(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},qo.prototype.findLinkForKey=qo.prototype.findLinkForKey,qo.prototype.findPartForKey=qo.prototype.findPartForKey,qo.prototype.removeAllModeledParts=qo.prototype.removeAllModeledParts,qo.prototype.addModeledParts=qo.prototype.addModeledParts,qo.prototype.addAllModeledParts=qo.prototype.addAllModeledParts,qo.className="GraphLinksPartManager";function el(){Oi.apply(this,arguments),this.Sg=null}Ht(el,Oi);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||!Ha(b,E,ee,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(dl(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}}}el.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},el.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},el.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}},el.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))},el.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},el.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},el.prototype.doModelChanged=function(a){if(Oi.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===ro){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===ro){var Me=a.propertyName;a.object===y.model&&Me==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},el.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Wn&&(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)))}}},el.prototype.updateDataBindings=function(a,y){Oi.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},el.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 Wn&&y.mh(ee)===x&&sv(this,E,this.ii(ee))}_l(y,x)}a=y.mh(a),a!==void 0&&E instanceof Wn&&(a=this.Vb(a),sv(this,a,E))}},el.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Wn){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)&&Il(y,x,E)}},el.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},el.prototype.findLinkForKey=el.prototype.findLinkForKey,el.className="TreePartManager";function hr(a,y){this.kl=new un,this.il=new un,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,gr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Vt,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 Vt,this.Lt=new on,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))}hr.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},hr.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},hr.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},hr.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},hr.prototype.xA=function(a){a.change!==Ea&&Ot("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Uo?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},hr.prototype.Qv=function(a,y){var x=this,b=!1,E=new un,ee=new un,ne=new un,ae=this.vh;a.changes.each(function(Me){Me.model===x&&(Me.modelChange==="nodeDataArray"?Me.change===wo?E.add(Me.newValue):Me.change===Eo&&ne.add(Me.oldValue):x.lb(Me.object)?ee.add(Me.object):Me.change!==ro||x.modelData!==Me.object&&Me.propertyName!=="modelData"?Me.object!==null&&(ae&&ae.contains(Me.object)?ae.get(Me.object).each(function(ze){x.lb(ze)&&ee.add(ze)}):Me.object instanceof hr||x.ri()&&x.Jc(Me.object)||bS(x,Me.object).each(function(ze){ee.add(ze)})):b=!0)});var ue=this.il;ue.clear(),E.each(function(Me){ue.add(x.wa(Me)),y||ee.add(Me)});var ge=this.kl;ge.clear(),ne.each(function(Me){ge.add(x.wa(Me)),y&&ee.add(Me)}),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},hr.prototype.cloneDeep=function(a){return Gd(this,a,!0)};function Gd(a,y,x,b,E,ee){function ne(Me,ze){ae?(Me.__gohashid===void 0&&ee.push(Me),b.set(Me,ze)):(Me=Di++,b.set(Me,ze),E.set(Me,y))}if(!Qt(y))return y;ee||(ee=[]);var ae=Object.isExtensible(y);if(b||(b=new Vt),ae){var ue=b.get(y);if(ue)return ue}else for(E||(E=new Vt),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 fn||y instanceof Xt||y instanceof Wr||y instanceof or)ue=y.copy(),ne(y,ue);else{if(y instanceof ji||y instanceof bn||y instanceof Yt)return y;if(y instanceof on)ue=new on().addAll(Gd(a,y.Fa(),!1,b,E,ee)),ne(y,ue);else if(y instanceof un)ue=new un().addAll(Gd(a,y.Fa(),!1,b,E,ee)),ne(y,ue);else if(y instanceof Vt)ue=new Vt().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(Me){delete Me.__gohashid}),ue}et=hr.prototype,et.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},et.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},et.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,Qt(y)&&(a.dm(y),a.modelData=y)}et.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)},et.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 un,ne.add(ee),b.add(E,ne)):ne.add(ee)}}var b=a.vh;b===null&&(b=new Vt,y.changes.each(function(E){if(E.diagram!==null){var ee=E.change;ee===ro?(E=E.object.panel)&&(ee=E.data)&&x(ee,E):(ee===wo||ee===Eo)&&(E=E.object,(ee=E.itemArray)&&x(ee,E))}}),a.vh=b)}function bS(a,y){for(var x=new un,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(Qt(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}et.Pv=function(a,y){var x=this,b=!1,E=new un,ee=new un,ne=new un,ae=this.vh;a.changes.each(function(ye){ye.model===x&&(ye.modelChange==="nodeDataArray"?ye.change===wo?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):x.lb(ye.object)?ee.add(ye.object):ye.change!==ro||x.modelData!==ye.object&&ye.propertyName!=="modelData"?ye.object!==null&&(ae&&ae.contains(ye.object)?ae.get(ye.object).each(function(Me){x.lb(Me)&&ee.add(Me)}):ye.object instanceof hr||x.ri()&&x.Jc(ye.object)||bS(x,ye.object).each(function(Me){ee.add(Me)})):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},et.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)&&Ot("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Vt;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)},et.$x=function(a,y){a.change!==Ea&&Ot("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Uo?(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 }'},et.yA=function(a,y){return this.$x(a,y)},et.np=function(a){return a===void 0&&(a=dg(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},et.toJSON=function(a){return this.np(a)},et.Zw=function(a){var y=null;if(typeof a=="string")try{y=ln.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Ot("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Ot("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},et.Ky=function(a){return this.Zw(a)},hr.constructGraphLinksModel=function(){return new hr},et=hr.prototype,et.dm=function(a){if(Fn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(Qt(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Ot("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(Qt(a)){for(y in a)if(x=a[y],Qt(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 on,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},et.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):Qt(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 Mr;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 qa(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:qa(x.x),y:qa(x.y)};else if(x instanceof fn)y={class:"go.Size",width:qa(x.width),height:qa(x.height)};else if(x instanceof Xt)y={class:"go.Rect",x:qa(x.x),y:qa(x.y),width:qa(x.width),height:qa(x.height)};else if(x instanceof Wr)y={class:"go.Margin",top:qa(x.top),right:qa(x.right),bottom:qa(x.bottom),left:qa(x.left)};else if(x instanceof or)x.sb()?y={class:"go.Spot",x:qa(x.x),y:qa(x.y),offsetX:qa(x.offsetX),offsetY:qa(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof ji){if(y={class:"go.Brush",type:x.type.name},x.type===Sh?y.color=x.color:(x.type===Wu||x.type===Qs)&&(y.start=x.start,y.end=x.end,x.type===Qs&&(x.startRadius!==0&&(y.startRadius=qa(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=qa(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 bn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=qa(x.startX)),x.startY!==0&&(y.startY=qa(x.startY)),x.endX!==0&&(y.endX=qa(x.endX)),x.endY!==0&&(y.endY=qa(x.endY)),x.spot1.D(ni)||(y.spot1=x.spot1),x.spot2.D(Ri)||(y.spot2=x.spot2),x.type===bn.o&&(y.path=bn.ia(x))):x instanceof Yt&&(y={class:"go.EnumValue",classType:dg(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var ee=Co(y,E);if(!PS(E,ee))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&ee instanceof on){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 es(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(es(a.x),es(a.y));else if(y==="Size")x=new fn(es(a.width),es(a.height));else if(y==="Rect")x=new Xt(es(a.x),es(a.y),es(a.width),es(a.height));else if(y==="Margin")x=new Wr(es(a.top),es(a.right),es(a.bottom),es(a.left));else if(y==="Spot")typeof a.enum=="string"?x=oo(a.enum):x=new or(es(a.x),es(a.y),es(a.offsetX),es(a.offsetY));else if(y==="Brush"){if(x=new ji,x.type=Pr(ji,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof or&&(x.start=a.start),a.end instanceof or&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=es(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=es(a.endRadius)),a=a.colorStops,Qt(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=bn.parse(a.path):x=new bn,x.type=Pr(bn,a.type),typeof a.startX=="number"&&(x.startX=es(a.startX)),typeof a.startY=="number"&&(x.startY=es(a.startY)),typeof a.endX=="number"&&(x.endX=es(a.endX)),typeof a.endY=="number"&&(x.endY=es(a.endY)),a.spot1 instanceof or&&(x.spot1=a.spot1),a.spot2 instanceof or&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=Pr(b,a.name)));return x}et.Pe=function(a){return this.Lt.add(a),this},et.ik=function(a){this.Lt.remove(a)},et.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)},et.cb=function(a,y,x,b,E,ee,ne){Io(this,"",a,y,x,b,E,ee,ne)},et.g=function(a,y,x,b,E){Io(this,"",ro,a,this,y,x,b,E)},et.Fs=function(a,y,x,b,E,ee){Io(this,"",ro,y,a,x,b,E,ee)};function Io(a,y,x,b,E,ee,ne,ae,ue){ae===void 0&&(ae=null),ue===void 0&&(ue=null);var ge=new ao;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)}hr.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===ro){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)),io(x,b,E)}else a.change===wo?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Qt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&er(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&mr(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!Fn(b)&&a.propertyName&&(b=Co(a.object,a.propertyName)),Fn(b)&&typeof x=="number"&&(a=a.newValue,y?er(b,x):mr(b,x,a))):Ot("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Eo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Qt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&mr(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&er(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!Fn(b)&&a.propertyName&&(b=Co(a.object,a.propertyName)),Fn(b)&&typeof x=="number"&&(a=a.oldValue,y?mr(b,x,a):er(b,x))):Ot("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ea&&Ot("unknown ChangedEvent: "+a.toString())},hr.prototype.Ea=function(a){return this.undoManager.Ea(a)},hr.prototype.eb=function(a){return this.undoManager.eb(a)},hr.prototype.Kf=function(){return this.undoManager.Kf()},hr.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}},et=hr.prototype,et.La=function(a,y){y===void 0&&(y=""),Io(this,"SourceChanged",Ea,y,a,null,null)},et.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Co(a,y),y!==void 0)){if(lc(y))return y;Ot("Key value for node data "+a+" is not a number or a string: "+y)}}},et.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Co(a,x);b!==y&&this.hc(y)===null&&(io(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Io(this,"nodeKey",ro,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else io(a,x,y)}};function lc(a){return typeof a=="number"||typeof a=="string"}et.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},et.hc=function(a){return a===null&&Ot("Model.findNodeDataForKey:key must not be null"),a!==void 0&&lc(a)?this.kb.I(a):null},et.$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))){io(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;io(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;io(a,y,x)}}}}},et.xf=function(a){a!==null&&(Kr(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&&Ot("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,mr(a.Tc,b,y)),Io(a,"nodeDataArray",wo,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}et.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)},et.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;er(a.Tc,b)}Io(a,"nodeDataArray",Eo,"nodeDataArray",a,y,null,b,null),a.qp(y)}et.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)},et.$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()}},et.jp=function(a,y){y!==void 0&&(a=fg(this,a),a instanceof un&&this.Vf.add(y,a))},et.Lv=function(){},et.fm=function(){},et.em=function(){},et.qp=function(){};function Il(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new un,a.Vf.add(y,b)),b.add(x)}}function _l(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof un&&(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 un?a:null)}et.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},hr.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):uv(this,a,!0),Qt(a)&&gr(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 gr(b),b}if(x&&Qt(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=Co(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 hr||ee instanceof ho||ee instanceof Uo||ee instanceof ao||(ee=uv(a,ee,!1)),io(x,b,ee)}return gr(x),x}return y instanceof st||y instanceof fn||y instanceof Xt||y instanceof or||y instanceof Wr?y.copy():y}hr.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,Tn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Tn(" Is that really your intent?"));var b=Co(a,y);b!==x&&(io(a,y,x),this.Fs(a,y,b,x))},et=hr.prototype,et.set=function(a,y,x){this.setDataProperty(a,y,x)},et.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])}},et.Ay=function(a,y){this.ts(a,-1,y)},et.ts=function(a,y,x){0>y&&(y=a.length),mr(a,y,x),Io(this,"",wo,"",a,null,x,null,y)},et.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Ot("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];er(a,y),Io(this,"",Eo,"",a,x,null,y,null)},et.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Co(a,y),y===void 0))return"";if(typeof y=="string")return y;Ot("getCategoryForNodeData found a non-string category for "+a+": "+y)},et.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Co(a,x);b===void 0&&(b=""),b!==y&&(io(a,x,y),Io(this,"nodeCategory",ro,x,a,b,y))}else io(a,x,y)}},et.lm=function(a,y){this.jm(y,this.Ro(a))},et.Tl=function(){return!1},et.Wj=function(){return!1},et.ri=function(){return!1},et.xs=function(){return!1},et.Xj=function(){return!1};function cy(){return new hr}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 kl[a]?kl[a]:ln.go!==void 0&&ln.go[a]?ln.go[a]:null}function Co(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 io(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){}}rn.Object.defineProperties(hr.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===""&&Ot("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Ot("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];Qt(E)||Ot("Model.nodeDataArray must only contain Objects, not: "+E),Kr(E)}for(this.Tc=a,b=new on,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(Io(this,"nodeDataArray",ro,"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"}}}),hr.prototype.setCategoryForNodeData=hr.prototype.jm,hr.prototype.getCategoryForNodeData=hr.prototype.Ro,hr.prototype.removeArrayItem=hr.prototype.ov,hr.prototype.insertArrayItem=hr.prototype.ts,hr.prototype.addArrayItem=hr.prototype.Ay,hr.prototype.assignAllDataProperties=hr.prototype.Do,hr.prototype.set=hr.prototype.set,hr.prototype.clearUnresolvedReferences=hr.prototype.Qy,hr.prototype.mergeNodeDataArray=hr.prototype.$z,hr.prototype.removeNodeDataCollection=hr.prototype.nA,hr.prototype.removeNodeData=hr.prototype.cm,hr.prototype.addNodeDataCollection=hr.prototype.Fy,hr.prototype.addNodeData=hr.prototype.xf,hr.prototype.makeNodeDataKeyUnique=hr.prototype.$u,hr.prototype.findNodeDataForKey=hr.prototype.hc,hr.prototype.containsNodeData=hr.prototype.lb,hr.prototype.setKeyForNodeData=hr.prototype.km,hr.prototype.getKeyForNodeData=hr.prototype.wa,hr.prototype.updateTargetBindings=hr.prototype.La,hr.prototype.commit=hr.prototype.commit,hr.prototype.rollbackTransaction=hr.prototype.Kf,hr.prototype.commitTransaction=hr.prototype.eb,hr.prototype.startTransaction=hr.prototype.Ea,hr.prototype.raiseDataChanged=hr.prototype.Fs,hr.prototype.raiseChanged=hr.prototype.g,hr.prototype.raiseChangedEvent=hr.prototype.cb,hr.prototype.removeChangedListener=hr.prototype.ik,hr.prototype.addChangedListener=hr.prototype.Pe,hr.prototype.writeJsonValue=hr.prototype.sm,hr.prototype.replaceJsonObjects=hr.prototype.dm,hr.prototype.applyIncrementalJSON=hr.prototype.Ky,hr.prototype.applyIncrementalJson=hr.prototype.Zw,hr.prototype.toJSON=hr.prototype.toJSON,hr.prototype.toJson=hr.prototype.np,hr.prototype.toIncrementalJSON=hr.prototype.yA,hr.prototype.toIncrementalJson=hr.prototype.$x,hr.prototype.toIncrementalData=hr.prototype.xA,hr.prototype.clear=hr.prototype.clear;var kS=!1,kl={};hr.className="Model",hr.fromJSON=hr.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=ln.JSON.parse(a)}catch(ee){}else typeof a=="object"?x=a:Ot("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=ln[b])),typeof E=="function"&&(a=new E)}catch(ee){}a===null||a instanceof hr?y=a:Ot("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=hr.constructGraphLinksModel()),y.gp(x),y.kv(x),y},hr.safePropertyValue=Co,hr.safePropertySet=io,kl.Brush=ji,kl.ChangedEvent=ao,kl.Geometry=bn,kl.Margin=Wr,kl.Panel=Sn,kl.Point=st,kl.Rect=Xt,kl.Size=fn,kl.Spot=or,kl.Transaction=Uo,kl.UndoManager=ho;function Mo(a,y,x,b){gr(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=MS,this.wk=null):(this.el=pg,this.wk=b),this.st=new un}Mo.prototype.copy=function(){var a=new Mo;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},et=Mo.prototype,et.qb=function(a){a.classType===Mo&&(this.mode=a)},et.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.Kx=function(a){return a===void 0&&(a=null),this.mode=pg,this.backConverter=a,this},et.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},et.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)}et.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==="")Tn("Binding error: target property is the empty string: "+this.toString());else{var ee=y;if(b!==""&&(ee=Co(y,b)),ee!==void 0)if(E===null)x!==""&&io(a,x,ee);else try{if(x!==""){var ne=E(ee,a);io(a,x,ne)}else E(ee,a)}catch(ae){}}}},et.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=Co(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):io(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 Me=ee(ne,y,ue);ue!==null?ue.setDataProperty(y,x,Me):io(y,x,Me)}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 Ze=b.itemIndex,Qe=b.panel.itemArray;ue.ov(Qe,Ze),ue.ts(Qe,Ze,ze)}}}catch(rt){}}finally{this.st.remove(a)}}}},rn.Object.defineProperties(Mo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Ut(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Ut(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Ut(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Ut(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Ut(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Ut(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Ut(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Ut(this),this.el=a}}}),Mo.prototype.updateSource=Mo.prototype.sp,Mo.prototype.updateTarget=Mo.prototype.Mv,Mo.prototype.ofModel=Mo.prototype.dA,Mo.prototype.ofObject=Mo.prototype.cp,Mo.prototype.makeTwoWay=Mo.prototype.Kx;var Ox="Binding",MS=new Yt(Mo,"OneWay",1),pg=new Yt(Mo,"TwoWay",2);Mo.className="Binding",Mo.parseEnum=function(a,y){return function(x){return x=Pr(a,x),x===null?y:x}},Mo.toString=Fr,Mo.OneWay=MS,Mo.TwoWay=pg;function ui(a,y,x){hr.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new un,this.wb=new Vt,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))}Ht(ui,hr),ui.constructGraphLinksModel=hr.constructGraphLinksModel,ui.prototype.cloneProtected=function(a){hr.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},et=ui.prototype,et.clear=function(){hr.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},et.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+=" "+Us(this,E,!0)+"-->"+Us(this,E,!1)}return y},et.Qv=function(a,y){this.linkKeyProperty===""&&Ot("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=hr.prototype.Qv.call(this,a,y),b=this,E=new un,ee=new un,ne=new un,ae=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===wo?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(Me){b.Jc(Me)&&ee.add(Me)}):ye.object instanceof hr||b.lb(ye.object)||LS(b,ye.object).each(function(Me){ee.add(Me)})))});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},et.rm=function(){var a=hr.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},et.gp=function(a){hr.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)},et.Rv=function(){var a=hr.prototype.Rv.call(this),y=`,
"linkDataArray": `+sc(this,this.linkDataArray,!0);return a+y},et.kv=function(a){hr.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function LS(a,y){for(var x=new un,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];lv(a,y,E,E,x)}return x}et.Pv=function(a,y){this.linkKeyProperty===""&&Ot("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=hr.prototype.Pv.call(this,a,y),b=this,E=new un,ee=new un,ne=new un,ae=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===wo?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(Me){b.Jc(Me)&&ee.add(Me)}):ye.object instanceof hr||b.lb(ye.object)||LS(b,ye.object).each(function(Me){ee.add(Me)})))});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},et.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)&&Ot("applyIncrementalJson cannot change Model properties"),hr.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)},ui.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===ro){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),io(x,b,E);return}}else if(a.change===wo){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Qt(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,Qt(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}}hr.prototype.changeState.call(this,a,y)}},et=ui.prototype,et.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),io(x,this.nodeKeyProperty,a),this.xf(x))}return a}},et.yx=function(a){return Us(this,a,!0)},et.wv=function(a,y){Ud(this,a,y,!0)},et.Bx=function(a){return Us(this,a,!1)},et.Bv=function(a,y){Ud(this,a,y,!1)};function Us(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Co(y,a),a!==void 0))){if(lc(a))return a;Ot((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=Co(y,E);ee!==x&&(_l(a,ee,y),io(y,E,x),a.hc(x)===null&&Il(a,x,y),Io(a,b?"linkFromKey":"linkToKey",ro,E,y,ee,x),typeof E=="string"&&a.La(y,E))}else io(y,E,x)}}et.zx=function(a){return hv(this,a,!0)},et.xv=function(a,y){Hd(this,a,y,!0)},et.Cx=function(a){return hv(this,a,!1)},et.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=Co(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=Co(y,E);ee===void 0&&(ee=""),ee!==x&&(io(y,E,x),Io(a,b?"linkFromPortId":"linkToPortId",ro,E,y,ee,x),typeof E=="string"&&a.La(y,E))}else io(y,E,x)}}et.Ef=function(a){if(a===null)return cv;var y=this.je;return y===""?cv:(a=Co(a,y),a===void 0?cv:a)},et.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Co(a,x);if(b===void 0&&(b=cv),b!==y){if(Array.isArray(b))for(var E=b.length,ee=0;ee<E;ee++)_l(this,b[ee],a);for(io(a,x,y),E=y.length,ee=0;ee<E;ee++){var ne=y[ee];this.hc(ne)===null&&Il(this,ne,a)}Io(this,"linkLabelKeys",ro,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else io(a,x,y)}},et.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Co(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&&Il(this,y,a),Io(this,"linkLabelKeys",wo,x,a,null,y,null,E)))}else Ot(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},et.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Co(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(_l(this,y,a),Io(this,"linkLabelKeys",Eo,x,a,y,null,E,null)))}else b!==void 0&&Ot(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},et.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Co(a,y),y!==void 0)){if(lc(y))return y;Ot("Key value for link data "+a+" is not a number or a string: "+y)}}},et.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Co(a,x);b!==y&&this.jh(y)===null&&(io(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Io(this,"linkKey",ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else io(a,x,y)}},et.jh=function(a){return a===null&&Ot("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&lc(a)?this.wb.I(a):null},et.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))){io(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;io(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;io(a,y,x)}}}}},et.Jc=function(a){return a===null?!1:this.$f.contains(a)},et.fi=function(a){a!==null&&(Kr(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&&Ot("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)),Io(a,"linkDataArray",wo,"linkDataArray",a,null,y,null,b),dy(a,y)}et.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)},et.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(Io(a,"linkDataArray",Eo,"linkDataArray",a,y,null,b,null),x=Us(a,y,!0),_l(a,x,y),x=Us(a,y,!1),_l(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,ee=0;ee<E;ee++)x=b[ee],_l(a,x,y)}et.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)},et.Zz=function(a){if(this.linkKeyProperty===""&&Ot("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=Us(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Il(a,x,y),x=Us(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Il(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&&Il(a,x,y)}et.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):uv(this,a,!0),Qt(a)&&(gr(a),this.lf!==""&&io(a,this.lf,void 0),this.mf!==""&&io(a,this.mf,void 0),this.je!==""&&io(a,this.je,[])),a},et.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Co(a,y)},et.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Co(a,y),y!==void 0)){if(lc(y))return y;Ot("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},et.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Co(a,x);b!==y&&(_l(this,b,a),io(a,x,y),this.hc(y)===null&&Il(this,y,a),Io(this,"nodeGroupKey",ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else io(a,x,y)}},ui.prototype.copyNodeData=function(a){return a===null?null:(a=hr.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Co(a,this.Je)===void 0||io(a,this.Je,void 0),a)},ui.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=Co(a,y);b!==x&&(io(a,y,x),this.Fs(a,y,b,x))},et=ui.prototype,et.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&&Co(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},et.jp=function(a,y){hr.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(Us(this,b,!0)===E){var ne=this.lf;io(b,ne,ee),Io(this,"linkFromKey",ro,ne,b,E,ee),typeof ne=="string"&&this.La(b,ne)}if(Us(this,b,!1)===E&&(ne=this.mf,io(b,ne,ee),Io(this,"linkToKey",ro,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,Io(this,"linkLabelKeys",wo,ue,b,E,ee,ge,ge))}},et.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;io(a,b,x),Io(this,"nodeGroupKey",ro,b,a,y,x),typeof b=="string"&&this.La(a,b)}},et.Lv=function(){hr.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},et.fm=function(a){hr.prototype.fm.call(this,a),a=this.wa(a);var y=fg(this,a);if(y!==null){var x=Un();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;Io(this,"nodeGroupKey",ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Us(this,b,!0)===a&&(E=this.lf,Io(this,"linkFromKey",ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Us(this,b,!1)===a&&(E=this.mf,Io(this,"linkToKey",ro,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&&(Io(this,"linkLabelKeys",wo,ne,b,a,a,ae,ae),x.push(b))}for(y=0;y<x.length;y++)_l(this,a,x[y]);Rn(x)}},et.em=function(a){hr.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Il(this,y,a)},et.qp=function(a){hr.prototype.qp.call(this,a);var y=this.lh(a);_l(this,y,a)},et.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Co(a,y),y===void 0))return"";if(typeof y=="string")return y;Ot("getCategoryForLinkData found a non-string category for "+a+": "+y)},ui.prototype.getLinkCategoryForData=function(a){return this.ps(a)},ui.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Co(a,x);b===void 0&&(b=""),b!==y&&(io(a,x,y),Io(this,"linkCategory",ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else io(a,x,y)}},ui.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},et=ui.prototype,et.lm=function(a,y){hr.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))}et.Wj=function(){return!0},et.ri=function(){return!0},et.xs=function(){return!0},et.Xj=function(){return!0},rn.Object.defineProperties(ui.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];Qt(E)||Ot("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),Kr(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new on,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 un,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,Io(this,"linkDataArray",ro,"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"}}}),ui.prototype.setCategoryForLinkData=ui.prototype.lp,ui.prototype.getCategoryForLinkData=ui.prototype.ps,ui.prototype.assignAllDataProperties=ui.prototype.Do,ui.prototype.setGroupKeyForNodeData=ui.prototype.mp,ui.prototype.getGroupKeyForNodeData=ui.prototype.lh,ui.prototype.isGroupForNodeData=ui.prototype.Yu,ui.prototype.copyLinkData=ui.prototype.Jo,ui.prototype.mergeLinkDataArray=ui.prototype.Zz,ui.prototype.removeLinkDataCollection=ui.prototype.lA,ui.prototype.removeLinkData=ui.prototype.bm,ui.prototype.addLinkDataCollection=ui.prototype.Ey,ui.prototype.addLinkData=ui.prototype.fi,ui.prototype.containsLinkData=ui.prototype.Jc,ui.prototype.makeLinkDataKeyUnique=ui.prototype.Bs,ui.prototype.findLinkDataForKey=ui.prototype.jh,ui.prototype.setKeyForLinkData=ui.prototype.Ks,ui.prototype.getKeyForLinkData=ui.prototype.Ac,ui.prototype.removeLabelKeyForLinkData=ui.prototype.Qx,ui.prototype.addLabelKeyForLinkData=ui.prototype.Bu,ui.prototype.setLabelKeysForLinkData=ui.prototype.Ls,ui.prototype.getLabelKeysForLinkData=ui.prototype.Ef,ui.prototype.setToPortIdForLinkData=ui.prototype.Cv,ui.prototype.getToPortIdForLinkData=ui.prototype.Cx,ui.prototype.setFromPortIdForLinkData=ui.prototype.xv,ui.prototype.getFromPortIdForLinkData=ui.prototype.zx,ui.prototype.setToKeyForLinkData=ui.prototype.Bv,ui.prototype.getToKeyForLinkData=ui.prototype.Bx,ui.prototype.setFromKeyForLinkData=ui.prototype.wv,ui.prototype.getFromKeyForLinkData=ui.prototype.yx,ui.prototype.clear=ui.prototype.clear;var cv=Object.freeze([]);ui.className="GraphLinksModel",kl.GraphLinksModel=ui,hr.constructGraphLinksModel=hr.constructGraphLinksModel=function(){return new ui},hr.initDiagramModel=cy=function(){return new ui};function ts(a,y){hr.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))}Ht(ts,hr),ts.constructGraphLinksModel=hr.constructGraphLinksModel,ts.prototype.cloneProtected=function(a){hr.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},et=ts.prototype,et.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},et.rm=function(){var a=hr.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},et.gp=function(a){hr.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},et.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Ot("applyIncrementalJson cannot change Model properties"),hr.prototype.fp.call(this,a)},et.Vl=function(a){return a},et.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Co(a,y),y!==void 0)){if(lc(y))return y;Ot("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},et.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=Co(a,x);b!==y&&(_l(this,b,a),io(a,x,y),this.hc(y)===null&&Il(this,y,a),Io(this,"nodeParentKey",ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else io(a,x,y)}},et.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Co(a,y),y===void 0)?"":typeof y=="string"?y:(Ot("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},ts.prototype.getLinkCategoryForData=function(a){return this.ss(a)},ts.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Co(a,x);b===void 0&&(b=""),b!==y&&(io(a,x,y),Io(this,"parentLinkCategory",ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else io(a,x,y)}},ts.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},ts.prototype.copyNodeData=function(a){return a===null?null:(a=hr.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Co(a,this.Ke)===void 0||io(a,this.Ke,void 0),a)},ts.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=Co(a,y);b!==x&&(io(a,y,x),this.Fs(a,y,b,x))},et=ts.prototype,et.jp=function(a,y){hr.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},et.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;io(a,b,x),Io(this,"nodeParentKey",ro,b,a,y,x),typeof b=="string"&&this.La(a,b)}},et.fm=function(a){hr.prototype.fm.call(this,a),a=this.wa(a);var y=fg(this,a);if(y!==null){var x=Un();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;Io(this,"nodeParentKey",ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)_l(this,a,x[y]);Rn(x)}},et.em=function(a){hr.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Il(this,y,a)},et.qp=function(a){hr.prototype.qp.call(this,a);var y=this.mh(a);_l(this,y,a)},et.lm=function(a,y){hr.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},et.Tl=function(){return!0},et.xs=function(){return!0},rn.Object.defineProperties(ts.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"}}}),ts.prototype.setParentLinkCategoryForNodeData=ts.prototype.Ms,ts.prototype.getParentLinkCategoryForNodeData=ts.prototype.ss,ts.prototype.setParentKeyForNodeData=ts.prototype.qe,ts.prototype.getParentKeyForNodeData=ts.prototype.mh,ts.className="TreeModel",kl.TreeModel=ts;function fo(a){lo.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Tl,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=Tl,this.K=ns,this.nd=Vd,this.hd=oy,this.tf=6,this.Nn=yv,a&&Object.assign(this,a)}Ht(fo,lo),fo.prototype.cloneProtected=function(a){lo.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},fo.prototype.qb=function(a){a.classType===fo?a===mv||a===vv||a===pv||a===gv||a===Vd?this.sorting=a:a===qc||a===Wd||a===ns||a===hc?this.direction=a:a===Th||a===uc||a===Tl||a===Ml?this.arrangement=a:(a===zf||a===yv)&&(this.nodeDiameterFormula=a):lo.prototype.qb.call(this,a)},fo.prototype.createNetwork=function(){return new Kd(this)},fo.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 on;y.addAll(a.iterator),a=new on;var x=new on,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 Me=this.startAngle;isFinite(Me)||(Me=0);var ze=this.sweepAngle;if((!isFinite(ze)||360<ze||1>ze)&&(ze=360),y=this.spacing,isFinite(y)||(y=NaN),ae===Ml&&ue===zf?ae=Tl:ae===Ml&&ue!==zf&&(ae=this.arrangement),(this.direction===qc||this.direction===Wd)&&this.sorting!==Vd){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===Ml&&a.reverse(),b=new on,b.addAll(a),b.addAll(x)):(this.arrangement===Ml&&x.reverse(),b=new on,b.addAll(x),b.addAll(a))}ue=b.length;for(var Ze=ee=E=0;Ze<b.length;Ze++){var Qe=Me+ze*ee*(this.direction===ns?1:-1)/ue,rt=b.M(Ze).diameter;isNaN(rt)&&(rt=cc(b.M(Ze),Qe)),360>ze&&(Ze===0||Ze===b.length-1)&&(rt/=2),E+=rt,ee++}if(isNaN(ge)||ae===Ml){if(isNaN(y)&&(y=6),ae!==Tl&&ae!==Ml){for(ee=-1/0,ne=0;ne<ue;ne++)Ze=b.M(ne),E=b.M(ne===ue-1?0:ne+1),isNaN(Ze.diameter)&&cc(Ze,0),isNaN(E.diameter)&&cc(E,0),ee=Math.max(ee,(Ze.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,Me*Math.PI/180,ze*Math.PI/180)}else ge=fv(this,E+(360<=ze?ue:ue-1)*(ae!==Ml?y:1.6*y),ye,Me*Math.PI/180,ze*Math.PI/180);ee=ge*ye}else if(ee=ge*ye,Ze=py(this,ge,ee,Me*Math.PI/180,ze*Math.PI/180),isNaN(y))(ae===Tl||ae===Ml)&&(y=(Ze-E)/(360<=ze?ue:ue-1));else if(ae===Tl||ae===Ml)Ze=(Ze-E)/(360<=ze?ue:ue-1),Ze<y?(ge=fv(this,E+y*(360<=ze?ue:ue-1),ye,Me*Math.PI/180,ze*Math.PI/180),ee=ge*ye):y=Ze;else{for(ne=-1/0,E=0;E<ue;E++)Qe=b.M(E),rt=b.M(E===ue-1?0:E+1),isNaN(Qe.diameter)&&cc(Qe,0),isNaN(rt.diameter)&&cc(rt,0),ne=Math.max(ne,(Qe.diameter+rt.diameter)/2);ne+=y,E=fv(this,ne*(360<=ze?ue:ue-1),ye,Me*Math.PI/180,ze*Math.PI/180),E>ge?(ge=E,ee=ge*ye):ne=Ze/(360<=ze?ue:ue-1)}if(this.kw=ae,this.lc=ge,this.Zm=ye,this.lw=Me,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,Me=this.Ti,ze=this.me,ue=this.Jp,this.direction!==qc&&this.direction!==Wd||b!==Ml)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 Tl: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,Me+(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 Tl:mg(this,a,ge,hc);break;case Th:gg(this,a,ye/2,ge,hc)}switch(b){case uc:vg(this,x,ge+ne,ns);break;case Tl:mg(this,x,ge+ne,ns);break;case Th:gg(this,x,ye/2,ge+ne,ns)}}else{switch(b){case uc:vg(this,x,ge,hc);break;case Tl:mg(this,x,ge,hc);break;case Th:gg(this,x,ye/2,ge,hc)}switch(b){case uc:vg(this,a,ge+ne,ns);break;case Tl:mg(this,a,ge+ne,ns);break;case Th:gg(this,a,ye/2,ge+ne,ns)}}}else switch(b){case uc:vg(this,y,ge,this.direction);break;case Tl:mg(this,y,ge,this.direction);break;case Th:gg(this,y,ye,ge,this.direction);break;case Ml:OS(this,y,ye,ge,this.direction)}else OS(this,y,ye,ge-ye/2,ns)}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===ns?ue*x/(360<=ee?ae:ae-1):-(ue*x)/ae),ye=y.M(ue),Me=ne*Math.tan(ge)/a;Me=Math.sqrt((ne*ne+a*a*Me*Me)/(1+Me*Me)),ye.centerX=Me*Math.cos(ge),ye.centerY=Me*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),Me=ee*Math.sin(x);ge.centerX=E*Math.cos(x),ge.centerY=Me,ge.actualAngle=180*x/Math.PI,isNaN(ge.diameter)&&cc(ge,0),isNaN(ye.diameter)&&cc(ye,0),ge=dv(a,E,ee,b===ns?x:-x,(ge.diameter+ye.diameter)/2+ne),x+=b===ns?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===ns?x:-x,ne),x+=b===ns?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===ns?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 Me=0;Me<ye.length&&(ye[Me].centerX=ue,ye[Me].centerY=ge,!(Me>=ye.length-1));Me++)BS(a,ue,ge,ye,Me,E,ee)||RS(a,ue,ge,ye,Me,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,Me=ye[ye.length-1].centerY;var ze=Math.abs(ue-ee)-((ye[0].width+ye[ye.length-1].width)/2+ne),Ze=Math.abs(ge-Me)-((ye[0].height+ye[ye.length-1].height)/2+ne);ne=0,1>Math.abs(Ze)?Math.abs(ue-ee)<(ye[0].width+ye[ye.length-1].width)/2&&(ne=0):ne=0<Ze?Ze:1>Math.abs(ze)?0:ze,ue=Math.abs(ee)>Math.abs(Me)?0<ee!=ge>Me:0<Me!=ue<ee,(ue=E===ns?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(),Me=y.Fa(),ze=0;ze<Me.length&&(Me[ze].centerX=ue,Me[ze].centerY=ge,!(ze>=Me.length-1));ze++)BS(a,ue,ge,Me,ze,E,ye)||RS(a,ue,ge,Me,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===ns?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<Me.length;ue++)ne.mk[ue]=Me[ue].bounds.x,ne.tm[ue]=Me[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===ns)){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 RS(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===ns)){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}fo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},fo.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))},fo.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}}fo.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 Vd:return this.ak(Fx(a));default:Ot("Invalid sorting type.")}return a};function Fx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new on;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}fo.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 on;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 Me=ye=1/0,ze=-1,Ze=[],Qe=0;Qe<x.length;Qe++)0>y[x[Qe]].indexOf(x[Qe===x.length-1?0:Qe+1])&&Ze.push(Qe===x.length-1?0:Qe+1);if(Ze.length===0)for(Qe=0;Qe<x.length;Qe++)Ze.push(Qe);for(Qe=0;Qe<Ze.length;Qe++){for(var rt=Ze[Qe],Tt=y[ge],xt=0,At=0;At<ne.length;At++){var Ft=ee[ne[At]],Dt=ee[ae[At]];if(Ft<Dt){var It=Ft;Ft=Dt}else It=Dt;if(It<rt&&rt<=Ft)for(Dt=0;Dt<Tt.length;Dt++){var Wt=Tt[Dt];0>x.indexOf(Wt)||It<ee[Wt]&&ee[Wt]<Ft||It===ee[Wt]||Ft===ee[Wt]||xt++}else for(Dt=0;Dt<Tt.length;Dt++)Wt=Tt[Dt],0>x.indexOf(Wt)||It<ee[Wt]&&ee[Wt]<Ft&&It!==ee[Wt]&&Ft!==ee[Wt]&&xt++}for(Tt=xt,At=xt=0;At<y[ge].length;At++)It=x.indexOf(y[ge][At]),0<=It&&(It=Math.abs(rt-(It>=rt?It+1:It)),xt+=It<x.length+1-It?It:x.length+1-It);for(At=0;At<ne.length;At++)It=ee[ne[At]],Ft=ee[ae[At]],It>=rt&&It++,Ft>=rt&&Ft++,It>Ft&&(Dt=Ft,Ft=It,It=Dt),Ft-It<(x.length+2)/2==(It<rt&&rt<=Ft)&&xt++;(Tt<ye||Tt===ye&&xt<Me)&&(ye=Tt,Me=xt,ze=rt)}for(x.splice(ze,0,ge),ye=0;ye<x.length;ye++)ee[x[ye]]=ye;for(ye=0;ye<y[ge].length;ye++)Me=y[ge][ye],0<=x.indexOf(Me)&&(ne.push(ge),ae.push(Me))}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=Me=0;ze<y[ge].length;ze++)Ze=x.indexOf(y[ge][ze]),0>Ze||Ze===ye||(Qe=Ze>ye?Ze-ye:ye-Ze,Me+=Ze<ye!=Qe>ne-Qe?1:-1);x.splice(0>Me?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},rn.Object.defineProperties(fo.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!==Ml&&a!==Tl&&a!==uc&&a!==Th||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==ns&&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!==Vd||(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 Tl=new Yt(fo,"ConstantSpacing",0),uc=new Yt(fo,"ConstantDistance",1),Th=new Yt(fo,"ConstantAngle",2),Ml=new Yt(fo,"Packed",3),ns=new Yt(fo,"Clockwise",4),hc=new Yt(fo,"Counterclockwise",5),qc=new Yt(fo,"BidirectionalLeft",6),Wd=new Yt(fo,"BidirectionalRight",7),pv=new Yt(fo,"Forwards",8),gv=new Yt(fo,"Reverse",9),mv=new Yt(fo,"Ascending",10),vv=new Yt(fo,"Descending",11),Vd=new Yt(fo,"Optimized",12),yv=new Yt(fo,"Pythagorean",13),zf=new Yt(fo,"Circular",14);fo.className="CircularLayout",fo.ConstantSpacing=Tl,fo.ConstantDistance=uc,fo.ConstantAngle=Th,fo.Packed=Ml,fo.Clockwise=ns,fo.Counterclockwise=hc,fo.BidirectionalLeft=qc,fo.BidirectionalRight=Wd,fo.Forwards=pv,fo.Reverse=gv,fo.Ascending=mv,fo.Descending=vv,fo.Optimized=Vd,fo.Pythagorean=yv,fo.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 Kd(a){Xi.call(this,a)}Ht(Kd,Xi),Kd.prototype.createVertex=function(){return new Sg(this)},Kd.prototype.createEdge=function(){return new Sv(this)},Kd.className="CircularNetwork";function Sg(a){Wo.call(this,a),this.u=this.Si=NaN}Ht(Sg,Wo);function cc(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Ml)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}rn.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){Ms.call(this,a)}Ht(Sv,Ms),Sv.className="CircularEdge";function xa(a){lo.call(this),this.ah=null,this.An=0,this.$d=new fn(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)}Ht(xa,lo),xa.prototype.cloneProtected=function(a){lo.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},xa.prototype.createNetwork=function(){return new Gf(this)},xa.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}IS(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=Un(),ye=0;ye<ae+y.vertexes.count+2;ye++)ge[ye]=null;ae=0,ne.reset();for(var Me=Xt.alloc();ne.next();)if(ye=ne.value,this.computeBounds(ye,Me),ue)ue=!1,E=Me.x+Me.width/2,ee=Me.y+Me.height/2,ge[0]=new st(Me.x+Me.width+b.width,Me.y),ge[1]=new st(Me.x,Me.y+Me.height+b.height),ae=2;else{var ze=_S(ge,ae,E,ee,Me.width,Me.height,b),Ze=ge[ze],Qe=new st(Ze.x+Me.width+b.width,Ze.y),rt=new st(Ze.x,Ze.y+Me.height+b.height);for(ze+1<ae&&ge.splice(ze+1,0,null),ge[ze]=Qe,ge[ze+1]=rt,ae++,ze=Ze.x-Me.x,Ze=Ze.y-Me.y,ye=ye.vertexes.iterator;ye.next();)Qe=ye.value,Qe.centerX+=ze,Qe.centerY+=Ze}for(Xt.free(Me),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),Me=ge[ue],Ze=new st(Me.x+ze.width+b.width,Me.y),ze=new st(Me.x,Me.y+ze.height+b.height),ue+1<ae&&ge.splice(ue+1,0,null),ge[ue]=Ze,ge[ue+1]=ze,ae++,ne.centerX=Me.x+ne.width/2,ne.centerY=Me.y+ne.height/2);for(Rn(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},xa.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},xa.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 IS(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,IS(a,y+1,x),GS(a,ee),Rx(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++)Ix(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 on),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 on,E.Hj=ae),ae.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(ae=ne.Hj,ae===null&&(ae=new on,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,zt.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 Me=ue.M(ye),ze=null;for(ee=Me.edges.iterator;ee.next();){var Ze=ee.value;if(Ze.Ax(Me)===E){ze=Ze;break}}ze!==null&&(ge+=ze.length,ae+=Me.width*Me.height)}ee=E.centerX,ue=E.centerY,ye=E.width,Me=E.height,ze=E.focus,Ze=ye*Me,1>Ze&&(Ze=1),ae=zt.sqrt((ae+Ze+ge*ge*4/(ne*ne))/Ze),ne=(ae-1)*ye/2,ae=(ae-1)*Me/2,E.bounds=new Xt(ee-ze.x-ne,ue-ze.y-ae,ye+2*ne,Me+2*ae),E.focus=new st(ze.x+ne,ze.y+ae)}}return a.network=b,x}function Rx(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var ee=E.Sv,ne=E.Tv;b.bounds=new Xt(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 Ix(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=zt.sqrt(ee*ee+ne*ne)/2;for(var ae=!1,ue=ne=0,ge=0,ye=y.vertexes.iterator;ye.next();){var Me=ye.value;1>=Me.Vd?ue++:(ae=!0,ge++,ne+=Math.atan2(y.centerY-Me.centerY,y.centerX-Me.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(Ze,Qe){return Ze===null||Qe===null||Ze===Qe?0:Qe.width*Qe.height-Ze.width*Ze.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,Me=ue.edges.iterator;Me.next();){ye=Me.value;break}Me=ue.width;var ze=ue.height;Me=zt.sqrt(Me*Me+ze*ze)/2,ye=ee+ye.length+Me,Me=ne+(y*(ae/2>>1)+ge)*(ae%2===0?1:-1),ue.centerX=b+ye*Math.cos(Me),ue.centerY=E+ye*Math.sin(Me),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],Me=ye.x-x,ze=ye.y-b;if(Me=Me*Me+ze*ze,Me<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=Me}}return ue}xa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},xa.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,zt.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,zt.sqrt(b*b+a*a)):ne-(b+E):b>ne+ae?a>y+ee?(x=b-ne-ae,a=a-y-ee,zt.sqrt(x*x+a*a)):a+x<y?(b=b-ne-ae,a=a+x-y,zt.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(rt,Tt){return rt===null||Tt===null||rt===Tt?0:rt.centerX-Tt.centerX}):y.sort(function(rt,Tt){return rt===null||Tt===null||rt===Tt?0:rt.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 Me=ee+1;Me<y.length;Me++){var ze=y[Me];if(ze!==ne){b=ze.bounds,ae=ze.focus,ge=b.x+ae.x;var Ze=b.y+ae.y;if(ue-ge>x||ge-ue>x){if(E)break}else if(ye-Ze>x||Ze-ye>x){if(!E)break}else{var Qe=zS(ne,ze);1>Qe?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new xv),Qe=b.random(),ae=b.random(),ue>ge?(b=Math.abs(ze.bounds.right-ne.bounds.x),b=(1+b)*Qe):ue<ge?(b=Math.abs(ze.bounds.x-ne.bounds.right),b=-(1+b)*Qe):(b=Math.max(ze.width,ne.width),b=(1+b)*Qe-b/2),ye>Ze?(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)/(Qe*Qe),b=(ge-ue)/Qe*ae,ge=(Ze-ye)/Qe*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,Me=ee.focus,ue=ye.x+Me.x,ye=ye.y+Me.y,Me=zS(x,ee),1>Me?(Me=a.randomNumberGenerator,Me===null&&(a.randomNumberGenerator=Me=new xv),ae=Me.random(),Me=Me.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))*Me):(ae=ae.stiffness*(Me-ae.length),b=(ue-b)/Me*ae,ge=(ye-ne)/Me*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}xa.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},xa.prototype.moveFixedVertex=function(){},xa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},xa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Zo,y.toSpot=Zo)}},xa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Xt.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Xt.free(x)}x=Xt.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()}Xt.free(x)},xa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},xa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},xa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},xa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},xa.prototype.electricalFieldX=function(){return 0},xa.prototype.electricalFieldY=function(){return 0},xa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},xa.prototype.gravitationalFieldX=function(){return 0},xa.prototype.gravitationalFieldY=function(){return 0},xa.prototype.isFixed=function(a){return a.isFixed},rn.Object.defineProperties(xa.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"&&Ot('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())}}}),xa.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)}Ht(Gf,Xi),Gf.prototype.createVertex=function(){return new xg(this)},Gf.prototype.createEdge=function(){return new wg(this)},Gf.className="ForceDirectedNetwork";function xg(a){Wo.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}Ht(xg,Wo),rn.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){Ms.call(this,a),this.j=this.o=NaN}Ht(wg,Ms),rn.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 Fi(a){lo.call(this),this.kc=this.ie=25,this.K=0,this.Dk=Ev,this.Zk=kv,this.Qk=Tv,this.bj=4,this.rk=Mv,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)}Ht(Fi,lo),Fi.prototype.cloneProtected=function(a){lo.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},Fi.prototype.qb=function(a){a.classType===Fi?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:Ot("Unknown enum value: "+a):lo.prototype.qb.call(this,a)},Fi.prototype.createNetwork=function(){return new Xd(this)},Fi.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 Me=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=Me;var Ze=ze;Me=ue,ze=ae,ue=ge,ae=Ze}var Qe=E.focus;ge=ee.focus;var rt=b.rev?ee.bounds:E.bounds;Ze=st.alloc(),ye!==Me?rt.w()&&Me.isVisible()?Me.actualBounds.w()?(bh(Me,ze,Gr,Ze),Ze.x+=Me.actualBounds.x-rt.x,Ze.y+=Me.actualBounds.y-rt.y):(bh(Me,ze,Gr,Ze),Ze.w()||Ze.assign(Qe)):Ze.assign(Qe):rt.w()?(bh(Me,ze,Gr,Ze),Ze.w()||Ze.assign(Qe)):Ze.assign(Qe),Me=b.rev?E.bounds:ee.bounds,ye=st.alloc(),ne!==ue?Me.w()&&ue.isVisible()?ue.actualBounds.w()?(bh(ue,ae,Gr,ye),ye.x+=ue.actualBounds.x-Me.x,ye.y+=ue.actualBounds.y-Me.y):(bh(ue,ae,Gr,ye),ye.w()||ye.assign(ge)):ye.assign(ge):Me.w()?(bh(ue,ae,Gr,ye),ye.w()||ye.assign(ge)):ye.assign(ge),this.K===90||this.K===270?(ne=Math.round((Ze.x-Qe.x)/this.kc),ue=Ze.x,ae=Math.round((ye.x-ge.x)/this.kc),ge=ye.x):(ne=Math.round((Ze.y-Qe.y)/this.kc),ue=Ze.y,ae=Math.round((ye.y-ge.y)/this.kc),ge=ye.y),st.free(Ze),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(Ze=E.layer,ye=ee.layer,Me=0,rt=b.link,rt!==null){var Tt=rt.fromPort,xt=rt.toPort;if(Tt!==null&&xt!==null){var At=rt.fromNode;if(ze=rt.toNode,At!==null&&ze!==null){var Ft=Cv(this,!0),Dt=Cv(this,!1),It=this.setsPortSpots?Ft:rt.computeSpot(!0,Tt);Qe=this.setsPortSpots?Dt:rt.computeSpot(!1,xt);var Wt=rt.isOrthogonal;It.$c()&&It.Hf(Dt)&&Qe.$c()&&Qe.Hf(Ft)?Me=0:(Ft=rt.getLinkPoint(At,Tt,It,!0,Wt,ze,xt,st.alloc()),Dt=rt.getLinkDirection(At,Tt,Ft,It,!0,Wt,ze,xt),st.free(Ft),It.ys()||Dt!==QS(this,b,!0)?this.setsPortSpots&&At!==null&&At.ports.count===1&&b.rev&&(Me+=1):Me+=1,It=rt.getLinkPoint(ze,xt,Qe,!1,Wt,At,Tt,st.alloc()),rt=rt.getLinkDirection(ze,xt,It,Qe,!1,Wt,At,Tt),st.free(It),Qe.ys()||rt!==QS(this,b,!1)?this.setsPortSpots&&ze!==null&&ze.ports.count===1&&b.rev&&(Me+=2):Me+=2)}}}if(ze=Me,Me=ze===1||ze===3,(ze=ze===2||ze===3)&&(Qe=a.createVertex(),Qe.node=null,Qe.Dj=1,Qe.layer=Ze,Qe.near=E,a.dh(Qe),E=a.Zj(E,Qe,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=ue,E.portToPos=0,E=Qe),rt=1,Me&&rt--,Ze-ye>rt&&0<Ze){for(b.valid=!1,Qe=a.createVertex(),Qe.node=null,Qe.Dj=2,Qe.layer=Ze-1,a.dh(Qe),E=a.Zj(E,Qe,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=Qe,Ze--;Ze-ye>rt&&0<Ze;)Qe=a.createVertex(),Qe.node=null,Qe.Dj=3,Qe.layer=Ze-1,a.dh(Qe),E=a.Zj(E,Qe,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=Qe,Ze--;E=a.Zj(Qe,ee,b.link),E.valid=!Me,Me&&(Qe.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},Fi.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}Fi.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},Fi.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 cs(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 tl(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 Me=b[ye];Me.near===ge&&Me.Dj===ge.Dj||ae++}else for(ye=ne-1;ye>ue;ye--)Me=b[ye],Me.near===ge&&Me.Dj===ge.Dj||ae++;var ze;if(0<=x)for(ue=b[ne].sourceEdgesArrayAccess,ge=0;ge<ue.length;ge++){var Ze=ue[ge];if(Ze.valid&&Ze.fromVertex.layer!==y)for(Me=Ze.fromVertex.index,ye=Ze.portToPos,Ze=Ze.portFromPos,ze=ge+1;ze<ue.length;ze++){var Qe=ue[ze];if(Qe.valid&&Qe.fromVertex.layer!==y){var rt=Qe.fromVertex.index,Tt=Qe.portToPos;Qe=Qe.portFromPos,ye<Tt&&(Me>rt||Me===rt&&Ze>Qe)&&ae++,Tt<ye&&(rt>Me||rt===Me&&Qe>Ze)&&ae++}}}if(0>=x){for(ue=b[ne].destinationEdgesArrayAccess,ge=0;ge<ue.length;ge++)if(Ze=ue[ge],Ze.valid&&Ze.toVertex.layer!==y)for(Me=Ze.toVertex.index,ye=Ze.portToPos,Ze=Ze.portFromPos,ze=ge+1;ze<ue.length;ze++)Qe=ue[ze],Qe.valid&&Qe.toVertex.layer!==y&&(rt=Qe.toVertex.index,Tt=Qe.portToPos,Qe=Qe.portFromPos,Ze<Qe&&(Me>rt||Me===rt&&ye>Tt)&&ae++,Qe<Ze&&(rt>Me||rt===Me&&Tt>ye)&&ae++)}for(ee[ne*E+ne]=ae,ue=ne+1;ue<E;ue++){var xt=0,At=0;if(0<=x){ae=b[ne].sourceEdgesArrayAccess;var Ft=b[ue].sourceEdgesArrayAccess;for(ge=0;ge<ae.length;ge++)if(Ze=ae[ge],Ze.valid&&Ze.fromVertex.layer!==y)for(Me=Ze.fromVertex.index,Ze=Ze.portFromPos,ze=0;ze<Ft.length;ze++)Qe=Ft[ze],Qe.valid&&Qe.fromVertex.layer!==y&&(rt=Qe.fromVertex.index,Qe=Qe.portFromPos,(Me<rt||Me===rt&&Ze<Qe)&&At++,(rt<Me||rt===Me&&Qe<Ze)&&xt++)}if(0>=x){for(ae=b[ne].destinationEdgesArrayAccess,Ft=b[ue].destinationEdgesArrayAccess,ge=0;ge<ae.length;ge++)if(Ze=ae[ge],Ze.valid&&Ze.toVertex.layer!==y)for(Me=Ze.toVertex.index,ye=Ze.portToPos,ze=0;ze<Ft.length;ze++)Qe=Ft[ze],Qe.valid&&Qe.toVertex.layer!==y&&(rt=Qe.toVertex.index,Tt=Qe.portToPos,(Me<rt||Me===rt&&ye<Tt)&&At++,(rt<Me||rt===Me&&Tt<ye)&&xt++)}ee[ne*E+ue]=xt,ee[ue*E+ne]=At}}return dc(a,y,b),ee}Fi.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 Me=ge[ye];if(Me.valid&&Me.toVertex.layer!==E){var ze=Me.fromVertex.column+Me.portFromColOffset,Ze=Me.toVertex.column+Me.portToColOffset;ae+=(Math.abs(ze-Ze)+1)*gy(Me)}}}dc(b,E,ee),y+=ae}return y}Fi.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,Me=0,ze=ae.near;if(ze!==null&&ze.layer===ae.layer&&(ye+=ze.column-1,Me++),ue!==null)for(ze=0;ze<ue.length;ze++){ae=ue[ze];var Ze=ae.fromVertex;ae.valid&&!ae.rev&&Ze.layer!==y&&(ye+=Ze.column,Me++)}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,Me++);ee[ne]=Me===0?-1:ye/Me}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,Me=[],ze=ae.near;if(ze!==null&&ze.layer===ae.layer&&(Me[ye]=ze.column-1,ye++),ae=void 0,ue!==null)for(ze=0;ze<ue.length;ze++){ae=ue[ze];var Ze=ae.fromVertex;ae.valid&&!ae.rev&&Ze.layer!==y&&(Me[ye]=Ze.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&&(Me[ye]=ze.column+ae.portToColOffset,ye++);ye===0?ee[ne]=-1:(Me.sort(function(Qe,rt){return Qe-rt}),ge=ye>>1,ee[ne]=ye&1?Me[ge]:Me[ge-1]+Me[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)}}Fi.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=VS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=VS(a);for(E=KS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=KS(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 VS(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 KS(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++}Fi.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,Me=!1,ze=ge.sourceEdgesArrayAccess;E=ze.length;for(var Ze=0;Ze<E;Ze++){var Qe=ze[Ze],rt=Qe.fromVertex;ye+=1,rt.component!==1&&(ee+=1,rt=rt.layer-ge.layer,Qe=a.linkMinLength(Qe),b=Math.min(b,rt-Qe))}for(ze=ge.destinationEdgesArrayAccess,E=ze.length,Ze=0;Ze<E;Ze++)Qe=ze[Ze].toVertex,--ye,Qe.component!==1?--ee:Me=!0;(ue===null||ye<ae)&&!Me&&(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,Me=ze.length,Ze=0;Ze<Me;Ze++)Qe=ze[Ze].fromVertex,ge+=1,Qe.component!==1?b+=1:ye=!0;for(ze=ne.destinationEdgesArrayAccess,Me=ze.length,Ze=0;Ze<Me;Ze++)Qe=ze[Ze],rt=Qe.toVertex,--ge,rt.component!==1&&(--b,rt=ne.layer-rt.layer,Qe=a.linkMinLength(Qe),E=Math.min(E,rt-Qe));(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}Fi.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))}Fi.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=cs(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)bv(this,b,1),pl(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=cs(this)),b=this.Ia;0<=b;b--)bv(this,b,-1),pl(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=cs(this))}for(tl(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)bv(this,b,0),pl(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=cs(this)),b=this.Ia;0<=b;b--)bv(this,b,0),pl(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=cs(this))}tl(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=pl(this,b,-1)||ee;for(E=this.countCrossings(),E>=a?tl(this,y):(a=E,y=cs(this)),ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=pl(this,b,1)||ee;for(E=this.countCrossings(),E>=a?tl(this,y):(a=E,y=cs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=pl(this,b,1)||ee;for(E>=a?tl(this,y):(a=E,y=cs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=pl(this,b,-1)||ee;for(E>=a?tl(this,y):(a=E,y=cs(this)),ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=pl(this,b,0)||ee;for(E>=a?tl(this,y):(a=E,y=cs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=pl(this,b,0)||ee;E>=a?tl(this,y):(a=E,y=cs(this))}break;default:case Mv: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=pl(this,b,-1)||ee;for(E=this.countCrossings(),E>=a?tl(this,y):(a=E,y=cs(this)),ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=pl(this,b,1)||ee;for(E=this.countCrossings(),E>=a?tl(this,y):(a=E,y=cs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=pl(this,b,1)||ee;for(E>=a?tl(this,y):(a=E,y=cs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=pl(this,b,-1)||ee;for(E>=a?tl(this,y):(a=E,y=cs(this)),ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=pl(this,b,0)||ee;for(E>=a?tl(this,y):(a=E,y=cs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=pl(this,b,0)||ee;E>=a?tl(this,y):(a=E,y=cs(this))}}tl(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 pl(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],Me=x[b[ee+1].index*E+b[ee].index],ze=0,Ze=0,Qe=b[ee].column,rt=b[ee+1].column,Tt=a.nodeMinColumnSpace(b[ee],!0),xt=a.nodeMinColumnSpace(b[ee],!1),At=a.nodeMinColumnSpace(b[ee+1],!0),Ft=a.nodeMinColumnSpace(b[ee+1],!1);Tt=Qe-Tt+At,xt=rt-xt+Ft;var Dt=b[ee].sourceEdges.iterator;for(Dt.reset();Dt.next();)if(At=Dt.value,Ft=At.fromVertex,At.valid&&Ft.layer===y){for(At=0;b[At]!==Ft;)At++;At<ee&&(ze+=2*(ee-At),Ze+=2*(ee+1-At)),At===ee+1&&(ze+=1),At>ee+1&&(ze+=4*(At-ee),Ze+=4*(At-(ee+1)))}for(Dt=b[ee].destinationEdges.iterator,Dt.reset();Dt.next();)if(At=Dt.value,Ft=At.toVertex,At.valid&&Ft.layer===y){for(At=0;b[At]!==Ft;)At++;At===ee+1&&(Ze+=1)}for(Dt=b[ee+1].sourceEdges.iterator,Dt.reset();Dt.next();)if(At=Dt.value,Ft=At.fromVertex,At.valid&&Ft.layer===y){for(At=0;b[At]!==Ft;)At++;At<ee&&(ze+=2*(ee+1-At),Ze+=2*(ee-At)),At===ee&&(Ze+=1),At>ee+1&&(ze+=4*(At-(ee+1)),Ze+=4*(At-ee))}for(Dt=b[ee+1].destinationEdges.iterator,Dt.reset();Dt.next();)if(At=Dt.value,Ft=At.toVertex,At.valid&&Ft.layer===y){for(At=0;b[At]!==Ft;)At++;At===ee&&(ze+=1)}At=Ft=0,Dt=ne[b[ee].index];var It=ae[b[ee].index],Wt=ne[b[ee+1].index],_n=ae[b[ee+1].index];Dt!==-1&&(Ft+=Math.abs(Dt-Qe),At+=Math.abs(Dt-xt)),It!==-1&&(Ft+=Math.abs(It-Qe),At+=Math.abs(It-xt)),Wt!==-1&&(Ft+=Math.abs(Wt-rt),At+=Math.abs(Wt-Tt)),_n!==-1&&(Ft+=Math.abs(_n-rt),At+=Math.abs(_n-Tt)),(Ze<ze-.5||Ze===ze&&Me<ye-.5||Ze===ze&&Me===ye&&At<Ft-.5)&&(ge=ue=!0,b[ee].column=xt,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}Fi.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,Me=a.nodeMinColumnSpace(E[b],!0),ze=a.nodeMinColumnSpace(E[b],!1),Ze=0;0>b-1||ye-E[b-1].column-1>Me+a.nodeMinColumnSpace(E[b-1],!1)?Ze=ye-1:Ze=ye,Me=b+1>=ee||E[b+1].column-ye-1>ze+a.nodeMinColumnSpace(E[b+1],!0)?ye+1:ye;var Qe=ze=0,rt=0;if(0>=x)for(var Tt=E[b].sourceEdges.iterator;Tt.next();){var xt=Tt.value,At=xt.fromVertex;if(xt.valid&&At.layer!==y){var Ft=gy(xt),Dt=xt.portFromColOffset;xt=xt.portToColOffset,At=At.column,ze+=(Math.abs(ye+xt-(At+Dt))+1)*Ft,Qe+=(Math.abs(Ze+xt-(At+Dt))+1)*Ft,rt+=(Math.abs(Me+xt-(At+Dt))+1)*Ft}}if(0<=x)for(Tt=E[b].destinationEdges.iterator;Tt.next();)xt=Tt.value,At=xt.toVertex,xt.valid&&At.layer!==y&&(Ft=gy(xt),Dt=xt.portFromColOffset,xt=xt.portToColOffset,At=At.column,ze+=(Math.abs(ye+Dt-(At+xt))+1)*Ft,Qe+=(Math.abs(Ze+Dt-(At+xt))+1)*Ft,rt+=(Math.abs(Me+Dt-(At+xt))+1)*Ft);xt=Dt=Ft=0,Tt=ne[E[b].index],At=ae[E[b].index],Tt!==-1&&(Ft+=Math.abs(Tt-ye),Dt+=Math.abs(Tt-Ze),xt+=Math.abs(Tt-Me)),At!==-1&&(Ft+=Math.abs(At-ye),Dt+=Math.abs(At-Ze),xt+=Math.abs(At-Me)),Qe<ze||Qe===ze&&Dt<Ft?(ge=ue=!0,E[b].column=Ze):(rt<ze||rt===ze&&xt<Ft)&&(ge=ue=!0,E[b].column=Me)}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 Me=b[x+1].column;Me-ae===ge+a.nodeMinColumnSpace(b[x+1],!0)?ye=ae-1:ye=ae}else x===E-1?(Me=b[x-1].column,ye=ae-Me===ue+a.nodeMinColumnSpace(b[x-1],!1)?ae+1:ae):(Me=b[x-1].column,ue=Me+a.nodeMinColumnSpace(b[x-1],!1)+ue+1,Me=b[x+1].column,ge=Me-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ye=(ue+ge)/2|0);else x===0&&x===E-1?ye=ne[x]:x===0?(Me=b[x+1].column,ge=Me-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ye=Math.min(ne[x],ge)):x===E-1?(Me=b[x-1].column,ue=Me+a.nodeMinColumnSpace(b[x-1],!1)+ue+1,ye=Math.max(ne[x],ue)):(Me=b[x-1].column,ue=Me+a.nodeMinColumnSpace(b[x-1],!1)+ue+1,Me=b[x+1].column,ge=Me-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=cs(a),ee=wv(a);for(b=ee+1;ee<b;){b=ee,tx(a,x,1);var ne=wv(a);ne>ee?tl(a,E):ne<ee&&(ee=ne,E=cs(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=cs(a),ee=wv(a),b=ee+1;ee<b;)b=ee,tx(a,x,-1),ne=wv(a),ne>ee?tl(a,E):ne<ee&&(ee=ne,E=cs(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=Un(),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 un,Vx(y,x);var ee=null,ne=null,ae=null,ue=null,ge=(a.ve&1)!==0,ye=(a.ve&2)!==0,Me=(a.ve&4)!==0,ze=(a.ve&8)!==0;for(ge&&(a.verticalAlignment(y,x,!0),ee=Pv(a,y,!0,!1)),y.reverse(),Me&&(a.verticalAlignment(y,x,!1),ae=Pv(a,y,!1,!1)),b=Er(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)),Rn(y),a.u(ee,ne,ae,ue),a.network.vertexes.each(function(Ze){var Qe=Un();ge&&Qe.push(ee.get(Ze)),ye&&Qe.push(ne.get(Ze)),Me&&Qe.push(ae.get(Ze)),ze&&Qe.push(ue.get(Ze)),Qe.sort(function(Tt,xt){return Tt-xt});var rt=Qe.length;rt=(Qe[Math.floor((rt-1)/2)]+Qe[Math.ceil((rt-1)/2)])/2,Rn(Qe),Ze.zc=rt})}function Vx(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 Me=ye;if(ue===ae.length-1||Me){for(ye=ne.length-1,Me&&(ye=Ty(ge)[0].index);ee<=ue;){if(ge=ae[ee],!ge.bo){Me=[];for(var ze=Er(ge.sourceEdgesArrayAccess),Ze=ze.next();!Ze.done;Ze=ze.next())Ze=Ze.value,Ze.valid&&Me.push(Ze);ge.bo=Me}for(ge=Er(ge.bo),Me=ge.next();!Me.done;Me=ge.next())Me=Me.value,ze=Me.fromVertex.index,(ze<E||ze>ye)&&y.add(Me);ee++}E=ye}}}Fi.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Er(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Er(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(Me,ze){return Me.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?Lv(ge,ee):Lv(ee,ge),!y.contains(ye)&&E<ge.vi&&(ge.align=ee,ee.root=ge.root,ee.align=ge.root,E=ge.vi)}}}}};function Kx(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=Er(y),ne=ee.next();!ne.done;ne=ee.next()){var ae=Er(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=Er(y),ae=ee.next();!ae.done;ae=ee.next()){ae=Er(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 Me=ye.align,ze=ne?ye.width:ye.height,Ze=ne?Me.width:Me.height;if(x){var Qe=Lv(ye,Me),rt=Qe.portFromPos,Tt=Qe.portToPos;Qe.link!==null&&(ye.node&&ye.node!==Qe.link.fromNode&&(rt=ne?ye.focusX:ye.focusY),Me.node&&Me.node!==Qe.link.toNode&&(Tt=ne?Me.focusX:Me.focusY))}else Qe=Lv(Me,ye),rt=Qe.portToPos,Tt=Qe.portFromPos,Qe.link!==null&&(ye.node&&ye.node!==Qe.link.toNode&&(rt=ne?ye.focusX:ye.focusY),Me.node&&Me.node!==Qe.link.fromNode&&(Tt=ne?Me.focusX:Me.focusY));ze=b?ye.qg+(ze-rt)-(Ze-Tt):ye.qg+rt-Tt,Me.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=Er(y),ne=x.next();!ne.done;ne=x.next())for(ee=Er(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 Vt,y=Er(y),ne=y.next();!ne.done;ne=y.next())for(x=Er(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&&Ot("Could not determine previous vertex in layer"),y[x][a-1]}Fi.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Un(),E=Un(),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)));Rn(b),Rn(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}Fi.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?Ca:ga:a.K===90?y?ga:Ca:a.K===180?y?Oa:aa:y?aa:Oa}Fi.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()},Fi.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 Xt(0,0,x,Math.abs(this.Ta[0]))):y.push(new Xt(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new Xt(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Xt(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new Xt(0,0,Math.abs(this.Ta[0]),x)):y.push(new Xt(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new Xt(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Xt(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},Fi.prototype.commitLayers=function(){},Fi.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,Me=x.toVertex;if(x.valid)y.curve===Gs&&y.pointsCount===4&&(ye.column===Me.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===_r&&(b=!0),ae!==null&&ue===_r&&(x=!0),(b||x)&&(ue=null,b&&(ue=y.getLinkPointFromPoint(E,ne,ne.ga(Gr),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(Gr),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===Me.layer)y.zf();else{var ze=!1,Ze=!1,Qe=this.ie,rt=y.firstPickIndex+1;if(y.isOrthogonal){Ze=!0;var Tt=y.pointsCount;4<Tt&&y.points.removeRange(2,Tt-3)}else if(y.curve===Gs)ze=!0,Tt=y.pointsCount,4<Tt&&y.points.removeRange(2,Tt-3),Tt===4&&(rt=2);else{Tt=y.pointsCount;var xt=ge===_r,At=ue===_r;2<Tt&&xt&&At?y.points.removeRange(1,Tt-2):3<Tt&&xt&&!At?y.points.removeRange(1,Tt-3):3<Tt&&!xt&&At?y.points.removeRange(2,Tt-2):4<Tt&&!xt&&!At&&y.points.removeRange(2,Tt-3)}if(x.rev){for(;Me!==null&&ye!==Me;){var Ft=Tt=null;for(xt=Me.sourceEdges.iterator;xt.next()&&(At=xt.value,At.link!==x.link||(Tt=At.fromVertex,Ft=At.toVertex,Tt.node!==null)););if(Tt===null)break;if(Tt!==ye){xt=y.i(rt-1).x,At=y.i(rt-1).y;var Dt=Tt.centerX,It=Tt.centerY;if(Ze)this.K===180||this.K===0?rt===y.firstPickIndex+1?(y.m(rt++,xt,At),y.m(rt++,xt,It)):(Ft!==null?Ft.centerY:At)!==It&&(Ft=this.Ta[Tt.layer-1]+this.Rf.x,y.m(rt++,Ft,At),y.m(rt++,Ft,It)):rt===y.firstPickIndex+1?(y.m(rt++,xt,At),y.m(rt++,Dt,At)):(Ft!==null?Ft.centerX:xt)!==Dt&&(Ft=this.Ta[Tt.layer-1]+this.Rf.y,y.m(rt++,xt,Ft),y.m(rt++,Dt,Ft));else if(rt===y.firstPickIndex+1){Ft=Math.max(10,this.he[Me.layer]);var Wt=Math.max(10,this.Ld[Me.layer]);if(ze)this.K===180?Dt<=Me.bounds.x?(Me=Me.bounds.x,y.m(rt++,Me-Ft,It),y.m(rt++,Me,It),y.m(rt++,Me+Wt,It)):(y.m(rt++,Dt-Ft,It),y.m(rt++,Dt,It),y.m(rt++,Dt+Wt,It)):this.K===90?It>=Me.bounds.bottom?(Me=Me.bounds.y+Me.bounds.height,y.m(rt++,Dt,Me+Wt),y.m(rt++,Dt,Me),y.m(rt++,Dt,Me-Ft)):(y.m(rt++,Dt,It+Wt),y.m(rt++,Dt,It),y.m(rt++,Dt,It-Ft)):this.K===270?It<=Me.bounds.y?(Me=Me.bounds.y,y.m(rt++,Dt,Me-Ft),y.m(rt++,Dt,Me),y.m(rt++,Dt,Me+Wt)):(y.m(rt++,Dt,It-Ft),y.m(rt++,Dt,It),y.m(rt++,Dt,It+Wt)):this.K===0&&(Dt>=Me.bounds.right?(Me=Me.bounds.x+Me.bounds.width,y.m(rt++,Me+Wt,It),y.m(rt++,Me,It),y.m(rt++,Me-Ft,It)):(y.m(rt++,Dt+Wt,It),y.m(rt++,Dt,It),y.m(rt++,Dt-Ft,It)));else{y.m(rt++,xt,At);var _n=0;this.K===180||this.K===0?((this.K===180?Dt>=Me.bounds.right:Dt<=Me.bounds.x)&&(_n=(this.K===0?-Ft:Wt)/2),y.m(rt++,xt+_n,It)):((this.K===270?It>=Me.bounds.bottom:It<=Me.bounds.y)&&(_n=(this.K===90?-Ft:Wt)/2),y.m(rt++,Dt,At+_n)),y.m(rt++,Dt,It)}}else Ft=Math.max(10,this.he[Tt.layer]),Wt=Math.max(10,this.Ld[Tt.layer]),ze?this.K===180?(y.m(rt++,Dt-Ft-Qe,It),y.m(rt++,Math.min(Dt-Ft+Qe/2,Dt),It),y.m(rt++,Dt,It),y.m(rt++,Dt,It),y.m(rt++,Math.max(Dt+Wt-Qe/2,Dt),It),y.m(rt++,Dt+Wt+Qe,It)):this.K===90?(y.m(rt++,Dt,It+Wt+Qe),y.m(rt++,Dt,Math.max(It+Wt-Qe/2,It)),y.m(rt++,Dt,It),y.m(rt++,Dt,It),y.m(rt++,Dt,Math.min(It-Ft+Qe/2,It)),y.m(rt++,Dt,It-Ft-Qe)):this.K===270?(y.m(rt++,Dt,It-Ft-Qe),y.m(rt++,Dt,Math.min(It-Ft+Qe/2,It)),y.m(rt++,Dt,It),y.m(rt++,Dt,It),y.m(rt++,Dt,Math.max(It+Wt-Qe/2,It)),y.m(rt++,Dt,It+Wt+Qe)):(y.m(rt++,Dt+Wt+Qe,It),y.m(rt++,Math.max(Dt+Wt-Qe/2,Dt),It),y.m(rt++,Dt,It),y.m(rt++,Dt,It),y.m(rt++,Math.min(Dt-Ft+Qe/2,Dt),It),y.m(rt++,Dt-Ft-Qe,It)):y.m(rt++,Dt,It)}Me=Tt}(ae===null||ge!==_r||Ze)&&(xt=y.i(rt-1).x,At=y.i(rt-1).y,Dt=y.i(rt).x,It=y.i(rt).y,Ze?(Qe=this.Ld[ye.layer],this.K===180||this.K===0?(Ze=At,Ze>=ye.bounds.y&&Ze<=ye.bounds.bottom&&(this.K===180?Dt>=ye.bounds.x:Dt<=ye.bounds.right)&&(Me=ye.centerX+(this.K===180?-Qe:Qe),Ze<ye.bounds.y+ye.bounds.height/2?Ze=ye.bounds.y-this.kc/2:Ze=ye.bounds.bottom+this.kc/2,y.m(rt++,Me,At),y.m(rt++,Me,Ze)),y.m(rt++,Dt,Ze)):(Ze=xt,Ze>=ye.bounds.x&&Ze<=ye.bounds.right&&(this.K===270?It>=ye.bounds.y:It<=ye.bounds.bottom)&&(Me=ye.centerY+(this.K===270?-Qe:Qe),Ze<ye.bounds.x+ye.bounds.width/2?Ze=ye.bounds.x-this.kc/2:Ze=ye.bounds.right+this.kc/2,y.m(rt++,xt,Me),y.m(rt++,Ze,Me)),y.m(rt++,Ze,It)),y.m(rt++,Dt,It)):ze?(Ft=Math.max(10,this.he[ye.layer]),Wt=Math.max(10,this.Ld[ye.layer]),this.K===180&&Dt>=ye.bounds.x?(Me=ye.bounds.x+ye.bounds.width,y.L(rt-2,Me,At),y.L(rt-1,Me+Wt,At)):this.K===90&&It<=ye.bounds.bottom?(Me=ye.bounds.y,y.L(rt-2,xt,Me),y.L(rt-1,xt,Me-Ft)):this.K===270&&It>=ye.bounds.y?(Me=ye.bounds.y+ye.bounds.height,y.L(rt-2,xt,Me),y.L(rt-1,xt,Me+Wt)):this.K===0&&Dt<=ye.bounds.right&&(Me=ye.bounds.x,y.L(rt-2,Me,At),y.L(rt-1,Me-Ft,At))):(Ft=Math.max(10,this.he[ye.layer]),Wt=Math.max(10,this.Ld[ye.layer]),Ze=0,this.K===180||this.K===0?((this.K===180?Dt<=ye.bounds.x:Dt>=ye.bounds.right)&&(Ze=(this.K===0?Wt:-Ft)/2),y.m(rt++,Dt+Ze,At)):((this.K===270?It<=ye.bounds.y:It>=ye.bounds.bottom)&&(Ze=(this.K===90?Wt:-Ft)/2),y.m(rt++,xt,It+Ze)),y.m(rt++,Dt,It)))}else{for(;ye!==null&&ye!==Me;){for(Ft=Tt=null,ye=ye.destinationEdges.iterator;ye.next()&&(xt=ye.value,xt.link!==x.link||(Tt=xt.toVertex,Ft=xt.fromVertex,Ft.node!==null&&(Ft=null),Tt.node!==null)););if(Tt===null)break;Tt!==Me&&(xt=y.i(rt-1).x,At=y.i(rt-1).y,Dt=Tt.centerX,It=Tt.centerY,Ze?this.K===180||this.K===0?(Ft!==null?Ft.centerY:At)!==It&&(Ft=this.Ta[Tt.layer]+this.Rf.x,rt===y.firstPickIndex+1&&(Ft=this.K===0?Math.max(Ft,xt):Math.min(Ft,xt)),y.m(rt++,Ft,At),y.m(rt++,Ft,It)):(Ft!==null?Ft.centerX:xt)!==Dt&&(Ft=this.Ta[Tt.layer]+this.Rf.y,rt===y.firstPickIndex+1&&(Ft=this.K===90?Math.max(Ft,At):Math.min(Ft,At)),y.m(rt++,xt,Ft),y.m(rt++,Dt,Ft)):(Ft=Math.max(10,this.he[Tt.layer]),Wt=Math.max(10,this.Ld[Tt.layer]),ze?this.K===180?(y.m(rt++,Dt+Wt+Qe,It),y.m(rt++,Math.max(Dt+Wt-Qe/2,Dt),It),y.m(rt++,Dt,It),y.m(rt++,Dt,It),y.m(rt++,Math.min(Dt-Ft+Qe/2,Dt),It),y.m(rt++,Dt-Ft-Qe,It)):this.K===90?(y.m(rt++,Dt,It-Ft-Qe),y.m(rt++,Dt,Math.min(It-Ft+Qe/2,It)),y.m(rt++,Dt,It),y.m(rt++,Dt,It),y.m(rt++,Dt,Math.max(It+Wt-Qe/2,It)),y.m(rt++,Dt,It+Wt+Qe)):this.K===270?(y.m(rt++,Dt,It+Wt+Qe),y.m(rt++,Dt,Math.max(It+Wt-Qe/2,It)),y.m(rt++,Dt,It),y.m(rt++,Dt,It),y.m(rt++,Dt,Math.min(It-Ft+Qe/2,It)),y.m(rt++,Dt,It-Ft-Qe)):(y.m(rt++,Dt-Ft-Qe,It),y.m(rt++,Math.min(Dt-Ft+Qe/2,Dt),It),y.m(rt++,Dt,It),y.m(rt++,Dt,It),y.m(rt++,Math.max(Dt+Wt-Qe/2,Dt),It),y.m(rt++,Dt+Wt+Qe,It)):this.K===180?(y.m(rt++,Dt+Wt,It),y.m(rt++,Dt-Ft,It)):this.K===90?(y.m(rt++,Dt,It-Ft),y.m(rt++,Dt,It+Wt)):this.K===270?(y.m(rt++,Dt,It+Wt),y.m(rt++,Dt,It-Ft)):(y.m(rt++,Dt-Ft,It),y.m(rt++,Dt+Wt,It)))),ye=Tt}Ze&&(xt=y.i(rt-1).x,At=y.i(rt-1).y,Dt=y.i(rt).x,It=y.i(rt).y,this.K===180||this.K===0?At!==It&&(Ft=this.K===0?Math.min(Math.max((Dt+xt)/2,this.Ta[Me.layer]+this.Rf.x),Dt):Math.max(Math.min((Dt+xt)/2,this.Ta[Me.layer]+this.Rf.x),Dt),y.m(rt++,Ft,At),y.m(rt++,Ft,It)):xt!==Dt&&(Ft=this.K===90?Math.min(Math.max((It+At)/2,this.Ta[Me.layer]+this.Rf.y),It):Math.max(Math.min((It+At)/2,this.Ta[Me.layer]+this.Rf.y),It),y.m(rt++,xt,Ft),y.m(rt++,Dt,Ft)))}b!==null&&ze&&4<=y.pointsCount&&(ne!==null&&(ne=ge===_r?y.getLinkPointFromPoint(E,ne,ne.ga(Gr),y.i(3),!0):y.i(0),ge===_r&&(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===_r?y.getLinkPointFromPoint(ee,ae,ae.ga(Gr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ue===_r&&(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()},Fi.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new on,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 Me=1;for(ae=x[ee].first,ue=ee;ue<E;ue++)ge=x[ue],ge.first!==ae&&(Me++,ae=ge.first);for(ue=!0,ge=Me,ye<Me?(ue=!1,ge=ye,ae=x[ee].jc,this.zi(x,this.Js,ee,ee+ne)):ae=x[ee].first,ye=0,Me=ee;Me<E;Me++){var ze=x[Me];(ue?ze.first:ze.jc)!==ae&&(ye++,ae=ue?ze.first:ze.jc);var Ze=ze.link;ee=Ze.i(ze.index),ne=Ze.i(ze.index+1);var Qe=this.linkSpacing*(ye-(ge-1)/2);y++,Ze.uh(),Ze.L(ze.index,ee.x,ee.y+Qe),Ze.L(ze.index+1,ne.x,ne.y+Qe),Ze.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),Me=1,ae=x[ee].first,ue=ee;ue<E;ue++)ge=x[ue],ge.first!==ae&&(Me++,ae=ge.first);for(ue=!0,ge=Me,ye<Me?(ue=!1,ge=ye,ae=x[ee].jc,this.zi(x,this.Js,ee,ee+ne)):ae=x[ee].first,ye=0,Me=ee;Me<E;Me++)ze=x[Me],(ue?ze.first:ze.jc)!==ae&&(ye++,ae=ue?ze.first:ze.jc),Ze=ze.link,ee=Ze.i(ze.index),ne=Ze.i(ze.index+1),Qe=this.linkSpacing*(ye-(ge-1)/2),y++,Ze.uh(),Ze.L(ze.index,ee.x+Qe,ee.y),Ze.L(ze.index+1,ne.x+Qe,ne.y),Ze.zf()}ee=E}a=b}}}},et=Fi.prototype,et.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},et.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},et.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},et.B=function(a,y){return a-=y,-1<a&&1>a},et.zi=function(a,y,x,b){var E=a.length,ee=b-x;if(!(1>=ee))if((0>x||x>=E-1)&&Ot("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}rn.Object.defineProperties(Fi.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()):Ot("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!==Mv&&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 Yt(Fi,"CycleDepthFirst",0),xy=new Yt(Fi,"CycleGreedy",1),Pg=new Yt(Fi,"CycleFromLayers",2),kv=new Yt(Fi,"LayerOptimalLinkLength",0),wy=new Yt(Fi,"LayerLongestPathSink",1),by=new Yt(Fi,"LayerLongestPathSource",2),Tv=new Yt(Fi,"InitDepthFirstOut",0),Py=new Yt(Fi,"InitDepthFirstIn",1),Cy=new Yt(Fi,"InitNaive",2),Ey=new Yt(Fi,"AggressiveNone",0),Mv=new Yt(Fi,"AggressiveLess",1),ky=new Yt(Fi,"AggressiveMore",2),Xx=8;Fi.className="LayeredDigraphLayout",Fi.CycleDepthFirst=Ev,Fi.CycleGreedy=xy,Fi.CycleFromLayers=Pg,Fi.LayerOptimalLinkLength=kv,Fi.LayerLongestPathSink=wy,Fi.LayerLongestPathSource=by,Fi.InitDepthFirstOut=Tv,Fi.InitDepthFirstIn=Py,Fi.InitNaive=Cy,Fi.AggressiveNone=Ey,Fi.AggressiveLess=Mv,Fi.AggressiveMore=ky,Fi.PackNone=0,Fi.PackExpand=1,Fi.PackStraighten=2,Fi.PackMedian=4,Fi.PackAll=15,Fi.AlignNone=0,Fi.AlignUpperLeft=1,Fi.AlignUpperRight=2,Fi.AlignLowerLeft=4,Fi.AlignLowerRight=8,Fi.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)}Ht(Xd,Xi),Xd.prototype.createVertex=function(){return new nl(this)},Xd.prototype.createEdge=function(){return new Cg(this)},Xd.className="LayeredDigraphNetwork";function nl(a){Wo.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}Ht(nl,Wo);function ix(a,y){return a.index-y.index}function Lv(a,y){if(!a.$n){for(var x=[],b=Er(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Er(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Ot("Unable to find destination edge to given vertex")}function Ty(a){if(!a.co){for(var y=[],x=Er(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=Er(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}nl.prototype.Cl=function(a){Wo.prototype.Cl.call(this,a),this.bo=this.co=null},nl.prototype.Kl=function(a){Wo.prototype.Kl.call(this,a),this.bo=this.co=null},nl.prototype.zl=function(a){Wo.prototype.zl.call(this,a),this.$n=this.ao=null},nl.prototype.Jl=function(a){Wo.prototype.Jl.call(this,a),this.$n=this.ao=null},rn.Object.defineProperties(nl.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)}}}),nl.prototype.deleteDestinationEdge=nl.prototype.Jl,nl.prototype.addDestinationEdge=nl.prototype.zl,nl.prototype.deleteSourceEdge=nl.prototype.Kl,nl.prototype.addSourceEdge=nl.prototype.Cl,nl.className="LayeredDigraphVertex";function Cg(a){Ms.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Ht(Cg,Ms),rn.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 Qr(a){lo.call(this),this.Ub=new un,this.Wn=Ov,this.ud=Eu,this.vo=Dv,this.Bq=Iy,this.$v=[],this.td=!0,this.Rb=Bv,this.$d=new fn(10,10).freeze();var y=new Vf(this);this.W=new gl(y),this.Y=new gl(y),this.ru=[],a&&Object.assign(this,a)}Ht(Qr,lo),Qr.prototype.cloneProtected=function(a){lo.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)},Qr.prototype.qb=function(a){a.classType===Qr?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:Ot("Unknown enum value: "+a):lo.prototype.qb.call(this,a)},Qr.prototype.createNetwork=function(){return new Vf(this)},Qr.prototype.makeNetwork=function(a){function y(b){if(b instanceof Wn)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof En){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 Kt?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Or?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Qr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==Rv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Kt&&(y=a),this.path===Ov&&y!==null?this.ud=y.isTreePathToChildren?Eu:Hf:this.ud=this.path===Ov?Eu: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 un,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Wn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof gl&&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,My(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,My(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gl&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gl&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gl&&ux(this,y);if(this.Cu(),this.layerStyle===Iv){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 gl&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new un,this.isValidLayout=!0};function Jx(a){var y=new un;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Qr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Eu:x.sourceEdges.count===0&&this.Ub.add(x);break;case Hf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Ot("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 Eu: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:Ot("Unhandled path value "+a.ud.toString())}}return b}function My(a,y){if(y!==null){switch(a.ud){case Eu:if(0<y.destinationEdges.count){for(var x=new on,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 on,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Ot("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++)My(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}Qr.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===Mu&&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}}Qr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Qx(this,a)),a.parent!==null&&a.parent.alignment===Mu){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])}}Qr.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Mu&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}Qr.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 Mg:a.children.sort(a.comparer),a.children.reverse();break;default:Ot("Unhandled sorting value "+a.sorting.toString())}},Qr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Qr.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=Xt.allocAt(0,0,a.bounds.width+ee,a.bounds.height+ne),a.bounds=E,Xt.free(E))};function gc(a){return a===Mh||a===Mu||a===Lh||a===Zu}function Eg(a){return a===Mh||a===Mu}function Ly(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===Lh)return!0}}return!1}Qr.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=Ly(a),ue=0,ge=a.comments,ye=ge.length,Me=st.alloc(),ze=0;ze<ye;ze++){var Ze=ge[ze],Qe=Ze.measuredBounds;if(b&&!ne||!ee&&!x&&ne||ee&&x&&ne){if(135<E&&!ee||x&&ae)if(0<=a.commentMargin)for(Me.h(a.bounds.x-a.commentMargin-Qe.width,a.bounds.y+ue),Ze.move(Me),Ze=Ze.Sd();Ze.next();){var rt=Ze.value;rt.fromSpot=Oa,rt.toSpot=aa}else for(Me.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ue),Ze.move(Me),Ze=Ze.Sd();Ze.next();)rt=Ze.value,rt.fromSpot=aa,rt.toSpot=Oa;else if(0<=a.commentMargin)for(Me.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ue),Ze.move(Me),Ze=Ze.Sd();Ze.next();)rt=Ze.value,rt.fromSpot=aa,rt.toSpot=Oa;else for(Me.h(a.bounds.x+a.commentMargin-Qe.width,a.bounds.y+ue),Ze.move(Me),Ze=Ze.Sd();Ze.next();)rt=Ze.value,rt.fromSpot=Oa,rt.toSpot=aa;ue=0<=a.commentSpacing?ue+(Qe.height+a.commentSpacing):ue+(a.commentSpacing-Qe.height)}else{if(135<E&&!ee||!x&&ae)if(0<=a.commentMargin)for(Me.h(a.bounds.x+ue,a.bounds.y-a.commentMargin-Qe.height),Ze.move(Me),Ze=Ze.Sd();Ze.next();)rt=Ze.value,rt.fromSpot=Ca,rt.toSpot=ga;else for(Me.h(a.bounds.x+ue,a.bounds.y+2*a.focus.y-a.commentMargin),Ze.move(Me),Ze=Ze.Sd();Ze.next();)rt=Ze.value,rt.fromSpot=ga,rt.toSpot=Ca;else if(0<=a.commentMargin)for(Me.h(a.bounds.x+ue,a.bounds.y+2*a.focus.y+a.commentMargin),Ze.move(Me),Ze=Ze.Sd();Ze.next();)rt=Ze.value,rt.fromSpot=ga,rt.toSpot=Ca;else for(Me.h(a.bounds.x+ue,a.bounds.y+a.commentMargin-Qe.height),Ze.move(Me),Ze=Ze.Sd();Ze.next();)rt=Ze.value,rt.fromSpot=Ca,rt.toSpot=ga;ue=0<=a.commentSpacing?ue+(Qe.width+a.commentSpacing):ue+(a.commentSpacing-Qe.width)}}if(st.free(Me),y=ue-a.commentSpacing-(b?y.height:y.width),this.ud===Eu)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)}},Qr.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 Lg:if(a.alignment===Mu)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=Ly(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=Ll(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===ku;var ge=ue===Tu,ye=gc(ue),Me=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var ze=a.nodeSpacing,Ze=this.computeNodeIndent(a),Qe=a.rowSpacing,rt=0;(b||ge||a.hm||a.im&&a.maxGenerationCount===1)&&(rt=Math.max(0,a.rowIndent)),b=a.width;var Tt=a.height,xt=0,At=0,Ft=0,Dt=null,It=null,Wt=0,_n=0,rr=0,Yn=0,Cn=0,dn=0,jr=0,kr=0;if(ye&&!Eg(ue)&&135<E&&ne.reverse(),Eg(ue))if(1<ae)for(var wi=0;wi<ae;wi++)wi%2===0&&wi!==ae-1&&(kr=Math.max(kr,y?ne[wi].Da.width:ne[wi].Da.height));else ae===1&&(kr=y?ne[0].Da.width:ne[0].Da.height);if(ye){switch(ue){case Mh:At=135>E?cx(this,a,ne,kr,xt,At):fx(this,a,ne,kr,xt,At),kr=At.x,xt=At.width,At=At.height;break;case Lh:for(Dt=0;Dt<ae;Dt++)It=ne[Dt],Me=It.Da,Ft=dn===0?0:Qe,y?(It.S.h(ee-Me.width,Yn+Ft),xt=Math.max(xt,Me.width),At=Math.max(At,Yn+Ft+Me.height),Yn+=Ft+Me.height):(It.S.h(rr+Ft,ee-Me.height),xt=Math.max(xt,rr+Ft+Me.width),At=Math.max(At,Me.height),rr+=Ft+Me.width),dn++;break;case Zu:for(Dt=0;Dt<ae;Dt++)It=ne[Dt],ee=It.Da,Me=dn===0?0:Qe,y?(It.S.h(ze/2+a.focus.x,Yn+Me),xt=Math.max(xt,ee.width),At=Math.max(At,Yn+Me+ee.height),Yn+=Me+ee.height):(It.S.h(rr+Me,ze/2+a.focus.y),xt=Math.max(xt,rr+Me+ee.width),At=Math.max(At,ee.height),rr+=Me+ee.width),dn++}Dt=vs(this,2),It=vs(this,2),y?(Dt[0].h(0,0),Dt[1].h(0,At),It[0].h(xt,0)):(Dt[0].h(0,0),Dt[1].h(xt,0),It[0].h(0,At)),It[1].h(xt,At)}else for(wi=0;wi<ae;wi++){var Ki=ne[wi],Jo=Ki.Da;if(y){0<Me&&0<dn&&rr+ze+Jo.width>Me&&(rr<ee&&ef(a,ue,ee-rr,0,jr,wi-1),Cn++,dn=0,jr=wi,Ft=At,rr=0,Yn=135<E?-At-Qe:At+Qe),Av(this,Ki,0,Yn);var ea=0;if(dn===0)Dt=Ki.Yo,It=Ki.kp,Wt=Jo.width,_n=Jo.height,(Dt===null||It===null||E!==Ll(Ki))&&(Dt=vs(this,2),It=vs(this,2),Dt[0].h(0,0),Dt[1].h(0,_n),It[0].h(Wt,0),It[1].h(Wt,_n));else{var Ia=Un();_n=dx(this,a,Ki,Dt,It,Wt,_n,Ia),ea=_n.x,Dt=Ia[0],It=Ia[1],Wt=_n.width,_n=_n.height,Rn(Ia),rr<Jo.width&&0>ea&&(Uf(a,-ea,0,jr,wi-1),jv(Dt,-ea,0),jv(It,-ea,0),ea=0)}Ki.S.h(ea,Yn),xt=Math.max(xt,Wt),At=Math.max(At,Ft+(Cn===0?0:Qe)+Jo.height),rr=Wt}else 0<Me&&0<dn&&Yn+ze+Jo.height>Me&&(Yn<ee&&ef(a,ue,0,ee-Yn,jr,wi-1),Cn++,dn=0,jr=wi,Ft=xt,Yn=0,rr=135<E?-xt-Qe:xt+Qe),Av(this,Ki,rr,0),ea=0,dn===0?(Dt=Ki.Yo,It=Ki.kp,Wt=Jo.width,_n=Jo.height,(Dt===null||It===null||E!==Ll(Ki))&&(Dt=vs(this,2),It=vs(this,2),Dt[0].h(0,0),Dt[1].h(Wt,0),It[0].h(0,_n),It[1].h(Wt,_n))):(Ia=Un(),_n=dx(this,a,Ki,Dt,It,Wt,_n,Ia),ea=_n.x,Dt=Ia[0],It=Ia[1],Wt=_n.width,_n=_n.height,Rn(Ia),Yn<Jo.height&&0>ea&&(Uf(a,0,-ea,jr,wi-1),jv(Dt,0,-ea),jv(It,0,-ea),ea=0)),Ki.S.h(rr,ea),At=Math.max(At,_n),xt=Math.max(xt,Ft+(Cn===0?0:Qe)+Jo.width),Yn=_n;dn++}switch(0<Cn&&(y?(At+=Math.max(0,x),rr<xt&&ef(a,ue,xt-rr,0,jr,ae-1),0<rt&&(ge||Uf(a,rt,0,0,ae-1),xt+=rt)):(xt+=Math.max(0,x),Yn<At&&ef(a,ue,0,At-Yn,jr,ae-1),0<rt&&(ge||Uf(a,0,rt,0,ae-1),At+=rt))),rt=ge=0,ue){case Jd:y?ge+=xt/2-a.focus.x-Ze/2:rt+=At/2-a.focus.y-Ze/2;break;case Wf:0<Cn?y?ge+=xt/2-a.focus.x-Ze/2:rt+=At/2-a.focus.y-Ze/2:y?(kr=ne[0].S.x+ne[0].la.x,ge+=kr+(ne[ae-1].S.x+ne[ae-1].la.x+2*ne[ae-1].focus.x-kr)/2-a.focus.x-Ze/2):(kr=ne[0].S.y+ne[0].la.y,rt+=kr+(ne[ae-1].S.y+ne[ae-1].la.y+2*ne[ae-1].focus.y-kr)/2-a.focus.y-Ze/2);break;case ku:y?(ge-=Ze,xt+=Ze):(rt-=Ze,At+=Ze);break;case Tu:y?(ge+=xt-a.width+Ze,xt+=Ze):(rt+=At-a.height+Ze,At+=Ze);break;case Mh:y?1<ae?ge+=kr+ze/2-a.focus.x:ge+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<ae?rt+=kr+ze/2-a.focus.y:rt+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Lh:y?ge+=xt+ze/2-a.focus.x:rt+=At+ze/2-a.focus.y;break;case Zu:break;default:At=this.customAlignment(a,ge,rt,xt,At),ge=At[0],rt=At[1],xt=At[2],At=At[3]}for(Ze=0;Ze<ae;Ze++)kr=ne[Ze],y?kr.S.h(kr.S.x+kr.la.x-ge,kr.S.y+(135<E?(ye?-At:-kr.Da.height)+kr.la.y-x:Tt+x+kr.la.y)):kr.S.h(kr.S.x+(135<E?(ye?-xt:-kr.Da.width)+kr.la.x-x:b+x+kr.la.x),kr.S.y+kr.la.y-rt);if(ae=ne=0,ye?y?(xt=Ny(a,xt,ge),0>ge&&(ge=0),135<E&&(rt+=At+x),At+=Tt+x,ue===Zu&&(ne+=ze/2+a.focus.x),ae+=Tt+x):(135<E&&(ge+=xt+x),xt+=b+x,At=Ay(a,At,rt),0>rt&&(rt=0),ue===Zu&&(ae+=ze/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>xt&&(xt=jy(ue,b-xt,0),ne=xt.x,ae=xt.y,xt=b,ge=0):xt=Ny(a,xt,ge),0>ge&&(ne-=ge,ge=0),135<E&&(rt+=At+x),At=Math.max(Math.max(At,Tt),At+Tt+x),ae+=Tt+x):(135<E&&(ge+=xt+x),xt=Math.max(Math.max(xt,b),xt+b+x),a.comments===null?Tt>At&&(At=jy(ue,0,Tt-At),ne=At.x,ae=At.y,At=Tt,rt=0):At=Ay(a,At,rt),0>rt&&(ae-=rt,rt=0),ne+=b+x),0<Cn)E=vs(this,4),Cn=vs(this,4),y?(E[2].h(0,Tt+x),E[3].h(E[2].x,At),Cn[2].h(xt,E[2].y),Cn[3].h(Cn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(xt,E[2].y),Cn[2].h(E[2].x,At),Cn[3].h(E[3].x,Cn[2].y));else{for(E=vs(this,Dt.length+2),Cn=vs(this,It.length+2),ue=0;ue<Dt.length;ue++)ye=Dt[ue],E[ue+2].h(ye.x+ne,ye.y+ae);for(ue=0;ue<It.length;ue++)ye=It[ue],Cn[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])),Cn[0].h(ge+b,0),Cn[1].h(Cn[0].x,Tt),Cn[2].y<Cn[1].y&&(Cn[2].x<Cn[0].x?Cn[2].assign(Cn[1]):Cn[1].assign(Cn[2])),Cn[3].y<Cn[2].y&&(Cn[3].x<Cn[0].x?Cn[3].assign(Cn[2]):Cn[2].assign(Cn[3])),E[2].y-=x/2,Cn[2].y-=x/2):(E[0].h(0,rt),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])),Cn[0].h(0,rt+Tt),Cn[1].h(b,Cn[0].y),Cn[2].x<Cn[1].x&&(Cn[2].y<Cn[0].y?Cn[2].assign(Cn[1]):Cn[1].assign(Cn[2])),Cn[3].x<Cn[2].x&&(Cn[3].y<Cn[0].y?Cn[3].assign(Cn[2]):Cn[2].assign(Cn[3])),E[2].x-=x/2,Cn[2].x-=x/2),zl(this,Dt),zl(this,It),a.Yo=E,a.kp=Cn,a.la.h(ge,rt),a.Da.h(xt,At)}break;default:Ot("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=Ly(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=Ll(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===ku,Me=ge===Tu;ae=gc(ge);var ze=Math.max(0,y.breadthLimit);ue=a.computeLayerSpacing(y);var Ze=y.nodeSpacing,Qe=a.computeNodeIndent(y),rt=ye||Me?0:Qe/2,Tt=y.rowSpacing,xt=0;(ye||Me||y.hm||y.im&&y.maxGenerationCount===1)&&(xt=Math.max(0,y.rowIndent)),ye=y.width;var At=y.height,Ft=0,Dt=0,It=0,Wt=0,_n=0,rr=0,Yn=0,Cn=0,dn=0,jr=0;if(ae&&!Eg(ge)&&135<b&&E.reverse(),Eg(ge))if(1<ne)for(var kr=0;kr<ne;kr++){var wi=E[kr],Ki=wi.Da;kr%2===0&&kr!==ne-1?dn=Math.max(dn,(x?Ki.width:Ki.height)+a.computeBusNodeSpacing(wi)-Ze):kr%2!==0&&(jr=Math.max(jr,(x?Ki.width:Ki.height)+a.computeBusNodeSpacing(wi)-Ze))}else ne===1&&(dn=x?E[0].Da.width:E[0].Da.height);if(ae)switch(ge){case Mh:case Mu:Dt=135>b?cx(a,y,E,dn,Ft,Dt):fx(a,y,E,dn,Ft,Dt),dn=Dt.x,Ft=Dt.width,Dt=Dt.height;break;case Lh:for(ze=0;ze<ne;ze++)rt=E[ze],It=rt.Da,jr=Yn===0?0:Tt,x?(rt.S.h(ee-It.width,_n+jr),Ft=Math.max(Ft,It.width),Dt=Math.max(Dt,_n+jr+It.height),_n+=jr+It.height):(rt.S.h(Wt+jr,ee-It.height),Ft=Math.max(Ft,Wt+jr+It.width),Dt=Math.max(Dt,It.height),Wt+=jr+It.width),Yn++;break;case Zu:for(ee=0;ee<ne;ee++)ze=E[ee],rt=ze.Da,It=Yn===0?0:Tt,x?(ze.S.h(Ze/2+y.focus.x,_n+It),Ft=Math.max(Ft,rt.width),Dt=Math.max(Dt,_n+It+rt.height),_n+=It+rt.height):(ze.S.h(Wt+It,Ze/2+y.focus.y),Ft=Math.max(Ft,Wt+It+rt.width),Dt=Math.max(Dt,rt.height),Wt+=It+rt.width),Yn++}else for(jr=0;jr<ne;jr++)kr=E[jr],wi=kr.Da,x?(0<ze&&0<Yn&&Wt+Ze+wi.width>ze&&(Wt<ee&&ef(y,ge,ee-Wt,0,Cn,jr-1),rr++,Yn=0,Cn=jr,It=Dt,Wt=0,_n=135<b?-Dt-Tt:Dt+Tt),Ki=Yn===0?rt:Ze,Av(a,kr,0,_n),kr.S.h(Wt+Ki,_n),Ft=Math.max(Ft,Wt+Ki+wi.width),Dt=Math.max(Dt,It+(rr===0?0:Tt)+wi.height),Wt+=Ki+wi.width):(0<ze&&0<Yn&&_n+Ze+wi.height>ze&&(_n<ee&&ef(y,ge,0,ee-_n,Cn,jr-1),rr++,Yn=0,Cn=jr,It=Ft,_n=0,Wt=135<b?-Ft-Tt:Ft+Tt),Ki=Yn===0?rt:Ze,Av(a,kr,Wt,0),kr.S.h(Wt,_n+Ki),Dt=Math.max(Dt,_n+Ki+wi.height),Ft=Math.max(Ft,It+(rr===0?0:Tt)+wi.width),_n+=Ki+wi.height),Yn++;switch(0<rr&&(x?(Dt+=Math.max(0,ue),Wt<Ft&&ef(y,ge,Ft-Wt,0,Cn,ne-1),0<xt&&(Me||Uf(y,xt,0,0,ne-1),Ft+=xt)):(Ft+=Math.max(0,ue),_n<Dt&&ef(y,ge,0,Dt-_n,Cn,ne-1),0<xt&&(Me||Uf(y,0,xt,0,ne-1),Dt+=xt))),xt=Me=0,ge){case Jd:x?Me+=Ft/2-y.focus.x-Qe/2:xt+=Dt/2-y.focus.y-Qe/2;break;case Wf:0<rr?x?Me+=Ft/2-y.focus.x-Qe/2:xt+=Dt/2-y.focus.y-Qe/2:x?(a=E[0].S.x+E[0].la.x,Me+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-Qe/2):(a=E[0].S.y+E[0].la.y,xt+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-Qe/2);break;case ku:x?(Me-=Qe,Ft+=Qe):(xt-=Qe,Dt+=Qe);break;case Tu:x?(Me+=Ft-y.width+Qe,Ft+=Qe):(xt+=Dt-y.height+Qe,Dt+=Qe);break;case Mh:case Mu:x?1<ne?Me+=dn+Ze/2-y.focus.x:Me+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?xt+=dn+Ze/2-y.focus.y:xt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Lh:x?Me+=Ft+Ze/2-y.focus.x:xt+=Dt+Ze/2-y.focus.y;break;case Zu:break;default:a=a.customAlignment(y,Me,xt,Ft,Dt),Me=a[0],xt=a[1],Ft=a[2],Dt=a[3]}for(a=0;a<ne;a++)Qe=E[a],x?Qe.S.h(Qe.S.x+Qe.la.x-Me,Qe.S.y+(135<b?(ae?-Dt:-Qe.Da.height)+Qe.la.y-ue:At+ue+Qe.la.y)):Qe.S.h(Qe.S.x+(135<b?(ae?-Ft:-Qe.Da.width)+Qe.la.x-ue:ye+ue+Qe.la.x),Qe.S.y+Qe.la.y-xt);x?(Ft=Ny(y,Ft,Me),0>Me&&(Me=0),135<b&&(xt+=Dt+ue),Dt=Math.max(Math.max(Dt,At),Dt+At+ue)):(135<b&&(Me+=Ft+ue),Ft=Math.max(Math.max(Ft,ye),Ft+ye+ue),Dt=Ay(y,Dt,xt),0>xt&&(xt=0)),y.la.h(Me,xt),y.Da.h(Ft,Dt)}}Qr.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 Xt(b,0,E,ee);if(ne===1)return y=x[0],E=y.Da.width,ee=y.Da.height,new Xt(b,0,E,ee);for(var ae=y.nodeSpacing,ue=y.rowSpacing,ge=Ll(y)===90,ye=0,Me=0,ze=0,Ze=0;Ze<ne;Ze++)if(!(Ze%2!==0||1<ne&&Ze===ne-1)){var Qe=x[Ze],rt=Qe.Da,Tt=ye===0?0:ue;if(ge){var xt=a.computeBusNodeSpacing(Qe)-ae;Qe.S.h(b-(rt.width+xt),ze+Tt),E=Math.max(E,rt.width+xt),ee=Math.max(ee,ze+Tt+rt.height),ze+=Tt+rt.height}else xt=a.computeBusNodeSpacing(Qe)-ae,Qe.S.h(Me+Tt,b-(rt.height+xt)),ee=Math.max(ee,rt.height+xt),E=Math.max(E,Me+Tt+rt.width),Me+=Tt+rt.width;ye++}for(ye=0,Qe=Me,Ze=ze,ge?(Me=b+ae,ze=0):(Me=0,ze=b+ae),rt=0;rt<ne;rt++)if(rt%2!==0){Tt=x[rt],xt=Tt.Da;var At=ye===0?0:ue;if(ge){var Ft=a.computeBusNodeSpacing(Tt)-ae;Tt.S.h(Me+Ft,ze+At),E=Math.max(E,Me+xt.width+Ft),ee=Math.max(ee,ze+At+xt.height),ze+=At+xt.height}else Ft=a.computeBusNodeSpacing(Tt)-ae,Tt.S.h(Me+At,ze+Ft),E=Math.max(E,Me+At+xt.width),ee=Math.max(ee,ze+xt.height+Ft),Me+=At+xt.width;ye++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,ge?Math.max(Math.abs(Ze),Math.abs(ze)):Math.max(Math.abs(Qe),Math.abs(Me))),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(Ze,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(Qe,Me)+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 Xt(b,0,E,ee)}function fx(a,y,x,b,E,ee){var ne=x.length;if(ne===0)return new Xt(b,0,E,ee);if(ne===1)return x=x[0],E=x.Da.width,ee=x.Da.height,new Xt(b,0,E,ee);for(var ae=y.nodeSpacing,ue=y.rowSpacing,ge=Ll(y)===270,ye=0,Me=0,ze=0,Ze=0;Ze<ne;Ze++)if(!(Ze%2!==0||1<ne&&Ze===ne-1)){var Qe=x[Ze],rt=Qe.Da,Tt=ye===0?0:ue;if(ge){var xt=a.computeBusNodeSpacing(Qe)-ae;ze-=Tt+rt.height,Qe.S.h(b-(rt.width+xt),ze),E=Math.max(E,rt.width+xt),ee=Math.max(ee,Math.abs(ze))}else xt=a.computeBusNodeSpacing(Qe)-ae,Me-=Tt+rt.width,Qe.S.h(Me,b-(rt.height+xt)),ee=Math.max(ee,rt.height+xt),E=Math.max(E,Math.abs(Me));ye++}for(ye=0,Qe=Me,Ze=ze,ge?(Me=b+ae,ze=0):(Me=0,ze=b+ae),rt=0;rt<ne;rt++)if(rt%2!==0){Tt=x[rt],xt=Tt.Da;var At=ye===0?0:ue;if(ge){var Ft=a.computeBusNodeSpacing(Tt)-ae;ze-=At+xt.height,Tt.S.h(Me+Ft,ze),E=Math.max(E,Me+xt.width+Ft),ee=Math.max(ee,Math.abs(ze))}else Ft=a.computeBusNodeSpacing(Tt)-ae,Me-=At+xt.width,Tt.S.h(Me,ze+Ft),ee=Math.max(ee,ze+xt.height+Ft),E=Math.max(E,Math.abs(Me));ye++}for(1<ne&&ne%2===1&&(ue=x[ne-1],ye=ue.Da,a=a.computeBusLastRowSpacing(ue,ge?Math.max(Math.abs(Ze),Math.abs(ze)):Math.max(Math.abs(Qe),Math.abs(Me))),ge?(ue.S.h(b+ae/2-ue.focus.x-ue.la.x,-ee-ye.height-a),Me=b+ae/2-ue.focus.x-ue.la.x,E=Math.max(E,Me+ye.width),0>Me&&(E-=Me),ee=Math.max(ee,Math.abs(Math.min(Ze,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(Qe,Me))+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 Xt(b,0,E,ee)}Qr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Qr.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 ku:return a.width>y?a.width:y;case Tu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Mh:case Mu:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Lh:return a.width-a.focus.x+a.nodeSpacing/2+y;case Zu: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 ku:return a.height>y?a.height:y;case Tu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Mh:case Mu:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Lh:return a.height-a.focus.y+a.nodeSpacing/2+y;case Zu: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 ku:x=y=0;break;case Tu:break;default:Ot("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 Eu: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:Ot("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=Ll(y),ge=ue===90||ue===270,ye=y.nodeSpacing;y=b;var Me=E;b=ee;var ze=ne,Ze=x.Yo,Qe=x.kp;ne=x.Da;var rt=ge?Math.max(ze,ne.height):Math.max(b,ne.width);if((Ze===null||ue!==Ll(x))&&(Ze=vs(a,2),Qe=vs(a,2),ge?(Ze[0].h(0,0),Ze[1].h(0,ne.height),Qe[0].h(ne.width,0),Qe[1].h(Qe[0].x,Ze[1].y)):(Ze[0].h(0,0),Ze[1].h(ne.width,0),Qe[0].h(0,ne.height),Qe[1].h(Ze[1].x,Qe[0].y))),ge){if(ze=9999999,!(Me===null||2>Me.length||Ze===null||2>Ze.length))for(E=x=0;x<Me.length&&E<Ze.length;){ee=Me[x];var Tt=Ze[E];ue=Tt.x,ge=Tt.y,ue+=b;var xt=ee;x+1<Me.length&&(xt=Me[x+1]);var At=Tt;Tt=At.x,At=At.y,E+1<Ze.length&&(At=Ze[E+1],Tt=At.x,At=At.y,Tt+=b);var Ft=ze;ee.y===ge?Ft=ue-ee.x:ee.y>ge&&ee.y<At?Ft=ue+(ee.y-ge)/(At-ge)*(Tt-ue)-ee.x:ge>ee.y&&ge<xt.y&&(Ft=ue-(ee.x+(ge-ee.y)/(xt.y-ee.y)*(xt.x-ee.x))),Ft<ze&&(ze=Ft),xt.y<=ee.y?x++:At<=ge?E++:(xt.y<=At&&x++,At<=xt.y&&E++)}if(ze=b-ze,ze+=ye,x=Ze,E=ze,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=vs(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=vs(a,b),ue=0;ue<b;ue++)x[ue].assign(ye[ue]);zl(a,ye),b=x}if(ee=Qe,ue=ze,Me===null||2>Me.length||ee===null||2>ee.length)E=null;else{for(ye=vs(a,Me.length+ee.length),E=ge=x=0;x<Me.length&&Me[x].y<ee[0].y;)xt=Me[x++],ye[E++].h(xt.x,xt.y);for(;ge<ee.length;)xt=ee[ge++],ye[E++].h(xt.x+ue,xt.y);for(ee=ee[ee.length-1].y;x<Me.length&&Me[x].y<=ee;)x++;for(;x<Me.length&&Me[x].y>ee;)ue=Me[x++],ye[E++].h(ue.x,ue.y);for(ee=vs(a,E),x=0;x<E;x++)ee[x].assign(ye[x]);zl(a,ye),E=ee}return ee=Math.max(0,ze)+ne.width,ne=rt,zl(a,y),zl(a,Ze),zl(a,Me),zl(a,Qe),ae[0]=b,ae[1]=E,new Xt(ze,0,ee,ne)}if(b=9999999,!(Me===null||2>Me.length||Ze===null||2>Ze.length))for(E=x=0;x<Me.length&&E<Ze.length;)ee=Me[x],Tt=Ze[E],ue=Tt.x,ge=Tt.y,ge+=ze,xt=ee,x+1<Me.length&&(xt=Me[x+1]),At=Tt,Tt=At.x,At=At.y,E+1<Ze.length&&(At=Ze[E+1],Tt=At.x,At=At.y,At+=ze),Ft=b,ee.x===ue?Ft=ge-ee.y:ee.x>ue&&ee.x<Tt?Ft=ge+(ee.x-ue)/(Tt-ue)*(At-ge)-ee.y:ue>ee.x&&ue<xt.x&&(Ft=ge-(ee.y+(ue-ee.x)/(xt.x-ee.x)*(xt.y-ee.y))),Ft<b&&(b=Ft),xt.x<=ee.x?x++:Tt<=ue?E++:(xt.x<=Tt&&x++,Tt<=xt.x&&E++);if(ze-=b,ze+=ye,x=Ze,E=ze,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=vs(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=vs(a,b),ue=0;ue<b;ue++)x[ue].assign(ye[ue]);zl(a,ye),b=x}if(ee=Qe,ue=ze,Me===null||2>Me.length||ee===null||2>ee.length)E=null;else{for(ye=vs(a,Me.length+ee.length),E=ge=x=0;x<Me.length&&Me[x].x<ee[0].x;)xt=Me[x++],ye[E++].h(xt.x,xt.y);for(;ge<ee.length;)xt=ee[ge++],ye[E++].h(xt.x,xt.y+ue);for(ee=ee[ee.length-1].x;x<Me.length&&Me[x].x<=ee;)x++;for(;x<Me.length&&Me[x].x>ee;)ue=Me[x++],ye[E++].h(ue.x,ue.y);for(ee=vs(a,E),x=0;x<E;x++)ee[x].assign(ye[x]);zl(a,ye),E=ee}return ee=rt,ne=Math.max(0,ze)+ne.height,zl(a,y),zl(a,Ze),zl(a,Me),zl(a,Qe),ae[0]=b,ae[1]=E,new Xt(ze,0,ee,ne)}function vs(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 zl(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}Qr.prototype.arrangeTrees=function(){if(this.Rb===Rv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof gl){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 gl&&a.push(x);switch(this.sorting){case Yd:break;case kg:a.reverse();break;case Tg:a.sort(this.comparer);break;case Mg:a.sort(this.comparer),a.reverse();break;default:Ot("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 Ry:y+=E.Da.width+this.$d.width;break;default:Ot("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)}}}Qr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Qr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Qr.prototype.Gu=function(){if(this.layerStyle===Iv){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 Xt(0,ee,x,ae))):this.angle===90?(E.push(new Xt(0,ee,x,ae)),ee+=ae):this.angle===180?(ee-=ae,E.push(new Xt(ee,0,ae,x))):(E.push(new Xt(ee,0,ae,x)),ee+=ae)}this.commitLayers(E,b)}},Qr.prototype.commitLayers=function(){},Qr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Qr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof gl&&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])}}Qr.prototype.setPortSpots=function(a){var y=a.alignment;if(gc(y)){var x=this.ud===Eu,b=Ll(a);switch(b){case 0:var E=aa;break;case 90:E=ga;break;case 180:E=Oa;break;default:E=Ca}var ee=a.children,ne=ee.length;switch(y){case Mh:case Mu: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:Ca;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:ue=Oa;break;case 90:ue=Ca;break;case 180:ue=aa;break;default:ue=ga}else y%2===0&&(ue=b===90||b===270?aa:ga);x?(a.setsPortSpot&&(ae.fromSpot=E),a.setsChildPortSpot&&(ae.toSpot=ue)):(a.setsPortSpot&&(ae.fromSpot=ue),a.setsChildPortSpot&&(ae.toSpot=E))}}break;case Lh:for(b=b===90||b===270?aa:ga,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 Zu:for(b=b===90||b===270?Oa:Ca,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=Ll(a),this.ud===Eu){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=aa;break;case 90:b.fromSpot=ga;break;case 180:b.fromSpot=Oa;break;default:b.fromSpot=Ca}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Oa;break;case 90:b.toSpot=Ca;break;case 180:b.toSpot=aa;break;default:b.toSpot=ga}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=aa;break;case 90:b.toSpot=ga;break;case 180:b.toSpot=Oa;break;default:b.toSpot=Ca}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Oa;break;case 90:b.fromSpot=Ca;break;case 180:b.fromSpot=aa;break;default:b.fromSpot=ga}else b.fromSpot=a.childPortSpot}};function Ll(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Qr.prototype.computeLayerSpacing=function(a){var y=Ll(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},Qr.prototype.computeNodeIndent=function(a){var y=Ll(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)},rn.Object.defineProperties(Qr.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!==Iy&&a!==_y&&a!==Iv||(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!==Ry&&a!==Rv||(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&&!Mg||(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()):Ot("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!==Lg||(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&&!Mg||(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!==Lg||(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 Yt(Qr,"PathDefault",-1),Eu=new Yt(Qr,"PathDestination",0),Hf=new Yt(Qr,"PathSource",1),Yd=new Yt(Qr,"SortingForwards",10),kg=new Yt(Qr,"SortingReverse",11),Tg=new Yt(Qr,"SortingAscending",12),Mg=new Yt(Qr,"SortingDescending",13),Jd=new Yt(Qr,"AlignmentCenterSubtrees",20),Wf=new Yt(Qr,"AlignmentCenterChildren",21),ku=new Yt(Qr,"AlignmentStart",22),Tu=new Yt(Qr,"AlignmentEnd",23),Mh=new Yt(Qr,"AlignmentBus",24),Mu=new Yt(Qr,"AlignmentBusBranching",25),Lh=new Yt(Qr,"AlignmentTopLeftBus",26),Zu=new Yt(Qr,"AlignmentBottomRightBus",27),Fv=new Yt(Qr,"CompactionNone",30),Lg=new Yt(Qr,"CompactionBlock",31),Dv=new Yt(Qr,"StyleLayered",40),Fy=new Yt(Qr,"StyleLastParents",41),Dy=new Yt(Qr,"StyleAlternating",42),By=new Yt(Qr,"StyleRootOnly",43),Bv=new Yt(Qr,"ArrangementVertical",50),Ry=new Yt(Qr,"ArrangementHorizontal",51),Rv=new Yt(Qr,"ArrangementFixedRoots",52),Iy=new Yt(Qr,"LayerIndividual",60),_y=new Yt(Qr,"LayerSiblings",61),Iv=new Yt(Qr,"LayerUniform",62);Qr.className="TreeLayout",Qr.PathDefault=Ov,Qr.PathDestination=Eu,Qr.PathSource=Hf,Qr.SortingForwards=Yd,Qr.SortingReverse=kg,Qr.SortingAscending=Tg,Qr.SortingDescending=Mg,Qr.AlignmentCenterSubtrees=Jd,Qr.AlignmentCenterChildren=Wf,Qr.AlignmentStart=ku,Qr.AlignmentEnd=Tu,Qr.AlignmentBus=Mh,Qr.AlignmentBusBranching=Mu,Qr.AlignmentTopLeftBus=Lh,Qr.AlignmentBottomRightBus=Zu,Qr.CompactionNone=Fv,Qr.CompactionBlock=Lg,Qr.StyleLayered=Dv,Qr.StyleLastParents=Fy,Qr.StyleAlternating=Dy,Qr.StyleRootOnly=By,Qr.ArrangementVertical=Bv,Qr.ArrangementHorizontal=Ry,Qr.ArrangementFixedRoots=Rv,Qr.LayerIndividual=Iy,Qr.LayerSiblings=_y,Qr.LayerUniform=Iv;function Vf(a){Xi.call(this,a)}Ht(Vf,Xi),Vf.prototype.createVertex=function(){return new gl(this)},Vf.prototype.createEdge=function(){return new Qd(this)},Vf.className="TreeNetwork";function gl(a){Wo.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 fn(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=Lg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Zo,this.wr=!0,this.Dp=Zo}Ht(gl,Wo),gl.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)},rn.Object.defineProperties(gl.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)}}}),gl.className="TreeVertex";function Qd(a){Ms.call(this,a),this.$t=new st(0,0)}Ht(Qd,Ms),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 Eu:x=this.fromVertex,b=this.toVertex;break;case Hf:x=this.toVertex,b=this.fromVertex;break;default:Ot("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=Ll(x),ne=y.computeLayerSpacing(x),ae=x.rowSpacing;a.vg();var ue=a.curve===Gs,ge=a.isOrthogonal,ye;if(a.uh(),ge||ue){for(ye=2;4<a.pointsCount;)a.pv(2);var Me=a.i(1),ze=a.i(2)}else{for(ye=1;3<a.pointsCount;)a.pv(1);Me=a.i(0),ze=a.i(a.pointsCount-1)}var Ze=a.i(a.pointsCount-1);ee===0?(x.alignment===Tu?(ee=b.bottom+E.y,E.y===0&&Me.y>Ze.y+x.rowIndent&&(ee=Math.min(ee,Math.max(Me.y,ee-y.computeNodeIndent(x))))):x.alignment===ku?(ee=b.top+E.y,E.y===0&&Me.y<Ze.y-x.rowIndent&&(ee=Math.max(ee,Math.min(Me.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,Me.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,Me.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===Tu?(ee=b.right+E.x,E.x===0&&Me.x>Ze.x+x.rowIndent&&(ee=Math.min(ee,Math.max(Me.x,ee-y.computeNodeIndent(x))))):x.alignment===ku?(ee=b.left+E.x,E.x===0&&Me.x<Ze.x-x.rowIndent&&(ee=Math.max(ee,Math.min(Me.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,Me.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,Me.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===Tu?(ee=b.bottom+E.y,E.y===0&&Me.y>Ze.y+x.rowIndent&&(ee=Math.min(ee,Math.max(Me.y,ee-y.computeNodeIndent(x))))):x.alignment===ku?(ee=b.top+E.y,E.y===0&&Me.y<Ze.y-x.rowIndent&&(ee=Math.max(ee,Math.min(Me.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,Me.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,Me.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===Tu?(ee=b.right+E.x,E.x===0&&Me.x>Ze.x+x.rowIndent&&(ee=Math.min(ee,Math.max(Me.x,ee-y.computeNodeIndent(x))))):x.alignment===ku?(ee=b.left+E.x,E.x===0&&Me.x<Ze.x-x.rowIndent&&(ee=Math.max(ee,Math.min(Me.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,Me.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,Me.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))):Ot("Invalid angle "+ee),a.zf()}else E=b,a=this.link,b=this.network.layout,y=Ll(x),y!==Ll(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===Gs,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()))}}},rn.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",$i.prototype.initializeStandardTools=function(){this.gb("Action",new ll,this.mouseDownTools),this.gb("Relinking",new Bs,this.mouseDownTools),this.gb("LinkReshaping",new ko,this.mouseDownTools),this.gb("Rotating",new Ka,this.mouseDownTools),this.gb("Resizing",new Pa,this.mouseDownTools),this.gb("Linking",new Va,this.mouseMoveTools),this.gb("Dragging",new uo,this.mouseMoveTools),this.gb("DragSelecting",new Vs,this.mouseMoveTools),this.gb("Panning",new va,this.mouseMoveTools),this.gb("ContextMenu",new Za,this.mouseUpTools),this.gb("TextEditing",new eo,this.mouseUpTools),this.gb("ClickCreating",new uh,this.mouseUpTools),this.gb("ClickSelecting",new Uh,this.mouseUpTools)},ru("Horizontal",new dm),ru("Spot",new gm),ru("Table",new vm),ru("Viewbox",new xm),ru("TableRow",new ym),ru("TableColumn",new Sm),ru("Graduated",new Vp),ru("Grid",new Wp),xd.add("GraphLinksModel",qo),xd.add("TreeModel",el);var _v=ln.go,zy={get licenseKey(){return Kt.licenseKey},set licenseKey(a){Kt.licenseKey=a},get version(){return Kt.version},Group:Or,EnumValue:Yt,List:on,Set:un,Map:Vt,Point:st,Size:fn,Rect:Xt,Margin:Wr,Spot:or,Geometry:bn,PathFigure:Oo,PathSegment:vi,InputEvent:ma,DiagramEvent:hu,ChangedEvent:ao,Model:hr,GraphLinksModel:ui,TreeModel:ts,Binding:Mo,Transaction:Uo,UndoManager:ho,CommandHandler:kt,Tool:di,DraggingTool:uo,DraggingInfo:Gu,DraggingOptions:he,LinkingBaseTool:yo,LinkingTool:Va,RelinkingTool:Bs,LinkReshapingTool:ko,ResizingTool:Pa,RotatingTool:Ka,ClickSelectingTool:Uh,ActionTool:ll,ClickCreatingTool:uh,HTMLInfo:$l,ContextMenuTool:Za,DragSelectingTool:Vs,PanningTool:va,TextEditingTool:eo,ToolManager:$i,Animation:ya,AnimationManager:Es,AnimationTrigger:wl,Layer:ra,Diagram:Kt,Palette:Ce,Overview:Oe,Brush:ji,GraphObject:_t,Panel:Sn,RowColumnDefinition:Ro,Shape:Ur,TextBlock:Zi,Picture:us,Part:Sr,Adornment:yi,Node:Wn,Link:En,Placeholder:Qa,Layout:lo,LayoutNetwork:Xi,LayoutVertex:Wo,LayoutEdge:Ms,GridLayout:ha,PanelLayout:Ho,CircularLayout:fo,CircularNetwork:Kd,CircularVertex:Sg,CircularEdge:Sv,ForceDirectedLayout:xa,ForceDirectedNetwork:Gf,ForceDirectedVertex:xg,ForceDirectedEdge:wg,LayeredDigraphLayout:Fi,LayeredDigraphNetwork:Xd,LayeredDigraphVertex:nl,LayeredDigraphEdge:Cg,TreeLayout:Qr,TreeNetwork:Vf,TreeVertex:gl,TreeEdge:Qd};typeof _v=="object"&&_v.version&&Tn("WARNING: a `go` object on the root object is already defined. "+("Debug"in _v?"debug ":"")+"version: "+_v.version+", replaced with version: "+zy.version),Kt.prototype.go=zy,ln.go=zy,typeof Gn.exports=="object"&&(Gn.exports=typeof ft.g!="undefined"?ft.g.go:self.go)}();var at=typeof ft.g!="undefined"?ft.g.go:self.go;const Gt=typeof ft.g!="undefined"?ft.g.go:self.go,oe=Gt.Group,Ue=Gt.EnumValue,Ie=Gt.List,de=Gt.Set,ve=Gt.Map,Ee=Gt.Point,ke=Gt.Size,Se=Gt.Rect,je=Gt.Margin,me=Gt.Spot,Pe=Gt.Geometry,fe=Gt.PathFigure,z=Gt.PathSegment,te=Gt.InputEvent,se=Gt.DiagramEvent,ie=Gt.ChangedEvent,le=Gt.Model,ce=Gt.GraphLinksModel,pe=Gt.TreeModel,xe=Gt.Binding,Ae=Gt.Transaction,De=Gt.UndoManager,Fe=Gt.CommandHandler,Te=Gt.Tool,Ne=Gt.DraggingTool,Be=Gt.DraggingInfo,Ge=Gt.LinkingBaseTool,Ye=Gt.LinkingTool,Ke=Gt.RelinkingTool,Xe=Gt.LinkReshapingTool,ot=Gt.ResizingTool,lt=Gt.RotatingTool,ut=Gt.ClickSelectingTool,Ct=Gt.ActionTool,Je=Gt.ClickCreatingTool,nt=Gt.HTMLInfo,St=Gt.ContextMenuTool,wt=Gt.DragSelectingTool,bt=Gt.PanningTool,ct=Gt.TextEditingTool,vt=Gt.ToolManager,ht=Gt.Animation,Lt=Gt.AnimationManager,dt=Gt.AnimationTrigger,mt=Gt.Layer,Et=Gt.Diagram,gt=Gt.Palette,$e=Gt.Overview,He=Gt.Brush,we=Gt.GraphObject,Le=Gt.Panel,We=Gt.RowColumnDefinition,tt=Gt.Shape,Re=Gt.TextBlock,_e=Gt.TextBlockMetrics,Ve=Gt.Picture,it=Gt.Part,yt=Gt.Adornment,Pt=Gt.Node,jt=Gt.Link,Nt=Gt.Placeholder,Bt=Gt.Layout,$t=Gt.LayoutNetwork,en=Gt.LayoutVertex,qt=Gt.LayoutEdge,Zt=Gt.GridLayout,hn=Gt.PanelLayout,an=Gt.CircularLayout,cn=Gt.CircularNetwork,wn=Gt.CircularVertex,xn=Gt.CircularEdge,Nn=Gt.ForceDirectedLayout,Zn=Gt.ForceDirectedNetwork,Tr=Gt.ForceDirectedVertex,qn=Gt.ForceDirectedEdge,qr=Gt.LayeredDigraphLayout,nr=Gt.LayeredDigraphNetwork,$r=Gt.LayeredDigraphVertex,hi=Gt.LayeredDigraphEdge,Si=Gt.TreeLayout,Li=Gt.TreeNetwork,Ei=Gt.TreeVertex,Lr=Gt.TreeEdge,Ci=Gt.version},2859:function(Gn,jn,ft){"use strict";ft.d(jn,{hP:function(){return $e}});var at=function(He,we){return(at=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Le,We){Le.__proto__=We}||function(Le,We){for(var tt in We)Object.prototype.hasOwnProperty.call(We,tt)&&(Le[tt]=We[tt])})(He,we)};function Gt(He,we){function Le(){this.constructor=He}at(He,we),He.prototype=we===null?Object.create(we):(Le.prototype=we.prototype,new Le)}function oe(He,we,Le,We){return new(Le||(Le=Promise))(function(tt,Re){function _e(yt){try{it(We.next(yt))}catch(Pt){Re(Pt)}}function Ve(yt){try{it(We.throw(yt))}catch(Pt){Re(Pt)}}function it(yt){var Pt;yt.done?tt(yt.value):(Pt=yt.value,Pt instanceof Le?Pt:new Le(function(jt){jt(Pt)})).then(_e,Ve)}it((We=We.apply(He,we||[])).next())})}function Ue(He,we){var Le,We,tt,Re,_e={label:0,sent:function(){if(1&tt[0])throw tt[1];return tt[1]},trys:[],ops:[]};return Re={next:Ve(0),throw:Ve(1),return:Ve(2)},typeof Symbol=="function"&&(Re[Symbol.iterator]=function(){return this}),Re;function Ve(it){return function(yt){return function(Pt){if(Le)throw new TypeError("Generator is already executing.");for(;_e;)try{if(Le=1,We&&(tt=2&Pt[0]?We.return:Pt[0]?We.throw||((tt=We.return)&&tt.call(We),0):We.next)&&!(tt=tt.call(We,Pt[1])).done)return tt;switch(We=0,tt&&(Pt=[2&Pt[0],tt.value]),Pt[0]){case 0:case 1:tt=Pt;break;case 4:return _e.label++,{value:Pt[1],done:!1};case 5:_e.label++,We=Pt[1],Pt=[0];continue;case 7:Pt=_e.ops.pop(),_e.trys.pop();continue;default:if(tt=_e.trys,!((tt=tt.length>0&&tt[tt.length-1])||Pt[0]!==6&&Pt[0]!==2)){_e=0;continue}if(Pt[0]===3&&(!tt||Pt[1]>tt[0]&&Pt[1]<tt[3])){_e.label=Pt[1];break}if(Pt[0]===6&&_e.label<tt[1]){_e.label=tt[1],tt=Pt;break}if(tt&&_e.label<tt[2]){_e.label=tt[2],_e.ops.push(Pt);break}tt[2]&&_e.ops.pop(),_e.trys.pop();continue}Pt=we.call(He,_e)}catch(jt){Pt=[6,jt],We=0}finally{Le=tt=0}if(5&Pt[0])throw Pt[1];return{value:Pt[0]?Pt[1]:void 0,done:!0}}([it,yt])}}}function Ie(){for(var He=0,we=0,Le=arguments.length;we<Le;we++)He+=arguments[we].length;var We=Array(He),tt=0;for(we=0;we<Le;we++)for(var Re=arguments[we],_e=0,Ve=Re.length;_e<Ve;_e++,tt++)We[tt]=Re[_e];return We}var de=function(){function He(){}return He.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},He.setAttributes=function(we,Le){for(var We=0,tt=Le;We<tt.length;We++){var Re=tt[We],_e=Re[0],Ve=Re[1];we.setAttribute(_e,Ve)}},He.createRect=function(we,Le,We){var tt=document.createElementNS("http://www.w3.org/2000/svg","rect");return tt.setAttribute("width",we.toString()),tt.setAttribute("height",Le.toString()),We&&He.setAttributes(tt,We),tt},He.createLine=function(we,Le,We,tt,Re){var _e=document.createElementNS("http://www.w3.org/2000/svg","line");return _e.setAttribute("x1",we.toString()),_e.setAttribute("y1",Le.toString()),_e.setAttribute("x2",We.toString()),_e.setAttribute("y2",tt.toString()),Re&&He.setAttributes(_e,Re),_e},He.createPolygon=function(we,Le){var We=document.createElementNS("http://www.w3.org/2000/svg","polygon");return We.setAttribute("points",we),Le&&He.setAttributes(We,Le),We},He.createCircle=function(we,Le){var We=document.createElementNS("http://www.w3.org/2000/svg","circle");return We.setAttribute("cx",(we/2).toString()),We.setAttribute("cy",(we/2).toString()),We.setAttribute("r",we.toString()),Le&&He.setAttributes(We,Le),We},He.createEllipse=function(we,Le,We){var tt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return tt.setAttribute("cx",(we/2).toString()),tt.setAttribute("cy",(Le/2).toString()),tt.setAttribute("rx",(we/2).toString()),tt.setAttribute("ry",(Le/2).toString()),We&&He.setAttributes(tt,We),tt},He.createGroup=function(we){var Le=document.createElementNS("http://www.w3.org/2000/svg","g");return we&&He.setAttributes(Le,we),Le},He.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},He.createMarker=function(we,Le,We,tt,Re,_e,Ve){var it=document.createElementNS("http://www.w3.org/2000/svg","marker");return He.setAttributes(it,[["id",we],["orient",Le],["markerWidth",We.toString()],["markerHeight",tt.toString()],["refX",Re.toString()],["refY",_e.toString()]]),it.appendChild(Ve),it},He.createText=function(we){var Le=document.createElementNS("http://www.w3.org/2000/svg","text");return Le.setAttribute("x","0"),Le.setAttribute("y","0"),we&&He.setAttributes(Le,we),Le},He.createTSpan=function(we,Le){var We=document.createElementNS("http://www.w3.org/2000/svg","tspan");return We.textContent=we,Le&&He.setAttributes(We,Le),We},He.createImage=function(we){var Le=document.createElementNS("http://www.w3.org/2000/svg","image");return we&&He.setAttributes(Le,we),Le},He.createPoint=function(we,Le){var We=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return We.x=we,We.y=Le,We},He.createPath=function(we,Le){var We=document.createElementNS("http://www.w3.org/2000/svg","path");return We.setAttribute("d",we),Le&&He.setAttributes(We,Le),We},He}(),ve=function(){function He(){}return He.addKey=function(we){He.key=we},Object.defineProperty(He,"isLicensed",{get:function(){return!!He.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(He.key)},enumerable:!1,configurable:!0}),He}(),Ee=function(){function He(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return He.prototype.rasterize=function(we,Le,We){var tt=this;return new Promise(function(Re){var _e=We!==void 0?We:document.createElement("canvas");we===null&&(tt.markersOnly=!0,tt.naturalSize=!1);var Ve=document.createElementNS("http://www.w3.org/2000/svg","svg");Ve.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ve.setAttribute("width",Le.width.baseVal.valueAsString),Ve.setAttribute("height",Le.height.baseVal.valueAsString),Ve.setAttribute("viewBox","0 0 "+Le.viewBox.baseVal.width.toString()+" "+Le.viewBox.baseVal.height.toString()),Ve.innerHTML=Le.innerHTML,tt.naturalSize===!0?(Ve.width.baseVal.value=we.naturalWidth,Ve.height.baseVal.value=we.naturalHeight):tt.width!==void 0&&tt.height!==void 0&&(Ve.width.baseVal.value=tt.width,Ve.height.baseVal.value=tt.height),_e.width=Ve.width.baseVal.value,_e.height=Ve.height.baseVal.value;var it=Ve.outerHTML,yt=_e.getContext("2d");tt.markersOnly!==!0&&yt.drawImage(we,0,0,_e.width,_e.height);var Pt=window.URL,jt=new Image(_e.width,_e.height);jt.setAttribute("crossOrigin","anonymous");var Nt=new Blob([it],{type:"image/svg+xml"}),Bt=Pt.createObjectURL(Nt);jt.onload=function(){yt.drawImage(jt,0,0),Pt.revokeObjectURL(Bt);var $t=_e.toDataURL(tt.imageType,tt.imageQuality);Re($t)},jt.src=Bt})},He}(),ke=function(){},Se=function(){function He(we){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+we+"_"}return Object.defineProperty(He.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(He.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(He.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),He.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},He.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)},He.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 je("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new je("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new je("@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;
`))},He.prototype.removeStyleSheet=function(){var we;this.styleSheet&&(((we=this.styleSheetRoot)!==null&&we!==void 0?we:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},He}(),je=function(He,we){this.selector=He,this.style=we},me=function(He,we){this.localName=He,this.style=we},Pe=function(){function He(we,Le,We,tt,Re){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=we,this.displayMode=Le,this.markerItems=We,this.uiStyleSettings=tt,this.styles=Re,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return He.prototype.show=function(we){var Le=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 We=document.createElement("div");We.className=this.toolbarBlockStyleClass.name,We.style.whiteSpace="nowrap",this.uiContainer.appendChild(We),this.addActionButton(We,'<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(We,'<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(We,'<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(We,'<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(We,'<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(We,'<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(We,'<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(We,'<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(Re){var _e=document.createElement("div");_e.className=""+Le.toolbarButtonStyleClass.name,_e.setAttribute("data-type-name",Re.typeName),_e.innerHTML=Re.icon,_e.addEventListener("click",function(){Le.markerToolbarButtonClicked(_e,Re)}),Le.buttons.push(_e),Le.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 tt=document.createElement("div");tt.className=this.toolbarBlockStyleClass.name,tt.style.whiteSpace="nowrap",tt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(tt),this.addActionButton(tt,'<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(tt,'<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()},He.prototype.addButtonClickListener=function(we){this.buttonClickListeners.push(we)},He.prototype.removeButtonClickListener=function(we){this.buttonClickListeners.indexOf(we)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(we),1)},He.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},He.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 Le=0;Le<this.markerButtons.length;Le++)Le<we||Le===we&&this.markerButtons.length-1===we?this.markerButtonBlock.appendChild(this.markerButtons[Le]):(Le===we&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Le]))}},He.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")},He.prototype.resetButtonStyles=function(){var we=this;this.buttons.forEach(function(Le){Le.className=Le.className.replace(we.uiStyleSettings.toolbarButtonStyleColorsClassName?we.uiStyleSettings.toolbarButtonStyleColorsClassName:we.toolbarButtonStyleColorsClass.name,"").trim(),Le.className=Le.className.replace(we.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?we.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:we.toolbarActiveButtonStyleColorsClass.name,"").trim(),Le.className+=" "+(we.uiStyleSettings.toolbarButtonStyleColorsClassName?we.uiStyleSettings.toolbarButtonStyleColorsClassName:we.toolbarButtonStyleColorsClass.name)})},He.prototype.addActionButton=function(we,Le,We){var tt=this,Re=document.createElement("div");switch(Re.className=""+this.toolbarButtonStyleClass.name,Re.innerHTML=Le,Re.setAttribute("data-action",We),Re.addEventListener("click",function(){tt.actionToolbarButtonClicked(Re,We)}),We){case"select":Re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Re.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Re.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Re.style.fill=this.uiStyleSettings.closeButtonColor}we.appendChild(Re),this.buttons.push(Re)},He.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 je("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new je("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},He.prototype.markerToolbarButtonClicked=function(we,Le){this.setActiveButton(we),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(We){return We("marker",Le)}),this.markerButtonOverflowBlock.style.display="none"},He.prototype.actionToolbarButtonClicked=function(we,Le){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(We){return We("action",Le)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},He.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)},He.prototype.setActiveMarkerButton=function(we){var Le=this.markerButtons.find(function(We){return We.getAttribute("data-type-name")===we});Le&&this.setActiveButton(Le)},He.prototype.setCurrentMarker=function(we){var Le=this;this.currentMarker=we,this.buttons.filter(function(We){return/delete|notes/.test(We.getAttribute("data-action"))}).forEach(function(We){Le.currentMarker===void 0?(We.style.fillOpacity="0.4",We.style.pointerEvents="none"):(We.style.fillOpacity="1",We.style.pointerEvents="all")})},He}(),fe=function(){function He(we,Le,We,tt){this.panels=[],this.panelButtons=[],this.markerjsContainer=we,this.displayMode=Le,this.uiStyleSettings=We,this.styles=tt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return He.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 Le=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*Le)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Le)+`px;
padding: `+Le+`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 je("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new je("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},He.prototype.show=function(we){var Le;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=we,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Le=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Le!==void 0?Le:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},He.prototype.setPanelButtons=function(we){var Le,We,tt=this;this.panels=we,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Le=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Le!==void 0?Le:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((We=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&We!==void 0?We:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Re){var _e;Re.uiStyleSettings=tt.uiStyleSettings;var Ve=document.createElement("div");Ve.className=tt.toolboxButtonStyleClass.name+" "+((_e=tt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_e!==void 0?_e:tt.toolboxButtonStyleColorsClass.name),Ve.innerHTML=Re.icon,Ve.title=Re.title,Ve.addEventListener("click",function(){tt.panelButtonClick(Re)}),tt.panelButtons.push(Ve),tt.buttonRow.appendChild(Ve)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},He.prototype.panelButtonClick=function(we){var Le=this,We=-1;if(we!==this.activePanel){We=this.panels.indexOf(we),this.panelRow.innerHTML="";var tt=we.getUi();tt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(tt),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(){Le.displayMode==="inline"?Le.panelRow.style.display="none":Le.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Re,_e){var Ve,it;Re.className=Le.toolboxButtonStyleClass.name+" "+(_e===We?""+((Ve=Le.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ve!==void 0?Ve:Le.toolboxActiveButtonStyleColorsClass.name):""+((it=Le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&it!==void 0?it:Le.toolboxButtonStyleColorsClass.name))})},He}(),z=function(He,we){this.title=He,this.icon=we},te=function(He){function we(Le,We,tt,Re){var _e=He.call(this,Le,Re||'<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=We,_e.currentColor=tt,_e.setCurrentColor=_e.setCurrentColor.bind(_e),_e.getColorBox=_e.getColorBox.bind(_e),_e}return Gt(we,He),we.prototype.getUi=function(){var Le=this,We=document.createElement("div");return We.style.overflow="hidden",We.style.whiteSpace="nowrap",this.colors.forEach(function(tt){var Re=Le.getColorBox(tt);We.appendChild(Re),Le.colorBoxes.push(Re)}),We},we.prototype.getColorBox=function(Le){var We=this,tt=this.uiStyleSettings.toolbarHeight/4,Re=this.uiStyleSettings.toolbarHeight-tt,_e=document.createElement("div");_e.style.display="inline-block",_e.style.boxSizing="content-box",_e.style.width=Re-2+"px",_e.style.height=Re-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=(Re+2)/2+"px",_e.style.borderColor=Le===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_e.addEventListener("click",function(){We.setCurrentColor(Le,_e)});var Ve=document.createElement("div");return Ve.style.display="inline-block",Ve.style.width=Re-2+"px",Ve.style.height=Re-2+"px",Ve.style.backgroundColor=Le,Ve.style.borderRadius=Re/2+"px",Le==="transparent"&&(Ve.style.fill=this.uiStyleSettings.toolboxAccentColor,Ve.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(Ve),_e},we.prototype.setCurrentColor=function(Le,We){var tt=this;this.currentColor=Le,this.colorBoxes.forEach(function(Re){Re.style.borderColor=Re===We?tt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Le)},we}(z),se=function(){function He(we,Le,We){this._state="new",this._isSelected=!1,this._container=we,this._overlayContainer=Le,this.globalSettings=We,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(He.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),He.prototype.ownsTarget=function(we){return!1},Object.defineProperty(He.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),He.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},He.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},He.prototype.pointerDown=function(we,Le){},He.prototype.dblClick=function(we,Le){},He.prototype.manipulate=function(we){},He.prototype.pointerUp=function(we){this.stateChanged()},He.prototype.dispose=function(){},He.prototype.addMarkerVisualToContainer=function(we){this.container.childNodes.length>0?this.container.insertBefore(we,this.container.childNodes[0]):this.container.appendChild(we)},He.prototype.getState=function(){return{typeName:He.typeName,state:this.state,notes:this.notes}},He.prototype.restoreState=function(we){this._state=we.state,this.notes=we.notes},He.prototype.scale=function(we,Le){},He.prototype.colorChanged=function(we){this.onColorChanged&&this.onColorChanged(we),this.stateChanged()},He.prototype.fillColorChanged=function(we){this.onFillColorChanged&&this.onFillColorChanged(we),this.stateChanged()},He.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)}},He.typeName="MarkerBase",He}(),ie=function(){function He(){this.findGripByVisual=this.findGripByVisual.bind(this)}return He.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},He}(),le=function(){function He(){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 He.prototype.ownsTarget=function(we){return we===this.visual||we===this.visual.childNodes[0]||we===this.visual.childNodes[1]},He}(),ce=function(){function He(){}return He.toITransformMatrix=function(we){return{a:we.a,b:we.b,c:we.c,d:we.d,e:we.e,f:we.f}},He.toSVGMatrix=function(we,Le){return we.a=Le.a,we.b=Le.b,we.c=Le.c,we.d=Le.d,we.e=Le.e,we.f=Le.f,we},He}(),pe=function(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.left=0,Re.top=0,Re.width=0,Re.height=0,Re.defaultSize={x:50,y:20},Re.offsetX=0,Re.offsetY=0,Re.rotationAngle=0,Re.CB_DISTANCE=10,Re._suppressMarkerCreateEvent=!1,Re.container.transform.baseVal.appendItem(de.createTransform()),Re.setupControlBox(),Re}return Gt(we,He),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(Le){this._visual=Le;var We=de.createTransform();this._visual.transform.baseVal.appendItem(We)},enumerable:!1,configurable:!0}),we.prototype.ownsTarget=function(Le){return!!He.prototype.ownsTarget.call(this,Le)||!!(this.controlGrips.findGripByVisual(Le)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Le))},we.prototype.pointerDown=function(Le,We){He.prototype.pointerDown.call(this,Le,We),this.state==="new"&&(this.left=Le.x,this.top=Le.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var tt=this.unrotatePoint(Le);if(this.manipulationStartX=tt.x,this.manipulationStartY=tt.y,this.offsetX=tt.x-this.left,this.offsetY=tt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(We),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(We)){this.activeGrip=this.rotatorGrip;var Re=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Re.x-this.width/2,this.top=Re.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(Le){var We=this.state;He.prototype.pointerUp.call(this,Le),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Le),this._state="select",We==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},we.prototype.moveVisual=function(Le){this.visual.style.transform="translate("+Le.x+"px, "+Le.y+"px)"},we.prototype.manipulate=function(Le){var We=this.unrotatePoint(Le);this.state==="creating"?this.resize(Le):this.state==="move"?(this.left=this.manipulationStartLeft+(We.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(We.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(We):this.state==="rotate"&&this.rotate(Le)},we.prototype.resize=function(Le){var We=this.manipulationStartLeft,tt=this.manipulationStartWidth,Re=this.manipulationStartTop,_e=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:We=this.manipulationStartLeft+Le.x-this.manipulationStartX,tt=this.manipulationStartWidth+this.manipulationStartLeft-We;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:tt=this.manipulationStartWidth+Le.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Re=this.manipulationStartTop+Le.y-this.manipulationStartY,_e=this.manipulationStartHeight+this.manipulationStartTop-Re;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_e=this.manipulationStartHeight+Le.y-this.manipulationStartY}tt>=0?(this.left=We,this.width=tt):(this.left=We+tt,this.width=-tt),_e>=0?(this.top=Re,this.height=_e):(this.top=Re+_e,this.height=-_e),this.setSize()},we.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},we.prototype.rotate=function(Le){if(Math.abs(Le.x-this.centerX)>.1){var We=Math.sign(Le.x-this.centerX);this.rotationAngle=180*Math.atan((Le.y-this.centerY)/(Le.x-this.centerX))/Math.PI+90*We,this.applyRotation()}},we.prototype.applyRotation=function(){var Le=this.container.transform.baseVal.getItem(0);Le.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Le,0)},we.prototype.rotatePoint=function(Le){if(this.rotationAngle===0)return Le;var We=this.container.getCTM(),tt=de.createPoint(Le.x,Le.y);return{x:(tt=tt.matrixTransform(We)).x,y:tt.y}},we.prototype.unrotatePoint=function(Le){if(this.rotationAngle===0)return Le;var We=this.container.getCTM();We=We.inverse();var tt=de.createPoint(Le.x,Le.y);return{x:(tt=tt.matrixTransform(We)).x,y:tt.y}},we.prototype.select=function(){He.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},we.prototype.deselect=function(){He.prototype.deselect.call(this),this.controlBox.style.display="none"},we.prototype.setupControlBox=function(){this.controlBox=de.createGroup();var Le=de.createTransform();Le.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Le),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 Le=this.controlBox.transform.baseVal.getItem(0);Le.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Le,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 Le=new le;return Le.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(Le.visual),Le},we.prototype.positionGrips=function(){var Le=this.controlGrips.topLeft.GRIP_SIZE,We=-Le/2,tt=We,Re=(this.width+this.CB_DISTANCE)/2-Le/2,_e=(this.height+this.CB_DISTANCE)/2-Le/2,Ve=this.height+this.CB_DISTANCE-Le/2,it=this.width+this.CB_DISTANCE-Le/2;this.positionGrip(this.controlGrips.topLeft.visual,We,tt),this.positionGrip(this.controlGrips.topCenter.visual,Re,tt),this.positionGrip(this.controlGrips.topRight.visual,it,tt),this.positionGrip(this.controlGrips.centerLeft.visual,We,_e),this.positionGrip(this.controlGrips.centerRight.visual,it,_e),this.positionGrip(this.controlGrips.bottomLeft.visual,We,Ve),this.positionGrip(this.controlGrips.bottomCenter.visual,Re,Ve),this.positionGrip(this.controlGrips.bottomRight.visual,it,Ve),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Re,tt-3*this.CB_DISTANCE)},we.prototype.positionGrip=function(Le,We,tt){var Re=Le.transform.baseVal.getItem(0);Re.setTranslate(We,tt),Le.transform.baseVal.replaceItem(Re,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)},He.prototype.getState.call(this))},we.prototype.restoreState=function(Le){He.prototype.restoreState.call(this,Le);var We=Le;this.left=We.left,this.top=We.top,this.width=We.width,this.height=We.height,this.rotationAngle=We.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ce.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,We.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ce.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,We.containerTransformMatrix))},we.prototype.scale=function(Le,We){He.prototype.scale.call(this,Le,We);var tt=this.rotatePoint({x:this.left,y:this.top}),Re=this.unrotatePoint({x:tt.x*Le,y:tt.y*We});this.left=Re.x,this.top=Re.y,this.width=this.width*Le,this.height=this.height*We,this.adjustControlBox()},we}(se),xe=function(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.fillColor="transparent",Re.strokeColor="transparent",Re.strokeWidth=0,Re.strokeDasharray="",Re.opacity=1,Re.setStrokeColor=Re.setStrokeColor.bind(Re),Re.setFillColor=Re.setFillColor.bind(Re),Re.setStrokeWidth=Re.setStrokeWidth.bind(Re),Re.setStrokeDasharray=Re.setStrokeDasharray.bind(Re),Re.createVisual=Re.createVisual.bind(Re),Re}return Gt(we,He),we.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==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(Le,We){He.prototype.pointerDown.call(this,Le,We),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},we.prototype.manipulate=function(Le){He.prototype.manipulate.call(this,Le)},we.prototype.resize=function(Le){He.prototype.resize.call(this,Le),this.setSize()},we.prototype.setSize=function(){He.prototype.setSize.call(this),de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},we.prototype.pointerUp=function(Le){He.prototype.pointerUp.call(this,Le),this.setSize()},we.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},we.prototype.setFillColor=function(Le){this.fillColor=Le,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},we.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,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},He.prototype.getState.call(this))},we.prototype.restoreState=function(Le){var We=Le;this.fillColor=We.fillColor,this.strokeColor=We.strokeColor,this.strokeWidth=We.strokeWidth,this.strokeDasharray=We.strokeDasharray,this.opacity=We.opacity,this.createVisual(),He.prototype.restoreState.call(this,Le),this.setSize()},we.prototype.scale=function(Le,We){He.prototype.scale.call(this,Le,We),this.setSize()},we.title="Rectangle marker",we}(pe),Ae=function(He){function we(Le,We,tt,Re){var _e=He.call(this,Le,Re||'<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=We,_e.currentWidth=tt,_e.setCurrentWidth=_e.setCurrentWidth.bind(_e),_e}return Gt(we,He),we.prototype.getUi=function(){var Le=this,We=document.createElement("div");return We.style.display="flex",We.style.overflow="hidden",We.style.flexGrow="2",this.widths.forEach(function(tt){var Re=document.createElement("div");Re.style.display="flex",Re.style.flexGrow="2",Re.style.alignItems="center",Re.style.justifyContent="space-between",Re.style.padding="5px",Re.style.borderWidth="2px",Re.style.borderStyle="solid",Re.style.borderColor=tt===Le.currentWidth?Le.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){Le.setCurrentWidth(tt,Re)}),We.appendChild(Re);var _e=document.createElement("div");_e.innerText=tt.toString(),_e.style.marginRight="5px",Re.appendChild(_e);var Ve=document.createElement("div");Ve.style.minHeight="20px",Ve.style.flexGrow="2",Ve.style.display="flex",Ve.style.alignItems="center";var it=document.createElement("hr");it.style.minWidth="20px",it.style.border="0px",it.style.borderTop=tt+"px solid "+Le.uiStyleSettings.toolboxColor,it.style.flexGrow="2",Ve.appendChild(it),Re.appendChild(Ve),Le.widthBoxes.push(Re)}),We},we.prototype.setCurrentWidth=function(Le,We){var tt=this;this.currentWidth=Le,this.widthBoxes.forEach(function(Re){Re.style.borderColor=Re===We?tt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},we}(z),De=function(He){function we(Le,We,tt,Re){var _e=He.call(this,Le,Re||'<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=We,_e.currentStyle=tt,_e.setCurrentStyle=_e.setCurrentStyle.bind(_e),_e}return Gt(we,He),we.prototype.getUi=function(){var Le=this,We=document.createElement("div");return We.style.display="flex",We.style.overflow="hidden",We.style.flexGrow="2",this.styles.forEach(function(tt){var Re=document.createElement("div");Re.style.display="flex",Re.style.alignItems="center",Re.style.justifyContent="space-between",Re.style.padding="5px",Re.style.borderWidth="2px",Re.style.borderStyle="solid",Re.style.overflow="hidden",Re.style.maxWidth=100/Le.styles.length-5+"%",Re.style.borderColor=tt===Le.currentStyle?Le.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){Le.setCurrentStyle(tt,Re)}),We.appendChild(Re);var _e=document.createElement("div");_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.overflow="hidden";var Ve=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Le.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(tt!==""?'stroke-dasharray="'+tt+'"':"")+` />
</svg>`;_e.innerHTML=Ve,Re.appendChild(_e),Le.styleBoxes.push(Re)}),We},we.prototype.setCurrentStyle=function(Le,We){var tt=this;this.currentStyle=Le,this.styleBoxes.forEach(function(Re){Re.style.borderColor=Re===We?tt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},we}(z),Fe=function(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.strokeColor=tt.defaultColor,Re.strokeWidth=tt.defaultStrokeWidth,Re.strokeDasharray=tt.defaultStrokeDasharray,Re.strokePanel=new te("Line color",tt.defaultColorSet,tt.defaultColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.strokeWidthPanel=new Ae("Line width",tt.defaultStrokeWidths,tt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new De("Line style",tt.defaultStrokeDasharrays,tt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re}return Gt(we,He),Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Le=He.prototype.getState.call(this);return Le.typeName=we.typeName,Le},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"},Ne=function(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.x1=0,Re.y1=0,Re.x2=0,Re.y2=0,Re.defaultLength=50,Re.manipulationStartX=0,Re.manipulationStartY=0,Re.manipulationStartX1=0,Re.manipulationStartY1=0,Re.manipulationStartX2=0,Re.manipulationStartY2=0,Re.setupControlBox(),Re}return Gt(we,He),we.prototype.ownsTarget=function(Le){return!!He.prototype.ownsTarget.call(this,Le)||!(!this.grip1.ownsTarget(Le)&&!this.grip2.ownsTarget(Le))},we.prototype.pointerDown=function(Le,We){He.prototype.pointerDown.call(this,Le,We),this.manipulationStartX=Le.x,this.manipulationStartY=Le.y,this.state==="new"&&(this.x1=Le.x,this.y1=Le.y,this.x2=Le.x,this.y2=Le.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(We)?this.activeGrip=this.grip1:this.grip2.ownsTarget(We)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},we.prototype.pointerUp=function(Le){var We=this.state;He.prototype.pointerUp.call(this,Le),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(Le),this._state="select",We==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},we.prototype.adjustVisual=function(){},we.prototype.manipulate=function(Le){this.state==="creating"?this.resize(Le):this.state==="move"?(this.x1=this.manipulationStartX1+Le.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Le.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Le.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Le.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Le)},we.prototype.resize=function(Le){switch(this.activeGrip){case this.grip1:this.x1=Le.x,this.y1=Le.y;break;case this.grip2:case void 0:this.x2=Le.x,this.y2=Le.y}this.adjustVisual(),this.adjustControlBox()},we.prototype.select=function(){He.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},we.prototype.deselect=function(){He.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 Le=new le;return Le.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(Le.visual),Le},we.prototype.positionGrips=function(){var Le=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Le/2,this.y1-Le/2),this.positionGrip(this.grip2.visual,this.x2-Le/2,this.y2-Le/2)},we.prototype.positionGrip=function(Le,We,tt){var Re=Le.transform.baseVal.getItem(0);Re.setTranslate(We,tt),Le.transform.baseVal.replaceItem(Re,0)},we.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},He.prototype.getState.call(this))},we.prototype.restoreState=function(Le){He.prototype.restoreState.call(this,Le);var We=Le;this.x1=We.x1,this.y1=We.y1,this.x2=We.x2,this.y2=We.y2},we.prototype.scale=function(Le,We){He.prototype.scale.call(this,Le,We),this.x1=this.x1*Le,this.y1=this.y1*We,this.x2=this.x2*Le,this.y2=this.y2*We,this.adjustVisual(),this.adjustControlBox()},we}(se),Be=function(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.strokeColor="transparent",Re.strokeWidth=0,Re.strokeDasharray="",Re.setStrokeColor=Re.setStrokeColor.bind(Re),Re.setStrokeWidth=Re.setStrokeWidth.bind(Re),Re.setStrokeDasharray=Re.setStrokeDasharray.bind(Re),Re.strokeColor=tt.defaultColor,Re.strokeWidth=tt.defaultStrokeWidth,Re.strokeDasharray=tt.defaultStrokeDasharray,Re.strokePanel=new te("Line color",tt.defaultColorSet,tt.defaultColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.strokeWidthPanel=new Ae("Line width",tt.defaultStrokeWidths,tt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new De("Line style",tt.defaultStrokeDasharrays,tt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re}return Gt(we,He),we.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.selectorLine&&Le!==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(Le,We){He.prototype.pointerDown.call(this,Le,We),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(Le){this.strokeColor=Le,this.adjustVisual(),this.colorChanged(Le)},we.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.adjustVisual()},we.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,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 Le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},He.prototype.getState.call(this));return Le.typeName=we.typeName,Le},we.prototype.restoreState=function(Le){He.prototype.restoreState.call(this,Le);var We=Le;this.strokeColor=We.strokeColor,this.strokeWidth=We.strokeWidth,this.strokeDasharray=We.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}(Ne),Ge=function(He){function we(Le,We,tt,Re){var _e=He.call(this,Le,Re||'<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=We,_e.currentFont=tt,_e.setCurrentFont=_e.setCurrentFont.bind(_e),_e}return Gt(we,He),we.prototype.getUi=function(){var Le=this,We=document.createElement("div");return We.style.overflow="hidden",We.style.flexGrow="2",this.fonts.forEach(function(tt){var Re=document.createElement("div");Re.style.display="inline-block",Re.style.alignItems="center",Re.style.justifyContent="space-between",Re.style.padding="5px",Re.style.borderWidth="2px",Re.style.borderStyle="solid",Re.style.overflow="hidden",Re.style.maxWidth=100/Le.fonts.length-5+"%",Re.style.borderColor=tt===Le.currentFont?Le.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){Le.setCurrentFont(tt,Re)}),We.appendChild(Re);var _e=document.createElement("div");_e.style.display="flex",_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.fontFamily=tt,_e.style.overflow="hidden";var Ve=document.createElement("div");Ve.style.whiteSpace="nowrap",Ve.style.overflow="hidden",Ve.style.textOverflow="ellipsis",Ve.innerHTML="The quick brown fox jumps over the lazy dog",_e.appendChild(Ve),Re.appendChild(_e),Le.fontBoxes.push(Re)}),We},we.prototype.setCurrentFont=function(Le,We){var tt=this;this.currentFont=Le,this.fontBoxes.forEach(function(Re){Re.style.borderColor=Re===We?tt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},we}(z),Ye=function(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.color="transparent",Re.padding=5,Re.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Re.text=Re.DEFAULT_TEXT,Re.isMoved=!1,Re.color=tt.defaultColor,Re.fontFamily=tt.defaultFontFamily,Re.defaultSize={x:100,y:30},Re.setColor=Re.setColor.bind(Re),Re.setFont=Re.setFont.bind(Re),Re.renderText=Re.renderText.bind(Re),Re.sizeText=Re.sizeText.bind(Re),Re.textEditDivClicked=Re.textEditDivClicked.bind(Re),Re.showTextEditor=Re.showTextEditor.bind(Re),Re.setSize=Re.setSize.bind(Re),Re.positionTextEditor=Re.positionTextEditor.bind(Re),Re.colorPanel=new te("Color",tt.defaultColorSet,tt.defaultColor),Re.colorPanel.onColorChanged=Re.setColor,Re.fontFamilyPanel=new Ge("Font",tt.defaultFontFamilies,tt.defaultFontFamily),Re.fontFamilyPanel.onFontChanged=Re.setFont,Re}return Gt(we,He),we.prototype.ownsTarget=function(Le){if(He.prototype.ownsTarget.call(this,Le)||Le===this.visual||Le===this.textElement||Le===this.bgRectangle)return!0;var We=!1;return this.textElement.childNodes.forEach(function(tt){tt===Le&&(We=!0)}),We},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(Le,We){He.prototype.pointerDown.call(this,Le,We),this.isMoved=!1,this.pointerDownPoint=Le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},we.prototype.renderText=function(){var Le=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(We){Le.textElement.appendChild(de.createTSpan(We.trim()===""?" ":We.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},we.prototype.getTextScale=function(){var Le=this.textElement.getBBox(),We=1;if(Le.width>0&&Le.height>0){var tt=(1*this.width-this.width*this.padding*2/100)/Le.width,Re=(1*this.height-this.height*this.padding*2/100)/Le.height;We=Math.min(tt,Re)}return We},we.prototype.getTextPosition=function(Le){var We=this.textElement.getBBox(),tt=0,Re=0;return We.width>0&&We.height>0&&(tt=(this.width-We.width*Le)/2,Re=this.height/2-We.height*Le/2),{x:tt,y:Re}},we.prototype.sizeText=function(){var Le=this.textElement.getBBox(),We=this.getTextScale(),tt=this.getTextPosition(We);tt.y-=Le.y*We,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+tt.x+"px, "+tt.y+"px) scale("+We+", "+We+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(tt.x,tt.y),this.textElement.transform.baseVal.getItem(1).setScale(We,We))},we.prototype.manipulate=function(Le){He.prototype.manipulate.call(this,Le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Le.x-this.pointerDownPoint.x)>5||Math.abs(Le.y-this.pointerDownPoint.y)>5)},we.prototype.resize=function(Le){He.prototype.resize.call(this,Le),this.isMoved=!0,this.setSize(),this.sizeText()},we.prototype.setSize=function(){He.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(Le){var We=this.state;We==="creating"&&(this._suppressMarkerCreateEvent=!0),He.prototype.pointerUp.call(this,Le),this.setSize(),(We==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},we.prototype.showTextEditor=function(){var Le=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(We){We.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var We=Number.parseFloat(Le.textEditor.style.fontSize);Le.textEditor.clientWidth>=Number.parseInt(Le.textEditor.style.maxWidth)&&We>.9;)We-=.1,Le.textEditor.style.fontSize=Math.max(We,.9)+"em"}),this.textEditor.addEventListener("keyup",function(We){We.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(We){if(We.clipboardData){var tt=We.clipboardData.getData("text"),Re=window.getSelection();if(!Re.rangeCount)return!1;Re.deleteFromDocument(),Re.getRangeAt(0).insertNode(document.createTextNode(tt)),We.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Le.textEditDivClicked(Le.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 Le=this.getTextScale(),We=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),tt=this.textElement.getBBox(),Re={x:tt.width*Le,y:tt.height*Le};We.x-=Re.x/2,We.y-=Re.y/2,this.textEditor.style.top=We.y+"px",this.textEditor.style.left=We.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-We.x+"px",this.textEditor.style.fontSize=Math.max(16*Le,12)+"px",this.textElement.style.display="none"}},we.prototype.textEditDivClicked=function(Le){this.text=Le.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},we.prototype.select=function(){He.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},we.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),He.prototype.deselect.call(this)},we.prototype.dblClick=function(Le,We){He.prototype.dblClick.call(this,Le,We),this.showTextEditor()},we.prototype.setColor=function(Le){this.textElement&&de.setAttributes(this.textElement,[["fill",Le]]),this.color=Le,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Le)},we.prototype.setFont=function(Le){this.textElement&&de.setAttributes(this.textElement,[["font-family",Le]]),this.fontFamily=Le,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 Le=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},He.prototype.getState.call(this));return Le.typeName=we.typeName,Le},we.prototype.restoreState=function(Le){var We=Le;this.color=We.color,this.fontFamily=We.fontFamily,this.padding=We.padding,this.text=We.text,this.createVisual(),He.prototype.restoreState.call(this,Le),this.setSize()},we.prototype.scale=function(Le,We){He.prototype.scale.call(this,Le,We),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),Ke=function(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.color="transparent",Re.lineWidth=3,Re.drawing=!1,Re.pixelRatio=1,Re.color=tt.defaultColor,Re.lineWidth=tt.defaultStrokeWidth,Re.pixelRatio=tt.freehandPixelRatio,Re.setColor=Re.setColor.bind(Re),Re.addCanvas=Re.addCanvas.bind(Re),Re.finishCreation=Re.finishCreation.bind(Re),Re.setLineWidth=Re.setLineWidth.bind(Re),Re.colorPanel=new te("Color",tt.defaultColorSet,tt.defaultColor),Re.colorPanel.onColorChanged=Re.setColor,Re.lineWidthPanel=new Ae("Line width",tt.defaultStrokeWidths,tt.defaultStrokeWidth),Re.lineWidthPanel.onWidthChanged=Re.setLineWidth,Re}return Gt(we,He),we.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.drawingImage)},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.drawingImage=de.createImage(),this.visual.appendChild(this.drawingImage);var Le=de.createTransform();this.visual.transform.baseVal.appendItem(Le),this.addMarkerVisualToContainer(this.visual)},we.prototype.pointerDown=function(Le,We){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(Le.x,Le.y),this.drawing=!0):He.prototype.pointerDown.call(this,Le,We)},we.prototype.manipulate=function(Le){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Le.x,Le.y),this.canvasContext.stroke()):He.prototype.manipulate.call(this,Le)},we.prototype.resize=function(Le){He.prototype.resize.call(this,Le),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(Le){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):He.prototype.pointerUp.call(this,Le)},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(),He.prototype.select.call(this)},we.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),He.prototype.deselect.call(this)},we.prototype.finishCreation=function(){for(var Le=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),We=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],tt=We[0],Re=We[1],_e=We[2],Ve=We[3],it=!1,yt=0;yt<this.canvasElement.height;yt++)for(var Pt=0;Pt<this.canvasElement.width;Pt++)Le.data[yt*this.canvasElement.width*4+4*Pt+3]>0&&(it=!0,yt<Re&&(Re=yt),Pt<tt&&(tt=Pt),yt>Ve&&(Ve=yt),Pt>_e&&(_e=Pt));if(it){this.left=tt/this.pixelRatio,this.top=Re/this.pixelRatio,this.width=(_e-tt)/this.pixelRatio,this.height=(Ve-Re)/this.pixelRatio;var jt=document.createElement("canvas");jt.width=_e-tt,jt.height=Ve-Re,jt.getContext("2d").putImageData(this.canvasContext.getImageData(tt,Re,_e-tt,Ve-Re),0,0),this.drawingImgUrl=jt.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(Le){this.color=Le,this.colorChanged(Le)},we.prototype.setLineWidth=function(Le){this.lineWidth=Le},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 Le=Object.assign({drawingImgUrl:this.drawingImgUrl},He.prototype.getState.call(this));return Le.typeName=we.typeName,Le},we.prototype.restoreState=function(Le){this.createVisual(),He.prototype.restoreState.call(this,Le),this.drawingImgUrl=Le.drawingImgUrl,this.setDrawingImage()},we.prototype.scale=function(Le,We){He.prototype.scale.call(this,Le,We),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),Xe=function(He){function we(Le,We,tt){var Re=He.call(this,Le,tt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Re.typeBoxes=[],Re.currentType=We,Re.setCurrentType=Re.setCurrentType.bind(Re),Re}return Gt(we,He),we.prototype.getUi=function(){var Le=this,We=document.createElement("div");We.style.display="flex",We.style.overflow="hidden",We.style.flexGrow="2";for(var tt=function(Ve){var it="both";switch(Ve){case 0:it="both";break;case 1:it="start";break;case 2:it="end";break;case 3:it="none"}var yt=document.createElement("div");if(yt.style.display="flex",yt.style.flexGrow="2",yt.style.alignItems="center",yt.style.justifyContent="space-between",yt.style.padding="5px",yt.style.borderWidth="2px",yt.style.borderStyle="solid",yt.style.borderColor=it===Re.currentType?Re.uiStyleSettings.toolboxAccentColor:"transparent",yt.addEventListener("click",function(){Le.setCurrentType(it,yt)}),We.appendChild(yt),it==="both"||it==="start"){var Pt=document.createElement("div");Pt.style.display="flex",Pt.style.alignItems="center",Pt.style.minHeight="20px",Pt.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="`+(Re.uiStyleSettings!==void 0?Re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Pt.style.marginLeft="5px",yt.appendChild(Pt)}var jt=document.createElement("div");jt.style.display="flex",jt.style.alignItems="center",jt.style.minHeight="20px",jt.style.flexGrow="2";var Nt=document.createElement("hr");if(Nt.style.minWidth="20px",Nt.style.border="0px",Nt.style.borderTop="3px solid "+(Re.uiStyleSettings!==void 0?Re.uiStyleSettings.toolboxColor:"#eeeeee"),Nt.style.flexGrow="2",jt.appendChild(Nt),yt.appendChild(jt),it==="both"||it==="end"){var Bt=document.createElement("div");Bt.style.display="flex",Bt.style.alignItems="center",Bt.style.minHeight="20px",Bt.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="`+(Re.uiStyleSettings!==void 0?Re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Bt.style.marginRight="5px",yt.appendChild(Bt)}Re.typeBoxes.push(yt)},Re=this,_e=0;_e<4;_e++)tt(_e);return We},we.prototype.setCurrentType=function(Le,We){var tt=this;this.currentType=Le,this.typeBoxes.forEach(function(Re){Re.style.borderColor=Re===We?tt.uiStyleSettings!==void 0?tt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},we}(z),ot=function(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.arrowType="end",Re.arrowBaseHeight=10,Re.arrowBaseWidth=10,Re.getArrowPoints=Re.getArrowPoints.bind(Re),Re.setArrowType=Re.setArrowType.bind(Re),Re.arrowTypePanel=new Xe("Arrow type","end"),Re.arrowTypePanel.onArrowTypeChanged=Re.setArrowType,Re}return Gt(we,He),we.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.arrow1&&Le!==this.arrow2)},we.prototype.getArrowPoints=function(Le,We){var tt=this.arrowBaseWidth+2*this.strokeWidth,Re=this.arrowBaseHeight+2*this.strokeWidth;return Le-tt/2+","+(We+Re/2)+" "+Le+","+(We-Re/2)+" "+(Le+tt/2)+","+(We+Re/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(Le,We){He.prototype.pointerDown.call(this,Le,We),this.state==="creating"&&this.createTips()},we.prototype.adjustVisual=function(){if(He.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 Le=0;Math.abs(this.x1-this.x2)>.1&&(Le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var We=this.arrow1.transform.baseVal.getItem(0);We.setRotate(Le,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(We,0);var tt=this.arrow2.transform.baseVal.getItem(0);tt.setRotate(Le+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(tt,0)}},we.prototype.setArrowType=function(Le){this.arrowType=Le,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 Le=Object.assign({arrowType:this.arrowType},He.prototype.getState.call(this));return Le.typeName=we.typeName,Le},we.prototype.restoreState=function(Le){He.prototype.restoreState.call(this,Le);var We=Le;this.arrowType=We.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(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.fillColor=tt.defaultFillColor,Re.strokeWidth=0,Re.fillPanel=new te("Color",tt.defaultColorSet,tt.defaultFillColor),Re.fillPanel.onColorChanged=Re.setFillColor,Re}return Gt(we,He),Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Le=He.prototype.getState.call(this);return Le.typeName=we.typeName,Le},we.typeName="CoverMarker",we.title="Cover marker",we.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',we}(xe),ut=function(He){function we(Le,We,tt,Re){var _e=He.call(this,Le,Re||'<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=We,_e.currentOpacity=tt,_e.setCurrentOpacity=_e.setCurrentOpacity.bind(_e),_e}return Gt(we,He),we.prototype.getUi=function(){var Le=this,We=document.createElement("div");return We.style.display="flex",We.style.overflow="hidden",We.style.flexGrow="2",We.style.justifyContent="space-between",this.opacities.forEach(function(tt){var Re=document.createElement("div");Re.style.display="flex",Re.style.alignItems="center",Re.style.justifyContent="center",Re.style.padding="5px",Re.style.borderWidth="2px",Re.style.borderStyle="solid",Re.style.borderColor=tt===Le.currentOpacity?Le.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){Le.setCurrentOpacity(tt,Re)}),We.appendChild(Re);var _e=document.createElement("div");_e.innerText=100*tt+"%",Re.appendChild(_e),Le.opacityBoxes.push(Re)}),We},we.prototype.setCurrentOpacity=function(Le,We){var tt=this;this.currentOpacity=Le,this.opacityBoxes.forEach(function(Re){Re.style.borderColor=Re===We?tt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},we}(z),Ct=function(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.setOpacity=Re.setOpacity.bind(Re),Re.fillColor=tt.defaultHighlightColor,Re.strokeWidth=0,Re.opacity=tt.defaultHighlightOpacity,Re.fillPanel=new te("Color",tt.defaultColorSet,Re.fillColor),Re.fillPanel.onColorChanged=Re.setFillColor,Re.opacityPanel=new ut("Opacity",tt.defaultOpacitySteps,Re.opacity),Re.opacityPanel.onOpacityChanged=Re.setOpacity,Re}return Gt(we,He),we.prototype.setOpacity=function(Le){this.opacity=Le,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 Le=He.prototype.getState.call(this);return Le.typeName=we.typeName,Le},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),Je='<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>',nt='<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>',St=function(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.bgColor="transparent",Re.tipPosition={x:0,y:0},Re.tipBase1Position={x:0,y:0},Re.tipBase2Position={x:0,y:0},Re.tipMoving=!1,Re.color=tt.defaultStrokeColor,Re.bgColor=tt.defaultFillColor,Re.fontFamily=tt.defaultFontFamily,Re.defaultSize={x:100,y:30},Re.setBgColor=Re.setBgColor.bind(Re),Re.getTipPoints=Re.getTipPoints.bind(Re),Re.positionTip=Re.positionTip.bind(Re),Re.setTipPoints=Re.setTipPoints.bind(Re),Re.colorPanel=new te("Text color",tt.defaultColorSet,Re.color,Je),Re.colorPanel.onColorChanged=Re.setColor,Re.bgColorPanel=new te("Fill color",tt.defaultColorSet,Re.bgColor,nt),Re.bgColorPanel.onColorChanged=Re.setBgColor,Re.fontFamilyPanel=new Ge("Font",tt.defaultFontFamilies,tt.defaultFontFamily),Re.fontFamilyPanel.onFontChanged=Re.setFont,Re.tipGrip=new le,Re.tipGrip.visual.transform.baseVal.appendItem(de.createTransform()),Re.controlBox.appendChild(Re.tipGrip.visual),Re}return Gt(we,He),we.prototype.ownsTarget=function(Le){return He.prototype.ownsTarget.call(this,Le)||this.tipGrip.ownsTarget(Le)||this.tip===Le},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(Le,We){this.state==="new"&&He.prototype.pointerDown.call(this,Le,We),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(We)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):He.prototype.pointerDown.call(this,Le,We)},we.prototype.pointerUp=function(Le){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,He.prototype.pointerUp.call(this,Le);else{var We=this.state==="creating";He.prototype.pointerUp.call(this,Le),this.setTipPoints(We),this.positionTip()}},we.prototype.manipulate=function(Le){if(this.tipMoving){var We=this.unrotatePoint(Le);this.tipPosition={x:We.x-this.manipulationStartLeft,y:We.y-this.manipulationStartTop},this.positionTip()}else He.prototype.manipulate.call(this,Le)},we.prototype.setBgColor=function(Le){this.bgRectangle&&this.tip&&(de.setAttributes(this.bgRectangle,[["fill",Le]]),de.setAttributes(this.tip,[["fill",Le]])),this.bgColor=Le,this.fillColorChanged(Le)},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(Le){Le===void 0&&(Le=!1);var We=Math.min(this.height/2,15),tt=this.height/5;Le&&(this.tipPosition={x:We+tt/2,y:this.height+20});var Re=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Re<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(tt=this.width/5,We=Math.min(this.width/2,15),this.tipBase1Position={x:We,y:0},this.tipBase2Position={x:We+tt,y:0}):(this.tipBase1Position={x:0,y:We},this.tipBase2Position={x:0,y:We+tt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Re<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(tt=this.width/5,We=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-We-tt,y:0},this.tipBase2Position={x:this.width-We,y:0}):(this.tipBase1Position={x:this.width,y:We},this.tipBase2Position={x:this.width,y:We+tt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Re<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(tt=this.width/5,We=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-We-tt,y:this.height},this.tipBase2Position={x:this.width-We,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-We-tt},this.tipBase2Position={x:this.width,y:this.height-We}):Re<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(tt=this.width/5,We=Math.min(this.width/2,15),this.tipBase1Position={x:We,y:this.height},this.tipBase2Position={x:We+tt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-We},this.tipBase2Position={x:0,y:this.height-We-tt})},we.prototype.resize=function(Le){He.prototype.resize.call(this,Le),this.positionTip()},we.prototype.positionTip=function(){de.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Le=this.tipGrip.visual.transform.baseVal.getItem(0);Le.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Le,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(),He.prototype.select.call(this)},we.prototype.getState=function(){var Le=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},He.prototype.getState.call(this));return Le.typeName=we.typeName,Le},we.prototype.restoreState=function(Le){var We=Le;this.bgColor=We.bgColor,this.tipPosition=We.tipPosition,He.prototype.restoreState.call(this,Le),this.createTip(),this.setTipPoints()},we.prototype.scale=function(Le,We){He.prototype.scale.call(this,Le,We),this.tipPosition={x:this.tipPosition.x*Le,y:this.tipPosition.y*We},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),wt=function(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.fillColor="transparent",Re.strokeColor="transparent",Re.strokeWidth=0,Re.strokeDasharray="",Re.opacity=1,Re.strokeColor=tt.defaultColor,Re.strokeWidth=tt.defaultStrokeWidth,Re.strokeDasharray=tt.defaultStrokeDasharray,Re.fillColor=tt.defaultFillColor,Re.setStrokeColor=Re.setStrokeColor.bind(Re),Re.setFillColor=Re.setFillColor.bind(Re),Re.setStrokeWidth=Re.setStrokeWidth.bind(Re),Re.setStrokeDasharray=Re.setStrokeDasharray.bind(Re),Re.setOpacity=Re.setOpacity.bind(Re),Re.createVisual=Re.createVisual.bind(Re),Re.strokePanel=new te("Line color",Ie(tt.defaultColorSet,["transparent"]),tt.defaultColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.fillPanel=new te("Fill color",Ie(tt.defaultColorSet,["transparent"]),Re.fillColor,nt),Re.fillPanel.onColorChanged=Re.setFillColor,Re.strokeWidthPanel=new Ae("Line width",tt.defaultStrokeWidths,tt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new De("Line style",tt.defaultStrokeDasharrays,tt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re.opacityPanel=new ut("Opacity",tt.defaultOpacitySteps,Re.opacity),Re.opacityPanel.onOpacityChanged=Re.setOpacity,Re}return Gt(we,He),we.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==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(Le,We){He.prototype.pointerDown.call(this,Le,We),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},we.prototype.manipulate=function(Le){He.prototype.manipulate.call(this,Le)},we.prototype.resize=function(Le){He.prototype.resize.call(this,Le),this.setSize()},we.prototype.setSize=function(){He.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(Le){He.prototype.pointerUp.call(this,Le),this.setSize()},we.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},we.prototype.setFillColor=function(Le){this.fillColor=Le,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Le),this.stateChanged()},we.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.visual&&de.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},we.prototype.setOpacity=function(Le){this.opacity=Le,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 Le=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},He.prototype.getState.call(this));return Le.typeName=we.typeName,Le},we.prototype.restoreState=function(Le){var We=Le;this.fillColor=We.fillColor,this.strokeColor=We.strokeColor,this.strokeWidth=We.strokeWidth,this.strokeDasharray=We.strokeDasharray,this.opacity=We.opacity,this.createVisual(),He.prototype.restoreState.call(this,Le),this.setSize()},we.prototype.scale=function(Le,We){He.prototype.scale.call(this,Le,We),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(He){function we(Le,We,tt){return He.call(this,Le,We,tt)||this}return Gt(we,He),Object.defineProperty(we.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),we.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.tip1&&Le!==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(Le,We){He.prototype.pointerDown.call(this,Le,We),this.state==="creating"&&this.createTips()},we.prototype.adjustVisual=function(){if(He.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 Le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),We=this.tip1.transform.baseVal.getItem(0);We.setRotate(Le,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(We,0);var tt=this.tip2.transform.baseVal.getItem(0);tt.setRotate(Le+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(tt,0)}},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Le=He.prototype.getState.call(this);return Le.typeName=we.typeName,Le},we.prototype.restoreState=function(Le){He.prototype.restoreState.call(this,Le),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(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.strokePanel.colors=tt.defaultColorSet,Re.fillColor="transparent",Re}return Gt(we,He),Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Le=He.prototype.getState.call(this);return Le.typeName=we.typeName,Le},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}(wt),vt=function(){function He(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(He.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),He.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))},He.prototype.replaceLastUndoStep=function(we){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=we)},He.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},He.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}},He.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},He}(),ht=function(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.strokeColor="transparent",Re.strokeWidth=0,Re.strokeDasharray="",Re.curveX=0,Re.curveY=0,Re.manipulationStartCurveX=0,Re.manipulationStartCurveY=0,Re.setStrokeColor=Re.setStrokeColor.bind(Re),Re.setStrokeWidth=Re.setStrokeWidth.bind(Re),Re.setStrokeDasharray=Re.setStrokeDasharray.bind(Re),Re.positionGrips=Re.positionGrips.bind(Re),Re.addControlGrips=Re.addControlGrips.bind(Re),Re.adjustVisual=Re.adjustVisual.bind(Re),Re.setupControlBox=Re.setupControlBox.bind(Re),Re.resize=Re.resize.bind(Re),Re.strokeColor=tt.defaultColor,Re.strokeWidth=tt.defaultStrokeWidth,Re.strokeDasharray=tt.defaultStrokeDasharray,Re.strokePanel=new te("Line color",tt.defaultColorSet,tt.defaultColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.strokeWidthPanel=new Ae("Line width",tt.defaultStrokeWidths,tt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new De("Line style",tt.defaultStrokeDasharrays,tt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re}return Gt(we,He),we.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.selectorCurve&&Le!==this.visibleCurve&&!this.curveGrip.ownsTarget(Le))},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(Le,We){He.prototype.pointerDown.call(this,Le,We),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Le.x,this.curveY=Le.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(We)&&(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(){He.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,He.prototype.addControlGrips.call(this)},we.prototype.positionGrips=function(){He.prototype.positionGrips.call(this);var Le=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Le/2,this.curveY-Le/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(Le){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Le.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Le.y-this.manipulationStartY),He.prototype.manipulate.call(this,Le)},we.prototype.resize=function(Le){this.activeGrip===this.curveGrip&&(this.curveX=Le.x,this.curveY=Le.y),He.prototype.resize.call(this,Le),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(Le){this.strokeColor=Le,this.adjustVisual(),this.colorChanged(Le)},we.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.adjustVisual()},we.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.adjustVisual()},we.prototype.scale=function(Le,We){this.curveX=this.curveX*Le,this.curveY=this.curveY*We,He.prototype.scale.call(this,Le,We)},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},He.prototype.getState.call(this));return Le.typeName=we.typeName,Le},we.prototype.restoreState=function(Le){He.prototype.restoreState.call(this,Le);var We=Le;this.strokeColor=We.strokeColor,this.strokeWidth=We.strokeWidth,this.strokeDasharray=We.strokeDasharray,this.curveX=We.curveX,this.curveY=We.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}(Ne),Lt=function(He){function we(Le,We,tt){var Re=He.call(this,Le,We,tt)||this;return Re.fillColor="transparent",Re.strokeColor="transparent",Re.strokeWidth=0,Re.strokeDasharray="",Re.textColor="transparent",Re.fontSize="1rem",Re.isMoved=!1,Re.captionText="Caption",Re.PADDING=5,Re.captionBoxWidth=0,Re.captionBoxHeight=0,Re.strokeColor=tt.defaultColor,Re.strokeWidth=tt.defaultStrokeWidth,Re.strokeDasharray=tt.defaultStrokeDasharray,Re.fillColor=tt.defaultFillColor,Re.textColor=tt.defaultStrokeColor,Re.fontFamily=tt.defaultFontFamily,Re.fontSize=tt.defaultCaptionFontSize,Re.captionText=tt.defaultCaptionText,Re.setStrokeColor=Re.setStrokeColor.bind(Re),Re.setFillColor=Re.setFillColor.bind(Re),Re.setStrokeWidth=Re.setStrokeWidth.bind(Re),Re.setStrokeDasharray=Re.setStrokeDasharray.bind(Re),Re.createVisual=Re.createVisual.bind(Re),Re.sizeCaption=Re.sizeCaption.bind(Re),Re.setCaptionText=Re.setCaptionText.bind(Re),Re.showTextEditor=Re.showTextEditor.bind(Re),Re.positionTextEditor=Re.positionTextEditor.bind(Re),Re.finishTextEditing=Re.finishTextEditing.bind(Re),Re.setFont=Re.setFont.bind(Re),Re.setTextColor=Re.setTextColor.bind(Re),Re.strokePanel=new te("Line color",Ie(tt.defaultColorSet,["transparent"]),Re.strokeColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.fillPanel=new te("Fill color",Ie(tt.defaultColorSet,["transparent"]),Re.fillColor,nt),Re.fillPanel.onColorChanged=Re.setFillColor,Re.strokeWidthPanel=new Ae("Line width",tt.defaultStrokeWidths,tt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new De("Line style",tt.defaultStrokeDasharrays,tt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re.fontFamilyPanel=new Ge("Font",tt.defaultFontFamilies,tt.defaultFontFamily),Re.fontFamilyPanel.onFontChanged=Re.setFont,Re.textColorPanel=new te("Text color",tt.defaultColorSet,Re.textColor,Je),Re.textColorPanel.onColorChanged=Re.setTextColor,Re}return Gt(we,He),we.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.frame&&Le!==this.captionBg&&Le!==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(Le){this.captionText=Le,this.captionElement.textContent=this.captionText,this.sizeCaption()},we.prototype.pointerDown=function(Le,We){He.prototype.pointerDown.call(this,Le,We),this.isMoved=!1,this.pointerDownPoint=Le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},we.prototype.manipulate=function(Le){He.prototype.manipulate.call(this,Le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Le.x-this.pointerDownPoint.x)>5||Math.abs(Le.y-this.pointerDownPoint.y)>5)},we.prototype.resize=function(Le){He.prototype.resize.call(this,Le),this.setSize()},we.prototype.sizeCaption=function(){var Le=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Le.width+2*this.PADDING,this.captionBoxHeight=Le.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 Le=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(We){We.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(We){We.key==="Enter"&&Le.finishTextEditing(Le.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(We){We.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Le.finishTextEditing(Le.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Le.finishTextEditing(Le.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(Le){this.setCaptionText(Le.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},we.prototype.setFont=function(Le){this.captionElement&&de.setAttributes(this.captionElement,[["font-family",Le]]),this.fontFamily=Le,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},we.prototype.setTextColor=function(Le){this.captionElement&&de.setAttributes(this.captionElement,[["fill",Le]]),this.textColor=Le,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},we.prototype.setSize=function(){He.prototype.setSize.call(this),de.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},we.prototype.pointerUp=function(Le){He.prototype.pointerUp.call(this,Le),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},we.prototype.dblClick=function(Le,We){He.prototype.dblClick.call(this,Le,We),this.showTextEditor()},we.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.frame&&de.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},we.prototype.setFillColor=function(Le){this.fillColor=Le,this.captionBg&&de.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Le),this.stateChanged()},we.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.frame&&de.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,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 Le=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},He.prototype.getState.call(this));return Le.typeName=this.typeName,Le},we.prototype.restoreState=function(Le){var We=Le;this.fillColor=We.fillColor,this.strokeColor=We.strokeColor,this.strokeWidth=We.strokeWidth,this.strokeDasharray=We.strokeDasharray,this.textColor=We.textColor,this.fontFamily=We.fontFamily,this.captionText=We.captionText,this.fontSize=We.fontSize,this.createVisual(),He.prototype.restoreState.call(this,Le),this.setSize()},we.prototype.scale=function(Le,We){He.prototype.scale.call(this,Le,We),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),dt=function(){function He(we,Le){Le===void 0&&(Le=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=we,this.cancelable=Le}return Object.defineProperty(He.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),He.prototype.preventDefault=function(){this._defaultPrevented=!0},He}(),mt=function(He){function we(Le,We,tt){var Re=He.call(this,Le,!1)||this;return Re.dataUrl=We,Re.state=tt,Re}return Gt(we,He),we}(dt),Et=function(He){function we(Le,We,tt){tt===void 0&&(tt=!1);var Re=He.call(this,Le,tt)||this;return Re.marker=We,Re}return Gt(we,He),we}(dt),gt=function(){function He(){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 He.prototype.addEventListener=function(we,Le){this[we].push(Le)},He.prototype.removeEventListener=function(we,Le){var We=this[we].indexOf(Le);We>-1&&this[we].splice(We,1)},He}(),$e=function(){function He(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 vt,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 gt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=He.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(He.prototype,"ALL_MARKER_TYPES",{get:function(){return[Fe,Ke,ot,Ye,ct,wt,Ct,St,bt,lt,Be,ht,Lt]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Fe,Ke,ot,Ye,wt,Ct,St]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Fe,Ke,ot,Ye,Ct]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(we){var Le=this;this._availableMarkerTypes.splice(0),we.forEach(function(We){if(typeof We=="string"){var tt=Le.ALL_MARKER_TYPES.find(function(Re){return Re.typeName===We});tt!==void 0&&Le._availableMarkerTypes.push(tt)}else Le._availableMarkerTypes.push(We)})},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(He.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(He.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),He.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},He.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(Le){return Le(new dt(we))})},He.prototype.render=function(){return oe(this,void 0,void 0,function(){var we;return Ue(this,function(Le){switch(Le.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 Le.sent(),[4,we.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Le.sent()]}})})},He.prototype.close=function(we){var Le=this;if(we===void 0&&(we=!1),this.isOpen){var We=!1;we||this.eventListeners.beforeclose.forEach(function(tt){var Re=new dt(Le,!0);tt(Re),Re.defaultPrevented&&(We=!0)}),We||(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(tt){return tt(new dt(Le))}),this.detachEvents(),this._isOpen=!1)}},He.prototype.addMarkersToToolbar=function(){for(var we,Le=[],We=0;We<arguments.length;We++)Le[We]=arguments[We];(we=this._availableMarkerTypes).push.apply(we,Le)},He.prototype.addRenderEventListener=function(we){this.addEventListener("render",function(Le){we(Le.dataUrl,Le.state)})},He.prototype.removeRenderEventListener=function(we){},He.prototype.addCloseEventListener=function(we){this.addEventListener("close",function(){we()})},He.prototype.removeCloseEventListener=function(we){},He.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))},He.prototype.onPopupTargetResize=function(){var we=1*this.target.clientWidth/this.target.clientHeight,Le=this.editorCanvas.clientWidth/we>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*we:this.editorCanvas.clientWidth,We=Le<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/we;this.resize(Le,We)},He.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},He.prototype.resize=function(we,Le){this._isResizing=!0;var We=we/this.imageWidth,tt=Le/this.imageHeight;this.imageWidth=Math.round(we),this.imageHeight=Math.round(Le),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(We,tt),this._isResizing=!1},He.prototype.scaleMarkers=function(we,Le){var We,tt=this;this._currentMarker&&this._currentMarker instanceof Ye?this._currentMarker.scale(we,Le):(We=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Re){Re!==tt._currentMarker&&Re.scale(we,Le)}),We!==void 0&&this.setCurrentMarker(We)},He.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"},He.prototype.setTopLeft=function(){var we=this.editingTarget.getBoundingClientRect(),Le=this.editorCanvas.getBoundingClientRect();this.left=we.left-Le.left,this.top=we.top-Le.top},He.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)},He.prototype.addDefs=function(){for(var we,Le=[],We=0;We<arguments.length;We++)Le[We]=arguments[We];this.defs=de.createDefs(),this.addDefsToImage(),(we=this.defs).append.apply(we,Le)},He.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},He.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)},He.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},He.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},He.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)},He.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},He.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)},He.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()},He.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")},He.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"},He.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},He.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")},He.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},He.prototype.removeMarker=function(we){this.markerImage.removeChild(we.container),this.markers.indexOf(we)>-1&&this.markers.splice(this.markers.indexOf(we),1),we.dispose()},He.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())},He.prototype.toolbarButtonClicked=function(we,Le){if(we==="marker"&&Le!==void 0)this.createNewMarker(Le);else if(we==="action")switch(Le){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()}},He.prototype.deleteSelectedMarker=function(){var we=this;if(this._currentMarker!==void 0){var Le=!1;if(this.eventListeners.markerbeforedelete.forEach(function(tt){var Re=new Et(we,we._currentMarker,!0);tt(Re),Re.defaultPrevented&&(Le=!0)}),!Le){var We=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(tt){return tt(new Et(we,We))})}}},He.prototype.clear=function(){var we=this,Le=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_e){var Ve=new Et(we,void 0,!0);_e(Ve),Ve.defaultPrevented&&(Le=!0)}),!Le)){this.setCurrentMarker();for(var We=function(_e){var Ve=tt.markers[_e];tt.setCurrentMarker(tt.markers[_e]),tt._currentMarker.dispose(),tt.markerImage.removeChild(tt._currentMarker.container),tt.markers.splice(tt.markers.indexOf(tt._currentMarker),1),tt.eventListeners.markerdelete.forEach(function(it){return it(new Et(we,Ve))})},tt=this,Re=this.markers.length-1;Re>=0;Re--)We(Re);this.addUndoStep()}},Object.defineProperty(He.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),He.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))},He.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)},He.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},He.prototype.addUndoStep=function(){var we=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Le=this.getState(),We=this.undoRedoManager.getLastUndoStep();if(!We||We.width===Le.width&&We.height===Le.height){var tt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Le),tt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Re){return Re(new dt(we))})}else this.undoRedoManager.replaceLastUndoStep(Le),this.eventListeners.statechange.forEach(function(Re){return Re(new dt(we))})}},He.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},He.prototype.undoStep=function(){var we=this,Le=this.undoRedoManager.undo();Le!==void 0&&(this.restoreState(Le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(We){return We(new dt(we))}))},He.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},He.prototype.redoStep=function(){var we=this,Le=this.undoRedoManager.redo();Le!==void 0&&(this.restoreState(Le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(We){return We(new dt(we))}))},He.prototype.stepZoom=function(){var we=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=we<this.zoomSteps.length-1?this.zoomSteps[we+1]:this.zoomSteps[0]},He.prototype.panTo=function(we){this.contentDiv.scrollBy({left:this.prevPanPoint.x-we.x,top:this.prevPanPoint.y-we.y}),this.prevPanPoint=we},He.prototype.startRenderAndClose=function(){return oe(this,void 0,void 0,function(){var we,Le,We=this;return Ue(this,function(tt){switch(tt.label){case 0:return[4,this.render()];case 1:return we=tt.sent(),Le=this.getState(),this.eventListeners.render.forEach(function(Re){return Re(new mt(We,we,Le))}),this.close(!0),[2]}})})},He.prototype.getState=function(we){we===!0&&this.setCurrentMarker();var Le={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(We){return Le.markers.push(We.getState())}),Le},He.prototype.restoreState=function(we){var Le=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);we.markers.forEach(function(We){var tt=Le._availableMarkerTypes.find(function(_e){return _e.typeName===We.typeName});if(tt!==void 0){var Re=Le.addNewMarker(tt);Re.restoreState(We),Le.markers.push(Re)}}),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(We){return We(new dt(Le))})},He.prototype.addNewMarker=function(we){var Le=de.createGroup();return this.markerImage.appendChild(Le),new we(Le,this.overlayContainer,this.settings)},He.prototype.createNewMarker=function(we){var Le,We=this;(Le=typeof we=="string"?this._availableMarkerTypes.find(function(tt){return tt.typeName===we}):we)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Le),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(Le.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(tt){return tt(new Et(We,We._currentMarker))}))},He.prototype.markerCreated=function(we){var Le=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(we),this.setCurrentMarker(we),we instanceof Ke&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ke):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(We){return We(new Et(Le,Le._currentMarker))})},He.prototype.colorChanged=function(we){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=we,this.settings.defaultStrokeColor=we)},He.prototype.fillColorChanged=function(we){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=we)},He.prototype.markerStateChanged=function(we){var Le=this;this.eventListeners.markerchange.forEach(function(We){return We(new Et(Le,we))})},He.prototype.setCurrentMarker=function(we){var Le=this;this._currentMarker!==we&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(We){return We(new Et(Le,Le._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(We){return We(new Et(Le,Le._currentMarker))}))},He.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 Le=this.markers.find(function(We){return We.ownsTarget(we.target)});Le!==void 0?(this.setCurrentMarker(Le),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))},He.prototype.onDblClick=function(we){if(this._isFocused||this.focus(),this.mode==="select"){var Le=this.markers.find(function(We){return We.ownsTarget(we.target)});Le!==void 0&&Le!==this._currentMarker&&this.setCurrentMarker(Le),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(we.clientX,we.clientY),we.target):this.setCurrentMarker()}},He.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}))},He.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()},He.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},He.prototype.onKeyUp=function(we){this._currentMarker===void 0||this.notesArea!==void 0||we.key!=="Delete"&&we.key!=="Backspace"||this.deleteSelectedMarker()},He.prototype.clientToLocalCoordinates=function(we,Le){var We=this.markerImage.getBoundingClientRect();return{x:(we-We.left)/this.zoomLevel,y:(Le-We.top)/this.zoomLevel}},He.prototype.onWindowResize=function(){this.positionUI()},He.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()},He.prototype.addLicenseKey=function(we){ve.addKey(we)},He.prototype.addEventListener=function(we,Le){this.eventListeners.addEventListener(we,Le)},He.prototype.removeEventListener=function(we,Le){this.eventListeners.removeEventListener(we,Le)},He.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(He.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),He.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(Le){return Le(new dt(we))}))},He.prototype.blur=function(){var we=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Le){return Le(new dt(we))}))},He.instanceCounter=0,He}()},23425:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return De}});var at=ft(52873),Gt=ft(67711),oe=ft(26420),Ue=ft(98506),Ie=ft(16886),de=ft(92310),ve=ft.n(de),Ee=ft(18929),ke=ft(10228),Se=ft(26112),je=ft(48736),me=ft(59301),Pe=ft(17119),fe=[10,20,50,100],z=function(Te){var Ne=Te.pageSizeOptions,Be=Ne===void 0?fe:Ne,Ge=Te.locale,Ye=Te.changeSize,Ke=Te.pageSize,Xe=Te.goButton,ot=Te.quickGo,lt=Te.rootPrefixCls,ut=Te.disabled,Ct=Te.buildOptionText,Je=Te.showSizeChanger,nt=Te.sizeChangerRender,St=me.useState(""),wt=(0,Ie.Z)(St,2),bt=wt[0],ct=wt[1],vt=function(){return!bt||Number.isNaN(bt)?void 0:Number(bt)},ht=typeof Ct=="function"?Ct:function(Le){return"".concat(Le," ").concat(Ge.items_per_page)},Lt=function(We){ct(We.target.value)},dt=function(We){Xe||bt===""||(ct(""),!(We.relatedTarget&&(We.relatedTarget.className.indexOf("".concat(lt,"-item-link"))>=0||We.relatedTarget.className.indexOf("".concat(lt,"-item"))>=0))&&(ot==null||ot(vt())))},mt=function(We){bt!==""&&(We.keyCode===ke.Z.ENTER||We.type==="click")&&(ct(""),ot==null||ot(vt()))},Et=function(){return Be.some(function(We){return We.toString()===Ke.toString()})?Be:Be.concat([Ke]).sort(function(We,tt){var Re=Number.isNaN(Number(We))?0:Number(We),_e=Number.isNaN(Number(tt))?0:Number(tt);return Re-_e})},gt="".concat(lt,"-options");if(!Je&&!ot)return null;var $e=null,He=null,we=null;return Je&&nt&&($e=nt({disabled:ut,size:Ke,onSizeChange:function(We){Ye==null||Ye(Number(We))},"aria-label":Ge.page_size,className:"".concat(gt,"-size-changer"),options:Et().map(function(Le){return{label:ht(Le),value:Le}})})),ot&&(Xe&&(we=typeof Xe=="boolean"?me.createElement("button",{type:"button",onClick:mt,onKeyUp:mt,disabled:ut,className:"".concat(gt,"-quick-jumper-button")},Ge.jump_to_confirm):me.createElement("span",{onClick:mt,onKeyUp:mt},Xe)),He=me.createElement("div",{className:"".concat(gt,"-quick-jumper")},Ge.jump_to,me.createElement("input",{disabled:ut,type:"text",value:bt,onChange:Lt,onKeyUp:mt,onBlur:dt,"aria-label":Ge.page}),Ge.page,we)),me.createElement("li",{className:gt},$e,He)},te=z,se=function(Te){var Ne=Te.rootPrefixCls,Be=Te.page,Ge=Te.active,Ye=Te.className,Ke=Te.showTitle,Xe=Te.onClick,ot=Te.onKeyPress,lt=Te.itemRender,ut="".concat(Ne,"-item"),Ct=ve()(ut,"".concat(ut,"-").concat(Be),(0,at.Z)((0,at.Z)({},"".concat(ut,"-active"),Ge),"".concat(ut,"-disabled"),!Be),Ye),Je=function(){Xe(Be)},nt=function(bt){ot(bt,Xe,Be)},St=lt(Be,"page",me.createElement("a",{rel:"nofollow"},Be));return St?me.createElement("li",{title:Ke?String(Be):null,className:Ct,onClick:Je,onKeyDown:nt,tabIndex:0},St):null},ie=se,le=function(Te,Ne,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,Ne){var Be=typeof Fe=="undefined"?Te:Fe;return Math.floor((Ne-1)/Be)+1}var Ae=function(Te){var Ne=Te.prefixCls,Be=Ne===void 0?"rc-pagination":Ne,Ge=Te.selectPrefixCls,Ye=Ge===void 0?"rc-select":Ge,Ke=Te.className,Xe=Te.current,ot=Te.defaultCurrent,lt=ot===void 0?1:ot,ut=Te.total,Ct=ut===void 0?0:ut,Je=Te.pageSize,nt=Te.defaultPageSize,St=nt===void 0?10:nt,wt=Te.onChange,bt=wt===void 0?ce:wt,ct=Te.hideOnSinglePage,vt=Te.align,ht=Te.showPrevNextJumpers,Lt=ht===void 0?!0:ht,dt=Te.showQuickJumper,mt=Te.showLessItems,Et=Te.showTitle,gt=Et===void 0?!0:Et,$e=Te.onShowSizeChange,He=$e===void 0?ce:$e,we=Te.locale,Le=we===void 0?Pe.Z:we,We=Te.style,tt=Te.totalBoundaryShowSizeChanger,Re=tt===void 0?50:tt,_e=Te.disabled,Ve=Te.simple,it=Te.showTotal,yt=Te.showSizeChanger,Pt=yt===void 0?Ct>Re:yt,jt=Te.sizeChangerRender,Nt=Te.pageSizeOptions,Bt=Te.itemRender,$t=Bt===void 0?le:Bt,en=Te.jumpPrevIcon,qt=Te.jumpNextIcon,Zt=Te.prevIcon,hn=Te.nextIcon,an=me.useRef(null),cn=(0,Ee.Z)(10,{value:Je,defaultValue:St}),wn=(0,Ie.Z)(cn,2),xn=wn[0],Nn=wn[1],Zn=(0,Ee.Z)(1,{value:Xe,defaultValue:lt,postState:function(Kr){return Math.max(1,Math.min(Kr,xe(void 0,xn,Ct)))}}),Tr=(0,Ie.Z)(Zn,2),qn=Tr[0],qr=Tr[1],nr=me.useState(qn),$r=(0,Ie.Z)(nr,2),hi=$r[0],Si=$r[1];(0,me.useEffect)(function(){Si(qn)},[qn]);var Li=bt!==ce,Ei="current"in Te,Lr=Math.max(1,qn-(mt?3:5)),Ci=Math.min(xe(void 0,xn,Ct),qn+(mt?3:5));function et(gr,Kr){var Yr=gr||me.createElement("button",{type:"button","aria-label":Kr,className:"".concat(Be,"-item-link")});return typeof gr=="function"&&(Yr=me.createElement(gr,(0,Ue.Z)({},Te))),Yr}function ai(gr){var Kr=gr.target.value,Yr=xe(void 0,xn,Ct),Di;return Kr===""?Di=Kr:Number.isNaN(Number(Kr))?Di=hi:Kr>=Yr?Di=Yr:Di=Number(Kr),Di}function Er(gr){return pe(gr)&&gr!==qn&&pe(Ct)&&Ct>0}var Ln=Ct>xn?dt:!1;function An(gr){(gr.keyCode===ke.Z.UP||gr.keyCode===ke.Z.DOWN)&&gr.preventDefault()}function Bn(gr){var Kr=ai(gr);switch(Kr!==hi&&Si(Kr),gr.keyCode){case ke.Z.ENTER:nn(Kr);break;case ke.Z.UP:nn(Kr-1);break;case ke.Z.DOWN:nn(Kr+1);break;default:break}}function xr(gr){nn(ai(gr))}function zr(gr){var Kr=xe(gr,xn,Ct),Yr=qn>Kr&&Kr!==0?Kr:qn;Nn(gr),Si(Yr),He==null||He(qn,gr),qr(Yr),bt==null||bt(Yr,gr)}function nn(gr){if(Er(gr)&&!_e){var Kr=xe(void 0,xn,Ct),Yr=gr;return gr>Kr?Yr=Kr:gr<1&&(Yr=1),Yr!==hi&&Si(Yr),qr(Yr),bt==null||bt(Yr,xn),Yr}return qn}var sn=qn>1,Ht=qn<xe(void 0,xn,Ct);function rn(){sn&&nn(qn-1)}function tr(){Ht&&nn(qn+1)}function cr(){nn(Lr)}function Nr(){nn(Ci)}function ln(gr,Kr){if(gr.key==="Enter"||gr.charCode===ke.Z.ENTER||gr.keyCode===ke.Z.ENTER){for(var Yr=arguments.length,Di=new Array(Yr>2?Yr-2:0),oi=2;oi<Yr;oi++)Di[oi-2]=arguments[oi];Kr.apply(void 0,Di)}}function vn(gr){ln(gr,rn)}function kn(gr){ln(gr,tr)}function Rr(gr){ln(gr,cr)}function Hn(gr){ln(gr,Nr)}function Ot(gr){var Kr=$t(gr,"prev",et(Zt,"prev page"));return me.isValidElement(Kr)?me.cloneElement(Kr,{disabled:!sn}):Kr}function Ut(gr){var Kr=$t(gr,"next",et(hn,"next page"));return me.isValidElement(Kr)?me.cloneElement(Kr,{disabled:!Ht}):Kr}function Dn(gr){(gr.type==="click"||gr.keyCode===ke.Z.ENTER)&&nn(hi)}var Tn=null,Qt=(0,Se.Z)(Te,{aria:!0,data:!0}),Fn=it&&me.createElement("li",{className:"".concat(Be,"-total-text")},it(Ct,[Ct===0?0:(qn-1)*xn+1,qn*xn>Ct?Ct:qn*xn])),vr=null,mr=xe(void 0,xn,Ct);if(ct&&Ct<=xn)return null;var er=[],Un={rootPrefixCls:Be,onClick:nn,onKeyPress:ln,showTitle:gt,itemRender:$t,page:-1},Rn=qn-1>0?qn-1:0,$n=qn+1<mr?qn+1:mr,Fr=dt&&dt.goButton,br=(0,oe.Z)(Ve)==="object"?Ve.readOnly:!Ve,Pn=Fr,fr=null;Ve&&(Fr&&(typeof Fr=="boolean"?Pn=me.createElement("button",{type:"button",onClick:Dn,onKeyUp:Dn},Le.jump_to_confirm):Pn=me.createElement("span",{onClick:Dn,onKeyUp:Dn},Fr),Pn=me.createElement("li",{title:gt?"".concat(Le.jump_to).concat(qn,"/").concat(mr):null,className:"".concat(Be,"-simple-pager")},Pn)),fr=me.createElement("li",{title:gt?"".concat(qn,"/").concat(mr):null,className:"".concat(Be,"-simple-pager")},br?hi:me.createElement("input",{type:"text","aria-label":Le.jump_to,value:hi,disabled:_e,onKeyDown:An,onKeyUp:Bn,onChange:Bn,onBlur:xr,size:3}),me.createElement("span",{className:"".concat(Be,"-slash")},"/"),mr));var si=mt?1:2;if(mr<=3+si*2){mr||er.push(me.createElement(ie,(0,Gt.Z)({},Un,{key:"noPager",page:1,className:"".concat(Be,"-item-disabled")})));for(var xi=1;xi<=mr;xi+=1)er.push(me.createElement(ie,(0,Gt.Z)({},Un,{key:xi,page:xi,active:qn===xi})))}else{var zi=mt?Le.prev_3:Le.prev_5,Yt=mt?Le.next_3:Le.next_5,Pr=$t(Lr,"jump-prev",et(en,"prev page")),Mr=$t(Ci,"jump-next",et(qt,"next page"));Lt&&(Tn=Pr?me.createElement("li",{title:gt?zi:null,key:"prev",onClick:cr,tabIndex:0,onKeyDown:Rr,className:ve()("".concat(Be,"-jump-prev"),(0,at.Z)({},"".concat(Be,"-jump-prev-custom-icon"),!!en))},Pr):null,vr=Mr?me.createElement("li",{title:gt?Yt:null,key:"next",onClick:Nr,tabIndex:0,onKeyDown:Hn,className:ve()("".concat(Be,"-jump-next"),(0,at.Z)({},"".concat(Be,"-jump-next-custom-icon"),!!qt))},Mr):null);var ar=Math.max(1,qn-si),mi=Math.min(qn+si,mr);qn-1<=si&&(mi=1+si*2),mr-qn<=si&&(ar=mr-si*2);for(var ii=ar;ii<=mi;ii+=1)er.push(me.createElement(ie,(0,Gt.Z)({},Un,{key:ii,page:ii,active:qn===ii})));if(qn-1>=si*2&&qn!==3&&(er[0]=me.cloneElement(er[0],{className:ve()("".concat(Be,"-item-after-jump-prev"),er[0].props.className)}),er.unshift(Tn)),mr-qn>=si*2&&qn!==mr-2){var pi=er[er.length-1];er[er.length-1]=me.cloneElement(pi,{className:ve()("".concat(Be,"-item-before-jump-next"),pi.props.className)}),er.push(vr)}ar!==1&&er.unshift(me.createElement(ie,(0,Gt.Z)({},Un,{key:1,page:1}))),mi!==mr&&er.push(me.createElement(ie,(0,Gt.Z)({},Un,{key:mr,page:mr})))}var ei=Ot(Rn);if(ei){var ti=!sn||!mr;ei=me.createElement("li",{title:gt?Le.prev_page:null,onClick:rn,tabIndex:ti?null:0,onKeyDown:vn,className:ve()("".concat(Be,"-prev"),(0,at.Z)({},"".concat(Be,"-disabled"),ti)),"aria-disabled":ti},ei)}var yr=Ut($n);if(yr){var on,sr;Ve?(on=!Ht,sr=sn?0:null):(on=!Ht||!mr,sr=on?null:0),yr=me.createElement("li",{title:gt?Le.next_page:null,onClick:tr,tabIndex:sr,onKeyDown:kn,className:ve()("".concat(Be,"-next"),(0,at.Z)({},"".concat(Be,"-disabled"),on)),"aria-disabled":on},yr)}var un=ve()(Be,Ke,(0,at.Z)((0,at.Z)((0,at.Z)((0,at.Z)((0,at.Z)({},"".concat(Be,"-start"),vt==="start"),"".concat(Be,"-center"),vt==="center"),"".concat(Be,"-end"),vt==="end"),"".concat(Be,"-simple"),Ve),"".concat(Be,"-disabled"),_e));return me.createElement("ul",(0,Gt.Z)({className:un,style:We,ref:an},Qt),Fn,ei,Ve?fr:er,yr,me.createElement(te,{locale:Le,rootPrefixCls:Be,disabled:_e,selectPrefixCls:Ye,changeSize:zr,pageSize:xn,pageSizeOptions:Nt,quickGo:Ln?nn:null,goButton:Pn,showSizeChanger:Pt,sizeChangerRender:jt}))},De=Ae},25930:function(Gn,jn,ft){"use strict";ft.d(jn,{Cd:function(){return Be}});var at=ft(67711),Gt=ft(98506),oe=ft(33346),Ue=ft(59301),Ie=ft(92310),de=ft.n(Ie),ve={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ee=function(){var Ke=(0,Ue.useRef)([]),Xe=(0,Ue.useRef)(null);return(0,Ue.useEffect)(function(){var ot=Date.now(),lt=!1;Ke.current.forEach(function(ut){if(ut){lt=!0;var Ct=ut.style;Ct.transitionDuration=".3s, .3s, .3s, .06s",Xe.current&&ot-Xe.current<100&&(Ct.transitionDuration="0s, 0s")}}),lt&&(Xe.current=Date.now())}),Ke.current},ke=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Se=function(Ke){var Xe=(0,Gt.Z)((0,Gt.Z)({},ve),Ke),ot=Xe.className,lt=Xe.percent,ut=Xe.prefixCls,Ct=Xe.strokeColor,Je=Xe.strokeLinecap,nt=Xe.strokeWidth,St=Xe.style,wt=Xe.trailColor,bt=Xe.trailWidth,ct=Xe.transition,vt=(0,oe.Z)(Xe,ke);delete vt.gapPosition;var ht=Array.isArray(lt)?lt:[lt],Lt=Array.isArray(Ct)?Ct:[Ct],dt=Ee(),mt=nt/2,Et=100-nt/2,gt="M ".concat(Je==="round"?mt:0,",").concat(mt,`
L `).concat(Je==="round"?Et:100,",").concat(mt),$e="0 0 100 ".concat(nt),He=0;return Ue.createElement("svg",(0,at.Z)({className:de()("".concat(ut,"-line"),ot),viewBox:$e,preserveAspectRatio:"none",style:St},vt),Ue.createElement("path",{className:"".concat(ut,"-line-trail"),d:gt,strokeLinecap:Je,stroke:wt,strokeWidth:bt||nt,fillOpacity:"0"}),ht.map(function(we,Le){var We=1;switch(Je){case"round":We=1-nt/100;break;case"square":We=1-nt/2/100;break;default:We=1;break}var tt={strokeDasharray:"".concat(we*We,"px, 100px"),strokeDashoffset:"-".concat(He,"px"),transition:ct||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Re=Lt[Le]||Lt[Lt.length-1];return He+=we,Ue.createElement("path",{key:Le,className:"".concat(ut,"-line-path"),d:gt,strokeLinecap:Je,stroke:Re,strokeWidth:nt,fillOpacity:"0",ref:function(Ve){dt[Le]=Ve},style:tt})}))},je=Se,me=ft(26420),Pe=ft(16886),fe=ft(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 Ke=Ue.useState(),Xe=(0,Pe.Z)(Ke,2),ot=Xe[0],lt=Xe[1];return Ue.useEffect(function(){lt("rc_progress_".concat(se()))},[]),Ye||ot},le=function(Ke){var Xe=Ke.bg,ot=Ke.children;return Ue.createElement("div",{style:{width:"100%",height:"100%",background:Xe}},ot)};function ce(Ye,Ke){return Object.keys(Ye).map(function(Xe){var ot=parseFloat(Xe),lt="".concat(Math.floor(ot*Ke),"%");return"".concat(Ye[Xe]," ").concat(lt)})}var pe=Ue.forwardRef(function(Ye,Ke){var Xe=Ye.prefixCls,ot=Ye.color,lt=Ye.gradientId,ut=Ye.radius,Ct=Ye.style,Je=Ye.ptg,nt=Ye.strokeLinecap,St=Ye.strokeWidth,wt=Ye.size,bt=Ye.gapDegree,ct=ot&&(0,me.Z)(ot)==="object",vt=ct?"#FFF":void 0,ht=wt/2,Lt=Ue.createElement("circle",{className:"".concat(Xe,"-circle-path"),r:ut,cx:ht,cy:ht,stroke:vt,strokeLinecap:nt,strokeWidth:St,opacity:Je===0?0:1,style:Ct,ref:Ke});if(!ct)return Lt;var dt="".concat(lt,"-conic"),mt=bt?"".concat(180+bt/2,"deg"):"0deg",Et=ce(ot,(360-bt)/360),gt=ce(ot,1),$e="conic-gradient(from ".concat(mt,", ").concat(Et.join(", "),")"),He="linear-gradient(to ".concat(bt?"bottom":"top",", ").concat(gt.join(", "),")");return Ue.createElement(Ue.Fragment,null,Ue.createElement("mask",{id:dt},Lt),Ue.createElement("foreignObject",{x:0,y:0,width:wt,height:wt,mask:"url(#".concat(dt,")")},Ue.createElement(le,{bg:He},Ue.createElement(le,{bg:$e}))))}),xe=pe,Ae=100,De=function(Ke,Xe,ot,lt,ut,Ct,Je,nt,St,wt){var bt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,ct=ot/100*360*((360-Ct)/360),vt=Ct===0?0:{bottom:0,top:180,left:90,right:-90}[Je],ht=(100-lt)/100*Xe;St==="round"&&lt!==100&&(ht+=wt/2,ht>=Xe&&(ht=Xe-.01));var Lt=Ae/2;return{stroke:typeof nt=="string"?nt:void 0,strokeDasharray:"".concat(Xe,"px ").concat(Ke),strokeDashoffset:ht+bt,transform:"rotate(".concat(ut+ct+vt,"deg)"),transformOrigin:"".concat(Lt,"px ").concat(Lt,"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 Ke=Ye!=null?Ye:[];return Array.isArray(Ke)?Ke:[Ke]}var Ne=function(Ke){var Xe=(0,Gt.Z)((0,Gt.Z)({},ve),Ke),ot=Xe.id,lt=Xe.prefixCls,ut=Xe.steps,Ct=Xe.strokeWidth,Je=Xe.trailWidth,nt=Xe.gapDegree,St=nt===void 0?0:nt,wt=Xe.gapPosition,bt=Xe.trailColor,ct=Xe.strokeLinecap,vt=Xe.style,ht=Xe.className,Lt=Xe.strokeColor,dt=Xe.percent,mt=(0,oe.Z)(Xe,Fe),Et=Ae/2,gt=ie(ot),$e="".concat(gt,"-gradient"),He=Et-Ct/2,we=Math.PI*2*He,Le=St>0?90+St/2:-90,We=we*((360-St)/360),tt=(0,me.Z)(ut)==="object"?ut:{count:ut,gap:2},Re=tt.count,_e=tt.gap,Ve=Te(dt),it=Te(Lt),yt=it.find(function(qt){return qt&&(0,me.Z)(qt)==="object"}),Pt=yt&&(0,me.Z)(yt)==="object",jt=Pt?"butt":ct,Nt=De(we,We,0,100,Le,St,wt,bt,jt,Ct),Bt=Ee(),$t=function(){var Zt=0;return Ve.map(function(hn,an){var cn=it[an]||it[it.length-1],wn=De(we,We,Zt,hn,Le,St,wt,cn,jt,Ct);return Zt+=hn,Ue.createElement(xe,{key:an,color:cn,ptg:hn,radius:He,prefixCls:lt,gradientId:$e,style:wn,strokeLinecap:jt,strokeWidth:Ct,gapDegree:St,ref:function(Nn){Bt[an]=Nn},size:Ae})}).reverse()},en=function(){var Zt=Math.round(Re*(Ve[0]/100)),hn=100/Re,an=0;return new Array(Re).fill(null).map(function(cn,wn){var xn=wn<=Zt-1?it[0]:bt,Nn=xn&&(0,me.Z)(xn)==="object"?"url(#".concat($e,")"):void 0,Zn=De(we,We,an,hn,Le,St,wt,xn,"butt",Ct,_e);return an+=(We-Zn.strokeDashoffset+_e)*100/We,Ue.createElement("circle",{key:wn,className:"".concat(lt,"-circle-path"),r:He,cx:Et,cy:Et,stroke:Nn,strokeWidth:Ct,opacity:1,style:Zn,ref:function(qn){Bt[wn]=qn}})})};return Ue.createElement("svg",(0,at.Z)({className:de()("".concat(lt,"-circle"),ht),viewBox:"0 0 ".concat(Ae," ").concat(Ae),style:vt,id:ot,role:"presentation"},mt),!Re&&Ue.createElement("circle",{className:"".concat(lt,"-circle-trail"),r:He,cx:Et,cy:Et,stroke:bt,strokeLinecap:jt,strokeWidth:Je||Ct,style:Nt}),Re?en():$t())},Be=Ne,Ge={Line:je,Circle:Be}},738:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return ce}});var at=ft(67711),Gt=ft(52873),oe=ft(16886),Ue=ft(33346),Ie=ft(92310),de=ft.n(Ie),ve=ft(18929),Ee=ft(10228),ke=ft(26112),Se=ft(59301);function je(pe,xe){var Ae=pe.disabled,De=pe.prefixCls,Fe=pe.character,Te=pe.characterRender,Ne=pe.index,Be=pe.count,Ge=pe.value,Ye=pe.allowHalf,Ke=pe.focused,Xe=pe.onHover,ot=pe.onClick,lt=function(ct){Xe(ct,Ne)},ut=function(ct){ot(ct,Ne)},Ct=function(ct){ct.keyCode===Ee.Z.ENTER&&ot(ct,Ne)},Je=Ne+1,nt=new Set([De]);Ge===0&&Ne===0&&Ke?nt.add("".concat(De,"-focused")):Ye&&Ge+.5>=Je&&Ge<Je?(nt.add("".concat(De,"-half")),nt.add("".concat(De,"-active")),Ke&&nt.add("".concat(De,"-focused"))):(Je<=Ge?nt.add("".concat(De,"-full")):nt.add("".concat(De,"-zero")),Je===Ge&&Ke&&nt.add("".concat(De,"-focused")));var St=typeof Fe=="function"?Fe(pe):Fe,wt=Se.createElement("li",{className:de()(Array.from(nt)),ref:xe},Se.createElement("div",{onClick:Ae?null:ut,onKeyDown:Ae?null:Ct,onMouseMove:Ae?null:lt,role:"radio","aria-checked":Ge>Ne?"true":"false","aria-posinset":Ne+1,"aria-setsize":Be,tabIndex:Ae?-1:0},Se.createElement("div",{className:"".concat(De,"-first")},St),Se.createElement("div",{className:"".concat(De,"-second")},St)));return Te&&(wt=Te(wt,pe)),wt}var me=Se.forwardRef(je);function Pe(){var pe=Se.useRef({});function xe(De){return pe.current[De]}function Ae(De){return function(Fe){pe.current[De]=Fe}}return[xe,Ae]}function fe(pe){var xe=pe.pageXOffset,Ae="scrollLeft";if(typeof xe!="number"){var De=pe.document;xe=De.documentElement[Ae],typeof xe!="number"&&(xe=De.body[Ae])}return xe}function z(pe){var xe,Ae,De=pe.ownerDocument,Fe=De.body,Te=De&&De.documentElement,Ne=pe.getBoundingClientRect();return xe=Ne.left,Ae=Ne.top,xe-=Te.clientLeft||Fe.clientLeft||0,Ae-=Te.clientTop||Fe.clientTop||0,{left:xe,top:Ae}}function te(pe){var xe=z(pe),Ae=pe.ownerDocument,De=Ae.defaultView||Ae.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 Ae=pe.prefixCls,De=Ae===void 0?"rc-rate":Ae,Fe=pe.className,Te=pe.defaultValue,Ne=pe.value,Be=pe.count,Ge=Be===void 0?5:Be,Ye=pe.allowHalf,Ke=Ye===void 0?!1:Ye,Xe=pe.allowClear,ot=Xe===void 0?!0:Xe,lt=pe.keyboard,ut=lt===void 0?!0:lt,Ct=pe.character,Je=Ct===void 0?"\u2605":Ct,nt=pe.characterRender,St=pe.disabled,wt=pe.direction,bt=wt===void 0?"ltr":wt,ct=pe.tabIndex,vt=ct===void 0?0:ct,ht=pe.autoFocus,Lt=pe.onHoverChange,dt=pe.onChange,mt=pe.onFocus,Et=pe.onBlur,gt=pe.onKeyDown,$e=pe.onMouseLeave,He=(0,Ue.Z)(pe,se),we=Pe(),Le=(0,oe.Z)(we,2),We=Le[0],tt=Le[1],Re=Se.useRef(null),_e=function(){if(!St){var Lr;(Lr=Re.current)===null||Lr===void 0||Lr.focus()}};Se.useImperativeHandle(xe,function(){return{focus:_e,blur:function(){if(!St){var Lr;(Lr=Re.current)===null||Lr===void 0||Lr.blur()}}}});var Ve=(0,ve.Z)(Te||0,{value:Ne}),it=(0,oe.Z)(Ve,2),yt=it[0],Pt=it[1],jt=(0,ve.Z)(null),Nt=(0,oe.Z)(jt,2),Bt=Nt[0],$t=Nt[1],en=function(Lr,Ci){var et=bt==="rtl",ai=Lr+1;if(Ke){var Er=We(Lr),Ln=te(Er),An=Er.clientWidth;(et&&Ci-Ln>An/2||!et&&Ci-Ln<An/2)&&(ai-=.5)}return ai},qt=function(Lr){Pt(Lr),dt==null||dt(Lr)},Zt=Se.useState(!1),hn=(0,oe.Z)(Zt,2),an=hn[0],cn=hn[1],wn=function(){cn(!0),mt==null||mt()},xn=function(){cn(!1),Et==null||Et()},Nn=Se.useState(null),Zn=(0,oe.Z)(Nn,2),Tr=Zn[0],qn=Zn[1],qr=function(Lr,Ci){var et=en(Ci,Lr.pageX);et!==Bt&&(qn(et),$t(null)),Lt==null||Lt(et)},nr=function(Lr){St||(qn(null),$t(null),Lt==null||Lt(void 0)),Lr&&($e==null||$e(Lr))},$r=function(Lr,Ci){var et=en(Ci,Lr.pageX),ai=!1;ot&&(ai=et===yt),nr(),qt(ai?0:et),$t(ai?et:null)},hi=function(Lr){var Ci=Lr.keyCode,et=bt==="rtl",ai=Ke?.5:1;ut&&(Ci===Ee.Z.RIGHT&&yt<Ge&&!et?(qt(yt+ai),Lr.preventDefault()):Ci===Ee.Z.LEFT&&yt>0&&!et||Ci===Ee.Z.RIGHT&&yt>0&&et?(qt(yt-ai),Lr.preventDefault()):Ci===Ee.Z.LEFT&&yt<Ge&&et&&(qt(yt+ai),Lr.preventDefault())),gt==null||gt(Lr)};Se.useEffect(function(){ht&&!St&&_e()},[]);var Si=new Array(Ge).fill(0).map(function(Ei,Lr){return Se.createElement(me,{ref:tt(Lr),index:Lr,count:Ge,disabled:St,prefixCls:"".concat(De,"-star"),allowHalf:Ke,value:Tr===null?yt:Tr,onClick:$r,onHover:qr,key:Ei||Lr,character:Je,characterRender:nt,focused:an})}),Li=de()(De,Fe,(0,Gt.Z)((0,Gt.Z)({},"".concat(De,"-disabled"),St),"".concat(De,"-rtl"),bt==="rtl"));return Se.createElement("ul",(0,at.Z)({className:Li,onMouseLeave:nr,tabIndex:St?-1:vt,onFocus:St?null:wn,onBlur:St?null:xn,onKeyDown:St?null:hi,ref:Re},(0,ke.Z)(He,{aria:!0,data:!0,attr:!0})),Si)}var le=Se.forwardRef(ie),ce=le},6551:function(Gn,jn,ft){"use strict";ft.d(jn,{ZP:function(){return ve}});var at=ft(16886),Gt=ft(59301),oe=ft(47273),Ue=0,Ie=(0,oe.Z)();function de(){var Ee;return Ie?(Ee=Ue,Ue+=1):Ee="TEST_OR_SSR",Ee}function ve(Ee){var ke=Gt.useState(),Se=(0,at.Z)(ke,2),je=Se[0],me=Se[1];return Gt.useEffect(function(){me("rc_select_".concat(de()))},[]),Ee||je}},37463:function(Gn,jn,ft){"use strict";ft.d(jn,{Ac:function(){return cn},Xo:function(){return xn},Wx:function(){return Zn},ZP:function(){return Hn},lk:function(){return ce}});var at=ft(67711),Gt=ft(15142),oe=ft(52873),Ue=ft(98506),Ie=ft(16886),de=ft(33346),ve=ft(26420),Ee=ft(18929),ke=ft(48736),Se=ft(59301),je=ft(92310),me=ft.n(je),Pe=ft(34280),fe=ft(49658),z=ft(8654),te=function(Ut){var Dn=Ut.className,Tn=Ut.customizeIcon,Qt=Ut.customizeIconProps,Fn=Ut.children,vr=Ut.onMouseDown,mr=Ut.onClick,er=typeof Tn=="function"?Tn(Qt):Tn;return Se.createElement("span",{className:Dn,onMouseDown:function(Rn){Rn.preventDefault(),vr==null||vr(Rn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:mr,"aria-hidden":!0},er!==void 0?er:Se.createElement("span",{className:me()(Dn.split(/\s+/).map(function(Un){return"".concat(Un,"-icon")}))},Fn))},se=te,ie=function(Ut,Dn,Tn,Qt,Fn){var vr=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,mr=arguments.length>6?arguments[6]:void 0,er=arguments.length>7?arguments[7]:void 0,Un=Se.useMemo(function(){if((0,ve.Z)(Qt)==="object")return Qt.clearIcon;if(Fn)return Fn},[Qt,Fn]),Rn=Se.useMemo(function(){return!!(!vr&&Qt&&(Tn.length||mr)&&!(er==="combobox"&&mr===""))},[Qt,vr,Tn.length,mr,er]);return{allowClear:Rn,clearIcon:Se.createElement(se,{className:"".concat(Ut,"-clear"),onMouseDown:Dn,customizeIcon:Un},"\xD7")}},le=Se.createContext(null);function ce(){return Se.useContext(le)}function pe(){var Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ut=Se.useState(!1),Dn=(0,Ie.Z)(Ut,2),Tn=Dn[0],Qt=Dn[1],Fn=Se.useRef(null),vr=function(){window.clearTimeout(Fn.current)};Se.useEffect(function(){return vr},[]);var mr=function(Un,Rn){vr(),Fn.current=window.setTimeout(function(){Qt(Un),Rn&&Rn()},Ot)};return[Tn,mr,vr]}function xe(){var Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ut=Se.useRef(null),Dn=Se.useRef(null);Se.useEffect(function(){return function(){window.clearTimeout(Dn.current)}},[]);function Tn(Qt){(Qt||Ut.current===null)&&(Ut.current=Qt),window.clearTimeout(Dn.current),Dn.current=window.setTimeout(function(){Ut.current=null},Ot)}return[function(){return Ut.current},Tn]}function Ae(Ot,Ut,Dn,Tn){var Qt=Se.useRef(null);Qt.current={open:Ut,triggerOpen:Dn,customizedTrigger:Tn},Se.useEffect(function(){function Fn(vr){var mr;if(!((mr=Qt.current)!==null&&mr!==void 0&&mr.customizedTrigger)){var er=vr.target;er.shadowRoot&&vr.composed&&(er=vr.composedPath()[0]||er),Qt.current.open&&Ot().filter(function(Un){return Un}).every(function(Un){return!Un.contains(er)&&Un!==er})&&Qt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Fn),function(){return window.removeEventListener("mousedown",Fn)}},[])}var De=ft(10228);function Fe(Ot){return Ot&&![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(Ot)}var Te=ft(26112),Ne=ft(11780);function Be(Ot,Ut,Dn){var Tn=(0,Ue.Z)((0,Ue.Z)({},Ot),Dn?Ut:{});return Object.keys(Ut).forEach(function(Qt){var Fn=Ut[Qt];typeof Fn=="function"&&(Tn[Qt]=function(){for(var vr,mr=arguments.length,er=new Array(mr),Un=0;Un<mr;Un++)er[Un]=arguments[Un];return Fn.apply(void 0,er),(vr=Ot[Qt])===null||vr===void 0?void 0:vr.call.apply(vr,[Ot].concat(er))})}),Tn}var Ge=Be,Ye=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ke=function(Ut,Dn){var Tn=Ut.prefixCls,Qt=Ut.id,Fn=Ut.inputElement,vr=Ut.autoFocus,mr=Ut.autoComplete,er=Ut.editable,Un=Ut.activeDescendantId,Rn=Ut.value,$n=Ut.open,Fr=Ut.attrs,br=(0,de.Z)(Ut,Ye),Pn=Fn||Se.createElement("input",null),fr=Pn,si=fr.ref,xi=fr.props;return(0,ke.Kp)(!("maxLength"in Pn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Pn=Se.cloneElement(Pn,(0,Ue.Z)((0,Ue.Z)((0,Ue.Z)({type:"search"},Ge(br,xi,!0)),{},{id:Qt,ref:(0,z.sQ)(Dn,si),autoComplete:mr||"off",autoFocus:vr,className:me()("".concat(Tn,"-selection-search-input"),xi==null?void 0:xi.className),role:"combobox","aria-expanded":$n||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Qt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Qt,"_list"),"aria-activedescendant":$n?Un:void 0},Fr),{},{value:er?Rn:"",readOnly:!er,unselectable:er?null:"on",style:(0,Ue.Z)((0,Ue.Z)({},xi.style),{},{opacity:er?null:0})})),Pn},Xe=Se.forwardRef(Ke),ot=Xe;function lt(Ot){return Array.isArray(Ot)?Ot:Ot!==void 0?[Ot]:[]}var ut=typeof window!="undefined"&&window.document&&window.document.documentElement,Ct=ut;function Je(Ot){return Ot!=null}function nt(Ot){return!Ot&&Ot!==0}function St(Ot){return["string","number"].includes((0,ve.Z)(Ot))}function wt(Ot){var Ut=void 0;return Ot&&(St(Ot.title)?Ut=Ot.title.toString():St(Ot.label)&&(Ut=Ot.label.toString())),Ut}function bt(Ot,Ut){Ct?Se.useLayoutEffect(Ot,Ut):Se.useEffect(Ot,Ut)}function ct(Ot){var Ut;return(Ut=Ot.key)!==null&&Ut!==void 0?Ut:Ot.value}var vt=function(Ut){Ut.preventDefault(),Ut.stopPropagation()},ht=function(Ut){var Dn=Ut.id,Tn=Ut.prefixCls,Qt=Ut.values,Fn=Ut.open,vr=Ut.searchValue,mr=Ut.autoClearSearchValue,er=Ut.inputRef,Un=Ut.placeholder,Rn=Ut.disabled,$n=Ut.mode,Fr=Ut.showSearch,br=Ut.autoFocus,Pn=Ut.autoComplete,fr=Ut.activeDescendantId,si=Ut.tabIndex,xi=Ut.removeIcon,zi=Ut.maxTagCount,Yt=Ut.maxTagTextLength,Pr=Ut.maxTagPlaceholder,Mr=Pr===void 0?function(Vn){return"+ ".concat(Vn.length," ...")}:Pr,ar=Ut.tagRender,mi=Ut.onToggleOpen,ii=Ut.onRemove,pi=Ut.onInputChange,ei=Ut.onInputPaste,ti=Ut.onInputKeyDown,yr=Ut.onInputMouseDown,on=Ut.onInputCompositionStart,sr=Ut.onInputCompositionEnd,un=Ut.onInputBlur,gr=Se.useRef(null),Kr=(0,Se.useState)(0),Yr=(0,Ie.Z)(Kr,2),Di=Yr[0],oi=Yr[1],Zr=(0,Se.useState)(!1),Wi=(0,Ie.Z)(Zr,2),Jt=Wi[0],pn=Wi[1],Vt="".concat(Tn,"-selection"),st=Fn||$n==="multiple"&&mr===!1||$n==="tags"?vr:"",On=$n==="tags"||$n==="multiple"&&mr===!1||Fr&&(Fn||Jt);bt(function(){oi(gr.current.scrollWidth)},[st]);var Xn=function(Mn,Kn,In,Jn,ir){return Se.createElement("span",{title:wt(Mn),className:me()("".concat(Vt,"-item"),(0,oe.Z)({},"".concat(Vt,"-item-disabled"),In))},Se.createElement("span",{className:"".concat(Vt,"-item-content")},Kn),Jn&&Se.createElement(se,{className:"".concat(Vt,"-item-remove"),onMouseDown:vt,onClick:ir,customizeIcon:xi},"\xD7"))},dr=function(Mn,Kn,In,Jn,ir,fn){var Ar=function(fi){vt(fi),mi(!Fn)};return Se.createElement("span",{onMouseDown:Ar},ar({label:Kn,value:Mn,disabled:In,closable:Jn,onClose:ir,isMaxTag:!!fn}))},ur=function(Mn){var Kn=Mn.disabled,In=Mn.label,Jn=Mn.value,ir=!Rn&&!Kn,fn=In;if(typeof Yt=="number"&&(typeof In=="string"||typeof In=="number")){var Ar=String(fn);Ar.length>Yt&&(fn="".concat(Ar.slice(0,Yt),"..."))}var Dr=function(Ir){Ir&&Ir.stopPropagation(),ii(Mn)};return typeof ar=="function"?dr(Jn,fn,Kn,ir,Dr):Xn(Mn,fn,Kn,ir,Dr)},Qn=function(Mn){if(!Qt.length)return null;var Kn=typeof Mr=="function"?Mr(Mn):Mr;return typeof ar=="function"?dr(void 0,Kn,!1,!1,void 0,!0):Xn({title:Kn},Kn,!1)},mn=Se.createElement("div",{className:"".concat(Vt,"-search"),style:{width:Di},onFocus:function(){pn(!0)},onBlur:function(){pn(!1)}},Se.createElement(ot,{ref:er,open:Fn,prefixCls:Tn,id:Dn,inputElement:null,disabled:Rn,autoFocus:br,autoComplete:Pn,editable:On,activeDescendantId:fr,value:st,onKeyDown:ti,onMouseDown:yr,onChange:pi,onPaste:ei,onCompositionStart:on,onCompositionEnd:sr,onBlur:un,tabIndex:si,attrs:(0,Te.Z)(Ut,!0)}),Se.createElement("span",{ref:gr,className:"".concat(Vt,"-search-mirror"),"aria-hidden":!0},st,"\xA0")),zn=Se.createElement(Ne.Z,{prefixCls:"".concat(Vt,"-overflow"),data:Qt,renderItem:ur,renderRest:Qn,suffix:mn,itemKey:ct,maxCount:zi});return Se.createElement("span",{className:"".concat(Vt,"-wrap")},zn,!Qt.length&&!st&&Se.createElement("span",{className:"".concat(Vt,"-placeholder")},Un))},Lt=ht,dt=function(Ut){var Dn=Ut.inputElement,Tn=Ut.prefixCls,Qt=Ut.id,Fn=Ut.inputRef,vr=Ut.disabled,mr=Ut.autoFocus,er=Ut.autoComplete,Un=Ut.activeDescendantId,Rn=Ut.mode,$n=Ut.open,Fr=Ut.values,br=Ut.placeholder,Pn=Ut.tabIndex,fr=Ut.showSearch,si=Ut.searchValue,xi=Ut.activeValue,zi=Ut.maxLength,Yt=Ut.onInputKeyDown,Pr=Ut.onInputMouseDown,Mr=Ut.onInputChange,ar=Ut.onInputPaste,mi=Ut.onInputCompositionStart,ii=Ut.onInputCompositionEnd,pi=Ut.onInputBlur,ei=Ut.title,ti=Se.useState(!1),yr=(0,Ie.Z)(ti,2),on=yr[0],sr=yr[1],un=Rn==="combobox",gr=un||fr,Kr=Fr[0],Yr=si||"";un&&xi&&!on&&(Yr=xi),Se.useEffect(function(){un&&sr(!1)},[un,xi]);var Di=Rn!=="combobox"&&!$n&&!fr?!1:!!Yr,oi=ei===void 0?wt(Kr):ei,Zr=Se.useMemo(function(){return Kr?null:Se.createElement("span",{className:"".concat(Tn,"-selection-placeholder"),style:Di?{visibility:"hidden"}:void 0},br)},[Kr,Di,br,Tn]);return Se.createElement("span",{className:"".concat(Tn,"-selection-wrap")},Se.createElement("span",{className:"".concat(Tn,"-selection-search")},Se.createElement(ot,{ref:Fn,prefixCls:Tn,id:Qt,open:$n,inputElement:Dn,disabled:vr,autoFocus:mr,autoComplete:er,editable:gr,activeDescendantId:Un,value:Yr,onKeyDown:Yt,onMouseDown:Pr,onChange:function(Jt){sr(!0),Mr(Jt)},onPaste:ar,onCompositionStart:mi,onCompositionEnd:ii,onBlur:pi,tabIndex:Pn,attrs:(0,Te.Z)(Ut,!0),maxLength:un?zi:void 0})),!un&&Kr?Se.createElement("span",{className:"".concat(Tn,"-selection-item"),title:oi,style:Di?{visibility:"hidden"}:void 0},Kr.label):null,Zr)},mt=dt,Et=function(Ut,Dn){var Tn=(0,Se.useRef)(null),Qt=(0,Se.useRef)(!1),Fn=Ut.prefixCls,vr=Ut.open,mr=Ut.mode,er=Ut.showSearch,Un=Ut.tokenWithEnter,Rn=Ut.disabled,$n=Ut.prefix,Fr=Ut.autoClearSearchValue,br=Ut.onSearch,Pn=Ut.onSearchSubmit,fr=Ut.onToggleOpen,si=Ut.onInputKeyDown,xi=Ut.onInputBlur,zi=Ut.domRef;Se.useImperativeHandle(Dn,function(){return{focus:function(oi){Tn.current.focus(oi)},blur:function(){Tn.current.blur()}}});var Yt=xe(0),Pr=(0,Ie.Z)(Yt,2),Mr=Pr[0],ar=Pr[1],mi=function(oi){var Zr=oi.which,Wi=Tn.current instanceof HTMLTextAreaElement;!Wi&&vr&&(Zr===De.Z.UP||Zr===De.Z.DOWN)&&oi.preventDefault(),si&&si(oi),Zr===De.Z.ENTER&&mr==="tags"&&!Qt.current&&!vr&&(Pn==null||Pn(oi.target.value)),!(Wi&&!vr&&~[De.Z.UP,De.Z.DOWN,De.Z.LEFT,De.Z.RIGHT].indexOf(Zr))&&Fe(Zr)&&fr(!0)},ii=function(){ar(!0)},pi=(0,Se.useRef)(null),ei=function(oi){br(oi,!0,Qt.current)!==!1&&fr(!0)},ti=function(){Qt.current=!0},yr=function(oi){Qt.current=!1,mr!=="combobox"&&ei(oi.target.value)},on=function(oi){var Zr=oi.target.value;if(Un&&pi.current&&/[\r\n]/.test(pi.current)){var Wi=pi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Zr=Zr.replace(Wi,pi.current)}pi.current=null,ei(Zr)},sr=function(oi){var Zr=oi.clipboardData,Wi=Zr==null?void 0:Zr.getData("text");pi.current=Wi||""},un=function(oi){var Zr=oi.target;if(Zr!==Tn.current){var Wi=document.body.style.msTouchAction!==void 0;Wi?setTimeout(function(){Tn.current.focus()}):Tn.current.focus()}},gr=function(oi){var Zr=Mr();oi.target!==Tn.current&&!Zr&&!(mr==="combobox"&&Rn)&&oi.preventDefault(),(mr!=="combobox"&&(!er||!Zr)||!vr)&&(vr&&Fr!==!1&&br("",!0,!1),fr())},Kr={inputRef:Tn,onInputKeyDown:mi,onInputMouseDown:ii,onInputChange:on,onInputPaste:sr,onInputCompositionStart:ti,onInputCompositionEnd:yr,onInputBlur:xi},Yr=mr==="multiple"||mr==="tags"?Se.createElement(Lt,(0,at.Z)({},Ut,Kr)):Se.createElement(mt,(0,at.Z)({},Ut,Kr));return Se.createElement("div",{ref:zi,className:"".concat(Fn,"-selector"),onClick:un,onMouseDown:gr},$n&&Se.createElement("div",{className:"".concat(Fn,"-prefix")},$n),Yr)},gt=Se.forwardRef(Et),$e=gt,He=ft(65030),we=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Le=function(Ut){var Dn=Ut===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Dn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Dn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Dn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Dn,adjustY:1},htmlRegion:"scroll"}}},We=function(Ut,Dn){var Tn=Ut.prefixCls,Qt=Ut.disabled,Fn=Ut.visible,vr=Ut.children,mr=Ut.popupElement,er=Ut.animation,Un=Ut.transitionName,Rn=Ut.dropdownStyle,$n=Ut.dropdownClassName,Fr=Ut.direction,br=Fr===void 0?"ltr":Fr,Pn=Ut.placement,fr=Ut.builtinPlacements,si=Ut.dropdownMatchSelectWidth,xi=Ut.dropdownRender,zi=Ut.dropdownAlign,Yt=Ut.getPopupContainer,Pr=Ut.empty,Mr=Ut.getTriggerDOMNode,ar=Ut.onPopupVisibleChange,mi=Ut.onPopupMouseEnter,ii=(0,de.Z)(Ut,we),pi="".concat(Tn,"-dropdown"),ei=mr;xi&&(ei=xi(mr));var ti=Se.useMemo(function(){return fr||Le(si)},[fr,si]),yr=er?"".concat(pi,"-").concat(er):Un,on=typeof si=="number",sr=Se.useMemo(function(){return on?null:si===!1?"minWidth":"width"},[si,on]),un=Rn;on&&(un=(0,Ue.Z)((0,Ue.Z)({},un),{},{width:si}));var gr=Se.useRef(null);return Se.useImperativeHandle(Dn,function(){return{getPopupElement:function(){var Yr;return(Yr=gr.current)===null||Yr===void 0?void 0:Yr.popupElement}}}),Se.createElement(He.Z,(0,at.Z)({},ii,{showAction:ar?["click"]:[],hideAction:ar?["click"]:[],popupPlacement:Pn||(br==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ti,prefixCls:pi,popupTransitionName:yr,popup:Se.createElement("div",{onMouseEnter:mi},ei),ref:gr,stretch:sr,popupAlign:zi,popupVisible:Fn,getPopupContainer:Yt,popupClassName:me()($n,(0,oe.Z)({},"".concat(pi,"-empty"),Pr)),popupStyle:un,getTriggerDOMNode:Mr,onPopupVisibleChange:ar}),vr)},tt=Se.forwardRef(We),Re=tt,_e=ft(57879);function Ve(Ot,Ut){var Dn=Ot.key,Tn;return"value"in Ot&&(Tn=Ot.value),Dn!=null?Dn:Tn!==void 0?Tn:"rc-index-key-".concat(Ut)}function it(Ot){return typeof Ot!="undefined"&&!Number.isNaN(Ot)}function yt(Ot,Ut){var Dn=Ot||{},Tn=Dn.label,Qt=Dn.value,Fn=Dn.options,vr=Dn.groupLabel,mr=Tn||(Ut?"children":"label");return{label:mr,value:Qt||"value",options:Fn||"options",groupLabel:vr||mr}}function Pt(Ot){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Dn=Ut.fieldNames,Tn=Ut.childrenAsData,Qt=[],Fn=yt(Dn,!1),vr=Fn.label,mr=Fn.value,er=Fn.options,Un=Fn.groupLabel;function Rn($n,Fr){Array.isArray($n)&&$n.forEach(function(br){if(Fr||!(er in br)){var Pn=br[mr];Qt.push({key:Ve(br,Qt.length),groupOption:Fr,data:br,label:br[vr],value:Pn})}else{var fr=br[Un];fr===void 0&&Tn&&(fr=br.label),Qt.push({key:Ve(br,Qt.length),group:!0,data:br,label:fr}),Rn(br[er],!0)}})}return Rn(Ot,!1),Qt}function jt(Ot){var Ut=(0,Ue.Z)({},Ot);return"props"in Ut||Object.defineProperty(Ut,"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`."),Ut}}),Ut}var Nt=function(Ut,Dn,Tn){if(!Dn||!Dn.length)return null;var Qt=!1,Fn=function mr(er,Un){var Rn=(0,_e.Z)(Un),$n=Rn[0],Fr=Rn.slice(1);if(!$n)return[er];var br=er.split($n);return Qt=Qt||br.length>1,br.reduce(function(Pn,fr){return[].concat((0,Gt.Z)(Pn),(0,Gt.Z)(mr(fr,Fr)))},[]).filter(Boolean)},vr=Fn(Ut,Dn);return Qt?typeof Tn!="undefined"?vr.slice(0,Tn):vr:null},Bt=Se.createContext(null),$t=Bt;function en(Ot){var Ut=Ot.visible,Dn=Ot.values;if(!Ut)return null;var Tn=50;return Se.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Dn.slice(0,Tn).map(function(Qt){var Fn=Qt.label,vr=Qt.value;return["number","string"].includes((0,ve.Z)(Fn))?Fn:vr}).join(", ")),Dn.length>Tn?", ...":null)}var qt=["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"],Zt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],hn=function(Ut){return Ut==="tags"||Ut==="multiple"},an=Se.forwardRef(function(Ot,Ut){var Dn,Tn=Ot.id,Qt=Ot.prefixCls,Fn=Ot.className,vr=Ot.showSearch,mr=Ot.tagRender,er=Ot.direction,Un=Ot.omitDomProps,Rn=Ot.displayValues,$n=Ot.onDisplayValuesChange,Fr=Ot.emptyOptions,br=Ot.notFoundContent,Pn=br===void 0?"Not Found":br,fr=Ot.onClear,si=Ot.mode,xi=Ot.disabled,zi=Ot.loading,Yt=Ot.getInputElement,Pr=Ot.getRawInputElement,Mr=Ot.open,ar=Ot.defaultOpen,mi=Ot.onDropdownVisibleChange,ii=Ot.activeValue,pi=Ot.onActiveValueChange,ei=Ot.activeDescendantId,ti=Ot.searchValue,yr=Ot.autoClearSearchValue,on=Ot.onSearch,sr=Ot.onSearchSplit,un=Ot.tokenSeparators,gr=Ot.allowClear,Kr=Ot.prefix,Yr=Ot.suffixIcon,Di=Ot.clearIcon,oi=Ot.OptionList,Zr=Ot.animation,Wi=Ot.transitionName,Jt=Ot.dropdownStyle,pn=Ot.dropdownClassName,Vt=Ot.dropdownMatchSelectWidth,st=Ot.dropdownRender,On=Ot.dropdownAlign,Xn=Ot.placement,dr=Ot.builtinPlacements,ur=Ot.getPopupContainer,Qn=Ot.showAction,mn=Qn===void 0?[]:Qn,zn=Ot.onFocus,Vn=Ot.onBlur,Mn=Ot.onKeyUp,Kn=Ot.onKeyDown,In=Ot.onMouseDown,Jn=(0,de.Z)(Ot,qt),ir=hn(si),fn=(vr!==void 0?vr:ir)||si==="combobox",Ar=(0,Ue.Z)({},Jn);Zt.forEach(function(oo){delete Ar[oo]}),Un==null||Un.forEach(function(oo){delete Ar[oo]});var Dr=Se.useState(!1),fi=(0,Ie.Z)(Dr,2),Ir=fi[0],Mi=fi[1];Se.useEffect(function(){Mi((0,fe.Z)())},[]);var Pi=Se.useRef(null),Bi=Se.useRef(null),ki=Se.useRef(null),Hi=Se.useRef(null),qi=Se.useRef(null),Xt=Se.useRef(!1),Ni=pe(),gi=(0,Ie.Z)(Ni,3),Jr=gi[0],Hr=gi[1],Ti=gi[2];Se.useImperativeHandle(Ut,function(){var oo,Qi;return{focus:(oo=Hi.current)===null||oo===void 0?void 0:oo.focus,blur:(Qi=Hi.current)===null||Qi===void 0?void 0:Qi.blur,scrollTo:function(Cr){var da;return(da=qi.current)===null||da===void 0?void 0:da.scrollTo(Cr)},nativeElement:Pi.current||Bi.current}});var Gi=Se.useMemo(function(){var oo;if(si!=="combobox")return ti;var Qi=(oo=Rn[0])===null||oo===void 0?void 0:oo.value;return typeof Qi=="string"||typeof Qi=="number"?String(Qi):""},[ti,si,Rn]),_i=si==="combobox"&&typeof Yt=="function"&&Yt()||null,li=typeof Pr=="function"&&Pr(),Ji=(0,z.x1)(Bi,li==null||(Dn=li.props)===null||Dn===void 0?void 0:Dn.ref),_o=Se.useState(!1),fa=(0,Ie.Z)(_o,2),bs=fa[0],wa=fa[1];(0,Pe.Z)(function(){wa(!0)},[]);var Wr=(0,Ee.Z)(!1,{defaultValue:ar,value:Mr}),bo=(0,Ie.Z)(Wr,2),Po=bo[0],ta=bo[1],Ao=bs?Po:!1,Vo=!Pn&&Fr;(xi||Vo&&Ao&&si==="combobox")&&(Ao=!1);var or=Vo?!1:Ao,_r=Se.useCallback(function(oo){var Qi=oo!==void 0?oo:!Ao;xi||(ta(Qi),Ao!==Qi&&(mi==null||mi(Qi)))},[xi,Ao,ta,mi]),ni=Se.useMemo(function(){return(un||[]).some(function(oo){return[`
`,`\r
`].includes(oo)})},[un]),bi=Se.useContext($t)||{},Ai=bi.maxCount,no=bi.rawValues,Gr=function(Qi,sa,Cr){if(!(ir&&it(Ai)&&(no==null?void 0:no.size)>=Ai)){var da=!0,zt=Qi;pi==null||pi(null);var bn=Nt(Qi,un,it(Ai)?Ai-no.size:void 0),Ws=Cr?null:bn;return si!=="combobox"&&Ws&&(zt="",sr==null||sr(Ws),_r(!1),da=!1),on&&Gi!==zt&&on(zt,{source:sa?"typing":"effect"}),da}},Aa=function(Qi){!Qi||!Qi.trim()||on(Qi,{source:"submit"})};Se.useEffect(function(){!Ao&&!ir&&si!=="combobox"&&Gr("",!1,!1)},[Ao]),Se.useEffect(function(){Po&&xi&&ta(!1),xi&&!Xt.current&&Hr(!1)},[xi]);var zo=xe(),jo=(0,Ie.Z)(zo,2),Ri=jo[0],Ko=jo[1],ja=Se.useRef(!1),vo=function(Qi){var sa=Ri(),Cr=Qi.key,da=Cr==="Enter";if(da&&(si!=="combobox"&&Qi.preventDefault(),Ao||_r(!0)),Ko(!!Gi),Cr==="Backspace"&&!sa&&ir&&!Gi&&Rn.length){for(var zt=(0,Gt.Z)(Rn),bn=null,Ws=zt.length-1;Ws>=0;Ws-=1){var jl=zt[Ws];if(!jl.disabled){zt.splice(Ws,1),bn=jl;break}}bn&&$n(zt,{type:"remove",values:[bn]})}for(var $o=arguments.length,ba=new Array($o>1?$o-1:0),Fs=1;Fs<$o;Fs++)ba[Fs-1]=arguments[Fs];if(Ao&&(!da||!ja.current)){var ol;da&&(ja.current=!0),(ol=qi.current)===null||ol===void 0||ol.onKeyDown.apply(ol,[Qi].concat(ba))}Kn==null||Kn.apply(void 0,[Qi].concat(ba))},fs=function(Qi){for(var sa=arguments.length,Cr=new Array(sa>1?sa-1:0),da=1;da<sa;da++)Cr[da-1]=arguments[da];if(Ao){var zt;(zt=qi.current)===null||zt===void 0||zt.onKeyUp.apply(zt,[Qi].concat(Cr))}Qi.key==="Enter"&&(ja.current=!1),Mn==null||Mn.apply(void 0,[Qi].concat(Cr))},ds=function(Qi){var sa=Rn.filter(function(Cr){return Cr!==Qi});$n(sa,{type:"remove",values:[Qi]})},Ps=function(){ja.current=!1},na=Se.useRef(!1),eh=function(){Hr(!0),xi||(zn&&!na.current&&zn.apply(void 0,arguments),mn.includes("focus")&&_r(!0)),na.current=!0},ju=function(){Xt.current=!0,Hr(!1,function(){na.current=!1,Xt.current=!1,_r(!1)}),!xi&&(Gi&&(si==="tags"?on(Gi,{source:"submit"}):si==="multiple"&&on("",{source:"blur"})),Vn&&Vn.apply(void 0,arguments))},il=[];Se.useEffect(function(){return function(){il.forEach(function(oo){return clearTimeout(oo)}),il.splice(0,il.length)}},[]);var Sl=function(Qi){var sa,Cr=Qi.target,da=(sa=ki.current)===null||sa===void 0?void 0:sa.getPopupElement();if(da&&da.contains(Cr)){var zt=setTimeout(function(){var $o=il.indexOf(zt);if($o!==-1&&il.splice($o,1),Ti(),!Ir&&!da.contains(document.activeElement)){var ba;(ba=Hi.current)===null||ba===void 0||ba.focus()}});il.push(zt)}for(var bn=arguments.length,Ws=new Array(bn>1?bn-1:0),jl=1;jl<bn;jl++)Ws[jl-1]=arguments[jl];In==null||In.apply(void 0,[Qi].concat(Ws))},Os=Se.useState({}),Kl=(0,Ie.Z)(Os,2),th=Kl[1];function nh(){th({})}var Zo;li&&(Zo=function(Qi){_r(Qi)}),Ae(function(){var oo;return[Pi.current,(oo=ki.current)===null||oo===void 0?void 0:oo.getPopupElement()]},or,_r,!!li);var Ou=Se.useMemo(function(){return(0,Ue.Z)((0,Ue.Z)({},Ot),{},{notFoundContent:Pn,open:Ao,triggerOpen:or,id:Tn,showSearch:fn,multiple:ir,toggleOpen:_r})},[Ot,Pn,or,Ao,Tn,fn,ir,_r]),rh=!!Yr||zi,Zl;rh&&(Zl=Se.createElement(se,{className:me()("".concat(Qt,"-arrow"),(0,oe.Z)({},"".concat(Qt,"-arrow-loading"),zi)),customizeIcon:Yr,customizeIconProps:{loading:zi,searchValue:Gi,open:Ao,focused:Jr,showSearch:fn}}));var uu=function(){var Qi;fr==null||fr(),(Qi=Hi.current)===null||Qi===void 0||Qi.focus(),$n([],{type:"clear",values:Rn}),Gr("",!1,!1)},Ca=ie(Qt,uu,Rn,gr,Di,xi,Gi,si),Oa=Ca.allowClear,aa=Ca.clearIcon,ga=Se.createElement(oi,{ref:qi}),Xl=me()(Qt,Fn,(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(Qt,"-focused"),Jr),"".concat(Qt,"-multiple"),ir),"".concat(Qt,"-single"),!ir),"".concat(Qt,"-allow-clear"),gr),"".concat(Qt,"-show-arrow"),rh),"".concat(Qt,"-disabled"),xi),"".concat(Qt,"-loading"),zi),"".concat(Qt,"-open"),Ao),"".concat(Qt,"-customize-input"),_i),"".concat(Qt,"-show-search"),fn)),Ga=Se.createElement(Re,{ref:ki,disabled:xi,prefixCls:Qt,visible:or,popupElement:ga,animation:Zr,transitionName:Wi,dropdownStyle:Jt,dropdownClassName:pn,direction:er,dropdownMatchSelectWidth:Vt,dropdownRender:st,dropdownAlign:On,placement:Xn,builtinPlacements:dr,getPopupContainer:ur,empty:Fr,getTriggerDOMNode:function(Qi){return Bi.current||Qi},onPopupVisibleChange:Zo,onPopupMouseEnter:nh},li?Se.cloneElement(li,{ref:Ji}):Se.createElement($e,(0,at.Z)({},Ot,{domRef:Bi,prefixCls:Qt,inputElement:_i,ref:Hi,id:Tn,prefix:Kr,showSearch:fn,autoClearSearchValue:yr,mode:si,activeDescendantId:ei,tagRender:mr,values:Rn,open:Ao,onToggleOpen:_r,activeValue:ii,searchValue:Gi,onSearch:Gr,onSearchSubmit:Aa,onRemove:ds,tokenWithEnter:ni,onInputBlur:Ps}))),co;return li?co=Ga:co=Se.createElement("div",(0,at.Z)({className:Xl},Ar,{ref:Pi,onMouseDown:Sl,onKeyDown:vo,onKeyUp:fs,onFocus:eh,onBlur:ju}),Se.createElement(en,{visible:Jr&&!Ao,values:Rn}),Ga,Zl,Oa&&aa),Se.createElement(le.Provider,{value:Ou},co)}),cn=an,wn=function(){return null};wn.isSelectOptGroup=!0;var xn=wn,Nn=function(){return null};Nn.isSelectOption=!0;var Zn=Nn,Tr=ft(80547),qn=ft(2738),qr=ft(6790);function nr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var $r=["disabled","title","children","style","className"];function hi(Ot){return typeof Ot=="string"||typeof Ot=="number"}var Si=function(Ut,Dn){var Tn=ce(),Qt=Tn.prefixCls,Fn=Tn.id,vr=Tn.open,mr=Tn.multiple,er=Tn.mode,Un=Tn.searchValue,Rn=Tn.toggleOpen,$n=Tn.notFoundContent,Fr=Tn.onPopupScroll,br=Se.useContext($t),Pn=br.maxCount,fr=br.flattenOptions,si=br.onActiveValue,xi=br.defaultActiveFirstOption,zi=br.onSelect,Yt=br.menuItemSelectedIcon,Pr=br.rawValues,Mr=br.fieldNames,ar=br.virtual,mi=br.direction,ii=br.listHeight,pi=br.listItemHeight,ei=br.optionRender,ti="".concat(Qt,"-item"),yr=(0,Tr.Z)(function(){return fr},[vr,fr],function(Qn,mn){return mn[0]&&Qn[1]!==mn[1]}),on=Se.useRef(null),sr=Se.useMemo(function(){return mr&&it(Pn)&&(Pr==null?void 0:Pr.size)>=Pn},[mr,Pn,Pr==null?void 0:Pr.size]),un=function(mn){mn.preventDefault()},gr=function(mn){var zn;(zn=on.current)===null||zn===void 0||zn.scrollTo(typeof mn=="number"?{index:mn}:mn)},Kr=Se.useCallback(function(Qn){return er==="combobox"?!1:Pr.has(Qn)},[er,(0,Gt.Z)(Pr).toString(),Pr.size]),Yr=function(mn){for(var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Vn=yr.length,Mn=0;Mn<Vn;Mn+=1){var Kn=(mn+Mn*zn+Vn)%Vn,In=yr[Kn]||{},Jn=In.group,ir=In.data;if(!Jn&&!(ir!=null&&ir.disabled)&&(Kr(ir.value)||!sr))return Kn}return-1},Di=Se.useState(function(){return Yr(0)}),oi=(0,Ie.Z)(Di,2),Zr=oi[0],Wi=oi[1],Jt=function(mn){var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Wi(mn);var Vn={source:zn?"keyboard":"mouse"},Mn=yr[mn];if(!Mn){si(null,-1,Vn);return}si(Mn.value,mn,Vn)};(0,Se.useEffect)(function(){Jt(xi!==!1?Yr(0):-1)},[yr.length,Un]);var pn=Se.useCallback(function(Qn){return er==="combobox"?String(Qn).toLowerCase()===Un.toLowerCase():Pr.has(Qn)},[er,Un,(0,Gt.Z)(Pr).toString(),Pr.size]);(0,Se.useEffect)(function(){var Qn=setTimeout(function(){if(!mr&&vr&&Pr.size===1){var zn=Array.from(Pr)[0],Vn=yr.findIndex(function(Mn){var Kn=Mn.data;return Un?String(Kn.value).startsWith(Un):Kn.value===zn});Vn!==-1&&(Jt(Vn),gr(Vn))}});if(vr){var mn;(mn=on.current)===null||mn===void 0||mn.scrollTo(void 0)}return function(){return clearTimeout(Qn)}},[vr,Un]);var Vt=function(mn){mn!==void 0&&zi(mn,{selected:!Pr.has(mn)}),mr||Rn(!1)};if(Se.useImperativeHandle(Dn,function(){return{onKeyDown:function(mn){var zn=mn.which,Vn=mn.ctrlKey;switch(zn){case De.Z.N:case De.Z.P:case De.Z.UP:case De.Z.DOWN:{var Mn=0;if(zn===De.Z.UP?Mn=-1:zn===De.Z.DOWN?Mn=1:nr()&&Vn&&(zn===De.Z.N?Mn=1:zn===De.Z.P&&(Mn=-1)),Mn!==0){var Kn=Yr(Zr+Mn,Mn);gr(Kn),Jt(Kn,!0)}break}case De.Z.TAB:case De.Z.ENTER:{var In,Jn=yr[Zr];Jn&&!(Jn!=null&&(In=Jn.data)!==null&&In!==void 0&&In.disabled)&&!sr?Vt(Jn.value):Vt(void 0),vr&&mn.preventDefault();break}case De.Z.ESC:Rn(!1),vr&&mn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(mn){gr(mn)}}}),yr.length===0)return Se.createElement("div",{role:"listbox",id:"".concat(Fn,"_list"),className:"".concat(ti,"-empty"),onMouseDown:un},$n);var st=Object.keys(Mr).map(function(Qn){return Mr[Qn]}),On=function(mn){return mn.label};function Xn(Qn,mn){var zn=Qn.group;return{role:zn?"presentation":"option",id:"".concat(Fn,"_list_").concat(mn)}}var dr=function(mn){var zn=yr[mn];if(!zn)return null;var Vn=zn.data||{},Mn=Vn.value,Kn=zn.group,In=(0,Te.Z)(Vn,!0),Jn=On(zn);return zn?Se.createElement("div",(0,at.Z)({"aria-label":typeof Jn=="string"&&!Kn?Jn:null},In,{key:mn},Xn(zn,mn),{"aria-selected":pn(Mn)}),Mn):null},ur={role:"listbox",id:"".concat(Fn,"_list")};return Se.createElement(Se.Fragment,null,ar&&Se.createElement("div",(0,at.Z)({},ur,{style:{height:0,width:0,overflow:"hidden"}}),dr(Zr-1),dr(Zr),dr(Zr+1)),Se.createElement(qr.Z,{itemKey:"key",ref:on,data:yr,height:ii,itemHeight:pi,fullHeight:!1,onMouseDown:un,onScroll:Fr,virtual:ar,direction:mi,innerProps:ar?null:ur},function(Qn,mn){var zn=Qn.group,Vn=Qn.groupOption,Mn=Qn.data,Kn=Qn.label,In=Qn.value,Jn=Mn.key;if(zn){var ir,fn=(ir=Mn.title)!==null&&ir!==void 0?ir:hi(Kn)?Kn.toString():void 0;return Se.createElement("div",{className:me()(ti,"".concat(ti,"-group"),Mn.className),title:fn},Kn!==void 0?Kn:Jn)}var Ar=Mn.disabled,Dr=Mn.title,fi=Mn.children,Ir=Mn.style,Mi=Mn.className,Pi=(0,de.Z)(Mn,$r),Bi=(0,qn.Z)(Pi,st),ki=Kr(In),Hi=Ar||!ki&&sr,qi="".concat(ti,"-option"),Xt=me()(ti,qi,Mi,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(qi,"-grouped"),Vn),"".concat(qi,"-active"),Zr===mn&&!Hi),"".concat(qi,"-disabled"),Hi),"".concat(qi,"-selected"),ki)),Ni=On(Qn),gi=!Yt||typeof Yt=="function"||ki,Jr=typeof Ni=="number"?Ni:Ni||In,Hr=hi(Jr)?Jr.toString():void 0;return Dr!==void 0&&(Hr=Dr),Se.createElement("div",(0,at.Z)({},(0,Te.Z)(Bi),ar?{}:Xn(Qn,mn),{"aria-selected":pn(In),className:Xt,title:Hr,onMouseMove:function(){Zr===mn||Hi||Jt(mn)},onClick:function(){Hi||Vt(In)},style:Ir}),Se.createElement("div",{className:"".concat(qi,"-content")},typeof ei=="function"?ei(Qn,{index:mn}):Jr),Se.isValidElement(Yt)||ki,gi&&Se.createElement(se,{className:"".concat(ti,"-option-state"),customizeIcon:Yt,customizeIconProps:{value:In,disabled:Hi,isSelected:ki}},ki?"\u2713":null))}))},Li=Se.forwardRef(Si),Ei=Li,Lr=function(Ot,Ut){var Dn=Se.useRef({values:new Map,options:new Map}),Tn=Se.useMemo(function(){var Fn=Dn.current,vr=Fn.values,mr=Fn.options,er=Ot.map(function($n){if($n.label===void 0){var Fr;return(0,Ue.Z)((0,Ue.Z)({},$n),{},{label:(Fr=vr.get($n.value))===null||Fr===void 0?void 0:Fr.label})}return $n}),Un=new Map,Rn=new Map;return er.forEach(function($n){Un.set($n.value,$n),Rn.set($n.value,Ut.get($n.value)||mr.get($n.value))}),Dn.current.values=Un,Dn.current.options=Rn,er},[Ot,Ut]),Qt=Se.useCallback(function(Fn){return Ut.get(Fn)||Dn.current.options.get(Fn)},[Ut]);return[Tn,Qt]};function Ci(Ot,Ut){return lt(Ot).join("").toUpperCase().includes(Ut)}var et=function(Ot,Ut,Dn,Tn,Qt){return Se.useMemo(function(){if(!Dn||Tn===!1)return Ot;var Fn=Ut.options,vr=Ut.label,mr=Ut.value,er=[],Un=typeof Tn=="function",Rn=Dn.toUpperCase(),$n=Un?Tn:function(br,Pn){return Qt?Ci(Pn[Qt],Rn):Pn[Fn]?Ci(Pn[vr!=="children"?vr:"label"],Rn):Ci(Pn[mr],Rn)},Fr=Un?function(br){return jt(br)}:function(br){return br};return Ot.forEach(function(br){if(br[Fn]){var Pn=$n(Dn,Fr(br));if(Pn)er.push(br);else{var fr=br[Fn].filter(function(si){return $n(Dn,Fr(si))});fr.length&&er.push((0,Ue.Z)((0,Ue.Z)({},br),{},(0,oe.Z)({},Fn,fr)))}return}$n(Dn,Fr(br))&&er.push(br)}),er},[Ot,Tn,Qt,Dn,Ut])},ai=ft(6551),Er=ft(11592),Ln=["children","value"],An=["children"];function Bn(Ot){var Ut=Ot,Dn=Ut.key,Tn=Ut.props,Qt=Tn.children,Fn=Tn.value,vr=(0,de.Z)(Tn,Ln);return(0,Ue.Z)({key:Dn,value:Fn!==void 0?Fn:Dn,children:Qt},vr)}function xr(Ot){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Er.Z)(Ot).map(function(Dn,Tn){if(!Se.isValidElement(Dn)||!Dn.type)return null;var Qt=Dn,Fn=Qt.type.isSelectOptGroup,vr=Qt.key,mr=Qt.props,er=mr.children,Un=(0,de.Z)(mr,An);return Ut||!Fn?Bn(Dn):(0,Ue.Z)((0,Ue.Z)({key:"__RC_SELECT_GRP__".concat(vr===null?Tn:vr,"__"),label:vr},Un),{},{options:xr(er)})}).filter(function(Dn){return Dn})}var zr=function(Ut,Dn,Tn,Qt,Fn){return Se.useMemo(function(){var vr=Ut,mr=!Ut;mr&&(vr=xr(Dn));var er=new Map,Un=new Map,Rn=function(br,Pn,fr){fr&&typeof fr=="string"&&br.set(Pn[fr],Pn)},$n=function Fr(br){for(var Pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fr=0;fr<br.length;fr+=1){var si=br[fr];!si[Tn.options]||Pn?(er.set(si[Tn.value],si),Rn(Un,si,Tn.label),Rn(Un,si,Qt),Rn(Un,si,Fn)):Fr(si[Tn.options],!0)}};return $n(vr),{options:vr,valueOptions:er,labelOptions:Un}},[Ut,Dn,Tn,Qt,Fn])},nn=zr;function sn(Ot){var Ut=Se.useRef();Ut.current=Ot;var Dn=Se.useCallback(function(){return Ut.current.apply(Ut,arguments)},[]);return Dn}function Ht(Ot){var Ut=Ot.mode,Dn=Ot.options,Tn=Ot.children,Qt=Ot.backfill,Fn=Ot.allowClear,vr=Ot.placeholder,mr=Ot.getInputElement,er=Ot.showSearch,Un=Ot.onSearch,Rn=Ot.defaultOpen,$n=Ot.autoFocus,Fr=Ot.labelInValue,br=Ot.value,Pn=Ot.inputValue,fr=Ot.optionLabelProp,si=isMultiple(Ut),xi=er!==void 0?er:si||Ut==="combobox",zi=Dn||convertChildrenToData(Tn);if(warning(Ut!=="tags"||zi.every(function(ar){return!ar.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ut==="tags"||Ut==="combobox"){var Yt=zi.some(function(ar){return ar.options?ar.options.some(function(mi){return typeof("value"in mi?mi.value:mi.key)=="number"}):typeof("value"in ar?ar.value:ar.key)=="number"});warning(!Yt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ut!=="combobox"||!fr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ut==="combobox"||!Qt,"`backfill` only works with `combobox` mode."),warning(Ut==="combobox"||!mr,"`getInputElement` only work with `combobox` mode."),noteOnce(Ut!=="combobox"||!mr||!Fn||!vr,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Un&&!xi&&Ut!=="combobox"&&Ut!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Rn||$n,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),br!=null){var Pr=toArray(br);warning(!Fr||Pr.every(function(ar){return _typeof(ar)==="object"&&("key"in ar||"value"in ar)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!si||Array.isArray(br),"`value` should be array when `mode` is `multiple` or `tags`")}if(Tn){var Mr=null;toNodeArray(Tn).some(function(ar){if(!React.isValidElement(ar)||!ar.type)return!1;var mi=ar,ii=mi.type;if(ii.isSelectOption)return!1;if(ii.isSelectOptGroup){var pi=toNodeArray(ar.props.children).every(function(ei){return!React.isValidElement(ei)||!ar.type||ei.type.isSelectOption?!0:(Mr=ei.type,!1)});return!pi}return Mr=ii,!0}),Mr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Mr.displayName||Mr.name||Mr,"`.")),warning(Pn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function rn(Ot,Ut){if(Ot){var Dn=function Tn(Qt){for(var Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vr=0;vr<Qt.length;vr++){var mr=Qt[vr];if(mr[Ut==null?void 0:Ut.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Fn&&Array.isArray(mr[Ut==null?void 0:Ut.options])&&Tn(mr[Ut==null?void 0:Ut.options],!0))break}};Dn(Ot)}}var tr=null,cr=["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"],Nr=["inputValue"];function ln(Ot){return!Ot||(0,ve.Z)(Ot)!=="object"}var vn=Se.forwardRef(function(Ot,Ut){var Dn=Ot.id,Tn=Ot.mode,Qt=Ot.prefixCls,Fn=Qt===void 0?"rc-select":Qt,vr=Ot.backfill,mr=Ot.fieldNames,er=Ot.inputValue,Un=Ot.searchValue,Rn=Ot.onSearch,$n=Ot.autoClearSearchValue,Fr=$n===void 0?!0:$n,br=Ot.onSelect,Pn=Ot.onDeselect,fr=Ot.dropdownMatchSelectWidth,si=fr===void 0?!0:fr,xi=Ot.filterOption,zi=Ot.filterSort,Yt=Ot.optionFilterProp,Pr=Ot.optionLabelProp,Mr=Ot.options,ar=Ot.optionRender,mi=Ot.children,ii=Ot.defaultActiveFirstOption,pi=Ot.menuItemSelectedIcon,ei=Ot.virtual,ti=Ot.direction,yr=Ot.listHeight,on=yr===void 0?200:yr,sr=Ot.listItemHeight,un=sr===void 0?20:sr,gr=Ot.labelRender,Kr=Ot.value,Yr=Ot.defaultValue,Di=Ot.labelInValue,oi=Ot.onChange,Zr=Ot.maxCount,Wi=(0,de.Z)(Ot,cr),Jt=(0,ai.ZP)(Dn),pn=hn(Tn),Vt=!!(!Mr&&mi),st=Se.useMemo(function(){return xi===void 0&&Tn==="combobox"?!1:xi},[xi,Tn]),On=Se.useMemo(function(){return yt(mr,Vt)},[JSON.stringify(mr),Vt]),Xn=(0,Ee.Z)("",{value:Un!==void 0?Un:er,postState:function(ni){return ni||""}}),dr=(0,Ie.Z)(Xn,2),ur=dr[0],Qn=dr[1],mn=nn(Mr,mi,On,Yt,Pr),zn=mn.valueOptions,Vn=mn.labelOptions,Mn=mn.options,Kn=Se.useCallback(function(_r){var ni=lt(_r);return ni.map(function(bi){var Ai,no,Gr,Aa,zo;if(ln(bi))Ai=bi;else{var jo;Gr=bi.key,no=bi.label,Ai=(jo=bi.value)!==null&&jo!==void 0?jo:Gr}var Ri=zn.get(Ai);if(Ri){var Ko;if(no===void 0&&(no=Ri==null?void 0:Ri[Pr||On.label]),Gr===void 0&&(Gr=(Ko=Ri==null?void 0:Ri.key)!==null&&Ko!==void 0?Ko:Ai),Aa=Ri==null?void 0:Ri.disabled,zo=Ri==null?void 0:Ri.title,0)var ja}return{label:no,value:Ai,key:Gr,disabled:Aa,title:zo}})},[On,Pr,zn]),In=(0,Ee.Z)(Yr,{value:Kr}),Jn=(0,Ie.Z)(In,2),ir=Jn[0],fn=Jn[1],Ar=Se.useMemo(function(){var _r,ni=pn&&ir===null?[]:ir,bi=Kn(ni);return Tn==="combobox"&&nt((_r=bi[0])===null||_r===void 0?void 0:_r.value)?[]:bi},[ir,Kn,Tn,pn]),Dr=Lr(Ar,zn),fi=(0,Ie.Z)(Dr,2),Ir=fi[0],Mi=fi[1],Pi=Se.useMemo(function(){if(!Tn&&Ir.length===1){var _r=Ir[0];if(_r.value===null&&(_r.label===null||_r.label===void 0))return[]}return Ir.map(function(ni){var bi;return(0,Ue.Z)((0,Ue.Z)({},ni),{},{label:(bi=typeof gr=="function"?gr(ni):ni.label)!==null&&bi!==void 0?bi:ni.value})})},[Tn,Ir,gr]),Bi=Se.useMemo(function(){return new Set(Ir.map(function(_r){return _r.value}))},[Ir]);Se.useEffect(function(){if(Tn==="combobox"){var _r,ni=(_r=Ir[0])===null||_r===void 0?void 0:_r.value;Qn(Je(ni)?String(ni):"")}},[Ir]);var ki=sn(function(_r,ni){var bi=ni!=null?ni:_r;return(0,oe.Z)((0,oe.Z)({},On.value,_r),On.label,bi)}),Hi=Se.useMemo(function(){if(Tn!=="tags")return Mn;var _r=(0,Gt.Z)(Mn),ni=function(Ai){return zn.has(Ai)};return(0,Gt.Z)(Ir).sort(function(bi,Ai){return bi.value<Ai.value?-1:1}).forEach(function(bi){var Ai=bi.value;ni(Ai)||_r.push(ki(Ai,bi.label))}),_r},[ki,Mn,zn,Ir,Tn]),qi=et(Hi,On,ur,st,Yt),Xt=Se.useMemo(function(){return Tn!=="tags"||!ur||qi.some(function(_r){return _r[Yt||"value"]===ur})||qi.some(function(_r){return _r[On.value]===ur})?qi:[ki(ur)].concat((0,Gt.Z)(qi))},[ki,Yt,Tn,qi,ur,On]),Ni=function _r(ni){var bi=(0,Gt.Z)(ni).sort(function(Ai,no){return zi(Ai,no,{searchValue:ur})});return bi.map(function(Ai){return Array.isArray(Ai.options)?(0,Ue.Z)((0,Ue.Z)({},Ai),{},{options:Ai.options.length>0?_r(Ai.options):Ai.options}):Ai})},gi=Se.useMemo(function(){return zi?Ni(Xt):Xt},[Xt,zi,ur]),Jr=Se.useMemo(function(){return Pt(gi,{fieldNames:On,childrenAsData:Vt})},[gi,On,Vt]),Hr=function(ni){var bi=Kn(ni);if(fn(bi),oi&&(bi.length!==Ir.length||bi.some(function(Gr,Aa){var zo;return((zo=Ir[Aa])===null||zo===void 0?void 0:zo.value)!==(Gr==null?void 0:Gr.value)}))){var Ai=Di?bi:bi.map(function(Gr){return Gr.value}),no=bi.map(function(Gr){return jt(Mi(Gr.value))});oi(pn?Ai:Ai[0],pn?no:no[0])}},Ti=Se.useState(null),Gi=(0,Ie.Z)(Ti,2),_i=Gi[0],li=Gi[1],Ji=Se.useState(0),_o=(0,Ie.Z)(Ji,2),fa=_o[0],bs=_o[1],wa=ii!==void 0?ii:Tn!=="combobox",Wr=Se.useCallback(function(_r,ni){var bi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ai=bi.source,no=Ai===void 0?"keyboard":Ai;bs(ni),vr&&Tn==="combobox"&&_r!==null&&no==="keyboard"&&li(String(_r))},[vr,Tn]),bo=function(ni,bi,Ai){var no=function(){var ds,Ps=Mi(ni);return[Di?{label:Ps==null?void 0:Ps[On.label],value:ni,key:(ds=Ps==null?void 0:Ps.key)!==null&&ds!==void 0?ds:ni}:ni,jt(Ps)]};if(bi&&br){var Gr=no(),Aa=(0,Ie.Z)(Gr,2),zo=Aa[0],jo=Aa[1];br(zo,jo)}else if(!bi&&Pn&&Ai!=="clear"){var Ri=no(),Ko=(0,Ie.Z)(Ri,2),ja=Ko[0],vo=Ko[1];Pn(ja,vo)}},Po=sn(function(_r,ni){var bi,Ai=pn?ni.selected:!0;Ai?bi=pn?[].concat((0,Gt.Z)(Ir),[_r]):[_r]:bi=Ir.filter(function(no){return no.value!==_r}),Hr(bi),bo(_r,Ai),Tn==="combobox"?li(""):(!hn||Fr)&&(Qn(""),li(""))}),ta=function(ni,bi){Hr(ni);var Ai=bi.type,no=bi.values;(Ai==="remove"||Ai==="clear")&&no.forEach(function(Gr){bo(Gr.value,!1,Ai)})},Ao=function(ni,bi){if(Qn(ni),li(null),bi.source==="submit"){var Ai=(ni||"").trim();if(Ai){var no=Array.from(new Set([].concat((0,Gt.Z)(Bi),[Ai])));Hr(no),bo(Ai,!0),Qn("")}return}bi.source!=="blur"&&(Tn==="combobox"&&Hr(ni),Rn==null||Rn(ni))},Vo=function(ni){var bi=ni;Tn!=="tags"&&(bi=ni.map(function(no){var Gr=Vn.get(no);return Gr==null?void 0:Gr.value}).filter(function(no){return no!==void 0}));var Ai=Array.from(new Set([].concat((0,Gt.Z)(Bi),(0,Gt.Z)(bi))));Hr(Ai),Ai.forEach(function(no){bo(no,!0)})},or=Se.useMemo(function(){var _r=ei!==!1&&si!==!1;return(0,Ue.Z)((0,Ue.Z)({},mn),{},{flattenOptions:Jr,onActiveValue:Wr,defaultActiveFirstOption:wa,onSelect:Po,menuItemSelectedIcon:pi,rawValues:Bi,fieldNames:On,virtual:_r,direction:ti,listHeight:on,listItemHeight:un,childrenAsData:Vt,maxCount:Zr,optionRender:ar})},[Zr,mn,Jr,Wr,wa,Po,pi,Bi,On,ei,si,ti,on,un,Vt,ar]);return Se.createElement($t.Provider,{value:or},Se.createElement(cn,(0,at.Z)({},Wi,{id:Jt,prefixCls:Fn,ref:Ut,omitDomProps:Nr,mode:Tn,displayValues:Pi,onDisplayValuesChange:ta,direction:ti,searchValue:ur,onSearch:Ao,autoClearSearchValue:Fr,onSearchSplit:Vo,dropdownMatchSelectWidth:si,OptionList:Ei,emptyOptions:!Jr.length,activeValue:_i,activeDescendantId:"".concat(Jt,"_list_").concat(fa)})))}),kn=vn;kn.Option=Zn,kn.OptGroup=xn;var Rr=kn,Hn=Rr},63158:function(Gn,jn,ft){"use strict";var at=ft(67711),Gt=ft(52873),oe=ft(16886),Ue=ft(33346),Ie=ft(59301),de=ft(92310),ve=ft.n(de),Ee=ft(18929),ke=ft(10228),Se=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],je=Ie.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,Ae=me.unCheckedChildren,De=me.onClick,Fe=me.onChange,Te=me.onKeyDown,Ne=(0,Ue.Z)(me,Se),Be=(0,Ee.Z)(!1,{value:ie,defaultValue:le}),Ge=(0,oe.Z)(Be,2),Ye=Ge[0],Ke=Ge[1];function Xe(Ct,Je){var nt=Ye;return ce||(nt=Ct,Ke(nt),Fe==null||Fe(nt,Je)),nt}function ot(Ct){Ct.which===ke.Z.LEFT?Xe(!1,Ct):Ct.which===ke.Z.RIGHT&&Xe(!0,Ct),Te==null||Te(Ct)}function lt(Ct){var Je=Xe(!Ye,Ct);De==null||De(Je,Ct)}var ut=ve()(te,se,(fe={},(0,Gt.Z)(fe,"".concat(te,"-checked"),Ye),(0,Gt.Z)(fe,"".concat(te,"-disabled"),ce),fe));return Ie.createElement("button",(0,at.Z)({},Ne,{type:"button",role:"switch","aria-checked":Ye,disabled:ce,className:ut,ref:Pe,onKeyDown:ot,onClick:lt}),pe,Ie.createElement("span",{className:"".concat(te,"-inner")},Ie.createElement("span",{className:"".concat(te,"-inner-checked")},xe),Ie.createElement("span",{className:"".concat(te,"-inner-unchecked")},Ae)))});je.displayName="Switch",jn.Z=je},86351:function(Gn,jn,ft){"use strict";ft.d(jn,{R:function(){return Gt},w:function(){return at}});var at={},Gt="rc-table-internal-hook"},97347:function(Gn,jn,ft){"use strict";ft.d(jn,{L:function(){return te},Z:function(){return pe}});var at=ft(16886),Gt=ft(52873),oe=ft(15142),Ue=ft(26420),Ie=ft(98506),de=ft(33346),ve=ft(11592),Ee=ft(48736),ke=ft(59301),Se=ft(86351),je=ft(54451);function me(xe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Ae=="number"?Ae:Ae.endsWith("%")?xe*parseFloat(Ae)/100:null}function Pe(xe,Ae,De){return ke.useMemo(function(){if(Ae&&Ae>0){var Fe=0,Te=0;xe.forEach(function(lt){var ut=me(Ae,lt.width);ut?Fe+=ut:Te+=1});var Ne=Math.max(Ae,De),Be=Math.max(Ne-Fe,Te),Ge=Te,Ye=Be/Te,Ke=0,Xe=xe.map(function(lt){var ut=(0,Ie.Z)({},lt),Ct=me(Ae,ut.width);if(Ct)ut.width=Ct;else{var Je=Math.floor(Ye);ut.width=Ge===1?Be:Je,Be-=Je,Ge-=1}return Ke+=ut.width,ut});if(Ke<Ne){var ot=Ne/Ke;Be=Ne,Xe.forEach(function(lt,ut){var Ct=Math.floor(lt.width*ot);lt.width=ut===Xe.length-1?Be:Ct,Be-=Ct})}return[Xe,Math.max(Ke,Ne)]}return[xe,Ae]},[xe,Ae,De])}var fe=["children"],z=["fixed"];function te(xe){return(0,ve.Z)(xe).filter(function(Ae){return ke.isValidElement(Ae)}).map(function(Ae){var De=Ae.key,Fe=Ae.props,Te=Fe.children,Ne=(0,de.Z)(Fe,fe),Be=(0,Ie.Z)({key:De},Ne);return Te&&(Be.children=te(Te)),Be})}function se(xe){return xe.filter(function(Ae){return Ae&&(0,Ue.Z)(Ae)==="object"&&!Ae.hidden}).map(function(Ae){var De=Ae.children;return De&&De.length>0?(0,Ie.Z)((0,Ie.Z)({},Ae),{},{children:se(De)}):Ae})}function ie(xe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return xe.filter(function(De){return De&&(0,Ue.Z)(De)==="object"}).reduce(function(De,Fe,Te){var Ne=Fe.fixed,Be=Ne===!0?"left":Ne,Ge="".concat(Ae,"-").concat(Te),Ye=Fe.children;return Ye&&Ye.length>0?[].concat((0,oe.Z)(De),(0,oe.Z)(ie(Ye,Ge).map(function(Ke){return(0,Ie.Z)({fixed:Be},Ke)}))):[].concat((0,oe.Z)(De),[(0,Ie.Z)((0,Ie.Z)({key:Ge},Fe),{},{fixed:Be})])},[])}function le(xe){return xe.map(function(Ae){var De=Ae.fixed,Fe=(0,de.Z)(Ae,z),Te=De;return De==="left"?Te="right":De==="right"&&(Te="left"),(0,Ie.Z)({fixed:Te},Fe)})}function ce(xe,Ae){var De=xe.prefixCls,Fe=xe.columns,Te=xe.children,Ne=xe.expandable,Be=xe.expandedKeys,Ge=xe.columnTitle,Ye=xe.getRowKey,Ke=xe.onTriggerExpand,Xe=xe.expandIcon,ot=xe.rowExpandable,lt=xe.expandIconColumnIndex,ut=xe.direction,Ct=xe.expandRowByClick,Je=xe.columnWidth,nt=xe.fixed,St=xe.scrollWidth,wt=xe.clientWidth,bt=ke.useMemo(function(){var $e=Fe||te(Te)||[];return se($e.slice())},[Fe,Te]),ct=ke.useMemo(function(){if(Ne){var $e=bt.slice();if(!$e.includes(Se.w)){var He=lt||0;He>=0&&(He||nt==="left"||!nt)&&$e.splice(He,0,Se.w),nt==="right"&&$e.splice(bt.length,0,Se.w)}var we=$e.indexOf(Se.w);$e=$e.filter(function(Re,_e){return Re!==Se.w||_e===we});var Le=bt[we],We;nt?We=nt:We=Le?Le.fixed:null;var tt=(0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)({},je.v,{className:"".concat(De,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Ge),"fixed",We),"className","".concat(De,"-row-expand-icon-cell")),"width",Je),"render",function(_e,Ve,it){var yt=Ye(Ve,it),Pt=Be.has(yt),jt=ot?ot(Ve):!0,Nt=Xe({prefixCls:De,expanded:Pt,expandable:jt,record:Ve,onExpand:Ke});return Ct?ke.createElement("span",{onClick:function($t){return $t.stopPropagation()}},Nt):Nt});return $e.map(function(Re){return Re===Se.w?tt:Re})}return bt.filter(function(Re){return Re!==Se.w})},[Ne,bt,Ye,Be,Xe,ut]),vt=ke.useMemo(function(){var $e=ct;return Ae&&($e=Ae($e)),$e.length||($e=[{render:function(){return null}}]),$e},[Ae,ct,ut]),ht=ke.useMemo(function(){return ut==="rtl"?le(ie(vt)):ie(vt)},[vt,ut,St]),Lt=ke.useMemo(function(){for(var $e=-1,He=ht.length-1;He>=0;He-=1){var we=ht[He].fixed;if(we==="left"||we===!0){$e=He;break}}if($e>=0)for(var Le=0;Le<=$e;Le+=1){var We=ht[Le].fixed;if(We!=="left"&&We!==!0)return!0}var tt=ht.findIndex(function(Ve){var it=Ve.fixed;return it==="right"});if(tt>=0)for(var Re=tt;Re<ht.length;Re+=1){var _e=ht[Re].fixed;if(_e!=="right")return!0}return!1},[ht]),dt=Pe(ht,St,wt),mt=(0,at.Z)(dt,2),Et=mt[0],gt=mt[1];return[vt,Et,gt,Lt]}var pe=ce},4030:function(Gn,jn,ft){"use strict";ft.d(jn,{w2:function(){return at.w},vP:function(){return hi.v},RQ:function(){return at.R},ER:function(){return yt},Q$:function(){return xi},TN:function(){return oi}});var at=ft(86351),Gt=ft(16886),oe=ft(6089),Ue=ft(34280),Ie=ft(13697),de=ft(59301),ve=ft(4676);function Ee(Jt){var pn=de.createContext(void 0),Vt=function(On){var Xn=On.value,dr=On.children,ur=de.useRef(Xn);ur.current=Xn;var Qn=de.useState(function(){return{getValue:function(){return ur.current},listeners:new Set}}),mn=(0,Gt.Z)(Qn,1),zn=mn[0];return(0,Ue.Z)(function(){(0,ve.unstable_batchedUpdates)(function(){zn.listeners.forEach(function(Vn){Vn(Xn)})})},[Xn]),de.createElement(pn.Provider,{value:zn},dr)};return{Context:pn,Provider:Vt,defaultValue:Jt}}function ke(Jt,pn){var Vt=(0,oe.Z)(typeof pn=="function"?pn:function(Vn){if(pn===void 0)return Vn;if(!Array.isArray(pn))return Vn[pn];var Mn={};return pn.forEach(function(Kn){Mn[Kn]=Vn[Kn]}),Mn}),st=de.useContext(Jt==null?void 0:Jt.Context),On=st||{},Xn=On.listeners,dr=On.getValue,ur=de.useRef();ur.current=Vt(st?dr():Jt==null?void 0:Jt.defaultValue);var Qn=de.useState({}),mn=(0,Gt.Z)(Qn,2),zn=mn[1];return(0,Ue.Z)(function(){if(!st)return;function Vn(Mn){var Kn=Vt(Mn);(0,Ie.Z)(ur.current,Kn,!0)||zn({})}return Xn.add(Vn),function(){Xn.delete(Vn)}},[st]),ur.current}var Se=ft(67711),je=ft(8654);function me(){var Jt=de.createContext(null);function pn(){return de.useContext(Jt)}function Vt(On,Xn){var dr=(0,je.Yr)(On),ur=function(mn,zn){var Vn=dr?{ref:zn}:{},Mn=de.useRef(0),Kn=de.useRef(mn),In=pn();return In!==null?de.createElement(On,(0,Se.Z)({},mn,Vn)):((!Xn||Xn(Kn.current,mn))&&(Mn.current+=1),Kn.current=mn,de.createElement(Jt.Provider,{value:Mn.current},de.createElement(On,(0,Se.Z)({},mn,Vn))))};return dr?de.forwardRef(ur):ur}function st(On,Xn){var dr=(0,je.Yr)(On),ur=function(mn,zn){var Vn=dr?{ref:zn}:{};return pn(),de.createElement(On,(0,Se.Z)({},mn,Vn))};return dr?de.memo(de.forwardRef(ur),Xn):de.memo(ur,Xn)}return{makeImmutable:Vt,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 Ae(Jt,pn){var Vt=React.useRef(0);Vt.current+=1;var st=React.useRef(Jt),On=[];Object.keys(Jt||{}).map(function(dr){var ur;(Jt==null?void 0:Jt[dr])!==((ur=st.current)===null||ur===void 0?void 0:ur[dr])&&On.push(dr)}),st.current=Jt;var Xn=React.useRef([]);return On.length&&(Xn.current=On),React.useDebugValue(Vt.current),React.useDebugValue(Xn.current.join(", ")),pn&&console.log("".concat(pn,":"),Vt.current,Xn.current),Vt.current}var De=null,Fe=null,Te=ft(26420),Ne=ft(98506),Be=ft(52873),Ge=ft(92310),Ye=ft.n(Ge),Ke=ft(80547),Xe=ft(97938),ot=ft(48736),lt=de.createContext({renderWithProps:!1}),ut=lt,Ct="RC_TABLE_KEY";function Je(Jt){return Jt==null?[]:Array.isArray(Jt)?Jt:[Jt]}function nt(Jt){var pn=[],Vt={};return Jt.forEach(function(st){for(var On=st||{},Xn=On.key,dr=On.dataIndex,ur=Xn||Je(dr).join("-")||Ct;Vt[ur];)ur="".concat(ur,"_next");Vt[ur]=!0,pn.push(ur)}),pn}function St(Jt){return Jt!=null}function wt(Jt){return typeof Jt=="number"&&!Number.isNaN(Jt)}function bt(Jt){return Jt&&(0,Te.Z)(Jt)==="object"&&!Array.isArray(Jt)&&!de.isValidElement(Jt)}function ct(Jt,pn,Vt,st,On,Xn){var dr=de.useContext(ut),ur=ce(),Qn=(0,Ke.Z)(function(){if(St(st))return[st];var mn=pn==null||pn===""?[]:Array.isArray(pn)?pn:[pn],zn=(0,Xe.Z)(Jt,mn),Vn=zn,Mn=void 0;if(On){var Kn=On(zn,Jt,Vt);bt(Kn)?(Vn=Kn.children,Mn=Kn.props,dr.renderWithProps=!0):Vn=Kn}return[Vn,Mn]},[ur,Jt,st,pn,On,Vt],function(mn,zn){if(Xn){var Vn=(0,Gt.Z)(mn,2),Mn=Vn[1],Kn=(0,Gt.Z)(zn,2),In=Kn[1];return Xn(In,Mn)}return dr.renderWithProps?!0:!(0,Ie.Z)(mn,zn,!0)});return Qn}function vt(Jt,pn,Vt,st){var On=Jt+pn-1;return Jt<=st&&On>=Vt}function ht(Jt,pn){return ke(xe,function(Vt){var st=vt(Jt,pn||1,Vt.hoverStartRow,Vt.hoverEndRow);return[st,Vt.onHover]})}var Lt=ft(70425),dt=function(pn){var Vt=pn.ellipsis,st=pn.rowType,On=pn.children,Xn,dr=Vt===!0?{showTitle:!0}:Vt;return dr&&(dr.showTitle||st==="header")&&(typeof On=="string"||typeof On=="number"?Xn=On.toString():de.isValidElement(On)&&typeof On.props.children=="string"&&(Xn=On.props.children)),Xn};function mt(Jt){var pn,Vt,st,On,Xn,dr,ur,Qn,mn=Jt.component,zn=Jt.children,Vn=Jt.ellipsis,Mn=Jt.scope,Kn=Jt.prefixCls,In=Jt.className,Jn=Jt.align,ir=Jt.record,fn=Jt.render,Ar=Jt.dataIndex,Dr=Jt.renderIndex,fi=Jt.shouldCellUpdate,Ir=Jt.index,Mi=Jt.rowType,Pi=Jt.colSpan,Bi=Jt.rowSpan,ki=Jt.fixLeft,Hi=Jt.fixRight,qi=Jt.firstFixLeft,Xt=Jt.lastFixLeft,Ni=Jt.firstFixRight,gi=Jt.lastFixRight,Jr=Jt.appendNode,Hr=Jt.additionalProps,Ti=Hr===void 0?{}:Hr,Gi=Jt.isSticky,_i="".concat(Kn,"-cell"),li=ke(xe,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Ji=li.supportSticky,_o=li.allColumnsFixedLeft,fa=li.rowHoverable,bs=ct(ir,Ar,Dr,zn,fn,fi),wa=(0,Gt.Z)(bs,2),Wr=wa[0],bo=wa[1],Po={},ta=typeof ki=="number"&&Ji,Ao=typeof Hi=="number"&&Ji;ta&&(Po.position="sticky",Po.left=ki),Ao&&(Po.position="sticky",Po.right=Hi);var Vo=(pn=(Vt=(st=bo==null?void 0:bo.colSpan)!==null&&st!==void 0?st:Ti.colSpan)!==null&&Vt!==void 0?Vt:Pi)!==null&&pn!==void 0?pn:1,or=(On=(Xn=(dr=bo==null?void 0:bo.rowSpan)!==null&&dr!==void 0?dr:Ti.rowSpan)!==null&&Xn!==void 0?Xn:Bi)!==null&&On!==void 0?On:1,_r=ht(Ir,or),ni=(0,Gt.Z)(_r,2),bi=ni[0],Ai=ni[1],no=(0,Lt.zX)(function(ja){var vo;ir&&Ai(Ir,Ir+or-1),Ti==null||(vo=Ti.onMouseEnter)===null||vo===void 0||vo.call(Ti,ja)}),Gr=(0,Lt.zX)(function(ja){var vo;ir&&Ai(-1,-1),Ti==null||(vo=Ti.onMouseLeave)===null||vo===void 0||vo.call(Ti,ja)});if(Vo===0||or===0)return null;var Aa=(ur=Ti.title)!==null&&ur!==void 0?ur:dt({rowType:Mi,ellipsis:Vn,children:Wr}),zo=Ye()(_i,In,(Qn={},(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)(Qn,"".concat(_i,"-fix-left"),ta&&Ji),"".concat(_i,"-fix-left-first"),qi&&Ji),"".concat(_i,"-fix-left-last"),Xt&&Ji),"".concat(_i,"-fix-left-all"),Xt&&_o&&Ji),"".concat(_i,"-fix-right"),Ao&&Ji),"".concat(_i,"-fix-right-first"),Ni&&Ji),"".concat(_i,"-fix-right-last"),gi&&Ji),"".concat(_i,"-ellipsis"),Vn),"".concat(_i,"-with-append"),Jr),"".concat(_i,"-fix-sticky"),(ta||Ao)&&Gi&&Ji),(0,Be.Z)(Qn,"".concat(_i,"-row-hover"),!bo&&bi)),Ti.className,bo==null?void 0:bo.className),jo={};Jn&&(jo.textAlign=Jn);var Ri=(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({},bo==null?void 0:bo.style),Po),jo),Ti.style),Ko=Wr;return(0,Te.Z)(Ko)==="object"&&!Array.isArray(Ko)&&!de.isValidElement(Ko)&&(Ko=null),Vn&&(Xt||Ni)&&(Ko=de.createElement("span",{className:"".concat(_i,"-content")},Ko)),de.createElement(mn,(0,Se.Z)({},bo,Ti,{className:zo,style:Ri,title:Aa,scope:Mn,onMouseEnter:fa?no:void 0,onMouseLeave:fa?Gr:void 0,colSpan:Vo!==1?Vo:null,rowSpan:or!==1?or:null}),Jr,Ko)}var Et=de.memo(mt);function gt(Jt,pn,Vt,st,On){var Xn=Vt[Jt]||{},dr=Vt[pn]||{},ur,Qn;Xn.fixed==="left"?ur=st.left[On==="rtl"?pn:Jt]:dr.fixed==="right"&&(Qn=st.right[On==="rtl"?Jt:pn]);var mn=!1,zn=!1,Vn=!1,Mn=!1,Kn=Vt[pn+1],In=Vt[Jt-1],Jn=Kn&&!Kn.fixed||In&&!In.fixed||Vt.every(function(fi){return fi.fixed==="left"});if(On==="rtl"){if(ur!==void 0){var ir=In&&In.fixed==="left";Mn=!ir&&Jn}else if(Qn!==void 0){var fn=Kn&&Kn.fixed==="right";Vn=!fn&&Jn}}else if(ur!==void 0){var Ar=Kn&&Kn.fixed==="left";mn=!Ar&&Jn}else if(Qn!==void 0){var Dr=In&&In.fixed==="right";zn=!Dr&&Jn}return{fixLeft:ur,fixRight:Qn,lastFixLeft:mn,firstFixRight:zn,lastFixRight:Vn,firstFixLeft:Mn,isSticky:st.isSticky}}var $e=de.createContext({}),He=$e;function we(Jt){var pn=Jt.className,Vt=Jt.index,st=Jt.children,On=Jt.colSpan,Xn=On===void 0?1:On,dr=Jt.rowSpan,ur=Jt.align,Qn=ke(xe,["prefixCls","direction"]),mn=Qn.prefixCls,zn=Qn.direction,Vn=de.useContext(He),Mn=Vn.scrollColumnIndex,Kn=Vn.stickyOffsets,In=Vn.flattenColumns,Jn=Vt+Xn-1,ir=Jn+1===Mn?Xn+1:Xn,fn=gt(Vt,Vt+ir-1,In,Kn,zn);return de.createElement(Et,(0,Se.Z)({className:pn,index:Vt,component:"td",prefixCls:mn,record:null,dataIndex:null,align:ur,colSpan:ir,rowSpan:dr,render:function(){return st}},fn))}var Le=ft(33346),We=["children"];function tt(Jt){var pn=Jt.children,Vt=(0,Le.Z)(Jt,We);return de.createElement("tr",Vt,pn)}function Re(Jt){var pn=Jt.children;return pn}Re.Row=tt,Re.Cell=we;var _e=Re;function Ve(Jt){var pn=Jt.children,Vt=Jt.stickyOffsets,st=Jt.flattenColumns,On=ke(xe,"prefixCls"),Xn=st.length-1,dr=st[Xn],ur=de.useMemo(function(){return{stickyOffsets:Vt,flattenColumns:st,scrollColumnIndex:dr!=null&&dr.scrollbar?Xn:null}},[dr,st,Xn,Vt]);return de.createElement(He.Provider,{value:ur},de.createElement("tfoot",{className:"".concat(On,"-summary")},pn))}var it=le(Ve),yt=_e,Pt=ft(29301),jt=ft(24514),Nt=ft(75152),Bt=ft(26112);function $t(Jt,pn,Vt,st,On,Xn,dr){Jt.push({record:pn,indent:Vt,index:dr});var ur=Xn(pn),Qn=On==null?void 0:On.has(ur);if(pn&&Array.isArray(pn[st])&&Qn)for(var mn=0;mn<pn[st].length;mn+=1)$t(Jt,pn[st][mn],Vt+1,st,On,Xn,mn)}function en(Jt,pn,Vt,st){var On=de.useMemo(function(){if(Vt!=null&&Vt.size){for(var Xn=[],dr=0;dr<(Jt==null?void 0:Jt.length);dr+=1){var ur=Jt[dr];$t(Xn,ur,0,pn,Vt,st,dr)}return Xn}return Jt==null?void 0:Jt.map(function(Qn,mn){return{record:Qn,indent:0,index:mn}})},[Jt,pn,Vt,st]);return On}function qt(Jt,pn,Vt,st){var On=ke(xe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Xn=On.flattenColumns,dr=On.expandableType,ur=On.expandedKeys,Qn=On.childrenColumnName,mn=On.onTriggerExpand,zn=On.rowExpandable,Vn=On.onRow,Mn=On.expandRowByClick,Kn=On.rowClassName,In=dr==="nest",Jn=dr==="row"&&(!zn||zn(Jt)),ir=Jn||In,fn=ur&&ur.has(pn),Ar=Qn&&Jt&&Jt[Qn],Dr=(0,Lt.zX)(mn),fi=Vn==null?void 0:Vn(Jt,Vt),Ir=fi==null?void 0:fi.onClick,Mi=function(Hi){Mn&&ir&&mn(Jt,Hi);for(var qi=arguments.length,Xt=new Array(qi>1?qi-1:0),Ni=1;Ni<qi;Ni++)Xt[Ni-1]=arguments[Ni];Ir==null||Ir.apply(void 0,[Hi].concat(Xt))},Pi;typeof Kn=="string"?Pi=Kn:typeof Kn=="function"&&(Pi=Kn(Jt,Vt,st));var Bi=nt(Xn);return(0,Ne.Z)((0,Ne.Z)({},On),{},{columnsKey:Bi,nestExpandable:In,expanded:fn,hasNestChildren:Ar,record:Jt,onTriggerExpand:Dr,rowSupportExpand:Jn,expandable:ir,rowProps:(0,Ne.Z)((0,Ne.Z)({},fi),{},{className:Ye()(Pi,fi==null?void 0:fi.className),onClick:Mi})})}function Zt(Jt){var pn=Jt.prefixCls,Vt=Jt.children,st=Jt.component,On=Jt.cellComponent,Xn=Jt.className,dr=Jt.expanded,ur=Jt.colSpan,Qn=Jt.isEmpty,mn=ke(xe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),zn=mn.scrollbarSize,Vn=mn.fixHeader,Mn=mn.fixColumn,Kn=mn.componentWidth,In=mn.horizonScroll,Jn=Vt;return(Qn?In&&Kn:Mn)&&(Jn=de.createElement("div",{style:{width:Kn-(Vn&&!Qn?zn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(pn,"-expanded-row-fixed")},Jn)),de.createElement(st,{className:Xn,style:{display:dr?null:"none"}},de.createElement(Et,{component:On,prefixCls:pn,colSpan:ur},Jn))}var hn=Zt;function an(Jt){var pn=Jt.prefixCls,Vt=Jt.record,st=Jt.onExpand,On=Jt.expanded,Xn=Jt.expandable,dr="".concat(pn,"-row-expand-icon");if(!Xn)return de.createElement("span",{className:Ye()(dr,"".concat(pn,"-row-spaced"))});var ur=function(mn){st(Vt,mn),mn.stopPropagation()};return de.createElement("span",{className:Ye()(dr,(0,Be.Z)((0,Be.Z)({},"".concat(pn,"-row-expanded"),On),"".concat(pn,"-row-collapsed"),!On)),onClick:ur})}function cn(Jt,pn,Vt){var st=[];function On(Xn){(Xn||[]).forEach(function(dr,ur){st.push(pn(dr,ur)),On(dr[Vt])})}return On(Jt),st}function wn(Jt,pn,Vt,st){return typeof Jt=="string"?Jt:typeof Jt=="function"?Jt(pn,Vt,st):""}function xn(Jt,pn,Vt,st,On){var Xn=Jt.record,dr=Jt.prefixCls,ur=Jt.columnsKey,Qn=Jt.fixedInfoList,mn=Jt.expandIconColumnIndex,zn=Jt.nestExpandable,Vn=Jt.indentSize,Mn=Jt.expandIcon,Kn=Jt.expanded,In=Jt.hasNestChildren,Jn=Jt.onTriggerExpand,ir=ur[Vt],fn=Qn[Vt],Ar;Vt===(mn||0)&&zn&&(Ar=de.createElement(de.Fragment,null,de.createElement("span",{style:{paddingLeft:"".concat(Vn*st,"px")},className:"".concat(dr,"-row-indent indent-level-").concat(st)}),Mn({prefixCls:dr,expanded:Kn,expandable:In,record:Xn,onExpand:Jn})));var Dr;return pn.onCell&&(Dr=pn.onCell(Xn,On)),{key:ir,fixedInfo:fn,appendCellNode:Ar,additionalCellProps:Dr||{}}}function Nn(Jt){var pn=Jt.className,Vt=Jt.style,st=Jt.record,On=Jt.index,Xn=Jt.renderIndex,dr=Jt.rowKey,ur=Jt.indent,Qn=ur===void 0?0:ur,mn=Jt.rowComponent,zn=Jt.cellComponent,Vn=Jt.scopeCellComponent,Mn=qt(st,dr,On,Qn),Kn=Mn.prefixCls,In=Mn.flattenColumns,Jn=Mn.expandedRowClassName,ir=Mn.expandedRowRender,fn=Mn.rowProps,Ar=Mn.expanded,Dr=Mn.rowSupportExpand,fi=de.useRef(!1);fi.current||(fi.current=Ar);var Ir=wn(Jn,st,On,Qn),Mi=de.createElement(mn,(0,Se.Z)({},fn,{"data-row-key":dr,className:Ye()(pn,"".concat(Kn,"-row"),"".concat(Kn,"-row-level-").concat(Qn),fn==null?void 0:fn.className,(0,Be.Z)({},Ir,Qn>=1)),style:(0,Ne.Z)((0,Ne.Z)({},Vt),fn==null?void 0:fn.style)}),In.map(function(ki,Hi){var qi=ki.render,Xt=ki.dataIndex,Ni=ki.className,gi=xn(Mn,ki,Hi,Qn,On),Jr=gi.key,Hr=gi.fixedInfo,Ti=gi.appendCellNode,Gi=gi.additionalCellProps;return de.createElement(Et,(0,Se.Z)({className:Ni,ellipsis:ki.ellipsis,align:ki.align,scope:ki.rowScope,component:ki.rowScope?Vn:zn,prefixCls:Kn,key:Jr,record:st,index:On,renderIndex:Xn,dataIndex:Xt,render:qi,shouldCellUpdate:ki.shouldCellUpdate},Hr,{appendNode:Ti,additionalProps:Gi}))})),Pi;if(Dr&&(fi.current||Ar)){var Bi=ir(st,On,Qn+1,Ar);Pi=de.createElement(hn,{expanded:Ar,className:Ye()("".concat(Kn,"-expanded-row"),"".concat(Kn,"-expanded-row-level-").concat(Qn+1),Ir),prefixCls:Kn,component:mn,cellComponent:zn,colSpan:In.length,isEmpty:!1},Bi)}return de.createElement(de.Fragment,null,Mi,Pi)}var Zn=le(Nn);function Tr(Jt){var pn=Jt.columnKey,Vt=Jt.onColumnResize,st=de.useRef();return(0,Ue.Z)(function(){st.current&&Vt(pn,st.current.offsetWidth)},[]),de.createElement(Pt.Z,{data:pn},de.createElement("td",{ref:st,style:{padding:0,border:0,height:0}},de.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var qn=ft(29194);function qr(Jt){var pn=Jt.prefixCls,Vt=Jt.columnsKey,st=Jt.onColumnResize,On=de.useRef(null);return de.createElement("tr",{"aria-hidden":"true",className:"".concat(pn,"-measure-row"),style:{height:0,fontSize:0},ref:On},de.createElement(Pt.Z.Collection,{onBatchResize:function(dr){(0,qn.Z)(On.current)&&dr.forEach(function(ur){var Qn=ur.data,mn=ur.size;st(Qn,mn.offsetWidth)})}},Vt.map(function(Xn){return de.createElement(Tr,{key:Xn,columnKey:Xn,onColumnResize:st})})))}function nr(Jt){var pn=Jt.data,Vt=Jt.measureColumnWidth,st=ke(xe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),On=st.prefixCls,Xn=st.getComponent,dr=st.onColumnResize,ur=st.flattenColumns,Qn=st.getRowKey,mn=st.expandedKeys,zn=st.childrenColumnName,Vn=st.emptyNode,Mn=en(pn,zn,mn,Qn),Kn=de.useRef({renderWithProps:!1}),In=Xn(["body","wrapper"],"tbody"),Jn=Xn(["body","row"],"tr"),ir=Xn(["body","cell"],"td"),fn=Xn(["body","cell"],"th"),Ar;pn.length?Ar=Mn.map(function(fi,Ir){var Mi=fi.record,Pi=fi.indent,Bi=fi.index,ki=Qn(Mi,Ir);return de.createElement(Zn,{key:ki,rowKey:ki,record:Mi,index:Ir,renderIndex:Bi,rowComponent:Jn,cellComponent:ir,scopeCellComponent:fn,indent:Pi})}):Ar=de.createElement(hn,{expanded:!0,className:"".concat(On,"-placeholder"),prefixCls:On,component:Jn,cellComponent:ir,colSpan:ur.length,isEmpty:!0},Vn);var Dr=nt(ur);return de.createElement(ut.Provider,{value:Kn.current},de.createElement(In,{className:"".concat(On,"-tbody")},Vt&&de.createElement(qr,{prefixCls:On,columnsKey:Dr,onColumnResize:dr}),Ar))}var $r=le(nr),hi=ft(54451),Si=["columnType"];function Li(Jt){for(var pn=Jt.colWidths,Vt=Jt.columns,st=Jt.columCount,On=ke(xe,["tableLayout"]),Xn=On.tableLayout,dr=[],ur=st||Vt.length,Qn=!1,mn=ur-1;mn>=0;mn-=1){var zn=pn[mn],Vn=Vt&&Vt[mn],Mn=void 0,Kn=void 0;if(Vn&&(Mn=Vn[hi.v],Xn==="auto"&&(Kn=Vn.minWidth)),zn||Kn||Mn||Qn){var In=Mn||{},Jn=In.columnType,ir=(0,Le.Z)(In,Si);dr.unshift(de.createElement("col",(0,Se.Z)({key:mn,style:{width:zn,minWidth:Kn}},ir))),Qn=!0}}return de.createElement("colgroup",null,dr)}var Ei=Li,Lr=ft(15142),Ci=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function et(Jt,pn){return(0,de.useMemo)(function(){for(var Vt=[],st=0;st<pn;st+=1){var On=Jt[st];if(On!==void 0)Vt[st]=On;else return null}return Vt},[Jt.join("_"),pn])}var ai=de.forwardRef(function(Jt,pn){var Vt=Jt.className,st=Jt.noData,On=Jt.columns,Xn=Jt.flattenColumns,dr=Jt.colWidths,ur=Jt.columCount,Qn=Jt.stickyOffsets,mn=Jt.direction,zn=Jt.fixHeader,Vn=Jt.stickyTopOffset,Mn=Jt.stickyBottomOffset,Kn=Jt.stickyClassName,In=Jt.onScroll,Jn=Jt.maxContentScroll,ir=Jt.children,fn=(0,Le.Z)(Jt,Ci),Ar=ke(xe,["prefixCls","scrollbarSize","isSticky","getComponent"]),Dr=Ar.prefixCls,fi=Ar.scrollbarSize,Ir=Ar.isSticky,Mi=Ar.getComponent,Pi=Mi(["header","table"],"table"),Bi=Ir&&!zn?0:fi,ki=de.useRef(null),Hi=de.useCallback(function(Gi){(0,je.mH)(pn,Gi),(0,je.mH)(ki,Gi)},[]);de.useEffect(function(){var Gi;function _i(li){var Ji=li,_o=Ji.currentTarget,fa=Ji.deltaX;fa&&(In({currentTarget:_o,scrollLeft:_o.scrollLeft+fa}),li.preventDefault())}return(Gi=ki.current)===null||Gi===void 0||Gi.addEventListener("wheel",_i,{passive:!1}),function(){var li;(li=ki.current)===null||li===void 0||li.removeEventListener("wheel",_i)}},[]);var qi=de.useMemo(function(){return Xn.every(function(Gi){return Gi.width})},[Xn]),Xt=Xn[Xn.length-1],Ni={fixed:Xt?Xt.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Dr,"-cell-scrollbar")}}},gi=(0,de.useMemo)(function(){return Bi?[].concat((0,Lr.Z)(On),[Ni]):On},[Bi,On]),Jr=(0,de.useMemo)(function(){return Bi?[].concat((0,Lr.Z)(Xn),[Ni]):Xn},[Bi,Xn]),Hr=(0,de.useMemo)(function(){var Gi=Qn.right,_i=Qn.left;return(0,Ne.Z)((0,Ne.Z)({},Qn),{},{left:mn==="rtl"?[].concat((0,Lr.Z)(_i.map(function(li){return li+Bi})),[0]):_i,right:mn==="rtl"?Gi:[].concat((0,Lr.Z)(Gi.map(function(li){return li+Bi})),[0]),isSticky:Ir})},[Bi,Qn,Ir]),Ti=et(dr,ur);return de.createElement("div",{style:(0,Ne.Z)({overflow:"hidden"},Ir?{top:Vn,bottom:Mn}:{}),ref:Hi,className:Ye()(Vt,(0,Be.Z)({},Kn,!!Kn))},de.createElement(Pi,{style:{tableLayout:"fixed",visibility:st||Ti?null:"hidden"}},(!st||!Jn||qi)&&de.createElement(Ei,{colWidths:Ti?[].concat((0,Lr.Z)(Ti),[Bi]):[],columCount:ur+1,columns:Jr}),ir((0,Ne.Z)((0,Ne.Z)({},fn),{},{stickyOffsets:Hr,columns:gi,flattenColumns:Jr}))))}),Er=de.memo(ai),Ln=function(pn){var Vt=pn.cells,st=pn.stickyOffsets,On=pn.flattenColumns,Xn=pn.rowComponent,dr=pn.cellComponent,ur=pn.onHeaderRow,Qn=pn.index,mn=ke(xe,["prefixCls","direction"]),zn=mn.prefixCls,Vn=mn.direction,Mn;ur&&(Mn=ur(Vt.map(function(In){return In.column}),Qn));var Kn=nt(Vt.map(function(In){return In.column}));return de.createElement(Xn,Mn,Vt.map(function(In,Jn){var ir=In.column,fn=gt(In.colStart,In.colEnd,On,st,Vn),Ar;return ir&&ir.onHeaderCell&&(Ar=In.column.onHeaderCell(ir)),de.createElement(Et,(0,Se.Z)({},In,{scope:ir.title?In.colSpan>1?"colgroup":"col":null,ellipsis:ir.ellipsis,align:ir.align,component:dr,prefixCls:zn,key:Kn[Jn]},fn,{additionalProps:Ar,rowType:"header"}))}))},An=Ln;function Bn(Jt){var pn=[];function Vt(dr,ur){var Qn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;pn[Qn]=pn[Qn]||[];var mn=ur,zn=dr.filter(Boolean).map(function(Vn){var Mn={key:Vn.key,className:Vn.className||"",children:Vn.title,column:Vn,colStart:mn},Kn=1,In=Vn.children;return In&&In.length>0&&(Kn=Vt(In,mn,Qn+1).reduce(function(Jn,ir){return Jn+ir},0),Mn.hasSubColumns=!0),"colSpan"in Vn&&(Kn=Vn.colSpan),"rowSpan"in Vn&&(Mn.rowSpan=Vn.rowSpan),Mn.colSpan=Kn,Mn.colEnd=Mn.colStart+Kn-1,pn[Qn].push(Mn),mn+=Kn,Kn});return zn}Vt(Jt,0);for(var st=pn.length,On=function(ur){pn[ur].forEach(function(Qn){!("rowSpan"in Qn)&&!Qn.hasSubColumns&&(Qn.rowSpan=st-ur)})},Xn=0;Xn<st;Xn+=1)On(Xn);return pn}var xr=function(pn){var Vt=pn.stickyOffsets,st=pn.columns,On=pn.flattenColumns,Xn=pn.onHeaderRow,dr=ke(xe,["prefixCls","getComponent"]),ur=dr.prefixCls,Qn=dr.getComponent,mn=de.useMemo(function(){return Bn(st)},[st]),zn=Qn(["header","wrapper"],"thead"),Vn=Qn(["header","row"],"tr"),Mn=Qn(["header","cell"],"th");return de.createElement(zn,{className:"".concat(ur,"-thead")},mn.map(function(Kn,In){var Jn=de.createElement(An,{key:In,flattenColumns:On,cells:Kn,stickyOffsets:Vt,rowComponent:Vn,cellComponent:Mn,onHeaderRow:Xn,index:In});return Jn}))},zr=le(xr),nn=ft(97347);function sn(Jt,pn,Vt){var st=(0,hi.g)(Jt),On=st.expandIcon,Xn=st.expandedRowKeys,dr=st.defaultExpandedRowKeys,ur=st.defaultExpandAllRows,Qn=st.expandedRowRender,mn=st.onExpand,zn=st.onExpandedRowsChange,Vn=st.childrenColumnName,Mn=On||an,Kn=Vn||"children",In=de.useMemo(function(){return Qn?"row":Jt.expandable&&Jt.internalHooks===at.R&&Jt.expandable.__PARENT_RENDER_ICON__||pn.some(function(Ir){return Ir&&(0,Te.Z)(Ir)==="object"&&Ir[Kn]})?"nest":!1},[!!Qn,pn]),Jn=de.useState(function(){return dr||(ur?cn(pn,Vt,Kn):[])}),ir=(0,Gt.Z)(Jn,2),fn=ir[0],Ar=ir[1],Dr=de.useMemo(function(){return new Set(Xn||fn||[])},[Xn,fn]),fi=de.useCallback(function(Ir){var Mi=Vt(Ir,pn.indexOf(Ir)),Pi,Bi=Dr.has(Mi);Bi?(Dr.delete(Mi),Pi=(0,Lr.Z)(Dr)):Pi=[].concat((0,Lr.Z)(Dr),[Mi]),Ar(Pi),mn&&mn(!Bi,Ir),zn&&zn(Pi)},[Vt,Dr,pn,mn,zn]);return[st,In,Dr,Mn,Kn,fi]}function Ht(Jt,pn,Vt){var st=Jt.map(function(On,Xn){return gt(Xn,Xn,Jt,pn,Vt)});return(0,Ke.Z)(function(){return st},[st],function(On,Xn){return!(0,Ie.Z)(On,Xn)})}function rn(Jt){var pn=(0,de.useRef)(Jt),Vt=(0,de.useState)({}),st=(0,Gt.Z)(Vt,2),On=st[1],Xn=(0,de.useRef)(null),dr=(0,de.useRef)([]);function ur(Qn){dr.current.push(Qn);var mn=Promise.resolve();Xn.current=mn,mn.then(function(){if(Xn.current===mn){var zn=dr.current,Vn=pn.current;dr.current=[],zn.forEach(function(Mn){pn.current=Mn(pn.current)}),Xn.current=null,Vn!==pn.current&&On({})}})}return(0,de.useEffect)(function(){return function(){Xn.current=null}},[]),[pn.current,ur]}function tr(Jt){var pn=(0,de.useRef)(Jt||null),Vt=(0,de.useRef)();function st(){window.clearTimeout(Vt.current)}function On(dr){pn.current=dr,st(),Vt.current=window.setTimeout(function(){pn.current=null,Vt.current=void 0},100)}function Xn(){return pn.current}return(0,de.useEffect)(function(){return st},[]),[On,Xn]}function cr(){var Jt=de.useState(-1),pn=(0,Gt.Z)(Jt,2),Vt=pn[0],st=pn[1],On=de.useState(-1),Xn=(0,Gt.Z)(On,2),dr=Xn[0],ur=Xn[1],Qn=de.useCallback(function(mn,zn){st(mn),ur(zn)},[]);return[Vt,dr,Qn]}var Nr=ft(47273),ln=(0,Nr.Z)()?window:null;function vn(Jt,pn){var Vt=(0,Te.Z)(Jt)==="object"?Jt:{},st=Vt.offsetHeader,On=st===void 0?0:st,Xn=Vt.offsetSummary,dr=Xn===void 0?0:Xn,ur=Vt.offsetScroll,Qn=ur===void 0?0:ur,mn=Vt.getContainer,zn=mn===void 0?function(){return ln}:mn,Vn=zn()||ln,Mn=!!Jt;return de.useMemo(function(){return{isSticky:Mn,stickyClassName:Mn?"".concat(pn,"-sticky-holder"):"",offsetHeader:On,offsetSummary:dr,offsetScroll:Qn,container:Vn}},[Mn,Qn,On,dr,pn,Vn])}function kn(Jt,pn,Vt){var st=(0,de.useMemo)(function(){var On=pn.length,Xn=function(mn,zn,Vn){for(var Mn=[],Kn=0,In=mn;In!==zn;In+=Vn)Mn.push(Kn),pn[In].fixed&&(Kn+=Jt[In]||0);return Mn},dr=Xn(0,On,1),ur=Xn(On-1,-1,-1).reverse();return Vt==="rtl"?{left:ur,right:dr}:{left:dr,right:ur}},[Jt,pn,Vt]);return st}var Rr=kn;function Hn(Jt){var pn=Jt.className,Vt=Jt.children;return de.createElement("div",{className:pn},Vt)}var Ot=Hn,Ut=ft(8224),Dn=ft(16089),Tn=ft(76846);function Qt(Jt){var pn=(0,Tn.bn)(Jt),Vt=pn.getBoundingClientRect(),st=document.documentElement;return{left:Vt.left+(window.pageXOffset||st.scrollLeft)-(st.clientLeft||document.body.clientLeft||0),top:Vt.top+(window.pageYOffset||st.scrollTop)-(st.clientTop||document.body.clientTop||0)}}var Fn=function(pn,Vt){var st,On,Xn=pn.scrollBodyRef,dr=pn.onScroll,ur=pn.offsetScroll,Qn=pn.container,mn=pn.direction,zn=ke(xe,"prefixCls"),Vn=((st=Xn.current)===null||st===void 0?void 0:st.scrollWidth)||0,Mn=((On=Xn.current)===null||On===void 0?void 0:On.clientWidth)||0,Kn=Vn&&Mn*(Mn/Vn),In=de.useRef(),Jn=rn({scrollLeft:0,isHiddenScrollBar:!0}),ir=(0,Gt.Z)(Jn,2),fn=ir[0],Ar=ir[1],Dr=de.useRef({delta:0,x:0}),fi=de.useState(!1),Ir=(0,Gt.Z)(fi,2),Mi=Ir[0],Pi=Ir[1],Bi=de.useRef(null);de.useEffect(function(){return function(){Dn.Z.cancel(Bi.current)}},[]);var ki=function(){Pi(!1)},Hi=function(Jr){Jr.persist(),Dr.current.delta=Jr.pageX-fn.scrollLeft,Dr.current.x=0,Pi(!0),Jr.preventDefault()},qi=function(Jr){var Hr,Ti=Jr||((Hr=window)===null||Hr===void 0?void 0:Hr.event),Gi=Ti.buttons;if(!Mi||Gi===0){Mi&&Pi(!1);return}var _i=Dr.current.x+Jr.pageX-Dr.current.x-Dr.current.delta,li=mn==="rtl";_i=Math.max(li?Kn-Mn:0,Math.min(li?0:Mn-Kn,_i));var Ji=!li||Math.abs(_i)+Math.abs(Kn)<Mn;Ji&&(dr({scrollLeft:_i/Mn*(Vn+2)}),Dr.current.x=Jr.pageX)},Xt=function(){Dn.Z.cancel(Bi.current),Bi.current=(0,Dn.Z)(function(){if(Xn.current){var Jr=Qt(Xn.current).top,Hr=Jr+Xn.current.offsetHeight,Ti=Qn===window?document.documentElement.scrollTop+window.innerHeight:Qt(Qn).top+Qn.clientHeight;Hr-(0,Nt.Z)()<=Ti||Jr>=Ti-ur?Ar(function(Gi){return(0,Ne.Z)((0,Ne.Z)({},Gi),{},{isHiddenScrollBar:!0})}):Ar(function(Gi){return(0,Ne.Z)((0,Ne.Z)({},Gi),{},{isHiddenScrollBar:!1})})}})},Ni=function(Jr){Ar(function(Hr){return(0,Ne.Z)((0,Ne.Z)({},Hr),{},{scrollLeft:Jr/Vn*Mn||0})})};return de.useImperativeHandle(Vt,function(){return{setScrollLeft:Ni,checkScrollBarVisible:Xt}}),de.useEffect(function(){var gi=(0,Ut.Z)(document.body,"mouseup",ki,!1),Jr=(0,Ut.Z)(document.body,"mousemove",qi,!1);return Xt(),function(){gi.remove(),Jr.remove()}},[Kn,Mi]),de.useEffect(function(){if(Xn.current){for(var gi=[],Jr=(0,Tn.bn)(Xn.current);Jr;)gi.push(Jr),Jr=Jr.parentElement;return gi.forEach(function(Hr){return Hr.addEventListener("scroll",Xt,!1)}),window.addEventListener("resize",Xt,!1),window.addEventListener("scroll",Xt,!1),Qn.addEventListener("scroll",Xt,!1),function(){gi.forEach(function(Hr){return Hr.removeEventListener("scroll",Xt)}),window.removeEventListener("resize",Xt),window.removeEventListener("scroll",Xt),Qn.removeEventListener("scroll",Xt)}}},[Qn]),de.useEffect(function(){fn.isHiddenScrollBar||Ar(function(gi){var Jr=Xn.current;return Jr?(0,Ne.Z)((0,Ne.Z)({},gi),{},{scrollLeft:Jr.scrollLeft/Jr.scrollWidth*Jr.clientWidth}):gi})},[fn.isHiddenScrollBar]),Vn<=Mn||!Kn||fn.isHiddenScrollBar?null:de.createElement("div",{style:{height:(0,Nt.Z)(),width:Mn,bottom:ur},className:"".concat(zn,"-sticky-scroll")},de.createElement("div",{onMouseDown:Hi,ref:In,className:Ye()("".concat(zn,"-sticky-scroll-bar"),(0,Be.Z)({},"".concat(zn,"-sticky-scroll-bar-active"),Mi)),style:{width:"".concat(Kn,"px"),transform:"translate3d(".concat(fn.scrollLeft,"px, 0, 0)")}}))},vr=de.forwardRef(Fn);function mr(Jt){return null}var er=mr;function Un(Jt){return null}var Rn=Un,$n="rc-table",Fr=[],br={};function Pn(){return"No Data"}function fr(Jt,pn){var Vt=(0,Ne.Z)({rowKey:"key",prefixCls:$n,emptyText:Pn},Jt),st=Vt.prefixCls,On=Vt.className,Xn=Vt.rowClassName,dr=Vt.style,ur=Vt.data,Qn=Vt.rowKey,mn=Vt.scroll,zn=Vt.tableLayout,Vn=Vt.direction,Mn=Vt.title,Kn=Vt.footer,In=Vt.summary,Jn=Vt.caption,ir=Vt.id,fn=Vt.showHeader,Ar=Vt.components,Dr=Vt.emptyText,fi=Vt.onRow,Ir=Vt.onHeaderRow,Mi=Vt.onScroll,Pi=Vt.internalHooks,Bi=Vt.transformColumns,ki=Vt.internalRefs,Hi=Vt.tailor,qi=Vt.getContainerWidth,Xt=Vt.sticky,Ni=Vt.rowHoverable,gi=Ni===void 0?!0:Ni,Jr=ur||Fr,Hr=!!Jr.length,Ti=Pi===at.R,Gi=de.useCallback(function(Vi,so){return(0,Xe.Z)(Ar,Vi)||so},[Ar]),_i=de.useMemo(function(){return typeof Qn=="function"?Qn:function(Vi){var so=Vi&&Vi[Qn];return so}},[Qn]),li=Gi(["body"]),Ji=cr(),_o=(0,Gt.Z)(Ji,3),fa=_o[0],bs=_o[1],wa=_o[2],Wr=sn(Vt,Jr,_i),bo=(0,Gt.Z)(Wr,6),Po=bo[0],ta=bo[1],Ao=bo[2],Vo=bo[3],or=bo[4],_r=bo[5],ni=mn==null?void 0:mn.x,bi=de.useState(0),Ai=(0,Gt.Z)(bi,2),no=Ai[0],Gr=Ai[1],Aa=(0,nn.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({},Vt),Po),{},{expandable:!!Po.expandedRowRender,columnTitle:Po.columnTitle,expandedKeys:Ao,getRowKey:_i,onTriggerExpand:_r,expandIcon:Vo,expandIconColumnIndex:Po.expandIconColumnIndex,direction:Vn,scrollWidth:Ti&&Hi&&typeof ni=="number"?ni:null,clientWidth:no}),Ti?Bi:null),zo=(0,Gt.Z)(Aa,4),jo=zo[0],Ri=zo[1],Ko=zo[2],ja=zo[3],vo=Ko!=null?Ko:ni,fs=de.useMemo(function(){return{columns:jo,flattenColumns:Ri}},[jo,Ri]),ds=de.useRef(),Ps=de.useRef(),na=de.useRef(),eh=de.useRef();de.useImperativeHandle(pn,function(){return{nativeElement:ds.current,scrollTo:function(so){var Xo;if(na.current instanceof HTMLElement){var Fa=so.index,ka=so.top,fu=so.key;if(wt(ka)){var Ql;(Ql=na.current)===null||Ql===void 0||Ql.scrollTo({top:ka})}else{var du,sl=fu!=null?fu:_i(Jr[Fa]);(du=na.current.querySelector('[data-row-key="'.concat(sl,'"]')))===null||du===void 0||du.scrollIntoView()}}else(Xo=na.current)!==null&&Xo!==void 0&&Xo.scrollTo&&na.current.scrollTo(so)}}});var ju=de.useRef(),il=de.useState(!1),Sl=(0,Gt.Z)(il,2),Os=Sl[0],Kl=Sl[1],th=de.useState(!1),nh=(0,Gt.Z)(th,2),Zo=nh[0],Ou=nh[1],rh=de.useState(new Map),Zl=(0,Gt.Z)(rh,2),uu=Zl[0],Ca=Zl[1],Oa=nt(Ri),aa=Oa.map(function(Vi){return uu.get(Vi)}),ga=de.useMemo(function(){return aa},[aa.join("_")]),Xl=Rr(ga,Ri,Vn),Ga=mn&&St(mn.y),co=mn&&St(vo)||!!Po.fixed,oo=co&&Ri.some(function(Vi){var so=Vi.fixed;return so}),Qi=de.useRef(),sa=vn(Xt,st),Cr=sa.isSticky,da=sa.offsetHeader,zt=sa.offsetSummary,bn=sa.offsetScroll,Ws=sa.stickyClassName,jl=sa.container,$o=de.useMemo(function(){return In==null?void 0:In(Jr)},[In,Jr]),ba=(Ga||Cr)&&de.isValidElement($o)&&$o.type===_e&&$o.props.fixed,Fs,ol,Fu;Ga&&(ol={overflowY:Hr?"scroll":"auto",maxHeight:mn.y}),co&&(Fs={overflowX:"auto"},Ga||(ol={overflowY:"hidden"}),Fu={width:vo===!0?"auto":vo,minWidth:"100%"});var Oo=de.useCallback(function(Vi,so){Ca(function(Xo){if(Xo.get(Vi)!==so){var Fa=new Map(Xo);return Fa.set(Vi,so),Fa}return Xo})},[]),vi=tr(null),Ua=(0,Gt.Z)(vi,2),Ds=Ua[0],Fo=Ua[1];function Ui(Vi,so){so&&(typeof so=="function"?so(Vi):so.scrollLeft!==Vi&&(so.scrollLeft=Vi,so.scrollLeft!==Vi&&setTimeout(function(){so.scrollLeft=Vi},0)))}var Go=(0,oe.Z)(function(Vi){var so=Vi.currentTarget,Xo=Vi.scrollLeft,Fa=Vn==="rtl",ka=typeof Xo=="number"?Xo:so.scrollLeft,fu=so||br;if(!Fo()||Fo()===fu){var Ql;Ds(fu),Ui(ka,Ps.current),Ui(ka,na.current),Ui(ka,ju.current),Ui(ka,(Ql=Qi.current)===null||Ql===void 0?void 0:Ql.setScrollLeft)}var du=so||Ps.current;if(du){var sl=Ti&&Hi&&typeof vo=="number"?vo:du.scrollWidth,Fl=du.clientWidth;if(sl===Fl){Kl(!1),Ou(!1);return}Fa?(Kl(-ka<sl-Fl),Ou(-ka>0)):(Kl(ka>0),Ou(ka<sl-Fl))}}),ps=(0,oe.Z)(function(Vi){Go(Vi),Mi==null||Mi(Vi)}),xo=function(){if(co&&na.current){var so;Go({currentTarget:(0,Tn.bn)(na.current),scrollLeft:(so=na.current)===null||so===void 0?void 0:so.scrollLeft})}else Kl(!1),Ou(!1)},Cs=function(so){var Xo,Fa=so.width;(Xo=Qi.current)===null||Xo===void 0||Xo.checkScrollBarVisible();var ka=ds.current?ds.current.offsetWidth:Fa;Ti&&qi&&ds.current&&(ka=qi(ds.current,ka)||ka),ka!==no&&(xo(),Gr(ka))},ma=de.useRef(!1);de.useEffect(function(){ma.current&&xo()},[co,ur,jo.length]),de.useEffect(function(){ma.current=!0},[]);var hu=de.useState(0),ao=(0,Gt.Z)(hu,2),Ea=ao[0],ro=ao[1],wo=de.useState(!0),Eo=(0,Gt.Z)(wo,2),Uo=Eo[0],ho=Eo[1];(0,Ue.Z)(function(){(!Hi||!Ti)&&(na.current instanceof Element?ro((0,Nt.o)(na.current).width):ro((0,Nt.o)(eh.current).width)),ho((0,jt.G)("position","sticky"))},[]),de.useEffect(function(){Ti&&ki&&(ki.body.current=na.current)});var Du=de.useCallback(function(Vi){return de.createElement(de.Fragment,null,de.createElement(zr,Vi),ba==="top"&&de.createElement(it,Vi,$o))},[ba,$o]),di=de.useCallback(function(Vi){return de.createElement(it,Vi,$o)},[$o]),uf=Gi(["table"],"table"),$i=de.useMemo(function(){return zn||(oo?vo==="max-content"?"auto":"fixed":Ga||Cr||Ri.some(function(Vi){var so=Vi.ellipsis;return so})?"fixed":"auto")},[Ga,oo,Ri,zn,Cr]),Cc,cu={colWidths:ga,columCount:Ri.length,stickyOffsets:Xl,onHeaderRow:Ir,fixHeader:Ga,scroll:mn},ih=de.useMemo(function(){return Hr?null:typeof Dr=="function"?Dr():Dr},[Hr,Dr]),Ec=de.createElement($r,{data:Jr,measureColumnWidth:Ga||co||Cr}),_h=de.createElement(Ei,{colWidths:Ri.map(function(Vi){var so=Vi.width;return so}),columns:Ri}),Ol=Jn!=null?de.createElement("caption",{className:"".concat(st,"-caption")},Jn):void 0,Bu=(0,Bt.Z)(Vt,{data:!0}),uo=(0,Bt.Z)(Vt,{aria:!0});if(Ga||Cr){var al;typeof li=="function"?(al=li(Jr,{scrollbarSize:Ea,ref:na,onScroll:Go}),cu.colWidths=Ri.map(function(Vi,so){var Xo=Vi.width,Fa=so===Ri.length-1?Xo-Ea:Xo;return typeof Fa=="number"&&!Number.isNaN(Fa)?Fa:0})):al=de.createElement("div",{style:(0,Ne.Z)((0,Ne.Z)({},Fs),ol),onScroll:ps,ref:na,className:Ye()("".concat(st,"-body"))},de.createElement(uf,(0,Se.Z)({style:(0,Ne.Z)((0,Ne.Z)({},Fu),{},{tableLayout:$i})},uo),Ol,_h,Ec,!ba&&$o&&de.createElement(it,{stickyOffsets:Xl,flattenColumns:Ri},$o)));var zh=(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({noData:!Jr.length,maxContentScroll:co&&vo==="max-content"},cu),fs),{},{direction:Vn,stickyClassName:Ws,onScroll:Go});Cc=de.createElement(de.Fragment,null,fn!==!1&&de.createElement(Er,(0,Se.Z)({},zh,{stickyTopOffset:da,className:"".concat(st,"-header"),ref:Ps}),Du),al,ba&&ba!=="top"&&de.createElement(Er,(0,Se.Z)({},zh,{stickyBottomOffset:zt,className:"".concat(st,"-summary"),ref:ju}),di),Cr&&na.current&&na.current instanceof Element&&de.createElement(vr,{ref:Qi,offsetScroll:bn,scrollBodyRef:na,onScroll:Go,container:jl,direction:Vn}))}else Cc=de.createElement("div",{style:(0,Ne.Z)((0,Ne.Z)({},Fs),ol),className:Ye()("".concat(st,"-content")),onScroll:Go,ref:na},de.createElement(uf,(0,Se.Z)({style:(0,Ne.Z)((0,Ne.Z)({},Fu),{},{tableLayout:$i})},uo),Ol,_h,fn!==!1&&de.createElement(zr,(0,Se.Z)({},cu,fs)),Ec,$o&&de.createElement(it,{stickyOffsets:Xl,flattenColumns:Ri},$o)));var Yl=de.createElement("div",(0,Se.Z)({className:Ye()(st,On,(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"),Vn==="rtl"),"".concat(st,"-ping-left"),Os),"".concat(st,"-ping-right"),Zo),"".concat(st,"-layout-fixed"),zn==="fixed"),"".concat(st,"-fixed-header"),Ga),"".concat(st,"-fixed-column"),oo),"".concat(st,"-fixed-column-gapped"),oo&&ja),"".concat(st,"-scroll-horizontal"),co),"".concat(st,"-has-fix-left"),Ri[0]&&Ri[0].fixed),"".concat(st,"-has-fix-right"),Ri[Ri.length-1]&&Ri[Ri.length-1].fixed==="right")),style:dr,id:ir,ref:ds},Bu),Mn&&de.createElement(Ot,{className:"".concat(st,"-title")},Mn(Jr)),de.createElement("div",{ref:eh,className:"".concat(st,"-container")},Cc),Kn&&de.createElement(Ot,{className:"".concat(st,"-footer")},Kn(Jr)));co&&(Yl=de.createElement(Pt.Z,{onResize:Cs},Yl));var kc=Ht(Ri,Xl,Vn),Jl=de.useMemo(function(){return{scrollX:vo,prefixCls:st,getComponent:Gi,scrollbarSize:Ea,direction:Vn,fixedInfoList:kc,isSticky:Cr,supportSticky:Uo,componentWidth:no,fixHeader:Ga,fixColumn:oo,horizonScroll:co,tableLayout:$i,rowClassName:Xn,expandedRowClassName:Po.expandedRowClassName,expandIcon:Vo,expandableType:ta,expandRowByClick:Po.expandRowByClick,expandedRowRender:Po.expandedRowRender,onTriggerExpand:_r,expandIconColumnIndex:Po.expandIconColumnIndex,indentSize:Po.indentSize,allColumnsFixedLeft:Ri.every(function(Vi){return Vi.fixed==="left"}),emptyNode:ih,columns:jo,flattenColumns:Ri,onColumnResize:Oo,hoverStartRow:fa,hoverEndRow:bs,onHover:wa,rowExpandable:Po.rowExpandable,onRow:fi,getRowKey:_i,expandedKeys:Ao,childrenColumnName:or,rowHoverable:gi}},[vo,st,Gi,Ea,Vn,kc,Cr,Uo,no,Ga,oo,co,$i,Xn,Po.expandedRowClassName,Vo,ta,Po.expandRowByClick,Po.expandedRowRender,_r,Po.expandIconColumnIndex,Po.indentSize,ih,jo,Ri,Oo,fa,bs,wa,Po.rowExpandable,fi,_i,Ao,or,gi]);return de.createElement(xe.Provider,{value:Jl},Yl)}var si=de.forwardRef(fr);function xi(Jt){return ie(si,Jt)}var zi=xi();zi.EXPAND_COLUMN=at.w,zi.INTERNAL_HOOKS=at.R,zi.Column=er,zi.ColumnGroup=Rn,zi.Summary=yt;var Yt=zi,Pr=ft(6790),Mr=Ee(null),ar=Ee(null);function mi(Jt,pn,Vt){var st=pn||1;return Vt[Jt+st]-(Vt[Jt]||0)}function ii(Jt){var pn=Jt.rowInfo,Vt=Jt.column,st=Jt.colIndex,On=Jt.indent,Xn=Jt.index,dr=Jt.component,ur=Jt.renderIndex,Qn=Jt.record,mn=Jt.style,zn=Jt.className,Vn=Jt.inverse,Mn=Jt.getHeight,Kn=Vt.render,In=Vt.dataIndex,Jn=Vt.className,ir=Vt.width,fn=ke(ar,["columnsOffset"]),Ar=fn.columnsOffset,Dr=xn(pn,Vt,st,On,Xn),fi=Dr.key,Ir=Dr.fixedInfo,Mi=Dr.appendCellNode,Pi=Dr.additionalCellProps,Bi=Pi.style,ki=Pi.colSpan,Hi=ki===void 0?1:ki,qi=Pi.rowSpan,Xt=qi===void 0?1:qi,Ni=st-1,gi=mi(Ni,Hi,Ar),Jr=Hi>1?ir-gi:0,Hr=(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({},Bi),mn),{},{flex:"0 0 ".concat(gi,"px"),width:"".concat(gi,"px"),marginRight:Jr,pointerEvents:"auto"}),Ti=de.useMemo(function(){return Vn?Xt<=1:Hi===0||Xt===0||Xt>1},[Xt,Hi,Vn]);Ti?Hr.visibility="hidden":Vn&&(Hr.height=Mn==null?void 0:Mn(Xt));var Gi=Ti?function(){return null}:Kn,_i={};return(Xt===0||Hi===0)&&(_i.rowSpan=1,_i.colSpan=1),de.createElement(Et,(0,Se.Z)({className:Ye()(Jn,zn),ellipsis:Vt.ellipsis,align:Vt.align,scope:Vt.rowScope,component:dr,prefixCls:pn.prefixCls,key:fi,record:Qn,index:Xn,renderIndex:ur,dataIndex:In,render:Gi,shouldCellUpdate:Vt.shouldCellUpdate},Ir,{appendNode:Mi,additionalProps:(0,Ne.Z)((0,Ne.Z)({},Pi),{},{style:Hr},_i)}))}var pi=ii,ei=["data","index","className","rowKey","style","extra","getHeight"],ti=de.forwardRef(function(Jt,pn){var Vt=Jt.data,st=Jt.index,On=Jt.className,Xn=Jt.rowKey,dr=Jt.style,ur=Jt.extra,Qn=Jt.getHeight,mn=(0,Le.Z)(Jt,ei),zn=Vt.record,Vn=Vt.indent,Mn=Vt.index,Kn=ke(xe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),In=Kn.scrollX,Jn=Kn.flattenColumns,ir=Kn.prefixCls,fn=Kn.fixColumn,Ar=Kn.componentWidth,Dr=ke(Mr,["getComponent"]),fi=Dr.getComponent,Ir=qt(zn,Xn,st,Vn),Mi=fi(["body","row"],"div"),Pi=fi(["body","cell"],"div"),Bi=Ir.rowSupportExpand,ki=Ir.expanded,Hi=Ir.rowProps,qi=Ir.expandedRowRender,Xt=Ir.expandedRowClassName,Ni;if(Bi&&ki){var gi=qi(zn,st,Vn+1,ki),Jr=wn(Xt,zn,st,Vn),Hr={};fn&&(Hr={style:(0,Be.Z)({},"--virtual-width","".concat(Ar,"px"))});var Ti="".concat(ir,"-expanded-row-cell");Ni=de.createElement(Mi,{className:Ye()("".concat(ir,"-expanded-row"),"".concat(ir,"-expanded-row-level-").concat(Vn+1),Jr)},de.createElement(Et,{component:Pi,prefixCls:ir,className:Ye()(Ti,(0,Be.Z)({},"".concat(Ti,"-fixed"),fn)),additionalProps:Hr},gi))}var Gi=(0,Ne.Z)((0,Ne.Z)({},dr),{},{width:In});ur&&(Gi.position="absolute",Gi.pointerEvents="none");var _i=de.createElement(Mi,(0,Se.Z)({},Hi,mn,{"data-row-key":Xn,ref:Bi?null:pn,className:Ye()(On,"".concat(ir,"-row"),Hi==null?void 0:Hi.className,(0,Be.Z)({},"".concat(ir,"-row-extra"),ur)),style:(0,Ne.Z)((0,Ne.Z)({},Gi),Hi==null?void 0:Hi.style)}),Jn.map(function(li,Ji){return de.createElement(pi,{key:Ji,component:Pi,rowInfo:Ir,column:li,colIndex:Ji,indent:Vn,index:st,renderIndex:Mn,record:zn,inverse:ur,getHeight:Qn})}));return Bi?de.createElement("div",{ref:pn},_i,Ni):_i}),yr=le(ti),on=yr,sr=de.forwardRef(function(Jt,pn){var Vt=Jt.data,st=Jt.onScroll,On=ke(xe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Xn=On.flattenColumns,dr=On.onColumnResize,ur=On.getRowKey,Qn=On.expandedKeys,mn=On.prefixCls,zn=On.childrenColumnName,Vn=On.scrollX,Mn=On.direction,Kn=ke(Mr),In=Kn.sticky,Jn=Kn.scrollY,ir=Kn.listItemHeight,fn=Kn.getComponent,Ar=Kn.onScroll,Dr=de.useRef(),fi=en(Vt,zn,Qn,ur),Ir=de.useMemo(function(){var Ni=0;return Xn.map(function(gi){var Jr=gi.width,Hr=gi.key;return Ni+=Jr,[Hr,Jr,Ni]})},[Xn]),Mi=de.useMemo(function(){return Ir.map(function(Ni){return Ni[2]})},[Ir]);de.useEffect(function(){Ir.forEach(function(Ni){var gi=(0,Gt.Z)(Ni,2),Jr=gi[0],Hr=gi[1];dr(Jr,Hr)})},[Ir]),de.useImperativeHandle(pn,function(){var Ni,gi={scrollTo:function(Hr){var Ti;(Ti=Dr.current)===null||Ti===void 0||Ti.scrollTo(Hr)},nativeElement:(Ni=Dr.current)===null||Ni===void 0?void 0:Ni.nativeElement};return Object.defineProperty(gi,"scrollLeft",{get:function(){var Hr;return((Hr=Dr.current)===null||Hr===void 0?void 0:Hr.getScrollInfo().x)||0},set:function(Hr){var Ti;(Ti=Dr.current)===null||Ti===void 0||Ti.scrollTo({left:Hr})}}),gi});var Pi=function(gi,Jr){var Hr,Ti=(Hr=fi[Jr])===null||Hr===void 0?void 0:Hr.record,Gi=gi.onCell;if(Gi){var _i,li=Gi(Ti,Jr);return(_i=li==null?void 0:li.rowSpan)!==null&&_i!==void 0?_i:1}return 1},Bi=function(gi){var Jr=gi.start,Hr=gi.end,Ti=gi.getSize,Gi=gi.offsetY;if(Hr<0)return null;for(var _i=Xn.filter(function(Vo){return Pi(Vo,Jr)===0}),li=Jr,Ji=function(or){if(_i=_i.filter(function(_r){return Pi(_r,or)===0}),!_i.length)return li=or,1},_o=Jr;_o>=0&&!Ji(_o);_o-=1);for(var fa=Xn.filter(function(Vo){return Pi(Vo,Hr)!==1}),bs=Hr,wa=function(or){if(fa=fa.filter(function(_r){return Pi(_r,or)!==1}),!fa.length)return bs=Math.max(or-1,Hr),1},Wr=Hr;Wr<fi.length&&!wa(Wr);Wr+=1);for(var bo=[],Po=function(or){var _r=fi[or];if(!_r)return 1;Xn.some(function(ni){return Pi(ni,or)>1})&&bo.push(or)},ta=li;ta<=bs;ta+=1)Po(ta);var Ao=bo.map(function(Vo){var or=fi[Vo],_r=ur(or.record,Vo),ni=function(no){var Gr=Vo+no-1,Aa=ur(fi[Gr].record,Gr),zo=Ti(_r,Aa);return zo.bottom-zo.top},bi=Ti(_r);return de.createElement(on,{key:Vo,data:or,rowKey:_r,index:Vo,style:{top:-Gi+bi.top},extra:!0,getHeight:ni})});return Ao},ki=de.useMemo(function(){return{columnsOffset:Mi}},[Mi]),Hi="".concat(mn,"-tbody"),qi=fn(["body","wrapper"]),Xt={};return In&&(Xt.position="sticky",Xt.bottom=0,(0,Te.Z)(In)==="object"&&In.offsetScroll&&(Xt.bottom=In.offsetScroll)),de.createElement(ar.Provider,{value:ki},de.createElement(Pr.Z,{fullHeight:!1,ref:Dr,prefixCls:"".concat(Hi,"-virtual"),styles:{horizontalScrollBar:Xt},className:Hi,height:Jn,itemHeight:ir||24,data:fi,itemKey:function(gi){return ur(gi.record)},component:qi,scrollWidth:Vn,direction:Mn,onVirtualScroll:function(gi){var Jr,Hr=gi.x;st({currentTarget:(Jr=Dr.current)===null||Jr===void 0?void 0:Jr.nativeElement,scrollLeft:Hr})},onScroll:Ar,extraRender:Bi},function(Ni,gi,Jr){var Hr=ur(Ni.record,gi);return de.createElement(on,{data:Ni,rowKey:Hr,index:gi,style:Jr.style})}))}),un=le(sr),gr=un,Kr=function(pn,Vt){var st=Vt.ref,On=Vt.onScroll;return de.createElement(gr,{ref:st,data:pn,onScroll:On})};function Yr(Jt,pn){var Vt=Jt.data,st=Jt.columns,On=Jt.scroll,Xn=Jt.sticky,dr=Jt.prefixCls,ur=dr===void 0?$n:dr,Qn=Jt.className,mn=Jt.listItemHeight,zn=Jt.components,Vn=Jt.onScroll,Mn=On||{},Kn=Mn.x,In=Mn.y;typeof Kn!="number"&&(Kn=1),typeof In!="number"&&(In=500);var Jn=(0,Lt.zX)(function(Ar,Dr){return(0,Xe.Z)(zn,Ar)||Dr}),ir=(0,Lt.zX)(Vn),fn=de.useMemo(function(){return{sticky:Xn,scrollY:In,listItemHeight:mn,getComponent:Jn,onScroll:ir}},[Xn,In,mn,Jn,ir]);return de.createElement(Mr.Provider,{value:fn},de.createElement(Yt,(0,Se.Z)({},Jt,{className:Ye()(Qn,"".concat(ur,"-virtual")),scroll:(0,Ne.Z)((0,Ne.Z)({},On),{},{x:Kn}),components:(0,Ne.Z)((0,Ne.Z)({},zn),{},{body:Vt!=null&&Vt.length?Kr:void 0}),columns:st,internalHooks:at.R,tailor:!0,ref:pn})))}var Di=de.forwardRef(Yr);function oi(Jt){return ie(Di,Jt)}var Zr=oi(),Wi=null},54451:function(Gn,jn,ft){"use strict";ft.d(jn,{g:function(){return de},v:function(){return Ie}});var at=ft(98506),Gt=ft(33346),oe=ft(48736),Ue=["expandable"],Ie="RC_TABLE_INTERNAL_COL_DEFINE";function de(ve){var Ee=ve.expandable,ke=(0,Gt.Z)(ve,Ue),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(Gn,jn,ft){"use strict";ft.r(jn),ft.d(jn,{ResizableTextArea:function(){return Ge},default:function(){return ot}});var at=ft(67711),Gt=ft(52873),oe=ft(98506),Ue=ft(15142),Ie=ft(16886),de=ft(33346),ve=ft(92310),Ee=ft.n(ve),ke=ft(36901),Se=ft(66003),je=ft(30292),me=ft(18929),Pe=ft(59301),fe=ft(26420),z=ft(29301),te=ft(34280),se=ft(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 ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ct=lt.getAttribute("id")||lt.getAttribute("data-reactid")||lt.getAttribute("name");if(ut&&ce[Ct])return ce[Ct];var Je=window.getComputedStyle(lt),nt=Je.getPropertyValue("box-sizing")||Je.getPropertyValue("-moz-box-sizing")||Je.getPropertyValue("-webkit-box-sizing"),St=parseFloat(Je.getPropertyValue("padding-bottom"))+parseFloat(Je.getPropertyValue("padding-top")),wt=parseFloat(Je.getPropertyValue("border-bottom-width"))+parseFloat(Je.getPropertyValue("border-top-width")),bt=le.map(function(vt){return"".concat(vt,":").concat(Je.getPropertyValue(vt))}).join(";"),ct={sizingStyle:bt,paddingSize:St,borderSize:wt,boxSizing:nt};return ut&&Ct&&(ce[Ct]=ct),ct}function Ae(lt){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ct=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Je=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 nt=xe(lt,ut),St=nt.paddingSize,wt=nt.borderSize,bt=nt.boxSizing,ct=nt.sizingStyle;pe.setAttribute("style","".concat(ct,";").concat(ie)),pe.value=lt.value||lt.placeholder||"";var vt=void 0,ht=void 0,Lt,dt=pe.scrollHeight;if(bt==="border-box"?dt+=wt:bt==="content-box"&&(dt-=St),Ct!==null||Je!==null){pe.value=" ";var mt=pe.scrollHeight-St;Ct!==null&&(vt=mt*Ct,bt==="border-box"&&(vt=vt+St+wt),dt=Math.max(vt,dt)),Je!==null&&(ht=mt*Je,bt==="border-box"&&(ht=ht+St+wt),Lt=dt>ht?"":"hidden",dt=Math.min(ht,dt))}var Et={height:dt,overflowY:Lt,resize:"none"};return vt&&(Et.minHeight=vt),ht&&(Et.maxHeight=ht),Et}var De=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Fe=0,Te=1,Ne=2,Be=Pe.forwardRef(function(lt,ut){var Ct=lt,Je=Ct.prefixCls,nt=Ct.defaultValue,St=Ct.value,wt=Ct.autoSize,bt=Ct.onResize,ct=Ct.className,vt=Ct.style,ht=Ct.disabled,Lt=Ct.onChange,dt=Ct.onInternalAutoSize,mt=(0,de.Z)(Ct,De),Et=(0,me.Z)(nt,{value:St,postState:function(Zn){return Zn!=null?Zn:""}}),gt=(0,Ie.Z)(Et,2),$e=gt[0],He=gt[1],we=function(Zn){He(Zn.target.value),Lt==null||Lt(Zn)},Le=Pe.useRef();Pe.useImperativeHandle(ut,function(){return{textArea:Le.current}});var We=Pe.useMemo(function(){return wt&&(0,fe.Z)(wt)==="object"?[wt.minRows,wt.maxRows]:[]},[wt]),tt=(0,Ie.Z)(We,2),Re=tt[0],_e=tt[1],Ve=!!wt,it=function(){try{if(document.activeElement===Le.current){var Zn=Le.current,Tr=Zn.selectionStart,qn=Zn.selectionEnd,qr=Zn.scrollTop;Le.current.setSelectionRange(Tr,qn),Le.current.scrollTop=qr}}catch(nr){}},yt=Pe.useState(Ne),Pt=(0,Ie.Z)(yt,2),jt=Pt[0],Nt=Pt[1],Bt=Pe.useState(),$t=(0,Ie.Z)(Bt,2),en=$t[0],qt=$t[1],Zt=function(){Nt(Fe)};(0,te.Z)(function(){Ve&&Zt()},[St,Re,_e,Ve]),(0,te.Z)(function(){if(jt===Fe)Nt(Te);else if(jt===Te){var Nn=Ae(Le.current,!1,Re,_e);Nt(Ne),qt(Nn)}else it()},[jt]);var hn=Pe.useRef(),an=function(){se.Z.cancel(hn.current)},cn=function(Zn){jt===Ne&&(bt==null||bt(Zn),wt&&(an(),hn.current=(0,se.Z)(function(){Zt()})))};Pe.useEffect(function(){return an},[]);var wn=Ve?en:null,xn=(0,oe.Z)((0,oe.Z)({},vt),wn);return(jt===Fe||jt===Te)&&(xn.overflowY="hidden",xn.overflowX="hidden"),Pe.createElement(z.Z,{onResize:cn,disabled:!(wt||bt)},Pe.createElement("textarea",(0,at.Z)({},mt,{ref:Le,style:xn,className:Ee()(Je,ct,(0,Gt.Z)({},"".concat(Je,"-disabled"),ht)),disabled:ht,value:$e,onChange:we})))}),Ge=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"],Ke=Pe.forwardRef(function(lt,ut){var Ct,Je=lt.defaultValue,nt=lt.value,St=lt.onFocus,wt=lt.onBlur,bt=lt.onChange,ct=lt.allowClear,vt=lt.maxLength,ht=lt.onCompositionStart,Lt=lt.onCompositionEnd,dt=lt.suffix,mt=lt.prefixCls,Et=mt===void 0?"rc-textarea":mt,gt=lt.showCount,$e=lt.count,He=lt.className,we=lt.style,Le=lt.disabled,We=lt.hidden,tt=lt.classNames,Re=lt.styles,_e=lt.onResize,Ve=lt.onClear,it=lt.onPressEnter,yt=lt.readOnly,Pt=lt.autoSize,jt=lt.onKeyDown,Nt=(0,de.Z)(lt,Ye),Bt=(0,me.Z)(Je,{value:nt,defaultValue:Je}),$t=(0,Ie.Z)(Bt,2),en=$t[0],qt=$t[1],Zt=en==null?"":String(en),hn=Pe.useState(!1),an=(0,Ie.Z)(hn,2),cn=an[0],wn=an[1],xn=Pe.useRef(!1),Nn=Pe.useState(null),Zn=(0,Ie.Z)(Nn,2),Tr=Zn[0],qn=Zn[1],qr=(0,Pe.useRef)(null),nr=(0,Pe.useRef)(null),$r=function(){var kn;return(kn=nr.current)===null||kn===void 0?void 0:kn.textArea},hi=function(){$r().focus()};(0,Pe.useImperativeHandle)(ut,function(){var vn;return{resizableTextArea:nr.current,focus:hi,blur:function(){$r().blur()},nativeElement:((vn=qr.current)===null||vn===void 0?void 0:vn.nativeElement)||$r()}}),(0,Pe.useEffect)(function(){wn(function(vn){return!Le&&vn})},[Le]);var Si=Pe.useState(null),Li=(0,Ie.Z)(Si,2),Ei=Li[0],Lr=Li[1];Pe.useEffect(function(){if(Ei){var vn;(vn=$r()).setSelectionRange.apply(vn,(0,Ue.Z)(Ei))}},[Ei]);var Ci=(0,Se.Z)($e,gt),et=(Ct=Ci.max)!==null&&Ct!==void 0?Ct:vt,ai=Number(et)>0,Er=Ci.strategy(Zt),Ln=!!et&&Er>et,An=function(kn,Rr){var Hn=Rr;!xn.current&&Ci.exceedFormatter&&Ci.max&&Ci.strategy(Rr)>Ci.max&&(Hn=Ci.exceedFormatter(Rr,{max:Ci.max}),Rr!==Hn&&Lr([$r().selectionStart||0,$r().selectionEnd||0])),qt(Hn),(0,je.rJ)(kn.currentTarget,kn,bt,Hn)},Bn=function(kn){xn.current=!0,ht==null||ht(kn)},xr=function(kn){xn.current=!1,An(kn,kn.currentTarget.value),Lt==null||Lt(kn)},zr=function(kn){An(kn,kn.target.value)},nn=function(kn){kn.key==="Enter"&&it&&it(kn),jt==null||jt(kn)},sn=function(kn){wn(!0),St==null||St(kn)},Ht=function(kn){wn(!1),wt==null||wt(kn)},rn=function(kn){qt(""),hi(),(0,je.rJ)($r(),kn,bt)},tr=dt,cr;Ci.show&&(Ci.showFormatter?cr=Ci.showFormatter({value:Zt,count:Er,maxLength:et}):cr="".concat(Er).concat(ai?" / ".concat(et):""),tr=Pe.createElement(Pe.Fragment,null,tr,Pe.createElement("span",{className:Ee()("".concat(Et,"-data-count"),tt==null?void 0:tt.count),style:Re==null?void 0:Re.count},cr)));var Nr=function(kn){var Rr;_e==null||_e(kn),(Rr=$r())!==null&&Rr!==void 0&&Rr.style.height&&qn(!0)},ln=!Pt&&!gt&&!ct;return Pe.createElement(ke.BaseInput,{ref:qr,value:Zt,allowClear:ct,handleReset:rn,suffix:tr,prefixCls:Et,classNames:(0,oe.Z)((0,oe.Z)({},tt),{},{affixWrapper:Ee()(tt==null?void 0:tt.affixWrapper,(0,Gt.Z)((0,Gt.Z)({},"".concat(Et,"-show-count"),gt),"".concat(Et,"-textarea-allow-clear"),ct))}),disabled:Le,focused:cn,className:Ee()(He,Ln&&"".concat(Et,"-out-of-range")),style:(0,oe.Z)((0,oe.Z)({},we),Tr&&!ln?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof cr=="string"?cr:void 0}},hidden:We,readOnly:yt,onClear:Ve},Pe.createElement(Ge,(0,at.Z)({},Nt,{autoSize:Pt,maxLength:vt,onKeyDown:nn,onChange:zr,onFocus:sn,onBlur:Ht,onCompositionStart:Bn,onCompositionEnd:xr,className:Ee()(tt==null?void 0:tt.textarea),style:(0,oe.Z)((0,oe.Z)({},Re==null?void 0:Re.textarea),{},{resize:we==null?void 0:we.resize}),disabled:Le,prefixCls:Et,onResize:Nr,ref:nr,readOnly:yt})))}),Xe=Ke,ot=Xe},639:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return ce}});var at=ft(67711),Gt=ft(52873),oe=ft(98506),Ue=ft(16886),Ie=ft(33346),de=ft(59301),ve=ft(92310),Ee=ft.n(ve),ke=ft(26112),Se=ft(30699),je=function(xe){for(var Ae=xe.prefixCls,De=xe.level,Fe=xe.isStart,Te=xe.isEnd,Ne="".concat(Ae,"-indent-unit"),Be=[],Ge=0;Ge<De;Ge+=1)Be.push(de.createElement("span",{key:Ge,className:Ee()(Ne,(0,Gt.Z)((0,Gt.Z)({},"".concat(Ne,"-start"),Fe[Ge]),"".concat(Ne,"-end"),Te[Ge]))}));return de.createElement("span",{"aria-hidden":"true",className:"".concat(Ae,"-indent")},Be)},me=de.memo(je),Pe=ft(65065),fe=ft(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 Ae,De,Fe,Te=xe.eventKey,Ne=xe.className,Be=xe.style,Ge=xe.dragOver,Ye=xe.dragOverGapTop,Ke=xe.dragOverGapBottom,Xe=xe.isLeaf,ot=xe.isStart,lt=xe.isEnd,ut=xe.expanded,Ct=xe.selected,Je=xe.checked,nt=xe.halfChecked,St=xe.loading,wt=xe.domRef,bt=xe.active,ct=xe.data,vt=xe.onMouseMove,ht=xe.selectable,Lt=(0,Ie.Z)(xe,z),dt=de.useContext(Se.k),mt=de.useContext(Se.y),Et=de.useRef(null),gt=de.useState(!1),$e=(0,Ue.Z)(gt,2),He=$e[0],we=$e[1],Le=!!(dt.disabled||xe.disabled||(Ae=mt.nodeDisabled)!==null&&Ae!==void 0&&Ae.call(mt,ct)),We=de.useMemo(function(){return!dt.checkable||xe.checkable===!1?!1:dt.checkable},[dt.checkable,xe.checkable]),tt=function(Er){Le||dt.onNodeSelect(Er,(0,fe.F)(xe))},Re=function(Er){Le||!We||xe.disableCheckbox||dt.onNodeCheck(Er,(0,fe.F)(xe),!Je)},_e=de.useMemo(function(){return typeof ht=="boolean"?ht:dt.selectable},[ht,dt.selectable]),Ve=function(Er){dt.onNodeClick(Er,(0,fe.F)(xe)),_e?tt(Er):Re(Er)},it=function(Er){dt.onNodeDoubleClick(Er,(0,fe.F)(xe))},yt=function(Er){dt.onNodeMouseEnter(Er,(0,fe.F)(xe))},Pt=function(Er){dt.onNodeMouseLeave(Er,(0,fe.F)(xe))},jt=function(Er){dt.onNodeContextMenu(Er,(0,fe.F)(xe))},Nt=de.useMemo(function(){return!!(dt.draggable&&(!dt.draggable.nodeDraggable||dt.draggable.nodeDraggable(ct)))},[dt.draggable,ct]),Bt=function(Er){Er.stopPropagation(),we(!0),dt.onNodeDragStart(Er,xe);try{Er.dataTransfer.setData("text/plain","")}catch(Ln){}},$t=function(Er){Er.preventDefault(),Er.stopPropagation(),dt.onNodeDragEnter(Er,xe)},en=function(Er){Er.preventDefault(),Er.stopPropagation(),dt.onNodeDragOver(Er,xe)},qt=function(Er){Er.stopPropagation(),dt.onNodeDragLeave(Er,xe)},Zt=function(Er){Er.stopPropagation(),we(!1),dt.onNodeDragEnd(Er,xe)},hn=function(Er){Er.preventDefault(),Er.stopPropagation(),we(!1),dt.onNodeDrop(Er,xe)},an=function(Er){St||dt.onNodeExpand(Er,(0,fe.F)(xe))},cn=de.useMemo(function(){var ai=(0,Pe.Z)(dt.keyEntities,Te)||{},Er=ai.children;return!!(Er||[]).length},[dt.keyEntities,Te]),wn=de.useMemo(function(){return Xe===!1?!1:Xe||!dt.loadData&&!cn||dt.loadData&&xe.loaded&&!cn},[Xe,dt.loadData,cn,xe.loaded]);de.useEffect(function(){St||typeof dt.loadData=="function"&&ut&&!wn&&!xe.loaded&&dt.onNodeLoad((0,fe.F)(xe))},[St,dt.loadData,dt.onNodeLoad,ut,wn,xe]);var xn=de.useMemo(function(){var ai;return(ai=dt.draggable)!==null&&ai!==void 0&&ai.icon?de.createElement("span",{className:"".concat(dt.prefixCls,"-draggable-icon")},dt.draggable.icon):null},[dt.draggable]),Nn=function(Er){var Ln=xe.switcherIcon||dt.switcherIcon;return typeof Ln=="function"?Ln((0,oe.Z)((0,oe.Z)({},xe),{},{isLeaf:Er})):Ln},Zn=function(){if(wn){var Er=Nn(!0);return Er!==!1?de.createElement("span",{className:Ee()("".concat(dt.prefixCls,"-switcher"),"".concat(dt.prefixCls,"-switcher-noop"))},Er):null}var Ln=Nn(!1);return Ln!==!1?de.createElement("span",{onClick:an,className:Ee()("".concat(dt.prefixCls,"-switcher"),"".concat(dt.prefixCls,"-switcher_").concat(ut?te:se))},Ln):null},Tr=de.useMemo(function(){if(!We)return null;var ai=typeof We!="boolean"?We:null;return de.createElement("span",{className:Ee()("".concat(dt.prefixCls,"-checkbox"),(0,Gt.Z)((0,Gt.Z)((0,Gt.Z)({},"".concat(dt.prefixCls,"-checkbox-checked"),Je),"".concat(dt.prefixCls,"-checkbox-indeterminate"),!Je&&nt),"".concat(dt.prefixCls,"-checkbox-disabled"),Le||xe.disableCheckbox)),onClick:Re,role:"checkbox","aria-checked":nt?"mixed":Je,"aria-disabled":Le||xe.disableCheckbox,"aria-label":"Select ".concat(typeof xe.title=="string"?xe.title:"tree node")},ai)},[We,Je,nt,Le,xe.disableCheckbox,xe.title]),qn=de.useMemo(function(){return wn?null:ut?te:se},[wn,ut]),qr=de.useMemo(function(){return de.createElement("span",{className:Ee()("".concat(dt.prefixCls,"-iconEle"),"".concat(dt.prefixCls,"-icon__").concat(qn||"docu"),(0,Gt.Z)({},"".concat(dt.prefixCls,"-icon_loading"),St))})},[dt.prefixCls,qn,St]),nr=de.useMemo(function(){var ai=!!dt.draggable,Er=!xe.disabled&&ai&&dt.dragOverNodeKey===Te;return Er?dt.dropIndicatorRender({dropPosition:dt.dropPosition,dropLevelOffset:dt.dropLevelOffset,indent:dt.indent,prefixCls:dt.prefixCls,direction:dt.direction}):null},[dt.dropPosition,dt.dropLevelOffset,dt.indent,dt.prefixCls,dt.direction,dt.draggable,dt.dragOverNodeKey,dt.dropIndicatorRender]),$r=de.useMemo(function(){var ai=xe.title,Er=ai===void 0?ie:ai,Ln="".concat(dt.prefixCls,"-node-content-wrapper"),An;if(dt.showIcon){var Bn=xe.icon||dt.icon;An=Bn?de.createElement("span",{className:Ee()("".concat(dt.prefixCls,"-iconEle"),"".concat(dt.prefixCls,"-icon__customize"))},typeof Bn=="function"?Bn(xe):Bn):qr}else dt.loadData&&St&&(An=qr);var xr;return typeof Er=="function"?xr=Er(ct):dt.titleRender?xr=dt.titleRender(ct):xr=Er,de.createElement("span",{ref:Et,title:typeof Er=="string"?Er:"",className:Ee()(Ln,"".concat(Ln,"-").concat(qn||"normal"),(0,Gt.Z)({},"".concat(dt.prefixCls,"-node-selected"),!Le&&(Ct||He))),onMouseEnter:yt,onMouseLeave:Pt,onContextMenu:jt,onClick:Ve,onDoubleClick:it},An,de.createElement("span",{className:"".concat(dt.prefixCls,"-title")},xr),nr)},[dt.prefixCls,dt.showIcon,xe,dt.icon,qr,dt.titleRender,ct,qn,yt,Pt,jt,Ve,it]),hi=(0,ke.Z)(Lt,{aria:!0,data:!0}),Si=(0,Pe.Z)(dt.keyEntities,Te)||{},Li=Si.level,Ei=lt[lt.length-1],Lr=!Le&&Nt,Ci=dt.draggingNodeKey===Te,et=ht!==void 0?{"aria-selected":!!ht}:void 0;return de.createElement("div",(0,at.Z)({ref:wt,role:"treeitem","aria-expanded":Xe?void 0:ut,className:Ee()(Ne,"".concat(dt.prefixCls,"-treenode"),(Fe={},(0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)(Fe,"".concat(dt.prefixCls,"-treenode-disabled"),Le),"".concat(dt.prefixCls,"-treenode-switcher-").concat(ut?"open":"close"),!Xe),"".concat(dt.prefixCls,"-treenode-checkbox-checked"),Je),"".concat(dt.prefixCls,"-treenode-checkbox-indeterminate"),nt),"".concat(dt.prefixCls,"-treenode-selected"),Ct),"".concat(dt.prefixCls,"-treenode-loading"),St),"".concat(dt.prefixCls,"-treenode-active"),bt),"".concat(dt.prefixCls,"-treenode-leaf-last"),Ei),"".concat(dt.prefixCls,"-treenode-draggable"),Nt),"dragging",Ci),(0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)(Fe,"drop-target",dt.dropTargetKey===Te),"drop-container",dt.dropContainerKey===Te),"drag-over",!Le&&Ge),"drag-over-gap-top",!Le&&Ye),"drag-over-gap-bottom",!Le&&Ke),"filter-node",(De=dt.filterTreeNode)===null||De===void 0?void 0:De.call(dt,(0,fe.F)(xe))),"".concat(dt.prefixCls,"-treenode-leaf"),wn))),style:Be,draggable:Lr,onDragStart:Lr?Bt:void 0,onDragEnter:Nt?$t:void 0,onDragOver:Nt?en:void 0,onDragLeave:Nt?qt:void 0,onDrop:Nt?hn:void 0,onDragEnd:Nt?Zt:void 0,onMouseMove:vt},et,hi),de.createElement(me,{prefixCls:dt.prefixCls,level:Li,isStart:ot,isEnd:lt}),xn,Zn(),Tr,$r)};le.isTreeNode=1;var ce=le},30699:function(Gn,jn,ft){"use strict";ft.d(jn,{k:function(){return Gt},y:function(){return oe}});var at=ft(59301),Gt=at.createContext(null),oe=at.createContext({})},71598:function(Gn,jn,ft){"use strict";ft.d(jn,{OF:function(){return Te.Z},y6:function(){return se.y},ZP:function(){return Le}});var at=ft(67711),Gt=ft(26420),oe=ft(98506),Ue=ft(15142),Ie=ft(42573),de=ft(58698),ve=ft(62437),Ee=ft(74700),ke=ft(45080),Se=ft(52873),je=ft(92310),me=ft.n(je),Pe=ft(10228),fe=ft(26112),z=ft(48736),te=ft(59301),se=ft(30699),ie=function(tt){var Re=tt.dropPosition,_e=tt.dropLevelOffset,Ve=tt.indent,it={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Re){case-1:it.top=0,it.left=-_e*Ve;break;case 1:it.bottom=0,it.left=-_e*Ve;break;case 0:it.bottom=0,it.left=Ve;break}return te.createElement("div",{style:it})},le=ie;function ce(We){if(We==null)throw new TypeError("Cannot destructure "+We)}var pe=ft(16886),xe=ft(33346),Ae=ft(34280),De=ft(6790),Fe=ft(77900),Te=ft(639);function Ne(We,tt){var Re=te.useState(!1),_e=(0,pe.Z)(Re,2),Ve=_e[0],it=_e[1];(0,Ae.Z)(function(){if(Ve)return We(),function(){tt()}},[Ve]),(0,Ae.Z)(function(){return it(!0),function(){it(!1)}},[])}var Be=Ne,Ge=ft(34061),Ye=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ke=te.forwardRef(function(We,tt){var Re=We.className,_e=We.style,Ve=We.motion,it=We.motionNodes,yt=We.motionType,Pt=We.onMotionStart,jt=We.onMotionEnd,Nt=We.active,Bt=We.treeNodeRequiredProps,$t=(0,xe.Z)(We,Ye),en=te.useState(!0),qt=(0,pe.Z)(en,2),Zt=qt[0],hn=qt[1],an=te.useContext(se.k),cn=an.prefixCls,wn=it&&yt!=="hide";(0,Ae.Z)(function(){it&&wn!==Zt&&hn(wn)},[it]);var xn=function(){it&&Pt()},Nn=te.useRef(!1),Zn=function(){it&&!Nn.current&&(Nn.current=!0,jt())};Be(xn,Zn);var Tr=function(qr){wn===qr&&Zn()};return it?te.createElement(Fe.default,(0,at.Z)({ref:tt,visible:Zt},Ve,{motionAppear:yt==="show",onVisibleChanged:Tr}),function(qn,qr){var nr=qn.className,$r=qn.style;return te.createElement("div",{ref:qr,className:me()("".concat(cn,"-treenode-motion"),nr),style:$r},it.map(function(hi){var Si=Object.assign({},(ce(hi.data),hi.data)),Li=hi.title,Ei=hi.key,Lr=hi.isStart,Ci=hi.isEnd;delete Si.children;var et=(0,Ge.H8)(Ei,Bt);return te.createElement(Te.Z,(0,at.Z)({},Si,et,{title:Li,active:Nt,data:hi.data,key:Ei,isStart:Lr,isEnd:Ci}))}))}):te.createElement(Te.Z,(0,at.Z)({domRef:tt,className:Re,style:_e},$t,{active:Nt}))}),Xe=Ke;function ot(){var We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Re=We.length,_e=tt.length;if(Math.abs(Re-_e)!==1)return{add:!1,key:null};function Ve(it,yt){var Pt=new Map;it.forEach(function(Nt){Pt.set(Nt,!0)});var jt=yt.filter(function(Nt){return!Pt.has(Nt)});return jt.length===1?jt[0]:null}return Re<_e?{add:!0,key:Ve(We,tt)}:{add:!1,key:Ve(tt,We)}}function lt(We,tt,Re){var _e=We.findIndex(function(Pt){return Pt.key===Re}),Ve=We[_e+1],it=tt.findIndex(function(Pt){return Pt.key===Re});if(Ve){var yt=tt.findIndex(function(Pt){return Pt.key===Ve.key});return tt.slice(it+1,yt)}return tt.slice(it+1)}var ut=["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"],Ct={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Je=function(){},nt="RC_TREE_MOTION_".concat(Math.random()),St={key:nt},wt={key:nt,level:0,index:0,pos:"0",node:St,nodes:[St]},bt={parent:null,children:[],pos:wt.pos,data:St,title:null,key:nt,isStart:[],isEnd:[]};function ct(We,tt,Re,_e){return tt===!1||!Re?We:We.slice(0,Math.ceil(Re/_e)+1)}function vt(We){var tt=We.key,Re=We.pos;return(0,Ge.km)(tt,Re)}function ht(We){for(var tt=String(We.data.key),Re=We;Re.parent;)Re=Re.parent,tt="".concat(Re.data.key," > ").concat(tt);return tt}var Lt=te.forwardRef(function(We,tt){var Re=We.prefixCls,_e=We.data,Ve=We.selectable,it=We.checkable,yt=We.expandedKeys,Pt=We.selectedKeys,jt=We.checkedKeys,Nt=We.loadedKeys,Bt=We.loadingKeys,$t=We.halfCheckedKeys,en=We.keyEntities,qt=We.disabled,Zt=We.dragging,hn=We.dragOverNodeKey,an=We.dropPosition,cn=We.motion,wn=We.height,xn=We.itemHeight,Nn=We.virtual,Zn=We.scrollWidth,Tr=We.focusable,qn=We.activeItem,qr=We.focused,nr=We.tabIndex,$r=We.onKeyDown,hi=We.onFocus,Si=We.onBlur,Li=We.onActiveChange,Ei=We.onListChangeStart,Lr=We.onListChangeEnd,Ci=(0,xe.Z)(We,ut),et=te.useRef(null),ai=te.useRef(null);te.useImperativeHandle(tt,function(){return{scrollTo:function(mr){et.current.scrollTo(mr)},getIndentWidth:function(){return ai.current.offsetWidth}}});var Er=te.useState(yt),Ln=(0,pe.Z)(Er,2),An=Ln[0],Bn=Ln[1],xr=te.useState(_e),zr=(0,pe.Z)(xr,2),nn=zr[0],sn=zr[1],Ht=te.useState(_e),rn=(0,pe.Z)(Ht,2),tr=rn[0],cr=rn[1],Nr=te.useState([]),ln=(0,pe.Z)(Nr,2),vn=ln[0],kn=ln[1],Rr=te.useState(null),Hn=(0,pe.Z)(Rr,2),Ot=Hn[0],Ut=Hn[1],Dn=te.useRef(_e);Dn.current=_e;function Tn(){var vr=Dn.current;sn(vr),cr(vr),kn([]),Ut(null),Lr()}(0,Ae.Z)(function(){Bn(yt);var vr=ot(An,yt);if(vr.key!==null)if(vr.add){var mr=nn.findIndex(function(br){var Pn=br.key;return Pn===vr.key}),er=ct(lt(nn,_e,vr.key),Nn,wn,xn),Un=nn.slice();Un.splice(mr+1,0,bt),cr(Un),kn(er),Ut("show")}else{var Rn=_e.findIndex(function(br){var Pn=br.key;return Pn===vr.key}),$n=ct(lt(_e,nn,vr.key),Nn,wn,xn),Fr=_e.slice();Fr.splice(Rn+1,0,bt),cr(Fr),kn($n),Ut("hide")}else nn!==_e&&(sn(_e),cr(_e))},[yt,_e]),te.useEffect(function(){Zt||Tn()},[Zt]);var Qt=cn?tr:_e,Fn={expandedKeys:yt,selectedKeys:Pt,loadedKeys:Nt,loadingKeys:Bt,checkedKeys:jt,halfCheckedKeys:$t,dragOverNodeKey:hn,dropPosition:an,keyEntities:en};return te.createElement(te.Fragment,null,qr&&qn&&te.createElement("span",{style:Ct,"aria-live":"assertive"},ht(qn)),te.createElement("div",null,te.createElement("input",{style:Ct,disabled:Tr===!1||qt,tabIndex:Tr!==!1?nr:null,onKeyDown:$r,onFocus:hi,onBlur:Si,value:"",onChange:Je,"aria-label":"for screen reader"})),te.createElement("div",{className:"".concat(Re,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},te.createElement("div",{className:"".concat(Re,"-indent")},te.createElement("div",{ref:ai,className:"".concat(Re,"-indent-unit")}))),te.createElement(De.Z,(0,at.Z)({},Ci,{data:Qt,itemKey:vt,height:wn,fullHeight:!1,virtual:Nn,itemHeight:xn,scrollWidth:Zn,prefixCls:"".concat(Re,"-list"),ref:et,role:"tree",onVisibleChange:function(mr){mr.every(function(er){return vt(er)!==nt})&&Tn()}}),function(vr){var mr=vr.pos,er=Object.assign({},(ce(vr.data),vr.data)),Un=vr.title,Rn=vr.key,$n=vr.isStart,Fr=vr.isEnd,br=(0,Ge.km)(Rn,mr);delete er.key,delete er.children;var Pn=(0,Ge.H8)(br,Fn);return te.createElement(Xe,(0,at.Z)({},er,Pn,{title:Un,active:!!qn&&Rn===qn.key,pos:mr,data:vr.data,isStart:$n,isEnd:Fr,motion:cn,motionNodes:Rn===nt?vn:null,motionType:Ot,onMotionStart:Ei,onMotionEnd:Tn,treeNodeRequiredProps:Fn,onMouseMove:function(){Li(null)}}))}))}),dt=Lt,mt=ft(82661),Et=ft(34643),gt=ft(65065),$e=10,He=function(We){(0,Ee.Z)(Re,We);var tt=(0,ke.Z)(Re);function Re(){var _e;(0,Ie.Z)(this,Re);for(var Ve=arguments.length,it=new Array(Ve),yt=0;yt<Ve;yt++)it[yt]=arguments[yt];return _e=tt.call.apply(tt,[this].concat(it)),(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,Ge.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(Pt,jt){var Nt=_e.state,Bt=Nt.expandedKeys,$t=Nt.keyEntities,en=_e.props.onDragStart,qt=jt.eventKey;_e.dragNodeProps=jt,_e.dragStartMousePosition={x:Pt.clientX,y:Pt.clientY};var Zt=(0,mt._5)(Bt,qt);_e.setState({draggingNodeKey:qt,dragChildrenKeys:(0,mt.wA)(qt,$t),indent:_e.listRef.current.getIndentWidth()}),_e.setExpandedKeys(Zt),window.addEventListener("dragend",_e.onWindowDragEnd),en==null||en({event:Pt,node:(0,Ge.F)(jt)})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDragEnter",function(Pt,jt){var Nt=_e.state,Bt=Nt.expandedKeys,$t=Nt.keyEntities,en=Nt.dragChildrenKeys,qt=Nt.flattenNodes,Zt=Nt.indent,hn=_e.props,an=hn.onDragEnter,cn=hn.onExpand,wn=hn.allowDrop,xn=hn.direction,Nn=jt.pos,Zn=jt.eventKey;if(_e.currentMouseOverDroppableNodeKey!==Zn&&(_e.currentMouseOverDroppableNodeKey=Zn),!_e.dragNodeProps){_e.resetDragState();return}var Tr=(0,mt.OM)(Pt,_e.dragNodeProps,jt,Zt,_e.dragStartMousePosition,wn,qt,$t,Bt,xn),qn=Tr.dropPosition,qr=Tr.dropLevelOffset,nr=Tr.dropTargetKey,$r=Tr.dropContainerKey,hi=Tr.dropTargetPos,Si=Tr.dropAllowed,Li=Tr.dragOverNodeKey;if(en.includes(nr)||!Si){_e.resetDragState();return}if(_e.delayedDragEnterLogic||(_e.delayedDragEnterLogic={}),Object.keys(_e.delayedDragEnterLogic).forEach(function(Ei){clearTimeout(_e.delayedDragEnterLogic[Ei])}),_e.dragNodeProps.eventKey!==jt.eventKey&&(Pt.persist(),_e.delayedDragEnterLogic[Nn]=window.setTimeout(function(){if(_e.state.draggingNodeKey!==null){var Ei=(0,Ue.Z)(Bt),Lr=(0,gt.Z)($t,jt.eventKey);Lr&&(Lr.children||[]).length&&(Ei=(0,mt.L0)(Bt,jt.eventKey)),_e.props.hasOwnProperty("expandedKeys")||_e.setExpandedKeys(Ei),cn==null||cn(Ei,{node:(0,Ge.F)(jt),expanded:!0,nativeEvent:Pt.nativeEvent})}},800)),_e.dragNodeProps.eventKey===nr&&qr===0){_e.resetDragState();return}_e.setState({dragOverNodeKey:Li,dropPosition:qn,dropLevelOffset:qr,dropTargetKey:nr,dropContainerKey:$r,dropTargetPos:hi,dropAllowed:Si}),an==null||an({event:Pt,node:(0,Ge.F)(jt),expandedKeys:Bt})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDragOver",function(Pt,jt){var Nt=_e.state,Bt=Nt.dragChildrenKeys,$t=Nt.flattenNodes,en=Nt.keyEntities,qt=Nt.expandedKeys,Zt=Nt.indent,hn=_e.props,an=hn.onDragOver,cn=hn.allowDrop,wn=hn.direction;if(_e.dragNodeProps){var xn=(0,mt.OM)(Pt,_e.dragNodeProps,jt,Zt,_e.dragStartMousePosition,cn,$t,en,qt,wn),Nn=xn.dropPosition,Zn=xn.dropLevelOffset,Tr=xn.dropTargetKey,qn=xn.dropContainerKey,qr=xn.dropTargetPos,nr=xn.dropAllowed,$r=xn.dragOverNodeKey;Bt.includes(Tr)||!nr||(_e.dragNodeProps.eventKey===Tr&&Zn===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():Nn===_e.state.dropPosition&&Zn===_e.state.dropLevelOffset&&Tr===_e.state.dropTargetKey&&qn===_e.state.dropContainerKey&&qr===_e.state.dropTargetPos&&nr===_e.state.dropAllowed&&$r===_e.state.dragOverNodeKey||_e.setState({dropPosition:Nn,dropLevelOffset:Zn,dropTargetKey:Tr,dropContainerKey:qn,dropTargetPos:qr,dropAllowed:nr,dragOverNodeKey:$r}),an==null||an({event:Pt,node:(0,Ge.F)(jt)}))}}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDragLeave",function(Pt,jt){_e.currentMouseOverDroppableNodeKey===jt.eventKey&&!Pt.currentTarget.contains(Pt.relatedTarget)&&(_e.resetDragState(),_e.currentMouseOverDroppableNodeKey=null);var Nt=_e.props.onDragLeave;Nt==null||Nt({event:Pt,node:(0,Ge.F)(jt)})}),(0,Se.Z)((0,ve.Z)(_e),"onWindowDragEnd",function(Pt){_e.onNodeDragEnd(Pt,null,!0),window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDragEnd",function(Pt,jt){var Nt=_e.props.onDragEnd;_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),Nt==null||Nt({event:Pt,node:(0,Ge.F)(jt)}),_e.dragNodeProps=null,window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDrop",function(Pt,jt){var Nt,Bt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,$t=_e.state,en=$t.dragChildrenKeys,qt=$t.dropPosition,Zt=$t.dropTargetKey,hn=$t.dropTargetPos,an=$t.dropAllowed;if(an){var cn=_e.props.onDrop;if(_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),Zt!==null){var wn=(0,oe.Z)((0,oe.Z)({},(0,Ge.H8)(Zt,_e.getTreeNodeRequiredProps())),{},{active:((Nt=_e.getActiveItem())===null||Nt===void 0?void 0:Nt.key)===Zt,data:(0,gt.Z)(_e.state.keyEntities,Zt).node}),xn=en.includes(Zt);(0,z.ZP)(!xn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Nn=(0,mt.yx)(hn),Zn={event:Pt,node:(0,Ge.F)(wn),dragNode:_e.dragNodeProps?(0,Ge.F)(_e.dragNodeProps):null,dragNodesKeys:[_e.dragNodeProps.eventKey].concat(en),dropToGap:qt!==0,dropPosition:qt+Number(Nn[Nn.length-1])};Bt||cn==null||cn(Zn),_e.dragNodeProps=null}}}),(0,Se.Z)((0,ve.Z)(_e),"cleanDragState",function(){var Pt=_e.state.draggingNodeKey;Pt!==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(Pt,jt){var Nt=_e.state,Bt=Nt.expandedKeys,$t=Nt.flattenNodes,en=jt.expanded,qt=jt.key,Zt=jt.isLeaf;if(!(Zt||Pt.shiftKey||Pt.metaKey||Pt.ctrlKey)){var hn=$t.filter(function(cn){return cn.key===qt})[0],an=(0,Ge.F)((0,oe.Z)((0,oe.Z)({},(0,Ge.H8)(qt,_e.getTreeNodeRequiredProps())),{},{data:hn.data}));_e.setExpandedKeys(en?(0,mt._5)(Bt,qt):(0,mt.L0)(Bt,qt)),_e.onNodeExpand(Pt,an)}}),(0,Se.Z)((0,ve.Z)(_e),"onNodeClick",function(Pt,jt){var Nt=_e.props,Bt=Nt.onClick,$t=Nt.expandAction;$t==="click"&&_e.triggerExpandActionExpand(Pt,jt),Bt==null||Bt(Pt,jt)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDoubleClick",function(Pt,jt){var Nt=_e.props,Bt=Nt.onDoubleClick,$t=Nt.expandAction;$t==="doubleClick"&&_e.triggerExpandActionExpand(Pt,jt),Bt==null||Bt(Pt,jt)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeSelect",function(Pt,jt){var Nt=_e.state.selectedKeys,Bt=_e.state,$t=Bt.keyEntities,en=Bt.fieldNames,qt=_e.props,Zt=qt.onSelect,hn=qt.multiple,an=jt.selected,cn=jt[en.key],wn=!an;wn?hn?Nt=(0,mt.L0)(Nt,cn):Nt=[cn]:Nt=(0,mt._5)(Nt,cn);var xn=Nt.map(function(Nn){var Zn=(0,gt.Z)($t,Nn);return Zn?Zn.node:null}).filter(Boolean);_e.setUncontrolledState({selectedKeys:Nt}),Zt==null||Zt(Nt,{event:"select",selected:wn,node:jt,selectedNodes:xn,nativeEvent:Pt.nativeEvent})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeCheck",function(Pt,jt,Nt){var Bt=_e.state,$t=Bt.keyEntities,en=Bt.checkedKeys,qt=Bt.halfCheckedKeys,Zt=_e.props,hn=Zt.checkStrictly,an=Zt.onCheck,cn=jt.key,wn,xn={event:"check",node:jt,checked:Nt,nativeEvent:Pt.nativeEvent};if(hn){var Nn=Nt?(0,mt.L0)(en,cn):(0,mt._5)(en,cn),Zn=(0,mt._5)(qt,cn);wn={checked:Nn,halfChecked:Zn},xn.checkedNodes=Nn.map(function(hi){return(0,gt.Z)($t,hi)}).filter(Boolean).map(function(hi){return hi.node}),_e.setUncontrolledState({checkedKeys:Nn})}else{var Tr=(0,Et.S)([].concat((0,Ue.Z)(en),[cn]),!0,$t),qn=Tr.checkedKeys,qr=Tr.halfCheckedKeys;if(!Nt){var nr=new Set(qn);nr.delete(cn);var $r=(0,Et.S)(Array.from(nr),{checked:!1,halfCheckedKeys:qr},$t);qn=$r.checkedKeys,qr=$r.halfCheckedKeys}wn=qn,xn.checkedNodes=[],xn.checkedNodesPositions=[],xn.halfCheckedKeys=qr,qn.forEach(function(hi){var Si=(0,gt.Z)($t,hi);if(Si){var Li=Si.node,Ei=Si.pos;xn.checkedNodes.push(Li),xn.checkedNodesPositions.push({node:Li,pos:Ei})}}),_e.setUncontrolledState({checkedKeys:qn},!1,{halfCheckedKeys:qr})}an==null||an(wn,xn)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeLoad",function(Pt){var jt,Nt=Pt.key,Bt=_e.state.keyEntities,$t=(0,gt.Z)(Bt,Nt);if(!($t!=null&&(jt=$t.children)!==null&&jt!==void 0&&jt.length)){var en=new Promise(function(qt,Zt){_e.setState(function(hn){var an=hn.loadedKeys,cn=an===void 0?[]:an,wn=hn.loadingKeys,xn=wn===void 0?[]:wn,Nn=_e.props,Zn=Nn.loadData,Tr=Nn.onLoad;if(!Zn||cn.includes(Nt)||xn.includes(Nt))return null;var qn=Zn(Pt);return qn.then(function(){var qr=_e.state.loadedKeys,nr=(0,mt.L0)(qr,Nt);Tr==null||Tr(nr,{event:"load",node:Pt}),_e.setUncontrolledState({loadedKeys:nr}),_e.setState(function($r){return{loadingKeys:(0,mt._5)($r.loadingKeys,Nt)}}),qt()}).catch(function(qr){if(_e.setState(function($r){return{loadingKeys:(0,mt._5)($r.loadingKeys,Nt)}}),_e.loadingRetryTimes[Nt]=(_e.loadingRetryTimes[Nt]||0)+1,_e.loadingRetryTimes[Nt]>=$e){var nr=_e.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),_e.setUncontrolledState({loadedKeys:(0,mt.L0)(nr,Nt)}),qt()}Zt(qr)}),{loadingKeys:(0,mt.L0)(xn,Nt)}})});return en.catch(function(){}),en}}),(0,Se.Z)((0,ve.Z)(_e),"onNodeMouseEnter",function(Pt,jt){var Nt=_e.props.onMouseEnter;Nt==null||Nt({event:Pt,node:jt})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeMouseLeave",function(Pt,jt){var Nt=_e.props.onMouseLeave;Nt==null||Nt({event:Pt,node:jt})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeContextMenu",function(Pt,jt){var Nt=_e.props.onRightClick;Nt&&(Pt.preventDefault(),Nt({event:Pt,node:jt}))}),(0,Se.Z)((0,ve.Z)(_e),"onFocus",function(){var Pt=_e.props.onFocus;_e.setState({focused:!0});for(var jt=arguments.length,Nt=new Array(jt),Bt=0;Bt<jt;Bt++)Nt[Bt]=arguments[Bt];Pt==null||Pt.apply(void 0,Nt)}),(0,Se.Z)((0,ve.Z)(_e),"onBlur",function(){var Pt=_e.props.onBlur;_e.setState({focused:!1}),_e.onActiveChange(null);for(var jt=arguments.length,Nt=new Array(jt),Bt=0;Bt<jt;Bt++)Nt[Bt]=arguments[Bt];Pt==null||Pt.apply(void 0,Nt)}),(0,Se.Z)((0,ve.Z)(_e),"getTreeNodeRequiredProps",function(){var Pt=_e.state,jt=Pt.expandedKeys,Nt=Pt.selectedKeys,Bt=Pt.loadedKeys,$t=Pt.loadingKeys,en=Pt.checkedKeys,qt=Pt.halfCheckedKeys,Zt=Pt.dragOverNodeKey,hn=Pt.dropPosition,an=Pt.keyEntities;return{expandedKeys:jt||[],selectedKeys:Nt||[],loadedKeys:Bt||[],loadingKeys:$t||[],checkedKeys:en||[],halfCheckedKeys:qt||[],dragOverNodeKey:Zt,dropPosition:hn,keyEntities:an}}),(0,Se.Z)((0,ve.Z)(_e),"setExpandedKeys",function(Pt){var jt=_e.state,Nt=jt.treeData,Bt=jt.fieldNames,$t=(0,Ge.oH)(Nt,Pt,Bt);_e.setUncontrolledState({expandedKeys:Pt,flattenNodes:$t},!0)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeExpand",function(Pt,jt){var Nt=_e.state.expandedKeys,Bt=_e.state,$t=Bt.listChanging,en=Bt.fieldNames,qt=_e.props,Zt=qt.onExpand,hn=qt.loadData,an=jt.expanded,cn=jt[en.key];if(!$t){var wn=Nt.includes(cn),xn=!an;if((0,z.ZP)(an&&wn||!an&&!wn,"Expand state not sync with index check"),Nt=xn?(0,mt.L0)(Nt,cn):(0,mt._5)(Nt,cn),_e.setExpandedKeys(Nt),Zt==null||Zt(Nt,{node:jt,expanded:xn,nativeEvent:Pt.nativeEvent}),xn&&hn){var Nn=_e.onNodeLoad(jt);Nn&&Nn.then(function(){var Zn=(0,Ge.oH)(_e.state.treeData,Nt,en);_e.setUncontrolledState({flattenNodes:Zn})}).catch(function(){var Zn=_e.state.expandedKeys,Tr=(0,mt._5)(Zn,cn);_e.setExpandedKeys(Tr)})}}}),(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(Pt){var jt=_e.state.activeKey,Nt=_e.props,Bt=Nt.onActiveChange,$t=Nt.itemScrollOffset,en=$t===void 0?0:$t;jt!==Pt&&(_e.setState({activeKey:Pt}),Pt!==null&&_e.scrollTo({key:Pt,offset:en}),Bt==null||Bt(Pt))}),(0,Se.Z)((0,ve.Z)(_e),"getActiveItem",function(){var Pt=_e.state,jt=Pt.activeKey,Nt=Pt.flattenNodes;return jt===null?null:Nt.find(function(Bt){var $t=Bt.key;return $t===jt})||null}),(0,Se.Z)((0,ve.Z)(_e),"offsetActiveKey",function(Pt){var jt=_e.state,Nt=jt.flattenNodes,Bt=jt.activeKey,$t=Nt.findIndex(function(Zt){var hn=Zt.key;return hn===Bt});$t===-1&&Pt<0&&($t=Nt.length),$t=($t+Pt+Nt.length)%Nt.length;var en=Nt[$t];if(en){var qt=en.key;_e.onActiveChange(qt)}else _e.onActiveChange(null)}),(0,Se.Z)((0,ve.Z)(_e),"onKeyDown",function(Pt){var jt=_e.state,Nt=jt.activeKey,Bt=jt.expandedKeys,$t=jt.checkedKeys,en=jt.fieldNames,qt=_e.props,Zt=qt.onKeyDown,hn=qt.checkable,an=qt.selectable;switch(Pt.which){case Pe.Z.UP:{_e.offsetActiveKey(-1),Pt.preventDefault();break}case Pe.Z.DOWN:{_e.offsetActiveKey(1),Pt.preventDefault();break}}var cn=_e.getActiveItem();if(cn&&cn.data){var wn=_e.getTreeNodeRequiredProps(),xn=cn.data.isLeaf===!1||!!(cn.data[en.children]||[]).length,Nn=(0,Ge.F)((0,oe.Z)((0,oe.Z)({},(0,Ge.H8)(Nt,wn)),{},{data:cn.data,active:!0}));switch(Pt.which){case Pe.Z.LEFT:{xn&&Bt.includes(Nt)?_e.onNodeExpand({},Nn):cn.parent&&_e.onActiveChange(cn.parent.key),Pt.preventDefault();break}case Pe.Z.RIGHT:{xn&&!Bt.includes(Nt)?_e.onNodeExpand({},Nn):cn.children&&cn.children.length&&_e.onActiveChange(cn.children[0].key),Pt.preventDefault();break}case Pe.Z.ENTER:case Pe.Z.SPACE:{hn&&!Nn.disabled&&Nn.checkable!==!1&&!Nn.disableCheckbox?_e.onNodeCheck({},Nn,!$t.includes(Nt)):!hn&&an&&!Nn.disabled&&Nn.selectable!==!1&&_e.onNodeSelect({},Nn);break}}}Zt==null||Zt(Pt)}),(0,Se.Z)((0,ve.Z)(_e),"setUncontrolledState",function(Pt){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!_e.destroyed){var Bt=!1,$t=!0,en={};Object.keys(Pt).forEach(function(qt){if(_e.props.hasOwnProperty(qt)){$t=!1;return}Bt=!0,en[qt]=Pt[qt]}),Bt&&(!jt||$t)&&_e.setState((0,oe.Z)((0,oe.Z)({},en),Nt))}}),(0,Se.Z)((0,ve.Z)(_e),"scrollTo",function(Pt){_e.listRef.current.scrollTo(Pt)}),_e}return(0,de.Z)(Re,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Ve=this.props,it=Ve.activeKey,yt=Ve.itemScrollOffset,Pt=yt===void 0?0:yt;it!==void 0&&it!==this.state.activeKey&&(this.setState({activeKey:it}),it!==null&&this.scrollTo({key:it,offset:Pt}))}},{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 Ve=this.state,it=Ve.focused,yt=Ve.flattenNodes,Pt=Ve.keyEntities,jt=Ve.draggingNodeKey,Nt=Ve.activeKey,Bt=Ve.dropLevelOffset,$t=Ve.dropContainerKey,en=Ve.dropTargetKey,qt=Ve.dropPosition,Zt=Ve.dragOverNodeKey,hn=Ve.indent,an=this.props,cn=an.prefixCls,wn=an.className,xn=an.style,Nn=an.showLine,Zn=an.focusable,Tr=an.tabIndex,qn=Tr===void 0?0:Tr,qr=an.selectable,nr=an.showIcon,$r=an.icon,hi=an.switcherIcon,Si=an.draggable,Li=an.checkable,Ei=an.checkStrictly,Lr=an.disabled,Ci=an.motion,et=an.loadData,ai=an.filterTreeNode,Er=an.height,Ln=an.itemHeight,An=an.scrollWidth,Bn=an.virtual,xr=an.titleRender,zr=an.dropIndicatorRender,nn=an.onContextMenu,sn=an.onScroll,Ht=an.direction,rn=an.rootClassName,tr=an.rootStyle,cr=(0,fe.Z)(this.props,{aria:!0,data:!0}),Nr;Si&&((0,Gt.Z)(Si)==="object"?Nr=Si:typeof Si=="function"?Nr={nodeDraggable:Si}:Nr={});var ln={prefixCls:cn,selectable:qr,showIcon:nr,icon:$r,switcherIcon:hi,draggable:Nr,draggingNodeKey:jt,checkable:Li,checkStrictly:Ei,disabled:Lr,keyEntities:Pt,dropLevelOffset:Bt,dropContainerKey:$t,dropTargetKey:en,dropPosition:qt,dragOverNodeKey:Zt,indent:hn,direction:Ht,dropIndicatorRender:zr,loadData:et,filterTreeNode:ai,titleRender:xr,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:ln},te.createElement("div",{className:me()(cn,wn,rn,(0,Se.Z)((0,Se.Z)((0,Se.Z)({},"".concat(cn,"-show-line"),Nn),"".concat(cn,"-focused"),it),"".concat(cn,"-active-focused"),Nt!==null)),style:tr},te.createElement(dt,(0,at.Z)({ref:this.listRef,prefixCls:cn,style:xn,data:yt,disabled:Lr,selectable:qr,checkable:!!Li,motion:Ci,dragging:jt!==null,height:Er,itemHeight:Ln,virtual:Bn,focusable:Zn,focused:it,tabIndex:qn,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:nn,onScroll:sn,scrollWidth:An},this.getTreeNodeRequiredProps(),cr))))}}],[{key:"getDerivedStateFromProps",value:function(Ve,it){var yt=it.prevProps,Pt={prevProps:Ve};function jt(qn){return!yt&&Ve.hasOwnProperty(qn)||yt&&yt[qn]!==Ve[qn]}var Nt,Bt=it.fieldNames;if(jt("fieldNames")&&(Bt=(0,Ge.w$)(Ve.fieldNames),Pt.fieldNames=Bt),jt("treeData")?Nt=Ve.treeData:jt("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Nt=(0,Ge.zn)(Ve.children)),Nt){Pt.treeData=Nt;var $t=(0,Ge.I8)(Nt,{fieldNames:Bt});Pt.keyEntities=(0,oe.Z)((0,Se.Z)({},nt,wt),$t.keyEntities)}var en=Pt.keyEntities||it.keyEntities;if(jt("expandedKeys")||yt&&jt("autoExpandParent"))Pt.expandedKeys=Ve.autoExpandParent||!yt&&Ve.defaultExpandParent?(0,mt.r7)(Ve.expandedKeys,en):Ve.expandedKeys;else if(!yt&&Ve.defaultExpandAll){var qt=(0,oe.Z)({},en);delete qt[nt];var Zt=[];Object.keys(qt).forEach(function(qn){var qr=qt[qn];qr.children&&qr.children.length&&Zt.push(qr.key)}),Pt.expandedKeys=Zt}else!yt&&Ve.defaultExpandedKeys&&(Pt.expandedKeys=Ve.autoExpandParent||Ve.defaultExpandParent?(0,mt.r7)(Ve.defaultExpandedKeys,en):Ve.defaultExpandedKeys);if(Pt.expandedKeys||delete Pt.expandedKeys,Nt||Pt.expandedKeys){var hn=(0,Ge.oH)(Nt||it.treeData,Pt.expandedKeys||it.expandedKeys,Bt);Pt.flattenNodes=hn}if(Ve.selectable&&(jt("selectedKeys")?Pt.selectedKeys=(0,mt.BT)(Ve.selectedKeys,Ve):!yt&&Ve.defaultSelectedKeys&&(Pt.selectedKeys=(0,mt.BT)(Ve.defaultSelectedKeys,Ve))),Ve.checkable){var an;if(jt("checkedKeys")?an=(0,mt.E6)(Ve.checkedKeys)||{}:!yt&&Ve.defaultCheckedKeys?an=(0,mt.E6)(Ve.defaultCheckedKeys)||{}:Nt&&(an=(0,mt.E6)(Ve.checkedKeys)||{checkedKeys:it.checkedKeys,halfCheckedKeys:it.halfCheckedKeys}),an){var cn=an,wn=cn.checkedKeys,xn=wn===void 0?[]:wn,Nn=cn.halfCheckedKeys,Zn=Nn===void 0?[]:Nn;if(!Ve.checkStrictly){var Tr=(0,Et.S)(xn,!0,en);xn=Tr.checkedKeys,Zn=Tr.halfCheckedKeys}Pt.checkedKeys=xn,Pt.halfCheckedKeys=Zn}}return jt("loadedKeys")&&(Pt.loadedKeys=Ve.loadedKeys),Pt}}]),Re}(te.Component);(0,Se.Z)(He,"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)(He,"TreeNode",Te.Z);var we=He,Le=we},82661:function(Gn,jn,ft){"use strict";ft.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 je}});var at=ft(15142),Gt=ft(26420),oe=ft(48736),Ue=ft(59301),Ie=ft(639),de=ft(65065),ve=ft(34061),Ee=null;function ke(pe,xe){if(!pe)return[];var Ae=pe.slice(),De=Ae.indexOf(xe);return De>=0&&Ae.splice(De,1),Ae}function Se(pe,xe){var Ae=(pe||[]).slice();return Ae.indexOf(xe)===-1&&Ae.push(xe),Ae}function je(pe){return pe.split("-")}function me(pe,xe){var Ae=[],De=(0,de.Z)(xe,pe);function Fe(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Te.forEach(function(Ne){var Be=Ne.key,Ge=Ne.children;Ae.push(Be),Fe(Ge)})}return Fe(De.children),Ae}function Pe(pe){if(pe.parent){var xe=je(pe.pos);return Number(xe[xe.length-1])===pe.parent.children.length-1}return!1}function fe(pe){var xe=je(pe.pos);return Number(xe[xe.length-1])===0}function z(pe,xe,Ae,De,Fe,Te,Ne,Be,Ge,Ye){var Ke,Xe=pe.clientX,ot=pe.clientY,lt=pe.target.getBoundingClientRect(),ut=lt.top,Ct=lt.height,Je=(Ye==="rtl"?-1:1)*(((Fe==null?void 0:Fe.x)||0)-Xe),nt=(Je-12)/De,St=Ge.filter(function(Le){var We;return(We=Be[Le])===null||We===void 0||(We=We.children)===null||We===void 0?void 0:We.length}),wt=(0,de.Z)(Be,Ae.eventKey);if(ot<ut+Ct/2){var bt=Ne.findIndex(function(Le){return Le.key===wt.key}),ct=bt<=0?0:bt-1,vt=Ne[ct].key;wt=(0,de.Z)(Be,vt)}var ht=wt.key,Lt=wt,dt=wt.key,mt=0,Et=0;if(!St.includes(ht))for(var gt=0;gt<nt&&Pe(wt);gt+=1)wt=wt.parent,Et+=1;var $e=xe.data,He=wt.node,we=!0;return fe(wt)&&wt.level===0&&ot<ut+Ct/2&&Te({dragNode:$e,dropNode:He,dropPosition:-1})&&wt.key===Ae.eventKey?mt=-1:(Lt.children||[]).length&&St.includes(dt)?Te({dragNode:$e,dropNode:He,dropPosition:0})?mt=0:we=!1:Et===0?nt>-1.5?Te({dragNode:$e,dropNode:He,dropPosition:1})?mt=1:we=!1:Te({dragNode:$e,dropNode:He,dropPosition:0})?mt=0:Te({dragNode:$e,dropNode:He,dropPosition:1})?mt=1:we=!1:Te({dragNode:$e,dropNode:He,dropPosition:1})?mt=1:we=!1,{dropPosition:mt,dropLevelOffset:Et,dropTargetKey:wt.key,dropTargetPos:wt.pos,dragOverNodeKey:dt,dropContainerKey:mt===0?null:((Ke=wt.parent)===null||Ke===void 0?void 0:Ke.key)||null,dropAllowed:we}}function te(pe,xe){if(pe){var Ae=xe.multiple;return Ae?pe.slice():pe.length?[pe[0]]:pe}}var se=function(xe){return xe};function ie(pe,xe){if(!pe)return[];var Ae=xe||{},De=Ae.processProps,Fe=De===void 0?se:De,Te=Array.isArray(pe)?pe:[pe];return Te.map(function(Ne){var Be=Ne.children,Ge=_objectWithoutProperties(Ne,Ee),Ye=ie(Be,xe);return React.createElement(TreeNode,_extends({key:Ge.key},Fe(Ge)),Ye)})}function le(pe){if(!pe)return null;var xe;if(Array.isArray(pe))xe={checkedKeys:pe,halfCheckedKeys:void 0};else if((0,Gt.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 Ae=new Set;function De(Fe){if(!Ae.has(Fe)){var Te=(0,de.Z)(xe,Fe);if(Te){Ae.add(Fe);var Ne=Te.parent,Be=Te.node;Be.disabled||Ne&&De(Ne.key)}}}return(pe||[]).forEach(function(Fe){De(Fe)}),(0,at.Z)(Ae)}},34643:function(Gn,jn,ft){"use strict";ft.d(jn,{S:function(){return ve}});var at=ft(48736),Gt=ft(65065);function oe(Ee,ke){var Se=new Set;return Ee.forEach(function(je){ke.has(je)||Se.add(je)}),Se}function Ue(Ee){var ke=Ee||{},Se=ke.disabled,je=ke.disableCheckbox,me=ke.checkable;return!!(Se||je)||me===!1}function Ie(Ee,ke,Se,je){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,Ae=xe===void 0?[]:xe;me.has(ce)&&!je(pe)&&Ae.filter(function(De){return!je(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(!(je(pe)||!le.parent||te.has(le.parent.key))){if(je(le.parent.node)){te.add(ce.key);return}var xe=!0,Ae=!1;(ce.children||[]).filter(function(De){return!je(De.node)}).forEach(function(De){var Fe=De.key,Te=me.has(Fe);xe&&!Te&&(xe=!1),!Ae&&(Te||Pe.has(Fe))&&(Ae=!0)}),xe&&me.add(ce.key),Ae&&Pe.add(ce.key),te.add(ce.key)}})}return{checkedKeys:Array.from(me),halfCheckedKeys:Array.from(oe(Pe,me))}}function de(Ee,ke,Se,je,me){for(var Pe=new Set(Ee),fe=new Set(ke),z=0;z<=je;z+=1){var te=Se.get(z)||new Set;te.forEach(function(ce){var pe=ce.key,xe=ce.node,Ae=ce.children,De=Ae===void 0?[]:Ae;!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=je;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 Ae=!0,De=!1;(pe.children||[]).filter(function(Fe){return!me(Fe.node)}).forEach(function(Fe){var Te=Fe.key,Ne=Pe.has(Te);Ae&&!Ne&&(Ae=!1),!De&&(Ne||fe.has(Te))&&(De=!0)}),Ae||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,je){var me=[],Pe;je?Pe=je:Pe=Ue;var fe=new Set(Ee.filter(function(ie){var le=!!(0,Gt.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=Ie(fe,z,te,Pe):se=de(fe,ke.halfCheckedKeys,z,te,Pe),se}},65065:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return at}});function at(Gt,oe){return Gt[oe]}},34061:function(Gn,jn,ft){"use strict";ft.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=ft(26420),Gt=ft(15142),oe=ft(98506),Ue=ft(33346),Ie=ft(11592),de=ft(2738),ve=ft(48736),Ee=ft(65065),ke=["children"];function Se(pe,xe){return"".concat(pe,"-").concat(xe)}function je(pe){return pe&&pe.type&&pe.type.isTreeNode}function me(pe,xe){return pe!=null?pe:xe}function Pe(pe){var xe=pe||{},Ae=xe.title,De=xe._title,Fe=xe.key,Te=xe.children,Ne=Ae||"title";return{title:Ne,_title:De||[Ne],key:Fe||"key",children:Te||"children"}}function fe(pe,xe){var Ae=new Map;function De(Fe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Fe||[]).forEach(function(Ne){var Be=Ne[xe.key],Ge=Ne[xe.children];warning(Be!=null,"Tree node must have a certain key: [".concat(Te).concat(Be,"]"));var Ye=String(Be);warning(!Ae.has(Ye)||Be===null||Be===void 0,"Same 'key' exist in the Tree: ".concat(Ye)),Ae.set(Ye,!0),De(Ge,"".concat(Te).concat(Ye," > "))})}De(pe)}function z(pe){function xe(Ae){var De=(0,Ie.Z)(Ae);return De.map(function(Fe){if(!je(Fe))return(0,ve.ZP)(!Fe,"Tree/TreeNode can only accept TreeNode as children."),null;var Te=Fe.key,Ne=Fe.props,Be=Ne.children,Ge=(0,Ue.Z)(Ne,ke),Ye=(0,oe.Z)({key:Te},Ge),Ke=xe(Be);return Ke.length&&(Ye.children=Ke),Ye}).filter(function(Fe){return Fe})}return xe(pe)}function te(pe,xe,Ae){var De=Pe(Ae),Fe=De._title,Te=De.key,Ne=De.children,Be=new Set(xe===!0?[]:xe),Ge=[];function Ye(Ke){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ke.map(function(ot,lt){for(var ut=Se(Xe?Xe.pos:"0",lt),Ct=me(ot[Te],ut),Je,nt=0;nt<Fe.length;nt+=1){var St=Fe[nt];if(ot[St]!==void 0){Je=ot[St];break}}var wt=Object.assign((0,de.Z)(ot,[].concat((0,Gt.Z)(Fe),[Te,Ne])),{title:Je,key:Ct,parent:Xe,pos:ut,children:null,data:ot,isStart:[].concat((0,Gt.Z)(Xe?Xe.isStart:[]),[lt===0]),isEnd:[].concat((0,Gt.Z)(Xe?Xe.isEnd:[]),[lt===Ke.length-1])});return Ge.push(wt),xe===!0||Be.has(Ct)?wt.children=Ye(ot[Ne]||[],wt):wt.children=[],wt})}return Ye(pe),Ge}function se(pe,xe,Ae){var De={};(0,at.Z)(Ae)==="object"?De=Ae:De={externalGetKey:Ae},De=De||{};var Fe=De,Te=Fe.childrenPropName,Ne=Fe.externalGetKey,Be=Fe.fieldNames,Ge=Pe(Be),Ye=Ge.key,Ke=Ge.children,Xe=Te||Ke,ot;Ne?typeof Ne=="string"?ot=function(Ct){return Ct[Ne]}:typeof Ne=="function"&&(ot=function(Ct){return Ne(Ct)}):ot=function(Ct,Je){return me(Ct[Ye],Je)};function lt(ut,Ct,Je,nt){var St=ut?ut[Xe]:pe,wt=ut?Se(Je.pos,Ct):"0",bt=ut?[].concat((0,Gt.Z)(nt),[ut]):[];if(ut){var ct=ot(ut,wt),vt={node:ut,index:Ct,pos:wt,key:ct,parentPos:Je.node?Je.pos:null,level:Je.level+1,nodes:bt};xe(vt)}St&&St.forEach(function(ht,Lt){lt(ht,Lt,{node:ut,pos:wt,level:Je?Je.level+1:-1},bt)})}lt(null)}function ie(pe){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ae=xe.initWrapper,De=xe.processEntity,Fe=xe.onProcessFinished,Te=xe.externalGetKey,Ne=xe.childrenPropName,Be=xe.fieldNames,Ge=arguments.length>2?arguments[2]:void 0,Ye=Te||Ge,Ke={},Xe={},ot={posEntities:Ke,keyEntities:Xe};return Ae&&(ot=Ae(ot)||ot),se(pe,function(lt){var ut=lt.node,Ct=lt.index,Je=lt.pos,nt=lt.key,St=lt.parentPos,wt=lt.level,bt=lt.nodes,ct={node:ut,nodes:bt,index:Ct,key:nt,pos:Je,level:wt},vt=me(nt,Je);Ke[Je]=ct,Xe[vt]=ct,ct.parent=Ke[St],ct.parent&&(ct.parent.children=ct.parent.children||[],ct.parent.children.push(ct)),De&&De(ct,ot)},{externalGetKey:Ye,childrenPropName:Ne,fieldNames:Be}),Fe&&Fe(ot),ot}function le(pe,xe){var Ae=xe.expandedKeys,De=xe.selectedKeys,Fe=xe.loadedKeys,Te=xe.loadingKeys,Ne=xe.checkedKeys,Be=xe.halfCheckedKeys,Ge=xe.dragOverNodeKey,Ye=xe.dropPosition,Ke=xe.keyEntities,Xe=(0,Ee.Z)(Ke,pe),ot={eventKey:pe,expanded:Ae.indexOf(pe)!==-1,selected:De.indexOf(pe)!==-1,loaded:Fe.indexOf(pe)!==-1,loading:Te.indexOf(pe)!==-1,checked:Ne.indexOf(pe)!==-1,halfChecked:Be.indexOf(pe)!==-1,pos:String(Xe?Xe.pos:""),dragOver:Ge===pe&&Ye===0,dragOverGapTop:Ge===pe&&Ye===-1,dragOverGapBottom:Ge===pe&&Ye===1};return ot}function ce(pe){var xe=pe.data,Ae=pe.expanded,De=pe.selected,Fe=pe.checked,Te=pe.loaded,Ne=pe.loading,Be=pe.halfChecked,Ge=pe.dragOver,Ye=pe.dragOverGapTop,Ke=pe.dragOverGapBottom,Xe=pe.pos,ot=pe.active,lt=pe.eventKey,ut=(0,oe.Z)((0,oe.Z)({},xe),{},{expanded:Ae,selected:De,checked:Fe,loaded:Te,loading:Ne,halfChecked:Be,dragOver:Ge,dragOverGapTop:Ye,dragOverGapBottom:Ke,pos:Xe,active:ot,key:lt});return"props"in ut||Object.defineProperty(ut,"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}}),ut}},90472:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return lt}});var at=ft(67711),Gt=ft(42573),oe=ft(58698),Ue=ft(62437),Ie=ft(74700),de=ft(45080),ve=ft(52873),Ee=ft(59301),ke=ft(98506),Se=ft(33346),je=ft(26420),me=ft(77910),Pe=ft(51343),fe=ft(15142),z=ft(92310),te=ft.n(z),se=ft(26112),ie=ft(48736),le=function(ut,Ct){if(ut&&Ct){var Je=Array.isArray(Ct)?Ct:Ct.split(","),nt=ut.name||"",St=ut.type||"",wt=St.replace(/\/.*$/,"");return Je.some(function(bt){var ct=bt.trim();if(/^\*(\/\*)?$/.test(bt))return!0;if(ct.charAt(0)==="."){var vt=nt.toLowerCase(),ht=ct.toLowerCase(),Lt=[ht];return(ht===".jpg"||ht===".jpeg")&&(Lt=[".jpg",".jpeg"]),Lt.some(function(dt){return vt.endsWith(dt)})}return/\/\*$/.test(ct)?wt===ct.replace(/\/.*$/,""):St===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(ut,Ct){var Je="cannot ".concat(ut.method," ").concat(ut.action," ").concat(Ct.status,"'"),nt=new Error(Je);return nt.status=Ct.status,nt.method=ut.method,nt.url=ut.action,nt}function pe(ut){var Ct=ut.responseText||ut.response;if(!Ct)return Ct;try{return JSON.parse(Ct)}catch(Je){return Ct}}function xe(ut){var Ct=new XMLHttpRequest;ut.onProgress&&Ct.upload&&(Ct.upload.onprogress=function(wt){wt.total>0&&(wt.percent=wt.loaded/wt.total*100),ut.onProgress(wt)});var Je=new FormData;ut.data&&Object.keys(ut.data).forEach(function(St){var wt=ut.data[St];if(Array.isArray(wt)){wt.forEach(function(bt){Je.append("".concat(St,"[]"),bt)});return}Je.append(St,wt)}),ut.file instanceof Blob?Je.append(ut.filename,ut.file,ut.file.name):Je.append(ut.filename,ut.file),Ct.onerror=function(wt){ut.onError(wt)},Ct.onload=function(){return Ct.status<200||Ct.status>=300?ut.onError(ce(ut,Ct),pe(Ct)):ut.onSuccess(pe(Ct),Ct)},Ct.open(ut.method,ut.action,!0),ut.withCredentials&&"withCredentials"in Ct&&(Ct.withCredentials=!0);var nt=ut.headers||{};return nt["X-Requested-With"]!==null&&Ct.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(nt).forEach(function(St){nt[St]!==null&&Ct.setRequestHeader(St,nt[St])}),Ct.send(Je),{abort:function(){Ct.abort()}}}var Ae=function(){var ut=(0,Pe.Z)((0,me.Z)().mark(function Ct(Je,nt){var St,wt,bt,ct,vt,ht,Lt,dt;return(0,me.Z)().wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:ht=function(){return ht=(0,Pe.Z)((0,me.Z)().mark(function $e(He){return(0,me.Z)().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.abrupt("return",new Promise(function(We){He.file(function(tt){nt(tt)?(He.fullPath&&!tt.webkitRelativePath&&(Object.defineProperties(tt,{webkitRelativePath:{writable:!0}}),tt.webkitRelativePath=He.fullPath.replace(/^\//,""),Object.defineProperties(tt,{webkitRelativePath:{writable:!1}})),We(tt)):We(null)})}));case 1:case"end":return Le.stop()}},$e)})),ht.apply(this,arguments)},vt=function($e){return ht.apply(this,arguments)},ct=function(){return ct=(0,Pe.Z)((0,me.Z)().mark(function $e(He){var we,Le,We,tt,Re;return(0,me.Z)().wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:we=He.createReader(),Le=[];case 2:return Ve.next=5,new Promise(function(it){we.readEntries(it,function(){return it([])})});case 5:if(We=Ve.sent,tt=We.length,tt){Ve.next=9;break}return Ve.abrupt("break",12);case 9:for(Re=0;Re<tt;Re++)Le.push(We[Re]);Ve.next=2;break;case 12:return Ve.abrupt("return",Le);case 13:case"end":return Ve.stop()}},$e)})),ct.apply(this,arguments)},bt=function($e){return ct.apply(this,arguments)},St=[],wt=[],Je.forEach(function(gt){return wt.push(gt.webkitGetAsEntry())}),Lt=function(){var gt=(0,Pe.Z)((0,me.Z)().mark(function $e(He,we){var Le,We;return(0,me.Z)().wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:if(He){Re.next=2;break}return Re.abrupt("return");case 2:if(He.path=we||"",!He.isFile){Re.next=10;break}return Re.next=6,vt(He);case 6:Le=Re.sent,Le&&St.push(Le),Re.next=15;break;case 10:if(!He.isDirectory){Re.next=15;break}return Re.next=13,bt(He);case 13:We=Re.sent,wt.push.apply(wt,(0,fe.Z)(We));case 15:case"end":return Re.stop()}},$e)}));return function(He,we){return gt.apply(this,arguments)}}(),dt=0;case 9:if(!(dt<wt.length)){Et.next=15;break}return Et.next=12,Lt(wt[dt]);case 12:dt++,Et.next=9;break;case 15:return Et.abrupt("return",St);case 16:case"end":return Et.stop()}},Ct)}));return function(Je,nt){return ut.apply(this,arguments)}}(),De=Ae,Fe=+new Date,Te=0;function Ne(){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"],Ge=function(ut){(0,Ie.Z)(Je,ut);var Ct=(0,de.Z)(Je);function Je(){var nt;(0,Gt.Z)(this,Je);for(var St=arguments.length,wt=new Array(St),bt=0;bt<St;bt++)wt[bt]=arguments[bt];return nt=Ct.call.apply(Ct,[this].concat(wt)),(0,ve.Z)((0,Ue.Z)(nt),"state",{uid:Ne()}),(0,ve.Z)((0,Ue.Z)(nt),"reqs",{}),(0,ve.Z)((0,Ue.Z)(nt),"fileInput",void 0),(0,ve.Z)((0,Ue.Z)(nt),"_isMounted",void 0),(0,ve.Z)((0,Ue.Z)(nt),"onChange",function(ct){var vt=nt.props,ht=vt.accept,Lt=vt.directory,dt=ct.target.files,mt=(0,fe.Z)(dt).filter(function(Et){return!Lt||le(Et,ht)});nt.uploadFiles(mt),nt.reset()}),(0,ve.Z)((0,Ue.Z)(nt),"onClick",function(ct){var vt=nt.fileInput;if(vt){var ht=ct.target,Lt=nt.props.onClick;if(ht&&ht.tagName==="BUTTON"){var dt=vt.parentNode;dt.focus(),ht.blur()}vt.click(),Lt&&Lt(ct)}}),(0,ve.Z)((0,Ue.Z)(nt),"onKeyDown",function(ct){ct.key==="Enter"&&nt.onClick(ct)}),(0,ve.Z)((0,Ue.Z)(nt),"onFileDrop",function(){var ct=(0,Pe.Z)((0,me.Z)().mark(function vt(ht){var Lt,dt,mt;return(0,me.Z)().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:if(Lt=nt.props.multiple,ht.preventDefault(),ht.type!=="dragover"){gt.next=4;break}return gt.abrupt("return");case 4:if(!nt.props.directory){gt.next=11;break}return gt.next=7,De(Array.prototype.slice.call(ht.dataTransfer.items),function($e){return le($e,nt.props.accept)});case 7:dt=gt.sent,nt.uploadFiles(dt),gt.next=14;break;case 11:mt=(0,fe.Z)(ht.dataTransfer.files).filter(function($e){return le($e,nt.props.accept)}),Lt===!1&&(mt=mt.slice(0,1)),nt.uploadFiles(mt);case 14:case"end":return gt.stop()}},vt)}));return function(vt){return ct.apply(this,arguments)}}()),(0,ve.Z)((0,Ue.Z)(nt),"uploadFiles",function(ct){var vt=(0,fe.Z)(ct),ht=vt.map(function(Lt){return Lt.uid=Ne(),nt.processFile(Lt,vt)});Promise.all(ht).then(function(Lt){var dt=nt.props.onBatchStart;dt==null||dt(Lt.map(function(mt){var Et=mt.origin,gt=mt.parsedFile;return{file:Et,parsedFile:gt}})),Lt.filter(function(mt){return mt.parsedFile!==null}).forEach(function(mt){nt.post(mt)})})}),(0,ve.Z)((0,Ue.Z)(nt),"processFile",function(){var ct=(0,Pe.Z)((0,me.Z)().mark(function vt(ht,Lt){var dt,mt,Et,gt,$e,He,we,Le,We;return(0,me.Z)().wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:if(dt=nt.props.beforeUpload,mt=ht,!dt){Re.next=14;break}return Re.prev=3,Re.next=6,dt(ht,Lt);case 6:mt=Re.sent,Re.next=12;break;case 9:Re.prev=9,Re.t0=Re.catch(3),mt=!1;case 12:if(mt!==!1){Re.next=14;break}return Re.abrupt("return",{origin:ht,parsedFile:null,action:null,data:null});case 14:if(Et=nt.props.action,typeof Et!="function"){Re.next=21;break}return Re.next=18,Et(ht);case 18:gt=Re.sent,Re.next=22;break;case 21:gt=Et;case 22:if($e=nt.props.data,typeof $e!="function"){Re.next=29;break}return Re.next=26,$e(ht);case 26:He=Re.sent,Re.next=30;break;case 29:He=$e;case 30:return we=((0,je.Z)(mt)==="object"||typeof mt=="string")&&mt?mt:ht,we instanceof File?Le=we:Le=new File([we],ht.name,{type:ht.type}),We=Le,We.uid=ht.uid,Re.abrupt("return",{origin:ht,data:He,parsedFile:We,action:gt});case 35:case"end":return Re.stop()}},vt,null,[[3,9]])}));return function(vt,ht){return ct.apply(this,arguments)}}()),(0,ve.Z)((0,Ue.Z)(nt),"saveFileInput",function(ct){nt.fileInput=ct}),nt}return(0,oe.Z)(Je,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(St){var wt=this,bt=St.data,ct=St.origin,vt=St.action,ht=St.parsedFile;if(this._isMounted){var Lt=this.props,dt=Lt.onStart,mt=Lt.customRequest,Et=Lt.name,gt=Lt.headers,$e=Lt.withCredentials,He=Lt.method,we=ct.uid,Le=mt||xe,We={action:vt,filename:Et,data:bt,file:ht,headers:gt,withCredentials:$e,method:He||"post",onProgress:function(Re){var _e=wt.props.onProgress;_e==null||_e(Re,ht)},onSuccess:function(Re,_e){var Ve=wt.props.onSuccess;Ve==null||Ve(Re,ht,_e),delete wt.reqs[we]},onError:function(Re,_e){var Ve=wt.props.onError;Ve==null||Ve(Re,_e,ht),delete wt.reqs[we]}};dt(ct),this.reqs[we]=Le(We)}}},{key:"reset",value:function(){this.setState({uid:Ne()})}},{key:"abort",value:function(St){var wt=this.reqs;if(St){var bt=St.uid?St.uid:St;wt[bt]&&wt[bt].abort&&wt[bt].abort(),delete wt[bt]}else Object.keys(wt).forEach(function(ct){wt[ct]&&wt[ct].abort&&wt[ct].abort(),delete wt[ct]})}},{key:"render",value:function(){var St=this.props,wt=St.component,bt=St.prefixCls,ct=St.className,vt=St.classNames,ht=vt===void 0?{}:vt,Lt=St.disabled,dt=St.id,mt=St.name,Et=St.style,gt=St.styles,$e=gt===void 0?{}:gt,He=St.multiple,we=St.accept,Le=St.capture,We=St.children,tt=St.directory,Re=St.openFileDialogOnClick,_e=St.onMouseEnter,Ve=St.onMouseLeave,it=St.hasControlInside,yt=(0,Se.Z)(St,Be),Pt=te()((0,ve.Z)((0,ve.Z)((0,ve.Z)({},bt,!0),"".concat(bt,"-disabled"),Lt),ct,ct)),jt=tt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Nt=Lt?{}:{onClick:Re?this.onClick:function(){},onKeyDown:Re?this.onKeyDown:function(){},onMouseEnter:_e,onMouseLeave:Ve,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:it?void 0:"0"};return Ee.createElement(wt,(0,at.Z)({},Nt,{className:Pt,role:it?void 0:"button",style:Et}),Ee.createElement("input",(0,at.Z)({},(0,se.Z)(yt,{aria:!0,data:!0}),{id:dt,name:mt,disabled:Lt,type:"file",ref:this.saveFileInput,onClick:function($t){return $t.stopPropagation()},key:this.state.uid,style:(0,ke.Z)({display:"none"},$e.input),className:ht.input,accept:we},jt,{multiple:He,onChange:this.onChange},Le!=null?{capture:Le}:{})),We)}}]),Je}(Ee.Component),Ye=Ge;function Ke(){}var Xe=function(ut){(0,Ie.Z)(Je,ut);var Ct=(0,de.Z)(Je);function Je(){var nt;(0,Gt.Z)(this,Je);for(var St=arguments.length,wt=new Array(St),bt=0;bt<St;bt++)wt[bt]=arguments[bt];return nt=Ct.call.apply(Ct,[this].concat(wt)),(0,ve.Z)((0,Ue.Z)(nt),"uploader",void 0),(0,ve.Z)((0,Ue.Z)(nt),"saveUploader",function(ct){nt.uploader=ct}),nt}return(0,oe.Z)(Je,[{key:"abort",value:function(St){this.uploader.abort(St)}},{key:"render",value:function(){return Ee.createElement(Ye,(0,at.Z)({},this.props,{ref:this.saveUploader}))}}]),Je}(Ee.Component);(0,ve.Z)(Xe,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ke,onError:Ke,onSuccess:Ke,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var ot=Xe,lt=ot},8224:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return Gt}});var at=ft(4676);function Gt(oe,Ue,Ie,de){var ve=at.unstable_batchedUpdates?function(ke){at.unstable_batchedUpdates(Ie,ke)}:Ie;return oe!=null&&oe.addEventListener&&oe.addEventListener(Ue,ve,de),{remove:function(){oe!=null&&oe.removeEventListener&&oe.removeEventListener(Ue,ve,de)}}}},24514:function(Gn,jn,ft){"use strict";ft.d(jn,{G:function(){return Ue}});var at=ft(47273),Gt=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(!Gt(de))return!1;var Ee=document.createElement("div"),ke=Ee.style[de];return Ee.style[de]=ve,Ee.style[de]!==ke};function Ue(Ie,de){return!Array.isArray(Ie)&&de!==void 0?oe(Ie,de):Gt(Ie)}},6790:function(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return $e}});var at=ft(67711),Gt=ft(26420),oe=ft(98506),Ue=ft(52873),Ie=ft(16886),de=ft(33346),ve=ft(92310),Ee=ft.n(ve),ke=ft(29301),Se=ft(70425),je=ft(34280),me=ft(59301),Pe=ft(4676),fe=me.forwardRef(function(He,we){var Le=He.height,We=He.offsetY,tt=He.offsetX,Re=He.children,_e=He.prefixCls,Ve=He.onInnerResize,it=He.innerProps,yt=He.rtl,Pt=He.extra,jt={},Nt={display:"flex",flexDirection:"column"};return We!==void 0&&(jt={height:Le,position:"relative",overflow:"hidden"},Nt=(0,oe.Z)((0,oe.Z)({},Nt),{},(0,Ue.Z)((0,Ue.Z)((0,Ue.Z)((0,Ue.Z)((0,Ue.Z)({transform:"translateY(".concat(We,"px)")},yt?"marginRight":"marginLeft",-tt),"position","absolute"),"left",0),"right",0),"top",0))),me.createElement("div",{style:jt},me.createElement(ke.Z,{onResize:function($t){var en=$t.offsetHeight;en&&Ve&&Ve()}},me.createElement("div",(0,at.Z)({style:Nt,className:Ee()((0,Ue.Z)({},"".concat(_e,"-holder-inner"),_e)),ref:we},it),Re,Pt)))});fe.displayName="Filler";var z=fe;function te(He){var we=He.children,Le=He.setRef,We=me.useCallback(function(tt){Le(tt)},[]);return me.cloneElement(we,{ref:We})}function se(He,we,Le,We,tt,Re,_e,Ve){var it=Ve.getKey;return He.slice(we,Le+1).map(function(yt,Pt){var jt=we+Pt,Nt=_e(yt,jt,{style:{width:We},offsetX:tt}),Bt=it(yt);return me.createElement(te,{key:Bt,setRef:function(en){return Re(yt,en)}},Nt)})}function ie(He,we,Le,We){var tt=Le-He,Re=we-Le,_e=Math.min(tt,Re)*2;if(We<=_e){var Ve=Math.floor(We/2);return We%2?Le+Ve+1:Le-Ve}return tt>Re?Le-(We-Re):Le+(We-tt)}function le(He,we,Le){var We=He.length,tt=we.length,Re,_e;if(We===0&&tt===0)return null;We<tt?(Re=He,_e=we):(Re=we,_e=He);var Ve={__EMPTY_ITEM__:!0};function it($t){return $t!==void 0?Le($t):Ve}for(var yt=null,Pt=Math.abs(We-tt)!==1,jt=0;jt<_e.length;jt+=1){var Nt=it(Re[jt]),Bt=it(_e[jt]);if(Nt!==Bt){yt=jt,Pt=Pt||Nt!==it(_e[jt+1]);break}}return yt===null?null:{index:yt,multiple:Pt}}function ce(He,we,Le){var We=me.useState(He),tt=(0,Ie.Z)(We,2),Re=tt[0],_e=tt[1],Ve=me.useState(null),it=(0,Ie.Z)(Ve,2),yt=it[0],Pt=it[1];return me.useEffect(function(){var jt=le(Re||[],He||[],we);(jt==null?void 0:jt.index)!==void 0&&(Le==null||Le(jt.index),Pt(He[jt.index])),_e(He)},[He]),[yt]}var pe=ft(16089),xe=(typeof navigator=="undefined"?"undefined":(0,Gt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ae=xe,De=function(He,we,Le,We){var tt=(0,me.useRef)(!1),Re=(0,me.useRef)(null);function _e(){clearTimeout(Re.current),tt.current=!0,Re.current=setTimeout(function(){tt.current=!1},50)}var Ve=(0,me.useRef)({top:He,bottom:we,left:Le,right:We});return Ve.current.top=He,Ve.current.bottom=we,Ve.current.left=Le,Ve.current.right=We,function(it,yt){var Pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,jt=it?yt<0&&Ve.current.left||yt>0&&Ve.current.right:yt<0&&Ve.current.top||yt>0&&Ve.current.bottom;return Pt&&jt?(clearTimeout(Re.current),tt.current=!1):(!jt||tt.current)&&_e(),!tt.current&&jt}};function Fe(He,we,Le,We,tt,Re,_e){var Ve=(0,me.useRef)(0),it=(0,me.useRef)(null),yt=(0,me.useRef)(null),Pt=(0,me.useRef)(!1),jt=De(we,Le,We,tt);function Nt(hn,an){if(pe.Z.cancel(it.current),!jt(!1,an)){var cn=hn;if(!cn._virtualHandled)cn._virtualHandled=!0;else return;Ve.current+=an,yt.current=an,Ae||cn.preventDefault(),it.current=(0,pe.Z)(function(){var wn=Pt.current?10:1;_e(Ve.current*wn,!1),Ve.current=0})}}function Bt(hn,an){_e(an,!0),Ae||hn.preventDefault()}var $t=(0,me.useRef)(null),en=(0,me.useRef)(null);function qt(hn){if(He){pe.Z.cancel(en.current),en.current=(0,pe.Z)(function(){$t.current=null},2);var an=hn.deltaX,cn=hn.deltaY,wn=hn.shiftKey,xn=an,Nn=cn;($t.current==="sx"||!$t.current&&wn&&cn&&!an)&&(xn=cn,Nn=0,$t.current="sx");var Zn=Math.abs(xn),Tr=Math.abs(Nn);$t.current===null&&($t.current=Re&&Zn>Tr?"x":"y"),$t.current==="y"?Nt(hn,Nn):Bt(hn,xn)}}function Zt(hn){He&&(Pt.current=hn.detail===yt.current)}return[qt,Zt]}function Te(He,we,Le,We){var tt=me.useMemo(function(){return[new Map,[]]},[He,Le.id,We]),Re=(0,Ie.Z)(tt,2),_e=Re[0],Ve=Re[1],it=function(Pt){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pt,Nt=_e.get(Pt),Bt=_e.get(jt);if(Nt===void 0||Bt===void 0)for(var $t=He.length,en=Ve.length;en<$t;en+=1){var qt,Zt=He[en],hn=we(Zt);_e.set(hn,en);var an=(qt=Le.get(hn))!==null&&qt!==void 0?qt:We;if(Ve[en]=(Ve[en-1]||0)+an,hn===Pt&&(Nt=en),hn===jt&&(Bt=en),Nt!==void 0&&Bt!==void 0)break}return{top:Ve[Nt-1]||0,bottom:Ve[Bt]}};return it}var Ne=ft(42573),Be=ft(58698),Ge=function(){function He(){(0,Ne.Z)(this,He),(0,Ue.Z)(this,"maps",void 0),(0,Ue.Z)(this,"id",0),(0,Ue.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Be.Z)(He,[{key:"set",value:function(Le,We){this.diffRecords.set(Le,this.maps[Le]),this.maps[Le]=We,this.id+=1}},{key:"get",value:function(Le){return this.maps[Le]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),He}(),Ye=Ge;function Ke(He){var we=parseFloat(He);return isNaN(we)?0:we}function Xe(He,we,Le){var We=me.useState(0),tt=(0,Ie.Z)(We,2),Re=tt[0],_e=tt[1],Ve=(0,me.useRef)(new Map),it=(0,me.useRef)(new Ye),yt=(0,me.useRef)(0);function Pt(){yt.current+=1}function jt(){var Bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Pt();var $t=function(){var Zt=!1;Ve.current.forEach(function(hn,an){if(hn&&hn.offsetParent){var cn=hn.offsetHeight,wn=getComputedStyle(hn),xn=wn.marginTop,Nn=wn.marginBottom,Zn=Ke(xn),Tr=Ke(Nn),qn=cn+Zn+Tr;it.current.get(an)!==qn&&(it.current.set(an,qn),Zt=!0)}}),Zt&&_e(function(hn){return hn+1})};if(Bt)$t();else{yt.current+=1;var en=yt.current;Promise.resolve().then(function(){en===yt.current&&$t()})}}function Nt(Bt,$t){var en=He(Bt),qt=Ve.current.get(en);$t?(Ve.current.set(en,$t),jt()):Ve.current.delete(en),!qt!=!$t&&($t?we==null||we(Bt):Le==null||Le(Bt))}return(0,me.useEffect)(function(){return Pt},[]),[Nt,jt,it.current,Re]}var ot=14/15;function lt(He,we,Le){var We=(0,me.useRef)(!1),tt=(0,me.useRef)(0),Re=(0,me.useRef)(0),_e=(0,me.useRef)(null),Ve=(0,me.useRef)(null),it,yt=function(Bt){if(We.current){var $t=Math.ceil(Bt.touches[0].pageX),en=Math.ceil(Bt.touches[0].pageY),qt=tt.current-$t,Zt=Re.current-en,hn=Math.abs(qt)>Math.abs(Zt);hn?tt.current=$t:Re.current=en;var an=Le(hn,hn?qt:Zt,!1,Bt);an&&Bt.preventDefault(),clearInterval(Ve.current),an&&(Ve.current=setInterval(function(){hn?qt*=ot:Zt*=ot;var cn=Math.floor(hn?qt:Zt);(!Le(hn,cn,!0)||Math.abs(cn)<=.1)&&clearInterval(Ve.current)},16))}},Pt=function(){We.current=!1,it()},jt=function(Bt){it(),Bt.touches.length===1&&!We.current&&(We.current=!0,tt.current=Math.ceil(Bt.touches[0].pageX),Re.current=Math.ceil(Bt.touches[0].pageY),_e.current=Bt.target,_e.current.addEventListener("touchmove",yt,{passive:!1}),_e.current.addEventListener("touchend",Pt,{passive:!0}))};it=function(){_e.current&&(_e.current.removeEventListener("touchmove",yt),_e.current.removeEventListener("touchend",Pt))},(0,je.Z)(function(){return He&&we.current.addEventListener("touchstart",jt,{passive:!0}),function(){var Nt;(Nt=we.current)===null||Nt===void 0||Nt.removeEventListener("touchstart",jt),it(),clearInterval(Ve.current)}},[He])}function ut(He){return Math.floor(Math.pow(He,.5))}function Ct(He,we){var Le="touches"in He?He.touches[0]:He;return Le[we?"pageX":"pageY"]-window[we?"scrollX":"scrollY"]}function Je(He,we,Le){me.useEffect(function(){var We=we.current;if(He&&We){var tt=!1,Re,_e,Ve=function(){pe.Z.cancel(Re)},it=function Nt(){Ve(),Re=(0,pe.Z)(function(){Le(_e),Nt()})},yt=function(Bt){if(!(Bt.target.draggable||Bt.button!==0)){var $t=Bt;$t._virtualHandled||($t._virtualHandled=!0,tt=!0)}},Pt=function(){tt=!1,Ve()},jt=function(Bt){if(tt){var $t=Ct(Bt,!1),en=We.getBoundingClientRect(),qt=en.top,Zt=en.bottom;if($t<=qt){var hn=qt-$t;_e=-ut(hn),it()}else if($t>=Zt){var an=$t-Zt;_e=ut(an),it()}else Ve()}};return We.addEventListener("mousedown",yt),We.ownerDocument.addEventListener("mouseup",Pt),We.ownerDocument.addEventListener("mousemove",jt),function(){We.removeEventListener("mousedown",yt),We.ownerDocument.removeEventListener("mouseup",Pt),We.ownerDocument.removeEventListener("mousemove",jt),Ve()}}},[He])}var nt=10;function St(He,we,Le,We,tt,Re,_e,Ve){var it=me.useRef(),yt=me.useState(null),Pt=(0,Ie.Z)(yt,2),jt=Pt[0],Nt=Pt[1];return(0,je.Z)(function(){if(jt&&jt.times<nt){if(!He.current){Nt(function(Ci){return(0,oe.Z)({},Ci)});return}Re();var Bt=jt.targetAlign,$t=jt.originAlign,en=jt.index,qt=jt.offset,Zt=He.current.clientHeight,hn=!1,an=Bt,cn=null;if(Zt){for(var wn=Bt||$t,xn=0,Nn=0,Zn=0,Tr=Math.min(we.length-1,en),qn=0;qn<=Tr;qn+=1){var qr=tt(we[qn]);Nn=xn;var nr=Le.get(qr);Zn=Nn+(nr===void 0?We:nr),xn=Zn}for(var $r=wn==="top"?qt:Zt-qt,hi=Tr;hi>=0;hi-=1){var Si=tt(we[hi]),Li=Le.get(Si);if(Li===void 0){hn=!0;break}if($r-=Li,$r<=0)break}switch(wn){case"top":cn=Nn-qt;break;case"bottom":cn=Zn-Zt+qt;break;default:{var Ei=He.current.scrollTop,Lr=Ei+Zt;Nn<Ei?an="top":Zn>Lr&&(an="bottom")}}cn!==null&&_e(cn),cn!==jt.lastTop&&(hn=!0)}hn&&Nt((0,oe.Z)((0,oe.Z)({},jt),{},{times:jt.times+1,targetAlign:an,lastTop:cn}))}},[jt,He.current]),function(Bt){if(Bt==null){Ve();return}if(pe.Z.cancel(it.current),typeof Bt=="number")_e(Bt);else if(Bt&&(0,Gt.Z)(Bt)==="object"){var $t,en=Bt.align;"index"in Bt?$t=Bt.index:$t=we.findIndex(function(hn){return tt(hn)===Bt.key});var qt=Bt.offset,Zt=qt===void 0?0:qt;Nt({times:0,index:$t,offset:Zt,originAlign:en})}}}var wt=me.forwardRef(function(He,we){var Le=He.prefixCls,We=He.rtl,tt=He.scrollOffset,Re=He.scrollRange,_e=He.onStartMove,Ve=He.onStopMove,it=He.onScroll,yt=He.horizontal,Pt=He.spinSize,jt=He.containerSize,Nt=He.style,Bt=He.thumbStyle,$t=He.showScrollBar,en=me.useState(!1),qt=(0,Ie.Z)(en,2),Zt=qt[0],hn=qt[1],an=me.useState(null),cn=(0,Ie.Z)(an,2),wn=cn[0],xn=cn[1],Nn=me.useState(null),Zn=(0,Ie.Z)(Nn,2),Tr=Zn[0],qn=Zn[1],qr=!We,nr=me.useRef(),$r=me.useRef(),hi=me.useState($t),Si=(0,Ie.Z)(hi,2),Li=Si[0],Ei=Si[1],Lr=me.useRef(),Ci=function(){$t===!0||$t===!1||(clearTimeout(Lr.current),Ei(!0),Lr.current=setTimeout(function(){Ei(!1)},3e3))},et=Re-jt||0,ai=jt-Pt||0,Er=me.useMemo(function(){if(tt===0||et===0)return 0;var rn=tt/et;return rn*ai},[tt,et,ai]),Ln=function(tr){tr.stopPropagation(),tr.preventDefault()},An=me.useRef({top:Er,dragging:Zt,pageY:wn,startTop:Tr});An.current={top:Er,dragging:Zt,pageY:wn,startTop:Tr};var Bn=function(tr){hn(!0),xn(Ct(tr,yt)),qn(An.current.top),_e(),tr.stopPropagation(),tr.preventDefault()};me.useEffect(function(){var rn=function(ln){ln.preventDefault()},tr=nr.current,cr=$r.current;return tr.addEventListener("touchstart",rn,{passive:!1}),cr.addEventListener("touchstart",Bn,{passive:!1}),function(){tr.removeEventListener("touchstart",rn),cr.removeEventListener("touchstart",Bn)}},[]);var xr=me.useRef();xr.current=et;var zr=me.useRef();zr.current=ai,me.useEffect(function(){if(Zt){var rn,tr=function(ln){var vn=An.current,kn=vn.dragging,Rr=vn.pageY,Hn=vn.startTop;pe.Z.cancel(rn);var Ot=nr.current.getBoundingClientRect(),Ut=jt/(yt?Ot.width:Ot.height);if(kn){var Dn=(Ct(ln,yt)-Rr)*Ut,Tn=Hn;!qr&&yt?Tn-=Dn:Tn+=Dn;var Qt=xr.current,Fn=zr.current,vr=Fn?Tn/Fn:0,mr=Math.ceil(vr*Qt);mr=Math.max(mr,0),mr=Math.min(mr,Qt),rn=(0,pe.Z)(function(){it(mr,yt)})}},cr=function(){hn(!1),Ve()};return window.addEventListener("mousemove",tr,{passive:!0}),window.addEventListener("touchmove",tr,{passive:!0}),window.addEventListener("mouseup",cr,{passive:!0}),window.addEventListener("touchend",cr,{passive:!0}),function(){window.removeEventListener("mousemove",tr),window.removeEventListener("touchmove",tr),window.removeEventListener("mouseup",cr),window.removeEventListener("touchend",cr),pe.Z.cancel(rn)}}},[Zt]),me.useEffect(function(){return Ci(),function(){clearTimeout(Lr.current)}},[tt]),me.useImperativeHandle(we,function(){return{delayHidden:Ci}});var nn="".concat(Le,"-scrollbar"),sn={position:"absolute",visibility:Li?null:"hidden"},Ht={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return yt?(Object.assign(sn,{height:8,left:0,right:0,bottom:0}),Object.assign(Ht,(0,Ue.Z)({height:"100%",width:Pt},qr?"left":"right",Er))):(Object.assign(sn,(0,Ue.Z)({width:8,top:0,bottom:0},qr?"right":"left",0)),Object.assign(Ht,{width:"100%",height:Pt,top:Er})),me.createElement("div",{ref:nr,className:Ee()(nn,(0,Ue.Z)((0,Ue.Z)((0,Ue.Z)({},"".concat(nn,"-horizontal"),yt),"".concat(nn,"-vertical"),!yt),"".concat(nn,"-visible"),Li)),style:(0,oe.Z)((0,oe.Z)({},sn),Nt),onMouseDown:Ln,onMouseMove:Ci},me.createElement("div",{ref:$r,className:Ee()("".concat(nn,"-thumb"),(0,Ue.Z)({},"".concat(nn,"-thumb-moving"),Zt)),style:(0,oe.Z)((0,oe.Z)({},Ht),Bt),onMouseDown:Bn}))}),bt=wt,ct=20;function vt(){var He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Le=He/we*He;return isNaN(Le)&&(Le=0),Le=Math.max(Le,ct),Math.floor(Le)}var ht=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Lt=[],dt={overflowY:"auto",overflowAnchor:"none"};function mt(He,we){var Le=He.prefixCls,We=Le===void 0?"rc-virtual-list":Le,tt=He.className,Re=He.height,_e=He.itemHeight,Ve=He.fullHeight,it=Ve===void 0?!0:Ve,yt=He.style,Pt=He.data,jt=He.children,Nt=He.itemKey,Bt=He.virtual,$t=He.direction,en=He.scrollWidth,qt=He.component,Zt=qt===void 0?"div":qt,hn=He.onScroll,an=He.onVirtualScroll,cn=He.onVisibleChange,wn=He.innerProps,xn=He.extraRender,Nn=He.styles,Zn=He.showScrollBar,Tr=Zn===void 0?"optional":Zn,qn=(0,de.Z)(He,ht),qr=me.useCallback(function(mn){return typeof Nt=="function"?Nt(mn):mn==null?void 0:mn[Nt]},[Nt]),nr=Xe(qr,null,null),$r=(0,Ie.Z)(nr,4),hi=$r[0],Si=$r[1],Li=$r[2],Ei=$r[3],Lr=!!(Bt!==!1&&Re&&_e),Ci=me.useMemo(function(){return Object.values(Li.maps).reduce(function(mn,zn){return mn+zn},0)},[Li.id,Li.maps]),et=Lr&&Pt&&(Math.max(_e*Pt.length,Ci)>Re||!!en),ai=$t==="rtl",Er=Ee()(We,(0,Ue.Z)({},"".concat(We,"-rtl"),ai),tt),Ln=Pt||Lt,An=(0,me.useRef)(),Bn=(0,me.useRef)(),xr=(0,me.useRef)(),zr=(0,me.useState)(0),nn=(0,Ie.Z)(zr,2),sn=nn[0],Ht=nn[1],rn=(0,me.useState)(0),tr=(0,Ie.Z)(rn,2),cr=tr[0],Nr=tr[1],ln=(0,me.useState)(!1),vn=(0,Ie.Z)(ln,2),kn=vn[0],Rr=vn[1],Hn=function(){Rr(!0)},Ot=function(){Rr(!1)},Ut={getKey:qr};function Dn(mn){Ht(function(zn){var Vn;typeof mn=="function"?Vn=mn(zn):Vn=mn;var Mn=ii(Vn);return An.current.scrollTop=Mn,Mn})}var Tn=(0,me.useRef)({start:0,end:Ln.length}),Qt=(0,me.useRef)(),Fn=ce(Ln,qr),vr=(0,Ie.Z)(Fn,1),mr=vr[0];Qt.current=mr;var er=me.useMemo(function(){if(!Lr)return{scrollHeight:void 0,start:0,end:Ln.length-1,offset:void 0};if(!et){var mn;return{scrollHeight:((mn=Bn.current)===null||mn===void 0?void 0:mn.offsetHeight)||0,start:0,end:Ln.length-1,offset:void 0}}for(var zn=0,Vn,Mn,Kn,In=Ln.length,Jn=0;Jn<In;Jn+=1){var ir=Ln[Jn],fn=qr(ir),Ar=Li.get(fn),Dr=zn+(Ar===void 0?_e:Ar);Dr>=sn&&Vn===void 0&&(Vn=Jn,Mn=zn),Dr>sn+Re&&Kn===void 0&&(Kn=Jn),zn=Dr}return Vn===void 0&&(Vn=0,Mn=0,Kn=Math.ceil(Re/_e)),Kn===void 0&&(Kn=Ln.length-1),Kn=Math.min(Kn+1,Ln.length-1),{scrollHeight:zn,start:Vn,end:Kn,offset:Mn}},[et,Lr,sn,Ln,Ei,Re]),Un=er.scrollHeight,Rn=er.start,$n=er.end,Fr=er.offset;Tn.current.start=Rn,Tn.current.end=$n,me.useLayoutEffect(function(){var mn=Li.getRecord();if(mn.size===1){var zn=Array.from(mn.keys())[0],Vn=mn.get(zn),Mn=Ln[Rn];if(Mn&&Vn===void 0){var Kn=qr(Mn);if(Kn===zn){var In=Li.get(zn),Jn=In-_e;Dn(function(ir){return ir+Jn})}}}Li.resetRecord()},[Un]);var br=me.useState({width:0,height:Re}),Pn=(0,Ie.Z)(br,2),fr=Pn[0],si=Pn[1],xi=function(zn){si({width:zn.offsetWidth,height:zn.offsetHeight})},zi=(0,me.useRef)(),Yt=(0,me.useRef)(),Pr=me.useMemo(function(){return vt(fr.width,en)},[fr.width,en]),Mr=me.useMemo(function(){return vt(fr.height,Un)},[fr.height,Un]),ar=Un-Re,mi=(0,me.useRef)(ar);mi.current=ar;function ii(mn){var zn=mn;return Number.isNaN(mi.current)||(zn=Math.min(zn,mi.current)),zn=Math.max(zn,0),zn}var pi=sn<=0,ei=sn>=ar,ti=cr<=0,yr=cr>=en,on=De(pi,ei,ti,yr),sr=function(){return{x:ai?-cr:cr,y:sn}},un=(0,me.useRef)(sr()),gr=(0,Se.zX)(function(mn){if(an){var zn=(0,oe.Z)((0,oe.Z)({},sr()),mn);(un.current.x!==zn.x||un.current.y!==zn.y)&&(an(zn),un.current=zn)}});function Kr(mn,zn){var Vn=mn;zn?((0,Pe.flushSync)(function(){Nr(Vn)}),gr()):Dn(Vn)}function Yr(mn){var zn=mn.currentTarget.scrollTop;zn!==sn&&Dn(zn),hn==null||hn(mn),gr()}var Di=function(zn){var Vn=zn,Mn=en?en-fr.width:0;return Vn=Math.max(Vn,0),Vn=Math.min(Vn,Mn),Vn},oi=(0,Se.zX)(function(mn,zn){zn?((0,Pe.flushSync)(function(){Nr(function(Vn){var Mn=Vn+(ai?-mn:mn);return Di(Mn)})}),gr()):Dn(function(Vn){var Mn=Vn+mn;return Mn})}),Zr=Fe(Lr,pi,ei,ti,yr,!!en,oi),Wi=(0,Ie.Z)(Zr,2),Jt=Wi[0],pn=Wi[1];lt(Lr,An,function(mn,zn,Vn,Mn){var Kn=Mn;return on(mn,zn,Vn)?!1:!Kn||!Kn._virtualHandled?(Kn&&(Kn._virtualHandled=!0),Jt({preventDefault:function(){},deltaX:mn?zn:0,deltaY:mn?0:zn}),!0):!1}),Je(et,An,function(mn){Dn(function(zn){return zn+mn})}),(0,je.Z)(function(){function mn(Vn){var Mn=pi&&Vn.detail<0,Kn=ei&&Vn.detail>0;Lr&&!Mn&&!Kn&&Vn.preventDefault()}var zn=An.current;return zn.addEventListener("wheel",Jt,{passive:!1}),zn.addEventListener("DOMMouseScroll",pn,{passive:!0}),zn.addEventListener("MozMousePixelScroll",mn,{passive:!1}),function(){zn.removeEventListener("wheel",Jt),zn.removeEventListener("DOMMouseScroll",pn),zn.removeEventListener("MozMousePixelScroll",mn)}},[Lr,pi,ei]),(0,je.Z)(function(){if(en){var mn=Di(cr);Nr(mn),gr({x:mn})}},[fr.width,en]);var Vt=function(){var zn,Vn;(zn=zi.current)===null||zn===void 0||zn.delayHidden(),(Vn=Yt.current)===null||Vn===void 0||Vn.delayHidden()},st=St(An,Ln,Li,_e,qr,function(){return Si(!0)},Dn,Vt);me.useImperativeHandle(we,function(){return{nativeElement:xr.current,getScrollInfo:sr,scrollTo:function(zn){function Vn(Mn){return Mn&&(0,Gt.Z)(Mn)==="object"&&("left"in Mn||"top"in Mn)}Vn(zn)?(zn.left!==void 0&&Nr(Di(zn.left)),st(zn.top)):st(zn)}}}),(0,je.Z)(function(){if(cn){var mn=Ln.slice(Rn,$n+1);cn(mn,Ln)}},[Rn,$n,Ln]);var On=Te(Ln,qr,Li,_e),Xn=xn==null?void 0:xn({start:Rn,end:$n,virtual:et,offsetX:cr,offsetY:Fr,rtl:ai,getSize:On}),dr=se(Ln,Rn,$n,en,cr,hi,jt,Ut),ur=null;Re&&(ur=(0,oe.Z)((0,Ue.Z)({},it?"height":"maxHeight",Re),dt),Lr&&(ur.overflowY="hidden",en&&(ur.overflowX="hidden"),kn&&(ur.pointerEvents="none")));var Qn={};return ai&&(Qn.dir="rtl"),me.createElement("div",(0,at.Z)({ref:xr,style:(0,oe.Z)((0,oe.Z)({},yt),{},{position:"relative"}),className:Er},Qn,qn),me.createElement(ke.Z,{onResize:xi},me.createElement(Zt,{className:"".concat(We,"-holder"),style:ur,ref:An,onScroll:Yr,onMouseEnter:Vt},me.createElement(z,{prefixCls:We,height:Un,offsetX:cr,offsetY:Fr,scrollWidth:en,onInnerResize:Si,ref:Bn,innerProps:wn,rtl:ai,extra:Xn},dr))),et&&Un>Re&&me.createElement(bt,{ref:zi,prefixCls:We,scrollOffset:sn,scrollRange:Un,rtl:ai,onScroll:Kr,onStartMove:Hn,onStopMove:Ot,spinSize:Mr,containerSize:fr.height,style:Nn==null?void 0:Nn.verticalScrollBar,thumbStyle:Nn==null?void 0:Nn.verticalScrollBarThumb,showScrollBar:Tr}),et&&en>fr.width&&me.createElement(bt,{ref:Yt,prefixCls:We,scrollOffset:cr,scrollRange:en,rtl:ai,onScroll:Kr,onStartMove:Hn,onStopMove:Ot,spinSize:Pr,containerSize:fr.width,horizontal:!0,style:Nn==null?void 0:Nn.horizontalScrollBar,thumbStyle:Nn==null?void 0:Nn.horizontalScrollBarThumb,showScrollBar:Tr}))}var Et=me.forwardRef(mt);Et.displayName="List";var gt=Et,$e=gt},93314:function(Gn){"use strict";Gn.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(Gn){"use strict";Gn.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(Gn){"use strict";Gn.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(Gn){"use strict";Gn.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(Gn,jn,ft){"use strict";ft.d(jn,{Z:function(){return Ee}});const at=ke=>typeof ke=="object"&&ke!=null&&ke.nodeType===1,Gt=(ke,Se)=>(!Se||ke!=="hidden")&&ke!=="visible"&&ke!=="clip",oe=(ke,Se)=>{if(ke.clientHeight<ke.scrollHeight||ke.clientWidth<ke.scrollWidth){const je=getComputedStyle(ke,null);return Gt(je.overflowY,Se)||Gt(je.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},Ue=(ke,Se,je,me,Pe,fe,z,te)=>fe<ke&&z>Se||fe>ke&&z<Se?0:fe<=ke&&te<=je||z>=Se&&te>=je?fe-ke-me:z>Se&&te<je||fe<ke&&te>je?z-Se+Pe:0,Ie=ke=>{const Se=ke.parentElement;return Se==null?ke.getRootNode().host||null:Se},de=(ke,Se)=>{var je,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 Ae=ke;for(;at(Ae)&&ce(Ae);){if(Ae=Ie(Ae),Ae===pe){xe.push(Ae);break}Ae!=null&&Ae===document.body&&oe(Ae)&&!oe(document.documentElement)||Ae!=null&&oe(Ae,le)&&xe.push(Ae)}const De=(me=(je=window.visualViewport)==null?void 0:je.width)!=null?me:innerWidth,Fe=(fe=(Pe=window.visualViewport)==null?void 0:Pe.height)!=null?fe:innerHeight,{scrollX:Te,scrollY:Ne}=window,{height:Be,width:Ge,top:Ye,right:Ke,bottom:Xe,left:ot}=ke.getBoundingClientRect(),{top:lt,right:ut,bottom:Ct,left:Je}=(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 nt=te==="start"||te==="nearest"?Ye-lt:te==="end"?Xe+Ct:Ye+Be/2-lt+Ct,St=se==="center"?ot+Ge/2-Je+ut:se==="end"?Ke+ut:ot-Je;const wt=[];for(let bt=0;bt<xe.length;bt++){const ct=xe[bt],{height:vt,width:ht,top:Lt,right:dt,bottom:mt,left:Et}=ct.getBoundingClientRect();if(z==="if-needed"&&Ye>=0&&ot>=0&&Xe<=Fe&&Ke<=De&&(ct===pe&&!oe(ct)||Ye>=Lt&&Xe<=mt&&ot>=Et&&Ke<=dt))return wt;const gt=getComputedStyle(ct),$e=parseInt(gt.borderLeftWidth,10),He=parseInt(gt.borderTopWidth,10),we=parseInt(gt.borderRightWidth,10),Le=parseInt(gt.borderBottomWidth,10);let We=0,tt=0;const Re="offsetWidth"in ct?ct.offsetWidth-ct.clientWidth-$e-we:0,_e="offsetHeight"in ct?ct.offsetHeight-ct.clientHeight-He-Le:0,Ve="offsetWidth"in ct?ct.offsetWidth===0?0:ht/ct.offsetWidth:0,it="offsetHeight"in ct?ct.offsetHeight===0?0:vt/ct.offsetHeight:0;if(pe===ct)We=te==="start"?nt:te==="end"?nt-Fe:te==="nearest"?Ue(Ne,Ne+Fe,Fe,He,Le,Ne+nt,Ne+nt+Be,Be):nt-Fe/2,tt=se==="start"?St:se==="center"?St-De/2:se==="end"?St-De:Ue(Te,Te+De,De,$e,we,Te+St,Te+St+Ge,Ge),We=Math.max(0,We+Ne),tt=Math.max(0,tt+Te);else{We=te==="start"?nt-Lt-He:te==="end"?nt-mt+Le+_e:te==="nearest"?Ue(Lt,mt,vt,He,Le+_e,nt,nt+Be,Be):nt-(Lt+vt/2)+_e/2,tt=se==="start"?St-Et-$e:se==="center"?St-(Et+ht/2)+Re/2:se==="end"?St-dt+we+Re:Ue(Et,dt,ht,$e,we+Re,St,St+Ge,Ge);const{scrollLeft:yt,scrollTop:Pt}=ct;We=it===0?0:Math.max(0,Math.min(Pt+We/it,ct.scrollHeight-vt/it+_e)),tt=Ve===0?0:Math.max(0,Math.min(yt+tt/Ve,ct.scrollWidth-ht/Ve+Re)),nt+=Pt-We,St+=yt-tt}wt.push({el:ct,top:We,left:tt})}return wt},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 je=(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-je.top+je.bottom,se=z-je.left+je.right;Pe.scroll({top:te,left:se,behavior:me})}}}}]);