You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1239 lines
2.6 MiB
1239 lines
2.6 MiB
(self.webpackChunk=self.webpackChunk||[]).push([[5382],{8336:function(){"use strict"},12469:function(){"use strict"},99587:function(_n,Mn){"use strict";Mn.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 _n(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(_n.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(_n.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(_n.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(_n.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 _n))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 Mn=[];function ft(fe,z){var te=Mn.pop();return te===void 0?new go.Point(fe,z):(te.x=fe,te.y=z,te)}function at(){var fe=Mn.pop();return fe===void 0?new go.Point:fe}function Gt(fe){Mn.push(fe)}function oe(fe,z,te,se,ie,le,he,pe,xe){xe||(xe=new go.Point);var je=fe-te,De=ie-he,Fe=NaN,Te=NaN;if(je===0)if(De===0)fe===te&&(Fe=fe,Te=z);else{var Me=(le-pe)/De,Be=le-Me*ie;Fe=fe,Te=Me*Fe+Be}else if(De===0){var Ge=(z-se)/je,Ye=z-Ge*fe;Fe=ie,Te=Ge*Fe+Ye}else{var Ge=(z-se)/je,Me=(le-pe)/De,Ye=z-Ge*fe,Be=le-Me*ie;Fe=(Be-Ye)/(Ge-Me),Te=Ge*Fe+Ye}return xe.x=Fe,xe.y=Te,xe}function Ue(fe,z,te,se,ie,le,he,pe,xe,je,De,Fe,Te,Me){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+he*Ge,ct=le*Be+pe*Ge,Ct=Ye*Be+Xe*Ge,Je=Ke*Be+ot*Ge,rt=Xe*Be+lt*Ge,xt=ot*Be+ct*Ge,bt=Ct*Be+rt*Ge,Pt=Je*Be+xt*Ge;je.x=Ye,je.y=Ke,De.x=Ct,De.y=Je,Fe.x=bt,Fe.y=Pt,Te.x=rt,Te.y=xt,Me.x=lt,Me.y=ct}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 _n("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 _n("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 _n("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 _n("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 _n("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 _n("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)?se=10:se<-z?se=-z/2:se>z&&(se=z/2);var ie=Math.abs(se);if(se===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=te,le}else{var le=new go.Geometry;return se>0?le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,te)).add(new go.PathSegment(go.PathSegment.Line,ie,te).close())):le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}});var Ee=[];function ke(){var fe=Ee.pop();return fe===void 0?[]:fe}function Se(fe){fe.length=0,Ee.push(fe)}function Ae(fe){for(var z=ke(),te=.5,se=.5,ie=Math.PI*1.5,le=0,he=0;he<fe;he++)le=2*Math.PI/fe*he+ie,z[he]=new go.Point(se+te*Math.cos(le),se+te*Math.sin(le));return z.push(z[0]),z}function me(fe){var z=be(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 be(fe){for(var z=Ae(fe),te=ke(),se=Math.floor(z.length/2),ie=z.length-1,le=fe%2===0?2:1,he=0;he<ie;he++){var pe=z[he],xe=z[he+1],je=z[(se+he-1)%ie],De=z[(se+he+le)%ie];te[he*2]=pe,te[he*2+1]=oe(pe.x,pe.y,je.x,je.y,xe.x,xe.y,De.x,De.y,new go.Point)}return te[te.length]=te[0],Se(z),te}go.Shape.defineFigureGenerator("Pentagon",function(fe,z,te){var se=Ae(5),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var he=1;he<5;he++)le.add(new go.PathSegment(go.PathSegment.Line,se[he].x*z,se[he].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.2,.22),ie.spot2=new go.Spot(.8,.9),ie}),go.Shape.defineFigureGenerator("Hexagon",function(fe,z,te){var se=Ae(6),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var he=1;he<6;he++)le.add(new go.PathSegment(go.PathSegment.Line,se[he].x*z,se[he].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.07,.25),ie.spot2=new go.Spot(.93,.75),ie}),go.Shape.defineFigureGenerator("Heptagon",function(fe,z,te){var se=Ae(7),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var he=1;he<7;he++)le.add(new go.PathSegment(go.PathSegment.Line,se[he].x*z,se[he].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.2,.15),ie.spot2=new go.Spot(.8,.85),ie}),go.Shape.defineFigureGenerator("Octagon",function(fe,z,te){var se=Ae(8),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var he=1;he<8;he++)le.add(new go.PathSegment(go.PathSegment.Line,se[he].x*z,se[he].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.15,.15),ie.spot2=new go.Spot(.85,.85),ie}),go.Shape.defineFigureGenerator("Nonagon",function(fe,z,te){var se=Ae(9),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var he=1;he<9;he++)le.add(new go.PathSegment(go.PathSegment.Line,se[he].x*z,se[he].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.17,.13),ie.spot2=new go.Spot(.82,.82),ie}),go.Shape.defineFigureGenerator("Decagon",function(fe,z,te){var se=Ae(10),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var he=1;he<10;he++)le.add(new go.PathSegment(go.PathSegment.Line,se[he].x*z,se[he].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("Dodecagon",function(fe,z,te){var se=Ae(12),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var he=1;he<12;he++)le.add(new go.PathSegment(go.PathSegment.Line,se[he].x*z,se[he].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=be(5),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var he=1;he<10;he++)le.add(new go.PathSegment(go.PathSegment.Line,se[he].x*z,se[he].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=be(6),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var he=1;he<12;he++)le.add(new go.PathSegment(go.PathSegment.Line,se[he].x*z,se[he].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=be(7),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var he=1;he<14;he++)le.add(new go.PathSegment(go.PathSegment.Line,se[he].x*z,se[he].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=be(8),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var he=1;he<16;he++)le.add(new go.PathSegment(go.PathSegment.Line,se[he].x*z,se[he].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=be(9),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var he=1;he<18;he++)le.add(new go.PathSegment(go.PathSegment.Line,se[he].x*z,se[he].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=be(10),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var he=1;he<20;he++)le.add(new go.PathSegment(go.PathSegment.Line,se[he].x*z,se[he].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 he=1;he<se.length;he+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[he+2].x*z,se[he+2].y*te,se[he].x*z,se[he].y*te,se[he+1].x*z,se[he+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 he=1;he<se.length;he+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[he+2].x*z,se[he+2].y*te,se[he].x*z,se[he].y*te,se[he+1].x*z,se[he+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 he=1;he<se.length;he+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[he+2].x*z,se[he+2].y*te,se[he].x*z,se[he].y*te,se[he+1].x*z,se[he+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 he=1;he<se.length;he+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[he+2].x*z,se[he+2].y*te,se[he].x*z,se[he].y*te,se[he+1].x*z,se[he+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 he=1;he<se.length;he+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[he+2].x*z,se[he+2].y*te,se[he].x*z,se[he].y*te,se[he+1].x*z,se[he+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 he=1;he<se.length;he+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[he+2].x*z,se[he+2].y*te,se[he].x*z,se[he].y*te,se[he+1].x*z,se[he+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 _n("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new _n("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,he=new go.PathFigure(0,0,!0);return le.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z,0)),he.add(new go.PathSegment(go.PathSegment.Line,z,te)),he.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se<z/2&&ie<te/2&&(he.add(new go.PathSegment(go.PathSegment.Move,se,ie)),he.add(new go.PathSegment(go.PathSegment.Line,se,te-ie)),he.add(new go.PathSegment(go.PathSegment.Line,z-se,te-ie)),he.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 _n("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,he=new go.PathFigure(z,z/2,!0);le.add(he),he.add(new go.PathSegment(go.PathSegment.Arc,0,360,ie,ie,ie,ie).close());var pe=Math.max(ie-se,0);return pe>0&&(he.add(new go.PathSegment(go.PathSegment.Move,z/2+pe,z/2)),he.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 _n("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new _n("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 he=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,he,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 _n("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,he=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,he-ie)).add(new go.PathSegment(go.PathSegment.Line,z,he-ie)).add(new go.PathSegment(go.PathSegment.Line,z,he+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,he+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,he+ie)).add(new go.PathSegment(go.PathSegment.Line,0,he+ie)).add(new go.PathSegment(go.PathSegment.Line,0,he-ie)).add(new go.PathSegment(go.PathSegment.Line,le-ie,he-ie).close()))}),go.Shape.setFigureParameter("ThinCross",0,new _n("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,he=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,he-ie)).add(new go.PathSegment(go.PathSegment.Line,z,he-ie)).add(new go.PathSegment(go.PathSegment.Line,z,he+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,he+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,he+ie)).add(new go.PathSegment(go.PathSegment.Line,0,he+ie)).add(new go.PathSegment(go.PathSegment.Line,0,he-ie)).add(new go.PathSegment(go.PathSegment.Line,le-ie,he-ie).close()))}),go.Shape.setFigureParameter("ThickX",0,new _n("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,he=te/2,pe=Math.atan2(te,z),xe=se-Math.min(Math.cos(pe)*se/2,le),je=se-Math.min(Math.sin(pe)*se/2,he),ie=new go.Geometry,De=new go.PathFigure(xe,0,!0);return ie.add(De),De.add(new go.PathSegment(go.PathSegment.Line,le,.2*te)),De.add(new go.PathSegment(go.PathSegment.Line,z-xe,0)),De.add(new go.PathSegment(go.PathSegment.Line,z,je)),De.add(new go.PathSegment(go.PathSegment.Line,.8*z,he)),De.add(new go.PathSegment(go.PathSegment.Line,z,te-je)),De.add(new go.PathSegment(go.PathSegment.Line,z-xe,te)),De.add(new go.PathSegment(go.PathSegment.Line,le,.8*te)),De.add(new go.PathSegment(go.PathSegment.Line,xe,te)),De.add(new go.PathSegment(go.PathSegment.Line,0,te-je)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,he)),De.add(new go.PathSegment(go.PathSegment.Line,0,je).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new _n("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 _n("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 _n("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,he=.3,pe=0,xe=le*ve;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*z,(.5+le+pe)*te,(.5-le+he)*z,(.5+xe+pe)*te,(.5-xe+he)*z,(.5+le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+he)*z,(.5+pe)*te,(.5+xe+he)*z,(.5+le+pe)*te,(.5+le+he)*z,(.5+xe+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*z,(.5-le+pe)*te,(1-.5+le+he)*z,(.5-xe+pe)*te,(.5+xe+he)*z,(.5-le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*te,(.5-xe+he)*z,(.5-le+pe)*te,(.5-le+he+.05)*z,(.5-xe+pe-.02)*te)),le=.2,he=0,pe=-.3,xe=le*ve,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+he)*z,(.5+pe)*te,(.5+xe+he)*z,(.5+le+pe)*te,(.5+le+he)*z,(.5+xe+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*z,(.5-le+pe)*te,(1-.5+le+he)*z,(.5-xe+pe)*te,(.5+xe+he)*z,(.5-le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+he)*z,(.5+pe)*te,(.5-xe+he)*z,(.5-le+pe)*te,(.5-le+he)*z,(.5-xe+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-xe+he)*z,(.5+le+pe)*te,(.5-le+he)*z,(.5+xe+pe)*te,(.5-xe+he)*z,(.5+le+pe)*te)),le=.2,he=-.3,pe=0,xe=le*ve,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*z,(.5-le+pe)*te,(1-.5+le+he-.05)*z,(.5-xe+pe-.02)*te,(.5+xe+he)*z,(.5-le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+he)*z,(.5+pe)*te,(.5-xe+he)*z,(.5-le+pe)*te,(.5-le+he)*z,(.5-xe+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*z,(.5+le+pe)*te,(.5-le+he)*z,(.5+xe+pe)*te,(.5-xe+he)*z,(.5+le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*te,(.5+xe+he)*z,(.5+le+pe)*te,(.5+le+he)*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,he=.5,pe=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(he+le)*z,pe*te)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*he,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((he+le)*z,pe*te,!0),se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*he,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,he=.5,pe=.5,xe=new go.PathFigure(he*z,(pe-le)*te);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he-le)*z,pe*te,(he-ie)*z,(pe-le)*te,(he-le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+le)*te,(he-le)*z,(pe+ie)*te,(he-ie)*z,(pe+le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he+le)*z,pe*te,(he+ie)*z,(pe+le)*te,(he+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe-le)*te,(he+le)*z,(pe-ie)*te,(he+ie)*z,(pe-le)*te)),le=.4,ie=ve*.4;var je=at(),De=at(),Fe=at(),Te=at();Ue(he,pe-le,he+ie,pe-le,he+le,pe-ie,he+le,pe,.42,je,De,Fe,Te,Te);var Me=at(),Be=at(),Ge=at();Ue(he,pe-le,he+ie,pe-le,he+le,pe-ie,he+le,pe,.58,Te,Te,Ge,Me,Be);var Ye=at(),Ke=at(),Xe=at();Ue(he,pe+le,he-ie,pe+le,he-le,pe+ie,he-le,pe,.42,Ye,Ke,Xe,Te,Te);var ot=at(),lt=at(),ct=at();return Ue(he,pe+le,he-ie,pe+le,he-le,pe+ie,he-le,pe,.58,Te,Te,ct,ot,lt),xe.add(new go.PathSegment(go.PathSegment.Move,ct.x*z,ct.y*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he-le)*z,pe*te,ot.x*z,ot.y*te,lt.x*z,lt.y*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe-le)*te,(he-le)*z,(pe-ie)*te,(he-ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*z,Fe.y*te,je.x*z,je.y*te,De.x*z,De.y*te)),xe.add(new go.PathSegment(go.PathSegment.Line,ct.x*z,ct.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,(he+le)*z,pe*te,Me.x*z,Me.y*te,Be.x*z,Be.y*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+le)*te,(he+le)*z,(pe+ie)*te,(he+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(je),Gt(De),Gt(Fe),Gt(Te),Gt(Me),Gt(Be),Gt(Ge),Gt(Ye),Gt(Ke),Gt(Xe),Gt(ot),Gt(lt),Gt(ct),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 _n("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,he=.5,pe=.5,xe=at(),je=at(),De=at(),Fe=at(),Te=new go.PathFigure((he-le)*z,pe*te,!1);se.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe-le)*te,(he-le)*z,(pe-ie)*te,(he-ie)*z,(pe-le)*te)),Ue(he,pe-le,he+ie,pe-le,he+le,pe-ie,he+le,pe,.44,De,Fe,je,xe,xe),Te.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te));var Me=ft(je.x,je.y);Ue(he,pe-le,he+ie,pe-le,he+le,pe-ie,he+le,pe,.56,xe,xe,je,De,Fe);var Be=ft(je.x,je.y);Te.add(new go.PathSegment(go.PathSegment.Line,(Me.x*.1+.95*.9)*z,Me.y*.1*te)),Te.add(new go.PathSegment(go.PathSegment.Line,.85*z,Me.y*.1*te)),Te.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),Te.add(new go.PathSegment(go.PathSegment.Line,z,0)),Te.add(new go.PathSegment(go.PathSegment.Line,z,.15*te)),Te.add(new go.PathSegment(go.PathSegment.Line,(Be.x*.1+.9)*z,.15*te)),Te.add(new go.PathSegment(go.PathSegment.Line,(Be.x*.1+.9)*z,(Be.y*.1+.05*.9)*te)),Te.add(new go.PathSegment(go.PathSegment.Line,Be.x*z,Be.y*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(he+le)*z,pe*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+le)*te,(he+le)*z,(pe+ie)*te,(he+ie)*z,(pe+le)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(he-le)*z,pe*te,(he-ie)*z,(pe+le)*te,(he-le)*z,(pe+ie)*te)),le=.35,ie=ve*.35;var Ge=new go.PathFigure(he*z,(pe-le)*te,!1);se.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(he-le)*z,pe*te,(he-ie)*z,(pe-le)*te,(he-le)*z,(pe-ie)*te)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+le)*te,(he-le)*z,(pe+ie)*te,(he-ie)*z,(pe+le)*te)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(he+le)*z,pe*te,(he+ie)*z,(pe+le)*te,(he+le)*z,(pe+ie)*te)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe-le)*te,(he+le)*z,(pe-ie)*te,(he+ie)*z,(pe-le)*te));var Ye=new go.PathFigure((he-le)*z,pe*te,!1);return se.add(Ye),Gt(xe),Gt(je),Gt(De),Gt(Fe),Gt(Me),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,he=-.125,pe=ie*ve,xe=new go.PathFigure((.525+le)*z,(.5+ie+he)*te,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+he)*te,(.5+pe+le)*z,(.5+ie+he)*te,(.5+ie+le)*z,(.5+pe+he)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+he)*te,(1-.5+ie+le)*z,(.5-pe+he)*te,(.5+pe+le)*z,(.5-ie+he)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+he)*te,(.5-pe+le)*z,(.5-ie+he)*te,(.5-ie+le)*z,(.5-pe+he)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.475+le)*z,(.5+ie+he)*te,(.5-ie+le)*z,(.5+pe+he)*te,(.5-pe+le)*z,(.5+ie+he)*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,he=-.125,pe=ie*ve;var xe=new go.PathFigure((1-.5+ie+le)*z,(.5+he)*te,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5+ie+he)*te,(.5+ie+le)*z,(.5+pe+he)*te,(.5+pe+le)*z,(.5+ie+he)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+he)*te,(.5-pe+le)*z,(.5+ie+he)*te,(.5-ie+le)*z,(.5+pe+he)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+he)*te,(.5-ie+le)*z,(.5-pe+he)*te,(.5-pe+le)*z,(.5-ie+he)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+he)*te,(.5+pe+le)*z,(.5-ie+he)*te,(1-.5+ie+le)*z,(.5-pe+he)*te));var xe=new go.PathFigure((.525+le)*z,(.5+ie+he)*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 _n("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new _n("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,he=(.5-ie/2)*te,pe=(.5+ie/2)*te,xe=new go.Geometry,je=new go.PathFigure(0,he,!0);xe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le,he)),je.add(new go.PathSegment(go.PathSegment.Line,le,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),je.add(new go.PathSegment(go.PathSegment.Line,le,te)),je.add(new go.PathSegment(go.PathSegment.Line,le,pe)),je.add(new go.PathSegment(go.PathSegment.Line,0,pe).close()),xe.spot1=new go.Spot(0,he/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 _n("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new _n("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,he=(te-ie)/2,pe=he+ie,xe=new go.Geometry,je=new go.PathFigure(0,he,!0);xe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le,he)),je.add(new go.PathSegment(go.PathSegment.Line,le,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),je.add(new go.PathSegment(go.PathSegment.Line,le,te)),je.add(new go.PathSegment(go.PathSegment.Line,le,pe)),je.add(new go.PathSegment(go.PathSegment.Line,0,pe).close()),xe.spot1=new go.Spot(0,he/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 _n("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,he=new go.Geometry,pe=new go.PathFigure(z,.5*te,!0);he.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 he.spot1=new go.Spot(xe.x,xe.y),xe=oe(.7,1,1,.5,0,le/te,1,le/te,xe),he.spot2=new go.Spot(xe.x,xe.y),Gt(xe),he}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new _n("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new _n("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,he=le+se,pe=(te-ie)/2,xe=pe+ie;(se>te||ie>te)&&(ie>se?(se=se*te/ie,le=(te-se)/2,he=le+se,pe=0,xe=te):(le=0,he=te,pe=0,xe=te));var je=new go.Geometry,De=new go.PathFigure(z,.5*te,!0);je.add(De),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,xe)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,he)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,he)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,xe)),De.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,pe)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,pe).close());var Fe=oe(0,.5,.3,pe/te,0,le/te,1,le/te,at());return je.spot1=new go.Spot(Fe.x,Fe.y),Fe=oe(.7,xe/te,1,.5,0,he/te,1,he/te,Fe),je.spot2=new go.Spot(Fe.x,Fe.y),Gt(Fe),je}),go.Shape.setFigureParameter("IBeamArrow",0,new _n("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,he=new go.Geometry,pe=new go.PathFigure(z,.5*te,!0);he.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()),he.spot1=new go.Spot(0,ie/te);var xe=oe(.7,1,1,.5,0,le/te,1,le/te,at());return he.spot2=new go.Spot(xe.x,xe.y),Gt(xe),he}),go.Shape.setFigureParameter("IBeamArrow2",0,new _n("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new _n("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,he=le+se,pe=(te-ie)/2,xe=pe+ie;(se>te||ie>te)&&(ie>se?(se=se*te/ie,le=(te-se)/2,he=le+se,pe=0,xe=te):(le=0,he=te,pe=0,xe=te));var je=new go.Geometry,De=new go.PathFigure(z,.5*te,!0);je.add(De),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,xe)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,he)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,he)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,xe)),De.add(new go.PathSegment(go.PathSegment.Line,0,xe)),De.add(new go.PathSegment(go.PathSegment.Line,0,pe)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,pe)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,pe).close()),je.spot1=new go.Spot(0,le/te);var Fe=oe(.7,xe/te,1,.5,0,he/te,1,he/te,at());return je.spot2=new go.Spot(Fe.x,Fe.y),Gt(Fe),je}),go.Shape.setFigureParameter("Pointer",0,new _n("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 he=oe(.2,.65,1,.65,0,1,1,.5,at());return ie.spot2=new go.Spot(he.x,he.y),Gt(he),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new _n("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 he=oe(0,.65,1,.65,0,1,1,.5,at());return ie.spot2=new go.Spot(he.x,he.y),Gt(he),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new _n("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,he=new go.Geometry,pe=new go.PathFigure(z,.5*te,!0);he.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()),he.spot1=new go.Spot(.2,.3);var xe=oe(.7,1,1,.5,0,le/te,1,le/te,at());return he.spot2=new go.Spot(xe.x,xe.y),Gt(xe),he}),go.Shape.setFigureParameter("SplitEndArrow2",0,new _n("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 he=new go.Geometry,pe=new go.PathFigure(z,.5*te,!0);he.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()),he.spot1=new go.Spot(.2,ie/te);var xe=oe(.7,1,1,.5,0,le/te,1,le/te,at());return he.spot2=new go.Spot(xe.x,xe.y),Gt(xe),he}),go.Shape.setFigureParameter("SquareArrow",0,new _n("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,he=new go.PathFigure(0,.9*te,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),he.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,(.9+le)*te,(.5+ie)*z,te)),he.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,he=new go.PathFigure(0,se,!0);ie.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,ve*se,(.5-le)*z,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,1*z,se,(.5+le)*z,0,1*z,ve*se)),he.add(new go.PathSegment(go.PathSegment.Line,z,te-se)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*te,1*z,te-ve*se,(.5+le)*z,1*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,te-se,(.5-le)*z,1*te,0,te-ve*se)),he.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,he=new go.PathFigure(0,te-se,!0);ie.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,se)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,ve*se,(.5-le)*z,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,z,se,(.5+le)*z,0,z,ve*se)),he.add(new go.PathSegment(go.PathSegment.Line,z,te-se)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,te-ve*se,(.5+le)*z,te)),he.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,he=new go.PathFigure(se,0,!0);ie.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z-se,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,z-ve*se,0,z,(.5-le)*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,z-se,te,z,(.5+le)*te,z-ve*se,te)),he.add(new go.PathSegment(go.PathSegment.Line,se,te)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,ve*se,te,0,(.5+le)*te)),he.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,he=new go.PathFigure(z-se,0,!0);ie.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,z-ve*se,0,z,(.5-le)*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,z-se,te,z,(.5+le)*te,z-ve*se,te)),he.add(new go.PathSegment(go.PathSegment.Line,se,te)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,ve*se,te,0,(.5+le)*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,(.5-le)*te,ve*se,0)),he.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,he=ve*ie,pe=ve*le,xe=.5,je=.1,De=new go.PathFigure(xe*z,(je+le)*te,!0);se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe-ie)*z,je*te,(xe-he)*z,(je+le)*te,(xe-ie)*z,(je+pe)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-le)*te,(xe-ie)*z,(je-pe)*te,(xe-he)*z,(je-le)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe+ie)*z,je*te,(xe+he)*z,(je-le)*te,(xe+ie)*z,(je-pe)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je+le)*te,(xe+ie)*z,(je+pe)*te,(xe+he)*z,(je+le)*te));var Fe=.05,Te=ve*Fe;xe=.05,je=.25;var Me=new go.PathFigure(.5*z,.2*te,!0);return se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*te)),xe=.95,je=.25,Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe+Fe)*z,je*te,(xe+Te)*z,(je-Fe)*te,(xe+Fe)*z,(je-Te)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,z,.6*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*te)),Fe=.025,Te=ve*Fe,xe=.825,je=.35,Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-Fe)*te,(xe+Fe)*z,(je-Te)*te,(xe+Te)*z,(je-Fe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*z,je*te,(xe-Te)*z,(je-Fe)*te,(xe-Fe)*z,(je-Te)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.8*z,te)),Me.add(new go.PathSegment(go.PathSegment.Line,.55*z,te)),Me.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*te)),Fe=.05,Te=ve*Fe,xe=.5,je=.7,Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-Fe)*te,(xe+Fe)*z,(je-Te)*te,(xe+Te)*z,(je-Fe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*z,je*te,(xe-Te)*z,(je-Fe)*te,(xe-Fe)*z,(je-Te)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.45*z,te)),Me.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),Me.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*te)),Fe=.025,Te=ve*Fe,xe=.175,je=.35,Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-Fe)*te,(xe+Fe)*z,(je-Te)*te,(xe+Te)*z,(je-Fe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*z,je*te,(xe-Te)*z,(je-Fe)*te,(xe-Fe)*z,(je-Te)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*te)),Me.add(new go.PathSegment(go.PathSegment.Line,0,.6*te)),Me.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),Fe=.05,Te=ve*Fe,xe=.05,je=.25,Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-Fe)*te,(xe-Fe)*z,(je-Te)*te,(xe-Te)*z,(je-Fe)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*te)),se.spot1=new go.Spot(.2,.2),se.spot2=new go.Spot(.8,.65),se}),go.Shape.setFigureParameter("Card",0,new _n("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 he=new go.PathFigure(0,ie*te,!1);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z,ie*te)),he.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*te)),he.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,he=new go.PathFigure(z,.1*te,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,(.9+le)*te,(.5+ie)*z,te)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-ie)*z,te,0,(.9+le)*te)),he.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*te,(.5-ie)*z,0)),he.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,he=new go.PathFigure(z,.1*te,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,(.9+le)*te,(.5+ie)*z,te)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-ie)*z,te,0,(.9+le)*te)),he.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*te,(.5-ie)*z,0)),he.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,he=new go.PathFigure(0,.2*te,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-le)*te,(.2-le)*z,0)),he.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*te,(.8+le)*z,0,z,(.2-le)*te)),he.add(new go.PathSegment(go.PathSegment.Line,z,.8*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,te,z,(.8+le)*te,(.8+le)*z,te)),he.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*te,(.2-le)*z,te,0,(.8+le)*te)),he.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 he=new go.PathFigure(0,ie*te,!1);return se.add(he),he.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 he=new go.PathFigure(ie*z,0,!1);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,ie*te)),he.add(new go.PathSegment(go.PathSegment.Move,z,ie*te)),he.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,0)),he.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*te)),he.add(new go.PathSegment(go.PathSegment.Line,ie*z,te)),he.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,te)),he.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 he=new go.PathFigure(z,.5*te,!1);return se.add(he),he.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 he=new go.PathFigure(0,0,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z,0)),he.add(new go.PathSegment(go.PathSegment.Line,z,te)),he.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,he=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+he)*te,(pe+he)*z,te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,pe*te,(pe-he)*z,te,0,(pe+he)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,0,0,(pe-he)*te,(pe-he)*z,0)),xe.add(new go.PathSegment(go.PathSegment.Bezier,z,pe*te,(pe+he)*z,0,z,(pe-he)*te));var je=new go.PathFigure((le+ie)*z,(le+ie)*te,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le*z,le*te)),je.add(new go.PathSegment(go.PathSegment.Move,le*z,(le+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Line,(le+ie)*z,le*te)),se}),go.Shape.defineFigureGenerator("LinedDocument",function(fe,z,te){var se=new go.Geometry;te=te/.8;var ie=new go.PathFigure(0,.7*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.5*z,.4*te,.5*z,te).close());var le=new go.PathFigure(.1*z,0,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.75*te)),se.spot1=new go.Spot(.1,0),se.spot2=new go.Spot(1,.6),se}),go.Shape.defineFigureGenerator("LoopLimit",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te).close()),se.spot1=new go.Spot(0,.25),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("MagneticTape",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=.5,he=new go.PathFigure(.5*z,te,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,0,le*te,(le-ie)*z,te,0,(le+ie)*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*te,(le-ie)*z,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,z,le*te,(le+ie)*z,0,z,(le-ie)*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,(le+.1)*z,.9*te,z,(le+ie)*te,(le+ie)*z,.9*te)),he.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),he.add(new go.PathSegment(go.PathSegment.Line,z,te)),he.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,he=new go.PathFigure(0,0,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z,0)),he.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,he=new go.PathFigure(z,le*te,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,le*z,te,z,(le+ie)*te,(le+ie)*z,te)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,le*te,(le-ie)*z,te,0,(le+ie)*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*te,(le-ie)*z,0)),he.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 he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z,0)),he.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,.5*te)),he.add(new go.PathSegment(go.PathSegment.Line,z,te)),he.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 he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,0)),he.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),he.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,te)),he.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 he=new go.PathFigure((1-ie)*z,0,!1);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,te)),he.add(new go.PathSegment(go.PathSegment.Move,ie*z,0)),he.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 he=new go.PathFigure(ie*z,0,!1);return se.add(he),he.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 he=new go.PathFigure(ie*z,0,!1);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ie*z,te)),he.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,0)),he.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,he=new go.PathFigure(z,le*te,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,le*z,te,z,(le+ie)*te,(le+ie)*z,te)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,le*te,(le-ie)*z,te,0,(le+ie)*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*te,(le-ie)*z,0)),he.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,he=.9,pe=.5,xe=new go.PathFigure(.8*z,.5*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,0,te)),xe.add(new go.PathSegment(go.PathSegment.Line,0,0)),xe.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*te));var je=new go.PathFigure((he+le)*z,pe*te,!0);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+le)*te,(he+le)*z,(pe+ie)*te,(he+ie)*z,(pe+le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(he-le)*z,pe*te,(he-ie)*z,(pe+le)*te,(he-le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe-le)*te,(he-le)*z,(pe-ie)*te,(he-ie)*z,(pe-le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(he+le)*z,pe*te,(he+ie)*z,(pe-le)*te,(he+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,he=ve*.1,pe=.1,xe=.9,je=.5,De=new go.PathFigure(.8*z,.5*te,!0);se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,te,.8*z,(.5+le)*te,(.4+ie)*z,te)),De.add(new go.PathSegment(go.PathSegment.Line,0,te)),De.add(new go.PathSegment(go.PathSegment.Line,0,0)),De.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),De.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*te,(.4+ie)*z,0,.8*z,(.5-le)*te));var Fe=new go.PathFigure((xe+pe)*z,je*te,!0);return se.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je+pe)*te,(xe+pe)*z,(je+he)*te,(xe+he)*z,(je+pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z,je*te,(xe-he)*z,(je+pe)*te,(xe-pe)*z,(je+he)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-pe)*te,(xe-pe)*z,(je-he)*te,(xe-he)*z,(je-pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z,je*te,(xe+he)*z,(je-pe)*te,(xe+pe)*z,(je-he)*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,he=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,(he+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,(he+le)*z,(pe-ie)*te,.7*z,(pe-le)*te)),ie=.1,le=ve*.1,he=.9,pe=.5;var je=new go.PathFigure((he-ie)*z,pe*te,!0);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe-ie)*te,(he-ie)*z,(pe-le)*te,(he-le)*z,(pe-ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(he+ie)*z,pe*te,(he+le)*z,(pe-ie)*te,(he+ie)*z,(pe-le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+ie)*te,(he+ie)*z,(pe+le)*te,(he+le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(he-ie)*z,pe*te,(he-le)*z,(pe+ie)*te,(he-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,he=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,(he+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,(he+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,he=.2,pe=.5,xe=new go.PathFigure(.1*z,0,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,te,.35*z,.25*te,.35*z,.75*te));var je=new go.PathFigure(.8*z,.5*te,!0);se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,te,.7*z,(pe+le)*te,(he+le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*te,.45*z,.25*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*te,(he+le)*z,(pe-ie)*te,.7*z,(pe-le)*te)),ie=.1,le=ve*.1,he=.9,pe=.5;var De=new go.PathFigure((he-ie)*z,pe*te,!0);return se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe-ie)*te,(he-ie)*z,(pe-le)*te,(he-le)*z,(pe-ie)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(he+ie)*z,pe*te,(he+le)*z,(pe-ie)*te,(he+ie)*z,(pe-le)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+ie)*te,(he+ie)*z,(pe+le)*te,(he+le)*z,(pe+ie)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(he-ie)*z,pe*te,(he-le)*z,(pe+ie)*te,(he-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,he=.2,pe=.5,xe=new go.PathFigure(.1*z,0,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,te,.35*z,.25*te,.35*z,.75*te));var je=new go.PathFigure(.2*z,0,!0);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,(he+le)*z,(pe-ie)*te,.9*z,(pe-le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,te,.9*z,(pe+le)*te,(he+le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*te,.45*z,.25*te).close()),se.spot1=new go.Spot(.4,.25),se.spot2=new go.Spot(.8,.75),se}),go.Shape.defineFigureGenerator("Capacitor",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),se}),go.Shape.defineFigureGenerator("Resistor",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*te)),se}),go.Shape.defineFigureGenerator("Inductor",function(fe,z,te){var se=new go.Geometry,ie=ve*.1,le=.1,he=.1,pe=.5,xe=new go.PathFigure((he-ie*.5)*z,te,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he+le)*z,0,(he-ie)*z,te,(he-le)*z,0)),he=.3,xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,te,(he+le)*z,0,(he+ie)*z,te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he+le)*z,0,(he-ie)*z,te,(he-le)*z,0)),he=.5,xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,te,(he+le)*z,0,(he+ie)*z,te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he+le)*z,0,(he-ie)*z,te,(he-le)*z,0)),he=.7,xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,te,(he+le)*z,0,(he+ie)*z,te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he+le)*z,0,(he-ie)*z,te,(he-le)*z,0)),he=.9,xe.add(new go.PathSegment(go.PathSegment.Bezier,(he+ie*.5)*z,te,(he+le)*z,0,(he+ie)*z,te)),se}),go.Shape.defineFigureGenerator("ACvoltageSource",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=.5,he=.5,pe=.5,xe=new go.PathFigure((he-le)*z,pe*te,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe-le)*te,(he-le)*z,(pe-ie)*te,(he-ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he+le)*z,pe*te,(he+ie)*z,(pe-le)*te,(he+le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+le)*te,(he+le)*z,(pe+ie)*te,(he+ie)*z,(pe+le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he-le)*z,pe*te,(he-ie)*z,(pe+le)*te,(he-le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Move,(he-le+.1)*z,pe*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he+le-.1)*z,pe*te,he*z,(pe-le)*te,he*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 he=ve*.8,pe=.8,xe=0,je=.5,De=(ie-z)/2,Fe=(le-te)/2,Te=new go.PathFigure(xe*z+De,(je+pe)*te+Fe,!0);se.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z+De,je*te+Fe,(xe-he)*z+De,(je+pe)*te+Fe,(xe-pe)*z+De,(je+he)*te+Fe)),Te.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe-pe)*z+De,(je-he)*te+Fe,(xe-he)*z+De,(je-pe)*te+Fe)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe+he*.5)*z+De,je*te+Fe,xe*z+De,(je-pe)*te+Fe,(xe-pe+he*.5)*z+De,(je-he)*te+Fe)),Te.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe-pe+he*.5)*z+De,(je+he)*te+Fe,xe*z+De,(je+pe)*te+Fe).close()),he=ve*.4,pe=.4,xe=.2,je=.5;var Me=new go.PathFigure(xe*z+De,(je+pe)*te+Fe,!0);se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z+De,je*te+Fe,(xe-he)*z+De,(je+pe)*te+Fe,(xe-pe)*z+De,(je+he)*te+Fe)),Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe-pe)*z+De,(je-he)*te+Fe,(xe-he)*z+De,(je-pe)*te+Fe)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe+he*.5)*z+De,je*te+Fe,xe*z+De,(je-pe)*te+Fe,(xe-pe+he*.5)*z+De,(je-he)*te+Fe)),Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe-pe+he*.5)*z+De,(je+he)*te+Fe,xe*z+De,(je+pe)*te+Fe).close()),he=ve*.2,pe=.2,xe=.5,je=.5;var Be=new go.PathFigure((xe-pe)*z+De,je*te+Fe,!0);se.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe-pe)*z+De,(je-he)*te+Fe,(xe-he)*z+De,(je-pe)*te+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z+De,je*te+Fe,(xe+he)*z+De,(je-pe)*te+Fe,(xe+pe)*z+De,(je-he)*te+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe+pe)*z+De,(je+he)*te+Fe,(xe+he)*z+De,(je+pe)*te+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z+De,je*te+Fe,(xe-he)*z+De,(je+pe)*te+Fe,(xe-pe)*z+De,(je+he)*te+Fe)),he=ve*.4,pe=.4,xe=.8,je=.5;var Ge=new go.PathFigure(xe*z+De,(je-pe)*te+Fe,!0);se.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z+De,je*te+Fe,(xe+he)*z+De,(je-pe)*te+Fe,(xe+pe)*z+De,(je-he)*te+Fe)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe+pe)*z+De,(je+he)*te+Fe,(xe+he)*z+De,(je+pe)*te+Fe)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe-he*.5)*z+De,je*te+Fe,xe*z+De,(je+pe)*te+Fe,(xe+pe-he*.5)*z+De,(je+he)*te+Fe)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe+pe-he*.5)*z+De,(je-he)*te+Fe,xe*z+De,(je-pe)*te+Fe).close()),he=ve*.8,pe=.8,xe=1,je=.5;var Ye=new go.PathFigure(xe*z+De,(je-pe)*te+Fe,!0);return se.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z+De,je*te+Fe,(xe+he)*z+De,(je-pe)*te+Fe,(xe+pe)*z+De,(je-he)*te+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe+pe)*z+De,(je+he)*te+Fe,(xe+he)*z+De,(je+pe)*te+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe-he*.5)*z+De,je*te+Fe,xe*z+De,(je+pe)*te+Fe,(xe+pe-he*.5)*z+De,(je+he)*te+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe+pe-he*.5)*z+De,(je-he)*te+Fe,xe*z+De,(je-pe)*te+Fe).close()),se}),go.Shape.defineFigureGenerator("Email",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,0,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.54*te)),le.add(new go.PathSegment(go.PathSegment.Move,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.54*te)),se}),go.Shape.defineFigureGenerator("Ethernet",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.35*z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,0).close());var le=new go.PathFigure(.1*z,te,!0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,te)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,te).close());var he=new go.PathFigure(.6*z,te,!0,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.9*z,te)),he.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*te)),he.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*te)),he.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,he=.5,pe=.5,xe=at(),je=at(),De=at(),Fe=at();Ue(he,pe-le,he+ie,pe-le,he+le,pe-ie,he+le,pe,.5,xe,xe,je,De,Fe);var Te=ft(je.x,je.y),Me=new go.PathFigure(je.x*z,je.y*te,!0);se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(he+le)*z,pe*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+le)*te,(he+le)*z,(pe+ie)*te,(he+ie)*z,(pe+le)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(he-le)*z,pe*te,(he-ie)*z,(pe+le)*te,(he-le)*z,(pe+ie)*te)),Ue(he-le,pe,he-le,pe-ie,he-ie,pe-le,he,pe-le,.5,De,Fe,je,xe,xe),Me.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te)),ie=ve*.3,le=.3,Ue(he-le,pe,he-le,pe-ie,he-ie,pe-le,he,pe-le,.5,De,Fe,je,xe,xe),Me.add(new go.PathSegment(go.PathSegment.Line,je.x*z,je.y*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(he-le)*z,pe*te,Fe.x*z,Fe.y*te,De.x*z,De.y*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+le)*te,(he-le)*z,(pe+ie)*te,(he-ie)*z,(pe+le)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(he+le)*z,pe*te,(he+ie)*z,(pe+le)*te,(he+le)*z,(pe+ie)*te)),Ue(he,pe-le,he+ie,pe-le,he+le,pe-ie,he+le,pe,.5,xe,xe,je,De,Fe),Me.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*te,Fe.x*z,Fe.y*te,De.x*z,De.y*te).close());var Me=new go.PathFigure(.45*z,0,!0);return se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),Gt(xe),Gt(je),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(he,pe,xe){he.add(new go.PathSegment(go.PathSegment.Move,(.3+pe)*z,(.8+xe)*te)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+pe)*z,(.5+xe)*te)),he.add(new go.PathSegment(go.PathSegment.Line,(.1+pe)*z,(.5+xe)*te)),he.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,he=0,pe=ie*ve,xe=.4*Math.SQRT2/2+.5,je=.5-.5*Math.SQRT2/2,De=1,Fe=.5,Te=.5,Me=0,Be=new go.PathFigure(xe*z,(1-je)*te,!1);return se.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,De*z,Fe*te,De*z,.7*te,De*z,Fe*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Te+le)*z,(Me+le)*te,(.5+ie+le)*z,(.5-pe+le)*te,(.5+pe+le)*z,(.5-ie+le)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+he)*te,(.5-pe+le)*z,(.5-ie+he)*te,(.5-ie+le)*z,(.5-pe+he)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.35+le)*z,.9*te,(.5-ie+le)*z,(.5+pe+he)*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 he=new go.PathFigure(0,.5*te,!1);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*te,.2*z,.35*te,.3*z,.35*te)),he.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 he=.5-.285,pe=.5,xe=he,je=Math.PI/4,De=4*(1-Math.cos(je))/(3*Math.sin(je)),Fe=De*.5,Te=he,Me=he,Be=De*Te,Ge=De*Me;le.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Te)*z,xe*te,(pe-(Be+Te)/2)*z,(xe+(Me+Ge)/2)*te,(pe-Te)*z,(xe+Ge)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,(xe-Me)*te,(pe-Te)*z,(xe-Ge)*te,(pe-Be)*z,(xe-Me)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Te)*z,xe*te,(pe+Be)*z,(xe-Me)*te,(pe+Te)*z,(xe-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+(Me+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 he=new go.PathFigure(.1*z,te,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),he.add(new go.PathSegment(go.PathSegment.Line,.9*z,te)),he.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 he=new go.PathFigure(.675*z,.575*te,!1);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*te)),he.add(new go.PathSegment(go.PathSegment.Line,z,.775*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*te,z,.8*te,z,.85*te)),he.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*te)),he.add(new go.PathSegment(go.PathSegment.Line,.65*z,te)),he.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*te)),he.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*te)),he.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*te)),he.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*te)),he.add(new go.PathSegment(go.PathSegment.Line,z,.775*te)),he.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*te)),he.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,he=new go.PathFigure(z,ie*te,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,te,z,(ie+le)*te,(ie+le)*z,te)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,ie*te,(ie-le)*z,te,0,(ie+le)*te)),he.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,0,0,(ie-le)*te,(ie-le)*z,0)),he.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 he=new go.PathFigure(0,.5*te,!1);return se.add(he),he.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 he=new go.PathFigure(0,.6*te,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*te)),he.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*te)),he.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),he.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 he=.1,pe=ve*.1,xe=.2,je=.9,De=new go.PathFigure((xe-he)*z,je*te,!0);se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-he)*te,(xe-he)*z,(je-pe)*te,(xe-pe)*z,(je-he)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe+he)*z,je*te,(xe+pe)*z,(je-he)*te,(xe+he)*z,(je-pe)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je+he)*te,(xe+he)*z,(je+pe)*te,(xe+pe)*z,(je+he)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe-he)*z,je*te,(xe-pe)*z,(je+he)*te,(xe-he)*z,(je+pe)*te).close()),he=.1,pe=ve*.1,xe=.8,je=.9;var Fe=new go.PathFigure((xe-he)*z,je*te,!0);return se.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-he)*te,(xe-he)*z,(je-pe)*te,(xe-pe)*z,(je-he)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe+he)*z,je*te,(xe+pe)*z,(je-he)*te,(xe+he)*z,(je-pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je+he)*te,(xe+he)*z,(je+pe)*te,(xe+pe)*z,(je+he)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe-he)*z,je*te,(xe-pe)*z,(je+he)*te,(xe-he)*z,(je+pe)*te).close()),se}),go.Shape.defineFigureGenerator("KanbanPost",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.2*z,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,te)),se}),go.Shape.defineFigureGenerator("Forklift",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0));var le=new go.PathFigure(0,.5*te,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var he=new go.PathFigure(.5*z,.8*te,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*te)),he.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*te)),he.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*te)),he.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*te));var pe=new go.PathFigure(.5*z,.7*te,!1);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,.7*te));var xe=.1,je=ve*.1,De=.1,Fe=.9,Te=new go.PathFigure((De-xe)*z,Fe*te,!0);se.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe-xe)*te,(De-xe)*z,(Fe-je)*te,(De-je)*z,(Fe-xe)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(De+xe)*z,Fe*te,(De+je)*z,(Fe-xe)*te,(De+xe)*z,(Fe-je)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe+xe)*te,(De+xe)*z,(Fe+je)*te,(De+je)*z,(Fe+xe)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(De-xe)*z,Fe*te,(De-je)*z,(Fe+xe)*te,(De-xe)*z,(Fe+je)*te)),xe=.1,je=ve*.1,De=.4,Fe=.9;var Me=new go.PathFigure((De-xe)*z,Fe*te,!0);return se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe-xe)*te,(De-xe)*z,(Fe-je)*te,(De-je)*z,(Fe-xe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(De+xe)*z,Fe*te,(De+je)*z,(Fe-xe)*te,(De+xe)*z,(Fe-je)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe+xe)*te,(De+xe)*z,(Fe+je)*te,(De+je)*z,(Fe+xe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(De-xe)*z,Fe*te,(De-je)*z,(Fe+xe)*te,(De-xe)*z,(Fe+je)*te)),se}),go.Shape.defineFigureGenerator("RailShipment",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.1*z,.4*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.4*te).close());var le=new go.PathFigure(.45*z,.7*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*te));var he=new go.PathFigure(.55*z,.4*te,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*te)),he.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*te)),he.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*te)),he.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*te).close());var De=.05,Fe=ve*.05,Te=.175,Me=.95,pe=new go.PathFigure((Te-De)*z,Me*te,!0);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me-De)*te,(Te-De)*z,(Me-Fe)*te,(Te-Fe)*z,(Me-De)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Me*te,(Te+Fe)*z,(Me-De)*te,(Te+De)*z,(Me-Fe)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me+De)*te,(Te+De)*z,(Me+Fe)*te,(Te+Fe)*z,(Me+De)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Me*te,(Te-Fe)*z,(Me+De)*te,(Te-De)*z,(Me+Fe)*te));var De=.05,Fe=ve*.05,Te=.375,Me=.95,xe=new go.PathFigure((Te-De)*z,Me*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me-De)*te,(Te-De)*z,(Me-Fe)*te,(Te-Fe)*z,(Me-De)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Me*te,(Te+Fe)*z,(Me-De)*te,(Te+De)*z,(Me-Fe)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me+De)*te,(Te+De)*z,(Me+Fe)*te,(Te+Fe)*z,(Me+De)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Me*te,(Te-Fe)*z,(Me+De)*te,(Te-De)*z,(Me+Fe)*te));var De=.05,Fe=ve*.05,Te=.625,Me=.95,je=new go.PathFigure((Te-De)*z,Me*te,!0);se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me-De)*te,(Te-De)*z,(Me-Fe)*te,(Te-Fe)*z,(Me-De)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Me*te,(Te+Fe)*z,(Me-De)*te,(Te+De)*z,(Me-Fe)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me+De)*te,(Te+De)*z,(Me+Fe)*te,(Te+Fe)*z,(Me+De)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Me*te,(Te-Fe)*z,(Me+De)*te,(Te-De)*z,(Me+Fe)*te));var De=.05,Fe=ve*.05,Te=.825,Me=.95,Be=new go.PathFigure((Te-De)*z,Me*te,!0);se.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me-De)*te,(Te-De)*z,(Me-Fe)*te,(Te-Fe)*z,(Me-De)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Me*te,(Te+Fe)*z,(Me-De)*te,(Te+De)*z,(Me-Fe)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me+De)*te,(Te+De)*z,(Me+Fe)*te,(Te+Fe)*z,(Me+De)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Me*te,(Te-Fe)*z,(Me+De)*te,(Te-De)*z,(Me+Fe)*te).close());var 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 he=new go.PathFigure(.15*z,te,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*te)),he.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*te)),he.add(new go.PathSegment(go.PathSegment.Line,.4*z,te)),he.add(new go.PathSegment(go.PathSegment.Line,.15*z,te).close());var pe=.05,xe=ve*.05,je=.35,De=.775,Fe=new go.PathFigure((je-pe)*z,De*te,!0);return se.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(De-pe)*te,(je-pe)*z,(De-xe)*te,(je-xe)*z,(De-pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(je+pe)*z,De*te,(je+xe)*z,(De-pe)*te,(je+pe)*z,(De-xe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(De+pe)*te,(je+pe)*z,(De+xe)*te,(je+xe)*z,(De+pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(je-pe)*z,De*te,(je-xe)*z,(De+pe)*te,(je-pe)*z,(De+xe)*te).close()),se}),go.Shape.defineFigureGenerator("ControlCenter",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.1*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*te).close()),se}),go.Shape.defineFigureGenerator("Bluetooth",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.75*te,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),se}),go.Shape.defineFigureGenerator("Bookmark",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*te)),se}),go.Shape.defineFigureGenerator("Bookmark",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*te)),se}),go.Shape.defineFigureGenerator("Globe",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,.75*z,0,z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,.75*te,.75*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.25*z,te,0,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,.25*te,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,.15*z,.25*te,.15*z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.85*z,.75*te,.85*z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.15*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.15*te,.35*z,.3*te,.65*z,.3*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.85*te,.35*z,.7*te,.65*z,.7*te)),se}),go.Shape.defineFigureGenerator("Wave",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.25*te,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.25*te,.1*z,0,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.25*te,.425*z,.5*te,.575*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.25*te,.8*z,0,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.75*te,.1*z,.5*te,.2*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.75*te,.425*z,te,.575*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.75*te,.8*z,.5*te,.9*z,.5*te)),se}),go.Shape.defineFigureGenerator("Operator",function(fe,z,te){var se=new go.Geometry,ie=.3,le=ve*.3,he=.5,pe=.7,xe=new go.PathFigure((he-ie)*z,pe*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe-ie)*te,(he-ie)*z,(pe-le)*te,(he-le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he+ie)*z,pe*te,(he+le)*z,(pe-ie)*te,(he+ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+ie)*te,(he+ie)*z,(pe+le)*te,(he+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he-ie)*z,pe*te,(he-le)*z,(pe+ie)*te,(he-ie)*z,(pe+le)*te));var je=new go.PathFigure(0,.7*te,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*te,0,0,z,0)),se}),go.Shape.defineFigureGenerator("TripleFanBlades",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*te,.65*z,.3*te,.65*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.35*z,.5*te,.35*z,.3*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.3*z,.6*te,.1*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*te,.2*z,te,.35*z,.95*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,te,.7*z,.6*te,.9*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*te,.8*z,te,.65*z,.95*te)),se}),go.Shape.defineFigureGenerator("CentrifugalPump",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,0,.075*te,0,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,te,0,te,.4*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.4*te,.8*z,te,.85*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),se}),go.Shape.defineFigureGenerator("Battery",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.1*te));var le=new go.PathFigure(0,.6*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Move,0,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*te)),se}),go.Shape.defineFigureGenerator("Delete",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*.5,he=.5,pe=.5,xe=new go.PathFigure((he-ie)*z,pe*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe-ie)*te,(he-ie)*z,(pe-le)*te,(he-le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he+ie)*z,pe*te,(he+le)*z,(pe-ie)*te,(he+ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+ie)*te,(he+ie)*z,(pe+le)*te,(he+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he-ie)*z,pe*te,(he-le)*z,(pe+ie)*te,(he-ie)*z,(pe+le)*te));var je=new go.PathFigure(.15*z,.5*te,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*te)),se}),go.Shape.defineFigureGenerator("Flag",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.1*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.1*te,.15*z,0,.35*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*te,.65*z,.2*te,.85*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*te,.85*z,.6*te,.65*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.35*z,.4*te,.15*z,.4*te).close()),se}),go.Shape.defineFigureGenerator("Help",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*.5,he=.5,pe=.5,xe=new go.PathFigure((he-ie)*z,pe*te,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe-ie)*te,(he-ie)*z,(pe-le)*te,(he-le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he+ie)*z,pe*te,(he+le)*z,(pe-ie)*te,(he+ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+ie)*te,(he+ie)*z,(pe+le)*te,(he+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(he-ie)*z,pe*te,(he-le)*z,(pe+ie)*te,(he-ie)*z,(pe+le)*te).close()),ie=.05,le=ve*.05,he=.5,pe=.8;var je=new go.PathFigure((he-ie)*z,pe*te,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe-ie)*te,(he-ie)*z,(pe-le)*te,(he-le)*z,(pe-ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(he+ie)*z,pe*te,(he+le)*z,(pe-ie)*te,(he+ie)*z,(pe-le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,he*z,(pe+ie)*te,(he+ie)*z,(pe+le)*te,(he+le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(he-ie)*z,pe*te,(he-le)*z,(pe+ie)*te,(he-ie)*z,(pe+le)*te).close()),je.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*te)),je.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*te,.75*z,.475*te,.75*z,.225*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.35*te,.4*z,.2*te,.3*z,.25*te)),se}),go.Shape.defineFigureGenerator("Location",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.5*z,te,!0).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.975*z,.025*te,.5*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*z,.5*te,.5*z,0,.025*z,.025*te).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*te)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*z,.3*te,.1*z,.1*te).close()))}),go.Shape.defineFigureGenerator("Lock",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var le=new go.PathFigure(.2*z,.5*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*te,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.3*te)),se}),go.Shape.defineFigureGenerator("Unlocked",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var le=new go.PathFigure(.2*z,.5*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*te,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.35*te)),se}),go.Shape.defineFigureGenerator("Gear",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.9375*z,.56246875*te,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.4375*te)).add(new go.PathSegment(go.PathSegment.Line,.80621875*z,.4375*te)).add(new go.PathSegment(go.PathSegment.Bezier,.763*z,.3316875*te,.79840625*z,.39915625*te,.7834375*z,.3635*te)).add(new go.PathSegment(go.PathSegment.Line,.8566875*z,.23796875*te)).add(new go.PathSegment(go.PathSegment.Line,.76825*z,.14959375*te)).add(new go.PathSegment(go.PathSegment.Line,.67596875*z,.24184375*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*z,.19378125*te,.64228125*z,.2188125*te,.603875*z,.2021875*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.0625*te)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.0625*te)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.19378125*te)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*z,.239375*te,.39759375*z,.20190625*te,.36053125*z,.2176875*te)).add(new go.PathSegment(go.PathSegment.Line,.2379375*z,.14959375*te)).add(new go.PathSegment(go.PathSegment.Line,.14953125*z,.2379375*te)).add(new go.PathSegment(go.PathSegment.Line,.23934375*z,.3278125*te)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*z,.4375*te,.21765625*z,.36059375*te,.201875*z,.397625*te)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.4375*te)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.5625*te)).add(new go.PathSegment(go.PathSegment.Line,.1938125*z,.5625*te)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*z,.67596875*te,.20221875*z,.603875*te,.21884375*z,.64228125*te)).add(new go.PathSegment(go.PathSegment.Line,.1495625*z,.76825*te)).add(new go.PathSegment(go.PathSegment.Line,.238*z,.8566875*te)).add(new go.PathSegment(go.PathSegment.Line,.3316875*z,.76296875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*z,.80621875*te,.36353125*z,.78340625*te,.3991875*z,.79840625*te)).add(new go.PathSegment(go.PathSegment.Line,.43753125*z,.9375*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.9375*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.80621875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*z,.760625*te,.602375*z,.79809375*te,.63946875*z,.78234375*te)).add(new go.PathSegment(go.PathSegment.Line,.76828125*z,.8566875*te)).add(new go.PathSegment(go.PathSegment.Line,.85671875*z,.76825*te)).add(new go.PathSegment(go.PathSegment.Line,.76065625*z,.67221875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*z,.56246875*te,.78234375*z,.63940625*te,.798125*z,.602375*te)).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.56246875*te).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.6*te)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*z,.5*te,.1*z,.1*te).close()))}),go.Shape.defineFigureGenerator("Hand",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.3*te,0,.375*te,.05*z,.325*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.075*te,.3*z,.225*te,.4*z,.175*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.525*z,.075*te,.46*z,.05*te,.525*z,.05*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.4*te,.525*z,.275*te,.475*z,.325*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.55*te,z,.4*te,z,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.425*z,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.7*te,.675*z,.55*te,.675*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.575*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,.85*te,.65*z,.7*te,.65*z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.535*z,te,.61*z,.85*te,.61*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,.435*z,te,0,te).close()),se}),go.Shape.defineFigureGenerator("Map",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.2*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*te)),se}),go.Shape.defineFigureGenerator("Eject",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te*.7)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.7).close());var le=new go.PathFigure(0,te*.6,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close()),se}),go.Shape.defineFigureGenerator("Pencil",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*te)).add(new go.PathSegment(go.PathSegment.Line,z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.9*z,te)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*te).close()))}),go.Shape.defineFigureGenerator("Building",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*1,te*1,!1);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,te*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,te*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,te*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,te*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te*.85).close());var le=new go.PathFigure(.126*z,.85*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.126*z,.45*te)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.45*te)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.85*te).close());var he=new go.PathFigure(.402*z,.85*te,!1);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*te)),he.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*te)),he.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 he=new go.PathFigure(z*.408,te,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z*.408,te*(1-.184*2))),he.add(new go.PathSegment(go.PathSegment.Line,z*.592,te*(1-.184*3))),he.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 he=new go.PathFigure(z*.055,.13*te,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.13)),he.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.16)),he.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 he=new go.PathFigure(z*.11,te*.1,!1);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),te*.1)),he.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),te*.8)),he.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,he=new go.PathFigure(ie,0,!1);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),he.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.14)),he.add(new go.PathSegment(go.PathSegment.Line,z,te-ie)),he.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,te,z,te-le,z-le,te)),he.add(new go.PathSegment(go.PathSegment.Line,ie,te)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,te-ie,le,te,0,te-le)),he.add(new go.PathSegment(go.PathSegment.Line,0,ie)),he.add(new go.PathSegment(go.PathSegment.Bezier,ie,0,0,le,le,0).close());var pe=new go.PathFigure(z*.83,0,!1);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.83,te*.3)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,te*.3)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,te*0).close());var xe=new go.PathFigure(z*.83,te*1,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,z*.83,te*.5)),xe.add(new go.PathSegment(go.PathSegment.Line,z*.17,te*.5)),xe.add(new go.PathSegment(go.PathSegment.Line,z*.17,te*1).close());var je=new go.PathFigure(z*.78,te*.05,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.05)),je.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.25)),je.add(new go.PathSegment(go.PathSegment.Line,z*.78,te*.25).close()),se}),go.Shape.defineFigureGenerator("SpeechBubble",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=15),se=Math.min(se,z/3),se=Math.min(se,te/3);var ie=se*ve,le=te*.8,he=new go.Geometry,pe=new go.PathFigure(se,0,!0);return he.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?(he.spot1=new go.Spot(0,0,ie,ie),he.spot2=new go.Spot(1,.8,-ie,-ie)):(he.spot1=go.Spot.TopLeft,he.spot2=new go.Spot(1,.8)),he}),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 he=new go.PathFigure(z*.28,te*.37,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.37)),he.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.41)),he.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,he=new go.PathFigure(z*.62,te*.475,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z,te-ie)),he.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,te,z,te-le,z-le,te)),he.add(new go.PathSegment(go.PathSegment.Line,ie,te)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,te-ie,le,te,0,te-le)),he.add(new go.PathSegment(go.PathSegment.Line,z*.38,te*.475)),he.add(new go.PathSegment(go.PathSegment.Line,z*.38,te*.03)),he.add(new go.PathSegment(go.PathSegment.Line,z*.36,te*0)),he.add(new go.PathSegment(go.PathSegment.Line,z*.64,te*0)),he.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 he=new go.PathFigure(z*.4,te*0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.44)),he.add(new go.PathSegment(go.PathSegment.Line,z*.26,te*.44)),he.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*.66)),he.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),te*.44)),he.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.44)),he.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 he=new go.PathFigure(z*.5,te*0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,z*.26,te*.25)),he.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.25)),he.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.63)),he.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.63)),he.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.25)),he.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 _n={},Mn="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":Mn=ke.toFixed(1);break;case"string":ke.match(new RegExp("^[0-9]\\.[0-9]+$"))?Mn=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="",Ae="",me=!1,be=null,fe=null,z=null,te=!1,se=null,ie=null,le=null,he=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(ht){return parseFloat(ht)>4?parseFloat(ht):5};_n.setHTML5Codebase=function(ht,St){ve=ht,xt(ht,St)},_n.setJavaCodebase=_n.setJavaCodebaseVersion=_n.isCompiledInstalled=_n.setPreCompiledScriptPath=_n.setPreCompiledResourcePath=function(){},_n.setHTML5CodebaseVersion=function(ht,St){var mt=parseFloat(ht);if(mt!==NaN&&mt<5){console.log("The GeoGebra HTML5 codebase version "+mt+" is deprecated. Using version latest instead.");return}de=ht,rt(ht,St)},_n.getHTML5CodebaseVersion=function(){return fe},_n.getParameters=function(){return ft},_n.setFontsCSSURL=function(ht){he=ht},_n.setGiacJSURL=function(ht){},_n.setJNLPFile=function(ht){Se=ht},_n.setJNLPBaseDir=function(ht){},_n.inject=function(){function ht(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var St="auto",mt=ft.id,Nt,dt=!1,Dt=0;Dt<arguments.length;Dt++){var gt=arguments[Dt];typeof gt=="string"?(gt=gt.toLowerCase(),gt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?St=gt:mt=arguments[Dt]):typeof gt=="boolean"?dt=gt:gt instanceof HTMLElement&&(Nt=gt)}yt();function yt(){if(!Ie){setTimeout(yt,200);return}St=Ct(St);var tt=Nt||document.getElementById(mt);if(!tt){console.log("possibly bug on ajax loading? ");return}if(_n.removeExistingApplet(tt,!1),ft.width===void 0&&tt.clientWidth&&(ft.width=tt.clientWidth),ft.height===void 0&&tt.clientHeight&&(ft.height=tt.clientHeight),!(ft.width&&ft.height)&&St==="html5"&&(delete ft.width,delete ft.height),be=St,St==="screenshot")Ke(tt,ft);else{var He=!1;ft.hasOwnProperty("playButton")&&ft.playButton||ft.hasOwnProperty("clickToLoad")&&ft.clickToLoad?He=!0:ft.hasOwnProperty("playButtonAutoDecide")&&ft.playButtonAutoDecide&&(He=(!je()||ht())&&De()),He?(be="screenshot",ot(tt,ft,dt,St)):Ye(tt,ft,dt)}}};function je(){try{return window.self!==window.top}catch(ht){return!0}}function De(){return ft.hasOwnProperty("screenshotGenerator")&&ft.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}_n.getViews=function(){return at},_n.isJavaInstalled=function(){return!1};var Fe=function(ht){var St=function(Dt){var gt=JSON.parse(Dt),yt=function(we){return we.type=="G"||we.type=="E"},tt=gt.elements?gt.elements.filter(yt)[0]:gt;if(!tt||!tt.url){mt();return}ft.fileName=tt.url,Te(tt.settings||{}),at.is3D=!0;var He="https://www.geogebra.org/images/";_n.setPreviewImage(se||tt.previewUrl,He+"GeoGebra_loading.png",He+"applet_play.png"),ht()},mt=function(){ft.onError&&ft.onError(),bt("Error: Fetching material (id "+ft.material_id+") failed.",ft)},Nt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",dt="/materials/"+ft.material_id+"?scope=basic";Me("https://"+Nt+"/api/proxy.php?path="+encodeURIComponent(dt),St,mt)};function Te(ht){var St=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(mt){ht[mt]=!!ht[mt]}),St.forEach(function(mt){ft[mt]===void 0&&ht[mt]!==void 0&&(ft[mt]=ht[mt])}),ft.showToolBarHelp===void 0&&(ft.showToolBarHelp=ft.showToolBar)}function Me(ht,St,mt){var Nt=new XMLHttpRequest;Nt.open("GET",ht),Nt.onload=function(){St(Nt.responseText)},Nt.onerror=mt,Nt.send()}_n.isHTML5Installed=function(){return!0},_n.getLoadedAppletType=function(){return be},_n.setPreviewImage=function(ht,St,mt){se=ht,ie=St,le=mt},_n.removeExistingApplet=function(ht,St){var mt;typeof ht=="string"&&(ht=document.getElementById(ht)),be=null;var Nt=null;for(mt=0;mt<ht.childNodes.length;mt++){var dt=ht.childNodes[mt],Dt=dt.className;Dt==="applet_screenshot"?St?(dt.style.display="block",be="screenshot"):dt.style.display="none":Dt!=="applet_scaler prerender"&&(ht.removeChild(dt),Nt=Dt&&Dt.indexOf("appletParameters")!=-1?dt.id:null,mt--)}var gt=ft.id!==void 0?ft.id:Nt,yt=window[gt];yt&&typeof yt.getBase64=="function"&&(yt.remove(),window[gt]=null)},_n.refreshHitPoints=function(){if(xe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ht=_n.getAppletObject();return ht&&typeof ht.recalculateEnvironments=="function"?(ht.recalculateEnvironments(),!0):!1},_n.startAnimation=function(){var ht=_n.getAppletObject();return ht&&typeof ht.startAnimation=="function"?(ht.startAnimation(),!0):!1},_n.stopAnimation=function(){var ht=_n.getAppletObject();return ht&&typeof ht.stopAnimation=="function"?(ht.stopAnimation(),!0):!1},_n.getAppletObject=function(){var ht=ft.id!==void 0?ft.id:"ggbApplet";return window[ht]},_n.resize=function(){};var Be=function(ht,St,mt){var Nt=document.createElement("param");Nt.setAttribute("name",St),Nt.setAttribute("value",mt),ht.appendChild(Nt)},Ge=function(ht){return ht&&ht!=="false"},Ye=function(ht,St,mt){xe(fe)<=4.2&&(mt=!0);var Nt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==fe||ggbHTML5LoadedCodebaseIsWebSimple&&!te)&&(Nt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var dt=document.createElement("div");dt.classList.add("appletParameters","notranslate");var Dt=St.width,gt=St.height;if(St.disableAutoScale=St.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():St.disableAutoScale,St.width!==void 0)if(xe(fe)<=4.4)Ge(St.showToolBar)&&(St.height-=7),Ge(St.showAlgebraInput)&&(St.height-=37),St.width<605&&Ge(St.showToolBar)&&(St.width=605,Dt=605);else{var yt=100;(Ge(St.showToolBar)||Ge(St.showMenuBar))&&(St.hasOwnProperty("customToolBar")&&(St.customToolbar=St.customToolBar),yt=Ge(St.showMenuBar)?245:155),Dt<yt&&(St.width=yt,Dt=yt)}dt.style.border="none",dt.style.display="inline-block";for(var tt in St)St.hasOwnProperty(tt)&&tt!=="appletOnLoad"&&dt.setAttribute("data-param-"+tt,St[tt]);he&&dt.setAttribute("data-param-fontscssurl",he),_n.resize=function(){GGBAppletUtils.responsiveResize(ht,St)},window.addEventListener("resize",function(Et){_n.resize()});var He=typeof St.appletOnLoad=="function"?St.appletOnLoad:function(){};if(!mt&&St.width!==void 0){St.hasOwnProperty("showSplash")||dt.setAttribute("data-param-showSplash","false");var we=ht.querySelector(".applet_scaler.prerender"),Ne=we!==null;if(Ne)var Ve=we.querySelector(".ggb_preview");else{var Ve=ct(Dt,gt,St.borderColor,!1);we=document.createElement("div"),we.className="applet_scaler",we.style.position="relative",we.style.display="block",we.style.width=Dt+"px",we.style.height=gt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(we,"66%"),xe(fe)>=5?(St.appletOnLoad=function(Et){var Ft=ht.querySelector(".ggb_preview");Ft&&Ft.parentNode.removeChild(Ft),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(we),window.GGBT_wsf_view&&$(window).trigger("resize"),He(Et)},Ne||we.appendChild(Ve)):dt.appendChild(Ve),we.appendChild(dt),Ne||ht.appendChild(we),setTimeout(function(){_n.resize()},1)}else{var nt=document.createElement("div");nt.className="applet_scaler",nt.style.position="relative",nt.style.display="block",nt.appendChild(dt),ht.appendChild(nt),St.appletOnLoad=function(Et){_n.resize(),He(Et)}}function Re(Et,Ft){Ft&&typeof Ft.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Et,Ft.appletOnLoad):renderGGBElement(Et),bt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Ft)}function _e(Et,Ft){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Et,params:Ft}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Kt){Re(Kt.article,Kt.params)}),html5AppletsToProcess=null)},xe(fe)<5&&(Et.className+=" geogebraweb")):Re(Et,Ft)}if(Nt){scriptLoadStarted=!0;for(var Ze=0;Ze<dt.childNodes.length;Ze++){var qe=dt.childNodes[Ze].tagName;qe==="TABLE"&&(dt.removeChild(dt.childNodes[Ze]),Ze--)}if(ggbHTML5LoadedScript!==null){var ut=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');ut!=null&&ut.parentNode.removeChild(ut)}var vt=document.createElement("script"),At=function(){_e(dt,St)};vt.src=Ae+z,ggbHTML5LoadedCodebaseIsWebSimple=te,ggbHTML5LoadedCodebaseVersion=fe,ggbHTML5LoadedScript=vt.src,bt("GeoGebra HTML5 codebase loaded: '"+Ae+"'.",St),!ve&&(!de||de=="5.0")?(te?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),At()):Ae.requirejs?__webpack_require__.e(7963).then(function(){var Et=[__webpack_require__(87963)];At.apply(null,Et)}.bind(this)).catch(__webpack_require__.oe):(vt.onload=At,ht.appendChild(vt))}else _e(dt,St);St.height=gt,St.width=Dt},Ke=function(ht,St,mt){var Nt=ct(St.width,St.height,St.borderColor,mt),dt=document.createElement("div");dt.style.position="relative",dt.style.display="block",dt.style.width=St.width+"px",dt.style.height=St.height+"px",dt.className="applet_screenshot applet_scaler"+(mt?" applet_screenshot_play":""),dt.appendChild(Nt);var Dt=GGBAppletUtils.getScale(St,ht,mt);mt?(ht.appendChild(lt()),window.GGBT_wsf_view||(ht.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(dt,"66%"),ht.appendChild(dt),Dt!==1&&!isNaN(Dt)&&(GGBAppletUtils.scaleElement(dt,Dt),dt.style.width=St.width+"px",dt.style.height=St.height+"px",dt.parentNode.style.width=St.width*Dt+"px",dt.parentNode.style.height=St.height*Dt+"px"),_n.resize=function(){Xe(ht,Nt,dt,mt)},window.addEventListener("resize",function(gt){_n.resize()}),_n.resize()};function Xe(ht,St,mt,Nt){if(ht.contains(St)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ht.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ht)}var dt=GGBAppletUtils.getScale(ft,ht,Nt);mt.parentNode!==null&&(!isNaN(dt)&&dt!==1?(GGBAppletUtils.scaleElement(mt,dt),mt.parentNode.style.width=ft.width*dt+"px",mt.parentNode.style.height=ft.height*dt+"px"):(GGBAppletUtils.scaleElement(mt,1),mt.parentNode.style.width=ft.width+"px",mt.parentNode.style.height=ft.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(ht),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}_n.onExitFullscreen=function(ht,St){St.appendChild(ht)};var ot=function(ht,St,mt,Nt){Ke(ht,St,!0);for(var dt=function(){var yt=[];for(gt=0;gt<ht.childNodes.length;gt++)yt.push(ht.childNodes[gt]);if(window.GGBT_wsf_view){var tt=window.GGBT_wsf_view.renderFullScreen(ht,St.id),He=document.getElementById("fullscreencontainer"),we=jQuery(ht).find(".fullscreencontent");we.length>0?(tt.remove(),we.attr("id","fullscreencontent").show(),jQuery(He).append(we),window.dispatchEvent(new Event("resize"))):Ye(tt,St,!1),window.GGBT_wsf_view.launchFullScreen(He)}else be=Nt,Ye(ht,St,!1);if(!window.GGBT_wsf_view)for(gt=0;gt<yt.length;gt++)ht.removeChild(yt[gt])},Dt=ht.getElementsByClassName("ggb_preview_play"),gt=0;gt<Dt.length;gt++)Dt[gt].addEventListener("click",dt,!1),Dt[gt].addEventListener("ontouchstart",dt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(ht),De()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},lt=function(){var ht=document.createElement("div");if(ht.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var St='.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");}',mt=document.createElement("style");mt.styleSheet?mt.styleSheet.cssText=St:mt.appendChild(document.createTextNode(St)),document.getElementsByTagName("head")[0].appendChild(mt)}return ht},ct=function(ht,St,mt,Nt){var dt=document.createElement("div");dt.className="ggb_preview",dt.style.position="absolute",dt.style.zIndex="90",dt.style.width=ht-2+"px",dt.style.height=St-2+"px",dt.style.top="0px",dt.style.left="0px",dt.style.overflow="hidden",dt.style.backgroundColor="white";var Dt="lightgrey";mt!==void 0&&(mt==="none"?Dt="transparent":Dt=mt),dt.style.border="1px solid "+Dt;var gt=document.createElement("img");if(gt.style.position="relative",gt.style.zIndex="1000",gt.style.top="-1px",gt.style.left="-1px",se!==null&>.setAttribute("src",se),gt.style.opacity=.7,ie!==null){var yt,tt,He;if(!Nt){yt=document.createElement("img"),yt.style.position="absolute",yt.style.zIndex="1001",yt.style.opacity=1,gt.style.opacity=.3,tt=360,tt>ht/4*3&&(tt=ht/4*3),He=tt/5.8,yt.setAttribute("src",ie),yt.setAttribute("width",tt),yt.setAttribute("height",He);var we=(ht-tt)/2,Ne=(St-He)/2;yt.style.left=we+"px",yt.style.top=Ne+"px",dt.appendChild(yt)}}return dt.appendChild(gt),dt},Ct=function(ht){return ht=ht.toLowerCase(),ht==="html5"||ht==="screenshot"?ht:"html5"},Je=["web","webSimple","web3d","tablet","tablet3d","phone"],rt=function(ht,St){if(fe=ht,St){xt(fe,!0);return}var mt=!Gt;if(mt){var Nt=xe(fe);!isNaN(Nt)&&Nt<4.4&&(mt=!1)}var dt,Dt;window.location.protocol.substr(0,4)==="http"?dt=window.location.protocol:dt="http:";var gt=fe.indexOf("//");gt>0?Dt=fe:gt===0?Dt=dt+fe:Dt="https://www.geogebra.org/apps/5.2.814.0/";for(var yt in Je)if(fe.slice(Je[yt].length*-1)===Je[yt]||fe.slice((Je[yt].length+1)*-1)===Je[yt]+"/"){xt(Dt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&mt&&!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")?Dt+="webSimple/":Dt+="web3d/",xt(Dt,!1)},xt=function(ht,St){if(ht.requirejs){Ae=ht;return}ht.slice(-1)!=="/"&&(ht+="/"),Ae=ht,St===null&&(St=ht.indexOf("http")===-1),me=St,z="web.nocache.js",te=!1;var mt=Ae.split("/");mt.length>1&&(!St&&mt[mt.length-2]==="webSimple"?(z="webSimple.nocache.js",te=!0):Je.indexOf(mt[mt.length-2])>=0&&(z=mt[mt.length-2]+".nocache.js")),mt=ht.split("/"),fe=mt[mt.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 Nt=parseFloat(fe);Nt!==NaN&&Nt<5&&ht.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Nt+" is deprecated. Using version latest instead."),rt("5.0",St))},bt=function(ht,St){window.console&&window.console.log&&(!St||typeof St.showLogging=="undefined"||St.showLogging&&St.showLogging!=="false")&&console.log(ht)};ft.material_id!==void 0?Fe(Pt):Pt();function Pt(){var ht=Mn;de!==null?ht=de:parseFloat(ht)<5&&(ht="5.0"),rt(ht,!1),ve!==null&&xt(ve,me),Ie=!0}return _n},GGBAppletUtils=function(){"use strict";function _n(){return window.GGBT_wsf_edit!==void 0}function Mn(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 Ae=null;if(Se!=null&&Se!="")for(var me=Ie.parentNode;me!=null;)if((" "+me.className+" ").indexOf(" "+Se+" ")>-1){Ae=me;break}else me=me.parentNode;var be=0,fe=0,z=0,te=0,se=0,ie=0,le=0;if(Ae)be=Ae.offsetWidth,fe=Math.max(Ee?Ae.offsetWidth:0,Ae.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(be=Math.min(window.innerWidth,document.documentElement.clientWidth),fe=Math.min(window.innerHeight,document.documentElement.clientHeight),z=be):(be=window.innerWidth,fe=window.innerHeight,z=window.innerWidth),Ie){var he=Ie.getBoundingClientRect();he.left>0&&he.left<=be&&(ke===void 0||!ke)&&(document.dir==="rtl"?(se=be-he.width-he.left,ie=z<=480?10:30):(ie=he.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<be?be=de:be-=te,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ve===void 0||!ve)&&(fe-=le)),{width:be,height:fe}}function at(Ie,de,ve,Ee,ke){if(Ie.isScreenshoGenerator)return 1;var Se=Ee!==void 0&&Ee,Ae=Ie.noScaleMargin!=null&&Ie.noScaleMargin,me=function(pe){return pe&&pe!=="false"},be=me(Ie.autoHeight),fe=ft(de,Ie.width,ve,be,Se&&window.GGBT_wsf_view||Ae,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,he=Se?1:fe.height/se;return ve!==void 0&&!ve&&(le=Math.min(1,le),he=Math.min(1,he)),Math.min(le,he)}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);_n()&&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 Ae=de.id!==void 0?de.id:"ggbApplet",me=window[Ae];(me==null||!me.recalculateEnvironments)&&ke!==null&&!ke.className.match(/fullscreen/)&&(ke.parentNode.style.transform="",!isNaN(Ee)&&Ee!==1?(ke.parentNode.style.width=de.width*Ee+"px",ke.parentNode.style.height=de.height*Ee+"px",Mn(ke,Ee)):(Mn(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:_n,positionCenter:oe,getScale:Gt,scaleElement:Mn}}();__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 _n=n.location.search;return _n.indexOf(J)!=-1||_n.indexOf(K)!=-1}function q(_n,Mn){}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(_n){var Mn=s[L].bindings;s[L].bindings=function(){for(var ft=Mn?Mn():{},at=_n[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 _n=o.createElement(Q);if(_n.id=L,_n.style.cssText=R+S,_n.tabIndex=-1,o.body.appendChild(_n),t=_n.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Mn=document.compatMode==U?V:W;t.write(Mn+X),t.close()}}}function w(_n){function Mn(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)}Mn(function(){ft(_n)})}webModule.__startLoadingFragment=function(_n){return C(_n)},webModule.__installRunAsyncCode=function(_n){var Mn=u(),ft=Mn.body,at=Mn.createElement(_);at.language=ab,at.text=_n,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(_n){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(_n){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(_n){var Mn=c[_n];return Mn==null?null:Mn},r=d,webModule.__errFn=e}function B(){function _n(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 Mn(Ie){if(!Ie.match(/^\w+:\/\//)){var de=o.createElement(ub);de.src=Ie+vb,Ie=_n(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 _n(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=_n(o.location.href)),Ue=Mn(Ue),Ue}function C(_n){return _n.match(/^\//)||_n.match(/^[a-zA-Z]+:\/\//)?_n:webModule.__moduleBase+_n}function D(){var _n=[],Mn=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&&(Mn=parseInt(oe.substring(Ue+P),$),oe=oe.substring(O,Ue))}catch(Ie){}return webModule.__softPermutationId=Mn,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(_n,Mn,ft){"use strict";ft.d(Mn,{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 Ae=0;Ae<Ee.length;Ae++){let me=Ee[Ae],be=ke?`${ke}/${me.name}`:`${me.name}`;Se.push({title:me.name,type:me.type,isLeaf:me.type!=="tree",key:be})}return Se}function Ue(Ee,ke,Se){for(let Ae=0;Ae<Ee.length;Ae++){let me=Ee[Ae];if(me.key===ke){me.children=Se;break}me.children&&Ue(me.children,ke,Se)}return Ee}function Ie(Ee,ke,Se){let Ae;return function(){let me=this,be=arguments,fe=function(){Ae=null,Se||Ee.apply(me,be)},z=Se&&!Ae;clearTimeout(Ae),Ae=setTimeout(fe,ke),z&&Ee.apply(me,be)}}const de=!0,ve=at.Z.API_SERVER},9507:function(_n,Mn,ft){"use strict";ft.d(Mn,{Z:function(){return Ae}});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,be,fe)=>new Promise((z,te)=>{var se=he=>{try{le(fe.next(he))}catch(pe){te(pe)}},ie=he=>{try{le(fe.throw(he))}catch(pe){te(pe)}},le=he=>he.done?z(he.value):Promise.resolve(he.value).then(se,ie);le((fe=fe.apply(me,be)).next())}),Ae=({data:me,className:be,fullWidth:fe,style:z={},onClose:te,onOk:se,showFullTools:ie,noAssociationId:le})=>{const he=(0,at.useRef)(null),pe=(0,at.useRef)(null),xe=(0,at.useRef)(null),je=(0,at.useRef)(null),[De,Fe]=(0,at.useState)(!1),[Te,Me]=(0,at.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,at.useEffect)(()=>(xe.current||(xe.current=document.createElement("style"),document.head.appendChild(xe.current)),me!=null&&me.visible?(document.body.setAttribute("data-custom","y-hidden"),xe.current.innerHTML=" html { overflow-y: hidden; }",me!=null&&me.src&&Be()):(document.body.removeAttribute("data-custom"),xe.current&&(document.head.removeChild(xe.current),xe.current=null)),()=>{document.body.removeAttribute("data-custom"),xe.current&&(document.head.removeChild(xe.current),xe.current=null)}),[me==null?void 0:me.visible]);const Be=()=>ke(void 0,null,function*(){Fe(!0),Me("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Xe=yield(0,Ee.ZJ)(me==null?void 0:me.src);he.current.src="",he.current.src=Xe,he.current.onload=function(){Ke()},Fe(!1),Me("")}),Ge=Xe=>ke(void 0,null,function*(){Fe(!0),Me("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ot=yield(0,ve.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:me.title,file: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),Me("")}),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 ct=document.querySelector(lt.name);ct&&ct.setAttribute("title",lt.title)})},Ke=()=>{pe.current=new de.hP(he.current),pe.current.targetRoot=je.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:je,className:Ue()(Gt.imageDimensions,be,fe?Gt.fullWidth:""),style:z},at.createElement("img",{className:Gt.img,ref:he}))))}},76562:function(_n,Mn,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:Ae,showSaveButton:me,value:be=""},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((je,De)=>ke.createElement("div",{key:De},ke.createElement("h1",null,je.name),ke.createElement(Gt.Z,{gutter:[10,10]},je.data.map((Fe,Te)=>ke.createElement(oe.Z,{key:Te,onClick:()=>ie(Fe),className:ve.Z.diamond},ke.createElement(de.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ke.createElement(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((je,De)=>ke.createElement("div",{key:De},je.name&&ke.createElement("h1",null,je.name),ke.createElement(Gt.Z,{gutter:[10,10]},je.data.map((Fe,Te)=>ke.createElement(oe.Z,{key:Te,onClick:()=>ie(Fe),className:ve.Z.diamond},ke.createElement(de.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))}],he=()=>{var pe=document.createElement("div");pe.innerHTML=z.current.getValue();var xe=pe.innerText;return Ae&&Ae(xe),xe};return(0,at.useImperativeHandle)(fe,()=>({getData:he})),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}},be||""),me&&ke.createElement("div",{className:ve.Z.button},ke.createElement(Ie.ZP,{size:"large",onClick:he,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Mn.Z=Se},28426:function(_n,Mn,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,Ae=(fe,z)=>{for(var te in z||(z={}))Ee.call(z,te)&&Se(fe,te,z[te]);if(ve)for(var te of ve(z))ke.call(z,te)&&Se(fe,te,z[te]);return fe},me=(fe,z)=>Ie(fe,de(z));const be=({img:fe,buttonProps:z={},styles:te={},customText:se,ButtonText:ie,ButtonClick:le,Buttonclass:he,ButtonTwo:pe,imgStyles:xe,loading:je=!1,className:De=""})=>at.createElement("section",{className:`tc animated fadeIn ${De}`,style:Ae({color:"#999",margin:"100px auto",visibility:je?"hidden":"visible"},te)},at.createElement("img",{src:fe||Gt,style:me(Ae({},xe),{pointerEvents:"none",userSelect:"none"})}),at.createElement("p",{className:"mt20 font14"},se||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&at.createElement(oe.ZP,Ae({className:he,onClick:le},z),ie),pe&&pe);Mn.Z=be},45677:function(_n,Mn,ft){"use strict";ft.d(Mn,{Z:function(){return he}});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),Ae=ft(44203),me=ft(59301),be=Object.defineProperty,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,se=(pe,xe,je)=>xe in pe?be(pe,xe,{enumerable:!0,configurable:!0,writable:!0,value:je}):pe[xe]=je,ie=(pe,xe)=>{for(var je in xe||(xe={}))z.call(xe,je)&&se(pe,je,xe[je]);if(fe)for(var je of fe(xe))te.call(xe,je)&&se(pe,je,xe[je]);return pe},le=(pe,xe,je)=>new Promise((De,Fe)=>{var Te=Ge=>{try{Be(je.next(Ge))}catch(Ye){Fe(Ye)}},Me=Ge=>{try{Be(je.throw(Ge))}catch(Ye){Fe(Ye)}},Be=Ge=>Ge.done?De(Ge.value):Promise.resolve(Ge.value).then(Te,Me);Be((je=je.apply(pe,xe)).next())}),he=({editOffice:pe="view",data:xe,issaver:je,onSaver:De,theme:Fe,type:Te,filename:Me,monacoEditor:Be,className:Ge,style:Ye,close:Ke,onClose:Xe,hasMask:ot,disabledDownload:lt,onImgDimensions:ct,showNodata:Ct,recordInfo:Je})=>{const[rt,xt]=(0,at.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[bt,Pt]=(0,at.useState)(""),[ht,St]=(0,at.useState)(),mt=window.ENV==="build"?"/react/build":"",Nt=location.host.startsWith("localhost")?Se.Z.PROXY_SERVER:Se.Z.API_SERVER,Dt=10*(1024*1024),gt=(0,at.useRef)();xe!=null&&xe.startsWith("/api")&&Te!=="txt"&&(xe=Se.Z.API_SERVER+xe);const yt=Ve=>Ve.substring(Ve.lastIndexOf("/")+1).split(".").pop();Me&&Be&&(Be.filename=Me),(0,at.useEffect)(()=>{var Ve,nt;const Re=(nt=(Ve=document.cookie)==null?void 0:Ve.replace(/\s/g,""))==null?void 0:nt.split(";");Re==null||Re.map(_e=>{let Ze=_e.split("=");Ze[0]==="_educoder_session"&&Pt(Ze[1])})},[]),(0,at.useEffect)(()=>{Te==="office"&&(xe.indexOf("bigfilescdn.")>-1||xe.indexOf("bigfiles1")>-1?St({url:xe,fileType:yt(xe),model:xe.indexOf("model=edit")?"edit":"view"}):He())},[Te,xe]);function tt(Ve){return le(this,null,function*(){Ve.data.type==="pdfdata"&&(De(Ve.data.data),window.removeEventListener("message",tt,!1)),console.log("mess---:",Ve.data)})}const He=()=>le(void 0,null,function*(){console.log("data:",xe);let Ve=xe;xe.startsWith("http")||(Ve=location.origin+Ve);let nt=new URL(Ve).pathname.split("/").pop();const Re=yield(0,Ee.gJ)({attachment_id:nt});Re.url=Nt+Re.url,St(Re)}),we=()=>{if(xe.startsWith("http")||xe.startsWith("blob:")){Ne();return}(0,ve.Sv)(Me||"educoder",xe,Me)},Ne=()=>{Je&&(0,Ae.fc)({id:Je==null?void 0:Je.id,watch_type:1,course_id:Je==null?void 0:Je.course_id}),(0,ve.Nd)(Me||"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:gt},!!ct&&me.createElement(de.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>gt.current},me.createElement("span",{onClick:()=>{Xe(),ct()}},me.createElement("i",{className:"icon-yulanpizhu"}))),!lt&&me.createElement(de.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>gt.current},me.createElement("span",{onClick:Ne},me.createElement("i",{className:"icon-quxiaozhiding"}))),je&&me.createElement(de.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>gt.current},me.createElement("span",{className:"",onClick:()=>{const Ve=document.getElementById("pdfiframe");window.addEventListener("message",tt,!1),setTimeout(()=>{Ve.contentWindow.postMessage("getData","*")},300)}},me.createElement("i",{className:"icon-baocun"}))),me.createElement(de.Z,{title:"\u5173\u95ED",getPopupContainer:()=>gt.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"&&ht&&me.createElement("iframe",{src:`${mt}/office.html?key=${ht.key}&url=${btoa(ht.url)}&callbackUrl=${Nt+(ht.callbackUrl||"")}&fileType=${ht.fileType}&title=${ht.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:`${mt}/js/pdfview/index.html?filename=${Me||"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(_n,Mn,ft){"use strict";ft.d(Mn,{z:function(){return Fe},Z:function(){return Te}});var at=ft(59301),Gt=ft(8944),oe=ft(81428),Ue=ft(64018),Ie=ft(79710),de=ft(346),ve=ft(51257),Ee=ft(15342),ke=ft(1012),Se=ft(45677),Ae=ft(59301),be=({html:Me})=>{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=Me,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=Me)},[Me]),Ae.createElement("div",{ref:Be})};function fe(Me){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 Me.replace(Ge,"").trim()}var z=Object.defineProperty,te=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,le=(Me,Be,Ge)=>Be in Me?z(Me,Be,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Me[Be]=Ge,he=(Me,Be)=>{for(var Ge in Be||(Be={}))se.call(Be,Ge)&&le(Me,Ge,Be[Ge]);if(te)for(var Ge of te(Be))ie.call(Be,Ge)&&le(Me,Ge,Be[Ge]);return Me};const pe="@\u2581\u2581@",xe="@\u2581@",je=/<pre[^>]*>/g;function De(Me){let Be=document.createElement("div");return Be.innerHTML=Me,Be.childNodes.length===0?"":Be.childNodes[0].nodeValue}const Fe=(Me,Be)=>{Me=Me||"";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?Me.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Ge,(ot,lt,ct,Ct,Je,rt,xt)=>{const bt=lt||Ct||rt,Pt=ct||Je||xt||"?";return de.Z.API_SERVER+"/api/attachments/"+bt+Pt+"&t="+(0,ve.Jn)(bt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Me=Me.replace(Xe,(ot,lt,ct,Ct,Je,rt,xt)=>{const bt=lt||Ct||rt,Pt=ct||Je||xt||"?";return de.Z.API_SERVER+"/attachments/download/"+bt+Pt+"&t="+(0,ve.Jn)(bt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replace(Ge,(ot,lt,ct,Ct,Je,rt,xt)=>{const bt=lt||Ct||rt,Pt=ct||Je||xt||"?";return de.Z.API_SERVER+"/api/attachments/"+bt+Pt+"&t="+(0,ve.Jn)(bt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replace(Ye,(ot,lt,ct,Ct,Je)=>{const rt=lt||Ct,xt=ct||Je||"";return'"'+de.Z.API_SERVER+"/api/attachments/"+rt+xt+rt+xt+"&t="+(0,ve.Jn)(rt,Date.now())}).replace(Ke,(ot,lt,ct,Ct,Je)=>{const rt=lt||Ct,xt=ct||Je||"";return"("+de.Z.API_SERVER+"/files/uploads/"+rt+xt+rt+xt+"&t="+(0,ve.Jn)(rt,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,`
|
|
`),Me)};var Te=({value:Me="",className:Be,showTextOnly:Ge,showLines:Ye,style:Ke={},stylesPrev:Xe={},highlightKeywords:ot,showProgramFill:lt,isProgramFill:ct,disabledFill:Ct=!1,programFillValue:Je,onFillChange:rt=Pt=>{},onFillBlur:xt=()=>{},onFillFocus:bt=()=>{}})=>{let Pt=fe(String(Me||""));const[ht,St]=(0,at.useState)(""),[mt,Nt]=(0,at.useState)("office"),[dt,Dt]=(0,at.useState)([]),gt=(0,at.useRef)("a"+(0,ke.Z)()),yt={},tt=At=>/<style[\s\S]*?>/i.test(At||""),He=(At,Et,Ft)=>{const Kt=document.createElement(At===xe?"input":"textarea");Kt.style.width="100%",Kt.style.height=At===xe?"40px":"151px",Kt.rows=5,Kt.spellcheck=!1,Kt.name="edu-program-fill",Kt.placeholder="\u8BF7\u8F93\u5165",Kt.dataset.id=Et;const Yt=Object.keys(yt).length;return yt[Yt]=Kt,`<span class="edu-program-fill-wrap ${At===xe?"":"show"}" style="width:${At===xe?"400px":"100%"}" title=${Ft||""}><span>${Kt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function we(At){return At=At.replace(/!\[.*?\]\(.*?\)/g,""),At=At.replace(/\[.*?\]\(.*?\)/g,""),At=At.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),At=At.replace(/<embed.*?>/g,""),At=At.replace(/<img.*?>/g,""),At=At.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),At=At.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),At=At.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),At=At.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),At}const Ne=At=>!Ge&&tt(Pt)?At:At.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Et,Ft){let Kt=Ft.replace(/(\n|\r)/g,"").split("}"),Yt=[];return Kt.map(Vt=>{Vt!=""&&Yt.push(`.${gt.current} ${Vt}`)}),`<style>${Yt.join("}")}</style>`}),Ve=(0,at.useMemo)(()=>{try{const Kt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Yt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Vt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Ht=/\(\/attachments\/download\//g;Pt=Pt.replace(Ht,"("+de.Z.API_SERVER+"/attachments/download/").replace(Kt,"("+de.Z.API_SERVER+"/api/attachments/").replace(Yt,'"'+de.Z.API_SERVER+"/api/attachments/").replace(Vt,'"'+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(Kt){}if(lt){let Kt=-1;return Pt=Pt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Yt,Vt,Ht){var sn;return++Kt,He(Yt,Kt,(sn=Je==null?void 0:Je[Kt])==null?void 0:sn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Ne(Pt||"")}</pre>`}let At=Ne(Pt);At=(0,oe.ZP)(At);const Et=(0,oe.ez)();Pt.match(/\[TOC\]/)&&(At=At.replace("<p>[TOC]</p>",(0,oe.Qv)()),(0,oe.Iy)()),At=At.replace(/(__special_katext_id_\d+__)/g,(Kt,Yt)=>{const{type:Vt,expression:Ht}=Et[Yt];return(0,Ee.renderToString)(De(Ht)||"",{displayMode:Vt==="block",throwOnError:!1,output:"html"})}),At=At.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,oe.AL)();const Ft=document.createElement("div");if(Ft.innerHTML=At,Ge)return Ft.innerText;if(ot){const Kt=ot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ze(Ft,Kt),Ft.innerHTML}return setTimeout(()=>vt(),500),Ft.innerHTML},[Pt,ot]);(0,at.useEffect)(()=>{qe.current&&qe.current.querySelectorAll(["input","textarea"]).forEach(Et=>{Et.oninput=nt,Et.onblur=Re,Et.onfocus=_e})},[dt]),(0,at.useEffect)(()=>{var At,Et,Ft,Kt,Yt;if(Je!=null&&Je.length)try{const Vt=qe.current.querySelectorAll(".edu-program-fill-score"),Ht=qe.current.querySelectorAll('[name="edu-program-fill"]');for(const[sn,rn]of Ht.entries())rn.value=((At=Je==null?void 0:Je[sn])==null?void 0:At.value)||"",((Et=Je==null?void 0:Je[sn])==null?void 0:Et.type)==="warning"?rn.className="program-fill-warning":((Ft=Je==null?void 0:Je[sn])==null?void 0:Ft.type)==="success"?rn.className="program-fill-success":rn.className="";for(const[sn,rn]of Vt.entries())rn.innerHTML=(Kt=Je==null?void 0:Je[sn])!=null&&Kt.score?`${(Yt=Je==null?void 0:Je[sn])==null?void 0:Yt.score}\u5206`:"";Dt(Je)}catch(Vt){console.log(Vt,"error")}},[Je]);const nt=At=>{dt[At.target.dataset.id]=dt[At.target.dataset.id]||{},dt[At.target.dataset.id].value=At.target.value,Dt([...dt]),rt(dt,At.target.dataset.id)},Re=At=>{dt[At.target.dataset.id]=dt[At.target.dataset.id]||{},dt[At.target.dataset.id].value=At.target.value,Dt([...dt]),xt(dt,At.target.dataset.id)},_e=At=>{dt[At.target.dataset.id]=dt[At.target.dataset.id]||{},dt[At.target.dataset.id].value=At.target.value,Dt([...dt]),bt(dt,At.target.dataset.id)};function Ze(At,Et){return At.childNodes.forEach(Ft=>{var Kt;if(Ft.childNodes.length>0)Ze(Ft,Et);else if(Ft.nodeName!=="IMG")if(Ft.innerHTML)Ft.innerHTML=(Kt=Ft.innerHTML)==null?void 0:Kt.replace(new RegExp(Et,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Yt=document.createElement("span");Yt.innerHTML=Ft.textContent.replace(new RegExp(Et,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Ft.replaceWith(Yt)}})}const qe=(0,at.useRef)();oe.jb.WebkitLineClamp=Ye,Ye&&(Ke=he(he({},Ke),oe.jb));function ut(At){let Et=At.target;if(Et.tagName.toUpperCase()==="A"){let Ft=Et.getAttribute("href");if(Ft.indexOf("office")>-1)At.preventDefault(),St(Ft),Nt("office");else if(Ft.indexOf("application/pdf")>-1)At.preventDefault(),St(Ft),Nt("pdf");else if(Ft.indexOf("text/html")>-1)At.preventDefault(),St(Ft),Nt("html");else if(Ft.startsWith("#")){At.preventDefault();let Kt=document.getElementById(Ft.replace("#",""));Kt&&Kt.scrollIntoView(!0)}}}const vt=()=>{var At;const Et=(At=qe.current)==null?void 0:At.querySelectorAll("video");Et==null||Et.forEach(Ft=>{if(Ft.oncontextmenu=()=>!1,Ft.src.indexOf(".m3u8")>-1&&!Ft.canPlayType("application/vnd.apple.mpegurl")){if(Ie.ZP.isSupported()){var Kt=new Ie.ZP;Kt.loadSource(Ft.src),Kt.attachMedia(Ft)}}})};return(0,at.useEffect)(()=>{if(qe.current&&Ve&&Ve.match(je)&&window.PR.prettyPrint(),qe.current)return qe.current.addEventListener("click",ut),()=>{var At;(At=qe.current)==null||At.removeEventListener("click",ut),(0,oe.AL)(),(0,oe.Iy)()}},[Ve,qe.current,ut]),(0,at.useEffect)(()=>{var At;const Et=Ft=>{Ft.preventDefault(),Ft.clipboardData.setData("text",window.getSelection().toString())};return(At=qe.current)==null||At.addEventListener("copy",Et),()=>{var Ft;(Ft=qe.current)==null||Ft.removeEventListener("copy",Et)}},[qe.current]),at.createElement(at.Fragment,null,Ge&&at.createElement("div",{ref:qe},Ve),!Ge&&!tt(Ve)&&at.createElement("div",{ref:qe,style:he({},Ke),className:`${Be||""} ${Ct?"disabled-fill":""} markdown-body ${gt.current}`,dangerouslySetInnerHTML:{__html:Ve}}),!Ge&&tt(Ve)&&at.createElement(be,{html:Ve}),at.createElement(Se.Z,{close:!0,data:ht,type:ht!=null&&ht.length?mt:"",style:he({},Xe),onClose:()=>St("")}))}},16253:function(_n,Mn,ft){"use strict";ft.d(Mn,{cT:function(){return Te},pe:function(){return je}});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),Ae=Object.defineProperty,me=Object.defineProperties,be=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,se=(Be,Ge,Ye)=>Ge in Be?Ae(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,be(Ge)),he=(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{ct(Ye.next(Ct))}catch(Je){Xe(Je)}},lt=Ct=>{try{ct(Ye.throw(Ct))}catch(Je){Xe(Je)}},ct=Ct=>Ct.done?Ke(Ct.value):Promise.resolve(Ct.value).then(ot,lt);ct((Ye=Ye.apply(Be,Ge)).next())});const{Dragger:xe}=Gt.default,je=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,ct,Ct,Je;const rt=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});rt.data=JSON.parse(je(rt.data));const xt=new OSS({endpoint:(Xe=rt==null?void 0:rt.data)==null?void 0:Xe.end_point,region:(ot=rt==null?void 0:rt.data)==null?void 0:ot.region,accessKeyId:(lt=rt==null?void 0:rt.data)==null?void 0:lt.access_key_id,accessKeySecret:(ct=rt==null?void 0:rt.data)==null?void 0:ct.access_key_secret,bucket:(Ct=rt==null?void 0:rt.data)==null?void 0:Ct.bucket,stsToken:(Je=rt==null?void 0:rt.data)==null?void 0:Je.security_token});return new Promise((bt,Pt)=>{console.log(11111,`${Ge}/${Ye}`,`${Ge}/${Ke}`,rt.data),xt.copy(`/${Ge}/${Ye}`,`/${Ge}/${Ke}`).then(ht=>{console.log("\u62F7\u8D1D\u6210\u529F",ht)}).catch(ht=>{console.log(ht)})})}),Te=(Be,Ge,Ye)=>pe(void 0,null,function*(){var Ke,Xe,ot,lt,ct,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):",je(Je.data)),Je.data=JSON.parse(je(Je.data));const rt=Be.name.split(".");rt.pop();const xt=Ge.realFileName?rt.join(""):(0,ve.Z)(),bt=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:(ct=Je==null?void 0:Je.data)==null?void 0:ct.bucket,stsToken:(Ct=Je==null?void 0:Je.data)==null?void 0:Ct.security_token});return new Promise((Pt,ht)=>{var St;bt.multipartUpload(`${xt}`,new Blob([Be],{type:Be.type}),le(ie({timeout:200*1e3,partSize:102400},Ye),{callback:{url:(St=Je==null?void 0:Je.data)==null?void 0:St.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(mt){var Nt;Be.response=(Nt=mt.data)==null?void 0:Nt.data,Pt(mt==null?void 0:mt.data)}).catch(function(mt){ht(mt),console.log("err:",mt)})})}),Me=Be=>{var Ge=Be,{user:Ye,cancelUpload:Ke}=Ge,Xe=he(Ge,["user","cancelUpload"]);const[ot,lt]=(0,at.useState)([]);let[ct,Ct]=(0,at.useState)();const Je={onRemove:xt=>{lt([...ot.filter(bt=>bt.name!==xt.name)]),Xe.onChange(ot.filter(bt=>bt.name!==xt.name))},disabled:Xe.disabled,multiple:!0,fileList:ot==null?void 0:ot.map(xt=>xt.file),customRequest:()=>{},beforeUpload:xt=>pe(void 0,null,function*(){let bt=Xe.maxSize||1073741824;if(ot.filter(Pt=>Pt.name===xt.name).length){oe.ZP.info(`${xt.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(xt==null?void 0:xt.size)>bt?(oe.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${bt/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(ot.push({name:xt.name,file:xt}),lt([...ot]),Xe.onChange(ot),!1)})},rt=(xt,bt)=>pe(void 0,null,function*(){var Pt,ht,St,mt,Nt,dt;bt.file_name=xt.name;const Dt=xt.name,gt=yield(0,Ue.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(gt.data=JSON.parse(je(gt.data)),(gt==null?void 0:gt.status)!==0){ot[ot.findIndex(He=>He.name===Dt)].status="error",ot[ot.findIndex(He=>He.name===Dt)].file.status="error",Xe.onChange(ot),oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}ct=new(Se())({endpoint:(Pt=gt==null?void 0:gt.data)==null?void 0:Pt.end_point,region:(ht=gt==null?void 0:gt.data)==null?void 0:ht.region,accessKeyId:(St=gt==null?void 0:gt.data)==null?void 0:St.access_key_id,accessKeySecret:(mt=gt==null?void 0:gt.data)==null?void 0:mt.access_key_secret,bucket:(Nt=gt==null?void 0:gt.data)==null?void 0:Nt.bucket,stsToken:(dt=gt==null?void 0:gt.data)==null?void 0:dt.security_token}),console.log(xt,"file"),Ct(ct);const yt=xt.name.split(".");yt.pop();const tt=Dt.indexOf(".")>-1?bt.realFileName?yt.join("."):(0,ve.Z)():Dt;return new Promise((He,we)=>{var Ne;try{ct.multipartUpload(`${Xe.identifier}/${tt}${Dt.indexOf(".")>-1?"."+Dt.split(".").pop():""}`,new Blob([xt.file],{type:xt.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Ve,nt,Re)=>{try{console.log("\u8FDB\u5EA6",Ve,nt,Re);const _e=ot.findIndex(Ze=>Ze.name===Dt);ot[_e].file.percent=Ve*100,ot[_e].tempCheckpoint=nt,lt([...ot])}catch(_e){}},checkpoint:ot[ot.findIndex(Ve=>Ve.name===Dt)].tempCheckpoint,callback:{customValue:{id:Dt+""},url:(Ne=gt==null?void 0:gt.data)==null?void 0:Ne.callback_url,host:gt==null?void 0:gt.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Ue.rz)(bt)}}).then(function(Ve){var nt,Re,_e;const Ze=ot.findIndex(ut=>ut.name===Dt);let qe="done";if(((nt=Ve.data)==null?void 0:nt.status)===0){xt.response=(Re=Ve.data)==null?void 0:Re.data;const ut=ot.findIndex(vt=>vt.name===Dt);ot[ut].status="done",ot[ut].file.status="done"}else oe.ZP.warning((_e=Ve.data)==null?void 0:_e.message),qe="error";ot[Ze].status=qe,ot[Ze].file.status=qe,Xe.onChange(ot),He(Ve==null?void 0:Ve.data)}).catch(function(Ve){ot[ot.findIndex(nt=>nt.name===Dt)].status="error",ot[ot.findIndex(nt=>nt.name===Dt)].file.status="error",oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),lt([...ot]),Xe.onChange(ot),we(Ve),console.log("err:",Ve)})}catch(Ve){}})});return(0,at.useEffect)(()=>{ot.every(xt=>xt==="done"||xt==="error")&&Xe.onComplete(ot)},[ot]),(0,at.useEffect)(()=>{Ke&&(ct==null||ct.cancel())},[Ke]),(0,at.useEffect)(()=>{Xe.uploading&&ot.map(xt=>pe(void 0,null,function*(){var bt;if((!xt.status||xt.status==="error")&&!Ke){xt.status="uploading",xt.file.status="uploading";const Pt=yield rt(xt,{login:(bt=Ye==null?void 0:Ye.userInfo)==null?void 0:bt.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"))};Mn.ZP=(0,Ee.connect)(({loading:Be,globalSetting:Ge,user:Ye})=>({globalSetting:Ge,loading:Be.models.competitions,user:Ye}))(Me)},69720:function(_n,Mn,ft){"use strict";ft.d(Mn,{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,Ae=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,z=(xe,je,De)=>je in xe?ke(xe,je,{enumerable:!0,configurable:!0,writable:!0,value:De}):xe[je]=De,te=(xe,je)=>{for(var De in je||(je={}))be.call(je,De)&&z(xe,De,je[De]);if(me)for(var De of me(je))fe.call(je,De)&&z(xe,De,je[De]);return xe},se=(xe,je)=>Se(xe,Ae(je));const ie=Gt.default.Option,le={labelCol:{span:4},wrapperCol:{span:20}},he={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"]};Mn.Z=({callback:xe,onCancel:je})=>{const[De,Fe]=(0,at.useState)("python");function Te(Be){Fe(he[Be][1])}function Me(Be){xe(Be)}return at.createElement(oe.default,se(te({},le),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Me,style:{width:500}}),at.createElement(oe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},at.createElement(Gt.default,{getPopupContainer:Be=>Be.parentNode,onChange:Te},Object.keys(he).map(Be=>at.createElement(ie,{key:Be,value:Be},he[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:je},"\u53D6\u6D88")))};function pe({value:xe,onChange:je,mode:De,options:Fe={}}){const Te=(0,at.useRef)(),[Me,Be]=(0,at.useState)();return(0,at.useEffect)(()=>{if(Me){let Ge=function(Ye){const Ke=Ye.getValue();je&&je(Ke)};return Me.on("change",Ge),()=>{Me.off("change",Ge)}}},[Me,je]),(0,at.useEffect)(()=>{Me&&Me.setOption("mode",De)},[Me,De]),(0,at.useEffect)(()=>{Me&&(xe!==Me.getValue()||xe==="")&&setTimeout(()=>{Me.setValue(xe||"")},300)},[Me,xe]),(0,at.useEffect)(()=>{if(Te.current&&!Me){const 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,Me]),at.createElement("div",{className:"my-codemirror-container"},at.createElement("textarea",{ref:Te}))}},39793:function(_n,Mn,ft){"use strict";ft.d(Mn,{Z:function(){return Ar}});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),Ae=ft(76902),me=({value:Qt="",className:Zt,showTextOnly:Ut,showLines:Un,style:pr={}})=>{const mr=(0,at.useMemo)(()=>"",[Qt]);return at.createElement(at.Fragment,null,at.createElement("div",{dangerouslySetInnerHTML:{__html:mr}}))},be=ft(59301),fe=Object.defineProperty,z=Object.defineProperties,te=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,he=(Qt,Zt,Ut)=>Zt in Qt?fe(Qt,Zt,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):Qt[Zt]=Ut,pe=(Qt,Zt)=>{for(var Ut in Zt||(Zt={}))ie.call(Zt,Ut)&&he(Qt,Ut,Zt[Ut]);if(se)for(var Ut of se(Zt))le.call(Zt,Ut)&&he(Qt,Ut,Zt[Ut]);return Qt},xe=(Qt,Zt)=>z(Qt,te(Zt));let je=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function De({onActionCallback:Qt,title:Zt,icon:Ut,actionName:Un,className:pr="",children:mr}){function xn(){Qt(Un)}return be.createElement("a",{title:Zt,className:pr,onClick:xn},be.createElement("i",{className:`${Ut}`}),mr)}var Fe=({watch:Qt,showNullButton:Zt,showNullProgramButton:Ut,onActionCallback:Un,fullScreen:pr,insertTemp:mr,hidetoolBar:xn,extraUse:Yn})=>{const Hn=[...je,{title:`${Qt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Qt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return be.createElement("ul",{className:"markdown-toolbar-container"},!xn&&Hn.map((Qr,$r)=>be.createElement("li",{key:$r},Qr.actionName?be.createElement(De,xe(pe({},Qr),{onActionCallback:Un})):be.createElement("span",{className:"v-line"}))),Zt?be.createElement("li",null,be.createElement(De,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Un},be.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ut?be.createElement(be.Fragment,null,be.createElement("li",null,be.createElement(De,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Un},be.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),be.createElement("li",null,be.createElement(De,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Un},be.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,mr&&be.createElement("li",null,be.createElement(De,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${mr}`,onActionCallback:Un},be.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Yn&&be.createElement("li",null,Yn),be.createElement("li",{className:"btn-full-screen"},be.createElement(De,{icon:`${pr?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:pr?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Un})))},Te=ft(91558),Me=ft(28284),Be=ft(37568),Ge=ft(99571),Ye=Object.defineProperty,Ke=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,Ct=(Qt,Zt,Ut)=>Zt in Qt?Ye(Qt,Zt,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):Qt[Zt]=Ut,Je=(Qt,Zt)=>{for(var Ut in Zt||(Zt={}))lt.call(Zt,Ut)&&Ct(Qt,Ut,Zt[Ut]);if(ot)for(var Ut of ot(Zt))ct.call(Zt,Ut)&&Ct(Qt,Ut,Zt[Ut]);return Qt},rt=(Qt,Zt)=>Ke(Qt,Xe(Zt));const xt={labelCol:{span:4},wrapperCol:{span:20}};var bt=({callback:Qt,onCancel:Zt})=>{function Ut(Un){Qt(Un)}return at.createElement(Me.default,rt(Je({},xt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ut,style:{width:500}}),at.createElement(Me.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},at.createElement(Be.default,null)),at.createElement(Me.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},at.createElement(Be.default,null)),at.createElement("div",{className:"flex-container flex-end"},at.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),at.createElement(Ge.ZP,{type:"ghost",onClick:Zt},"\u53D6\u6D88")))},Pt=ft(69720),ht=ft(17077),St=ft(62957),mt=ft(77019),Nt=ft(9507),dt=ft(59301),Dt=({callback:Qt,onCancel:Zt})=>{const Ut=document.createElement("canvas"),Un=Ut.getContext("2d");Ut.width=1e3,Ut.height=800,Un.fillStyle="#ffffff",Un.fillRect(0,0,Ut.width,Ut.height);const pr=Ut.toDataURL("image/png");return dt.createElement(St.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},dt.createElement(mt.Z,{style:{height:"100vh"}},dt.createElement(Nt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:pr,visible:!0,title:String(Date.now())},onOk:mr=>{Qt({src:mr.url})},onClose:Zt})))},gt=ft(12378);function yt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(yt,go.CommandHandler),yt.prototype.canAlignSelection=function(){var Qt=this.diagram;return!(Qt===null||Qt.isReadOnly||Qt.isModelReadOnly||Qt.selection.count<2)},yt.prototype.alignLeft=function(){var Qt=this.diagram;Qt.startTransaction("aligning left");var Zt=1/0;Qt.selection.each(function(Ut){Ut instanceof go.Link||(Zt=Math.min(Ut.position.x,Zt))}),Qt.selection.each(function(Ut){Ut instanceof go.Link||Ut.move(new go.Point(Zt,Ut.position.y))}),Qt.commitTransaction("aligning left")},yt.prototype.alignRight=function(){var Qt=this.diagram;Qt.startTransaction("aligning right");var Zt=-1/0;Qt.selection.each(function(Ut){if(!(Ut instanceof go.Link)){var Un=Ut.actualBounds.x+Ut.actualBounds.width;Zt=Math.max(Un,Zt)}}),Qt.selection.each(function(Ut){Ut instanceof go.Link||Ut.move(new go.Point(Zt-Ut.actualBounds.width,Ut.position.y))}),Qt.commitTransaction("aligning right")},yt.prototype.alignTop=function(){var Qt=this.diagram;Qt.startTransaction("alignTop");var Zt=1/0;Qt.selection.each(function(Ut){Ut instanceof go.Link||(Zt=Math.min(Ut.position.y,Zt))}),Qt.selection.each(function(Ut){Ut instanceof go.Link||Ut.move(new go.Point(Ut.position.x,Zt))}),Qt.commitTransaction("alignTop")},yt.prototype.alignBottom=function(){var Qt=this.diagram;Qt.startTransaction("aligning bottom");var Zt=-1/0;Qt.selection.each(function(Ut){if(!(Ut instanceof go.Link)){var Un=Ut.actualBounds.y+Ut.actualBounds.height;Zt=Math.max(Un,Zt)}}),Qt.selection.each(function(Ut){Ut instanceof go.Link||Ut.move(new go.Point(Ut.actualBounds.x,Zt-Ut.actualBounds.height))}),Qt.commitTransaction("aligning bottom")},yt.prototype.alignCenterX=function(){var Qt=this.diagram,Zt=Qt.selection.first();if(Zt){Qt.startTransaction("aligning Center X");var Ut=Zt.actualBounds.x+Zt.actualBounds.width/2;Qt.selection.each(function(Un){Un instanceof go.Link||Un.move(new go.Point(Ut-Un.actualBounds.width/2,Un.actualBounds.y))}),Qt.commitTransaction("aligning Center X")}},yt.prototype.alignCenterY=function(){var Qt=this.diagram,Zt=Qt.selection.first();if(Zt){Qt.startTransaction("aligning Center Y");var Ut=Zt.actualBounds.y+Zt.actualBounds.height/2;Qt.selection.each(function(Un){Un instanceof go.Link||Un.move(new go.Point(Un.actualBounds.x,Ut-Un.actualBounds.height/2))}),Qt.commitTransaction("aligning Center Y")}},yt.prototype.alignColumn=function(Qt){var Zt=this.diagram;Zt.startTransaction("align Column"),Qt===void 0&&(Qt=0),Qt=parseFloat(Qt);var Ut=new Array;Zt.selection.each(function(Yn){Yn instanceof go.Link||Ut.push(Yn)});for(var Un=0;Un<Ut.length-1;Un++){var pr=Ut[Un],mr=pr.actualBounds.y+pr.actualBounds.height+Qt,xn=Ut[Un+1];xn.move(new go.Point(pr.actualBounds.x,mr))}Zt.commitTransaction("align Column")},yt.prototype.alignRow=function(Qt){Qt===void 0&&(Qt=0),Qt=parseFloat(Qt);var Zt=this.diagram;Zt.startTransaction("align Row");var Ut=new Array;Zt.selection.each(function(Yn){Yn instanceof go.Link||Ut.push(Yn)});for(var Un=0;Un<Ut.length-1;Un++){var pr=Ut[Un],mr=pr.actualBounds.x+pr.actualBounds.width+Qt,xn=Ut[Un+1];xn.move(new go.Point(mr,pr.actualBounds.y))}Zt.commitTransaction("align Row")},yt.prototype.canRotate=function(Qt){var Zt=this.diagram;return!(Zt===null||Zt.isReadOnly||Zt.isModelReadOnly||Zt.selection.count<1)},yt.prototype.rotate=function(Qt){Qt===void 0&&(Qt=90);var Zt=this.diagram;Zt.startTransaction("rotate "+Qt.toString());var Zt=this.diagram;Zt.selection.each(function(Ut){Ut instanceof go.Link||Ut instanceof go.Group||(Ut.angle+=Qt)}),Zt.commitTransaction("rotate "+Qt.toString())},yt.prototype.pullToFront=function(){var Qt=this.diagram;Qt.startTransaction("pullToFront");var Zt=new go.Map;Qt.selection.each(function(Ut){Zt.set(Ut.layer,0)}),Zt.iteratorKeys.each(function(Ut){var Un=0;Ut.parts.each(function(pr){if(!pr.isSelected){var mr=pr.zOrder;isNaN(mr)?pr.zOrder=0:Un=Math.max(Un,mr)}}),Zt.set(Ut,Un)}),Qt.selection.each(function(Ut){yt._assignZOrder(Ut,Zt.get(Ut.layer)+1)}),Qt.commitTransaction("pullToFront")},yt.prototype.pushToBack=function(){var Qt=this.diagram;Qt.startTransaction("pushToBack");var Zt=new go.Map;Qt.selection.each(function(Ut){Zt.set(Ut.layer,0)}),Zt.iteratorKeys.each(function(Ut){var Un=0;Ut.parts.each(function(pr){if(!pr.isSelected){var mr=pr.zOrder;isNaN(mr)?pr.zOrder=0:Un=Math.min(Un,mr)}}),Zt.set(Ut,Un)}),Qt.selection.each(function(Ut){yt._assignZOrder(Ut,Zt.get(Ut.layer)-1-yt._findGroupDepth(Ut))}),Qt.commitTransaction("pushToBack")},yt._assignZOrder=function(Qt,Zt,Ut){Ut===void 0&&(Ut=Qt),Qt.layer===Ut.layer&&(Qt.zOrder=Zt),Qt instanceof go.Group&&Qt.memberParts.each(function(Un){yt._assignZOrder(Un,Zt+1,Ut)})},yt._findGroupDepth=function(Qt){if(Qt instanceof go.Group){var Zt=0;return Qt.memberParts.each(function(Ut){Zt=Math.max(Zt,yt._findGroupDepth(Ut))}),Zt+1}else return 0},yt.prototype.doKeyDown=function(){var Qt=this.diagram;if(Qt!==null){var Zt=Qt.lastInput;if(Zt.key==="Up"||Zt.key==="Down"||Zt.key==="Left"||Zt.key==="Right"){var Ut=this.arrowKeyBehavior;if(Ut==="none")return;if(Ut==="select"){this._arrowKeySelect();return}else if(Ut==="move"){this._arrowKeyMove();return}else if(Ut==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},yt.prototype._getAllParts=function(){var Qt=new Array;return this.diagram.nodes.each(function(Zt){Qt.push(Zt)}),this.diagram.parts.each(function(Zt){Qt.push(Zt)}),Qt},yt.prototype._arrowKeyMove=function(){var Qt=this.diagram,Zt=Qt.lastInput,Ut=0,Un=0;if(Zt.control||Zt.meta)Ut=1,Un=1;else if(Qt.grid!==null){var pr=Qt.grid.gridCellSize;Un=pr.width,Ut=pr.height}Qt.startTransaction("arrowKeyMove"),Qt.selection.each(function(mr){Zt.key==="Up"?mr.move(new go.Point(mr.actualBounds.x,mr.actualBounds.y-Ut)):Zt.key==="Down"?mr.move(new go.Point(mr.actualBounds.x,mr.actualBounds.y+Ut)):Zt.key==="Left"?mr.move(new go.Point(mr.actualBounds.x-Un,mr.actualBounds.y)):Zt.key==="Right"&&mr.move(new go.Point(mr.actualBounds.x+Un,mr.actualBounds.y))}),Qt.commitTransaction("arrowKeyMove")},yt.prototype._arrowKeySelect=function(){var Qt=this.diagram,Zt=Qt.lastInput,Ut=null;Zt.key==="Up"?Ut=this._findNearestPartTowards(270):Zt.key==="Down"?Ut=this._findNearestPartTowards(90):Zt.key==="Left"?Ut=this._findNearestPartTowards(180):Zt.key==="Right"&&(Ut=this._findNearestPartTowards(0)),Ut!==null&&(Zt.shift?Ut.isSelected=!0:Zt.control||Zt.meta?Ut.isSelected=!Ut.isSelected:Qt.select(Ut))},yt.prototype._findNearestPartTowards=function(Qt){var Zt=this.diagram.selection.first();if(Zt===null)return null;for(var Ut=Zt.actualBounds.center,Un=this._getAllParts(),pr=1/0,mr=Zt,xn=0;xn<Un.length;xn++){var Yn=Un[xn];if(Yn!==Zt&&Yn.canSelect()){var Hn=Yn.actualBounds.center,Qr=Ut.directionPoint(Hn),$r=this._angleCloseness(Qr,Qt);if($r<=45){var Mt=Ut.distanceSquaredPoint(Hn);Mt*=1+Math.sin($r*Math.PI/180),Mt<pr&&(pr=Mt,mr=Yn)}}}return mr},yt.prototype._angleCloseness=function(Qt,Zt){return Math.min(Math.abs(Zt-Qt),Math.min(Math.abs(Zt+360-Qt),Math.abs(Zt-360-Qt)))},yt.prototype._arrowKeyTree=function(){var Qt=this.diagram,Zt=Qt.selection.first();if(Zt instanceof go.Node){var Ut=Qt.lastInput;if(Ut.key==="Right"){if(!Zt.isTreeLeaf)if(!Zt.isTreeExpanded)Qt.commandHandler.canExpandTree(Zt)&&Qt.commandHandler.expandTree(Zt);else{var Un=this._sortTreeChildrenByY(Zt).first();Un!==null&&Qt.select(Un)}}else if(Ut.key==="Left")if(!Zt.isTreeLeaf&&Zt.isTreeExpanded)Qt.commandHandler.canCollapseTree(Zt)&&Qt.commandHandler.collapseTree(Zt);else{var pr=Zt.findTreeParentNode();pr!==null&&Qt.select(pr)}else if(Ut.key==="Up"){var pr=Zt.findTreeParentNode();if(pr!==null){var mr=this._sortTreeChildrenByY(pr),xn=mr.indexOf(Zt);if(xn>0){for(var Yn=mr.elt(xn-1);Yn!==null&&Yn.isTreeExpanded&&!Yn.isTreeLeaf;){var Hn=this._sortTreeChildrenByY(Yn);Yn=Hn.last()}Yn!==null&&Qt.select(Yn)}else Qt.select(pr)}}else if(Ut.key==="Down")if(Zt.isTreeExpanded&&!Zt.isTreeLeaf){var Un=this._sortTreeChildrenByY(Zt).first();Un!==null&&Qt.select(Un)}else for(;Zt!==null;){var pr=Zt.findTreeParentNode();if(pr===null)break;var mr=this._sortTreeChildrenByY(pr),xn=mr.indexOf(Zt);if(xn<mr.length-1){Qt.select(mr.elt(xn+1));break}else Zt=pr}var Qr=Qt.selection.first();Qr!==null&&Qt.scrollToRect(Qr.actualBounds)}},yt.prototype._sortTreeChildrenByY=function(Qt){var Zt=new go.List().addAll(Qt.findTreeChildrenNodes());return Zt.sort(function(Ut,Un){var pr=Ut.location,mr=Un.location;return pr.y<mr.y?-1:pr.y>mr.y?1:pr.x<mr.x?-1:pr.x>mr.x?1:0}),Zt},yt.prototype.copyToClipboard=function(Qt){go.CommandHandler.prototype.copyToClipboard.call(this,Qt),this._lastPasteOffset.set(this.pasteOffset)},yt.prototype.pasteFromClipboard=function(){var Qt=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Qt,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Qt},Object.defineProperty(yt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Qt){if(Qt!=="move"&&Qt!=="select"&&Qt!=="scroll"&&Qt!=="tree"&&Qt!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Qt);this._arrowKeyBehavior=Qt}}),Object.defineProperty(yt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Qt){if(!(Qt instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Qt);this._pasteOffset.set(Qt)}});var tt=yt,He=ft(63720),we=ft(5269),Ne=ft(38986),Ve={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},nt=ft(48790),Re=ft(59301),_e=(Qt,Zt,Ut)=>new Promise((Un,pr)=>{var mr=Hn=>{try{Yn(Ut.next(Hn))}catch(Qr){pr(Qr)}},xn=Hn=>{try{Yn(Ut.throw(Hn))}catch(Qr){pr(Qr)}},Yn=Hn=>Hn.done?Un(Hn.value):Promise.resolve(Hn.value).then(mr,xn);Yn((Ut=Ut.apply(Qt,Zt)).next())});function Ze({onCancel:Qt,callback:Zt}){let Ut=(0,at.useRef)(),Un=(0,at.useRef)(),pr=(0,at.useRef)(),mr=(0,at.useRef)(!1);const xn=(0,at.useRef)(!1),[Yn,Hn]=(0,at.useState)(0);function Qr(){const Mt=gt.bx.make,Wt={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"};Ut.current=new gt.S0(Un.current,{padding:20,grid:Mt(gt.s_,"Grid",Mt(gt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Mt(gt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Xn=>{var rr=Xn.diagram.commandHandler.addTopLevelParts(Xn.diagram.selection,!0);rr||Xn.diagram.currentTool.doCancel()},commandHandler:Mt(tt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Xn=>{var rr=Xn.subject;rr.location=rr.location.copy().snapToGridPoint(Xn.diagram.grid.gridOrigin,Xn.diagram.grid.gridCellSize),setTimeout(()=>{Xn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Xn=>{var rr=Xn.subject;setTimeout(()=>{Xn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Xn=>{var rr=Xn.parameter.part;rr.invalidateConnectedLinks();var ir=Xn.subject;Xn.diagram.toolManager.linkingTool.isForwards?ir.toNode.invalidateConnectedLinks():ir.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ut.current.nodeTemplate=Mt(gt.NB,"Auto",{locationSpot:gt.z6.Center,locationObjectName:"SHAPE",desiredSize:new gt.$u(120,60),minSize:new gt.$u(40,40),resizable:!0,resizeCellSize:new gt.$u(10,10),rotatable:!0},new gt.KX("location","loc",gt.E9.parse).makeTwoWay(gt.E9.stringify),new gt.KX("desiredSize","size",gt.$u.parse).makeTwoWay(gt.$u.stringify),Mt(gt.bn,{name:"SHAPE",fill:Wt.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:gt.z6.AllSides,toSpot:gt.z6.AllSides},new gt.KX("figure"),new gt.KX("fill"),new gt.KX("stroke","borderColor"),new gt.KX("strokeWidth","thickness"),new gt.KX("strokeDashArray","dash")),Mt(gt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Mt(gt.al,{margin:1,textAlign:"center",overflow:gt.al.OverflowEllipsis,editable:!0},new gt.KX("text").makeTwoWay(),new gt.KX("stroke","color"))),Ut.current.nodeTemplate.toolTip=Mt("ToolTip",Mt(gt.s_,"Vertical",{maxSize:new gt.$u(200,NaN)},Mt(gt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new gt.KX("text")),Mt(gt.al,{font:"10pt sans-serif",textAlign:"center"},new gt.KX("text","details"))));function Fn(Xn,rr){var ir=(wr,Rr)=>{wr.handled=!0,wr.diagram.model.commit(Kr=>{var ii=Rr.part.adornedPart,oi=new gt.E9().setRectSpot(ii.actualBounds,Xn);oi.subtract(ii.location),oi.scale(2,2),oi.x+=Math.sign(oi.x)*130,oi.y+=Math.sign(oi.y)*130,oi.add(ii.location),oi.snapToGridPoint(wr.diagram.grid.gridOrigin,wr.diagram.grid.gridCellSize);var cr=Kr.copyNodeData(ii.data);Kr.setGroupKeyForNodeData(cr,Kr.getGroupKeyForNodeData(ii.data)),Kr.addNodeData(cr);var on={from:ii.key,to:Kr.getKeyForNodeData(cr)};Kr.addLinkData(on);var or=wr.diagram.findNodeForData(cr);or.location=oi,wr.diagram.select(or),setTimeout(()=>{wr.diagram.commandHandler.editTextBlock()},20)})};return Mt(gt.bn,{figure:rr,alignment:Xn,alignmentFocus:Xn.opposite(),width:Xn.equals(gt.z6.Top)||Xn.equals(gt.z6.Bottom)?25:18,height:Xn.equals(gt.z6.Top)||Xn.equals(gt.z6.Bottom)?18:25,fill:"orange",stroke:Wt.white,strokeWidth:4,mouseEnter:(wr,Rr)=>Rr.fill="dodgerblue",mouseLeave:(wr,Rr)=>Rr.fill="orange",isActionable:!0,click:ir,contextClick:ir})}function zn(Xn){return Mt(gt.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:(rr,ir)=>ir.fill="dodgerblue",mouseLeave:(rr,ir)=>ir.fill="orange",click:(rr,ir)=>{rr.diagram.commandHandler.showContextMenu(ir.part.adornedPart)}},Xn||{})}Ut.current.nodeTemplate.selectionAdornmentTemplate=Mt(gt.uz,"Spot",Mt(gt.Vm,{padding:10}),Fn(gt.z6.Top,"TriangleUp"),Fn(gt.z6.Left,"TriangleLeft"),Fn(gt.z6.Right,"TriangleRight"),Fn(gt.z6.Bottom,"TriangleDown"),zn({alignment:new gt.z6(.75,0)}));function tn(Xn,rr){return(ir,wr)=>{ir.handled=!0,ir.diagram.model.commit(Rr=>{Rr.set(wr.part.adornedPart.data,Xn,rr)})}}function Nn(Xn,rr){return rr||(rr="color"),Mt(gt.bn,{width:16,height:16,stroke:"lightgray",fill:Xn,margin:1,background:"transparent",mouseEnter:(ir,wr)=>wr.stroke="dodgerblue",mouseLeave:(ir,wr)=>wr.stroke="lightgray",click:tn(rr,Xn),contextClick:tn(rr,Xn)})}function jn(){return[Mt("ContextMenuButton",Mt(gt.s_,"Horizontal",Nn(Wt.white,"fill"),Nn(Wt.beige,"fill"),Nn(Wt.extralightblue,"fill"),Nn(Wt.extralightred,"fill"))),Mt("ContextMenuButton",Mt(gt.s_,"Horizontal",Nn(Wt.lightgray,"fill"),Nn(Wt.lightgreen,"fill"),Nn(Wt.lightblue,"fill"),Nn(Wt.lightred,"fill")))]}function Ln(){return[Mt("ContextMenuButton",Mt(gt.s_,"Horizontal",Nn(Wt.black),Nn(Wt.green),Nn(Wt.blue),Nn(Wt.red))),Mt("ContextMenuButton",Mt(gt.s_,"Horizontal",Nn(Wt.white),Nn(Wt.magenta),Nn(Wt.purple),Nn(Wt.orange)))]}function An(Xn,rr){return rr||(rr="thickness"),Mt(gt.bn,"LineH",{width:16,height:16,strokeWidth:Xn,margin:1,background:"transparent",mouseEnter:(ir,wr)=>wr.background="dodgerblue",mouseLeave:(ir,wr)=>wr.background="transparent",click:tn(rr,Xn),contextClick:tn(rr,Xn)})}function Kn(Xn,rr){return rr||(rr="dash"),Mt(gt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Xn,margin:1,background:"transparent",mouseEnter:(ir,wr)=>wr.background="dodgerblue",mouseLeave:(ir,wr)=>wr.background="transparent",click:tn(rr,Xn),contextClick:tn(rr,Xn)})}function Jn(){return[Mt("ContextMenuButton",Mt(gt.s_,"Horizontal",An(1),An(2),An(3),An(4))),Mt("ContextMenuButton",Mt(gt.s_,"Horizontal",Kn(null),Kn([2,4]),Kn([4,4])))]}function er(Xn,rr){return rr||(rr="figure"),Mt(gt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Xn,margin:1,background:"transparent",mouseEnter:(ir,wr)=>wr.fill="dodgerblue",mouseLeave:(ir,wr)=>wr.fill="lightgray",click:tn(rr,Xn),contextClick:tn(rr,Xn)})}Ut.current.nodeTemplate.contextMenu=Mt("ContextMenu",Mt("ContextMenuButton",Mt(gt.s_,"Horizontal",er("Rectangle"),er("RoundedRectangle"),er("Ellipse"),er("Diamond"))),Mt("ContextMenuButton",Mt(gt.s_,"Horizontal",er("Parallelogram2"),er("ManualOperation"),er("Procedure"),er("Cylinder1"))),Mt("ContextMenuButton",Mt(gt.s_,"Horizontal",er("Terminator"),er("CreateRequest"),er("Document"),er("TriangleDown"))),jn(),Ln(),Jn()),Ut.current.groupTemplate=Mt(gt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:gt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Xn,rr)=>{var ir=rr.addMembers(rr.diagram.selection,!0);ir||rr.diagram.currentTool.doCancel()},avoidable:!1},new gt.KX("location","loc",gt.E9.parse).makeTwoWay(gt.E9.stringify),Mt(gt.s_,"Auto",{name:"BODY"},Mt(gt.bn,{parameter1:10,fill:Wt.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:gt.z6.AllSides,toSpot:gt.z6.AllSides},new gt.KX("fill"),new gt.KX("stroke","color"),new gt.KX("strokeWidth","thickness"),new gt.KX("strokeDashArray","dash")),Mt(gt.Vm,{background:"transparent",margin:20})),Mt(gt.al,{alignment:gt.z6.Top,alignmentFocus:gt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new gt.KX("text"),new gt.KX("stroke","color"))),Ut.current.groupTemplate.selectionAdornmentTemplate=Mt(gt.uz,"Spot",Mt(gt.s_,"Auto",Mt(gt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Mt(gt.Vm,{margin:1.5})),zn({alignment:gt.z6.TopRight,alignmentFocus:gt.z6.BottomRight})),Ut.current.groupTemplate.contextMenu=Mt("ContextMenu",jn(),Ln(),Jn()),Ut.current.linkTemplate=Mt(gt.rU,{layerName:"Foreground",routing:gt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new gt.KX("fromSpot","fromSpot",gt.z6.parse),new gt.KX("toSpot","toSpot",gt.z6.parse),new gt.KX("fromShortLength","dir",Xn=>Xn>=1?10:0),new gt.KX("toShortLength","dir",Xn=>Xn>=1?10:0),new gt.KX("points").makeTwoWay(),Mt(gt.bn,{strokeWidth:2},new gt.KX("stroke","color"),new gt.KX("strokeWidth","thickness"),new gt.KX("strokeDashArray","dash")),Mt(gt.bn,{segmentIndex:0,segmentOffset:new gt.E9(15,0),segmentOrientation:gt.rU.OrientAlong,alignmentFocus:gt.z6.Right,figure:"circle",width:10,strokeWidth:0},new gt.KX("fill","color"),new gt.KX("visible","dir",Xn=>Xn===1)),Mt(gt.bn,{segmentIndex:-1,segmentOffset:new gt.E9(-10,6),segmentOrientation:gt.rU.OrientPlus90,alignmentFocus:gt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new gt.KX("fill","color"),new gt.KX("visible","dir",Xn=>Xn>=1),new gt.KX("width","thickness",Xn=>7+3*Xn),new gt.KX("height","thickness",Xn=>7+3*Xn),new gt.KX("segmentOffset","thickness",Xn=>new gt.E9(-15,4+1.5*Xn))),Mt(gt.bn,{segmentIndex:0,segmentOffset:new gt.E9(15,-6),segmentOrientation:gt.rU.OrientMinus90,alignmentFocus:gt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new gt.KX("fill","color"),new gt.KX("visible","dir",Xn=>Xn===2),new gt.KX("width","thickness",Xn=>7+3*Xn),new gt.KX("height","thickness",Xn=>7+3*Xn),new gt.KX("segmentOffset","thickness",Xn=>new gt.E9(-15,4+1.5*Xn))),Mt(gt.al,{alignmentFocus:new gt.z6(0,1,-4,0),editable:!0},new gt.KX("text").makeTwoWay(),new gt.KX("stroke","color"))),Ut.current.linkTemplate.selectionAdornmentTemplate=Mt(gt.uz,Mt(gt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Wr(2)},new gt.KX("pathPattern","thickness",Wr)),zn({alignmentFocus:new gt.z6(0,0,-6,-4)}));function Wr(Xn){return Mt(gt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Xn+4).toString()+" H3"})}function Cr(Xn){var rr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Xn===0?rr="M0 0 M16 16 M0 8 L16 8":Xn===2&&(rr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Mt(gt.bn,{geometryString:rr,margin:2,background:"transparent",mouseEnter:(ir,wr)=>wr.background="dodgerblue",mouseLeave:(ir,wr)=>wr.background="transparent",click:tn("dir",Xn),contextClick:tn("dir",Xn)})}function Tr(Xn){var rr=(ir,wr)=>{ir.handled=!0,ir.diagram.model.commit(Rr=>{var Kr=wr.part.adornedPart;Rr.set(Kr.data,Xn?"toSpot":"fromSpot",gt.z6.stringify(gt.z6.AllSides)),(Xn?Kr.toNode:Kr.fromNode).invalidateConnectedLinks()})};return Mt(gt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(ir,wr)=>wr.background="dodgerblue",mouseLeave:(ir,wr)=>wr.background="transparent",click:rr,contextClick:rr})}function ln(Xn,rr){var ir=0,wr=gt.z6.RightSide;Xn.equals(gt.z6.Top)?(ir=270,wr=gt.z6.TopSide):Xn.equals(gt.z6.Left)?(ir=180,wr=gt.z6.LeftSide):Xn.equals(gt.z6.Bottom)&&(ir=90,wr=gt.z6.BottomSide),rr||(ir-=180);var Rr=(Kr,ii)=>{Kr.handled=!0,Kr.diagram.model.commit(oi=>{var cr=ii.part.adornedPart;oi.set(cr.data,rr?"toSpot":"fromSpot",gt.z6.stringify(wr)),(rr?cr.toNode:cr.fromNode).invalidateConnectedLinks()})};return Mt(gt.bn,{alignment:Xn,alignmentFocus:Xn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:ir,background:"transparent",mouseEnter:(Kr,ii)=>ii.background="dodgerblue",mouseLeave:(Kr,ii)=>ii.background="transparent",click:Rr,contextClick:Rr})}Ut.current.linkTemplate.contextMenu=Mt("ContextMenu",Ln(),Jn(),Mt("ContextMenuButton",Mt(gt.s_,"Horizontal",Cr(0),Cr(1),Cr(2))),Mt("ContextMenuButton",Mt(gt.s_,"Horizontal",Mt(gt.s_,"Spot",Tr(!1),ln(gt.z6.Top,!1),ln(gt.z6.Left,!1),ln(gt.z6.Right,!1),ln(gt.z6.Bottom,!1)),Mt(gt.s_,"Spot",{margin:new gt.Zt(0,0,0,2)},Tr(!0),ln(gt.z6.Top,!0),ln(gt.z6.Left,!0),ln(gt.z6.Right,!0),ln(gt.z6.Bottom,!0)))));const ri=`{ "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 di=["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 _i(Xn){return console.log("shapeName:",Xn),di.indexOf(Xn)>=0}var pn=new gt.YI(pr.current,{maxSelectionCount:1,linkTemplate:Mt(gt.rU,{locationSpot:gt.z6.Center,selectionAdornmentTemplate:Mt(gt.uz,"Link",{locationSpot:gt.z6.Center},Mt(gt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Mt(gt.bn,{toArrow:"Standard",stroke:null}))},{routing:gt.rU.AvoidsNodes,curve:gt.rU.JumpOver,corner:5,toShortLength:4},new gt.KX("points"),Mt(gt.bn,{isPanelMain:!0,strokeWidth:2}),Mt(gt.bn,{toArrow:"Standard",stroke:null})),model:new gt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...gt.bn.getFigureGenerators().toArray().map(Xn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Xn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ut.current.addDiagramListener("TextEdited",function(Xn){var rr;const ir=Xn.subject.part;var wr=(rr=document.activeElement)==null?void 0:rr.value;typeof wr=="string"&&wr.trim()===""&&Ut.current.model.commit(function(Rr){Rr.set(ir.data,"text","\u672A\u547D\u540D"),Ut.current.commandHandler.stopCommand()},"increment")}),pn.nodeTemplate=Mt(gt.NB,"Auto",{locationSpot:gt.z6.Center},new gt.KX("location","location",gt.E9.parse).makeTwoWay(gt.E9.stringify),Mt(gt.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 gt.KX("stroke").makeTwoWay(),new gt.KX("fill").makeTwoWay(),new gt.KX("figure")),Mt(gt.al,{margin:new gt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new gt.$u(16,16),maxSize:new gt.$u(10,NaN),textAlign:"center",editable:!0},new gt.KX("key").makeTwoWay())),setTimeout(()=>{Ut.current.grid=Mt(gt.s_,"Grid",Mt(gt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Mt(gt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ut.current.grid.visible=!0,Ut.current.grid.gridCellStroke="darkgray",Ut.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ut.current,Ut.current}const $r=()=>_e(this,null,function*(){var Mt,Wt=Ut.current.makeImage();const Fn=yield(0,Ne.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Wt.src,file_data:JSON.stringify({login:(Mt=(0,nt.eY)())==null?void 0:Mt.login,data:JSON.parse(Ut.current.model.toJson())})}});Zt({src:Fn.url})});return(0,at.useEffect)(()=>(setTimeout(()=>{Qr()},500),Hn(Yn+1),()=>{Ut.current=null}),[]),Re.createElement("div",{ref:xn,className:"body-overflow-initial"},Re.createElement(St.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Yn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Re.createElement(mt.Z,null,Re.createElement(we.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Re.createElement(we.Z,{onClick:()=>{var Mt,Wt,Fn=Ut.current.selection.first();if(mr.current=!mr.current,document.activeElement&&Fn){let zn=(Wt=(Mt=document.activeElement)==null?void 0:Mt.value)==null?void 0:Wt.trim();typeof zn=="string"&&Ut.current.model.commit(function(tn){tn.set(Fn.data,"text",zn||"\u672A\u547D\u540D"),Ut.current.commandHandler.stopCommand()},"increment")}Hn(Yn+1)}},Re.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Qt},Re.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:mr.current?"none":"block"},className:Ve.flowChartWrp},Re.createElement("div",{style:{display:"flex",height:"100%"}},Re.createElement("div",{style:{width:"300px",height:"100%"}},Re.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Re.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ve.myPaletteDiv,ref:pr})),Re.createElement("div",{style:{flex:1,position:"relative"}},Re.createElement("div",{ref:Un,style:{height:"80vh"}}))),Re.createElement("div",{className:"tr"},Re.createElement(Ge.ZP,{size:"large",onClick:$r,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var qe=Ze,ut=ft(47889),vt=ft(71051);const At=ut.ZP.Group,Et={margin:"0 8px"};var Ft=({callback:Qt,onCancel:Zt})=>{function Ut(Un){Qt(Un)}return at.createElement(Me.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ut},at.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},at.createElement("span",{style:Et},"\u5355\u5143\u683C\u6570\uFF1A"),at.createElement("span",{style:Et},"\u884C\u6570"),at.createElement(Me.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},at.createElement(vt.Z,null)),at.createElement("span",{style:Et},"\u5217\u6570"),at.createElement(Me.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},at.createElement(vt.Z,null))),at.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},at.createElement("span",{style:Et},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),at.createElement(Me.default.Item,{name:"align"},at.createElement(At,null,at.createElement(ut.ZP,{value:"default"},at.createElement("i",{className:"fa fa-align-justify"})),at.createElement(ut.ZP,{value:"left"},at.createElement("i",{className:"fa fa-align-left"})),at.createElement(ut.ZP,{value:"center"},at.createElement("i",{className:"fa fa-align-center"})),at.createElement(ut.ZP,{value:"right"},at.createElement("i",{className:"fa fa-align-right"}))))),at.createElement("div",{className:"flex-container flex-end"},at.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),at.createElement(Ge.ZP,{type:"ghost",onClick:Zt},"\u53D6\u6D88")))},Kt=ft(71411),Yt=ft(43001),Vt=ft.n(Yt),sn=(0,at.forwardRef)(({use3d:Qt,width:Zt,height:Ut,callback:Un,showSaveButton:pr},mr)=>{const xn=(0,at.useRef)(),Yn=(0,at.useRef)(),[Hn,Qr]=(0,at.useState)(!1),$r=(0,at.useRef)({id:xn,appName:"graphing",width:Zt||1e3,height:Ut||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)(()=>{Yn.current=new(Vt())($r.current,!0),window.onload=function(){Yn.current.inject("applet_container")}},[]);const Mt=()=>{var Wt=window.ggbApplet.getPNGBase64(1,!0,72);return Un&&Un(Wt),Wt};return(0,at.useEffect)(()=>{$r.current.appName=Hn?"3D":"graphing",Yn.current.inject("applet_container")},[Hn]),(0,at.useEffect)(()=>{Qr(Qt)},[Qt]),(0,at.useImperativeHandle)(mr,()=>({getImgData:Mt})),at.createElement(at.Fragment,null,at.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:xn}),at.createElement(mt.Z,{align:"middle"},at.createElement(we.Z,{flex:1},at.createElement(Kt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Hn,onChange:Wt=>Qr(Wt)})),at.createElement(we.Z,null,at.createElement(Ge.ZP,{size:"large",onClick:Mt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),rn=ft(76562),un=ft(6767);const Sn="link",vn="upload-image",Cn="add-flowchart",On="draw-image",Dr="add-flowchart",Sr="code-block",qr="add-table",tr="------------",ai={default:tr,left:`:${tr}`,center:`:${tr}:`,right:`${tr}:`};var gi=ft(37808);function fi(){}let Di=0;const ki=1e4,Jr="\u2581",Li="@\u2581\u2581@",et="@\u2581@",Mr=`
|
|
**\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`,Er=["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 En(Qt){return/^\d+$/.test(Qt)?`${Qt}px`:Qt}const Dn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Pr={[Dn+"-B"]:"bold",[Dn+"-I"]:"italic"},Br={[Sn]:"\u6DFB\u52A0\u94FE\u63A5",[Sr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[vn]:"\u6DFB\u52A0\u56FE\u7247",[On]:"\u6DFB\u52A0\u753B\u56FE",[Cn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[qr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Ar=({defaultValue:Qt="",onChange:Zt,width:Ut="100%",height:Un=400,miniToolbar:pr=!1,isFocus:mr=!1,watch:xn,insertTemp:Yn,mode:Hn="markdown",id:Qr="markdown-editor-id",showResizeBar:$r=!1,noStorage:Mt=!1,showNullButton:Wt=!1,showNullProgramButton:Fn=!1,hidetoolBar:zn=!1,fullScreen:tn=!1,onBlur:Nn,onCMBeforeChange:jn,onFullScreen:Ln,className:An="",disablePaste:Kn=!1,disabled:Jn=!1,disabledFill:er=!1,placeholder:Wr="",values:Cr="",extraUse:Tr})=>{const[ln,ri]=(0,at.useState)(null),[di,_i]=(0,at.useState)(Qt),[pn,Xn]=(0,at.useState)(xn),[rr,ir]=(0,at.useState)(tn),[wr,Rr]=(0,at.useState)(""),[Kr,ii]=(0,at.useState)(0),[oi,cr]=(0,at.useState)(Un),[on,or]=(0,at.useState)(!1),[an,gr]=(0,at.useState)(0),[Vr,ti]=(0,at.useState)(0),Ni=(0,at.useRef)(),hi=(0,at.useRef)(),Zr=(0,at.useRef)(),Ui=(0,at.useRef)();(0,at.useEffect)(()=>{const sr=window.scrollY||window.pageYOffset;_i(Cr),ln==null||ln.setValue(Cr),window.scrollTo(0,sr)},[Cr]),(0,at.useEffect)(()=>{Ln==null||Ln(rr)},[rr]),(0,at.useEffect)(()=>{if(Ni.current){let sr=function(cn,vr){var Nr;if(Kn){vr.preventDefault();return}const si=vr.clipboardData;if(si){const Ur=si.types.toString(),Ti=si.items;if(Ur==="Files"||si.types.indexOf("Files")>-1){if(vr.preventDefault(),Hn=="stex")return;try{let Ei=Ti[1];((Nr=Ti[0])==null?void 0:Nr.kind)==="file"&&(Ei=Ti[0]);const bi=Ei.getAsFile(),Ai=bi.name.split(".").pop();(0,ht.I)(bi,ji=>{var $i,qt,Mi;ji.id?(($i=bi==null?void 0:bi.type)==null?void 0:$i.indexOf("image"))>-1?Qn.replaceSelection(`<img width="100%" src="/api/attachments/${ji.id}?type=${ji.content_type})" alt="" />`):((qt=bi==null?void 0:bi.type)==null?void 0:qt.indexOf("video"))>-1?Qn.replaceSelection(`<video width="100%" controls src="/api/attachments/${ji.id}"></video>`):((Mi=bi==null?void 0:bi.type)==null?void 0:Mi.indexOf("pdf"))>-1?Qn.replaceSelection(`<a href="/api/attachments/${ji.id}?type=${bi.type}&disposition=inline" target="_blank">${bi.name}</a>`):Er.includes(Ai)?Qn.replaceSelection(`<a href="/api/attachments/${ji.id}?type=office&disposition=inline" target="_blank">${bi.name}</a>`):Qn.replaceSelection(`[${bi.name}](/api/attachments/${ji.id}?type=${ji.content_type})`):(ji==null?void 0:ji.status)===401&&(document.location.href="/user/login")})}catch(Ei){un.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Qn=oe().fromTextArea(Ni.current,{mode:Hn,lineNumbers:!pr,lineWrapping:!0,value:Qt,autoCloseTags:!0,autoCloseBrackets:!0});return Qn.on("keyup",function(cn,vr){vr.keyCode===8&&(cn.getValue()==""?Qn.setOption("placeholder",Wr):Qn.setOption("placeholder",null))}),Qn.on("keydown",function(cn,vr){if(vr.keyCode===8){var Nr=fn(cn);Nr&&vr.preventDefault()}}),mr&&Qn.focus(),Qn.on("paste",sr),Jn&&Qn.on("beforeChange",function(cn,vr){(vr.origin==="paste"||vr.origin==="+input")&&vr.cancel()}),ri(Qn),()=>{Qn.off("paste",sr)}}},[]);const en=(0,at.useCallback)(()=>{if(hi.current)try{}catch(sr){console.log(sr,"---- to set md editor body height")}},[oi,hi,rr]);(0,at.useEffect)(()=>{function sr(){let Qn=new Ue.Z(cn=>{for(let vr of cn)(vr.target.offsetHeight>0||vr.target.offsetWidth>0)&&(en(),ln.setSize("100%","100%"),ln.refresh())});return Qn.observe(Ni.current.parentElement),Qn}if(ln){const Qn=sr();return()=>{var cn,vr;(cn=Ni.current)!=null&&cn.parentElement&&Qn.unobserve((vr=Ni.current)==null?void 0:vr.parentElement)}}},[ln,en]),(0,at.useEffect)(()=>{if(ln){let sr=[];for(const[Qn,cn]of Object.entries(Pr)){let vr={[Qn]:()=>{$t(cn)}};sr.push(vr),ln.addKeyMap(vr)}return()=>{for(let Qn of sr)ln.removeKeyMap(Qn)}}},[ln]),(0,at.useEffect)(()=>{tn!==rr&&ir(tn)},[tn]),(0,gi.Z)(()=>{if(!Mt&&Kr>0){let sr=new Date().getTime(),Qn=window.sessionStorage.getItem(Qr);sr>=Kr+ki&&(!Qn||Qn!==di)&&(window.sessionStorage.setItem(Qr,di),or(!0))}},ki),(0,at.useEffect)(()=>{Xn(xn)},[ln,xn]),(0,at.useEffect)(()=>{ln&&mr&&ln.focus()},[ln,mr]),(0,at.useEffect)(()=>{if(pn&&ln){let sr=function(cn){let vr=cn.target;if(Ui.current){let Nr=vr.scrollTop/vr.scrollHeight;Ui.current.scrollTop=Ui.current.scrollHeight*Nr}};const Qn=ln.getScrollerElement();return Qn.addEventListener("scroll",sr),()=>{Qn.removeEventListener("scroll",sr)}}},[ln,pn]),(0,at.useEffect)(()=>{if(ln&&jn){let sr=function(Qn,cn){jn(Qn,cn)};return ln.on("beforeChange",sr),()=>{ln.off("beforeChange",sr)}}},[ln,jn]),(0,at.useEffect)(()=>{if(ln&&Nn){let sr=function(){Nn(ln.getValue())};return ln.on("blur",sr),()=>{ln.off("blur",sr)}}},[ln,Nn]);function fn(sr,Qn){var cn=sr.getDoc(),vr=cn.getCursor(),Nr=cn.getLine(vr.line),si=Nr.charAt(vr.ch-1),Ur=Nr.lastIndexOf("@\u2581@",vr.ch),Ti=Nr.lastIndexOf("@\u2581\u2581@",vr.ch),Ei=Ur>Ti?Ur:Ti,bi=Ur>Ti?3:4;if(Li.indexOf(si)===-1)return null;if(console.log("change1:",Qn,sr,Nr,vr,Ei,Ur,Ti,si),Ei>=0&&vr.ch-Ei<5){var Ai=Ei+bi;return cn.replaceRange("",{line:vr.line,ch:Ei},{line:vr.line,ch:Ai}),{line:vr.line,ch:Ai}}return null}(0,at.useEffect)(()=>{if(ln){let sr=function(Qn,cn){const vr=Qn.getValue();_i(vr),ii(new Date().getTime()),Qn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Zt&&(Fn?Zt(vr,Rn(vr)):Zt(vr))};return ln.on("change",sr),()=>{ln.off("change",sr)}}},[ln,Zt]),(0,at.useEffect)(()=>{if(ln)if(Qt==null)ln.setValue(""),_i("");else{const sr=window.scrollY||window.pageYOffset;Qt!==ln.getValue()&&(ln.setValue(Qt),_i(Qt),ln.setCursor(Jn?1:ln.lineCount(),0),window.scrollTo(0,sr))}},[ln,Qt]);const $t=(0,at.useCallback)(sr=>{const Qn=ln.getCursor(),cn=ln.getSelection();let vr=cn.split(`
|
|
`);switch(sr){case"bold":return ln.replaceSelection("**"+cn+"**"),cn===""&&ln.setCursor(Qn.line,Qn.ch+2),ln.focus();case"italic":return ln.replaceSelection("*"+cn+"*"),cn===""&&ln.setCursor(Qn.line,Qn.ch+1),ln.focus();case"code":return ln.replaceSelection("`"+cn+"`"),cn===""&&ln.setCursor(Qn.line,Qn.ch+1),ln.focus();case"inline-latex":return Rr("inline-latex"),ln.focus();case"latex":return ln.replaceSelection("```latex\n"+cn+"\n```"),ln.setCursor(Qn.line+1,cn.length+1),ln.focus();case"line-break":return ln.replaceSelection(`<br/>
|
|
`),ln.focus();case"list-ul":return cn===""?ln.replaceSelection("- "+cn):ln.replaceSelection(vr.map(Nr=>Nr===""?"":`- ${Nr}`).join(`
|
|
`)),ln.focus();case"list-ol":return cn===""?ln.replaceSelection("1. "+cn):ln.replaceSelection(vr.map((Nr,si)=>Nr===""?"":`${si+1}. ${Nr}`).join(`
|
|
`)),ln.focus();case"add-null-ch":return cn===""&&ln.setCursor(Qn.line,Qn.ch),ln.replaceSelection(Jr),ln.focus();case"add-signal":return cn===""&&ln.setCursor(Qn.line,Qn.ch),ln.replaceSelection(et),ln.focus();case"add-multiple":return cn===""&&ln.setCursor(Qn.line,Qn.ch),ln.replaceSelection(Li),ln.focus();case"inster-template-1":return cn===""&&ln.setCursor(Qn.line,Qn.ch),ln.replaceSelection(Mr),ln.focus();case"eraser":return ln.setValue(""),ln.focus();case"trigger-watch":return Xn(!pn),ln.focus();case"trigger-full-screen":return ir(!rr),ln.focus();case Sn:Rr(Sn);return;case Sr:Rr(Sr);return;case vn:Rr(vn);return;case On:Rr(On);return;case"maths-latex":Rr("maths-latex");return;case Cn:Rr(Cn);return;case qr:Rr(qr);return;default:throw new Error}},[ln,pn,rr]),st=(0,at.useCallback)((sr,Qn)=>{var cn,vr,Nr,si,Ur,Ti;switch(Rr(""),wr){case Sn:const{title:$i,link:qt}=sr;return ln.replaceSelection(`[${$i}](${qt})`),ln.focus();case Sr:const{language:Mi,content:Pi}=sr;return ln.replaceSelection(["```"+Mi,Pi,"```"].join(`
|
|
`)),ln.focus();case"maths-latex":for(var Ei=atob(sr),bi=new Uint8Array(Ei.length),Ai=0;Ai<Ei.length;Ai++)bi[Ai]=Ei.charCodeAt(Ai);var ji=new Blob([bi],{type:"image/png"});(0,ht.I)(ji,Ao=>{Ao.id?ln.replaceSelection(``):(Ao==null?void 0:Ao.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":ln.replaceSelection("`$$"+sr+"$$`");break;case vn:case On:case Dr:const{src:Xr,alt:mi}=sr,ei=Qn,Hi=(Nr=(vr=(cn=ei==null?void 0:ei.name)==null?void 0:cn.split("."))==null?void 0:vr.pop)==null?void 0:Nr.call(vr);return((si=ei==null?void 0:ei.type)==null?void 0:si.indexOf("image"))>-1||!(ei!=null&&ei.type)?ei!=null&&ei.align||ei!=null&&ei.width?ln.replaceSelection(`<p style="text-align:${ei.align||"initial"}"><img width="${ei.width?ei.width+"%":"initial"}" src="${Xr}" alt="${mi||""}" /></p>`):ln.replaceSelection(`<img width="100%" src="${Xr}" alt="${mi||""}" />`):((Ur=ei==null?void 0:ei.type)==null?void 0:Ur.indexOf("video"))>-1?ln.replaceSelection(`<video width="100%" controls src="${Xr}"></video>`):((Ti=ei==null?void 0:ei.type)==null?void 0:Ti.indexOf("pdf"))>-1?ln.replaceSelection(`<a href="${Xr}?type=${ei.type}&disposition=inline" target="_blank">${ei.name}</a>`):Er.includes(Hi)?ln.replaceSelection(`<a href="${Xr}?type=office&disposition=inline" target="_blank">${ei.name}</a>`):ln.replaceSelection(`[${ei.name}](${Xr})`),ln.focus();case qr:const{row:Gi,col:ci,align:to}=sr;let pa=`
|
|
`;for(let Ao=0;Ao<Gi;Ao++){let bs=[],wa=[];for(let Ir=0;Ir<ci;Ir++)Ao===1&&wa.push(ai[to]),bs.push(" ");Ao===1&&(pa+=`| ${wa.join(" | ")} |
|
|
`),pa+=`| ${bs.join(ci===1?"":" | ")} |
|
|
`}return ln.replaceSelection(pa+`
|
|
`),ln.focus();default:throw new Error}},[ln,wr]),Bn=(0,at.useMemo)(()=>{switch(wr){case Sn:return at.createElement(bt,{callback:st,onCancel:Gn});case Sr:return at.createElement(Pt.Z,{callback:st,onCancel:Gn});case vn:return at.createElement(ht.Z,{callback:st,onCancel:Gn});case Cn:return at.createElement(qe,{callback:st,onCancel:Gn});case qr:return at.createElement(Ft,{callback:st,onCancel:Gn});case"maths-latex":return at.createElement(sn,{showSaveButton:!0,callback:st});case"inline-latex":return at.createElement(rn.Z,{showSaveButton:!0,callback:st});default:return null}},[wr]);function Gn(){Rr("")}(0,at.useEffect)(()=>{if(Zr.current){let sr=function(Ur){Nr=!0,si=Ur.pageY},Qn=function(){Nr=!1},cn=function(Ur){if(Nr){let Ti=Ur.pageY-si;Ti<0&&(Ti=0),Ti>300&&(Ti=300);let Ei=Un+Ti+"px";cr(Ei)}},vr=Zr.current,Nr=!1,si=0;return vr.addEventListener("mousedown",sr),document.addEventListener("mousemove",cn),document.addEventListener("mouseup",Qn),()=>{vr.removeEventListener("mousedown",sr),document.removeEventListener("mousemove",cn),document.removeEventListener("mouseup",Qn)}}},[ln,Zr]),(0,at.useEffect)(()=>{cr(Un)},[Un]);const fr=En(Ut),ur=En(oi),qn={width:fr,height:ur},gn=(0,at.useMemo)(()=>{if(Kr){let sr=new Date(Kr),Qn=sr.getHours(),cn=sr.getMinutes(),vr=sr.getSeconds();return Qn=Qn<10?"0"+Qn:Qn,cn=cn<10?"0"+cn:cn,vr=vr<10?"0"+vr:vr,`${Qn}:${cn}:${vr}`}return 0},[Kr]),Rn=sr=>{const Qn=[];if(Fn){let cn=-1;sr=sr.replace(/(@▁▁@|@▁@)/g,function(vr,Nr,si){Qn.push({multiLine:vr!==et})})}return Qn};function Vn(){window.sessionStorage.removeItem(Qr),or(!1),ii(0)}function kn(){or(!1),ii(0),ln.setValue(window.sessionStorage.getItem(Qr))}(0,at.useEffect)(()=>{Br[wr]&&wr!==On&&wr!==Cn&&setTimeout(()=>{const sr=document.getElementsByClassName("markdown-popup-form")[0],Qn=window.innerWidth/2-sr.offsetWidth/2,cn=window.innerHeight/2-sr.offsetHeight/2;gr(Qn),ti(cn)},0)},[wr]);const Zn=sr=>{sr.preventDefault();const Qn=sr.clientX-an,cn=sr.clientY-Vr;document.body.onmousemove=vr=>{let Nr=vr.clientX-Qn,si=vr.clientY-cn;const Ur=document.getElementsByClassName("markdown-popup-form")[0],Ti=window.innerWidth-Ur.offsetWidth,Ei=window.innerHeight-Ur.offsetHeight;Nr=Math.max(0,Math.min(Nr,Ti)),si=Math.max(0,Math.min(si,Ei)),xr(vr.clientX,vr.clientY,Qn,cn)&&(gr(Nr),ti(si))},document.body.onmouseup=function(){document.body.onmousemove=null}},xr=(sr,Qn,cn,vr)=>{const Nr=document.body.clientHeight,si=document.body.clientWidth;return sr<20&&cn>sr||sr>si-20&&cn<sr||Qn<20&&vr>Qn||Qn>Nr-20&&vr<Qn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return at.createElement(at.Fragment,null,at.createElement("div",{className:"markdown-editor-wrapper",ref:hi},at.createElement("div",{className:`markdown-editor-container ${An} ${pn?"on-preview":""} ${pr?"mini":""} ${rr?"full-screen":""}`,style:qn},at.createElement(Fe,{insertTemp:Yn,watch:pn,fullScreen:rr,showNullButton:Wt,showNullProgramButton:Fn,onActionCallback:$t,hidetoolBar:zn,extraUse:Tr}),at.createElement("div",{className:"markdown-editor-body"},at.createElement("div",{className:"codemirror-container"},at.createElement("textarea",{ref:Ni,placeholder:Wr})),pn?at.createElement("div",{ref:Ui,className:"preview-container"},Hn==="stex"&&at.createElement(me,{value:di}),Hn!=="stex"&&at.createElement(Ae.Z,{disabledFill:er,showProgramFill:Fn,value:di})):null))),$r?at.createElement("a",{ref:Zr,className:"editor-resize"}):null,wr===On&&at.createElement(Dt,{callback:st,onCancel:Gn}),wr===Cn&&at.createElement(qe,{callback:st,onCancel:Gn}),at.createElement(Te.Z,null,Br[wr]&&wr!==On&&wr!==Cn?at.createElement(St.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:an,top:Vr},title:at.createElement("div",{style:{cursor:"move"},onMouseDown:Zn},Br[wr]),open:!0,onCancel:Gn,footer:null,destroyOnClose:!0,width:wr===Cn?"1200px":null,height:wr===Cn?"80vh":null,className:"markdown-popup-form"},Bn):null))}},17077:function(_n,Mn,ft){"use strict";ft.d(Mn,{Z:function(){return je},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),Ae=Object.defineProperty,me=Object.defineProperties,be=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,se=(Te,Me,Be)=>Me in Te?Ae(Te,Me,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Te[Me]=Be,ie=(Te,Me)=>{for(var Be in Me||(Me={}))z.call(Me,Be)&&se(Te,Be,Me[Be]);if(fe)for(var Be of fe(Me))te.call(Me,Be)&&se(Te,Be,Me[Be]);return Te},le=(Te,Me)=>me(Te,be(Me));const{useForm:he}=at.default,pe={width:280,marginRight:10},xe={labelCol:{span:5},wrapperCol:{span:19}};var je=({callback:Te,onCancel:Me})=>{const[Be]=he();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:Me},"\u53D6\u6D88"))))};function De({onFileChange:Te}){return Se.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Se.createElement("input",{type:"file",onChange:Te}))}function Fe(Te,Me){if(!Te)throw new String("\u6CA1\u6709\u6587\u4EF6");let Be=new FormData;Be.append("editormd-image-file",Te),Be.append("file_param_name","editormd-image-file"),Be.append("byxhr","true");var Ge=new window.XMLHttpRequest;Ge.withCredentials=!0,Ge.addEventListener("load",function(Ye){Me(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(_n,Mn,ft){"use strict";ft.d(Mn,{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(_n,Mn,ft){"use strict";ft.d(Mn,{SV:function(){return Ze},ZP:function(){return _e}});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=Object.defineProperty,Ae=Object.defineProperties,me=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(qe,ut,vt)=>ut in qe?Se(qe,ut,{enumerable:!0,configurable:!0,writable:!0,value:vt}):qe[ut]=vt,se=(qe,ut)=>{for(var vt in ut||(ut={}))fe.call(ut,vt)&&te(qe,vt,ut[vt]);if(be)for(var vt of be(ut))z.call(ut,vt)&&te(qe,vt,ut[vt]);return qe},ie=(qe,ut)=>Ae(qe,me(ut)),le=(qe,ut,vt)=>new Promise((At,Et)=>{var Ft=Vt=>{try{Yt(vt.next(Vt))}catch(Ht){Et(Ht)}},Kt=Vt=>{try{Yt(vt.throw(Vt))}catch(Ht){Et(Ht)}},Yt=Vt=>Vt.done?At(Vt.value):Promise.resolve(Vt.value).then(Ft,Kt);Yt((vt=vt.apply(qe,ut)).next())});const he={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},pe=(qe,ut)=>ut.map(vt=>({label:vt,kind:qe.languages.CompletionItemKind.Keyword,insertText:vt})),xe=qe=>Object.keys(he.tables).map(ut=>({label:ut,kind:qe.languages.CompletionItemKind.Variable,insertText:ut})),je=(qe,ut)=>{const vt=he.tables[qe];return vt?vt.map(At=>({label:At,kind:ut.languages.CompletionItemKind.Field,insertText:At})):[]};function De(qe,ut,vt,At,Et){let Ft=ut.getWordUntilPosition(vt),Kt={startLineNumber:vt.lineNumber,endLineNumber:vt.lineNumber,startColumn:Ft.startColumn,endColumn:Ft.endColumn},Yt=At.map(Vt=>({label:Vt,kind:qe.languages.CompletionItemKind.Keyword,insertText:Vt,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Kt}));return Et.map(Vt=>{Yt.push(ie(se({},Vt),{range:Kt}))}),Yt}var Fe=qe=>{he.languages.map(Et=>(qe.languages.registerDocumentFormattingEditProvider(Et,{provideDocumentFormattingEdits(Ft,Kt,Yt){return le(this,null,function*(){const Vt=ke()(Ft.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:Ft.getFullModelRange(),text:Vt}]})}}),Et));const ut=Ie.quickKey.map(Et=>({label:Et.label,kind:qe.languages.CompletionItemKind.Method,insertText:Et.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),vt=de.quickKey.map(Et=>({label:Et.label,kind:qe.languages.CompletionItemKind.Method,insertText:Et.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),At=Ue.quickKey.map(Et=>({label:Et.label,kind:qe.languages.CompletionItemKind.Method,insertText:Et.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet}));qe.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Et,Ft){var Kt=Et.getWordUntilPosition(Ft),Yt={startLineNumber:Ft.lineNumber,endLineNumber:Ft.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},Vt=Et.getLineContent(Ft.lineNumber).substring(Kt.startColumn-2,Kt.endColumn);return{suggestions:[...Ie.keywords.map(Ht=>({label:Ht,kind:qe.languages.CompletionItemKind.Function,documentation:Ht,insertText:Ht,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt})),...Ie.quickKey.map(Ht=>({label:Ht.label,kind:qe.languages.CompletionItemKind.Function,documentation:Ht.content,insertText:Vt.startsWith("#")?Ht.content.replace(/#/,""):Ht.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt}))]}}}),qe.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Et,Ft){var Kt=Et.getWordUntilPosition(Ft),Yt={startLineNumber:Ft.lineNumber,endLineNumber:Ft.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn};return{suggestions:[...oe.keywords.map(Vt=>({label:Vt,kind:qe.languages.CompletionItemKind.Function,documentation:Vt,insertText:Vt,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt}))]}}}),qe.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Et,Ft){var Kt=Et.getWordUntilPosition(Ft),Yt={startLineNumber:Ft.lineNumber,endLineNumber:Ft.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},Vt=Et.getLineContent(Ft.lineNumber).substring(Kt.startColumn-2,Kt.endColumn);return{suggestions:[...Ue.keywords.map(Ht=>({label:Ht,kind:qe.languages.CompletionItemKind.Function,documentation:Ht,insertText:Ht,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt})),...Ue.quickKey.map(Ht=>({label:Ht.label,kind:qe.languages.CompletionItemKind.Function,documentation:Ht.content,insertText:Vt.startsWith("#")?Ht.content.replace(/#/,""):Ht.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt}))]}}}),qe.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Et,Ft){var Kt=Et.getWordUntilPosition(Ft),Yt={startLineNumber:Ft.lineNumber,endLineNumber:Ft.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},Vt=Et.getLineContent(Ft.lineNumber).substring(Kt.startColumn-2,Kt.endColumn);return{suggestions:[...ve.keywords.map(Ht=>({label:Ht,kind:qe.languages.CompletionItemKind.Function,documentation:Ht,insertText:Ht,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt})),...ve.quickKey.map(Ht=>({label:Ht.label,kind:qe.languages.CompletionItemKind.Function,documentation:Ht.content,insertText:Vt.startsWith("#")?Ht.content.replace(/#/,""):Ht.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt}))]}}}),qe.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Et,Ft){var Kt=Et.getWordUntilPosition(Ft),Yt={startLineNumber:Ft.lineNumber,endLineNumber:Ft.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},Vt=Et.getLineContent(Ft.lineNumber).substring(Kt.startColumn-2,Kt.endColumn);return{suggestions:[...de.keywords.map(Ht=>({label:Ht,kind:qe.languages.CompletionItemKind.Function,documentation:Ht,insertText:Ht,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt})),...de.quickKey.map(Ht=>({label:Ht.label,kind:qe.languages.CompletionItemKind.Function,documentation:Ht.content,insertText:Vt.startsWith("#")?Ht.content.replace(/#/,""):Ht.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Yt}))]}}})};const Te="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Me=Object.defineProperty,Be=(qe,ut,vt)=>ut in qe?Me(qe,ut,{enumerable:!0,configurable:!0,writable:!0,value:vt}):qe[ut]=vt,Ge=(qe,ut,vt)=>Be(qe,typeof ut!="symbol"?ut+"":ut,vt);const Ye=class mx{constructor(ut,vt,At){this.placeholder=ut,this.editor=vt,this.monaco=At,vt.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)}};Ge(Ye,"ID","editor.widget.placeholderHint");var Xe=Ye,ot=ft(96236),lt=ft(6767),ct=ft(25399),Ct=ft(89392),Je=ft(49535),rt=ft(56102),xt=Object.defineProperty,bt=Object.defineProperties,Pt=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,Nt=(qe,ut,vt)=>ut in qe?xt(qe,ut,{enumerable:!0,configurable:!0,writable:!0,value:vt}):qe[ut]=vt,dt=(qe,ut)=>{for(var vt in ut||(ut={}))St.call(ut,vt)&&Nt(qe,vt,ut[vt]);if(ht)for(var vt of ht(ut))mt.call(ut,vt)&&Nt(qe,vt,ut[vt]);return qe},Dt=(qe,ut)=>bt(qe,Pt(ut)),gt=(qe,ut)=>{var vt={};for(var At in qe)St.call(qe,At)&&ut.indexOf(At)<0&&(vt[At]=qe[At]);if(qe!=null&&ht)for(var At of ht(qe))ut.indexOf(At)<0&&mt.call(qe,At)&&(vt[At]=qe[At]);return vt},yt=(qe,ut,vt)=>new Promise((At,Et)=>{var Ft=Vt=>{try{Yt(vt.next(Vt))}catch(Ht){Et(Ht)}},Kt=Vt=>{try{Yt(vt.throw(Vt))}catch(Ht){Et(Ht)}},Yt=Vt=>Vt.done?At(Vt.value):Promise.resolve(Vt.value).then(Ft,Kt);Yt((vt=vt.apply(qe,ut)).next())});function tt(qe){return/^\d+$/.test(qe)?`${qe}px`:qe}function He(){}let we=!1;const Ne={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Ve(qe=[]){let ut=qe;if(Array.isArray(qe)){for(let vt=0;vt<qe.length;vt++){let At=Ne[qe[vt]];if(At)return At}return ut[0]}return Ne[ut]||ut}let nt=null;const Re=()=>yt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(qe){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",qe)}});var _e=qe=>{var ut=qe,{width:vt="100%",height:At="100%",value:Et,language:Ft="javascript",style:Kt={},options:Yt={},overrideServices:Vt={},theme:Ht="vs-dark",onEditBlur:sn,isCopy:rn=!1,onSave:un,autoHeight:Sn=!1,forbidCopy:vn=!1,onChange:Cn=He,editorDidMount:On=He,onFocus:Dr=He,onBreakPoint:Sr=He,breakPointValue:qr=[],filename:tr="educoder.txt",errorLine:ai,errorContent:gi="",highlightLine:fi,openBreakPoint:Di=!1,placeholder:ki="",showMiniMap:Jr=!0}=ut,Li=gt(ut,["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 et=(0,at.useRef)(),Mr=(0,at.useRef)({}),Er=(0,at.useRef)(),En=(0,at.useRef)(),Tn=(0,at.useRef)([]),Dn=(0,at.useRef)(!1),Pr=(0,at.useRef)(),Br=(0,at.useRef)(),Ar=(0,at.useRef)(!1),[Qt,Zt]=(0,at.useState)(!1);function Ut(){let jn;return et.current&&(jn=new Gt.Z(Ln=>{for(let An of Ln)(An.target.offsetHeight>0||An.target.offsetWidth>0)&&Mr.current.instance.layout()}),jn.observe(et.current)),jn}function Un(){lt.ZP.warning({content:decodeURIComponent(Te),key:"monaco-editor-tip"})}const pr=()=>{let jn=Mr.current.instance;if(Et!=null&&jn&&Qt){const Ln=jn.getModel();Ln&&Et!==Ln.getValue()&&(we=!0,Ln.setValue(Et),jn.layout(),we=!1)}};(0,at.useEffect)(()=>{const jn=Je.Z.subscribe("formatDocument",Ln=>{var An;let Kn=Mr.current.instance;(An=Kn==null?void 0:Kn.getAction)==null||An.call(Kn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Ln=>{Cn(Ln)},jn},[]),(0,at.useEffect)(()=>{var jn;let Ln=Mr.current.instance;En.current&&clearTimeout(En.current),En.current=setTimeout(()=>{pr()},500),Et&&(Et!=null&&Et.length)&&((jn=Ln==null?void 0:Ln.updateOptions)==null||jn.call(Ln,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Et.split(/\r\n|\r|\n/g).length))+3,5)}))},[Et,Qt,Mr.current]),(0,at.useEffect)(()=>{if(ai&&Mr.current&&Mr.current.instance){let Ln=Mr.current.instance;Ln.changeViewZones(function(An){var Kn=document.createElement("div");Kn.style.padding="10px 20px",Kn.style.width="calc(100% - 20px)",Kn.className="my-error-line-wrp",Kn.innerHTML=gi,An.addZone({afterLineNumber:ai||11,heightInLines:3,domNode:Kn})});var jn={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}};Ln.addOverlayWidget(jn),Ln.revealPositionInCenter({lineNumber:20,column:1})}},[ai,Mr.current,Qt]);const mr=(jn="",Ln)=>{if(!jn||jn.trim()==="")return!0;const Kn=Mr.current.instance.getModel().getLineTokens(Ln);let Jn=!1;for(let er=0;er<2;er++)Kn.getStandardTokenType(er)===1&&(Jn=!0);return Jn};(0,at.useEffect)(()=>{var jn;const Ln=(jn=Mr.current)==null?void 0:jn.instance;if(Ln&&Qt&&vn){const An=Ln.onDidBlurEditorWidget(()=>{Ar.current=!1}),Kn=Ln.onDidFocusEditorText(()=>{Ar.current=!0});return()=>{An.dispose(),Kn.dispose()}}},[Mr.current,Qt,vn]),(0,at.useEffect)(()=>{var jn;if((jn=Mr.current)!=null&&jn.instance&&Qt&&Di){let Ln=Mr.current.instance,An=Ln.getModel();if(!An)return;(()=>{var Xn;let rr=[],ir=[];const wr=An.getAllDecorations();for(let Kr of wr)Kr.options.className==="highlighted-line"&&(rr.push((Xn=Kr==null?void 0:Kr.range)==null?void 0:Xn.startLineNumber),ir.push(Kr==null?void 0:Kr.id));if(fi===rr[0])return;An.deltaDecorations(ir,[]);const Rr=An.getLineCount();fi&&fi<=Rr&&(Ln.deltaDecorations([],[{range:new nt.Range(fi,1,fi,An.getLineMaxColumn(fi)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Ln.revealLineInCenter(fi))})();const Jn=(Xn=!1)=>{var rr;let ir=[],wr=[];const Rr=An.getAllDecorations();for(let Kr of Rr)Kr.options.linesDecorationsClassName==="breakpoints-select"&&(ir.push((rr=Kr==null?void 0:Kr.range)==null?void 0:rr.startLineNumber),wr.push(Kr==null?void 0:Kr.id));if(Xn)return{lines:ir,ids:wr};Sr(ir)},er=Xn=>yt(void 0,null,function*(){let rr={range:new nt.Range(Xn,1,Xn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield An.deltaDecorations([],[rr]),Jn()}),Wr=Xn=>yt(void 0,null,function*(){let rr=[];const ir=Ln.getLineDecorations(Xn);for(let wr of ir)wr.options.linesDecorationsClassName==="breakpoints-select"&&rr.push(wr.id);yield An.deltaDecorations(rr,[]),Jn()}),Cr=Xn=>{let rr=Ln.getLineDecorations(Xn);for(let ir of rr)if(ir.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ct.isEqual)(qr,Jn(!0).lines)){An.deltaDecorations(Jn(!0).ids,[]);const Xn=qr.map(rr=>({range:new nt.Range(rr,1,rr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));An.deltaDecorations([],Xn)}const Tr=Ln.onDidChangeModelContent(Xn=>{let rr=Ln.getPosition();if(rr){let ir=rr.lineNumber;clearTimeout(Br.current),Br.current=setTimeout(()=>{mr(An.getLineContent(ir),ir)?Wr(ir):Cr(ir)?(Wr(ir),er(ir)):Jn()},100)}}),ln=Ln.onMouseDown(Xn=>{var rr,ir,wr;if(Xn.target.detail&&((wr=(ir=(rr=Xn.target)==null?void 0:rr.element)==null?void 0:ir.className)!=null&&wr.includes("line-numbers"))){let Rr=Xn.target.position.lineNumber;if(mr(An.getLineContent(Rr),Rr))return;Cr(Rr)?Wr(Rr):er(Rr)}}),ri=Xn=>{let rr={range:new nt.Range(Xn,1,Xn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Tn.current=Ln.deltaDecorations(Tn.current,[rr])},di=()=>{Tn.current=Ln.deltaDecorations(Tn.current,[])},_i=Ln.onMouseMove(Xn=>{var rr,ir,wr;if(di(),Xn.target.detail&&((wr=(ir=(rr=Xn.target)==null?void 0:rr.element)==null?void 0:ir.className)!=null&&wr.includes("line-numbers"))){let Rr=Xn.target.position.lineNumber;if(mr(An.getLineContent(Rr),Rr))return;ri(Rr)}}),pn=Ln.onMouseLeave(()=>{di()});return()=>{Tr.dispose(),ln.dispose(),_i.dispose(),pn.dispose()}}},[Mr.current,Qt,qr,fi,Di,Ft]),(0,at.useEffect)(()=>{var jn;(jn=Mr.current)!=null&&jn.instance&&Di&&Mr.current.instance.setPosition({lineNumber:0,column:0})},[fi]);function xn(){let jn=Mr.current.instance;if(jn){const Ln=jn.getSelection(),An=Mr.current.pastePos||{},Kn=new nt.Range(An.startLineNumber||Ln.endLineNumber,An.startColumn||Ln.endColumn,An.endLineNumber||Ln.endLineNumber,An.endColumn||Ln.endColumn);setTimeout(()=>{jn.executeEdits("",[{range:Kn,text:""}])},300)}}function Yn(jn){(window.navigator.platform.match("Mac")?jn.metaKey:jn.ctrlKey)&&jn.keyCode==83&&(jn.preventDefault(),un())}const Hn=()=>{if(Sn&&Mr.current.instance){const jn=Mr.current.instance.getContentHeight();tn(jn<At?At:jn)}else tn(At)};function Qr(jn){var Ln=document.createEvent("MouseEvents");Ln.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),jn.dispatchEvent(Ln)}const $r=jn=>{if(!Ar.current)return;const{keyCode:Ln,ctrlKey:An,metaKey:Kn,target:Jn,type:er}=jn;return(er==="paste"||(Ln===67||Ln===86)&&(Kn||An))&&Jn.nodeName==="TEXTAREA"&&(Un(),jn.preventDefault()),!1};function Mt(jn,Ln){var An=window.URL||window.webkitURL||window,Kn=new Blob([Ln]),Jn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Jn.href=An.createObjectURL(Kn),Jn.download=jn,Qr(Jn)}(0,at.useEffect)(()=>{Hn()},[Hn]),(0,at.useEffect)(()=>{et.current&&!Qt&&Promise.all([ft.e(8909),ft.e(6656)]).then(ft.bind(ft,71448)).then(jn=>{try{nt=jn,Mr.current.instance=nt.editor.create(et.current,{value:Et,language:Ve(Ft),theme:Ht,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Jr||!1}},Vt);const Ln=Mr.current.instance;let Jn=[...ot.BH._menuItems].find(Tr=>Tr[0]._debugName=="EditorContext")[1],er=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Wr=(Tr,ln)=>{var ri,di;let _i=Tr._first;do ln.includes((di=(ri=_i.element)==null?void 0:ri.command)==null?void 0:di.id)&&Tr._remove(_i);while(_i=_i.next)};if(On(Ln,nt),setTimeout(()=>{Hn(),Mr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Mt(tr||"educoder.txt",Ln.getValue())}})},500),Mr.current.subscription=Ln.onDidChangeModelContent(Tr=>{Dn.current?clearTimeout(Pr.current):(Hn(),Cn(Ln.getValue(),Tr)),Pr.current=setTimeout(()=>{Dn.current=!1},500)}),window.Monaco||Fe(nt,Ve(Ft)),vn&&(Wr(Jn,er),et.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",$r),window.removeEventListener("paste",$r),window.addEventListener("keydown",$r),window.addEventListener("paste",$r)),window.Monaco=nt,sn&&Ln.onDidBlurEditorWidget(()=>{sn(Ln.getValue())}),Dr&&Ln.onDidFocusEditorText(()=>{vn&&Re(),Dr(Ln.getValue())}),vn){Re();try{Ln.onDidPaste(Tr=>{const ln=Ln.getSelection(),ri=Mr.current.pastePos||{},di=new nt.Range(ri.startLineNumber||ln.endLineNumber,ri.startColumn||ln.endColumn,ri.endLineNumber||ln.endLineNumber,ri.endColumn||ln.endColumn);Ln.executeEdits("",[{range:Tr.range,text:""}])})}catch(Tr){}}let Cr=Ut();return ki&&typeof ki=="string"&&new Xe(ki,Ln,nt),Zt(!0),()=>{const Tr=Mr.current.instance;Tr.dispose();const ln=Tr.getModel();ln&&ln.dispose(),Mr.current.subscription&&Mr.current.subscription.dispose(),Cr.unobserve(et.current)}}catch(Ln){}})},[]),(0,at.useEffect)(()=>{if(Mr.current.instance&&Qt)return document.addEventListener("keydown",Yn,!1),()=>{document.removeEventListener("keydown",Yn)}},[un,Qt]),(0,at.useEffect)(()=>{let jn=Mr.current.instance;if(jn&&Qt){let Ln=Ve(Ft);nt.editor.setModelLanguage(jn.getModel(),Ln)}},[Ft,Qt]),(0,at.useEffect)(()=>{Mr.current.instance&&Qt&&nt.editor.setTheme(Ht)},[Ht,Qt]),(0,at.useEffect)(()=>{let jn=Mr.current.instance;Er.current=Yt,jn&&Qt&&(jn.updateOptions(dt({},Yt)),setTimeout(()=>{jn.getModel().updateOptions(dt({},Yt))},200))},[JSON.stringify(Yt),Qt]),(0,at.useEffect)(()=>{let jn=Mr.current.instance;jn&&Qt&&jn.layout()},[vt,At,Qt]);const[Wt,Fn]=(0,at.useState)(tt(vt)),[zn,tn]=(0,at.useState)(tt(At)),Nn=Dt(dt({},Kt),{width:Wt,height:zn,position:"relative"});return at.createElement("div",{className:"my-monaco-editor",ref:et,style:Nn},rn&&at.createElement(rt.CopyToClipboard,{text:Et,onCopy:()=>lt.ZP.success("\u590D\u5236\u6210\u529F")},at.createElement(ct.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 Ze({width:qe="100%",height:ut="100%",original:vt,modified:At,language:Et,options:Ft={}}){const Kt=(0,at.useRef)(),[Yt,Vt]=(0,at.useState)(null);function Ht(Sn){let vn;return Kt.current&&(vn=new Gt.Z(Cn=>{for(let On of Cn)(On.target.offsetHeight>0||On.target.offsetWidth>0)&&Sn.layout()}),vn.observe(Kt.current)),vn}(0,at.useEffect)(()=>(Kt.current&&Promise.all([ft.e(8909),ft.e(9404)]).then(ft.bind(ft,2550)).then(Sn=>{nt=Sn;const vn=nt.editor.createDiffEditor(Kt.current,Dt(dt({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ft),{wordWrap:!0}));Vt(vn);let Cn=Ht(vn);return()=>{vn.dispose();const On=vn.getModel();On&&On.dispose(),Cn.unobserve(Kt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,at.useEffect)(()=>{Yt&&Yt.setModel({original:nt.editor.createModel(vt,Et),modified:nt.editor.createModel(At,Et)})},[vt,At,Et,Yt]);const sn=tt(qe),rn=tt(ut),un={width:sn,height:rn};return at.createElement("div",{className:"my-diff-editor",ref:Kt,style:un})}},10661:function(_n,Mn,ft){"use strict";ft.d(Mn,{Z:function(){return Ae}});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"},Gt=ft(29787),oe=ft(25399),Ue=ft(92310),Ie=ft.n(Ue),de=ft(51257),ve=ft(28426),Ee=ft(48790),ke=ft(59301),Ae=({className:me,dataSource:be=[],col:fe=4,right:z,bottom:te=23,precision:se=0,wrapWidth:ie=1200,trackEventItems:le,loading:he,onRemove:pe=()=>{},isCurrent:xe=!0,showAlias:je=!1})=>{const De=Math.floor((ie-(fe-1)*z)/fe),Fe=[{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 ke.createElement(Gt.Z,{spinning:he},ke.createElement("div",{className:Ie()(at.list,me)},!!(be!=null&&be.length)&&(be==null?void 0:be.map((Te,Me)=>{var Be;const{name:Ge,id:Ye,identifier:Ke,featured:Xe,school_name:ot,image_url:lt,excellent:ct,is_plan:Ct}=Te;return ke.createElement("div",{key:Ye,className:at.wrap,style:{width:De,marginRight:(1+Me)%fe===0?0:z+se,marginBottom:te}},ke.createElement("a",{className:at.li,onClick:Je=>{Je.preventDefault(),Je.stopPropagation(),le&&(0,de.L9)([le]),(0,de.xg)(`/paths/${Ke}`)}},ke.createElement("div",{className:at.img},ke.createElement("img",{className:at.cover,src:`${lt}`}),xe&&(0,Ee.bg)()&&(Te==null?void 0:Te.studying)&&ke.createElement("div",{className:`${at.movebq} user-path-items`,onClick:Je=>{Je.stopPropagation(),pe(Te)}},ke.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),ke.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Be=Te==null?void 0:Te.subject_tags)==null?void 0:Be.map((Je,rt)=>{var xt,bt;if(rt===0){const ht=(xt=Fe.find(St=>St.name==Je))==null?void 0:xt.swimg;return ke.createElement("img",{className:at.sign,src:ht,style:{left:"-4px"}})}const Pt=(bt=Fe.find(ht=>ht.name==Je))==null?void 0:bt.ptimg;return ke.createElement("img",{className:at.sign,src:Pt,style:{left:`${48+52*(rt-1)+2*rt}px`}})}),ke.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Te==null?void 0:Te.excellent)&&ke.createElement("div",{className:at.bq},"\u5F00\u653E\u8BFE\u7A0B"))),ke.createElement("div",{className:at.name},ke.createElement(oe.Z,{title:je&&(Te!=null&&Te.excellent_alias_name)?ke.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Ge}`,ke.createElement("br",null),ke.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Te==null?void 0:Te.excellent_alias_name}`)):Ge},ke.createElement("span",{className:at.e},je&&(Te==null?void 0:Te.excellent_alias_name)||Ge))),ke.createElement(oe.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${ot}`},ke.createElement("div",{className:at.unit},ke.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),ot)),ke.createElement("div",{className:at.tags},ke.createElement("div",null,ke.createElement(oe.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},ke.createElement("span",null,ke.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),ke.createElement("span",null,Te.stages_count))),ke.createElement(oe.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ke.createElement("span",null,ke.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),ke.createElement("span",null,Te.members_count)))))))})),!be.length&&ke.createElement(ve.Z,null)))}},9148:function(_n,Mn,ft){"use strict";ft.d(Mn,{jL:function(){return Ie},w9:function(){return xt},QD:function(){return sn},cQ:function(){return lt.Z},op:function(){return Et},O5:function(){return Er},_b:function(){return On},t7:function(){return ie},Gi:function(){return Nt},YG:function(){return St},qp:function(){return Ae},vr:function(){return Sn},qE:function(){return Yt},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:En=[],img:Tn,imgWidth:Dn=346,title:Pr,sunTitle:Br,bannerExtraContent:Ar})=>at.createElement("div",{className:Gt.banner},at.createElement("div",{className:Gt.content},at.createElement("aside",null,at.createElement("p",null,at.createElement("b",null,Pr),at.createElement("span",null,Br)),En.length>0&&at.createElement("div",{className:Gt.btns},En.map((Qt,Zt)=>at.createElement("div",{key:Zt,onClick:Qt.click},Qt.name,Qt.sign?at.createElement("img",{src:oe,width:39}):null))),Ar),Tn&&at.createElement("img",{style:{marginTop:33,marginRight:38},src:Tn,width:Dn}))),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),Ae=({dataSource:En=[],value:Tn,onChange:Dn,onTitleChange:Pr,className:Br,title:Ar,titleWidth:Qt=41,style:Zt={},fontColor:Ut="#6A7283",showCount:Un})=>{const[pr,mr]=(0,at.useState)(0),[xn,Yn]=(0,at.useState)(!1),Hn=(0,at.useRef)(null),Qr=(0,at.useRef)(null);return(0,at.useEffect)(()=>{var $r;En.length!==0&&((($r=Hn==null?void 0:Hn.current)==null?void 0:$r.clientHeight)>97?mr(1):mr(0)),En.length===0&&mr(0),Yn(!1)},[En]),at.createElement("div",{className:Ee()(de.row,Br),style:Zt},at.createElement("div",{onClick:(0,ke.throttle)(()=>Pr==null?void 0:Pr(),2e3),style:{width:Qt,marginTop:xn?12:4},className:`${de.title} ${Pr?"current":""}`},Ar),at.createElement("div",{className:xn?`${de.tagsWrap} ${de.tagsBorderWrap}`:de.tagsWrap},at.createElement("div",{className:de.bar,ref:Qr,style:pr>0?{height:pr===1?97:"auto",overflow:pr===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},at.createElement("div",{className:de.tag,ref:Hn},En==null?void 0:En.map($r=>at.createElement("span",{onClick:()=>Dn($r.id),key:$r.id,style:{color:Ut},className:Tn===$r.id?de.active:""},at.createElement("span",{title:$r.name,className:de.name},$r.name),!!Un&&at.createElement("span",{className:de.num},$r.count))))),!!pr&&at.createElement(at.Fragment,null,pr===1?at.createElement("div",{onClick:()=>{var $r;mr(2),(($r=Hn==null?void 0:Hn.current)==null?void 0:$r.clientHeight)>245?Yn(!0):Yn(!1)},className:de.action},"\u5C55\u5F00",at.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):at.createElement("div",{onClick:()=>{Qr.current.scrollTop=0,mr(1),Yn(!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:En=[],value:Tn,onChange:Dn,className:Pr,style:Br={}})=>at.createElement("div",{style:Br,className:Ee()(me.tabs,Pr)},En.map(Ar=>at.createElement("span",{onClick:()=>Dn(Ar.id),className:Tn===Ar.id?me.active:"",key:Ar.id},Ar.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:En=[],value:Tn="",onChange:Dn,onInputChange:Pr=()=>{},className:Br,style:Ar={},placeholder:Qt,allowClear:Zt=!1})=>{var Ut;const[Un,pr]=(0,at.useState)(""),[mr,xn]=(0,at.useState)("");(0,at.useEffect)(()=>{var Qr;let $r=Tn;(Qr=JSON.stringify(Tn))!=null&&Qr.includes("{")&&(pr(Tn.id),$r=Tn.value||"");try{xn(decodeURIComponent($r||""))}catch(Mt){xn(decodeURIComponent($r||""))}},[Tn]);const Yn=()=>{Dn(encodeURIComponent(mr),Un||null)},Hn=Qr=>{Qr!==Un&&(pr(Qr),Dn(encodeURIComponent(mr),Qr))};return at.createElement("div",{className:Ee()(z.input,Br),style:Ar},!!En.length&&at.createElement("div",{className:z.dropdown},at.createElement("div",{className:z.text},(Ut=En.find(Qr=>Qr.id===Un))==null?void 0:Ut.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},En.map((Qr,$r)=>at.createElement("div",{key:$r,onClick:()=>Hn(Qr.id)},Qr.name)))),at.createElement(te.default,{onPressEnter:Yn,value:mr,onChange:Qr=>{xn(Qr.target.value),Pr(encodeURIComponent(Qr.target.value),Un||null)},bordered:!1,placeholder:Qt}),at.createElement("i",{onClick:Yn,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:En,onChange:Tn,className:Dn,total:Pr,pageSize:Br,style:Ar={}})=>{const Qt=En<2,Zt=En>=Math.ceil(Pr/Br);return Pr<=Br?at.createElement(at.Fragment,null):at.createElement("div",{className:Ee()(le.quickPager,Dn),style:Ar},at.createElement("div",{onClick:()=>{Qt||Tn(En-1,"prev")},className:Qt?le.disabled:""},"\u4E0A\u4E00\u9875"),at.createElement("div",{onClick:()=>{Zt||Tn(En+1,"next")},className:Zt?le.disabled:""},"\u4E0B\u4E00\u9875"))},xe={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},je=ft(29787),De=ft(25399),Fe=ft(58018),Te=ft(346),Me=ft(51257),Be=ft(96908),Ge=ft(57177),Ye=ft(81378),Ke=ft(28426),ot=({className:En,dataSource:Tn=[],col:Dn=4,right:Pr,bottom:Br=23,precision:Ar=0,wrapWidth:Qt=1200,trackEventItems:Zt,loading:Ut})=>{const Un=Math.floor((Qt-(Dn-1)*Pr)/Dn);return at.createElement(je.Z,{spinning:Ut},at.createElement("div",{className:Ee()(xe.list,En)},!!Tn.length&&Tn.map((pr,mr)=>{const{name:xn,id:Yn,identifier:Hn,power:Qr,cover_image_id:$r,pic:Mt}=pr;return at.createElement("div",{className:xe.wrap,key:Yn,style:{width:Un,marginRight:(1+mr)%Dn===0?0:Pr+Ar,marginBottom:Br}},at.createElement("a",{target:"_blank",href:`/shixuns/${Hn}/challenges`,className:xe.li,onClick:Wt=>{Wt.preventDefault(),Zt&&(0,Me.L9)([Zt]),Qr&&(0,Me.xg)(`/shixuns/${Hn}/challenges`)}},at.createElement("div",{className:xe.img},at.createElement("img",{className:xe.cover,src:`${Mt}`}),pr.is_jupyter&&at.createElement("img",{className:xe.sign,src:Be}),pr.is_jupyter_lab&&at.createElement("img",{className:xe.sign,src:Ge}),pr.is_unity_3d&&at.createElement("img",{className:xe.sign,src:Ye})),at.createElement("div",{className:xe.name},at.createElement(De.Z,{title:xn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},at.createElement("span",{className:xe.e},xn||"\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,pr.challenges_count))),!!pr.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,pr.myshixuns_count))),at.createElement(De.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},at.createElement("span",null,at.createElement("span",null,pr.level))),at.createElement("div",{className:xe.rate},at.createElement(Fe.Z,{allowHalf:!0,disabled:!0,defaultValue:pr.score_info}),at.createElement("span",null,"\xA0",pr.score_info?`${pr.score_info}\u5206`:"5\u5206")))),!Qr&&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")))}),!Tn.length&&at.createElement(Ke.Z,null)))},lt=ft(10661),ct={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),xt=({className:En,dataSource:Tn=[],col:Dn=4,right:Pr,bottom:Br=23,precision:Ar=0,wrapWidth:Qt=1200,trackEventItems:Zt,loading:Ut,handleVery:Un=()=>!0})=>{const pr=Math.floor((Qt-(Dn-1)*Pr)/Dn);return Je.createElement(je.Z,{spinning:Ut},Je.createElement("div",{className:Ee()(ct.list,En)},!!Tn.length&&Tn.map((mr,xn)=>{const{subject_identifier:Yn,id:Hn,identifier:Qr,power:$r}=mr,Mt=mr.is_public!=0&&mr.is_public;return Je.createElement("div",{className:ct.wrap,key:Hn,style:{width:pr,marginRight:(1+xn)%Dn===0?0:Pr+Ar,marginBottom:Br}},Je.createElement("a",{className:ct.li,onClick:Wt=>{Wt.preventDefault(),Un(mr==null?void 0:mr.first_category_url)&&(Zt&&(0,Me.L9)([Zt]),(0,Me.xg)(mr.first_category_url))}},Je.createElement("div",{className:ct.top},Je.createElement(De.Z,{title:mr.name},Je.createElement("div",{className:ct.name},mr.name)),Je.createElement("img",{className:ct.img,src:Te.Z.IMG_SERVER+"/images/"+mr.avatar_url}),Je.createElement("div",{className:ct.text,title:mr.creator},mr.creator),Yn&&Je.createElement("div",{className:ct.btns},Je.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Je.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Mt&&Je.createElement("div",{className:ct.sign},"\u516C\u5F00")),Je.createElement("div",{className:ct.bottom},mr.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,mr.visits))),mr.course_members_count>0&&Je.createElement(De.Z,{title:"\u6210\u5458",placement:"bottom"},Je.createElement("span",null,Je.createElement("i",{className:"iconfont icon-chengyuan"}),mr.course_members_count)),mr.tasks_count>0&&Je.createElement(De.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Je.createElement("span",null,Je.createElement("i",{className:"iconfont icon-zuoye"}),mr.tasks_count)),mr.is_end?Je.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Je.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!mr.is_accessible&&Je.createElement("div",{className:ct.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")))}),!Tn.length&&Je.createElement(Ke.Z,null)))},bt={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"},Pt=ft(25690),St=({dataSource:En=[],value:Tn,onChange:Dn,className:Pr,style:Br={},tabBarExtraContent:Ar})=>at.createElement("div",{className:Ee()(bt.tabs,Pr),style:Br},at.createElement("div",{className:bt.tabsWrap},En.map((Qt,Zt)=>!(Qt!=null&&Qt.hide)&&at.createElement("aside",{className:bt.tab,onClick:()=>{Dn(Qt.id),Qt.link&&Pt.history.push(Qt.link)},key:Zt},at.createElement("div",{className:Tn===Qt.id?bt.active:""},Qt.name),(Qt==null?void 0:Qt.resetCount)==null&&(Qt==null?void 0:Qt.total)!==void 0&&at.createElement("span",null,"\uFF08",Qt==null?void 0:Qt.total,"\uFF09"),(Qt==null?void 0:Qt.resetCount)!==void 0&&(Qt==null?void 0:Qt.total)!==void 0&&at.createElement(De.Z,{title:(Qt==null?void 0:Qt.tip)!=null?Qt==null?void 0:Qt.tip:""},at.createElement("span",{style:{color:"#9096A3"}},"\uFF08",at.createElement("span",{style:{color:"#000"}},Qt==null?void 0:Qt.resetCount),"/",at.createElement("span",null,Qt==null?void 0:Qt.total),"\uFF09"))))),at.createElement("div",{className:bt.tabBar},Ar)),Nt=({className:En,style:Tn={},children:Dn})=>at.createElement("div",{className:Ee()(En),style:Tn},Dn),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"},Dt=ft(75727),gt=ft(93041);const yt=[{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:En,dropValue:Tn,className:Dn,onSort:Pr,onDrop:Br,dataSource:Ar=yt})=>{var Qt;return at.createElement("div",{className:Ee()(dt.orderWrap,Dn)},at.createElement(Dt.Z,{dropdownRender:()=>at.createElement(gt.default,null,Ar.map((Zt,Ut)=>at.createElement(gt.default.Item,{key:Ut,onClick:()=>Br(Zt.id)},Zt.name)))},at.createElement("span",{className:dt.orderTextWrap},(Qt=Ar.find(Zt=>Tn===Zt.id))==null?void 0:Qt.name)),at.createElement("span",{className:dt.orderIconWrap},at.createElement("span",{className:dt.orderAsc},at.createElement("i",{className:En==="asc"?`iconfont icon-sanjiaoxing-up font12 ${dt.cursorPointer} ${dt.active}`:`iconfont icon-sanjiaoxing-up font12 ${dt.cursorPointer}`,onClick:()=>Pr(En==="asc"?"desc":"asc")})),at.createElement("span",{className:dt.orderDesc},at.createElement("i",{className:En==="desc"?`iconfont icon-sanjiaoxing-down font12 ${dt.cursorPointer} ${dt.active}`:`iconfont icon-sanjiaoxing-down font12 ${dt.cursorPointer}`,onClick:()=>Pr(En==="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"},Ne=ft(99571),Ve=Object.defineProperty,nt=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Ze=(En,Tn,Dn)=>Tn in En?Ve(En,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):En[Tn]=Dn,qe=(En,Tn)=>{for(var Dn in Tn||(Tn={}))Re.call(Tn,Dn)&&Ze(En,Dn,Tn[Dn]);if(nt)for(var Dn of nt(Tn))_e.call(Tn,Dn)&&Ze(En,Dn,Tn[Dn]);return En},ut=(En,Tn)=>{var Dn={};for(var Pr in En)Re.call(En,Pr)&&Tn.indexOf(Pr)<0&&(Dn[Pr]=En[Pr]);if(En!=null&&nt)for(var Pr of nt(En))Tn.indexOf(Pr)<0&&_e.call(En,Pr)&&(Dn[Pr]=En[Pr]);return Dn},vt=(En,Tn,Dn)=>new Promise((Pr,Br)=>{var Ar=Ut=>{try{Zt(Dn.next(Ut))}catch(Un){Br(Un)}},Qt=Ut=>{try{Zt(Dn.throw(Ut))}catch(Un){Br(Un)}},Zt=Ut=>Ut.done?Pr(Ut.value):Promise.resolve(Ut.value).then(Ar,Qt);Zt((Dn=Dn.apply(En,Tn)).next())}),Et=En=>{var Tn=En,{className:Dn,style:Pr,children:Br,loading:Ar=!1,openLoading:Qt,onClick:Zt=()=>{},size:Ut="middle",shape:Un="round"}=Tn,pr=ut(Tn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[mr,xn]=(0,at.useState)(!1);return at.createElement(Ne.ZP,qe({onClick:(0,ke.throttle)(Yn=>vt(void 0,null,function*(){Qt&&xn(!0);try{yield Zt(Yn)}catch(Hn){console.log("error",Hn)}Qt&&xn(!1)}),2e3,{leading:!0,trailing:!1}),className:Ee()(we.btn,we[`${Ut}-${Un}`],Dn),style:Pr,size:Ut,shape:Un,loading:mr||Ar},pr),Br)},Ft={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"},Yt=({className:En,style:Tn,children:Dn=null,onClick:Pr,title:Br})=>at.createElement("div",{className:Ee()(Ft.head,En),style:Tn},at.createElement("span",{className:"primary-hover",onClick:Pr},at.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),at.createElement("b",{title:Br},Br),at.createElement("div",{className:Ft.node},Dn)),Vt={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"},sn=({confirmShow:En=!0,confirmTitle:Tn,confirmClick:Dn,cancelShow:Pr=!0,cancelTitle:Br,cancelClick:Ar,className:Qt,style:Zt,confirmLoading:Ut=!1})=>at.createElement("div",{className:Ee()(Vt.btns,Qt),style:Zt},En&&at.createElement(Ne.ZP,{loading:Ut,onClick:Dn,type:"primary",className:Vt.confirm},Tn),Pr&&at.createElement(Ne.ZP,{onClick:Ar,className:Vt.cancel},Br)),rn={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"},Sn=({className:En,style:Tn={},LeftContent:Dn,children:Pr,RightContent:Br})=>at.createElement("div",{className:Ee()(rn.fixedBottom,En),style:Tn},at.createElement("div",{className:rn.wrap},at.createElement("div",{className:rn.left},Dn),at.createElement("div",{className:rn.center},Pr),at.createElement("div",{className:rn.right},Br))),vn={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"},On=({className:En,style:Tn={},dataSource:Dn=[]})=>at.createElement("div",{className:Ee()(vn.crumbs,En),style:Tn},Dn.map((Pr,Br)=>Br<Dn.length-1?at.createElement(at.Fragment,{key:Br},Pr.path||Pr.onClick?at.createElement("span",{className:vn.hover,onClick:Pr!=null&&Pr.onClick?Pr.onClick:()=>Pt.history.push(Pr.path)},Pr.name):at.createElement("span",null,Pr.name),at.createElement("span",null,"\xA0",">","\xA0")):at.createElement("span",{key:Br,style:{color:"#5F6368"}},Pr.name))),Dr=ft(11938),Sr=Object.defineProperty,qr=Object.defineProperties,tr=Object.getOwnPropertyDescriptors,ai=Object.getOwnPropertySymbols,gi=Object.prototype.hasOwnProperty,fi=Object.prototype.propertyIsEnumerable,Di=(En,Tn,Dn)=>Tn in En?Sr(En,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):En[Tn]=Dn,ki=(En,Tn)=>{for(var Dn in Tn||(Tn={}))gi.call(Tn,Dn)&&Di(En,Dn,Tn[Dn]);if(ai)for(var Dn of ai(Tn))fi.call(Tn,Dn)&&Di(En,Dn,Tn[Dn]);return En},Jr=(En,Tn)=>qr(En,tr(Tn)),Li=(En,Tn)=>{var Dn={};for(var Pr in En)gi.call(En,Pr)&&Tn.indexOf(Pr)<0&&(Dn[Pr]=En[Pr]);if(En!=null&&ai)for(var Pr of ai(En))Tn.indexOf(Pr)<0&&fi.call(En,Pr)&&(Dn[Pr]=En[Pr]);return Dn};const{Countdown:et}=Dr.default;var Er=En=>{var Tn=En,{onChange:Dn}=Tn,Pr=Li(Tn,["onChange"]);const[Br,Ar]=(0,at.useState)(null);(0,at.useEffect)(()=>{typeof Br=="number"&&Br>=0&&Dn(Br)},[Br]);const Qt=Zt=>{const Ut=Math.floor(Zt/1e3);Ar(Ut)};return at.createElement(et,Jr(ki({},Pr),{onChange:Qt}))}},37808:function(_n,Mn,ft){"use strict";ft.d(Mn,{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(_n,Mn,ft){"use strict";ft.d(Mn,{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),Ae={flex_box_center:"flex_box_center___SntrE",flex_space_between:"flex_space_between___g4tse",flex_box_vertical_center:"flex_box_vertical_center___ooGcI",flex_box_center_end:"flex_box_center_end___UM2Cs",flex_box_column:"flex_box_column___vRGBc",prompt:"prompt___a_aRk",box:"box___X84XK",row:"row___wofpN",icon:"icon___ixIOQ"},me=ft(38986),be=ft(51257),fe=ft(16253),z=ft(1012),te=ft(47257),se=ft.n(te),ie=ft(58118),le=ft(9148),he=ft(48790),pe=ft(25690),xe=ft(59301),je=Object.defineProperty,De=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Me=(ot,lt,ct)=>lt in ot?je(ot,lt,{enumerable:!0,configurable:!0,writable:!0,value:ct}):ot[lt]=ct,Be=(ot,lt)=>{for(var ct in lt||(lt={}))Fe.call(lt,ct)&&Me(ot,ct,lt[ct]);if(De)for(var ct of De(lt))Te.call(lt,ct)&&Me(ot,ct,lt[ct]);return ot},Ge=(ot,lt,ct)=>new Promise((Ct,Je)=>{var rt=Pt=>{try{bt(ct.next(Pt))}catch(ht){Je(ht)}},xt=Pt=>{try{bt(ct.throw(Pt))}catch(ht){Je(ht)}},bt=Pt=>Pt.done?Ct(Pt.value):Promise.resolve(Pt.value).then(rt,xt);bt((ct=ct.apply(ot,lt)).next())});const Ye=Gt.default.TextArea,Ke=({dataSetInfo:ot,attachmentInfo:lt,visible:ct,user:Ct,dispatch:Je,onClose:rt=()=>{},onSuccess:xt=()=>{}})=>{var bt,Pt;const[ht,St]=(0,at.useState)([]),[mt,Nt]=(0,at.useState)(!1),[dt,Dt]=(0,at.useState)(!1),[gt]=oe.default.useForm(),[yt,tt]=(0,at.useState)([]),[He,we]=(0,at.useState)({}),Ne=(0,at.useRef)([]);(0,at.useEffect)(()=>{if(ct){if(ot){const{title:Et,is_public:Ft,desc:Kt,attachments:Yt,data_set_tags:Vt}=ot||{},Ht=Yt.map(rn=>({id:String(Math.random()).slice(-6),name:rn.title,response:{attachment_id:rn.id},size:rn.size,description:rn.description||"",percent:100,status:"done"}));St(Ht),tt(Vt);const sn={title:Et,is_public:Ft,desc:Kt};gt.setFieldsValue(sn)}if(lt){const Et=lt.map(Ft=>({id:String(Math.random()).slice(-6),name:Ft.title,response:{attachment_id:Ft.id},size:Ft.size,description:Ft.description||"",percent:100,status:"done"}));St(Et)}Ve()}},[ct]),(0,at.useEffect)(()=>{Ne.current=ht},[ht]),(0,at.useEffect)(()=>{ht!=null&&ht.length?gt.setFields([{name:"attachments",errors:[]}]):gt.setFields([{name:"attachments",errors:["\u6570\u636E\u96C6\u4E0D\u80FD\u4E3A\u7A7A"]}])},[ht.length]),(0,at.useEffect)(()=>{yt!=null&&yt.length?gt.setFields([{name:"tag_ids",errors:[]}]):gt.setFields([{name:"tag_ids",errors:["\u6570\u636E\u96C6\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A"]}])},[yt.length]);const Ve=()=>Ge(void 0,null,function*(){Dt(!0);const Et=yield(0,me.ZP)("/api/data_sets/extra_info.jsoin",{method:"get"});Et.status===0&&(we(Et==null?void 0:Et.data),Dt(!1))}),nt={multiple:!0,withCredentials:!0,showUploadList:!1,beforeUpload:Et=>Ge(void 0,null,function*(){var Ft,Kt,Yt,Vt,Ht,sn;if(((Vt=(Yt=(Kt=(Ft=Et.name)==null?void 0:Ft.split("."))==null?void 0:Kt.slice(0,-1))==null?void 0:Yt.join("."))==null?void 0:Vt.length)>60)return Ue.ZP.warning(`\u300A${Et.name}\u300B\u6587\u4EF6\u540D\u79F0\u8FC7\u957F\uFF0C\u65E0\u6CD5\u4E0A\u4F20`),Promise.reject();if([...He.data_set_filenames,...Ne.current.map(On=>On.name)].includes(Et.name))return Ue.ZP.warning(`\u300A${Et.name}\u300B\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`),Promise.reject();const un=Et.size/1024/1024/1024;let Sn=He==null?void 0:He.data_sets_filesize;if(Ne.current.forEach(On=>{Sn+=On==null?void 0:On.size}),Sn=Sn/1024/1024/1024,(0,he.Ny)()){if(un>50)return Ue.ZP.warning(`\u300A${Et.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\u5927\u5C0F\u9650\u5236(50GB)`),Promise.reject()}else if(un>2)return Ue.ZP.warning(`\u300A${Et.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\u5927\u5C0F\u9650\u5236(2GB)`),Promise.reject();if(Sn+un>((Ht=Ct==null?void 0:Ct.userInfo)==null?void 0:Ht.cloud_space)&&!(He!=null&&He.current_user_no_limit))return Ue.ZP.warning(`\u300A${Et.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u50A8\u5B58\u7A7A\u95F4\u5927\u5C0F\u9650\u5236(${(sn=Ct==null?void 0:Ct.userInfo)==null?void 0:sn.cloud_space}GB)`),Promise.reject();const Cn={id:String(Math.random()).slice(-6),name:Et.name,size:Et.size,file:Et,description:"",percent:0,status:"uploading"};return Ze(Cn,{login:He==null?void 0:He.login,container_type:"DataSet",container_id:null,description:"",realFileName:!1}),St(On=>[...On,Cn]),Promise.reject()})},Re=Et=>Ge(void 0,null,function*(){var Ft,Kt,Yt;const Vt=Ne.current.find(Ht=>Ht.name===Et.name);(Ft=Vt==null?void 0:Vt.response)!=null&&Ft.attachment_id&&(yield(0,me.ZP)("/api/data_sets/single_destroy_files.json",{method:"delete",body:{attachment_id:(Kt=Vt==null?void 0:Vt.response)==null?void 0:Kt.attachment_id}})),Vt!=null&&Vt.client&&((Yt=Vt==null?void 0:Vt.client)==null||Yt.cancel()),St(Ht=>Ht.filter(sn=>sn.name!==Et.name))}),_e=()=>{var Et;(Et=Ne.current)==null||Et.forEach(Ft=>{var Kt;Ft!=null&&Ft.client&&((Kt=Ft==null?void 0:Ft.client)==null||Kt.cancel())})};console.log(ht,"fileList1");const Ze=(Et,Ft)=>Ge(void 0,null,function*(){var Kt,Yt,Vt,Ht,sn,rn,un,Sn,vn;Ft.file_name=Et.name;const Cn=Et.name,On=yield(0,me.ZP)("/api/buckets/get_data_set_token.json",{method:"get"});if((On==null?void 0:On.status)!==0){St(tr=>(tr[tr.findIndex(ai=>ai.name===Cn)].status="error",[...tr])),Ue.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}On.data=JSON.parse((0,fe.pe)(On.data));const Dr=new(se())({endpoint:(Kt=On==null?void 0:On.data)==null?void 0:Kt.end_point,region:(Yt=On==null?void 0:On.data)==null?void 0:Yt.region,accessKeyId:(Vt=On==null?void 0:On.data)==null?void 0:Vt.access_key_id,accessKeySecret:(Ht=On==null?void 0:On.data)==null?void 0:Ht.access_key_secret,bucket:(sn=On==null?void 0:On.data)==null?void 0:sn.bucket,stsToken:(rn=On==null?void 0:On.data)==null?void 0:rn.security_token}),Sr=Et.name.split(".");Sr.pop();const qr=Ft.realFileName?Sr.join("."):(0,z.Z)();Dr.multipartUpload(`datasets/${Ft==null?void 0:Ft.login}/${qr}${Cn.indexOf(".")>-1?"."+Cn.split(".").pop():""}`,new Blob([Et.file],{type:Et.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(tr,ai,gi)=>{console.log("\u8FDB\u5EA6",tr,ai,gi),St(fi=>{const Di=fi.findIndex(ki=>ki.name===Cn);return fi[Di].client=Dr,fi[Di].percent=tr*100,fi[Di].checkpoint=ai,[...fi]})},checkpoint:(Sn=Ne.current[(un=Ne.current)==null?void 0:un.findIndex(tr=>tr.name===Cn)])==null?void 0:Sn.checkpoint,callback:{customValue:{id:Cn+""},url:(vn=On==null?void 0:On.data)==null?void 0:vn.callback_url,host:On==null?void 0:On.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,me.rz)(Ft)}}).then(function(tr){St(ai=>{var gi,fi,Di;const ki=ai.findIndex(Li=>Li.name===Cn);let Jr="done";return((gi=tr.data)==null?void 0:gi.status)===0?ai[ki].response=(fi=tr.data)==null?void 0:fi.data:(Ue.ZP.warning((Di=tr.data)==null?void 0:Di.message),Jr="error"),ai[ki].status=Jr,[...ai]})}).catch(function(tr){console.log("\u63A5\u53E3\u9519\u8BEF\uFF1A",tr),(tr==null?void 0:tr.name)!=="cancel"&&St(ai=>{const gi=ai.findIndex(fi=>fi.name===Cn);return ai[gi].status="error",[...ai]})})}),qe=Et=>(Et=Et||"",Et=String(Et),Et=Et.replace(/\s+/g,""),Et),ut=()=>Ge(void 0,null,function*(){var Et;const Ft=gt.getFieldsValue(),{title:Kt,is_public:Yt,desc:Vt}=Ft,Ht=[];if(qe(Kt)||Ht.push({name:"title",errors:["\u6570\u636E\u96C6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"]}),ht!=null&&ht.length||Ht.push({name:"attachments",errors:["\u6570\u636E\u96C6\u4E0D\u80FD\u4E3A\u7A7A"]}),yt!=null&&yt.length||Ht.push({name:"tag_ids",errors:["\u6570\u636E\u96C6\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A"]}),Ht.length){gt.setFields(Ht);return}const sn=ht.map(Sn=>{var vn;return{attachment_id:(vn=Sn.response)==null?void 0:vn.attachment_id,description:Sn.description}});Nt(!0);const rn={title:Ft.title,attachments:sn,tag_ids:yt.map(Sn=>Sn.id),is_public:Yt,desc:Vt};let un;ot?un=yield(0,me.ZP)(`/api/data_sets/${ot==null?void 0:ot.id}.json`,{method:"put",body:rn}):un=yield(0,me.ZP)("/api/data_sets.json",{method:"post",body:rn}),un.status===0&&(Ue.ZP.success("\u64CD\u4F5C\u6210\u529F"),xt((Et=un==null?void 0:un.data)==null?void 0:Et.data_set_id),Je({type:"user/getUserInfo"})),Nt(!1)}),vt=Et=>{tt(Et)},At=ht.some(Et=>Et.status==="uploading");return console.log("fileList",ht),xe.createElement(Ie.default,{destroyOnClose:!0,confirmLoading:mt,bodyStyle:{paddingLeft:16,paddingTop:20},okButtonProps:{disabled:At},title:ot?"\u7F16\u8F91\u6570\u636E\u96C6":"\u521B\u5EFA\u6570\u636E\u96C6",width:660,onCancel:()=>{if(At){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:()=>{rt()}});return}rt()},okText:"\u786E\u5B9A",onOk:ut,open:ct,afterClose:()=>{St([]),tt([]),Nt(!1),Dt(!1),_e(),gt.resetFields()}},xe.createElement(de.Z,{spinning:dt},!(He!=null&&He.current_user_no_limit)&&!dt&&xe.createElement("div",{className:Ae.prompt},xe.createElement("i",{className:"icon icon-tishi11 font12 mr10"}),"\u6E29\u99A8\u63D0\u793A:\u5E73\u53F0\u4E3A\u7528\u6237\u63D0\u4F9B\u4E86",xe.createElement("span",{style:{color:"#3061D0",margin:"0 5px"}},(bt=Ct==null?void 0:Ct.userInfo)==null?void 0:bt.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:gt,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({},nt),xe.createElement(le.op,{style:{borderRadius:2}},xe.createElement("i",{className:"icon-shangchuan3 mr5 font14"}),"\u4E0A\u4F20\u6587\u4EF6")),xe.createElement("div",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px",position:"absolute",left:"115px",top:"-2px"}},xe.createElement("div",null,"1.\u5355\u4E2A\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7",(0,he.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${(Pt=Ct==null?void 0:Ct.userInfo)==null?void 0:Pt.cloud_space}GB\uFF0C`,"\u6587\u4EF6\u540D\u4E0D\u8D85\u8FC760\u5B57")))),xe.createElement("div",{className:Ae.box},ht.map(Et=>xe.createElement("div",{key:Et.id,className:Ae.row},xe.createElement("div",{className:Ae.icon},Et.status==="done"&&xe.createElement("i",{className:"iconfont icon-wancheng",style:{color:"#19CB70"}}),Et.status==="error"&&xe.createElement("i",{className:"iconfont icon-cuowu",style:{color:"#E30000",marginLeft:1,fontSize:13}})),xe.createElement("div",{style:{width:176}},xe.createElement(Ee.Z,{title:Et==null?void 0:Et.name},xe.createElement("div",{style:{color:Et.status==="error"?"#E30000":"#3061D0",textDecoration:"underline"}},(0,be.tP)(Et==null?void 0:Et.name,9))),Et.status==="uploading"&&xe.createElement(ke.Z,{strokeColor:"#3061D0",trailColor:"rgba(144, 150, 163, 0.1)",percent:Et.percent,showInfo:!1,size:[168,4]})),xe.createElement("i",{onClick:()=>Re(Et),className:"iconfont icon-shanchu14 font14 ml20 mr20",style:{cursor:"pointer",color:"#F65160"}}),xe.createElement(Gt.default,{value:Et.description,onChange:Ft=>{St(Kt=>{const Yt=Kt.findIndex(Vt=>Vt.name===Et.name);return Kt[Yt].description=Ft.target.value,[...Kt]})},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:vt,tags:yt})),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(_n,Mn,ft){"use strict";ft.r(Mn),ft.d(Mn,{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),Ae=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"},be=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),he=ft(60242),pe=ft(84816),xe=ft(61186),je=ft.n(xe),De=ft(51257),Fe=ft(79809),Te=ft(38986),Me=ft(47257),Be=ft.n(Me),Ge=ft(16253),Ye=ft(1012),Ke=ft(48790),Xe=ft(59301),ot=Object.defineProperty,lt=Object.defineProperties,ct=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,xt=(En,Tn,Dn)=>Tn in En?ot(En,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):En[Tn]=Dn,bt=(En,Tn)=>{for(var Dn in Tn||(Tn={}))Je.call(Tn,Dn)&&xt(En,Dn,Tn[Dn]);if(Ct)for(var Dn of Ct(Tn))rt.call(Tn,Dn)&&xt(En,Dn,Tn[Dn]);return En},Pt=(En,Tn)=>lt(En,ct(Tn)),ht=(En,Tn,Dn)=>new Promise((Pr,Br)=>{var Ar=Ut=>{try{Zt(Dn.next(Ut))}catch(Un){Br(Un)}},Qt=Ut=>{try{Zt(Dn.throw(Ut))}catch(Un){Br(Un)}},Zt=Ut=>Ut.done?Pr(Ut.value):Promise.resolve(Ut.value).then(Ar,Qt);Zt((Dn=Dn.apply(En,Tn)).next())});const St=({polls:En,globalSetting:Tn,loading:Dn,dispatch:Pr,user:Br,dataSetInfo:Ar,indexType:Qt,getInfo:Zt})=>{const Ut=(0,Gt.useParams)(),[Un,pr]=(0,at.useState)(!1),[mr,xn]=(0,at.useState)(0),Yn=(0,at.useRef)(null),Hn=(0,at.useRef)(null),[Qr,$r]=(0,at.useState)(""),[Mt,Wt]=(0,at.useState)(""),[Fn]=se.default.useForm(),[zn,tn]=(0,at.useState)([]),Nn=(0,at.useRef)([]),[jn,Ln]=(0,at.useState)(!1),[An,Kn]=(0,at.useState)(!1),[Jn,er]=(0,at.useState)(""),Wr=zn.some(cr=>cr.status==="uploading"),[Cr,Tr]=(0,at.useState)(!1),[ln,ri]=(0,at.useState)([]),[di,_i]=(0,at.useState)(!1),[pn,Xn]=(0,at.useState)(0),[rr,ir]=(0,at.useState)({page:1,limit:10,type:"",id:""}),wr=(cr,on)=>ht(void 0,null,function*(){_i(!0);const or=yield(0,pe.iw)({container_type:cr||(rr==null?void 0:rr.type),container_id:on||(rr==null?void 0:rr.id),page:rr.page,limit:rr.limit});ri(or==null?void 0:or.data),Xn(or==null?void 0:or.total_count),_i(!1)});(0,at.useEffect)(()=>{var cr;((cr=Yn==null?void 0:Yn.current)==null?void 0:cr.clientHeight)>80?xn(1):xn(0)},[Qr]),(0,at.useEffect)(()=>{Nn.current=zn},[zn]),(0,at.useEffect)(()=>{$r(Ar==null?void 0:Ar.introduce),Wt(Ar==null?void 0:Ar.introduce)},[Ar==null?void 0:Ar.introduce]);const Rr={multiple:!1,withCredentials:!0,showUploadList:!1,fileList:zn==null?void 0:zn.map(cr=>cr.file),beforeUpload:cr=>ht(void 0,null,function*(){var on,or,an,gr,Vr;if(((gr=(an=(or=(on=cr.name)==null?void 0:on.split("."))==null?void 0:or.slice(0,-1))==null?void 0:an.join("."))==null?void 0:gr.length)>60)return Ee.ZP.warning(`\u300A${cr.name}\u300B\u6587\u4EF6\u540D\u79F0\u8FC7\u957F\uFF0C\u65E0\u6CD5\u4E0A\u4F20`),Promise.reject();if([...Nn.current.map(Zr=>Zr.name)].includes(cr.name))return Ee.ZP.warning(`\u300A${cr.name}\u300B\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`),Promise.reject();if(cr.size/1024/1024/1024>2)return Ee.ZP.warning(`\u300A${cr.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 hi={id:String(Math.random()).slice(-6),name:cr.name,size:cr.size,file:cr,description:"",percent:0,status:"uploading"};return oi(hi,{login:(Vr=Br==null?void 0:Br.userInfo)==null?void 0:Vr.login,container_type:"DataSet",container_id:null,description:"",realFileName:!1}),tn(Zr=>[...Zr,hi]),Promise.reject()})},Kr=cr=>ht(void 0,null,function*(){var on,or,an;const gr=Nn.current.find(Vr=>Vr.name===cr.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:(or=gr==null?void 0:gr.response)==null?void 0:or.attachment_id}})),gr!=null&&gr.client&&((an=gr==null?void 0:gr.client)==null||an.cancel()),tn(Vr=>Vr.filter(ti=>ti.name!==cr.name))}),ii=()=>{var cr;(cr=Nn.current)==null||cr.forEach(on=>{var or;on!=null&&on.client&&((or=on==null?void 0:on.client)==null||or.cancel())})},oi=(cr,on)=>ht(void 0,null,function*(){var or,an,gr,Vr,ti,Ni,hi,Zr,Ui;on.file_name=cr.name;const en=cr.name,fn=yield(0,Te.ZP)("/api/buckets/get_data_set_token.json",{method:"get"});if((fn==null?void 0:fn.status)!==0){tn(Gn=>(Gn[Gn.findIndex(fr=>fr.name===en)].status="error",[...Gn])),Ee.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}fn.data=JSON.parse((0,Ge.pe)(fn.data));const $t=new(Be())({endpoint:(or=fn==null?void 0:fn.data)==null?void 0:or.end_point,region:(an=fn==null?void 0:fn.data)==null?void 0:an.region,accessKeyId:(gr=fn==null?void 0:fn.data)==null?void 0:gr.access_key_id,accessKeySecret:(Vr=fn==null?void 0:fn.data)==null?void 0:Vr.access_key_secret,bucket:(ti=fn==null?void 0:fn.data)==null?void 0:ti.bucket,stsToken:(Ni=fn==null?void 0:fn.data)==null?void 0:Ni.security_token}),st=cr.name.split(".");st.pop();const Bn=on.realFileName?st.join("."):(0,Ye.Z)();$t.multipartUpload(`datasets/${on==null?void 0:on.login}/${Bn}${en.indexOf(".")>-1?"."+en.split(".").pop():""}`,new Blob([cr.file],{type:cr.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Gn,fr,ur)=>{console.log("\u8FDB\u5EA6",Gn,fr,ur),console.log("client--",$t),tn(qn=>{const gn=qn.findIndex(Rn=>Rn.name===en);return gn!==-1&&(qn[gn].client=$t,qn[gn].percent=Gn*100,qn[gn].checkpoint=fr),[...qn]})},checkpoint:(Zr=Nn.current[(hi=Nn.current)==null?void 0:hi.findIndex(Gn=>Gn.name===en)])==null?void 0:Zr.checkpoint,callback:{customValue:{id:en+""},url:(Ui=fn==null?void 0:fn.data)==null?void 0:Ui.callback_url,host:fn==null?void 0:fn.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(Gn){tn(fr=>{var ur,qn,gn;const Rn=fr.findIndex(kn=>kn.name===en);let Vn="done";return Rn!==-1&&(((ur=Gn.data)==null?void 0:ur.status)===0?fr[Rn].response=(qn=Gn.data)==null?void 0:qn.data:(Ee.ZP.warning((gn=Gn.data)==null?void 0:gn.message),Vn="error"),fr[Rn].status=Vn),[...fr]})}).catch(function(Gn){console.log("\u63A5\u53E3\u9519\u8BEF\uFF1A",Gn),(Gn==null?void 0:Gn.name)!=="cancel"&&tn(fr=>{const ur=fr.findIndex(qn=>qn.name===en);return ur!==-1&&(fr[ur].status="error"),[...fr]})})});return Xe.createElement("div",{className:fe.content},!Un&&!Qr&&Qt&&Xe.createElement("div",{className:fe.introduceNoData,onClick:()=>{pr(!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")),!Un&&Qr&&Xe.createElement("div",{className:fe.introduceContent},Xe.createElement("div",{className:fe.introduceTitle},"\u6570\u636E\u96C6\u4ECB\u7ECD",Qt&&Xe.createElement("i",{className:"icon icon-bianji9 font14 ml10",style:{color:"#3061D0",cursor:"pointer"},onClick:()=>{pr(!0)}})),Xe.createElement("div",{className:fe.introContentWrap},Xe.createElement("div",null,Xe.createElement("div",{ref:Hn,style:mr>0?{height:mr===1?80:"auto",overflow:mr===1?"hidden":"auto"}:{paddingRight:0}},Xe.createElement("div",{ref:Yn},Xe.createElement(te.Z,{value:Qr,style:{fontSize:"14px"}}))),!!mr&&Xe.createElement(at.Fragment,null,mr===1?Xe.createElement("div",{onClick:()=>{xn(2)},className:fe.action},"\u5C55\u5F00",Xe.createElement("i",{className:"iconfont icon-zhankaixiaojiantou",style:{fontSize:"10px",marginLeft:"3px"}})):Xe.createElement("div",{onClick:()=>{xn(1)},className:fe.action},"\u6536\u8D77",Xe.createElement("i",{className:"iconfont icon-shouqixiaojiantou",style:{fontSize:"10px",marginLeft:"3px"}})))))),Un&&Xe.createElement("div",{style:{marginTop:"30px"}},Xe.createElement(z.Z,{watch:!0,onChange:cr=>{Wt(cr)},defaultValue:Mt,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:cr=>{cr.stopPropagation(),pr(!1)}},"\u53D6\u6D88"),Xe.createElement("div",{className:fe.submit,onClick:cr=>{cr.stopPropagation(),(0,pe.R2)({id:Ut==null?void 0:Ut.id,introduce:Mt}).then(on=>{(on==null?void 0:on.status)==0&&(Ee.ZP.success("\u64CD\u4F5C\u6210\u529F"),pr(!1),Zt(!0))})}},"\u786E\u8BA4"))),Xe.createElement("div",{className:fe.fileTable},Xe.createElement("div",null,"\u6587\u4EF6\u5217\u8868"),Qt&&Xe.createElement("div",{className:fe.addBtn,onClick:()=>{Ln(!0)}},"\u4E0A\u4F20\u6587\u4EF6")),Xe.createElement(Ae.default,{dataSource:Ar==null?void 0:Ar.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:cr=>Xe.createElement("span",{style:{color:"#666666"}},cr?je()(cr).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:(cr,on)=>Xe.createElement("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:()=>ht(void 0,null,function*(){var or;((0,Ke.Ny)()||((or=Br==null?void 0:Br.userInfo)==null?void 0:or.login)==="mfflo3p2e")&&(Tr(!0),rr.type=on==null?void 0:on.container_type,rr.id=on==null?void 0:on.container_id,rr.page=1,rr.limit=10,ir(bt({},rr)),yield wr(on==null?void 0:on.container_type,on==null?void 0:on.container_id))})},cr||"0")},{title:"\u64CD\u4F5C",align:"right",dataIndex:"role",width:Qt?130:60,render:(cr,on,or)=>Xe.createElement("span",{style:{color:"#3061D0"}},Xe.createElement("div",{style:{display:"flex"}},Xe.createElement("div",{style:{marginRight:"10px",color:"#3061D0",cursor:"pointer"},onClick:()=>ht(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}),Zt()})},"\u4E0B\u8F7D"),Qt&&Xe.createElement("div",{style:{marginRight:"10px",color:"#3061D0",cursor:"pointer"},onClick:()=>{var an,gr,Vr,ti;let Ni=(gr=on==null?void 0:on.title)==null?void 0:gr.substring(((an=on==null?void 0:on.title)==null?void 0:an.lastIndexOf("."))+1);Fn.setFieldsValue({title:(ti=on==null?void 0:on.title)==null?void 0:ti.substring(0,(Vr=on==null?void 0:on.title)==null?void 0:Vr.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:Fn,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,".",Ni)})),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:()=>ht(void 0,null,function*(){yield Fn.validateFields(),(0,pe.A0)({id:Ut==null?void 0:Ut.id,attachment_id:on.id,filename:Fn.getFieldValue("title")+"."+Ni,description:Fn.getFieldValue("description")}).then(hi=>{(hi==null?void 0:hi.status)==0&&(Ee.ZP.success("\u7F16\u8F91\u6210\u529F"),Zt())})})})}},"\u7F16\u8F91"),Qt&&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:()=>ht(void 0,null,function*(){(0,pe.Il)({attachment_id:on==null?void 0:on.id}).then(an=>{(an==null?void 0:an.status)==0&&(Ee.ZP.success("\u5220\u9664\u6210\u529F"),Pr({type:"user/getUserInfo"}),Zt(!0))})})})}},"\u5220\u9664")))}]}),Xe.createElement(de.default,{centered:!0,keyboard:!1,maskClosable:!1,destroyOnClose:!0,open:jn,title:"\u4E0A\u4F20\u6587\u4EF6",okButtonProps:{loading:An,disabled:Wr},width:"1000px",onOk:()=>ht(void 0,null,function*(){const cr=zn.map(or=>{var an;return{attachment_id:(an=or.response)==null?void 0:an.attachment_id,description:Jn}});if(zn.length===0){Ee.ZP.info("\u8BF7\u5148\u4E0A\u4F20\u6587\u4EF6\uFF01");return}Kn(!0);const on=yield(0,Te.ZP)(`/api/data_sets/${Ut==null?void 0:Ut.id}/upload_attachments.json`,{method:"post",body:{attachments:cr}});(on==null?void 0:on.status)==0&&(Ee.ZP.success("\u4E0A\u4F20\u6210\u529F\uFF01"),Zt(),Ln(!1),Pr({type:"user/getUserInfo"})),Kn(!1)}),onCancel:()=>{if(Wr){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:()=>{Ln(!1)}});return}Ln(!1)},afterClose:()=>{tn([]),er(""),Kn(!1),ii()}},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,Pt(bt({},Rr),{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},zn.map(cr=>Xe.createElement("div",{key:cr.id,className:fe.row},Xe.createElement("div",{style:{display:"flex",alignItems:"center"}},Xe.createElement("div",{className:fe.icon},cr.status==="done"&&Xe.createElement("i",{className:"iconfont icon-wancheng",style:{color:"#19CB70"}}),cr.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:cr==null?void 0:cr.name},Xe.createElement("div",{style:{width:"100%",color:cr.status==="error"?"#E30000":"#3061D0",textDecoration:"underline"}},(0,De.tP)(cr==null?void 0:cr.name,9))),cr.status==="uploading"&&Xe.createElement(he.Z,{strokeColor:"#3061D0",trailColor:"rgba(144, 150, 163, 0.1)",percent:cr.percent,showInfo:!1,style:{width:"900px"}}))),Xe.createElement("i",{onClick:()=>Kr(cr),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:Jn,onChange:cr=>{er(cr.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:Cr,title:"\u4E0B\u8F7D\u4FE1\u606F",width:"730px",onCancel:()=>{Tr(!1)},footer:null},Xe.createElement("div",null,Xe.createElement(Ae.default,{dataSource:ln,scroll:{y:47*6},className:"mt10 mb10",loading:di,pagination:{total:pn||0,onChange:(cr,on)=>ht(void 0,null,function*(){rr.page=cr,rr.limit=on,ir(bt({},rr)),yield wr()}),onShowSizeChange:(cr,on)=>ht(void 0,null,function*(){rr.page=1,rr.limit=on,ir(bt({},rr)),yield wr()}),current:rr==null?void 0:rr.page,pageSize:rr==null?void 0:rr.limit,showTotal:cr=>Xe.createElement(Xe.Fragment,null,"\u5171",Xe.createElement("span",{className:"ml5 mr5",style:{color:"#3061d0"}},cr),"\u6761\u6570\u636E")},columns:[{title:"\u67E5\u770B\u4EBA",align:"left",width:150,dataIndex:"real_name",ellipsis:!0,render:cr=>Xe.createElement("span",null,cr||"--")},{title:"\u5355\u4F4D",align:"left",width:260,ellipsis:!0,dataIndex:"school_name",render:cr=>Xe.createElement("span",null,cr||"--")},{title:"\u90E8\u95E8",align:"left",width:150,ellipsis:!0,dataIndex:"department_name",render:cr=>Xe.createElement("span",null,cr||"--")},{title:"\u67E5\u770B\u65F6\u95F4",dataIndex:"created_at",ellipsis:!0,render:cr=>Xe.createElement("span",{style:{color:"#666666"}},cr?je()(cr).format("YYYY-MM-DD"):"--")}]}))))};var mt=(0,Gt.connect)(({polls:En,loading:Tn,user:Dn,globalSetting:Pr})=>({polls:En,globalSetting:Pr,user:Dn,loading:Tn.effects}))(St),Nt=ft(26227),dt=ft(77019),Dt=ft(5269),gt=ft(99571),yt={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"},tt=ft(94670),He=ft(59301),we=Object.defineProperty,Ne=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Ze=(En,Tn,Dn)=>Tn in En?we(En,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):En[Tn]=Dn,qe=(En,Tn)=>{for(var Dn in Tn||(Tn={}))Re.call(Tn,Dn)&&Ze(En,Dn,Tn[Dn]);if(nt)for(var Dn of nt(Tn))_e.call(Tn,Dn)&&Ze(En,Dn,Tn[Dn]);return En},ut=(En,Tn)=>Ne(En,Ve(Tn)),vt=(En,Tn,Dn)=>new Promise((Pr,Br)=>{var Ar=Ut=>{try{Zt(Dn.next(Ut))}catch(Un){Br(Un)}},Qt=Ut=>{try{Zt(Dn.throw(Ut))}catch(Un){Br(Un)}},Zt=Ut=>Ut.done?Pr(Ut.value):Promise.resolve(Ut.value).then(Ar,Qt);Zt((Dn=Dn.apply(En,Tn)).next())});je().locale("ZH-cn");function At({user:En,vlist:Tn=[],dispatch:Dn,params:Pr,id:Br,memo_replies:Ar,forumsDetail:Qt}){return He.createElement("aside",{className:yt.comment},Tn.map(function(Zt,Ut){var Un,pr;return He.createElement(dt.Z,{key:Ut,className:yt.commentItem},He.createElement(Dt.Z,{span:24},He.createElement(dt.Z,null,He.createElement(Dt.Z,{flex:"1"},He.createElement("a",{href:`/users/${Zt.user_login}`,target:"_blank",style:{color:"#9096A3",fontSize:"12px"}},Zt==null?void 0:Zt.username),He.createElement("span",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px"}},Zt.time)),(Zt.can_delete||Zt.user_id===((Un=En.userInfo)==null?void 0:Un.user_id)||Zt.user_login===((pr=En.userInfo)==null?void 0:pr.login))&&He.createElement(Dt.Z,{className:"forums-comment-delete",style:{display:"none"}},He.createElement(Ie.Z,{title:"\u5220\u9664"},He.createElement(Nt.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:()=>vt(this,null,function*(){const mr=yield(0,tt.sW)({id:Zt.id,memo_type:"data_set"}),xn=Ar.find(Yn=>Yn.id===Br).children.filter(Yn=>Yn.id!==Zt.id);Ar.find(Yn=>Yn.id===Br).children=xn,Dn({type:"forumsDetail/setForumsDetailData",payload:ut(qe({},Qt.forumsDetailData),{memo_replies:[...Ar],memo_type:"data_set"})})})})}}))))),He.createElement(Dt.Z,null,He.createElement(te.Z,{value:Zt.content,style:{color:"#232B40",fontSize:"14px"}})))}))}var Et=At,Ft=ft(59301),Kt=Object.defineProperty,Yt=Object.defineProperties,Vt=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,un=(En,Tn,Dn)=>Tn in En?Kt(En,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):En[Tn]=Dn,Sn=(En,Tn)=>{for(var Dn in Tn||(Tn={}))sn.call(Tn,Dn)&&un(En,Dn,Tn[Dn]);if(Ht)for(var Dn of Ht(Tn))rn.call(Tn,Dn)&&un(En,Dn,Tn[Dn]);return En},vn=(En,Tn)=>Yt(En,Vt(Tn)),Cn=(En,Tn,Dn)=>new Promise((Pr,Br)=>{var Ar=Ut=>{try{Zt(Dn.next(Ut))}catch(Un){Br(Un)}},Qt=Ut=>{try{Zt(Dn.throw(Ut))}catch(Un){Br(Un)}},Zt=Ut=>Ut.done?Pr(Ut.value):Promise.resolve(Ut.value).then(Ar,Qt);Zt((Dn=Dn.apply(En,Tn)).next())});je().locale("ZH-cn");const On=({user:En,forumsDetail:Tn,globalSetting:Dn,loading:Pr,dispatch:Br,handleClick:Ar,memoId:Qt},Zt)=>{const{memo:Ut,memo_replies:Un}=Tn.forumsDetailData||{},pr=(0,Gt.useParams)(),[mr,xn]=(0,at.useState)(""),[Yn,Hn]=(0,at.useState)(""),[Qr,$r]=(0,at.useState)(-1),[Mt,Wt]=(0,at.useState)(!1),[Fn,zn]=(0,at.useState)(!1),[tn,Nn]=(0,at.useState)(1);(0,at.useEffect)(()=>{Wt((Ut==null?void 0:Ut.reply_for_memo_count)>10)},[Ut==null?void 0:Ut.reply_for_memo_count]),(0,at.useEffect)(()=>{Br({type:"forumsDetail/getForumsDetailData",payload:{id:Qt,memo_type:"data_set"}})},[]);const jn=()=>Cn(void 0,null,function*(){var An;const Kn=tn+1;Nn(Kn);const Jn=yield(0,tt.z5)({id:Qt,page:Kn,memo_type:"data_set"});Jn!=null&&Jn.memo_replies&&(Br({type:"forumsDetail/setForumsDetailData",payload:vn(Sn({},Tn.forumsDetailData),{memo_replies:[...Un,...Jn.memo_replies]})}),Wt(((An=Jn.memo_replies)==null?void 0:An.length)===10))}),Ln=An=>{var Kn,Jn,er,Wr;return vn(Sn({},An),{image_url:(Kn=En.userInfo)==null?void 0:Kn.image_url,children:[],user_id:(Jn=En.userInfo)==null?void 0:Jn.user_id,user_login:(er=En.userInfo)==null?void 0:er.login,username:(Wr=En.userInfo)==null?void 0:Wr.username,time:`${(0,De.li)((new Date().getTime()-new Date(An.created_at).getTime())/1e3)}\u524D`})};return Ft.createElement("section",{className:yt.wrap},!!(Un!=null&&Un.length)&&Ft.createElement("aside",{className:yt.content},Ft.createElement("aside",{className:yt.replyList},Un==null?void 0:Un.map(function(An,Kn){var Jn,er,Wr;return Ft.createElement(dt.Z,{gutter:[12,12],key:Kn},Ft.createElement(Dt.Z,{flex:"40px"},Ft.createElement("a",{href:`/users/${An.user_login}`,target:"_blank"},Ft.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",width:"46",height:"46",src:`${be.Z.IMG_SERVER}/images/${An==null?void 0:An.image_url}`}))),Ft.createElement(Dt.Z,{flex:"1"},Ft.createElement(dt.Z,{align:"middle",className:yt.commentParItem},Ft.createElement(Dt.Z,{span:24},Ft.createElement(dt.Z,null,Ft.createElement(Dt.Z,{flex:"1"},Ft.createElement("a",{href:`/users/${An.user_login}`,target:"_blank"},Ft.createElement("span",{style:{color:"#9096A3",fontSize:"12px"}},An==null?void 0:An.username)),Ft.createElement("span",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px"}},An.time)),(An.can_delete||An.user_id===((Jn=En.userInfo)==null?void 0:Jn.user_id)||An.user_login===((er=En.userInfo)==null?void 0:er.login))&&Ft.createElement(Dt.Z,{className:"forums-comment-par-delete",style:{display:"none"}},Ft.createElement(Ie.Z,{title:"\u5220\u9664"},Ft.createElement(Nt.Z,{className:"current",onClick:()=>{de.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Ft.createElement("div",{className:"font16 tc"},"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"),onOk:()=>Cn(this,null,function*(){const Cr=yield(0,tt.sW)({id:An.id,memo_type:"data_set"}),Tr=Un.filter(ln=>ln.id!==An.id);Br({type:"forumsDetail/setForumsDetailData",payload:vn(Sn({},Tn.forumsDetailData),{memo_replies:[...Tr],memo_type:"data_set"})})})})}}))))),Ft.createElement(Dt.Z,{span:24,style:{marginTop:"5px"}},Ft.createElement("div",{onClick:Ar},Ft.createElement(te.Z,{value:An.content,style:{color:"#232B40",fontSize:"14px"}}))),!!((Wr=An==null?void 0:An.children)!=null&&Wr.length)&&Ft.createElement(Et,{user:En,id:An==null?void 0:An.id,vlist:An==null?void 0:An.children,dispatch:Br,params:pr,memo_replies:Un,forumsDetail:Tn}),Ft.createElement(Dt.Z,{span:24,className:"mt5 c-light-black"},Qr===Kn?Ft.createElement("aside",null,Ft.createElement(z.Z,{onChange:Cr=>{Hn(Cr)},height:150,isFocus:!0,placeholder:"\u6211\u8981\u56DE\u590D..."}),Ft.createElement(dt.Z,null,Ft.createElement(Dt.Z,{span:24,className:"tr"},Ft.createElement(gt.ZP,{type:"primary",size:"middle",onClick:()=>Cn(this,null,function*(){if(Yn==="")Ee.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const Cr=yield(0,tt.ts)({parent_id:An.id,content:Yn,memo_type:"data_set"});Hn(null),Cr&&($r(-1),Un.find(Tr=>Tr.id===Cr.parent_id).children.push(Ln(Cr)),Br({type:"forumsDetail/setForumsDetailData",payload:vn(Sn({},Tn.forumsDetailData),{memo:vn(Sn({},Ut),{reply_for_memo_count:(Ut==null?void 0:Ut.reply_for_memo_count)+1}),memo_replies:[...Un],memo_type:"data_set"})}))}})},"\u53D1\u9001")))):Ft.createElement("div",{className:"tr",style:{textAlign:"left"}},Ft.createElement("span",{className:"iconfont icon-xiaopinglun mr30 current font14",onClick:()=>$r(Kn)}),Ft.createElement(Ie.Z,{title:An.user_praise?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},Ft.createElement("span",{className:An.user_praise?"c-orange":"c-gery-888"},Ft.createElement("i",{className:"iconfont icon-dianzan4 mr5 current font14",onClick:()=>Cn(this,null,function*(){const Cr=yield(0,tt.vL)({id:An.id,container_type:"Memo",type:An.user_praise?0:1,memo_type:"data_set"});(Cr==null?void 0:Cr.praise_count)>=0&&(Un.find(Tr=>Tr.id===An.id).user_praise=!An.user_praise,Un.find(Tr=>Tr.id===An.id).praise_count=Cr==null?void 0:Cr.praise_count,Br({type:"forumsDetail/setForumsDetailData",payload:vn(Sn({},Tn.forumsDetailData),{memo_replies:[...Un],memo_type:"data_set"})}))})}),An.praise_count>0?An.praise_count:"")))))))}))),Mt&&Ft.createElement("aside",{className:"bg-white pb20",style:{display:"flex",justifyContent:"center",marginTop:"20px"}},Ft.createElement(dt.Z,{justify:"space-between"},Ft.createElement(Dt.Z,null),Ft.createElement(Dt.Z,null,Mt&&Ft.createElement("a",{style:{color:"#3061D0",fontSize:"14px"},onClick:jn},"\u67E5\u770B\u66F4\u591A\u8BC4\u8BBA",Ft.createElement("i",{className:"icon icon-zhankaixiaojiantou ",style:{fontSize:"10px",marginLeft:"3px"}}))))),Ft.createElement("aside",{className:yt.reply},Ft.createElement(z.Z,{onBlur:()=>zn(!1),isFocus:Fn,defaultValue:mr,id:"writeForumsReviewId",onChange:An=>{xn(An)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Ft.createElement(dt.Z,null,Ft.createElement(Dt.Z,{flex:"1"}),Ft.createElement(Dt.Z,null,Ft.createElement("div",{className:yt.submitStyle,style:{width:"60px",height:"32px",textAlign:"center"},onClick:()=>Cn(void 0,null,function*(){if(mr==="")Ee.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const An=yield(0,tt.ts)({parent_id:Ut==null?void 0:Ut.id,content:mr,memo_type:"data_set"});xn(null),An&&Br({type:"forumsDetail/setForumsDetailData",payload:vn(Sn({},Tn.forumsDetailData),{memo:vn(Sn({},Ut),{reply_for_memo_count:(Ut==null?void 0:Ut.reply_for_memo_count)+1}),memo_replies:[Ln(An),...Un],memo_type:"data_set"})})}})},"\u53D1\u9001")))))};var Dr=(0,Gt.connect)(({user:En,forumsDetail:Tn,loading:Dn,globalSetting:Pr})=>({user:En,forumsDetail:Tn,globalSetting:Pr,loading:Dn.models.forumsDetail}),null,null,{forwardRef:!0})((0,at.forwardRef)(On)),Sr=ft(9148),qr=ft(33633),tr=ft(59301),ai=Object.defineProperty,gi=Object.getOwnPropertySymbols,fi=Object.prototype.hasOwnProperty,Di=Object.prototype.propertyIsEnumerable,ki=(En,Tn,Dn)=>Tn in En?ai(En,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):En[Tn]=Dn,Jr=(En,Tn)=>{for(var Dn in Tn||(Tn={}))fi.call(Tn,Dn)&&ki(En,Dn,Tn[Dn]);if(gi)for(var Dn of gi(Tn))Di.call(Tn,Dn)&&ki(En,Dn,Tn[Dn]);return En},Li=(En,Tn,Dn)=>new Promise((Pr,Br)=>{var Ar=Ut=>{try{Zt(Dn.next(Ut))}catch(Un){Br(Un)}},Qt=Ut=>{try{Zt(Dn.throw(Ut))}catch(Un){Br(Un)}},Zt=Ut=>Ut.done?Pr(Ut.value):Promise.resolve(Ut.value).then(Ar,Qt);Zt((Dn=Dn.apply(En,Tn)).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 Mr=({polls:En,globalSetting:Tn,loading:Dn,dispatch:Pr,user:Br})=>{var Ar,Qt,Zt;const Ut=(0,Gt.useParams)(),[Un]=(0,Gt.useSearchParams)(),[pr,mr]=(0,at.useState)(!1),[xn,Yn]=(0,at.useState)(1),[Hn,Qr]=(0,at.useState)(null),[$r,Mt]=(0,at.useState)(""),[Wt,Fn]=(0,at.useState)(),[zn,tn]=(0,at.useState)(1),[Nn,jn]=(0,at.useState)(1),Ln=(0,at.useRef)([]),[An,Kn]=(0,at.useState)([]),[Jn,er]=(0,at.useState)(!1),[Wr,Cr]=(0,at.useState)(!1),[Tr,ln]=(0,at.useState)(!1),[ri,di]=(0,at.useState)([]),[_i,pn]=(0,at.useState)(!1),[Xn,rr]=(0,at.useState)(0),[ir,wr]=(0,at.useState)({page:1,limit:10}),Rr=()=>Li(void 0,null,function*(){pn(!0);const or=yield(0,pe.iw)({container_type:Hn==null?void 0:Hn.container_type,container_id:Hn==null?void 0:Hn.container_id,page:ir==null?void 0:ir.page,limit:ir==null?void 0:ir.limit});(or==null?void 0:or.status)==0&&(di(or==null?void 0:or.data),rr(or==null?void 0:or.total_count),pn(!1))});(0,at.useEffect)(()=>{oi(),(0,Te.ZP)("/api/teach_group_shares.json",{method:"get"}).then(or=>{(or==null?void 0:or.status)==0&&Kn(or==null?void 0:or.groups)})},[]),(0,at.useEffect)(()=>{xn==2&&ii()},[xn,zn]);const Kr=(or,an)=>(or=Math.max(or,0),an=Math.max(an,1),Math.ceil(or/an)),ii=()=>{(0,pe.Ce)({id:Ut==null?void 0:Ut.id,page:zn,limit:16}).then(or=>{var an,gr;(or==null?void 0:or.status)==0&&(Fn((an=or==null?void 0:or.data)==null?void 0:an.shixuns),jn(Kr((gr=or==null?void 0:or.data)==null?void 0:gr.count,16)))})},oi=(or=!1)=>{Cr(!0),(0,pe.Ru)(Ut==null?void 0:Ut.id).then(an=>{var gr,Vr;(an==null?void 0:an.status)==0&&(Qr(an==null?void 0:an.data),mr((0,Ke.Ny)()||((gr=an==null?void 0:an.data)==null?void 0:gr.is_creator)),Ln.current=(Vr=an==null?void 0:an.data)==null?void 0:Vr.share_group_ids,or&&Mt(new Date),Cr(!1))})},cr=()=>{er(!1)},on=()=>{oi(),er(!1)};return tr.createElement(oe.Z,{spinning:Wr},tr.createElement("section",{className:me.bg},Hn&&tr.createElement(tr.Fragment,null,tr.createElement("div",{className:"edu-container"},tr.createElement("aside",{className:"mt10"},tr.createElement(Ue.Z,{separator:">"},tr.createElement(Ue.Z.Item,null,tr.createElement(Gt.Link,{to:"/dataset"},"\u6570\u636E\u96C6")),tr.createElement(Ue.Z.Item,null,tr.createElement(Gt.Link,{to:`/dataset?tabId=${Un.get("tabId")}`},et[Un.get("tabId")])),tr.createElement(Ue.Z.Item,null,Hn==null?void 0:Hn.title))),tr.createElement("aside",{className:me.wrap},tr.createElement("div",{className:me.leftContent,style:{width:pr?"78%":"87%"}},tr.createElement("div",{className:me.header},tr.createElement("div",{className:me.headerBack,onClick:()=>{Gt.history.push(`/dataset?tabId=${Un.get("tabId")}`)}},tr.createElement("i",{className:"iconfont icon-fanhui4 ",style:{fontSize:"10px",margin:"0 3px 0 5px"}}),"\u8FD4\u56DE"),tr.createElement("div",{className:me.title},Hn==null?void 0:Hn.title),tr.createElement("div",{className:me.time},Hn==null?void 0:Hn.create_at)),tr.createElement("div",{className:me.introduction},Hn==null?void 0:Hn.desc),tr.createElement("div",{className:me.bottom},((Ar=Hn==null?void 0:Hn.user_info)==null?void 0:Ar.image_url)&&tr.createElement("img",{className:me.user_img,alt:"\u7528\u6237\u5934\u50CF",src:`${be.Z.IMG_SERVER}/images/${(Qt=Hn==null?void 0:Hn.user_info)==null?void 0:Qt.image_url}`}),tr.createElement("div",{className:me.user_name},Hn==null?void 0:Hn.user_info_name),(Zt=Hn==null?void 0:Hn.data_set_tags)==null?void 0:Zt.map((or,an)=>{var gr;return an<3?tr.createElement("div",{key:an,className:me.tags_name},or==null?void 0:or.tag_name):an==3?tr.createElement(Ie.Z,{key:an,title:(gr=Hn==null?void 0:Hn.data_set_tags)==null?void 0:gr.map((Vr,ti)=>{var Ni;if(ti>2)return(Vr==null?void 0:Vr.tag_name)+(ti===((Ni=Hn==null?void 0:Hn.data_set_tags)==null?void 0:Ni.length)-1?"":"\u3001")}).join("")},tr.createElement("div",{key:an,className:me.tags_name},"...")):null}),tr.createElement("div",{className:me.buttonList},tr.createElement(Ie.Z,{title:`\u5F15\u7528\u6570\uFF1A${Hn==null?void 0:Hn.used_count}`},tr.createElement("div",{className:`${me.buttonItem} current`},tr.createElement("i",{className:"iconfont icon-yinyong font12 mr5"}),Hn==null?void 0:Hn.used_count)),tr.createElement(Ie.Z,{title:`\u6D4F\u89C8\u6570\uFF1A${Hn==null?void 0:Hn.visited_count}`},tr.createElement("div",{className:`${me.buttonItem} current`,onClick:()=>Li(void 0,null,function*(){var or;((0,Ke.Ny)()||((or=Br==null?void 0:Br.userInfo)==null?void 0:or.login)==="mfflo3p2e")&&(ln(!0),ir.page=1,ir.limit=10,wr(Jr({},ir)),yield Rr())})},tr.createElement("i",{className:"iconfont icon-chakanrenshu font12 mr5"}),Hn==null?void 0:Hn.visited_count)),tr.createElement(Ie.Z,{title:`\u8BC4\u8BBA\u6570\uFF1A${Hn==null?void 0:Hn.comment_count}`},tr.createElement("div",{className:`${me.buttonItem} current`},tr.createElement("i",{className:"iconfont icon-xiaopinglun font12 mr5"}),Hn==null?void 0:Hn.comment_count))))),tr.createElement("div",{className:me.rightContent,style:{width:pr?"22%":"13%"}},pr?tr.createElement("div",{style:{display:"flex",marginLeft:"auto"}},tr.createElement("div",{className:me.share,onClick:()=>Li(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:tr.createElement("div",{className:`font14 ${me.overflow}`},tr.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"),tr.createElement(ve.default.Group,{style:{marginTop:"10px"},defaultValue:Hn==null?void 0:Hn.share_group_ids,onChange:or=>{Ln.current=or}},An==null?void 0:An.map(or=>tr.createElement(ve.default,{key:or==null?void 0:or.group_id,value:or==null?void 0:or.group_id},or==null?void 0:or.name)))),onOk:()=>{(0,pe.l5)({ids:[Hn==null?void 0:Hn.id],clazz:"DataSet",group_ids:Ln.current}).then(or=>{(or==null?void 0:or.status)==0&&(Ee.ZP.success("\u5171\u4EAB\u6210\u529F"),oi())})}})})},"\u5171\u4EAB"),tr.createElement("div",{className:me.publicStyle,onClick:()=>{de.default.confirm({centered:!0,okText:"\u786E\u5B9A",icon:null,cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:(Hn==null?void 0:Hn.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":(Hn==null?void 0:Hn.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:()=>Li(void 0,null,function*(){let or;switch(Hn==null?void 0:Hn.public_status){case 0:or=(0,pe.To)(Hn==null?void 0:Hn.id);break;case 1:or=(0,pe.a6)(Hn==null?void 0:Hn.id);break;case 2:or=(0,pe.Dx)(Hn==null?void 0:Hn.id);break;default:return}or.then(an=>{(an==null?void 0:an.status)===0&&(Ee.ZP.success("\u64CD\u4F5C\u6210\u529F"),oi())})})})}},(Hn==null?void 0:Hn.public_status)==0?"\u7533\u8BF7\u516C\u5F00":(Hn==null?void 0:Hn.public_status)==1?"\u53D6\u6D88\u516C\u5F00":"\u64A4\u9500\u7533\u8BF7\u516C\u5F00"),tr.createElement(ke.Z,{menu:{items:[{label:tr.createElement("div",null,"\u7F16\u8F91"),key:"4",onClick:()=>{er(!0)}},{label:tr.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 Li(this,null,function*(){(0,pe.pP)(Hn==null?void 0:Hn.id).then(or=>{(or==null?void 0:or.status)==0&&(Ee.ZP.success("\u5220\u9664\u6210\u529F"),Gt.history.push("/dataset"))})})}})}},"\u5220\u9664"),key:"5"}]}},tr.createElement("div",{className:me.more},tr.createElement("i",{className:"iconfont icon-gengduo6 font12"})))):tr.createElement("div",{className:Hn!=null&&Hn.current_user_is_collect?me.collectActiveStyle:me.collectStyle,onClick:()=>{let or;Hn!=null&&Hn.current_user_is_collect?or=(0,pe.R9)({container_id:Hn==null?void 0:Hn.id,container_type:"DataSet"}):or=(0,pe.nW)({container_id:Hn==null?void 0:Hn.id,container_type:"DataSet"}),or.then(an=>{(an==null?void 0:an.status)===0&&oi()})}},tr.createElement("i",{className:"iconfont icon-shoucang4 font12"})," ",Hn==null?void 0:Hn.collect_count))),tr.createElement("div",{className:me.content},tr.createElement("div",{style:{display:"flex",alignItems:"center"}},tr.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:or=>{var an;Yn((an=or==null?void 0:or.target)==null?void 0:an.value)},value:xn}),tr.createElement("div",{className:me.addBtn,onClick:()=>{window.open(`/shixuns/new?dataSetId=${Ut==null?void 0:Ut.id}`)}},"\u521B\u5EFA\u5B9E\u8DF5\u9879\u76EE")),xn==1&&tr.createElement(mt,{dataSetInfo:Hn,getInfo:oi,key:$r,indexType:pr}),xn==2&&tr.createElement("div",null,tr.createElement("div",{className:me.shixunTooltip},tr.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"),tr.createElement(Sr.wb,{dataSource:Wt,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"]}),Nn>1&&tr.createElement("div",{className:me.pageStyle},tr.createElement("div",{className:zn==1?me.pageUnCan:me.pageCan,style:{marginRight:"10px"},onClick:()=>{zn>1&&tn(zn-1)}},"\u4E0A\u4E00\u9875"),tr.createElement("div",{className:zn==Nn?me.pageUnCan:me.pageCan,style:{marginLeft:"10px"},onClick:()=>{zn<Nn&&tn(zn+1)}},"\u4E0B\u4E00\u9875"))),xn==3&&tr.createElement(Dr,{memoId:Hn==null?void 0:Hn.memo_id})))),tr.createElement(qr.Z,{dataSetInfo:Hn,visible:Jn,onClose:cr,onSuccess:on}),tr.createElement(de.default,{centered:!0,keyboard:!1,maskClosable:!1,destroyOnClose:!0,open:Tr,title:"\u6D4F\u89C8\u4FE1\u606F",width:"730px",onCancel:()=>{ln(!1)},footer:null},tr.createElement("div",null,tr.createElement(Ae.default,{dataSource:ri,loading:_i,className:"mt10 mb10",scroll:{y:47*6},pagination:{total:Xn||0,onChange:(or,an)=>{ir.page=or,ir.limit=an,wr(Jr({},ir)),Rr()},current:ir==null?void 0:ir.page,pageSize:ir==null?void 0:ir.limit,showTotal:or=>tr.createElement(tr.Fragment,null,"\u5171",tr.createElement("span",{className:"ml5 mr5",style:{color:"#3061d0"}},or),"\u6761\u6570\u636E")},columns:[{title:"\u67E5\u770B\u4EBA",align:"left",width:150,dataIndex:"real_name",ellipsis:!0,render:or=>tr.createElement("span",null,or||"--")},{title:"\u5355\u4F4D",align:"left",width:260,ellipsis:!0,dataIndex:"school_name",render:or=>tr.createElement("span",null,or||"--")},{title:"\u90E8\u95E8",align:"left",width:150,ellipsis:!0,dataIndex:"department_name",render:or=>tr.createElement("span",null,or||"--")},{title:"\u67E5\u770B\u65F6\u95F4",dataIndex:"created_at",ellipsis:!0,render:or=>tr.createElement("span",{style:{color:"#666666"}},or?je()(or).format("YYYY-MM-DD"):"--")}]})))))};var Er=(0,Gt.connect)(({polls:En,loading:Tn,user:Dn,globalSetting:Pr})=>({polls:En,globalSetting:Pr,user:Dn,loading:Tn.effects}))(Mr)},58118:function(_n,Mn,ft){"use strict";ft.d(Mn,{Z:function(){return Ae}});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,be,fe)=>new Promise((z,te)=>{var se=he=>{try{le(fe.next(he))}catch(pe){te(pe)}},ie=he=>{try{le(fe.throw(he))}catch(pe){te(pe)}},le=he=>he.done?z(he.value):Promise.resolve(he.value).then(se,ie);le((fe=fe.apply(me,be)).next())});const Se=({user:me,width:be,selectWidth:fe,tags:z,getDataSet:te,placeholder:se="\u5168\u90E8\u6807\u7B7E",isTagsValue:ie=!1})=>{const[le,he]=(0,at.useState)([]),[pe,xe]=(0,at.useState)([]),[je,De]=(0,at.useState)(!1),Fe=(0,at.useRef)(null);(0,at.useEffect)(()=>{Te()},[]);const Te=()=>ke(void 0,null,function*(){De(!0),yield(0,ve.bj)({}).then(Be=>{(Be==null?void 0:Be.status)==0&&he(Be==null?void 0:Be.data)}),De(!1)}),Me=z==null?void 0:z.map(Be=>Be.tag_name).join("\u3001");return Ee.createElement(oe.default,{onFocus:()=>{xe(z)},ref:Fe,style:{width:fe?fe+"px":300},placeholder:(z==null?void 0:z.length)>0?ie?Ee.createElement("span",{className:"c-grey-333"},Me):`\u5DF2\u9009\u4E2D${z==null?void 0:z.length}\u4E2A\u6807\u7B7E`:se,size:"large",dropdownStyle:{width:be+"px",zIndex:1e3},className:de.selectStyle,dropdownRender:()=>Ee.createElement("div",{className:de.selectList,style:{width:be+"px"}},Ee.createElement("div",{className:de.selectHeader},"\u8BF7\u9009\u62E91\uFF5E5\u4E2A\u6807\u7B7E"),Ee.createElement(Ue.Z,{spinning:je},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(ct=>ct==null?void 0:ct.id))!=null&<.includes(Ke==null?void 0:Ke.id)?xe(pe.filter(ct=>(ct==null?void 0:ct.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:be-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 Ae=(0,Gt.connect)(({user:me})=>({user:me}))(Se)},84816:function(_n,Mn,ft){"use strict";ft.d(Mn,{A0:function(){return je},Ce:function(){return ie},Dx:function(){return me},Il:function(){return xe},R2:function(){return se},R9:function(){return z},Ru:function(){return te},SG:function(){return Fe},To:function(){return Ae},_S:function(){return Se},a6:function(){return be},bj:function(){return ke},iw:function(){return De},l5:function(){return pe},nW:function(){return fe},pP:function(){return he},pi:function(){return le}});var at=ft(38986),Gt=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,de=(Te,Me,Be)=>Me in Te?Gt(Te,Me,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Te[Me]=Be,ve=(Te,Me)=>{for(var Be in Me||(Me={}))Ue.call(Me,Be)&&de(Te,Be,Me[Be]);if(oe)for(var Be of oe(Me))Ie.call(Me,Be)&&de(Te,Be,Me[Be]);return Te},Ee=(Te,Me,Be)=>new Promise((Ge,Ye)=>{var Ke=lt=>{try{ot(Be.next(lt))}catch(ct){Ye(ct)}},Xe=lt=>{try{ot(Be.throw(lt))}catch(ct){Ye(ct)}},ot=lt=>lt.done?Ge(lt.value):Promise.resolve(lt.value).then(Ke,Xe);ot((Be=Be.apply(Te,Me)).next())});function ke(Te){return Ee(this,null,function*(){return(0,at.ZP)("/api/data_sets/tags.json",{method:"get",params:ve({},Te)})})}function Se(Te){return Ee(this,null,function*(){return(0,at.ZP)("/api/data_sets.json",{method:"get",params:ve({},Te)})})}function Ae(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/data_sets/${Te}/apply_public.json`,{method:"post"})})}function me(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/data_sets/${Te}/revoke_apply_public.json`,{method:"post"})})}function be(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 he(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/data_sets/${Te}/delete.json`,{method:"delete"})})}function pe(Te){return Ee(this,null,function*(){return(0,at.ZP)("/api/teach_group_shares.json",{method:"post",body:ve({},Te)})})}function xe(Te){return Ee(this,null,function*(){return(0,at.ZP)("/api/data_sets/single_destroy_files.json",{method:"delete",body:ve({},Te)})})}function je(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/data_sets/${Te==null?void 0:Te.id}/edit_file_info.json`,{method:"put",body:ve({},Te)})})}function De(Te){return Ee(this,null,function*(){return(0,at.ZP)("/api/visit_logs.json",{method:"get",params:ve({},Te)})})}function Fe(Te){return Ee(this,null,function*(){return(0,at.ZP)(`/api/attachments/${Te==null?void 0:Te.id}/update_download.json`,{method:"get"})})}},81428:function(_n,Mn,ft){"use strict";ft.d(Mn,{AL:function(){return pe},Iy:function(){return Ae},Qv:function(){return fe},ez:function(){return he},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,Me){const Be=Te.match(/^(\s+)(?:```)/);if(Be===null)return Me;const Ge=Be[1];return Me.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 Ae(){ve.length=0,Ee=["<ul>"]}const me={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function be(Te,Me,Be,Ge){if(Me>=Te.length||Te[Me].level<=Be)return Me;var Ye=Te[Me];Ge.push("<li><a href='#"+Ie+Ye.anchor+"'>"+Ye.text+"</a>"),Me++;var Ke=[];return Me=be(Te,Me,Ye.level,Ke),Ke.length>0&&(Ge.push("<ul>"),Ke.forEach(function(Xe){Ge.push(Xe)}),Ge.push("</ul>")),Ge.push("</li>"),Me=be(Te,Me,Be,Ge),Me}function fe(){return be(ve,0,0,Ee),Ee.push("</ul>"),Ee.join("")}const z={heading(Te){const Me=Se.exec(Te);if(Ie+=1,Me)return{type:"heading",raw:Me[0],depth:Me[1].length,text:Me[2]}},fences(Te){const Me=this.rules.block.fences.exec(Te);if(Me){const Be=Me[0];let Ge=de(Be,Me[3]||"");const Ye=Me[2]?Me[2].trim():Me[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 he(){return le}function pe(){se=0,le={}}function xe(Te){return Te=Te.replace(te,(Me,Be)=>{const Ge=ie();return le[Ge]={type:"inline",expression:Be},Ge}),Te}const je=ke.listitem;ke.listitem=function(Te){return je(xe(Te))};const De=ke.paragraph;ke.paragraph=function(Te){return De(xe(Te))};const Fe=ke.tablecell;ke.tablecell=function(Te,Me){return Fe(xe(Te),Me)},ke.code=function(Te,Me,Be){const Ge=(Me||"").match(/\S*/)[0];return Ge?["latex","katex","math"].indexOf(Ge)>=0?`<p class='editormd-tex'>${Te}</p>`:`<pre class="prettyprint linenums"><code class="language-${Me}">${Be?Te:(0,oe.escape)(Te,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(Be?Te:(0,oe.escape)(Te,!0))+"</code></pre>"},ke.heading=function(Te,Me,Be){let Ge=this.options.headerPrefix+Be.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ve.push({anchor:Ge,level:Me,text:Te}),"<h"+Me+' id="'+Ie+Ge+'">'+Te+"</h"+Me+">"},Gt().setOptions({silent:!0,gfm:!0,pedantic:!1}),Gt().use({tokenizer:z,renderer:ke}),Mn.ZP=Gt()},47257:function(_n){(function(Mn){(function(ft){if(1)_n.exports=ft();else var at})(function(){var ft,at,Gt;return function(){function oe(Ue,Ie,de){function ve(Se,Ae){if(!Ie[Se]){if(!Ue[Se]){var me=void 0;if(!Ae&&me)return require(Se,!0);if(Ee)return Ee(Se,!0);var be=new Error("Cannot find module '"+Se+"'");throw be.code="MODULE_NOT_FOUND",be}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"),Ae=Se.checkBucketName,me=Ie;function be(z){return Array.isArray?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"}function fe(z){return z?be(z)?z:[z]:[]}me.useBucket=function(te){return Ae(te),this.options.bucket=te,this},me.setBucket=function(te){return Ae(te),this.options.bucket=te,this},me.getBucket=function(){return this.options.bucket},me.deleteBucket=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var he,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return he=this._bucketRequestParams("DELETE",ie,"",le),je.next=3,this.request(he);case 3:if(pe=je.sent,!(pe.status===200||pe.status===204)){je.next=6;break}return je.abrupt("return",{res:pe.res});case 6:return je.next=8,this.requestError(pe);case 8:throw je.sent;case 9:case"end":return je.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.putBucketACL=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le,he){var pe,xe;return ve.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return pe=this._bucketRequestParams("PUT",ie,"acl",he),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 he,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return he=this._bucketRequestParams("GET",ie,"acl",le),he.successStatuses=[200],he.xmlResponse=!0,je.next=5,this.request(he);case 5:return pe=je.sent,je.abrupt("return",{acl:pe.data.AccessControlList.Grant,owner:{id:pe.data.Owner.ID,displayName:pe.data.Owner.DisplayName},res:pe.res});case 7:case"end":return je.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.putBucketLogging=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le,he){var pe,xe,je;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return pe=this._bucketRequestParams("PUT",ie,"logging",he),xe=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<BucketLoggingStatus>
|
|
<LoggingEnabled>
|
|
<TargetBucket>`.concat(ie,`</TargetBucket>
|
|
`),le&&(xe+="<TargetPrefix>".concat(le,`</TargetPrefix>
|
|
`)),xe+=`</LoggingEnabled>
|
|
</BucketLoggingStatus>`,pe.content=xe,pe.mime="xml",pe.successStatuses=[200],Fe.next=9,this.request(pe);case 9:return je=Fe.sent,Fe.abrupt("return",{res:je.res});case 11:case"end":return Fe.stop()}},se,this)}));function te(se,ie,le){return z.apply(this,arguments)}return te}(),me.getBucketLogging=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var he,pe,xe;return ve.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return he=this._bucketRequestParams("GET",ie,"logging",le),he.successStatuses=[200],he.xmlResponse=!0,De.next=5,this.request(he);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 he,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return he=this._bucketRequestParams("DELETE",ie,"logging",le),he.successStatuses=[204,200],je.next=4,this.request(he);case 4:return pe=je.sent,je.abrupt("return",{res:pe.res});case 6:case"end":return je.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.putBucketCORS=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le,he){var pe,xe,je,De,Fe,Te,Me,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",he),xe=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CORSConfiguration>`,je=function(lt){xe+="<AllowedOrigin>".concat(lt,"</AllowedOrigin>")},De=function(lt){xe+="<AllowedMethod>".concat(lt,"</AllowedMethod>")},Fe=function(lt){xe+="<AllowedHeader>".concat(lt,"</AllowedHeader>")},Te=function(lt){xe+="<ExposeHeader>".concat(lt,"</ExposeHeader>")},Me=0,Be=le.length;Me<Be;Me++)Ge=le[Me],xe+="<CORSRule>",fe(Ge.allowedOrigin).forEach(je),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 he,pe,xe,je;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return he=this._bucketRequestParams("GET",ie,"cors",le),he.successStatuses=[200],he.xmlResponse=!0,Fe.next=5,this.request(he);case 5:return pe=Fe.sent,xe=[],pe.data&&pe.data.CORSRule&&(je=pe.data.CORSRule,be(je)||(je=[je]),je.forEach(function(Te){var Me={};Object.keys(Te).forEach(function(Be){Me[Be.slice(0,1).toLowerCase()+Be.slice(1,Be.length)]=Te[Be]}),xe.push(Me)})),Fe.abrupt("return",{rules:xe,res:pe.res});case 9:case"end":return Fe.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.deleteBucketCORS=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var he,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return he=this._bucketRequestParams("DELETE",ie,"cors",le),he.successStatuses=[204],je.next=4,this.request(he);case 4:return pe=je.sent,je.abrupt("return",{res:pe.res});case 6:case"end":return je.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.putBucketReferer=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le,he,pe){var xe,je,De,Fe;return ve.default.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(xe=this._bucketRequestParams("PUT",ie,"referer",pe),je=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<RefererConfiguration>
|
|
`,je+=" <AllowEmptyReferer>".concat(le?"true":"false",`</AllowEmptyReferer>
|
|
`),he&&he.length>0){for(je+=` <RefererList>
|
|
`,De=0;De<he.length;De++)je+=" <Referer>".concat(he[De],`</Referer>
|
|
`);je+=` </RefererList>
|
|
`}else je+=` <RefererList />
|
|
`;return je+="</RefererConfiguration>",xe.content=je,xe.mime="xml",xe.successStatuses=[200],Me.next=10,this.request(xe);case 10:return Fe=Me.sent,Me.abrupt("return",{res:Fe.res});case 12:case"end":return Me.stop()}},se,this)}));function te(se,ie,le,he){return z.apply(this,arguments)}return te}(),me.getBucketReferer=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var he,pe,xe;return ve.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return he=this._bucketRequestParams("GET",ie,"referer",le),he.successStatuses=[200],he.xmlResponse=!0,De.next=5,this.request(he);case 5:return pe=De.sent,xe=pe.data.RefererList.Referer||null,xe&&(be(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 Ae=oe("debug")("ali-oss"),me=oe("xml2js"),be=oe("agentkeepalive"),fe=oe("merge-descriptors"),z=oe("platform"),te=oe("utility"),se=oe("urllib"),ie=oe("./version"),le=oe("bowser"),he=oe("../common/signUtils"),pe=oe("../common/client/initOptions"),xe=oe("../common/utils/createRequest"),je=xe.createRequest,De=oe("../common/utils/encoder"),Fe=De.encoder,Te=oe("../common/client/getReqUrl"),Me=Te.getReqUrl,Be=oe("../common/utils/setSTSToken"),Ge=Be.setSTSToken,Ye=oe("../common/utils/retry"),Ke=Ye.retry,Xe=oe("../common/utils/isFunction"),ot=Xe.isFunction,lt=new be;function ct(){var Pt=z.name,ht=z.version;Pt&&Pt.toLowerCase&&Pt.toLowerCase()==="ie"&&ht.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function Ct(){return location&&location.protocol==="https:"}function Je(Pt,ht){if(ct(),!(this instanceof Je))return new Je(Pt,ht);Pt&&Pt.inited?this.options=Pt:this.options=Je.initOptions(Pt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=se,this.agent=this.options.agent||lt),this.ctx=ht,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}Ue.exports=Je,Je.initOptions=function(ht){ht.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var St=Object.assign({secure:Ct(),useFetch:!1},ht);return pe(St)};var rt=Je.prototype;rt.debug=Ae,fe(rt,oe("./object")),fe(rt,oe("./bucket")),fe(rt,oe("../common/bucket/getBucketWebsite")),fe(rt,oe("../common/bucket/putBucketWebsite")),fe(rt,oe("../common/bucket/deleteBucketWebsite")),fe(rt,oe("../common/bucket/getBucketLifecycle")),fe(rt,oe("../common/bucket/putBucketLifecycle")),fe(rt,oe("../common/bucket/deleteBucketLifecycle")),fe(rt,oe("../common/bucket/putBucketVersioning")),fe(rt,oe("../common/bucket/getBucketVersioning")),fe(rt,oe("../common/bucket/getBucketInventory")),fe(rt,oe("../common/bucket/deleteBucketInventory")),fe(rt,oe("../common/bucket/listBucketInventory")),fe(rt,oe("../common/bucket/putBucketInventory")),fe(rt,oe("../common/bucket/abortBucketWorm")),fe(rt,oe("../common/bucket/completeBucketWorm")),fe(rt,oe("../common/bucket/extendBucketWorm")),fe(rt,oe("../common/bucket/getBucketWorm")),fe(rt,oe("../common/bucket/initiateBucketWorm")),fe(rt,oe("./managed-upload")),fe(rt,oe("../common/multipart-copy")),fe(rt,oe("../common/multipart")),fe(rt,oe("../common/parallel")),rt.signature=function(ht){return this.debug("authorization stringToSign: %s",ht,"info"),he.computeSignature(this.options.accessKeySecret,ht,this.options.headerEncoding)},rt._getReqUrl=Me,rt.authorization=function(ht,St,mt,Nt){var dt=he.buildCanonicalString(ht.toUpperCase(),St,{headers:Nt,parameters:mt});return he.authorization(this.options.accessKeyId,this.options.accessKeySecret,dt,this.options.headerEncoding)},rt.request=function(){var Pt=(0,Se.default)(ke.default.mark(function ht(St){var mt=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(xt.bind(this),this.options.retryMax,{errorHandler:function(gt){var yt=function(He){if(St.stream)return!1;var we=[-1,-2].includes(He.status),Ne=mt.options.requestErrorRetryHandle||function(){return!0};return we&&Ne(He)};return!!yt(gt)}})(St);case 3:return dt.abrupt("return",dt.sent);case 6:return dt.abrupt("return",xt.call(this,St));case 7:case"end":return dt.stop()}},ht,this)}));return function(ht){return Pt.apply(this,arguments)}}();function xt(Pt){return bt.apply(this,arguments)}function bt(){return bt=(0,Se.default)(ke.default.mark(function Pt(ht){var St,mt,Nt,dt,Dt,gt;return ke.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(!(this.options.stsToken&&ot(this.options.refreshSTSToken))){tt.next=3;break}return tt.next=3,Ge.call(this);case 3:return St=je.call(this,ht),this.options.useFetch||(St.params.mode="disable-fetch"),dt=!!ht.stream,tt.prev=6,tt.next=9,this.urllib.request(St.url,St.params);case 9:mt=tt.sent,this.debug("response %s %s, got %s, headers: %j",ht.method,St.url,mt.status,mt.headers,"info"),tt.next=16;break;case 13:tt.prev=13,tt.t0=tt.catch(6),Nt=tt.t0;case 16:if(!(mt&&ht.successStatuses&&ht.successStatuses.indexOf(mt.status)===-1)){tt.next=28;break}return tt.next=19,this.requestError(mt);case 19:if(Dt=tt.sent,!(Dt.code==="RequestTimeTooSkewed"&&!dt)){tt.next=25;break}return this.options.amendTimeSkewed=+new Date(Dt.serverTime)-new Date,tt.next=24,this.request(ht);case 24:return tt.abrupt("return",tt.sent);case 25:Dt.params=ht,tt.next=32;break;case 28:if(!Nt){tt.next=32;break}return tt.next=31,this.requestError(Nt);case 31:Dt=tt.sent;case 32:if(!Dt){tt.next=34;break}throw Dt;case 34:if(!ht.xmlResponse){tt.next=39;break}return tt.next=37,this.parseXML(mt.data);case 37:gt=tt.sent,mt.data=gt;case 39:return tt.abrupt("return",mt);case 40:case"end":return tt.stop()}},Pt,this,[[6,13]])})),bt.apply(this,arguments)}rt._getResource=function(ht){var St="/";return ht.bucket&&(St+="".concat(ht.bucket,"/")),ht.object&&(St+=Fe(ht.object,this.options.headerEncoding)),St},rt._escape=function(ht){return te.encodeURIComponent(ht).replace(/%2F/g,"/")},rt._getUserAgent=function(){var ht=ve&&ve.browser?"js":"nodejs",St="aliyun-sdk-".concat(ht,"/").concat(ie.version),mt=z.description;return!mt&&ve&&(mt="Node.js ".concat(ve.version.slice(1)," on ").concat(ve.platform," ").concat(ve.arch)),this._checkUserAgent("".concat(St," ").concat(mt))},rt._checkUserAgent=function(ht){var St=ht.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return St},rt.checkBrowserAndVersion=function(ht,St){return le.name===ht&&le.version.split(".")[0]===St},rt.parseXML=function(ht){return new Promise(function(St,mt){de.isBuffer(ht)&&(ht=ht.toString()),me.parseString(ht,{explicitRoot:!1,explicitArray:!1},function(Nt,dt){Nt?mt(Nt):St(dt)})})},rt.requestError=function(){var Pt=(0,Se.default)(ke.default.mark(function St(mt){var Nt,dt,Dt,gt;return ke.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(Nt=null,!(!mt.data||!mt.data.length)){tt.next=5;break}mt.status===-1||mt.status===-2?(Nt=new Error(mt.message),Nt.name=mt.name,Nt.status=mt.status,Nt.code=mt.name):(mt.status===404?(Nt=new Error("Object not exists"),Nt.name="NoSuchKeyError",Nt.status=404,Nt.code="NoSuchKey"):mt.status===412?(Nt=new Error("Pre condition failed"),Nt.name="PreconditionFailedError",Nt.status=412,Nt.code="PreconditionFailed"):(Nt=new Error("Unknow error, status: ".concat(mt.status)),Nt.name="UnknownError",Nt.status=mt.status),Nt.requestId=mt.headers["x-oss-request-id"],Nt.host=""),tt.next=32;break;case 5:return dt=String(mt.data),this.debug("request response error data: %s",dt,"error"),tt.prev=7,tt.next=10,this.parseXML(dt);case 10:if(tt.t0=tt.sent,tt.t0){tt.next=13;break}tt.t0={};case 13:Dt=tt.t0,tt.next=23;break;case 16:return tt.prev=16,tt.t1=tt.catch(7),this.debug(dt,"error"),tt.t1.message+=`
|
|
raw xml: `.concat(dt),tt.t1.status=mt.status,tt.t1.requestId=mt.headers["x-oss-request-id"],tt.abrupt("return",tt.t1);case 23:gt=Dt.Message||"unknow request error, status: ".concat(mt.status),Dt.Condition&&(gt+=" (condition: ".concat(Dt.Condition,")")),Nt=new Error(gt),Nt.name=Dt.Code?"".concat(Dt.Code,"Error"):"UnknownError",Nt.status=mt.status,Nt.code=Dt.Code,Nt.requestId=Dt.RequestId,Nt.hostId=Dt.HostId,Nt.serverTime=Dt.ServerTime;case 32:return this.debug("generate error %j",Nt,"error"),tt.abrupt("return",Nt);case 34:case"end":return tt.stop()}},St,this,[[7,16]])}));function ht(St){return Pt.apply(this,arguments)}return ht}()}).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"),Ae=oe("path"),me=oe("mime"),be=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,he=Ie;he.multipartUpload=function(){var Fe=(0,ke.default)(Ee.default.mark(function Me(Be,Ge){var Ye,Ke,Xe,ot,lt,ct,Ct,Je,rt,xt=arguments;return Ee.default.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:if(Ye=xt.length>2&&xt[2]!==void 0?xt[2]:{},this.resetCancelFlag(),Ye.disabledMD5=Ye.disabledMD5===void 0?!0:!!Ye.disabledMD5,!(Ye.checkpoint&&Ye.checkpoint.uploadId)){Pt.next=8;break}return Ge&&se(Ge)&&(Ye.checkpoint.file=Ge),Pt.next=7,this._resumeMultipart(Ye.checkpoint,Ye);case 7:return Pt.abrupt("return",Pt.sent);case 8:return Ke=102400,Ye.mime||(se(Ge)?Ye.mime=me.getType(Ae.extname(Ge.name)):z(Ge)?Ye.mime=Ge.type:le(Ge)?Ye.mime="":Ye.mime=me.getType(Ae.extname(Ge))),Ye.headers=Ye.headers||{},this._convertMetaToHeaders(Ye.meta,Ye.headers),Pt.next=14,this._getFileSize(Ge);case 14:if(Xe=Pt.sent,!(Xe<Ke)){Pt.next=26;break}return Ye.contentLength=Xe,Pt.next=19,this.put(Be,Ge,Ye);case 19:if(ot=Pt.sent,!(Ye&&Ye.progress)){Pt.next=23;break}return Pt.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),Pt.abrupt("return",lt);case 26:if(!(Ye.partSize&&parseInt(Ye.partSize,10)!==Ye.partSize)){Pt.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Ye.partSize&&Ye.partSize<Ke)){Pt.next=30;break}throw new Error("partSize must not be smaller than ".concat(Ke));case 30:return Pt.next=32,this.initMultipartUpload(Be,Ye);case 32:if(ct=Pt.sent,Ct=ct.uploadId,Je=this._getPartSize(Xe,Ye.partSize),rt={file:Ge,name:Be,fileSize:Xe,partSize:Je,uploadId:Ct,doneParts:[]},!(Ye&&Ye.progress)){Pt.next=39;break}return Pt.next=39,Ye.progress(0,rt,ct.res);case 39:return Pt.next=41,this._resumeMultipart(rt,Ye);case 41:return Pt.abrupt("return",Pt.sent);case 42:case"end":return Pt.stop()}},Me,this)}));function Te(Me,Be){return Fe.apply(this,arguments)}return Te}(),he._resumeMultipart=function(){var Fe=(0,ke.default)(Ee.default.mark(function Me(Be,Ge){var Ye,Ke,Xe,ot,lt,ct,Ct,Je,rt,xt,bt,Pt,ht,St,mt,Nt,dt,Dt,gt;return Ee.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(Ye=this,!this.isCancel()){tt.next=3;break}throw this._makeCancelEvent();case 3:return Ke=Be.file,Xe=Be.fileSize,ot=Be.partSize,lt=Be.uploadId,ct=Be.doneParts,Ct=Be.name,Je=[],ct.length>0&&be(ct).to(Je),rt=this._divideParts(Xe,ot),xt=rt.length,bt=!1,Pt=function(we,Ne){return new Promise(function(){var Ve=(0,ke.default)(Ee.default.mark(function nt(Re,_e){var Ze,qe,ut,vt,At;return Ee.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(Ft.prev=0,we.isCancel()){Ft.next=29;break}return Ze=rt[Ne-1],Ft.next=5,we._createBuffer(Ke,Ze.start,Ze.end);case 5:return qe=Ft.sent,ut={content:qe,size:Ze.end-Ze.start},Ft.prev=7,Ft.next=10,we._uploadPart(Ct,lt,Ne,ut,Ge);case 10:vt=Ft.sent,Ft.next=18;break;case 13:if(Ft.prev=13,Ft.t0=Ft.catch(7),Ft.t0.status!==404){Ft.next=17;break}throw we._makeAbortEvent();case 17:throw Ft.t0;case 18:if(!(!we.isCancel()&&!bt)){Ft.next=26;break}if(Be.doneParts.push({number:Ne,etag:vt.res.headers.etag}),!Ge.progress){Ft.next=23;break}return Ft.next=23,Ge.progress(ct.length/(xt+1),Be,vt.res);case 23:Re({number:Ne,etag:vt.res.headers.etag}),Ft.next=27;break;case 26:Re();case 27:Ft.next=30;break;case 29:Re();case 30:Ft.next=41;break;case 32:Ft.prev=32,Ft.t1=Ft.catch(0),At=new Error,At.name=Ft.t1.name,At.message=Ft.t1.message,At.stack=Ft.t1.stack,At.partNum=Ne,be(Ft.t1).to(At),_e(At);case 41:case"end":return Ft.stop()}},nt,null,[[0,32],[7,13]])}));return function(nt,Re){return Ve.apply(this,arguments)}}())},ht=Array.from(new Array(xt),function(He,we){return we+1}),St=Je.map(function(He){return He.number}),mt=ht.filter(function(He){return St.indexOf(He)<0}),Nt=5,dt=Ge.parallel||Nt,tt.next=17,this._parallel(mt,dt,function(He){return new Promise(function(we,Ne){Pt(Ye,He).then(function(Ve){Ve&&Je.push(Ve),we()}).catch(function(Ve){Ne(Ve)})})});case 17:if(Dt=tt.sent,bt=!0,gt=Dt.find(function(He){return He.name==="abort"}),!gt){tt.next=22;break}throw gt;case 22:if(!this.isCancel()){tt.next=25;break}throw Pt=null,this._makeCancelEvent();case 25:if(!(Dt&&Dt.length>0)){tt.next=28;break}throw Dt[0].message="Failed to upload some parts with error: ".concat(Dt[0].toString()," part_num: ").concat(Dt[0].partNum),Dt[0];case 28:return tt.next=30,this.completeMultipartUpload(Ct,lt,Je,Ge);case 30:return tt.abrupt("return",tt.sent);case 31:case"end":return tt.stop()}},Me,this)}));function Te(Me,Be){return Fe.apply(this,arguments)}return Te}(),he._getFileSize=function(){var Fe=(0,ke.default)(Ee.default.mark(function Me(Be){return Ee.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(!le(Be)){Ye.next=4;break}return Ye.abrupt("return",Be.length);case 4:if(!(z(Be)||se(Be))){Ye.next=6;break}return Ye.abrupt("return",Be.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return Ye.stop()}},Me)}));function Te(Me){return Fe.apply(this,arguments)}return Te}();var pe=oe("stream"),xe=pe.Readable;function je(Fe,Te){if(!(this instanceof je))return new je(Fe,Te);xe.call(this,Te),this.file=Fe,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}Se.inherits(je,xe),je.prototype.readFileAndPush=function(Te){if(this.fileBuffer)for(var Me=!0;Me&&this.fileBuffer&&this.start<this.fileBuffer.length;){var Be=this.start,Ge=Be+Te;Ge=Ge>this.fileBuffer.length?this.fileBuffer.length:Ge,this.start=Ge,Me=this.push(this.fileBuffer.slice(Be,Ge))}},je.prototype._read=function(Te){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var Me=16*1024;Te=Te||Me;var Be=this;this.reader.onload=function(Ye){Be.fileBuffer=de.from(new Uint8Array(Ye.target.result)),Be.file=null,Be.readFileAndPush(Te)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(Te)};function De(Fe){return Fe.arrayBuffer?Fe.arrayBuffer():new Promise(function(Te,Me){var Be=new FileReader;Be.onload=function(Ge){Te(Ge.target.result)},Be.onerror=function(Ge){Me(Ge)},Be.readAsArrayBuffer(Fe)})}he._createBuffer=function(){var Fe=(0,ke.default)(Ee.default.mark(function Me(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()}},Me)}));function Te(Me,Be,Ge){return Fe.apply(this,arguments)}return Te}(),he._getPartSize=function(Te,Me){var Be=1e4,Ge=1*1024*1024;Me||(Me=Ge);var Ye=Math.ceil(Te/Be);return Me<Ye&&(Me=Ye,console.warn("partSize has been set to ".concat(Me,", because the partSize you provided causes partNumber to be greater than 10,000"))),Me},he._divideParts=function(Te,Me){for(var Be=Math.ceil(Te/Me),Ge=[],Ye=0;Ye<Be;Ye++){var Ke=Me*Ye,Xe=Math.min(Ke+Me,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"),Ae=oe("path"),me=oe("mime"),be=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"),he=le.isBuffer,pe=oe("../common/utils/obj2xml"),xe=pe.obj2xml,je=Ie;je.append=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,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(Me,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,Me,Be){return De.apply(this,arguments)}return Fe}(),je.put=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,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||{},Me=this._objectName(Me),!he(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(Ae.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,Me,Ge),be.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:Me,url:this._objectUrl(Me),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,Me,Be){return De.apply(this,arguments)}return Fe}(),je.putStream=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,Be,Ge){var Ye,Ke,Xe,ot;return ve.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return Ge=Ge||{},Ge.headers=Ge.headers||{},Me=this._objectName(Me),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,Me,Ge),be.encodeCallback(Ke,Ge),Ke.mime=Ge.mime,Ke.stream=Be,Ke.successStatuses=[200],ct.next=13,this.request(Ke);case 13:return Xe=ct.sent,ot={name:Me,url:this._objectUrl(Me),res:Xe.res},Ke.headers&&Ke.headers["x-oss-callback"]&&(ot.data=JSON.parse(Xe.data.toString())),ct.abrupt("return",ot);case 17:case"end":return ct.stop()}},Te,this)}));function Fe(Te,Me,Be){return De.apply(this,arguments)}return Fe}(),fe(je,oe("../common/object/copyObject")),fe(je,oe("../common/object/getObjectTagging")),fe(je,oe("../common/object/putObjectTagging")),fe(je,oe("../common/object/deleteObjectTagging")),fe(je,oe("../common/image")),fe(je,oe("../common/object/getBucketVersions")),fe(je,oe("../common/object/getACL")),fe(je,oe("../common/object/putACL")),fe(je,oe("../common/object/head")),fe(je,oe("../common/object/delete")),fe(je,oe("../common/object/get")),fe(je,oe("../common/object/putSymlink")),fe(je,oe("../common/object/getSymlink")),fe(je,oe("../common/object/deleteMulti")),fe(je,oe("../common/object/getObjectMeta")),fe(je,oe("../common/object/getObjectUrl")),fe(je,oe("../common/object/generateObjectUrl")),fe(je,oe("../common/object/signatureUrl")),fe(je,oe("../common/object/asyncSignatureUrl")),je.putMeta=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,Be,Ge){var Ye;return ve.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Xe.next=2,this.copy(Me,Me,{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,Me,Be){return De.apply(this,arguments)}return Fe}(),je.list=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,Be){var Ge,Ye,Ke,Xe,ot;return ve.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return Ge=this._objectRequestParams("GET","",Be),Ge.query=Me,Ge.xmlResponse=!0,Ge.successStatuses=[200],ct.next=6,this.request(Ge);case 6:return Ye=ct.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})),ct.abrupt("return",{res:Ye.res,objects:Ke,prefixes:ot,nextMarker:Ye.data.NextMarker||null,isTruncated:Ye.data.IsTruncated==="true"});case 13:case"end":return ct.stop()}},Te,this)}));function Fe(Te,Me){return De.apply(this,arguments)}return Fe}(),je.listV2=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me){var Be,Ge,Ye,Ke,Xe,ot,lt,ct=arguments;return ve.default.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Be=ct.length>1&&ct[1]!==void 0?ct[1]:{},Ge=Me["continuation-token"]||Me.continuationToken,Ge&&(Be.subres=Object.assign({"continuation-token":Ge},Be.subres)),Ye=this._objectRequestParams("GET","",Be),Ye.query=Object.assign({"list-type":2},Me),delete Ye.query["continuation-token"],delete Ye.query.continuationToken,Ye.xmlResponse=!0,Ye.successStatuses=[200],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(rt){var xt=null;return rt.Owner&&(xt={id:rt.Owner.ID,displayName:rt.Owner.DisplayName}),{name:rt.Key,url:ot._objectUrl(rt.Key),lastModified:rt.LastModified,etag:rt.ETag,type:rt.Type,size:Number(rt.Size),storageClass:rt.StorageClass,owner:xt}})),lt=Ke.data.CommonPrefixes||null,lt&&(Array.isArray(lt)||(lt=[lt]),lt=lt.map(function(rt){return rt.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}(),je.restore=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me){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",Me,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}(),je._objectUrl=function(Fe){return this._getReqUrl({bucket:this.options.bucket,object:Fe})},je._objectRequestParams=function(Fe,Te,Me){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");Me=Me||{},Te=this._objectName(Te);var Be={object:Te,bucket:this.options.bucket,method:Fe,subres:Me&&Me.subres,timeout:Me&&Me.timeout,ctx:Me&&Me.ctx};return Me.headers&&(Be.headers={},Se(Me.headers).to(Be.headers)),Be},je._objectName=function(Fe){return Fe.replace(/^\/+/,"")},je._convertMetaToHeaders=function(Fe,Te){Fe&&Object.keys(Fe).forEach(function(Me){Te["x-oss-meta-".concat(Me)]=Fe[Me]})},je._deleteFileSafe=function(Fe){var Te=this;return new Promise(function(Me){ke.exists(Fe,function(Be){Be?ke.unlink(Fe,function(Ge){Ge&&Te.debug("unlink %j error: %s",Fe,Ge,"error"),Me()}):Me()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(oe,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,be){return Ae.apply(this,arguments)}function Ae(){return Ae=(0,Ee.default)(ve.default.mark(function me(be,fe){var z,te;return ve.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return ke.checkBucketName(be),z=this._bucketRequestParams("DELETE",be,"worm",fe),ie.next=4,this.request(z);case 4:return te=ie.sent,ie.abrupt("return",{res:te.res,status:te.status});case 6:case"end":return ie.stop()}},me,this)})),Ae.apply(this,arguments)}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,be,fe){return Ae.apply(this,arguments)}function Ae(){return Ae=(0,Ee.default)(ve.default.mark(function me(be,fe,z){var te,se;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return ke.checkBucketName(be),te=this._bucketRequestParams("POST",be,{wormId:fe},z),le.next=4,this.request(te);case 4:return se=le.sent,le.abrupt("return",{res:se.res,status:se.status});case 6:case"end":return le.stop()}},me,this)})),Ae.apply(this,arguments)}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,be){return Ae.apply(this,arguments)}function Ae(){return Ae=(0,Ee.default)(ve.default.mark(function me(be,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(be),se=this._bucketRequestParams("DELETE",be,te,z),se.successStatuses=[204],pe.next=7,this.request(se);case 7:return ie=pe.sent,pe.abrupt("return",{status:ie.status,res:ie.res});case 9:case"end":return pe.stop()}},me,this)})),Ae.apply(this,arguments)}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,Ae=Ie;Ae.deleteBucketLifecycle=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te){var se,ie;return ve.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return Se(z),se=this._bucketRequestParams("DELETE",z,"lifecycle",te),se.successStatuses=[204],he.next=5,this.request(se);case 5:return ie=he.sent,he.abrupt("return",{res:ie.res});case 7:case"end":return he.stop()}},fe,this)}));function be(fe,z){return me.apply(this,arguments)}return be}()},{"../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,Ae=Ie;Ae.deleteBucketWebsite=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te){var se,ie;return ve.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return Se(z),se=this._bucketRequestParams("DELETE",z,"website",te),se.successStatuses=[204],he.next=5,this.request(se);case 5:return ie=he.sent,he.abrupt("return",{res:ie.res});case 7:case"end":return he.stop()}},fe,this)}));function be(fe,z){return me.apply(this,arguments)}return be}()},{"../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 Ae(be,fe,z,te){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function be(fe,z,te,se){var ie,le,he;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 he=xe.sent,xe.abrupt("return",{res:he.res,status:he.status});case 10:case"end":return xe.stop()}},be,this)})),me.apply(this,arguments)}Ie.extendBucketWorm=Ae},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(oe,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 Ae(be,fe){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function be(fe,z){var te,se,ie,le,he=arguments;return ve.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return te=he.length>2&&he[2]!==void 0?he[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()}},be,this)})),me.apply(this,arguments)}Ie.getBucketInventory=Ae},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],14:[function(oe,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,Ae=oe("../utils/isArray"),me=Ae.isArray,be=oe("../utils/formatObjKey"),fe=be.formatObjKey,z=Ie;z.getBucketLifecycle=function(){var te=(0,Ee.default)(ve.default.mark(function ie(le,he){var pe,xe,je;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return Se(le),pe=this._bucketRequestParams("GET",le,"lifecycle",he),pe.successStatuses=[200],pe.xmlResponse=!0,Fe.next=6,this.request(pe);case 6:return xe=Fe.sent,je=xe.data.Rule||null,je&&(me(je)||(je=[je]),je=je.map(function(Te){return Te.ID&&(Te.id=Te.ID,delete Te.ID),Te.Tag&&!me(Te.Tag)&&(Te.Tag=[Te.Tag]),fe(Te,"firstLowerCase")})),Fe.abrupt("return",{rules:je,res:xe.res});case 10:case"end":return Fe.stop()}},ie,this)}));function se(ie,le){return te.apply(this,arguments)}return se}()},{"../utils/checkBucketName":51,"../utils/formatObjKey":61,"../utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280}],15:[function(oe,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,Ae=Ie;Ae.getBucketVersioning=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te){var se,ie,le;return ve.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return Se(z),se=this._bucketRequestParams("GET",z,"versioning",te),se.xmlResponse=!0,se.successStatuses=[200],pe.next=6,this.request(se);case 6:return ie=pe.sent,le=ie.data.Status,pe.abrupt("return",{status:ie.status,versionStatus:le,res:ie.res});case 9:case"end":return pe.stop()}},fe,this)}));function be(fe,z){return me.apply(this,arguments)}return be}()},{"../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,Ae=oe("../utils/isObject"),me=Ae.isObject,be=Ie;be.getBucketWebsite=function(){var fe=(0,Ee.default)(ve.default.mark(function te(se,ie){var le,he,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return Se(se),le=this._bucketRequestParams("GET",se,"website",ie),le.successStatuses=[200],le.xmlResponse=!0,je.next=6,this.request(le);case 6:return he=je.sent,pe=[],he.data.RoutingRules&&he.data.RoutingRules.RoutingRule&&(me(he.data.RoutingRules.RoutingRule)?pe=[he.data.RoutingRules.RoutingRule]:pe=he.data.RoutingRules.RoutingRule),je.abrupt("return",{index:he.data.IndexDocument&&he.data.IndexDocument.Suffix||"",supportSubDir:he.data.IndexDocument&&he.data.IndexDocument.SupportSubDir||"false",type:he.data.IndexDocument&&he.data.IndexDocument.Type,routingRules:pe,error:he.data.ErrorDocument&&he.data.ErrorDocument.Key||null,res:he.res});case 10:case"end":return je.stop()}},te,this)}));function z(te,se){return fe.apply(this,arguments)}return z}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(oe,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 Ae(be,fe){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function be(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()}},be,this)})),me.apply(this,arguments)}Ie.getBucketWorm=Ae},{"../utils/checkBucketName":51,"../utils/dataFix":57,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],18:[function(oe,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 Ae(be,fe,z){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function be(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()}},be,this)})),me.apply(this,arguments)}Ie.initiateBucketWorm=Ae},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(oe,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 Ae(be){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function be(fe){var z,te,se,ie,le,he,pe,xe,je=arguments;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return z=je.length>1&&je[1]!==void 0?je[1]:{},te=z.continuationToken,se=Object.assign({inventory:""},te&&{"continuation-token":te},z.subres),ke.checkBucketName(fe),ie=this._bucketRequestParams("GET",fe,se,z),ie.successStatuses=[200],ie.xmlResponse=!0,Fe.next=9,this.request(ie);case 9:return le=Fe.sent,he=le.data,pe=le.res,xe=le.status,Fe.abrupt("return",{isTruncated:he.IsTruncated==="true",nextContinuationToken:he.NextContinuationToken,inventoryList:Se.formatInventoryConfig(he.InventoryConfiguration,!0),status:xe,res:pe});case 12:case"end":return Fe.stop()}},be,this)})),me.apply(this,arguments)}Ie.listBucketInventory=Ae},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],20:[function(oe,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 Ae(be,fe){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function be(fe,z){var te,se,ie,le,he,pe,xe,je,De,Fe,Te,Me=arguments;return ve.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return te=Me.length>2&&Me[2]!==void 0?Me[2]:{},se=Object.assign({inventory:"",inventoryId:z.id},te.subres),ke.checkBucketName(fe),ie=z.OSSBucketDestination,le=z.optionalFields,he=z.includedObjectVersions,pe="acs:oss:::",xe="acs:ram::".concat(ie.accountId,":role/"),je={InventoryConfiguration:{Id:z.id,IsEnabled:z.isEnabled,Filter:{Prefix:z.prefix||""},Destination:{OSSBucketDestination:{Format:ie.format,AccountId:ie.accountId,RoleArn:"".concat(xe).concat(ie.rolename),Bucket:"".concat(pe).concat(ie.bucket),Prefix:ie.prefix||"",Encryption:ie.encryption||""}},Schedule:{Frequency:z.frequency},IncludedObjectVersions:he,OptionalFields:{Field:(le==null?void 0:le.field)||[]}}},De=Se.obj2xml(je,{headers:!0,firstUpperCase:!0}),Fe=this._bucketRequestParams("PUT",fe,se,te),Fe.successStatuses=[200],Fe.mime="xml",Fe.content=De,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()}},be,this)})),me.apply(this,arguments)}Ie.putBucketInventory=Ae},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(oe,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,Ae=oe("../utils/isArray"),me=Ae.isArray,be=oe("../utils/deepCopy"),fe=be.deepCopy,z=oe("../utils/isObject"),te=z.isObject,se=oe("../utils/obj2xml"),ie=se.obj2xml,le=oe("../utils/checkObjectTag"),he=le.checkObjectTag,pe=oe("../utils/getStrBytesCount"),xe=pe.getStrBytesCount,je=Ie;je.putBucketLifecycle=function(){var Be=(0,Ee.default)(ve.default.mark(function Ye(Ke,Xe,ot){var lt,ct,Ct,Je,rt;return ve.default.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(Se(Ke),me(Xe)){bt.next=3;break}throw new Error("rules must be Array");case 3:return lt=this._bucketRequestParams("PUT",Ke,"lifecycle",ot),ct=[],Ct={LifecycleConfiguration:{Rule:ct}},Xe.forEach(function(Pt){De(Pt),Me(Pt),Pt.id&&(Pt.ID=Pt.id,delete Pt.id),ct.push(Pt)}),Je=ie(Ct,{headers:!0,firstUpperCase:!0}),lt.content=Je,lt.mime="xml",lt.successStatuses=[200],bt.next=13,this.request(lt);case 13:return rt=bt.sent,bt.abrupt("return",{res:rt.res});case 15:case"end":return bt.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}),he(Ge)}function Me(Be){if(Be.id&&xe(Be.id)>255)throw new Error("ID is composed of 255 bytes at most");if(Be.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(Be.status))throw new Error("Status must be Enabled or Disabled");if(Be.transition){if(!["IA","Archive"].includes(Be.transition.storageClass))throw new Error("StorageClass must be IA or Archive");Fe(Be.transition,"Transition")}if(Be.expiration){if(!Be.expiration.expiredObjectDeleteMarker)Fe(Be.expiration,"Expiration");else if(Be.expiration.days||Be.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(Be.abortMultipartUpload&&Fe(Be.abortMultipartUpload,"AbortMultipartUpload"),!Be.expiration&&!Be.abortMultipartUpload&&!Be.transition&&!Be.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(Be.tag){if(Be.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");Te(Be.tag)}}},{"../utils/checkBucketName":51,"../utils/checkObjectTag":54,"../utils/deepCopy":58,"../utils/getStrBytesCount":62,"../utils/isArray":63,"../utils/isObject":70,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],22:[function(oe,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,Ae=oe("../utils/obj2xml"),me=Ae.obj2xml,be=Ie;be.putBucketVersioning=function(){var fe=(0,Ee.default)(ve.default.mark(function te(se,ie){var le,he,pe,xe,je=arguments;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:if(le=je.length>2&&je[2]!==void 0?je[2]:{},Se(se),["Enabled","Suspended"].includes(ie)){Fe.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return he=this._bucketRequestParams("PUT",se,"versioning",le),pe={VersioningConfiguration:{Status:ie}},he.mime="xml",he.content=me(pe,{headers:!0}),Fe.next=10,this.request(he);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,Ae=oe("../utils/obj2xml"),me=Ae.obj2xml,be=oe("../utils/isArray"),fe=be.isArray,z=Ie;z.putBucketWebsite=function(){var te=(0,Ee.default)(ve.default.mark(function ie(le){var he,pe,xe,je,De,Fe,Te,Me=arguments;return ve.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:if(he=Me.length>1&&Me[1]!==void 0?Me[1]:{},pe=Me.length>2?Me[2]:void 0,Se(le),xe=this._bucketRequestParams("PUT",le,"website",pe),je={Suffix:he.index||"index.html"},De={IndexDocument:je},Fe={WebsiteConfiguration:De},he.supportSubDir&&(je.SupportSubDir=he.supportSubDir),he.type&&(je.Type=he.type),he.error&&(De.ErrorDocument={Key:he.error}),he.routingRules===void 0){Ge.next=14;break}if(fe(he.routingRules)){Ge.next=13;break}throw new Error("RoutingRules must be Array");case 13:De.RoutingRules={RoutingRule:he.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 Ae=de.from(JSON.stringify(Se)).toString("base64");if(Ee.headers["x-oss-callback"]=Ae,ke.callback.customValue){var me={};Object.keys(ke.callback.customValue).forEach(function(be){me["x:".concat(be)]=ke.callback.customValue[be].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")),Ae=oe("../utils/isIP"),me=oe("../utils/checkConfigValid");function be(fe){var z={},te=this.options.cname;me.checkConfigValid(this.options.endpoint,"endpoint"),ve.default(this.options.endpoint,!1).to(z),fe.bucket&&!te&&!Ae.isIP(z.hostname)&&!this.options.sldEnable&&(z.host="".concat(fe.bucket,".").concat(z.host));var se="/";fe.bucket&&this.options.sldEnable&&(se+="".concat(fe.bucket,"/")),fe.object&&(se+=this._escape(fe.object).replace(/\+/g,"%2B")),z.pathname=se;var ie={};if(fe.query&&ke.default(ie,fe.query),fe.subres){var le={};Se.default.string(fe.subres)?le[fe.subres]="":Se.default.array(fe.subres)?fe.subres.forEach(function(he){le[he]=""}):le=fe.subres,ke.default(ie,le)}return z.query=ie,Ee.default.format(z)}Ie.getReqUrl=be},{"../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"),Ae=Se.setRegion,me=oe("../utils/checkConfigValid"),be=me.checkConfigValid;function fe(z,te){be(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=Ae(te.region,te.internal,te.secure);else throw new Error("require options.endpoint or options.region");return te.inited=!0,te}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(oe,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,Ae=oe("querystring"),me=oe("js-base64"),be=me.Base64.encode,fe=Ie;fe.processObjectSave=function(){var te=(0,Ee.default)(ve.default.mark(function ie(le,he,pe,xe){var je,De,Fe,Te;return ve.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return z(le,"sourceObject"),z(he,"targetObject"),z(pe,"process"),he=this._objectName(he),xe&&Se(xe),je=this._objectRequestParams("POST",le,{subres:"x-oss-process"}),De=xe?",b_".concat(be(xe)):"",he=be(he),Fe={"x-oss-process":"".concat(pe,"|sys/saveas,o_").concat(he).concat(De)},je.content=Ae.stringify(Fe),Be.next=12,this.request(je);case 12:return Te=Be.sent,Be.abrupt("return",{res:Te.res,status:Te.res.status});case 14:case"end":return Be.stop()}},ie,this)}));function se(ie,le,he,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"),Ae=Ie;Ae.uploadPartCopy=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se,ie,le){var he,pe,xe,je,De,Fe=arguments;return ve.default.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return he=Fe.length>5&&Fe[5]!==void 0?Fe[5]:{},he.headers=he.headers||{},pe=he.versionId||he.subres&&he.subres.versionId||null,pe?xe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey),"?versionId=").concat(pe):xe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey)),he.headers["x-oss-copy-source"]=xe,ie&&(he.headers["x-oss-copy-source-range"]="bytes=".concat(ie)),he.subres={partNumber:se,uploadId:te},je=this._objectRequestParams("PUT",z,he),je.mime=he.mime,je.successStatuses=[200],Me.next=12,this.request(je);case 12:return De=Me.sent,Me.abrupt("return",{name:z,etag:De.res.headers.etag,res:De.res});case 14:case"end":return Me.stop()}},fe,this)}));function be(fe,z,te,se,ie){return me.apply(this,arguments)}return be}(),Ae.multipartUploadCopy=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te){var se,ie,le,he,pe,xe,je,De,Fe,Te,Me,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,he={versionId:le},Ke.next=6,this._getObjectMeta(te.sourceBucketName,te.sourceKey,he);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(je=102400,De=te.endOffset-te.startOffset,!(De<je)){Ke.next=18;break}throw new Error("copySize must not be smaller than ".concat(je));case 18:if(!(se.partSize&&se.partSize<je)){Ke.next=20;break}throw new Error("partSize must not be smaller than ".concat(je));case 20:return Ke.next=22,this.initMultipartUpload(z,se);case 22:if(Fe=Ke.sent,Te=Fe.uploadId,Me=this._getPartSize(De,se.partSize),Be={name:z,copySize:De,partSize:Me,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 be(fe,z){return me.apply(this,arguments)}return be}(),Ae._resumeMultipartCopy=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se){var ie,le,he,pe,xe,je,De,Fe,Te,Me,Be,Ge,Ye,Ke,Xe,ot,lt,ct,Ct,Je,rt;return ve.default.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(!this.isCancel()){bt.next=2;break}throw this._makeCancelEvent();case 2:if(ie=se.versionId,le=ie===void 0?null:ie,he={versionId:le},pe=z.copySize,xe=z.partSize,je=z.uploadId,De=z.doneParts,Fe=z.name,Te=this._divideMultipartCopyParts(pe,xe,te.startOffset),Me=Te.length,Be={headers:{}},se.copyheaders&&Se(se.copyheaders).to(Be.headers),le&&Se(he).to(Be),Ge=function(ht,St,mt){return new Promise(function(){var Nt=(0,Ee.default)(ve.default.mark(function dt(Dt,gt){var yt,tt,He;return ve.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:if(Ne.prev=0,ht.isCancel()){Ne.next=22;break}return yt=Te[St-1],tt="".concat(yt.start,"-").concat(yt.end-1),Ne.prev=4,Ne.next=7,ht.uploadPartCopy(Fe,je,St,tt,mt,Be);case 7:He=Ne.sent,Ne.next=15;break;case 10:if(Ne.prev=10,Ne.t0=Ne.catch(4),Ne.t0.status!==404){Ne.next=14;break}throw ht._makeAbortEvent();case 14:throw Ne.t0;case 15:if(ht.isCancel()){Ne.next=22;break}if(ke("content-range ".concat(He.res.headers["content-range"])),De.push({number:St,etag:He.res.headers.etag}),z.doneParts=De,!(se&&se.progress)){Ne.next=22;break}return Ne.next=22,se.progress(De.length/Me,z,He.res);case 22:Dt(),Ne.next=29;break;case 25:Ne.prev=25,Ne.t1=Ne.catch(0),Ne.t1.partNum=St,gt(Ne.t1);case 29:case"end":return Ne.stop()}},dt,null,[[0,25],[4,10]])}));return function(dt,Dt){return Nt.apply(this,arguments)}}())},Ye=Array.from(new Array(Me),function(Pt,ht){return ht+1}),Ke=De.map(function(Pt){return Pt.number}),Xe=Ye.filter(function(Pt){return Ke.indexOf(Pt)<0}),ot=5,lt=se.parallel||ot,!(this.checkBrowserAndVersion("Internet Explorer","10")||lt===1)){bt.next=28;break}ct=0;case 18:if(!(ct<Xe.length)){bt.next=26;break}if(!this.isCancel()){bt.next=21;break}throw this._makeCancelEvent();case 21:return bt.next=23,Ge(this,Xe[ct],te);case 23:ct++,bt.next=18;break;case 26:bt.next=40;break;case 28:return bt.next=30,this._parallelNode(Xe,lt,Ge,te);case 30:if(Ct=bt.sent,Je=Ct.find(function(Pt){return Pt.name==="abort"}),!Je){bt.next=34;break}throw Je;case 34:if(!this.isCancel()){bt.next=36;break}throw this._makeCancelEvent();case 36:if(!(Ct&&Ct.length>0)){bt.next=40;break}throw rt=Ct[0],rt.message="Failed to copy some parts with error: ".concat(rt.toString()," part_num: ").concat(rt.partNum),rt;case 40:return bt.next=42,this.completeMultipartUpload(Fe,je,De,se);case 42:return bt.abrupt("return",bt.sent);case 43:case"end":return bt.stop()}},fe,this)}));function be(fe,z,te){return me.apply(this,arguments)}return be}(),Ae._divideMultipartCopyParts=function(be,fe,z){for(var te=Math.ceil(be/fe),se=[],ie=0;ie<te;ie++){var le=fe*ie+z,he=Math.min(le+fe,be+z);se.push({start:le,end:he})}return se},Ae._getObjectMeta=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se){var ie,le;return ve.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return ie=this.getBucket(),this.setBucket(z),pe.next=4,this.head(te,se);case 4:return le=pe.sent,this.setBucket(ie),pe.abrupt("return",le);case 7:case"end":return pe.stop()}},fe,this)}));function be(fe,z,te){return me.apply(this,arguments)}return be}()},{"@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"),Ae=oe("./callback"),me=oe("./utils/deepCopy"),be=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,je){var De,Fe,Te,Me;return Ee.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return je=je||{},De={},Se(je).to(De),De.subres="uploads",Fe=this._objectRequestParams("GET","",De),Fe.query=xe,Fe.xmlResponse=!0,Fe.successStatuses=[200],Ge.next=10,this.request(Fe);case 10:return Te=Ge.sent,Me=Te.data.Upload||[],Array.isArray(Me)||(Me=[Me]),Me=Me.map(function(Ye){return{name:Ye.Key,uploadId:Ye.UploadId,initiated:Ye.Initiated}}),Ge.abrupt("return",{res:Te.res,uploads:Me,bucket:Te.data.Bucket,nextKeyMarker:Te.data.NextKeyMarker,nextUploadIdMarker:Te.data.NextUploadIdMarker,isTruncated:Te.data.IsTruncated==="true"});case 15:case"end":return Ge.stop()}},pe,this)}));function he(pe,xe){return le.apply(this,arguments)}return he}(),ie.listParts=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De,Fe){var Te,Me,Be;return Ee.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Fe=Fe||{},Te={},Se(Fe).to(Te),Te.subres={uploadId:je},Me=this._objectRequestParams("GET",xe,Te),Me.query=De,Me.xmlResponse=!0,Me.successStatuses=[200],Ye.next=10,this.request(Me);case 10:return Be=Ye.sent,Ye.abrupt("return",{res:Be.res,uploadId:Be.data.UploadId,bucket:Be.data.Bucket,name:Be.data.Key,partNumberMarker:Be.data.PartNumberMarker,nextPartNumberMarker:Be.data.NextPartNumberMarker,maxParts:Be.data.MaxParts,isTruncated:Be.data.IsTruncated,parts:Be.data.Part||[]});case 12:case"end":return Ye.stop()}},pe,this)}));function he(pe,xe,je,De){return le.apply(this,arguments)}return he}(),ie.abortMultipartUpload=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De){var Fe,Te,Me;return Ee.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return this._stop(),De=De||{},Fe={},Se(De).to(Fe),Fe.subres={uploadId:je},Te=this._objectRequestParams("DELETE",xe,Fe),Te.successStatuses=[204],Ge.next=9,this.request(Te);case 9:return Me=Ge.sent,Ge.abrupt("return",{res:Me.res});case 11:case"end":return Ge.stop()}},pe,this)}));function he(pe,xe,je){return le.apply(this,arguments)}return he}(),ie.initMultipartUpload=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je){var De,Fe,Te;return Ee.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return je=je||{},De={},Se(je).to(De),De.headers=De.headers||{},this._convertMetaToHeaders(je.meta,De.headers),De.subres="uploads",Fe=this._objectRequestParams("POST",xe,De),Fe.mime=je.mime,Fe.xmlResponse=!0,Fe.successStatuses=[200],Be.next=12,this.request(Fe);case 12:return Te=Be.sent,Be.abrupt("return",{res:Te.res,bucket:Te.data.Bucket,name:Te.data.Key,uploadId:Te.data.UploadId});case 14:case"end":return Be.stop()}},pe,this)}));function he(pe,xe){return le.apply(this,arguments)}return he}(),ie.uploadPart=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De,Fe,Te,Me,Be){var Ge,Ye;return Ee.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:if(Ge={size:Me-Te},Ye=de&&de.browser,!Ye){Xe.next=8;break}return Xe.next=5,this._createBuffer(Fe,Te,Me);case 5:Ge.content=Xe.sent,Xe.next=11;break;case 8:return Xe.next=10,this._createStream(Fe,Te,Me);case 10:Ge.stream=Xe.sent;case 11:return Xe.next=13,this._uploadPart(xe,je,De,Ge,Be);case 13:return Xe.abrupt("return",Xe.sent);case 14:case"end":return Xe.stop()}},pe,this)}));function he(pe,xe,je,De,Fe,Te,Me){return le.apply(this,arguments)}return he}(),ie.completeMultipartUpload=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De,Fe){var Te,Me,Be,Ge,Ye,Ke,Xe,ot;return Ee.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:for(Te=De.concat().sort(function(Ct,Je){return Ct.number-Je.number}).filter(function(Ct,Je,rt){return!Je||Ct.number!==rt[Je-1].number}),Me=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CompleteMultipartUpload>
|
|
`,Be=0;Be<Te.length;Be++)Ge=Te[Be],Me+=`<Part>
|
|
`,Me+="<PartNumber>".concat(Ge.number,`</PartNumber>
|
|
`),Me+="<ETag>".concat(Ge.etag,`</ETag>
|
|
`),Me+=`</Part>
|
|
`;return Me+="</CompleteMultipartUpload>",Fe=Fe||{},Ye={},Ye=be(Fe,function(Ct){if(z(Ct))return null}),Ye.subres={uploadId:je},Ye.headers=se(Ye.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),Ke=this._objectRequestParams("POST",xe,Ye),Ae.encodeCallback(Ke,Ye),Ke.mime="xml",Ke.content=Me,Ke.headers&&Ke.headers["x-oss-callback"]||(Ke.xmlResponse=!0),Ke.successStatuses=[200],ct.next=17,this.request(Ke);case 17:if(Xe=ct.sent,!Fe.progress){ct.next=21;break}return ct.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())),ct.abrupt("return",ot);case 24:case"end":return ct.stop()}},pe,this)}));function he(pe,xe,je,De){return le.apply(this,arguments)}return he}(),ie._uploadPart=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De,Fe,Te){var Me,Be,Ge,Ye;return Ee.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Te=Te||{},Me={},Se(Te).to(Me),Me.headers=Me.headers||{},Me.headers["Content-Length"]=Fe.size,Me.headers=se(Me.headers,["x-oss-server-side-encryption"]),Me.subres={partNumber:De,uploadId:je},Be=this._objectRequestParams("PUT",xe,Me),Be.mime=Me.mime,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 he(pe,xe,je,De,Fe){return le.apply(this,arguments)}return he}()}).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"),Ae=oe("copy-to"),me=oe("../../common/signUtils"),be=oe("../utils/isIP"),fe=be.isIP,z=oe("../utils/setSTSToken"),te=z.setSTSToken,se=oe("../utils/isFunction"),ie=se.isFunction,le=Ie;le.asyncSignatureUrl=function(){var he=(0,Ee.default)(ve.default.mark(function xe(je,De){var Fe,Te,Me,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||{},je=this._objectName(je),De.method=De.method||"GET",Fe=Se.timestamp()+(De.expires||1800),Te={bucket:this.options.bucket,object:je},Me=this._getResource(Te),!(this.options.stsToken&&ie(this.options.refreshSTSToken))){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,Me,Fe),Ge=ke.parse(this._getReqUrl(Te)),Ge.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Fe,Signature:Be.Signature},Ae(Be.subResource).to(Ge.query),Ke.abrupt("return",Ge.format());case 17:case"end":return Ke.stop()}},xe,this)}));function pe(xe,je){return he.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"),Ae=Se.checkBucketName,me=Ie,be=["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,he){var pe,xe,je;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return(0,Ee.default)(le)==="object"&&(he=le),he=he||{},he.headers=he.headers||{},Object.keys(he.headers).forEach(function(Te){he.headers["x-oss-copy-source-".concat(Te.toLowerCase())]=he.headers[Te]}),(he.meta||Object.keys(he.headers).find(function(Te){return be.includes(Te.toLowerCase())}))&&(he.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(he.meta,he.headers),ie=this._getSourceName(ie,le),he.versionId&&(ie="".concat(ie,"?versionId=").concat(he.versionId)),he.headers["x-oss-copy-source"]=ie,pe=this._objectRequestParams("PUT",se,he),pe.xmlResponse=!0,pe.successStatuses=[200,304],Fe.next=14,this.request(pe);case 14:return xe=Fe.sent,je=xe.data,je&&(je={etag:je.ETag,lastModified:je.LastModified}),Fe.abrupt("return",{data:je,res:xe.res});case 18:case"end":return Fe.stop()}},te,this)}));function z(te,se,ie,le){return fe.apply(this,arguments)}return z}(),me._getSourceName=function(z,te){return typeof te=="string"?z=this._objectName(z):z[0]!=="/"?te=this.options.bucket:(te=z.replace(/\/(.+?)(\/.*)/,"$1"),z=z.replace(/(\/.+?\/)(.*)/,"$2")),Ae(te),z=encodeURIComponent(z),z="/".concat(te,"/").concat(z),z}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],33:[function(oe,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(be){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",be,fe),z.successStatuses=[204],le.next=7,this.request(z);case 7:return te=le.sent,le.abrupt("return",{res:te.res});case 9:case"end":return le.stop()}},me,this)}));function Ae(me){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(oe,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"),Ae=Se.obj2xml,me=Ie;me.deleteMulti=function(){var be=(0,Ee.default)(ve.default.mark(function z(te){var se,ie,le,he,pe,xe,je,De,Fe,Te,Me,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++)he={},typeof te[le]=="string"?he.Key=ke.escape(this._objectName(te[le])):(pe=te[le],xe=pe.key,je=pe.versionId,he.Key=ke.escape(this._objectName(xe)),he.VersionId=je),ie.push(he);return De={Delete:{Quiet:!!se.quiet,Object:ie}},Fe=Ae(De,{headers:!0}),se.subres=Object.assign({delete:""},se.subres),se.versionId&&(se.subres.versionId=se.versionId),Te=this._objectRequestParams("POST","",se),Te.mime="xml",Te.content=Fe,Te.xmlResponse=!0,Te.successStatuses=[200],Xe.next=16,this.request(Te);case 16:return Me=Xe.sent,Be=Me.data,Ge=Be&&Be.Deleted||null,Ge&&(Array.isArray(Ge)||(Ge=[Ge])),Xe.abrupt("return",{res:Me.res,deleted:Ge||[]});case 21:case"end":return Xe.stop()}},z,this)}));function fe(z){return be.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(be){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),be=this._objectName(be),z=this._objectRequestParams("DELETE",be,fe),z.successStatuses=[204],le.next=8,this.request(z);case 8:return te=le.sent,le.abrupt("return",{status:te.status,res:te.res});case 10:case"end":return le.stop()}},me,this)}));function Ae(me){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(oe,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(Ae,me){if(Ee(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(me)me[me.length-1]!=="/"&&(me+="/");else{me=this.options.endpoint.format();var be=de.parse(me),fe=this.options.bucket;be.hostname="".concat(fe,".").concat(be.hostname),be.host="".concat(fe,".").concat(be.host),me=be.format()}return me+this._escape(this._objectName(Ae))}},{"../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"),Ae=oe("is-type-of"),me=Ie;me.get=function(){var be=(0,ke.default)(Ee.default.mark(function z(te,se){var ie,le,he,pe,xe,je,De,Fe,Te=arguments;return Ee.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ie=Te.length>2&&Te[2]!==void 0?Te[2]:{},le=null,he=!1,Ae.writableStream(se)?le=se:Ae.string(se)?(le=Se.createWriteStream(se),he=!0):ie=se,ie=ie||{},pe=de&&de.browser,xe=ie.responseCacheControl===null?"":"no-cache",je=pe&&xe?{"response-cache-control":xe}:{},ie.subres=Object.assign(je,ie.subres),ie.versionId&&(ie.subres.versionId=ie.versionId),ie.process&&(ie.subres["x-oss-process"]=ie.process),Be.prev=11,Fe=this._objectRequestParams("GET",te,ie),Fe.writeStream=le,Fe.successStatuses=[200,206,304],Be.next=17,this.request(Fe);case 17:De=Be.sent,he&&le.destroy(),Be.next=28;break;case 21:if(Be.prev=21,Be.t0=Be.catch(11),!he){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 be.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(be){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),be=this._objectName(be),z=this._objectRequestParams("GET",be,fe),z.successStatuses=[200],z.xmlResponse=!0,le.next=9,this.request(z);case 9:return te=le.sent,le.abrupt("return",{acl:te.data.AccessControlList.Grant,owner:{id:te.data.Owner.ID,displayName:te.data.Owner.DisplayName},res:te.res});case 11:case"end":return le.stop()}},me,this)}));function Ae(me){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(oe,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"),Ae=Se.isObject,me=oe("../utils/isArray"),be=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,he,pe,xe,je,De,Fe,Te,Me=arguments;return ve.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:if(le=Me.length>0&&Me[0]!==void 0?Me[0]:{},he=Me.length>1&&Me[1]!==void 0?Me[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 he.subres=Object.assign({versions:""},he.subres),he.versionId&&(he.subres.versionId=he.versionId),pe=this._objectRequestParams("GET","",he),pe.xmlResponse=!0,pe.successStatuses=[200],pe.query=se(le),Ge.next=12,this.request(pe);case 12:return xe=Ge.sent,je=xe.data.Version||[],De=xe.data.DeleteMarker||[],Fe=this,je&&(Array.isArray(je)||(je=[je]),je=je.map(function(Ye){return{name:Ye.Key,url:Fe._objectUrl(Ye.Key),lastModified:Ye.LastModified,isLatest:Ye.IsLatest==="true",versionId:Ye.VersionId,etag:Ye.ETag,type:Ye.Type,size:Number(Ye.Size),storageClass:Ye.StorageClass,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),De&&(be(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&&(be(Te)||(Te=[Te]),Te=Te.map(function(Ye){return Ye.Prefix})),Ge.abrupt("return",{res:xe.res,objects:je,deleteMarker:De,prefixes:Te,nextMarker:xe.data.NextKeyMarker||null,NextVersionIdMarker:xe.data.NextVersionIdMarker||null,nextKeyMarker:xe.data.NextKeyMarker||null,nextVersionIdMarker:xe.data.NextVersionIdMarker||null,isTruncated:xe.data.IsTruncated==="true"});case 21:case"end":return 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 Ae(ie)&&Object.keys(ie).forEach(function(he){le[te(he)]=ie[he]}),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(be,fe){var z,te;return ve.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return fe=fe||{},be=this._objectName(be),fe.subres=Object.assign({objectMeta:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),z=this._objectRequestParams("HEAD",be,fe),z.successStatuses=[200],ie.next=8,this.request(z);case 8:return te=ie.sent,ie.abrupt("return",{status:te.status,res:te.res});case 10:case"end":return ie.stop()}},me,this)}));function Ae(me,be){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(oe,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"),Ae=Se.isObject;ke.getObjectTagging=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z){var te,se,ie,le,he,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,he=le.TagSet.Tag,he=he&&Ae(he)?[he]:he||[],pe={},he.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 be(fe){return me.apply(this,arguments)}return be}()},{"../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,Ae){if(ve(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return Ae?Ae[Ae.length-1]!=="/"&&(Ae+="/"):Ae=this.options.endpoint.format(),Ae+this._escape(this._objectName(Se))}},{"../utils/isIP":69}],43:[function(oe,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(be){var fe,z,te,se,ie=arguments;return ve.default.wrap(function(he){for(;;)switch(he.prev=he.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),be=this._objectName(be),z=this._objectRequestParams("GET",be,fe),z.successStatuses=[200],he.next=8,this.request(z);case 8:return te=he.sent,se=te.res.headers["x-oss-symlink-target"],he.abrupt("return",{targetName:decodeURIComponent(se),res:te.res});case 11:case"end":return he.stop()}},me,this)}));function Ae(me){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(oe,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,Ae=Ie;Ae.head=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z){var te,se,ie,le,he=arguments;return ve.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return te=he.length>1&&he[1]!==void 0?he[1]:{},Se("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),te.subres=Object.assign({},te.subres),te.versionId&&(te.subres.versionId=te.versionId),se=this._objectRequestParams("HEAD",z,te),se.successStatuses=[200,304],xe.next=8,this.request(se);case 8:return ie=xe.sent,le={meta:null,res:ie.res,status:ie.status},ie.status===200&&Object.keys(ie.headers).forEach(function(je){je.indexOf("x-oss-meta-")===0&&(le.meta||(le.meta={}),le.meta[je.substring(11)]=ie.headers[je])}),xe.abrupt("return",le);case 12:case"end":return xe.stop()}},fe,this)}));function be(fe){return me.apply(this,arguments)}return be}()},{"../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(be,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,be=this._objectName(be),te=this._objectRequestParams("PUT",be,z),te.successStatuses=[200],le.next=10,this.request(te);case 10:return se=le.sent,le.abrupt("return",{res:se.res});case 12:case"end":return le.stop()}},me,this)}));function Ae(me,be,fe){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(oe,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,Ae=oe("../utils/checkObjectTag"),me=Ae.checkObjectTag,be=Ie;be.putObjectTagging=function(){var fe=(0,Ee.default)(ve.default.mark(function te(se,ie){var le,he,pe,xe,je=arguments;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return le=je.length>2&&je[2]!==void 0?je[2]:{},me(ie),le.subres=Object.assign({tagging:""},le.subres),le.versionId&&(le.subres.versionId=le.versionId),se=this._objectName(se),he=this._objectRequestParams("PUT",se,le),he.successStatuses=[200],ie=Object.keys(ie).map(function(Te){return{Key:Te,Value:ie[Te]}}),pe={Tagging:{TagSet:{Tag:ie}}},he.mime="xml",he.content=Se(pe),Fe.next=13,this.request(he);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(be,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),be=this._objectName(be),te=this._objectRequestParams("PUT",be,z),te.successStatuses=[200],le.next=13,this.request(te);case 13:return se=le.sent,le.abrupt("return",{res:se.res});case 15:case"end":return le.stop()}},me,this)}));function Ae(me,be,fe){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(oe,Ue,Ie){"use strict";var de=oe("url"),ve=oe("utility"),Ee=oe("copy-to"),ke=oe("../../common/signUtils"),Se=oe("../utils/isIP"),Ae=Se.isIP,me=Ie;me.signatureUrl=function(fe,z){if(Ae(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");z=z||{},fe=this._objectName(fe),z.method=z.method||"GET";var te=ve.timestamp()+(z.expires||1800),se={bucket:this.options.bucket,object:fe},ie=this._getResource(se);this.options.stsToken&&(z["security-token"]=this.options.stsToken);var le=ke._signatureForURL(this.options.accessKeySecret,z,ie,te),he=de.parse(this._getReqUrl(se));return he.query={OSSAccessKeyId:this.options.accessKeyId,Expires:te,Signature:le.Signature},Ee(le.subResource).to(he.query),he.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,Ae=Ie;Ae._parallelNode=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se,ie){var le,he,pe,xe,je,De,Fe,Te;return ve.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:le=this,he=[],pe=[],xe=z.length/te,je=z.length%te,De=je===0?xe:(z.length-je)/te+1,Fe=1,Te=0;case 8:if(!(Te<z.length)){Be.next=26;break}if(!le.isCancel()){Be.next=11;break}return Be.abrupt("break",26);case 11:if(ie?pe.push(se(le,z[Te],ie)):pe.push(se(le,z[Te])),!(pe.length===te||Fe===De&&Te===z.length-1)){Be.next=23;break}return Be.prev=13,Fe+=1,Be.next=17,Promise.all(pe);case 17:Be.next=22;break;case 19:Be.prev=19,Be.t0=Be.catch(13),he.push(Be.t0);case 22:pe=[];case 23:Te++,Be.next=8;break;case 26:return Be.abrupt("return",he);case 27:case"end":return Be.stop()}},fe,this,[[13,19]])}));function be(fe,z,te,se){return me.apply(this,arguments)}return be}(),Ae._parallel=function(be,fe,z){var te=this;return new Promise(function(se){var ie=[];if(fe<=0||!be){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 he(Be){var Ge=-1,Ye=Be.length;return function(){return++Ge<Ye&&!te.isCancel()?{value:Be[Ge],key:Ge}:null}}var pe=he(be),xe=!1,je=0,De=!1;function Fe(Be){je-=1,Be?(xe=!0,ie.push(Be),se(ie)):xe&&je<=0?(xe=!0,se(ie)):De||(te.isCancel()?se(ie):Me())}function Te(Be,Ge){z(Be).then(function(Ye){Ge(null,Ye)}).catch(function(Ye){Ge(Ye)})}function Me(){for(De=!0;je<fe&&!xe&&!te.isCancel();){var Be=pe();if(Be===null||ie.length>0){xe=!0,je<=0&&se(ie);return}je+=1,Te(Be.value,le(Fe))}De=!1}Me()})},Ae.cancel=function(be){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=[],be&&this.abortMultipartUpload(be.name,be.uploadId,be.options)},Ae.isCancel=function(){return this.options.cancelFlag},Ae.resetCancelFlag=function(){this.options.cancelFlag=!1},Ae._stop=function(){this.options.cancelFlag=!0},Ae._makeCancelEvent=function(){var be={status:0,name:"cancel"};return be},Ae._makeAbortEvent=function(){var be={status:0,name:"abort",message:"upload task has been abort"};return be}},{"./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,be){var fe="".concat(me),z="?";if(Ee.string(be)&&be.trim()!=="")fe+=z+be;else if(Ee.array(be))be.sort(),fe+=z+be.join("&");else if(be){var te=function(le,he){return le[0]>he[0]?1:le[0]<he[0]?-1:0},se=function(le){fe+=z+le,(be[le]||be[le]===0)&&(fe+="=".concat(be[le])),z="&"};Object.keys(be).sort(te).forEach(se)}return fe},Ie.buildCanonicalString=function(me,be,fe,z){fe=fe||{};var te=Se(fe.headers),se="x-oss-",ie=[],le={},he=[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]))}),he=he.concat(ie),he.push(this.buildCanonicalizedResource(be,fe.parameters)),he.join(`
|
|
`)},Ie.computeSignature=function(me,be){var fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",z=ve.createHmac("sha1",me);return z.update(de.from(be,fe)).digest("base64")},Ie.authorization=function(me,be,fe,z){return"OSS ".concat(me,":").concat(this.computeSignature(be,fe,z))},Ie._signatureForURL=function(me){var be=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=be.subResource,le=ie===void 0?{}:ie;if(be.process){var he="x-oss-process";le[he]=be.process}if(be.trafficLimit){var pe="x-oss-traffic-limit";le[pe]=be.trafficLimit}if(be.response&&Object.keys(be.response).forEach(function(Fe){var Te="response-".concat(Fe.toLowerCase());le[Te]=be.response[Fe]}),Object.keys(be).forEach(function(Fe){var Te=Fe.toLowerCase(),Me=be[Fe];Te.indexOf("x-oss-")===0?se[Te]=Me:(Te.indexOf("content-md5")===0||Te.indexOf("content-type")===0)&&(se[Fe]=Me)}),Object.prototype.hasOwnProperty.call(be,"security-token")&&(le["security-token"]=be["security-token"]),Object.prototype.hasOwnProperty.call(be,"callback")){var xe={callbackUrl:encodeURI(be.callback.url),callbackBody:be.callback.body};if(be.callback.host&&(xe.callbackHost=be.callback.host),be.callback.contentType&&(xe.callbackBodyType=be.callback.contentType),le.callback=de.from(JSON.stringify(xe)).toString("base64"),be.callback.customValue){var je={};Object.keys(be.callback.customValue).forEach(function(Fe){je["x:".concat(Fe)]=be.callback.customValue[Fe]}),le["callback-var"]=de.from(JSON.stringify(je)).toString("base64")}}var De=this.buildCanonicalString(be.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 (/)"}],Ae={key:[].concat(Se,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(Se,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function me(be){if(!ke(be))throw new Error("tag must be Object");var fe=Object.entries(be);if(fe.length>10)throw new Error("maximum of 10 tags for a object");var z=["key","value"];fe.forEach(function(te){te.forEach(function(se,ie){ve(se,Ae[z[ie]])})})}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"),Ae=oe("copy-to"),me=oe("path"),be=oe("./encoder"),fe=be.encoder,z=oe("./isIP"),te=z.isIP,se=oe("./setRegion"),ie=se.setRegion,le=oe("../client/getReqUrl"),he=le.getReqUrl,pe=oe("./isDingTalk"),xe=pe.isDingTalk;function je(Te,Me){return Te[Me]||Te[Me.toLowerCase()]}function De(Te,Me){delete Te[Me],delete Te[Me.toLowerCase()]}function Fe(Te){var Me=new Date;this.options.amendTimeSkewed&&(Me=+new Date+this.options.amendTimeSkewed);var Be={"x-oss-date":Se(Me,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(Be["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(Be["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(Be,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(Be["x-oss-security-token"]=this.options.stsToken),Ae(Te.headers).to(Be),je(Be,"Content-Type")||(Te.mime&&Te.mime.indexOf("/")>0?Be["Content-Type"]=Te.mime:xe()?Be["Content-Type"]="application/octet-stream":Be["Content-Type"]=ke.getType(Te.mime||me.extname(Te.object||""))),je(Be,"Content-Type")||De(Be,"Content-Type"),Te.content&&(Te.disabledMD5||(!Te.headers||!Te.headers["Content-MD5"]?Be["Content-MD5"]=ve.createHash("md5").update(de.from(Te.content,"utf8")).digest("base64"):Be["Content-MD5"]=Te.headers["Content-MD5"]),Be["Content-Length"]||(Be["Content-Length"]=Te.content.length));var 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,ct=Xe.secure,Ct=ie(ot,lt,ct);Be.host="".concat(Te.bucket,".").concat(Ct.host)}var Je=he.bind(this)(Te);Ee("request %s %s, with headers %j, !!stream: %s",Te.method,Je,Be,!!Te.stream);var rt=Te.timeout||this.options.timeout,xt={method:Te.method,content:Te.content,stream:Te.stream,headers:Be,timeout:rt,writeStream:Te.writeStream,customResponse:Te.customResponse,ctx:Te.ctx||this.ctx};return this.agent&&(xt.agent=this.agent),this.httpsAgent&&(xt.httpsAgent=this.httpsAgent),xt.enableProxy=!!this.options.enableProxy,xt.proxy=this.options.proxy?this.options.proxy:null,{url:Je,params:xt}}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,be,fe){if(de.isObject(me)){var z=be.remove,te=z===void 0?[]:z,se=be.rename,ie=se===void 0?{}:se,le=be.camel,he=le===void 0?[]:le,pe=be.bool,xe=pe===void 0?[]:pe,je=be.lowerFirst,De=je===void 0?!1:je;return te.forEach(function(Fe){return delete me[Fe]}),Object.entries(ie).forEach(function(Fe){me[Fe[0]]&&(me[Fe[1]]||(me[Fe[1]]=me[Fe[0]],delete me[Fe[0]]))}),he.forEach(function(Fe){if(me[Fe]){var Te=Fe.replace(/^(.)/,function(Me){return Me.toLowerCase()}).replace(/-(\w)/g,function(Me,Be){return Be.toUpperCase()});me[Te]||(me[Te]=me[Fe])}}),xe.forEach(function(Fe){me[Fe]=Se(me[Fe])}),typeof fe=="function"&&fe(me),Ae(me,De),ke}}Ie.dataFix=ke;function Se(me){return me?ve.includes(me)?!0:Ee.includes(me)?!1:me:!1}function Ae(me,be){be&&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(Ae){Se[Ae]=Ie.deepCopy(ke[Ae])}),Se},Ie.deepCopyWith=function(ke,Se){function Ae(me,be,fe){var z=Se(me,be,fe);if(z!==void 0)return z;if(me===null||(0,ve.default)(me)!=="object")return me;if(Ee.isBuffer(me))return me.slice();var te=Array.isArray(me)?[]:{};return Object.keys(me).forEach(function(se){te[se]=Ae(me[se],se,me)}),te}return Se?Ae(ke,"",null):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 be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return be&&ve.isObject(me)&&(me=[me]),Ee.isArray(me)?me=me.map(Ae):me=Ae(me),me}Ie.formatInventoryConfig=Se;function Ae(me){return de.dataFix(me,{bool:["IsEnabled"]},function(be){var fe,z;be.prefix=be.Filter.Prefix,delete be.Filter,be.OSSBucketDestination=be.Destination.OSSBucketDestination,be.OSSBucketDestination.rolename=be.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete be.OSSBucketDestination.RoleArn,be.OSSBucketDestination.bucket=be.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete be.OSSBucketDestination.Bucket,delete be.Destination,be.frequency=be.Schedule.Frequency,delete be.Schedule.Frequency,!((fe=be==null?void 0:be.OptionalFields)===null||fe===void 0)&&fe.Field&&!Ee.isArray((z=be.OptionalFields)===null||z===void 0?void 0:z.Field)&&(be.OptionalFields.Field=[be.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,Ae,me){if(Se===null||(0,ve.default)(Se)!=="object")return Se;var be;if(Array.isArray(Se)){be=[];for(var fe=0;fe<Se.length;fe++)be.push(Ee(Se[fe],Ae,me))}else be={},Object.keys(Se).forEach(function(z){be[ke(z,Ae,me)]=Ee(Se[z],Ae,me)});return be}Ie.formatObjKey=Ee;function ke(Se,Ae,me){return me&&me.exclude&&me.exclude.includes(Se)||(Ae==="firstUpperCase"?Se=Se.replace(/^./,function(be){return be.toUpperCase()}):Ae==="firstLowerCase"&&(Se=Se.replace(/^./,function(be){return be.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 Ae="";return Se&&Se.headers&&(Ae=`<?xml version="1.0" encoding="UTF-8"?>
|
|
`),Se&&Se.firstUpperCase&&(ke=de.formatObjKey(ke,"firstUpperCase")),ve(ke)==="object"?Object.keys(ke).forEach(function(me){ve(ke[me])!=="undefined"&&ve(ke[me])!=="null"&&(ve(ke[me])==="string"||ve(ke[me])==="number"?Ae+="<".concat(me,">").concat(ke[me],"</").concat(me,">"):ve(ke[me])==="object"?Ae+="<".concat(me,">").concat(Ee(ke[me]),"</").concat(me,">"):ve(ke[me])==="array"?Ae+=ke[me].map(function(be){return"<".concat(me,">").concat(Ee(be),"</").concat(me,">")}).join(""):Ae+="<".concat(me,">").concat(ke[me].toString(),"</").concat(me,">"))}):Ae+=ke.toString(),Ae}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,Ae){var me=typeof Symbol!="undefined"&&Se[Symbol.iterator]||Se["@@iterator"];if(!me){if(Array.isArray(Se)||(me=ve(Se))||Ae&&Se&&typeof Se.length=="number"){me&&(Se=me);var be=0,fe=function(){};return{s:fe,n:function(){return be>=Se.length?{done:!0}:{done:!1,value:Se[be++]}},e:function(le){throw le},f:fe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var z=!0,te=!1,se;return{s:function(){me=me.call(Se)},n:function(){var le=me.next();return z=le.done,le},e:function(le){te=!0,se=le},f:function(){try{!z&&me.return!=null&&me.return()}finally{if(te)throw se}}}}function ve(Se,Ae){if(Se){if(typeof Se=="string")return Ee(Se,Ae);var me=Object.prototype.toString.call(Se).slice(8,-1);if(me==="Object"&&Se.constructor&&(me=Se.constructor.name),me==="Map"||me==="Set")return Array.from(Se);if(me==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(me))return Ee(Se,Ae)}}function Ee(Se,Ae){(Ae==null||Ae>Se.length)&&(Ae=Se.length);for(var me=0,be=new Array(Ae);me<Ae;me++)be[me]=Se[me];return be}Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.omit=void 0;function ke(Se,Ae){var me=Object.assign({},Se),be=de(Ae),fe;try{for(be.s();!(fe=be.n()).done;){var z=fe.value;delete me[z]}}catch(te){be.e(te)}finally{be.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,Ae=ke.retryDelay,me=Ae===void 0?500:Ae,be=ke.errorHandler,fe=be===void 0?function(){return!0}:be,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(he,pe){ve.apply(void 0,ie).then(function(xe){Se=0,he(xe)}).catch(function(xe){Se<Ee&&fe(xe)?(Se++,setTimeout(function(){he(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 Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Ee.checkConfigValid(Se,"region");var be=me?"https://":"http://",fe=Ae?"-internal.aliyuncs.com":".aliyuncs.com",z="vpc100-oss-cn-";return Se.substr(0,z.length)===z&&(fe=".aliyuncs.com"),ve.default.parse(be+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 Ae.apply(this,arguments)}function Ae(){return Ae=(0,Ee.default)(ve.default.mark(function be(){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()}},be,this)})),Ae.apply(this,arguments)}Ie.setSTSToken=Se;function me(be){var fe=["accessKeySecret","accessKeyId","stsToken"],z=Object.keys(be);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,Ae,me,be,fe){try{var z=Ee[be](fe),te=z.value}catch(se){Se(se);return}z.done?ke(te):Promise.resolve(te).then(Ae,me)}function ve(Ee){return function(){var ke=this,Se=arguments;return new Promise(function(Ae,me){var be=Ee.apply(ke,Se);function fe(te){de(be,Ae,me,fe,z,"next",te)}function z(te){de(be,Ae,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 ct=ot.length,Ct=lt.length,Je=0,rt=Math.min(ct,Ct);Je<rt;++Je)if(ot[Je]!==lt[Je]){ct=ot[Je],Ct=lt[Je];break}return ct<Ct?-1:Ct<ct?1:0}function ke(ot){return de.Buffer&&typeof de.Buffer.isBuffer=="function"?de.Buffer.isBuffer(ot):!!(ot!=null&&ot._isBuffer)}var Se=oe("util/"),Ae=Object.prototype.hasOwnProperty,me=Array.prototype.slice,be=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=je,se=/\s*function\s+([^\(\s]*)\s*/;function ie(ot){if(Se.isFunction(ot)){if(be)return ot.name;var lt=ot.toString(),ct=lt.match(se);return ct&&ct[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 ct=lt.stackStartFunction||xe;if(Error.captureStackTrace)Error.captureStackTrace(this,ct);else{var Ct=new Error;if(Ct.stack){var Je=Ct.stack,rt=ie(ct),xt=Je.indexOf(`
|
|
`+rt);if(xt>=0){var bt=Je.indexOf(`
|
|
`,xt+1);Je=Je.substring(bt+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 he(ot){if(be||!Se.isFunction(ot))return Se.inspect(ot);var lt=ie(ot),ct=lt?": "+lt:"";return"[Function"+ct+"]"}function pe(ot){return le(he(ot.actual),128)+" "+ot.operator+" "+le(he(ot.expected),128)}function xe(ot,lt,ct,Ct,Je){throw new te.AssertionError({message:ct,actual:ot,expected:lt,operator:Ct,stackStartFunction:Je})}te.fail=xe;function je(ot,lt){ot||xe(ot,!0,lt,"==",te.ok)}te.ok=je,te.equal=function(lt,ct,Ct){lt!=ct&&xe(lt,ct,Ct,"==",te.equal)},te.notEqual=function(lt,ct,Ct){lt==ct&&xe(lt,ct,Ct,"!=",te.notEqual)},te.deepEqual=function(lt,ct,Ct){De(lt,ct,!1)||xe(lt,ct,Ct,"deepEqual",te.deepEqual)},te.deepStrictEqual=function(lt,ct,Ct){De(lt,ct,!0)||xe(lt,ct,Ct,"deepStrictEqual",te.deepStrictEqual)};function De(ot,lt,ct,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 ct?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,ct,Ct))}function Fe(ot){return Object.prototype.toString.call(ot)=="[object Arguments]"}function Te(ot,lt,ct,Ct){if(ot==null||lt===null||lt===void 0)return!1;if(Se.isPrimitive(ot)||Se.isPrimitive(lt))return ot===lt;if(ct&&Object.getPrototypeOf(ot)!==Object.getPrototypeOf(lt))return!1;var Je=Fe(ot),rt=Fe(lt);if(Je&&!rt||!Je&&rt)return!1;if(Je)return ot=me.call(ot),lt=me.call(lt),De(ot,lt,ct);var xt=Xe(ot),bt=Xe(lt),Pt,ht;if(xt.length!==bt.length)return!1;for(xt.sort(),bt.sort(),ht=xt.length-1;ht>=0;ht--)if(xt[ht]!==bt[ht])return!1;for(ht=xt.length-1;ht>=0;ht--)if(Pt=xt[ht],!De(ot[Pt],lt[Pt],ct,Ct))return!1;return!0}te.notDeepEqual=function(lt,ct,Ct){De(lt,ct,!1)&&xe(lt,ct,Ct,"notDeepEqual",te.notDeepEqual)},te.notDeepStrictEqual=Me;function Me(ot,lt,ct){De(ot,lt,!0)&&xe(ot,lt,ct,"notDeepStrictEqual",Me)}te.strictEqual=function(lt,ct,Ct){lt!==ct&&xe(lt,ct,Ct,"===",te.strictEqual)},te.notStrictEqual=function(lt,ct,Ct){lt===ct&&xe(lt,ct,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(ct){}return Error.isPrototypeOf(lt)?!1:lt.call({},ot)===!0}function Ge(ot){var lt;try{ot()}catch(ct){lt=ct}return lt}function Ye(ot,lt,ct,Ct){var Je;if(typeof lt!="function")throw new TypeError('"block" argument must be a function');typeof ct=="string"&&(Ct=ct,ct=null),Je=Ge(lt),Ct=(ct&&ct.name?" ("+ct.name+").":".")+(Ct?" "+Ct:"."),ot&&!Je&&xe(Je,ct,"Missing expected exception"+Ct);var rt=typeof Ct=="string",xt=!ot&&Se.isError(Je),bt=!ot&&Je&&!ct;if((xt&&rt&&Be(Je,ct)||bt)&&xe(Je,ct,"Got unwanted exception"+Ct),ot&&Je&&ct&&!Be(Je,ct)||!ot&&Je)throw Je}te.throws=function(ot,lt,ct){Ye(!0,ot,lt,ct)},te.doesNotThrow=function(ot,lt,ct){Ye(!1,ot,lt,ct)},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 ct in ot)Ae.call(ot,ct)&<.push(ct);return lt}}).call(this)}).call(this,typeof Mn!="undefined"?Mn: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(bt){if(!Te(bt)){for(var Pt=[],ht=0;ht<arguments.length;ht++)Pt.push(Ae(arguments[ht]));return Pt.join(" ")}for(var ht=1,St=arguments,mt=St.length,Nt=String(bt).replace(Ee,function(Dt){if(Dt==="%%")return"%";if(ht>=mt)return Dt;switch(Dt){case"%s":return String(St[ht++]);case"%d":return Number(St[ht++]);case"%j":try{return JSON.stringify(St[ht++])}catch(gt){return"[Circular]"}default:return Dt}}),dt=St[ht];ht<mt;dt=St[++ht])je(dt)||!Ye(dt)?Nt+=" "+dt:Nt+=" "+Ae(dt);return Nt},Ie.deprecate=function(bt,Pt){if(Be(ve.process))return function(){return Ie.deprecate(bt,Pt).apply(this,arguments)};if(de.noDeprecation===!0)return bt;var ht=!1;function St(){if(!ht){if(de.throwDeprecation)throw new Error(Pt);de.traceDeprecation?console.trace(Pt):console.error(Pt),ht=!0}return bt.apply(this,arguments)}return St};var ke={},Se;Ie.debuglog=function(bt){if(Be(Se)&&(Se=de.env.NODE_DEBUG||""),bt=bt.toUpperCase(),!ke[bt])if(new RegExp("\\b"+bt+"\\b","i").test(Se)){var Pt=de.pid;ke[bt]=function(){var ht=Ie.format.apply(Ie,arguments);console.error("%s %d: %s",bt,Pt,ht)}}else ke[bt]=function(){};return ke[bt]};function Ae(bt,Pt){var ht={seen:[],stylize:be};return arguments.length>=3&&(ht.depth=arguments[2]),arguments.length>=4&&(ht.colors=arguments[3]),xe(Pt)?ht.showHidden=Pt:Pt&&Ie._extend(ht,Pt),Be(ht.showHidden)&&(ht.showHidden=!1),Be(ht.depth)&&(ht.depth=2),Be(ht.colors)&&(ht.colors=!1),Be(ht.customInspect)&&(ht.customInspect=!0),ht.colors&&(ht.stylize=me),z(ht,bt,ht.depth)}Ie.inspect=Ae,Ae.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Ae.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function me(bt,Pt){var ht=Ae.styles[Pt];return ht?"\x1B["+Ae.colors[ht][0]+"m"+bt+"\x1B["+Ae.colors[ht][1]+"m":bt}function be(bt,Pt){return bt}function fe(bt){var Pt={};return bt.forEach(function(ht,St){Pt[ht]=!0}),Pt}function z(bt,Pt,ht){if(bt.customInspect&&Pt&&ot(Pt.inspect)&&Pt.inspect!==Ie.inspect&&!(Pt.constructor&&Pt.constructor.prototype===Pt)){var St=Pt.inspect(ht,bt);return Te(St)||(St=z(bt,St,ht)),St}var mt=te(bt,Pt);if(mt)return mt;var Nt=Object.keys(Pt),dt=fe(Nt);if(bt.showHidden&&(Nt=Object.getOwnPropertyNames(Pt)),Xe(Pt)&&(Nt.indexOf("message")>=0||Nt.indexOf("description")>=0))return se(Pt);if(Nt.length===0){if(ot(Pt)){var Dt=Pt.name?": "+Pt.name:"";return bt.stylize("[Function"+Dt+"]","special")}if(Ge(Pt))return bt.stylize(RegExp.prototype.toString.call(Pt),"regexp");if(Ke(Pt))return bt.stylize(Date.prototype.toString.call(Pt),"date");if(Xe(Pt))return se(Pt)}var gt="",yt=!1,tt=["{","}"];if(pe(Pt)&&(yt=!0,tt=["[","]"]),ot(Pt)){var He=Pt.name?": "+Pt.name:"";gt=" [Function"+He+"]"}if(Ge(Pt)&&(gt=" "+RegExp.prototype.toString.call(Pt)),Ke(Pt)&&(gt=" "+Date.prototype.toUTCString.call(Pt)),Xe(Pt)&&(gt=" "+se(Pt)),Nt.length===0&&(!yt||Pt.length==0))return tt[0]+gt+tt[1];if(ht<0)return Ge(Pt)?bt.stylize(RegExp.prototype.toString.call(Pt),"regexp"):bt.stylize("[Object]","special");bt.seen.push(Pt);var we;return yt?we=ie(bt,Pt,ht,dt,Nt):we=Nt.map(function(Ne){return le(bt,Pt,ht,dt,Ne,yt)}),bt.seen.pop(),he(we,gt,tt)}function te(bt,Pt){if(Be(Pt))return bt.stylize("undefined","undefined");if(Te(Pt)){var ht="'"+JSON.stringify(Pt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return bt.stylize(ht,"string")}if(Fe(Pt))return bt.stylize(""+Pt,"number");if(xe(Pt))return bt.stylize(""+Pt,"boolean");if(je(Pt))return bt.stylize("null","null")}function se(bt){return"["+Error.prototype.toString.call(bt)+"]"}function ie(bt,Pt,ht,St,mt){for(var Nt=[],dt=0,Dt=Pt.length;dt<Dt;++dt)xt(Pt,String(dt))?Nt.push(le(bt,Pt,ht,St,String(dt),!0)):Nt.push("");return mt.forEach(function(gt){gt.match(/^\d+$/)||Nt.push(le(bt,Pt,ht,St,gt,!0))}),Nt}function le(bt,Pt,ht,St,mt,Nt){var dt,Dt,gt;if(gt=Object.getOwnPropertyDescriptor(Pt,mt)||{value:Pt[mt]},gt.get?gt.set?Dt=bt.stylize("[Getter/Setter]","special"):Dt=bt.stylize("[Getter]","special"):gt.set&&(Dt=bt.stylize("[Setter]","special")),xt(St,mt)||(dt="["+mt+"]"),Dt||(bt.seen.indexOf(gt.value)<0?(je(ht)?Dt=z(bt,gt.value,null):Dt=z(bt,gt.value,ht-1),Dt.indexOf(`
|
|
`)>-1&&(Nt?Dt=Dt.split(`
|
|
`).map(function(yt){return" "+yt}).join(`
|
|
`).substr(2):Dt=`
|
|
`+Dt.split(`
|
|
`).map(function(yt){return" "+yt}).join(`
|
|
`))):Dt=bt.stylize("[Circular]","special")),Be(dt)){if(Nt&&mt.match(/^\d+$/))return Dt;dt=JSON.stringify(""+mt),dt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(dt=dt.substr(1,dt.length-2),dt=bt.stylize(dt,"name")):(dt=dt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),dt=bt.stylize(dt,"string"))}return dt+": "+Dt}function he(bt,Pt,ht){var St=0,mt=bt.reduce(function(Nt,dt){return St++,dt.indexOf(`
|
|
`)>=0&&St++,Nt+dt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return mt>60?ht[0]+(Pt===""?"":Pt+`
|
|
`)+" "+bt.join(`,
|
|
`)+" "+ht[1]:ht[0]+Pt+" "+bt.join(", ")+" "+ht[1]}function pe(bt){return Array.isArray(bt)}Ie.isArray=pe;function xe(bt){return typeof bt=="boolean"}Ie.isBoolean=xe;function je(bt){return bt===null}Ie.isNull=je;function De(bt){return bt==null}Ie.isNullOrUndefined=De;function Fe(bt){return typeof bt=="number"}Ie.isNumber=Fe;function Te(bt){return typeof bt=="string"}Ie.isString=Te;function Me(bt){return typeof bt=="symbol"}Ie.isSymbol=Me;function Be(bt){return bt===void 0}Ie.isUndefined=Be;function Ge(bt){return Ye(bt)&&ct(bt)==="[object RegExp]"}Ie.isRegExp=Ge;function Ye(bt){return typeof bt=="object"&&bt!==null}Ie.isObject=Ye;function Ke(bt){return Ye(bt)&&ct(bt)==="[object Date]"}Ie.isDate=Ke;function Xe(bt){return Ye(bt)&&(ct(bt)==="[object Error]"||bt instanceof Error)}Ie.isError=Xe;function ot(bt){return typeof bt=="function"}Ie.isFunction=ot;function lt(bt){return bt===null||typeof bt=="boolean"||typeof bt=="number"||typeof bt=="string"||typeof bt=="symbol"||typeof bt=="undefined"}Ie.isPrimitive=lt,Ie.isBuffer=oe("./support/isBuffer");function ct(bt){return Object.prototype.toString.call(bt)}function Ct(bt){return bt<10?"0"+bt.toString(10):bt.toString(10)}var Je=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rt(){var bt=new Date,Pt=[Ct(bt.getHours()),Ct(bt.getMinutes()),Ct(bt.getSeconds())].join(":");return[bt.getDate(),Je[bt.getMonth()],Pt].join(" ")}Ie.log=function(){console.log("%s - %s",rt(),Ie.format.apply(Ie,arguments))},Ie.inherits=oe("inherits"),Ie._extend=function(bt,Pt){if(!Pt||!Ye(Pt))return bt;for(var ht=Object.keys(Pt),St=ht.length;St--;)bt[ht[St]]=Pt[ht[St]];return bt};function xt(bt,Pt){return Object.prototype.hasOwnProperty.call(bt,Pt)}}).call(this)}).call(this,oe("_process"),typeof Mn!="undefined"?Mn: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=[],Ae=0;Ae<ve.length;Ae++)typeof Ee[ve[Ae]]=="function"&&(Se[Se.length]=ve[Ae]);return Se}}).call(this)}).call(this,typeof Mn!="undefined"?Mn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(oe,Ue,Ie){"use strict";Ie.byteLength=be,Ie.toByteArray=z,Ie.fromByteArray=ie;for(var de=[],ve=[],Ee=typeof Uint8Array!="undefined"?Uint8Array:Array,ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Se=0,Ae=ke.length;Se<Ae;++Se)de[Se]=ke[Se],ve[ke.charCodeAt(Se)]=Se;ve[45]=62,ve[95]=63;function me(le){var he=le.length;if(he%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var pe=le.indexOf("=");pe===-1&&(pe=he);var xe=pe===he?0:4-pe%4;return[pe,xe]}function be(le){var he=me(le),pe=he[0],xe=he[1];return(pe+xe)*3/4-xe}function fe(le,he,pe){return(he+pe)*3/4-pe}function z(le){var he,pe=me(le),xe=pe[0],je=pe[1],De=new Ee(fe(le,xe,je)),Fe=0,Te=je>0?xe-4:xe,Me;for(Me=0;Me<Te;Me+=4)he=ve[le.charCodeAt(Me)]<<18|ve[le.charCodeAt(Me+1)]<<12|ve[le.charCodeAt(Me+2)]<<6|ve[le.charCodeAt(Me+3)],De[Fe++]=he>>16&255,De[Fe++]=he>>8&255,De[Fe++]=he&255;return je===2&&(he=ve[le.charCodeAt(Me)]<<2|ve[le.charCodeAt(Me+1)]>>4,De[Fe++]=he&255),je===1&&(he=ve[le.charCodeAt(Me)]<<10|ve[le.charCodeAt(Me+1)]<<4|ve[le.charCodeAt(Me+2)]>>2,De[Fe++]=he>>8&255,De[Fe++]=he&255),De}function te(le){return de[le>>18&63]+de[le>>12&63]+de[le>>6&63]+de[le&63]}function se(le,he,pe){for(var xe,je=[],De=he;De<pe;De+=3)xe=(le[De]<<16&16711680)+(le[De+1]<<8&65280)+(le[De+2]&255),je.push(te(xe));return je.join("")}function ie(le){for(var he,pe=le.length,xe=pe%3,je=[],De=16383,Fe=0,Te=pe-xe;Fe<Te;Fe+=De)je.push(se(le,Fe,Fe+De>Te?Te:Fe+De));return xe===1?(he=le[pe-1],je.push(de[he>>2]+de[he<<4&63]+"==")):xe===2&&(he=(le[pe-2]<<8)+le[pe-1],je.push(de[he>>10]+de[he>>4&63]+de[he<<2&63]+"=")),je.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(Pt){var ht=fe.match(Pt);return ht&&ht.length>1&&ht[1]||""}function te(Pt){var ht=fe.match(Pt);return ht&&ht.length>1&&ht[2]||""}var se=z(/(ipod|iphone|ipad)/i).toLowerCase(),ie=/like android/i.test(fe),le=!ie&&/android/i.test(fe),he=/nexus\s*[0-6]\s*/i.test(fe),pe=!he&&/nexus\s*[0-9]+/i.test(fe),xe=/CrOS/.test(fe),je=/silk/i.test(fe),De=/sailfish/i.test(fe),Fe=/tizen/i.test(fe),Te=/(web|hpw)(o|0)s/i.test(fe),Me=/windows phone/i.test(fe),Be=/SamsungBrowser/i.test(fe),Ge=!Me&&/windows/i.test(fe),Ye=!se&&!je&&/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),ct=!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)}:Me?(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")):je?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 rt(Pt){switch(Pt){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 xt="";Je.windows?xt=rt(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):Je.windowsphone?xt=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):Je.mac?(xt=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),xt=xt.replace(/[_\s]/g,".")):se?(xt=z(/os (\d+([_\s]\d+)*) like mac os x/i),xt=xt.replace(/[_\s]/g,".")):le?xt=z(/android[ \/-](\d+(\.\d+)*)/i):Je.webos?xt=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):Je.blackberry?xt=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):Je.bada?xt=z(/bada\/(\d+(\.\d+)*)/i):Je.tizen&&(xt=z(/tizen[\/\s](\d+(\.\d+)*)/i)),xt&&(Je.osversion=xt);var bt=!Je.windows&&xt.split(".")[0];return lt||pe||se=="ipad"||le&&(bt==3||bt>=4&&!ct)||Je.silk?Je.tablet=de:(ct||se=="iphone"||se=="ipod"||le||he||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&&Ae([Je.version,"1.0"])===1||Je.mzbrowser&&Ae([Je.version,"6.0"])===1||Je.focus&&Ae([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 Ae(fe){for(var z=Math.max(ke(fe[0]),ke(fe[1])),te=Se(fe,function(se){var ie=z-ke(se);return se=se+new Array(ie+1).join(".0"),Se(se.split("."),function(le){return new Array(20-le.length).join("0")+le}).reverse()});--z>=0;){if(te[0][z]>te[1][z])return 1;if(te[0][z]===te[1][z]){if(z===0)return 0}else return-1}}function me(fe,z,te){var se=Ee;typeof z=="string"&&(te=z,z=void 0),z===void 0&&(z=!1),te&&(se=ve(te));var ie=""+se.version;for(var le in fe)if(fe.hasOwnProperty(le)&&se[le]){if(typeof fe[le]!="string")throw new Error("Browser version in the minVersion map should be a string: "+le+": "+String(fe));return Ae([ie,fe[le]])<0}return z}function be(fe,z,te){return!me(fe,z,te)}return Ee.isUnsupportedBrowser=me,Ee.compareVersions=Ae,Ee.check=be,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(Ze){return!1}}Object.defineProperty(me.prototype,"parent",{enumerable:!0,get:function(){if(me.isBuffer(this))return this.buffer}}),Object.defineProperty(me.prototype,"offset",{enumerable:!0,get:function(){if(me.isBuffer(this))return this.byteOffset}});function Ae(_e){if(_e>ke)throw new RangeError('The value "'+_e+'" is invalid for option "size"');var Ze=new Uint8Array(_e);return Ze.__proto__=me.prototype,Ze}function me(_e,Ze,qe){if(typeof _e=="number"){if(typeof Ze=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return te(_e)}return be(_e,Ze,qe)}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 be(_e,Ze,qe){if(typeof _e=="string")return se(_e,Ze);if(ArrayBuffer.isView(_e))return ie(_e);if(_e==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _e);if(nt(_e,ArrayBuffer)||_e&&nt(_e.buffer,ArrayBuffer))return le(_e,Ze,qe);if(typeof _e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ut=_e.valueOf&&_e.valueOf();if(ut!=null&&ut!==_e)return me.from(ut,Ze,qe);var vt=he(_e);if(vt)return vt;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof _e[Symbol.toPrimitive]=="function")return me.from(_e[Symbol.toPrimitive]("string"),Ze,qe);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,Ze,qe){return be(_e,Ze,qe)},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,Ze,qe){return fe(_e),_e<=0?Ae(_e):Ze!==void 0?typeof qe=="string"?Ae(_e).fill(Ze,qe):Ae(_e).fill(Ze):Ae(_e)}me.alloc=function(_e,Ze,qe){return z(_e,Ze,qe)};function te(_e){return fe(_e),Ae(_e<0?0:pe(_e)|0)}me.allocUnsafe=function(_e){return te(_e)},me.allocUnsafeSlow=function(_e){return te(_e)};function se(_e,Ze){if((typeof Ze!="string"||Ze==="")&&(Ze="utf8"),!me.isEncoding(Ze))throw new TypeError("Unknown encoding: "+Ze);var qe=je(_e,Ze)|0,ut=Ae(qe),vt=ut.write(_e,Ze);return vt!==qe&&(ut=ut.slice(0,vt)),ut}function ie(_e){for(var Ze=_e.length<0?0:pe(_e.length)|0,qe=Ae(Ze),ut=0;ut<Ze;ut+=1)qe[ut]=_e[ut]&255;return qe}function le(_e,Ze,qe){if(Ze<0||_e.byteLength<Ze)throw new RangeError('"offset" is outside of buffer bounds');if(_e.byteLength<Ze+(qe||0))throw new RangeError('"length" is outside of buffer bounds');var ut;return Ze===void 0&&qe===void 0?ut=new Uint8Array(_e):qe===void 0?ut=new Uint8Array(_e,Ze):ut=new Uint8Array(_e,Ze,qe),ut.__proto__=me.prototype,ut}function he(_e){if(me.isBuffer(_e)){var Ze=pe(_e.length)|0,qe=Ae(Ze);return qe.length===0||_e.copy(qe,0,0,Ze),qe}if(_e.length!==void 0)return typeof _e.length!="number"||Re(_e.length)?Ae(0):ie(_e);if(_e.type==="Buffer"&&Array.isArray(_e.data))return ie(_e.data)}function pe(_e){if(_e>=ke)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ke.toString(16)+" bytes");return _e|0}function xe(_e){return+_e!=_e&&(_e=0),me.alloc(+_e)}me.isBuffer=function(Ze){return Ze!=null&&Ze._isBuffer===!0&&Ze!==me.prototype},me.compare=function(Ze,qe){if(nt(Ze,Uint8Array)&&(Ze=me.from(Ze,Ze.offset,Ze.byteLength)),nt(qe,Uint8Array)&&(qe=me.from(qe,qe.offset,qe.byteLength)),!me.isBuffer(Ze)||!me.isBuffer(qe))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ze===qe)return 0;for(var ut=Ze.length,vt=qe.length,At=0,Et=Math.min(ut,vt);At<Et;++At)if(Ze[At]!==qe[At]){ut=Ze[At],vt=qe[At];break}return ut<vt?-1:vt<ut?1:0},me.isEncoding=function(Ze){switch(String(Ze).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(Ze,qe){if(!Array.isArray(Ze))throw new TypeError('"list" argument must be an Array of Buffers');if(Ze.length===0)return me.alloc(0);var ut;if(qe===void 0)for(qe=0,ut=0;ut<Ze.length;++ut)qe+=Ze[ut].length;var vt=me.allocUnsafe(qe),At=0;for(ut=0;ut<Ze.length;++ut){var Et=Ze[ut];if(nt(Et,Uint8Array)&&(Et=me.from(Et)),!me.isBuffer(Et))throw new TypeError('"list" argument must be an Array of Buffers');Et.copy(vt,At),At+=Et.length}return vt};function je(_e,Ze){if(me.isBuffer(_e))return _e.length;if(ArrayBuffer.isView(_e)||nt(_e,ArrayBuffer))return _e.byteLength;if(typeof _e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _e);var qe=_e.length,ut=arguments.length>2&&arguments[2]===!0;if(!ut&&qe===0)return 0;for(var vt=!1;;)switch(Ze){case"ascii":case"latin1":case"binary":return qe;case"utf8":case"utf-8":return tt(_e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qe*2;case"hex":return qe>>>1;case"base64":return Ne(_e).length;default:if(vt)return ut?-1:tt(_e).length;Ze=(""+Ze).toLowerCase(),vt=!0}}me.byteLength=je;function De(_e,Ze,qe){var ut=!1;if((Ze===void 0||Ze<0)&&(Ze=0),Ze>this.length||((qe===void 0||qe>this.length)&&(qe=this.length),qe<=0)||(qe>>>=0,Ze>>>=0,qe<=Ze))return"";for(_e||(_e="utf8");;)switch(_e){case"hex":return bt(this,Ze,qe);case"utf8":case"utf-8":return ct(this,Ze,qe);case"ascii":return rt(this,Ze,qe);case"latin1":case"binary":return xt(this,Ze,qe);case"base64":return lt(this,Ze,qe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pt(this,Ze,qe);default:if(ut)throw new TypeError("Unknown encoding: "+_e);_e=(_e+"").toLowerCase(),ut=!0}}me.prototype._isBuffer=!0;function Fe(_e,Ze,qe){var ut=_e[Ze];_e[Ze]=_e[qe],_e[qe]=ut}me.prototype.swap16=function(){var Ze=this.length;if(Ze%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var qe=0;qe<Ze;qe+=2)Fe(this,qe,qe+1);return this},me.prototype.swap32=function(){var Ze=this.length;if(Ze%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var qe=0;qe<Ze;qe+=4)Fe(this,qe,qe+3),Fe(this,qe+1,qe+2);return this},me.prototype.swap64=function(){var Ze=this.length;if(Ze%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var qe=0;qe<Ze;qe+=8)Fe(this,qe,qe+7),Fe(this,qe+1,qe+6),Fe(this,qe+2,qe+5),Fe(this,qe+3,qe+4);return this},me.prototype.toString=function(){var Ze=this.length;return Ze===0?"":arguments.length===0?ct(this,0,Ze):De.apply(this,arguments)},me.prototype.toLocaleString=me.prototype.toString,me.prototype.equals=function(Ze){if(!me.isBuffer(Ze))throw new TypeError("Argument must be a Buffer");return this===Ze?!0:me.compare(this,Ze)===0},me.prototype.inspect=function(){var Ze="",qe=Ie.INSPECT_MAX_BYTES;return Ze=this.toString("hex",0,qe).replace(/(.{2})/g,"$1 ").trim(),this.length>qe&&(Ze+=" ... "),"<Buffer "+Ze+">"},me.prototype.compare=function(Ze,qe,ut,vt,At){if(nt(Ze,Uint8Array)&&(Ze=me.from(Ze,Ze.offset,Ze.byteLength)),!me.isBuffer(Ze))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ze);if(qe===void 0&&(qe=0),ut===void 0&&(ut=Ze?Ze.length:0),vt===void 0&&(vt=0),At===void 0&&(At=this.length),qe<0||ut>Ze.length||vt<0||At>this.length)throw new RangeError("out of range index");if(vt>=At&&qe>=ut)return 0;if(vt>=At)return-1;if(qe>=ut)return 1;if(qe>>>=0,ut>>>=0,vt>>>=0,At>>>=0,this===Ze)return 0;for(var Et=At-vt,Ft=ut-qe,Kt=Math.min(Et,Ft),Yt=this.slice(vt,At),Vt=Ze.slice(qe,ut),Ht=0;Ht<Kt;++Ht)if(Yt[Ht]!==Vt[Ht]){Et=Yt[Ht],Ft=Vt[Ht];break}return Et<Ft?-1:Ft<Et?1:0};function Te(_e,Ze,qe,ut,vt){if(_e.length===0)return-1;if(typeof qe=="string"?(ut=qe,qe=0):qe>2147483647?qe=2147483647:qe<-2147483648&&(qe=-2147483648),qe=+qe,Re(qe)&&(qe=vt?0:_e.length-1),qe<0&&(qe=_e.length+qe),qe>=_e.length){if(vt)return-1;qe=_e.length-1}else if(qe<0)if(vt)qe=0;else return-1;if(typeof Ze=="string"&&(Ze=me.from(Ze,ut)),me.isBuffer(Ze))return Ze.length===0?-1:Me(_e,Ze,qe,ut,vt);if(typeof Ze=="number")return Ze=Ze&255,typeof Uint8Array.prototype.indexOf=="function"?vt?Uint8Array.prototype.indexOf.call(_e,Ze,qe):Uint8Array.prototype.lastIndexOf.call(_e,Ze,qe):Me(_e,[Ze],qe,ut,vt);throw new TypeError("val must be string, number or Buffer")}function Me(_e,Ze,qe,ut,vt){var At=1,Et=_e.length,Ft=Ze.length;if(ut!==void 0&&(ut=String(ut).toLowerCase(),ut==="ucs2"||ut==="ucs-2"||ut==="utf16le"||ut==="utf-16le")){if(_e.length<2||Ze.length<2)return-1;At=2,Et/=2,Ft/=2,qe/=2}function Kt(rn,un){return At===1?rn[un]:rn.readUInt16BE(un*At)}var Yt;if(vt){var Vt=-1;for(Yt=qe;Yt<Et;Yt++)if(Kt(_e,Yt)===Kt(Ze,Vt===-1?0:Yt-Vt)){if(Vt===-1&&(Vt=Yt),Yt-Vt+1===Ft)return Vt*At}else Vt!==-1&&(Yt-=Yt-Vt),Vt=-1}else for(qe+Ft>Et&&(qe=Et-Ft),Yt=qe;Yt>=0;Yt--){for(var Ht=!0,sn=0;sn<Ft;sn++)if(Kt(_e,Yt+sn)!==Kt(Ze,sn)){Ht=!1;break}if(Ht)return Yt}return-1}me.prototype.includes=function(Ze,qe,ut){return this.indexOf(Ze,qe,ut)!==-1},me.prototype.indexOf=function(Ze,qe,ut){return Te(this,Ze,qe,ut,!0)},me.prototype.lastIndexOf=function(Ze,qe,ut){return Te(this,Ze,qe,ut,!1)};function Be(_e,Ze,qe,ut){qe=Number(qe)||0;var vt=_e.length-qe;ut?(ut=Number(ut),ut>vt&&(ut=vt)):ut=vt;var At=Ze.length;ut>At/2&&(ut=At/2);for(var Et=0;Et<ut;++Et){var Ft=parseInt(Ze.substr(Et*2,2),16);if(Re(Ft))return Et;_e[qe+Et]=Ft}return Et}function Ge(_e,Ze,qe,ut){return Ve(tt(Ze,_e.length-qe),_e,qe,ut)}function Ye(_e,Ze,qe,ut){return Ve(He(Ze),_e,qe,ut)}function Ke(_e,Ze,qe,ut){return Ye(_e,Ze,qe,ut)}function Xe(_e,Ze,qe,ut){return Ve(Ne(Ze),_e,qe,ut)}function ot(_e,Ze,qe,ut){return Ve(we(Ze,_e.length-qe),_e,qe,ut)}me.prototype.write=function(Ze,qe,ut,vt){if(qe===void 0)vt="utf8",ut=this.length,qe=0;else if(ut===void 0&&typeof qe=="string")vt=qe,ut=this.length,qe=0;else if(isFinite(qe))qe=qe>>>0,isFinite(ut)?(ut=ut>>>0,vt===void 0&&(vt="utf8")):(vt=ut,ut=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var At=this.length-qe;if((ut===void 0||ut>At)&&(ut=At),Ze.length>0&&(ut<0||qe<0)||qe>this.length)throw new RangeError("Attempt to write outside buffer bounds");vt||(vt="utf8");for(var Et=!1;;)switch(vt){case"hex":return Be(this,Ze,qe,ut);case"utf8":case"utf-8":return Ge(this,Ze,qe,ut);case"ascii":return Ye(this,Ze,qe,ut);case"latin1":case"binary":return Ke(this,Ze,qe,ut);case"base64":return Xe(this,Ze,qe,ut);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,Ze,qe,ut);default:if(Et)throw new TypeError("Unknown encoding: "+vt);vt=(""+vt).toLowerCase(),Et=!0}},me.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function lt(_e,Ze,qe){return Ze===0&&qe===_e.length?ve.fromByteArray(_e):ve.fromByteArray(_e.slice(Ze,qe))}function ct(_e,Ze,qe){qe=Math.min(_e.length,qe);for(var ut=[],vt=Ze;vt<qe;){var At=_e[vt],Et=null,Ft=At>239?4:At>223?3:At>191?2:1;if(vt+Ft<=qe){var Kt,Yt,Vt,Ht;switch(Ft){case 1:At<128&&(Et=At);break;case 2:Kt=_e[vt+1],(Kt&192)===128&&(Ht=(At&31)<<6|Kt&63,Ht>127&&(Et=Ht));break;case 3:Kt=_e[vt+1],Yt=_e[vt+2],(Kt&192)===128&&(Yt&192)===128&&(Ht=(At&15)<<12|(Kt&63)<<6|Yt&63,Ht>2047&&(Ht<55296||Ht>57343)&&(Et=Ht));break;case 4:Kt=_e[vt+1],Yt=_e[vt+2],Vt=_e[vt+3],(Kt&192)===128&&(Yt&192)===128&&(Vt&192)===128&&(Ht=(At&15)<<18|(Kt&63)<<12|(Yt&63)<<6|Vt&63,Ht>65535&&Ht<1114112&&(Et=Ht))}}Et===null?(Et=65533,Ft=1):Et>65535&&(Et-=65536,ut.push(Et>>>10&1023|55296),Et=56320|Et&1023),ut.push(Et),vt+=Ft}return Je(ut)}var Ct=4096;function Je(_e){var Ze=_e.length;if(Ze<=Ct)return String.fromCharCode.apply(String,_e);for(var qe="",ut=0;ut<Ze;)qe+=String.fromCharCode.apply(String,_e.slice(ut,ut+=Ct));return qe}function rt(_e,Ze,qe){var ut="";qe=Math.min(_e.length,qe);for(var vt=Ze;vt<qe;++vt)ut+=String.fromCharCode(_e[vt]&127);return ut}function xt(_e,Ze,qe){var ut="";qe=Math.min(_e.length,qe);for(var vt=Ze;vt<qe;++vt)ut+=String.fromCharCode(_e[vt]);return ut}function bt(_e,Ze,qe){var ut=_e.length;(!Ze||Ze<0)&&(Ze=0),(!qe||qe<0||qe>ut)&&(qe=ut);for(var vt="",At=Ze;At<qe;++At)vt+=yt(_e[At]);return vt}function Pt(_e,Ze,qe){for(var ut=_e.slice(Ze,qe),vt="",At=0;At<ut.length;At+=2)vt+=String.fromCharCode(ut[At]+ut[At+1]*256);return vt}me.prototype.slice=function(Ze,qe){var ut=this.length;Ze=~~Ze,qe=qe===void 0?ut:~~qe,Ze<0?(Ze+=ut,Ze<0&&(Ze=0)):Ze>ut&&(Ze=ut),qe<0?(qe+=ut,qe<0&&(qe=0)):qe>ut&&(qe=ut),qe<Ze&&(qe=Ze);var vt=this.subarray(Ze,qe);return vt.__proto__=me.prototype,vt};function ht(_e,Ze,qe){if(_e%1!==0||_e<0)throw new RangeError("offset is not uint");if(_e+Ze>qe)throw new RangeError("Trying to access beyond buffer length")}me.prototype.readUIntLE=function(Ze,qe,ut){Ze=Ze>>>0,qe=qe>>>0,ut||ht(Ze,qe,this.length);for(var vt=this[Ze],At=1,Et=0;++Et<qe&&(At*=256);)vt+=this[Ze+Et]*At;return vt},me.prototype.readUIntBE=function(Ze,qe,ut){Ze=Ze>>>0,qe=qe>>>0,ut||ht(Ze,qe,this.length);for(var vt=this[Ze+--qe],At=1;qe>0&&(At*=256);)vt+=this[Ze+--qe]*At;return vt},me.prototype.readUInt8=function(Ze,qe){return Ze=Ze>>>0,qe||ht(Ze,1,this.length),this[Ze]},me.prototype.readUInt16LE=function(Ze,qe){return Ze=Ze>>>0,qe||ht(Ze,2,this.length),this[Ze]|this[Ze+1]<<8},me.prototype.readUInt16BE=function(Ze,qe){return Ze=Ze>>>0,qe||ht(Ze,2,this.length),this[Ze]<<8|this[Ze+1]},me.prototype.readUInt32LE=function(Ze,qe){return Ze=Ze>>>0,qe||ht(Ze,4,this.length),(this[Ze]|this[Ze+1]<<8|this[Ze+2]<<16)+this[Ze+3]*16777216},me.prototype.readUInt32BE=function(Ze,qe){return Ze=Ze>>>0,qe||ht(Ze,4,this.length),this[Ze]*16777216+(this[Ze+1]<<16|this[Ze+2]<<8|this[Ze+3])},me.prototype.readIntLE=function(Ze,qe,ut){Ze=Ze>>>0,qe=qe>>>0,ut||ht(Ze,qe,this.length);for(var vt=this[Ze],At=1,Et=0;++Et<qe&&(At*=256);)vt+=this[Ze+Et]*At;return At*=128,vt>=At&&(vt-=Math.pow(2,8*qe)),vt},me.prototype.readIntBE=function(Ze,qe,ut){Ze=Ze>>>0,qe=qe>>>0,ut||ht(Ze,qe,this.length);for(var vt=qe,At=1,Et=this[Ze+--vt];vt>0&&(At*=256);)Et+=this[Ze+--vt]*At;return At*=128,Et>=At&&(Et-=Math.pow(2,8*qe)),Et},me.prototype.readInt8=function(Ze,qe){return Ze=Ze>>>0,qe||ht(Ze,1,this.length),this[Ze]&128?(255-this[Ze]+1)*-1:this[Ze]},me.prototype.readInt16LE=function(Ze,qe){Ze=Ze>>>0,qe||ht(Ze,2,this.length);var ut=this[Ze]|this[Ze+1]<<8;return ut&32768?ut|4294901760:ut},me.prototype.readInt16BE=function(Ze,qe){Ze=Ze>>>0,qe||ht(Ze,2,this.length);var ut=this[Ze+1]|this[Ze]<<8;return ut&32768?ut|4294901760:ut},me.prototype.readInt32LE=function(Ze,qe){return Ze=Ze>>>0,qe||ht(Ze,4,this.length),this[Ze]|this[Ze+1]<<8|this[Ze+2]<<16|this[Ze+3]<<24},me.prototype.readInt32BE=function(Ze,qe){return Ze=Ze>>>0,qe||ht(Ze,4,this.length),this[Ze]<<24|this[Ze+1]<<16|this[Ze+2]<<8|this[Ze+3]},me.prototype.readFloatLE=function(Ze,qe){return Ze=Ze>>>0,qe||ht(Ze,4,this.length),Ee.read(this,Ze,!0,23,4)},me.prototype.readFloatBE=function(Ze,qe){return Ze=Ze>>>0,qe||ht(Ze,4,this.length),Ee.read(this,Ze,!1,23,4)},me.prototype.readDoubleLE=function(Ze,qe){return Ze=Ze>>>0,qe||ht(Ze,8,this.length),Ee.read(this,Ze,!0,52,8)},me.prototype.readDoubleBE=function(Ze,qe){return Ze=Ze>>>0,qe||ht(Ze,8,this.length),Ee.read(this,Ze,!1,52,8)};function St(_e,Ze,qe,ut,vt,At){if(!me.isBuffer(_e))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ze>vt||Ze<At)throw new RangeError('"value" argument is out of bounds');if(qe+ut>_e.length)throw new RangeError("Index out of range")}me.prototype.writeUIntLE=function(Ze,qe,ut,vt){if(Ze=+Ze,qe=qe>>>0,ut=ut>>>0,!vt){var At=Math.pow(2,8*ut)-1;St(this,Ze,qe,ut,At,0)}var Et=1,Ft=0;for(this[qe]=Ze&255;++Ft<ut&&(Et*=256);)this[qe+Ft]=Ze/Et&255;return qe+ut},me.prototype.writeUIntBE=function(Ze,qe,ut,vt){if(Ze=+Ze,qe=qe>>>0,ut=ut>>>0,!vt){var At=Math.pow(2,8*ut)-1;St(this,Ze,qe,ut,At,0)}var Et=ut-1,Ft=1;for(this[qe+Et]=Ze&255;--Et>=0&&(Ft*=256);)this[qe+Et]=Ze/Ft&255;return qe+ut},me.prototype.writeUInt8=function(Ze,qe,ut){return Ze=+Ze,qe=qe>>>0,ut||St(this,Ze,qe,1,255,0),this[qe]=Ze&255,qe+1},me.prototype.writeUInt16LE=function(Ze,qe,ut){return Ze=+Ze,qe=qe>>>0,ut||St(this,Ze,qe,2,65535,0),this[qe]=Ze&255,this[qe+1]=Ze>>>8,qe+2},me.prototype.writeUInt16BE=function(Ze,qe,ut){return Ze=+Ze,qe=qe>>>0,ut||St(this,Ze,qe,2,65535,0),this[qe]=Ze>>>8,this[qe+1]=Ze&255,qe+2},me.prototype.writeUInt32LE=function(Ze,qe,ut){return Ze=+Ze,qe=qe>>>0,ut||St(this,Ze,qe,4,4294967295,0),this[qe+3]=Ze>>>24,this[qe+2]=Ze>>>16,this[qe+1]=Ze>>>8,this[qe]=Ze&255,qe+4},me.prototype.writeUInt32BE=function(Ze,qe,ut){return Ze=+Ze,qe=qe>>>0,ut||St(this,Ze,qe,4,4294967295,0),this[qe]=Ze>>>24,this[qe+1]=Ze>>>16,this[qe+2]=Ze>>>8,this[qe+3]=Ze&255,qe+4},me.prototype.writeIntLE=function(Ze,qe,ut,vt){if(Ze=+Ze,qe=qe>>>0,!vt){var At=Math.pow(2,8*ut-1);St(this,Ze,qe,ut,At-1,-At)}var Et=0,Ft=1,Kt=0;for(this[qe]=Ze&255;++Et<ut&&(Ft*=256);)Ze<0&&Kt===0&&this[qe+Et-1]!==0&&(Kt=1),this[qe+Et]=(Ze/Ft>>0)-Kt&255;return qe+ut},me.prototype.writeIntBE=function(Ze,qe,ut,vt){if(Ze=+Ze,qe=qe>>>0,!vt){var At=Math.pow(2,8*ut-1);St(this,Ze,qe,ut,At-1,-At)}var Et=ut-1,Ft=1,Kt=0;for(this[qe+Et]=Ze&255;--Et>=0&&(Ft*=256);)Ze<0&&Kt===0&&this[qe+Et+1]!==0&&(Kt=1),this[qe+Et]=(Ze/Ft>>0)-Kt&255;return qe+ut},me.prototype.writeInt8=function(Ze,qe,ut){return Ze=+Ze,qe=qe>>>0,ut||St(this,Ze,qe,1,127,-128),Ze<0&&(Ze=255+Ze+1),this[qe]=Ze&255,qe+1},me.prototype.writeInt16LE=function(Ze,qe,ut){return Ze=+Ze,qe=qe>>>0,ut||St(this,Ze,qe,2,32767,-32768),this[qe]=Ze&255,this[qe+1]=Ze>>>8,qe+2},me.prototype.writeInt16BE=function(Ze,qe,ut){return Ze=+Ze,qe=qe>>>0,ut||St(this,Ze,qe,2,32767,-32768),this[qe]=Ze>>>8,this[qe+1]=Ze&255,qe+2},me.prototype.writeInt32LE=function(Ze,qe,ut){return Ze=+Ze,qe=qe>>>0,ut||St(this,Ze,qe,4,2147483647,-2147483648),this[qe]=Ze&255,this[qe+1]=Ze>>>8,this[qe+2]=Ze>>>16,this[qe+3]=Ze>>>24,qe+4},me.prototype.writeInt32BE=function(Ze,qe,ut){return Ze=+Ze,qe=qe>>>0,ut||St(this,Ze,qe,4,2147483647,-2147483648),Ze<0&&(Ze=4294967295+Ze+1),this[qe]=Ze>>>24,this[qe+1]=Ze>>>16,this[qe+2]=Ze>>>8,this[qe+3]=Ze&255,qe+4};function mt(_e,Ze,qe,ut,vt,At){if(qe+ut>_e.length)throw new RangeError("Index out of range");if(qe<0)throw new RangeError("Index out of range")}function Nt(_e,Ze,qe,ut,vt){return Ze=+Ze,qe=qe>>>0,vt||mt(_e,Ze,qe,4,34028234663852886e22,-34028234663852886e22),Ee.write(_e,Ze,qe,ut,23,4),qe+4}me.prototype.writeFloatLE=function(Ze,qe,ut){return Nt(this,Ze,qe,!0,ut)},me.prototype.writeFloatBE=function(Ze,qe,ut){return Nt(this,Ze,qe,!1,ut)};function dt(_e,Ze,qe,ut,vt){return Ze=+Ze,qe=qe>>>0,vt||mt(_e,Ze,qe,8,17976931348623157e292,-17976931348623157e292),Ee.write(_e,Ze,qe,ut,52,8),qe+8}me.prototype.writeDoubleLE=function(Ze,qe,ut){return dt(this,Ze,qe,!0,ut)},me.prototype.writeDoubleBE=function(Ze,qe,ut){return dt(this,Ze,qe,!1,ut)},me.prototype.copy=function(Ze,qe,ut,vt){if(!me.isBuffer(Ze))throw new TypeError("argument should be a Buffer");if(ut||(ut=0),!vt&&vt!==0&&(vt=this.length),qe>=Ze.length&&(qe=Ze.length),qe||(qe=0),vt>0&&vt<ut&&(vt=ut),vt===ut||Ze.length===0||this.length===0)return 0;if(qe<0)throw new RangeError("targetStart out of bounds");if(ut<0||ut>=this.length)throw new RangeError("Index out of range");if(vt<0)throw new RangeError("sourceEnd out of bounds");vt>this.length&&(vt=this.length),Ze.length-qe<vt-ut&&(vt=Ze.length-qe+ut);var At=vt-ut;if(this===Ze&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(qe,ut,vt);else if(this===Ze&&ut<qe&&qe<vt)for(var Et=At-1;Et>=0;--Et)Ze[Et+qe]=this[Et+ut];else Uint8Array.prototype.set.call(Ze,this.subarray(ut,vt),qe);return At},me.prototype.fill=function(Ze,qe,ut,vt){if(typeof Ze=="string"){if(typeof qe=="string"?(vt=qe,qe=0,ut=this.length):typeof ut=="string"&&(vt=ut,ut=this.length),vt!==void 0&&typeof vt!="string")throw new TypeError("encoding must be a string");if(typeof vt=="string"&&!me.isEncoding(vt))throw new TypeError("Unknown encoding: "+vt);if(Ze.length===1){var At=Ze.charCodeAt(0);(vt==="utf8"&&At<128||vt==="latin1")&&(Ze=At)}}else typeof Ze=="number"&&(Ze=Ze&255);if(qe<0||this.length<qe||this.length<ut)throw new RangeError("Out of range index");if(ut<=qe)return this;qe=qe>>>0,ut=ut===void 0?this.length:ut>>>0,Ze||(Ze=0);var Et;if(typeof Ze=="number")for(Et=qe;Et<ut;++Et)this[Et]=Ze;else{var Ft=me.isBuffer(Ze)?Ze:me.from(Ze,vt),Kt=Ft.length;if(Kt===0)throw new TypeError('The value "'+Ze+'" is invalid for argument "value"');for(Et=0;Et<ut-qe;++Et)this[Et+qe]=Ft[Et%Kt]}return this};var Dt=/[^+/0-9A-Za-z-_]/g;function gt(_e){if(_e=_e.split("=")[0],_e=_e.trim().replace(Dt,""),_e.length<2)return"";for(;_e.length%4!==0;)_e=_e+"=";return _e}function yt(_e){return _e<16?"0"+_e.toString(16):_e.toString(16)}function tt(_e,Ze){Ze=Ze||1/0;for(var qe,ut=_e.length,vt=null,At=[],Et=0;Et<ut;++Et){if(qe=_e.charCodeAt(Et),qe>55295&&qe<57344){if(!vt){if(qe>56319){(Ze-=3)>-1&&At.push(239,191,189);continue}else if(Et+1===ut){(Ze-=3)>-1&&At.push(239,191,189);continue}vt=qe;continue}if(qe<56320){(Ze-=3)>-1&&At.push(239,191,189),vt=qe;continue}qe=(vt-55296<<10|qe-56320)+65536}else vt&&(Ze-=3)>-1&&At.push(239,191,189);if(vt=null,qe<128){if((Ze-=1)<0)break;At.push(qe)}else if(qe<2048){if((Ze-=2)<0)break;At.push(qe>>6|192,qe&63|128)}else if(qe<65536){if((Ze-=3)<0)break;At.push(qe>>12|224,qe>>6&63|128,qe&63|128)}else if(qe<1114112){if((Ze-=4)<0)break;At.push(qe>>18|240,qe>>12&63|128,qe>>6&63|128,qe&63|128)}else throw new Error("Invalid code point")}return At}function He(_e){for(var Ze=[],qe=0;qe<_e.length;++qe)Ze.push(_e.charCodeAt(qe)&255);return Ze}function we(_e,Ze){for(var qe,ut,vt,At=[],Et=0;Et<_e.length&&!((Ze-=2)<0);++Et)qe=_e.charCodeAt(Et),ut=qe>>8,vt=qe%256,At.push(vt),At.push(ut);return At}function Ne(_e){return ve.toByteArray(gt(_e))}function Ve(_e,Ze,qe,ut){for(var vt=0;vt<ut&&!(vt+qe>=Ze.length||vt>=_e.length);++vt)Ze[vt+qe]=_e[vt];return vt}function nt(_e,Ze){return _e instanceof Ze||_e!=null&&_e.constructor!=null&&_e.constructor.name!=null&&_e.constructor.name===Ze.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,Ae){var me=de(Se,!!Ae);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),Ae=ve("%Object.getOwnPropertyDescriptor%",!0),me=ve("%Object.defineProperty%",!0),be=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(Ae&&me){var ie=Ae(se,"length");ie.configurable&&me(se,"length",{value:1+be(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 Ae=0;Ae<Se.length;Ae++)me=Se[Ae],ke[me]===void 0&&(ke[me]=this.src[me]);return ke}for(var Ae=0;Ae<Se.length;Ae++){var me=Se[Ae];if(Ee(ke,me)){var be=this.src.__lookupGetter__(me),fe=this.src.__lookupSetter__(me);be&&ke.__defineGetter__(me,be),fe&&ke.__defineSetter__(me,fe),!be&&!fe&&(ke[me]=this.src[me])}}return ke},ve.prototype.toCover=function(ke){for(var Se=this.keys||Object.keys(this.src),Ae=0;Ae<Se.length;Ae++){var me=Se[Ae];delete ke[me];var be=this.src.__lookupGetter__(me),fe=this.src.__lookupSetter__(me);be&&ke.__defineGetter__(me,be),fe&&ke.__defineSetter__(me,fe),!be&&!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(Ae){Se[ke][Ae]=!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"),Ae=oe("../internals/has-own-property"),me=oe("../internals/classof"),be=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"),he=oe("../internals/well-known-symbol"),pe=oe("../internals/uid"),xe=Ee.Int8Array,je=xe&&xe.prototype,De=Ee.Uint8ClampedArray,Fe=De&&De.prototype,Te=xe&&ie(xe),Me=je&&ie(je),Be=Object.prototype,Ge=Ee.TypeError,Ye=he("toStringTag"),Ke=pe("TYPED_ARRAY_TAG"),Xe=pe("TYPED_ARRAY_CONSTRUCTOR"),ot=de&&!!le&&me(Ee.opera)!=="Opera",lt=!1,ct,Ct,Je,rt={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},xt={BigInt64Array:8,BigUint64Array:8},bt=function(Dt){if(!Se(Dt))return!1;var gt=me(Dt);return gt==="DataView"||Ae(rt,gt)||Ae(xt,gt)},Pt=function(dt){if(!Se(dt))return!1;var Dt=me(dt);return Ae(rt,Dt)||Ae(xt,Dt)},ht=function(dt){if(Pt(dt))return dt;throw Ge("Target is not a typed array")},St=function(dt){if(ke(dt)&&(!le||se(Te,dt)))return dt;throw Ge(be(dt)+" is not a typed array constructor")},mt=function(dt,Dt,gt,yt){if(ve){if(gt)for(var tt in rt){var He=Ee[tt];if(He&&Ae(He.prototype,dt))try{delete He.prototype[dt]}catch(we){try{He.prototype[dt]=Dt}catch(Ne){}}}(!Me[dt]||gt)&&z(Me,dt,gt?Dt:ot&&je[dt]||Dt,yt)}},Nt=function(dt,Dt,gt){var yt,tt;if(ve){if(le){if(gt){for(yt in rt)if(tt=Ee[yt],tt&&Ae(tt,dt))try{delete tt[dt]}catch(He){}}if(!Te[dt]||gt)try{return z(Te,dt,gt?Dt:ot&&Te[dt]||Dt)}catch(He){}else return}for(yt in rt)tt=Ee[yt],tt&&(!tt[dt]||gt)&&z(tt,dt,Dt)}};for(ct in rt)Ct=Ee[ct],Je=Ct&&Ct.prototype,Je?fe(Je,Xe,Ct):ot=!1;for(ct in xt)Ct=Ee[ct],Je=Ct&&Ct.prototype,Je&&fe(Je,Xe,Ct);if((!ot||!ke(Te)||Te===Function.prototype)&&(Te=function(){throw Ge("Incorrect invocation")},ot))for(ct in rt)Ee[ct]&&le(Ee[ct],Te);if((!ot||!Me||Me===Be)&&(Me=Te.prototype,ot))for(ct in rt)Ee[ct]&&le(Ee[ct].prototype,Me);if(ot&&ie(Fe)!==Me&&le(Fe,Me),ve&&!Ae(Me,Ye)){lt=!0,te(Me,Ye,{get:function(){return Se(this)?this[Ke]:void 0}});for(ct in rt)Ee[ct]&&fe(Ee[ct],Ke,ct)}Ue.exports={NATIVE_ARRAY_BUFFER_VIEWS:ot,TYPED_ARRAY_CONSTRUCTOR:Xe,TYPED_ARRAY_TAG:lt&&Ke,aTypedArray:ht,aTypedArrayConstructor:St,exportTypedArrayMethod:mt,exportTypedArrayStaticMethod:Nt,isView:bt,isTypedArray:Pt,TypedArray:Te,TypedArrayPrototype:Me}},{"../internals/array-buffer-native":102,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-define-property":198,"../internals/object-get-prototype-of":203,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/try-to-string":257,"../internals/uid":263,"../internals/well-known-symbol":268}],104:[function(oe,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"),Ae=oe("../internals/create-non-enumerable-property"),me=oe("../internals/redefine-all"),be=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"),he=oe("../internals/object-set-prototype-of"),pe=oe("../internals/object-get-own-property-names").f,xe=oe("../internals/object-define-property").f,je=oe("../internals/array-fill"),De=oe("../internals/array-slice-simple"),Fe=oe("../internals/set-to-string-tag"),Te=oe("../internals/internal-state"),Me=Se.PROPER,Be=Se.CONFIGURABLE,Ge=Te.get,Ye=Te.set,Ke="ArrayBuffer",Xe="DataView",ot="prototype",lt="Wrong length",ct="Wrong index",Ct=de[Ke],Je=Ct,rt=Je&&Je[ot],xt=de[Xe],bt=xt&&xt[ot],Pt=Object.prototype,ht=de.Array,St=de.RangeError,mt=ve(je),Nt=ve([].reverse),dt=ie.pack,Dt=ie.unpack,gt=function(Et){return[Et&255]},yt=function(Et){return[Et&255,Et>>8&255]},tt=function(Et){return[Et&255,Et>>8&255,Et>>16&255,Et>>24&255]},He=function(Et){return Et[3]<<24|Et[2]<<16|Et[1]<<8|Et[0]},we=function(Et){return dt(Et,23,4)},Ne=function(Et){return dt(Et,52,8)},Ve=function(Et,Ft){xe(Et[ot],Ft,{get:function(){return Ge(this)[Ft]}})},nt=function(Et,Ft,Kt,Yt){var Vt=se(Kt),Ht=Ge(Et);if(Vt+Ft>Ht.byteLength)throw St(ct);var sn=Ge(Ht.buffer).bytes,rn=Vt+Ht.byteOffset,un=De(sn,rn,rn+Ft);return Yt?un:Nt(un)},Re=function(Et,Ft,Kt,Yt,Vt,Ht){var sn=se(Kt),rn=Ge(Et);if(sn+Ft>rn.byteLength)throw St(ct);for(var un=Ge(rn.buffer).bytes,Sn=sn+rn.byteOffset,vn=Yt(+Vt),Cn=0;Cn<Ft;Cn++)un[Sn+Cn]=vn[Ht?Cn:Ft-Cn-1]};if(!ke)Je=function(Ft){fe(this,rt);var Kt=se(Ft);Ye(this,{bytes:mt(ht(Kt),0),byteLength:Kt}),Ee||(this.byteLength=Kt)},rt=Je[ot],xt=function(Ft,Kt,Yt){fe(this,bt),fe(Ft,rt);var Vt=Ge(Ft).byteLength,Ht=z(Kt);if(Ht<0||Ht>Vt)throw St("Wrong offset");if(Yt=Yt===void 0?Vt-Ht:te(Yt),Ht+Yt>Vt)throw St(lt);Ye(this,{buffer:Ft,byteLength:Yt,byteOffset:Ht}),Ee||(this.buffer=Ft,this.byteLength=Yt,this.byteOffset=Ht)},bt=xt[ot],Ee&&(Ve(Je,"byteLength"),Ve(xt,"buffer"),Ve(xt,"byteLength"),Ve(xt,"byteOffset")),me(bt,{getInt8:function(Ft){return nt(this,1,Ft)[0]<<24>>24},getUint8:function(Ft){return nt(this,1,Ft)[0]},getInt16:function(Ft){var Kt=nt(this,2,Ft,arguments.length>1?arguments[1]:void 0);return(Kt[1]<<8|Kt[0])<<16>>16},getUint16:function(Ft){var Kt=nt(this,2,Ft,arguments.length>1?arguments[1]:void 0);return Kt[1]<<8|Kt[0]},getInt32:function(Ft){return He(nt(this,4,Ft,arguments.length>1?arguments[1]:void 0))},getUint32:function(Ft){return He(nt(this,4,Ft,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Ft){return Dt(nt(this,4,Ft,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Ft){return Dt(nt(this,8,Ft,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Ft,Kt){Re(this,1,Ft,gt,Kt)},setUint8:function(Ft,Kt){Re(this,1,Ft,gt,Kt)},setInt16:function(Ft,Kt){Re(this,2,Ft,yt,Kt,arguments.length>2?arguments[2]:void 0)},setUint16:function(Ft,Kt){Re(this,2,Ft,yt,Kt,arguments.length>2?arguments[2]:void 0)},setInt32:function(Ft,Kt){Re(this,4,Ft,tt,Kt,arguments.length>2?arguments[2]:void 0)},setUint32:function(Ft,Kt){Re(this,4,Ft,tt,Kt,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Ft,Kt){Re(this,4,Ft,we,Kt,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Ft,Kt){Re(this,8,Ft,Ne,Kt,arguments.length>2?arguments[2]:void 0)}});else{var _e=Me&&Ct.name!==Ke;if(!be(function(){Ct(1)})||!be(function(){new Ct(-1)})||be(function(){return new Ct,new Ct(1.5),new Ct(NaN),_e&&!Be})){Je=function(Ft){return fe(this,rt),new Ct(se(Ft))},Je[ot]=rt;for(var Ze=pe(Ct),qe=0,ut;Ze.length>qe;)(ut=Ze[qe++])in Je||Ae(Je,ut,Ct[ut]);rt.constructor=Je}else _e&&Be&&Ae(Ct,"name",Ke);he&&le(bt)!==Pt&&he(bt,Pt);var vt=new xt(new Je(2)),At=ve(bt.setInt8);vt.setInt8(0,2147483648),vt.setInt8(1,2147483649),(vt.getInt8(0)||!vt.getInt8(1))&&me(bt,{setInt8:function(Ft,Kt){At(this,Ft,Kt<<24>>24)},setUint8:function(Ft,Kt){At(this,Ft,Kt<<24>>24)}},{unsafe:!0})}Fe(Je,Ke),Fe(xt,Xe),Ue.exports={ArrayBuffer:Je,DataView:xt}},{"../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(Ae,me){var be=de(this),fe=Ee(be),z=ve(Ae,fe),te=ve(me,fe),se=arguments.length>2?arguments[2]:void 0,ie=ke((se===void 0?fe:ve(se,fe))-te,fe-z),le=1;for(te<z&&z<te+ie&&(le=-1,te+=ie-1,z+=ie-1);ie-- >0;)te in be?be[z]=be[te]:delete be[z],z+=le,te+=le;return be}},{"../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 Ae=de(this),me=Ee(Ae),be=arguments.length,fe=ve(be>1?arguments[1]:void 0,me),z=be>2?arguments[2]:void 0,te=z===void 0?me:ve(z,me);te>fe;)Ae[fe++]=Se;return Ae}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(oe,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),Ae=new ve(Se);Se>ke;)Ae[ke]=Ee[ke++];return Ae}},{"../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"),Ae=oe("../internals/is-array-iterator-method"),me=oe("../internals/is-constructor"),be=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 he=ke(le),pe=me(this),xe=arguments.length,je=xe>1?arguments[1]:void 0,De=je!==void 0;De&&(je=ve(je,xe>2?arguments[2]:void 0));var Fe=te(he),Te=0,Me,Be,Ge,Ye,Ke,Xe;if(Fe&&!(this==se&&Ae(Fe)))for(Ye=z(he,Fe),Ke=Ye.next,Be=pe?new this:[];!(Ge=Ee(Ke,Ye)).done;Te++)Xe=De?Se(Ye,je,[Ge.value,Te],!0):Ge.value,fe(Be,Te,Xe);else for(Me=be(he),Be=pe?new this(Me):se(Me);Me>Te;Te++)Xe=De?je(he[Te],Te):he[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(Ae,me,be){var fe=de(Ae),z=Ee(fe),te=ve(be,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"),Ae=oe("../internals/array-species-create"),me=ve([].push),be=function(fe){var z=fe==1,te=fe==2,se=fe==3,ie=fe==4,le=fe==6,he=fe==7,pe=fe==5||le;return function(xe,je,De,Fe){for(var Te=ke(xe),Me=Ee(Te),Be=de(je,De),Ge=Se(Me),Ye=0,Ke=Fe||Ae,Xe=z?Ke(xe,Ge):te||he?Ke(xe,0):void 0,ot,lt;Ge>Ye;Ye++)if((pe||Ye in Me)&&(ot=Me[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:be(0),map:be(1),filter:be(2),some:be(3),every:be(4),find:be(5),findIndex:be(6),filterReject:be(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"),Ae=Math.min,me=[].lastIndexOf,be=!!me&&1/[1].lastIndexOf(1,-0)<0,fe=Se("lastIndexOf"),z=be||!fe;Ue.exports=z?function(se){if(be)return de(me,this,arguments)||0;var ie=ve(this),le=ke(ie),he=le-1;for(arguments.length>1&&(he=Ae(he,Ee(arguments[1]))),he<0&&(he=le+he);he>=0;he--)if(he in ie&&ie[he]===se)return he||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 Ae=[],me=Ae.constructor={};return me[ke]=function(){return{foo:1}},Ae[Se](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(oe,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"),Ae=de.TypeError,me=function(be){return function(fe,z,te,se){ve(z);var ie=Ee(fe),le=ke(ie),he=Se(ie),pe=be?he-1:0,xe=be?-1:1;if(te<2)for(;;){if(pe in le){se=le[pe],pe+=xe;break}if(pe+=xe,be?pe<0:he<=pe)throw Ae("Reduce of empty array with no initial value")}for(;be?pe>=0:he>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,Ae=Math.max;Ue.exports=function(me,be,fe){for(var z=Ee(me),te=ve(be,z),se=ve(fe===void 0?z:fe,z),ie=Se(Ae(se-te,0)),le=0;te<se;te++,le++)ke(ie,le,me[te]);return ie.length=le,ie}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(oe,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(Ae,me){var be=Ae.length,fe=ve(be/2);return be<8?ke(Ae,me):Se(Ae,Ee(de(Ae,0,fe),me),Ee(de(Ae,fe),me),me)},ke=function(Ae,me){for(var be=Ae.length,fe=1,z,te;fe<be;){for(te=fe,z=Ae[fe];te&&me(Ae[te-1],z)>0;)Ae[te]=Ae[--te];te!==fe++&&(Ae[te]=z)}return Ae},Se=function(Ae,me,be,fe){for(var z=me.length,te=be.length,se=0,ie=0;se<z||ie<te;)Ae[se+ie]=se<z&&ie<te?fe(me[se],be[ie])<=0?me[se++]:be[ie++]:se<z?me[se++]:be[ie++];return Ae};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"),Ae=Se("species"),me=de.Array;Ue.exports=function(be){var fe;return ve(be)&&(fe=be.constructor,Ee(fe)&&(fe===me||ve(fe.prototype))?fe=void 0:ke(fe)&&(fe=fe[Ae],fe===null&&(fe=void 0))),fe===void 0?me:fe}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(oe,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,Ae){try{return Ae?ke(de(Se)[0],Se[1]):ke(Se)}catch(me){ve(Ee,"throw",me)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(oe,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(Ae){}Ue.exports=function(Ae,me){if(!me&&!Ee)return!1;var be=!1;try{var fe={};fe[ve]=function(){return{next:function(){return{done:be=!0}}}},Ae(fe)}catch(z){}return be}},{"../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"),Ae=Se("toStringTag"),me=de.Object,be=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),Ae))=="string"?se:be?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,Ae,me){for(var be=ve(Ae),fe=ke.f,z=Ee.f,te=0;te<be.length;te++){var se=be[te];!de(Se,se)&&!(me&&de(me,se))&&fe(Se,se,z(Ae,se))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(oe,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(Ae){}}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"),Ae=function(){return this};Ue.exports=function(me,be,fe,z){var te=be+" Iterator";return me.prototype=ve(de,{next:Ee(+!z,fe)}),ke(me,te,!1,!0),Se[te]=Ae,me}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(oe,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,Ae){return ve.f(ke,Se,Ee(1,Ae))}:function(ke,Se,Ae){return ke[Se]=Ae,ke}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(oe,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,Ae){var me=de(Se);me in ke?ve.f(ke,me,Ee(0,Ae)):ke[me]=Ae}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(oe,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"),Ae=oe("../internals/create-iterator-constructor"),me=oe("../internals/object-get-prototype-of"),be=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"),he=ke.PROPER,pe=ke.CONFIGURABLE,xe=le.IteratorPrototype,je=le.BUGGY_SAFARI_ITERATORS,De=se("iterator"),Fe="keys",Te="values",Me="entries",Be=function(){return this};Ue.exports=function(Ge,Ye,Ke,Xe,ot,lt,ct){Ae(Ke,Ye,Xe);var Ct=function(dt){if(dt===ot&&Pt)return Pt;if(!je&&dt in xt)return xt[dt];switch(dt){case Fe:return function(){return new Ke(this,dt)};case Te:return function(){return new Ke(this,dt)};case Me:return function(){return new Ke(this,dt)}}return function(){return new Ke(this)}},Je=Ye+" Iterator",rt=!1,xt=Ge.prototype,bt=xt[De]||xt["@@iterator"]||ot&&xt[ot],Pt=!je&&bt||Ct(ot),ht=Ye=="Array"&&xt.entries||bt,St,mt,Nt;if(ht&&(St=me(ht.call(new Ge)),St!==Object.prototype&&St.next&&(!Ee&&me(St)!==xe&&(be?be(St,xe):Se(St[De])||te(St,De,Be)),fe(St,Je,!0,!0),Ee&&(ie[Je]=Be))),he&&ot==Te&&bt&&bt.name!==Te&&(!Ee&&pe?z(xt,"name",Te):(rt=!0,Pt=function(){return ve(bt,this)})),ot)if(mt={values:Ct(Te),keys:lt?Pt:Ct(Fe),entries:Ct(Me)},ct)for(Nt in mt)(je||rt||!(Nt in xt))&&te(xt,Nt,mt[Nt]);else de({target:Ye,proto:!0,forced:je||rt},mt);return(!Ee||ct)&&xt[De]!==Pt&&te(xt,De,Pt,{name:ot}),ie[Ye]=Pt,mt}},{"../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 Ae=de.Symbol||(de.Symbol={});ve(Ae,Se)||ke(Ae,Se,{value:Ee.f(Se)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(oe,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,Ae=Se&&Se.v8,me,be;Ae&&(me=Ae.split("."),be=me[0]>0&&me[0]<4?1:+(me[0]+me[1])),!be&&ve&&(me=ve.match(/Edge\/(\d+)/),(!me||me[1]>=74)&&(me=ve.match(/Chrome\/(\d+)/),me&&(be=+me[1]))),Ue.exports=be},{"../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"),Ae=oe("../internals/copy-constructor-properties"),me=oe("../internals/is-forced");Ue.exports=function(be,fe){var z=be.target,te=be.global,se=be.stat,ie,le,he,pe,xe,je;if(te?le=de:se?le=de[z]||Se(z,{}):le=(de[z]||{}).prototype,le)for(he in fe){if(xe=fe[he],be.noTargetGet?(je=ve(le,he),pe=je&&je.value):pe=le[he],ie=me(te?he:z+(se?".":"#")+he,be.forced),!ie&&pe!==void 0){if(typeof xe==typeof pe)continue;Ae(xe,pe)}(be.sham||pe&&pe.sham)&&Ee(xe,"sham",!0),ke(le,he,xe,be)}}},{"../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"),Ae=oe("../internals/create-non-enumerable-property"),me=Se("species"),be=RegExp.prototype;Ue.exports=function(fe,z,te,se){var ie=Se(fe),le=!ke(function(){var je={};return je[ie]=function(){return 7},""[fe](je)!=7}),he=le&&!ke(function(){var je=!1,De=/a/;return fe==="split"&&(De={},De.constructor={},De.constructor[me]=function(){return De},De.flags="",De[ie]=/./[ie]),De.exec=function(){return je=!0,null},De[ie](""),!je});if(!le||!he||te){var pe=de(/./[ie]),xe=z(ie,""[fe],function(je,De,Fe,Te,Me){var Be=de(je),Ge=De.exec;return Ge===Ee||Ge===be.exec?le&&!Me?{done:!0,value:pe(De,Fe,Te)}:{done:!0,value:Be(Fe,De,Te)}:{done:!1}});ve(String.prototype,fe,xe[0]),ve(be,ie,xe[1])}se&&Ae(be[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,Ae){return ve(Se),Ae===void 0?Se:Ee?ke(Se,Ae):function(){return Se.apply(Ae,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(oe,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"),Ae=Se&&function(){}.name==="something",me=Se&&(!de||de&&ke(Ee,"name").configurable);Ue.exports={EXISTS:Se,PROPER:Ae,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(Ae){return Ae&&Se(Ae)}:function(Ae){return Ae&&function(){return ke.apply(Ae,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(Ae){if(Ae!=null)return ve(Ae,Se)||ve(Ae,"@@iterator")||Ee[de(Ae)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(oe,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"),Ae=oe("../internals/get-iterator-method"),me=de.TypeError;Ue.exports=function(be,fe){var z=arguments.length<2?Ae(be):fe;if(Ee(z))return ke(ve(z,be));throw me(Se(be)+" 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),Ae=de("".slice),me=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,be=/\$([$&'`]|\d{1,2})/g;Ue.exports=function(fe,z,te,se,ie,le){var he=te+fe.length,pe=se.length,xe=be;return ie!==void 0&&(ie=ve(ie),xe=me),Se(le,xe,function(je,De){var Fe;switch(ke(De,0)){case"$":return"$";case"&":return fe;case"`":return Ae(z,0,te);case"'":return Ae(z,he);case"<":Fe=ie[Ae(De,1,-1)];break;default:var Te=+De;if(Te===0)return je;if(Te>pe){var Me=Ee(Te/10);return Me===0?je:Me<=pe?se[Me-1]===void 0?ke(De,1):se[Me-1]+ke(De,1):je}Fe=se[Te-1]}return Fe===void 0?"":Fe})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(oe,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 Mn!="undefined"?Mn: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,Ae){return Ee(ve(Se),Ae)}},{"../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,Ae=Math.log,me=Math.LN2,be=function(z,te,se){var ie=ve(se),le=se*8-te-1,he=(1<<le)-1,pe=he>>1,xe=te===23?ke(2,-24)-ke(2,-77):0,je=z<0||z===0&&1/z<0?1:0,De=0,Fe,Te,Me;for(z=Ee(z),z!=z||z===1/0?(Te=z!=z?1:0,Fe=he):(Fe=Se(Ae(z)/me),Me=ke(2,-Fe),z*Me<1&&(Fe--,Me*=2),Fe+pe>=1?z+=xe/Me:z+=xe*ke(2,1-pe),z*Me>=2&&(Fe++,Me/=2),Fe+pe>=he?(Te=0,Fe=he):Fe+pe>=1?(Te=(z*Me-1)*ke(2,te),Fe=Fe+pe):(Te=z*ke(2,pe-1)*ke(2,te),Fe=0));te>=8;)ie[De++]=Te&255,Te/=256,te-=8;for(Fe=Fe<<te|Te,le+=te;le>0;)ie[De++]=Fe&255,Fe/=256,le-=8;return ie[--De]|=je*128,ie},fe=function(z,te){var se=z.length,ie=se*8-te-1,le=(1<<ie)-1,he=le>>1,pe=ie-7,xe=se-1,je=z[xe--],De=je&127,Fe;for(je>>=7;pe>0;)De=De*256+z[xe--],pe-=8;for(Fe=De&(1<<-pe)-1,De>>=-pe,pe+=te;pe>0;)Fe=Fe*256+z[xe--],pe-=8;if(De===0)De=1-he;else{if(De===le)return Fe?NaN:je?-1/0:1/0;Fe=Fe+ke(2,te),De=De-he}return(je?-1:1)*Fe*ke(2,De-te)};Ue.exports={pack:be,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,Ae=ve("".split);Ue.exports=Ee(function(){return!Se("z").propertyIsEnumerable(0)})?function(me){return ke(me)=="String"?Ae(me,""):Se(me)}:Se},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(oe,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,Ae){var me,be;return Ee&&de(me=Se.constructor)&&me!==Ae&&ve(be=me.prototype)&&be!==Ae.prototype&&Ee(ke,be),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"),Ae=oe("../internals/has-own-property"),me=oe("../internals/shared-store"),be=oe("../internals/shared-key"),fe=oe("../internals/hidden-keys"),z="Object already initialized",te=ve.TypeError,se=ve.WeakMap,ie,le,he,pe=function(Be){return he(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 je=me.state||(me.state=new se),De=Ee(je.get),Fe=Ee(je.has),Te=Ee(je.set);ie=function(Be,Ge){if(Fe(je,Be))throw new te(z);return Ge.facade=Be,Te(je,Be,Ge),Ge},le=function(Be){return De(je,Be)||{}},he=function(Be){return Fe(je,Be)}}else{var Me=be("state");fe[Me]=!0,ie=function(Be,Ge){if(Ae(Be,Me))throw new te(z);return Ge.facade=Be,Se(Be,Me,Ge),Ge},le=function(Be){return Ae(Be,Me)?Be[Me]:{}},he=function(Be){return Ae(Be,Me)}}Ue.exports={set:ie,get:le,has:he,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"),Ae=oe("../internals/inspect-source"),me=function(){},be=[],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,be,pe),!0}catch(xe){return!1}},le=function(pe){if(!Ee(pe))return!1;switch(ke(pe)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return se||!!te(z,Ae(pe))}catch(xe){return!0}};le.sham=!0,Ue.exports=!fe||ve(function(){var he;return ie(ie.call)||!ie(Object)||!ie(function(){he=!0})||he})?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=Ae[Se(fe)];return te==be?!0:te==me?!1:ve(z)?de(z):!!z},Se=ke.normalize=function(fe){return String(fe).replace(Ee,".").toLowerCase()},Ae=ke.data={},me=ke.NATIVE="N",be=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 Ae;return de(Se)&&((Ae=Se[ke])!==void 0?!!Ae:ve(Se)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(oe,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"),Ae=de.Object;Ue.exports=Se?function(me){return typeof me=="symbol"}:function(me){var be=ve("Symbol");return Ee(be)&&ke(be.prototype,Ae(me))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(oe,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"),Ae=oe("../internals/is-array-iterator-method"),me=oe("../internals/length-of-array-like"),be=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(he,pe){this.stopped=he,this.result=pe},le=ie.prototype;Ue.exports=function(he,pe,xe){var je=xe&&xe.that,De=!!(xe&&xe.AS_ENTRIES),Fe=!!(xe&&xe.IS_ITERATOR),Te=!!(xe&&xe.INTERRUPTED),Me=ve(pe,je),Be,Ge,Ye,Ke,Xe,ot,lt,ct=function(Je){return Be&&te(Be,"normal",Je),new ie(!0,Je)},Ct=function(Je){return De?(ke(Je),Te?Me(Je[0],Je[1],ct):Me(Je[0],Je[1])):Te?Me(Je,ct):Me(Je)};if(Fe)Be=he;else{if(Ge=z(he),!Ge)throw se(Se(he)+" is not iterable");if(Ae(Ge)){for(Ye=0,Ke=me(he);Ke>Ye;Ye++)if(Xe=Ct(he[Ye]),Xe&&be(le,Xe))return Xe;return new ie(!1)}Be=fe(he,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&&be(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,Ae){var me,be;ve(ke);try{if(me=Ee(ke,"return"),!me){if(Se==="throw")throw Ae;return Ae}me=de(me,ke)}catch(fe){be=!0,me=fe}if(Se==="throw")throw Ae;if(be)throw me;return ve(me),Ae}},{"../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"),Ae=oe("../internals/well-known-symbol"),me=oe("../internals/is-pure"),be=Ae("iterator"),fe=!1,z,te,se;[].keys&&(se=[].keys(),"next"in se?(te=ke(ke(se)),te!==Object.prototype&&(z=te)):fe=!0);var ie=z==null||de(function(){var le={};return z[be].call(le)!==le});ie?z={}:me&&(z=Ee(z)),ve(z[be])||Se(z,be,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"),Ae=oe("../internals/engine-is-ios-pebble"),me=oe("../internals/engine-is-webos-webkit"),be=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,he,pe,xe,je,De,Fe,Te,Me;le||(he=function(){var Be,Ge;for(be&&(Be=te.domain)&&Be.exit();pe;){Ge=pe.fn,pe=pe.next;try{Ge()}catch(Ye){throw pe?je():xe=void 0,Ye}}xe=void 0,Be&&Be.enter()},!Se&&!be&&!me&&fe&&z?(De=!0,Fe=z.createTextNode(""),new fe(he).observe(Fe,{characterData:!0}),je=function(){Fe.data=De=!De}):!Ae&&se&&se.resolve?(Te=se.resolve(void 0),Te.constructor=se,Me=ve(Te.then,Te),je=function(){Me(he)}):be?je=function(){te.nextTick(he)}:(ke=ve(ke,de),je=function(){ke(he)})),Ue.exports=le||function(Be){var Ge={fn:Be,next:void 0};xe&&(xe.next=Ge),pe||(pe=Ge,je()),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(Ae,me){if(ke!==void 0||Se!==void 0)throw TypeError("Bad Promise constructor");ke=Ae,Se=me}),this.resolve=de(ke),this.reject=de(Se)};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"),Ae=oe("../internals/object-get-own-property-symbols"),me=oe("../internals/object-property-is-enumerable"),be=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={},he=Symbol(),pe="abcdefghijklmnopqrst";return ie[he]=7,pe.split("").forEach(function(xe){le[xe]=xe}),z({},ie)[he]!=7||Se(z({},le)).join("")!=pe})?function(le,he){for(var pe=be(le),xe=arguments.length,je=1,De=Ae.f,Fe=me.f;xe>je;)for(var Te=fe(arguments[je++]),Me=De?se(Se(Te),De(Te)):Se(Te),Be=Me.length,Ge=0,Ye;Be>Ge;)Ye=Me[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"),Ae=oe("../internals/document-create-element"),me=oe("../internals/shared-key"),be=">",fe="<",z="prototype",te="script",se=me("IE_PROTO"),ie=function(){},le=function(De){return fe+te+be+De+fe+"/"+te+be},he=function(De){De.write(le("")),De.close();var Fe=De.parentWindow.Object;return De=null,Fe},pe=function(){var De=Ae("iframe"),Fe="java"+te+":",Te;return De.style.display="none",Se.appendChild(De),De.src=String(Fe),Te=De.contentWindow.document,Te.open(),Te.write(le("document.F=Object")),Te.close(),Te.F},xe,je=function(){try{xe=new ActiveXObject("htmlfile")}catch(Fe){}je=typeof document!="undefined"?document.domain&&xe?he(xe):pe():he(xe);for(var De=Ee.length;De--;)delete je[z][Ee[De]];return je()};ke[se]=!0,Ue.exports=Object.create||function(Fe,Te){var Me;return Fe!==null?(ie[z]=de(Fe),Me=new ie,ie[z]=null,Me[se]=Fe):Me=je(),Te===void 0?Me:ve.f(Me,Te)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(oe,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"),Ae=oe("../internals/object-keys");Ie.f=de&&!ve?Object.defineProperties:function(be,fe){ke(be);for(var z=Se(fe),te=Ae(fe),se=te.length,ie=0,le;se>ie;)Ee.f(be,le=te[ie++],z[le]);return be}},{"../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"),Ae=oe("../internals/to-property-key"),me=de.TypeError,be=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,z="enumerable",te="configurable",se="writable";Ie.f=ve?ke?function(le,he,pe){if(Se(le),he=Ae(he),Se(pe),typeof le=="function"&&he==="prototype"&&"value"in pe&&se in pe&&!pe[se]){var xe=fe(le,he);xe&&xe[se]&&(le[he]=pe.value,pe={configurable:te in pe?pe[te]:xe[te],enumerable:z in pe?pe[z]:xe[z],writable:!1})}return be(le,he,pe)}:be:function(le,he,pe){if(Se(le),he=Ae(he),Se(pe),Ee)try{return be(le,he,pe)}catch(xe){}if("get"in pe||"set"in pe)throw me("Accessors not supported");return"value"in pe&&(le[he]=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"),Ae=oe("../internals/to-property-key"),me=oe("../internals/has-own-property"),be=oe("../internals/ie8-dom-define"),fe=Object.getOwnPropertyDescriptor;Ie.f=de?fe:function(te,se){if(te=Se(te),se=Ae(se),be)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):[],Ae=function(me){try{return Ee(me)}catch(be){return ke(Se)}};Ue.exports.f=function(be){return Se&&de(be)=="Window"?Ae(be):Ee(ve(be))}},{"../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"),Ae=oe("../internals/correct-prototype-getter"),me=Se("IE_PROTO"),be=de.Object,fe=be.prototype;Ue.exports=Ae?be.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 be?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"),Ae=de([].push);Ue.exports=function(me,be){var fe=Ee(me),z=0,te=[],se;for(se in fe)!ve(Se,se)&&ve(fe,se)&&Ae(te,se);for(;be.length>z;)ve(fe,se=be[z++])&&(~ke(te,se)||Ae(te,se));return te}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(oe,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 Ae=ve(this,Se);return!!Ae&&Ae.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={},Ae;try{Ae=de(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),Ae(Se,[]),ke=Se instanceof Array}catch(me){}return function(be,fe){return ve(be),Ee(fe),ke?Ae(be,fe):be.__proto__=fe,be}}():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,Ae=ve(Se),me=ve([].push),be=function(fe){return function(z){for(var te=ke(z),se=Ee(te),ie=se.length,le=0,he=[],pe;ie>le;)pe=se[le++],(!de||Ae(te,pe))&&me(he,fe?[pe,te[pe]]:te[pe]);return he}};Ue.exports={entries:be(!0),values:be(!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(Ae,me){var be,fe;if(me==="string"&&Ee(be=Ae.toString)&&!ke(fe=ve(be,Ae))||Ee(be=Ae.valueOf)&&!ke(fe=ve(be,Ae))||me!=="string"&&Ee(be=Ae.toString)&&!ke(fe=ve(be,Ae)))return fe;throw Se("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(oe,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"),Ae=ve([].concat);Ue.exports=de("Reflect","ownKeys")||function(be){var fe=Ee.f(Se(be)),z=ke.f;return z?Ae(fe,z(be)):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"),Ae=oe("../internals/well-known-symbol"),me=oe("../internals/engine-is-browser"),be=oe("../internals/is-pure"),fe=oe("../internals/engine-v8-version"),z=ve&&ve.prototype,te=Ae("species"),se=!1,ie=Ee(de.PromiseRejectionEvent),le=ke("Promise",function(){var he=Se(ve),pe=he!==String(ve);if(!pe&&fe===66||be&&!(z.catch&&z.finally))return!0;if(fe>=51&&/native code/.test(he))return!1;var xe=new ve(function(Fe){Fe(1)}),je=function(Fe){Fe(function(){},function(){})},De=xe.constructor={};return De[te]=je,se=xe.then(function(){})instanceof je,se?!pe&&me&&!ie:!0});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 Ae=Ee.f(ke),me=Ae.resolve;return me(Se),Ae.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(oe,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"),Ae=oe("../internals/inspect-source"),me=oe("../internals/internal-state"),be=oe("../internals/function-name").CONFIGURABLE,fe=me.get,z=me.enforce,te=String(String).split("String");(Ue.exports=function(se,ie,le,he){var pe=he?!!he.unsafe:!1,xe=he?!!he.enumerable:!1,je=he?!!he.noTargetGet:!1,De=he&&he.name!==void 0?he.name:ie,Fe;if(ve(le)&&(String(De).slice(0,7)==="Symbol("&&(De="["+String(De).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ee(le,"name")||be&&le.name!==De)&&ke(le,"name",De),Fe=z(le),Fe.source||(Fe.source=te.join(typeof De=="string"?De:""))),se===de){xe?se[ie]=le:Se(ie,le);return}else pe?!je&&se[ie]&&(xe=!0):delete se[ie];xe?se[ie]=le:ke(se,ie,le)})(Function.prototype,"toString",function(){return ve(this)&&fe(this).source||Ae(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(oe,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"),Ae=oe("../internals/regexp-exec"),me=de.TypeError;Ue.exports=function(be,fe){var z=be.exec;if(ke(z)){var te=ve(z,be,fe);return te!==null&&Ee(te),te}if(Se(be)==="RegExp")return ve(Ae,be,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"),Ae=oe("../internals/shared"),me=oe("../internals/object-create"),be=oe("../internals/internal-state").get,fe=oe("../internals/regexp-unsupported-dot-all"),z=oe("../internals/regexp-unsupported-ncg"),te=Ae("native-string-replace",String.prototype.replace),se=RegExp.prototype.exec,ie=se,le=ve("".charAt),he=ve("".indexOf),pe=ve("".replace),xe=ve("".slice),je=function(){var Me=/a/,Be=/b*/g;return de(se,Me,"a"),de(se,Be,"a"),Me.lastIndex!==0||Be.lastIndex!==0}(),De=Se.BROKEN_CARET,Fe=/()??/.exec("")[1]!==void 0,Te=je||Fe||De||fe||z;Te&&(ie=function(Be){var Ge=this,Ye=be(Ge),Ke=Ee(Be),Xe=Ye.raw,ot,lt,ct,Ct,Je,rt,xt;if(Xe)return Xe.lastIndex=Ge.lastIndex,ot=de(ie,Xe,Ke),Ge.lastIndex=Xe.lastIndex,ot;var bt=Ye.groups,Pt=De&&Ge.sticky,ht=de(ke,Ge),St=Ge.source,mt=0,Nt=Ke;if(Pt&&(ht=pe(ht,"y",""),he(ht,"g")===-1&&(ht+="g"),Nt=xe(Ke,Ge.lastIndex),Ge.lastIndex>0&&(!Ge.multiline||Ge.multiline&&le(Ke,Ge.lastIndex-1)!==`
|
|
`)&&(St="(?: "+St+")",Nt=" "+Nt,mt++),lt=new RegExp("^(?:"+St+")",ht)),Fe&&(lt=new RegExp("^"+St+"$(?!\\s)",ht)),je&&(ct=Ge.lastIndex),Ct=de(se,Pt?lt:Ge,Nt),Pt?Ct?(Ct.input=xe(Ct.input,mt),Ct[0]=xe(Ct[0],mt),Ct.index=Ge.lastIndex,Ge.lastIndex+=Ct[0].length):Ge.lastIndex=0:je&&Ct&&(Ge.lastIndex=Ge.global?Ct.index+Ct[0].length:ct),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&&bt)for(Ct.groups=rt=me(null),Je=0;Je<bt.length;Je++)xt=bt[Je],rt[xt[0]]=Ct[xt[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(Ae){var me=Ae.flags;return me===void 0&&!("flags"in Se)&&!ve(Ae,"flags")&&Ee(Se,Ae)?de(ke,Ae):me}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(oe,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}),Ae=ke||de(function(){var me=Ee("^r","gy");return me.lastIndex=2,me.exec("str")!=null});Ue.exports={BROKEN_CARET:Ae,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(Ae){var me=de(Ae),be=ve.f;ke&&me&&!me[Se]&&be(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,Ae,me){Se&&!me&&(Se=Se.prototype),Se&&!ve(Se,ke)&&de(Se,ke,{configurable:!0,value:Ae})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(oe,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,Ae){var me=de(Se).constructor,be;return me===void 0||(be=de(me)[ke])==null?Ae:ve(be)}},{"../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),Ae=de("".charCodeAt),me=de("".slice),be=function(fe){return function(z,te){var se=Ee(ke(z)),ie=ve(te),le=se.length,he,pe;return ie<0||ie>=le?fe?"":void 0:(he=Ae(se,ie),he<55296||he>56319||ie+1===le||(pe=Ae(se,ie+1))<56320||pe>57343?fe?Se(se,ie):he:fe?me(se,ie,ie+2):(he-55296<<10)+(pe-56320)+65536)}};Ue.exports={codeAt:be(!1),charAt:be(!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),Ae="["+ke+"]",me=RegExp("^"+Ae+Ae+"*"),be=RegExp(Ae+Ae+"*$"),fe=function(z){return function(te){var se=Ee(ve(te));return z&1&&(se=Se(se,me,"")),z&2&&(se=Se(se,be,"")),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"),Ae=Se&&Se.prototype,me=Ae&&Ae.valueOf,be=Ee("toPrimitive");Ae&&!Ae[be]&&ke(Ae,be,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"),Ae=oe("../internals/fails"),me=oe("../internals/html"),be=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,he=de.process,pe=de.Dispatch,xe=de.Function,je=de.MessageChannel,De=de.String,Fe=0,Te={},Me="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)},ct=function(Ct){de.postMessage(De(Ct),Be.protocol+"//"+Be.host)};(!ie||!le)&&(ie=function(Je){z(arguments.length,1);var rt=ke(Je)?Je:xe(Je),xt=be(arguments,1);return Te[++Fe]=function(){ve(rt,void 0,xt)},Ge(Fe),Fe},le=function(Je){delete Te[Je]},se?Ge=function(Ct){he.nextTick(ot(Ct))}:pe&&pe.now?Ge=function(Ct){pe.now(ot(Ct))}:je&&!te?(Ye=new je,Ke=Ye.port2,Ye.port1.onmessage=lt,Ge=Ee(Ke.postMessage,Ke)):de.addEventListener&&ke(de.postMessage)&&!de.importScripts&&Be&&Be.protocol!=="file:"&&!Ae(ct)?(Ge=ct,de.addEventListener("message",lt,!1)):Me in fe("script")?Ge=function(Ct){me.appendChild(fe("script"))[Me]=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 Ae=de(ke);return Ae<0?ve(Ae+Se,0):Ee(Ae,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 Ae=ve(Se),me=Ee(Ae);if(Ae!==me)throw ke("Wrong length or index");return me}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(oe,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 Ae=ve(ke);if(Ae%Se)throw Ee("Wrong offset");return Ae}},{"../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"),Ae=oe("../internals/ordinary-to-primitive"),me=oe("../internals/well-known-symbol"),be=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 be("Can't convert object to primitive value")}return te===void 0&&(te="number"),Ae(z,te)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(oe,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"),Ae=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-buffer"),be=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"),he=oe("../internals/to-property-key"),pe=oe("../internals/has-own-property"),xe=oe("../internals/classof"),je=oe("../internals/is-object"),De=oe("../internals/is-symbol"),Fe=oe("../internals/object-create"),Te=oe("../internals/object-is-prototype-of"),Me=oe("../internals/object-set-prototype-of"),Be=oe("../internals/object-get-own-property-names").f,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"),ct=oe("../internals/inherit-if-required"),Ct=lt.get,Je=lt.set,rt=Xe.f,xt=ot.f,bt=Math.round,Pt=ve.RangeError,ht=me.ArrayBuffer,St=ht.prototype,mt=me.DataView,Nt=Ae.NATIVE_ARRAY_BUFFER_VIEWS,dt=Ae.TYPED_ARRAY_CONSTRUCTOR,Dt=Ae.TYPED_ARRAY_TAG,gt=Ae.TypedArray,yt=Ae.TypedArrayPrototype,tt=Ae.aTypedArrayConstructor,He=Ae.isTypedArray,we="BYTES_PER_ELEMENT",Ne="Wrong length",Ve=function(ut,vt){tt(ut);for(var At=0,Et=vt.length,Ft=new ut(Et);Et>At;)Ft[At]=vt[At++];return Ft},nt=function(ut,vt){rt(ut,vt,{get:function(){return Ct(this)[vt]}})},Re=function(ut){var vt;return Te(St,ut)||(vt=xe(ut))=="ArrayBuffer"||vt=="SharedArrayBuffer"},_e=function(ut,vt){return He(ut)&&!De(vt)&&vt in ut&&te(+vt)&&vt>=0},Ze=function(vt,At){return At=he(At),_e(vt,At)?fe(2,vt[At]):xt(vt,At)},qe=function(vt,At,Et){return At=he(At),_e(vt,At)&&je(Et)&&pe(Et,"value")&&!pe(Et,"get")&&!pe(Et,"set")&&!Et.configurable&&(!pe(Et,"writable")||Et.writable)&&(!pe(Et,"enumerable")||Et.enumerable)?(vt[At]=Et.value,vt):rt(vt,At,Et)};ke?(Nt||(ot.f=Ze,Xe.f=qe,nt(yt,"buffer"),nt(yt,"byteOffset"),nt(yt,"byteLength"),nt(yt,"length")),de({target:"Object",stat:!0,forced:!Nt},{getOwnPropertyDescriptor:Ze,defineProperty:qe}),Ue.exports=function(ut,vt,At){var Et=ut.match(/\d+$/)[0]/8,Ft=ut+(At?"Clamped":"")+"Array",Kt="get"+ut,Yt="set"+ut,Vt=ve[Ft],Ht=Vt,sn=Ht&&Ht.prototype,rn={},un=function(Cn,On){var Dr=Ct(Cn);return Dr.view[Kt](On*Et+Dr.byteOffset,!0)},Sn=function(Cn,On,Dr){var Sr=Ct(Cn);At&&(Dr=(Dr=bt(Dr))<0?0:Dr>255?255:Dr&255),Sr.view[Yt](On*Et+Sr.byteOffset,Dr,!0)},vn=function(Cn,On){rt(Cn,On,{get:function(){return un(this,On)},set:function(Dr){return Sn(this,On,Dr)},enumerable:!0})};Nt?Se&&(Ht=vt(function(Cn,On,Dr,Sr){return be(Cn,sn),ct(function(){return je(On)?Re(On)?Sr!==void 0?new Vt(On,le(Dr,Et),Sr):Dr!==void 0?new Vt(On,le(Dr,Et)):new Vt(On):He(On)?Ve(Ht,On):Ee(Ge,Ht,On):new Vt(ie(On))}(),Cn,Ht)}),Me&&Me(Ht,gt),Ye(Be(Vt),function(Cn){Cn in Ht||z(Ht,Cn,Vt[Cn])}),Ht.prototype=sn):(Ht=vt(function(Cn,On,Dr,Sr){be(Cn,sn);var qr=0,tr=0,ai,gi,fi;if(!je(On))fi=ie(On),gi=fi*Et,ai=new ht(gi);else if(Re(On)){ai=On,tr=le(Dr,Et);var Di=On.byteLength;if(Sr===void 0){if(Di%Et||(gi=Di-tr,gi<0))throw Pt(Ne)}else if(gi=se(Sr)*Et,gi+tr>Di)throw Pt(Ne);fi=gi/Et}else return He(On)?Ve(Ht,On):Ee(Ge,Ht,On);for(Je(Cn,{buffer:ai,byteOffset:tr,byteLength:gi,length:fi,view:new mt(ai)});qr<fi;)vn(Cn,qr++)}),Me&&Me(Ht,gt),sn=Ht.prototype=Fe(yt)),sn.constructor!==Ht&&z(sn,"constructor",Ht),z(sn,dt,Ht),Dt&&z(sn,Dt,Ft),rn[Ft]=Ht,de({global:!0,forced:Ht!=Vt,sham:!Nt},rn),we in Ht||z(Ht,we,Et),we in sn||z(sn,we,Et),Ke(Ft)}):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,Ae=de.Int8Array;Ue.exports=!ke||!ve(function(){Ae(1)})||!ve(function(){new Ae(-1)})||!Ee(function(me){new Ae,new Ae(null),new Ae(1.5),new Ae(me)},!0)||ve(function(){return new Ae(new Se(2),1,void 0).length!==1})},{"../internals/array-buffer-view-core":103,"../internals/check-correctness-of-iteration":122,"../internals/fails":150,"../internals/global":163}],260:[function(oe,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"),Ae=oe("../internals/get-iterator"),me=oe("../internals/get-iterator-method"),be=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,he=le>1?arguments[1]:void 0,pe=he!==void 0,xe=me(ie),je,De,Fe,Te,Me,Be;if(xe&&!be(xe))for(Me=Ae(ie,xe),Be=Me.next,ie=[];!(Te=ve(Be,Me)).done;)ie.push(Te.value);for(pe&&le>2&&(he=de(he,arguments[2])),De=Se(ie),Fe=new(fe(se))(De),je=0;De>je;je++)Fe[je]=pe?he(ie[je],je):ie[je];return Fe}},{"../internals/a-constructor":96,"../internals/array-buffer-view-core":103,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/is-array-iterator-method":174,"../internals/length-of-array-like":188,"../internals/to-object":250}],262:[function(oe,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"),Ae=oe("../internals/use-symbol-as-uid"),me=ve("wks"),be=de.Symbol,fe=be&&be.for,z=Ae?be:be&&be.withoutSetter||ke;Ue.exports=function(te){if(!Ee(me,te)||!(Se||typeof me[te]=="string")){var se="Symbol."+te;Se&&Ee(be,te)?me[te]=be[te]:Ae&&fe?me[te]=fe(se):me[te]=z(se)}return me[te]}},{"../internals/global":163,"../internals/has-own-property":164,"../internals/native-symbol":191,"../internals/shared":237,"../internals/uid":263,"../internals/use-symbol-as-uid":264}],269:[function(oe,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",Ae=Ee[Se],me=ve[Se];de({global:!0,forced:me!==Ae},{ArrayBuffer:Ae}),ke(Se)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(oe,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"),Ae=oe("../internals/to-absolute-index"),me=oe("../internals/to-length"),be=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),he=Ee(function(){return!new fe(2).slice(1,void 0).byteLength});de({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:he},{slice:function(xe,je){if(se&&je===void 0)return se(Se(this),xe);for(var De=Se(this).byteLength,Fe=Ae(xe,De),Te=Ae(je===void 0?De:je,De),Me=new(be(this,fe))(me(Te-Fe)),Be=new z(this),Ge=new z(Me),Ye=0;Fe<Te;)le(Ge,Ye++,ie(Be,Fe++));return Me}})},{"../internals/an-object":101,"../internals/array-buffer":104,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/species-constructor":238,"../internals/to-absolute-index":245,"../internals/to-length":249}],272:[function(oe,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"),Ae=oe("../internals/to-object"),me=oe("../internals/length-of-array-like"),be=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,he="Maximum allowed index exceeded",pe=ve.TypeError,xe=se>=51||!Ee(function(){var Te=[];return Te[ie]=!1,Te.concat()[0]!==Te}),je=z("concat"),De=function(Te){if(!Se(Te))return!1;var Me=Te[ie];return Me!==void 0?!!Me:ke(Te)},Fe=!xe||!je;de({target:"Array",proto:!0,forced:Fe},{concat:function(Me){var Be=Ae(this),Ge=fe(Be,0),Ye=0,Ke,Xe,ot,lt,ct;for(Ke=-1,ot=arguments.length;Ke<ot;Ke++)if(ct=Ke===-1?Be:arguments[Ke],De(ct)){if(lt=me(ct),Ye+lt>le)throw pe(he);for(Xe=0;Xe<lt;Xe++,Ye++)Xe in ct&&be(Ge,Ye,ct[Xe])}else{if(Ye>=le)throw pe(he);be(Ge,Ye++,ct)}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(Ae){return ve(this,Ae,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(oe,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,Ae=oe("../internals/define-iterator"),me=oe("../internals/is-pure"),be=oe("../internals/descriptors"),fe="Array Iterator",z=ke.set,te=ke.getterFor(fe);Ue.exports=Ae(Array,"Array",function(ie,le){z(this,{type:fe,target:de(ie),index:0,kind:le})},function(){var ie=te(this),le=ie.target,he=ie.kind,pe=ie.index++;return!le||pe>=le.length?(ie.target=void 0,{value:void 0,done:!0}):he=="keys"?{value:pe,done:!1}:he=="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&&be&&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"),Ae=ve([].join),me=Ee!=Object,be=Se("join",",");de({target:"Array",proto:!0,forced:me||!be},{join:function(z){return Ae(ke(this),z===void 0?",":z)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(oe,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(Ae){return ve(this,Ae,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(oe,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"),Ae=oe("../internals/to-absolute-index"),me=oe("../internals/length-of-array-like"),be=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"),he=ve.Array,pe=Math.max;de({target:"Array",proto:!0,forced:!ie},{slice:function(je,De){var Fe=be(this),Te=me(Fe),Me=Ae(je,Te),Be=Ae(De===void 0?Te:De,Te),Ge,Ye,Ke;if(Ee(Fe)&&(Ge=Fe.constructor,ke(Ge)&&(Ge===he||Ee(Ge.prototype))?Ge=void 0:Se(Ge)&&(Ge=Ge[le],Ge===null&&(Ge=void 0)),Ge===he||Ge===void 0))return se(Fe,Me,Be);for(Ye=new(Ge===void 0?he:Ge)(pe(Be-Me,0)),Ke=0;Me<Be;Me++,Ke++)Me in Fe&&fe(Ye,Ke,Fe[Me]);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"),Ae=oe("../internals/to-string"),me=oe("../internals/fails"),be=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=[],he=ve(le.sort),pe=ve(le.push),xe=me(function(){le.sort(void 0)}),je=me(function(){le.sort(null)}),De=fe("sort"),Fe=!me(function(){if(se)return se<70;if(!(z&&z>3)){if(te)return!0;if(ie)return ie<603;var Be="",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||!je||!De||!Fe,Me=function(Be){return function(Ge,Ye){return Ye===void 0?-1:Ge===void 0?1:Be!==void 0?+Be(Ge,Ye)||0:Ae(Ge)>Ae(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?he(Ye):he(Ye,Ge);var Ke=[],Xe=Se(Ye),ot,lt;for(lt=0;lt<Xe;lt++)lt in Ye&&pe(Ke,Ye[lt]);for(be(Ke,Me(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"),Ae=oe("../internals/to-object"),me=oe("../internals/array-species-create"),be=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,he="Maximum allowed length exceeded";de({target:"Array",proto:!0,forced:!z},{splice:function(xe,je){var De=Ae(this),Fe=Se(De),Te=Ee(xe,Fe),Me=arguments.length,Be,Ge,Ye,Ke,Xe,ot;if(Me===0?Be=Ge=0:Me===1?(Be=0,Ge=Fe-Te):(Be=Me-2,Ge=ie(se(ke(je),0),Fe-Te)),Fe+Be-Ge>le)throw te(he);for(Ye=me(De,Ge),Ke=0;Ke<Ge;Ke++)Xe=Te+Ke,Xe in De&&be(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,Ae=Ee(Se.toString),me=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,be=Ee(me.exec),fe="name";de&&!ve&&ke(Se,fe,{configurable:!0,get:function(){try{return be(me,Ae(this))[1]}catch(z){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(oe,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"),Ae=oe("../internals/fails"),me=oe("../internals/is-array"),be=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),he=Se("".charAt),pe=Se("".charCodeAt),xe=Se("".replace),je=Se(1 .toString),De=/[\uD800-\uDFFF]/g,Fe=/^[\uD800-\uDBFF]$/,Te=/^[\uDC00-\uDFFF]$/,Me=!se||Ae(function(){var Ke=ve("Symbol")();return ie([Ke])!="[null]"||ie({a:Ke})!="{}"||ie(Object(Ke))!="{}"}),Be=Ae(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(ct,Ct){if(be(lt)&&(Ct=ke(lt,this,ct,Ct)),!z(Ct))return Ct}),ot[1]=Xe,Ee(ie,null,ot)},Ye=function(Ke,Xe,ot){var lt=he(ot,Xe-1),ct=he(ot,Xe+1);return le(Fe,Ke)&&!le(Te,ct)||le(Te,Ke)&&!le(Fe,lt)?"\\u"+je(pe(Ke,0),16):Ke};ie&&de({target:"JSON",stat:!0,forced:Me||Be},{stringify:function(Xe,ot,lt){var ct=te(arguments),Ct=Ee(Me?Ge:ie,null,ct);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"),Ae=oe("../internals/has-own-property"),me=oe("../internals/inherit-if-required"),be=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,he=oe("../internals/this-number-value"),pe=oe("../internals/string-trim").trim,xe="Number",je=ve[xe],De=je.prototype,Fe=ve.TypeError,Te=Ee("".slice),Me=Ee("".charCodeAt),Be=function(lt){var ct=z(lt,"number");return typeof ct=="bigint"?ct:Ge(ct)},Ge=function(lt){var ct=z(lt,"number"),Ct,Je,rt,xt,bt,Pt,ht,St;if(fe(ct))throw Fe("Cannot convert a Symbol value to a number");if(typeof ct=="string"&&ct.length>2){if(ct=pe(ct),Ct=Me(ct,0),Ct===43||Ct===45){if(Je=Me(ct,2),Je===88||Je===120)return NaN}else if(Ct===48){switch(Me(ct,1)){case 66:case 98:rt=2,xt=49;break;case 79:case 111:rt=8,xt=55;break;default:return+ct}for(bt=Te(ct,2),Pt=bt.length,ht=0;ht<Pt;ht++)if(St=Me(bt,ht),St<48||St>xt)return NaN;return parseInt(bt,rt)}}return+ct};if(ke(xe,!je(" 0o1")||!je("0b1")||je("+0x1"))){for(var Ye=function(ct){var Ct=arguments.length<1?0:je(Be(ct)),Je=this;return be(De,Je)&&te(function(){he(Je)})?me(Object(Ct),Je,Ye):Ct},Ke=de?se(je):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Xe=0,ot;Ke.length>Xe;Xe++)Ae(je,ot=Ke[Xe])&&!Ae(Ye,ot)&&le(Ye,ot,ie(je,ot));Ye.prototype=De,De.constructor=Ye,Se(ve,xe,Ye)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(oe,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"),Ae=!ve||Ee(function(){ke.f(1)});de({target:"Object",stat:!0,forced:Ae},{getOwnPropertySymbols:function(be){var fe=ke.f;return fe?fe(Se(be)):[]}})},{"../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"),Ae=oe("../internals/iterate"),me=oe("../internals/promise-statics-incorrect-iteration");de({target:"Promise",stat:!0,forced:me},{all:function(fe){var z=this,te=ke.f(z),se=te.resolve,ie=te.reject,le=Se(function(){var he=Ee(z.resolve),pe=[],xe=0,je=1;Ae(fe,function(De){var Fe=xe++,Te=!1;je++,ve(he,z,De).then(function(Me){Te||(Te=!0,pe[Fe]=Me,--je||se(pe))},ie)}),--je||se(pe)});return le.error&&ie(le.value),te.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],293:[function(oe,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"),Ae=oe("../internals/is-callable"),me=oe("../internals/redefine"),be=ke&&ke.prototype;if(de({target:"Promise",proto:!0,forced:Ee,real:!0},{catch:function(z){return this.then(void 0,z)}}),!ve&&Ae(ke)){var fe=Se("Promise").prototype.catch;be.catch!==fe&&me(be,"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"),Ae=oe("../internals/redefine"),me=oe("../internals/redefine-all"),be=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"),he=oe("../internals/species-constructor"),pe=oe("../internals/task").set,xe=oe("../internals/microtask"),je=oe("../internals/host-report-errors"),De=oe("../internals/perform"),Fe=oe("../internals/queue"),Te=oe("../internals/internal-state"),Me=oe("../internals/promise-native-constructor"),Be=oe("../internals/promise-constructor-detection"),Ge=oe("../internals/new-promise-capability"),Ye="Promise",Ke=Be.CONSTRUCTOR,Xe=Be.REJECTION_EVENT,ot=Be.SUBCLASSING,lt=Te.getterFor(Ye),ct=Te.set,Ct=Me&&Me.prototype,Je=Me,rt=Ct,xt=ke.TypeError,bt=ke.document,Pt=ke.process,ht=Ge.f,St=ht,mt=!!(bt&&bt.createEvent&&ke.dispatchEvent),Nt="unhandledrejection",dt="rejectionhandled",Dt=0,gt=1,yt=2,tt=1,He=2,we,Ne,Ve,nt,Re=function(Yt){var Vt;return ie(Yt)&&se(Vt=Yt.then)?Vt:!1},_e=function(Yt,Vt){var Ht=Vt.value,sn=Vt.state==gt,rn=sn?Yt.ok:Yt.fail,un=Yt.resolve,Sn=Yt.reject,vn=Yt.domain,Cn,On,Dr;try{rn?(sn||(Vt.rejection===He&&At(Vt),Vt.rejection=tt),rn===!0?Cn=Ht:(vn&&vn.enter(),Cn=rn(Ht),vn&&(vn.exit(),Dr=!0)),Cn===Yt.promise?Sn(xt("Promise-chain cycle")):(On=Re(Cn))?Se(On,Cn,un,Sn):un(Cn)):Sn(Ht)}catch(Sr){vn&&!Dr&&vn.exit(),Sn(Sr)}},Ze=function(Yt,Vt){Yt.notified||(Yt.notified=!0,xe(function(){for(var Ht=Yt.reactions,sn;sn=Ht.get();)_e(sn,Yt);Yt.notified=!1,Vt&&!Yt.rejection&&ut(Yt)}))},qe=function(Yt,Vt,Ht){var sn,rn;mt?(sn=bt.createEvent("Event"),sn.promise=Vt,sn.reason=Ht,sn.initEvent(Yt,!1,!0),ke.dispatchEvent(sn)):sn={promise:Vt,reason:Ht},!Xe&&(rn=ke["on"+Yt])?rn(sn):Yt===Nt&&je("Unhandled promise rejection",Ht)},ut=function(Yt){Se(pe,ke,function(){var Vt=Yt.facade,Ht=Yt.value,sn=vt(Yt),rn;if(sn&&(rn=De(function(){Ee?Pt.emit("unhandledRejection",Ht,Vt):qe(Nt,Vt,Ht)}),Yt.rejection=Ee||vt(Yt)?He:tt,rn.error))throw rn.value})},vt=function(Yt){return Yt.rejection!==tt&&!Yt.parent},At=function(Yt){Se(pe,ke,function(){var Vt=Yt.facade;Ee?Pt.emit("rejectionHandled",Vt):qe(dt,Vt,Yt.value)})},Et=function(Yt,Vt,Ht){return function(sn){Yt(Vt,sn,Ht)}},Ft=function(Yt,Vt,Ht){Yt.done||(Yt.done=!0,Ht&&(Yt=Ht),Yt.value=Vt,Yt.state=yt,Ze(Yt,!0))},Kt=function(Yt,Vt,Ht){if(!Yt.done){Yt.done=!0,Ht&&(Yt=Ht);try{if(Yt.facade===Vt)throw xt("Promise can't be resolved itself");var sn=Re(Vt);sn?xe(function(){var rn={done:!1};try{Se(sn,Vt,Et(Kt,rn,Yt),Et(Ft,rn,Yt))}catch(un){Ft(rn,un,Yt)}}):(Yt.value=Vt,Yt.state=gt,Ze(Yt,!1))}catch(rn){Ft({done:!1},rn,Yt)}}};if(Ke&&(Je=function(Vt){le(this,rt),te(Vt),Se(we,this);var Ht=lt(this);try{Vt(Et(Kt,Ht),Et(Ft,Ht))}catch(sn){Ft(Ht,sn)}},rt=Je.prototype,we=function(Vt){ct(this,{type:Ye,done:!1,notified:!1,parent:!1,reactions:new Fe,rejection:!1,state:Dt,value:void 0})},we.prototype=me(rt,{then:function(Vt,Ht){var sn=lt(this),rn=ht(he(this,Je));return sn.parent=!0,rn.ok=se(Vt)?Vt:!0,rn.fail=se(Ht)&&Ht,rn.domain=Ee?Pt.domain:void 0,sn.state==Dt?sn.reactions.add(rn):xe(function(){_e(rn,sn)}),rn.promise}}),Ne=function(){var Yt=new we,Vt=lt(Yt);this.promise=Yt,this.resolve=Et(Kt,Vt),this.reject=Et(Ft,Vt)},Ge.f=ht=function(Yt){return Yt===Je||Yt===Ve?new Ne(Yt):St(Yt)},!ve&&se(Me)&&Ct!==Object.prototype)){nt=Ct.then,ot||Ae(Ct,"then",function(Vt,Ht){var sn=this;return new Je(function(rn,un){Se(nt,sn,rn,un)}).then(Vt,Ht)},{unsafe:!0});try{delete Ct.constructor}catch(Yt){}be&&be(Ct,rt)}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"),Ae=oe("../internals/iterate"),me=oe("../internals/promise-statics-incorrect-iteration");de({target:"Promise",stat:!0,forced:me},{race:function(fe){var z=this,te=ke.f(z),se=te.reject,ie=Se(function(){var le=Ee(z.resolve);Ae(fe,function(he){ve(le,z,he).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(Ae){var me=Ee.f(this);return ve(me.reject,void 0,Ae),me.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(oe,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,Ae=oe("../internals/promise-resolve"),me=ve("Promise"),be=Ee&&!Se;de({target:"Promise",stat:!0,forced:Ee||Se},{resolve:function(z){return Ae(be&&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"),Ae=oe("../internals/create-non-enumerable-property"),me=oe("../internals/object-get-own-property-names").f,be=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"),he=oe("../internals/fails"),pe=oe("../internals/has-own-property"),xe=oe("../internals/internal-state").enforce,je=oe("../internals/set-species"),De=oe("../internals/well-known-symbol"),Fe=oe("../internals/regexp-unsupported-dot-all"),Te=oe("../internals/regexp-unsupported-ncg"),Me=De("match"),Be=ve.RegExp,Ge=Be.prototype,Ye=ve.SyntaxError,Ke=Ee(Ge.exec),Xe=Ee("".charAt),ot=Ee("".replace),lt=Ee("".indexOf),ct=Ee("".slice),Ct=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Je=/a/g,rt=/a/g,xt=new Be(Je)!==Je,bt=se.MISSED_STICKY,Pt=se.UNSUPPORTED_Y,ht=de&&(!xt||bt||Fe||Te||he(function(){return rt[Me]=!1,Be(Je)!=Je||Be(rt)==rt||Be(Je,"i")!="/a/i"})),St=function(gt){for(var yt=gt.length,tt=0,He="",we=!1,Ne;tt<=yt;tt++){if(Ne=Xe(gt,tt),Ne==="\\"){He+=Ne+Xe(gt,++tt);continue}!we&&Ne==="."?He+="[\\s\\S]":(Ne==="["?we=!0:Ne==="]"&&(we=!1),He+=Ne)}return He},mt=function(gt){for(var yt=gt.length,tt=0,He="",we=[],Ne={},Ve=!1,nt=!1,Re=0,_e="",Ze;tt<=yt;tt++){if(Ze=Xe(gt,tt),Ze==="\\")Ze=Ze+Xe(gt,++tt);else if(Ze==="]")Ve=!1;else if(!Ve)switch(!0){case Ze==="[":Ve=!0;break;case Ze==="(":Ke(Ct,ct(gt,tt+1))&&(tt+=2,nt=!0),He+=Ze,Re++;continue;case(Ze===">"&&nt):if(_e===""||pe(Ne,_e))throw new Ye("Invalid capture group name");Ne[_e]=!0,we[we.length]=[_e,Re],nt=!1,_e="";continue}nt?_e+=Ze:He+=Ze}return[He,we]};if(ke("RegExp",ht)){for(var Nt=function(yt,tt){var He=be(Ge,this),we=fe(yt),Ne=tt===void 0,Ve=[],nt=yt,Re,_e,Ze,qe,ut,vt;if(!He&&we&&Ne&&yt.constructor===Nt)return yt;if((we||be(Ge,yt))&&(yt=yt.source,Ne&&(tt=te(nt))),yt=yt===void 0?"":z(yt),tt=tt===void 0?"":z(tt),nt=yt,Fe&&"dotAll"in Je&&(_e=!!tt&<(tt,"s")>-1,_e&&(tt=ot(tt,/s/g,""))),Re=tt,bt&&"sticky"in Je&&(Ze=!!tt&<(tt,"y")>-1,Ze&&Pt&&(tt=ot(tt,/y/g,""))),Te&&(qe=mt(yt),yt=qe[0],Ve=qe[1]),ut=Se(Be(yt,tt),He?this:Ge,Nt),(_e||Ze||Ve.length)&&(vt=xe(ut),_e&&(vt.dotAll=!0,vt.raw=Nt(St(yt),Re)),Ze&&(vt.sticky=!0),Ve.length&&(vt.groups=Ve)),yt!==nt)try{Ae(ut,"source",nt===""?"(?:)":nt)}catch(At){}return ut},dt=me(Be),Dt=0;dt.length>Dt;)ie(Nt,Be,dt[Dt++]);Ge.constructor=Nt,Nt.prototype=Ge,le(ve,"RegExp",Nt)}je("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(oe,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"),Ae=oe("../internals/regexp-get-flags"),me="toString",be=RegExp.prototype,fe=be[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),he=ke(Ae(ie));return"/"+le+"/"+he},{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"),Ae=oe("../internals/correct-is-regexp-logic"),me=ve("".indexOf);de({target:"String",proto:!0,forced:!Ae("includes")},{includes:function(fe){return!!~me(Se(ke(this)),Se(Ee(fe)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":126,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/not-a-regexp":194,"../internals/require-object-coercible":230,"../internals/to-string":256}],303:[function(oe,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",Ae=Ee.set,me=Ee.getterFor(Se);ke(String,"String",function(be){Ae(this,{type:Se,string:ve(be),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"),Ae=oe("../internals/require-object-coercible"),me=oe("../internals/get-method"),be=oe("../internals/advance-string-index"),fe=oe("../internals/regexp-exec-abstract");ve("match",function(z,te,se){return[function(le){var he=Ae(this),pe=le==null?void 0:me(le,z);return pe?de(pe,le,he):new RegExp(le)[z](Se(he))},function(ie){var le=Ee(this),he=Se(ie),pe=se(te,le,he);if(pe.done)return pe.value;if(!le.global)return fe(le,he);var xe=le.unicode;le.lastIndex=0;for(var je=[],De=0,Fe;(Fe=fe(le,he))!==null;){var Te=Se(Fe[0]);je[De]=Te,Te===""&&(le.lastIndex=be(he,ke(le.lastIndex),xe)),De++}return De===0?null:je}]})},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-length":249,"../internals/to-string":256}],305:[function(oe,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"),Ae=oe("../internals/an-object"),me=oe("../internals/is-callable"),be=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"),he=oe("../internals/regexp-exec-abstract"),pe=oe("../internals/well-known-symbol"),xe=pe("replace"),je=Math.max,De=Math.min,Fe=Ee([].concat),Te=Ee([].push),Me=Ee("".indexOf),Be=Ee("".slice),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,ct){var Ct=Ke?"$":"$0";return[function(rt,xt){var bt=te(this),Pt=rt==null?void 0:ie(rt,xe);return Pt?ve(Pt,rt,bt,xt):ve(lt,z(bt),rt,xt)},function(Je,rt){var xt=Ae(this),bt=z(Je);if(typeof rt=="string"&&Me(rt,Ct)===-1&&Me(rt,"$<")===-1){var Pt=ct(lt,xt,bt,rt);if(Pt.done)return Pt.value}var ht=me(rt);ht||(rt=z(rt));var St=xt.global;if(St){var mt=xt.unicode;xt.lastIndex=0}for(var Nt=[];;){var dt=he(xt,bt);if(dt===null||(Te(Nt,dt),!St))break;var Dt=z(dt[0]);Dt===""&&(xt.lastIndex=se(bt,fe(xt.lastIndex),mt))}for(var gt="",yt=0,tt=0;tt<Nt.length;tt++){dt=Nt[tt];for(var He=z(dt[0]),we=je(De(be(dt.index),bt.length),0),Ne=[],Ve=1;Ve<dt.length;Ve++)Te(Ne,Ge(dt[Ve]));var nt=dt.groups;if(ht){var Re=Fe([He],Ne,we,bt);nt!==void 0&&Te(Re,nt);var _e=z(de(rt,void 0,Re))}else _e=le(He,bt,we,Ne,nt,rt);we>=yt&&(gt+=Be(bt,yt,we)+_e,yt=we+He.length)}return gt+Be(bt,yt)}]},!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"),Ae=oe("../internals/to-string"),me=oe("../internals/get-method"),be=oe("../internals/regexp-exec-abstract");ve("search",function(fe,z,te){return[function(ie){var le=ke(this),he=ie==null?void 0:me(ie,fe);return he?de(he,ie,le):new RegExp(ie)[fe](Ae(le))},function(se){var ie=Ee(this),le=Ae(se),he=te(z,ie,le);if(he.done)return he.value;var pe=ie.lastIndex;Se(pe,0)||(ie.lastIndex=0);var xe=be(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"),Ae=oe("../internals/an-object"),me=oe("../internals/require-object-coercible"),be=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"),he=oe("../internals/regexp-exec"),pe=oe("../internals/regexp-sticky-helpers"),xe=oe("../internals/fails"),je=pe.UNSUPPORTED_Y,De=4294967295,Fe=Math.min,Te=[].push,Me=Ee(/./.exec),Be=Ee(Te),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(ct,Ct){var Je=te(me(this)),rt=Ct===void 0?De:Ct>>>0;if(rt===0)return[];if(ct===void 0)return[Je];if(!Se(ct))return ve(Xe,Je,ct,rt);for(var xt=[],bt=(ct.ignoreCase?"i":"")+(ct.multiline?"m":"")+(ct.unicode?"u":"")+(ct.sticky?"y":""),Pt=0,ht=new RegExp(ct.source,bt+"g"),St,mt,Nt;(St=ve(he,ht,Je))&&(mt=ht.lastIndex,!(mt>Pt&&(Be(xt,Ge(Je,Pt,St.index)),St.length>1&&St.index<Je.length&&de(Te,xt,ie(St,1)),Nt=St[0].length,Pt=mt,xt.length>=rt)));)ht.lastIndex===St.index&&ht.lastIndex++;return Pt===Je.length?(Nt||!Me(ht,""))&&Be(xt,""):Be(xt,Ge(Je,Pt)),xt.length>rt?ie(xt,0,rt):xt}:"0".split(void 0,0).length?lt=function(ct,Ct){return ct===void 0&&Ct===0?[]:ve(Xe,this,ct,Ct)}:lt=Xe,[function(Ct,Je){var rt=me(this),xt=Ct==null?void 0:se(Ct,Ke);return xt?ve(xt,Ct,rt,Je):ve(lt,te(rt),Ct,Je)},function(ct,Ct){var Je=Ae(this),rt=te(ct),xt=ot(lt,Je,rt,Ct,lt!==Xe);if(xt.done)return xt.value;var bt=be(Je,RegExp),Pt=Je.unicode,ht=(Je.ignoreCase?"i":"")+(Je.multiline?"m":"")+(Je.unicode?"u":"")+(je?"g":"y"),St=new bt(je?"^(?:"+Je.source+")":Je,ht),mt=Ct===void 0?De:Ct>>>0;if(mt===0)return[];if(rt.length===0)return le(St,rt)===null?[rt]:[];for(var Nt=0,dt=0,Dt=[];dt<rt.length;){St.lastIndex=je?0:dt;var gt=le(St,je?Ge(rt,dt):rt),yt;if(gt===null||(yt=Fe(z(St.lastIndex+(je?dt:0)),rt.length))===Nt)dt=fe(rt,dt,Pt);else{if(Be(Dt,Ge(rt,Nt,dt)),Dt.length===mt)return Dt;for(var tt=1;tt<=gt.length-1;tt++)if(Be(Dt,gt[tt]),Dt.length===mt)return Dt;dt=Nt=yt}}return Be(Dt,Ge(rt,Nt)),Dt}]},!Ye,je)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/array-slice-simple":116,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/is-regexp":182,"../internals/regexp-exec":224,"../internals/regexp-exec-abstract":223,"../internals/regexp-sticky-helpers":227,"../internals/require-object-coercible":230,"../internals/species-constructor":238,"../internals/to-length":249,"../internals/to-string":256}],308:[function(oe,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"),Ae=oe("../internals/descriptors"),me=oe("../internals/native-symbol"),be=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"),he=oe("../internals/create-property-descriptor"),pe=oe("../internals/object-create"),xe=oe("../internals/object-keys"),je=oe("../internals/object-get-own-property-names"),De=oe("../internals/object-get-own-property-names-external"),Fe=oe("../internals/object-get-own-property-symbols"),Te=oe("../internals/object-get-own-property-descriptor"),Me=oe("../internals/object-define-property"),Be=oe("../internals/object-define-properties"),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"),ct=oe("../internals/well-known-symbol"),Ct=oe("../internals/well-known-symbol-wrapped"),Je=oe("../internals/define-well-known-symbol"),rt=oe("../internals/symbol-define-to-primitive"),xt=oe("../internals/set-to-string-tag"),bt=oe("../internals/internal-state"),Pt=oe("../internals/array-iteration").forEach,ht=Xe("hidden"),St="Symbol",mt="prototype",Nt=bt.set,dt=bt.getterFor(St),Dt=Object[mt],gt=ve.Symbol,yt=gt&>[mt],tt=ve.TypeError,He=ve.QObject,we=Te.f,Ne=Me.f,Ve=De.f,nt=Ge.f,Re=ke([].push),_e=Ke("symbols"),Ze=Ke("op-symbols"),qe=Ke("wks"),ut=!He||!He[mt]||!He[mt].findChild,vt=Ae&&be(function(){return pe(Ne({},"a",{get:function(){return Ne(this,"a",{value:7}).a}})).a!=7})?function(rn,un,Sn){var vn=we(Dt,un);vn&&delete Dt[un],Ne(rn,un,Sn),vn&&rn!==Dt&&Ne(Dt,un,vn)}:Ne,At=function(rn,un){var Sn=_e[rn]=pe(yt);return Nt(Sn,{type:St,tag:rn,description:un}),Ae||(Sn.description=un),Sn},Et=function(un,Sn,vn){un===Dt&&Et(Ze,Sn,vn),te(un);var Cn=ie(Sn);return te(vn),fe(_e,Cn)?(vn.enumerable?(fe(un,ht)&&un[ht][Cn]&&(un[ht][Cn]=!1),vn=pe(vn,{enumerable:he(0,!1)})):(fe(un,ht)||Ne(un,ht,he(1,{})),un[ht][Cn]=!0),vt(un,Cn,vn)):Ne(un,Cn,vn)},Ft=function(un,Sn){te(un);var vn=se(Sn),Cn=xe(vn).concat(sn(vn));return Pt(Cn,function(On){(!Ae||Ee(Yt,vn,On))&&Et(un,On,vn[On])}),un},Kt=function(un,Sn){return Sn===void 0?pe(un):Ft(pe(un),Sn)},Yt=function(un){var Sn=ie(un),vn=Ee(nt,this,Sn);return this===Dt&&fe(_e,Sn)&&!fe(Ze,Sn)?!1:vn||!fe(this,Sn)||!fe(_e,Sn)||fe(this,ht)&&this[ht][Sn]?vn:!0},Vt=function(un,Sn){var vn=se(un),Cn=ie(Sn);if(!(vn===Dt&&fe(_e,Cn)&&!fe(Ze,Cn))){var On=we(vn,Cn);return On&&fe(_e,Cn)&&!(fe(vn,ht)&&vn[ht][Cn])&&(On.enumerable=!0),On}},Ht=function(un){var Sn=Ve(se(un)),vn=[];return Pt(Sn,function(Cn){!fe(_e,Cn)&&!fe(ot,Cn)&&Re(vn,Cn)}),vn},sn=function(rn){var un=rn===Dt,Sn=Ve(un?Ze:se(rn)),vn=[];return Pt(Sn,function(Cn){fe(_e,Cn)&&(!un||fe(Dt,Cn))&&Re(vn,_e[Cn])}),vn};me||(gt=function(){if(z(yt,this))throw tt("Symbol is not a constructor");var un=!arguments.length||arguments[0]===void 0?void 0:le(arguments[0]),Sn=lt(un),vn=function(Cn){this===Dt&&Ee(vn,Ze,Cn),fe(this,ht)&&fe(this[ht],Sn)&&(this[ht][Sn]=!1),vt(this,Sn,he(1,Cn))};return Ae&&ut&&vt(Dt,Sn,{configurable:!0,set:vn}),At(Sn,un)},yt=gt[mt],Ye(yt,"toString",function(){return dt(this).tag}),Ye(gt,"withoutSetter",function(rn){return At(lt(rn),rn)}),Ge.f=Yt,Me.f=Et,Be.f=Ft,Te.f=Vt,je.f=De.f=Ht,Fe.f=sn,Ct.f=function(rn){return At(ct(rn),rn)},Ae&&(Ne(yt,"description",{configurable:!0,get:function(){return dt(this).description}}),Se||Ye(Dt,"propertyIsEnumerable",Yt,{unsafe:!0}))),de({global:!0,wrap:!0,forced:!me,sham:!me},{Symbol:gt}),Pt(xe(qe),function(rn){Je(rn)}),de({target:St,stat:!0,forced:!me},{useSetter:function(){ut=!0},useSimple:function(){ut=!1}}),de({target:"Object",stat:!0,forced:!me,sham:!Ae},{create:Kt,defineProperty:Et,defineProperties:Ft,getOwnPropertyDescriptor:Vt}),de({target:"Object",stat:!0,forced:!me},{getOwnPropertyNames:Ht}),rt(),xt(gt,St),ot[ht]=!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"),Ae=oe("../internals/is-callable"),me=oe("../internals/object-is-prototype-of"),be=oe("../internals/to-string"),fe=oe("../internals/object-define-property").f,z=oe("../internals/copy-constructor-properties"),te=Ee.Symbol,se=te&&te.prototype;if(ve&&Ae(te)&&(!("description"in se)||te().description!==void 0)){var ie={},le=function(){var Me=arguments.length<1||arguments[0]===void 0?void 0:be(arguments[0]),Be=me(se,this)?new te(Me):Me===void 0?te():te(Me);return Me===""&&(ie[Be]=!0),Be};z(le,te),le.prototype=se,se.constructor=le;var he=String(te("test"))=="Symbol(test)",pe=ke(se.toString),xe=ke(se.valueOf),je=/^Symbol\((.*)\)[^)]+$/,De=ke("".replace),Fe=ke("".slice);fe(se,"description",{configurable:!0,get:function(){var Me=xe(this),Be=pe(Me);if(Se(ie,Me))return"";var Ge=he?Fe(Be,7,-1):De(Be,je,"$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"),Ae=oe("../internals/native-symbol-registry"),me=Se("string-to-symbol-registry"),be=Se("symbol-to-string-registry");de({target:"Symbol",stat:!0,forced:!Ae},{for:function(fe){var z=ke(fe);if(Ee(me,z))return me[z];var te=ve("Symbol")(z);return me[z]=te,be[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"),Ae=oe("../internals/native-symbol-registry"),me=Se("symbol-to-string-registry");de({target:"Symbol",stat:!0,forced:!Ae},{keyFor:function(fe){if(!Ee(fe))throw TypeError(ke(fe)+" is not a symbol");if(ve(me,fe))return me[fe]}})},{"../internals/export":149,"../internals/has-own-property":164,"../internals/is-symbol":183,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/try-to-string":257}],315:[function(oe,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,Ae=ve.exportTypedArrayMethod;Ae("copyWithin",function(be,fe){return ke(Se(this),be,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(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(oe,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 be=arguments.length;return ve(Ee,ke(this),me,be>1?arguments[1]:void 0,be>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 be=ve(ke(this),me,arguments.length>1?arguments[1]:void 0);return Ee(this,be)})},{"../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(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(oe,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(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(oe,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(Ae){ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(oe,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(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(oe,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(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(oe,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"),Ae=oe("../internals/well-known-symbol"),me=Ae("iterator"),be=de.Uint8Array,fe=Ee(Se.values),z=Ee(Se.keys),te=Ee(Se.entries),se=ke.aTypedArray,ie=ke.exportTypedArrayMethod,le=be&&be.prototype,he=!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))},he),ie("keys",function(){return z(se(this))},he),ie("values",xe,he||!pe,{name:"values"}),ie(me,xe,he||!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 be=arguments.length;return ve(Ee,ke(this),be>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(be,fe){return new(Ee(be))(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(Ae){var me=arguments.length;return ve(Ee(this),Ae,me,me>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(oe,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(Ae){var me=arguments.length;return ve(Ee(this),Ae,me,me>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(oe,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 Ae=this,me=ve(Ae).length,be=ke(me/2),fe=0,z;fe<be;)z=Ae[fe],Ae[fe++]=Ae[--me],Ae[me]=z;return Ae})},{"../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"),Ae=oe("../internals/to-object"),me=oe("../internals/fails"),be=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}),he=le&&Ee.NATIVE_ARRAY_BUFFER_VIEWS&&me(function(){var pe=new fe(2);return pe.set(1),pe.set("2",1),pe[0]!==0||pe[1]!==2});ie("set",function(xe){se(this);var je=Se(arguments.length>1?arguments[1]:void 0,1),De=Ae(xe);if(le)return ve(te,this,De,je);var Fe=this.length,Te=ke(De),Me=0;if(Te+je>Fe)throw be("Wrong length");for(;Me<Te;)this[je+Me]=De[Me++]},!le||he)},{"../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,Ae=de.exportTypedArrayMethod,me=Ee(function(){new Int8Array(1).slice()});Ae("slice",function(fe,z){for(var te=ke(Se(this),fe,z),se=ve(this),ie=0,le=te.length,he=new se(le);le>ie;)he[ie]=te[ie++];return he},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(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(oe,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"),Ae=oe("../internals/array-buffer-view-core"),me=oe("../internals/engine-ff-version"),be=oe("../internals/engine-is-ie-or-edge"),fe=oe("../internals/engine-v8-version"),z=oe("../internals/engine-webkit-version"),te=Ae.aTypedArray,se=Ae.exportTypedArrayMethod,ie=de.Uint16Array,le=ie&&ve(ie.prototype.sort),he=!!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(be)return!0;if(z)return z<602;var je=new ie(516),De=Array(516),Fe,Te;for(Fe=0;Fe<516;Fe++)Te=Fe%4,je[Fe]=515-Fe,De[Fe]=Fe-2*Te+3;for(le(je,function(Me,Be){return(Me/4|0)-(Be/4|0)}),Fe=0;Fe<516;Fe++)if(je[Fe]!==De[Fe])return!0}),xe=function(je){return function(De,Fe){return je!==void 0?+je(De,Fe)||0:Fe!==Fe?-1:De!==De?1:De===0&&Fe===0?1/De>0&&1/Fe<0?1:-1:De>Fe}};se("sort",function(De){return De!==void 0&&ke(De),pe?le(this,De):Se(te(this),xe(De))},!pe||he)},{"../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,Ae=de.exportTypedArrayMethod;Ae("subarray",function(be,fe){var z=Se(this),te=z.length,se=Ee(be,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"),Ae=de.Int8Array,me=Ee.aTypedArray,be=Ee.exportTypedArrayMethod,fe=[].toLocaleString,z=!!Ae&&ke(function(){fe.call(new Ae(1))}),te=ke(function(){return[1,2].toLocaleString()!=new Ae([1,2]).toLocaleString()})||!ke(function(){Ae.prototype.toLocaleString.call([1,2])});be("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,Ae=Se&&Se.prototype||{},me=[].toString,be=ke([].join);ve(function(){me.call({})})&&(me=function(){return be(this)});var fe=Ae.toString!=me;de("toString",me,fe)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(oe,Ue,Ie){var de=oe("../internals/typed-array-constructor");de("Uint8",function(ve){return function(ke,Se,Ae){return ve(this,ke,Se,Ae)}})},{"../internals/typed-array-constructor":258}],339:[function(oe,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"),Ae=function(be){if(be&&be.forEach!==ke)try{Se(be,"forEach",ke)}catch(fe){be.forEach=ke}};for(var me in ve)ve[me]&&Ae(de[me]&&de[me].prototype);Ae(Ee)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(oe,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"),Ae=oe("../internals/well-known-symbol"),me=Ae("iterator"),be=Ae("toStringTag"),fe=ke.values,z=function(se,ie){if(se){if(se[me]!==fe)try{Se(se,me,fe)}catch(he){se[me]=fe}if(se[be]||Se(se,be,ie),ve[ie]){for(var le in ke)if(se[le]!==ke[le])try{Se(se,le,ke[le])}catch(he){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):he(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 Ae(pe){return typeof pe=="string"}Ie.isString=Ae;function me(pe){return typeof pe=="symbol"}Ie.isSymbol=me;function be(pe){return pe===void 0}Ie.isUndefined=be;function fe(pe){return he(pe)==="[object RegExp]"}Ie.isRegExp=fe;function z(pe){return typeof pe=="object"&&pe!==null}Ie.isObject=z;function te(pe){return he(pe)==="[object Date]"}Ie.isDate=te;function se(pe){return he(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 he(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,be=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,fe=/[^-+\dA-Z]/g;return function(z,te,se,ie){if(arguments.length===1&&Ae(z)==="string"&&!/\d/.test(z)&&(te=z,z=void 0),z=z||new Date,z instanceof Date||(z=new Date(z)),isNaN(z))throw TypeError("Invalid date");te=String(ve.masks[te]||te||ve.masks.default);var le=te.slice(0,4);(le==="UTC:"||le==="GMT:")&&(te=te.slice(4),se=!0,le==="GMT:"&&(ie=!0));var he=se?"getUTC":"get",pe=z[he+"Date"](),xe=z[he+"Day"](),je=z[he+"Month"](),De=z[he+"FullYear"](),Fe=z[he+"Hours"](),Te=z[he+"Minutes"](),Me=z[he+"Seconds"](),Be=z[he+"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:je+1,mm:Ee(je+1),mmm:ve.i18n.monthNames[je],mmmm:ve.i18n.monthNames[je+12],yy:String(De).slice(2),yyyy:De,h:Fe%12||12,hh:Ee(Fe%12||12),H:Fe,HH:Ee(Fe),M:Te,MM:Ee(Te),s:Me,ss:Ee(Me),l:Ee(Be,3),L:Ee(Math.round(Be/10)),t:Fe<12?"a":"p",tt:Fe<12?"am":"pm",T:Fe<12?"A":"P",TT:Fe<12?"AM":"PM",Z:ie?"GMT":se?"UTC":(String(z).match(be)||[""]).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,be){for(me=String(me),be=be||2;me.length<be;)me="0"+me;return me}function ke(me){var be=new Date(me.getFullYear(),me.getMonth(),me.getDate());be.setDate(be.getDate()-(be.getDay()+6)%7+3);var fe=new Date(be.getFullYear(),0,4);fe.setDate(fe.getDate()-(fe.getDay()+6)%7+3);var z=be.getTimezoneOffset()-fe.getTimezoneOffset();be.setHours(be.getHours()-z);var te=(be-fe)/(864e5*7);return 1+Math.floor(te)}function Se(me){var be=me.getDay();return be===0&&(be=7),be}function Ae(me){return me===null?"null":me===void 0?"undefined":typeof me!="object"?typeof me:Array.isArray(me)?"array":{}.toString.call(me).slice(8,-1).toLowerCase()}typeof 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 Ae,me="",be=0,fe=0;for(be=Se.index;be<ke.length;be++){switch(ke.charCodeAt(be)){case 34:Ae=""";break;case 38:Ae="&";break;case 39:Ae="'";break;case 60:Ae="<";break;case 62:Ae=">";break;default:continue}fe!==be&&(me+=ke.substring(fe,be)),fe=be+1,me+=Ae}return fe!==be?me+ke.substring(fe,be):me}},{}],344:[function(oe,Ue,Ie){"use strict";var de=typeof Reflect=="object"?Reflect:null,ve=de&&typeof de.apply=="function"?de.apply:function(Me,Be,Ge){return Function.prototype.apply.call(Me,Be,Ge)},Ee;de&&typeof de.ownKeys=="function"?Ee=de.ownKeys:Object.getOwnPropertySymbols?Ee=function(Me){return Object.getOwnPropertyNames(Me).concat(Object.getOwnPropertySymbols(Me))}:Ee=function(Me){return Object.getOwnPropertyNames(Me)};function ke(Te){console&&console.warn&&console.warn(Te)}var Se=Number.isNaN||function(Me){return Me!==Me};function Ae(){Ae.init.call(this)}Ue.exports=Ae,Ue.exports.once=je,Ae.EventEmitter=Ae,Ae.prototype._events=void 0,Ae.prototype._eventsCount=0,Ae.prototype._maxListeners=void 0;var me=10;function be(Te){if(typeof Te!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Te)}Object.defineProperty(Ae,"defaultMaxListeners",{enumerable:!0,get:function(){return me},set:function(Te){if(typeof Te!="number"||Te<0||Se(Te))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+Te+".");me=Te}}),Ae.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ae.prototype.setMaxListeners=function(Me){if(typeof Me!="number"||Me<0||Se(Me))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Me+".");return this._maxListeners=Me,this};function fe(Te){return Te._maxListeners===void 0?Ae.defaultMaxListeners:Te._maxListeners}Ae.prototype.getMaxListeners=function(){return fe(this)},Ae.prototype.emit=function(Me){for(var Be=[],Ge=1;Ge<arguments.length;Ge++)Be.push(arguments[Ge]);var Ye=Me==="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[Me];if(lt===void 0)return!1;if(typeof lt=="function")ve(lt,this,Be);else for(var ct=lt.length,Ct=he(lt,ct),Ge=0;Ge<ct;++Ge)ve(Ct[Ge],this,Be);return!0};function z(Te,Me,Be,Ge){var Ye,Ke,Xe;if(be(Be),Ke=Te._events,Ke===void 0?(Ke=Te._events=Object.create(null),Te._eventsCount=0):(Ke.newListener!==void 0&&(Te.emit("newListener",Me,Be.listener?Be.listener:Be),Ke=Te._events),Xe=Ke[Me]),Xe===void 0)Xe=Ke[Me]=Be,++Te._eventsCount;else if(typeof Xe=="function"?Xe=Ke[Me]=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(Me)+" listeners added. Use emitter.setMaxListeners() to increase limit");ot.name="MaxListenersExceededWarning",ot.emitter=Te,ot.type=Me,ot.count=Xe.length,ke(ot)}return Te}Ae.prototype.addListener=function(Me,Be){return z(this,Me,Be,!1)},Ae.prototype.on=Ae.prototype.addListener,Ae.prototype.prependListener=function(Me,Be){return z(this,Me,Be,!0)};function te(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function se(Te,Me,Be){var Ge={fired:!1,wrapFn:void 0,target:Te,type:Me,listener:Be},Ye=te.bind(Ge);return Ye.listener=Be,Ge.wrapFn=Ye,Ye}Ae.prototype.once=function(Me,Be){return be(Be),this.on(Me,se(this,Me,Be)),this},Ae.prototype.prependOnceListener=function(Me,Be){return be(Be),this.prependListener(Me,se(this,Me,Be)),this},Ae.prototype.removeListener=function(Me,Be){var Ge,Ye,Ke,Xe,ot;if(be(Be),Ye=this._events,Ye===void 0)return this;if(Ge=Ye[Me],Ge===void 0)return this;if(Ge===Be||Ge.listener===Be)--this._eventsCount===0?this._events=Object.create(null):(delete Ye[Me],Ye.removeListener&&this.emit("removeListener",Me,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[Me]=Ge[0]),Ye.removeListener!==void 0&&this.emit("removeListener",Me,ot||Be)}return this},Ae.prototype.off=Ae.prototype.removeListener,Ae.prototype.removeAllListeners=function(Me){var Be,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[Me]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Ge[Me]),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[Me],typeof Be=="function")this.removeListener(Me,Be);else if(Be!==void 0)for(Ye=Be.length-1;Ye>=0;Ye--)this.removeListener(Me,Be[Ye]);return this};function ie(Te,Me,Be){var Ge=Te._events;if(Ge===void 0)return[];var Ye=Ge[Me];return Ye===void 0?[]:typeof Ye=="function"?Be?[Ye.listener||Ye]:[Ye]:Be?xe(Ye):he(Ye,Ye.length)}Ae.prototype.listeners=function(Me){return ie(this,Me,!0)},Ae.prototype.rawListeners=function(Me){return ie(this,Me,!1)},Ae.listenerCount=function(Te,Me){return typeof Te.listenerCount=="function"?Te.listenerCount(Me):le.call(Te,Me)},Ae.prototype.listenerCount=le;function le(Te){var Me=this._events;if(Me!==void 0){var Be=Me[Te];if(typeof Be=="function")return 1;if(Be!==void 0)return Be.length}return 0}Ae.prototype.eventNames=function(){return this._eventsCount>0?Ee(this._events):[]};function he(Te,Me){for(var Be=new Array(Me),Ge=0;Ge<Me;++Ge)Be[Ge]=Te[Ge];return Be}function pe(Te,Me){for(;Me+1<Te.length;Me++)Te[Me]=Te[Me+1];Te.pop()}function xe(Te){for(var Me=new Array(Te.length),Be=0;Be<Me.length;++Be)Me[Be]=Te[Be].listener||Te[Be];return Me}function je(Te,Me){return new Promise(function(Be,Ge){function Ye(Xe){Te.removeListener(Me,Ke),Ge(Xe)}function Ke(){typeof Te.removeListener=="function"&&Te.removeListener("error",Ye),Be([].slice.call(arguments))}Fe(Te,Me,Ke,{once:!0}),Me!=="error"&&De(Te,Ye,{once:!0})})}function De(Te,Me,Be){typeof Te.on=="function"&&Fe(Te,"error",Me,Be)}function Fe(Te,Me,Be,Ge){if(typeof Te.on=="function")Ge.once?Te.once(Me,Be):Te.on(Me,Be);else if(typeof Te.addEventListener=="function")Te.addEventListener(Me,function Ye(Ke){Ge.once&&Te.removeEventListener(Me,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)},Ae=function(fe,z,te){for(var se in fe)Ee.call(fe,se)&&(te==null?z(fe[se],se,fe):z.call(te,fe[se],se,fe))},me=function(fe,z,te){if(!de(z))throw new TypeError("iterator must be a function");var se;arguments.length>=3&&(se=te),ve.call(fe)==="[object Array]"?ke(fe,z,se):typeof fe=="string"?Se(fe,z,se):Ae(fe,z,se)};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(Ae){var me=this;if(typeof me!="function"||Ee.call(me)!==ke)throw new TypeError(de+me);for(var be=ve.call(arguments,1),fe,z=function(){if(this instanceof fe){var he=me.apply(this,be.concat(ve.call(arguments)));return Object(he)===he?he:this}else return me.apply(Ae,be.concat(ve.call(arguments)))},te=Math.max(0,me.length-be.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(ct){}},Ae=Object.getOwnPropertyDescriptor;if(Ae)try{Ae({},"")}catch(lt){Ae=null}var me=function(){throw new ke},be=Ae?function(){try{return arguments.callee,me}catch(lt){try{return Ae(arguments,"callee").get}catch(ct){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%":be,"%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 he=te(te(lt));le["%Error.prototype%"]=he}var pe=function lt(ct){var Ct;if(ct==="%AsyncFunction%")Ct=Se("async function () {}");else if(ct==="%GeneratorFunction%")Ct=Se("function* () {}");else if(ct==="%AsyncGeneratorFunction%")Ct=Se("async function* () {}");else if(ct==="%AsyncGenerator%"){var Je=lt("%AsyncGeneratorFunction%");Je&&(Ct=Je.prototype)}else if(ct==="%AsyncIteratorPrototype%"){var rt=lt("%AsyncGenerator%");rt&&te&&(Ct=te(rt.prototype))}return le[ct]=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"]},je=oe("function-bind"),De=oe("has"),Fe=je.call(Function.call,Array.prototype.concat),Te=je.call(Function.apply,Array.prototype.splice),Me=je.call(Function.call,String.prototype.replace),Be=je.call(Function.call,String.prototype.slice),Ge=je.call(Function.call,RegExp.prototype.exec),Ye=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ke=/\\(\\)?/g,Xe=function(ct){var Ct=Be(ct,0,1),Je=Be(ct,-1);if(Ct==="%"&&Je!=="%")throw new ve("invalid intrinsic syntax, expected closing `%`");if(Je==="%"&&Ct!=="%")throw new ve("invalid intrinsic syntax, expected opening `%`");var rt=[];return Me(ct,Ye,function(xt,bt,Pt,ht){rt[rt.length]=Pt?Me(ht,Ke,"$1"):bt||xt}),rt},ot=function(ct,Ct){var Je=ct,rt;if(De(xe,Je)&&(rt=xe[Je],Je="%"+rt[0]+"%"),De(le,Je)){var xt=le[Je];if(xt===se&&(xt=pe(Je)),typeof xt=="undefined"&&!Ct)throw new ke("intrinsic "+ct+" exists, but is not available. Please file an issue!");return{alias:rt,name:Je,value:xt}}throw new ve("intrinsic "+ct+" does not exist!")};Ue.exports=function(ct,Ct){if(typeof ct!="string"||ct.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(/^%?[^%]*%?$/,ct)===null)throw new ve("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Je=Xe(ct),rt=Je.length>0?Je[0]:"",xt=ot("%"+rt+"%",Ct),bt=xt.name,Pt=xt.value,ht=!1,St=xt.alias;St&&(rt=St[0],Te(Je,Fe([0,1],St)));for(var mt=1,Nt=!0;mt<Je.length;mt+=1){var dt=Je[mt],Dt=Be(dt,0,1),gt=Be(dt,-1);if((Dt==='"'||Dt==="'"||Dt==="`"||gt==='"'||gt==="'"||gt==="`")&&Dt!==gt)throw new ve("property names with quotes must have matching quotes");if((dt==="constructor"||!Nt)&&(ht=!0),rt+="."+dt,bt="%"+rt+"%",De(le,bt))Pt=le[bt];else if(Pt!=null){if(!(dt in Pt)){if(!Ct)throw new ke("base intrinsic for "+ct+" exists, but the property is not available.");return}if(Ae&&mt+1>=Je.length){var yt=Ae(Pt,dt);Nt=!!yt,Nt&&"get"in yt&&!("originalValue"in yt.get)?Pt=yt.get:Pt=Pt[dt]}else Nt=De(Pt,dt),Pt=Pt[dt];Nt&&!ht&&(le[bt]=Pt)}}return Pt}},{"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 Ae=Object.getOwnPropertySymbols(ve);if(Ae.length!==1||Ae[0]!==Ee||!Object.prototype.propertyIsEnumerable.call(ve,Ee))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var me=Object.getOwnPropertyDescriptor(ve,Ee);if(me.value!==Se||me.enumerable!==!0)return!1}return!0}},{}],353:[function(oe,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(Ae,me){return Ae=Se(Ae),de.request.call(this,Ae,me)},Ee.get=function(Ae,me){return Ae=Se(Ae),de.get.call(this,Ae,me)};function Se(Ae){if(typeof Ae=="string"&&(Ae=ve.parse(Ae)),Ae.protocol||(Ae.protocol="https:"),Ae.protocol!=="https:")throw new Error('Protocol "'+Ae.protocol+'" not supported. Expected "https:"');return Ae}},{http:468,url:472}],356:[function(oe,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 Ae,me,be=Se*8-ke-1,fe=(1<<be)-1,z=fe>>1,te=-7,se=Ee?Se-1:0,ie=Ee?-1:1,le=de[ve+se];for(se+=ie,Ae=le&(1<<-te)-1,le>>=-te,te+=be;te>0;Ae=Ae*256+de[ve+se],se+=ie,te-=8);for(me=Ae&(1<<-te)-1,Ae>>=-te,te+=ke;te>0;me=me*256+de[ve+se],se+=ie,te-=8);if(Ae===0)Ae=1-z;else{if(Ae===fe)return me?NaN:(le?-1:1)*(1/0);me=me+Math.pow(2,ke),Ae=Ae-z}return(le?-1:1)*me*Math.pow(2,Ae-ke)},Ie.write=function(de,ve,Ee,ke,Se,Ae){var me,be,fe,z=Ae*8-Se-1,te=(1<<z)-1,se=te>>1,ie=Se===23?Math.pow(2,-24)-Math.pow(2,-77):0,le=ke?0:Ae-1,he=ke?1:-1,pe=ve<0||ve===0&&1/ve<0?1:0;for(ve=Math.abs(ve),isNaN(ve)||ve===1/0?(be=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?(be=0,me=te):me+se>=1?(be=(ve*fe-1)*Math.pow(2,Se),me=me+se):(be=ve*Math.pow(2,se-1)*Math.pow(2,Se),me=0));Se>=8;de[Ee+le]=be&255,le+=he,be/=256,Se-=8);for(me=me<<Se|be,z+=Se;z>0;de[Ee+le]=me&255,le+=he,me/=256,z-=8);de[Ee+le-he]|=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=[],Ae=!1;function me(){!ve||!Ee||(ve=!1,Ee.length?Se=Ee.concat(Se):ke=-1,Se.length&&be())}function be(){if(!ve){Ae=!1,ve=!0;for(var le=Se.length,he=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(he)}}for(var fe,z=-1,te=de.length;++z<te;)if(de[z]&&de[z].test&&de[z].test()){fe=de[z].install(be);break}function se(le,he){this.fun=le,this.array=he}se.prototype.run=function(){var le=this.fun,he=this.array;switch(he.length){case 0:return le();case 1:return le(he[0]);case 2:return le(he[0],he[1]);case 3:return le(he[0],he[1],he[2]);default:return le.apply(null,he)}},Ue.exports=ie;function ie(le){var he=new Array(arguments.length-1);if(arguments.length>1)for(var pe=1;pe<arguments.length;pe++)he[pe-1]=arguments[pe];Se.push(new se(le,he)),!Ae&&!ve&&(Ae=!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 Mn!="undefined"?Mn: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),Ae=de.document.createTextNode("");return Se.observe(Ae,{characterData:!0}),function(){Ae.data=ke=++ke%2}}}).call(this)}).call(this,typeof Mn!="undefined"?Mn: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 Mn!="undefined"?Mn: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 Mn!="undefined"?Mn: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(be){return de&&be&&typeof be=="object"&&Symbol.toStringTag in be?!1:Ee(be)==="[object Arguments]"},Se=function(be){return ke(be)?!0:be!==null&&typeof be=="object"&&typeof be.length=="number"&&be.length>=0&&Ee(be)!=="[object Array]"&&Ee(be.callee)==="[object Function]"},Ae=function(){return ke(arguments)}();ke.isLegacyArguments=Se,Ue.exports=Ae?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/,Ae=function(Fe){try{var Te=de.call(Fe);return Se.test(Te)}catch(Me){return!1}},me=function(Fe){try{return Ae(Fe)?!1:(de.call(Fe),!0)}catch(Te){return!1}},be=Object.prototype.toString,fe="[object Object]",z="[object Function]",te="[object GeneratorFunction]",se="[object HTMLAllCollection]",ie="[object HTML document.all class]",le="[object HTMLCollection]",he=typeof Symbol=="function"&&!!Symbol.toStringTag,pe=!(0 in[,]),xe=function(){return!1};if(typeof document=="object"){var je=document.all;be.call(je)===be.call(document.all)&&(xe=function(Fe){if((pe||!Fe)&&(typeof Fe=="undefined"||typeof Fe=="object"))try{var Te=be.call(Fe);return(Te===se||Te===ie||Te===le||Te===fe)&&Fe("")==null}catch(Me){}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!Ae(Fe)&&me(Fe)}:function(Fe){if(xe(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;if(he)return me(Fe);if(Ae(Fe))return!1;var Te=be.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,Ae=function(){if(!ke)return!1;try{return Function("return function*() {}")()}catch(be){}},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=Ae();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+/",Ae=function(ct){for(var Ct={},Je=0,rt=ct.length;Je<rt;Je++)Ct[ct.charAt(Je)]=Je;return Ct}(Se),me=String.fromCharCode,be=function(ct){if(ct.length<2){var Ct=ct.charCodeAt(0);return Ct<128?ct: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+(ct.charCodeAt(0)-55296)*1024+(ct.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(ct){return ct.replace(fe,be)},te=function(ct){var Ct=[0,2,1][ct.length%3],Je=ct.charCodeAt(0)<<16|(ct.length>1?ct.charCodeAt(1):0)<<8|(ct.length>2?ct.charCodeAt(2):0),rt=[Se.charAt(Je>>>18),Se.charAt(Je>>>12&63),Ct>=2?"=":Se.charAt(Je>>>6&63),Ct>=1?"=":Se.charAt(Je&63)];return rt.join("")},se=ve.btoa&&typeof ve.btoa=="function"?function(ct){return ve.btoa(ct)}:function(ct){if(ct.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ct.replace(/[\s\S]{1,3}/g,te)},ie=function(ct){return se(z(String(ct)))},le=function(ct){return ct.replace(/[+\/]/g,function(Ct){return Ct=="+"?"-":"_"}).replace(/=/g,"")},he=function(ct,Ct){return Ct?le(ie(ct)):ie(ct)},pe=function(ct){return he(ct,!0)},xe;ve.Uint8Array&&(xe=function(ct,Ct){for(var Je="",rt=0,xt=ct.length;rt<xt;rt+=3){var bt=ct[rt],Pt=ct[rt+1],ht=ct[rt+2],St=bt<<16|Pt<<8|ht;Je+=Se.charAt(St>>>18)+Se.charAt(St>>>12&63)+(typeof Pt!="undefined"?Se.charAt(St>>>6&63):"=")+(typeof ht!="undefined"?Se.charAt(St&63):"=")}return Ct?le(Je):Je});var je=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,De=function(ct){switch(ct.length){case 4:var Ct=(7&ct.charCodeAt(0))<<18|(63&ct.charCodeAt(1))<<12|(63&ct.charCodeAt(2))<<6|63&ct.charCodeAt(3),Je=Ct-65536;return me((Je>>>10)+55296)+me((Je&1023)+56320);case 3:return me((15&ct.charCodeAt(0))<<12|(63&ct.charCodeAt(1))<<6|63&ct.charCodeAt(2));default:return me((31&ct.charCodeAt(0))<<6|63&ct.charCodeAt(1))}},Fe=function(ct){return ct.replace(je,De)},Te=function(ct){var Ct=ct.length,Je=Ct%4,rt=(Ct>0?Ae[ct.charAt(0)]<<18:0)|(Ct>1?Ae[ct.charAt(1)]<<12:0)|(Ct>2?Ae[ct.charAt(2)]<<6:0)|(Ct>3?Ae[ct.charAt(3)]:0),xt=[me(rt>>>16),me(rt>>>8&255),me(rt&255)];return xt.length-=[0,0,2,1][Je],xt.join("")},Me=ve.atob&&typeof ve.atob=="function"?function(ct){return ve.atob(ct)}:function(ct){return ct.replace(/\S{1,4}/g,Te)},Be=function(ct){return Me(String(ct).replace(/[^A-Za-z0-9\+\/]/g,""))},Ge=function(ct){return Fe(Me(ct))},Ye=function(ct){return String(ct).replace(/[-_]/g,function(Ct){return Ct=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ke=function(ct){return Ge(Ye(ct))},Xe;ve.Uint8Array&&(Xe=function(ct){return Uint8Array.from(Be(Ye(ct)),function(Ct){return Ct.charCodeAt(0)})});var ot=function(){var ct=ve.Base64;return ve.Base64=Ee,ct};if(ve.Base64={VERSION:ke,atob:Be,btoa:se,fromBase64:Ke,toBase64:he,utob:z,encode:he,encodeURI:pe,btou:Fe,decode:Ke,noConflict:ot,fromUint8Array:xe,toUint8Array:Xe},typeof Object.defineProperty=="function"){var lt=function(ct){return{value:ct,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(ct){return he(this,ct)})),Object.defineProperty(String.prototype,"toBase64URI",lt(function(){return he(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 Mn!="undefined"?Mn: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 be=Object.getOwnPropertyDescriptor(ke,me);Object.defineProperty(Ee,me,be)}}),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 Ae=0;Ae<Se.length;Ae++){var me=Se[Ae];if(me[0]!=="*"){if(!Ee&&me in this._types)throw new Error('Attempt to change mapping for "'+me+'" extension from "'+this._types[me]+'" to "'+ke+'". Pass `force=true` to allow this, otherwise remove "'+me+'" from the list of extensions for "'+ke+'".');this._types[me]=ke}}if(Ee||!this._extensions[ke]){var be=Se[0];this._extensions[ke]=be[0]!=="*"?be:be.substr(1)}}},de.prototype.getType=function(ve){ve=String(ve);var Ee=ve.replace(/^.*[/\\]/,"").toLowerCase(),ke=Ee.replace(/^.*\./,"").toLowerCase(),Se=Ee.length<ve.length,Ae=ke.length<Ee.length-1;return(Ae||!Se)&&this._types[ke]||null},de.prototype.getExtension=function(ve){return ve=/^\s*([^;\s]*)/.test(ve)&&RegExp.$1,ve&&this._extensions[ve.toLowerCase()]||null},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,Ae=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):be(te);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(te))};function me(te){if(te=String(te),!(te.length>100)){var se=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(te);if(se){var ie=parseFloat(se[1]),le=(se[2]||"ms").toLowerCase();switch(le){case"years":case"year":case"yrs":case"yr":case"y":return ie*Ae;case"weeks":case"week":case"w":return ie*Se;case"days":case"day":case"d":return ie*ke;case"hours":case"hour":case"hrs":case"hr":case"h":return ie*Ee;case"minutes":case"minute":case"mins":case"min":case"m":return ie*ve;case"seconds":case"second":case"secs":case"sec":case"s":return ie*de;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return ie;default:return}}}}function be(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 he=se>=ie*1.5;return Math.round(te/ie)+" "+le+(he?"s":"")}},{}],377:[function(oe,Ue,Ie){"use strict";var de=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;function ke(Ae){if(Ae==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Ae)}function Se(){try{if(!Object.assign)return!1;var Ae=new String("abc");if(Ae[5]="de",Object.getOwnPropertyNames(Ae)[0]==="5")return!1;for(var me={},be=0;be<10;be++)me["_"+String.fromCharCode(be)]=be;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(Ae,me){for(var be,fe=ke(Ae),z,te=1;te<arguments.length;te++){be=Object(arguments[te]);for(var se in be)ve.call(be,se)&&(fe[se]=be[se]);if(de){z=de(be);for(var ie=0;ie<z.length;ie++)Ee.call(be,z[ie])&&(fe[z[ie]]=be[z[ie]])}}return fe}},{}],378:[function(oe,Ue,Ie){(function(de){(function(){"use strict";function ve(Ae){if(typeof Ae!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(Ae))}function Ee(Ae,me){for(var be="",fe=0,z=-1,te=0,se,ie=0;ie<=Ae.length;++ie){if(ie<Ae.length)se=Ae.charCodeAt(ie);else{if(se===47)break;se=47}if(se===47){if(!(z===ie-1||te===1))if(z!==ie-1&&te===2){if(be.length<2||fe!==2||be.charCodeAt(be.length-1)!==46||be.charCodeAt(be.length-2)!==46){if(be.length>2){var le=be.lastIndexOf("/");if(le!==be.length-1){le===-1?(be="",fe=0):(be=be.slice(0,le),fe=be.length-1-be.lastIndexOf("/")),z=ie,te=0;continue}}else if(be.length===2||be.length===1){be="",fe=0,z=ie,te=0;continue}}me&&(be.length>0?be+="/..":be="..",fe=2)}else be.length>0?be+="/"+Ae.slice(z+1,ie):be=Ae.slice(z+1,ie),fe=ie-z-1;z=ie,te=0}else se===46&&te!==-1?++te:te=-1}return be}function ke(Ae,me){var be=me.dir||me.root,fe=me.base||(me.name||"")+(me.ext||"");return be?be===me.root?be+fe:be+Ae+fe:fe}var Se={resolve:function(){for(var me="",be=!1,fe,z=arguments.length-1;z>=-1&&!be;z--){var te;z>=0?te=arguments[z]:(fe===void 0&&(fe=de.cwd()),te=fe),ve(te),te.length!==0&&(me=te+"/"+me,be=te.charCodeAt(0)===47)}return me=Ee(me,!be),be?me.length>0?"/"+me:"/":me.length>0?me:"."},normalize:function(me){if(ve(me),me.length===0)return".";var be=me.charCodeAt(0)===47,fe=me.charCodeAt(me.length-1)===47;return me=Ee(me,!be),me.length===0&&!be&&(me="."),me.length>0&&fe&&(me+="/"),be?"/"+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,be=0;be<arguments.length;++be){var fe=arguments[be];ve(fe),fe.length>0&&(me===void 0?me=fe:me+="/"+fe)}return me===void 0?".":Se.normalize(me)},relative:function(me,be){if(ve(me),ve(be),me===be||(me=Se.resolve(me),be=Se.resolve(be),me===be))return"";for(var fe=1;fe<me.length&&me.charCodeAt(fe)===47;++fe);for(var z=me.length,te=z-fe,se=1;se<be.length&&be.charCodeAt(se)===47;++se);for(var ie=be.length,le=ie-se,he=te<le?te:le,pe=-1,xe=0;xe<=he;++xe){if(xe===he){if(le>he){if(be.charCodeAt(se+xe)===47)return be.slice(se+xe+1);if(xe===0)return be.slice(se+xe)}else te>he&&(me.charCodeAt(fe+xe)===47?pe=xe:xe===0&&(pe=0));break}var je=me.charCodeAt(fe+xe),De=be.charCodeAt(se+xe);if(je!==De)break;je===47&&(pe=xe)}var Fe="";for(xe=fe+pe+1;xe<=z;++xe)(xe===z||me.charCodeAt(xe)===47)&&(Fe.length===0?Fe+="..":Fe+="/..");return Fe.length>0?Fe+be.slice(se+pe):(se+=pe,be.charCodeAt(se)===47&&++se,be.slice(se))},_makeLong:function(me){return me},dirname:function(me){if(ve(me),me.length===0)return".";for(var be=me.charCodeAt(0),fe=be===47,z=-1,te=!0,se=me.length-1;se>=1;--se)if(be=me.charCodeAt(se),be===47){if(!te){z=se;break}}else te=!1;return z===-1?fe?"/":".":fe&&z===1?"//":me.slice(0,z)},basename:function(me,be){if(be!==void 0&&typeof be!="string")throw new TypeError('"ext" argument must be a string');ve(me);var fe=0,z=-1,te=!0,se;if(be!==void 0&&be.length>0&&be.length<=me.length){if(be.length===me.length&&be===me)return"";var ie=be.length-1,le=-1;for(se=me.length-1;se>=0;--se){var he=me.charCodeAt(se);if(he===47){if(!te){fe=se+1;break}}else le===-1&&(te=!1,le=se+1),ie>=0&&(he===be.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 be=-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?be===-1?be=ie:se!==1&&(se=1):be!==-1&&(se=-1)}return be===-1||z===-1||se===0||se===1&&be===z-1&&be===fe+1?"":me.slice(be,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 be={root:"",dir:"",base:"",ext:"",name:""};if(me.length===0)return be;var fe=me.charCodeAt(0),z=fe===47,te;z?(be.root="/",te=1):te=0;for(var se=-1,ie=0,le=-1,he=!0,pe=me.length-1,xe=0;pe>=te;--pe){if(fe=me.charCodeAt(pe),fe===47){if(!he){ie=pe+1;break}continue}le===-1&&(he=!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?be.base=be.name=me.slice(1,le):be.base=be.name=me.slice(ie,le)):(ie===0&&z?(be.name=me.slice(1,se),be.base=me.slice(1,le)):(be.name=me.slice(ie,se),be.base=me.slice(ie,le)),be.ext=me.slice(se,le)),ie>0?be.dir=me.slice(0,ie-1):z&&(be.dir="/"),be},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,Ae=ve[typeof Ue]&&Ue&&!Ue.nodeType&&Ue,me=Se&&Ae&&typeof de=="object"&&de;me&&(me.global===me||me.window===me||me.self===me)&&(Ee=me);var be=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 he(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"&<>-1&<<=be)for(;++ot<lt;)Xe(Ke[ot],ot,Ke);else je(Ke,Xe)}function xe(Ke){return Ke=Be(Ke),/^(?:webOS|i(?:OS|P))/.test(Ke)?Ke:le(Ke)}function je(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 Me(Ke,Xe){var ot=null;return pe(Ke,function(lt,ct){ot=Xe(ot,lt,ct,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||{},ct=lt.userAgent||"";Ke||(Ke=ct);var Ct=ot||z==ke,Je=ot?!!lt.likeChrome:/\bChrome\b/.test(Ke)&&!/internal|\n/i.test(ie.toString()),rt="Object",xt=ot?rt:"ScriptBridgingProxyObject",bt=ot?rt:"Environment",Pt=ot&&Xe.java?"JavaPackage":De(Xe.java),ht=ot?rt:"RuntimeObject",St=/\bJava/.test(Pt)&&Xe.java,mt=St&&De(Xe.environment)==bt,Nt=St?"a":"\u03B1",dt=St?"b":"\u03B2",Dt=Xe.document||{},gt=Xe.operamini||Xe.opera,yt=fe.test(yt=ot&>?gt["[[Class]]"]:De(gt))?yt:gt=null,tt,He=Ke,we=[],Ne=null,Ve=Ke==ct,nt=Ve&>&&typeof gt.version=="function"&>.version(),Re,_e=At([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Ze=Ft(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),qe=Yt([{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"]),ut=Et({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),vt=Kt(["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 At(rn){return Me(rn,function(un,Sn){return un||RegExp("\\b"+(Sn.pattern||Te(Sn))+"\\b","i").exec(Ke)&&(Sn.label||Sn)})}function Et(rn){return Me(rn,function(un,Sn,vn){return un||(Sn[qe]||Sn[/^[a-z]+(?: +[a-z]+\b)*/i.exec(qe)]||RegExp("\\b"+Te(vn)+"(?:\\b|\\w*\\d)","i").exec(Ke))&&vn})}function Ft(rn){return Me(rn,function(un,Sn){return un||RegExp("\\b"+(Sn.pattern||Te(Sn))+"\\b","i").exec(Ke)&&(Sn.label||Sn)})}function Kt(rn){return Me(rn,function(un,Sn){var vn=Sn.pattern||Te(Sn);return!un&&(un=RegExp("\\b"+vn+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Ke))&&(un=he(un,vn,Sn.label||Sn)),un})}function Yt(rn){return Me(rn,function(un,Sn){var vn=Sn.pattern||Te(Sn);return!un&&(un=RegExp("\\b"+vn+" *\\d+[.\\w_]*","i").exec(Ke)||RegExp("\\b"+vn+" *\\w+-[\\w]*","i").exec(Ke)||RegExp("\\b"+vn+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Ke))&&((un=String(Sn.label&&!RegExp(vn,"i").test(Sn.label)?Sn.label:un).split("/"))[1]&&!/[\d.]+/.test(un[0])&&(un[0]+=" "+un[1]),Sn=Sn.label||Sn,un=xe(un[0].replace(RegExp(vn,"i"),Sn).replace(RegExp("; *(?:"+Sn+"[_-])?","i")," ").replace(RegExp("("+Sn+")[-_.]?(\\w)","i"),"$1 $2"))),un})}function Vt(rn){return Me(rn,function(un,Sn){return un||(RegExp(Sn+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Ke)||0)[1]||null})}function Ht(){return this.description||""}if(_e&&(_e=[_e]),/\bAndroid\b/.test(vt)&&!qe&&(tt=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(Ke))&&(qe=Be(tt[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),ut&&!qe?qe=Yt([ut]):ut&&qe&&(qe=qe.replace(RegExp("^("+Te(ut)+")[-_.\\s]","i"),ut+" ").replace(RegExp("^("+Te(ut)+")[-_.]?(\\w)","i"),ut+" $2")),(tt=/\bGoogle TV\b/.exec(qe))&&(qe=tt[0]),/\bSimulator\b/i.test(Ke)&&(qe=(qe?qe+" ":"")+"Simulator"),Ze=="Opera Mini"&&/\bOPiOS\b/.test(Ke)&&we.push("running in Turbo/Uncompressed mode"),Ze=="IE"&&/\blike iPhone OS\b/.test(Ke)?(tt=Ge(Ke.replace(/like iPhone OS/,"")),ut=tt.manufacturer,qe=tt.product):/^iP/.test(qe)?(Ze||(Ze="Safari"),vt="iOS"+((tt=/ OS ([\d_]+)/i.exec(Ke))?" "+tt[1].replace(/_/g,"."):"")):Ze=="Konqueror"&&/^Linux\b/i.test(vt)?vt="Kubuntu":ut&&ut!="Google"&&(/Chrome/.test(Ze)&&!/\bMobile Safari\b/i.test(Ke)||/\bVita\b/.test(qe))||/\bAndroid\b/.test(vt)&&/^Chrome/.test(Ze)&&/\bVersion\//i.test(Ke)?(Ze="Android Browser",vt=/\bAndroid\b/.test(vt)?vt:"Android"):Ze=="Silk"?(/\bMobi/i.test(Ke)||(vt="Android",we.unshift("desktop mode")),/Accelerated *= *true/i.test(Ke)&&we.unshift("accelerated")):Ze=="UC Browser"&&/\bUCWEB\b/.test(Ke)?we.push("speed mode"):Ze=="PaleMoon"&&(tt=/\bFirefox\/([\d.]+)\b/.exec(Ke))?we.push("identifying as Firefox "+tt[1]):Ze=="Firefox"&&(tt=/\b(Mobile|Tablet|TV)\b/i.exec(Ke))?(vt||(vt="Firefox OS"),qe||(qe=tt[1])):!Ze||(tt=!/\bMinefield\b/i.test(Ke)&&/\b(?:Firefox|Safari)\b/.exec(Ze))?(Ze&&!qe&&/[\/,]|^[^(]+?\)/.test(Ke.slice(Ke.indexOf(tt+"/")+8))&&(Ze=null),(tt=qe||ut||vt)&&(qe||ut||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(vt))&&(Ze=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(vt)?vt:tt)+" Browser")):Ze=="Electron"&&(tt=(/\bChrome\/([\d.]+)\b/.exec(Ke)||0)[1])&&we.push("Chromium "+tt),nt||(nt=Vt(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",Te(Ze),"(?:Firefox|Minefield|NetFront)"])),(tt=_e=="iCab"&&parseFloat(nt)>3&&"WebKit"||/\bOpera\b/.test(Ze)&&(/\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)&&(vt=="Mac OS"?"Tasman":"Trident")||_e=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ze)&&"NetFront")&&(_e=[tt]),Ze=="IE"&&(tt=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Ke)||0)[1])?(Ze+=" Mobile",vt="Windows Phone "+(/\+$/.test(tt)?tt:tt+".x"),we.unshift("desktop mode")):/\bWPDesktop\b/i.test(Ke)?(Ze="IE Mobile",vt="Windows Phone 8.x",we.unshift("desktop mode"),nt||(nt=(/\brv:([\d.]+)/.exec(Ke)||0)[1])):Ze!="IE"&&_e=="Trident"&&(tt=/\brv:([\d.]+)/.exec(Ke))&&(Ze&&we.push("identifying as "+Ze+(nt?" "+nt:"")),Ze="IE",nt=tt[1]),Ve){if(Fe(Xe,"global"))if(St&&(tt=St.lang.System,He=tt.getProperty("os.arch"),vt=vt||tt.getProperty("os.name")+" "+tt.getProperty("os.version")),mt){try{nt=Xe.require("ringo/engine").version.join("."),Ze="RingoJS"}catch(rn){(tt=Xe.system)&&tt.global.system==Xe.system&&(Ze="Narwhal",vt||(vt=tt[0].os||null))}Ze||(Ze="Rhino")}else typeof Xe.process=="object"&&!Xe.process.browser&&(tt=Xe.process)&&(typeof tt.versions=="object"&&(typeof tt.versions.electron=="string"?(we.push("Node "+tt.versions.node),Ze="Electron",nt=tt.versions.electron):typeof tt.versions.nw=="string"&&(we.push("Chromium "+nt,"Node "+tt.versions.node),Ze="NW.js",nt=tt.versions.nw)),Ze||(Ze="Node.js",He=tt.arch,vt=tt.platform,nt=/[\d.]+/.exec(tt.version),nt=nt?nt[0]:null));else De(tt=Xe.runtime)==xt?(Ze="Adobe AIR",vt=tt.flash.system.Capabilities.os):De(tt=Xe.phantom)==ht?(Ze="PhantomJS",nt=(tt=tt.version||null)&&tt.major+"."+tt.minor+"."+tt.patch):typeof Dt.documentMode=="number"&&(tt=/\bTrident\/(\d+)/i.exec(Ke))?(nt=[nt,Dt.documentMode],(tt=+tt[1]+4)!=nt[1]&&(we.push("IE "+nt[1]+" mode"),_e&&(_e[1]=""),nt[1]=tt),nt=Ze=="IE"?String(nt[1].toFixed(1)):nt[0]):typeof Dt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ze)&&(we.push("masking as "+Ze+" "+nt),Ze="IE",nt="11.0",_e=["Trident"],vt="Windows");vt=vt&&xe(vt)}if(nt&&(tt=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(nt)||/(?:alpha|beta)(?: ?\d)?/i.exec(Ke+";"+(Ve&<.appMinorVersion))||/\bMinefield\b/i.test(Ke)&&"a")&&(Ne=/b/i.test(tt)?"beta":"alpha",nt=nt.replace(RegExp(tt+"\\+?$"),"")+(Ne=="beta"?dt:Nt)+(/\d+\+?/.exec(tt)||"")),Ze=="Fennec"||Ze=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(vt))Ze="Firefox Mobile";else if(Ze=="Maxthon"&&nt)nt=nt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(qe))qe=="Xbox 360"&&(vt=null),qe=="Xbox 360"&&/\bIEMobile\b/.test(Ke)&&we.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Ze)||Ze&&!qe&&!/Browser|Mobi/.test(Ze))&&(vt=="Windows CE"||/Mobi/i.test(Ke)))Ze+=" Mobile";else if(Ze=="IE"&&Ve)try{Xe.external===null&&we.unshift("platform preview")}catch(rn){we.unshift("embedded")}else(/\bBlackBerry\b/.test(qe)||/\bBB10\b/.test(Ke))&&(tt=(RegExp(qe.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Ke)||0)[1]||nt)?(tt=[tt,/BB10/.test(Ke)],vt=(tt[1]?(qe=null,ut="BlackBerry"):"Device Software")+" "+tt[0],nt=null):this!=je&&qe!="Wii"&&(Ve&>||/Opera/.test(Ze)&&/\b(?:MSIE|Firefox)\b/i.test(Ke)||Ze=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(vt)||Ze=="IE"&&(vt&&!/^Win/.test(vt)&&nt>5.5||/\bWindows XP\b/.test(vt)&&nt>8||nt==8&&!/\bTrident\b/.test(Ke)))&&!fe.test(tt=Ge.call(je,Ke.replace(fe,"")+";"))&&tt.name&&(tt="ing as "+tt.name+((tt=tt.version)?" "+tt:""),fe.test(Ze)?(/\bIE\b/.test(tt)&&vt=="Mac OS"&&(vt=null),tt="identify"+tt):(tt="mask"+tt,yt?Ze=xe(yt.replace(/([a-z])([A-Z])/g,"$1 $2")):Ze="Opera",/\bIE\b/.test(tt)&&(vt=null),Ve||(nt=null)),_e=["Presto"],we.push(tt));(tt=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Ke)||0)[1])&&(tt=[parseFloat(tt.replace(/\.(\d)$/,".0$1")),tt],Ze=="Safari"&&tt[1].slice(-1)=="+"?(Ze="WebKit Nightly",Ne="alpha",nt=tt[1].slice(0,-1)):(nt==tt[1]||nt==(tt[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Ke)||0)[1]))&&(nt=null),tt[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(Ke)||0)[1],tt[0]==537.36&&tt[2]==537.36&&parseFloat(tt[1])>=28&&_e=="WebKit"&&(_e=["Blink"]),!Ve||!Je&&!tt[1]?(_e&&(_e[1]="like Safari"),tt=(tt=tt[0],tt<400?1:tt<500?2:tt<526?3:tt<533?4:tt<534?"4+":tt<535?5:tt<537?6:tt<538?7:tt<601?8:tt<602?9:tt<604?10:tt<606?11:tt<608?12:"12")):(_e&&(_e[1]="like Chrome"),tt=tt[1]||(tt=tt[0],tt<530?1:tt<532?2:tt<532.05?3:tt<533?4:tt<534.03?5:tt<534.07?6:tt<534.1?7:tt<534.13?8:tt<534.16?9:tt<534.24?10:tt<534.3?11:tt<535.01?12:tt<535.02?"13+":tt<535.07?15:tt<535.11?16:tt<535.19?17:tt<536.05?18:tt<536.1?19:tt<537.01?20:tt<537.11?"21+":tt<537.13?23:tt<537.18?24:tt<537.24?25:tt<537.36?26:_e!="Blink"?"27":"28")),_e&&(_e[1]+=" "+(tt+=typeof tt=="number"?".x":/[.+]/.test(tt)?"":"+")),Ze=="Safari"&&(!nt||parseInt(nt)>45)?nt=tt:Ze=="Chrome"&&/\bHeadlessChrome/i.test(Ke)&&we.unshift("headless")),Ze=="Opera"&&(tt=/\bzbov|zvav$/.exec(vt))?(Ze+=" ",we.unshift("desktop mode"),tt=="zvav"?(Ze+="Mini",nt=null):Ze+="Mobile",vt=vt.replace(RegExp(" *"+tt+"$"),"")):Ze=="Safari"&&/\bChrome\b/.exec(_e&&_e[1])?(we.unshift("desktop mode"),Ze="Chrome Mobile",nt=null,/\bOS X\b/.test(vt)?(ut="Apple",vt="iOS 4.3+"):vt=null):/\bSRWare Iron\b/.test(Ze)&&!nt&&(nt=Vt("Chrome")),nt&&nt.indexOf(tt=/[\d.]+$/.exec(vt))==0&&Ke.indexOf("/"+tt+"-")>-1&&(vt=Be(vt.replace(tt,""))),vt&&vt.indexOf(Ze)!=-1&&!RegExp(Ze+" OS").test(vt)&&(vt=vt.replace(RegExp(" *"+Te(Ze)+" *"),"")),_e&&!/\b(?:Avant|Nook)\b/.test(Ze)&&(/Browser|Lunascape|Maxthon/.test(Ze)||Ze!="Safari"&&/^iOS/.test(vt)&&/\bSafari\b/.test(_e[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(Ze)&&_e[1])&&(tt=_e[_e.length-1])&&we.push(tt),we.length&&(we=["("+we.join("; ")+")"]),ut&&qe&&qe.indexOf(ut)<0&&we.push("on "+ut),qe&&we.push((/^on /.test(we[we.length-1])?"":"on ")+qe),vt&&(tt=/ ([\d.+]+)$/.exec(vt),Re=tt&&vt.charAt(vt.length-tt[0].length-1)=="/",vt={architecture:32,family:tt&&!Re?vt.replace(tt[0],""):vt,version:tt?tt[1]:null,toString:function(){var rn=this.version;return this.family+(rn&&!Re?" "+rn:"")+(this.architecture==64?" 64-bit":"")}}),(tt=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(He))&&!/\bi686\b/i.test(He)?(vt&&(vt.architecture=64,vt.family=vt.family.replace(RegExp(" *"+tt),"")),Ze&&(/\bWOW64\b/i.test(Ke)||Ve&&/\w(?:86|32)$/.test(lt.cpuClass||lt.platform)&&!/\bWin64; x64\b/i.test(Ke))&&we.unshift("32-bit")):vt&&/^OS X/.test(vt.family)&&Ze=="Chrome"&&parseFloat(nt)>=39&&(vt.architecture=64),Ke||(Ke=null);var sn={};return sn.description=Ke,sn.layout=_e&&_e[0],sn.manufacturer=ut,sn.name=Ze,sn.prerelease=Ne,sn.product=qe,sn.ua=Ke,sn.version=Ze&&nt,sn.os=vt||{architecture:null,family:null,version:null,toString:function(){return"null"}},sn.parse=Ge,sn.toString=Ht,sn.version&&we.unshift(nt),sn.name&&we.unshift(Ze),vt&&Ze&&!(vt==String(vt).split(" ")[0]&&(vt==Ze.split(" ")[0]||qe))&&we.push(qe?"("+vt+")":"on "+vt),we.length&&(sn.description=we.join(" ")),sn}var Ye=Ge();typeof ft=="function"&&typeof ft.amd=="object"&&ft.amd?(Ee.platform=Ye,ft(function(){return Ye})):Se&&Ae?je(Ye,function(Ke,Xe){Se[Xe]=Ke}):Ee.platform=Ye}).call(this)}).call(this)}).call(this,typeof Mn!="undefined"?Mn: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,Ae){if(typeof Ee!="function")throw new TypeError('"callback" argument must be a function');var me=arguments.length,be,fe;switch(me){case 0:case 1:return de.nextTick(Ee);case 2:return de.nextTick(function(){Ee.call(null,ke)});case 3:return de.nextTick(function(){Ee.call(null,ke,Se)});case 4:return de.nextTick(function(){Ee.call(null,ke,Se,Ae)});default:for(be=new Array(me-1),fe=0;fe<be.length;)be[fe++]=arguments[fe];return de.nextTick(function(){Ee.apply(null,be)})}}}).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 Ae(pe){if(ve===setTimeout)return setTimeout(pe,0);if((ve===ke||!ve)&&setTimeout)return ve=setTimeout,setTimeout(pe,0);try{return ve(pe,0)}catch(xe){try{return ve.call(null,pe,0)}catch(je){return ve.call(this,pe,0)}}}function me(pe){if(Ee===clearTimeout)return clearTimeout(pe);if((Ee===Se||!Ee)&&clearTimeout)return Ee=clearTimeout,clearTimeout(pe);try{return Ee(pe)}catch(xe){try{return Ee.call(null,pe)}catch(je){return Ee.call(this,pe)}}}var be=[],fe=!1,z,te=-1;function se(){!fe||!z||(fe=!1,z.length?be=z.concat(be):te=-1,be.length&&ie())}function ie(){if(!fe){var pe=Ae(se);fe=!0;for(var xe=be.length;xe;){for(z=be,be=[];++te<xe;)z&&z[te].run();te=-1,xe=be.length}z=null,fe=!1,me(pe)}}de.nextTick=function(pe){var xe=new Array(arguments.length-1);if(arguments.length>1)for(var je=1;je<arguments.length;je++)xe[je-1]=arguments[je];be.push(new le(pe,xe)),be.length===1&&!fe&&Ae(ie)};function le(pe,xe){this.fun=pe,this.array=xe}le.prototype.run=function(){this.fun.apply(null,this.array)},de.title="browser",de.browser=!0,de.env={},de.argv=[],de.version="",de.versions={};function he(){}de.on=he,de.addListener=he,de.once=he,de.off=he,de.removeListener=he,de.removeAllListeners=he,de.emit=he,de.prependListener=he,de.prependOnceListener=he,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 Ae,me=2147483647,be=36,fe=1,z=26,te=38,se=700,ie=72,le=128,he="-",pe=/^xn--/,xe=/[^\x20-\x7E]/,je=/[\x2E\u3002\uFF0E\uFF61]/g,De={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Fe=be-fe,Te=Math.floor,Me=String.fromCharCode,Be;function Ge(Pt){throw new RangeError(De[Pt])}function Ye(Pt,ht){for(var St=Pt.length,mt=[];St--;)mt[St]=ht(Pt[St]);return mt}function Ke(Pt,ht){var St=Pt.split("@"),mt="";St.length>1&&(mt=St[0]+"@",Pt=St[1]),Pt=Pt.replace(je,".");var Nt=Pt.split("."),dt=Ye(Nt,ht).join(".");return mt+dt}function Xe(Pt){for(var ht=[],St=0,mt=Pt.length,Nt,dt;St<mt;)Nt=Pt.charCodeAt(St++),Nt>=55296&&Nt<=56319&&St<mt?(dt=Pt.charCodeAt(St++),(dt&64512)==56320?ht.push(((Nt&1023)<<10)+(dt&1023)+65536):(ht.push(Nt),St--)):ht.push(Nt);return ht}function ot(Pt){return Ye(Pt,function(ht){var St="";return ht>65535&&(ht-=65536,St+=Me(ht>>>10&1023|55296),ht=56320|ht&1023),St+=Me(ht),St}).join("")}function lt(Pt){return Pt-48<10?Pt-22:Pt-65<26?Pt-65:Pt-97<26?Pt-97:be}function ct(Pt,ht){return Pt+22+75*(Pt<26)-((ht!=0)<<5)}function Ct(Pt,ht,St){var mt=0;for(Pt=St?Te(Pt/se):Pt>>1,Pt+=Te(Pt/ht);Pt>Fe*z>>1;mt+=be)Pt=Te(Pt/Fe);return Te(mt+(Fe+1)*Pt/(Pt+te))}function Je(Pt){var ht=[],St=Pt.length,mt,Nt=0,dt=le,Dt=ie,gt,yt,tt,He,we,Ne,Ve,nt,Re;for(gt=Pt.lastIndexOf(he),gt<0&&(gt=0),yt=0;yt<gt;++yt)Pt.charCodeAt(yt)>=128&&Ge("not-basic"),ht.push(Pt.charCodeAt(yt));for(tt=gt>0?gt+1:0;tt<St;){for(He=Nt,we=1,Ne=be;tt>=St&&Ge("invalid-input"),Ve=lt(Pt.charCodeAt(tt++)),(Ve>=be||Ve>Te((me-Nt)/we))&&Ge("overflow"),Nt+=Ve*we,nt=Ne<=Dt?fe:Ne>=Dt+z?z:Ne-Dt,!(Ve<nt);Ne+=be)Re=be-nt,we>Te(me/Re)&&Ge("overflow"),we*=Re;mt=ht.length+1,Dt=Ct(Nt-He,mt,He==0),Te(Nt/mt)>me-dt&&Ge("overflow"),dt+=Te(Nt/mt),Nt%=mt,ht.splice(Nt++,0,dt)}return ot(ht)}function rt(Pt){var ht,St,mt,Nt,dt,Dt,gt,yt,tt,He,we,Ne=[],Ve,nt,Re,_e;for(Pt=Xe(Pt),Ve=Pt.length,ht=le,St=0,dt=ie,Dt=0;Dt<Ve;++Dt)we=Pt[Dt],we<128&&Ne.push(Me(we));for(mt=Nt=Ne.length,Nt&&Ne.push(he);mt<Ve;){for(gt=me,Dt=0;Dt<Ve;++Dt)we=Pt[Dt],we>=ht&&we<gt&&(gt=we);for(nt=mt+1,gt-ht>Te((me-St)/nt)&&Ge("overflow"),St+=(gt-ht)*nt,ht=gt,Dt=0;Dt<Ve;++Dt)if(we=Pt[Dt],we<ht&&++St>me&&Ge("overflow"),we==ht){for(yt=St,tt=be;He=tt<=dt?fe:tt>=dt+z?z:tt-dt,!(yt<He);tt+=be)_e=yt-He,Re=be-He,Ne.push(Me(ct(He+_e%Re,0))),yt=Te(_e/Re);Ne.push(Me(ct(yt,0))),dt=Ct(St,nt,mt==Nt),St=0,++mt}++St,++ht}return Ne.join("")}function xt(Pt){return Ke(Pt,function(ht){return pe.test(ht)?Je(ht.slice(4).toLowerCase()):ht})}function bt(Pt){return Ke(Pt,function(ht){return xe.test(ht)?"xn--"+rt(ht):ht})}if(Ae={version:"1.4.1",ucs2:{decode:Xe,encode:ot},decode:Je,encode:rt,toASCII:bt,toUnicode:xt},typeof ft=="function"&&typeof ft.amd=="object"&&ft.amd)ft("punycode",function(){return Ae});else if(Ee&&ke)if(Ue.exports==Ee)ke.exports=Ae;else for(Be in Ae)Ae.hasOwnProperty(Be)&&(Ee[Be]=Ae[Be]);else ve.punycode=Ae})(this)}).call(this)}).call(this,typeof Mn!="undefined"?Mn: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,Ae){ke=ke||"&",Se=Se||"=";var me={};if(typeof Ee!="string"||Ee.length===0)return me;var be=/\+/g;Ee=Ee.split(ke);var fe=1e3;Ae&&typeof Ae.maxKeys=="number"&&(fe=Ae.maxKeys);var z=Ee.length;fe>0&&z>fe&&(z=fe);for(var te=0;te<z;++te){var se=Ee[te].replace(be,"%20"),ie=se.indexOf(Se),le,he,pe,xe;ie>=0?(le=se.substr(0,ie),he=se.substr(ie+1)):(le=se,he=""),pe=decodeURIComponent(le),xe=decodeURIComponent(he),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,Ae,me,be){return Ae=Ae||"&",me=me||"=",Se===null&&(Se=void 0),typeof Se=="object"?Ee(ke(Se),function(fe){var z=encodeURIComponent(de(fe))+me;return ve(Se[fe])?Ee(Se[fe],function(te){return z+encodeURIComponent(de(te))}).join(Ae):z+encodeURIComponent(de(Se[fe]))}).join(Ae):be?encodeURIComponent(de(be))+me+encodeURIComponent(de(Se)):""};var ve=Array.isArray||function(Se){return Object.prototype.toString.call(Se)==="[object Array]"};function Ee(Se,Ae){if(Se.map)return Se.map(Ae);for(var me=[],be=0;be<Se.length;be++)me.push(Ae(Se[be],be));return me}var ke=Object.keys||function(Se){var Ae=[];for(var me in Se)Object.prototype.hasOwnProperty.call(Se,me)&&Ae.push(me);return Ae}},{}],385:[function(oe,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 Ae=ve(Se.prototype),me=0;me<Ae.length;me++){var be=Ae[me];fe.prototype[be]||(fe.prototype[be]=Se.prototype[be])}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,Ae){Ae(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=Me;var ke=oe("isarray"),Se;Me.ReadableState=Te;var Ae=oe("events").EventEmitter,me=function(we,Ne){return we.listeners(Ne).length},be=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"),he=void 0;le&&le.debuglog?he=le.debuglog("stream"):he=function(){};var pe=oe("./internal/streams/BufferList"),xe=oe("./internal/streams/destroy"),je;ie.inherits(Me,be);var De=["error","close","destroy","pause","resume"];function Fe(we,Ne,Ve){if(typeof we.prependListener=="function")return we.prependListener(Ne,Ve);!we._events||!we._events[Ne]?we.on(Ne,Ve):ke(we._events[Ne])?we._events[Ne].unshift(Ve):we._events[Ne]=[Ve,we._events[Ne]]}function Te(we,Ne){Se=Se||oe("./_stream_duplex"),we=we||{};var Ve=Ne instanceof Se;this.objectMode=!!we.objectMode,Ve&&(this.objectMode=this.objectMode||!!we.readableObjectMode);var nt=we.highWaterMark,Re=we.readableHighWaterMark,_e=this.objectMode?16:16*1024;nt||nt===0?this.highWaterMark=nt:Ve&&(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&&(je||(je=oe("string_decoder/").StringDecoder),this.decoder=new je(we.encoding),this.encoding=we.encoding)}function Me(we){if(Se=Se||oe("./_stream_duplex"),!(this instanceof Me))return new Me(we);this._readableState=new Te(we,this),this.readable=!0,we&&(typeof we.read=="function"&&(this._read=we.read),typeof we.destroy=="function"&&(this._destroy=we.destroy)),be.call(this)}Object.defineProperty(Me.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(we){this._readableState&&(this._readableState.destroyed=we)}}),Me.prototype.destroy=xe.destroy,Me.prototype._undestroy=xe.undestroy,Me.prototype._destroy=function(we,Ne){this.push(null),Ne(we)},Me.prototype.push=function(we,Ne){var Ve=this._readableState,nt;return Ve.objectMode?nt=!0:typeof we=="string"&&(Ne=Ne||Ve.defaultEncoding,Ne!==Ve.encoding&&(we=fe.from(we,Ne),Ne=""),nt=!0),Be(this,we,Ne,!1,nt)},Me.prototype.unshift=function(we){return Be(this,we,null,!0,!1)};function Be(we,Ne,Ve,nt,Re){var _e=we._readableState;if(Ne===null)_e.reading=!1,ct(we,_e);else{var Ze;Re||(Ze=Ye(_e,Ne)),Ze?we.emit("error",Ze):_e.objectMode||Ne&&Ne.length>0?(typeof Ne!="string"&&!_e.objectMode&&Object.getPrototypeOf(Ne)!==fe.prototype&&(Ne=te(Ne)),nt?_e.endEmitted?we.emit("error",new Error("stream.unshift() after end event")):Ge(we,_e,Ne,!0):_e.ended?we.emit("error",new Error("stream.push() after EOF")):(_e.reading=!1,_e.decoder&&!Ve?(Ne=_e.decoder.write(Ne),_e.objectMode||Ne.length!==0?Ge(we,_e,Ne,!1):rt(we,_e)):Ge(we,_e,Ne,!1))):nt||(_e.reading=!1)}return Ke(_e)}function Ge(we,Ne,Ve,nt){Ne.flowing&&Ne.length===0&&!Ne.sync?(we.emit("data",Ve),we.read(0)):(Ne.length+=Ne.objectMode?1:Ve.length,nt?Ne.buffer.unshift(Ve):Ne.buffer.push(Ve),Ne.needReadable&&Ct(we)),rt(we,Ne)}function Ye(we,Ne){var Ve;return!se(Ne)&&typeof Ne!="string"&&Ne!==void 0&&!we.objectMode&&(Ve=new TypeError("Invalid non-string/buffer chunk")),Ve}function Ke(we){return!we.ended&&(we.needReadable||we.length<we.highWaterMark||we.length===0)}Me.prototype.isPaused=function(){return this._readableState.flowing===!1},Me.prototype.setEncoding=function(we){return je||(je=oe("string_decoder/").StringDecoder),this._readableState.decoder=new je(we),this._readableState.encoding=we,this};var 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,Ne){return we<=0||Ne.length===0&&Ne.ended?0:Ne.objectMode?1:we!==we?Ne.flowing&&Ne.length?Ne.buffer.head.data.length:Ne.length:(we>Ne.highWaterMark&&(Ne.highWaterMark=ot(we)),we<=Ne.length?we:Ne.ended?Ne.length:(Ne.needReadable=!0,0))}Me.prototype.read=function(we){he("read",we),we=parseInt(we,10);var Ne=this._readableState,Ve=we;if(we!==0&&(Ne.emittedReadable=!1),we===0&&Ne.needReadable&&(Ne.length>=Ne.highWaterMark||Ne.ended))return he("read: emitReadable",Ne.length,Ne.ended),Ne.length===0&&Ne.ended?yt(this):Ct(this),null;if(we=lt(we,Ne),we===0&&Ne.ended)return Ne.length===0&&yt(this),null;var nt=Ne.needReadable;he("need readable",nt),(Ne.length===0||Ne.length-we<Ne.highWaterMark)&&(nt=!0,he("length less than watermark",nt)),Ne.ended||Ne.reading?(nt=!1,he("reading or ended",nt)):nt&&(he("do read"),Ne.reading=!0,Ne.sync=!0,Ne.length===0&&(Ne.needReadable=!0),this._read(Ne.highWaterMark),Ne.sync=!1,Ne.reading||(we=lt(Ve,Ne)));var Re;return we>0?Re=Nt(we,Ne):Re=null,Re===null?(Ne.needReadable=!0,we=0):Ne.length-=we,Ne.length===0&&(Ne.ended||(Ne.needReadable=!0),Ve!==we&&Ne.ended&&yt(this)),Re!==null&&this.emit("data",Re),Re};function ct(we,Ne){if(!Ne.ended){if(Ne.decoder){var Ve=Ne.decoder.end();Ve&&Ve.length&&(Ne.buffer.push(Ve),Ne.length+=Ne.objectMode?1:Ve.length)}Ne.ended=!0,Ct(we)}}function Ct(we){var Ne=we._readableState;Ne.needReadable=!1,Ne.emittedReadable||(he("emitReadable",Ne.flowing),Ne.emittedReadable=!0,Ne.sync?Ee.nextTick(Je,we):Je(we))}function Je(we){he("emit readable"),we.emit("readable"),mt(we)}function rt(we,Ne){Ne.readingMore||(Ne.readingMore=!0,Ee.nextTick(xt,we,Ne))}function xt(we,Ne){for(var Ve=Ne.length;!Ne.reading&&!Ne.flowing&&!Ne.ended&&Ne.length<Ne.highWaterMark&&(he("maybeReadMore read 0"),we.read(0),Ve!==Ne.length);)Ve=Ne.length;Ne.readingMore=!1}Me.prototype._read=function(we){this.emit("error",new Error("_read() is not implemented"))},Me.prototype.pipe=function(we,Ne){var Ve=this,nt=this._readableState;switch(nt.pipesCount){case 0:nt.pipes=we;break;case 1:nt.pipes=[nt.pipes,we];break;default:nt.pipes.push(we);break}nt.pipesCount+=1,he("pipe count=%d opts=%j",nt.pipesCount,Ne);var Re=(!Ne||Ne.end!==!1)&&we!==de.stdout&&we!==de.stderr,_e=Re?qe:Ht;nt.endEmitted?Ee.nextTick(_e):Ve.once("end",_e),we.on("unpipe",Ze);function Ze(sn,rn){he("onunpipe"),sn===Ve&&rn&&rn.hasUnpiped===!1&&(rn.hasUnpiped=!0,At())}function qe(){he("onend"),we.end()}var ut=bt(Ve);we.on("drain",ut);var vt=!1;function At(){he("cleanup"),we.removeListener("close",Yt),we.removeListener("finish",Vt),we.removeListener("drain",ut),we.removeListener("error",Kt),we.removeListener("unpipe",Ze),Ve.removeListener("end",qe),Ve.removeListener("end",Ht),Ve.removeListener("data",Ft),vt=!0,nt.awaitDrain&&(!we._writableState||we._writableState.needDrain)&&ut()}var Et=!1;Ve.on("data",Ft);function Ft(sn){he("ondata"),Et=!1;var rn=we.write(sn);rn===!1&&!Et&&((nt.pipesCount===1&&nt.pipes===we||nt.pipesCount>1&&He(nt.pipes,we)!==-1)&&!vt&&(he("false write response, pause",Ve._readableState.awaitDrain),Ve._readableState.awaitDrain++,Et=!0),Ve.pause())}function Kt(sn){he("onerror",sn),Ht(),we.removeListener("error",Kt),me(we,"error")===0&&we.emit("error",sn)}Fe(we,"error",Kt);function Yt(){we.removeListener("finish",Vt),Ht()}we.once("close",Yt);function Vt(){he("onfinish"),we.removeListener("close",Yt),Ht()}we.once("finish",Vt);function Ht(){he("unpipe"),Ve.unpipe(we)}return we.emit("pipe",Ve),nt.flowing||(he("pipe resume"),Ve.resume()),we};function bt(we){return function(){var Ne=we._readableState;he("pipeOnDrain",Ne.awaitDrain),Ne.awaitDrain&&Ne.awaitDrain--,Ne.awaitDrain===0&&me(we,"data")&&(Ne.flowing=!0,mt(we))}}Me.prototype.unpipe=function(we){var Ne=this._readableState,Ve={hasUnpiped:!1};if(Ne.pipesCount===0)return this;if(Ne.pipesCount===1)return we&&we!==Ne.pipes?this:(we||(we=Ne.pipes),Ne.pipes=null,Ne.pipesCount=0,Ne.flowing=!1,we&&we.emit("unpipe",this,Ve),this);if(!we){var nt=Ne.pipes,Re=Ne.pipesCount;Ne.pipes=null,Ne.pipesCount=0,Ne.flowing=!1;for(var _e=0;_e<Re;_e++)nt[_e].emit("unpipe",this,Ve);return this}var Ze=He(Ne.pipes,we);return Ze===-1?this:(Ne.pipes.splice(Ze,1),Ne.pipesCount-=1,Ne.pipesCount===1&&(Ne.pipes=Ne.pipes[0]),we.emit("unpipe",this,Ve),this)},Me.prototype.on=function(we,Ne){var Ve=be.prototype.on.call(this,we,Ne);if(we==="data")this._readableState.flowing!==!1&&this.resume();else if(we==="readable"){var nt=this._readableState;!nt.endEmitted&&!nt.readableListening&&(nt.readableListening=nt.needReadable=!0,nt.emittedReadable=!1,nt.reading?nt.length&&Ct(this):Ee.nextTick(Pt,this))}return Ve},Me.prototype.addListener=Me.prototype.on;function Pt(we){he("readable nexttick read 0"),we.read(0)}Me.prototype.resume=function(){var we=this._readableState;return we.flowing||(he("resume"),we.flowing=!0,ht(this,we)),this};function ht(we,Ne){Ne.resumeScheduled||(Ne.resumeScheduled=!0,Ee.nextTick(St,we,Ne))}function St(we,Ne){Ne.reading||(he("resume read 0"),we.read(0)),Ne.resumeScheduled=!1,Ne.awaitDrain=0,we.emit("resume"),mt(we),Ne.flowing&&!Ne.reading&&we.read(0)}Me.prototype.pause=function(){return he("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(he("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function mt(we){var Ne=we._readableState;for(he("flow",Ne.flowing);Ne.flowing&&we.read()!==null;);}Me.prototype.wrap=function(we){var Ne=this,Ve=this._readableState,nt=!1;we.on("end",function(){if(he("wrapped end"),Ve.decoder&&!Ve.ended){var Ze=Ve.decoder.end();Ze&&Ze.length&&Ne.push(Ze)}Ne.push(null)}),we.on("data",function(Ze){if(he("wrapped data"),Ve.decoder&&(Ze=Ve.decoder.write(Ze)),!(Ve.objectMode&&Ze==null)&&!(!Ve.objectMode&&(!Ze||!Ze.length))){var qe=Ne.push(Ze);qe||(nt=!0,we.pause())}});for(var Re in we)this[Re]===void 0&&typeof we[Re]=="function"&&(this[Re]=function(Ze){return function(){return we[Ze].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(Ze){he("wrapped _read",Ze),nt&&(nt=!1,we.resume())},this},Object.defineProperty(Me.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Me._fromList=Nt;function Nt(we,Ne){if(Ne.length===0)return null;var Ve;return Ne.objectMode?Ve=Ne.buffer.shift():!we||we>=Ne.length?(Ne.decoder?Ve=Ne.buffer.join(""):Ne.buffer.length===1?Ve=Ne.buffer.head.data:Ve=Ne.buffer.concat(Ne.length),Ne.buffer.clear()):Ve=dt(we,Ne.buffer,Ne.decoder),Ve}function dt(we,Ne,Ve){var nt;return we<Ne.head.data.length?(nt=Ne.head.data.slice(0,we),Ne.head.data=Ne.head.data.slice(we)):we===Ne.head.data.length?nt=Ne.shift():nt=Ve?Dt(we,Ne):gt(we,Ne),nt}function Dt(we,Ne){var Ve=Ne.head,nt=1,Re=Ve.data;for(we-=Re.length;Ve=Ve.next;){var _e=Ve.data,Ze=we>_e.length?_e.length:we;if(Ze===_e.length?Re+=_e:Re+=_e.slice(0,we),we-=Ze,we===0){Ze===_e.length?(++nt,Ve.next?Ne.head=Ve.next:Ne.head=Ne.tail=null):(Ne.head=Ve,Ve.data=_e.slice(Ze));break}++nt}return Ne.length-=nt,Re}function gt(we,Ne){var Ve=fe.allocUnsafe(we),nt=Ne.head,Re=1;for(nt.data.copy(Ve),we-=nt.data.length;nt=nt.next;){var _e=nt.data,Ze=we>_e.length?_e.length:we;if(_e.copy(Ve,Ve.length-we,0,Ze),we-=Ze,we===0){Ze===_e.length?(++Re,nt.next?Ne.head=nt.next:Ne.head=Ne.tail=null):(Ne.head=nt,nt.data=_e.slice(Ze));break}++Re}return Ne.length-=Re,Ve}function yt(we){var Ne=we._readableState;if(Ne.length>0)throw new Error('"endReadable()" called on non-empty stream');Ne.endEmitted||(Ne.ended=!0,Ee.nextTick(tt,Ne,we))}function tt(we,Ne){!we.endEmitted&&we.length===0&&(we.endEmitted=!0,Ne.readable=!1,Ne.emit("end"))}function He(we,Ne){for(var Ve=0,nt=we.length;Ve<nt;Ve++)if(we[Ve]===Ne)return Ve;return-1}}).call(this)}).call(this,oe("_process"),typeof Mn!="undefined"?Mn: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,be){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,be!=null&&this.push(be),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(be,fe){Ae(me,be,fe)}):Ae(this,null,null)}ke.prototype.push=function(me,be){return this._transformState.needTransform=!1,de.prototype.push.call(this,me,be)},ke.prototype._transform=function(me,be,fe){throw new Error("_transform() is not implemented")},ke.prototype._write=function(me,be,fe){var z=this._transformState;if(z.writecb=fe,z.writechunk=me,z.writeencoding=be,!z.transforming){var te=this._readableState;(z.needTransform||te.needReadable||te.length<te.highWaterMark)&&this._read(te.highWaterMark)}},ke.prototype._read=function(me){var be=this._transformState;be.writechunk!==null&&be.writecb&&!be.transforming?(be.transforming=!0,this._transform(be.writechunk,be.writeencoding,be.afterTransform)):be.needTransform=!0},ke.prototype._destroy=function(me,be){var fe=this;de.prototype._destroy.call(this,me,function(z){be(z),fe.emit("close")})};function Ae(me,be,fe){if(be)return me.emit("error",be);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(St,mt,Nt){this.chunk=St,this.encoding=mt,this.callback=Nt,this.next=null}function Ae(St){var mt=this;this.next=null,this.entry=null,this.finish=function(){ht(mt,St)}}var me=!de.browser&&["v0.10","v0.9."].indexOf(de.version.slice(0,5))>-1?Ee:ke.nextTick,be;Fe.WritableState=je;var fe=Object.create(oe("core-util-is"));fe.inherits=oe("inherits");var z={deprecate:oe("util-deprecate")},te=oe("./internal/streams/stream"),se=oe("safe-buffer").Buffer,ie=ve.Uint8Array||function(){};function le(St){return se.from(St)}function he(St){return se.isBuffer(St)||St instanceof ie}var pe=oe("./internal/streams/destroy");fe.inherits(Fe,te);function xe(){}function je(St,mt){be=be||oe("./_stream_duplex"),St=St||{};var Nt=mt instanceof be;this.objectMode=!!St.objectMode,Nt&&(this.objectMode=this.objectMode||!!St.writableObjectMode);var dt=St.highWaterMark,Dt=St.writableHighWaterMark,gt=this.objectMode?16:16*1024;dt||dt===0?this.highWaterMark=dt:Nt&&(Dt||Dt===0)?this.highWaterMark=Dt:this.highWaterMark=gt,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 yt=St.decodeStrings===!1;this.decodeStrings=!yt,this.defaultEncoding=St.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(tt){ot(mt,tt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ae(this)}je.prototype.getBuffer=function(){for(var mt=this.bufferedRequest,Nt=[];mt;)Nt.push(mt),mt=mt.next;return Nt},function(){try{Object.defineProperty(je.prototype,"buffer",{get:z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(St){}}();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(St){return De.call(this,St)?!0:this!==Fe?!1:St&&St._writableState instanceof je}})):De=function(St){return St instanceof this};function Fe(St){if(be=be||oe("./_stream_duplex"),!De.call(Fe,this)&&!(this instanceof be))return new Fe(St);this._writableState=new je(St,this),this.writable=!0,St&&(typeof St.write=="function"&&(this._write=St.write),typeof St.writev=="function"&&(this._writev=St.writev),typeof St.destroy=="function"&&(this._destroy=St.destroy),typeof St.final=="function"&&(this._final=St.final)),te.call(this)}Fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Te(St,mt){var Nt=new Error("write after end");St.emit("error",Nt),ke.nextTick(mt,Nt)}function Me(St,mt,Nt,dt){var Dt=!0,gt=!1;return Nt===null?gt=new TypeError("May not write null values to stream"):typeof Nt!="string"&&Nt!==void 0&&!mt.objectMode&&(gt=new TypeError("Invalid non-string/buffer chunk")),gt&&(St.emit("error",gt),ke.nextTick(dt,gt),Dt=!1),Dt}Fe.prototype.write=function(St,mt,Nt){var dt=this._writableState,Dt=!1,gt=!dt.objectMode&&he(St);return gt&&!se.isBuffer(St)&&(St=le(St)),typeof mt=="function"&&(Nt=mt,mt=null),gt?mt="buffer":mt||(mt=dt.defaultEncoding),typeof Nt!="function"&&(Nt=xe),dt.ended?Te(this,Nt):(gt||Me(this,dt,St,Nt))&&(dt.pendingcb++,Dt=Ge(this,dt,gt,St,mt,Nt)),Dt},Fe.prototype.cork=function(){var St=this._writableState;St.corked++},Fe.prototype.uncork=function(){var St=this._writableState;St.corked&&(St.corked--,!St.writing&&!St.corked&&!St.finished&&!St.bufferProcessing&&St.bufferedRequest&&Ct(this,St))},Fe.prototype.setDefaultEncoding=function(mt){if(typeof mt=="string"&&(mt=mt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((mt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+mt);return this._writableState.defaultEncoding=mt,this};function Be(St,mt,Nt){return!St.objectMode&&St.decodeStrings!==!1&&typeof mt=="string"&&(mt=se.from(mt,Nt)),mt}Object.defineProperty(Fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ge(St,mt,Nt,dt,Dt,gt){if(!Nt){var yt=Be(mt,dt,Dt);dt!==yt&&(Nt=!0,Dt="buffer",dt=yt)}var tt=mt.objectMode?1:dt.length;mt.length+=tt;var He=mt.length<mt.highWaterMark;if(He||(mt.needDrain=!0),mt.writing||mt.corked){var we=mt.lastBufferedRequest;mt.lastBufferedRequest={chunk:dt,encoding:Dt,isBuf:Nt,callback:gt,next:null},we?we.next=mt.lastBufferedRequest:mt.bufferedRequest=mt.lastBufferedRequest,mt.bufferedRequestCount+=1}else Ye(St,mt,!1,tt,dt,Dt,gt);return He}function Ye(St,mt,Nt,dt,Dt,gt,yt){mt.writelen=dt,mt.writecb=yt,mt.writing=!0,mt.sync=!0,Nt?St._writev(Dt,mt.onwrite):St._write(Dt,gt,mt.onwrite),mt.sync=!1}function Ke(St,mt,Nt,dt,Dt){--mt.pendingcb,Nt?(ke.nextTick(Dt,dt),ke.nextTick(bt,St,mt),St._writableState.errorEmitted=!0,St.emit("error",dt)):(Dt(dt),St._writableState.errorEmitted=!0,St.emit("error",dt),bt(St,mt))}function Xe(St){St.writing=!1,St.writecb=null,St.length-=St.writelen,St.writelen=0}function ot(St,mt){var Nt=St._writableState,dt=Nt.sync,Dt=Nt.writecb;if(Xe(Nt),mt)Ke(St,Nt,dt,mt,Dt);else{var gt=Je(Nt);!gt&&!Nt.corked&&!Nt.bufferProcessing&&Nt.bufferedRequest&&Ct(St,Nt),dt?me(lt,St,Nt,gt,Dt):lt(St,Nt,gt,Dt)}}function lt(St,mt,Nt,dt){Nt||ct(St,mt),mt.pendingcb--,dt(),bt(St,mt)}function ct(St,mt){mt.length===0&&mt.needDrain&&(mt.needDrain=!1,St.emit("drain"))}function Ct(St,mt){mt.bufferProcessing=!0;var Nt=mt.bufferedRequest;if(St._writev&&Nt&&Nt.next){var dt=mt.bufferedRequestCount,Dt=new Array(dt),gt=mt.corkedRequestsFree;gt.entry=Nt;for(var yt=0,tt=!0;Nt;)Dt[yt]=Nt,Nt.isBuf||(tt=!1),Nt=Nt.next,yt+=1;Dt.allBuffers=tt,Ye(St,mt,!0,mt.length,Dt,"",gt.finish),mt.pendingcb++,mt.lastBufferedRequest=null,gt.next?(mt.corkedRequestsFree=gt.next,gt.next=null):mt.corkedRequestsFree=new Ae(mt),mt.bufferedRequestCount=0}else{for(;Nt;){var He=Nt.chunk,we=Nt.encoding,Ne=Nt.callback,Ve=mt.objectMode?1:He.length;if(Ye(St,mt,!1,Ve,He,we,Ne),Nt=Nt.next,mt.bufferedRequestCount--,mt.writing)break}Nt===null&&(mt.lastBufferedRequest=null)}mt.bufferedRequest=Nt,mt.bufferProcessing=!1}Fe.prototype._write=function(St,mt,Nt){Nt(new Error("_write() is not implemented"))},Fe.prototype._writev=null,Fe.prototype.end=function(St,mt,Nt){var dt=this._writableState;typeof St=="function"?(Nt=St,St=null,mt=null):typeof mt=="function"&&(Nt=mt,mt=null),St!=null&&this.write(St,mt),dt.corked&&(dt.corked=1,this.uncork()),!dt.ending&&!dt.finished&&Pt(this,dt,Nt)};function Je(St){return St.ending&&St.length===0&&St.bufferedRequest===null&&!St.finished&&!St.writing}function rt(St,mt){St._final(function(Nt){mt.pendingcb--,Nt&&St.emit("error",Nt),mt.prefinished=!0,St.emit("prefinish"),bt(St,mt)})}function xt(St,mt){!mt.prefinished&&!mt.finalCalled&&(typeof St._final=="function"?(mt.pendingcb++,mt.finalCalled=!0,ke.nextTick(rt,St,mt)):(mt.prefinished=!0,St.emit("prefinish")))}function bt(St,mt){var Nt=Je(mt);return Nt&&(xt(St,mt),mt.pendingcb===0&&(mt.finished=!0,St.emit("finish"))),Nt}function Pt(St,mt,Nt){mt.ending=!0,bt(St,mt),Nt&&(mt.finished?ke.nextTick(Nt):St.once("finish",Nt)),mt.ended=!0,St.writable=!1}function ht(St,mt,Nt){var dt=St.entry;for(St.entry=null;dt;){var Dt=dt.callback;mt.pendingcb--,Dt(Nt),dt=dt.next}mt.corkedRequestsFree?mt.corkedRequestsFree.next=St:mt.corkedRequestsFree=St}Object.defineProperty(Fe.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(St){this._writableState&&(this._writableState.destroyed=St)}}),Fe.prototype.destroy=pe.destroy,Fe.prototype._undestroy=pe.undestroy,Fe.prototype._destroy=function(St,mt){this.end(),mt(St)}}).call(this)}).call(this,oe("_process"),typeof Mn!="undefined"?Mn: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,Ae){if(!(Se instanceof Ae))throw new TypeError("Cannot call a class as a function")}var ve=oe("safe-buffer").Buffer,Ee=oe("util");function ke(Se,Ae,me){Se.copy(Ae,me)}Ue.exports=function(){function Se(){de(this,Se),this.head=null,this.tail=null,this.length=0}return Se.prototype.push=function(me){var be={data:me,next:null};this.length>0?this.tail.next=be:this.head=be,this.tail=be,++this.length},Se.prototype.unshift=function(me){var be={data:me,next:this.head};this.length===0&&(this.tail=be),this.head=be,++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 be=this.head,fe=""+be.data;be=be.next;)fe+=me+be.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 be=ve.allocUnsafe(me>>>0),fe=this.head,z=0;fe;)ke(fe.data,be,z),z+=fe.data.length,fe=fe.next;return be},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,Ae){var me=this,be=this._readableState&&this._readableState.destroyed,fe=this._writableState&&this._writableState.destroyed;return be||fe?(Ae?Ae(Se):Se&&(!this._writableState||!this._writableState.errorEmitted)&&de.nextTick(ke,this,Se),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(Se||null,function(z){!Ae&&z?(de.nextTick(ke,me,z),me._writableState&&(me._writableState.errorEmitted=!0)):Ae&&Ae(z)}),this)}function Ee(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function ke(Se,Ae){Se.emit("error",Ae)}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,Ae=typeof Symbol=="function"?Symbol:{},me=Ae.iterator||"@@iterator",be=Ae.asyncIterator||"@@asyncIterator",fe=Ae.toStringTag||"@@toStringTag";function z(xt,bt,Pt){return Object.defineProperty(xt,bt,{value:Pt,enumerable:!0,configurable:!0,writable:!0}),xt[bt]}try{z({},"")}catch(xt){z=function(bt,Pt,ht){return bt[Pt]=ht}}function te(xt,bt,Pt,ht){var St=bt&&bt.prototype instanceof je?bt:je,mt=Object.create(St.prototype),Nt=new Ct(ht||[]);return mt._invoke=Xe(xt,Pt,Nt),mt}ve.wrap=te;function se(xt,bt,Pt){try{return{type:"normal",arg:xt.call(bt,Pt)}}catch(ht){return{type:"throw",arg:ht}}}var ie="suspendedStart",le="suspendedYield",he="executing",pe="completed",xe={};function je(){}function De(){}function Fe(){}var Te={};z(Te,me,function(){return this});var Me=Object.getPrototypeOf,Be=Me&&Me(Me(Je([])));Be&&Be!==Ee&&ke.call(Be,me)&&(Te=Be);var Ge=Fe.prototype=je.prototype=Object.create(Te);De.prototype=Fe,z(Ge,"constructor",Fe),z(Fe,"constructor",De),De.displayName=z(Fe,fe,"GeneratorFunction");function Ye(xt){["next","throw","return"].forEach(function(bt){z(xt,bt,function(Pt){return this._invoke(bt,Pt)})})}ve.isGeneratorFunction=function(xt){var bt=typeof xt=="function"&&xt.constructor;return bt?bt===De||(bt.displayName||bt.name)==="GeneratorFunction":!1},ve.mark=function(xt){return Object.setPrototypeOf?Object.setPrototypeOf(xt,Fe):(xt.__proto__=Fe,z(xt,fe,"GeneratorFunction")),xt.prototype=Object.create(Ge),xt},ve.awrap=function(xt){return{__await:xt}};function Ke(xt,bt){function Pt(mt,Nt,dt,Dt){var gt=se(xt[mt],xt,Nt);if(gt.type==="throw")Dt(gt.arg);else{var yt=gt.arg,tt=yt.value;return tt&&typeof tt=="object"&&ke.call(tt,"__await")?bt.resolve(tt.__await).then(function(He){Pt("next",He,dt,Dt)},function(He){Pt("throw",He,dt,Dt)}):bt.resolve(tt).then(function(He){yt.value=He,dt(yt)},function(He){return Pt("throw",He,dt,Dt)})}}var ht;function St(mt,Nt){function dt(){return new bt(function(Dt,gt){Pt(mt,Nt,Dt,gt)})}return ht=ht?ht.then(dt,dt):dt()}this._invoke=St}Ye(Ke.prototype),z(Ke.prototype,be,function(){return this}),ve.AsyncIterator=Ke,ve.async=function(xt,bt,Pt,ht,St){St===void 0&&(St=Promise);var mt=new Ke(te(xt,bt,Pt,ht),St);return ve.isGeneratorFunction(bt)?mt:mt.next().then(function(Nt){return Nt.done?Nt.value:mt.next()})};function Xe(xt,bt,Pt){var ht=ie;return function(mt,Nt){if(ht===he)throw new Error("Generator is already running");if(ht===pe){if(mt==="throw")throw Nt;return rt()}for(Pt.method=mt,Pt.arg=Nt;;){var dt=Pt.delegate;if(dt){var Dt=ot(dt,Pt);if(Dt){if(Dt===xe)continue;return Dt}}if(Pt.method==="next")Pt.sent=Pt._sent=Pt.arg;else if(Pt.method==="throw"){if(ht===ie)throw ht=pe,Pt.arg;Pt.dispatchException(Pt.arg)}else Pt.method==="return"&&Pt.abrupt("return",Pt.arg);ht=he;var gt=se(xt,bt,Pt);if(gt.type==="normal"){if(ht=Pt.done?pe:le,gt.arg===xe)continue;return{value:gt.arg,done:Pt.done}}else gt.type==="throw"&&(ht=pe,Pt.method="throw",Pt.arg=gt.arg)}}}function ot(xt,bt){var Pt=xt.iterator[bt.method];if(Pt===Se){if(bt.delegate=null,bt.method==="throw"){if(xt.iterator.return&&(bt.method="return",bt.arg=Se,ot(xt,bt),bt.method==="throw"))return xe;bt.method="throw",bt.arg=new TypeError("The iterator does not provide a 'throw' method")}return xe}var ht=se(Pt,xt.iterator,bt.arg);if(ht.type==="throw")return bt.method="throw",bt.arg=ht.arg,bt.delegate=null,xe;var St=ht.arg;if(!St)return bt.method="throw",bt.arg=new TypeError("iterator result is not an object"),bt.delegate=null,xe;if(St.done)bt[xt.resultName]=St.value,bt.next=xt.nextLoc,bt.method!=="return"&&(bt.method="next",bt.arg=Se);else return St;return bt.delegate=null,xe}Ye(Ge),z(Ge,fe,"Generator"),z(Ge,me,function(){return this}),z(Ge,"toString",function(){return"[object Generator]"});function lt(xt){var bt={tryLoc:xt[0]};1 in xt&&(bt.catchLoc=xt[1]),2 in xt&&(bt.finallyLoc=xt[2],bt.afterLoc=xt[3]),this.tryEntries.push(bt)}function ct(xt){var bt=xt.completion||{};bt.type="normal",delete bt.arg,xt.completion=bt}function Ct(xt){this.tryEntries=[{tryLoc:"root"}],xt.forEach(lt,this),this.reset(!0)}ve.keys=function(xt){var bt=[];for(var Pt in xt)bt.push(Pt);return bt.reverse(),function ht(){for(;bt.length;){var St=bt.pop();if(St in xt)return ht.value=St,ht.done=!1,ht}return ht.done=!0,ht}};function Je(xt){if(xt){var bt=xt[me];if(bt)return bt.call(xt);if(typeof xt.next=="function")return xt;if(!isNaN(xt.length)){var Pt=-1,ht=function St(){for(;++Pt<xt.length;)if(ke.call(xt,Pt))return St.value=xt[Pt],St.done=!1,St;return St.value=Se,St.done=!0,St};return ht.next=ht}}return{next:rt}}ve.values=Je;function rt(){return{value:Se,done:!0}}return Ct.prototype={constructor:Ct,reset:function(xt){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(ct),!xt)for(var bt in this)bt.charAt(0)==="t"&&ke.call(this,bt)&&!isNaN(+bt.slice(1))&&(this[bt]=Se)},stop:function(){this.done=!0;var xt=this.tryEntries[0],bt=xt.completion;if(bt.type==="throw")throw bt.arg;return this.rval},dispatchException:function(xt){if(this.done)throw xt;var bt=this;function Pt(Dt,gt){return mt.type="throw",mt.arg=xt,bt.next=Dt,gt&&(bt.method="next",bt.arg=Se),!!gt}for(var ht=this.tryEntries.length-1;ht>=0;--ht){var St=this.tryEntries[ht],mt=St.completion;if(St.tryLoc==="root")return Pt("end");if(St.tryLoc<=this.prev){var Nt=ke.call(St,"catchLoc"),dt=ke.call(St,"finallyLoc");if(Nt&&dt){if(this.prev<St.catchLoc)return Pt(St.catchLoc,!0);if(this.prev<St.finallyLoc)return Pt(St.finallyLoc)}else if(Nt){if(this.prev<St.catchLoc)return Pt(St.catchLoc,!0)}else if(dt){if(this.prev<St.finallyLoc)return Pt(St.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(xt,bt){for(var Pt=this.tryEntries.length-1;Pt>=0;--Pt){var ht=this.tryEntries[Pt];if(ht.tryLoc<=this.prev&&ke.call(ht,"finallyLoc")&&this.prev<ht.finallyLoc){var St=ht;break}}St&&(xt==="break"||xt==="continue")&&St.tryLoc<=bt&&bt<=St.finallyLoc&&(St=null);var mt=St?St.completion:{};return mt.type=xt,mt.arg=bt,St?(this.method="next",this.next=St.finallyLoc,xe):this.complete(mt)},complete:function(xt,bt){if(xt.type==="throw")throw xt.arg;return xt.type==="break"||xt.type==="continue"?this.next=xt.arg:xt.type==="return"?(this.rval=this.arg=xt.arg,this.method="return",this.next="end"):xt.type==="normal"&&bt&&(this.next=bt),xe},finish:function(xt){for(var bt=this.tryEntries.length-1;bt>=0;--bt){var Pt=this.tryEntries[bt];if(Pt.finallyLoc===xt)return this.complete(Pt.completion,Pt.afterLoc),ct(Pt),xe}},catch:function(xt){for(var bt=this.tryEntries.length-1;bt>=0;--bt){var Pt=this.tryEntries[bt];if(Pt.tryLoc===xt){var ht=Pt.completion;if(ht.type==="throw"){var St=ht.arg;ct(Pt)}return St}}throw new Error("illegal catch attempt")},delegateYield:function(xt,bt,Pt){return this.delegate={iterator:Je(xt),resultName:bt,nextLoc:Pt},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,Ae){for(var me in Se)Ae[me]=Se[me]}ve.from&&ve.alloc&&ve.allocUnsafe&&ve.allocUnsafeSlow?Ue.exports=de:(Ee(de,Ie),Ie.Buffer=ke);function ke(Se,Ae,me){return ve(Se,Ae,me)}Ee(ve,ke),ke.from=function(Se,Ae,me){if(typeof Se=="number")throw new TypeError("Argument must not be a number");return ve(Se,Ae,me)},ke.alloc=function(Se,Ae,me){if(typeof Se!="number")throw new TypeError("Argument must be a number");var be=ve(Se);return Ae!==void 0?typeof me=="string"?be.fill(Ae,me):be.fill(Ae):be.fill(0),be},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(yt,tt){return new ke(yt,tt)},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(yt,tt){if(!(this instanceof ke))return new ke(yt,tt);var He=this;Ae(He),He.q=He.c="",He.bufferCheckPosition=ve.MAX_BUFFER_LENGTH,He.opt=tt||{},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=!!yt,He.noscript=!!(yt||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(yt){function tt(){}tt.prototype=yt;var He=new tt;return He}),Object.keys||(Object.keys=function(yt){var tt=[];for(var He in yt)yt.hasOwnProperty(He)&&tt.push(He);return tt});function Se(yt){for(var tt=Math.max(ve.MAX_BUFFER_LENGTH,10),He=0,we=0,Ne=Ee.length;we<Ne;we++){var Ve=yt[Ee[we]].length;if(Ve>tt)switch(Ee[we]){case"textNode":ct(yt);break;case"cdata":lt(yt,"oncdata",yt.cdata),yt.cdata="";break;case"script":lt(yt,"onscript",yt.script),yt.script="";break;default:Je(yt,"Max buffer length exceeded: "+Ee[we])}He=Math.max(He,Ve)}var nt=ve.MAX_BUFFER_LENGTH-He;yt.bufferCheckPosition=nt+yt.position}function Ae(yt){for(var tt=0,He=Ee.length;tt<He;tt++)yt[Ee[tt]]=""}function me(yt){ct(yt),yt.cdata!==""&&(lt(yt,"oncdata",yt.cdata),yt.cdata=""),yt.script!==""&&(lt(yt,"onscript",yt.script),yt.script="")}ke.prototype={end:function(){rt(this)},write:gt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){me(this)}};var be;try{be=oe("stream").Stream}catch(yt){be=function(){}}var fe=ve.EVENTS.filter(function(yt){return yt!=="error"&&yt!=="end"});function z(yt,tt){return new te(yt,tt)}function te(yt,tt){if(!(this instanceof te))return new te(yt,tt);be.apply(this),this._parser=new ke(yt,tt),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(Ne){if(!Ne)return He.removeAllListeners(we),He._parser["on"+we]=Ne,Ne;He.on(we,Ne)},enumerable:!0,configurable:!1})})}te.prototype=Object.create(be.prototype,{constructor:{value:te}}),te.prototype.write=function(yt){if(typeof de=="function"&&typeof de.isBuffer=="function"&&de.isBuffer(yt)){if(!this._decoder){var tt=oe("string_decoder").StringDecoder;this._decoder=new tt("utf8")}yt=this._decoder.write(yt)}return this._parser.write(yt.toString()),this.emit("data",yt),!0},te.prototype.end=function(yt){return yt&&yt.length&&this.write(yt),this._parser.end(),!0},te.prototype.on=function(yt,tt){var He=this;return!He._parser["on"+yt]&&fe.indexOf(yt)!==-1&&(He._parser["on"+yt]=function(){var we=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);we.splice(0,0,yt),He.emit.apply(He,we)}),be.prototype.on.call(He,yt,tt)};var se="[CDATA[",ie="DOCTYPE",le="http://www.w3.org/XML/1998/namespace",he="http://www.w3.org/2000/xmlns/",pe={xml:le,xmlns:he},xe=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,je=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,De=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Fe=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function Te(yt){return yt===" "||yt===`
|
|
`||yt==="\r"||yt===" "}function Me(yt){return yt==='"'||yt==="'"}function Be(yt){return yt===">"||Te(yt)}function Ge(yt,tt){return yt.test(tt)}function Ye(yt,tt){return!Ge(yt,tt)}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(yt){var tt=ve.ENTITIES[yt],He=typeof tt=="number"?String.fromCharCode(tt):tt;ve.ENTITIES[yt]=He});for(var Xe in ve.STATE)ve.STATE[ve.STATE[Xe]]=Xe;Ke=ve.STATE;function ot(yt,tt,He){yt[tt]&&yt[tt](He)}function lt(yt,tt,He){yt.textNode&&ct(yt),ot(yt,tt,He)}function ct(yt){yt.textNode=Ct(yt.opt,yt.textNode),yt.textNode&&ot(yt,"ontext",yt.textNode),yt.textNode=""}function Ct(yt,tt){return yt.trim&&(tt=tt.trim()),yt.normalize&&(tt=tt.replace(/\s+/g," ")),tt}function Je(yt,tt){return ct(yt),yt.trackPosition&&(tt+=`
|
|
Line: `+yt.line+`
|
|
Column: `+yt.column+`
|
|
Char: `+yt.c),tt=new Error(tt),yt.error=tt,ot(yt,"onerror",tt),yt}function rt(yt){return yt.sawRoot&&!yt.closedRoot&&xt(yt,"Unclosed root tag"),yt.state!==Ke.BEGIN&&yt.state!==Ke.BEGIN_WHITESPACE&&yt.state!==Ke.TEXT&&Je(yt,"Unexpected end"),ct(yt),yt.c="",yt.closed=!0,ot(yt,"onend"),ke.call(yt,yt.strict,yt.opt),yt}function xt(yt,tt){if(typeof yt!="object"||!(yt instanceof ke))throw new Error("bad call to strictFail");yt.strict&&Je(yt,tt)}function bt(yt){yt.strict||(yt.tagName=yt.tagName[yt.looseCase]());var tt=yt.tags[yt.tags.length-1]||yt,He=yt.tag={name:yt.tagName,attributes:{}};yt.opt.xmlns&&(He.ns=tt.ns),yt.attribList.length=0,lt(yt,"onopentagstart",He)}function Pt(yt,tt){var He=yt.indexOf(":"),we=He<0?["",yt]:yt.split(":"),Ne=we[0],Ve=we[1];return tt&&yt==="xmlns"&&(Ne="xmlns",Ve=""),{prefix:Ne,local:Ve}}function ht(yt){if(yt.strict||(yt.attribName=yt.attribName[yt.looseCase]()),yt.attribList.indexOf(yt.attribName)!==-1||yt.tag.attributes.hasOwnProperty(yt.attribName)){yt.attribName=yt.attribValue="";return}if(yt.opt.xmlns){var tt=Pt(yt.attribName,!0),He=tt.prefix,we=tt.local;if(He==="xmlns")if(we==="xml"&&yt.attribValue!==le)xt(yt,"xml: prefix must be bound to "+le+`
|
|
Actual: `+yt.attribValue);else if(we==="xmlns"&&yt.attribValue!==he)xt(yt,"xmlns: prefix must be bound to "+he+`
|
|
Actual: `+yt.attribValue);else{var Ne=yt.tag,Ve=yt.tags[yt.tags.length-1]||yt;Ne.ns===Ve.ns&&(Ne.ns=Object.create(Ve.ns)),Ne.ns[we]=yt.attribValue}yt.attribList.push([yt.attribName,yt.attribValue])}else yt.tag.attributes[yt.attribName]=yt.attribValue,lt(yt,"onattribute",{name:yt.attribName,value:yt.attribValue});yt.attribName=yt.attribValue=""}function St(yt,tt){if(yt.opt.xmlns){var He=yt.tag,we=Pt(yt.tagName);He.prefix=we.prefix,He.local=we.local,He.uri=He.ns[we.prefix]||"",He.prefix&&!He.uri&&(xt(yt,"Unbound namespace prefix: "+JSON.stringify(yt.tagName)),He.uri=we.prefix);var Ne=yt.tags[yt.tags.length-1]||yt;He.ns&&Ne.ns!==He.ns&&Object.keys(He.ns).forEach(function(Ft){lt(yt,"onopennamespace",{prefix:Ft,uri:He.ns[Ft]})});for(var Ve=0,nt=yt.attribList.length;Ve<nt;Ve++){var Re=yt.attribList[Ve],_e=Re[0],Ze=Re[1],qe=Pt(_e,!0),ut=qe.prefix,vt=qe.local,At=ut===""?"":He.ns[ut]||"",Et={name:_e,value:Ze,prefix:ut,local:vt,uri:At};ut&&ut!=="xmlns"&&!At&&(xt(yt,"Unbound namespace prefix: "+JSON.stringify(ut)),Et.uri=ut),yt.tag.attributes[_e]=Et,lt(yt,"onattribute",Et)}yt.attribList.length=0}yt.tag.isSelfClosing=!!tt,yt.sawRoot=!0,yt.tags.push(yt.tag),lt(yt,"onopentag",yt.tag),tt||(!yt.noscript&&yt.tagName.toLowerCase()==="script"?yt.state=Ke.SCRIPT:yt.state=Ke.TEXT,yt.tag=null,yt.tagName=""),yt.attribName=yt.attribValue="",yt.attribList.length=0}function mt(yt){if(!yt.tagName){xt(yt,"Weird empty close tag."),yt.textNode+="</>",yt.state=Ke.TEXT;return}if(yt.script){if(yt.tagName!=="script"){yt.script+="</"+yt.tagName+">",yt.tagName="",yt.state=Ke.SCRIPT;return}lt(yt,"onscript",yt.script),yt.script=""}var tt=yt.tags.length,He=yt.tagName;yt.strict||(He=He[yt.looseCase]());for(var we=He;tt--;){var Ne=yt.tags[tt];if(Ne.name!==we)xt(yt,"Unexpected close tag");else break}if(tt<0){xt(yt,"Unmatched closing tag: "+yt.tagName),yt.textNode+="</"+yt.tagName+">",yt.state=Ke.TEXT;return}yt.tagName=He;for(var Ve=yt.tags.length;Ve-- >tt;){var nt=yt.tag=yt.tags.pop();yt.tagName=yt.tag.name,lt(yt,"onclosetag",yt.tagName);var Re={};for(var _e in nt.ns)Re[_e]=nt.ns[_e];var Ze=yt.tags[yt.tags.length-1]||yt;yt.opt.xmlns&&nt.ns!==Ze.ns&&Object.keys(nt.ns).forEach(function(qe){var ut=nt.ns[qe];lt(yt,"onclosenamespace",{prefix:qe,uri:ut})})}tt===0&&(yt.closedRoot=!0),yt.tagName=yt.attribValue=yt.attribName="",yt.attribList.length=0,yt.state=Ke.TEXT}function Nt(yt){var tt=yt.entity,He=tt.toLowerCase(),we,Ne="";return yt.ENTITIES[tt]?yt.ENTITIES[tt]:yt.ENTITIES[He]?yt.ENTITIES[He]:(tt=He,tt.charAt(0)==="#"&&(tt.charAt(1)==="x"?(tt=tt.slice(2),we=parseInt(tt,16),Ne=we.toString(16)):(tt=tt.slice(1),we=parseInt(tt,10),Ne=we.toString(10))),tt=tt.replace(/^0+/,""),isNaN(we)||Ne.toLowerCase()!==tt?(xt(yt,"Invalid character entity"),"&"+yt.entity+";"):String.fromCodePoint(we))}function dt(yt,tt){tt==="<"?(yt.state=Ke.OPEN_WAKA,yt.startTagPosition=yt.position):Te(tt)||(xt(yt,"Non-whitespace before first tag."),yt.textNode=tt,yt.state=Ke.TEXT)}function Dt(yt,tt){var He="";return tt<yt.length&&(He=yt.charAt(tt)),He}function gt(yt){var tt=this;if(this.error)throw this.error;if(tt.closed)return Je(tt,"Cannot write after close. Assign an onready handler.");if(yt===null)return rt(tt);typeof yt=="object"&&(yt=yt.toString());for(var He=0,we="";we=Dt(yt,He++),tt.c=we,!!we;)switch(tt.trackPosition&&(tt.position++,we===`
|
|
`?(tt.line++,tt.column=0):tt.column++),tt.state){case Ke.BEGIN:if(tt.state=Ke.BEGIN_WHITESPACE,we==="\uFEFF")continue;dt(tt,we);continue;case Ke.BEGIN_WHITESPACE:dt(tt,we);continue;case Ke.TEXT:if(tt.sawRoot&&!tt.closedRoot){for(var Ne=He-1;we&&we!=="<"&&we!=="&";)we=Dt(yt,He++),we&&tt.trackPosition&&(tt.position++,we===`
|
|
`?(tt.line++,tt.column=0):tt.column++);tt.textNode+=yt.substring(Ne,He-1)}we==="<"&&!(tt.sawRoot&&tt.closedRoot&&!tt.strict)?(tt.state=Ke.OPEN_WAKA,tt.startTagPosition=tt.position):(!Te(we)&&(!tt.sawRoot||tt.closedRoot)&&xt(tt,"Text data outside of root node."),we==="&"?tt.state=Ke.TEXT_ENTITY:tt.textNode+=we);continue;case Ke.SCRIPT:we==="<"?tt.state=Ke.SCRIPT_ENDING:tt.script+=we;continue;case Ke.SCRIPT_ENDING:we==="/"?tt.state=Ke.CLOSE_TAG:(tt.script+="<"+we,tt.state=Ke.SCRIPT);continue;case Ke.OPEN_WAKA:if(we==="!")tt.state=Ke.SGML_DECL,tt.sgmlDecl="";else if(!Te(we))if(Ge(xe,we))tt.state=Ke.OPEN_TAG,tt.tagName=we;else if(we==="/")tt.state=Ke.CLOSE_TAG,tt.tagName="";else if(we==="?")tt.state=Ke.PROC_INST,tt.procInstName=tt.procInstBody="";else{if(xt(tt,"Unencoded <"),tt.startTagPosition+1<tt.position){var Ve=tt.position-tt.startTagPosition;we=new Array(Ve).join(" ")+we}tt.textNode+="<"+we,tt.state=Ke.TEXT}continue;case Ke.SGML_DECL:(tt.sgmlDecl+we).toUpperCase()===se?(lt(tt,"onopencdata"),tt.state=Ke.CDATA,tt.sgmlDecl="",tt.cdata=""):tt.sgmlDecl+we==="--"?(tt.state=Ke.COMMENT,tt.comment="",tt.sgmlDecl=""):(tt.sgmlDecl+we).toUpperCase()===ie?(tt.state=Ke.DOCTYPE,(tt.doctype||tt.sawRoot)&&xt(tt,"Inappropriately located doctype declaration"),tt.doctype="",tt.sgmlDecl=""):we===">"?(lt(tt,"onsgmldeclaration",tt.sgmlDecl),tt.sgmlDecl="",tt.state=Ke.TEXT):(Me(we)&&(tt.state=Ke.SGML_DECL_QUOTED),tt.sgmlDecl+=we);continue;case Ke.SGML_DECL_QUOTED:we===tt.q&&(tt.state=Ke.SGML_DECL,tt.q=""),tt.sgmlDecl+=we;continue;case Ke.DOCTYPE:we===">"?(tt.state=Ke.TEXT,lt(tt,"ondoctype",tt.doctype),tt.doctype=!0):(tt.doctype+=we,we==="["?tt.state=Ke.DOCTYPE_DTD:Me(we)&&(tt.state=Ke.DOCTYPE_QUOTED,tt.q=we));continue;case Ke.DOCTYPE_QUOTED:tt.doctype+=we,we===tt.q&&(tt.q="",tt.state=Ke.DOCTYPE);continue;case Ke.DOCTYPE_DTD:tt.doctype+=we,we==="]"?tt.state=Ke.DOCTYPE:Me(we)&&(tt.state=Ke.DOCTYPE_DTD_QUOTED,tt.q=we);continue;case Ke.DOCTYPE_DTD_QUOTED:tt.doctype+=we,we===tt.q&&(tt.state=Ke.DOCTYPE_DTD,tt.q="");continue;case Ke.COMMENT:we==="-"?tt.state=Ke.COMMENT_ENDING:tt.comment+=we;continue;case Ke.COMMENT_ENDING:we==="-"?(tt.state=Ke.COMMENT_ENDED,tt.comment=Ct(tt.opt,tt.comment),tt.comment&<(tt,"oncomment",tt.comment),tt.comment=""):(tt.comment+="-"+we,tt.state=Ke.COMMENT);continue;case Ke.COMMENT_ENDED:we!==">"?(xt(tt,"Malformed comment"),tt.comment+="--"+we,tt.state=Ke.COMMENT):tt.state=Ke.TEXT;continue;case Ke.CDATA:we==="]"?tt.state=Ke.CDATA_ENDING:tt.cdata+=we;continue;case Ke.CDATA_ENDING:we==="]"?tt.state=Ke.CDATA_ENDING_2:(tt.cdata+="]"+we,tt.state=Ke.CDATA);continue;case Ke.CDATA_ENDING_2:we===">"?(tt.cdata&<(tt,"oncdata",tt.cdata),lt(tt,"onclosecdata"),tt.cdata="",tt.state=Ke.TEXT):we==="]"?tt.cdata+="]":(tt.cdata+="]]"+we,tt.state=Ke.CDATA);continue;case Ke.PROC_INST:we==="?"?tt.state=Ke.PROC_INST_ENDING:Te(we)?tt.state=Ke.PROC_INST_BODY:tt.procInstName+=we;continue;case Ke.PROC_INST_BODY:if(!tt.procInstBody&&Te(we))continue;we==="?"?tt.state=Ke.PROC_INST_ENDING:tt.procInstBody+=we;continue;case Ke.PROC_INST_ENDING:we===">"?(lt(tt,"onprocessinginstruction",{name:tt.procInstName,body:tt.procInstBody}),tt.procInstName=tt.procInstBody="",tt.state=Ke.TEXT):(tt.procInstBody+="?"+we,tt.state=Ke.PROC_INST_BODY);continue;case Ke.OPEN_TAG:Ge(je,we)?tt.tagName+=we:(bt(tt),we===">"?St(tt):we==="/"?tt.state=Ke.OPEN_TAG_SLASH:(Te(we)||xt(tt,"Invalid character in tag name"),tt.state=Ke.ATTRIB));continue;case Ke.OPEN_TAG_SLASH:we===">"?(St(tt,!0),mt(tt)):(xt(tt,"Forward-slash in opening tag not followed by >"),tt.state=Ke.ATTRIB);continue;case Ke.ATTRIB:if(Te(we))continue;we===">"?St(tt):we==="/"?tt.state=Ke.OPEN_TAG_SLASH:Ge(xe,we)?(tt.attribName=we,tt.attribValue="",tt.state=Ke.ATTRIB_NAME):xt(tt,"Invalid attribute name");continue;case Ke.ATTRIB_NAME:we==="="?tt.state=Ke.ATTRIB_VALUE:we===">"?(xt(tt,"Attribute without value"),tt.attribValue=tt.attribName,ht(tt),St(tt)):Te(we)?tt.state=Ke.ATTRIB_NAME_SAW_WHITE:Ge(je,we)?tt.attribName+=we:xt(tt,"Invalid attribute name");continue;case Ke.ATTRIB_NAME_SAW_WHITE:if(we==="=")tt.state=Ke.ATTRIB_VALUE;else{if(Te(we))continue;xt(tt,"Attribute without value"),tt.tag.attributes[tt.attribName]="",tt.attribValue="",lt(tt,"onattribute",{name:tt.attribName,value:""}),tt.attribName="",we===">"?St(tt):Ge(xe,we)?(tt.attribName=we,tt.state=Ke.ATTRIB_NAME):(xt(tt,"Invalid attribute name"),tt.state=Ke.ATTRIB)}continue;case Ke.ATTRIB_VALUE:if(Te(we))continue;Me(we)?(tt.q=we,tt.state=Ke.ATTRIB_VALUE_QUOTED):(xt(tt,"Unquoted attribute value"),tt.state=Ke.ATTRIB_VALUE_UNQUOTED,tt.attribValue=we);continue;case Ke.ATTRIB_VALUE_QUOTED:if(we!==tt.q){we==="&"?tt.state=Ke.ATTRIB_VALUE_ENTITY_Q:tt.attribValue+=we;continue}ht(tt),tt.q="",tt.state=Ke.ATTRIB_VALUE_CLOSED;continue;case Ke.ATTRIB_VALUE_CLOSED:Te(we)?tt.state=Ke.ATTRIB:we===">"?St(tt):we==="/"?tt.state=Ke.OPEN_TAG_SLASH:Ge(xe,we)?(xt(tt,"No whitespace between attributes"),tt.attribName=we,tt.attribValue="",tt.state=Ke.ATTRIB_NAME):xt(tt,"Invalid attribute name");continue;case Ke.ATTRIB_VALUE_UNQUOTED:if(!Be(we)){we==="&"?tt.state=Ke.ATTRIB_VALUE_ENTITY_U:tt.attribValue+=we;continue}ht(tt),we===">"?St(tt):tt.state=Ke.ATTRIB;continue;case Ke.CLOSE_TAG:if(tt.tagName)we===">"?mt(tt):Ge(je,we)?tt.tagName+=we:tt.script?(tt.script+="</"+tt.tagName,tt.tagName="",tt.state=Ke.SCRIPT):(Te(we)||xt(tt,"Invalid tagname in closing tag"),tt.state=Ke.CLOSE_TAG_SAW_WHITE);else{if(Te(we))continue;Ye(xe,we)?tt.script?(tt.script+="</"+we,tt.state=Ke.SCRIPT):xt(tt,"Invalid tagname in closing tag."):tt.tagName=we}continue;case Ke.CLOSE_TAG_SAW_WHITE:if(Te(we))continue;we===">"?mt(tt):xt(tt,"Invalid characters in closing tag");continue;case Ke.TEXT_ENTITY:case Ke.ATTRIB_VALUE_ENTITY_Q:case Ke.ATTRIB_VALUE_ENTITY_U:var nt,Re;switch(tt.state){case Ke.TEXT_ENTITY:nt=Ke.TEXT,Re="textNode";break;case Ke.ATTRIB_VALUE_ENTITY_Q:nt=Ke.ATTRIB_VALUE_QUOTED,Re="attribValue";break;case Ke.ATTRIB_VALUE_ENTITY_U:nt=Ke.ATTRIB_VALUE_UNQUOTED,Re="attribValue";break}we===";"?(tt[Re]+=Nt(tt),tt.entity="",tt.state=nt):Ge(tt.entity.length?Fe:De,we)?tt.entity+=we:(xt(tt,"Invalid character in entity name"),tt[Re]+="&"+tt.entity+we,tt.entity="",tt.state=nt);continue;default:throw new Error(tt,"Unknown state: "+tt.state)}return tt.position>=tt.bufferCheckPosition&&Se(tt),tt}String.fromCodePoint||function(){var yt=String.fromCharCode,tt=Math.floor,He=function(){var we=16384,Ne=[],Ve,nt,Re=-1,_e=arguments.length;if(!_e)return"";for(var Ze="";++Re<_e;){var qe=Number(arguments[Re]);if(!isFinite(qe)||qe<0||qe>1114111||tt(qe)!==qe)throw RangeError("Invalid code point: "+qe);qe<=65535?Ne.push(qe):(qe-=65536,Ve=(qe>>10)+55296,nt=qe%1024+56320,Ne.push(Ve,nt)),(Re+1===_e||Ne.length>we)&&(Ze+=yt.apply(null,Ne),Ne.length=0)}return Ze};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 Ae=this;function me(le){ke.writable&&ke.write(le)===!1&&Ae.pause&&Ae.pause()}Ae.on("data",me);function be(){Ae.readable&&Ae.resume&&Ae.resume()}ke.on("drain",be),!ke._isStdio&&(!Se||Se.end!==!1)&&(Ae.on("end",z),Ae.on("close",te));var fe=!1;function z(){fe||(fe=!0,ke.end())}function te(){fe||(fe=!0,typeof ke.destroy=="function"&&ke.destroy())}function se(le){if(ie(),de.listenerCount(this,"error")===0)throw le}Ae.on("error",se),ke.on("error",se);function ie(){Ae.removeListener("data",me),ke.removeListener("drain",be),Ae.removeListener("end",z),Ae.removeListener("close",te),Ae.removeListener("error",se),ke.removeListener("error",se),Ae.removeListener("end",ie),Ae.removeListener("close",ie),ke.removeListener("close",ie)}return Ae.on("end",ie),Ae.on("close",ie),ke.on("close",ie),ke.emit("pipe",Ae),ke}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(oe,Ue,Ie){"use strict";function de(be,fe){be.prototype=Object.create(fe.prototype),be.prototype.constructor=be,be.__proto__=fe}var ve={};function Ee(be,fe,z){z||(z=Error);function te(ie,le,he){return typeof fe=="string"?fe:fe(ie,le,he)}var se=function(ie){de(le,ie);function le(he,pe,xe){return ie.call(this,te(he,pe,xe))||this}return le}(z);se.prototype.name=z.name,se.prototype.code=be,ve[be]=se}function ke(be,fe){if(Array.isArray(be)){var z=be.length;return be=be.map(function(te){return String(te)}),z>2?"one of ".concat(fe," ").concat(be.slice(0,z-1).join(", "),", or ")+be[z-1]:z===2?"one of ".concat(fe," ").concat(be[0]," or ").concat(be[1]):"of ".concat(fe," ").concat(be[0])}else return"of ".concat(fe," ").concat(String(be))}function Se(be,fe,z){return be.substr(!z||z<0?0:+z,fe.length)===fe}function Ae(be,fe,z){return(z===void 0||z>be.length)&&(z=be.length),be.substring(z-fe.length,z)===fe}function me(be,fe,z){return typeof z!="number"&&(z=0),z+fe.length>be.length?!1:be.indexOf(fe,z)!==-1}Ee("ERR_INVALID_OPT_VALUE",function(be,fe){return'The value "'+fe+'" is invalid for option "'+be+'"'},TypeError),Ee("ERR_INVALID_ARG_TYPE",function(be,fe,z){var te;typeof fe=="string"&&Se(fe,"not ")?(te="must not be",fe=fe.replace(/^not /,"")):te="must be";var se;if(Ae(be," argument"))se="The ".concat(be," ").concat(te," ").concat(ke(fe,"type"));else{var ie=me(be,".")?"property":"argument";se='The "'.concat(be,'" ').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(be){return"The "+be+" method is not implemented"}),Ee("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Ee("ERR_STREAM_DESTROYED",function(be){return"Cannot call "+be+" 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(be){return"Unknown encoding: "+be},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=be;var Ee=oe("./_stream_readable"),ke=oe("./_stream_writable");oe("inherits")(be,Ee);for(var Se=ve(ke.prototype),Ae=0;Ae<Se.length;Ae++){var me=Se[Ae];be.prototype[me]||(be.prototype[me]=ke.prototype[me])}function be(te){if(!(this instanceof be))return new be(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(be.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(be.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(be.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(be.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,Ze){return _e.listeners(Ze).length},Ae=oe("./internal/streams/stream"),me=oe("buffer").Buffer,be=(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 be}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"),he=oe("./internal/streams/state"),pe=he.getHighWaterMark,xe=oe("../errors").codes,je=xe.ERR_INVALID_ARG_TYPE,De=xe.ERR_STREAM_PUSH_AFTER_EOF,Fe=xe.ERR_METHOD_NOT_IMPLEMENTED,Te=xe.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Me,Be,Ge;oe("inherits")(lt,Ae);var Ye=le.errorOrDestroy,Ke=["error","close","destroy","pause","resume"];function Xe(Re,_e,Ze){if(typeof Re.prependListener=="function")return Re.prependListener(_e,Ze);!Re._events||!Re._events[_e]?Re.on(_e,Ze):Array.isArray(Re._events[_e])?Re._events[_e].unshift(Ze):Re._events[_e]=[Ze,Re._events[_e]]}function ot(Re,_e,Ze){Ee=Ee||oe("./_stream_duplex"),Re=Re||{},typeof Ze!="boolean"&&(Ze=_e instanceof Ee),this.objectMode=!!Re.objectMode,Ze&&(this.objectMode=this.objectMode||!!Re.readableObjectMode),this.highWaterMark=pe(this,Re,"readableHighWaterMark",Ze),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&&(Me||(Me=oe("string_decoder/").StringDecoder),this.decoder=new Me(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)),Ae.call(this)}Object.defineProperty(lt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(_e){this._readableState&&(this._readableState.destroyed=_e)}}),lt.prototype.destroy=le.destroy,lt.prototype._undestroy=le.undestroy,lt.prototype._destroy=function(Re,_e){_e(Re)},lt.prototype.push=function(Re,_e){var Ze=this._readableState,qe;return Ze.objectMode?qe=!0:typeof Re=="string"&&(_e=_e||Ze.defaultEncoding,_e!==Ze.encoding&&(Re=me.from(Re,_e),_e=""),qe=!0),ct(this,Re,_e,!1,qe)},lt.prototype.unshift=function(Re){return ct(this,Re,null,!0,!1)};function ct(Re,_e,Ze,qe,ut){se("readableAddChunk",_e);var vt=Re._readableState;if(_e===null)vt.reading=!1,Pt(Re,vt);else{var At;if(ut||(At=Je(vt,_e)),At)Ye(Re,At);else if(vt.objectMode||_e&&_e.length>0)if(typeof _e!="string"&&!vt.objectMode&&Object.getPrototypeOf(_e)!==me.prototype&&(_e=fe(_e)),qe)vt.endEmitted?Ye(Re,new Te):Ct(Re,vt,_e,!0);else if(vt.ended)Ye(Re,new De);else{if(vt.destroyed)return!1;vt.reading=!1,vt.decoder&&!Ze?(_e=vt.decoder.write(_e),vt.objectMode||_e.length!==0?Ct(Re,vt,_e,!1):mt(Re,vt)):Ct(Re,vt,_e,!1)}else qe||(vt.reading=!1,mt(Re,vt))}return!vt.ended&&(vt.length<vt.highWaterMark||vt.length===0)}function Ct(Re,_e,Ze,qe){_e.flowing&&_e.length===0&&!_e.sync?(_e.awaitDrain=0,Re.emit("data",Ze)):(_e.length+=_e.objectMode?1:Ze.length,qe?_e.buffer.unshift(Ze):_e.buffer.push(Ze),_e.needReadable&&ht(Re)),mt(Re,_e)}function Je(Re,_e){var Ze;return!z(_e)&&typeof _e!="string"&&_e!==void 0&&!Re.objectMode&&(Ze=new je("chunk",["string","Buffer","Uint8Array"],_e)),Ze}lt.prototype.isPaused=function(){return this._readableState.flowing===!1},lt.prototype.setEncoding=function(Re){Me||(Me=oe("string_decoder/").StringDecoder);var _e=new Me(Re);this._readableState.decoder=_e,this._readableState.encoding=this._readableState.decoder.encoding;for(var Ze=this._readableState.buffer.head,qe="";Ze!==null;)qe+=_e.write(Ze.data),Ze=Ze.next;return this._readableState.buffer.clear(),qe!==""&&this._readableState.buffer.push(qe),this._readableState.length=qe.length,this};var rt=1073741824;function xt(Re){return Re>=rt?Re=rt:(Re--,Re|=Re>>>1,Re|=Re>>>2,Re|=Re>>>4,Re|=Re>>>8,Re|=Re>>>16,Re++),Re}function bt(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=xt(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,Ze=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?Ne(this):ht(this),null;if(Re=bt(Re,_e),Re===0&&_e.ended)return _e.length===0&&Ne(this),null;var qe=_e.needReadable;se("need readable",qe),(_e.length===0||_e.length-Re<_e.highWaterMark)&&(qe=!0,se("length less than watermark",qe)),_e.ended||_e.reading?(qe=!1,se("reading or ended",qe)):qe&&(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=bt(Ze,_e)));var ut;return Re>0?ut=we(Re,_e):ut=null,ut===null?(_e.needReadable=_e.length<=_e.highWaterMark,Re=0):(_e.length-=Re,_e.awaitDrain=0),_e.length===0&&(_e.ended||(_e.needReadable=!0),Ze!==Re&&_e.ended&&Ne(this)),ut!==null&&this.emit("data",ut),ut};function Pt(Re,_e){if(se("onEofChunk"),!_e.ended){if(_e.decoder){var Ze=_e.decoder.end();Ze&&Ze.length&&(_e.buffer.push(Ze),_e.length+=_e.objectMode?1:Ze.length)}_e.ended=!0,_e.sync?ht(Re):(_e.needReadable=!1,_e.emittedReadable||(_e.emittedReadable=!0,St(Re)))}}function ht(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(St,Re))}function St(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 mt(Re,_e){_e.readingMore||(_e.readingMore=!0,de.nextTick(Nt,Re,_e))}function Nt(Re,_e){for(;!_e.reading&&!_e.ended&&(_e.length<_e.highWaterMark||_e.flowing&&_e.length===0);){var Ze=_e.length;if(se("maybeReadMore read 0"),Re.read(0),Ze===_e.length)break}_e.readingMore=!1}lt.prototype._read=function(Re){Ye(this,new Fe("_read()"))},lt.prototype.pipe=function(Re,_e){var Ze=this,qe=this._readableState;switch(qe.pipesCount){case 0:qe.pipes=Re;break;case 1:qe.pipes=[qe.pipes,Re];break;default:qe.pipes.push(Re);break}qe.pipesCount+=1,se("pipe count=%d opts=%j",qe.pipesCount,_e);var ut=(!_e||_e.end!==!1)&&Re!==de.stdout&&Re!==de.stderr,vt=ut?Et:un;qe.endEmitted?de.nextTick(vt):Ze.once("end",vt),Re.on("unpipe",At);function At(Sn,vn){se("onunpipe"),Sn===Ze&&vn&&vn.hasUnpiped===!1&&(vn.hasUnpiped=!0,Yt())}function Et(){se("onend"),Re.end()}var Ft=dt(Ze);Re.on("drain",Ft);var Kt=!1;function Yt(){se("cleanup"),Re.removeListener("close",sn),Re.removeListener("finish",rn),Re.removeListener("drain",Ft),Re.removeListener("error",Ht),Re.removeListener("unpipe",At),Ze.removeListener("end",Et),Ze.removeListener("end",un),Ze.removeListener("data",Vt),Kt=!0,qe.awaitDrain&&(!Re._writableState||Re._writableState.needDrain)&&Ft()}Ze.on("data",Vt);function Vt(Sn){se("ondata");var vn=Re.write(Sn);se("dest.write",vn),vn===!1&&((qe.pipesCount===1&&qe.pipes===Re||qe.pipesCount>1&&nt(qe.pipes,Re)!==-1)&&!Kt&&(se("false write response, pause",qe.awaitDrain),qe.awaitDrain++),Ze.pause())}function Ht(Sn){se("onerror",Sn),un(),Re.removeListener("error",Ht),Se(Re,"error")===0&&Ye(Re,Sn)}Xe(Re,"error",Ht);function sn(){Re.removeListener("finish",rn),un()}Re.once("close",sn);function rn(){se("onfinish"),Re.removeListener("close",sn),un()}Re.once("finish",rn);function un(){se("unpipe"),Ze.unpipe(Re)}return Re.emit("pipe",Ze),qe.flowing||(se("pipe resume"),Ze.resume()),Re};function dt(Re){return function(){var Ze=Re._readableState;se("pipeOnDrain",Ze.awaitDrain),Ze.awaitDrain&&Ze.awaitDrain--,Ze.awaitDrain===0&&Se(Re,"data")&&(Ze.flowing=!0,He(Re))}}lt.prototype.unpipe=function(Re){var _e=this._readableState,Ze={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,Ze),this);if(!Re){var qe=_e.pipes,ut=_e.pipesCount;_e.pipes=null,_e.pipesCount=0,_e.flowing=!1;for(var vt=0;vt<ut;vt++)qe[vt].emit("unpipe",this,{hasUnpiped:!1});return this}var At=nt(_e.pipes,Re);return At===-1?this:(_e.pipes.splice(At,1),_e.pipesCount-=1,_e.pipesCount===1&&(_e.pipes=_e.pipes[0]),Re.emit("unpipe",this,Ze),this)},lt.prototype.on=function(Re,_e){var Ze=Ae.prototype.on.call(this,Re,_e),qe=this._readableState;return Re==="data"?(qe.readableListening=this.listenerCount("readable")>0,qe.flowing!==!1&&this.resume()):Re==="readable"&&!qe.endEmitted&&!qe.readableListening&&(qe.readableListening=qe.needReadable=!0,qe.flowing=!1,qe.emittedReadable=!1,se("on readable",qe.length,qe.reading),qe.length?ht(this):qe.reading||de.nextTick(gt,this)),Ze},lt.prototype.addListener=lt.prototype.on,lt.prototype.removeListener=function(Re,_e){var Ze=Ae.prototype.removeListener.call(this,Re,_e);return Re==="readable"&&de.nextTick(Dt,this),Ze},lt.prototype.removeAllListeners=function(Re){var _e=Ae.prototype.removeAllListeners.apply(this,arguments);return(Re==="readable"||Re===void 0)&&de.nextTick(Dt,this),_e};function Dt(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 gt(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,yt(this,Re)),Re.paused=!1,this};function yt(Re,_e){_e.resumeScheduled||(_e.resumeScheduled=!0,de.nextTick(tt,Re,_e))}function tt(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,Ze=this._readableState,qe=!1;Re.on("end",function(){if(se("wrapped end"),Ze.decoder&&!Ze.ended){var At=Ze.decoder.end();At&&At.length&&_e.push(At)}_e.push(null)}),Re.on("data",function(At){if(se("wrapped data"),Ze.decoder&&(At=Ze.decoder.write(At)),!(Ze.objectMode&&At==null)&&!(!Ze.objectMode&&(!At||!At.length))){var Et=_e.push(At);Et||(qe=!0,Re.pause())}});for(var ut in Re)this[ut]===void 0&&typeof Re[ut]=="function"&&(this[ut]=function(Et){return function(){return Re[Et].apply(Re,arguments)}}(ut));for(var vt=0;vt<Ke.length;vt++)Re.on(Ke[vt],this.emit.bind(this,Ke[vt]));return this._read=function(At){se("wrapped _read",At),qe&&(qe=!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 Ze;return _e.objectMode?Ze=_e.buffer.shift():!Re||Re>=_e.length?(_e.decoder?Ze=_e.buffer.join(""):_e.buffer.length===1?Ze=_e.buffer.first():Ze=_e.buffer.concat(_e.length),_e.buffer.clear()):Ze=_e.buffer.consume(Re,_e.decoder),Ze}function Ne(Re){var _e=Re._readableState;se("endReadable",_e.endEmitted),_e.endEmitted||(_e.ended=!0,de.nextTick(Ve,_e,Re))}function Ve(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 Ze=_e._writableState;(!Ze||Ze.autoDestroy&&Ze.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 nt(Re,_e){for(var Ze=0,qe=Re.length;Ze<qe;Ze++)if(Re[Ze]===_e)return Ze;return-1}}).call(this)}).call(this,oe("_process"),typeof Mn!="undefined"?Mn: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=be;var de=oe("../errors").codes,ve=de.ERR_METHOD_NOT_IMPLEMENTED,Ee=de.ERR_MULTIPLE_CALLBACK,ke=de.ERR_TRANSFORM_ALREADY_TRANSFORMING,Se=de.ERR_TRANSFORM_WITH_LENGTH_0,Ae=oe("./_stream_duplex");oe("inherits")(be,Ae);function me(te,se){var ie=this._transformState;ie.transforming=!1;var le=ie.writecb;if(le===null)return this.emit("error",new Ee);ie.writechunk=null,ie.writecb=null,se!=null&&this.push(se),le(te);var he=this._readableState;he.reading=!1,(he.needReadable||he.length<he.highWaterMark)&&this._read(he.highWaterMark)}function be(te){if(!(this instanceof be))return new be(te);Ae.call(this,te),this._transformState={afterTransform:me.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,te&&(typeof te.transform=="function"&&(this._transform=te.transform),typeof te.flush=="function"&&(this._flush=te.flush)),this.on("prefinish",fe)}function fe(){var te=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(se,ie){z(te,se,ie)}):z(this,null,null)}be.prototype.push=function(te,se){return this._transformState.needTransform=!1,Ae.prototype.push.call(this,te,se)},be.prototype._transform=function(te,se,ie){ie(new ve("_transform()"))},be.prototype._write=function(te,se,ie){var le=this._transformState;if(le.writecb=ie,le.writechunk=te,le.writeencoding=se,!le.transforming){var he=this._readableState;(le.needTransform||he.needReadable||he.length<he.highWaterMark)&&this._read(he.highWaterMark)}},be.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},be.prototype._destroy=function(te,se){Ae.prototype._destroy.call(this,te,function(ie){se(ie)})};function z(te,se,ie){if(se)return te.emit("error",se);if(ie!=null&&te.push(ie),te._writableState.length)throw new Se;if(te._transformState.transforming)throw new ke;return te.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(oe,Ue,Ie){(function(de,ve){(function(){"use strict";Ue.exports=ot;function Ee(He,we,Ne){this.chunk=He,this.encoding=we,this.callback=Ne,this.next=null}function ke(He){var we=this;this.next=null,this.entry=null,this.finish=function(){tt(we,He)}}var Se;ot.WritableState=Ke;var Ae={deprecate:oe("util-deprecate")},me=oe("./internal/streams/stream"),be=oe("buffer").Buffer,fe=(typeof ve!="undefined"?ve:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function z(He){return be.from(He)}function te(He){return be.isBuffer(He)||He instanceof fe}var se=oe("./internal/streams/destroy"),ie=oe("./internal/streams/state"),le=ie.getHighWaterMark,he=oe("../errors").codes,pe=he.ERR_INVALID_ARG_TYPE,xe=he.ERR_METHOD_NOT_IMPLEMENTED,je=he.ERR_MULTIPLE_CALLBACK,De=he.ERR_STREAM_CANNOT_PIPE,Fe=he.ERR_STREAM_DESTROYED,Te=he.ERR_STREAM_NULL_VALUES,Me=he.ERR_STREAM_WRITE_AFTER_END,Be=he.ERR_UNKNOWN_ENCODING,Ge=se.errorOrDestroy;oe("inherits")(ot,me);function Ye(){}function Ke(He,we,Ne){Se=Se||oe("./_stream_duplex"),He=He||{},typeof Ne!="boolean"&&(Ne=we instanceof Se),this.objectMode=!!He.objectMode,Ne&&(this.objectMode=this.objectMode||!!He.writableObjectMode),this.highWaterMark=le(this,He,"writableHighWaterMark",Ne),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Ve=He.decodeStrings===!1;this.decodeStrings=!Ve,this.defaultEncoding=He.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(nt){Pt(we,nt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=He.emitClose!==!1,this.autoDestroy=!!He.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new ke(this)}Ke.prototype.getBuffer=function(){for(var we=this.bufferedRequest,Ne=[];we;)Ne.push(we),we=we.next;return Ne},function(){try{Object.defineProperty(Ke.prototype,"buffer",{get:Ae.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 Ne=new Me;Ge(He,Ne),de.nextTick(we,Ne)}function ct(He,we,Ne,Ve){var nt;return Ne===null?nt=new Te:typeof Ne!="string"&&!we.objectMode&&(nt=new pe("chunk",["string","Buffer"],Ne)),nt?(Ge(He,nt),de.nextTick(Ve,nt),!1):!0}ot.prototype.write=function(He,we,Ne){var Ve=this._writableState,nt=!1,Re=!Ve.objectMode&&te(He);return Re&&!be.isBuffer(He)&&(He=z(He)),typeof we=="function"&&(Ne=we,we=null),Re?we="buffer":we||(we=Ve.defaultEncoding),typeof Ne!="function"&&(Ne=Ye),Ve.ending?lt(this,Ne):(Re||ct(this,Ve,He,Ne))&&(Ve.pendingcb++,nt=Je(this,Ve,Re,He,we,Ne)),nt},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&&mt(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,Ne){return!He.objectMode&&He.decodeStrings!==!1&&typeof we=="string"&&(we=be.from(we,Ne)),we}Object.defineProperty(ot.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Je(He,we,Ne,Ve,nt,Re){if(!Ne){var _e=Ct(we,Ve,nt);Ve!==_e&&(Ne=!0,nt="buffer",Ve=_e)}var Ze=we.objectMode?1:Ve.length;we.length+=Ze;var qe=we.length<we.highWaterMark;if(qe||(we.needDrain=!0),we.writing||we.corked){var ut=we.lastBufferedRequest;we.lastBufferedRequest={chunk:Ve,encoding:nt,isBuf:Ne,callback:Re,next:null},ut?ut.next=we.lastBufferedRequest:we.bufferedRequest=we.lastBufferedRequest,we.bufferedRequestCount+=1}else rt(He,we,!1,Ze,Ve,nt,Re);return qe}function rt(He,we,Ne,Ve,nt,Re,_e){we.writelen=Ve,we.writecb=_e,we.writing=!0,we.sync=!0,we.destroyed?we.onwrite(new Fe("write")):Ne?He._writev(nt,we.onwrite):He._write(nt,Re,we.onwrite),we.sync=!1}function xt(He,we,Ne,Ve,nt){--we.pendingcb,Ne?(de.nextTick(nt,Ve),de.nextTick(gt,He,we),He._writableState.errorEmitted=!0,Ge(He,Ve)):(nt(Ve),He._writableState.errorEmitted=!0,Ge(He,Ve),gt(He,we))}function bt(He){He.writing=!1,He.writecb=null,He.length-=He.writelen,He.writelen=0}function Pt(He,we){var Ne=He._writableState,Ve=Ne.sync,nt=Ne.writecb;if(typeof nt!="function")throw new je;if(bt(Ne),we)xt(He,Ne,Ve,we,nt);else{var Re=Nt(Ne)||He.destroyed;!Re&&!Ne.corked&&!Ne.bufferProcessing&&Ne.bufferedRequest&&mt(He,Ne),Ve?de.nextTick(ht,He,Ne,Re,nt):ht(He,Ne,Re,nt)}}function ht(He,we,Ne,Ve){Ne||St(He,we),we.pendingcb--,Ve(),gt(He,we)}function St(He,we){we.length===0&&we.needDrain&&(we.needDrain=!1,He.emit("drain"))}function mt(He,we){we.bufferProcessing=!0;var Ne=we.bufferedRequest;if(He._writev&&Ne&&Ne.next){var Ve=we.bufferedRequestCount,nt=new Array(Ve),Re=we.corkedRequestsFree;Re.entry=Ne;for(var _e=0,Ze=!0;Ne;)nt[_e]=Ne,Ne.isBuf||(Ze=!1),Ne=Ne.next,_e+=1;nt.allBuffers=Ze,rt(He,we,!0,we.length,nt,"",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(;Ne;){var qe=Ne.chunk,ut=Ne.encoding,vt=Ne.callback,At=we.objectMode?1:qe.length;if(rt(He,we,!1,At,qe,ut,vt),Ne=Ne.next,we.bufferedRequestCount--,we.writing)break}Ne===null&&(we.lastBufferedRequest=null)}we.bufferedRequest=Ne,we.bufferProcessing=!1}ot.prototype._write=function(He,we,Ne){Ne(new xe("_write()"))},ot.prototype._writev=null,ot.prototype.end=function(He,we,Ne){var Ve=this._writableState;return typeof He=="function"?(Ne=He,He=null,we=null):typeof we=="function"&&(Ne=we,we=null),He!=null&&this.write(He,we),Ve.corked&&(Ve.corked=1,this.uncork()),Ve.ending||yt(this,Ve,Ne),this},Object.defineProperty(ot.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Nt(He){return He.ending&&He.length===0&&He.bufferedRequest===null&&!He.finished&&!He.writing}function dt(He,we){He._final(function(Ne){we.pendingcb--,Ne&&Ge(He,Ne),we.prefinished=!0,He.emit("prefinish"),gt(He,we)})}function Dt(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 gt(He,we){var Ne=Nt(we);if(Ne&&(Dt(He,we),we.pendingcb===0&&(we.finished=!0,He.emit("finish"),we.autoDestroy))){var Ve=He._readableState;(!Ve||Ve.autoDestroy&&Ve.endEmitted)&&He.destroy()}return Ne}function yt(He,we,Ne){we.ending=!0,gt(He,we),Ne&&(we.finished?de.nextTick(Ne):He.once("finish",Ne)),we.ended=!0,He.writable=!1}function tt(He,we,Ne){var Ve=He.entry;for(He.entry=null;Ve;){var nt=Ve.callback;we.pendingcb--,nt(Ne),Ve=Ve.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 Mn!="undefined"?Mn: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,Me,Be){return Me=ke(Me),Me in Te?Object.defineProperty(Te,Me,{value:Be,enumerable:!0,configurable:!0,writable:!0}):Te[Me]=Be,Te}function ke(Te){var Me=Se(Te,"string");return typeof Me=="symbol"?Me:String(Me)}function Se(Te,Me){if(typeof Te!="object"||Te===null)return Te;var Be=Te[Symbol.toPrimitive];if(Be!==void 0){var Ge=Be.call(Te,Me||"default");if(typeof Ge!="object")return Ge;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Me==="string"?String:Number)(Te)}var Ae=oe("./end-of-stream"),me=Symbol("lastResolve"),be=Symbol("lastReject"),fe=Symbol("error"),z=Symbol("ended"),te=Symbol("lastPromise"),se=Symbol("handlePromise"),ie=Symbol("stream");function le(Te,Me){return{value:Te,done:Me}}function he(Te){var Me=Te[me];if(Me!==null){var Be=Te[ie].read();Be!==null&&(Te[te]=null,Te[me]=null,Te[be]=null,Me(le(Be,!1)))}}function pe(Te){de.nextTick(he,Te)}function xe(Te,Me){return function(Be,Ge){Te.then(function(){if(Me[z]){Be(le(void 0,!0));return}Me[se](Be,Ge)},Ge)}}var je=Object.getPrototypeOf(function(){}),De=Object.setPrototypeOf((ve={get stream(){return this[ie]},next:function(){var Me=this,Be=this[fe];if(Be!==null)return Promise.reject(Be);if(this[z])return Promise.resolve(le(void 0,!0));if(this[ie].destroyed)return new Promise(function(Xe,ot){de.nextTick(function(){Me[fe]?ot(Me[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 Me=this;return new Promise(function(Be,Ge){Me[ie].destroy(null,function(Ye){if(Ye){Ge(Ye);return}Be(le(void 0,!0))})})}),ve),je),Fe=function(Me){var Be,Ge=Object.create(De,(Be={},Ee(Be,ie,{value:Me,writable:!0}),Ee(Be,me,{value:null,writable:!0}),Ee(Be,be,{value:null,writable:!0}),Ee(Be,fe,{value:null,writable:!0}),Ee(Be,z,{value:Me._readableState.endEmitted,writable:!0}),Ee(Be,se,{value:function(Ke,Xe){var ot=Ge[ie].read();ot?(Ge[te]=null,Ge[me]=null,Ge[be]=null,Ke(le(ot,!1))):(Ge[me]=Ke,Ge[be]=Xe)},writable:!0}),Be));return Ge[te]=null,Ae(Me,function(Ye){if(Ye&&Ye.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Ke=Ge[be];Ke!==null&&(Ge[te]=null,Ge[me]=null,Ge[be]=null,Ke(Ye)),Ge[fe]=Ye;return}var Xe=Ge[me];Xe!==null&&(Ge[te]=null,Ge[me]=null,Ge[be]=null,Xe(le(void 0,!0))),Ge[z]=!0}),Me.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(he,pe){var xe=Object.keys(he);if(Object.getOwnPropertySymbols){var je=Object.getOwnPropertySymbols(he);pe&&(je=je.filter(function(De){return Object.getOwnPropertyDescriptor(he,De).enumerable})),xe.push.apply(xe,je)}return xe}function ve(he){for(var pe=1;pe<arguments.length;pe++){var xe=arguments[pe]!=null?arguments[pe]:{};pe%2?de(Object(xe),!0).forEach(function(je){Ee(he,je,xe[je])}):Object.getOwnPropertyDescriptors?Object.defineProperties(he,Object.getOwnPropertyDescriptors(xe)):de(Object(xe)).forEach(function(je){Object.defineProperty(he,je,Object.getOwnPropertyDescriptor(xe,je))})}return he}function Ee(he,pe,xe){return pe=me(pe),pe in he?Object.defineProperty(he,pe,{value:xe,enumerable:!0,configurable:!0,writable:!0}):he[pe]=xe,he}function ke(he,pe){if(!(he instanceof pe))throw new TypeError("Cannot call a class as a function")}function Se(he,pe){for(var xe=0;xe<pe.length;xe++){var je=pe[xe];je.enumerable=je.enumerable||!1,je.configurable=!0,"value"in je&&(je.writable=!0),Object.defineProperty(he,me(je.key),je)}}function Ae(he,pe,xe){return pe&&Se(he.prototype,pe),xe&&Se(he,xe),Object.defineProperty(he,"prototype",{writable:!1}),he}function me(he){var pe=be(he,"string");return typeof pe=="symbol"?pe:String(pe)}function be(he,pe){if(typeof he!="object"||he===null)return he;var xe=he[Symbol.toPrimitive];if(xe!==void 0){var je=xe.call(he,pe||"default");if(typeof je!="object")return je;throw new TypeError("@@toPrimitive must return a primitive value.")}return(pe==="string"?String:Number)(he)}var fe=oe("buffer"),z=fe.Buffer,te=oe("util"),se=te.inspect,ie=se&&se.custom||"inspect";function le(he,pe,xe){z.prototype.copy.call(he,pe,xe)}Ue.exports=function(){function he(){ke(this,he),this.head=null,this.tail=null,this.length=0}return Ae(he,[{key:"push",value:function(xe){var je={data:xe,next:null};this.length>0?this.tail.next=je:this.head=je,this.tail=je,++this.length}},{key:"unshift",value:function(xe){var je={data:xe,next:this.head};this.length===0&&(this.tail=je),this.head=je,++this.length}},{key:"shift",value:function(){if(this.length!==0){var xe=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,xe}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(xe){if(this.length===0)return"";for(var je=this.head,De=""+je.data;je=je.next;)De+=xe+je.data;return De}},{key:"concat",value:function(xe){if(this.length===0)return z.alloc(0);for(var je=z.allocUnsafe(xe>>>0),De=this.head,Fe=0;De;)le(De.data,je,Fe),Fe+=De.data.length,De=De.next;return je}},{key:"consume",value:function(xe,je){var De;return xe<this.head.data.length?(De=this.head.data.slice(0,xe),this.head.data=this.head.data.slice(xe)):xe===this.head.data.length?De=this.shift():De=je?this._getString(xe):this._getBuffer(xe),De}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(xe){var je=this.head,De=1,Fe=je.data;for(xe-=Fe.length;je=je.next;){var Te=je.data,Me=xe>Te.length?Te.length:xe;if(Me===Te.length?Fe+=Te:Fe+=Te.slice(0,xe),xe-=Me,xe===0){Me===Te.length?(++De,je.next?this.head=je.next:this.head=this.tail=null):(this.head=je,je.data=Te.slice(Me));break}++De}return this.length-=De,Fe}},{key:"_getBuffer",value:function(xe){var je=z.allocUnsafe(xe),De=this.head,Fe=1;for(De.data.copy(je),xe-=De.data.length;De=De.next;){var Te=De.data,Me=xe>Te.length?Te.length:xe;if(Te.copy(je,je.length-xe,0,Me),xe-=Me,xe===0){Me===Te.length?(++Fe,De.next?this.head=De.next:this.head=this.tail=null):(this.head=De,De.data=Te.slice(Me));break}++Fe}return this.length-=Fe,je}},{key:ie,value:function(xe,je){return se(this,ve(ve({},je),{},{depth:0,customInspect:!1}))}}]),he}()},{buffer:90,util:89}],407:[function(oe,Ue,Ie){(function(de){(function(){"use strict";function ve(be,fe){var z=this,te=this._readableState&&this._readableState.destroyed,se=this._writableState&&this._writableState.destroyed;return te||se?(fe?fe(be):be&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,de.nextTick(Ae,this,be)):de.nextTick(Ae,this,be)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(be||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(be,fe){Ae(be,fe),ke(be)}function ke(be){be._writableState&&!be._writableState.emitClose||be._readableState&&!be._readableState.emitClose||be.emit("close")}function Se(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ae(be,fe){be.emit("error",fe)}function me(be,fe){var z=be._readableState,te=be._writableState;z&&z.autoDestroy||te&&te.autoDestroy?be.destroy(fe):be.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(Ae){var me=!1;return function(){if(!me){me=!0;for(var be=arguments.length,fe=new Array(be),z=0;z<be;z++)fe[z]=arguments[z];Ae.apply(this,fe)}}}function Ee(){}function ke(Ae){return Ae.setHeader&&typeof Ae.abort=="function"}function Se(Ae,me,be){if(typeof me=="function")return Se(Ae,null,me);me||(me={}),be=ve(be||Ee);var fe=me.readable||me.readable!==!1&&Ae.readable,z=me.writable||me.writable!==!1&&Ae.writable,te=function(){Ae.writable||ie()},se=Ae._writableState&&Ae._writableState.finished,ie=function(){z=!1,se=!0,fe||be.call(Ae)},le=Ae._readableState&&Ae._readableState.endEmitted,he=function(){fe=!1,le=!0,z||be.call(Ae)},pe=function(Fe){be.call(Ae,Fe)},xe=function(){var Fe;if(fe&&!le)return(!Ae._readableState||!Ae._readableState.ended)&&(Fe=new de),be.call(Ae,Fe);if(z&&!se)return(!Ae._writableState||!Ae._writableState.ended)&&(Fe=new de),be.call(Ae,Fe)},je=function(){Ae.req.on("finish",ie)};return ke(Ae)?(Ae.on("complete",ie),Ae.on("abort",xe),Ae.req?je():Ae.on("request",je)):z&&!Ae._writableState&&(Ae.on("end",te),Ae.on("close",te)),Ae.on("end",he),Ae.on("finish",ie),me.error!==!1&&Ae.on("error",pe),Ae.on("close",xe),function(){Ae.removeListener("complete",ie),Ae.removeListener("abort",xe),Ae.removeListener("request",je),Ae.req&&Ae.req.removeListener("finish",ie),Ae.removeListener("end",te),Ae.removeListener("close",te),Ae.removeListener("finish",ie),Ae.removeListener("end",he),Ae.removeListener("error",pe),Ae.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 Ae(ie){if(ie)throw ie}function me(ie){return ie.setHeader&&typeof ie.abort=="function"}function be(ie,le,he,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:he},function(De){if(De)return pe(De);xe=!0,pe()});var je=!1;return function(De){if(!xe&&!je){if(je=!0,me(ie))return ie.abort();if(typeof ie.destroy=="function")return ie.destroy();pe(De||new Se("pipe"))}}}function fe(ie){ie()}function z(ie,le){return ie.pipe(le)}function te(ie){return!ie.length||typeof ie[ie.length-1]!="function"?Ae:ie.pop()}function se(){for(var ie=arguments.length,le=new Array(ie),he=0;he<ie;he++)le[he]=arguments[he];var pe=te(le);if(Array.isArray(le[0])&&(le=le[0]),le.length<2)throw new ke("streams");var xe,je=le.map(function(De,Fe){var Te=Fe<le.length-1,Me=Fe>0;return be(De,Te,Me,function(Be){xe||(xe=Be),Be&&je.forEach(fe),!Te&&(je.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,Ae){return ke.highWaterMark!=null?ke.highWaterMark:Se?ke[Ae]:null}function Ee(ke,Se,Ae,me){var be=ve(Se,me,Ae);if(be!=null){if(!(isFinite(be)&&Math.floor(be)===be)||be<0){var fe=me?Ae:"highWaterMark";throw new de(fe,be)}return Math.floor(be)}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(je){switch(je=""+je,je&&je.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Ee(je){if(!je)return"utf8";for(var De;;)switch(je){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return je;default:if(De)return;je=(""+je).toLowerCase(),De=!0}}function ke(je){var De=Ee(je);if(typeof De!="string"&&(de.isEncoding===ve||!ve(je)))throw new Error("Unknown encoding: "+je);return De||je}Ie.StringDecoder=Se;function Se(je){this.encoding=ke(je);var De;switch(this.encoding){case"utf16le":this.text=se,this.end=ie,De=4;break;case"utf8":this.fillLast=fe,De=4;break;case"base64":this.text=le,this.end=he,De=3;break;default:this.write=pe,this.end=xe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=de.allocUnsafe(De)}Se.prototype.write=function(je){if(je.length===0)return"";var De,Fe;if(this.lastNeed){if(De=this.fillLast(je),De===void 0)return"";Fe=this.lastNeed,this.lastNeed=0}else Fe=0;return Fe<je.length?De?De+this.text(je,Fe):this.text(je,Fe):De||""},Se.prototype.end=te,Se.prototype.text=z,Se.prototype.fillLast=function(je){if(this.lastNeed<=je.length)return je.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);je.copy(this.lastChar,this.lastTotal-this.lastNeed,0,je.length),this.lastNeed-=je.length};function Ae(je){return je<=127?0:je>>5===6?2:je>>4===14?3:je>>3===30?4:je>>6===2?-1:-2}function me(je,De,Fe){var Te=De.length-1;if(Te<Fe)return 0;var Me=Ae(De[Te]);return Me>=0?(Me>0&&(je.lastNeed=Me-1),Me):--Te<Fe||Me===-2?0:(Me=Ae(De[Te]),Me>=0?(Me>0&&(je.lastNeed=Me-2),Me):--Te<Fe||Me===-2?0:(Me=Ae(De[Te]),Me>=0?(Me>0&&(Me===2?Me=0:je.lastNeed=Me-3),Me):0))}function be(je,De,Fe){if((De[0]&192)!==128)return je.lastNeed=0,"\uFFFD";if(je.lastNeed>1&&De.length>1){if((De[1]&192)!==128)return je.lastNeed=1,"\uFFFD";if(je.lastNeed>2&&De.length>2&&(De[2]&192)!==128)return je.lastNeed=2,"\uFFFD"}}function fe(je){var De=this.lastTotal-this.lastNeed,Fe=be(this,je,De);if(Fe!==void 0)return Fe;if(this.lastNeed<=je.length)return je.copy(this.lastChar,De,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);je.copy(this.lastChar,De,0,je.length),this.lastNeed-=je.length}function z(je,De){var Fe=me(this,je,De);if(!this.lastNeed)return je.toString("utf8",De);this.lastTotal=Fe;var Te=je.length-(Fe-this.lastNeed);return je.copy(this.lastChar,0,Te),je.toString("utf8",De,Te)}function te(je){var De=je&&je.length?this.write(je):"";return this.lastNeed?De+"\uFFFD":De}function se(je,De){if((je.length-De)%2===0){var Fe=je.toString("utf16le",De);if(Fe){var Te=Fe.charCodeAt(Fe.length-1);if(Te>=55296&&Te<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=je[je.length-2],this.lastChar[1]=je[je.length-1],Fe.slice(0,-1)}return Fe}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=je[je.length-1],je.toString("utf16le",De,je.length-1)}function ie(je){var De=je&&je.length?this.write(je):"";if(this.lastNeed){var Fe=this.lastTotal-this.lastNeed;return De+this.lastChar.toString("utf16le",0,Fe)}return De}function le(je,De){var Fe=(je.length-De)%3;return Fe===0?je.toString("base64",De):(this.lastNeed=3-Fe,this.lastTotal=3,Fe===1?this.lastChar[0]=je[je.length-1]:(this.lastChar[0]=je[je.length-2],this.lastChar[1]=je[je.length-1]),je.toString("base64",De,je.length-Fe))}function he(je){var De=je&&je.length?this.write(je):"";return this.lastNeed?De+this.lastChar.toString("base64",0,3-this.lastNeed):De}function pe(je){return je.toString(this.encoding)}function xe(je){return je&&je.length?this.write(je):""}},{"safe-buffer":396}],414:[function(oe,Ue,Ie){(function(de,ve){(function(){var Ee=oe("process/browser.js").nextTick,ke=Function.prototype.apply,Se=Array.prototype.slice,Ae={},me=0;Ie.setTimeout=function(){return new be(ke.call(setTimeout,window,arguments),clearTimeout)},Ie.setInterval=function(){return new be(ke.call(setInterval,window,arguments),clearInterval)},Ie.clearTimeout=Ie.clearInterval=function(fe){fe.close()};function be(fe,z){this._id=fe,this._clearFn=z}be.prototype.unref=be.prototype.ref=function(){},be.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 Ae[z]=!0,Ee(function(){Ae[z]&&(te?fe.apply(null,te):fe.call(null),Ie.clearImmediate(z))}),z},Ie.clearImmediate=typeof ve=="function"?ve:function(fe){delete Ae[fe]}}).call(this)}).call(this,oe("timers").setImmediate,oe("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(oe,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 Ae=!1;function me(){if(!Ae){if(Ee("throwDeprecation"))throw new Error(Se);Ee("traceDeprecation")?console.trace(Se):console.warn(Se),Ae=!0}return ke.apply(this,arguments)}return me}function Ee(ke){try{if(!de.localStorage)return!1}catch(Ae){return!1}var Se=de.localStorage[ke];return Se==null?!1:String(Se).toLowerCase()==="true"}}).call(this)}).call(this,typeof Mn!="undefined"?Mn: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(ut){return ut.call.bind(ut)}var Ae=typeof BigInt!="undefined",me=typeof Symbol!="undefined",be=Se(Object.prototype.toString),fe=Se(Number.prototype.valueOf),z=Se(String.prototype.valueOf),te=Se(Boolean.prototype.valueOf);if(Ae)var se=Se(BigInt.prototype.valueOf);if(me)var ie=Se(Symbol.prototype.valueOf);function le(ut,vt){if(typeof ut!="object")return!1;try{return vt(ut),!0}catch(At){return!1}}Ie.isArgumentsObject=de,Ie.isGeneratorFunction=ve,Ie.isTypedArray=ke;function he(ut){return typeof Promise!="undefined"&&ut instanceof Promise||ut!==null&&typeof ut=="object"&&typeof ut.then=="function"&&typeof ut.catch=="function"}Ie.isPromise=he;function pe(ut){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(ut):ke(ut)||mt(ut)}Ie.isArrayBufferView=pe;function xe(ut){return Ee(ut)==="Uint8Array"}Ie.isUint8Array=xe;function je(ut){return Ee(ut)==="Uint8ClampedArray"}Ie.isUint8ClampedArray=je;function De(ut){return Ee(ut)==="Uint16Array"}Ie.isUint16Array=De;function Fe(ut){return Ee(ut)==="Uint32Array"}Ie.isUint32Array=Fe;function Te(ut){return Ee(ut)==="Int8Array"}Ie.isInt8Array=Te;function Me(ut){return Ee(ut)==="Int16Array"}Ie.isInt16Array=Me;function Be(ut){return Ee(ut)==="Int32Array"}Ie.isInt32Array=Be;function Ge(ut){return Ee(ut)==="Float32Array"}Ie.isFloat32Array=Ge;function Ye(ut){return Ee(ut)==="Float64Array"}Ie.isFloat64Array=Ye;function Ke(ut){return Ee(ut)==="BigInt64Array"}Ie.isBigInt64Array=Ke;function Xe(ut){return Ee(ut)==="BigUint64Array"}Ie.isBigUint64Array=Xe;function ot(ut){return be(ut)==="[object Map]"}ot.working=typeof Map!="undefined"&&ot(new Map);function lt(ut){return typeof Map=="undefined"?!1:ot.working?ot(ut):ut instanceof Map}Ie.isMap=lt;function ct(ut){return be(ut)==="[object Set]"}ct.working=typeof Set!="undefined"&&ct(new Set);function Ct(ut){return typeof Set=="undefined"?!1:ct.working?ct(ut):ut instanceof Set}Ie.isSet=Ct;function Je(ut){return be(ut)==="[object WeakMap]"}Je.working=typeof WeakMap!="undefined"&&Je(new WeakMap);function rt(ut){return typeof WeakMap=="undefined"?!1:Je.working?Je(ut):ut instanceof WeakMap}Ie.isWeakMap=rt;function xt(ut){return be(ut)==="[object WeakSet]"}xt.working=typeof WeakSet!="undefined"&&xt(new WeakSet);function bt(ut){return xt(ut)}Ie.isWeakSet=bt;function Pt(ut){return be(ut)==="[object ArrayBuffer]"}Pt.working=typeof ArrayBuffer!="undefined"&&Pt(new ArrayBuffer);function ht(ut){return typeof ArrayBuffer=="undefined"?!1:Pt.working?Pt(ut):ut instanceof ArrayBuffer}Ie.isArrayBuffer=ht;function St(ut){return be(ut)==="[object DataView]"}St.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&St(new DataView(new ArrayBuffer(1),0,1));function mt(ut){return typeof DataView=="undefined"?!1:St.working?St(ut):ut instanceof DataView}Ie.isDataView=mt;var Nt=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function dt(ut){return be(ut)==="[object SharedArrayBuffer]"}function Dt(ut){return typeof Nt=="undefined"?!1:(typeof dt.working=="undefined"&&(dt.working=dt(new Nt)),dt.working?dt(ut):ut instanceof Nt)}Ie.isSharedArrayBuffer=Dt;function gt(ut){return be(ut)==="[object AsyncFunction]"}Ie.isAsyncFunction=gt;function yt(ut){return be(ut)==="[object Map Iterator]"}Ie.isMapIterator=yt;function tt(ut){return be(ut)==="[object Set Iterator]"}Ie.isSetIterator=tt;function He(ut){return be(ut)==="[object Generator]"}Ie.isGeneratorObject=He;function we(ut){return be(ut)==="[object WebAssembly.Module]"}Ie.isWebAssemblyCompiledModule=we;function Ne(ut){return le(ut,fe)}Ie.isNumberObject=Ne;function Ve(ut){return le(ut,z)}Ie.isStringObject=Ve;function nt(ut){return le(ut,te)}Ie.isBooleanObject=nt;function Re(ut){return Ae&&le(ut,se)}Ie.isBigIntObject=Re;function _e(ut){return me&&le(ut,ie)}Ie.isSymbolObject=_e;function Ze(ut){return Ne(ut)||Ve(ut)||nt(ut)||Re(ut)||_e(ut)}Ie.isBoxedPrimitive=Ze;function qe(ut){return typeof Uint8Array!="undefined"&&(ht(ut)||Dt(ut))}Ie.isAnyArrayBuffer=qe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ut){Object.defineProperty(Ie,ut,{enumerable:!1,value:function(){throw new Error(ut+" 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(Nt){for(var dt=Object.keys(Nt),Dt={},gt=0;gt<dt.length;gt++)Dt[dt[gt]]=Object.getOwnPropertyDescriptor(Nt,dt[gt]);return Dt},Ee=/%[sdj%]/g;Ie.format=function(mt){if(!Me(mt)){for(var Nt=[],dt=0;dt<arguments.length;dt++)Nt.push(me(arguments[dt]));return Nt.join(" ")}for(var dt=1,Dt=arguments,gt=Dt.length,yt=String(mt).replace(Ee,function(He){if(He==="%%")return"%";if(dt>=gt)return He;switch(He){case"%s":return String(Dt[dt++]);case"%d":return Number(Dt[dt++]);case"%j":try{return JSON.stringify(Dt[dt++])}catch(we){return"[Circular]"}default:return He}}),tt=Dt[dt];dt<gt;tt=Dt[++dt])De(tt)||!Ke(tt)?yt+=" "+tt:yt+=" "+me(tt);return yt},Ie.deprecate=function(mt,Nt){if(typeof de!="undefined"&&de.noDeprecation===!0)return mt;if(typeof de=="undefined")return function(){return Ie.deprecate(mt,Nt).apply(this,arguments)};var dt=!1;function Dt(){if(!dt){if(de.throwDeprecation)throw new Error(Nt);de.traceDeprecation?console.trace(Nt):console.error(Nt),dt=!0}return mt.apply(this,arguments)}return Dt};var ke={},Se=/^$/;if(de.env.NODE_DEBUG){var Ae=de.env.NODE_DEBUG;Ae=Ae.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Se=new RegExp("^"+Ae+"$","i")}Ie.debuglog=function(mt){if(mt=mt.toUpperCase(),!ke[mt])if(Se.test(mt)){var Nt=de.pid;ke[mt]=function(){var dt=Ie.format.apply(Ie,arguments);console.error("%s %d: %s",mt,Nt,dt)}}else ke[mt]=function(){};return ke[mt]};function me(mt,Nt){var dt={seen:[],stylize:fe};return arguments.length>=3&&(dt.depth=arguments[2]),arguments.length>=4&&(dt.colors=arguments[3]),je(Nt)?dt.showHidden=Nt:Nt&&Ie._extend(dt,Nt),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=be),te(dt,mt,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 be(mt,Nt){var dt=me.styles[Nt];return dt?"\x1B["+me.colors[dt][0]+"m"+mt+"\x1B["+me.colors[dt][1]+"m":mt}function fe(mt,Nt){return mt}function z(mt){var Nt={};return mt.forEach(function(dt,Dt){Nt[dt]=!0}),Nt}function te(mt,Nt,dt){if(mt.customInspect&&Nt&<(Nt.inspect)&&Nt.inspect!==Ie.inspect&&!(Nt.constructor&&Nt.constructor.prototype===Nt)){var Dt=Nt.inspect(dt,mt);return Me(Dt)||(Dt=te(mt,Dt,dt)),Dt}var gt=se(mt,Nt);if(gt)return gt;var yt=Object.keys(Nt),tt=z(yt);if(mt.showHidden&&(yt=Object.getOwnPropertyNames(Nt)),ot(Nt)&&(yt.indexOf("message")>=0||yt.indexOf("description")>=0))return ie(Nt);if(yt.length===0){if(lt(Nt)){var He=Nt.name?": "+Nt.name:"";return mt.stylize("[Function"+He+"]","special")}if(Ye(Nt))return mt.stylize(RegExp.prototype.toString.call(Nt),"regexp");if(Xe(Nt))return mt.stylize(Date.prototype.toString.call(Nt),"date");if(ot(Nt))return ie(Nt)}var we="",Ne=!1,Ve=["{","}"];if(xe(Nt)&&(Ne=!0,Ve=["[","]"]),lt(Nt)){var nt=Nt.name?": "+Nt.name:"";we=" [Function"+nt+"]"}if(Ye(Nt)&&(we=" "+RegExp.prototype.toString.call(Nt)),Xe(Nt)&&(we=" "+Date.prototype.toUTCString.call(Nt)),ot(Nt)&&(we=" "+ie(Nt)),yt.length===0&&(!Ne||Nt.length==0))return Ve[0]+we+Ve[1];if(dt<0)return Ye(Nt)?mt.stylize(RegExp.prototype.toString.call(Nt),"regexp"):mt.stylize("[Object]","special");mt.seen.push(Nt);var Re;return Ne?Re=le(mt,Nt,dt,tt,yt):Re=yt.map(function(_e){return he(mt,Nt,dt,tt,_e,Ne)}),mt.seen.pop(),pe(Re,we,Ve)}function se(mt,Nt){if(Ge(Nt))return mt.stylize("undefined","undefined");if(Me(Nt)){var dt="'"+JSON.stringify(Nt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return mt.stylize(dt,"string")}if(Te(Nt))return mt.stylize(""+Nt,"number");if(je(Nt))return mt.stylize(""+Nt,"boolean");if(De(Nt))return mt.stylize("null","null")}function ie(mt){return"["+Error.prototype.toString.call(mt)+"]"}function le(mt,Nt,dt,Dt,gt){for(var yt=[],tt=0,He=Nt.length;tt<He;++tt)bt(Nt,String(tt))?yt.push(he(mt,Nt,dt,Dt,String(tt),!0)):yt.push("");return gt.forEach(function(we){we.match(/^\d+$/)||yt.push(he(mt,Nt,dt,Dt,we,!0))}),yt}function he(mt,Nt,dt,Dt,gt,yt){var tt,He,we;if(we=Object.getOwnPropertyDescriptor(Nt,gt)||{value:Nt[gt]},we.get?we.set?He=mt.stylize("[Getter/Setter]","special"):He=mt.stylize("[Getter]","special"):we.set&&(He=mt.stylize("[Setter]","special")),bt(Dt,gt)||(tt="["+gt+"]"),He||(mt.seen.indexOf(we.value)<0?(De(dt)?He=te(mt,we.value,null):He=te(mt,we.value,dt-1),He.indexOf(`
|
|
`)>-1&&(yt?He=He.split(`
|
|
`).map(function(Ne){return" "+Ne}).join(`
|
|
`).slice(2):He=`
|
|
`+He.split(`
|
|
`).map(function(Ne){return" "+Ne}).join(`
|
|
`))):He=mt.stylize("[Circular]","special")),Ge(tt)){if(yt&>.match(/^\d+$/))return He;tt=JSON.stringify(""+gt),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=mt.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=mt.stylize(tt,"string"))}return tt+": "+He}function pe(mt,Nt,dt){var Dt=0,gt=mt.reduce(function(yt,tt){return Dt++,tt.indexOf(`
|
|
`)>=0&&Dt++,yt+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return gt>60?dt[0]+(Nt===""?"":Nt+`
|
|
`)+" "+mt.join(`,
|
|
`)+" "+dt[1]:dt[0]+Nt+" "+mt.join(", ")+" "+dt[1]}Ie.types=oe("./support/types");function xe(mt){return Array.isArray(mt)}Ie.isArray=xe;function je(mt){return typeof mt=="boolean"}Ie.isBoolean=je;function De(mt){return mt===null}Ie.isNull=De;function Fe(mt){return mt==null}Ie.isNullOrUndefined=Fe;function Te(mt){return typeof mt=="number"}Ie.isNumber=Te;function Me(mt){return typeof mt=="string"}Ie.isString=Me;function Be(mt){return typeof mt=="symbol"}Ie.isSymbol=Be;function Ge(mt){return mt===void 0}Ie.isUndefined=Ge;function Ye(mt){return Ke(mt)&&Ct(mt)==="[object RegExp]"}Ie.isRegExp=Ye,Ie.types.isRegExp=Ye;function Ke(mt){return typeof mt=="object"&&mt!==null}Ie.isObject=Ke;function Xe(mt){return Ke(mt)&&Ct(mt)==="[object Date]"}Ie.isDate=Xe,Ie.types.isDate=Xe;function ot(mt){return Ke(mt)&&(Ct(mt)==="[object Error]"||mt instanceof Error)}Ie.isError=ot,Ie.types.isNativeError=ot;function lt(mt){return typeof mt=="function"}Ie.isFunction=lt;function ct(mt){return mt===null||typeof mt=="boolean"||typeof mt=="number"||typeof mt=="string"||typeof mt=="symbol"||typeof mt=="undefined"}Ie.isPrimitive=ct,Ie.isBuffer=oe("./support/isBuffer");function Ct(mt){return Object.prototype.toString.call(mt)}function Je(mt){return mt<10?"0"+mt.toString(10):mt.toString(10)}var rt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xt(){var mt=new Date,Nt=[Je(mt.getHours()),Je(mt.getMinutes()),Je(mt.getSeconds())].join(":");return[mt.getDate(),rt[mt.getMonth()],Nt].join(" ")}Ie.log=function(){console.log("%s - %s",xt(),Ie.format.apply(Ie,arguments))},Ie.inherits=oe("inherits"),Ie._extend=function(mt,Nt){if(!Nt||!Ke(Nt))return mt;for(var dt=Object.keys(Nt),Dt=dt.length;Dt--;)mt[dt[Dt]]=Nt[dt[Dt]];return mt};function bt(mt,Nt){return Object.prototype.hasOwnProperty.call(mt,Nt)}var Pt=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;Ie.promisify=function(Nt){if(typeof Nt!="function")throw new TypeError('The "original" argument must be of type Function');if(Pt&&Nt[Pt]){var dt=Nt[Pt];if(typeof dt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(dt,Pt,{value:dt,enumerable:!1,writable:!1,configurable:!0}),dt}function dt(){for(var Dt,gt,yt=new Promise(function(we,Ne){Dt=we,gt=Ne}),tt=[],He=0;He<arguments.length;He++)tt.push(arguments[He]);tt.push(function(we,Ne){we?gt(we):Dt(Ne)});try{Nt.apply(this,tt)}catch(we){gt(we)}return yt}return Object.setPrototypeOf(dt,Object.getPrototypeOf(Nt)),Pt&&Object.defineProperty(dt,Pt,{value:dt,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(dt,ve(Nt))},Ie.promisify.custom=Pt;function ht(mt,Nt){if(!mt){var dt=new Error("Promise was rejected with a falsy value");dt.reason=mt,mt=dt}return Nt(mt)}function St(mt){if(typeof mt!="function")throw new TypeError('The "original" argument must be of type Function');function Nt(){for(var dt=[],Dt=0;Dt<arguments.length;Dt++)dt.push(arguments[Dt]);var gt=dt.pop();if(typeof gt!="function")throw new TypeError("The last argument must be of type Function");var yt=this,tt=function(){return gt.apply(yt,arguments)};mt.apply(this,dt).then(function(He){de.nextTick(tt.bind(null,null,He))},function(He){de.nextTick(ht.bind(null,He,tt))})}return Object.setPrototypeOf(Nt,Object.getPrototypeOf(mt)),Object.defineProperties(Nt,ve(mt)),Nt}Ie.callbackify=St}).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"),Ae=oe("gopd"),me=Se("Object.prototype.toString"),be=oe("has-tostringtag/shams")(),fe=typeof globalThis=="undefined"?de:globalThis,z=Ee(),te=Se("String.prototype.slice"),se=Object.getPrototypeOf,ie=Se("Array.prototype.indexOf",!0)||function(je,De){for(var Fe=0;Fe<je.length;Fe+=1)if(je[Fe]===De)return Fe;return-1},le={__proto__:null};be&&Ae&&se?ve(z,function(xe){var je=new fe[xe];if(Symbol.toStringTag in je){var De=se(je),Fe=Ae(De,Symbol.toStringTag);if(!Fe){var Te=se(De);Fe=Ae(Te,Symbol.toStringTag)}le["$"+xe]=ke(Fe.get)}}):ve(z,function(xe){var je=new fe[xe];le["$"+xe]=ke(je.slice)});var he=function(je){var De=!1;return ve(le,function(Fe,Te){if(!De)try{"$"+Fe(je)===Te&&(De=te(Te,1))}catch(Me){}}),De},pe=function(je){var De=!1;return ve(le,function(Fe,Te){if(!De)try{Fe(je),De=te(Te,1)}catch(Me){}}),De};Ue.exports=function(je){if(!je||typeof je!="object")return!1;if(!be){var De=te(me(je),8,-1);return ie(z,De)>-1?De:De!=="Object"?!1:pe(je)}return Ae?he(je):null}}).call(this)}).call(this,typeof Mn!="undefined"?Mn: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,Ae={}.hasOwnProperty;de=oe("xmlbuilder"),ve=oe("./defaults").defaults,ke=function(me){return typeof me=="string"&&(me.indexOf("&")>=0||me.indexOf(">")>=0||me.indexOf("<")>=0)},Se=function(me){return"<![CDATA["+Ee(me)+"]]>"},Ee=function(me){return me.replace("]]>","]]]]><![CDATA[>")},Ie.Builder=function(){function me(be){var fe,z,te;this.options={},z=ve["0.2"];for(fe in z)Ae.call(z,fe)&&(te=z[fe],this.options[fe]=te);for(fe in be)Ae.call(be,fe)&&(te=be[fe],this.options[fe]=te)}return me.prototype.buildObject=function(be){var fe,z,te,se,ie;return fe=this.options.attrkey,z=this.options.charkey,Object.keys(be).length===1&&this.options.rootName===ve["0.2"].rootName?(ie=Object.keys(be)[0],be=be[ie]):ie=this.options.rootName,te=function(le){return function(he,pe){var xe,je,De,Fe,Te,Me;if(typeof pe!="object")le.options.cdata&&ke(pe)?he.raw(Se(pe)):he.txt(pe);else if(Array.isArray(pe)){for(Fe in pe)if(Ae.call(pe,Fe)){je=pe[Fe];for(Te in je)De=je[Te],he=te(he.ele(Te),De).up()}}else for(Te in pe)if(Ae.call(pe,Te))if(je=pe[Te],Te===fe){if(typeof je=="object")for(xe in je)Me=je[xe],he=he.att(xe,Me)}else if(Te===z)le.options.cdata&&ke(je)?he=he.raw(Se(je)):he=he.txt(je);else if(Array.isArray(je))for(Fe in je)Ae.call(je,Fe)&&(De=je[Fe],typeof De=="string"?le.options.cdata&&ke(De)?he=he.ele(Te).raw(Se(De)).up():he=he.ele(Te,De).up():he=te(he.ele(Te),De).up());else typeof je=="object"?he=te(he.ele(Te),je).up():typeof je=="string"&&le.options.cdata&&ke(je)?he=he.ele(Te).raw(Se(je)).up():(je==null&&(je=""),he=he.ele(Te,je.toString()).up());return he}}(this),se=de.create(ie,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),te(se,be).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,Ae,me,be,fe,z=function(ie,le){return function(){return ie.apply(le,arguments)}},te=function(ie,le){for(var he in le)se.call(le,he)&&(ie[he]=le[he]);function pe(){this.constructor=ie}return pe.prototype=le.prototype,ie.prototype=new pe,ie.__super__=le.prototype,ie},se={}.hasOwnProperty;be=oe("sax"),ke=oe("events"),de=oe("./bom"),me=oe("./processors"),fe=oe("timers").setImmediate,ve=oe("./defaults").defaults,Se=function(ie){return typeof ie=="object"&&ie!=null&&Object.keys(ie).length===0},Ae=function(ie,le,he){var pe,xe,je;for(pe=0,xe=ie.length;pe<xe;pe++)je=ie[pe],le=je(le,he);return le},Ee=function(ie,le,he){var pe;return pe=Object.create(null),pe.value=he,pe.writable=!0,pe.enumerable=!0,pe.configurable=!0,Object.defineProperty(ie,le,pe)},Ie.Parser=function(ie){te(le,ie);function le(he){this.parseStringPromise=z(this.parseStringPromise,this),this.parseString=z(this.parseString,this),this.reset=z(this.reset,this),this.assignOrPush=z(this.assignOrPush,this),this.processAsync=z(this.processAsync,this);var pe,xe,je;if(!(this instanceof Ie.Parser))return new Ie.Parser(he);this.options={},xe=ve["0.2"];for(pe in xe)se.call(xe,pe)&&(je=xe[pe],this.options[pe]=je);for(pe in he)se.call(he,pe)&&(je=he[pe],this.options[pe]=je);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(me.normalize)),this.reset()}return le.prototype.processAsync=function(){var he,pe;try{return this.remaining.length<=this.options.chunkSize?(he=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(he),this.saxParser.close()):(he=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(he),fe(this.processAsync))}catch(xe){if(pe=xe,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(pe)}},le.prototype.assignOrPush=function(he,pe,xe){return pe in he?(he[pe]instanceof Array||Ee(he,pe,[he[pe]]),he[pe].push(xe)):this.options.explicitArray?Ee(he,pe,[xe]):Ee(he,pe,xe)},le.prototype.reset=function(){var he,pe,xe,je;return this.removeAllListeners(),this.saxParser=be.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(De){return function(Fe){if(De.saxParser.resume(),!De.saxParser.errThrown)return De.saxParser.errThrown=!0,De.emit("error",Fe)}}(this),this.saxParser.onend=function(De){return function(){if(!De.saxParser.ended)return De.saxParser.ended=!0,De.emit("end",De.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,je=[],he=this.options.attrkey,pe=this.options.charkey,this.saxParser.onopentag=function(De){return function(Fe){var Te,Me,Be,Ge,Ye;if(Be={},Be[pe]="",!De.options.ignoreAttrs){Ye=Fe.attributes;for(Te in Ye)se.call(Ye,Te)&&(!(he in Be)&&!De.options.mergeAttrs&&(Be[he]={}),Me=De.options.attrValueProcessors?Ae(De.options.attrValueProcessors,Fe.attributes[Te],Te):Fe.attributes[Te],Ge=De.options.attrNameProcessors?Ae(De.options.attrNameProcessors,Te):Te,De.options.mergeAttrs?De.assignOrPush(Be,Ge,Me):Ee(Be[he],Ge,Me))}return Be["#name"]=De.options.tagNameProcessors?Ae(De.options.tagNameProcessors,Fe.name):Fe.name,De.options.xmlns&&(Be[De.options.xmlnskey]={uri:Fe.uri,local:Fe.local}),je.push(Be)}}(this),this.saxParser.onclosetag=function(De){return function(){var Fe,Te,Me,Be,Ge,Ye,Ke,Xe,ot,lt;if(Ye=je.pop(),Ge=Ye["#name"],(!De.options.explicitChildren||!De.options.preserveChildrenOrder)&&delete Ye["#name"],Ye.cdata===!0&&(Fe=Ye.cdata,delete Ye.cdata),ot=je[je.length-1],Ye[pe].match(/^\s*$/)&&!Fe?(Te=Ye[pe],delete Ye[pe]):(De.options.trim&&(Ye[pe]=Ye[pe].trim()),De.options.normalize&&(Ye[pe]=Ye[pe].replace(/\s{2,}/g," ").trim()),Ye[pe]=De.options.valueProcessors?Ae(De.options.valueProcessors,Ye[pe],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 ct,Ct,Je;for(Je=[],ct=0,Ct=je.length;ct<Ct;ct++)Be=je[ct],Je.push(Be["#name"]);return Je}().concat(Ge).join("/"),function(){var ct;try{return Ye=De.options.validator(lt,ot&&ot[Ge],Ye)}catch(Ct){return ct=Ct,De.emit("error",ct)}}()),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(Me in Ye)se.call(Ye,Me)&&Ee(Ke,Me,Ye[Me]);ot[De.options.childkey].push(Ke),delete Ye["#name"],Object.keys(Ye).length===1&&pe in Ye&&!De.EXPLICIT_CHARKEY&&(Ye=Ye[pe])}}return je.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,Me;if(Me=je[je.length-1],Me)return Me[pe]+=Fe,De.options.explicitChildren&&De.options.preserveChildrenOrder&&De.options.charsAsChildren&&(De.options.includeWhiteChars||Fe.replace(/\\n/g,"").trim()!=="")&&(Me[De.options.childkey]=Me[De.options.childkey]||[],Te={"#name":"__text__"},Te[pe]=Fe,De.options.normalize&&(Te[pe]=Te[pe].replace(/\s{2,}/g," ").trim()),Me[De.options.childkey].push(Te)),Me}}(this),this.saxParser.ontext=xe,this.saxParser.oncdata=function(De){return function(Fe){var Te;if(Te=xe(Fe),Te)return Te.cdata=!0}}(this)},le.prototype.parseString=function(he,pe){var xe;pe!=null&&typeof pe=="function"&&(this.on("end",function(je){return this.reset(),pe(null,je)}),this.on("error",function(je){return this.reset(),pe(je)}));try{return he=he.toString(),he.trim()===""?(this.emit("end",null),!0):(he=de.stripBOM(he),this.options.async?(this.remaining=he,fe(this.processAsync),this.saxParser):this.saxParser.write(he).close())}catch(je){if(xe=je,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw xe}else return this.emit("error",xe),this.saxParser.errThrown=!0}},le.prototype.parseStringPromise=function(he){return new Promise(function(pe){return function(xe,je){return pe.parseString(he,function(De,Fe){return De?je(De):xe(Fe)})}}(this))},le}(ke),Ie.parseString=function(ie,le,he){var pe,xe,je;return he!=null?(typeof he=="function"&&(pe=he),typeof le=="object"&&(xe=le)):(typeof le=="function"&&(pe=le),xe={}),je=new Ie.Parser(xe),je.parseString(ie,pe)},Ie.parseStringPromise=function(ie,le){var he,pe;return typeof le=="object"&&(he=le),pe=new Ie.Parser(he),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,be){for(var fe in be)Ae.call(be,fe)&&(me[fe]=be[fe]);function z(){this.constructor=me}return z.prototype=be.prototype,me.prototype=new z,me.__super__=be.prototype,me},Ae={}.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(be,me);function be(fe){this.message=fe}return be}(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,Ae,me,be=[].slice,fe={}.hasOwnProperty;de=function(){var z,te,se,ie,le,he;if(he=arguments[0],le=2<=arguments.length?be.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)&&(he[te]=ie[te]);return he},Se=function(z){return!!z&&Object.prototype.toString.call(z)==="[object Function]"},Ae=function(z){var te;return!!z&&((te=typeof z)=="function"||te==="object")},Ee=function(z){return Se(Array.isArray)?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"},ke=function(z){var te;if(Ee(z))return!z.length;for(te in z)if(fe.call(z,te))return!1;return!0},me=function(z){var te,se;return Ae(z)&&(se=Object.getPrototypeOf(z))&&(te=se.constructor)&&typeof te=="function"&&te instanceof te&&Function.prototype.toString.call(te)===Function.prototype.toString.call(Object)},ve=function(z){return Se(z.valueOf)?z.valueOf():z},Ue.exports.assign=de,Ue.exports.isFunction=Se,Ue.exports.isObject=Ae,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,Ae,me){if(this.parent=Se,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),Ae==null)throw new Error("Missing attribute name. "+this.debugInfo(Ae));this.name=this.stringify.name(Ae),this.value=this.stringify.attValue(me),this.type=de.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(ke.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(ke.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(ke.prototype,"textContent",{get:function(){return this.value},set:function(Se){return this.value=Se||""}}),Object.defineProperty(ke.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(ke.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(ke.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(ke.prototype,"specified",{get:function(){return!0}}),ke.prototype.clone=function(){return Object.create(this)},ke.prototype.toString=function(Se){return this.options.writer.attribute(this,this.options.writer.filterOptions(Se))},ke.prototype.debugInfo=function(Se){return Se=Se||this.name,Se==null?"parent: <"+this.parent.name+">":"attribute: {"+Se+"}, parent: <"+this.parent.name+">"},ke.prototype.isEqualNode=function(Se){return!(Se.namespaceURI!==this.namespaceURI||Se.prefix!==this.prefix||Se.localName!==this.localName||Se.value!==this.value)},ke}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke=function(Ae,me){for(var be in me)Se.call(me,be)&&(Ae[be]=me[be]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),Ee=oe("./XMLCharacterData"),Ue.exports=ve=function(Ae){ke(me,Ae);function me(be,fe){if(me.__super__.constructor.call(this,be),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(be){return this.options.writer.cdata(this,this.options.writer.filterOptions(be))},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(oe,Ue,Ie){(function(){var de,ve,Ee=function(Se,Ae){for(var me in Ae)ke.call(Ae,me)&&(Se[me]=Ae[me]);function be(){this.constructor=Se}return be.prototype=Ae.prototype,Se.prototype=new be,Se.__super__=Ae.prototype,Se},ke={}.hasOwnProperty;ve=oe("./XMLNode"),Ue.exports=de=function(Se){Ee(Ae,Se);function Ae(me){Ae.__super__.constructor.call(this,me),this.value=""}return Object.defineProperty(Ae.prototype,"data",{get:function(){return this.value},set:function(me){return this.value=me||""}}),Object.defineProperty(Ae.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(Ae.prototype,"textContent",{get:function(){return this.value},set:function(me){return this.value=me||""}}),Ae.prototype.clone=function(){return Object.create(this)},Ae.prototype.substringData=function(me,be){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.appendData=function(me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.insertData=function(me,be){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.deleteData=function(me,be){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.replaceData=function(me,be,fe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.isEqualNode=function(me){return!(!Ae.__super__.isEqualNode.apply(this,arguments).isEqualNode(me)||me.data!==this.data)},Ae}(ve)}).call(this)},{"./XMLNode":450}],434:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke=function(Ae,me){for(var be in me)Se.call(me,be)&&(Ae[be]=me[be]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLCharacterData"),Ue.exports=Ee=function(Ae){ke(me,Ae);function me(be,fe){if(me.__super__.constructor.call(this,be),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(be){return this.options.writer.comment(this,this.options.writer.filterOptions(be))},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,Ae){return!0},ke.prototype.setParameter=function(Se,Ae){return Ae!=null?this.params[Se]=Ae:delete this.params[Se]},ke}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(oe,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(Ae,me){for(var be in me)Se.call(me,be)&&(Ae[be]=me[be]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(Ae){ke(me,Ae);function me(be,fe,z,te,se,ie){if(me.__super__.constructor.call(this,be),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(be){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(be))},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke=function(Ae,me){for(var be in me)Se.call(me,be)&&(Ae[be]=me[be]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(Ae){ke(me,Ae);function me(be,fe,z){if(me.__super__.constructor.call(this,be),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(be){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(be))},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke,Se=function(me,be){for(var fe in be)Ae.call(be,fe)&&(me[fe]=be[fe]);function z(){this.constructor=me}return z.prototype=be.prototype,me.prototype=new z,me.__super__=be.prototype,me},Ae={}.hasOwnProperty;ke=oe("./Utility").isObject,Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(me){Se(be,me);function be(fe,z,te,se){if(be.__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(be.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(be.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(be.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(be.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(be.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(be.prototype,"xmlVersion",{get:function(){return null}}),be.prototype.toString=function(fe){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(fe))},be}(Ee)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke=function(Ae,me){for(var be in me)Se.call(me,be)&&(Ae[be]=me[be]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(Ae){ke(me,Ae);function me(be,fe,z){if(me.__super__.constructor.call(this,be),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(be){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(be))},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke,Se=function(me,be){for(var fe in be)Ae.call(be,fe)&&(me[fe]=be[fe]);function z(){this.constructor=me}return z.prototype=be.prototype,me.prototype=new z,me.__super__=be.prototype,me},Ae={}.hasOwnProperty;ke=oe("./Utility").isObject,Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(me){Se(be,me);function be(fe,z,te,se){var ie;be.__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 be.prototype.toString=function(fe){return this.options.writer.declaration(this,this.options.writer.filterOptions(fe))},be}(Ee)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke,Se,Ae,me,be,fe,z=function(se,ie){for(var le in ie)te.call(ie,le)&&(se[le]=ie[le]);function he(){this.constructor=se}return he.prototype=ie.prototype,se.prototype=new he,se.__super__=ie.prototype,se},te={}.hasOwnProperty;fe=oe("./Utility").isObject,be=oe("./XMLNode"),de=oe("./NodeType"),ve=oe("./XMLDTDAttList"),ke=oe("./XMLDTDEntity"),Ee=oe("./XMLDTDElement"),Se=oe("./XMLDTDNotation"),me=oe("./XMLNamedNodeMap"),Ue.exports=Ae=function(se){z(ie,se);function ie(le,he,pe){var xe,je,De,Fe,Te,Me;if(ie.__super__.constructor.call(this,le),this.type=de.DocType,le.children){for(Fe=le.children,je=0,De=Fe.length;je<De;je++)if(xe=Fe[je],xe.type===de.Element){this.name=xe.name;break}}this.documentObject=le,fe(he)&&(Te=he,he=Te.pubID,pe=Te.sysID),pe==null&&(Me=[he,pe],pe=Me[0],he=Me[1]),he!=null&&(this.pubID=this.stringify.dtdPubID(he)),pe!=null&&(this.sysID=this.stringify.dtdSysID(pe))}return Object.defineProperty(ie.prototype,"entities",{get:function(){var le,he,pe,xe,je;for(xe={},je=this.children,he=0,pe=je.length;he<pe;he++)le=je[he],le.type===de.EntityDeclaration&&!le.pe&&(xe[le.name]=le);return new me(xe)}}),Object.defineProperty(ie.prototype,"notations",{get:function(){var le,he,pe,xe,je;for(xe={},je=this.children,he=0,pe=je.length;he<pe;he++)le=je[he],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,he){var pe;return pe=new Ee(this,le,he),this.children.push(pe),this},ie.prototype.attList=function(le,he,pe,xe,je){var De;return De=new ve(this,le,he,pe,xe,je),this.children.push(De),this},ie.prototype.entity=function(le,he){var pe;return pe=new ke(this,!1,le,he),this.children.push(pe),this},ie.prototype.pEntity=function(le,he){var pe;return pe=new ke(this,!0,le,he),this.children.push(pe),this},ie.prototype.notation=function(le,he){var pe;return pe=new Se(this,le,he),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,he){return this.element(le,he)},ie.prototype.att=function(le,he,pe,xe,je){return this.attList(le,he,pe,xe,je)},ie.prototype.ent=function(le,he){return this.entity(le,he)},ie.prototype.pent=function(le,he){return this.pEntity(le,he)},ie.prototype.not=function(le,he){return this.notation(le,he)},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}(be)}).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,Ae,me,be,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;be=oe("./Utility").isPlainObject,Ee=oe("./XMLDOMImplementation"),ve=oe("./XMLDOMConfiguration"),Se=oe("./XMLNode"),de=oe("./NodeType"),me=oe("./XMLStringifier"),Ae=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 Ae),this.options=ie,this.stringify=new me(ie)}return Object.defineProperty(se.prototype,"implementation",{value:new Ee}),Object.defineProperty(se.prototype,"doctype",{get:function(){var ie,le,he,pe;for(pe=this.children,le=0,he=pe.length;le<he;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?be(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,he){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,he){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createTreeWalker=function(ie,le,he){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,Ae,me,be,fe,z,te,se,ie,le,he,pe,xe,je,De,Fe,Te,Me,Be,Ge,Ye={}.hasOwnProperty;Ge=oe("./Utility"),Me=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"),he=oe("./XMLProcessingInstruction"),z=oe("./XMLDeclaration"),te=oe("./XMLDocType"),Ae=oe("./XMLDTDAttList"),be=oe("./XMLDTDEntity"),me=oe("./XMLDTDElement"),fe=oe("./XMLDTDNotation"),Ee=oe("./XMLAttribute"),je=oe("./XMLStringifier"),xe=oe("./XMLStringWriter"),ve=oe("./WriterState"),Ue.exports=ie=function(){function Ke(Xe,ot,lt){var ct;this.name="?xml",this.type=de.Document,Xe||(Xe={}),ct={},Xe.writer?Be(Xe.writer)&&(ct=Xe.writer,Xe.writer=new xe):Xe.writer=new xe,this.options=Xe,this.writer=Xe.writer,this.writerOptions=this.writer.filterOptions(ct),this.stringify=new je(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,ct,Ct,Je,rt,xt,bt;switch(Xe.type){case de.CData:this.cdata(Xe.value);break;case de.Comment:this.comment(Xe.value);break;case de.Element:ct={},xt=Xe.attribs;for(lt in xt)Ye.call(xt,lt)&&(ot=xt[lt],ct[lt]=ot.value);this.node(Xe.name,ct);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(bt=Xe.children,Je=0,rt=bt.length;Je<rt;Je++)Ct=bt[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 ct;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),Me(ot)||(ct=[ot,lt],lt=ct[0],ot=ct[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 ct,Ct,Je,rt,xt,bt;if(this.currentNode&&this.currentNode.type===de.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Xe)||Me(Xe)||Te(Xe))for(rt=this.options.noValidation,this.options.noValidation=!0,bt=new se(this.options).element("TEMP_ROOT"),bt.element(Xe),this.options.noValidation=rt,xt=bt.children,Ct=0,Je=xt.length;Ct<Je;Ct++)ct=xt[Ct],this.createChildNode(ct),ct.type===de.Element&&this.up();else this.node(Xe,ot,lt);return this},Ke.prototype.attribute=function(Xe,ot){var lt,ct;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)),Me(Xe))for(lt in Xe)Ye.call(Xe,lt)&&(ct=Xe[lt],this.attribute(lt,ct));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,ct,Ct,Je,rt;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++)ct=Xe[lt],this.instruction(ct);else if(Me(Xe))for(ct in Xe)Ye.call(Xe,ct)&&(Ct=Xe[ct],this.instruction(ct,Ct));else Te(ot)&&(ot=ot.apply()),rt=new he(this,Xe,ot),this.onData(this.writer.processingInstruction(rt,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},Ke.prototype.declaration=function(Xe,ot,lt){var ct;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ct=new z(this,Xe,ot,lt),this.onData(this.writer.declaration(ct,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,ct,Ct){var Je;return this.openCurrent(),Je=new Ae(this,Xe,ot,lt,ct,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 be(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 be(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,ct,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(ct in Ct)Ye.call(Ct,ct)&&(ot=Ct[ct],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(Ae,me){for(var be in me)Se.call(me,be)&&(Ae[be]=me[be]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(Ae){ke(me,Ae);function me(be){me.__super__.constructor.call(this,be),this.type=de.Dummy}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(be){return""},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke,Se,Ae,me,be,fe,z=function(se,ie){for(var le in ie)te.call(ie,le)&&(se[le]=ie[le]);function he(){this.constructor=se}return he.prototype=ie.prototype,se.prototype=new he,se.__super__=ie.prototype,se},te={}.hasOwnProperty;fe=oe("./Utility"),be=fe.isObject,me=fe.isFunction,Ae=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,he,pe){var xe,je,De,Fe;if(ie.__super__.constructor.call(this,le),he==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(he),this.type=de.Element,this.attribs={},this.schemaTypeInfo=null,pe!=null&&this.attribute(pe),le.type===de.Document&&(this.isRoot=!0,this.documentObject=le,le.rootObject=this,le.children)){for(Fe=le.children,je=0,De=Fe.length;je<De;je++)if(xe=Fe[je],xe.type===de.DocType){xe.name=this.name;break}}}return Object.defineProperty(ie.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(ie.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(ie.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(ie.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(ie.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new ke(this.attribs)),this.attributeMap}}),ie.prototype.clone=function(){var le,he,pe,xe;pe=Object.create(this),pe.isRoot&&(pe.documentObject=null),pe.attribs={},xe=this.attribs;for(he in xe)te.call(xe,he)&&(le=xe[he],pe.attribs[he]=le.clone());return pe.children=[],this.children.forEach(function(je){var De;return De=je.clone(),De.parent=pe,pe.children.push(De)}),pe},ie.prototype.attribute=function(le,he){var pe,xe;if(le!=null&&(le=Ae(le)),be(le))for(pe in le)te.call(le,pe)&&(xe=le[pe],this.attribute(pe,xe));else me(he)&&(he=he.apply()),this.options.keepNullAttributes&&he==null?this.attribs[le]=new ve(this,le,""):he!=null&&(this.attribs[le]=new ve(this,le,he));return this},ie.prototype.removeAttribute=function(le){var he,pe,xe;if(le==null)throw new Error("Missing attribute name. "+this.debugInfo());if(le=Ae(le),Array.isArray(le))for(pe=0,xe=le.length;pe<xe;pe++)he=le[pe],delete this.attribs[he];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,he){return this.attribute(le,he)},ie.prototype.a=function(le,he){return this.attribute(le,he)},ie.prototype.getAttribute=function(le){return this.attribs.hasOwnProperty(le)?this.attribs[le].value:null},ie.prototype.setAttribute=function(le,he){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,he){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setAttributeNS=function(le,he,pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.removeAttributeNS=function(le,he){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNodeNS=function(le,he){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,he){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,he){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setIdAttribute=function(le,he){return this.attribs.hasOwnProperty(le)?this.attribs[le].isId:he},ie.prototype.setIdAttributeNS=function(le,he,pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setIdAttributeNode=function(le,he){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,he){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 he,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(he=pe=0,xe=this.attribs.length-1;0<=xe?pe<=xe:pe>=xe;he=0<=xe?++pe:--pe)if(!this.attribs[he].isEqualNode(le.attribs[he]))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,Ae,me,be,fe,z,te,se,ie,le,he,pe,xe,je,De,Fe={}.hasOwnProperty;De=oe("./Utility"),je=De.isObject,xe=De.isFunction,pe=De.isEmpty,he=De.getValue,be=null,Ee=null,ke=null,Se=null,Ae=null,ie=null,le=null,se=null,me=null,ve=null,te=null,fe=null,de=null,Ue.exports=z=function(){function Te(Me){this.parent=Me,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,be||(be=oe("./XMLElement"),Ee=oe("./XMLCData"),ke=oe("./XMLComment"),Se=oe("./XMLDeclaration"),Ae=oe("./XMLDocType"),ie=oe("./XMLRaw"),le=oe("./XMLText"),se=oe("./XMLProcessingInstruction"),me=oe("./XMLDummy"),ve=oe("./NodeType"),te=oe("./XMLNodeList"),fe=oe("./XMLNamedNodeMap"),de=oe("./DocumentPosition"))}return Object.defineProperty(Te.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(Te.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Te.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(Te.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(Te.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new te(this.children)),this.childNodeList}}),Object.defineProperty(Te.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(Te.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(Te.prototype,"previousSibling",{get:function(){var Me;return Me=this.parent.children.indexOf(this),this.parent.children[Me-1]||null}}),Object.defineProperty(Te.prototype,"nextSibling",{get:function(){var Me;return Me=this.parent.children.indexOf(this),this.parent.children[Me+1]||null}}),Object.defineProperty(Te.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(Te.prototype,"textContent",{get:function(){var Me,Be,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++)Me=Ye[Be],Me.textContent&&(Ke+=Me.textContent);return Ke}else return null},set:function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Te.prototype.setParent=function(Me){var Be,Ge,Ye,Ke,Xe;for(this.parent=Me,Me&&(this.options=Me.options,this.stringify=Me.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(Me,Be,Ge){var Ye,Ke,Xe,ot,lt,ct,Ct,Je,rt,xt,bt;if(ct=null,Be===null&&Ge==null&&(rt=[{},null],Be=rt[0],Ge=rt[1]),Be==null&&(Be={}),Be=he(Be),je(Be)||(xt=[Be,Ge],Ge=xt[0],Be=xt[1]),Me!=null&&(Me=he(Me)),Array.isArray(Me))for(Xe=0,Ct=Me.length;Xe<Ct;Xe++)Ke=Me[Xe],ct=this.element(Ke);else if(xe(Me))ct=this.element(Me.apply());else if(je(Me)){for(lt in Me)if(Fe.call(Me,lt))if(bt=Me[lt],xe(bt)&&(bt=bt.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&<.indexOf(this.stringify.convertAttKey)===0)ct=this.attribute(lt.substr(this.stringify.convertAttKey.length),bt);else if(!this.options.separateArrayItems&&Array.isArray(bt)&&pe(bt))ct=this.dummy();else if(je(bt)&&pe(bt))ct=this.element(lt);else if(!this.options.keepNullNodes&&bt==null)ct=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(bt))for(ot=0,Je=bt.length;ot<Je;ot++)Ke=bt[ot],Ye={},Ye[lt]=Ke,ct=this.element(Ye);else je(bt)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&<.indexOf(this.stringify.convertTextKey)===0?ct=this.element(bt):(ct=this.element(lt),ct.element(bt)):ct=this.element(lt,bt)}else!this.options.keepNullNodes&&Ge===null?ct=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Me.indexOf(this.stringify.convertTextKey)===0?ct=this.text(Ge):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Me.indexOf(this.stringify.convertCDataKey)===0?ct=this.cdata(Ge):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Me.indexOf(this.stringify.convertCommentKey)===0?ct=this.comment(Ge):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Me.indexOf(this.stringify.convertRawKey)===0?ct=this.raw(Ge):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Me.indexOf(this.stringify.convertPIKey)===0?ct=this.instruction(Me.substr(this.stringify.convertPIKey.length),Ge):ct=this.node(Me,Be,Ge);if(ct==null)throw new Error("Could not create any elements with: "+Me+". "+this.debugInfo());return ct},Te.prototype.insertBefore=function(Me,Be,Ge){var Ye,Ke,Xe,ot,lt;if(Me!=null&&Me.type)return Xe=Me,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(Me));return Ke=this.parent.children.indexOf(this),lt=this.parent.children.splice(Ke),Ye=this.parent.element(Me,Be,Ge),Array.prototype.push.apply(this.parent.children,lt),Ye},Te.prototype.insertAfter=function(Me,Be,Ge){var Ye,Ke,Xe;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Me));return Ke=this.parent.children.indexOf(this),Xe=this.parent.children.splice(Ke+1),Ye=this.parent.element(Me,Be,Ge),Array.prototype.push.apply(this.parent.children,Xe),Ye},Te.prototype.remove=function(){var Me,Be;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return Me=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[Me,Me-Me+1].concat(Be=[])),this.parent},Te.prototype.node=function(Me,Be,Ge){var Ye,Ke;return Me!=null&&(Me=he(Me)),Be||(Be={}),Be=he(Be),je(Be)||(Ke=[Be,Ge],Ge=Ke[0],Be=Ke[1]),Ye=new be(this,Me,Be),Ge!=null&&Ye.text(Ge),this.children.push(Ye),Ye},Te.prototype.text=function(Me){var Be;return je(Me)&&this.element(Me),Be=new le(this,Me),this.children.push(Be),this},Te.prototype.cdata=function(Me){var Be;return Be=new Ee(this,Me),this.children.push(Be),this},Te.prototype.comment=function(Me){var Be;return Be=new ke(this,Me),this.children.push(Be),this},Te.prototype.commentBefore=function(Me){var Be,Ge,Ye;return Ge=this.parent.children.indexOf(this),Ye=this.parent.children.splice(Ge),Be=this.parent.comment(Me),Array.prototype.push.apply(this.parent.children,Ye),this},Te.prototype.commentAfter=function(Me){var Be,Ge,Ye;return Ge=this.parent.children.indexOf(this),Ye=this.parent.children.splice(Ge+1),Be=this.parent.comment(Me),Array.prototype.push.apply(this.parent.children,Ye),this},Te.prototype.raw=function(Me){var Be;return Be=new ie(this,Me),this.children.push(Be),this},Te.prototype.dummy=function(){var Me;return Me=new me(this),Me},Te.prototype.instruction=function(Me,Be){var Ge,Ye,Ke,Xe,ot;if(Me!=null&&(Me=he(Me)),Be!=null&&(Be=he(Be)),Array.isArray(Me))for(Xe=0,ot=Me.length;Xe<ot;Xe++)Ge=Me[Xe],this.instruction(Ge);else if(je(Me))for(Ge in Me)Fe.call(Me,Ge)&&(Ye=Me[Ge],this.instruction(Ge,Ye));else xe(Be)&&(Be=Be.apply()),Ke=new se(this,Me,Be),this.children.push(Ke);return this},Te.prototype.instructionBefore=function(Me,Be){var Ge,Ye,Ke;return Ye=this.parent.children.indexOf(this),Ke=this.parent.children.splice(Ye),Ge=this.parent.instruction(Me,Be),Array.prototype.push.apply(this.parent.children,Ke),this},Te.prototype.instructionAfter=function(Me,Be){var Ge,Ye,Ke;return Ye=this.parent.children.indexOf(this),Ke=this.parent.children.splice(Ye+1),Ge=this.parent.instruction(Me,Be),Array.prototype.push.apply(this.parent.children,Ke),this},Te.prototype.declaration=function(Me,Be,Ge){var Ye,Ke;return Ye=this.document(),Ke=new Se(Ye,Me,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(Me,Be){var Ge,Ye,Ke,Xe,ot,lt,ct,Ct,Je,rt;for(Ye=this.document(),Ke=new Ae(Ye,Me,Be),Je=Ye.children,Xe=ot=0,ct=Je.length;ot<ct;Xe=++ot)if(Ge=Je[Xe],Ge.type===ve.DocType)return Ye.children[Xe]=Ke,Ke;for(rt=Ye.children,Xe=lt=0,Ct=rt.length;lt<Ct;Xe=++lt)if(Ge=rt[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 Me;for(Me=this;Me;){if(Me.type===ve.Document)return Me.rootObject;if(Me.isRoot)return Me;Me=Me.parent}},Te.prototype.document=function(){var Me;for(Me=this;Me;){if(Me.type===ve.Document)return Me;Me=Me.parent}},Te.prototype.end=function(Me){return this.document().end(Me)},Te.prototype.prev=function(){var Me;if(Me=this.parent.children.indexOf(this),Me<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[Me-1]},Te.prototype.next=function(){var Me;if(Me=this.parent.children.indexOf(this),Me===-1||Me===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[Me+1]},Te.prototype.importDocument=function(Me){var Be;return Be=Me.root().clone(),Be.parent=this,Be.isRoot=!1,this.children.push(Be),this},Te.prototype.debugInfo=function(Me){var Be,Ge;return Me=Me||this.name,Me==null&&!((Be=this.parent)!=null&&Be.name)?"":Me==null?"parent: <"+this.parent.name+">":(Ge=this.parent)!=null&&Ge.name?"node: <"+Me+">, parent: <"+this.parent.name+">":"node: <"+Me+">"},Te.prototype.ele=function(Me,Be,Ge){return this.element(Me,Be,Ge)},Te.prototype.nod=function(Me,Be,Ge){return this.node(Me,Be,Ge)},Te.prototype.txt=function(Me){return this.text(Me)},Te.prototype.dat=function(Me){return this.cdata(Me)},Te.prototype.com=function(Me){return this.comment(Me)},Te.prototype.ins=function(Me,Be){return this.instruction(Me,Be)},Te.prototype.doc=function(){return this.document()},Te.prototype.dec=function(Me,Be,Ge){return this.declaration(Me,Be,Ge)},Te.prototype.e=function(Me,Be,Ge){return this.element(Me,Be,Ge)},Te.prototype.n=function(Me,Be,Ge){return this.node(Me,Be,Ge)},Te.prototype.t=function(Me){return this.text(Me)},Te.prototype.d=function(Me){return this.cdata(Me)},Te.prototype.c=function(Me){return this.comment(Me)},Te.prototype.r=function(Me){return this.raw(Me)},Te.prototype.i=function(Me,Be){return this.instruction(Me,Be)},Te.prototype.u=function(){return this.up()},Te.prototype.importXMLBuilder=function(Me){return this.importDocument(Me)},Te.prototype.replaceChild=function(Me,Be){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.removeChild=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.appendChild=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.hasChildNodes=function(){return this.children.length!==0},Te.prototype.cloneNode=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.isSupported=function(Me,Be){return!0},Te.prototype.hasAttributes=function(){return this.attribs.length!==0},Te.prototype.compareDocumentPosition=function(Me){var Be,Ge;return Be=this,Be===Me?0:this.document()!==Me.document()?(Ge=de.Disconnected|de.ImplementationSpecific,Math.random()<.5?Ge|=de.Preceding:Ge|=de.Following,Ge):Be.isAncestor(Me)?de.Contains|de.Preceding:Be.isDescendant(Me)?de.Contains|de.Following:Be.isPreceding(Me)?de.Preceding:de.Following},Te.prototype.isSameNode=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.lookupPrefix=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.isDefaultNamespace=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.lookupNamespaceURI=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.isEqualNode=function(Me){var Be,Ge,Ye;if(Me.nodeType!==this.nodeType||Me.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(Me.children[Be]))return!1;return!0},Te.prototype.getFeature=function(Me,Be){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.setUserData=function(Me,Be,Ge){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.getUserData=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.contains=function(Me){return Me?Me===this||this.isDescendant(Me):!1},Te.prototype.isDescendant=function(Me){var Be,Ge,Ye,Ke,Xe;for(Xe=this.children,Ye=0,Ke=Xe.length;Ye<Ke;Ye++)if(Be=Xe[Ye],Me===Be||(Ge=Be.isDescendant(Me),Ge))return!0;return!1},Te.prototype.isAncestor=function(Me){return Me.isDescendant(this)},Te.prototype.isPreceding=function(Me){var Be,Ge;return Be=this.treePosition(Me),Ge=this.treePosition(this),Be===-1||Ge===-1?!1:Be<Ge},Te.prototype.isFollowing=function(Me){var Be,Ge;return Be=this.treePosition(Me),Ge=this.treePosition(this),Be===-1||Ge===-1?!1:Be>Ge},Te.prototype.treePosition=function(Me){var Be,Ge;return Ge=0,Be=!1,this.foreachTreeNode(this.document(),function(Ye){if(Ge++,!Be&&Ye===Me)return Be=!0}),Be?Ge:-1},Te.prototype.foreachTreeNode=function(Me,Be){var Ge,Ye,Ke,Xe,ot;for(Me||(Me=this.document()),Xe=Me.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(Ae,me){for(var be in me)Se.call(me,be)&&(Ae[be]=me[be]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLCharacterData"),Ue.exports=Ee=function(Ae){ke(me,Ae);function me(be,fe,z){if(me.__super__.constructor.call(this,be),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(be){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(be))},me.prototype.isEqualNode=function(be){return!(!me.__super__.isEqualNode.apply(this,arguments).isEqualNode(be)||be.target!==this.target)},me}(ve)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke=function(Ae,me){for(var be in me)Se.call(me,be)&&(Ae[be]=me[be]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLNode"),Ue.exports=Ee=function(Ae){ke(me,Ae);function me(be,fe){if(me.__super__.constructor.call(this,be),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(be){return this.options.writer.raw(this,this.options.writer.filterOptions(be))},me}(ve)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke,Se=function(me,be){for(var fe in be)Ae.call(be,fe)&&(me[fe]=be[fe]);function z(){this.constructor=me}return z.prototype=be.prototype,me.prototype=new z,me.__super__=be.prototype,me},Ae={}.hasOwnProperty;de=oe("./NodeType"),ke=oe("./XMLWriterBase"),ve=oe("./WriterState"),Ue.exports=Ee=function(me){Se(be,me);function be(fe,z){this.stream=fe,be.__super__.constructor.call(this,z)}return be.prototype.endline=function(fe,z,te){return fe.isLastRootNode&&z.state===ve.CloseTag?"":be.__super__.endline.call(this,fe,z,te)},be.prototype.document=function(fe,z){var te,se,ie,le,he,pe,xe,je,De;for(xe=fe.children,se=ie=0,he=xe.length;ie<he;se=++ie)te=xe[se],te.isLastRootNode=se===fe.children.length-1;for(z=this.filterOptions(z),je=fe.children,De=[],le=0,pe=je.length;le<pe;le++)te=je[le],De.push(this.writeChildNode(te,z,0));return De},be.prototype.attribute=function(fe,z,te){return this.stream.write(be.__super__.attribute.call(this,fe,z,te))},be.prototype.cdata=function(fe,z,te){return this.stream.write(be.__super__.cdata.call(this,fe,z,te))},be.prototype.comment=function(fe,z,te){return this.stream.write(be.__super__.comment.call(this,fe,z,te))},be.prototype.declaration=function(fe,z,te){return this.stream.write(be.__super__.declaration.call(this,fe,z,te))},be.prototype.docType=function(fe,z,te){var se,ie,le,he;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,he=fe.children,ie=0,le=he.length;ie<le;ie++)se=he[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)},be.prototype.element=function(fe,z,te){var se,ie,le,he,pe,xe,je,De,Fe,Te;te||(te=0),this.openNode(fe,z,te),z.state=ve.OpenTag,this.stream.write(this.indent(fe,z,te)+"<"+fe.name),Fe=fe.attribs;for(je in Fe)Ae.call(Fe,je)&&(se=Fe[je],this.attribute(se,z,te));if(le=fe.children.length,he=le===0?null:fe.children[0],le===0||fe.children.every(function(Me){return(Me.type===de.Text||Me.type===de.Raw)&&Me.value===""}))z.allowEmpty?(this.stream.write(">"),z.state=ve.CloseTag,this.stream.write("</"+fe.name+">")):(z.state=ve.CloseTag,this.stream.write(z.spaceBeforeSlash+"/>"));else if(z.pretty&&le===1&&(he.type===de.Text||he.type===de.Raw)&&he.value!=null)this.stream.write(">"),z.state=ve.InsideTag,z.suppressPrettyCount++,De=!0,this.writeChildNode(he,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)},be.prototype.processingInstruction=function(fe,z,te){return this.stream.write(be.__super__.processingInstruction.call(this,fe,z,te))},be.prototype.raw=function(fe,z,te){return this.stream.write(be.__super__.raw.call(this,fe,z,te))},be.prototype.text=function(fe,z,te){return this.stream.write(be.__super__.text.call(this,fe,z,te))},be.prototype.dtdAttList=function(fe,z,te){return this.stream.write(be.__super__.dtdAttList.call(this,fe,z,te))},be.prototype.dtdElement=function(fe,z,te){return this.stream.write(be.__super__.dtdElement.call(this,fe,z,te))},be.prototype.dtdEntity=function(fe,z,te){return this.stream.write(be.__super__.dtdEntity.call(this,fe,z,te))},be.prototype.dtdNotation=function(fe,z,te){return this.stream.write(be.__super__.dtdNotation.call(this,fe,z,te))},be}(ke)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(oe,Ue,Ie){(function(){var de,ve,Ee=function(Se,Ae){for(var me in Ae)ke.call(Ae,me)&&(Se[me]=Ae[me]);function be(){this.constructor=Se}return be.prototype=Ae.prototype,Se.prototype=new be,Se.__super__=Ae.prototype,Se},ke={}.hasOwnProperty;ve=oe("./XMLWriterBase"),Ue.exports=de=function(Se){Ee(Ae,Se);function Ae(me){Ae.__super__.constructor.call(this,me)}return Ae.prototype.document=function(me,be){var fe,z,te,se,ie;for(be=this.filterOptions(be),se="",ie=me.children,z=0,te=ie.length;z<te;z++)fe=ie[z],se+=this.writeChildNode(fe,be,0);return be.pretty&&se.slice(-be.newline.length)===be.newline&&(se=se.slice(0,-be.newline.length)),se},Ae}(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 Ae,me,be;Se||(Se={}),this.options=Se,this.options.version||(this.options.version="1.0"),me=Se.stringify||{};for(Ae in me)Ee.call(me,Ae)&&(be=me[Ae],this[Ae]=be)}return ke.prototype.name=function(Se){return this.options.noValidation?Se:this.assertLegalName(""+Se||"")},ke.prototype.text=function(Se){return this.options.noValidation?Se:this.assertLegalChar(this.textEscape(""+Se||""))},ke.prototype.cdata=function(Se){return this.options.noValidation?Se:(Se=""+Se||"",Se=Se.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(Se))},ke.prototype.comment=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",Se.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+Se);return this.assertLegalChar(Se)},ke.prototype.raw=function(Se){return this.options.noValidation?Se:""+Se||""},ke.prototype.attValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(this.attEscape(Se=""+Se||""))},ke.prototype.insTarget=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.insValue=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",Se.match(/\?>/))throw new Error("Invalid processing instruction value: "+Se);return this.assertLegalChar(Se)},ke.prototype.xmlVersion=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",!Se.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+Se);return Se},ke.prototype.xmlEncoding=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",!Se.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+Se);return this.assertLegalChar(Se)},ke.prototype.xmlStandalone=function(Se){return this.options.noValidation?Se:Se?"yes":"no"},ke.prototype.dtdPubID=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdSysID=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdElementValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdAttType=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdAttDefault=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdEntityValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdNData=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.convertAttKey="@",ke.prototype.convertPIKey="?",ke.prototype.convertTextKey="#text",ke.prototype.convertCDataKey="#cdata",ke.prototype.convertCommentKey="#comment",ke.prototype.convertRawKey="#raw",ke.prototype.assertLegalChar=function(Se){var Ae,me;if(this.options.noValidation)return Se;if(Ae="",this.options.version==="1.0"){if(Ae=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,me=Se.match(Ae))throw new Error("Invalid character in string: "+Se+" at index "+me.index)}else if(this.options.version==="1.1"&&(Ae=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,me=Se.match(Ae)))throw new Error("Invalid character in string: "+Se+" at index "+me.index);return Se},ke.prototype.assertLegalName=function(Se){var Ae;if(this.options.noValidation)return Se;if(this.assertLegalChar(Se),Ae=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!Se.match(Ae))throw new Error("Invalid character in name");return Se},ke.prototype.textEscape=function(Se){var Ae;return this.options.noValidation?Se:(Ae=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(Ae,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},ke.prototype.attEscape=function(Se){var Ae;return this.options.noValidation?Se:(Ae=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(Ae,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},ke}()}).call(this)},{}],457:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke=function(Ae,me){for(var be in me)Se.call(me,be)&&(Ae[be]=me[be]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLCharacterData"),Ue.exports=Ee=function(Ae){ke(me,Ae);function me(be,fe){if(me.__super__.constructor.call(this,be),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 be,fe,z;for(z="",fe=this.previousSibling;fe;)z=fe.data+z,fe=fe.previousSibling;for(z+=this.data,be=this.nextSibling;be;)z=z+be.data,be=be.nextSibling;return z}}),me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(be){return this.options.writer.text(this,this.options.writer.filterOptions(be))},me.prototype.splitText=function(be){throw new Error("This DOM method is not implemented."+this.debugInfo())},me.prototype.replaceWholeText=function(be){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,Ae,me,be,fe,z,te,se,ie,le,he,pe,xe,je={}.hasOwnProperty;xe=oe("./Utility").assign,de=oe("./NodeType"),fe=oe("./XMLDeclaration"),z=oe("./XMLDocType"),Ee=oe("./XMLCData"),ke=oe("./XMLComment"),se=oe("./XMLElement"),le=oe("./XMLRaw"),he=oe("./XMLText"),ie=oe("./XMLProcessingInstruction"),te=oe("./XMLDummy"),Se=oe("./XMLDTDAttList"),Ae=oe("./XMLDTDElement"),me=oe("./XMLDTDEntity"),be=oe("./XMLDTDNotation"),ve=oe("./WriterState"),Ue.exports=pe=function(){function De(Fe){var Te,Me,Be;Fe||(Fe={}),this.options=Fe,Me=Fe.writer||{};for(Te in Me)je.call(Me,Te)&&(Be=Me[Te],this["_"+Te]=this[Te],this[Te]=Be)}return De.prototype.filterOptions=function(Fe){var Te,Me,Be,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=(Me=Fe.indent)!=null?Me:" ",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,Me){var Be;return!Te.pretty||Te.suppressPrettyCount?"":Te.pretty&&(Be=(Me||0)+Te.offset+1,Be>0)?new Array(Be).join(Te.indent):""},De.prototype.endline=function(Fe,Te,Me){return!Te.pretty||Te.suppressPrettyCount?"":Te.newline},De.prototype.attribute=function(Fe,Te,Me){var Be;return this.openAttribute(Fe,Te,Me),Be=" "+Fe.name+'="'+Fe.value+'"',this.closeAttribute(Fe,Te,Me),Be},De.prototype.cdata=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<![CDATA[",Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+="]]>"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.comment=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!-- ",Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+=" -->"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.declaration=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<?xml",Te.state=ve.InsideTag,Be+=' version="'+Fe.version+'"',Fe.encoding!=null&&(Be+=' encoding="'+Fe.encoding+'"'),Fe.standalone!=null&&(Be+=' standalone="'+Fe.standalone+'"'),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+"?>",Be+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.docType=function(Fe,Te,Me){var Be,Ge,Ye,Ke,Xe;if(Me||(Me=0),this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Ke=this.indent(Fe,Te,Me),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,Me),Te.state=ve.InsideTag,Xe=Fe.children,Ge=0,Ye=Xe.length;Ge<Ye;Ge++)Be=Xe[Ge],Ke+=this.writeChildNode(Be,Te,Me+1);Te.state=ve.CloseTag,Ke+="]"}return Te.state=ve.CloseTag,Ke+=Te.spaceBeforeSlash+">",Ke+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Ke},De.prototype.element=function(Fe,Te,Me){var Be,Ge,Ye,Ke,Xe,ot,lt,ct,Ct,Je,rt,xt,bt,Pt;Me||(Me=0),Je=!1,rt="",this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,rt+=this.indent(Fe,Te,Me)+"<"+Fe.name,xt=Fe.attribs;for(Ct in xt)je.call(xt,Ct)&&(Be=xt[Ct],rt+=this.attribute(Be,Te,Me));if(Ye=Fe.children.length,Ke=Ye===0?null:Fe.children[0],Ye===0||Fe.children.every(function(ht){return(ht.type===de.Text||ht.type===de.Raw)&&ht.value===""}))Te.allowEmpty?(rt+=">",Te.state=ve.CloseTag,rt+="</"+Fe.name+">"+this.endline(Fe,Te,Me)):(Te.state=ve.CloseTag,rt+=Te.spaceBeforeSlash+"/>"+this.endline(Fe,Te,Me));else if(Te.pretty&&Ye===1&&(Ke.type===de.Text||Ke.type===de.Raw)&&Ke.value!=null)rt+=">",Te.state=ve.InsideTag,Te.suppressPrettyCount++,Je=!0,rt+=this.writeChildNode(Ke,Te,Me+1),Te.suppressPrettyCount--,Je=!1,Te.state=ve.CloseTag,rt+="</"+Fe.name+">"+this.endline(Fe,Te,Me);else{if(Te.dontPrettyTextNodes){for(bt=Fe.children,Xe=0,lt=bt.length;Xe<lt;Xe++)if(Ge=bt[Xe],(Ge.type===de.Text||Ge.type===de.Raw)&&Ge.value!=null){Te.suppressPrettyCount++,Je=!0;break}}for(rt+=">"+this.endline(Fe,Te,Me),Te.state=ve.InsideTag,Pt=Fe.children,ot=0,ct=Pt.length;ot<ct;ot++)Ge=Pt[ot],rt+=this.writeChildNode(Ge,Te,Me+1);Te.state=ve.CloseTag,rt+=this.indent(Fe,Te,Me)+"</"+Fe.name+">",Je&&Te.suppressPrettyCount--,rt+=this.endline(Fe,Te,Me),Te.state=ve.None}return this.closeNode(Fe,Te,Me),rt},De.prototype.writeChildNode=function(Fe,Te,Me){switch(Fe.type){case de.CData:return this.cdata(Fe,Te,Me);case de.Comment:return this.comment(Fe,Te,Me);case de.Element:return this.element(Fe,Te,Me);case de.Raw:return this.raw(Fe,Te,Me);case de.Text:return this.text(Fe,Te,Me);case de.ProcessingInstruction:return this.processingInstruction(Fe,Te,Me);case de.Dummy:return"";case de.Declaration:return this.declaration(Fe,Te,Me);case de.DocType:return this.docType(Fe,Te,Me);case de.AttributeDeclaration:return this.dtdAttList(Fe,Te,Me);case de.ElementDeclaration:return this.dtdElement(Fe,Te,Me);case de.EntityDeclaration:return this.dtdEntity(Fe,Te,Me);case de.NotationDeclaration:return this.dtdNotation(Fe,Te,Me);default:throw new Error("Unknown XML node type: "+Fe.constructor.name)}},De.prototype.processingInstruction=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<?",Te.state=ve.InsideTag,Be+=Fe.target,Fe.value&&(Be+=" "+Fe.value),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+"?>",Be+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.raw=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me),Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.text=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me),Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.dtdAttList=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!ATTLIST",Te.state=ve.InsideTag,Be+=" "+Fe.elementName+" "+Fe.attributeName+" "+Fe.attributeType,Fe.defaultValueType!=="#DEFAULT"&&(Be+=" "+Fe.defaultValueType),Fe.defaultValue&&(Be+=' "'+Fe.defaultValue+'"'),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+">"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.dtdElement=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!ELEMENT",Te.state=ve.InsideTag,Be+=" "+Fe.name+" "+Fe.value,Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+">"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.dtdEntity=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!ENTITY",Te.state=ve.InsideTag,Fe.pe&&(Be+=" %"),Be+=" "+Fe.name,Fe.value?Be+=' "'+Fe.value+'"':(Fe.pubID&&Fe.sysID?Be+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Be+=' SYSTEM "'+Fe.sysID+'"'),Fe.nData&&(Be+=" NDATA "+Fe.nData)),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+">"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.dtdNotation=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!NOTATION",Te.state=ve.InsideTag,Be+=" "+Fe.name,Fe.pubID&&Fe.sysID?Be+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.pubID?Be+=' PUBLIC "'+Fe.pubID+'"':Fe.sysID&&(Be+=' SYSTEM "'+Fe.sysID+'"'),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+">"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.openNode=function(Fe,Te,Me){},De.prototype.closeNode=function(Fe,Te,Me){},De.prototype.openAttribute=function(Fe,Te,Me){},De.prototype.closeAttribute=function(Fe,Te,Me){},De}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],459:[function(oe,Ue,Ie){(function(){var de,ve,Ee,ke,Se,Ae,me,be,fe,z;z=oe("./Utility"),be=z.assign,fe=z.isFunction,Ee=oe("./XMLDOMImplementation"),ke=oe("./XMLDocument"),Se=oe("./XMLDocumentCB"),me=oe("./XMLStringWriter"),Ae=oe("./XMLStreamWriter"),de=oe("./NodeType"),ve=oe("./WriterState"),Ue.exports.create=function(te,se,ie,le){var he,pe;if(te==null)throw new Error("Root element needs a name.");return le=be({},se,ie,le),he=new ke(le),pe=he.element(te),le.headless||(he.declaration(le),(le.pubID!=null||le.sysID!=null)&&he.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 Ae(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 Ae in Se)de.call(Se,Ae)&&(Ee[Ae]=Se[Ae])}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,Ae=de.alloc(Se);Ae.fill(0);function me(z,te,se){de.isBuffer(te)||(te=de.from(te)),de.isBuffer(se)||(se=de.from(se)),te.length>Se?te=z(te):te.length<Se&&(te=de.concat([te,Ae],Se));for(var ie=de.alloc(Se),le=de.alloc(Se),he=0;he<Se;he++)ie[he]=te[he]^54,le[he]=te[he]^92;var pe=z(de.concat([ie,se]));return z(de.concat([le,pe]))}function be(z,te){z=z||"sha1";var se=ke[z],ie=[],le=0;return se||fe("algorithm:",z,"is not yet supported"),{update:function(pe){return de.isBuffer(pe)||(pe=de.from(pe)),ie.push(pe),le+=pe.length,this},digest:function(pe){var xe=de.concat(ie),je=te?me(se,te,xe):se(xe);return ie=null,pe?je.toString(pe):je}}}function fe(){var z=[].slice.call(arguments).join(" ");throw new Error([z,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
`))}Ie.createHash=function(z){return be(z)},Ie.createHmac=function(z,te){return be(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(be,fe){if(be.length%ve!==0){var z=be.length+(ve-be.length%ve);be=de.concat([be,Ee],z)}for(var te=[],se=fe?be.readInt32BE:be.readInt32LE,ie=0;ie<be.length;ie+=ve)te.push(se.call(be,ie));return te}function Ae(be,fe,z){for(var te=de.alloc(fe),se=z?te.writeInt32BE:te.writeInt32LE,ie=0;ie<be.length;ie++)se.call(te,be[ie],ie*4,!0);return te}function me(be,fe,z,te){de.isBuffer(be)||(be=de.from(be));var se=fe(Se(be,te),be.length*ke);return Ae(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,he=-1732584194,pe=271733878,xe=0;xe<te.length;xe+=16){var je=ie,De=le,Fe=he,Te=pe;ie=Se(ie,le,he,pe,te[xe+0],7,-680876936),pe=Se(pe,ie,le,he,te[xe+1],12,-389564586),he=Se(he,pe,ie,le,te[xe+2],17,606105819),le=Se(le,he,pe,ie,te[xe+3],22,-1044525330),ie=Se(ie,le,he,pe,te[xe+4],7,-176418897),pe=Se(pe,ie,le,he,te[xe+5],12,1200080426),he=Se(he,pe,ie,le,te[xe+6],17,-1473231341),le=Se(le,he,pe,ie,te[xe+7],22,-45705983),ie=Se(ie,le,he,pe,te[xe+8],7,1770035416),pe=Se(pe,ie,le,he,te[xe+9],12,-1958414417),he=Se(he,pe,ie,le,te[xe+10],17,-42063),le=Se(le,he,pe,ie,te[xe+11],22,-1990404162),ie=Se(ie,le,he,pe,te[xe+12],7,1804603682),pe=Se(pe,ie,le,he,te[xe+13],12,-40341101),he=Se(he,pe,ie,le,te[xe+14],17,-1502002290),le=Se(le,he,pe,ie,te[xe+15],22,1236535329),ie=Ae(ie,le,he,pe,te[xe+1],5,-165796510),pe=Ae(pe,ie,le,he,te[xe+6],9,-1069501632),he=Ae(he,pe,ie,le,te[xe+11],14,643717713),le=Ae(le,he,pe,ie,te[xe+0],20,-373897302),ie=Ae(ie,le,he,pe,te[xe+5],5,-701558691),pe=Ae(pe,ie,le,he,te[xe+10],9,38016083),he=Ae(he,pe,ie,le,te[xe+15],14,-660478335),le=Ae(le,he,pe,ie,te[xe+4],20,-405537848),ie=Ae(ie,le,he,pe,te[xe+9],5,568446438),pe=Ae(pe,ie,le,he,te[xe+14],9,-1019803690),he=Ae(he,pe,ie,le,te[xe+3],14,-187363961),le=Ae(le,he,pe,ie,te[xe+8],20,1163531501),ie=Ae(ie,le,he,pe,te[xe+13],5,-1444681467),pe=Ae(pe,ie,le,he,te[xe+2],9,-51403784),he=Ae(he,pe,ie,le,te[xe+7],14,1735328473),le=Ae(le,he,pe,ie,te[xe+12],20,-1926607734),ie=me(ie,le,he,pe,te[xe+5],4,-378558),pe=me(pe,ie,le,he,te[xe+8],11,-2022574463),he=me(he,pe,ie,le,te[xe+11],16,1839030562),le=me(le,he,pe,ie,te[xe+14],23,-35309556),ie=me(ie,le,he,pe,te[xe+1],4,-1530992060),pe=me(pe,ie,le,he,te[xe+4],11,1272893353),he=me(he,pe,ie,le,te[xe+7],16,-155497632),le=me(le,he,pe,ie,te[xe+10],23,-1094730640),ie=me(ie,le,he,pe,te[xe+13],4,681279174),pe=me(pe,ie,le,he,te[xe+0],11,-358537222),he=me(he,pe,ie,le,te[xe+3],16,-722521979),le=me(le,he,pe,ie,te[xe+6],23,76029189),ie=me(ie,le,he,pe,te[xe+9],4,-640364487),pe=me(pe,ie,le,he,te[xe+12],11,-421815835),he=me(he,pe,ie,le,te[xe+15],16,530742520),le=me(le,he,pe,ie,te[xe+2],23,-995338651),ie=be(ie,le,he,pe,te[xe+0],6,-198630844),pe=be(pe,ie,le,he,te[xe+7],10,1126891415),he=be(he,pe,ie,le,te[xe+14],15,-1416354905),le=be(le,he,pe,ie,te[xe+5],21,-57434055),ie=be(ie,le,he,pe,te[xe+12],6,1700485571),pe=be(pe,ie,le,he,te[xe+3],10,-1894986606),he=be(he,pe,ie,le,te[xe+10],15,-1051523),le=be(le,he,pe,ie,te[xe+1],21,-2054922799),ie=be(ie,le,he,pe,te[xe+8],6,1873313359),pe=be(pe,ie,le,he,te[xe+15],10,-30611744),he=be(he,pe,ie,le,te[xe+6],15,-1560198380),le=be(le,he,pe,ie,te[xe+13],21,1309151649),ie=be(ie,le,he,pe,te[xe+4],6,-145523070),pe=be(pe,ie,le,he,te[xe+11],10,-1120210379),he=be(he,pe,ie,le,te[xe+2],15,718787259),le=be(le,he,pe,ie,te[xe+9],21,-343485551),ie=fe(ie,je),le=fe(le,De),he=fe(he,Fe),pe=fe(pe,Te)}return Array(ie,le,he,pe)}function ke(te,se,ie,le,he,pe){return fe(z(fe(fe(se,te),fe(le,pe)),he),ie)}function Se(te,se,ie,le,he,pe,xe){return ke(se&ie|~se&le,te,se,he,pe,xe)}function Ae(te,se,ie,le,he,pe,xe){return ke(se&le|ie&~le,te,se,he,pe,xe)}function me(te,se,ie,le,he,pe,xe){return ke(se^ie^le,te,se,he,pe,xe)}function be(te,se,ie,le,he,pe,xe){return ke(ie^(se|~le),te,se,he,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,be){me[be>>5]|=128<<24-be%32,me[(be+64>>9<<4)+15]=be;for(var fe=Array(80),z=1732584193,te=-271733879,se=-1732584194,ie=271733878,le=-1009589776,he=0;he<me.length;he+=16){for(var pe=z,xe=te,je=se,De=ie,Fe=le,Te=0;Te<80;Te++){Te<16?fe[Te]=me[he+Te]:fe[Te]=Ae(fe[Te-3]^fe[Te-8]^fe[Te-14]^fe[Te-16],1);var Me=Se(Se(Ae(z,5),Ee(Te,te,se,ie)),Se(Se(le,fe[Te]),ke(Te)));le=ie,ie=se,se=Ae(te,30),te=z,z=Me}z=Se(z,pe),te=Se(te,xe),se=Se(se,je),ie=Se(ie,De),le=Se(le,Fe)}return Array(z,te,se,ie,le)}function Ee(me,be,fe,z){return me<20?be&fe|~be&z:me<40?be^fe^z:me<60?be&fe|be&z|fe&z:be^fe^z}function ke(me){return me<20?1518500249:me<40?1859775393:me<60?-1894007588:-899497514}function Se(me,be){var fe=(me&65535)+(be&65535),z=(me>>16)+(be>>16)+(fe>>16);return z<<16|fe&65535}function Ae(me,be){return me<<be|me>>>32-be}Ue.exports=function(be){return de.hash(be,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,Ae=oe("../lib/common/utils/isArray"),me=Ae.isArray;Ue.exports.string=function(z){return typeof z=="string"},Ue.exports.array=me,Ue.exports.buffer=de.isBuffer;function be(fe){return fe instanceof Se}Ue.exports.writableStream=function(z){return be(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"),Ae=oe("url"),me=Ie;me.request=function(be,fe){typeof be=="string"?be=Ae.parse(be):be=ke(be);var z=de.location.protocol.search(/^https?:$/)===-1?"http:":"",te=be.protocol||z,se=be.hostname||be.host,ie=be.port,le=be.path||"/";se&&se.indexOf(":")!==-1&&(se="["+se+"]"),be.url=(se?te+"//"+se:"")+(ie?":"+ie:"")+le,be.method=(be.method||"GET").toUpperCase(),be.headers=be.headers||{};var he=new ve(be);return fe&&he.on("response",fe),he},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 Mn!="undefined"?Mn: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(be){}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(be){ve=null}}else ve=null;return ve}function ke(be){var fe=Ee();if(!fe)return!1;try{return fe.responseType=be,fe.responseType===be}catch(z){}return!1}var Se=typeof de.ArrayBuffer!="undefined",Ae=Se&&me(de.ArrayBuffer.prototype.slice);Ie.arraybuffer=Ie.fetch||Se&&ke("arraybuffer"),Ie.msstream=!Ie.fetch&&Ae&&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(be){return typeof be=="function"}ve=null}).call(this)}).call(this,typeof Mn!="undefined"?Mn: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"),Ae=oe("./response"),me=oe("readable-stream"),be=oe("to-arraybuffer"),fe=Ae.IncomingMessage,z=Ae.readyStates;function te(he,pe){return ke.fetch&&pe?"fetch":ke.mozchunkedarraybuffer?"moz-chunked-arraybuffer":ke.msstream?"ms-stream":ke.arraybuffer&&he?"arraybuffer":ke.vbArray&&he?"text:vbarray":"text"}var se=Ue.exports=function(he){var pe=this;me.Writable.call(pe),pe._opts=he,pe._body=[],pe._headers={},he.auth&&pe.setHeader("Authorization","Basic "+new Ee(he.auth).toString("base64")),Object.keys(he.headers).forEach(function(De){pe.setHeader(De,he.headers[De])});var xe,je=!0;if(he.mode==="disable-fetch"||"requestTimeout"in he&&!ke.abortController)je=!1,xe=!0;else if(he.mode==="prefer-streaming")xe=!1;else if(he.mode==="allow-wrong-content-type")xe=!ke.overrideMimeType;else if(!he.mode||he.mode==="default"||he.mode==="prefer-fast")xe=!0;else throw new Error("Invalid value for opts.mode");pe._mode=te(xe,je),pe._fetchTimer=null,pe.on("finish",function(){pe._onFinish()})};Se(se,me.Writable),se.prototype.setHeader=function(he,pe){var xe=this,je=he.toLowerCase();le.indexOf(je)===-1&&(xe._headers[je]={name:he,value:pe})},se.prototype.getHeader=function(he){var pe=this._headers[he.toLowerCase()];return pe?pe.value:null},se.prototype.removeHeader=function(he){var pe=this;delete pe._headers[he.toLowerCase()]},se.prototype._onFinish=function(){var he=this;if(!he._destroyed){var pe=he._opts,xe=he._headers,je=null;pe.method!=="GET"&&pe.method!=="HEAD"&&(ke.arraybuffer?je=be(Ee.concat(he._body)):ke.blobConstructor?je=new ve.Blob(he._body.map(function(Ge){return be(Ge)}),{type:(xe["content-type"]||{}).value||""}):je=Ee.concat(he._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])}),he._mode==="fetch"){var Fe=null,Te=null;if(ke.abortController){var Me=new AbortController;Fe=Me.signal,he._fetchAbortController=Me,"requestTimeout"in pe&&pe.requestTimeout!==0&&(he._fetchTimer=ve.setTimeout(function(){he.emit("requestTimeout"),he._fetchAbortController&&he._fetchAbortController.abort()},pe.requestTimeout))}ve.fetch(he._opts.url,{method:he._opts.method,headers:De,body:je||void 0,mode:"cors",credentials:pe.withCredentials?"include":"same-origin",signal:Fe}).then(function(Ge){he._fetchResponse=Ge,he._connect()},function(Ge){ve.clearTimeout(he._fetchTimer),he._destroyed||he.emit("error",Ge)})}else{var Be=he._xhr=new ve.XMLHttpRequest;try{Be.open(he._opts.method,he._opts.url,!0)}catch(Ge){de.nextTick(function(){he.emit("error",Ge)});return}"responseType"in Be&&(Be.responseType=he._mode.split(":")[0]),"withCredentials"in Be&&(Be.withCredentials=!!pe.withCredentials),he._mode==="text"&&"overrideMimeType"in Be&&Be.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in pe&&(Be.timeout=pe.requestTimeout,Be.ontimeout=function(){he.emit("requestTimeout")}),De.forEach(function(Ge){Be.setRequestHeader(Ge[0],Ge[1])}),he._response=null,Be.onreadystatechange=function(){switch(Be.readyState){case z.LOADING:case z.DONE:he._onXHRProgress();break}},he._mode==="moz-chunked-arraybuffer"&&(Be.onprogress=function(){he._onXHRProgress()}),Be.onerror=function(){he._destroyed||he.emit("error",new Error("XHR error"))};try{Be.send(je)}catch(Ge){de.nextTick(function(){he.emit("error",Ge)});return}}}};function ie(he){try{var pe=he.status;return pe!==null&&pe!==0}catch(xe){return!1}}se.prototype._onXHRProgress=function(){var he=this;!ie(he._xhr)||he._destroyed||(he._response||he._connect(),he._response._onXHRProgress())},se.prototype._connect=function(){var he=this;he._destroyed||(he._response=new fe(he._xhr,he._fetchResponse,he._mode,he._fetchTimer),he._response.on("error",function(pe){he.emit("error",pe)}),he.emit("response",he._response))},se.prototype._write=function(he,pe,xe){var je=this;je._body.push(he),xe()},se.prototype.abort=se.prototype.destroy=function(){var he=this;he._destroyed=!0,ve.clearTimeout(he._fetchTimer),he._response&&(he._response._destroyed=!0),he._xhr?he._xhr.abort():he._fetchAbortController&&he._fetchAbortController.abort()},se.prototype.end=function(he,pe,xe){var je=this;typeof he=="function"&&(xe=he,he=void 0),me.Writable.prototype.end.call(je,he,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 Mn!="undefined"?Mn: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"),Ae=oe("readable-stream"),me=Ie.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},be=Ie.IncomingMessage=function(fe,z,te,se){var ie=this;if(Ae.Readable.call(ie),ie._mode=te,ie.headers={},ie.rawHeaders=[],ie.trailers={},ie.rawTrailers=[],ie.on("end",function(){de.nextTick(function(){ie.emit("close")})}),te==="fetch"){var le=function Fe(){pe.read().then(function(Te){if(!ie._destroyed){if(Te.done){ve.clearTimeout(se),ie.push(null);return}ie.push(new Ee(Te.value)),Fe()}}).catch(function(Te){ve.clearTimeout(se),ie._destroyed||ie.emit("error",Te)})};if(ie._fetchResponse=z,ie.url=z.url,ie.statusCode=z.status,ie.statusMessage=z.statusText,z.headers.forEach(function(Fe,Te){ie.headers[Te.toLowerCase()]=Fe,ie.rawHeaders.push(Te,Fe)}),ke.writableStream){var he=new WritableStream({write:function(Te){return new Promise(function(Me,Be){ie._destroyed?Be():ie.push(new Ee(Te))?Me():ie._resumeFetch=Me})},close:function(){ve.clearTimeout(se),ie._destroyed||ie.push(null)},abort:function(Te){ie._destroyed||ie.emit("error",Te)}});try{z.body.pipeTo(he).catch(function(Fe){ve.clearTimeout(se),ie._destroyed||ie.emit("error",Fe)});return}catch(Fe){}}var pe=z.body.getReader();le()}else{ie._xhr=fe,ie._pos=0,ie.url=fe.responseURL,ie.statusCode=fe.status,ie.statusMessage=fe.statusText;var xe=fe.getAllResponseHeaders().split(/\r?\n/);if(xe.forEach(function(Fe){var Te=Fe.match(/^([^:]+):\s*(.*)/);if(Te){var Me=Te[1].toLowerCase();Me==="set-cookie"?(ie.headers[Me]===void 0&&(ie.headers[Me]=[]),ie.headers[Me].push(Te[2])):ie.headers[Me]!==void 0?ie.headers[Me]+=", "+Te[2]:ie.headers[Me]=Te[2],ie.rawHeaders.push(Te[1],Te[2])}}),ie._charset="x-user-defined",!ke.overrideMimeType){var je=ie.rawHeaders["mime-type"];if(je){var De=je.match(/;\s*charset=([^;])(;|$)/);De&&(ie._charset=De[1].toLowerCase())}ie._charset||(ie._charset="utf-8")}}};Se(be,Ae.Readable),be.prototype._read=function(){var fe=this,z=fe._resumeFetch;z&&(fe._resumeFetch=null,z())},be.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 he=new ve.MSStreamReader;he.onprogress=function(){he.result.byteLength>fe._pos&&(fe.push(new Ee(new Uint8Array(he.result.slice(fe._pos)))),fe._pos=he.result.byteLength)},he.onload=function(){fe.push(null)},he.readAsArrayBuffer(te);break}fe._xhr.readyState===me.DONE&&fe._mode!=="ms-stream"&&fe.push(null)}}).call(this)}).call(this,oe("_process"),typeof Mn!="undefined"?Mn: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=Me,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 Ae=/^([a-z0-9.+-]+:)/i,me=/:[0-9]*$/,be=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,fe=["<",">",'"',"`"," ","\r",`
|
|
`," "],z=["{","}","|","\\","^","`"].concat(fe),te=["'"].concat(z),se=["%","/","?",";","#"].concat(te),ie=["/","?","#"],le=255,he=/^[+a-z0-9A-Z_-]{0,63}$/,pe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,xe={javascript:!0,"javascript:":!0},je={javascript:!0,"javascript:":!0},De={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Fe=oe("querystring");function Te(Ye,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("#")?"?":"#",ct=Ye.split(lt),Ct=/\\/g;ct[0]=ct[0].replace(Ct,"/"),Ye=ct.join(lt);var Je=Ye;if(Je=Je.trim(),!Xe&&Ye.split("#").length===1){var rt=be.exec(Je);if(rt)return this.path=Je,this.href=Je,this.pathname=rt[1],rt[2]?(this.search=rt[2],Ke?this.query=Fe.parse(this.search.substr(1)):this.query=this.search.substr(1)):Ke&&(this.search="",this.query={}),this}var xt=Ae.exec(Je);if(xt){xt=xt[0];var bt=xt.toLowerCase();this.protocol=bt,Je=Je.substr(xt.length)}if(Xe||xt||Je.match(/^\/\/[^@\/]+@[^@\/]+/)){var Pt=Je.substr(0,2)==="//";Pt&&!(xt&&je[xt])&&(Je=Je.substr(2),this.slashes=!0)}if(!je[xt]&&(Pt||xt&&!De[xt])){for(var ht=-1,St=0;St<ie.length;St++){var mt=Je.indexOf(ie[St]);mt!==-1&&(ht===-1||mt<ht)&&(ht=mt)}var Nt,dt;ht===-1?dt=Je.lastIndexOf("@"):dt=Je.lastIndexOf("@",ht),dt!==-1&&(Nt=Je.slice(0,dt),Je=Je.slice(dt+1),this.auth=decodeURIComponent(Nt)),ht=-1;for(var St=0;St<se.length;St++){var mt=Je.indexOf(se[St]);mt!==-1&&(ht===-1||mt<ht)&&(ht=mt)}ht===-1&&(ht=Je.length),this.host=Je.slice(0,ht),Je=Je.slice(ht),this.parseHost(),this.hostname=this.hostname||"";var Dt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Dt)for(var gt=this.hostname.split("."),St=0,yt=gt.length;St<yt;St++){var tt=gt[St];if(tt&&!tt.match(he)){for(var He="",we=0,Ne=tt.length;we<Ne;we++)tt.charCodeAt(we)>127?He+="x":He+=tt[we];if(!He.match(he)){var Ve=gt.slice(0,St),nt=gt.slice(St+1),Re=tt.match(pe);Re&&(Ve.push(Re[1]),nt.unshift(Re[2])),nt.length&&(Je="/"+nt.join(".")+Je),this.hostname=Ve.join(".");break}}}this.hostname.length>le?this.hostname="":this.hostname=this.hostname.toLowerCase(),Dt||(this.hostname=Ee.toASCII(this.hostname));var _e=this.port?":"+this.port:"",Ze=this.hostname||"";this.host=Ze+_e,this.href+=this.host,Dt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Je[0]!=="/"&&(Je="/"+Je))}if(!xe[bt])for(var St=0,yt=te.length;St<yt;St++){var qe=te[St];if(Je.indexOf(qe)!==-1){var ut=encodeURIComponent(qe);ut===qe&&(ut=escape(qe)),Je=Je.split(qe).join(ut)}}var vt=Je.indexOf("#");vt!==-1&&(this.hash=Je.substr(vt),Je=Je.slice(0,vt));var At=Je.indexOf("?");if(At!==-1?(this.search=Je.substr(At),this.query=Je.substr(At+1),Ke&&(this.query=Fe.parse(this.query)),Je=Je.slice(0,At)):Ke&&(this.search="",this.query={}),Je&&(this.pathname=Je),De[bt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _e=this.pathname||"",Et=this.search||"";this.path=_e+Et}return this.href=this.format(),this};function Me(Ye){return ke.isString(Ye)&&(Ye=Te(Ye)),Ye instanceof Se?Ye.format():Se.prototype.format.call(Ye)}Se.prototype.format=function(){var Ye=this.auth||"";Ye&&(Ye=encodeURIComponent(Ye),Ye=Ye.replace(/%3A/i,":"),Ye+="@");var Ke=this.protocol||"",Xe=this.pathname||"",ot=this.hash||"",lt=!1,ct="";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&&(ct=Fe.stringify(this.query));var Ct=this.search||ct&&"?"+ct||"";return Ke&&Ke.substr(-1)!==":"&&(Ke+=":"),this.slashes||(!Ke||De[Ke])&<!==!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 ct=ot[lt];Xe[ct]=this[ct]}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 rt=Ct[Je];rt!=="protocol"&&(Xe[rt]=Ye[rt])}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 xt=Object.keys(Ye),bt=0;bt<xt.length;bt++){var Pt=xt[bt];Xe[Pt]=Ye[Pt]}return Xe.href=Xe.format(),Xe}if(Xe.protocol=Ye.protocol,!Ye.host&&!je[Ye.protocol]){for(var yt=(Ye.pathname||"").split("/");yt.length&&!(Ye.host=yt.shift()););Ye.host||(Ye.host=""),Ye.hostname||(Ye.hostname=""),yt[0]!==""&&yt.unshift(""),yt.length<2&&yt.unshift(""),Xe.pathname=yt.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 ht=Xe.pathname||"",St=Xe.search||"";Xe.path=ht+St}return Xe.slashes=Xe.slashes||Ye.slashes,Xe.href=Xe.format(),Xe}var mt=Xe.pathname&&Xe.pathname.charAt(0)==="/",Nt=Ye.host||Ye.pathname&&Ye.pathname.charAt(0)==="/",dt=Nt||mt||Xe.host&&Ye.pathname,Dt=dt,gt=Xe.pathname&&Xe.pathname.split("/")||[],yt=Ye.pathname&&Ye.pathname.split("/")||[],tt=Xe.protocol&&!De[Xe.protocol];if(tt&&(Xe.hostname="",Xe.port=null,Xe.host&&(gt[0]===""?gt[0]=Xe.host:gt.unshift(Xe.host)),Xe.host="",Ye.protocol&&(Ye.hostname=null,Ye.port=null,Ye.host&&(yt[0]===""?yt[0]=Ye.host:yt.unshift(Ye.host)),Ye.host=null),dt=dt&&(yt[0]===""||gt[0]==="")),Nt)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,gt=yt;else if(yt.length)gt||(gt=[]),gt.pop(),gt=gt.concat(yt),Xe.search=Ye.search,Xe.query=Ye.query;else if(!ke.isNullOrUndefined(Ye.search)){if(tt){Xe.hostname=Xe.host=gt.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(!gt.length)return Xe.pathname=null,Xe.search?Xe.path="/"+Xe.search:Xe.path=null,Xe.href=Xe.format(),Xe;for(var we=gt.slice(-1)[0],Ne=(Xe.host||Ye.host||gt.length>1)&&(we==="."||we==="..")||we==="",Ve=0,nt=gt.length;nt>=0;nt--)we=gt[nt],we==="."?gt.splice(nt,1):we===".."?(gt.splice(nt,1),Ve++):Ve&&(gt.splice(nt,1),Ve--);if(!dt&&!Dt)for(;Ve--;Ve)gt.unshift("..");dt&>[0]!==""&&(!gt[0]||gt[0].charAt(0)!=="/")&>.unshift(""),Ne&>.join("/").substr(-1)!=="/"&>.push("");var Re=gt[0]===""||gt[0]&>[0].charAt(0)==="/";if(tt){Xe.hostname=Xe.host=Re?"":gt.length?gt.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&>.length,dt&&!Re&>.unshift(""),gt.length?Xe.pathname=gt.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"),Ae=oe("url"),me=oe("http"),be=oe("https"),fe=oe("debug")("urllib"),z=oe("humanize-ms"),te=0,se=Math.pow(2,31)-10,ie=/^https?:\/\//i;function le(je,De){return je===void 0?De:je}function he(je){return je?je.split(";")[0].trim().toLowerCase():""}function pe(je,De){return function(Fe,Te,Me){if(Fe)return De(Fe);je({data:Te,status:Me.statusCode,headers:Me.headers,res:Me})}}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(Me,Be){Ie.requestWithCallback(De,Fe,pe(Me,Be))})},Ie.requestWithCallback=function(De,Fe,Te){if(!De||typeof De!="string"&&(0,ke.default)(De)!=="object"){var Me=Se.format("expect request url to be a string or a http request options, but got %j",De);throw new Error(Me)}arguments.length===2&&typeof Fe=="function"&&(Te=Fe,Fe=null),Fe=Fe||{},te>=se&&(te=0);var Be=++te;Fe.requestUrls=Fe.requestUrls||[];var 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=Ae.parse(De)):Ke=De;var Xe=(Fe.type||Fe.method||Ke.method||"GET").toUpperCase(),ot=Ke.port||80,lt=me,ct=le(Fe.agent,Ie.agent),Ct=Fe.fixJSONCtlChars;Ke.protocol==="https:"&&(lt=be,ct=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:ct,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 rt=Fe.auth||Ke.auth;rt&&(Je.auth=rt);var xt=Fe.content||Fe.data,bt=Xe==="GET"||Xe==="HEAD"||Fe.dataAsQueryString;if(!Fe.content&&xt&&!(typeof xt=="string"||ve.isBuffer(xt)))if(bt)xt=Fe.nestedQuerystring?qs.stringify(xt):querystring.stringify(xt);else{var Pt=Je.headers["Content-Type"]||Je.headers["content-type"];Pt||(Fe.contentType==="json"?Pt="application/json":Pt="application/x-www-form-urlencoded",Je.headers["Content-Type"]=Pt),he(Pt)==="application/json"?xt=JSON.stringify(xt):xt=Fe.nestedQuerystring?qs.stringify(xt):querystring.stringify(xt)}bt&&xt&&(Je.path+=(Ke.query?"&":"?")+xt,xt=null);var ht=0;if(xt){var St=xt.length;ve.isBuffer(xt)||(St=ve.byteLength(xt)),ht=Je.headers["Content-Length"]=St}Fe.dataType==="json"&&(Je.headers.Accept="application/json"),typeof Fe.beforeRequest=="function"&&Fe.beforeRequest(Je);var mt=null,Nt=null,dt=null,Dt=!1,gt=!1,yt=0,tt=-1,He=!1,we="",Ne="",Ve=null;Fe.timing&&(Ve={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function nt(){mt&&(clearTimeout(mt),mt=null)}function Re(){Nt&&(clearTimeout(Nt),Nt=null)}function _e(Ht,sn,rn){if(Re(),!Te){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Be,de.pid,Je.method,De),Ht&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
stack: %s`,Date(),Be,de.pid,Ht.name,Ht.message,Ht.stack);return}var un=Te;Te=null;var Sn={};rn&&(tt=rn.statusCode,Sn=rn.headers);var vn=Date.now()-Ye;Ve&&(Ve.contentDownload=vn),fe("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",vn,yt,tt,Je.method,Je.host,Je.path,gt,Ve);var Cn={status:tt,statusCode:tt,headers:Sn,size:yt,aborted:He,rt:vn,keepAliveSocket:gt,data:sn,requestUrls:Fe.requestUrls,timing:Ve,remoteAddress:we,remotePort:Ne};if(Ht){var On="";ct&&typeof ct.getCurrentStatus=="function"&&(On=", agent status: "+JSON.stringify(ct.getCurrentStatus())),Ht.message+=", "+Je.method+" "+De+" "+tt+" (connected: "+Dt+", keepalive socket: "+gt+On+`)
|
|
headers: `+JSON.stringify(Sn),Ht.data=sn,Ht.path=Je.path,Ht.status=tt,Ht.headers=Sn,Ht.res=Cn}un(Ht,sn,Fe.streaming?rn:Cn),Fe.emitter&&(Ge.url=De,Ge.socket=Yt&&Yt.connection,Ge.options=Je,Ge.size=ht,Fe.emitter.emit("response",{requestId:Be,error:Ht,ctx:Fe.ctx,req:Ge,res:Cn}))}function Ze(Ht){var sn=null;if(Fe.followRedirect&&statuses.redirect[Ht.statusCode]){Fe._followRedirectCount=(Fe._followRedirectCount||0)+1;var rn=Ht.headers.location;if(!rn)sn=new Error("Got statusCode "+Ht.statusCode+" but cannot resolve next location from headers"),sn.name="FollowRedirectError";else if(Fe._followRedirectCount>Fe.maxRedirects)sn=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+De),sn.name="MaxRedirectError";else{var un=Fe.formatRedirectUrl?Fe.formatRedirectUrl(De,rn):Ae.resolve(De,rn);fe("Request#%d %s: `redirected` from %s to %s",Be,Je.path,De,un),Re(),Fe.headers&&Fe.headers.Host&&ie.test(rn)&&(Fe.headers.Host=null);var Sn=Te;return Te=null,Ie.requestWithCallback(un,Fe,Sn),{redirect:!0,error:null}}}return{redirect:!1,error:sn}}Fe.gzip&&!Je.headers["Accept-Encoding"]&&!Je.headers["accept-encoding"]&&(Je.headers["Accept-Encoding"]="gzip");function qe(Ht,sn,rn){var un=Ht.headers["content-encoding"];return rn(null,sn,un)}var ut=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 vt(Ht){if(Ve&&(Ve.waiting=Date.now()-Ye),fe("Request#%d %s `req response` event emit: status %d, headers: %j",Be,De,Ht.statusCode,Ht.headers),Fe.streaming){var sn=Ze(Ht);if(sn.redirect){Ht.resume();return}return sn.error?(Ht.resume(),_e(sn.error,null,Ht)):_e(null,null,Ht)}if(Ht.on("close",function(){fe("Request#%d %s: `res close` event emit, total size %d",Be,De,yt)}),Ht.on("error",function(){fe("Request#%d %s: `res error` event emit, total size %d",Be,De,yt)}),Ht.on("aborted",function(){He=!0,fe("Request#%d %s: `res aborted` event emit, total size %d",Be,De,yt)}),ut){var rn=Ze(Ht);if(rn.redirect){Ht.resume();return}return rn.error?(Ht.resume(),ut.end(),_e(rn.error,null,Ht)):(Fe.consumeWriteStream===!1?Ht.on("end",_e.bind(null,null,null,Ht)):ut.on("close",function(){fe("Request#%d %s: writeStream close event emitted",Be,De),_e(dt||null,null,Ht)}),Ht.pipe(ut))}var un=[];Ht.on("data",function(Sn){fe("Request#%d %s: `res data` event emit, size %d",Be,De,Sn.length),yt+=Sn.length,un.push(Sn)}),Ht.on("end",function(){var Sn=ve.concat(un,yt);if(fe("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Be,De,yt,Ht._dumped),dt)return _e(dt,Sn,Ht);var vn=Ze(Ht);if(vn.error)return _e(vn.error,Sn,Ht);vn.redirect||qe(Ht,Sn,function(Cn,On,Dr){if(Cn)return _e(Cn,Sn,Ht);if(!Dr&&xe.indexOf(Fe.dataType)>=0){try{On=decodeBodyByCharset(On,Ht)}catch(qr){return fe("decodeBodyByCharset error: %s",qr),_e(null,On,Ht)}if(Fe.dataType==="json")if(yt===0)On=null;else{var Sr=parseJSON(On,Ct);Sr.error?Cn=Sr.error:On=Sr.data}}He&&fe("Request#%d %s: Remote socket was terminated before `response.end()` was called",Be,De),_e(Cn,On,Ht)})})}var At,Et;Array.isArray(Fe.timeout)?(At=z(Fe.timeout[0]),Et=z(Fe.timeout[1])):At=Et=z(Fe.timeout),fe("ConnectTimeout: %d, ResponseTimeout: %d",At,Et);function Ft(){fe("Connect timer ticking, timeout: %d",At),mt=setTimeout(function(){mt=null,tt===-1&&(tt=-2);var Ht="Connect timeout for "+At+"ms",sn="ConnectionTimeoutError";Yt.socket||(sn="SocketAssignTimeoutError",Ht+=", working sockets is full"),dt=new Error(Ht),dt.name=sn,dt.requestId=Be,fe("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Be,De,dt.name,Ht,Dt),Vt()},At)}function Kt(){fe("Response timer ticking, timeout: %d",Et),Nt=setTimeout(function(){Nt=null;var Ht="Response timeout for "+Et+"ms",sn="ResponseTimeoutError";dt=new Error(Ht),dt.name=sn,dt.requestId=Be,fe("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Be,De,dt.name,Ht,Dt),Vt()},Et)}var Yt;Je.mode=Fe.mode?Fe.mode:"";try{Yt=lt.request(Je,vt)}catch(Ht){return _e(Ht)}typeof window=="undefined"?Ft():Yt.on("requestTimeout",function(){tt===-1&&(tt=-2);var Ht="Connect timeout for "+At+"ms",sn="ConnectionTimeoutError";dt=new Error(Ht),dt.name=sn,dt.requestId=Be,Vt()});function Vt(){fe("Request#%d %s abort, connected: %s",Be,De,Dt),Yt.socket||(dt.noSocket=!0,_e(dt)),Yt.abort()}return Ve&&Yt.on("finish",function(){Ve.requestSent=Date.now()-Ye}),Yt.once("socket",function(Ht){Ve&&(Ve.queuing=Date.now()-Ye);var sn=Ht.readyState;if(sn==="opening"){Ht.once("lookup",function(rn,un,Sn){fe("Request#%d %s lookup: %s, %s, %s",Be,De,rn,un,Sn),Ve&&(Ve.dnslookup=Date.now()-Ye),un&&(we=un)}),Ht.once("connect",function(){Ve&&(Ve.connected=Date.now()-Ye),nt(),Kt(),fe("Request#%d %s new socket connected",Be,De),Dt=!0,we||(we=Ht.remoteAddress),Ne=Ht.remotePort});return}fe("Request#%d %s reuse socket connected, readyState: %s",Be,De,sn),Dt=!0,gt=!0,we||(we=Ht.remoteAddress),Ne=Ht.remotePort,nt(),Kt()}),Yt.on("error",function(Ht){(Ht.name==="Error"||Ht.name==="TypeError")&&(Ht.name=Dt?"ResponseError":"RequestError"),Ht.message+=' (req "error")',fe("Request#%d %s `req error` event emit, %s: %s",Be,De,Ht.name,Ht.message),_e(dt||Ht)}),ut&&ut.once("error",function(Ht){Ht.message+=' (writeStream "error")',dt=Ht,fe("Request#%d %s `writeStream error` event emit, %s: %s",Be,De,Ht.name,Ht.message),Vt()}),Fe.stream?(Fe.stream.pipe(Yt),Fe.stream.once("error",function(Ht){Ht.message+=' (stream "error")',dt=Ht,fe("Request#%d %s `readStream error` event emit, %s: %s",Be,De,Ht.name,Ht.message),Vt()})):Yt.end(xt),Yt.requestId=Be,Yt}}).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(_n,Mn,ft){(function(at){at(ft(89780))})(function(at){at.defineOption("placeholder","",function(Ee,ke,Se){var Ae=Se&&Se!=at.Init;if(ke&&!Ae)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&&Ae){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(_n,Mn,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 he=be(z,ie[le].head);if(!he||se.indexOf(he)%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 he=be(z,ie[le].head);if(!he||se.indexOf(he)%2!=0)return at.Pass}z.operation(function(){var pe=z.lineSeparator()||`
|
|
`;z.replaceSelection(pe+pe,null),z.execCommand("goCharLeft"),ie=z.listSelections();for(var xe=0;xe<ie.length;xe++){var je=ie[xe].head.line;z.indentLine(je,null,!0),z.indentLine(je+1,null,!0)}})}function Ae(z){var te=at.cmpPos(z.anchor,z.head)>0;return{anchor:new oe(z.anchor.line,z.anchor.ch+(te?-1:1)),head:new oe(z.head.line,z.head.ch+(te?1:-1))}}function me(z,te){var se=Ee(z);if(!se||z.getOption("disableInput"))return at.Pass;var ie=Ue(se,"pairs"),le=ie.indexOf(te);if(le==-1)return at.Pass;for(var he=Ue(se,"closeBefore"),pe=Ue(se,"triples"),xe=ie.charAt(le+1)==te,je=z.listSelections(),De=le%2==0,Fe,Te=0;Te<je.length;Te++){var Me=je[Te],Be=Me.head,Ge,Ye=z.getRange(Be,oe(Be.line,Be.ch+1));if(De&&!Me.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)||he.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 ct=z.getSelections(),lt=0;lt<ct.length;lt++)ct[lt]=Xe+ct[lt]+ot;z.replaceSelections(ct,"around"),ct=z.listSelections().slice();for(var lt=0;lt<ct.length;lt++)ct[lt]=Ae(ct[lt]);z.setSelections(ct)}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 be(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(_n,Mn,ft){(function(at){at(ft(89780),ft(32855))})(function(at){at.defineOption("autoCloseTags",!1,function(ke,Se,Ae){if(Ae!=at.Init&&Ae&&ke.removeKeyMap("autoCloseTags"),!!Se){var me={name:"autoCloseTags"};(typeof Se!="object"||Se.whenClosing!==!1)&&(me["'/'"]=function(be){return de(be)}),(typeof Se!="object"||Se.whenOpening!==!1)&&(me["'>'"]=function(be){return Ue(be)}),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(),Ae=[],me=ke.getOption("autoCloseTags"),be=0;be<Se.length;be++){if(!Se[be].empty())return at.Pass;var fe=Se[be].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 he=te.mode.configuration=="html",pe=typeof me=="object"&&me.dontCloseTags||he&&Gt,xe=typeof me=="object"&&me.indentTags||he&&oe;z.end>fe.ch&&(le=le.slice(0,le.length-z.end+fe.ch));var je=le.toLowerCase();if(!le||z.type=="string"&&(z.end!=fe.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&ie.close||z.string.indexOf("/")==fe.ch-z.start-1||pe&&ve(pe,je)>-1||Ee(ke,te.mode.xmlCurrentContext&&te.mode.xmlCurrentContext(se)||[],le,fe,!0))return at.Pass;var De=typeof me=="object"&&me.emptyTags;if(De&&ve(De,le)>-1){Ae[be]={text:"/>",newPos:at.Pos(fe.line,fe.ch+2)};continue}var Fe=xe&&ve(xe,je)>-1;Ae[be]={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,be=Se.length-1;be>=0;be--){var Me=Ae[be];ke.replaceRange(Me.text,Se[be].head,Se[be].anchor,"+insert");var Be=ke.listSelections().slice(0);Be[be]={head:Me.newPos,anchor:Me.newPos},ke.setSelections(Be),!Te&&Me.indent&&(ke.indentLine(Me.newPos.line,null,!0),ke.indentLine(Me.newPos.line+1,null,!0))}}function Ie(ke,Se){for(var Ae=ke.listSelections(),me=[],be=Se?"/":"</",fe=ke.getOption("autoCloseTags"),z=typeof fe=="object"&&fe.dontIndentOnSlash,te=0;te<Ae.length;te++){if(!Ae[te].empty())return at.Pass;var se=Ae[te].head,ie=ke.getTokenAt(se),le=at.innerMode(ke.getMode(),ie.state),he=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=be+"script";else if(xe&&le.mode.name=="css")pe=be+"style";else{var je=le.mode.xmlCurrentContext&&le.mode.xmlCurrentContext(he);if(!je||je.length&&Ee(ke,je,je[je.length-1],se))return at.Pass;pe=be+je[je.length-1]}ke.getLine(se.line).charAt(ie.end)!=">"&&(pe+=">"),me[te]=pe}if(ke.replaceSelections(me),Ae=ke.listSelections(),!z)for(var te=0;te<Ae.length;te++)(te==Ae.length-1||Ae[te].head.line<Ae[te+1].head.line)&&ke.indentLine(Ae[te].head.line)}function de(ke){return ke.getOption("disableInput")?at.Pass:Ie(ke,!0)}at.commands.closeTag=function(ke){return Ie(ke)};function ve(ke,Se){if(ke.indexOf)return ke.indexOf(Se);for(var Ae=0,me=ke.length;Ae<me;++Ae)if(ke[Ae]==Se)return Ae;return-1}function Ee(ke,Se,Ae,me,be){if(!at.scanForClosingTag)return!1;var fe=Math.min(ke.lastLine()+1,me.line+500),z=at.scanForClosingTag(ke,me,null,fe);if(!z||z.tag!=Ae)return!1;for(var te=be?1:0,se=Se.length-1;se>=0&&Se[se]==Ae;se--)++te;me=z.to;for(var se=1;se<te;se++){var ie=at.scanForClosingTag(ke,me,null,fe);if(!ie||ie.tag!=Ae)return!1;me=ie.to}return!0}})},32855:function(_n,Mn,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,he){this.line=ie,this.ch=le,this.cm=se,this.text=se.getLine(ie),this.min=he?Math.max(he.from,se.firstLine()):se.firstLine(),this.max=he?Math.min(he.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 Ae(se){for(;;){var ie=se.text.indexOf(">",se.ch);if(ie==-1){if(ke(se))continue;return}if(!Ee(se,ie+1)){se.ch=ie+1;continue}var le=se.text.lastIndexOf("/",ie),he=le>-1&&!/\S/.test(se.text.slice(le+1,ie));return se.ch=ie+1,he?"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 be(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),he=le>-1&&!/\S/.test(se.text.slice(le+1,ie));return se.ch=ie+1,he?"selfClose":"regular"}}function z(se,ie){for(var le=[];;){var he=be(se),pe,xe=se.line,je=se.ch-(he?he[0].length:0);if(!he||!(pe=Ae(se)))return;if(pe!="selfClose")if(he[1]){for(var De=le.length-1;De>=0;--De)if(le[De]==he[2]){le.length=De;break}if(De<0&&(!ie||ie==he[2]))return{tag:he[2],from:Gt(xe,je),to:Gt(se.line,se.ch)}}else le.push(he[2])}}function te(se,ie){for(var le=[];;){var he=fe(se);if(!he)return;if(he=="selfClose"){me(se);continue}var pe=se.line,xe=se.ch,je=me(se);if(!je)return;if(je[1])le.push(je[2]);else{for(var De=le.length-1;De>=0;--De)if(le[De]==je[2]){le.length=De;break}if(De<0&&(!ie||ie==je[2]))return{tag:je[2],from: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 he=be(le);if(!he||le.line!=ie.line)return;var pe=Ae(le);if(!pe)return;if(!he[1]&&pe!="selfClose"){var xe=Gt(le.line,le.ch),je=z(le,he[2]);return je&&oe(je.from,xe)>0?{from:xe,to:je.from}:null}}}),at.findMatchingTag=function(se,ie,le){var he=new ve(se,ie.line,ie.ch,le);if(!(he.text.indexOf(">")==-1&&he.text.indexOf("<")==-1)){var pe=Ae(he),xe=pe&&Gt(he.line,he.ch),je=pe&&me(he);if(!(!pe||!je||oe(he,ie)>0)){var De={from:Gt(he.line,he.ch),to:xe,tag:je[2]};return pe=="selfClose"?{open:De,close:null,at:"open"}:je[1]?{open:te(he,je[2]),close:De,at:"close"}:(he=new ve(se,xe.line,xe.ch,le),{open:De,close:z(he,je[2]),at:"open"})}}},at.findEnclosingTag=function(se,ie,le,he){for(var pe=new ve(se,ie.line,ie.ch,le);;){var xe=te(pe,he);if(!xe)break;var je=new ve(se,ie.line,ie.ch,le),De=z(je,xe.tag);if(De)return{open:xe,close:De}}},at.scanForClosingTag=function(se,ie,le,he){var pe=new ve(se,ie.line,ie.ch,he?{from:0,to:he}:null);return z(pe,le)}})},89780:function(_n){(function(Mn,ft){_n.exports=ft()})(this,function(){"use strict";var Mn=navigator.userAgent,ft=navigator.platform,at=/gecko\/\d/i.test(Mn),Gt=/MSIE \d/.test(Mn),oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Mn),Ue=/Edge\/(\d+)/.exec(Mn),Ie=Gt||oe||Ue,de=Ie&&(Gt?document.documentMode||6:+(Ue||oe)[1]),ve=!Ue&&/WebKit\//.test(Mn),Ee=ve&&/Qt\/\d+\.\d+/.test(Mn),ke=!Ue&&/Chrome\//.test(Mn),Se=/Opera\//.test(Mn),Ae=/Apple Computer/.test(navigator.vendor),me=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Mn),be=/PhantomJS/.test(Mn),fe=!Ue&&/AppleWebKit/.test(Mn)&&/Mobile\/\w+/.test(Mn),z=/Android/.test(Mn),te=fe||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Mn),se=fe||/Mac/.test(ft),ie=/\bCrOS\b/.test(Mn),le=/win/i.test(ft),he=Se&&Mn.match(/Version\/(\d*\.\d*)/);he&&(he=Number(he[1])),he&&he>=15&&(Se=!1,ve=!0);var pe=se&&(Ee||Se&&(he==null||he<12.11)),xe=at||Ie&&de>=9;function je(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var De=function(re,ce){var Ce=re.className,Pe=je(ce).exec(Ce);if(Pe){var Oe=Ce.slice(Pe.index+Pe[0].length);re.className=Ce.slice(0,Pe.index)+(Oe?Pe[1]+Oe:"")}};function Fe(re){for(var ce=re.childNodes.length;ce>0;--ce)re.removeChild(re.firstChild);return re}function Te(re,ce){return Fe(re).appendChild(ce)}function Me(re,ce,Ce,Pe){var Oe=document.createElement(re);if(Ce&&(Oe.className=Ce),Pe&&(Oe.style.cssText=Pe),typeof ce=="string")Oe.appendChild(document.createTextNode(ce));else if(ce)for(var $e=0;$e<ce.length;++$e)Oe.appendChild(ce[$e]);return Oe}function Be(re,ce,Ce,Pe){var Oe=Me(re,ce,Ce,Pe);return Oe.setAttribute("role","presentation"),Oe}var Ge;document.createRange?Ge=function(re,ce,Ce,Pe){var Oe=document.createRange();return Oe.setEnd(Pe||re,Ce),Oe.setStart(re,ce),Oe}:Ge=function(re,ce,Ce){var Pe=document.body.createTextRange();try{Pe.moveToElementText(re.parentNode)}catch(Oe){return Pe}return Pe.collapse(!0),Pe.moveEnd("character",Ce),Pe.moveStart("character",ce),Pe};function Ye(re,ce){if(ce.nodeType==3&&(ce=ce.parentNode),re.contains)return re.contains(ce);do if(ce.nodeType==11&&(ce=ce.host),ce==re)return!0;while(ce=ce.parentNode)}function Ke(){var re;try{re=document.activeElement}catch(ce){re=document.body||null}for(;re&&re.shadowRoot&&re.shadowRoot.activeElement;)re=re.shadowRoot.activeElement;return re}function Xe(re,ce){var Ce=re.className;je(ce).test(Ce)||(re.className+=(Ce?" ":"")+ce)}function ot(re,ce){for(var Ce=re.split(" "),Pe=0;Pe<Ce.length;Pe++)Ce[Pe]&&!je(Ce[Pe]).test(ce)&&(ce+=" "+Ce[Pe]);return ce}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(ce){}});function ct(re){var ce=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,ce)}}function Ct(re,ce,Ce){ce||(ce={});for(var Pe in re)re.hasOwnProperty(Pe)&&(Ce!==!1||!ce.hasOwnProperty(Pe))&&(ce[Pe]=re[Pe]);return ce}function Je(re,ce,Ce,Pe,Oe){ce==null&&(ce=re.search(/[^\s\u00a0]/),ce==-1&&(ce=re.length));for(var $e=Pe||0,pt=Oe||0;;){var Lt=re.indexOf(" ",$e);if(Lt<0||Lt>=ce)return pt+(ce-$e);pt+=Lt-$e,pt+=Ce-pt%Ce,$e=Lt+1}}var rt=function(){this.id=null,this.f=null,this.time=0,this.handler=ct(this.onTimeout,this)};rt.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},rt.prototype.set=function(re,ce){this.f=ce;var Ce=+new Date+re;(!this.id||Ce<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,re),this.time=Ce)};function xt(re,ce){for(var Ce=0;Ce<re.length;++Ce)if(re[Ce]==ce)return Ce;return-1}var bt=50,Pt={toString:function(){return"CodeMirror.Pass"}},ht={scroll:!1},St={origin:"*mouse"},mt={origin:"+move"};function Nt(re,ce,Ce){for(var Pe=0,Oe=0;;){var $e=re.indexOf(" ",Pe);$e==-1&&($e=re.length);var pt=$e-Pe;if($e==re.length||Oe+pt>=ce)return Pe+Math.min(pt,ce-Oe);if(Oe+=$e-Pe,Oe+=Ce-Oe%Ce,Pe=$e+1,Oe>=ce)return Pe}}var dt=[""];function Dt(re){for(;dt.length<=re;)dt.push(gt(dt)+" ");return dt[re]}function gt(re){return re[re.length-1]}function yt(re,ce){for(var Ce=[],Pe=0;Pe<re.length;Pe++)Ce[Pe]=ce(re[Pe],Pe);return Ce}function tt(re,ce,Ce){for(var Pe=0,Oe=Ce(ce);Pe<re.length&&Ce(re[Pe])<=Oe;)Pe++;re.splice(Pe,0,ce)}function He(){}function we(re,ce){var Ce;return Object.create?Ce=Object.create(re):(He.prototype=re,Ce=new He),ce&&Ct(ce,Ce),Ce}var Ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ve(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||Ne.test(re))}function nt(re,ce){return ce?ce.source.indexOf("\\w")>-1&&Ve(re)?!0:ce.test(re):Ve(re)}function Re(re){for(var ce in re)if(re.hasOwnProperty(ce)&&re[ce])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 Ze(re){return re.charCodeAt(0)>=768&&_e.test(re)}function qe(re,ce,Ce){for(;(Ce<0?ce>0:ce<re.length)&&Ze(re.charAt(ce));)ce+=Ce;return ce}function ut(re,ce,Ce){for(var Pe=ce>Ce?-1:1;;){if(ce==Ce)return ce;var Oe=(ce+Ce)/2,$e=Pe<0?Math.ceil(Oe):Math.floor(Oe);if($e==ce)return re($e)?ce:Ce;re($e)?Ce=$e:ce=$e+Pe}}function vt(re,ce,Ce,Pe){if(!re)return Pe(ce,Ce,"ltr",0);for(var Oe=!1,$e=0;$e<re.length;++$e){var pt=re[$e];(pt.from<Ce&&pt.to>ce||ce==Ce&&pt.to==ce)&&(Pe(Math.max(pt.from,ce),Math.min(pt.to,Ce),pt.level==1?"rtl":"ltr",$e),Oe=!0)}Oe||Pe(ce,Ce,"ltr")}var At=null;function Et(re,ce,Ce){var Pe;At=null;for(var Oe=0;Oe<re.length;++Oe){var $e=re[Oe];if($e.from<ce&&$e.to>ce)return Oe;$e.to==ce&&($e.from!=$e.to&&Ce=="before"?Pe=Oe:At=Oe),$e.from==ce&&($e.from!=$e.to&&Ce!="before"?Pe=Oe:At=Oe)}return Pe!=null?Pe:At}var Ft=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ce="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Ce(Rt){return Rt<=247?re.charAt(Rt):1424<=Rt&&Rt<=1524?"R":1536<=Rt&&Rt<=1785?ce.charAt(Rt-1536):1774<=Rt&&Rt<=2220?"r":8192<=Rt&&Rt<=8203?"w":Rt==8204?"b":"L"}var Pe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Oe=/[stwN]/,$e=/[LRr]/,pt=/[Lb1n]/,Lt=/[1n]/;function kt(Rt,nn,_t){this.level=Rt,this.from=nn,this.to=_t}return function(Rt,nn){var _t=nn=="ltr"?"L":"R";if(Rt.length==0||nn=="ltr"&&!Pe.test(Rt))return!1;for(var mn=Rt.length,dn=[],lr=0;lr<mn;++lr)dn.push(Ce(Rt.charCodeAt(lr)));for(var dr=0,br=_t;dr<mn;++dr){var Fr=dn[dr];Fr=="m"?dn[dr]=br:br=Fr}for(var ui=0,Yr=_t;ui<mn;++ui){var vi=dn[ui];vi=="1"&&Yr=="r"?dn[ui]="n":$e.test(vi)&&(Yr=vi,vi=="r"&&(dn[ui]="R"))}for(var zi=1,Hr=dn[0];zi<mn-1;++zi){var eo=dn[zi];eo=="+"&&Hr=="1"&&dn[zi+1]=="1"?dn[zi]="1":eo==","&&Hr==dn[zi+1]&&(Hr=="1"||Hr=="n")&&(dn[zi]=Hr),Hr=eo}for(var Yo=0;Yo<mn;++Yo){var Ra=dn[Yo];if(Ra==",")dn[Yo]="N";else if(Ra=="%"){var ia=void 0;for(ia=Yo+1;ia<mn&&dn[ia]=="%";++ia);for(var Is=Yo&&dn[Yo-1]=="!"||ia<mn&&dn[ia]=="1"?"1":"N",ms=Yo;ms<ia;++ms)dn[ms]=Is;Yo=ia-1}}for(var La=0,Xs=_t;La<mn;++La){var as=dn[La];Xs=="L"&&as=="1"?dn[La]="L":$e.test(as)&&(Xs=as)}for(var Ma=0;Ma<mn;++Ma)if(Oe.test(dn[Ma])){var mo=void 0;for(mo=Ma+1;mo<mn&&Oe.test(dn[mo]);++mo);for(var ua=(Ma?dn[Ma-1]:_t)=="L",Xa=(mo<mn?dn[mo]:_t)=="L",ss=ua==Xa?ua?"L":"R":_t,Bl=Ma;Bl<mo;++Bl)dn[Bl]=ss;Ma=mo-1}for(var oa=[],Pl,da=0;da<mn;)if(pt.test(dn[da])){var Af=da;for(++da;da<mn&&pt.test(dn[da]);++da);oa.push(new kt(0,Af,da))}else{var cl=da,Ys=oa.length,_s=nn=="rtl"?1:0;for(++da;da<mn&&dn[da]!="L";++da);for(var Ro=cl;Ro<da;)if(Lt.test(dn[Ro])){cl<Ro&&(oa.splice(Ys,0,new kt(1,cl,Ro)),Ys+=_s);var Ya=Ro;for(++Ro;Ro<da&&Lt.test(dn[Ro]);++Ro);oa.splice(Ys,0,new kt(2,Ya,Ro)),Ys+=_s,cl=Ro}else++Ro;cl<da&&oa.splice(Ys,0,new kt(1,cl,da))}return nn=="ltr"&&(oa[0].level==1&&(Pl=Rt.match(/^\s+/))&&(oa[0].from=Pl[0].length,oa.unshift(new kt(0,0,Pl[0].length))),gt(oa).level==1&&(Pl=Rt.match(/\s+$/))&&(gt(oa).to-=Pl[0].length,oa.push(new kt(0,mn-Pl[0].length,mn)))),nn=="rtl"?oa.reverse():oa}}();function Kt(re,ce){var Ce=re.order;return Ce==null&&(Ce=re.order=Ft(re.text,ce)),Ce}var Yt=[],Vt=function(re,ce,Ce){if(re.addEventListener)re.addEventListener(ce,Ce,!1);else if(re.attachEvent)re.attachEvent("on"+ce,Ce);else{var Pe=re._handlers||(re._handlers={});Pe[ce]=(Pe[ce]||Yt).concat(Ce)}};function Ht(re,ce){return re._handlers&&re._handlers[ce]||Yt}function sn(re,ce,Ce){if(re.removeEventListener)re.removeEventListener(ce,Ce,!1);else if(re.detachEvent)re.detachEvent("on"+ce,Ce);else{var Pe=re._handlers,Oe=Pe&&Pe[ce];if(Oe){var $e=xt(Oe,Ce);$e>-1&&(Pe[ce]=Oe.slice(0,$e).concat(Oe.slice($e+1)))}}}function rn(re,ce){var Ce=Ht(re,ce);if(Ce.length)for(var Pe=Array.prototype.slice.call(arguments,2),Oe=0;Oe<Ce.length;++Oe)Ce[Oe].apply(null,Pe)}function un(re,ce,Ce){return typeof ce=="string"&&(ce={type:ce,preventDefault:function(){this.defaultPrevented=!0}}),rn(re,Ce||ce.type,re,ce),Sr(ce)||ce.codemirrorIgnore}function Sn(re){var ce=re._handlers&&re._handlers.cursorActivity;if(ce)for(var Ce=re.curOp.cursorActivityHandlers||(re.curOp.cursorActivityHandlers=[]),Pe=0;Pe<ce.length;++Pe)xt(Ce,ce[Pe])==-1&&Ce.push(ce[Pe])}function vn(re,ce){return Ht(re,ce).length>0}function Cn(re){re.prototype.on=function(ce,Ce){Vt(this,ce,Ce)},re.prototype.off=function(ce,Ce){sn(this,ce,Ce)}}function On(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function Dr(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function Sr(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function qr(re){On(re),Dr(re)}function tr(re){return re.target||re.srcElement}function ai(re){var ce=re.which;return ce==null&&(re.button&1?ce=1:re.button&2?ce=3:re.button&4&&(ce=2)),se&&re.ctrlKey&&ce==1&&(ce=3),ce}var gi=function(){if(Ie&&de<9)return!1;var re=Me("div");return"draggable"in re||"dragDrop"in re}(),fi;function Di(re){if(fi==null){var ce=Me("span","\u200B");Te(re,Me("span",[ce,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(fi=ce.offsetWidth<=1&&ce.offsetHeight>2&&!(Ie&&de<8))}var Ce=fi?Me("span","\u200B"):Me("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Ce.setAttribute("cm-text",""),Ce}var ki;function Jr(re){if(ki!=null)return ki;var ce=Te(re,document.createTextNode("A\u062EA")),Ce=Ge(ce,0,1).getBoundingClientRect(),Pe=Ge(ce,1,2).getBoundingClientRect();return Fe(re),!Ce||Ce.left==Ce.right?!1:ki=Pe.right-Ce.right<3}var Li=`
|
|
|
|
b`.split(/\n/).length!=3?function(re){for(var ce=0,Ce=[],Pe=re.length;ce<=Pe;){var Oe=re.indexOf(`
|
|
`,ce);Oe==-1&&(Oe=re.length);var $e=re.slice(ce,re.charAt(Oe-1)=="\r"?Oe-1:Oe),pt=$e.indexOf("\r");pt!=-1?(Ce.push($e.slice(0,pt)),ce+=pt+1):(Ce.push($e),ce=Oe+1)}return Ce}:function(re){return re.split(/\r\n?|\n/)},et=window.getSelection?function(re){try{return re.selectionStart!=re.selectionEnd}catch(ce){return!1}}:function(re){var ce;try{ce=re.ownerDocument.selection.createRange()}catch(Ce){}return!ce||ce.parentElement()!=re?!1:ce.compareEndPoints("StartToEnd",ce)!=0},Mr=function(){var re=Me("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),Er=null;function En(re){if(Er!=null)return Er;var ce=Te(re,Me("span","x")),Ce=ce.getBoundingClientRect(),Pe=Ge(ce,0,1).getBoundingClientRect();return Er=Math.abs(Ce.left-Pe.left)>1}var Tn={},Dn={};function Pr(re,ce){arguments.length>2&&(ce.dependencies=Array.prototype.slice.call(arguments,2)),Tn[re]=ce}function Br(re,ce){Dn[re]=ce}function Ar(re){if(typeof re=="string"&&Dn.hasOwnProperty(re))re=Dn[re];else if(re&&typeof re.name=="string"&&Dn.hasOwnProperty(re.name)){var ce=Dn[re.name];typeof ce=="string"&&(ce={name:ce}),re=we(ce,re),re.name=ce.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return Ar("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return Ar("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function Qt(re,ce){ce=Ar(ce);var Ce=Tn[ce.name];if(!Ce)return Qt(re,"text/plain");var Pe=Ce(re,ce);if(Zt.hasOwnProperty(ce.name)){var Oe=Zt[ce.name];for(var $e in Oe)Oe.hasOwnProperty($e)&&(Pe.hasOwnProperty($e)&&(Pe["_"+$e]=Pe[$e]),Pe[$e]=Oe[$e])}if(Pe.name=ce.name,ce.helperType&&(Pe.helperType=ce.helperType),ce.modeProps)for(var pt in ce.modeProps)Pe[pt]=ce.modeProps[pt];return Pe}var Zt={};function Ut(re,ce){var Ce=Zt.hasOwnProperty(re)?Zt[re]:Zt[re]={};Ct(ce,Ce)}function Un(re,ce){if(ce===!0)return ce;if(re.copyState)return re.copyState(ce);var Ce={};for(var Pe in ce){var Oe=ce[Pe];Oe instanceof Array&&(Oe=Oe.concat([])),Ce[Pe]=Oe}return Ce}function pr(re,ce){for(var Ce;re.innerMode&&(Ce=re.innerMode(ce),!(!Ce||Ce.mode==re));)ce=Ce.state,re=Ce.mode;return Ce||{mode:re,state:ce}}function mr(re,ce,Ce){return re.startState?re.startState(ce,Ce):!0}var xn=function(re,ce,Ce){this.pos=this.start=0,this.string=re,this.tabSize=ce||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Ce};xn.prototype.eol=function(){return this.pos>=this.string.length},xn.prototype.sol=function(){return this.pos==this.lineStart},xn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},xn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},xn.prototype.eat=function(re){var ce=this.string.charAt(this.pos),Ce;if(typeof re=="string"?Ce=ce==re:Ce=ce&&(re.test?re.test(ce):re(ce)),Ce)return++this.pos,ce},xn.prototype.eatWhile=function(re){for(var ce=this.pos;this.eat(re););return this.pos>ce},xn.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},xn.prototype.skipToEnd=function(){this.pos=this.string.length},xn.prototype.skipTo=function(re){var ce=this.string.indexOf(re,this.pos);if(ce>-1)return this.pos=ce,!0},xn.prototype.backUp=function(re){this.pos-=re},xn.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)},xn.prototype.indentation=function(){return Je(this.string,null,this.tabSize)-(this.lineStart?Je(this.string,this.lineStart,this.tabSize):0)},xn.prototype.match=function(re,ce,Ce){if(typeof re=="string"){var Pe=function(pt){return Ce?pt.toLowerCase():pt},Oe=this.string.substr(this.pos,re.length);if(Pe(Oe)==Pe(re))return ce!==!1&&(this.pos+=re.length),!0}else{var $e=this.string.slice(this.pos).match(re);return $e&&$e.index>0?null:($e&&ce!==!1&&(this.pos+=$e[0].length),$e)}},xn.prototype.current=function(){return this.string.slice(this.start,this.pos)},xn.prototype.hideFirstChars=function(re,ce){this.lineStart+=re;try{return ce()}finally{this.lineStart-=re}},xn.prototype.lookAhead=function(re){var ce=this.lineOracle;return ce&&ce.lookAhead(re)},xn.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function Yn(re,ce){if(ce-=re.first,ce<0||ce>=re.size)throw new Error("There is no line "+(ce+re.first)+" in the document.");for(var Ce=re;!Ce.lines;)for(var Pe=0;;++Pe){var Oe=Ce.children[Pe],$e=Oe.chunkSize();if(ce<$e){Ce=Oe;break}ce-=$e}return Ce.lines[ce]}function Hn(re,ce,Ce){var Pe=[],Oe=ce.line;return re.iter(ce.line,Ce.line+1,function($e){var pt=$e.text;Oe==Ce.line&&(pt=pt.slice(0,Ce.ch)),Oe==ce.line&&(pt=pt.slice(ce.ch)),Pe.push(pt),++Oe}),Pe}function Qr(re,ce,Ce){var Pe=[];return re.iter(ce,Ce,function(Oe){Pe.push(Oe.text)}),Pe}function $r(re,ce){var Ce=ce-re.height;if(Ce)for(var Pe=re;Pe;Pe=Pe.parent)Pe.height+=Ce}function Mt(re){if(re.parent==null)return null;for(var ce=re.parent,Ce=xt(ce.lines,re),Pe=ce.parent;Pe;ce=Pe,Pe=Pe.parent)for(var Oe=0;Pe.children[Oe]!=ce;++Oe)Ce+=Pe.children[Oe].chunkSize();return Ce+ce.first}function Wt(re,ce){var Ce=re.first;e:do{for(var Pe=0;Pe<re.children.length;++Pe){var Oe=re.children[Pe],$e=Oe.height;if(ce<$e){re=Oe;continue e}ce-=$e,Ce+=Oe.chunkSize()}return Ce}while(!re.lines);for(var pt=0;pt<re.lines.length;++pt){var Lt=re.lines[pt],kt=Lt.height;if(ce<kt)break;ce-=kt}return Ce+pt}function Fn(re,ce){return ce>=re.first&&ce<re.first+re.size}function zn(re,ce){return String(re.lineNumberFormatter(ce+re.firstLineNumber))}function tn(re,ce,Ce){if(Ce===void 0&&(Ce=null),!(this instanceof tn))return new tn(re,ce,Ce);this.line=re,this.ch=ce,this.sticky=Ce}function Nn(re,ce){return re.line-ce.line||re.ch-ce.ch}function jn(re,ce){return re.sticky==ce.sticky&&Nn(re,ce)==0}function Ln(re){return tn(re.line,re.ch)}function An(re,ce){return Nn(re,ce)<0?ce:re}function Kn(re,ce){return Nn(re,ce)<0?re:ce}function Jn(re,ce){return Math.max(re.first,Math.min(ce,re.first+re.size-1))}function er(re,ce){if(ce.line<re.first)return tn(re.first,0);var Ce=re.first+re.size-1;return ce.line>Ce?tn(Ce,Yn(re,Ce).text.length):Wr(ce,Yn(re,ce.line).text.length)}function Wr(re,ce){var Ce=re.ch;return Ce==null||Ce>ce?tn(re.line,ce):Ce<0?tn(re.line,0):re}function Cr(re,ce){for(var Ce=[],Pe=0;Pe<ce.length;Pe++)Ce[Pe]=er(re,ce[Pe]);return Ce}var Tr=function(re,ce){this.state=re,this.lookAhead=ce},ln=function(re,ce,Ce,Pe){this.state=ce,this.doc=re,this.line=Ce,this.maxLookAhead=Pe||0,this.baseTokens=null,this.baseTokenPos=1};ln.prototype.lookAhead=function(re){var ce=this.doc.getLine(this.line+re);return ce!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),ce},ln.prototype.baseToken=function(re){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=re;)this.baseTokenPos+=2;var ce=this.baseTokens[this.baseTokenPos+1];return{type:ce&&ce.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-re}},ln.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ln.fromSaved=function(re,ce,Ce){return ce instanceof Tr?new ln(re,Un(re.mode,ce.state),Ce,ce.lookAhead):new ln(re,Un(re.mode,ce),Ce)},ln.prototype.save=function(re){var ce=re!==!1?Un(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Tr(ce,this.maxLookAhead):ce};function ri(re,ce,Ce,Pe){var Oe=[re.state.modeGen],$e={};Kr(re,ce.text,re.doc.mode,Ce,function(Rt,nn){return Oe.push(Rt,nn)},$e,Pe);for(var pt=Ce.state,Lt=function(Rt){Ce.baseTokens=Oe;var nn=re.state.overlays[Rt],_t=1,mn=0;Ce.state=!0,Kr(re,ce.text,nn.mode,Ce,function(dn,lr){for(var dr=_t;mn<dn;){var br=Oe[_t];br>dn&&Oe.splice(_t,1,dn,Oe[_t+1],br),_t+=2,mn=Math.min(dn,br)}if(lr)if(nn.opaque)Oe.splice(dr,_t-dr,dn,"overlay "+lr),_t=dr+2;else for(;dr<_t;dr+=2){var Fr=Oe[dr+1];Oe[dr+1]=(Fr?Fr+" ":"")+"overlay "+lr}},$e),Ce.state=pt,Ce.baseTokens=null,Ce.baseTokenPos=1},kt=0;kt<re.state.overlays.length;++kt)Lt(kt);return{styles:Oe,classes:$e.bgClass||$e.textClass?$e:null}}function di(re,ce,Ce){if(!ce.styles||ce.styles[0]!=re.state.modeGen){var Pe=_i(re,Mt(ce)),Oe=ce.text.length>re.options.maxHighlightLength&&Un(re.doc.mode,Pe.state),$e=ri(re,ce,Pe);Oe&&(Pe.state=Oe),ce.stateAfter=Pe.save(!Oe),ce.styles=$e.styles,$e.classes?ce.styleClasses=$e.classes:ce.styleClasses&&(ce.styleClasses=null),Ce===re.doc.highlightFrontier&&(re.doc.modeFrontier=Math.max(re.doc.modeFrontier,++re.doc.highlightFrontier))}return ce.styles}function _i(re,ce,Ce){var Pe=re.doc,Oe=re.display;if(!Pe.mode.startState)return new ln(Pe,!0,ce);var $e=ii(re,ce,Ce),pt=$e>Pe.first&&Yn(Pe,$e-1).stateAfter,Lt=pt?ln.fromSaved(Pe,pt,$e):new ln(Pe,mr(Pe.mode),$e);return Pe.iter($e,ce,function(kt){pn(re,kt.text,Lt);var Rt=Lt.line;kt.stateAfter=Rt==ce-1||Rt%5==0||Rt>=Oe.viewFrom&&Rt<Oe.viewTo?Lt.save():null,Lt.nextLine()}),Ce&&(Pe.modeFrontier=Lt.line),Lt}function pn(re,ce,Ce,Pe){var Oe=re.doc.mode,$e=new xn(ce,re.options.tabSize,Ce);for($e.start=$e.pos=Pe||0,ce==""&&Xn(Oe,Ce.state);!$e.eol();)rr(Oe,$e,Ce.state),$e.start=$e.pos}function Xn(re,ce){if(re.blankLine)return re.blankLine(ce);if(re.innerMode){var Ce=pr(re,ce);if(Ce.mode.blankLine)return Ce.mode.blankLine(Ce.state)}}function rr(re,ce,Ce,Pe){for(var Oe=0;Oe<10;Oe++){Pe&&(Pe[0]=pr(re,Ce).mode);var $e=re.token(ce,Ce);if(ce.pos>ce.start)return $e}throw new Error("Mode "+re.name+" failed to advance stream.")}var ir=function(re,ce,Ce){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=ce||null,this.state=Ce};function wr(re,ce,Ce,Pe){var Oe=re.doc,$e=Oe.mode,pt;ce=er(Oe,ce);var Lt=Yn(Oe,ce.line),kt=_i(re,ce.line,Ce),Rt=new xn(Lt.text,re.options.tabSize,kt),nn;for(Pe&&(nn=[]);(Pe||Rt.pos<ce.ch)&&!Rt.eol();)Rt.start=Rt.pos,pt=rr($e,Rt,kt.state),Pe&&nn.push(new ir(Rt,pt,Un(Oe.mode,kt.state)));return Pe?nn:new ir(Rt,pt,kt.state)}function Rr(re,ce){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 Pe=Ce[1]?"bgClass":"textClass";ce[Pe]==null?ce[Pe]=Ce[2]:new RegExp("(?:^|\\s)"+Ce[2]+"(?:$|\\s)").test(ce[Pe])||(ce[Pe]+=" "+Ce[2])}return re}function Kr(re,ce,Ce,Pe,Oe,$e,pt){var Lt=Ce.flattenSpans;Lt==null&&(Lt=re.options.flattenSpans);var kt=0,Rt=null,nn=new xn(ce,re.options.tabSize,Pe),_t,mn=re.options.addModeClass&&[null];for(ce==""&&Rr(Xn(Ce,Pe.state),$e);!nn.eol();){if(nn.pos>re.options.maxHighlightLength?(Lt=!1,pt&&pn(re,ce,Pe,nn.pos),nn.pos=ce.length,_t=null):_t=Rr(rr(Ce,nn,Pe.state,mn),$e),mn){var dn=mn[0].name;dn&&(_t="m-"+(_t?dn+" "+_t:dn))}if(!Lt||Rt!=_t){for(;kt<nn.start;)kt=Math.min(nn.start,kt+5e3),Oe(kt,Rt);Rt=_t}nn.start=nn.pos}for(;kt<nn.pos;){var lr=Math.min(nn.pos,kt+5e3);Oe(lr,Rt),kt=lr}}function ii(re,ce,Ce){for(var Pe,Oe,$e=re.doc,pt=Ce?-1:ce-(re.doc.mode.innerMode?1e3:100),Lt=ce;Lt>pt;--Lt){if(Lt<=$e.first)return $e.first;var kt=Yn($e,Lt-1),Rt=kt.stateAfter;if(Rt&&(!Ce||Lt+(Rt instanceof Tr?Rt.lookAhead:0)<=$e.modeFrontier))return Lt;var nn=Je(kt.text,null,re.options.tabSize);(Oe==null||Pe>nn)&&(Oe=Lt-1,Pe=nn)}return Oe}function oi(re,ce){if(re.modeFrontier=Math.min(re.modeFrontier,ce),!(re.highlightFrontier<ce-10)){for(var Ce=re.first,Pe=ce-1;Pe>Ce;Pe--){var Oe=Yn(re,Pe).stateAfter;if(Oe&&(!(Oe instanceof Tr)||Pe+Oe.lookAhead<ce)){Ce=Pe+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,Ce)}}var cr=!1,on=!1;function or(){cr=!0}function an(){on=!0}function gr(re,ce,Ce){this.marker=re,this.from=ce,this.to=Ce}function Vr(re,ce){if(re)for(var Ce=0;Ce<re.length;++Ce){var Pe=re[Ce];if(Pe.marker==ce)return Pe}}function ti(re,ce){for(var Ce,Pe=0;Pe<re.length;++Pe)re[Pe]!=ce&&(Ce||(Ce=[])).push(re[Pe]);return Ce}function Ni(re,ce){re.markedSpans=re.markedSpans?re.markedSpans.concat([ce]):[ce],ce.marker.attachLine(re)}function hi(re,ce,Ce){var Pe;if(re)for(var Oe=0;Oe<re.length;++Oe){var $e=re[Oe],pt=$e.marker,Lt=$e.from==null||(pt.inclusiveLeft?$e.from<=ce:$e.from<ce);if(Lt||$e.from==ce&&pt.type=="bookmark"&&(!Ce||!$e.marker.insertLeft)){var kt=$e.to==null||(pt.inclusiveRight?$e.to>=ce:$e.to>ce);(Pe||(Pe=[])).push(new gr(pt,$e.from,kt?null:$e.to))}}return Pe}function Zr(re,ce,Ce){var Pe;if(re)for(var Oe=0;Oe<re.length;++Oe){var $e=re[Oe],pt=$e.marker,Lt=$e.to==null||(pt.inclusiveRight?$e.to>=ce:$e.to>ce);if(Lt||$e.from==ce&&pt.type=="bookmark"&&(!Ce||$e.marker.insertLeft)){var kt=$e.from==null||(pt.inclusiveLeft?$e.from<=ce:$e.from<ce);(Pe||(Pe=[])).push(new gr(pt,kt?null:$e.from-ce,$e.to==null?null:$e.to-ce))}}return Pe}function Ui(re,ce){if(ce.full)return null;var Ce=Fn(re,ce.from.line)&&Yn(re,ce.from.line).markedSpans,Pe=Fn(re,ce.to.line)&&Yn(re,ce.to.line).markedSpans;if(!Ce&&!Pe)return null;var Oe=ce.from.ch,$e=ce.to.ch,pt=Nn(ce.from,ce.to)==0,Lt=hi(Ce,Oe,pt),kt=Zr(Pe,$e,pt),Rt=ce.text.length==1,nn=gt(ce.text).length+(Rt?Oe:0);if(Lt)for(var _t=0;_t<Lt.length;++_t){var mn=Lt[_t];if(mn.to==null){var dn=Vr(kt,mn.marker);dn?Rt&&(mn.to=dn.to==null?null:dn.to+nn):mn.to=Oe}}if(kt)for(var lr=0;lr<kt.length;++lr){var dr=kt[lr];if(dr.to!=null&&(dr.to+=nn),dr.from==null){var br=Vr(Lt,dr.marker);br||(dr.from=nn,Rt&&(Lt||(Lt=[])).push(dr))}else dr.from+=nn,Rt&&(Lt||(Lt=[])).push(dr)}Lt&&(Lt=en(Lt)),kt&&kt!=Lt&&(kt=en(kt));var Fr=[Lt];if(!Rt){var ui=ce.text.length-2,Yr;if(ui>0&&Lt)for(var vi=0;vi<Lt.length;++vi)Lt[vi].to==null&&(Yr||(Yr=[])).push(new gr(Lt[vi].marker,null,null));for(var zi=0;zi<ui;++zi)Fr.push(Yr);Fr.push(kt)}return Fr}function en(re){for(var ce=0;ce<re.length;++ce){var Ce=re[ce];Ce.from!=null&&Ce.from==Ce.to&&Ce.marker.clearWhenEmpty!==!1&&re.splice(ce--,1)}return re.length?re:null}function fn(re,ce,Ce){var Pe=null;if(re.iter(ce.line,Ce.line+1,function(dn){if(dn.markedSpans)for(var lr=0;lr<dn.markedSpans.length;++lr){var dr=dn.markedSpans[lr].marker;dr.readOnly&&(!Pe||xt(Pe,dr)==-1)&&(Pe||(Pe=[])).push(dr)}}),!Pe)return null;for(var Oe=[{from:ce,to:Ce}],$e=0;$e<Pe.length;++$e)for(var pt=Pe[$e],Lt=pt.find(0),kt=0;kt<Oe.length;++kt){var Rt=Oe[kt];if(!(Nn(Rt.to,Lt.from)<0||Nn(Rt.from,Lt.to)>0)){var nn=[kt,1],_t=Nn(Rt.from,Lt.from),mn=Nn(Rt.to,Lt.to);(_t<0||!pt.inclusiveLeft&&!_t)&&nn.push({from:Rt.from,to:Lt.from}),(mn>0||!pt.inclusiveRight&&!mn)&&nn.push({from:Lt.to,to:Rt.to}),Oe.splice.apply(Oe,nn),kt+=nn.length-3}}return Oe}function $t(re){var ce=re.markedSpans;if(ce){for(var Ce=0;Ce<ce.length;++Ce)ce[Ce].marker.detachLine(re);re.markedSpans=null}}function st(re,ce){if(ce){for(var Ce=0;Ce<ce.length;++Ce)ce[Ce].marker.attachLine(re);re.markedSpans=ce}}function Bn(re){return re.inclusiveLeft?-1:0}function Gn(re){return re.inclusiveRight?1:0}function fr(re,ce){var Ce=re.lines.length-ce.lines.length;if(Ce!=0)return Ce;var Pe=re.find(),Oe=ce.find(),$e=Nn(Pe.from,Oe.from)||Bn(re)-Bn(ce);if($e)return-$e;var pt=Nn(Pe.to,Oe.to)||Gn(re)-Gn(ce);return pt||ce.id-re.id}function ur(re,ce){var Ce=on&&re.markedSpans,Pe;if(Ce)for(var Oe=void 0,$e=0;$e<Ce.length;++$e)Oe=Ce[$e],Oe.marker.collapsed&&(ce?Oe.from:Oe.to)==null&&(!Pe||fr(Pe,Oe.marker)<0)&&(Pe=Oe.marker);return Pe}function qn(re){return ur(re,!0)}function gn(re){return ur(re,!1)}function Rn(re,ce){var Ce=on&&re.markedSpans,Pe;if(Ce)for(var Oe=0;Oe<Ce.length;++Oe){var $e=Ce[Oe];$e.marker.collapsed&&($e.from==null||$e.from<ce)&&($e.to==null||$e.to>ce)&&(!Pe||fr(Pe,$e.marker)<0)&&(Pe=$e.marker)}return Pe}function Vn(re,ce,Ce,Pe,Oe){var $e=Yn(re,ce),pt=on&&$e.markedSpans;if(pt)for(var Lt=0;Lt<pt.length;++Lt){var kt=pt[Lt];if(kt.marker.collapsed){var Rt=kt.marker.find(0),nn=Nn(Rt.from,Ce)||Bn(kt.marker)-Bn(Oe),_t=Nn(Rt.to,Pe)||Gn(kt.marker)-Gn(Oe);if(!(nn>=0&&_t<=0||nn<=0&&_t>=0)&&(nn<=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?Nn(Rt.to,Ce)>=0:Nn(Rt.to,Ce)>0)||nn>=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?Nn(Rt.from,Pe)<=0:Nn(Rt.from,Pe)<0)))return!0}}}function kn(re){for(var ce;ce=qn(re);)re=ce.find(-1,!0).line;return re}function Zn(re){for(var ce;ce=gn(re);)re=ce.find(1,!0).line;return re}function xr(re){for(var ce,Ce;ce=gn(re);)re=ce.find(1,!0).line,(Ce||(Ce=[])).push(re);return Ce}function sr(re,ce){var Ce=Yn(re,ce),Pe=kn(Ce);return Ce==Pe?ce:Mt(Pe)}function Qn(re,ce){if(ce>re.lastLine())return ce;var Ce=Yn(re,ce),Pe;if(!cn(re,Ce))return ce;for(;Pe=gn(Ce);)Ce=Pe.find(1,!0).line;return Mt(Ce)+1}function cn(re,ce){var Ce=on&&ce.markedSpans;if(Ce){for(var Pe=void 0,Oe=0;Oe<Ce.length;++Oe)if(Pe=Ce[Oe],!!Pe.marker.collapsed){if(Pe.from==null)return!0;if(!Pe.marker.widgetNode&&Pe.from==0&&Pe.marker.inclusiveLeft&&vr(re,ce,Pe))return!0}}}function vr(re,ce,Ce){if(Ce.to==null){var Pe=Ce.marker.find(1,!0);return vr(re,Pe.line,Vr(Pe.line.markedSpans,Ce.marker))}if(Ce.marker.inclusiveRight&&Ce.to==ce.text.length)return!0;for(var Oe=void 0,$e=0;$e<ce.markedSpans.length;++$e)if(Oe=ce.markedSpans[$e],Oe.marker.collapsed&&!Oe.marker.widgetNode&&Oe.from==Ce.to&&(Oe.to==null||Oe.to!=Ce.from)&&(Oe.marker.inclusiveLeft||Ce.marker.inclusiveRight)&&vr(re,ce,Oe))return!0}function Nr(re){re=kn(re);for(var ce=0,Ce=re.parent,Pe=0;Pe<Ce.lines.length;++Pe){var Oe=Ce.lines[Pe];if(Oe==re)break;ce+=Oe.height}for(var $e=Ce.parent;$e;Ce=$e,$e=Ce.parent)for(var pt=0;pt<$e.children.length;++pt){var Lt=$e.children[pt];if(Lt==Ce)break;ce+=Lt.height}return ce}function si(re){if(re.height==0)return 0;for(var ce=re.text.length,Ce,Pe=re;Ce=qn(Pe);){var Oe=Ce.find(0,!0);Pe=Oe.from.line,ce+=Oe.from.ch-Oe.to.ch}for(Pe=re;Ce=gn(Pe);){var $e=Ce.find(0,!0);ce-=Pe.text.length-$e.from.ch,Pe=$e.to.line,ce+=Pe.text.length-$e.to.ch}return ce}function Ur(re){var ce=re.display,Ce=re.doc;ce.maxLine=Yn(Ce,Ce.first),ce.maxLineLength=si(ce.maxLine),ce.maxLineChanged=!0,Ce.iter(function(Pe){var Oe=si(Pe);Oe>ce.maxLineLength&&(ce.maxLineLength=Oe,ce.maxLine=Pe)})}var Ti=function(re,ce,Ce){this.text=re,st(this,ce),this.height=Ce?Ce(this):1};Ti.prototype.lineNo=function(){return Mt(this)},Cn(Ti);function Ei(re,ce,Ce,Pe){re.text=ce,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),$t(re),st(re,Ce);var Oe=Pe?Pe(re):1;Oe!=re.height&&$r(re,Oe)}function bi(re){re.parent=null,$t(re)}var Ai={},ji={};function $i(re,ce){if(!re||/^\s*$/.test(re))return null;var Ce=ce.addModeClass?ji:Ai;return Ce[re]||(Ce[re]=re.replace(/\S+/g,"cm-$&"))}function qt(re,ce){var Ce=Be("span",null,null,ve?"padding-right: .1px":null),Pe={pre:Be("pre",[Ce],"CodeMirror-line"),content:Ce,col:0,pos:0,cm:re,trailingSpace:!1,splitSpaces:re.getOption("lineWrapping")};ce.measure={};for(var Oe=0;Oe<=(ce.rest?ce.rest.length:0);Oe++){var $e=Oe?ce.rest[Oe-1]:ce.line,pt=void 0;Pe.pos=0,Pe.addToken=Pi,Jr(re.display.measure)&&(pt=Kt($e,re.doc.direction))&&(Pe.addToken=mi(Pe.addToken,pt)),Pe.map=[];var Lt=ce!=re.display.externalMeasured&&Mt($e);Hi($e,Pe,di(re,$e,Lt)),$e.styleClasses&&($e.styleClasses.bgClass&&(Pe.bgClass=ot($e.styleClasses.bgClass,Pe.bgClass||"")),$e.styleClasses.textClass&&(Pe.textClass=ot($e.styleClasses.textClass,Pe.textClass||""))),Pe.map.length==0&&Pe.map.push(0,0,Pe.content.appendChild(Di(re.display.measure))),Oe==0?(ce.measure.map=Pe.map,ce.measure.cache={}):((ce.measure.maps||(ce.measure.maps=[])).push(Pe.map),(ce.measure.caches||(ce.measure.caches=[])).push({}))}if(ve){var kt=Pe.content.lastChild;(/\bcm-tab\b/.test(kt.className)||kt.querySelector&&kt.querySelector(".cm-tab"))&&(Pe.content.className="cm-tab-wrap-hack")}return rn(re,"renderLine",re,ce.line,Pe.pre),Pe.pre.className&&(Pe.textClass=ot(Pe.pre.className,Pe.textClass||"")),Pe}function Mi(re){var ce=Me("span","\u2022","cm-invalidchar");return ce.title="\\u"+re.charCodeAt(0).toString(16),ce.setAttribute("aria-label",ce.title),ce}function Pi(re,ce,Ce,Pe,Oe,$e,pt){if(ce){var Lt=re.splitSpaces?Xr(ce,re.trailingSpace):ce,kt=re.cm.state.specialChars,Rt=!1,nn;if(!kt.test(ce))re.col+=ce.length,nn=document.createTextNode(Lt),re.map.push(re.pos,re.pos+ce.length,nn),Ie&&de<9&&(Rt=!0),re.pos+=ce.length;else{nn=document.createDocumentFragment();for(var _t=0;;){kt.lastIndex=_t;var mn=kt.exec(ce),dn=mn?mn.index-_t:ce.length-_t;if(dn){var lr=document.createTextNode(Lt.slice(_t,_t+dn));Ie&&de<9?nn.appendChild(Me("span",[lr])):nn.appendChild(lr),re.map.push(re.pos,re.pos+dn,lr),re.col+=dn,re.pos+=dn}if(!mn)break;_t+=dn+1;var dr=void 0;if(mn[0]==" "){var br=re.cm.options.tabSize,Fr=br-re.col%br;dr=nn.appendChild(Me("span",Dt(Fr),"cm-tab")),dr.setAttribute("role","presentation"),dr.setAttribute("cm-text"," "),re.col+=Fr}else mn[0]=="\r"||mn[0]==`
|
|
`?(dr=nn.appendChild(Me("span",mn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),dr.setAttribute("cm-text",mn[0]),re.col+=1):(dr=re.cm.options.specialCharPlaceholder(mn[0]),dr.setAttribute("cm-text",mn[0]),Ie&&de<9?nn.appendChild(Me("span",[dr])):nn.appendChild(dr),re.col+=1);re.map.push(re.pos,re.pos+1,dr),re.pos++}}if(re.trailingSpace=Lt.charCodeAt(ce.length-1)==32,Ce||Pe||Oe||Rt||$e||pt){var ui=Ce||"";Pe&&(ui+=Pe),Oe&&(ui+=Oe);var Yr=Me("span",[nn],ui,$e);if(pt)for(var vi in pt)pt.hasOwnProperty(vi)&&vi!="style"&&vi!="class"&&Yr.setAttribute(vi,pt[vi]);return re.content.appendChild(Yr)}re.content.appendChild(nn)}}function Xr(re,ce){if(re.length>1&&!/ /.test(re))return re;for(var Ce=ce,Pe="",Oe=0;Oe<re.length;Oe++){var $e=re.charAt(Oe);$e==" "&&Ce&&(Oe==re.length-1||re.charCodeAt(Oe+1)==32)&&($e="\xA0"),Pe+=$e,Ce=$e==" "}return Pe}function mi(re,ce){return function(Ce,Pe,Oe,$e,pt,Lt,kt){Oe=Oe?Oe+" cm-force-border":"cm-force-border";for(var Rt=Ce.pos,nn=Rt+Pe.length;;){for(var _t=void 0,mn=0;mn<ce.length&&(_t=ce[mn],!(_t.to>Rt&&_t.from<=Rt));mn++);if(_t.to>=nn)return re(Ce,Pe,Oe,$e,pt,Lt,kt);re(Ce,Pe.slice(0,_t.to-Rt),Oe,$e,null,Lt,kt),$e=null,Pe=Pe.slice(_t.to-Rt),Rt=_t.to}}}function ei(re,ce,Ce,Pe){var Oe=!Pe&&Ce.widgetNode;Oe&&re.map.push(re.pos,re.pos+ce,Oe),!Pe&&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+=ce,re.trailingSpace=!1}function Hi(re,ce,Ce){var Pe=re.markedSpans,Oe=re.text,$e=0;if(!Pe){for(var pt=1;pt<Ce.length;pt+=2)ce.addToken(ce,Oe.slice($e,$e=Ce[pt]),$i(Ce[pt+1],ce.cm.options));return}for(var Lt=Oe.length,kt=0,Rt=1,nn="",_t,mn,dn=0,lr,dr,br,Fr,ui;;){if(dn==kt){lr=dr=br=mn="",ui=null,Fr=null,dn=1/0;for(var Yr=[],vi=void 0,zi=0;zi<Pe.length;++zi){var Hr=Pe[zi],eo=Hr.marker;if(eo.type=="bookmark"&&Hr.from==kt&&eo.widgetNode)Yr.push(eo);else if(Hr.from<=kt&&(Hr.to==null||Hr.to>kt||eo.collapsed&&Hr.to==kt&&Hr.from==kt)){if(Hr.to!=null&&Hr.to!=kt&&dn>Hr.to&&(dn=Hr.to,dr=""),eo.className&&(lr+=" "+eo.className),eo.css&&(mn=(mn?mn+";":"")+eo.css),eo.startStyle&&Hr.from==kt&&(br+=" "+eo.startStyle),eo.endStyle&&Hr.to==dn&&(vi||(vi=[])).push(eo.endStyle,Hr.to),eo.title&&((ui||(ui={})).title=eo.title),eo.attributes)for(var Yo in eo.attributes)(ui||(ui={}))[Yo]=eo.attributes[Yo];eo.collapsed&&(!Fr||fr(Fr.marker,eo)<0)&&(Fr=Hr)}else Hr.from>kt&&dn>Hr.from&&(dn=Hr.from)}if(vi)for(var Ra=0;Ra<vi.length;Ra+=2)vi[Ra+1]==dn&&(dr+=" "+vi[Ra]);if(!Fr||Fr.from==kt)for(var ia=0;ia<Yr.length;++ia)ei(ce,0,Yr[ia]);if(Fr&&(Fr.from||0)==kt){if(ei(ce,(Fr.to==null?Lt+1:Fr.to)-kt,Fr.marker,Fr.from==null),Fr.to==null)return;Fr.to==kt&&(Fr=!1)}}if(kt>=Lt)break;for(var Is=Math.min(Lt,dn);;){if(nn){var ms=kt+nn.length;if(!Fr){var La=ms>Is?nn.slice(0,Is-kt):nn;ce.addToken(ce,La,_t?_t+lr:lr,br,kt+La.length==dn?dr:"",mn,ui)}if(ms>=Is){nn=nn.slice(Is-kt),kt=Is;break}kt=ms,br=""}nn=Oe.slice($e,$e=Ce[Rt++]),_t=$i(Ce[Rt++],ce.cm.options)}}}function Gi(re,ce,Ce){this.line=ce,this.rest=xr(ce),this.size=this.rest?Mt(gt(this.rest))-Ce+1:1,this.node=this.text=null,this.hidden=cn(re,ce)}function ci(re,ce,Ce){for(var Pe=[],Oe,$e=ce;$e<Ce;$e=Oe){var pt=new Gi(re.doc,Yn(re.doc,$e),$e);Oe=$e+pt.size,Pe.push(pt)}return Pe}var to=null;function pa(re){to?to.ops.push(re):re.ownsGroup=to={ops:[re],delayedCallbacks:[]}}function Ao(re){var ce=re.delayedCallbacks,Ce=0;do{for(;Ce<ce.length;Ce++)ce[Ce].call(null);for(var Pe=0;Pe<re.ops.length;Pe++){var Oe=re.ops[Pe];if(Oe.cursorActivityHandlers)for(;Oe.cursorActivityCalled<Oe.cursorActivityHandlers.length;)Oe.cursorActivityHandlers[Oe.cursorActivityCalled++].call(null,Oe.cm)}}while(Ce<ce.length)}function bs(re,ce){var Ce=re.ownsGroup;if(Ce)try{Ao(Ce)}finally{to=null,ce(Ce)}}var wa=null;function Ir(re,ce){var Ce=Ht(re,ce);if(Ce.length){var Pe=Array.prototype.slice.call(arguments,2),Oe;to?Oe=to.delayedCallbacks:wa?Oe=wa:(Oe=wa=[],setTimeout(bo,0));for(var $e=function(Lt){Oe.push(function(){return Ce[Lt].apply(null,Pe)})},pt=0;pt<Ce.length;++pt)$e(pt)}}function bo(){var re=wa;wa=null;for(var ce=0;ce<re.length;++ce)re[ce]()}function Po(re,ce,Ce,Pe){for(var Oe=0;Oe<ce.changes.length;Oe++){var $e=ce.changes[Oe];$e=="text"?ar(re,ce):$e=="gutter"?li(re,ce,Ce,Pe):$e=="class"?_r(re,ce):$e=="widget"&&Ci(re,ce,Pe)}ce.changes=null}function ta(re){return re.node==re.text&&(re.node=Me("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),Ie&&de<8&&(re.node.style.zIndex=2)),re.node}function jo(re,ce){var Ce=ce.bgClass?ce.bgClass+" "+(ce.line.bgClass||""):ce.line.bgClass;if(Ce&&(Ce+=" CodeMirror-linebackground"),ce.background)Ce?ce.background.className=Ce:(ce.background.parentNode.removeChild(ce.background),ce.background=null);else if(Ce){var Pe=ta(ce);ce.background=Pe.insertBefore(Me("div",null,Ce),Pe.firstChild),re.display.input.setUneditable(ce.background)}}function Ko(re,ce){var Ce=re.display.externalMeasured;return Ce&&Ce.line==ce.line?(re.display.externalMeasured=null,ce.measure=Ce.measure,Ce.built):qt(re,ce)}function ar(re,ce){var Ce=ce.text.className,Pe=Ko(re,ce);ce.text==ce.node&&(ce.node=Pe.pre),ce.text.parentNode.replaceChild(Pe.pre,ce.text),ce.text=Pe.pre,Pe.bgClass!=ce.bgClass||Pe.textClass!=ce.textClass?(ce.bgClass=Pe.bgClass,ce.textClass=Pe.textClass,_r(re,ce)):Ce&&(ce.text.className=Ce)}function _r(re,ce){jo(re,ce),ce.line.wrapClass?ta(ce).className=ce.line.wrapClass:ce.node!=ce.text&&(ce.node.className="");var Ce=ce.textClass?ce.textClass+" "+(ce.line.textClass||""):ce.line.textClass;ce.text.className=Ce||""}function li(re,ce,Ce,Pe){if(ce.gutter&&(ce.node.removeChild(ce.gutter),ce.gutter=null),ce.gutterBackground&&(ce.node.removeChild(ce.gutterBackground),ce.gutterBackground=null),ce.line.gutterClass){var Oe=ta(ce);ce.gutterBackground=Me("div",null,"CodeMirror-gutter-background "+ce.line.gutterClass,"left: "+(re.options.fixedGutter?Pe.fixedPos:-Pe.gutterTotalWidth)+"px; width: "+Pe.gutterTotalWidth+"px"),re.display.input.setUneditable(ce.gutterBackground),Oe.insertBefore(ce.gutterBackground,ce.text)}var $e=ce.line.gutterMarkers;if(re.options.lineNumbers||$e){var pt=ta(ce),Lt=ce.gutter=Me("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?Pe.fixedPos:-Pe.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Lt),pt.insertBefore(Lt,ce.text),ce.line.gutterClass&&(Lt.className+=" "+ce.line.gutterClass),re.options.lineNumbers&&(!$e||!$e["CodeMirror-linenumbers"])&&(ce.lineNumber=Lt.appendChild(Me("div",zn(re.options,Ce),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Pe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),$e)for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var Rt=re.display.gutterSpecs[kt].className,nn=$e.hasOwnProperty(Rt)&&$e[Rt];nn&&Lt.appendChild(Me("div",[nn],"CodeMirror-gutter-elt","left: "+Pe.gutterLeft[Rt]+"px; width: "+Pe.gutterWidth[Rt]+"px"))}}}function Ci(re,ce,Ce){ce.alignable&&(ce.alignable=null);for(var Pe=je("CodeMirror-linewidget"),Oe=ce.node.firstChild,$e=void 0;Oe;Oe=$e)$e=Oe.nextSibling,Pe.test(Oe.className)&&ce.node.removeChild(Oe);no(re,ce,Ce)}function Oi(re,ce,Ce,Pe){var Oe=Ko(re,ce);return ce.text=ce.node=Oe.pre,Oe.bgClass&&(ce.bgClass=Oe.bgClass),Oe.textClass&&(ce.textClass=Oe.textClass),_r(re,ce),li(re,ce,Ce,Pe),no(re,ce,Pe),ce.node}function no(re,ce,Ce){if(zr(re,ce.line,ce,Ce,!0),ce.rest)for(var Pe=0;Pe<ce.rest.length;Pe++)zr(re,ce.rest[Pe],ce,Ce,!1)}function zr(re,ce,Ce,Pe,Oe){if(ce.widgets)for(var $e=ta(Ce),pt=0,Lt=ce.widgets;pt<Lt.length;++pt){var kt=Lt[pt],Rt=Me("div",[kt.node],"CodeMirror-linewidget"+(kt.className?" "+kt.className:""));kt.handleMouseEvents||Rt.setAttribute("cm-ignore-events","true"),Aa(kt,Rt,Ce,Pe),re.display.input.setUneditable(Rt),Oe&&kt.above?$e.insertBefore(Rt,Ce.gutter||Ce.text):$e.appendChild(Rt),Ir(kt,"redraw")}}function Aa(re,ce,Ce,Pe){if(re.noHScroll){(Ce.alignable||(Ce.alignable=[])).push(ce);var Oe=Pe.wrapperWidth;ce.style.left=Pe.fixedPos+"px",re.coverGutter||(Oe-=Pe.gutterTotalWidth,ce.style.paddingLeft=Pe.gutterTotalWidth+"px"),ce.style.width=Oe+"px"}re.coverGutter&&(ce.style.zIndex=5,ce.style.position="relative",re.noHScroll||(ce.style.marginLeft=-Pe.gutterTotalWidth+"px"))}function zo(re){if(re.height!=null)return re.height;var ce=re.doc.cm;if(!ce)return 0;if(!Ye(document.body,re.node)){var Ce="position: relative;";re.coverGutter&&(Ce+="margin-left: -"+ce.display.gutters.offsetWidth+"px;"),re.noHScroll&&(Ce+="width: "+ce.display.wrapper.clientWidth+"px;"),Te(ce.display.measure,Me("div",[re.node],null,Ce))}return re.height=re.node.parentNode.offsetHeight}function Oo(re,ce){for(var Ce=tr(ce);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 Ii(re){return re.lineSpace.offsetTop}function Vo(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function ja(re){if(re.cachedPaddingH)return re.cachedPaddingH;var ce=Te(re.measure,Me("pre","x","CodeMirror-line-like")),Ce=window.getComputedStyle?window.getComputedStyle(ce):ce.currentStyle,Pe={left:parseInt(Ce.paddingLeft),right:parseInt(Ce.paddingRight)};return!isNaN(Pe.left)&&!isNaN(Pe.right)&&(re.cachedPaddingH=Pe),Pe}function vo(re){return bt-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,ce,Ce){var Pe=re.options.lineWrapping,Oe=Pe&&fs(re);if(!ce.measure.heights||Pe&&ce.measure.width!=Oe){var $e=ce.measure.heights=[];if(Pe){ce.measure.width=Oe;for(var pt=ce.text.firstChild.getClientRects(),Lt=0;Lt<pt.length-1;Lt++){var kt=pt[Lt],Rt=pt[Lt+1];Math.abs(kt.bottom-Rt.bottom)>2&&$e.push((kt.bottom+Rt.top)/2-Ce.top)}}$e.push(Ce.bottom-Ce.top)}}function na(re,ce,Ce){if(re.line==ce)return{map:re.measure.map,cache:re.measure.cache};for(var Pe=0;Pe<re.rest.length;Pe++)if(re.rest[Pe]==ce)return{map:re.measure.maps[Pe],cache:re.measure.caches[Pe]};for(var Oe=0;Oe<re.rest.length;Oe++)if(Mt(re.rest[Oe])>Ce)return{map:re.measure.maps[Oe],cache:re.measure.caches[Oe],before:!0}}function eh(re,ce){ce=kn(ce);var Ce=Mt(ce),Pe=re.display.externalMeasured=new Gi(re.doc,ce,Ce);Pe.lineN=Ce;var Oe=Pe.built=qt(re,Pe);return Pe.text=Oe.pre,Te(re.display.lineMeasure,Oe.pre),Pe}function ju(re,ce,Ce,Pe){return Os(re,Sl(re,ce),Ce,Pe)}function il(re,ce){if(ce>=re.display.viewFrom&&ce<re.display.viewTo)return re.display.view[Ds(re,ce)];var Ce=re.display.externalMeasured;if(Ce&&ce>=Ce.lineN&&ce<Ce.lineN+Ce.size)return Ce}function Sl(re,ce){var Ce=Mt(ce),Pe=il(re,Ce);Pe&&!Pe.text?Pe=null:Pe&&Pe.changes&&(Po(re,Pe,Ce,ol(re)),re.curOp.forceUpdate=!0),Pe||(Pe=eh(re,ce));var Oe=na(Pe,ce,Ce);return{line:ce,view:Pe,rect:null,map:Oe.map,cache:Oe.cache,before:Oe.before,hasHeights:!1}}function Os(re,ce,Ce,Pe,Oe){ce.before&&(Ce=-1);var $e=Ce+(Pe||""),pt;return ce.cache.hasOwnProperty($e)?pt=ce.cache[$e]:(ce.rect||(ce.rect=ce.view.text.getBoundingClientRect()),ce.hasHeights||(Ps(re,ce.view,ce.rect),ce.hasHeights=!0),pt=Zo(re,ce,Ce,Pe),pt.bogus||(ce.cache[$e]=pt)),{left:pt.left,right:pt.right,top:Oe?pt.rtop:pt.top,bottom:Oe?pt.rbottom:pt.bottom}}var Vl={left:0,right:0,top:0,bottom:0};function th(re,ce,Ce){for(var Pe,Oe,$e,pt,Lt,kt,Rt=0;Rt<re.length;Rt+=3)if(Lt=re[Rt],kt=re[Rt+1],ce<Lt?(Oe=0,$e=1,pt="left"):ce<kt?(Oe=ce-Lt,$e=Oe+1):(Rt==re.length-3||ce==kt&&re[Rt+3]>ce)&&($e=kt-Lt,Oe=$e-1,ce>=kt&&(pt="right")),Oe!=null){if(Pe=re[Rt+2],Lt==kt&&Ce==(Pe.insertLeft?"left":"right")&&(pt=Ce),Ce=="left"&&Oe==0)for(;Rt&&re[Rt-2]==re[Rt-3]&&re[Rt-1].insertLeft;)Pe=re[(Rt-=3)+2],pt="left";if(Ce=="right"&&Oe==kt-Lt)for(;Rt<re.length-3&&re[Rt+3]==re[Rt+4]&&!re[Rt+5].insertLeft;)Pe=re[(Rt+=3)+2],pt="right";break}return{node:Pe,start:Oe,end:$e,collapse:pt,coverStart:Lt,coverEnd:kt}}function nh(re,ce){var Ce=Vl;if(ce=="left")for(var Pe=0;Pe<re.length&&(Ce=re[Pe]).left==Ce.right;Pe++);else for(var Oe=re.length-1;Oe>=0&&(Ce=re[Oe]).left==Ce.right;Oe--);return Ce}function Zo(re,ce,Ce,Pe){var Oe=th(ce.map,Ce,Pe),$e=Oe.node,pt=Oe.start,Lt=Oe.end,kt=Oe.collapse,Rt;if($e.nodeType==3){for(var nn=0;nn<4;nn++){for(;pt&&Ze(ce.line.text.charAt(Oe.coverStart+pt));)--pt;for(;Oe.coverStart+Lt<Oe.coverEnd&&Ze(ce.line.text.charAt(Oe.coverStart+Lt));)++Lt;if(Ie&&de<9&&pt==0&&Lt==Oe.coverEnd-Oe.coverStart?Rt=$e.parentNode.getBoundingClientRect():Rt=nh(Ge($e,pt,Lt).getClientRects(),Pe),Rt.left||Rt.right||pt==0)break;Lt=pt,pt=pt-1,kt="right"}Ie&&de<11&&(Rt=Ou(re.display.measure,Rt))}else{pt>0&&(kt=Pe="right");var _t;re.options.lineWrapping&&(_t=$e.getClientRects()).length>1?Rt=_t[Pe=="right"?_t.length-1:0]:Rt=$e.getBoundingClientRect()}if(Ie&&de<9&&!pt&&(!Rt||!Rt.left&&!Rt.right)){var mn=$e.parentNode.getClientRects()[0];mn?Rt={left:mn.left,right:mn.left+Fs(re.display),top:mn.top,bottom:mn.bottom}:Rt=Vl}for(var dn=Rt.top-ce.rect.top,lr=Rt.bottom-ce.rect.top,dr=(dn+lr)/2,br=ce.view.measure.heights,Fr=0;Fr<br.length-1&&!(dr<br[Fr]);Fr++);var ui=Fr?br[Fr-1]:0,Yr=br[Fr],vi={left:(kt=="right"?Rt.right:Rt.left)-ce.rect.left,right:(kt=="left"?Rt.left:Rt.right)-ce.rect.left,top:ui,bottom:Yr};return!Rt.left&&!Rt.right&&(vi.bogus=!0),re.options.singleCursorHeightPerLine||(vi.rtop=dn,vi.rbottom=lr),vi}function Ou(re,ce){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!En(re))return ce;var Ce=screen.logicalXDPI/screen.deviceXDPI,Pe=screen.logicalYDPI/screen.deviceYDPI;return{left:ce.left*Ce,right:ce.right*Ce,top:ce.top*Pe,bottom:ce.bottom*Pe}}function rh(re){if(re.measure&&(re.measure.cache={},re.measure.heights=null,re.rest))for(var ce=0;ce<re.rest.length;ce++)re.measure.caches[ce]={}}function Zl(re){re.display.externalMeasure=null,Fe(re.display.lineMeasure);for(var ce=0;ce<re.display.view.length;ce++)rh(re.display.view[ce])}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 ce=0;if(re.widgets)for(var Ce=0;Ce<re.widgets.length;++Ce)re.widgets[Ce].above&&(ce+=zo(re.widgets[Ce]));return ce}function ga(re,ce,Ce,Pe,Oe){if(!Oe){var $e=aa(ce);Ce.top+=$e,Ce.bottom+=$e}if(Pe=="line")return Ce;Pe||(Pe="local");var pt=Nr(ce);if(Pe=="local"?pt+=Ii(re.display):pt-=re.display.viewOffset,Pe=="page"||Pe=="window"){var Lt=re.display.lineSpace.getBoundingClientRect();pt+=Lt.top+(Pe=="window"?0:Oa());var kt=Lt.left+(Pe=="window"?0:Ca());Ce.left+=kt,Ce.right+=kt}return Ce.top+=pt,Ce.bottom+=pt,Ce}function Xl(re,ce,Ce){if(Ce=="div")return ce;var Pe=ce.left,Oe=ce.top;if(Ce=="page")Pe-=Ca(),Oe-=Oa();else if(Ce=="local"||!Ce){var $e=re.display.sizer.getBoundingClientRect();Pe+=$e.left,Oe+=$e.top}var pt=re.display.lineSpace.getBoundingClientRect();return{left:Pe-pt.left,top:Oe-pt.top}}function Ga(re,ce,Ce,Pe,Oe){return Pe||(Pe=Yn(re.doc,ce.line)),ga(re,Pe,ju(re,Pe,ce.ch,Oe),Ce)}function co(re,ce,Ce,Pe,Oe,$e){Pe=Pe||Yn(re.doc,ce.line),Oe||(Oe=Sl(re,Pe));function pt(lr,dr){var br=Os(re,Oe,lr,dr?"right":"left",$e);return dr?br.left=br.right:br.right=br.left,ga(re,Pe,br,Ce)}var Lt=Kt(Pe,re.doc.direction),kt=ce.ch,Rt=ce.sticky;if(kt>=Pe.text.length?(kt=Pe.text.length,Rt="before"):kt<=0&&(kt=0,Rt="after"),!Lt)return pt(Rt=="before"?kt-1:kt,Rt=="before");function nn(lr,dr,br){var Fr=Lt[dr],ui=Fr.level==1;return pt(br?lr-1:lr,ui!=br)}var _t=Et(Lt,kt,Rt),mn=At,dn=nn(kt,_t,Rt=="before");return mn!=null&&(dn.other=nn(kt,mn,Rt!="before")),dn}function oo(re,ce){var Ce=0;ce=er(re.doc,ce),re.options.lineWrapping||(Ce=Fs(re.display)*ce.ch);var Pe=Yn(re.doc,ce.line),Oe=Nr(Pe)+Ii(re.display);return{left:Ce,right:Ce,top:Oe,bottom:Oe+Pe.height}}function Ji(re,ce,Ce,Pe,Oe){var $e=tn(re,ce,Ce);return $e.xRel=Oe,Pe&&($e.outside=Pe),$e}function sa(re,ce,Ce){var Pe=re.doc;if(Ce+=re.display.viewOffset,Ce<0)return Ji(Pe.first,0,null,-1,-1);var Oe=Wt(Pe,Ce),$e=Pe.first+Pe.size-1;if(Oe>$e)return Ji(Pe.first+Pe.size-1,Yn(Pe,$e).text.length,null,1,1);ce<0&&(ce=0);for(var pt=Yn(Pe,Oe);;){var Lt=wn(re,pt,Oe,ce,Ce),kt=Rn(pt,Lt.ch+(Lt.xRel>0||Lt.outside>0?1:0));if(!kt)return Lt;var Rt=kt.find(1);if(Rt.line==Oe)return Rt;pt=Yn(Pe,Oe=Rt.line)}}function kr(re,ce,Ce,Pe){Pe-=aa(ce);var Oe=ce.text.length,$e=ut(function(pt){return Os(re,Ce,pt-1).bottom<=Pe},Oe,0);return Oe=ut(function(pt){return Os(re,Ce,pt).top>Pe},$e,Oe),{begin:$e,end:Oe}}function fa(re,ce,Ce,Pe){Ce||(Ce=Sl(re,ce));var Oe=ga(re,ce,Os(re,Ce,Pe),"line").top;return kr(re,ce,Ce,Oe)}function zt(re,ce,Ce,Pe){return re.bottom<=Ce?!1:re.top>Ce?!0:(Pe?re.left:re.right)>ce}function wn(re,ce,Ce,Pe,Oe){Oe-=Nr(ce);var $e=Sl(re,ce),pt=aa(ce),Lt=0,kt=ce.text.length,Rt=!0,nn=Kt(ce,re.doc.direction);if(nn){var _t=(re.options.lineWrapping?jl:Ws)(re,ce,Ce,$e,nn,Pe,Oe);Rt=_t.level!=1,Lt=Rt?_t.from:_t.to-1,kt=Rt?_t.to:_t.from-1}var mn=null,dn=null,lr=ut(function(zi){var Hr=Os(re,$e,zi);return Hr.top+=pt,Hr.bottom+=pt,zt(Hr,Pe,Oe,!1)?(Hr.top<=Oe&&Hr.left<=Pe&&(mn=zi,dn=Hr),!0):!1},Lt,kt),dr,br,Fr=!1;if(dn){var ui=Pe-dn.left<dn.right-Pe,Yr=ui==Rt;lr=mn+(Yr?0:1),br=Yr?"after":"before",dr=ui?dn.left:dn.right}else{!Rt&&(lr==kt||lr==Lt)&&lr++,br=lr==0?"after":lr==ce.text.length?"before":Os(re,$e,lr-(Rt?1:0)).bottom+pt<=Oe==Rt?"after":"before";var vi=co(re,tn(Ce,lr,br),"line",ce,$e);dr=vi.left,Fr=Oe<vi.top?-1:Oe>=vi.bottom?1:0}return lr=qe(ce.text,lr,1),Ji(Ce,lr,br,Fr,Pe-dr)}function Ws(re,ce,Ce,Pe,Oe,$e,pt){var Lt=ut(function(_t){var mn=Oe[_t],dn=mn.level!=1;return zt(co(re,tn(Ce,dn?mn.to:mn.from,dn?"before":"after"),"line",ce,Pe),$e,pt,!0)},0,Oe.length-1),kt=Oe[Lt];if(Lt>0){var Rt=kt.level!=1,nn=co(re,tn(Ce,Rt?kt.from:kt.to,Rt?"after":"before"),"line",ce,Pe);zt(nn,$e,pt,!0)&&nn.top>pt&&(kt=Oe[Lt-1])}return kt}function jl(re,ce,Ce,Pe,Oe,$e,pt){var Lt=kr(re,ce,Pe,pt),kt=Lt.begin,Rt=Lt.end;/\s/.test(ce.text.charAt(Rt-1))&&Rt--;for(var nn=null,_t=null,mn=0;mn<Oe.length;mn++){var dn=Oe[mn];if(!(dn.from>=Rt||dn.to<=kt)){var lr=dn.level!=1,dr=Os(re,Pe,lr?Math.min(Rt,dn.to)-1:Math.max(kt,dn.from)).right,br=dr<$e?$e-dr+1e9:dr-$e;(!nn||_t>br)&&(nn=dn,_t=br)}}return nn||(nn=Oe[Oe.length-1]),nn.from<kt&&(nn={from:kt,to:nn.to,level:nn.level}),nn.to>Rt&&(nn={from:nn.from,to:Rt,level:nn.level}),nn}var $o;function ba(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if($o==null){$o=Me("pre",null,"CodeMirror-line-like");for(var ce=0;ce<49;++ce)$o.appendChild(document.createTextNode("x")),$o.appendChild(Me("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 ce=Me("span","xxxxxxxxxx"),Ce=Me("pre",[ce],"CodeMirror-line-like");Te(re.measure,Ce);var Pe=ce.getBoundingClientRect(),Oe=(Pe.right-Pe.left)/10;return Oe>2&&(re.cachedCharWidth=Oe),Oe||10}function ol(re){for(var ce=re.display,Ce={},Pe={},Oe=ce.gutters.clientLeft,$e=ce.gutters.firstChild,pt=0;$e;$e=$e.nextSibling,++pt){var Lt=re.display.gutterSpecs[pt].className;Ce[Lt]=$e.offsetLeft+$e.clientLeft+Oe,Pe[Lt]=$e.clientWidth}return{fixedPos:Fu(ce),gutterTotalWidth:ce.gutters.offsetWidth,gutterLeft:Ce,gutterWidth:Pe,wrapperWidth:ce.wrapper.clientWidth}}function Fu(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function Fo(re){var ce=ba(re.display),Ce=re.options.lineWrapping,Pe=Ce&&Math.max(5,re.display.scroller.clientWidth/Fs(re.display)-3);return function(Oe){if(cn(re.doc,Oe))return 0;var $e=0;if(Oe.widgets)for(var pt=0;pt<Oe.widgets.length;pt++)Oe.widgets[pt].height&&($e+=Oe.widgets[pt].height);return Ce?$e+(Math.ceil(Oe.text.length/Pe)||1)*ce:$e+ce}}function Si(re){var ce=re.doc,Ce=Fo(re);ce.iter(function(Pe){var Oe=Ce(Pe);Oe!=Pe.height&&$r(Pe,Oe)})}function Ua(re,ce,Ce,Pe){var Oe=re.display;if(!Ce&&tr(ce).getAttribute("cm-not-content")=="true")return null;var $e,pt,Lt=Oe.lineSpace.getBoundingClientRect();try{$e=ce.clientX-Lt.left,pt=ce.clientY-Lt.top}catch(_t){return null}var kt=sa(re,$e,pt),Rt;if(Pe&&kt.xRel>0&&(Rt=Yn(re.doc,kt.line).text).length==kt.ch){var nn=Je(Rt,Rt.length,re.options.tabSize)-Rt.length;kt=tn(kt.line,Math.max(0,Math.round(($e-ja(re.display).left)/Fs(re.display))-nn))}return kt}function Ds(re,ce){if(ce>=re.display.viewTo||(ce-=re.display.viewFrom,ce<0))return null;for(var Ce=re.display.view,Pe=0;Pe<Ce.length;Pe++)if(ce-=Ce[Pe].size,ce<0)return Pe}function Do(re,ce,Ce,Pe){ce==null&&(ce=re.doc.first),Ce==null&&(Ce=re.doc.first+re.doc.size),Pe||(Pe=0);var Oe=re.display;if(Pe&&Ce<Oe.viewTo&&(Oe.updateLineNumbers==null||Oe.updateLineNumbers>ce)&&(Oe.updateLineNumbers=ce),re.curOp.viewChanged=!0,ce>=Oe.viewTo)on&&sr(re.doc,ce)<Oe.viewTo&&Go(re);else if(Ce<=Oe.viewFrom)on&&Qn(re.doc,Ce+Pe)>Oe.viewFrom?Go(re):(Oe.viewFrom+=Pe,Oe.viewTo+=Pe);else if(ce<=Oe.viewFrom&&Ce>=Oe.viewTo)Go(re);else if(ce<=Oe.viewFrom){var $e=ps(re,Ce,Ce+Pe,1);$e?(Oe.view=Oe.view.slice($e.index),Oe.viewFrom=$e.lineN,Oe.viewTo+=Pe):Go(re)}else if(Ce>=Oe.viewTo){var pt=ps(re,ce,ce,-1);pt?(Oe.view=Oe.view.slice(0,pt.index),Oe.viewTo=pt.lineN):Go(re)}else{var Lt=ps(re,ce,ce,-1),kt=ps(re,Ce,Ce+Pe,1);Lt&&kt?(Oe.view=Oe.view.slice(0,Lt.index).concat(ci(re,Lt.lineN,kt.lineN)).concat(Oe.view.slice(kt.index)),Oe.viewTo+=Pe):Go(re)}var Rt=Oe.externalMeasured;Rt&&(Ce<Rt.lineN?Rt.lineN+=Pe:ce<Rt.lineN+Rt.size&&(Oe.externalMeasured=null))}function Wi(re,ce,Ce){re.curOp.viewChanged=!0;var Pe=re.display,Oe=re.display.externalMeasured;if(Oe&&ce>=Oe.lineN&&ce<Oe.lineN+Oe.size&&(Pe.externalMeasured=null),!(ce<Pe.viewFrom||ce>=Pe.viewTo)){var $e=Pe.view[Ds(re,ce)];if($e.node!=null){var pt=$e.changes||($e.changes=[]);xt(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,ce,Ce,Pe){var Oe=Ds(re,ce),$e,pt=re.display.view;if(!on||Ce==re.doc.first+re.doc.size)return{index:Oe,lineN:Ce};for(var Lt=re.display.viewFrom,kt=0;kt<Oe;kt++)Lt+=pt[kt].size;if(Lt!=ce){if(Pe>0){if(Oe==pt.length-1)return null;$e=Lt+pt[Oe].size-ce,Oe++}else $e=Lt-ce;ce+=$e,Ce+=$e}for(;sr(re.doc,Ce)!=Ce;){if(Oe==(Pe<0?0:pt.length-1))return null;Ce+=Pe*pt[Oe-(Pe<0?1:0)].size,Oe+=Pe}return{index:Oe,lineN:Ce}}function xo(re,ce,Ce){var Pe=re.display,Oe=Pe.view;Oe.length==0||ce>=Pe.viewTo||Ce<=Pe.viewFrom?(Pe.view=ci(re,ce,Ce),Pe.viewFrom=ce):(Pe.viewFrom>ce?Pe.view=ci(re,ce,Pe.viewFrom).concat(Pe.view):Pe.viewFrom<ce&&(Pe.view=Pe.view.slice(Ds(re,ce))),Pe.viewFrom=ce,Pe.viewTo<Ce?Pe.view=Pe.view.concat(ci(re,Pe.viewTo,Ce)):Pe.viewTo>Ce&&(Pe.view=Pe.view.slice(0,Ds(re,Ce)))),Pe.viewTo=Ce}function Cs(re){for(var ce=re.display.view,Ce=0,Pe=0;Pe<ce.length;Pe++){var Oe=ce[Pe];!Oe.hidden&&(!Oe.node||Oe.changes)&&++Ce}return Ce}function ma(re){re.display.input.showSelection(re.display.input.prepareSelection())}function hu(re,ce){ce===void 0&&(ce=!0);for(var Ce=re.doc,Pe={},Oe=Pe.cursors=document.createDocumentFragment(),$e=Pe.selection=document.createDocumentFragment(),pt=0;pt<Ce.sel.ranges.length;pt++)if(!(!ce&&pt==Ce.sel.primIndex)){var Lt=Ce.sel.ranges[pt];if(!(Lt.from().line>=re.display.viewTo||Lt.to().line<re.display.viewFrom)){var kt=Lt.empty();(kt||re.options.showCursorWhenSelecting)&&ao(re,Lt.head,Oe),kt||ro(re,Lt,$e)}}return Pe}function ao(re,ce,Ce){var Pe=co(re,ce,"div",null,null,!re.options.singleCursorHeightPerLine),Oe=Ce.appendChild(Me("div","\xA0","CodeMirror-cursor"));if(Oe.style.left=Pe.left+"px",Oe.style.top=Pe.top+"px",Oe.style.height=Math.max(0,Pe.bottom-Pe.top)*re.options.cursorHeight+"px",Pe.other){var $e=Ce.appendChild(Me("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));$e.style.display="",$e.style.left=Pe.other.left+"px",$e.style.top=Pe.other.top+"px",$e.style.height=(Pe.other.bottom-Pe.other.top)*.85+"px"}}function Ea(re,ce){return re.top-ce.top||re.left-ce.left}function ro(re,ce,Ce){var Pe=re.display,Oe=re.doc,$e=document.createDocumentFragment(),pt=ja(re.display),Lt=pt.left,kt=Math.max(Pe.sizerWidth,fs(re)-Pe.sizer.offsetLeft)-pt.right,Rt=Oe.direction=="ltr";function nn(Yr,vi,zi,Hr){vi<0&&(vi=0),vi=Math.round(vi),Hr=Math.round(Hr),$e.appendChild(Me("div",null,"CodeMirror-selected","position: absolute; left: "+Yr+`px;
|
|
top: `+vi+"px; width: "+(zi==null?kt-Yr:zi)+`px;
|
|
height: `+(Hr-vi)+"px"))}function _t(Yr,vi,zi){var Hr=Yn(Oe,Yr),eo=Hr.text.length,Yo,Ra;function ia(La,Xs){return Ga(re,tn(Yr,La),"div",Hr,Xs)}function Is(La,Xs,as){var Ma=fa(re,Hr,null,La),mo=Xs=="ltr"==(as=="after")?"left":"right",ua=as=="after"?Ma.begin:Ma.end-(/\s/.test(Hr.text.charAt(Ma.end-1))?2:1);return ia(ua,mo)[mo]}var ms=Kt(Hr,Oe.direction);return vt(ms,vi||0,zi==null?eo:zi,function(La,Xs,as,Ma){var mo=as=="ltr",ua=ia(La,mo?"left":"right"),Xa=ia(Xs-1,mo?"right":"left"),ss=vi==null&&La==0,Bl=zi==null&&Xs==eo,oa=Ma==0,Pl=!ms||Ma==ms.length-1;if(Xa.top-ua.top<=3){var da=(Rt?ss:Bl)&&oa,Af=(Rt?Bl:ss)&&Pl,cl=da?Lt:(mo?ua:Xa).left,Ys=Af?kt:(mo?Xa:ua).right;nn(cl,ua.top,Ys-cl,ua.bottom)}else{var _s,Ro,Ya,yu;mo?(_s=Rt&&ss&&oa?Lt:ua.left,Ro=Rt?kt:Is(La,as,"before"),Ya=Rt?Lt:Is(Xs,as,"after"),yu=Rt&&Bl&&Pl?kt:Xa.right):(_s=Rt?Is(La,as,"before"):Lt,Ro=!Rt&&ss&&oa?kt:ua.right,Ya=!Rt&&Bl&&Pl?Lt:Xa.left,yu=Rt?Is(Xs,as,"after"):kt),nn(_s,ua.top,Ro-_s,ua.bottom),ua.bottom<Xa.top&&nn(Lt,ua.bottom,null,Xa.top),nn(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 mn=ce.from(),dn=ce.to();if(mn.line==dn.line)_t(mn.line,mn.ch,dn.ch);else{var lr=Yn(Oe,mn.line),dr=Yn(Oe,dn.line),br=kn(lr)==kn(dr),Fr=_t(mn.line,mn.ch,br?lr.text.length+1:null).end,ui=_t(dn.line,br?0:null,dn.ch).start;br&&(Fr.top<ui.top-2?(nn(Fr.right,Fr.top,null,Fr.bottom),nn(Lt,ui.top,ui.left,ui.bottom)):nn(Fr.right,Fr.top,ui.left-Fr.right,Fr.bottom)),Fr.bottom<ui.top&&nn(Lt,Fr.bottom,null,ui.top)}Ce.appendChild($e)}function wo(re){if(re.state.focused){var ce=re.display;clearInterval(ce.blinker);var Ce=!0;ce.cursorDiv.style.visibility="",re.options.cursorBlinkRate>0?ce.blinker=setInterval(function(){re.hasFocus()||Du(re),ce.cursorDiv.style.visibility=(Ce=!Ce)?"":"hidden"},re.options.cursorBlinkRate):re.options.cursorBlinkRate<0&&(ce.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,ce){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(rn(re,"focus",re,ce),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,ce){re.state.delayingBlurEvent||(re.state.focused&&(rn(re,"blur",re,ce),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 yi(re){for(var ce=re.display,Ce=ce.lineDiv.offsetTop,Pe=0;Pe<ce.view.length;Pe++){var Oe=ce.view[Pe],$e=re.options.lineWrapping,pt=void 0,Lt=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,!$e&&Oe.text.firstChild&&(Lt=Oe.text.firstChild.getBoundingClientRect().right-Rt.left-1)}var nn=Oe.line.height-pt;if((nn>.005||nn<-.005)&&($r(Oe.line,pt),uf(Oe.line),Oe.rest))for(var _t=0;_t<Oe.rest.length;_t++)uf(Oe.rest[_t]);if(Lt>re.display.sizerWidth){var mn=Math.ceil(Lt/Fs(re.display));mn>re.display.maxLineLength&&(re.display.maxLineLength=mn,re.display.maxLine=Oe.line,re.display.maxLineChanged=!0)}}}}function uf(re){if(re.widgets)for(var ce=0;ce<re.widgets.length;++ce){var Ce=re.widgets[ce],Pe=Ce.node.parentNode;Pe&&(Ce.height=Pe.offsetHeight)}}function Qi(re,ce,Ce){var Pe=Ce&&Ce.top!=null?Math.max(0,Ce.top):re.scroller.scrollTop;Pe=Math.floor(Pe-Ii(re));var Oe=Ce&&Ce.bottom!=null?Ce.bottom:Pe+re.wrapper.clientHeight,$e=Wt(ce,Pe),pt=Wt(ce,Oe);if(Ce&&Ce.ensure){var Lt=Ce.ensure.from.line,kt=Ce.ensure.to.line;Lt<$e?($e=Lt,pt=Wt(ce,Nr(Yn(ce,Lt))+re.wrapper.clientHeight)):Math.min(kt,ce.lastLine())>=pt&&($e=Wt(ce,Nr(Yn(ce,kt))-re.wrapper.clientHeight),pt=kt)}return{from:$e,to:Math.max(pt,$e+1)}}function Cc(re,ce){if(!un(re,"scrollCursorIntoView")){var Ce=re.display,Pe=Ce.sizer.getBoundingClientRect(),Oe=null;if(ce.top+Pe.top<0?Oe=!0:ce.bottom+Pe.top>(window.innerHeight||document.documentElement.clientHeight)&&(Oe=!1),Oe!=null&&!be){var $e=Me("div","\u200B",null,`position: absolute;
|
|
top: `+(ce.top-Ce.viewOffset-Ii(re.display))+`px;
|
|
height: `+(ce.bottom-ce.top+vo(re)+Ce.barHeight)+`px;
|
|
left: `+ce.left+"px; width: "+Math.max(2,ce.right-ce.left)+"px;");re.display.lineSpace.appendChild($e),$e.scrollIntoView(Oe),re.display.lineSpace.removeChild($e)}}}function cu(re,ce,Ce,Pe){Pe==null&&(Pe=0);var Oe;!re.options.lineWrapping&&ce==Ce&&(ce=ce.ch?tn(ce.line,ce.sticky=="before"?ce.ch-1:ce.ch,"after"):ce,Ce=ce.sticky=="before"?tn(ce.line,ce.ch+1,"before"):ce);for(var $e=0;$e<5;$e++){var pt=!1,Lt=co(re,ce),kt=!Ce||Ce==ce?Lt:co(re,Ce);Oe={left:Math.min(Lt.left,kt.left),top:Math.min(Lt.top,kt.top)-Pe,right:Math.max(Lt.left,kt.left),bottom:Math.max(Lt.bottom,kt.bottom)+Pe};var Rt=Ec(re,Oe),nn=re.doc.scrollTop,_t=re.doc.scrollLeft;if(Rt.scrollTop!=null&&(Yl(re,Rt.scrollTop),Math.abs(re.doc.scrollTop-nn)>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,ce){var Ce=Ec(re,ce);Ce.scrollTop!=null&&Yl(re,Ce.scrollTop),Ce.scrollLeft!=null&&Jl(re,Ce.scrollLeft)}function Ec(re,ce){var Ce=re.display,Pe=ba(re.display);ce.top<0&&(ce.top=0);var Oe=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:Ce.scroller.scrollTop,$e=ds(re),pt={};ce.bottom-ce.top>$e&&(ce.bottom=ce.top+$e);var Lt=re.doc.height+Vo(Ce),kt=ce.top<Pe,Rt=ce.bottom>Lt-Pe;if(ce.top<Oe)pt.scrollTop=kt?0:ce.top;else if(ce.bottom>Oe+$e){var nn=Math.min(ce.top,(Rt?Lt:ce.bottom)-$e);nn!=Oe&&(pt.scrollTop=nn)}var _t=re.options.fixedGutter?0:Ce.gutters.offsetWidth,mn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:Ce.scroller.scrollLeft-_t,dn=fs(re)-Ce.gutters.offsetWidth,lr=ce.right-ce.left>dn;return lr&&(ce.right=ce.left+dn),ce.left<10?pt.scrollLeft=0:ce.left<mn?pt.scrollLeft=Math.max(0,ce.left+_t-(lr?0:10)):ce.right>dn+mn-3&&(pt.scrollLeft=ce.right+(lr?0:10)-dn),pt}function _h(re,ce){ce!=null&&(al(re),re.curOp.scrollTop=(re.curOp.scrollTop==null?re.doc.scrollTop:re.curOp.scrollTop)+ce)}function Ol(re){al(re);var ce=re.getCursor();re.curOp.scrollToPos={from:ce,to:ce,margin:re.options.cursorScrollMargin}}function Bu(re,ce,Ce){(ce!=null||Ce!=null)&&al(re),ce!=null&&(re.curOp.scrollLeft=ce),Ce!=null&&(re.curOp.scrollTop=Ce)}function uo(re,ce){al(re),re.curOp.scrollToPos=ce}function al(re){var ce=re.curOp.scrollToPos;if(ce){re.curOp.scrollToPos=null;var Ce=oo(re,ce.from),Pe=oo(re,ce.to);zh(re,Ce,Pe,ce.margin)}}function zh(re,ce,Ce,Pe){var Oe=Ec(re,{left:Math.min(ce.left,Ce.left),top:Math.min(ce.top,Ce.top)-Pe,right:Math.max(ce.right,Ce.right),bottom:Math.max(ce.bottom,Ce.bottom)+Pe});Bu(re,Oe.scrollLeft,Oe.scrollTop)}function Yl(re,ce){Math.abs(re.doc.scrollTop-ce)<2||(at||ah(re,{top:ce}),kc(re,ce,!0),at&&ah(re),Tc(re,100))}function kc(re,ce,Ce){ce=Math.max(0,Math.min(re.display.scroller.scrollHeight-re.display.scroller.clientHeight,ce)),!(re.display.scroller.scrollTop==ce&&!Ce)&&(re.doc.scrollTop=ce,re.display.scrollbars.setScrollTop(ce),re.display.scroller.scrollTop!=ce&&(re.display.scroller.scrollTop=ce))}function Jl(re,ce,Ce,Pe){ce=Math.max(0,Math.min(ce,re.display.scroller.scrollWidth-re.display.scroller.clientWidth)),!((Ce?ce==re.doc.scrollLeft:Math.abs(re.doc.scrollLeft-ce)<2)&&!Pe)&&(re.doc.scrollLeft=ce,td(re),re.display.scroller.scrollLeft!=ce&&(re.display.scroller.scrollLeft=ce),re.display.scrollbars.setScrollLeft(ce))}function Ki(re){var ce=re.display,Ce=ce.gutters.offsetWidth,Pe=Math.round(re.doc.height+Vo(re.display));return{clientHeight:ce.scroller.clientHeight,viewHeight:ce.wrapper.clientHeight,scrollWidth:ce.scroller.scrollWidth,clientWidth:ce.scroller.clientWidth,viewWidth:ce.wrapper.clientWidth,barLeft:re.options.fixedGutter?Ce:0,docHeight:Pe,scrollHeight:Pe+vo(re)+ce.barHeight,nativeBarWidth:ce.nativeBarWidth,gutterWidth:Ce}}var so=function(re,ce,Ce){this.cm=Ce;var Pe=this.vert=Me("div",[Me("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Oe=this.horiz=Me("div",[Me("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Pe.tabIndex=Oe.tabIndex=-1,re(Pe),re(Oe),Vt(Pe,"scroll",function(){Pe.clientHeight&&ce(Pe.scrollTop,"vertical")}),Vt(Oe,"scroll",function(){Oe.clientWidth&&ce(Oe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ie&&de<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};so.prototype.update=function(re){var ce=re.scrollWidth>re.clientWidth+1,Ce=re.scrollHeight>re.clientHeight+1,Pe=re.nativeBarWidth;if(Ce){this.vert.style.display="block",this.vert.style.bottom=ce?Pe+"px":"0";var Oe=re.viewHeight-(ce?Pe: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(ce){this.horiz.style.display="block",this.horiz.style.right=Ce?Pe+"px":"0",this.horiz.style.left=re.barLeft+"px";var $e=re.viewWidth-re.barLeft-(Ce?Pe:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+$e)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&re.clientHeight>0&&(Pe==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Ce?Pe:0,bottom:ce?Pe: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 rt,this.disableVert=new rt},so.prototype.enableZeroWidthBar=function(re,ce,Ce){re.style.pointerEvents="auto";function Pe(){var Oe=re.getBoundingClientRect(),$e=Ce=="vert"?document.elementFromPoint(Oe.right-1,(Oe.top+Oe.bottom)/2):document.elementFromPoint((Oe.right+Oe.left)/2,Oe.bottom-1);$e!=re?re.style.pointerEvents="none":ce.set(1e3,Pe)}ce.set(1e3,Pe)},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,ce){ce||(ce=Ki(re));var Ce=re.display.barWidth,Pe=re.display.barHeight;ka(re,ce);for(var Oe=0;Oe<4&&Ce!=re.display.barWidth||Pe!=re.display.barHeight;Oe++)Ce!=re.display.barWidth&&re.options.lineWrapping&&yi(re),ka(re,Ki(re)),Ce=re.display.barWidth,Pe=re.display.barHeight}function ka(re,ce){var Ce=re.display,Pe=Ce.scrollbars.update(ce);Ce.sizer.style.paddingRight=(Ce.barWidth=Pe.right)+"px",Ce.sizer.style.paddingBottom=(Ce.barHeight=Pe.bottom)+"px",Ce.heightForcer.style.borderBottom=Pe.bottom+"px solid transparent",Pe.right&&Pe.bottom?(Ce.scrollbarFiller.style.display="block",Ce.scrollbarFiller.style.height=Pe.bottom+"px",Ce.scrollbarFiller.style.width=Pe.right+"px"):Ce.scrollbarFiller.style.display="",Pe.bottom&&re.options.coverGutterNextToScrollbar&&re.options.fixedGutter?(Ce.gutterFiller.style.display="block",Ce.gutterFiller.style.height=Pe.bottom+"px",Ce.gutterFiller.style.width=ce.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(ce){re.display.wrapper.insertBefore(ce,re.display.scrollbarFiller),Vt(ce,"mousedown",function(){re.state.focused&&setTimeout(function(){return re.display.input.focus()},0)}),ce.setAttribute("cm-not-content","true")},function(ce,Ce){Ce=="horizontal"?Jl(re,ce):Yl(re,ce)},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},pa(re.curOp)}function Fl(re){var ce=re.curOp;ce&&bs(ce,function(Ce){for(var Pe=0;Pe<Ce.ops.length;Pe++)Ce.ops[Pe].cm.curOp=null;Qv(Ce)})}function Qv(re){for(var ce=re.ops,Ce=0;Ce<ce.length;Ce++)$v(ce[Ce]);for(var Pe=0;Pe<ce.length;Pe++)qv(ce[Pe]);for(var Oe=0;Oe<ce.length;Oe++)Ig(ce[Oe]);for(var $e=0;$e<ce.length;$e++)la(ce[$e]);for(var pt=0;pt<ce.length;pt++)oh(ce[pt])}function $v(re){var ce=re.cm,Ce=ce.display;_g(ce),re.updateMaxLine&&Ur(ce),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&&ce.options.lineWrapping,re.update=re.mustUpdate&&new Gh(ce,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 ce=re.cm,Ce=ce.display;re.updatedDisplay&&yi(ce),re.barMeasure=Ki(ce),Ce.maxLineChanged&&!ce.options.lineWrapping&&(re.adjustWidthTo=ju(ce,Ce.maxLine,Ce.maxLine.text.length).left+3,ce.display.sizerWidth=re.adjustWidthTo,re.barMeasure.scrollWidth=Math.max(Ce.scroller.clientWidth,Ce.sizer.offsetLeft+re.adjustWidthTo+vo(ce)+ce.display.barWidth),re.maxScrollLeft=Math.max(0,Ce.sizer.offsetLeft+re.adjustWidthTo-fs(ce))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=Ce.input.prepareSelection())}function la(re){var ce=re.cm;re.adjustWidthTo!=null&&(ce.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<ce.doc.scrollLeft&&Jl(ce,Math.min(ce.display.scroller.scrollLeft,re.maxScrollLeft),!0),ce.display.maxLineChanged=!1);var Ce=re.focus&&re.focus==Ke();re.preparedSelection&&ce.display.input.showSelection(re.preparedSelection,Ce),(re.updatedDisplay||re.startHeight!=ce.doc.height)&&Fa(ce,re.barMeasure),re.updatedDisplay&&lh(ce,re.barMeasure),re.selectionChanged&&wo(ce),ce.state.focused&&re.updateInput&&ce.display.input.reset(re.typing),Ce&&Eo(re.cm)}function oh(re){var ce=re.cm,Ce=ce.display,Pe=ce.doc;if(re.updatedDisplay&&ko(ce,re.update),Ce.wheelStartX!=null&&(re.scrollTop!=null||re.scrollLeft!=null||re.scrollToPos)&&(Ce.wheelStartX=Ce.wheelStartY=null),re.scrollTop!=null&&kc(ce,re.scrollTop,re.forceScroll),re.scrollLeft!=null&&Jl(ce,re.scrollLeft,!0,!0),re.scrollToPos){var Oe=cu(ce,er(Pe,re.scrollToPos.from),er(Pe,re.scrollToPos.to),re.scrollToPos.margin);Cc(ce,Oe)}var $e=re.maybeHiddenMarkers,pt=re.maybeUnhiddenMarkers;if($e)for(var Lt=0;Lt<$e.length;++Lt)$e[Lt].lines.length||rn($e[Lt],"hide");if(pt)for(var kt=0;kt<pt.length;++kt)pt[kt].lines.length&&rn(pt[kt],"unhide");Ce.wrapper.offsetHeight&&(Pe.scrollTop=ce.display.scroller.scrollTop),re.changeObjs&&rn(ce,"changes",ce,re.changeObjs),re.update&&re.update.finish()}function yo(re,ce){if(re.curOp)return ce();sl(re);try{return ce()}finally{Fl(re)}}function Da(re,ce){return function(){if(re.curOp)return ce.apply(re,arguments);sl(re);try{return ce.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 ce=this.cm;if(!ce||ce.curOp)return re.apply(this,arguments);sl(ce);try{return re.apply(this,arguments)}finally{Fl(ce)}}}function Tc(re,ce){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(ce,ct(Ka,re))}function Ka(re){var ce=re.doc;if(!(ce.highlightFrontier>=re.display.viewTo)){var Ce=+new Date+re.options.workTime,Pe=_i(re,ce.highlightFrontier),Oe=[];ce.iter(Pe.line,Math.min(ce.first+ce.size,re.display.viewTo+500),function($e){if(Pe.line>=re.display.viewFrom){var pt=$e.styles,Lt=$e.text.length>re.options.maxHighlightLength?Un(ce.mode,Pe.state):null,kt=ri(re,$e,Pe,!0);Lt&&(Pe.state=Lt),$e.styles=kt.styles;var Rt=$e.styleClasses,nn=kt.classes;nn?$e.styleClasses=nn:Rt&&($e.styleClasses=null);for(var _t=!pt||pt.length!=$e.styles.length||Rt!=nn&&(!Rt||!nn||Rt.bgClass!=nn.bgClass||Rt.textClass!=nn.textClass),mn=0;!_t&&mn<pt.length;++mn)_t=pt[mn]!=$e.styles[mn];_t&&Oe.push(Pe.line),$e.stateAfter=Pe.save(),Pe.nextLine()}else $e.text.length<=re.options.maxHighlightLength&&pn(re,$e.text,Pe),$e.stateAfter=Pe.line%5==0?Pe.save():null,Pe.nextLine();if(+new Date>Ce)return Tc(re,re.options.workDelay),!0}),ce.highlightFrontier=Pe.line,ce.modeFrontier=Math.max(ce.modeFrontier,Pe.line),Oe.length&&yo(re,function(){for(var $e=0;$e<Oe.length;$e++)Wi(re,Oe[$e],"text")})}}var Gh=function(re,ce,Ce){var Pe=re.display;this.viewport=ce,this.visible=Qi(Pe,re.doc,ce),this.editorIsHidden=!Pe.wrapper.offsetWidth,this.wrapperHeight=Pe.wrapper.clientHeight,this.wrapperWidth=Pe.wrapper.clientWidth,this.oldDisplayWidth=fs(re),this.force=Ce,this.dims=ol(re),this.events=[]};Gh.prototype.signal=function(re,ce){vn(re,ce)&&this.events.push(arguments)},Gh.prototype.finish=function(){for(var re=0;re<this.events.length;re++)rn.apply(null,this.events[re])};function _g(re){var ce=re.display;!ce.scrollbarsClipped&&ce.scroller.offsetWidth&&(ce.nativeBarWidth=ce.scroller.offsetWidth-ce.scroller.clientWidth,ce.heightForcer.style.height=vo(re)+"px",ce.sizer.style.marginBottom=-ce.nativeBarWidth+"px",ce.sizer.style.borderRightWidth=vo(re)+"px",ce.scrollbarsClipped=!0)}function zg(re){if(re.hasFocus())return null;var ce=Ke();if(!ce||!Ye(re.display.lineDiv,ce))return null;var Ce={activeElt:ce};if(window.getSelection){var Pe=window.getSelection();Pe.anchorNode&&Pe.extend&&Ye(re.display.lineDiv,Pe.anchorNode)&&(Ce.anchorNode=Pe.anchorNode,Ce.anchorOffset=Pe.anchorOffset,Ce.focusNode=Pe.focusNode,Ce.focusOffset=Pe.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 ce=window.getSelection(),Ce=document.createRange();Ce.setEnd(re.anchorNode,re.anchorOffset),Ce.collapse(!1),ce.removeAllRanges(),ce.addRange(Ce),ce.extend(re.focusNode,re.focusOffset)}}function ed(re,ce){var Ce=re.display,Pe=re.doc;if(ce.editorIsHidden)return Go(re),!1;if(!ce.force&&ce.visible.from>=Ce.viewFrom&&ce.visible.to<=Ce.viewTo&&(Ce.updateLineNumbers==null||Ce.updateLineNumbers>=Ce.viewTo)&&Ce.renderedView==Ce.view&&Cs(re)==0)return!1;Pa(re)&&(Go(re),ce.dims=ol(re));var Oe=Pe.first+Pe.size,$e=Math.max(ce.visible.from-re.options.viewportMargin,Pe.first),pt=Math.min(Oe,ce.visible.to+re.options.viewportMargin);Ce.viewFrom<$e&&$e-Ce.viewFrom<20&&($e=Math.max(Pe.first,Ce.viewFrom)),Ce.viewTo>pt&&Ce.viewTo-pt<20&&(pt=Math.min(Oe,Ce.viewTo)),on&&($e=sr(re.doc,$e),pt=Qn(re.doc,pt));var Lt=$e!=Ce.viewFrom||pt!=Ce.viewTo||Ce.lastWrapHeight!=ce.wrapperHeight||Ce.lastWrapWidth!=ce.wrapperWidth;xo(re,$e,pt),Ce.viewOffset=Nr(Yn(re.doc,Ce.viewFrom)),re.display.mover.style.top=Ce.viewOffset+"px";var kt=Cs(re);if(!Lt&&kt==0&&!ce.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,ce.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,Lt&&(Ce.lastWrapHeight=ce.wrapperHeight,Ce.lastWrapWidth=ce.wrapperWidth,Tc(re,400)),Ce.updateLineNumbers=null,!0}function ko(re,ce){for(var Ce=ce.viewport,Pe=!0;;Pe=!1){if(!Pe||!re.options.lineWrapping||ce.oldDisplayWidth==fs(re)){if(Ce&&Ce.top!=null&&(Ce={top:Math.min(re.doc.height+Vo(re.display)-ds(re),Ce.top)}),ce.visible=Qi(re.display,re.doc,Ce),ce.visible.from>=re.display.viewFrom&&ce.visible.to<=re.display.viewTo)break}else Pe&&(ce.visible=Qi(re.display,re.doc,Ce));if(!ed(re,ce))break;yi(re);var Oe=Ki(re);ma(re),Fa(re,Oe),lh(re,Oe),ce.force=!1}ce.signal(re,"update",re),(re.display.viewFrom!=re.display.reportedViewFrom||re.display.viewTo!=re.display.reportedViewTo)&&(ce.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,ce){var Ce=new Gh(re,ce);if(ed(re,Ce)){yi(re),ko(re,Ce);var Pe=Ki(re);ma(re),Fa(re,Pe),lh(re,Pe),Ce.finish()}}function lp(re,ce,Ce){var Pe=re.display,Oe=re.options.lineNumbers,$e=Pe.lineDiv,pt=$e.firstChild;function Lt(lr){var dr=lr.nextSibling;return ve&&se&&re.display.currentWheelTarget==lr?lr.style.display="none":lr.parentNode.removeChild(lr),dr}for(var kt=Pe.view,Rt=Pe.viewFrom,nn=0;nn<kt.length;nn++){var _t=kt[nn];if(!_t.hidden)if(!_t.node||_t.node.parentNode!=$e){var mn=Oi(re,_t,Rt,Ce);$e.insertBefore(mn,pt)}else{for(;pt!=_t.node;)pt=Lt(pt);var dn=Oe&&ce!=null&&ce<=Rt&&_t.lineNumber;_t.changes&&(xt(_t.changes,"gutter")>-1&&(dn=!1),Po(re,_t,Rt,Ce)),dn&&(Fe(_t.lineNumber),_t.lineNumber.appendChild(document.createTextNode(zn(re.options,Rt)))),pt=_t.node.nextSibling}Rt+=_t.size}for(;pt;)pt=Lt(pt)}function sh(re){var ce=re.gutters.offsetWidth;re.sizer.style.marginLeft=ce+"px"}function lh(re,ce){re.display.sizer.style.minHeight=ce.docHeight+"px",re.display.heightForcer.style.top=ce.docHeight+"px",re.display.gutters.style.height=ce.docHeight+re.display.barHeight+vo(re)+"px"}function td(re){var ce=re.display,Ce=ce.view;if(!(!ce.alignWidgets&&(!ce.gutters.firstChild||!re.options.fixedGutter))){for(var Pe=Fu(ce)-ce.scroller.scrollLeft+re.doc.scrollLeft,Oe=ce.gutters.offsetWidth,$e=Pe+"px",pt=0;pt<Ce.length;pt++)if(!Ce[pt].hidden){re.options.fixedGutter&&(Ce[pt].gutter&&(Ce[pt].gutter.style.left=$e),Ce[pt].gutterBackground&&(Ce[pt].gutterBackground.style.left=$e));var Lt=Ce[pt].alignable;if(Lt)for(var kt=0;kt<Lt.length;kt++)Lt[kt].style.left=$e}re.options.fixedGutter&&(ce.gutters.style.left=Pe+Oe+"px")}}function Pa(re){if(!re.options.lineNumbers)return!1;var ce=re.doc,Ce=zn(re.options,ce.first+ce.size-1),Pe=re.display;if(Ce.length!=Pe.lineNumChars){var Oe=Pe.measure.appendChild(Me("div",[Me("div",Ce)],"CodeMirror-linenumber CodeMirror-gutter-elt")),$e=Oe.firstChild.offsetWidth,pt=Oe.offsetWidth-$e;return Pe.lineGutter.style.width="",Pe.lineNumInnerWidth=Math.max($e,Pe.lineGutter.offsetWidth-pt)+1,Pe.lineNumWidth=Pe.lineNumInnerWidth+pt,Pe.lineNumChars=Pe.lineNumInnerWidth?Ce.length:-1,Pe.lineGutter.style.width=Pe.lineNumWidth+"px",sh(re.display),!0}return!1}function Va(re,ce){for(var Ce=[],Pe=!1,Oe=0;Oe<re.length;Oe++){var $e=re[Oe],pt=null;if(typeof $e!="string"&&(pt=$e.style,$e=$e.className),$e=="CodeMirror-linenumbers")if(ce)Pe=!0;else continue;Ce.push({className:$e,style:pt})}return ce&&!Pe&&Ce.push({className:"CodeMirror-linenumbers",style:null}),Ce}function Uh(re){var ce=re.gutters,Ce=re.gutterSpecs;Fe(ce),re.lineGutter=null;for(var Pe=0;Pe<Ce.length;++Pe){var Oe=Ce[Pe],$e=Oe.className,pt=Oe.style,Lt=ce.appendChild(Me("div",null,"CodeMirror-gutter "+$e));pt&&(Lt.style.cssText=pt),$e=="CodeMirror-linenumbers"&&(re.lineGutter=Lt,Lt.style.width=(re.lineNumWidth||1)+"px")}ce.style.display=Ce.length?"":"none",sh(re)}function ll(re){Uh(re.display),Do(re),td(re)}function uh(re,ce,Ce,Pe){var Oe=this;this.input=Ce,Oe.scrollbarFiller=Me("div",null,"CodeMirror-scrollbar-filler"),Oe.scrollbarFiller.setAttribute("cm-not-content","true"),Oe.gutterFiller=Me("div",null,"CodeMirror-gutter-filler"),Oe.gutterFiller.setAttribute("cm-not-content","true"),Oe.lineDiv=Be("div",null,"CodeMirror-code"),Oe.selectionDiv=Me("div",null,null,"position: relative; z-index: 1"),Oe.cursorDiv=Me("div",null,"CodeMirror-cursors"),Oe.measure=Me("div",null,"CodeMirror-measure"),Oe.lineMeasure=Me("div",null,"CodeMirror-measure"),Oe.lineSpace=Be("div",[Oe.measure,Oe.lineMeasure,Oe.selectionDiv,Oe.cursorDiv,Oe.lineDiv],null,"position: relative; outline: none");var $e=Be("div",[Oe.lineSpace],"CodeMirror-lines");Oe.mover=Me("div",[$e],null,"position: relative"),Oe.sizer=Me("div",[Oe.mover],"CodeMirror-sizer"),Oe.sizerWidth=null,Oe.heightForcer=Me("div",null,null,"position: absolute; height: "+bt+"px; width: 1px;"),Oe.gutters=Me("div",null,"CodeMirror-gutters"),Oe.lineGutter=null,Oe.scroller=Me("div",[Oe.sizer,Oe.heightForcer,Oe.gutters],"CodeMirror-scroll"),Oe.scroller.setAttribute("tabIndex","-1"),Oe.wrapper=Me("div",[Oe.scrollbarFiller,Oe.gutterFiller,Oe.scroller],"CodeMirror"),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=ce.first,Oe.reportedViewFrom=Oe.reportedViewTo=ce.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=Va(Pe.gutters,Pe.lineNumbers),Uh(Oe),Ce.init(Oe)}var Ks=0,va=null;Ie?va=-.53:at?va=15:ke?va=-.7:Ae&&(va=-1/3);function $l(re){var ce=re.wheelDeltaX,Ce=re.wheelDeltaY;return ce==null&&re.detail&&re.axis==re.HORIZONTAL_AXIS&&(ce=re.detail),Ce==null&&re.detail&&re.axis==re.VERTICAL_AXIS?Ce=re.detail:Ce==null&&(Ce=re.wheelDelta),{x:ce,y:Ce}}function ul(re){var ce=$l(re);return ce.x*=va,ce.y*=va,ce}function Za(re,ce){var Ce=$l(ce),Pe=Ce.x,Oe=Ce.y,$e=re.display,pt=$e.scroller,Lt=pt.scrollWidth>pt.clientWidth,kt=pt.scrollHeight>pt.clientHeight;if(Pe&&Lt||Oe&&kt){if(Oe&&se&&ve){e:for(var Rt=ce.target,nn=$e.view;Rt!=pt;Rt=Rt.parentNode)for(var _t=0;_t<nn.length;_t++)if(nn[_t].node==Rt){re.display.currentWheelTarget=Rt;break e}}if(Pe&&!at&&!Se&&va!=null){Oe&&kt&&Yl(re,Math.max(0,pt.scrollTop+Oe*va)),Jl(re,Math.max(0,pt.scrollLeft+Pe*va)),(!Oe||Oe&&kt)&&On(ce),$e.wheelStartX=null;return}if(Oe&&va!=null){var mn=Oe*va,dn=re.doc.scrollTop,lr=dn+$e.wrapper.clientHeight;mn<0?dn=Math.max(0,dn+mn-50):lr=Math.min(re.doc.height,lr+mn+50),ah(re,{top:dn,bottom:lr})}Ks<20&&($e.wheelStartX==null?($e.wheelStartX=pt.scrollLeft,$e.wheelStartY=pt.scrollTop,$e.wheelDX=Pe,$e.wheelDY=Oe,setTimeout(function(){if($e.wheelStartX!=null){var dr=pt.scrollLeft-$e.wheelStartX,br=pt.scrollTop-$e.wheelStartY,Fr=br&&$e.wheelDY&&br/$e.wheelDY||dr&&$e.wheelDX&&dr/$e.wheelDX;$e.wheelStartX=$e.wheelStartY=null,Fr&&(va=(va*Ks+Fr)/(Ks+1),++Ks)}},200)):($e.wheelDX+=Pe,$e.wheelDY+=Oe))}}var xl=function(re,ce){this.ranges=re,this.primIndex=ce};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 ce=0;ce<this.ranges.length;ce++){var Ce=this.ranges[ce],Pe=re.ranges[ce];if(!jn(Ce.anchor,Pe.anchor)||!jn(Ce.head,Pe.head))return!1}return!0},xl.prototype.deepCopy=function(){for(var re=[],ce=0;ce<this.ranges.length;ce++)re[ce]=new To(Ln(this.ranges[ce].anchor),Ln(this.ranges[ce].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,ce){ce||(ce=re);for(var Ce=0;Ce<this.ranges.length;Ce++){var Pe=this.ranges[Ce];if(Nn(ce,Pe.from())>=0&&Nn(re,Pe.to())<=0)return Ce}return-1};var To=function(re,ce){this.anchor=re,this.head=ce};To.prototype.from=function(){return Kn(this.anchor,this.head)},To.prototype.to=function(){return An(this.anchor,this.head)},To.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Dl(re,ce,Ce){var Pe=re&&re.options.selectionsMayTouch,Oe=ce[Ce];ce.sort(function(mn,dn){return Nn(mn.from(),dn.from())}),Ce=xt(ce,Oe);for(var $e=1;$e<ce.length;$e++){var pt=ce[$e],Lt=ce[$e-1],kt=Nn(Lt.to(),pt.from());if(Pe&&!pt.empty()?kt>0:kt>=0){var Rt=Kn(Lt.from(),pt.from()),nn=An(Lt.to(),pt.to()),_t=Lt.empty()?pt.from()==pt.head:Lt.from()==Lt.head;$e<=Ce&&--Ce,ce.splice(--$e,2,new To(_t?nn:Rt,_t?Rt:nn))}}return new xl(ce,Ce)}function Ru(re,ce){return new xl([new To(re,ce||re)],0)}function hh(re){return re.text?tn(re.from.line+re.text.length-1,gt(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function Hh(re,ce){if(Nn(re,ce.from)<0)return re;if(Nn(re,ce.to)<=0)return hh(ce);var Ce=re.line+ce.text.length-(ce.to.line-ce.from.line)-1,Pe=re.ch;return re.line==ce.to.line&&(Pe+=hh(ce).ch-ce.to.ch),tn(Ce,Pe)}function hf(re,ce){for(var Ce=[],Pe=0;Pe<re.sel.ranges.length;Pe++){var Oe=re.sel.ranges[Pe];Ce.push(new To(Hh(Oe.anchor,ce),Hh(Oe.head,ce)))}return Dl(re.cm,Ce,re.sel.primIndex)}function Lc(re,ce,Ce){return re.line==ce.line?tn(Ce.line,re.ch-ce.ch+Ce.ch):tn(Ce.line+(re.line-ce.line),re.ch)}function cf(re,ce,Ce){for(var Pe=[],Oe=tn(re.first,0),$e=Oe,pt=0;pt<ce.length;pt++){var Lt=ce[pt],kt=Lc(Lt.from,Oe,$e),Rt=Lc(hh(Lt),Oe,$e);if(Oe=Lt.to,$e=Rt,Ce=="around"){var nn=re.sel.ranges[pt],_t=Nn(nn.head,nn.anchor)<0;Pe[pt]=new To(_t?Rt:kt,_t?kt:Rt)}else Pe[pt]=new To(kt,kt)}return new xl(Pe,re.sel.primIndex)}function qi(re){re.doc.mode=Qt(re.options,re.doc.modeOption),ff(re)}function ff(re){re.doc.iter(function(ce){ce.stateAfter&&(ce.stateAfter=null),ce.styles&&(ce.styles=null)}),re.doc.modeFrontier=re.doc.highlightFrontier=re.doc.first,Tc(re,100),re.state.modeGen++,re.curOp&&Do(re)}function up(re,ce){return ce.from.ch==0&&ce.to.ch==0&>(ce.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function nd(re,ce,Ce,Pe){function Oe(ui){return Ce?Ce[ui]:null}function $e(ui,Yr,vi){Ei(ui,Yr,vi,Pe),Ir(ui,"change",ui,ce)}function pt(ui,Yr){for(var vi=[],zi=ui;zi<Yr;++zi)vi.push(new Ti(Rt[zi],Oe(zi),Pe));return vi}var Lt=ce.from,kt=ce.to,Rt=ce.text,nn=Yn(re,Lt.line),_t=Yn(re,kt.line),mn=gt(Rt),dn=Oe(Rt.length-1),lr=kt.line-Lt.line;if(ce.full)re.insert(0,pt(0,Rt.length)),re.remove(Rt.length,re.size-Rt.length);else if(up(re,ce)){var dr=pt(0,Rt.length-1);$e(_t,_t.text,dn),lr&&re.remove(Lt.line,lr),dr.length&&re.insert(Lt.line,dr)}else if(nn==_t)if(Rt.length==1)$e(nn,nn.text.slice(0,Lt.ch)+mn+nn.text.slice(kt.ch),dn);else{var br=pt(1,Rt.length-1);br.push(new Ti(mn+nn.text.slice(kt.ch),dn,Pe)),$e(nn,nn.text.slice(0,Lt.ch)+Rt[0],Oe(0)),re.insert(Lt.line+1,br)}else if(Rt.length==1)$e(nn,nn.text.slice(0,Lt.ch)+Rt[0]+_t.text.slice(kt.ch),Oe(0)),re.remove(Lt.line+1,lr);else{$e(nn,nn.text.slice(0,Lt.ch)+Rt[0],Oe(0)),$e(_t,mn+_t.text.slice(kt.ch),dn);var Fr=pt(1,Rt.length-1);lr>1&&re.remove(Lt.line+1,lr-1),re.insert(Lt.line+1,Fr)}Ir(re,"change",re,ce)}function ql(re,ce,Ce){function Pe(Oe,$e,pt){if(Oe.linked)for(var Lt=0;Lt<Oe.linked.length;++Lt){var kt=Oe.linked[Lt];if(kt.doc!=$e){var Rt=pt&&kt.sharedHist;Ce&&!Rt||(ce(kt.doc,Rt),Pe(kt.doc,Oe,Rt))}}}Pe(re,null,!0)}function rd(re,ce){if(ce.cm)throw new Error("This document is already in use.");re.doc=ce,ce.cm=re,Si(re),qi(re),df(re),re.options.lineWrapping||Ur(re),re.options.mode=ce.modeOption,Do(re)}function df(re){(re.doc.direction=="rtl"?Xe:De)(re.display.lineDiv,"CodeMirror-rtl")}function e0(re){yo(re,function(){df(re),Do(re)})}function Mc(re){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=re||1}function id(re,ce){var Ce={from:Ln(ce.from),to:hh(ce),text:Hn(re,ce.from,ce.to)};return ch(re,Ce,ce.from.line,ce.to.line+1),ql(re,function(Pe){return ch(Pe,Ce,ce.from.line,ce.to.line+1)},!0),Ce}function Nc(re){for(;re.length;){var ce=gt(re);if(ce.ranges)re.pop();else break}}function pf(re,ce){if(ce)return Nc(re.done),gt(re.done);if(re.done.length&&!gt(re.done).ranges)return gt(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),gt(re.done)}function gf(re,ce,Ce,Pe){var Oe=re.history;Oe.undone.length=0;var $e=+new Date,pt,Lt;if((Oe.lastOp==Pe||Oe.lastOrigin==ce.origin&&ce.origin&&(ce.origin.charAt(0)=="+"&&Oe.lastModTime>$e-(re.cm?re.cm.options.historyEventDelay:500)||ce.origin.charAt(0)=="*"))&&(pt=pf(Oe,Oe.lastOp==Pe)))Lt=gt(pt.changes),Nn(ce.from,ce.to)==0&&Nn(ce.from,Lt.to)==0?Lt.to=hh(ce):pt.changes.push(id(re,ce));else{var kt=gt(Oe.done);for((!kt||!kt.ranges)&&Ac(re.sel,Oe.done),pt={changes:[id(re,ce)],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=$e,Oe.lastOp=Oe.lastSelOp=Pe,Oe.lastOrigin=Oe.lastSelOrigin=ce.origin,Lt||rn(re,"historyAdded")}function hp(re,ce,Ce,Pe){var Oe=ce.charAt(0);return Oe=="*"||Oe=="+"&&Ce.ranges.length==Pe.ranges.length&&Ce.somethingSelected()==Pe.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function mf(re,ce,Ce,Pe){var Oe=re.history,$e=Pe&&Pe.origin;Ce==Oe.lastSelOp||$e&&Oe.lastSelOrigin==$e&&(Oe.lastModTime==Oe.lastSelTime&&Oe.lastOrigin==$e||hp(re,$e,gt(Oe.done),ce))?Oe.done[Oe.done.length-1]=ce:Ac(ce,Oe.done),Oe.lastSelTime=+new Date,Oe.lastSelOrigin=$e,Oe.lastSelOp=Ce,Pe&&Pe.clearRedo!==!1&&Nc(Oe.undone)}function Ac(re,ce){var Ce=gt(ce);Ce&&Ce.ranges&&Ce.equals(re)||ce.push(re)}function ch(re,ce,Ce,Pe){var Oe=ce["spans_"+re.id],$e=0;re.iter(Math.max(re.first,Ce),Math.min(re.first+re.size,Pe),function(pt){pt.markedSpans&&((Oe||(Oe=ce["spans_"+re.id]={}))[$e]=pt.markedSpans),++$e})}function Es(re){if(!re)return null;for(var ce,Ce=0;Ce<re.length;++Ce)re[Ce].marker.explicitlyCleared?ce||(ce=re.slice(0,Ce)):ce&&ce.push(re[Ce]);return ce?ce.length?ce:null:re}function pu(re,ce){var Ce=ce["spans_"+re.id];if(!Ce)return null;for(var Pe=[],Oe=0;Oe<ce.text.length;++Oe)Pe.push(Es(Ce[Oe]));return Pe}function od(re,ce){var Ce=pu(re,ce),Pe=Ui(re,ce);if(!Ce)return Pe;if(!Pe)return Ce;for(var Oe=0;Oe<Ce.length;++Oe){var $e=Ce[Oe],pt=Pe[Oe];if($e&&pt)e:for(var Lt=0;Lt<pt.length;++Lt){for(var kt=pt[Lt],Rt=0;Rt<$e.length;++Rt)if($e[Rt].marker==kt.marker)continue e;$e.push(kt)}else pt&&(Ce[Oe]=pt)}return Ce}function Iu(re,ce,Ce){for(var Pe=[],Oe=0;Oe<re.length;++Oe){var $e=re[Oe];if($e.ranges){Pe.push(Ce?xl.prototype.deepCopy.call($e):$e);continue}var pt=$e.changes,Lt=[];Pe.push({changes:Lt});for(var kt=0;kt<pt.length;++kt){var Rt=pt[kt],nn=void 0;if(Lt.push({from:Rt.from,to:Rt.to,text:Rt.text}),ce)for(var _t in Rt)(nn=_t.match(/^spans_(\d+)$/))&&xt(ce,Number(nn[1]))>-1&&(gt(Lt)[_t]=Rt[_t],delete Rt[_t])}}return Pe}function ad(re,ce,Ce,Pe){if(Pe){var Oe=re.anchor;if(Ce){var $e=Nn(ce,Oe)<0;$e!=Nn(Ce,Oe)<0?(Oe=ce,ce=Ce):$e!=Nn(ce,Ce)<0&&(ce=Ce)}return new To(Oe,ce)}else return new To(Ce||ce,ce)}function sd(re,ce,Ce,Pe,Oe){Oe==null&&(Oe=re.cm&&(re.cm.display.shift||re.extend)),gs(re,new xl([ad(re.sel.primary(),ce,Ce,Oe)],0),Pe)}function Gg(re,ce,Ce){for(var Pe=[],Oe=re.cm&&(re.cm.display.shift||re.extend),$e=0;$e<re.sel.ranges.length;$e++)Pe[$e]=ad(re.sel.ranges[$e],ce[$e],null,Oe);var pt=Dl(re.cm,Pe,re.sel.primIndex);gs(re,pt,Ce)}function fh(re,ce,Ce,Pe){var Oe=re.sel.ranges.slice(0);Oe[ce]=Ce,gs(re,Dl(re.cm,Oe,re.sel.primIndex),Pe)}function Wh(re,ce,Ce,Pe){gs(re,Ru(ce,Ce),Pe)}function Ug(re,ce,Ce){var Pe={ranges:ce.ranges,update:function(Oe){this.ranges=[];for(var $e=0;$e<Oe.length;$e++)this.ranges[$e]=new To(er(re,Oe[$e].anchor),er(re,Oe[$e].head))},origin:Ce&&Ce.origin};return rn(re,"beforeSelectionChange",re,Pe),re.cm&&rn(re.cm,"beforeSelectionChange",re.cm,Pe),Pe.ranges!=ce.ranges?Dl(re.cm,Pe.ranges,Pe.ranges.length-1):ce}function ld(re,ce,Ce){var Pe=re.history.done,Oe=gt(Pe);Oe&&Oe.ranges?(Pe[Pe.length-1]=ce,Kh(re,ce,Ce)):gs(re,ce,Ce)}function gs(re,ce,Ce){Kh(re,ce,Ce),mf(re,re.sel,re.cm?re.cm.curOp.id:NaN,Ce)}function Kh(re,ce,Ce){(vn(re,"beforeSelectionChange")||re.cm&&vn(re.cm,"beforeSelectionChange"))&&(ce=Ug(re,ce,Ce));var Pe=Ce&&Ce.bias||(Nn(ce.primary().head,re.sel.primary().head)<0?-1:1);cp(re,yf(re,ce,Pe,!0)),!(Ce&&Ce.scroll===!1)&&re.cm&&Ol(re.cm)}function cp(re,ce){ce.equals(re.sel)||(re.sel=ce,re.cm&&(re.cm.curOp.updateInput=1,re.cm.curOp.selectionChanged=!0,Sn(re.cm)),Ir(re,"cursorActivity",re))}function vf(re){cp(re,yf(re,re.sel,null,!1))}function yf(re,ce,Ce,Pe){for(var Oe,$e=0;$e<ce.ranges.length;$e++){var pt=ce.ranges[$e],Lt=ce.ranges.length==re.sel.ranges.length&&re.sel.ranges[$e],kt=Sf(re,pt.anchor,Lt&&Lt.anchor,Ce,Pe),Rt=Sf(re,pt.head,Lt&&Lt.head,Ce,Pe);(Oe||kt!=pt.anchor||Rt!=pt.head)&&(Oe||(Oe=ce.ranges.slice(0,$e)),Oe[$e]=new To(kt,Rt))}return Oe?Dl(re.cm,Oe,ce.primIndex):ce}function _u(re,ce,Ce,Pe,Oe){var $e=Yn(re,ce.line);if($e.markedSpans)for(var pt=0;pt<$e.markedSpans.length;++pt){var Lt=$e.markedSpans[pt],kt=Lt.marker,Rt="selectLeft"in kt?!kt.selectLeft:kt.inclusiveLeft,nn="selectRight"in kt?!kt.selectRight:kt.inclusiveRight;if((Lt.from==null||(Rt?Lt.from<=ce.ch:Lt.from<ce.ch))&&(Lt.to==null||(nn?Lt.to>=ce.ch:Lt.to>ce.ch))){if(Oe&&(rn(kt,"beforeCursorEnter"),kt.explicitlyCleared))if($e.markedSpans){--pt;continue}else break;if(!kt.atomic)continue;if(Ce){var _t=kt.find(Pe<0?1:-1),mn=void 0;if((Pe<0?nn:Rt)&&(_t=fp(re,_t,-Pe,_t&&_t.line==ce.line?$e:null)),_t&&_t.line==ce.line&&(mn=Nn(_t,Ce))&&(Pe<0?mn<0:mn>0))return _u(re,_t,ce,Pe,Oe)}var dn=kt.find(Pe<0?-1:1);return(Pe<0?Rt:nn)&&(dn=fp(re,dn,Pe,dn.line==ce.line?$e:null)),dn?_u(re,dn,ce,Pe,Oe):null}}return ce}function Sf(re,ce,Ce,Pe,Oe){var $e=Pe||1,pt=_u(re,ce,Ce,$e,Oe)||!Oe&&_u(re,ce,Ce,$e,!0)||_u(re,ce,Ce,-$e,Oe)||!Oe&&_u(re,ce,Ce,-$e,!0);return pt||(re.cantEdit=!0,tn(re.first,0))}function fp(re,ce,Ce,Pe){return Ce<0&&ce.ch==0?ce.line>re.first?er(re,tn(ce.line-1)):null:Ce>0&&ce.ch==(Pe||Yn(re,ce.line)).text.length?ce.line<re.first+re.size-1?tn(ce.line+1,0):null:new tn(ce.line,ce.ch+Ce)}function ya(re){re.setSelection(tn(re.firstLine(),0),tn(re.lastLine()),ht)}function xf(re,ce,Ce){var Pe={canceled:!1,from:ce.from,to:ce.to,text:ce.text,origin:ce.origin,cancel:function(){return Pe.canceled=!0}};return Ce&&(Pe.update=function(Oe,$e,pt,Lt){Oe&&(Pe.from=er(re,Oe)),$e&&(Pe.to=er(re,$e)),pt&&(Pe.text=pt),Lt!==void 0&&(Pe.origin=Lt)}),rn(re,"beforeChange",re,Pe),re.cm&&rn(re.cm,"beforeChange",re.cm,Pe),Pe.canceled?(re.cm&&(re.cm.curOp.updateInput=2),null):{from:Pe.from,to:Pe.to,text:Pe.text,origin:Pe.origin}}function dh(re,ce,Ce){if(re.cm){if(!re.cm.curOp)return Da(re.cm,dh)(re,ce,Ce);if(re.cm.state.suppressEdits)return}if(!((vn(re,"beforeChange")||re.cm&&vn(re.cm,"beforeChange"))&&(ce=xf(re,ce,!0),!ce))){var Pe=cr&&!Ce&&fn(re,ce.from,ce.to);if(Pe)for(var Oe=Pe.length-1;Oe>=0;--Oe)Vh(re,{from:Pe[Oe].from,to:Pe[Oe].to,text:Oe?[""]:ce.text,origin:ce.origin});else Vh(re,ce)}}function Vh(re,ce){if(!(ce.text.length==1&&ce.text[0]==""&&Nn(ce.from,ce.to)==0)){var Ce=hf(re,ce);gf(re,ce,Ce,re.cm?re.cm.curOp.id:NaN),jc(re,ce,Ce,Ui(re,ce));var Pe=[];ql(re,function(Oe,$e){!$e&&xt(Pe,Oe.history)==-1&&(pp(Oe.history,ce),Pe.push(Oe.history)),jc(Oe,ce,null,Ui(Oe,ce))})}}function wf(re,ce,Ce){var Pe=re.cm&&re.cm.state.suppressEdits;if(!(Pe&&!Ce)){for(var Oe=re.history,$e,pt=re.sel,Lt=ce=="undo"?Oe.done:Oe.undone,kt=ce=="undo"?Oe.undone:Oe.done,Rt=0;Rt<Lt.length&&($e=Lt[Rt],!(Ce?$e.ranges&&!$e.equals(re.sel):!$e.ranges));Rt++);if(Rt!=Lt.length){for(Oe.lastOrigin=Oe.lastSelOrigin=null;;)if($e=Lt.pop(),$e.ranges){if(Ac($e,kt),Ce&&!$e.equals(re.sel)){gs(re,$e,{clearRedo:!1});return}pt=$e}else if(Pe){Lt.push($e);return}else break;var nn=[];Ac(pt,kt),kt.push({changes:nn,generation:Oe.generation}),Oe.generation=$e.generation||++Oe.maxGeneration;for(var _t=vn(re,"beforeChange")||re.cm&&vn(re.cm,"beforeChange"),mn=function(dr){var br=$e.changes[dr];if(br.origin=ce,_t&&!xf(re,br,!1))return Lt.length=0,{};nn.push(id(re,br));var Fr=dr?hf(re,br):gt(Lt);jc(re,br,Fr,od(re,br)),!dr&&re.cm&&re.cm.scrollIntoView({from:br.from,to:hh(br)});var ui=[];ql(re,function(Yr,vi){!vi&&xt(ui,Yr.history)==-1&&(pp(Yr.history,br),ui.push(Yr.history)),jc(Yr,br,null,od(Yr,br))})},dn=$e.changes.length-1;dn>=0;--dn){var lr=mn(dn);if(lr)return lr.v}}}}function dp(re,ce){if(ce!=0&&(re.first+=ce,re.sel=new xl(yt(re.sel.ranges,function(Oe){return new To(tn(Oe.anchor.line+ce,Oe.anchor.ch),tn(Oe.head.line+ce,Oe.head.ch))}),re.sel.primIndex),re.cm)){Do(re.cm,re.first,re.first-ce,ce);for(var Ce=re.cm.display,Pe=Ce.viewFrom;Pe<Ce.viewTo;Pe++)Wi(re.cm,Pe,"gutter")}}function jc(re,ce,Ce,Pe){if(re.cm&&!re.cm.curOp)return Da(re.cm,jc)(re,ce,Ce,Pe);if(ce.to.line<re.first){dp(re,ce.text.length-1-(ce.to.line-ce.from.line));return}if(!(ce.from.line>re.lastLine())){if(ce.from.line<re.first){var Oe=ce.text.length-1-(re.first-ce.from.line);dp(re,Oe),ce={from:tn(re.first,0),to:tn(ce.to.line+Oe,ce.to.ch),text:[gt(ce.text)],origin:ce.origin}}var $e=re.lastLine();ce.to.line>$e&&(ce={from:ce.from,to:tn($e,Yn(re,$e).text.length),text:[ce.text[0]],origin:ce.origin}),ce.removed=Hn(re,ce.from,ce.to),Ce||(Ce=hf(re,ce)),re.cm?Hg(re.cm,ce,Pe):nd(re,ce,Pe),Kh(re,Ce,ht),re.cantEdit&&Sf(re,tn(re.firstLine(),0))&&(re.cantEdit=!1)}}function Hg(re,ce,Ce){var Pe=re.doc,Oe=re.display,$e=ce.from,pt=ce.to,Lt=!1,kt=$e.line;re.options.lineWrapping||(kt=Mt(kn(Yn(Pe,$e.line))),Pe.iter(kt,pt.line+1,function(dn){if(dn==Oe.maxLine)return Lt=!0,!0})),Pe.sel.contains(ce.from,ce.to)>-1&&Sn(re),nd(Pe,ce,Ce,Fo(re)),re.options.lineWrapping||(Pe.iter(kt,$e.line+ce.text.length,function(dn){var lr=si(dn);lr>Oe.maxLineLength&&(Oe.maxLine=dn,Oe.maxLineLength=lr,Oe.maxLineChanged=!0,Lt=!1)}),Lt&&(re.curOp.updateMaxLine=!0)),oi(Pe,$e.line),Tc(re,400);var Rt=ce.text.length-(pt.line-$e.line)-1;ce.full?Do(re):$e.line==pt.line&&ce.text.length==1&&!up(re.doc,ce)?Wi(re,$e.line,"text"):Do(re,$e.line,pt.line+1,Rt);var nn=vn(re,"changes"),_t=vn(re,"change");if(_t||nn){var mn={from:$e,to:pt,text:ce.text,removed:ce.removed,origin:ce.origin};_t&&Ir(re,"change",re,mn),nn&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(mn)}re.display.selForContextMenu=null}function Zh(re,ce,Ce,Pe,Oe){var $e;Pe||(Pe=Ce),Nn(Pe,Ce)<0&&($e=[Pe,Ce],Ce=$e[0],Pe=$e[1]),typeof ce=="string"&&(ce=re.splitLines(ce)),dh(re,{from:Ce,to:Pe,text:ce,origin:Oe})}function wl(re,ce,Ce,Pe){Ce<re.line?re.line+=Pe:ce<re.line&&(re.line=ce,re.ch=0)}function Wg(re,ce,Ce,Pe){for(var Oe=0;Oe<re.length;++Oe){var $e=re[Oe],pt=!0;if($e.ranges){$e.copied||($e=re[Oe]=$e.deepCopy(),$e.copied=!0);for(var Lt=0;Lt<$e.ranges.length;Lt++)wl($e.ranges[Lt].anchor,ce,Ce,Pe),wl($e.ranges[Lt].head,ce,Ce,Pe);continue}for(var kt=0;kt<$e.changes.length;++kt){var Rt=$e.changes[kt];if(Ce<Rt.from.line)Rt.from=tn(Rt.from.line+Pe,Rt.from.ch),Rt.to=tn(Rt.to.line+Pe,Rt.to.ch);else if(ce<=Rt.to.line){pt=!1;break}}pt||(re.splice(0,Oe+1),Oe=0)}}function pp(re,ce){var Ce=ce.from.line,Pe=ce.to.line,Oe=ce.text.length-(Pe-Ce)-1;Wg(re.done,Ce,Pe,Oe),Wg(re.undone,Ce,Pe,Oe)}function Xh(re,ce,Ce,Pe){var Oe=ce,$e=ce;return typeof ce=="number"?$e=Yn(re,Jn(re,ce)):Oe=Mt(ce),Oe==null?null:(Pe($e,Oe)&&re.cm&&Wi(re.cm,Oe,Ce),$e)}function Oc(re){this.lines=re,this.parent=null;for(var ce=0,Ce=0;Ce<re.length;++Ce)re[Ce].parent=this,ce+=re[Ce].height;this.height=ce}Oc.prototype={chunkSize:function(){return this.lines.length},removeInner:function(re,ce){for(var Ce=re,Pe=re+ce;Ce<Pe;++Ce){var Oe=this.lines[Ce];this.height-=Oe.height,bi(Oe),Ir(Oe,"delete")}this.lines.splice(re,ce)},collapse:function(re){re.push.apply(re,this.lines)},insertInner:function(re,ce,Ce){this.height+=Ce,this.lines=this.lines.slice(0,re).concat(ce).concat(this.lines.slice(re));for(var Pe=0;Pe<ce.length;++Pe)ce[Pe].parent=this},iterN:function(re,ce,Ce){for(var Pe=re+ce;re<Pe;++re)if(Ce(this.lines[re]))return!0}};function ra(re){this.children=re;for(var ce=0,Ce=0,Pe=0;Pe<re.length;++Pe){var Oe=re[Pe];ce+=Oe.chunkSize(),Ce+=Oe.height,Oe.parent=this}this.size=ce,this.height=Ce,this.parent=null}ra.prototype={chunkSize:function(){return this.size},removeInner:function(re,ce){this.size-=ce;for(var Ce=0;Ce<this.children.length;++Ce){var Pe=this.children[Ce],Oe=Pe.chunkSize();if(re<Oe){var $e=Math.min(ce,Oe-re),pt=Pe.height;if(Pe.removeInner(re,$e),this.height-=pt-Pe.height,Oe==$e&&(this.children.splice(Ce--,1),Pe.parent=null),(ce-=$e)==0)break;re=0}else re-=Oe}if(this.size-ce<25&&(this.children.length>1||!(this.children[0]instanceof Oc))){var Lt=[];this.collapse(Lt),this.children=[new Oc(Lt)],this.children[0].parent=this}},collapse:function(re){for(var ce=0;ce<this.children.length;++ce)this.children[ce].collapse(re)},insertInner:function(re,ce,Ce){this.size+=ce.length,this.height+=Ce;for(var Pe=0;Pe<this.children.length;++Pe){var Oe=this.children[Pe],$e=Oe.chunkSize();if(re<=$e){if(Oe.insertInner(re,ce,Ce),Oe.lines&&Oe.lines.length>50){for(var pt=Oe.lines.length%25+25,Lt=pt;Lt<Oe.lines.length;){var kt=new Oc(Oe.lines.slice(Lt,Lt+=25));Oe.height-=kt.height,this.children.splice(++Pe,0,kt),kt.parent=this}Oe.lines=Oe.lines.slice(0,pt),this.maybeSpill()}break}re-=$e}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var ce=re.children.splice(re.children.length-5,5),Ce=new ra(ce);if(re.parent){re.size-=Ce.size,re.height-=Ce.height;var Oe=xt(re.parent.children,re);re.parent.children.splice(Oe+1,0,Ce)}else{var Pe=new ra(re.children);Pe.parent=re,re.children=[Pe,Ce],re=Pe}Ce.parent=re.parent}while(re.children.length>10);re.parent.maybeSpill()}},iterN:function(re,ce,Ce){for(var Pe=0;Pe<this.children.length;++Pe){var Oe=this.children[Pe],$e=Oe.chunkSize();if(re<$e){var pt=Math.min(ce,$e-re);if(Oe.iterN(re,pt,Ce))return!0;if((ce-=pt)==0)break;re=0}else re-=$e}}};var zu=function(re,ce,Ce){if(Ce)for(var Pe in Ce)Ce.hasOwnProperty(Pe)&&(this[Pe]=Ce[Pe]);this.doc=re,this.node=ce};zu.prototype.clear=function(){var re=this.doc.cm,ce=this.line.widgets,Ce=this.line,Pe=Mt(Ce);if(!(Pe==null||!ce)){for(var Oe=0;Oe<ce.length;++Oe)ce[Oe]==this&&ce.splice(Oe--,1);ce.length||(Ce.widgets=null);var $e=zo(this);$r(Ce,Math.max(0,Ce.height-$e)),re&&(yo(re,function(){Kg(re,Ce,-$e),Wi(re,Pe,"widget")}),Ir(re,"lineWidgetCleared",re,this,Pe))}},zu.prototype.changed=function(){var re=this,ce=this.height,Ce=this.doc.cm,Pe=this.line;this.height=null;var Oe=zo(this)-ce;Oe&&(cn(this.doc,Pe)||$r(Pe,Pe.height+Oe),Ce&&yo(Ce,function(){Ce.curOp.forceUpdate=!0,Kg(Ce,Pe,Oe),Ir(Ce,"lineWidgetChanged",Ce,re,Mt(Pe))}))},Cn(zu);function Kg(re,ce,Ce){Nr(ce)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&_h(re,Ce)}function ud(re,ce,Ce,Pe){var Oe=new zu(re,Ce,Pe),$e=re.cm;return $e&&Oe.noHScroll&&($e.display.alignWidgets=!0),Xh(re,ce,"widget",function(pt){var Lt=pt.widgets||(pt.widgets=[]);if(Oe.insertAt==null?Lt.push(Oe):Lt.splice(Math.min(Lt.length-1,Math.max(0,Oe.insertAt)),0,Oe),Oe.line=pt,$e&&!cn(re,pt)){var kt=Nr(pt)<re.scrollTop;$r(pt,pt.height+zo(Oe)),kt&&_h($e,Oe.height),$e.curOp.forceUpdate=!0}return!0}),$e&&Ir($e,"lineWidgetAdded",$e,Oe,typeof ce=="number"?ce:Mt(ce)),Oe}var Vg=0,Jt=function(re,ce){this.lines=[],this.type=ce,this.doc=re,this.id=++Vg};Jt.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,ce=re&&!re.curOp;if(ce&&sl(re),vn(this,"clear")){var Ce=this.find();Ce&&Ir(this,"clear",Ce.from,Ce.to)}for(var Pe=null,Oe=null,$e=0;$e<this.lines.length;++$e){var pt=this.lines[$e],Lt=Vr(pt.markedSpans,this);re&&!this.collapsed?Wi(re,Mt(pt),"text"):re&&(Lt.to!=null&&(Oe=Mt(pt)),Lt.from!=null&&(Pe=Mt(pt))),pt.markedSpans=ti(pt.markedSpans,Lt),Lt.from==null&&this.collapsed&&!cn(this.doc,pt)&&re&&$r(pt,ba(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var kt=0;kt<this.lines.length;++kt){var Rt=kn(this.lines[kt]),nn=si(Rt);nn>re.display.maxLineLength&&(re.display.maxLine=Rt,re.display.maxLineLength=nn,re.display.maxLineChanged=!0)}Pe!=null&&re&&this.collapsed&&Do(re,Pe,Oe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&vf(re.doc)),re&&Ir(re,"markerCleared",re,this,Pe,Oe),ce&&Fl(re),this.parent&&this.parent.clear()}},Jt.prototype.find=function(re,ce){re==null&&this.type=="bookmark"&&(re=1);for(var Ce,Pe,Oe=0;Oe<this.lines.length;++Oe){var $e=this.lines[Oe],pt=Vr($e.markedSpans,this);if(pt.from!=null&&(Ce=tn(ce?$e:Mt($e),pt.from),re==-1))return Ce;if(pt.to!=null&&(Pe=tn(ce?$e:Mt($e),pt.to),re==1))return Pe}return Ce&&{from:Ce,to:Pe}},Jt.prototype.changed=function(){var re=this,ce=this.find(-1,!0),Ce=this,Pe=this.doc.cm;!ce||!Pe||yo(Pe,function(){var Oe=ce.line,$e=Mt(ce.line),pt=il(Pe,$e);if(pt&&(rh(pt),Pe.curOp.selectionChanged=Pe.curOp.forceUpdate=!0),Pe.curOp.updateMaxLine=!0,!cn(Ce.doc,Oe)&&Ce.height!=null){var Lt=Ce.height;Ce.height=null;var kt=zo(Ce)-Lt;kt&&$r(Oe,Oe.height+kt)}Ir(Pe,"markerChanged",Pe,re)})},Jt.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(!ce.maybeHiddenMarkers||xt(ce.maybeHiddenMarkers,this)==-1)&&(ce.maybeUnhiddenMarkers||(ce.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},Jt.prototype.detachLine=function(re){if(this.lines.splice(xt(this.lines,re),1),!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(ce.maybeHiddenMarkers||(ce.maybeHiddenMarkers=[])).push(this)}},Cn(Jt);function Yh(re,ce,Ce,Pe,Oe){if(Pe&&Pe.shared)return Zg(re,ce,Ce,Pe,Oe);if(re.cm&&!re.cm.curOp)return Da(re.cm,Yh)(re,ce,Ce,Pe,Oe);var $e=new Jt(re,Oe),pt=Nn(ce,Ce);if(Pe&&Ct(Pe,$e,!1),pt>0||pt==0&&$e.clearWhenEmpty!==!1)return $e;if($e.replacedWith&&($e.collapsed=!0,$e.widgetNode=Be("span",[$e.replacedWith],"CodeMirror-widget"),Pe.handleMouseEvents||$e.widgetNode.setAttribute("cm-ignore-events","true"),Pe.insertLeft&&($e.widgetNode.insertLeft=!0)),$e.collapsed){if(Vn(re,ce.line,ce,Ce,$e)||ce.line!=Ce.line&&Vn(re,Ce.line,ce,Ce,$e))throw new Error("Inserting collapsed marker partially overlapping an existing one");an()}$e.addToHistory&&gf(re,{from:ce,to:Ce,origin:"markText"},re.sel,NaN);var Lt=ce.line,kt=re.cm,Rt;if(re.iter(Lt,Ce.line+1,function(_t){kt&&$e.collapsed&&!kt.options.lineWrapping&&kn(_t)==kt.display.maxLine&&(Rt=!0),$e.collapsed&&Lt!=ce.line&&$r(_t,0),Ni(_t,new gr($e,Lt==ce.line?ce.ch:null,Lt==Ce.line?Ce.ch:null)),++Lt}),$e.collapsed&&re.iter(ce.line,Ce.line+1,function(_t){cn(re,_t)&&$r(_t,0)}),$e.clearOnEnter&&Vt($e,"beforeCursorEnter",function(){return $e.clear()}),$e.readOnly&&(or(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),$e.collapsed&&($e.id=++Vg,$e.atomic=!0),kt){if(Rt&&(kt.curOp.updateMaxLine=!0),$e.collapsed)Do(kt,ce.line,Ce.line+1);else if($e.className||$e.startStyle||$e.endStyle||$e.css||$e.attributes||$e.title)for(var nn=ce.line;nn<=Ce.line;nn++)Wi(kt,nn,"text");$e.atomic&&vf(kt.doc),Ir(kt,"markerAdded",kt,$e)}return $e}var gu=function(re,ce){this.markers=re,this.primary=ce;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();Ir(this,"clear")}},gu.prototype.find=function(re,ce){return this.primary.find(re,ce)},Cn(gu);function Zg(re,ce,Ce,Pe,Oe){Pe=Ct(Pe),Pe.shared=!1;var $e=[Yh(re,ce,Ce,Pe,Oe)],pt=$e[0],Lt=Pe.widgetNode;return ql(re,function(kt){Lt&&(Pe.widgetNode=Lt.cloneNode(!0)),$e.push(Yh(kt,er(kt,ce),er(kt,Ce),Pe,Oe));for(var Rt=0;Rt<kt.linked.length;++Rt)if(kt.linked[Rt].isParent)return;pt=gt($e)}),new gu($e,pt)}function gp(re){return re.findMarks(tn(re.first,0),re.clipPos(tn(re.lastLine())),function(ce){return ce.parent})}function Xg(re,ce){for(var Ce=0;Ce<ce.length;Ce++){var Pe=ce[Ce],Oe=Pe.find(),$e=re.clipPos(Oe.from),pt=re.clipPos(Oe.to);if(Nn($e,pt)){var Lt=Yh(re,$e,pt,Pe.primary,Pe.primary.type);Pe.markers.push(Lt),Lt.parent=Pe}}}function mp(re){for(var ce=function(Pe){var Oe=re[Pe],$e=[Oe.primary.doc];ql(Oe.primary.doc,function(kt){return $e.push(kt)});for(var pt=0;pt<Oe.markers.length;pt++){var Lt=Oe.markers[pt];xt($e,Lt.doc)==-1&&(Lt.parent=null,Oe.markers.splice(pt--,1))}},Ce=0;Ce<re.length;Ce++)ce(Ce)}var t0=0,os=function(re,ce,Ce,Pe,Oe){if(!(this instanceof os))return new os(re,ce,Ce,Pe,Oe);Ce==null&&(Ce=0),ra.call(this,[new Oc([new Ti("",null)])]),this.first=Ce,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Ce;var $e=tn(Ce,0);this.sel=Ru($e),this.history=new Mc(null),this.id=++t0,this.modeOption=ce,this.lineSep=Pe,this.direction=Oe=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),nd(this,{from:$e,to:$e,text:re}),gs(this,Ru($e),ht)};os.prototype=we(ra.prototype,{constructor:os,iter:function(re,ce,Ce){Ce?this.iterN(re-this.first,ce-re,Ce):this.iterN(this.first,this.first+this.size,re)},insert:function(re,ce){for(var Ce=0,Pe=0;Pe<ce.length;++Pe)Ce+=ce[Pe].height;this.insertInner(re-this.first,ce,Ce)},remove:function(re,ce){this.removeInner(re-this.first,ce)},getValue:function(re){var ce=Qr(this,this.first,this.first+this.size);return re===!1?ce:ce.join(re||this.lineSeparator())},setValue:Wa(function(re){var ce=tn(this.first,0),Ce=this.first+this.size-1;dh(this,{from:ce,to:tn(Ce,Yn(this,Ce).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&Bu(this.cm,0,0),gs(this,Ru(ce),ht)}),replaceRange:function(re,ce,Ce,Pe){ce=er(this,ce),Ce=Ce?er(this,Ce):ce,Zh(this,re,ce,Ce,Pe)},getRange:function(re,ce,Ce){var Pe=Hn(this,er(this,re),er(this,ce));return Ce===!1?Pe:Pe.join(Ce||this.lineSeparator())},getLine:function(re){var ce=this.getLineHandle(re);return ce&&ce.text},getLineHandle:function(re){if(Fn(this,re))return Yn(this,re)},getLineNumber:function(re){return Mt(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=Yn(this,re)),kn(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return er(this,re)},getCursor:function(re){var ce=this.sel.primary(),Ce;return re==null||re=="head"?Ce=ce.head:re=="anchor"?Ce=ce.anchor:re=="end"||re=="to"||re===!1?Ce=ce.to():Ce=ce.from(),Ce},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Wa(function(re,ce,Ce){Wh(this,er(this,typeof re=="number"?tn(re,ce||0):re),null,Ce)}),setSelection:Wa(function(re,ce,Ce){Wh(this,er(this,re),er(this,ce||re),Ce)}),extendSelection:Wa(function(re,ce,Ce){sd(this,er(this,re),ce&&er(this,ce),Ce)}),extendSelections:Wa(function(re,ce){Gg(this,Cr(this,re),ce)}),extendSelectionsBy:Wa(function(re,ce){var Ce=yt(this.sel.ranges,re);Gg(this,Cr(this,Ce),ce)}),setSelections:Wa(function(re,ce,Ce){if(re.length){for(var Pe=[],Oe=0;Oe<re.length;Oe++)Pe[Oe]=new To(er(this,re[Oe].anchor),er(this,re[Oe].head));ce==null&&(ce=Math.min(re.length-1,this.sel.primIndex)),gs(this,Dl(this.cm,Pe,ce),Ce)}}),addSelection:Wa(function(re,ce,Ce){var Pe=this.sel.ranges.slice(0);Pe.push(new To(er(this,re),er(this,ce||re))),gs(this,Dl(this.cm,Pe,Pe.length-1),Ce)}),getSelection:function(re){for(var ce=this.sel.ranges,Ce,Pe=0;Pe<ce.length;Pe++){var Oe=Hn(this,ce[Pe].from(),ce[Pe].to());Ce=Ce?Ce.concat(Oe):Oe}return re===!1?Ce:Ce.join(re||this.lineSeparator())},getSelections:function(re){for(var ce=[],Ce=this.sel.ranges,Pe=0;Pe<Ce.length;Pe++){var Oe=Hn(this,Ce[Pe].from(),Ce[Pe].to());re!==!1&&(Oe=Oe.join(re||this.lineSeparator())),ce[Pe]=Oe}return ce},replaceSelection:function(re,ce,Ce){for(var Pe=[],Oe=0;Oe<this.sel.ranges.length;Oe++)Pe[Oe]=re;this.replaceSelections(Pe,ce,Ce||"+input")},replaceSelections:Wa(function(re,ce,Ce){for(var Pe=[],Oe=this.sel,$e=0;$e<Oe.ranges.length;$e++){var pt=Oe.ranges[$e];Pe[$e]={from:pt.from(),to:pt.to(),text:this.splitLines(re[$e]),origin:Ce}}for(var Lt=ce&&ce!="end"&&cf(this,Pe,ce),kt=Pe.length-1;kt>=0;kt--)dh(this,Pe[kt]);Lt?ld(this,Lt):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,ce=0,Ce=0,Pe=0;Pe<re.done.length;Pe++)re.done[Pe].ranges||++ce;for(var Oe=0;Oe<re.undone.length;Oe++)re.undone[Oe].ranges||++Ce;return{undo:ce,redo:Ce}},clearHistory:function(){var re=this;this.history=new Mc(this.history.maxGeneration),ql(this,function(ce){return ce.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 ce=this.history=new Mc(this.history.maxGeneration);ce.done=Iu(re.done.slice(0),null,!0),ce.undone=Iu(re.undone.slice(0),null,!0)},setGutterMarker:Wa(function(re,ce,Ce){return Xh(this,re,"gutter",function(Pe){var Oe=Pe.gutterMarkers||(Pe.gutterMarkers={});return Oe[ce]=Ce,!Ce&&Re(Oe)&&(Pe.gutterMarkers=null),!0})}),clearGutter:Wa(function(re){var ce=this;this.iter(function(Ce){Ce.gutterMarkers&&Ce.gutterMarkers[re]&&Xh(ce,Ce,"gutter",function(){return Ce.gutterMarkers[re]=null,Re(Ce.gutterMarkers)&&(Ce.gutterMarkers=null),!0})})}),lineInfo:function(re){var ce;if(typeof re=="number"){if(!Fn(this,re)||(ce=re,re=Yn(this,re),!re))return null}else if(ce=Mt(re),ce==null)return null;return{line:ce,handle:re,text:re.text,gutterMarkers:re.gutterMarkers,textClass:re.textClass,bgClass:re.bgClass,wrapClass:re.wrapClass,widgets:re.widgets}},addLineClass:Wa(function(re,ce,Ce){return Xh(this,re,ce=="gutter"?"gutter":"class",function(Pe){var Oe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass";if(!Pe[Oe])Pe[Oe]=Ce;else{if(je(Ce).test(Pe[Oe]))return!1;Pe[Oe]+=" "+Ce}return!0})}),removeLineClass:Wa(function(re,ce,Ce){return Xh(this,re,ce=="gutter"?"gutter":"class",function(Pe){var Oe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass",$e=Pe[Oe];if($e)if(Ce==null)Pe[Oe]=null;else{var pt=$e.match(je(Ce));if(!pt)return!1;var Lt=pt.index+pt[0].length;Pe[Oe]=$e.slice(0,pt.index)+(!pt.index||Lt==$e.length?"":" ")+$e.slice(Lt)||null}else return!1;return!0})}),addLineWidget:Wa(function(re,ce,Ce){return ud(this,re,ce,Ce)}),removeLineWidget:function(re){re.clear()},markText:function(re,ce,Ce){return Yh(this,er(this,re),er(this,ce),Ce,Ce&&Ce.type||"range")},setBookmark:function(re,ce){var Ce={replacedWith:ce&&(ce.nodeType==null?ce.widget:ce),insertLeft:ce&&ce.insertLeft,clearWhenEmpty:!1,shared:ce&&ce.shared,handleMouseEvents:ce&&ce.handleMouseEvents};return re=er(this,re),Yh(this,re,re,Ce,"bookmark")},findMarksAt:function(re){re=er(this,re);var ce=[],Ce=Yn(this,re.line).markedSpans;if(Ce)for(var Pe=0;Pe<Ce.length;++Pe){var Oe=Ce[Pe];(Oe.from==null||Oe.from<=re.ch)&&(Oe.to==null||Oe.to>=re.ch)&&ce.push(Oe.marker.parent||Oe.marker)}return ce},findMarks:function(re,ce,Ce){re=er(this,re),ce=er(this,ce);var Pe=[],Oe=re.line;return this.iter(re.line,ce.line+1,function($e){var pt=$e.markedSpans;if(pt)for(var Lt=0;Lt<pt.length;Lt++){var kt=pt[Lt];!(kt.to!=null&&Oe==re.line&&re.ch>=kt.to||kt.from==null&&Oe!=re.line||kt.from!=null&&Oe==ce.line&&kt.from>=ce.ch)&&(!Ce||Ce(kt.marker))&&Pe.push(kt.marker.parent||kt.marker)}++Oe}),Pe},getAllMarks:function(){var re=[];return this.iter(function(ce){var Ce=ce.markedSpans;if(Ce)for(var Pe=0;Pe<Ce.length;++Pe)Ce[Pe].from!=null&&re.push(Ce[Pe].marker)}),re},posFromIndex:function(re){var ce,Ce=this.first,Pe=this.lineSeparator().length;return this.iter(function(Oe){var $e=Oe.text.length+Pe;if($e>re)return ce=re,!0;re-=$e,++Ce}),er(this,tn(Ce,ce))},indexFromPos:function(re){re=er(this,re);var ce=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(Pe){ce+=Pe.text.length+Ce}),ce},copy:function(re){var ce=new os(Qr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ce.scrollTop=this.scrollTop,ce.scrollLeft=this.scrollLeft,ce.sel=this.sel,ce.extend=!1,re&&(ce.history.undoDepth=this.history.undoDepth,ce.setHistory(this.getHistory())),ce},linkedDoc:function(re){re||(re={});var ce=this.first,Ce=this.first+this.size;re.from!=null&&re.from>ce&&(ce=re.from),re.to!=null&&re.to<Ce&&(Ce=re.to);var Pe=new os(Qr(this,ce,Ce),re.mode||this.modeOption,ce,this.lineSep,this.direction);return re.sharedHist&&(Pe.history=this.history),(this.linked||(this.linked=[])).push({doc:Pe,sharedHist:re.sharedHist}),Pe.linked=[{doc:this,isParent:!0,sharedHist:re.sharedHist}],Xg(Pe,gp(this)),Pe},unlinkDoc:function(re){if(re instanceof po&&(re=re.doc),this.linked)for(var ce=0;ce<this.linked.length;++ce){var Ce=this.linked[ce];if(Ce.doc==re){this.linked.splice(ce,1),re.unlinkDoc(this),mp(gp(this));break}}if(re.history==this.history){var Pe=[re.id];ql(re,function(Oe){return Pe.push(Oe.id)},!0),re.history=new Mc(null),re.history.done=Iu(this.history.done,Pe),re.history.undone=Iu(this.history.undone,Pe)}},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):Li(re)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Wa(function(re){re!="rtl"&&(re="ltr"),re!=this.direction&&(this.direction=re,this.iter(function(ce){return ce.order=null}),this.cm&&e0(this.cm))})}),os.prototype.eachLine=os.prototype.iter;var bf=0;function vp(re){var ce=this;if(Qg(ce),!(un(ce,re)||Oo(ce.display,re))){On(re),Ie&&(bf=+new Date);var Ce=Ua(ce,re,!0),Pe=re.dataTransfer.files;if(!(!Ce||ce.isReadOnly()))if(Pe&&Pe.length&&window.FileReader&&window.File)for(var Oe=Pe.length,$e=Array(Oe),pt=0,Lt=function(){++pt==Oe&&Da(ce,function(){Ce=er(ce.doc,Ce);var dn={from:Ce,to:Ce,text:ce.doc.splitLines($e.filter(function(lr){return lr!=null}).join(ce.doc.lineSeparator())),origin:"paste"};dh(ce.doc,dn),ld(ce.doc,Ru(er(ce.doc,Ce),er(ce.doc,hh(dn))))})()},kt=function(dn,lr){if(ce.options.allowDropFileTypes&&xt(ce.options.allowDropFileTypes,dn.type)==-1){Lt();return}var dr=new FileReader;dr.onerror=function(){return Lt()},dr.onload=function(){var br=dr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(br)){Lt();return}$e[lr]=br,Lt()},dr.readAsText(dn)},Rt=0;Rt<Pe.length;Rt++)kt(Pe[Rt],Rt);else{if(ce.state.draggingText&&ce.doc.sel.contains(Ce)>-1){ce.state.draggingText(re),setTimeout(function(){return ce.display.input.focus()},20);return}try{var nn=re.dataTransfer.getData("Text");if(nn){var _t;if(ce.state.draggingText&&!ce.state.draggingText.copy&&(_t=ce.listSelections()),Kh(ce.doc,Ru(Ce,Ce)),_t)for(var mn=0;mn<_t.length;++mn)Zh(ce.doc,"",_t[mn].anchor,_t[mn].head,"drag");ce.replaceSelection(nn,"around","paste"),ce.display.input.focus()}}catch(dn){}}}}function Yg(re,ce){if(Ie&&(!re.state.draggingText||+new Date-bf<100)){qr(ce);return}if(!(un(re,ce)||Oo(re.display,ce))&&(ce.dataTransfer.setData("Text",re.getSelection()),ce.dataTransfer.effectAllowed="copyMove",ce.dataTransfer.setDragImage&&!Ae)){var Ce=Me("img",null,null,"position: fixed; left: 0; top: 0;");Ce.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Se&&(Ce.width=Ce.height=1,re.display.wrapper.appendChild(Ce),Ce._top=Ce.offsetTop),ce.dataTransfer.setDragImage(Ce,0,0),Se&&Ce.parentNode.removeChild(Ce)}}function Jg(re,ce){var Ce=Ua(re,ce);if(Ce){var Pe=document.createDocumentFragment();ao(re,Ce,Pe),re.display.dragCursor||(re.display.dragCursor=Me("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),re.display.lineSpace.insertBefore(re.display.dragCursor,re.display.cursorDiv)),Te(re.display.dragCursor,Pe)}}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 ce=document.getElementsByClassName("CodeMirror"),Ce=[],Pe=0;Pe<ce.length;Pe++){var Oe=ce[Pe].CodeMirror;Oe&&Ce.push(Oe)}Ce.length&&Ce[0].operation(function(){for(var $e=0;$e<Ce.length;$e++)re(Ce[$e])})}}var yp=!1;function hl(){yp||(Fc(),yp=!0)}function Fc(){var re;Vt(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,$g(Sp)},100))}),Vt(window,"blur",function(){return $g(Du)})}function Sp(re){var ce=re.display;ce.cachedCharWidth=ce.cachedTextHeight=ce.cachedPaddingH=null,ce.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 Vs={};Vs.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"},Vs.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"},Vs.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"},Vs.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"]},Vs.default=se?Vs.macDefault:Vs.pcDefault;function xp(re){var ce=re.split(/-(?!$)/);re=ce[ce.length-1];for(var Ce,Pe,Oe,$e,pt=0;pt<ce.length-1;pt++){var Lt=ce[pt];if(/^(cmd|meta|m)$/i.test(Lt))$e=!0;else if(/^a(lt)?$/i.test(Lt))Ce=!0;else if(/^(c|ctrl|control)$/i.test(Lt))Pe=!0;else if(/^s(hift)?$/i.test(Lt))Oe=!0;else throw new Error("Unrecognized modifier name: "+Lt)}return Ce&&(re="Alt-"+re),Pe&&(re="Ctrl-"+re),$e&&(re="Cmd-"+re),Oe&&(re="Shift-"+re),re}function wp(re){var ce={};for(var Ce in re)if(re.hasOwnProperty(Ce)){var Pe=re[Ce];if(/^(name|fallthrough|(de|at)tach)$/.test(Ce))continue;if(Pe=="..."){delete re[Ce];continue}for(var Oe=yt(Ce.split(" "),xp),$e=0;$e<Oe.length;$e++){var pt=void 0,Lt=void 0;$e==Oe.length-1?(Lt=Oe.join(" "),pt=Pe):(Lt=Oe.slice(0,$e+1).join(" "),pt="...");var kt=ce[Lt];if(!kt)ce[Lt]=pt;else if(kt!=pt)throw new Error("Inconsistent bindings for "+Lt)}delete re[Ce]}for(var Rt in ce)re[Rt]=ce[Rt];return re}function bl(re,ce,Ce,Pe){ce=Jh(ce);var Oe=ce.call?ce.call(re,Pe):ce[re];if(Oe===!1)return"nothing";if(Oe==="...")return"multi";if(Oe!=null&&Ce(Oe))return"handled";if(ce.fallthrough){if(Object.prototype.toString.call(ce.fallthrough)!="[object Array]")return bl(re,ce.fallthrough,Ce,Pe);for(var $e=0;$e<ce.fallthrough.length;$e++){var pt=bl(re,ce.fallthrough[$e],Ce,Pe);if(pt)return pt}}}function Dc(re){var ce=typeof re=="string"?re:mu[re.keyCode];return ce=="Ctrl"||ce=="Alt"||ce=="Shift"||ce=="Mod"}function bp(re,ce,Ce){var Pe=re;return ce.altKey&&Pe!="Alt"&&(re="Alt-"+re),(pe?ce.metaKey:ce.ctrlKey)&&Pe!="Ctrl"&&(re="Ctrl-"+re),(pe?ce.ctrlKey:ce.metaKey)&&Pe!="Mod"&&(re="Cmd-"+re),!Ce&&ce.shiftKey&&Pe!="Shift"&&(re="Shift-"+re),re}function qg(re,ce){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,ce))}function Jh(re){return typeof re=="string"?Vs[re]:re}function Zs(re,ce){for(var Ce=re.doc.sel.ranges,Pe=[],Oe=0;Oe<Ce.length;Oe++){for(var $e=ce(Ce[Oe]);Pe.length&&Nn($e.from,gt(Pe).to)<=0;){var pt=Pe.pop();if(Nn(pt.from,$e.from)<0){$e.from=pt.from;break}}Pe.push($e)}yo(re,function(){for(var Lt=Pe.length-1;Lt>=0;Lt--)Zh(re.doc,"",Pe[Lt].from,Pe[Lt].to,"+delete");Ol(re)})}function Pp(re,ce,Ce){var Pe=qe(re.text,ce+Ce,Ce);return Pe<0||Pe>re.text.length?null:Pe}function Sa(re,ce,Ce){var Pe=Pp(re,ce.ch,Ce);return Pe==null?null:new tn(ce.line,Pe,Ce<0?"after":"before")}function Ef(re,ce,Ce,Pe,Oe){if(re){ce.doc.direction=="rtl"&&(Oe=-Oe);var $e=Kt(Ce,ce.doc.direction);if($e){var pt=Oe<0?gt($e):$e[0],Lt=Oe<0==(pt.level==1),kt=Lt?"after":"before",Rt;if(pt.level>0||ce.doc.direction=="rtl"){var nn=Sl(ce,Ce);Rt=Oe<0?Ce.text.length-1:0;var _t=Os(ce,nn,Rt).top;Rt=ut(function(mn){return Os(ce,nn,mn).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 tn(Pe,Rt,kt)}}return new tn(Pe,Oe<0?Ce.text.length:0,Oe<0?"before":"after")}function cd(re,ce,Ce,Pe){var Oe=Kt(ce,re.doc.direction);if(!Oe)return Sa(ce,Ce,Pe);Ce.ch>=ce.text.length?(Ce.ch=ce.text.length,Ce.sticky="before"):Ce.ch<=0&&(Ce.ch=0,Ce.sticky="after");var $e=Et(Oe,Ce.ch,Ce.sticky),pt=Oe[$e];if(re.doc.direction=="ltr"&&pt.level%2==0&&(Pe>0?pt.to>Ce.ch:pt.from<Ce.ch))return Sa(ce,Ce,Pe);var Lt=function(Fr,ui){return Pp(ce,Fr instanceof tn?Fr.ch:Fr,ui)},kt,Rt=function(Fr){return re.options.lineWrapping?(kt=kt||Sl(re,ce),fa(re,ce,kt,Fr)):{begin:0,end:ce.text.length}},nn=Rt(Ce.sticky=="before"?Lt(Ce,-1):Ce.ch);if(re.doc.direction=="rtl"||pt.level==1){var _t=pt.level==1==Pe<0,mn=Lt(Ce,_t?1:-1);if(mn!=null&&(_t?mn<=pt.to&&mn<=nn.end:mn>=pt.from&&mn>=nn.begin)){var dn=_t?"before":"after";return new tn(Ce.line,mn,dn)}}var lr=function(Fr,ui,Yr){for(var vi=function(Yo,Ra){return Ra?new tn(Ce.line,Lt(Yo,1),"before"):new tn(Ce.line,Yo,"after")};Fr>=0&&Fr<Oe.length;Fr+=ui){var zi=Oe[Fr],Hr=ui>0==(zi.level!=1),eo=Hr?Yr.begin:Lt(Yr.end,-1);if(zi.from<=eo&&eo<zi.to||(eo=Hr?zi.from:Lt(zi.to,-1),Yr.begin<=eo&&eo<Yr.end))return vi(eo,Hr)}},dr=lr($e+Pe,Pe,nn);if(dr)return dr;var br=Pe>0?nn.end:Lt(nn.begin,-1);return br!=null&&!(Pe>0&&br==ce.text.length)&&(dr=lr(Pe>0?0:Oe.length-1,Pe,Rt(br)),dr)?dr:null}var ph={selectAll:ya,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),ht)},killLine:function(re){return Zs(re,function(ce){if(ce.empty()){var Ce=Yn(re.doc,ce.head.line).text.length;return ce.head.ch==Ce&&ce.head.line<re.lastLine()?{from:ce.head,to:tn(ce.head.line+1,0)}:{from:ce.head,to:tn(ce.head.line,Ce)}}else return{from:ce.from(),to:ce.to()}})},deleteLine:function(re){return Zs(re,function(ce){return{from:tn(ce.from().line,0),to:er(re.doc,tn(ce.to().line+1,0))}})},delLineLeft:function(re){return Zs(re,function(ce){return{from:tn(ce.from().line,0),to:ce.from()}})},delWrappedLineLeft:function(re){return Zs(re,function(ce){var Ce=re.charCoords(ce.head,"div").top+5,Pe=re.coordsChar({left:0,top:Ce},"div");return{from:Pe,to:ce.from()}})},delWrappedLineRight:function(re){return Zs(re,function(ce){var Ce=re.charCoords(ce.head,"div").top+5,Pe=re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Ce},"div");return{from:ce.from(),to:Pe}})},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(tn(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(tn(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(ce){return Bc(re,ce.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(re){return re.extendSelectionsBy(function(ce){return Cp(re,ce.head)},{origin:"+move",bias:1})},goLineEnd:function(re){return re.extendSelectionsBy(function(ce){return Rc(re,ce.head.line)},{origin:"+move",bias:-1})},goLineRight:function(re){return re.extendSelectionsBy(function(ce){var Ce=re.cursorCoords(ce.head,"div").top+5;return re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Ce},"div")},mt)},goLineLeft:function(re){return re.extendSelectionsBy(function(ce){var Ce=re.cursorCoords(ce.head,"div").top+5;return re.coordsChar({left:0,top:Ce},"div")},mt)},goLineLeftSmart:function(re){return re.extendSelectionsBy(function(ce){var Ce=re.cursorCoords(ce.head,"div").top+5,Pe=re.coordsChar({left:0,top:Ce},"div");return Pe.ch<re.getLine(Pe.line).search(/\S/)?Cp(re,ce.head):Pe},mt)},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 ce=[],Ce=re.listSelections(),Pe=re.options.tabSize,Oe=0;Oe<Ce.length;Oe++){var $e=Ce[Oe].from(),pt=Je(re.getLine($e.line),$e.ch,Pe);ce.push(Dt(Pe-pt%Pe))}re.replaceSelections(ce)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return yo(re,function(){for(var ce=re.listSelections(),Ce=[],Pe=0;Pe<ce.length;Pe++)if(ce[Pe].empty()){var Oe=ce[Pe].head,$e=Yn(re.doc,Oe.line).text;if($e){if(Oe.ch==$e.length&&(Oe=new tn(Oe.line,Oe.ch-1)),Oe.ch>0)Oe=new tn(Oe.line,Oe.ch+1),re.replaceRange($e.charAt(Oe.ch-1)+$e.charAt(Oe.ch-2),tn(Oe.line,Oe.ch-2),Oe,"+transpose");else if(Oe.line>re.doc.first){var pt=Yn(re.doc,Oe.line-1).text;pt&&(Oe=new tn(Oe.line,1),re.replaceRange($e.charAt(0)+re.doc.lineSeparator()+pt.charAt(pt.length-1),tn(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 ce=re.listSelections(),Ce=ce.length-1;Ce>=0;Ce--)re.replaceRange(re.doc.lineSeparator(),ce[Ce].anchor,ce[Ce].head,"+input");ce=re.listSelections();for(var Pe=0;Pe<ce.length;Pe++)re.indentLine(ce[Pe].from().line,null,!0);Ol(re)})},openLine:function(re){return re.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function Bc(re,ce){var Ce=Yn(re.doc,ce),Pe=kn(Ce);return Pe!=Ce&&(ce=Mt(Pe)),Ef(!0,re,Pe,ce,1)}function Rc(re,ce){var Ce=Yn(re.doc,ce),Pe=Zn(Ce);return Pe!=Ce&&(ce=Mt(Pe)),Ef(!0,re,Ce,ce,-1)}function Cp(re,ce){var Ce=Bc(re,ce.line),Pe=Yn(re.doc,Ce.line),Oe=Kt(Pe,re.doc.direction);if(!Oe||Oe[0].level==0){var $e=Math.max(Ce.ch,Pe.text.search(/\S/)),pt=ce.line==Ce.line&&ce.ch<=$e&&ce.ch;return tn(Ce.line,pt?0:$e,Ce.sticky)}return Ce}function Ic(re,ce,Ce){if(typeof ce=="string"&&(ce=ph[ce],!ce))return!1;re.display.input.ensurePolled();var Pe=re.display.shift,Oe=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Ce&&(re.display.shift=!1),Oe=ce(re)!=Pt}finally{re.display.shift=Pe,re.state.suppressEdits=!1}return Oe}function Ep(re,ce,Ce){for(var Pe=0;Pe<re.state.keyMaps.length;Pe++){var Oe=bl(ce,re.state.keyMaps[Pe],Ce,re);if(Oe)return Oe}return re.options.extraKeys&&bl(ce,re.options.extraKeys,Ce,re)||bl(ce,re.options.keyMap,Ce,re)}var vu=new rt;function Qh(re,ce,Ce,Pe){var Oe=re.state.keySeq;if(Oe){if(Dc(ce))return"handled";if(/\'$/.test(ce)?re.state.keySeq=null:vu.set(50,function(){re.state.keySeq==Oe&&(re.state.keySeq=null,re.display.input.reset())}),fd(re,Oe+" "+ce,Ce,Pe))return!0}return fd(re,ce,Ce,Pe)}function fd(re,ce,Ce,Pe){var Oe=Ep(re,ce,Pe);return Oe=="multi"&&(re.state.keySeq=ce),Oe=="handled"&&Ir(re,"keyHandled",re,ce,Ce),(Oe=="handled"||Oe=="multi")&&(On(Ce),wo(re)),!!Oe}function dd(re,ce){var Ce=qg(ce,!0);return Ce?ce.shiftKey&&!re.state.keySeq?Qh(re,"Shift-"+Ce,ce,function(Pe){return Ic(re,Pe,!0)})||Qh(re,Ce,ce,function(Pe){if(typeof Pe=="string"?/^go[A-Z]/.test(Pe):Pe.motion)return Ic(re,Pe)}):Qh(re,Ce,ce,function(Pe){return Ic(re,Pe)}):!1}function pd(re,ce,Ce){return Qh(re,"'"+Ce+"'",ce,function(Pe){return Ic(re,Pe,!0)})}var $h=null;function kp(re){var ce=this;if(!(re.target&&re.target!=ce.display.input.getField())&&(ce.curOp.focus=Ke(),!un(ce,re))){Ie&&de<11&&re.keyCode==27&&(re.returnValue=!1);var Ce=re.keyCode;ce.display.shift=Ce==16||re.shiftKey;var Pe=dd(ce,re);Se&&($h=Pe?Ce:null,!Pe&&Ce==88&&!Mr&&(se?re.metaKey:re.ctrlKey)&&ce.replaceSelection("",null,"cut")),at&&!se&&!Pe&&Ce==46&&re.shiftKey&&!re.ctrlKey&&document.execCommand&&document.execCommand("cut"),Ce==18&&!/\bCodeMirror-crosshair\b/.test(ce.display.lineDiv.className)&&Tp(ce)}}function Tp(re){var ce=re.display.lineDiv;Xe(ce,"CodeMirror-crosshair");function Ce(Pe){(Pe.keyCode==18||!Pe.altKey)&&(De(ce,"CodeMirror-crosshair"),sn(document,"keyup",Ce),sn(document,"mouseover",Ce))}Vt(document,"keyup",Ce),Vt(document,"mouseover",Ce)}function Lp(re){re.keyCode==16&&(this.doc.sel.shift=!1),un(this,re)}function eu(re){var ce=this;if(!(re.target&&re.target!=ce.display.input.getField())&&!(Oo(ce.display,re)||un(ce,re)||re.ctrlKey&&!re.altKey||se&&re.metaKey)){var Ce=re.keyCode,Pe=re.charCode;if(Se&&Ce==$h){$h=null,On(re);return}if(!(Se&&(!re.which||re.which<10)&&dd(ce,re))){var Oe=String.fromCharCode(Pe==null?Ce:Pe);Oe!="\b"&&(pd(ce,re,Oe)||ce.display.input.onKeyPress(re))}}}var em=400,Mp=function(re,ce,Ce){this.time=re,this.pos=ce,this.button=Ce};Mp.prototype.compare=function(re,ce,Ce){return this.time+em>re&&Nn(ce,this.pos)==0&&Ce==this.button};var _c,qh;function Np(re,ce){var Ce=+new Date;return qh&&qh.compare(Ce,re,ce)?(_c=qh=null,"triple"):_c&&_c.compare(Ce,re,ce)?(qh=new Mp(Ce,re,ce),_c=null,"double"):(_c=new Mp(Ce,re,ce),qh=null,"single")}function tu(re){var ce=this,Ce=ce.display;if(!(un(ce,re)||Ce.activeTouch&&Ce.input.supportsTouch())){if(Ce.input.ensurePolled(),Ce.shift=re.shiftKey,Oo(Ce,re)){ve||(Ce.scroller.draggable=!1,setTimeout(function(){return Ce.scroller.draggable=!0},100));return}if(!vd(ce,re)){var Pe=Ua(ce,re),Oe=ai(re),$e=Pe?Np(Pe,Oe):"single";window.focus(),Oe==1&&ce.state.selectingText&&ce.state.selectingText(re),!(Pe&&Ap(ce,Oe,Pe,$e,re))&&(Oe==1?Pe?tm(ce,Pe,$e,re):tr(re)==Ce.scroller&&On(re):Oe==2?(Pe&&sd(ce.doc,Pe),setTimeout(function(){return Ce.input.focus()},20)):Oe==3&&(xe?ce.display.input.onContextMenu(re):Uo(ce)))}}}function Ap(re,ce,Ce,Pe,Oe){var $e="Click";return Pe=="double"?$e="Double"+$e:Pe=="triple"&&($e="Triple"+$e),$e=(ce==1?"Left":ce==2?"Middle":"Right")+$e,Qh(re,bp($e,Oe),Oe,function(pt){if(typeof pt=="string"&&(pt=ph[pt]),!pt)return!1;var Lt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Lt=pt(re,Ce)!=Pt}finally{re.state.suppressEdits=!1}return Lt})}function gd(re,ce,Ce){var Pe=re.getOption("configureMouse"),Oe=Pe?Pe(re,ce,Ce):{};if(Oe.unit==null){var $e=ie?Ce.shiftKey&&Ce.metaKey:Ce.altKey;Oe.unit=$e?"rectangle":ce=="single"?"char":ce=="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,ce,Ce,Pe){Ie?setTimeout(ct(Eo,re),0):re.curOp.focus=Ke();var Oe=gd(re,Ce,Pe),$e=re.doc.sel,pt;re.options.dragDrop&&gi&&!re.isReadOnly()&&Ce=="single"&&(pt=$e.contains(ce))>-1&&(Nn((pt=$e.ranges[pt]).from(),ce)<0||ce.xRel>0)&&(Nn(pt.to(),ce)>0||ce.xRel<0)?jp(re,Pe,ce,Oe):n0(re,Pe,ce,Oe)}function jp(re,ce,Ce,Pe){var Oe=re.display,$e=!1,pt=Da(re,function(Rt){ve&&(Oe.scroller.draggable=!1),re.state.draggingText=!1,sn(Oe.wrapper.ownerDocument,"mouseup",pt),sn(Oe.wrapper.ownerDocument,"mousemove",Lt),sn(Oe.scroller,"dragstart",kt),sn(Oe.scroller,"drop",pt),$e||(On(Rt),Pe.addNew||sd(re.doc,Ce,null,null,Pe.extend),ve&&!Ae||Ie&&de==9?setTimeout(function(){Oe.wrapper.ownerDocument.body.focus({preventScroll:!0}),Oe.input.focus()},20):Oe.input.focus())}),Lt=function(Rt){$e=$e||Math.abs(ce.clientX-Rt.clientX)+Math.abs(ce.clientY-Rt.clientY)>=10},kt=function(){return $e=!0};ve&&(Oe.scroller.draggable=!0),re.state.draggingText=pt,pt.copy=!Pe.moveOnDrag,Oe.scroller.dragDrop&&Oe.scroller.dragDrop(),Vt(Oe.wrapper.ownerDocument,"mouseup",pt),Vt(Oe.wrapper.ownerDocument,"mousemove",Lt),Vt(Oe.scroller,"dragstart",kt),Vt(Oe.scroller,"drop",pt),Uo(re),setTimeout(function(){return Oe.input.focus()},20)}function Op(re,ce,Ce){if(Ce=="char")return new To(ce,ce);if(Ce=="word")return re.findWordAt(ce);if(Ce=="line")return new To(tn(ce.line,0),er(re.doc,tn(ce.line+1,0)));var Pe=Ce(re,ce);return new To(Pe.from,Pe.to)}function n0(re,ce,Ce,Pe){var Oe=re.display,$e=re.doc;On(ce);var pt,Lt,kt=$e.sel,Rt=kt.ranges;if(Pe.addNew&&!Pe.extend?(Lt=$e.sel.contains(Ce),Lt>-1?pt=Rt[Lt]:pt=new To(Ce,Ce)):(pt=$e.sel.primary(),Lt=$e.sel.primIndex),Pe.unit=="rectangle")Pe.addNew||(pt=new To(Ce,Ce)),Ce=Ua(re,ce,!0,!0),Lt=-1;else{var nn=Op(re,Ce,Pe.unit);Pe.extend?pt=ad(pt,nn.anchor,nn.head,Pe.extend):pt=nn}Pe.addNew?Lt==-1?(Lt=Rt.length,gs($e,Dl(re,Rt.concat([pt]),Lt),{scroll:!1,origin:"*mouse"})):Rt.length>1&&Rt[Lt].empty()&&Pe.unit=="char"&&!Pe.extend?(gs($e,Dl(re,Rt.slice(0,Lt).concat(Rt.slice(Lt+1)),0),{scroll:!1,origin:"*mouse"}),kt=$e.sel):fh($e,Lt,pt,St):(Lt=0,gs($e,new xl([pt],0),St),kt=$e.sel);var _t=Ce;function mn(Yr){if(Nn(_t,Yr)!=0)if(_t=Yr,Pe.unit=="rectangle"){for(var vi=[],zi=re.options.tabSize,Hr=Je(Yn($e,Ce.line).text,Ce.ch,zi),eo=Je(Yn($e,Yr.line).text,Yr.ch,zi),Yo=Math.min(Hr,eo),Ra=Math.max(Hr,eo),ia=Math.min(Ce.line,Yr.line),Is=Math.min(re.lastLine(),Math.max(Ce.line,Yr.line));ia<=Is;ia++){var ms=Yn($e,ia).text,La=Nt(ms,Yo,zi);Yo==Ra?vi.push(new To(tn(ia,La),tn(ia,La))):ms.length>La&&vi.push(new To(tn(ia,La),tn(ia,Nt(ms,Ra,zi))))}vi.length||vi.push(new To(Ce,Ce)),gs($e,Dl(re,kt.ranges.slice(0,Lt).concat(vi),Lt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(Yr)}else{var Xs=pt,as=Op(re,Yr,Pe.unit),Ma=Xs.anchor,mo;Nn(as.anchor,Ma)>0?(mo=as.head,Ma=Kn(Xs.from(),as.anchor)):(mo=as.anchor,Ma=An(Xs.to(),as.head));var ua=kt.ranges.slice(0);ua[Lt]=nm(re,new To(er($e,Ma),mo)),gs($e,Dl(re,ua,Lt),St)}}var dn=Oe.wrapper.getBoundingClientRect(),lr=0;function dr(Yr){var vi=++lr,zi=Ua(re,Yr,!0,Pe.unit=="rectangle");if(zi)if(Nn(zi,_t)!=0){re.curOp.focus=Ke(),mn(zi);var Hr=Qi(Oe,$e);(zi.line>=Hr.to||zi.line<Hr.from)&&setTimeout(Da(re,function(){lr==vi&&dr(Yr)}),150)}else{var eo=Yr.clientY<dn.top?-20:Yr.clientY>dn.bottom?20:0;eo&&setTimeout(Da(re,function(){lr==vi&&(Oe.scroller.scrollTop+=eo,dr(Yr))}),50)}}function br(Yr){re.state.selectingText=!1,lr=1/0,Yr&&(On(Yr),Oe.input.focus()),sn(Oe.wrapper.ownerDocument,"mousemove",Fr),sn(Oe.wrapper.ownerDocument,"mouseup",ui),$e.history.lastSelOrigin=null}var Fr=Da(re,function(Yr){Yr.buttons===0||!ai(Yr)?br(Yr):dr(Yr)}),ui=Da(re,br);re.state.selectingText=ui,Vt(Oe.wrapper.ownerDocument,"mousemove",Fr),Vt(Oe.wrapper.ownerDocument,"mouseup",ui)}function nm(re,ce){var Ce=ce.anchor,Pe=ce.head,Oe=Yn(re.doc,Ce.line);if(Nn(Ce,Pe)==0&&Ce.sticky==Pe.sticky)return ce;var $e=Kt(Oe);if(!$e)return ce;var pt=Et($e,Ce.ch,Ce.sticky),Lt=$e[pt];if(Lt.from!=Ce.ch&&Lt.to!=Ce.ch)return ce;var kt=pt+(Lt.from==Ce.ch==(Lt.level!=1)?0:1);if(kt==0||kt==$e.length)return ce;var Rt;if(Pe.line!=Ce.line)Rt=(Pe.line-Ce.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var nn=Et($e,Pe.ch,Pe.sticky),_t=nn-pt||(Pe.ch-Ce.ch)*(Lt.level==1?-1:1);nn==kt-1||nn==kt?Rt=_t<0:Rt=_t>0}var mn=$e[kt+(Rt?-1:0)],dn=Rt==(mn.level==1),lr=dn?mn.from:mn.to,dr=dn?"after":"before";return Ce.ch==lr&&Ce.sticky==dr?ce:new To(new tn(Ce.line,lr,dr),Pe)}function md(re,ce,Ce,Pe){var Oe,$e;if(ce.touches)Oe=ce.touches[0].clientX,$e=ce.touches[0].clientY;else try{Oe=ce.clientX,$e=ce.clientY}catch(mn){return!1}if(Oe>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;Pe&&On(ce);var pt=re.display,Lt=pt.lineDiv.getBoundingClientRect();if($e>Lt.bottom||!vn(re,Ce))return Sr(ce);$e-=Lt.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 nn=Wt(re.doc,$e),_t=re.display.gutterSpecs[kt];return rn(re,Ce,re,nn,_t.className,ce),Sr(ce)}}}function vd(re,ce){return md(re,ce,"gutterClick",!0)}function yd(re,ce){Oo(re.display,ce)||rm(re,ce)||un(re,ce,"contextmenu")||xe||re.display.input.onContextMenu(ce)}function rm(re,ce){return vn(re,"gutterContextMenu")?md(re,ce,"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 ce=re.optionHandlers;function Ce(Pe,Oe,$e,pt){re.defaults[Pe]=Oe,$e&&(ce[Pe]=pt?function(Lt,kt,Rt){Rt!=gh&&$e(Lt,kt,Rt)}:$e)}re.defineOption=Ce,re.Init=gh,Ce("value","",function(Pe,Oe){return Pe.setValue(Oe)},!0),Ce("mode",null,function(Pe,Oe){Pe.doc.modeOption=Oe,qi(Pe)},!0),Ce("indentUnit",2,qi,!0),Ce("indentWithTabs",!1),Ce("smartIndent",!0),Ce("tabSize",4,function(Pe){ff(Pe),uu(Pe),Do(Pe)},!0),Ce("lineSeparator",null,function(Pe,Oe){if(Pe.doc.lineSep=Oe,!!Oe){var $e=[],pt=Pe.doc.first;Pe.doc.iter(function(kt){for(var Rt=0;;){var nn=kt.text.indexOf(Oe,Rt);if(nn==-1)break;Rt=nn+Oe.length,$e.push(tn(pt,nn))}pt++});for(var Lt=$e.length-1;Lt>=0;Lt--)Zh(Pe.doc,Oe,$e[Lt],tn($e[Lt].line,$e[Lt].ch+Oe.length))}}),Ce("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Pe,Oe,$e){Pe.state.specialChars=new RegExp(Oe.source+(Oe.test(" ")?"":"| "),"g"),$e!=gh&&Pe.refresh()}),Ce("specialCharPlaceholder",Mi,function(Pe){return Pe.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(Pe,Oe){return Pe.getInputField().spellcheck=Oe},!0),Ce("autocorrect",!1,function(Pe,Oe){return Pe.getInputField().autocorrect=Oe},!0),Ce("autocapitalize",!1,function(Pe,Oe){return Pe.getInputField().autocapitalize=Oe},!0),Ce("rtlMoveVisually",!le),Ce("wholeLineUpdateBefore",!0),Ce("theme","default",function(Pe){Sd(Pe),ll(Pe)},!0),Ce("keyMap","default",function(Pe,Oe,$e){var pt=Jh(Oe),Lt=$e!=gh&&Jh($e);Lt&&Lt.detach&&Lt.detach(Pe,pt),pt.attach&&pt.attach(Pe,Lt||null)}),Ce("extraKeys",null),Ce("configureMouse",null),Ce("lineWrapping",!1,om,!0),Ce("gutters",[],function(Pe,Oe){Pe.display.gutterSpecs=Va(Oe,Pe.options.lineNumbers),ll(Pe)},!0),Ce("fixedGutter",!0,function(Pe,Oe){Pe.display.gutters.style.left=Oe?Fu(Pe.display)+"px":"0",Pe.refresh()},!0),Ce("coverGutterNextToScrollbar",!1,function(Pe){return Fa(Pe)},!0),Ce("scrollbarStyle","native",function(Pe){Ql(Pe),Fa(Pe),Pe.display.scrollbars.setScrollTop(Pe.doc.scrollTop),Pe.display.scrollbars.setScrollLeft(Pe.doc.scrollLeft)},!0),Ce("lineNumbers",!1,function(Pe,Oe){Pe.display.gutterSpecs=Va(Pe.options.gutters,Oe),ll(Pe)},!0),Ce("firstLineNumber",1,ll,!0),Ce("lineNumberFormatter",function(Pe){return Pe},ll,!0),Ce("showCursorWhenSelecting",!1,ma,!0),Ce("resetSelectionOnContextMenu",!0),Ce("lineWiseCopyCut",!0),Ce("pasteLinesPerSelection",!0),Ce("selectionsMayTouch",!1),Ce("readOnly",!1,function(Pe,Oe){Oe=="nocursor"&&(Du(Pe),Pe.display.input.blur()),Pe.display.input.readOnlyChanged(Oe)}),Ce("screenReaderLabel",null,function(Pe,Oe){Oe=Oe===""?null:Oe,Pe.display.input.screenReaderLabelChanged(Oe)}),Ce("disableInput",!1,function(Pe,Oe){Oe||Pe.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(Pe,Oe){return Pe.doc.history.undoDepth=Oe}),Ce("historyEventDelay",1250),Ce("viewportMargin",10,function(Pe){return Pe.refresh()},!0),Ce("maxHighlightLength",1e4,ff,!0),Ce("moveInputWithCursor",!0,function(Pe,Oe){Oe||Pe.display.input.resetPosition()}),Ce("tabindex",null,function(Pe,Oe){return Pe.display.input.getField().tabIndex=Oe||""}),Ce("autofocus",null),Ce("direction","ltr",function(Pe,Oe){return Pe.doc.setDirection(Oe)},!0),Ce("phrases",null)}function xd(re,ce,Ce){var Pe=Ce&&Ce!=gh;if(!ce!=!Pe){var Oe=re.display.dragFunctions,$e=ce?Vt:sn;$e(re.display.scroller,"dragstart",Oe.start),$e(re.display.scroller,"dragenter",Oe.enter),$e(re.display.scroller,"dragover",Oe.over),$e(re.display.scroller,"dragleave",Oe.leave),$e(re.display.scroller,"drop",Oe.drop)}}function om(re){re.options.lineWrapping?(Xe(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(De(re.display.wrapper,"CodeMirror-wrap"),Ur(re)),Si(re),Do(re),uu(re),setTimeout(function(){return Fa(re)},100)}function po(re,ce){var Ce=this;if(!(this instanceof po))return new po(re,ce);this.options=ce=ce?Ct(ce):{},Ct(Fp,ce,!1);var Pe=ce.value;typeof Pe=="string"?Pe=new os(Pe,ce.mode,null,ce.lineSeparator,ce.direction):ce.mode&&(Pe.modeOption=ce.mode),this.doc=Pe;var Oe=new po.inputStyles[ce.inputStyle](this),$e=this.display=new uh(re,Pe,Oe,ce);$e.wrapper.CodeMirror=this,Sd(this),ce.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 rt,keySeq:null,specialChars:null},ce.autofocus&&!te&&$e.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,Pe),ce.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,ce[pt],gh);Pa(this),ce.finishInit&&ce.finishInit(this);for(var Lt=0;Lt<ec.length;++Lt)ec[Lt](this);Fl(this),ve&&ce.lineWrapping&&getComputedStyle($e.lineDiv).textRendering=="optimizelegibility"&&($e.lineDiv.style.textRendering="auto")}po.defaults=Fp,po.optionHandlers=kf;function zc(re){var ce=re.display;Vt(ce.scroller,"mousedown",Da(re,tu)),Ie&&de<11?Vt(ce.scroller,"dblclick",Da(re,function(kt){if(!un(re,kt)){var Rt=Ua(re,kt);if(!(!Rt||vd(re,kt)||Oo(re.display,kt))){On(kt);var nn=re.findWordAt(Rt);sd(re.doc,nn.anchor,nn.head)}}})):Vt(ce.scroller,"dblclick",function(kt){return un(re,kt)||On(kt)}),Vt(ce.scroller,"contextmenu",function(kt){return yd(re,kt)}),Vt(ce.input.getField(),"contextmenu",function(kt){ce.scroller.contains(kt.target)||yd(re,kt)});var Ce,Pe={end:0};function Oe(){ce.activeTouch&&(Ce=setTimeout(function(){return ce.activeTouch=null},1e3),Pe=ce.activeTouch,Pe.end=+new Date)}function $e(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 nn=Rt.left-kt.left,_t=Rt.top-kt.top;return nn*nn+_t*_t>20*20}Vt(ce.scroller,"touchstart",function(kt){if(!un(re,kt)&&!$e(kt)&&!vd(re,kt)){ce.input.ensurePolled(),clearTimeout(Ce);var Rt=+new Date;ce.activeTouch={start:Rt,moved:!1,prev:Rt-Pe.end<=300?Pe:null},kt.touches.length==1&&(ce.activeTouch.left=kt.touches[0].pageX,ce.activeTouch.top=kt.touches[0].pageY)}}),Vt(ce.scroller,"touchmove",function(){ce.activeTouch&&(ce.activeTouch.moved=!0)}),Vt(ce.scroller,"touchend",function(kt){var Rt=ce.activeTouch;if(Rt&&!Oo(ce,kt)&&Rt.left!=null&&!Rt.moved&&new Date-Rt.start<300){var nn=re.coordsChar(ce.activeTouch,"page"),_t;!Rt.prev||pt(Rt,Rt.prev)?_t=new To(nn,nn):!Rt.prev.prev||pt(Rt,Rt.prev.prev)?_t=re.findWordAt(nn):_t=new To(tn(nn.line,0),er(re.doc,tn(nn.line+1,0))),re.setSelection(_t.anchor,_t.head),re.focus(),On(kt)}Oe()}),Vt(ce.scroller,"touchcancel",Oe),Vt(ce.scroller,"scroll",function(){ce.scroller.clientHeight&&(Yl(re,ce.scroller.scrollTop),Jl(re,ce.scroller.scrollLeft,!0),rn(re,"scroll",re))}),Vt(ce.scroller,"mousewheel",function(kt){return Za(re,kt)}),Vt(ce.scroller,"DOMMouseScroll",function(kt){return Za(re,kt)}),Vt(ce.wrapper,"scroll",function(){return ce.wrapper.scrollTop=ce.wrapper.scrollLeft=0}),ce.dragFunctions={enter:function(kt){un(re,kt)||qr(kt)},over:function(kt){un(re,kt)||(Jg(re,kt),qr(kt))},start:function(kt){return Yg(re,kt)},drop:Da(re,vp),leave:function(kt){un(re,kt)||Qg(re)}};var Lt=ce.input.getField();Vt(Lt,"keyup",function(kt){return Lp.call(re,kt)}),Vt(Lt,"keydown",Da(re,kp)),Vt(Lt,"keypress",Da(re,eu)),Vt(Lt,"focus",function(kt){return ho(re,kt)}),Vt(Lt,"blur",function(kt){return Du(re,kt)})}var ec=[];po.defineInitHook=function(re){return ec.push(re)};function Ba(re,ce,Ce,Pe){var Oe=re.doc,$e;Ce==null&&(Ce="add"),Ce=="smart"&&(Oe.mode.indent?$e=_i(re,ce).state:Ce="prev");var pt=re.options.tabSize,Lt=Yn(Oe,ce),kt=Je(Lt.text,null,pt);Lt.stateAfter&&(Lt.stateAfter=null);var Rt=Lt.text.match(/^\s*/)[0],nn;if(!Pe&&!/\S/.test(Lt.text))nn=0,Ce="not";else if(Ce=="smart"&&(nn=Oe.mode.indent($e,Lt.text.slice(Rt.length),Lt.text),nn==Pt||nn>150)){if(!Pe)return;Ce="prev"}Ce=="prev"?ce>Oe.first?nn=Je(Yn(Oe,ce-1).text,null,pt):nn=0:Ce=="add"?nn=kt+re.options.indentUnit:Ce=="subtract"?nn=kt-re.options.indentUnit:typeof Ce=="number"&&(nn=kt+Ce),nn=Math.max(0,nn);var _t="",mn=0;if(re.options.indentWithTabs)for(var dn=Math.floor(nn/pt);dn;--dn)mn+=pt,_t+=" ";if(mn<nn&&(_t+=Dt(nn-mn)),_t!=Rt)return Zh(Oe,_t,tn(ce,0),tn(ce,Rt.length),"+input"),Lt.stateAfter=null,!0;for(var lr=0;lr<Oe.sel.ranges.length;lr++){var dr=Oe.sel.ranges[lr];if(dr.head.line==ce&&dr.head.ch<Rt.length){var br=tn(ce,Rt.length);fh(Oe,lr,new To(br,br));break}}}var Rs=null;function tc(re){Rs=re}function Tf(re,ce,Ce,Pe,Oe){var $e=re.doc;re.display.shift=!1,Pe||(Pe=$e.sel);var pt=+new Date-200,Lt=Oe=="paste"||re.state.pasteIncoming>pt,kt=Li(ce),Rt=null;if(Lt&&Pe.ranges.length>1)if(Rs&&Rs.text.join(`
|
|
`)==ce){if(Pe.ranges.length%Rs.text.length==0){Rt=[];for(var nn=0;nn<Rs.text.length;nn++)Rt.push($e.splitLines(Rs.text[nn]))}}else kt.length==Pe.ranges.length&&re.options.pasteLinesPerSelection&&(Rt=yt(kt,function(Fr){return[Fr]}));for(var _t=re.curOp.updateInput,mn=Pe.ranges.length-1;mn>=0;mn--){var dn=Pe.ranges[mn],lr=dn.from(),dr=dn.to();dn.empty()&&(Ce&&Ce>0?lr=tn(lr.line,lr.ch-Ce):re.state.overwrite&&!Lt?dr=tn(dr.line,Math.min(Yn($e,dr.line).text.length,dr.ch+gt(kt).length)):Lt&&Rs&&Rs.lineWise&&Rs.text.join(`
|
|
`)==kt.join(`
|
|
`)&&(lr=dr=tn(lr.line,0)));var br={from:lr,to:dr,text:Rt?Rt[mn%Rt.length]:kt,origin:Oe||(Lt?"paste":re.state.cutIncoming>pt?"cut":"+input")};dh(re.doc,br),Ir(re,"inputRead",re,br)}ce&&!Lt&&Bp(re,ce),Ol(re),re.curOp.updateInput<2&&(re.curOp.updateInput=_t),re.curOp.typing=!0,re.state.pasteIncoming=re.state.cutIncoming=-1}function Dp(re,ce){var Ce=re.clipboardData&&re.clipboardData.getData("Text");if(Ce)return re.preventDefault(),!ce.isReadOnly()&&!ce.options.disableInput&&yo(ce,function(){return Tf(ce,Ce,0,null,"paste")}),!0}function Bp(re,ce){if(!(!re.options.electricChars||!re.options.smartIndent))for(var Ce=re.doc.sel,Pe=Ce.ranges.length-1;Pe>=0;Pe--){var Oe=Ce.ranges[Pe];if(!(Oe.head.ch>100||Pe&&Ce.ranges[Pe-1].head.line==Oe.head.line)){var $e=re.getModeAt(Oe.head),pt=!1;if($e.electricChars){for(var Lt=0;Lt<$e.electricChars.length;Lt++)if(ce.indexOf($e.electricChars.charAt(Lt))>-1){pt=Ba(re,Oe.head.line,"smart");break}}else $e.electricInput&&$e.electricInput.test(Yn(re.doc,Oe.head.line).text.slice(0,Oe.head.ch))&&(pt=Ba(re,Oe.head.line,"smart"));pt&&Ir(re,"electricInput",re,Oe.head.line)}}}function Rp(re){for(var ce=[],Ce=[],Pe=0;Pe<re.doc.sel.ranges.length;Pe++){var Oe=re.doc.sel.ranges[Pe].head.line,$e={anchor:tn(Oe,0),head:tn(Oe+1,0)};Ce.push($e),ce.push(re.getRange($e.anchor,$e.head))}return{text:ce,ranges:Ce}}function Ip(re,ce,Ce,Pe){re.setAttribute("autocorrect",Ce?"":"off"),re.setAttribute("autocapitalize",Pe?"":"off"),re.setAttribute("spellcheck",!!ce)}function _p(){var re=Me("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ce=Me("div",[re],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ve?re.style.width="1000px":re.setAttribute("wrap","off"),fe&&(re.style.border="1px solid black"),Ip(re),ce}function mh(re){var ce=re.optionHandlers,Ce=re.helpers={};re.prototype={constructor:re,focus:function(){window.focus(),this.display.input.focus()},setOption:function(Pe,Oe){var $e=this.options,pt=$e[Pe];$e[Pe]==Oe&&Pe!="mode"||($e[Pe]=Oe,ce.hasOwnProperty(Pe)&&Da(this,ce[Pe])(this,Oe,pt),rn(this,"optionChange",this,Pe))},getOption:function(Pe){return this.options[Pe]},getDoc:function(){return this.doc},addKeyMap:function(Pe,Oe){this.state.keyMaps[Oe?"push":"unshift"](Jh(Pe))},removeKeyMap:function(Pe){for(var Oe=this.state.keyMaps,$e=0;$e<Oe.length;++$e)if(Oe[$e]==Pe||Oe[$e].name==Pe)return Oe.splice($e,1),!0},addOverlay:Ha(function(Pe,Oe){var $e=Pe.token?Pe:re.getMode(this.options,Pe);if($e.startState)throw new Error("Overlays may not be stateful.");tt(this.state.overlays,{mode:$e,modeSpec:Pe,opaque:Oe&&Oe.opaque,priority:Oe&&Oe.priority||0},function(pt){return pt.priority}),this.state.modeGen++,Do(this)}),removeOverlay:Ha(function(Pe){for(var Oe=this.state.overlays,$e=0;$e<Oe.length;++$e){var pt=Oe[$e].modeSpec;if(pt==Pe||typeof Pe=="string"&&pt.name==Pe){Oe.splice($e,1),this.state.modeGen++,Do(this);return}}}),indentLine:Ha(function(Pe,Oe,$e){typeof Oe!="string"&&typeof Oe!="number"&&(Oe==null?Oe=this.options.smartIndent?"smart":"prev":Oe=Oe?"add":"subtract"),Fn(this.doc,Pe)&&Ba(this,Pe,Oe,$e)}),indentSelection:Ha(function(Pe){for(var Oe=this.doc.sel.ranges,$e=-1,pt=0;pt<Oe.length;pt++){var Lt=Oe[pt];if(Lt.empty())Lt.head.line>$e&&(Ba(this,Lt.head.line,Pe,!0),$e=Lt.head.line,pt==this.doc.sel.primIndex&&Ol(this));else{var kt=Lt.from(),Rt=Lt.to(),nn=Math.max($e,kt.line);$e=Math.min(this.lastLine(),Rt.line-(Rt.ch?0:1))+1;for(var _t=nn;_t<$e;++_t)Ba(this,_t,Pe);var mn=this.doc.sel.ranges;kt.ch==0&&Oe.length==mn.length&&mn[pt].from().ch>0&&fh(this.doc,pt,new To(kt,mn[pt].to()),ht)}}}),getTokenAt:function(Pe,Oe){return wr(this,Pe,Oe)},getLineTokens:function(Pe,Oe){return wr(this,tn(Pe),Oe,!0)},getTokenTypeAt:function(Pe){Pe=er(this.doc,Pe);var Oe=di(this,Yn(this.doc,Pe.line)),$e=0,pt=(Oe.length-1)/2,Lt=Pe.ch,kt;if(Lt==0)kt=Oe[2];else for(;;){var Rt=$e+pt>>1;if((Rt?Oe[Rt*2-1]:0)>=Lt)pt=Rt;else if(Oe[Rt*2+1]<Lt)$e=Rt+1;else{kt=Oe[Rt*2+2];break}}var nn=kt?kt.indexOf("overlay "):-1;return nn<0?kt:nn==0?null:kt.slice(0,nn-1)},getModeAt:function(Pe){var Oe=this.doc.mode;return Oe.innerMode?re.innerMode(Oe,this.getTokenAt(Pe).state).mode:Oe},getHelper:function(Pe,Oe){return this.getHelpers(Pe,Oe)[0]},getHelpers:function(Pe,Oe){var $e=[];if(!Ce.hasOwnProperty(Oe))return $e;var pt=Ce[Oe],Lt=this.getModeAt(Pe);if(typeof Lt[Oe]=="string")pt[Lt[Oe]]&&$e.push(pt[Lt[Oe]]);else if(Lt[Oe])for(var kt=0;kt<Lt[Oe].length;kt++){var Rt=pt[Lt[Oe][kt]];Rt&&$e.push(Rt)}else Lt.helperType&&pt[Lt.helperType]?$e.push(pt[Lt.helperType]):pt[Lt.name]&&$e.push(pt[Lt.name]);for(var nn=0;nn<pt._global.length;nn++){var _t=pt._global[nn];_t.pred(Lt,this)&&xt($e,_t.val)==-1&&$e.push(_t.val)}return $e},getStateAfter:function(Pe,Oe){var $e=this.doc;return Pe=Jn($e,Pe==null?$e.first+$e.size-1:Pe),_i(this,Pe+1,Oe).state},cursorCoords:function(Pe,Oe){var $e,pt=this.doc.sel.primary();return Pe==null?$e=pt.head:typeof Pe=="object"?$e=er(this.doc,Pe):$e=Pe?pt.from():pt.to(),co(this,$e,Oe||"page")},charCoords:function(Pe,Oe){return Ga(this,er(this.doc,Pe),Oe||"page")},coordsChar:function(Pe,Oe){return Pe=Xl(this,Pe,Oe||"page"),sa(this,Pe.left,Pe.top)},lineAtHeight:function(Pe,Oe){return Pe=Xl(this,{top:Pe,left:0},Oe||"page").top,Wt(this.doc,Pe+this.display.viewOffset)},heightAtLine:function(Pe,Oe,$e){var pt=!1,Lt;if(typeof Pe=="number"){var kt=this.doc.first+this.doc.size-1;Pe<this.doc.first?Pe=this.doc.first:Pe>kt&&(Pe=kt,pt=!0),Lt=Yn(this.doc,Pe)}else Lt=Pe;return ga(this,Lt,{top:0,left:0},Oe||"page",$e||pt).top+(pt?this.doc.height-Nr(Lt):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(Pe,Oe,$e,pt,Lt){var kt=this.display;Pe=co(this,er(this.doc,Pe));var Rt=Pe.bottom,nn=Pe.left;if(Oe.style.position="absolute",Oe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Oe),kt.sizer.appendChild(Oe),pt=="over")Rt=Pe.top;else if(pt=="above"||pt=="near"){var _t=Math.max(kt.wrapper.clientHeight,this.doc.height),mn=Math.max(kt.sizer.clientWidth,kt.lineSpace.clientWidth);(pt=="above"||Pe.bottom+Oe.offsetHeight>_t)&&Pe.top>Oe.offsetHeight?Rt=Pe.top-Oe.offsetHeight:Pe.bottom+Oe.offsetHeight<=_t&&(Rt=Pe.bottom),nn+Oe.offsetWidth>mn&&(nn=mn-Oe.offsetWidth)}Oe.style.top=Rt+"px",Oe.style.left=Oe.style.right="",Lt=="right"?(nn=kt.sizer.clientWidth-Oe.offsetWidth,Oe.style.right="0px"):(Lt=="left"?nn=0:Lt=="middle"&&(nn=(kt.sizer.clientWidth-Oe.offsetWidth)/2),Oe.style.left=nn+"px"),$e&&ih(this,{left:nn,top:Rt,right:nn+Oe.offsetWidth,bottom:Rt+Oe.offsetHeight})},triggerOnKeyDown:Ha(kp),triggerOnKeyPress:Ha(eu),triggerOnKeyUp:Lp,triggerOnMouseDown:Ha(tu),execCommand:function(Pe){if(ph.hasOwnProperty(Pe))return ph[Pe].call(null,this)},triggerElectric:Ha(function(Pe){Bp(this,Pe)}),findPosH:function(Pe,Oe,$e,pt){var Lt=1;Oe<0&&(Lt=-1,Oe=-Oe);for(var kt=er(this.doc,Pe),Rt=0;Rt<Oe&&(kt=Lf(this.doc,kt,Lt,$e,pt),!kt.hitSide);++Rt);return kt},moveH:Ha(function(Pe,Oe){var $e=this;this.extendSelectionsBy(function(pt){return $e.display.shift||$e.doc.extend||pt.empty()?Lf($e.doc,pt.head,Pe,Oe,$e.options.rtlMoveVisually):Pe<0?pt.from():pt.to()},mt)}),deleteH:Ha(function(Pe,Oe){var $e=this.doc.sel,pt=this.doc;$e.somethingSelected()?pt.replaceSelection("",null,"+delete"):Zs(this,function(Lt){var kt=Lf(pt,Lt.head,Pe,Oe,!1);return Pe<0?{from:kt,to:Lt.head}:{from:Lt.head,to:kt}})}),findPosV:function(Pe,Oe,$e,pt){var Lt=1,kt=pt;Oe<0&&(Lt=-1,Oe=-Oe);for(var Rt=er(this.doc,Pe),nn=0;nn<Oe;++nn){var _t=co(this,Rt,"div");if(kt==null?kt=_t.left:_t.left=kt,Rt=vh(this,_t,Lt,$e),Rt.hitSide)break}return Rt},moveV:Ha(function(Pe,Oe){var $e=this,pt=this.doc,Lt=[],kt=!this.display.shift&&!pt.extend&&pt.sel.somethingSelected();if(pt.extendSelectionsBy(function(nn){if(kt)return Pe<0?nn.from():nn.to();var _t=co($e,nn.head,"div");nn.goalColumn!=null&&(_t.left=nn.goalColumn),Lt.push(_t.left);var mn=vh($e,_t,Pe,Oe);return Oe=="page"&&nn==pt.sel.primary()&&_h($e,Ga($e,mn,"div").top-_t.top),mn},mt),Lt.length)for(var Rt=0;Rt<pt.sel.ranges.length;Rt++)pt.sel.ranges[Rt].goalColumn=Lt[Rt]}),findWordAt:function(Pe){var Oe=this.doc,$e=Yn(Oe,Pe.line).text,pt=Pe.ch,Lt=Pe.ch;if($e){var kt=this.getHelper(Pe,"wordChars");(Pe.sticky=="before"||Lt==$e.length)&&pt?--pt:++Lt;for(var Rt=$e.charAt(pt),nn=nt(Rt,kt)?function(_t){return nt(_t,kt)}:/\s/.test(Rt)?function(_t){return/\s/.test(_t)}:function(_t){return!/\s/.test(_t)&&!nt(_t)};pt>0&&nn($e.charAt(pt-1));)--pt;for(;Lt<$e.length&&nn($e.charAt(Lt));)++Lt}return new To(tn(Pe.line,pt),tn(Pe.line,Lt))},toggleOverwrite:function(Pe){Pe!=null&&Pe==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Xe(this.display.cursorDiv,"CodeMirror-overwrite"):De(this.display.cursorDiv,"CodeMirror-overwrite"),rn(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(Pe,Oe){Bu(this,Pe,Oe)}),getScrollInfo:function(){var Pe=this.display.scroller;return{left:Pe.scrollLeft,top:Pe.scrollTop,height:Pe.scrollHeight-vo(this)-this.display.barHeight,width:Pe.scrollWidth-vo(this)-this.display.barWidth,clientHeight:ds(this),clientWidth:fs(this)}},scrollIntoView:Ha(function(Pe,Oe){Pe==null?(Pe={from:this.doc.sel.primary().head,to:null},Oe==null&&(Oe=this.options.cursorScrollMargin)):typeof Pe=="number"?Pe={from:tn(Pe,0),to:null}:Pe.from==null&&(Pe={from:Pe,to:null}),Pe.to||(Pe.to=Pe.from),Pe.margin=Oe||0,Pe.from.line!=null?uo(this,Pe):zh(this,Pe.from,Pe.to,Pe.margin)}),setSize:Ha(function(Pe,Oe){var $e=this,pt=function(kt){return typeof kt=="number"||/^\d+$/.test(String(kt))?kt+"px":kt};Pe!=null&&(this.display.wrapper.style.width=pt(Pe)),Oe!=null&&(this.display.wrapper.style.height=pt(Oe)),this.options.lineWrapping&&Zl(this);var Lt=this.display.viewFrom;this.doc.iter(Lt,this.display.viewTo,function(kt){if(kt.widgets){for(var Rt=0;Rt<kt.widgets.length;Rt++)if(kt.widgets[Rt].noHScroll){Wi($e,Lt,"widget");break}}++Lt}),this.curOp.forceUpdate=!0,rn(this,"refresh",this)}),operation:function(Pe){return yo(this,Pe)},startOperation:function(){return sl(this)},endOperation:function(){return Fl(this)},refresh:Ha(function(){var Pe=this.display.cachedTextHeight;Do(this),this.curOp.forceUpdate=!0,uu(this),Bu(this,this.doc.scrollLeft,this.doc.scrollTop),sh(this.display),(Pe==null||Math.abs(Pe-ba(this.display))>.5||this.options.lineWrapping)&&Si(this),rn(this,"refresh",this)}),swapDoc:Ha(function(Pe){var Oe=this.doc;return Oe.cm=null,this.state.selectingText&&this.state.selectingText(),rd(this,Pe),uu(this),this.display.input.reset(),Bu(this,Pe.scrollLeft,Pe.scrollTop),this.curOp.forceScroll=!0,Ir(this,"swapDoc",this,Oe),Oe}),phrase:function(Pe){var Oe=this.options.phrases;return Oe&&Object.prototype.hasOwnProperty.call(Oe,Pe)?Oe[Pe]:Pe},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}},Cn(re),re.registerHelper=function(Pe,Oe,$e){Ce.hasOwnProperty(Pe)||(Ce[Pe]=re[Pe]={_global:[]}),Ce[Pe][Oe]=$e},re.registerGlobalHelper=function(Pe,Oe,$e,pt){re.registerHelper(Pe,Oe,pt),Ce[Pe]._global.push({pred:$e,val:pt})}}function Lf(re,ce,Ce,Pe,Oe){var $e=ce,pt=Ce,Lt=Yn(re,ce.line),kt=Oe&&re.direction=="rtl"?-Ce:Ce;function Rt(){var ui=ce.line+kt;return ui<re.first||ui>=re.first+re.size?!1:(ce=new tn(ui,ce.ch,ce.sticky),Lt=Yn(re,ui))}function nn(ui){var Yr;if(Pe=="codepoint"){var vi=Lt.text.charCodeAt(ce.ch+(Pe>0?0:-1));isNaN(vi)?Yr=null:Yr=new tn(ce.line,Math.max(0,Math.min(Lt.text.length,ce.ch+Ce*(vi>=55296&&vi<56320?2:1))),-Ce)}else Oe?Yr=cd(re.cm,Lt,ce,Ce):Yr=Sa(Lt,ce,Ce);if(Yr==null)if(!ui&&Rt())ce=Ef(Oe,re.cm,Lt,ce.line,kt);else return!1;else ce=Yr;return!0}if(Pe=="char"||Pe=="codepoint")nn();else if(Pe=="column")nn(!0);else if(Pe=="word"||Pe=="group")for(var _t=null,mn=Pe=="group",dn=re.cm&&re.cm.getHelper(ce,"wordChars"),lr=!0;!(Ce<0&&!nn(!lr));lr=!1){var dr=Lt.text.charAt(ce.ch)||`
|
|
`,br=nt(dr,dn)?"w":mn&&dr==`
|
|
`?"n":!mn||/\s/.test(dr)?null:"p";if(mn&&!lr&&!br&&(br="s"),_t&&_t!=br){Ce<0&&(Ce=1,nn(),ce.sticky="after");break}if(br&&(_t=br),Ce>0&&!nn(!lr))break}var Fr=Sf(re,ce,$e,pt,!0);return jn($e,Fr)&&(Fr.hitSide=!0),Fr}function vh(re,ce,Ce,Pe){var Oe=re.doc,$e=ce.left,pt;if(Pe=="page"){var Lt=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),kt=Math.max(Lt-.5*ba(re.display),3);pt=(Ce>0?ce.bottom:ce.top)+Ce*kt}else Pe=="line"&&(pt=Ce>0?ce.bottom+3:ce.top-3);for(var Rt;Rt=sa(re,$e,pt),!!Rt.outside;){if(Ce<0?pt<=0:pt>=Oe.height){Rt.hitSide=!0;break}pt+=Ce*5}return Rt}var Bo=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new rt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Bo.prototype.init=function(re){var ce=this,Ce=this,Pe=Ce.cm,Oe=Ce.div=re.lineDiv;Ip(Oe,Pe.options.spellcheck,Pe.options.autocorrect,Pe.options.autocapitalize);function $e(Lt){for(var kt=Lt.target;kt;kt=kt.parentNode){if(kt==Oe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(kt.className))break}return!1}Vt(Oe,"paste",function(Lt){!$e(Lt)||un(Pe,Lt)||Dp(Lt,Pe)||de<=11&&setTimeout(Da(Pe,function(){return ce.updateFromDOM()}),20)}),Vt(Oe,"compositionstart",function(Lt){ce.composing={data:Lt.data,done:!1}}),Vt(Oe,"compositionupdate",function(Lt){ce.composing||(ce.composing={data:Lt.data,done:!1})}),Vt(Oe,"compositionend",function(Lt){ce.composing&&(Lt.data!=ce.composing.data&&ce.readFromDOMSoon(),ce.composing.done=!0)}),Vt(Oe,"touchstart",function(){return Ce.forceCompositionEnd()}),Vt(Oe,"input",function(){ce.composing||ce.readFromDOMSoon()});function pt(Lt){if(!(!$e(Lt)||un(Pe,Lt))){if(Pe.somethingSelected())tc({lineWise:!1,text:Pe.getSelections()}),Lt.type=="cut"&&Pe.replaceSelection("",null,"cut");else if(Pe.options.lineWiseCopyCut){var kt=Rp(Pe);tc({lineWise:!0,text:kt.text}),Lt.type=="cut"&&Pe.operation(function(){Pe.setSelections(kt.ranges,0,ht),Pe.replaceSelection("",null,"cut")})}else return;if(Lt.clipboardData){Lt.clipboardData.clearData();var Rt=Rs.text.join(`
|
|
`);if(Lt.clipboardData.setData("Text",Rt),Lt.clipboardData.getData("Text")==Rt){Lt.preventDefault();return}}var nn=_p(),_t=nn.firstChild;Pe.display.lineSpace.insertBefore(nn,Pe.display.lineSpace.firstChild),_t.value=Rs.text.join(`
|
|
`);var mn=document.activeElement;lt(_t),setTimeout(function(){Pe.display.lineSpace.removeChild(nn),mn.focus(),mn==Oe&&Ce.showPrimarySelection()},50)}}Vt(Oe,"copy",pt),Vt(Oe,"cut",pt)},Bo.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Bo.prototype.prepareSelection=function(){var re=hu(this.cm,!1);return re.focus=document.activeElement==this.div,re},Bo.prototype.showSelection=function(re,ce){!re||!this.cm.display.view.length||((re.focus||ce)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Bo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Bo.prototype.showPrimarySelection=function(){var re=this.getSelection(),ce=this.cm,Ce=ce.doc.sel.primary(),Pe=Ce.from(),Oe=Ce.to();if(ce.display.viewTo==ce.display.viewFrom||Pe.line>=ce.display.viewTo||Oe.line<ce.display.viewFrom){re.removeAllRanges();return}var $e=Mf(ce,re.anchorNode,re.anchorOffset),pt=Mf(ce,re.focusNode,re.focusOffset);if(!($e&&!$e.bad&&pt&&!pt.bad&&Nn(Kn($e,pt),Pe)==0&&Nn(An($e,pt),Oe)==0)){var Lt=ce.display.view,kt=Pe.line>=ce.display.viewFrom&&wd(ce,Pe)||{node:Lt[0].measure.map[2],offset:0},Rt=Oe.line<ce.display.viewTo&&wd(ce,Oe);if(!Rt){var nn=Lt[Lt.length-1].measure,_t=nn.maps?nn.maps[nn.maps.length-1]:nn.map;Rt={node:_t[_t.length-1],offset:_t[_t.length-2]-_t[_t.length-3]}}if(!kt||!Rt){re.removeAllRanges();return}var mn=re.rangeCount&&re.getRangeAt(0),dn;try{dn=Ge(kt.node,kt.offset,Rt.offset,Rt.node)}catch(lr){}dn&&(!at&&ce.state.focused?(re.collapse(kt.node,kt.offset),dn.collapsed||(re.removeAllRanges(),re.addRange(dn))):(re.removeAllRanges(),re.addRange(dn)),mn&&re.anchorNode==null?re.addRange(mn):at&&this.startGracePeriod()),this.rememberSelection()}},Bo.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)},Bo.prototype.showMultipleSelections=function(re){Te(this.cm.display.cursorDiv,re.cursors),Te(this.cm.display.selectionDiv,re.selection)},Bo.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Bo.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var ce=re.getRangeAt(0).commonAncestorContainer;return Ye(this.div,ce)},Bo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Bo.prototype.blur=function(){this.div.blur()},Bo.prototype.getField=function(){return this.div},Bo.prototype.supportsTouch=function(){return!0},Bo.prototype.receivedFocus=function(){var re=this;this.selectionInEditor()?this.pollSelection():yo(this.cm,function(){return re.cm.curOp.selectionChanged=!0});function ce(){re.cm.state.focused&&(re.pollSelection(),re.polling.set(re.cm.options.pollInterval,ce))}this.polling.set(this.cm.options.pollInterval,ce)},Bo.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Bo.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var re=this.getSelection(),ce=this.cm;if(z&&ke&&this.cm.display.gutterSpecs.length&&zp(re.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Ce=Mf(ce,re.anchorNode,re.anchorOffset),Pe=Mf(ce,re.focusNode,re.focusOffset);Ce&&Pe&&yo(ce,function(){gs(ce.doc,Ru(Ce,Pe),ht),(Ce.bad||Pe.bad)&&(ce.curOp.selectionChanged=!0)})}}},Bo.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var re=this.cm,ce=re.display,Ce=re.doc.sel.primary(),Pe=Ce.from(),Oe=Ce.to();if(Pe.ch==0&&Pe.line>re.firstLine()&&(Pe=tn(Pe.line-1,Yn(re.doc,Pe.line-1).length)),Oe.ch==Yn(re.doc,Oe.line).text.length&&Oe.line<re.lastLine()&&(Oe=tn(Oe.line+1,0)),Pe.line<ce.viewFrom||Oe.line>ce.viewTo-1)return!1;var $e,pt,Lt;Pe.line==ce.viewFrom||($e=Ds(re,Pe.line))==0?(pt=Mt(ce.view[0].line),Lt=ce.view[0].node):(pt=Mt(ce.view[$e].line),Lt=ce.view[$e-1].node.nextSibling);var kt=Ds(re,Oe.line),Rt,nn;if(kt==ce.view.length-1?(Rt=ce.viewTo-1,nn=ce.lineDiv.lastChild):(Rt=Mt(ce.view[kt+1].line)-1,nn=ce.view[kt+1].node.previousSibling),!Lt)return!1;for(var _t=re.doc.splitLines(Uc(re,Lt,nn,pt,Rt)),mn=Hn(re.doc,tn(pt,0),tn(Rt,Yn(re.doc,Rt).text.length));_t.length>1&&mn.length>1;)if(gt(_t)==gt(mn))_t.pop(),mn.pop(),Rt--;else if(_t[0]==mn[0])_t.shift(),mn.shift(),pt++;else break;for(var dn=0,lr=0,dr=_t[0],br=mn[0],Fr=Math.min(dr.length,br.length);dn<Fr&&dr.charCodeAt(dn)==br.charCodeAt(dn);)++dn;for(var ui=gt(_t),Yr=gt(mn),vi=Math.min(ui.length-(_t.length==1?dn:0),Yr.length-(mn.length==1?dn:0));lr<vi&&ui.charCodeAt(ui.length-lr-1)==Yr.charCodeAt(Yr.length-lr-1);)++lr;if(_t.length==1&&mn.length==1&&pt==Pe.line)for(;dn&&dn>Pe.ch&&ui.charCodeAt(ui.length-lr-1)==Yr.charCodeAt(Yr.length-lr-1);)dn--,lr++;_t[_t.length-1]=ui.slice(0,ui.length-lr).replace(/^\u200b+/,""),_t[0]=_t[0].slice(dn).replace(/\u200b+$/,"");var zi=tn(pt,dn),Hr=tn(Rt,mn.length?gt(mn).length-lr:0);if(_t.length>1||_t[0]||Nn(zi,Hr))return Zh(re.doc,_t,zi,Hr,"+input"),!0},Bo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Bo.prototype.reset=function(){this.forceCompositionEnd()},Bo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Bo.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))},Bo.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&yo(this.cm,function(){return Do(re.cm)})},Bo.prototype.setUneditable=function(re){re.contentEditable="false"},Bo.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))},Bo.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Bo.prototype.onContextMenu=function(){},Bo.prototype.resetPosition=function(){},Bo.prototype.needsContentAttribute=!0;function wd(re,ce){var Ce=il(re,ce.line);if(!Ce||Ce.hidden)return null;var Pe=Yn(re.doc,ce.line),Oe=na(Ce,Pe,ce.line),$e=Kt(Pe,re.doc.direction),pt="left";if($e){var Lt=Et($e,ce.ch);pt=Lt%2?"right":"left"}var kt=th(Oe.map,ce.ch,pt);return kt.offset=kt.collapse=="right"?kt.end:kt.start,kt}function zp(re){for(var ce=re;ce;ce=ce.parentNode)if(/CodeMirror-gutter-wrapper/.test(ce.className))return!0;return!1}function Gc(re,ce){return ce&&(re.bad=!0),re}function Uc(re,ce,Ce,Pe,Oe){var $e="",pt=!1,Lt=re.doc.lineSeparator(),kt=!1;function Rt(dn){return function(lr){return lr.id==dn}}function nn(){pt&&($e+=Lt,kt&&($e+=Lt),pt=kt=!1)}function _t(dn){dn&&(nn(),$e+=dn)}function mn(dn){if(dn.nodeType==1){var lr=dn.getAttribute("cm-text");if(lr){_t(lr);return}var dr=dn.getAttribute("cm-marker"),br;if(dr){var Fr=re.findMarks(tn(Pe,0),tn(Oe+1,0),Rt(+dr));Fr.length&&(br=Fr[0].find(0))&&_t(Hn(re.doc,br.from,br.to).join(Lt));return}if(dn.getAttribute("contenteditable")=="false")return;var ui=/^(pre|div|p|li|table|br)$/i.test(dn.nodeName);if(!/^br$/i.test(dn.nodeName)&&dn.textContent.length==0)return;ui&&nn();for(var Yr=0;Yr<dn.childNodes.length;Yr++)mn(dn.childNodes[Yr]);/^(pre|p)$/i.test(dn.nodeName)&&(kt=!0),ui&&(pt=!0)}else dn.nodeType==3&&_t(dn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;mn(ce),ce!=Ce;)ce=ce.nextSibling,kt=!1;return $e}function Mf(re,ce,Ce){var Pe;if(ce==re.display.lineDiv){if(Pe=re.display.lineDiv.childNodes[Ce],!Pe)return Gc(re.clipPos(tn(re.display.viewTo-1)),!0);ce=null,Ce=0}else for(Pe=ce;;Pe=Pe.parentNode){if(!Pe||Pe==re.display.lineDiv)return null;if(Pe.parentNode&&Pe.parentNode==re.display.lineDiv)break}for(var Oe=0;Oe<re.display.view.length;Oe++){var $e=re.display.view[Oe];if($e.node==Pe)return am($e,ce,Ce)}}function am(re,ce,Ce){var Pe=re.text.firstChild,Oe=!1;if(!ce||!Ye(Pe,ce))return Gc(tn(Mt(re.line),0),!0);if(ce==Pe&&(Oe=!0,ce=Pe.childNodes[Ce],Ce=0,!ce)){var $e=re.rest?gt(re.rest):re.line;return Gc(tn(Mt($e),$e.text.length),Oe)}var pt=ce.nodeType==3?ce:null,Lt=ce;for(!pt&&ce.childNodes.length==1&&ce.firstChild.nodeType==3&&(pt=ce.firstChild,Ce&&(Ce=pt.nodeValue.length));Lt.parentNode!=Pe;)Lt=Lt.parentNode;var kt=re.measure,Rt=kt.maps;function nn(br,Fr,ui){for(var Yr=-1;Yr<(Rt?Rt.length:0);Yr++)for(var vi=Yr<0?kt.map:Rt[Yr],zi=0;zi<vi.length;zi+=3){var Hr=vi[zi+2];if(Hr==br||Hr==Fr){var eo=Mt(Yr<0?re.line:re.rest[Yr]),Yo=vi[zi]+ui;return(ui<0||Hr!=br)&&(Yo=vi[zi+(ui?1:0)]),tn(eo,Yo)}}}var _t=nn(pt,Lt,Ce);if(_t)return Gc(_t,Oe);for(var mn=Lt.nextSibling,dn=pt?pt.nodeValue.length-Ce:0;mn;mn=mn.nextSibling){if(_t=nn(mn,mn.firstChild,0),_t)return Gc(tn(_t.line,_t.ch-dn),Oe);dn+=mn.textContent.length}for(var lr=Lt.previousSibling,dr=Ce;lr;lr=lr.previousSibling){if(_t=nn(lr,lr.firstChild,-1),_t)return Gc(tn(_t.line,_t.ch+dr),Oe);dr+=lr.textContent.length}}var Ta=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new rt,this.hasSelection=!1,this.composing=null};Ta.prototype.init=function(re){var ce=this,Ce=this,Pe=this.cm;this.createField(re);var Oe=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),fe&&(Oe.style.width="0px"),Vt(Oe,"input",function(){Ie&&de>=9&&ce.hasSelection&&(ce.hasSelection=null),Ce.poll()}),Vt(Oe,"paste",function(pt){un(Pe,pt)||Dp(pt,Pe)||(Pe.state.pasteIncoming=+new Date,Ce.fastPoll())});function $e(pt){if(!un(Pe,pt)){if(Pe.somethingSelected())tc({lineWise:!1,text:Pe.getSelections()});else if(Pe.options.lineWiseCopyCut){var Lt=Rp(Pe);tc({lineWise:!0,text:Lt.text}),pt.type=="cut"?Pe.setSelections(Lt.ranges,null,ht):(Ce.prevInput="",Oe.value=Lt.text.join(`
|
|
`),lt(Oe))}else return;pt.type=="cut"&&(Pe.state.cutIncoming=+new Date)}}Vt(Oe,"cut",$e),Vt(Oe,"copy",$e),Vt(re.scroller,"paste",function(pt){if(!(Oo(re,pt)||un(Pe,pt))){if(!Oe.dispatchEvent){Pe.state.pasteIncoming=+new Date,Ce.focus();return}var Lt=new Event("paste");Lt.clipboardData=pt.clipboardData,Oe.dispatchEvent(Lt)}}),Vt(re.lineSpace,"selectstart",function(pt){Oo(re,pt)||On(pt)}),Vt(Oe,"compositionstart",function(){var pt=Pe.getCursor("from");Ce.composing&&Ce.composing.range.clear(),Ce.composing={start:pt,range:Pe.markText(pt,Pe.getCursor("to"),{className:"CodeMirror-composing"})}}),Vt(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,ce=re.display,Ce=re.doc,Pe=hu(re);if(re.options.moveInputWithCursor){var Oe=co(re,Ce.sel.primary().head,"div"),$e=ce.wrapper.getBoundingClientRect(),pt=ce.lineDiv.getBoundingClientRect();Pe.teTop=Math.max(0,Math.min(ce.wrapper.clientHeight-10,Oe.top+pt.top-$e.top)),Pe.teLeft=Math.max(0,Math.min(ce.wrapper.clientWidth-10,Oe.left+pt.left-$e.left))}return Pe},Ta.prototype.showSelection=function(re){var ce=this.cm,Ce=ce.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 ce=this.cm;if(ce.somethingSelected()){this.prevInput="";var Ce=ce.getSelection();this.textarea.value=Ce,ce.state.focused&<(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,ce=this;ce.pollingFast=!0;function Ce(){var Pe=ce.poll();!Pe&&!re?(re=!0,ce.polling.set(60,Ce)):(ce.pollingFast=!1,ce.slowPoll())}ce.polling.set(20,Ce)},Ta.prototype.poll=function(){var re=this,ce=this.cm,Ce=this.textarea,Pe=this.prevInput;if(this.contextMenuPending||!ce.state.focused||et(Ce)&&!Pe&&!this.composing||ce.isReadOnly()||ce.options.disableInput||ce.state.keySeq)return!1;var Oe=Ce.value;if(Oe==Pe&&!ce.somethingSelected())return!1;if(Ie&&de>=9&&this.hasSelection===Oe||se&&/[\uf700-\uf7ff]/.test(Oe))return ce.display.input.reset(),!1;if(ce.doc.sel==ce.display.selForContextMenu){var $e=Oe.charCodeAt(0);if($e==8203&&!Pe&&(Pe="\u200B"),$e==8666)return this.reset(),this.cm.execCommand("undo")}for(var pt=0,Lt=Math.min(Pe.length,Oe.length);pt<Lt&&Pe.charCodeAt(pt)==Oe.charCodeAt(pt);)++pt;return yo(ce,function(){Tf(ce,Oe.slice(pt),Pe.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=ce.markText(re.composing.start,ce.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 ce=this,Ce=ce.cm,Pe=Ce.display,Oe=ce.textarea;ce.contextMenuPending&&ce.contextMenuPending();var $e=Ua(Ce,re),pt=Pe.scroller.scrollTop;if(!$e||Se)return;var Lt=Ce.options.resetSelectionOnContextMenu;Lt&&Ce.doc.sel.contains($e)==-1&&Da(Ce,gs)(Ce.doc,Ru($e),ht);var kt=Oe.style.cssText,Rt=ce.wrapper.style.cssText,nn=ce.wrapper.offsetParent.getBoundingClientRect();ce.wrapper.style.cssText="position: static",Oe.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(re.clientY-nn.top-5)+"px; left: "+(re.clientX-nn.left-5)+`px;
|
|
z-index: 1000; background: `+(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),Pe.input.focus(),ve&&window.scrollTo(null,_t),Pe.input.reset(),Ce.somethingSelected()||(Oe.value=ce.prevInput=" "),ce.contextMenuPending=dn,Pe.selForContextMenu=Ce.doc.sel,clearTimeout(Pe.detectingSelectAll);function mn(){if(Oe.selectionStart!=null){var dr=Ce.somethingSelected(),br="\u200B"+(dr?Oe.value:"");Oe.value="\u21DA",Oe.value=br,ce.prevInput=dr?"":"\u200B",Oe.selectionStart=1,Oe.selectionEnd=br.length,Pe.selForContextMenu=Ce.doc.sel}}function dn(){if(ce.contextMenuPending==dn&&(ce.contextMenuPending=!1,ce.wrapper.style.cssText=Rt,Oe.style.cssText=kt,Ie&&de<9&&Pe.scrollbars.setScrollTop(Pe.scroller.scrollTop=pt),Oe.selectionStart!=null)){(!Ie||Ie&&de<9)&&mn();var dr=0,br=function(){Pe.selForContextMenu==Ce.doc.sel&&Oe.selectionStart==0&&Oe.selectionEnd>0&&ce.prevInput=="\u200B"?Da(Ce,ya)(Ce):dr++<10?Pe.detectingSelectAll=setTimeout(br,500):(Pe.selForContextMenu=null,Pe.input.reset())};Pe.detectingSelectAll=setTimeout(br,200)}}if(Ie&&de>=9&&mn(),xe){qr(re);var lr=function(){sn(window,"mouseup",lr),setTimeout(dn,20)};Vt(window,"mouseup",lr)}else setTimeout(dn,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,ce){if(ce=ce?Ct(ce):{},ce.value=re.value,!ce.tabindex&&re.tabIndex&&(ce.tabindex=re.tabIndex),!ce.placeholder&&re.placeholder&&(ce.placeholder=re.placeholder),ce.autofocus==null){var Ce=Ke();ce.autofocus=Ce==re||re.getAttribute("autofocus")!=null&&Ce==document.body}function Pe(){re.value=Lt.getValue()}var Oe;if(re.form&&(Vt(re.form,"submit",Pe),!ce.leaveSubmitMethodAlone)){var $e=re.form;Oe=$e.submit;try{var pt=$e.submit=function(){Pe(),$e.submit=Oe,$e.submit(),$e.submit=pt}}catch(kt){}}ce.finishInit=function(kt){kt.save=Pe,kt.getTextArea=function(){return re},kt.toTextArea=function(){kt.toTextArea=isNaN,Pe(),re.parentNode.removeChild(kt.getWrapperElement()),re.style.display="",re.form&&(sn(re.form,"submit",Pe),!ce.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=Oe))}},re.style.display="none";var Lt=po(function(kt){return re.parentNode.insertBefore(kt,re.nextSibling)},ce);return Lt}function Hc(re){re.off=sn,re.on=Vt,re.wheelEventPixels=ul,re.Doc=os,re.splitLines=Li,re.countColumn=Je,re.findColumn=Nt,re.isWordChar=Ve,re.Pass=Pt,re.signal=rn,re.Line=Ti,re.changeEnd=hh,re.scrollbarModel=fu,re.Pos=tn,re.cmpPos=Nn,re.modes=Tn,re.mimeModes=Dn,re.resolveMode=Ar,re.getMode=Qt,re.modeExtensions=Zt,re.extendMode=Ut,re.copyState=Un,re.startState=mr,re.innerMode=pr,re.commands=ph,re.keyMap=Vs,re.keyName=qg,re.isModifierKey=Dc,re.lookupKey=bl,re.normalizeKeyMap=wp,re.StringStream=xn,re.SharedTextMarker=gu,re.TextMarker=Jt,re.LineWidget=zu,re.e_preventDefault=On,re.e_stopPropagation=Dr,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)&&xt(Gu,Nf)<0&&(po.prototype[Nf]=function(re){return function(){return re.apply(this.doc,arguments)}}(os.prototype[Nf]));return Cn(os),po.inputStyles={textarea:Ta,contenteditable:Bo},po.defineMode=function(re){!po.defaults.mode&&re!="null"&&(po.defaults.mode=re),Pr.apply(this,arguments)},po.defineMIME=Br,po.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),po.defineMIME("text/plain","null"),po.defineExtension=function(re,ce){po.prototype[re]=ce},po.defineDocExtension=function(re,ce){os.prototype[re]=ce},po.fromTextArea=sm,Hc(po),po.version="5.58.2",po})},25419:function(_n,Mn,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 rt=at.findModeByName(Je);rt&&(Je=rt.mime||rt.mimes[0])}var xt=at.getMode(Gt,Je);return xt.name=="null"?null:xt}oe.highlightFormatting===void 0&&(oe.highlightFormatting=!1),oe.maxBlockquoteDepth===void 0&&(oe.maxBlockquoteDepth=0),oe.taskLists===void 0&&(oe.taskLists=!1),oe.strikethrough===void 0&&(oe.strikethrough=!1),oe.emoji===void 0&&(oe.emoji=!1),oe.fencedCodeBlockHighlighting===void 0&&(oe.fencedCodeBlockHighlighting=!0),oe.fencedCodeBlockDefaultMode===void 0&&(oe.fencedCodeBlockDefaultMode="text/plain"),oe.xml===void 0&&(oe.xml=!0),oe.tokenTypeOverrides===void 0&&(oe.tokenTypeOverrides={});var ve={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var Ee in ve)ve.hasOwnProperty(Ee)&&oe.tokenTypeOverrides[Ee]&&(ve[Ee]=oe.tokenTypeOverrides[Ee]);var ke=/^([*\-_])(?:\s*\1){2,}\s*$/,Se=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ae=/^\[(x| )\](?=\s)/i,me=oe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,be=/^ {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,rt,xt){return rt.f=rt.inline=xt,xt(Je,rt)}function he(Je,rt,xt){return rt.f=rt.block=xt,xt(Je,rt)}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 rt=Ie;if(!rt){var xt=at.innerMode(Ue,Je.htmlState);rt=xt.mode.name=="xml"&&xt.state.tagStart===null&&!xt.state.context&&xt.state.tokenize.isInText}rt&&(Je.f=Be,Je.block=je,Je.htmlState=null)}return Je.trailingSpace=0,Je.trailingSpaceNewLine=!1,Je.prevLine=Je.thisLine,Je.thisLine={stream:null},null}function je(Je,rt){var xt=Je.column()===rt.indentation,bt=pe(rt.prevLine.stream),Pt=rt.indentedCode,ht=rt.prevLine.hr,St=rt.list!==!1,mt=(rt.listStack[rt.listStack.length-1]||0)+3;rt.indentedCode=!1;var Nt=rt.indentation;if(rt.indentationDiff===null&&(rt.indentationDiff=rt.indentation,St)){for(rt.list=null;Nt<rt.listStack[rt.listStack.length-1];)rt.listStack.pop(),rt.listStack.length?rt.indentation=rt.listStack[rt.listStack.length-1]:rt.list=!1;rt.list!==!1&&(rt.indentationDiff=Nt-rt.listStack[rt.listStack.length-1])}var dt=!bt&&!ht&&!rt.prevLine.header&&(!St||!Pt)&&!rt.prevLine.fencedCodeEnd,Dt=(rt.list===!1||ht||bt)&&rt.indentation<=mt&&Je.match(ke),gt=null;if(rt.indentationDiff>=4&&(Pt||rt.prevLine.fencedCodeEnd||rt.prevLine.header||bt))return Je.skipToEnd(),rt.indentedCode=!0,ve.code;if(Je.eatSpace())return null;if(xt&&rt.indentation<=mt&&(gt=Je.match(me))&>[1].length<=6)return rt.quote=0,rt.header=gt[1].length,rt.thisLine.header=!0,oe.highlightFormatting&&(rt.formatting="header"),rt.f=rt.inline,Te(rt);if(rt.indentation<=mt&&Je.eat(">"))return rt.quote=xt?1:rt.quote+1,oe.highlightFormatting&&(rt.formatting="quote"),Je.eatSpace(),Te(rt);if(!Dt&&!rt.setext&&xt&&rt.indentation<=mt&&(gt=Je.match(Se))){var yt=gt[1]?"ol":"ul";return rt.indentation=Nt+Je.current().length,rt.list=!0,rt.quote=0,rt.listStack.push(rt.indentation),rt.em=!1,rt.strong=!1,rt.code=!1,rt.strikethrough=!1,oe.taskLists&&Je.match(Ae,!1)&&(rt.taskList=!0),rt.f=rt.inline,oe.highlightFormatting&&(rt.formatting=["list","list-"+yt]),Te(rt)}else{if(xt&&rt.indentation<=mt&&(gt=Je.match(z,!0)))return rt.quote=0,rt.fencedEndRE=new RegExp(gt[1]+"+ *$"),rt.localMode=oe.fencedCodeBlockHighlighting&&de(gt[2]||oe.fencedCodeBlockDefaultMode),rt.localMode&&(rt.localState=at.startState(rt.localMode)),rt.f=rt.block=Fe,oe.highlightFormatting&&(rt.formatting="code-block"),rt.code=-1,Te(rt);if(rt.setext||(!dt||!St)&&!rt.quote&&rt.list===!1&&!rt.code&&!Dt&&!te.test(Je.string)&&(gt=Je.lookAhead(1))&&(gt=gt.match(be)))return rt.setext?(rt.header=rt.setext,rt.setext=0,Je.skipToEnd(),oe.highlightFormatting&&(rt.formatting="header")):(rt.header=gt[0].charAt(0)=="="?1:2,rt.setext=rt.header),rt.thisLine.header=!0,rt.f=rt.inline,Te(rt);if(Dt)return Je.skipToEnd(),rt.hr=!0,rt.thisLine.hr=!0,ve.hr;if(Je.peek()==="[")return le(Je,rt,ot)}return le(Je,rt,rt.inline)}function De(Je,rt){var xt=Ue.token(Je,rt.htmlState);if(!Ie){var bt=at.innerMode(Ue,rt.htmlState);(bt.mode.name=="xml"&&bt.state.tagStart===null&&!bt.state.context&&bt.state.tokenize.isInText||rt.md_inside&&Je.current().indexOf(">")>-1)&&(rt.f=Be,rt.block=je,rt.htmlState=null)}return xt}function Fe(Je,rt){var xt=rt.listStack[rt.listStack.length-1]||0,bt=rt.indentation<xt,Pt=xt+3;if(rt.fencedEndRE&&rt.indentation<=Pt&&(bt||Je.match(rt.fencedEndRE))){oe.highlightFormatting&&(rt.formatting="code-block");var ht;return bt||(ht=Te(rt)),rt.localMode=rt.localState=null,rt.block=je,rt.f=Be,rt.fencedEndRE=null,rt.code=0,rt.thisLine.fencedCodeEnd=!0,bt?he(Je,rt,rt.block):ht}else return rt.localMode?rt.localMode.token(Je,rt.localState):(Je.skipToEnd(),ve.code)}function Te(Je){var rt=[];if(Je.formatting){rt.push(ve.formatting),typeof Je.formatting=="string"&&(Je.formatting=[Je.formatting]);for(var xt=0;xt<Je.formatting.length;xt++)rt.push(ve.formatting+"-"+Je.formatting[xt]),Je.formatting[xt]==="header"&&rt.push(ve.formatting+"-"+Je.formatting[xt]+"-"+Je.header),Je.formatting[xt]==="quote"&&(!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=Je.quote?rt.push(ve.formatting+"-"+Je.formatting[xt]+"-"+Je.quote):rt.push("error"))}if(Je.taskOpen)return rt.push("meta"),rt.length?rt.join(" "):null;if(Je.taskClosed)return rt.push("property"),rt.length?rt.join(" "):null;if(Je.linkHref?rt.push(ve.linkHref,"url"):(Je.strong&&rt.push(ve.strong),Je.em&&rt.push(ve.em),Je.strikethrough&&rt.push(ve.strikethrough),Je.emoji&&rt.push(ve.emoji),Je.linkText&&rt.push(ve.linkText),Je.code&&rt.push(ve.code),Je.image&&rt.push(ve.image),Je.imageAltText&&rt.push(ve.imageAltText,"link"),Je.imageMarker&&rt.push(ve.imageMarker)),Je.header&&rt.push(ve.header,ve.header+"-"+Je.header),Je.quote&&(rt.push(ve.quote),!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=Je.quote?rt.push(ve.quote+"-"+Je.quote):rt.push(ve.quote+"-"+oe.maxBlockquoteDepth)),Je.list!==!1){var bt=(Je.listStack.length-1)%3;bt?bt===1?rt.push(ve.list2):rt.push(ve.list3):rt.push(ve.list1)}return Je.trailingSpaceNewLine?rt.push("trailing-space-new-line"):Je.trailingSpace&&rt.push("trailing-space-"+(Je.trailingSpace%2?"a":"b")),rt.length?rt.join(" "):null}function Me(Je,rt){if(Je.match(fe,!0))return Te(rt)}function Be(Je,rt){var xt=rt.text(Je,rt);if(typeof xt!="undefined")return xt;if(rt.list)return rt.list=null,Te(rt);if(rt.taskList){var bt=Je.match(Ae,!0)[1]===" ";return bt?rt.taskOpen=!0:rt.taskClosed=!0,oe.highlightFormatting&&(rt.formatting="task"),rt.taskList=!1,Te(rt)}if(rt.taskOpen=!1,rt.taskClosed=!1,rt.header&&Je.match(/^#+$/,!0))return oe.highlightFormatting&&(rt.formatting="header"),Te(rt);var Pt=Je.next();if(rt.linkTitle){rt.linkTitle=!1;var ht=Pt;Pt==="("&&(ht=")"),ht=(ht+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var St="^\\s*(?:[^"+ht+"\\\\]+|\\\\\\\\|\\\\.)"+ht;if(Je.match(new RegExp(St),!0))return ve.linkHref}if(Pt==="`"){var mt=rt.formatting;oe.highlightFormatting&&(rt.formatting="code"),Je.eatWhile("`");var Nt=Je.current().length;if(rt.code==0&&(!rt.quote||Nt==1))return rt.code=Nt,Te(rt);if(Nt==rt.code){var dt=Te(rt);return rt.code=0,dt}else return rt.formatting=mt,Te(rt)}else if(rt.code)return Te(rt);if(Pt==="\\"&&(Je.next(),oe.highlightFormatting)){var Dt=Te(rt),gt=ve.formatting+"-escape";return Dt?Dt+" "+gt:gt}if(Pt==="!"&&Je.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return rt.imageMarker=!0,rt.image=!0,oe.highlightFormatting&&(rt.formatting="image"),Te(rt);if(Pt==="["&&rt.imageMarker&&Je.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return rt.imageMarker=!1,rt.imageAltText=!0,oe.highlightFormatting&&(rt.formatting="image"),Te(rt);if(Pt==="]"&&rt.imageAltText){oe.highlightFormatting&&(rt.formatting="image");var Dt=Te(rt);return rt.imageAltText=!1,rt.image=!1,rt.inline=rt.f=Ye,Dt}if(Pt==="["&&!rt.image)return rt.linkText&&Je.match(/^.*?\]/)||(rt.linkText=!0,oe.highlightFormatting&&(rt.formatting="link")),Te(rt);if(Pt==="]"&&rt.linkText){oe.highlightFormatting&&(rt.formatting="link");var Dt=Te(rt);return rt.linkText=!1,rt.inline=rt.f=Je.match(/\(.*?\)| ?\[.*?\]/,!1)?Ye:Be,Dt}if(Pt==="<"&&Je.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=Ge,oe.highlightFormatting&&(rt.formatting="link");var Dt=Te(rt);return Dt?Dt+=" ":Dt="",Dt+ve.linkInline}if(Pt==="<"&&Je.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=Ge,oe.highlightFormatting&&(rt.formatting="link");var Dt=Te(rt);return Dt?Dt+=" ":Dt="",Dt+ve.linkEmail}if(oe.xml&&Pt==="<"&&Je.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var yt=Je.string.indexOf(">",Je.pos);if(yt!=-1){var tt=Je.string.substring(Je.start,yt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(tt)&&(rt.md_inside=!0)}return Je.backUp(1),rt.htmlState=at.startState(Ue),he(Je,rt,De)}if(oe.xml&&Pt==="<"&&Je.match(/^\/\w*?>/))return rt.md_inside=!1,"tag";if(Pt==="*"||Pt==="_"){for(var He=1,we=Je.pos==1?" ":Je.string.charAt(Je.pos-2);He<3&&Je.eat(Pt);)He++;var Ne=Je.peek()||" ",Ve=!/\s/.test(Ne)&&(!se.test(Ne)||/\s/.test(we)||se.test(we)),nt=!/\s/.test(we)&&(!se.test(we)||/\s/.test(Ne)||se.test(Ne)),Re=null,_e=null;if(He%2&&(!rt.em&&Ve&&(Pt==="*"||!nt||se.test(we))?Re=!0:rt.em==Pt&&nt&&(Pt==="*"||!Ve||se.test(Ne))&&(Re=!1)),He>1&&(!rt.strong&&Ve&&(Pt==="*"||!nt||se.test(we))?_e=!0:rt.strong==Pt&&nt&&(Pt==="*"||!Ve||se.test(Ne))&&(_e=!1)),_e!=null||Re!=null){oe.highlightFormatting&&(rt.formatting=Re==null?"strong":_e==null?"em":"strong em"),Re===!0&&(rt.em=Pt),_e===!0&&(rt.strong=Pt);var dt=Te(rt);return Re===!1&&(rt.em=!1),_e===!1&&(rt.strong=!1),dt}}else if(Pt===" "&&(Je.eat("*")||Je.eat("_"))){if(Je.peek()===" ")return Te(rt);Je.backUp(1)}if(oe.strikethrough){if(Pt==="~"&&Je.eatWhile(Pt)){if(rt.strikethrough){oe.highlightFormatting&&(rt.formatting="strikethrough");var dt=Te(rt);return rt.strikethrough=!1,dt}else if(Je.match(/^[^\s]/,!1))return rt.strikethrough=!0,oe.highlightFormatting&&(rt.formatting="strikethrough"),Te(rt)}else if(Pt===" "&&Je.match(/^~~/,!0)){if(Je.peek()===" ")return Te(rt);Je.backUp(2)}}if(oe.emoji&&Pt===":"&&Je.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){rt.emoji=!0,oe.highlightFormatting&&(rt.formatting="emoji");var Ze=Te(rt);return rt.emoji=!1,Ze}return Pt===" "&&(Je.match(/^ +$/,!1)?rt.trailingSpace++:rt.trailingSpace&&(rt.trailingSpaceNewLine=!0)),Te(rt)}function Ge(Je,rt){var xt=Je.next();if(xt===">"){rt.f=rt.inline=Be,oe.highlightFormatting&&(rt.formatting="link");var bt=Te(rt);return bt?bt+=" ":bt="",bt+ve.linkInline}return Je.match(/^[^>]+/,!0),ve.linkInline}function Ye(Je,rt){if(Je.eatSpace())return null;var xt=Je.next();return xt==="("||xt==="["?(rt.f=rt.inline=Xe(xt==="("?")":"]"),oe.highlightFormatting&&(rt.formatting="link-string"),rt.linkHref=!0,Te(rt)):"error"}var Ke={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Xe(Je){return function(rt,xt){var bt=rt.next();if(bt===Je){xt.f=xt.inline=Be,oe.highlightFormatting&&(xt.formatting="link-string");var Pt=Te(xt);return xt.linkHref=!1,Pt}return rt.match(Ke[Je]),xt.linkHref=!0,Te(xt)}}function ot(Je,rt){return Je.match(/^([^\]\\]|\\.)*\]:/,!1)?(rt.f=lt,Je.next(),oe.highlightFormatting&&(rt.formatting="link"),rt.linkText=!0,Te(rt)):le(Je,rt,Be)}function lt(Je,rt){if(Je.match(/^\]:/,!0)){rt.f=rt.inline=ct,oe.highlightFormatting&&(rt.formatting="link");var xt=Te(rt);return rt.linkText=!1,xt}return Je.match(/^([^\]\\]|\\.)+/,!0),ve.linkText}function ct(Je,rt){return Je.eatSpace()?null:(Je.match(/^[^\s]+/,!0),Je.peek()===void 0?rt.linkTitle=!0:Je.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),rt.f=rt.inline=Be,ve.linkHref+" url")}var Ct={startState:function(){return{f:je,prevLine:{stream:null},thisLine:{stream:null},block:je,htmlState:null,indentation:0,inline:Be,text:Me,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(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,rt){if(rt.formatting=!1,Je!=rt.thisLine.stream){if(rt.header=0,rt.hr=!1,Je.match(/^\s*$/,!0))return xe(rt),null;if(rt.prevLine=rt.thisLine,rt.thisLine={stream:Je},rt.taskList=!1,rt.trailingSpace=0,rt.trailingSpaceNewLine=!1,!rt.localState&&(rt.f=rt.block,rt.f!=De)){var xt=Je.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(rt.indentation=xt,rt.indentationDiff=null,xt>0)return null}}return rt.f(Je,rt)},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,rt,xt){return Je.block==De&&Ue.indent?Ue.indent(Je.htmlState,rt,xt):Je.localState&&Je.localMode.indent?Je.localMode.indent(Je.localState,rt,xt):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(_n,Mn,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(_n,Mn,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 Ae(fe,z){var te;if(fe.match(/^\\[a-zA-Z@]+/)){var se=fe.current().slice(1);return te=ke.hasOwnProperty(se)?ke[se]:ke.DEFAULT,te=new te,Ue(z,te),Se(z,be),te.style}if(fe.match(/^\\[$&%#{}_]/)||fe.match(/^\\[,;!\/\\]/))return"tag";if(fe.match("\\["))return Se(z,function(le,he){return me(le,he,"\\]")}),"keyword";if(fe.match("\\("))return Se(z,function(le,he){return me(le,he,"\\)")}),"keyword";if(fe.match("$$"))return Se(z,function(le,he){return me(le,he,"$$")}),"keyword";if(fe.match("$"))return Se(z,function(le,he){return me(le,he,"$")}),"keyword";var ie=fe.next();if(ie=="%")return fe.skipToEnd(),"comment";if(ie=="}"||ie=="]"){if(te=Ie(z),te)te.closeBracket(ie),Se(z,be);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,Ae),"keyword";if(fe.match(/^\\[a-zA-Z@]+/))return"tag";if(fe.match(/^[a-zA-Z]+/))return"variable-2";if(fe.match(/^\\[$&%#{}_]/)||fe.match(/^\\[,;!\/]/)||fe.match(/^[\^_&]/))return"tag";if(fe.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(fe.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var se=fe.next();return se=="{"||se=="}"||se=="["||se=="]"||se=="("||se==")"?"bracket":se=="%"?(fe.skipToEnd(),"comment"):"error"}function be(fe,z){var te=fe.peek(),se;return te=="{"||te=="["?(se=Ie(z),se.openBracket(te),fe.eat(te),Se(z,Ae),"bracket"):/[ \t\r]/.test(te)?(fe.eat(te),null):(Se(z,Ae),de(z),Ae(fe,z))}return{startState:function(){var fe=oe.inMathMode?function(z,te){return me(z,te)}:Ae;return{cmdState:[],f:fe}},copyState:function(fe){return{cmdState:fe.cmdState.slice(),f:fe.f}},token:function(fe,z){return z.f(fe,z)},blankLine:function(fe){fe.f=Ae,fe.cmdState.length=0},lineComment:"%"}}),at.defineMIME("text/x-stex","stex"),at.defineMIME("text/x-latex","stex")})},15525:function(_n,Mn,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,Ae;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=be,"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 be(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=he,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=be;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 he(Ge,Ye,Ke){return Ge=="openTag"?(Ke.tagStart=Ye.column(),pe):Ge=="closeTag"?xe:he}function pe(Ge,Ye,Ke){return Ge=="word"?(Ke.tagName=Ye.current(),Ae="tag",Fe):ve.allowMissingTagName&&Ge=="endTag"?(Ae="tag bracket",Fe(Ge,Ye,Ke)):(Ae="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?(Ae="tag",je):(Ae="tag error",De)}else return ve.allowMissingTagName&&Ge=="endTag"?(Ae="tag bracket",je(Ge,Ye,Ke)):(Ae="error",De)}function je(Ge,Ye,Ke){return Ge!="endTag"?(Ae="error",je):(ie(Ke),he)}function De(Ge,Ye,Ke){return Ae="error",je(Ge,Ye,Ke)}function Fe(Ge,Ye,Ke){if(Ge=="word")return Ae="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)),he}return Ae="error",Fe}function Te(Ge,Ye,Ke){return Ge=="equals"?Me:(ve.allowMissing||(Ae="error"),Fe(Ge,Ye,Ke))}function Me(Ge,Ye,Ke){return Ge=="string"?Be:Ge=="word"&&ve.allowUnquoted?(Ae="string",Fe):(Ae="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:he,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"&&(Ae=null,Ye.state=Ye.state(Se||Ke,Ge,Ye),Ae&&(Ke=Ae=="error"?Ke+" error":Ae)),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!=be&&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&<.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==Me&&(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(_n,Mn,ft){"use strict";ft.d(Mn,{$u:function(){return ke},BD:function(){return He},E9:function(){return Ee},FF:function(){return fi},FJ:function(){return he},Hn:function(){return le},KX:function(){return xe},NB:function(){return vt},S0:function(){return gt},UL:function(){return Se},Vk:function(){return ie},Vm:function(){return Et},YI:function(){return yt},ZA:function(){return oe},Zt:function(){return Ae},al:function(){return Re},bn:function(){return nt},bx:function(){return we},g2:function(){return tt},h1:function(){return Me},hD:function(){return Cn},l4:function(){return de},rU:function(){return At},s_:function(){return Ne},uz:function(){return ut},z6:function(){return me}}),_n=ft.hmd(_n),function(){var et;function Mr(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:Mr(a)}}function En(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Tn=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Dn;if(typeof Object.setPrototypeOf=="function")Dn=Object.setPrototypeOf;else{var Pr;e:{var Br={a:!0},Ar={};try{Ar.__proto__=Br,Pr=Ar.a;break e}catch(a){}Pr=!1}Dn=Pr?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Qt=Dn;function Zt(a,y){if(a.prototype=Tn(y.prototype),a.prototype.constructor=a,Qt)Qt(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var b=Object.getOwnPropertyDescriptor(y,x);b&&Object.defineProperty(a,x,b)}else a[x]=y[x];a.QA=y.prototype}var Ut=typeof ft.g!="undefined"&&ft.g!=null?ft.g:self,Un=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},pr=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function mr(a,y){if(y){var x=Ut;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&&pr(x,a,{writable:!0,value:y})}}mr("Object.assign",function(a){return a||Un}),mr("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 xn=typeof globalThis=="object"&&globalThis||typeof ft.g=="object"&&ft.g.global===ft.g&&ft.g||typeof self=="object"&&self.self===self&&self||{};xn.requestAnimationFrame===void 0&&(xn.setImmediate===void 0?xn.requestAnimationFrame=function(a){xn.setTimeout(a,0)}:xn.requestAnimationFrame=xn.setImmediate);function Yn(){}function Hn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&xn.clearTimeout(x),x=Qr(function(){x=-1,a.apply(b,E)},y)}}function Qr(a,y){return xn.setTimeout(a,y)}function $r(a){return xn.document.createElement(a)}function Mt(a){throw Error(a)}function Wt(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Mt(a)}function Fn(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),Mt(x+" is not in the range "+y+": "+a)}function zn(a){xn.console&&xn.console.log(a)}function tn(a){return typeof a=="object"&&a!==null}function Nn(a){return Array.isArray(a)||xn.NodeList&&a instanceof xn.NodeList||xn.HTMLCollection&&a instanceof xn.HTMLCollection}function jn(a){return Array.prototype.slice.call(a)}function Ln(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Mt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function An(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Mt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Kn(){var a=_i.pop();return a===void 0?[]:a}function Jn(a){a.length=0,_i.push(a)}function er(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(tn(a)&&a.constructor)return er(a.constructor);return typeof a}function Wr(a){var y=a;return tn(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 Cr(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 Tr(a,y,x){Object.defineProperty(Qi.prototype,a,{get:y,set:x})}function ln(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 ri=xn.navigator!==void 0&&0<xn.navigator.userAgent.indexOf("Trident/7"),di=xn.navigator!==void 0&&xn.navigator.platform!==void 0&&xn.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,_i=[];Object.freeze([]),Yn.className="Util",Yn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Yn.adym="gojs.net",Yn.vfo="28e645fdb266",Yn.className="Util";function pn(a,y,x){gr(this),this.j=a,this.xa=y,this.o=x}pn.prototype.toString=function(){return"EnumValue."+this.xa};function Xn(a,y){return y==null||y===""?null:a[y]}Ut.Object.defineProperties(pn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),pn.className="EnumValue";function rr(){this.ew=[]}rr.prototype.toString=function(){return this.ew.join("")},rr.prototype.add=function(a){a!==""&&this.ew.push(a)},rr.className="StringBuilder";function ir(){}ir.className="PropertyCollection";var wr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){xn.console&&xn.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 Rr(){}Rr.prototype.reset=function(){},Rr.prototype.next=function(){return!1},Rr.prototype.Ad=function(){return!1},Rr.prototype.first=function(){return null},Rr.prototype.any=function(){return!1},Rr.prototype.all=function(){return!0},Rr.prototype.each=function(){return this},Rr.prototype.map=function(){return this},Rr.prototype.filter=function(){return this},Rr.prototype.de=function(){},Rr.prototype.toString=function(){return"EmptyIterator"},Ut.Object.defineProperties(Rr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Rr.prototype.first=Rr.prototype.first,Rr.prototype.hasNext=Rr.prototype.Ad,Rr.prototype.next=Rr.prototype.next,Rr.prototype.reset=Rr.prototype.reset;var Kr=null;Rr.className="EmptyIterator",Kr=new Rr;function ii(a){this.key=-1,this.value=a}ii.prototype.reset=function(){this.key=-1},ii.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},ii.prototype.Ad=function(){return this.next()},ii.prototype.first=function(){return this.key=0,this.value},ii.prototype.any=function(a){return this.key=-1,a(this.value)},ii.prototype.all=function(a){return this.key=-1,a(this.value)},ii.prototype.each=function(a){return this.key=-1,a(this.value),this},ii.prototype.map=function(a){return new ii(a(this.value))},ii.prototype.filter=function(a){return a(this.value)?new ii(this.value):Kr},ii.prototype.de=function(){this.value=null},ii.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ut.Object.defineProperties(ii.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),ii.prototype.first=ii.prototype.first,ii.prototype.hasNext=ii.prototype.Ad,ii.prototype.next=ii.prototype.next,ii.prototype.reset=ii.prototype.reset,ii.className="SingletonIterator";function oi(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}oi.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},oi.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},oi.prototype.Ad=function(){return this.next()},oi.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},oi.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},oi.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},oi.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},oi.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},oi.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},oi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},oi.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Ut.Object.defineProperties(oi.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}}}),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="ListIterator";function cr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}cr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},cr.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)},cr.prototype.Ad=function(){return this.next()},cr.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},cr.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},cr.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},cr.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},cr.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},cr.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},cr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},cr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ut.Object.defineProperties(cr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),cr.prototype.first=cr.prototype.first,cr.prototype.hasNext=cr.prototype.Ad,cr.prototype.next=cr.prototype.next,cr.prototype.reset=cr.prototype.reset,cr.className="ListIteratorBackwards";function on(a){gr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Mt("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()#"+ti(this)},et.add=function(a){return a===null?this:(this._isFrozen&&Wt(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&&Wt(this);var y=this.s;if(Nn(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&&Wt(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)&&Fn(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)&&Fn(a,"0 <= i < length",on,"setElt:i"),this._isFrozen&&Wt(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&&Wt(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&&Fn(a,">= 0",on,"insertAt:i"),this._isFrozen&&Wt(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&&Wt(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)&&Fn(a,"0 <= i < length",on,"removeAt:i"),this._isFrozen&&Wt(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&&Wt(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 an,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},et.sort=function(a){return this._isFrozen&&Wt(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&&Wt(this);var ee=x-y;if(1>=ee)return this;if((0>y||y>=E-1)&&Fn(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&&Wt(this),this.s.reverse(),this.xb(),this},Ut.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 Kr;var a=this.Sa;return a!==null?(a.reset(),a):new oi(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Kr;var a=this.Hg;return a!==null?(a.reset(),a):new cr(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 or(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}or.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},or.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)},or.prototype.Ad=function(){return this.next()},or.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},or.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},or.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},or.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},or.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},or.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},or.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},or.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ut.Object.defineProperties(or.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),or.prototype.first=or.prototype.first,or.prototype.hasNext=or.prototype.Ad,or.prototype.next=or.prototype.next,or.prototype.reset=or.prototype.reset,or.className="SetIterator";function an(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"&&Mt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=an.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()#"+ti(this)},et.add=function(a){if(a===null)return this;this._isFrozen&&Wt(this,a);var y=a;return tn(a)&&(y=Vr(a)),this.Tb[y]===void 0&&(this.Sb++,a=new en(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},et.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Wt(this),Nn(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 tn(a)&&(y=ti(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},an.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},an.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},an.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},an.prototype.map=function(a){for(var y=new an,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},an.prototype.filter=function(a){for(var y=new an,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},et=an.prototype,et.remove=function(a){if(a===null)return!1;this._isFrozen&&Wt(this,a);var y=a;if(tn(a)&&(y=ti(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&&Wt(this),Nn(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&&Wt(this);var y=new an;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&&Wt(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},an.prototype.copy=function(){var a=new an,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},an.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},an.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=Ni++}function Vr(a){var y=a.__gohashid;return y===void 0&&(y=Ni++,a.__gohashid=y),y}function ti(a){return a.__gohashid}Ut.Object.defineProperties(an.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Kr;var a=this.Sa;return a!==null?(a.reset(),a):new or(this)}}}),an.prototype.toList=an.prototype.Hv,an.prototype.toArray=an.prototype.Fa,an.prototype.clear=an.prototype.clear,an.prototype.retainAll=an.prototype.pA,an.prototype.removeAll=an.prototype.hp,an.prototype.delete=an.prototype.delete,an.prototype.remove=an.prototype.remove,an.prototype.first=an.prototype.first,an.prototype.containsAny=an.prototype.Ty,an.prototype.containsAll=an.prototype.Sy,an.prototype.has=an.prototype.has,an.prototype.contains=an.prototype.contains,an.prototype.addAll=an.prototype.addAll,an.prototype.add=an.prototype.add,an.prototype.thaw=an.prototype.ka,an.prototype.freeze=an.prototype.freeze;var Ni=1;an.className="Set",an.uniqueHash=gr,an.hashIdUnique=Vr,an.hashId=ti;function hi(a){this.ma=a,this.qa=a.Ja,this.sa=null}hi.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},hi.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)},hi.prototype.Ad=function(){return this.next()},hi.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},hi.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},hi.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},hi.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},hi.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},hi.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},hi.prototype.de=function(){this.value=this.key=null,this.qa=-1},hi.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ut.Object.defineProperties(hi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),hi.prototype.first=hi.prototype.first,hi.prototype.hasNext=hi.prototype.Ad,hi.prototype.next=hi.prototype.next,hi.prototype.reset=hi.prototype.reset,hi.className="MapKeySetIterator";function Zr(a){an.call(this),gr(this),this._isFrozen=!0,this.ma=a}Zt(Zr,an),et=Zr.prototype,et.freeze=function(){return this},et.ka=function(){return this},et.toString=function(){return"MapKeySet("+this.ma.toString()+")"},et.add=function(){Mt("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(){Mt("This Set is read-only: "+this.toString())},et.delete=function(a){return this.remove(a)},et.clear=function(){Mt("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 an,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 an,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 an,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},Ut.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?Kr:new hi(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 Ui(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Ui.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Ui.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)},Ui.prototype.Ad=function(){return this.next()},Ui.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},Ui.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},Ui.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},Ui.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},Ui.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},Ui.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},Ui.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Ui.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ut.Object.defineProperties(Ui.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ui.prototype.first=Ui.prototype.first,Ui.prototype.hasNext=Ui.prototype.Ad,Ui.prototype.next=Ui.prototype.next,Ui.prototype.reset=Ui.prototype.reset,Ui.className="MapValueSetIterator";function en(a,y){this.key=a,this.value=y,this.ll=this.va=null}en.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},en.className="KeyValuePair";function fn(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}fn.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},fn.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)},fn.prototype.Ad=function(){return this.next()},fn.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},fn.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},fn.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},fn.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},fn.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},fn.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},fn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},fn.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ut.Object.defineProperties(fn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),fn.prototype.first=fn.prototype.first,fn.prototype.hasNext=fn.prototype.Ad,fn.prototype.next=fn.prototype.next,fn.prototype.reset=fn.prototype.reset,fn.className="MapIterator";function $t(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"&&Mt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=$t.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()#"+ti(this)},et.add=function(a,y){this._isFrozen&&Wt(this,a);var x=a;tn(a)&&(x=Vr(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new en(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):b.value=y,this},et.set=function(a,y){return this.add(a,y)},et.addAll=function(a){if(a===null)return this;if(Nn(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 $t)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},$t.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},$t.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},$t.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},$t.prototype.map=function(a){for(var y=new $t,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},$t.prototype.filter=function(a){for(var y=new $t,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},et=$t.prototype,et.contains=function(a){var y=a;return tn(a)&&(y=ti(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 tn(a)&&(y=ti(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&&Wt(this,a);var y=a;if(tn(a)&&(y=ti(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&&Wt(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()},$t.prototype.copy=function(){var a=new $t,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},$t.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,b;for(b in a){var E=a[b];y[x]=new en(E.key,E.value),x++}return y},$t.prototype.Lf=function(){return new Zr(this)},Ut.Object.defineProperties($t.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Kr;var a=this.Sa;return a!==null?(a.reset(),a):new fn(this)}},iteratorKeys:{get:function(){return 0>=this.count?Kr:new hi(this)}},iteratorValues:{get:function(){if(0>=this.count)return Kr;var a=this.jf;return a!==null?(a.reset(),a):new Ui(this)}}}),$t.prototype.toKeySet=$t.prototype.Lf,$t.prototype.toArray=$t.prototype.Fa,$t.prototype.clear=$t.prototype.clear,$t.prototype.delete=$t.prototype.delete,$t.prototype.remove=$t.prototype.remove,$t.prototype.get=$t.prototype.get,$t.prototype.getValue=$t.prototype.I,$t.prototype.has=$t.prototype.has,$t.prototype.contains=$t.prototype.contains,$t.prototype.first=$t.prototype.first,$t.prototype.addAll=$t.prototype.addAll,$t.prototype.set=$t.prototype.set,$t.prototype.add=$t.prototype.add,$t.prototype.thaw=$t.prototype.ka,$t.prototype.freeze=$t.prototype.freeze,$t.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):Mt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Bn,Gn,fr,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)&&Mt("cannot thaw constant: "+this),this._isFrozen=!1,this};function gn(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new st(x,E)}return new st}function Rn(a){return a.x.toString()+" "+a.y.toString()}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 kn(a,y){return y.Cd(a),a}function Zn(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 xr(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function sr(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=Qn.pop();return a===void 0?new st:a},st.allocAt=function(a,y){var x=Qn.pop();return x===void 0?new st(a,y):(x.x=a,x.y=y,x)},st.free=function(a){Qn.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 Qn=[];st.className="Point",st.parse=gn,st.stringify=Rn,st.distanceLineSegmentSquared=Zn,st.distanceSquared=xr,st.direction=sr,st.Origin=Bn=new st(0,0).ja(),st.InfiniteTopLeft=Gn=new st(-1/0,-1/0).ja(),st.InfiniteBottomRight=fr=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=gn,st.stringify=Rn,st.distanceLineSegmentSquared=Zn,st.distanceSquared=xr,st.direction=sr;function cn(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):Mt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var vr,Nr,si,Ur,Ti,Ei,bi;cn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},cn.prototype.h=function(a,y){return this.width=a,this.height=y,this},cn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},cn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},cn.prototype.copy=function(){var a=new cn;return a.width=this.width,a.height=this.height,a},et=cn.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)&&Mt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ai(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 cn(x,E)}return new cn}function ji(a){return a.width.toString()+" "+a.height.toString()}et.toString=function(){return"Size("+this.width+","+this.height+")"},et.D=function(a){return a instanceof cn?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)},cn.alloc=function(){var a=$i.pop();return a===void 0?new cn:a},cn.free=function(a){$i.push(a)},cn.prototype.isReal=cn.prototype.w,cn.prototype.inflate=cn.prototype.Bc,cn.prototype.equalsApprox=cn.prototype.Xa,cn.prototype.equalTo=cn.prototype.hi,cn.prototype.equals=cn.prototype.D,cn.prototype.set=cn.prototype.set,cn.prototype.setTo=cn.prototype.sg;var $i=[];cn.className="Size",cn.parse=Ai,cn.stringify=ji,cn.ZeroSize=vr=new cn(0,0).ja(),cn.OneSize=Nr=new cn(1,1).ja(),cn.SixSize=si=new cn(6,6).ja(),cn.EightSize=Ur=new cn(8,8).ja(),cn.TenSize=Ti=new cn(10,10).ja(),cn.InfiniteSize=Ei=new cn(1/0,1/0).ja(),cn.NoSize=bi=new cn(NaN,NaN).ja(),cn.parse=Ai,cn.stringify=ji;function qt(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 cn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Mt("Incorrect second argument supplied to Rect constructor "+y)):Mt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}et=qt.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 Mi(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},qt.prototype.copy=function(){var a=new qt;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},et=qt.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)&&Mt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Pi(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 qt(x,E,ee,ne)}return new qt}function Xr(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 qt?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 mi(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 ei(this,y,a,y,a)},et.Co=function(a){return ei(this,a.top,a.right,a.bottom,a.left)},et.Fv=function(a){return ei(this,-a.top,-a.right,-a.bottom,-a.left)},et.Hz=function(a,y,x,b){return ei(this,a,y,x,b)};function ei(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 Hi(this,a.x,a.y,a.width,a.height)},et.Uu=function(a,y,x,b){return Hi(this,a,y,x,b)};function Hi(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 Gi(a,y){var x=a.width,b=a.x,E=y.x-10;return b>y.width+10+10+E||E>x+b?!1:(x=a.height,a=a.y,b=y.y-10,!(a>y.height+10+10+b||b>x+a))}et.Ye=function(a){return ci(this,a.x,a.y,0,0)},et.ed=function(a){return ci(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),ci(this,a,y,x,b)};function ci(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 to(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 pa(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},qt.alloc=function(){var a=wa.pop();return a===void 0?new qt:a},qt.allocAt=function(a,y,x,b){var E=wa.pop();return E===void 0?new qt(a,y,x,b):E.h(a,y,x,b)},qt.free=function(a){wa.push(a)},Ut.Object.defineProperties(qt.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 cn(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}}}),qt.prototype.isEmpty=qt.prototype.Mz,qt.prototype.isReal=qt.prototype.w,qt.intersectsLineSegment=function(a,y,x,b,E,ee,ne,ae){return zt.Fx(a,y,x,b,E,ee,ne,ae)},qt.prototype.setSpot=qt.prototype.yi,qt.prototype.union=qt.prototype.Kv,qt.prototype.unionRect=qt.prototype.ed,qt.prototype.unionPoint=qt.prototype.Ye,qt.prototype.intersects=qt.prototype.Vu,qt.prototype.intersectsRect=qt.prototype.Yc,qt.prototype.intersect=qt.prototype.Uu,qt.prototype.intersectRect=qt.prototype.Ex,qt.prototype.grow=qt.prototype.Hz,qt.prototype.subtractMargin=qt.prototype.Fv,qt.prototype.addMargin=qt.prototype.Co,qt.prototype.inflate=qt.prototype.Bc,qt.prototype.offset=qt.prototype.offset,qt.prototype.contains=qt.prototype.contains,qt.prototype.containsRect=qt.prototype.Re,qt.prototype.containsPoint=qt.prototype.ca,qt.prototype.equalsApprox=qt.prototype.Xa,qt.prototype.equalTo=qt.prototype.hi,qt.prototype.equals=qt.prototype.D,qt.prototype.setSize=qt.prototype.tA,qt.prototype.setPoint=qt.prototype.dd,qt.prototype.set=qt.prototype.set,qt.prototype.setTo=qt.prototype.sg;var Ao=null,bs=null,wa=[];qt.className="Rect",qt.parse=Pi,qt.stringify=Xr,qt.contains=to,qt.intersects=pa,qt.ZeroRect=Ao=new qt(0,0,0,0).ja(),qt.NoRect=bs=new qt(NaN,NaN,NaN,NaN).ja(),qt.parse=Pi,qt.stringify=Xr,qt.contains=to,qt.intersects=pa;function Ir(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):Mt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Ir.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ir.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Ir.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ir.prototype.copy=function(){var a=new Ir;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},et=Ir.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)&&Mt("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 Ir;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Ir(x);for(var ee=NaN;a[y]==="";)y++;if((b=a[y++])&&(ee=parseFloat(b)),isNaN(ee))return new Ir(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Ir(x,E):new Ir(x,E,ee,ne)}return new Ir}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 Ir?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)},Ir.alloc=function(){var a=Ko.pop();return a===void 0?new Ir:a},Ir.free=function(a){Ko.push(a)},Ir.prototype.isReal=Ir.prototype.w,Ir.prototype.equalsApprox=Ir.prototype.Xa,Ir.prototype.equalTo=Ir.prototype.hi,Ir.prototype.equals=Ir.prototype.D,Ir.prototype.set=Ir.prototype.set,Ir.prototype.setTo=Ir.prototype.sg;var ta=null,jo=null,Ko=[];Ir.className="Margin",Ir.parse=bo,Ir.stringify=Po,Ir.ZeroMargin=ta=new Ir(0,0,0,0).ja(),Ir.TwoMargin=jo=new Ir(2,2,2,2).ja(),Ir.parse=bo,Ir.stringify=Po;function ar(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,li,Ci,Oi,no,zr,Aa,zo,Oo,Ii,Vo,ja,vo,fs,ds,Ps,na,eh,ju,il,Sl,Os,Vl,th,nh,Zo,Ou,rh,Zl,uu,Ca,Oa,aa,ga,Xl,Ga;ar.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ar.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},ar.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ar.prototype.copy=function(){var a=new ar;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},et=ar.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)&&Mt("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 li;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Ci;if(a==="TopRight")return Oi;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return no;if(a==="Center")return zr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Aa;if(a==="BottomLeft")return zo;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Oo;if(a==="BottomRight")return Ii;if(a==="TopSide")return Vo;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 Vl;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 ar(x,E,ee,ne)}return new ar}function Ji(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(li)?"TopLeft":this.D(Ci)?"Top":this.D(Oi)?"TopRight":this.D(no)?"Left":this.D(zr)?"Center":this.D(Aa)?"Right":this.D(zo)?"BottomLeft":this.D(Oo)?"Bottom":this.D(Ii)?"BottomRight":this.D(Vo)?"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(Vl)?"NotRightSide":this.D(th)?"NotBottomSide":this.D(nh)?"AllSides":this.D(Zo)?"Default":"None"},et.D=function(a){return a instanceof ar?(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 ar(.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=Vo;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},ar.alloc=function(){var a=sa.pop();return a===void 0?new ar:a},ar.free=function(a){sa.push(a)},ar.prototype.isDefault=ar.prototype.Xb,ar.prototype.isNone=ar.prototype.ys,ar.prototype.isSide=ar.prototype.$c,ar.prototype.isNoSpot=ar.prototype.Mc,ar.prototype.isSpot=ar.prototype.sb,ar.prototype.includesSide=ar.prototype.Hf,ar.prototype.opposite=ar.prototype.gv,ar.prototype.equals=ar.prototype.D,ar.prototype.set=ar.prototype.set,ar.prototype.setTo=ar.prototype.sg;var sa=[];ar.className="Spot",ar.parse=oo,ar.stringify=Ji,ar.None=_r=co(new ar(0,0,0,0),0).ja(),ar.Default=Zo=co(new ar(0,0,-1,0),-1).ja(),ar.TopLeft=li=new ar(0,0,0,0).ja(),ar.TopCenter=Ci=new ar(.5,0,0,0).ja(),ar.TopRight=Oi=new ar(1,0,0,0).ja(),ar.LeftCenter=no=new ar(0,.5,0,0).ja(),ar.Center=zr=new ar(.5,.5,0,0).ja(),ar.RightCenter=Aa=new ar(1,.5,0,0).ja(),ar.BottomLeft=zo=new ar(0,1,0,0).ja(),ar.BottomCenter=Oo=new ar(.5,1,0,0).ja(),ar.BottomRight=Ii=new ar(1,1,0,0).ja(),ar.MiddleTop=Ca=Ci,ar.MiddleLeft=Oa=no,ar.MiddleRight=aa=Aa,ar.MiddleBottom=ga=Oo,ar.Top=Zl=Ci,ar.Left=Ou=no,ar.Right=rh=Aa,ar.Bottom=uu=Oo,ar.TopSide=Vo=co(new ar(0,0,1,1),1).ja(),ar.LeftSide=ja=co(new ar(0,0,1,2),1).ja(),ar.RightSide=vo=co(new ar(0,0,1,4),1).ja(),ar.BottomSide=fs=co(new ar(0,0,1,8),1).ja(),ar.TopBottomSides=ds=co(new ar(0,0,1,9),1).ja(),ar.LeftRightSides=Ps=co(new ar(0,0,1,6),1).ja(),ar.TopLeftSides=na=co(new ar(0,0,1,3),1).ja(),ar.TopRightSides=eh=co(new ar(0,0,1,5),1).ja(),ar.BottomLeftSides=ju=co(new ar(0,0,1,10),1).ja(),ar.BottomRightSides=il=co(new ar(0,0,1,12),1).ja(),ar.NotTopSide=Sl=co(new ar(0,0,1,14),1).ja(),ar.NotLeftSide=Os=co(new ar(0,0,1,13),1).ja(),ar.NotRightSide=Vl=co(new ar(0,0,1,11),1).ja(),ar.NotBottomSide=th=co(new ar(0,0,1,7),1).ja(),ar.AllSides=nh=co(new ar(0,0,1,15),1).ja(),Xl=new ar(.156,.156).ja(),Ga=new ar(.844,.844).ja(),ar.parse=oo,ar.stringify=Ji;function kr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}kr.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},kr.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},kr.prototype.copy=function(){var a=new kr;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},kr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},kr.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},kr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},kr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},kr.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},kr.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},kr.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},kr.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=kr.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,Le=y*ee+x*ae+ge,ze=y*ne+x*ue+ye,We=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(Le,We),Le=Math.max(Le,We),We=Math.min(ze,Qe),ze=Math.max(ze,Qe),E=Math.min(E,x),Le=Math.max(Le,x),We=Math.min(We,y),ze=Math.max(ze,y),E=Math.min(E,ee),Le=Math.max(Le,ee),We=Math.min(We,b),ze=Math.max(ze,b),a.h(E,We,Le-E,ze-We),a},kr.alloc=function(){var a=fa.pop();return a===void 0?new kr:a},kr.free=function(a){fa.push(a)},kr.prototype.transformRect=kr.prototype.pp,kr.prototype.transformPoint=kr.prototype.Ga,kr.prototype.scale=kr.prototype.scale,kr.prototype.translate=kr.prototype.translate,kr.prototype.rotate=kr.prototype.rotate,kr.prototype.invert=kr.prototype.Vj,kr.prototype.multiplyInverted=kr.prototype.bv,kr.prototype.multiply=kr.prototype.multiply,kr.prototype.reset=kr.prototype.reset,kr.prototype.isIdentity=kr.prototype.ws,kr.prototype.equals=kr.prototype.D,kr.prototype.setTransform=kr.prototype.setTransform,kr.prototype.set=kr.prototype.set;var fa=[];kr.className="Transform",kr.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,Le){if(zt.Yb(a,y,ne,ae,Le,x,b)&&zt.Yb(a,y,ne,ae,Le,E,ee))return zt.Yb(a,y,ne,ae,Le,ge,ye);var ze=(a+x)/2,We=(y+b)/2,Qe=(x+E)/2,it=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(ze+Qe)/2,x=(We+it)/2,Qe=(Qe+E)/2,it=(it+ee)/2;var Tt=(b+Qe)/2,wt=(x+it)/2;return zt.cs(a,y,ze,We,b,x,Tt,wt,ue,ge,ye,Le)||zt.cs(Tt,wt,Qe,it,E,ee,ne,ae,ue,ge,ye,Le)},ax:function(a,y,x,b,E,ee,ne,ae,ue){var ge=(x+E)/2,ye=(b+ee)/2;return ue.h((((a+x)/2+ge)/2+(ge+(E+ne)/2)/2)/2,(((y+b)/2+ye)/2+(ye+(ee+ae)/2)/2)/2),ue},My:function(a,y,x,b,E,ee,ne,ae){var ue=(x+E)/2,ge=(b+ee)/2;return sr(((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))ci(ge,a,y,0,0),ci(ge,ne,ae,0,0);else{var ye=(a+x)/2,Le=(y+b)/2,ze=(x+E)/2,We=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(ye+ze)/2,x=(Le+We)/2,ze=(ze+E)/2,We=(We+ee)/2;var Qe=(b+ze)/2,it=(x+We)/2;zt.Dl(a,y,ye,Le,b,x,Qe,it,ue,ge),zt.Dl(Qe,it,ze,We,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,Le=(y+b)/2,ze=(x+E)/2,We=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(ye+ze)/2,x=(Le+We)/2,ze=(ze+E)/2,We=(We+ee)/2;var Qe=(b+ze)/2,it=(x+We)/2;zt.Qe(a,y,ye,Le,b,x,Qe,it,ue,ge),zt.Qe(Qe,it,ze,We,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,Le=(y+b)/2;x=(x+E)/2,b=(b+ee)/2;var ze=(ye+x)/2,We=(Le+b)/2;return zt.jv(a,y,ye,Le,ze,We,ne,ae,ue,ge)||zt.jv(ze,We,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))ci(ae,a,y,0,0),ci(ae,E,ee,0,0);else{var ue=(a+x)/2,ge=(y+b)/2;x=(x+E)/2,b=(b+ee)/2;var ye=(ue+x)/2,Le=(ge+b)/2;zt.iv(a,y,ue,ge,ye,Le,ne,ae),zt.iv(ye,Le,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,Le=(ge+b)/2;zt.ep(a,y,ue,ge,ye,Le,ne,ae),zt.ep(ye,Le,x,b,E,ee,ne,ae)}return ae},Eo:function(a,y,x,b,E,ee,ne,ae,ue,ge,ye,Le,ze,We){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,Le)||(ze=(a-ne)*(ge-Le)-(y-ae)*(ue-ye),ze===0)?!1:(We.h(((a*ae-y*ne)*(ue-ye)-(a-ne)*(ue*Le-ge*ye))/ze,((a*ae-y*ne)*(ge-Le)-(y-ae)*(ue*Le-ge*ye))/ze),!0);var Qe=(a+x)/2,it=(y+b)/2,Tt=(x+E)/2,wt=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(Qe+Tt)/2,x=(it+wt)/2,Tt=(Tt+E)/2,wt=(wt+ee)/2;var jt=(b+Tt)/2,Ot=(x+wt)/2,Bt=1/0,It=!1,Xt=0,In=0;return zt.Eo(a,y,Qe,it,b,x,jt,Ot,ue,ge,ye,Le,ze,We)&&(a=(We.x-ue)*(We.x-ue)+(We.y-ge)*(We.y-ge),a<Bt&&(Bt=a,It=!0,Xt=We.x,In=We.y)),zt.Eo(jt,Ot,Tt,wt,E,ee,ne,ae,ue,ge,ye,Le,ze,We)&&(We.x-ue)*(We.x-ue)+(We.y-ge)*(We.y-ge)<Bt&&(It=!0,Xt=We.x,In=We.y),It&&(We.x=Xt,We.y=In),It},Fo:function(a,y,x,b,E,ee,ne,ae,ue,ge,ye,Le,ze){var We=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-Le)-(y-ae)*(ue-ye),ze===0)return We;var Qe=((a*ae-y*ne)*(ue-ye)-(a-ne)*(ue*Le-ge*ye))/ze,it=((a*ae-y*ne)*(ge-Le)-(y-ae)*(ue*Le-ge*ye))/ze;if(Qe>=ye)return We;if((ue>ye?ue-ye:ye-ue)<(ge>Le?ge-Le:Le-ge)){if(y<ae?(ue=y,a=ae):(ue=ae,a=y),it<ue||it>a)return We}else if(a<ne?(ue=a,a=ne):ue=ne,Qe<ue||Qe>a)return We;0<ze?We++:0>ze&&We--}else{Qe=(a+x)/2,it=(y+b)/2;var Tt=(x+E)/2,wt=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(Qe+Tt)/2,x=(it+wt)/2,Tt=(Tt+E)/2,wt=(wt+ee)/2;var jt=(b+Tt)/2,Ot=(x+wt)/2;We+=zt.Fo(a,y,Qe,it,b,x,jt,Ot,ue,ge,ye,Le,ze),We+=zt.Fo(jt,Ot,Tt,wt,E,ee,ne,ae,ue,ge,ye,Le,ze)}return We},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,wt){var jt=(Tt-a)*(Tt-a)+(wt-y)*(wt-y);jt<Le&&(Le=jt,ue.h(Tt,wt))}var Le=1/0;ye(ue.x,ue.y);var ze=0,We=0,Qe=0,it=0;if(E<ne?(ze=E,We=ne):(ze=ne,We=E),ee<ae?(Qe=E,it=ne):(Qe=ne,it=E),ze=(We-ze)/2+ge,ge=(it-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,Le=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,Le=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,Le=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,Le=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,Le=ue.y)),ue.h(ye,Le),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):!!(to(a,y,x,b,E,ee)||to(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),Le=ne/(y+ee);if(ye=ye*ye+Le*Le-1,0<ye)ae=y;else if(0>ye)ue=y;else break}x=E*x/(y+E)-x,b=ee*b/(y+ee)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,ee=a*x,ee<b?(b=ee/b,ee=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+ee*ee)):x=Math.abs(x-a);return x},Ze:new ir,um:new ir,Mf:new ir,Nf:0,vm:100};zt.za=zt.AA;function wn(a){gr(this),this.l=2,a===void 0&&(a=wn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===wn.o?this.ee=new on:(wn.V===null&&(wn.V=new on().freeze()),this.ee=wn.V),this.aq=this.ee.Ja,this.Ip=new qt().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=li,this.gg=Ii,this.Rk=this.Sk=NaN,this.Uf=mn}wn.prototype.copy=function(){var a=new wn;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===wn.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},wn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},wn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==wn.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},wn.prototype.ka=function(){if(Object.isFrozen(this)&&Mt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==wn.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},wn.prototype.Xa=function(a){if(!(a instanceof wn))return!1;if(this.type!==a.type)return this.type===wn.j&&a.type===wn.o?Ws(this,a):a.type===wn.j&&this.type===wn.o?Ws(a,this):!1;if(this.type===wn.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!==wn.j||y.type!==wn.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===Wi&&zt.B(a.endX,y.endX)&&zt.B(a.endY,y.endY))))}wn.ia=function(a){return a.toString()},wn.prototype.qb=function(a){a.classType===wn&&(this.type=a)},wn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case wn.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 wn.u:var y=new qt(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 wn.F:if(y=new qt(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 wn.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()}},wn.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},wn.parse=function(a,y){function x(){return it>=Bt-1?!0:ge[it+1].match(It)!==null}function b(){return it++,ge[it]}function E(jr){var Lr=parseFloat(b()),wi=parseFloat(b());Tt===Tt.toLowerCase()&&(Lr=Ot.x+Lr,wi=Ot.y+wi),jr.h(Lr,wi)}function ee(){return E(Ot),Ot}function ne(){return E(jt),jt}function ae(){var jr=wt.toLowerCase();return jr!=="c"&&jr!=="s"&&jr!=="q"&&jr!=="t"?Ot:new st(2*Ot.x-jt.x,2*Ot.y-jt.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=Kn();for(var Le="",ze=!1,We=0;We<ye.length;We++){var Qe=ye[We];Qe!=="."||ze?Qe==="."?(ue.push(Le),Le="."):Le+=Qe:(ze=!0,Le+=Qe)}for(ue.push(Le),ge.splice(a,1),ye=0;ye<ue.length;ye++)ge.splice(a+ye,0,ue[ye]);a+=ue.length-1,Jn(ue)}}var it=-1,Tt="",wt="";ue=new st(0,0);var jt=new st(0,0),Ot=new st(0,0),Bt=ge.length;a=A1(null),ze=Le=ye=!1,We=!0,Qe=null;for(var It=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(it>=Bt-1);)if(wt=Tt,Tt=b(),Tt!=="")switch(Tt.toUpperCase()){case"X":We=!0,Le=ye=!1;break;case"M":for(Qe=ee(),a.mc===null||We===!0?(Dd(a,Qe.x,Qe.y,ye,!Le,ze),We=!1):a.moveTo(Qe.x,Qe.y),ue.assign(Ot);!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();)Ot=new st((Tt===Tt.toLowerCase()?Ot.x:0)+parseFloat(b()),Ot.y),a.lineTo(Ot.x,Ot.y);break;case"V":for(;!x();)Ot=new st(Ot.x,(Tt===Tt.toLowerCase()?Ot.y:0)+parseFloat(b())),a.lineTo(Ot.x,Ot.y);break;case"C":for(;!x();){Qe=new st,E(Qe);var Xt=ne(),In=ee();wh(a,Qe.x,Qe.y,Xt.x,Xt.y,In.x,In.y)}break;case"S":for(;!x();)Qe=ae(),Xt=ne(),In=ee(),wh(a,Qe.x,Qe.y,Xt.x,Xt.y,In.x,In.y);break;case"Q":for(;!x();)Qe=ne(),Xt=ee(),Rm(a,Qe.x,Qe.y,Xt.x,Xt.y);break;case"T":for(;!x();)jt=Qe=ae(),Xt=ee(),Rm(a,Qe.x,Qe.y,Xt.x,Xt.y);break;case"B":for(;!x();){Qe=parseFloat(b()),Xt=parseFloat(b()),In=parseFloat(b());var nr=parseFloat(b()),$n=parseFloat(b()),bn=$n,hn=!1;x()||(bn=parseFloat(b()),x()||(hn=parseFloat(b())!==0)),Tt===Tt.toLowerCase()&&(In+=Ot.x,nr+=Ot.y),a.arcTo(Qe,Xt,In,nr,$n,bn,hn)}break;case"A":for(;!x();)Qe=Math.abs(parseFloat(b())),Xt=Math.abs(parseFloat(b())),In=parseFloat(b()),$n=nr=!1,hn=bn=0,bn=b(),bn.length===1?(nr=!!parseFloat(bn),$n=!!parseFloat(b()),bn=parseFloat(b())):bn.length===2?(nr=!!parseFloat(bn[0]),$n=!!parseFloat(bn[1]),bn=parseFloat(b())):(nr=!!parseFloat(bn[0]),$n=!!parseFloat(bn[1]),bn=parseFloat(bn.slice(2))),hn=parseFloat(b()),Tt===Tt.toLowerCase()&&(bn=Ot.x+bn,hn=Ot.y+hn),Ot.h(bn,hn),Px(a,Qe,Xt,In,nr,$n,bn,hn);break;case"Z":bx(a),Ot.assign(ue);break;case"F":for(Qe="",Xt=1;ge[it+Xt];)if(ge[it+Xt]==="0")ze=!0,Xt++;else if(ge[it+Xt].match(/[Uu]/)!==null)Xt++;else if(ge[it+Xt].match(It)===null)Xt++;else{Qe=ge[it+Xt];break}Qe.match(/[Mm]/)?ye=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Qe="",Xt=1;ge[it+Xt];)if(ge[it+Xt].match(/[Ff]/)!==null)Xt++;else if(ge[it+Xt].match(It)===null)Xt++;else{Qe=ge[it+Xt];break}Qe.match(/[Mm]/)?Le=!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},wn.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)},wn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===wn.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},wn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===wn.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),ci(a,0,0,0,0),a.freeze()},wn.prototype.ix=function(){var a=new qt;return jl(this,a,!0),a};function jl(a,y,x){switch(a.type){case wn.j:case wn.u:case wn.F:x?y.h(a.od,a.pd,0,0):ci(y,a.od,a.pd,0,0),ci(y,a.Dc,a.Ec,0,0);break;case wn.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):ci(y,ee.startX,ee.startY,0,0);for(var ne=ee.segments.s,ae=ne.length,ue=ee.startX,ge=ee.startY,ye=0;ye<ae;ye++){var Le=ne[ye];switch(Le.type){case Wi:case Do:ue=Le.endX,ge=Le.endY,ci(y,ue,ge,0,0);break;case Go:zt.Dl(ue,ge,Le.point1X,Le.point1Y,Le.point2X,Le.point2Y,Le.endX,Le.endY,.5,y),ue=Le.endX,ge=Le.endY;break;case ps:zt.iv(ue,ge,Le.point1X,Le.point1Y,Le.endX,Le.endY,.5,y),ue=Le.endX,ge=Le.endY;break;case xo:case Cs:var ze=Le.type===xo?Ua(Le,ee):Ds(Le,ee,ue,ge),We=ze.length;if(We===0){ue=Le.type===xo?Le.centerX:Le.endX,ge=Le.type===xo?Le.centerY:Le.endY,ci(y,ue,ge,0,0);break}Le=null;for(var Qe=0;Qe<We;Qe++)Le=ze[Qe],zt.Dl(Le[0],Le[1],Le[2],Le[3],Le[4],Le[5],Le[6],Le[7],.5,y);Le!==null&&(ue=Le[6],ge=Le[7]);break;default:Mt("Unknown Segment type: "+Le.type)}}}break;default:Mt("Unknown Geometry type: "+a.type)}}wn.prototype.normalize=function(){this._isFrozen&&Wt(this);var a=this.ix();return this.offset(-a.x,-a.y),new st(-a.x,-a.y)},wn.prototype.offset=function(a,y){return this._isFrozen&&Wt(this),this.transform(1,0,0,1,a,y),this},wn.prototype.scale=function(a,y){return this._isFrozen&&Wt(this),this.transform(a,0,0,y,0,0),this},wn.prototype.rotate=function(a,y,x){this._isFrozen&&Wt(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=kr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),kr.free(b),this},et=wn.prototype,et.transform=function(a,y,x,b,E,ee){switch(this.type){case wn.j:case wn.u:case wn.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 wn.o:for(var ue=this.figures.s,ge=ue.length,ye=0;ye<ge;ye++){var Le=ue[ye];ne=Le.startX,ae=Le.startY,Le.startX=ne*a+ae*x+E,Le.startY=ne*y+ae*b+ee,Le=Le.segments.s;for(var ze=Le.length,We=0;We<ze;We++){var Qe=Le[We];switch(Qe.type){case Wi:case Do: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:Mt("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 wn.j:return zt.Yb(x,b,E,ee,y,a.x,a.y);case wn.u:var ne=qt.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),qt.free(ne),a;case wn.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 wn.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,Le,ze=a.figures.s,We=ze.length,Qe=0;Qe<We;Qe++){var it=ze[Qe],Tt=!it.isEvenOdd;if(it.isFilled){if(b&&it.ca(ee,y,x))return!0;var wt=it.segments;ue=it.startX,ge=it.startY;for(var jt=ue,Ot=ge,Bt=wt.s,It=0;It<=wt.length;It++){var Xt=void 0;if(It!==wt.length){Xt=Bt[It];var In=Xt.type;a=Xt.endX,Le=Xt.endY}else In=Wi,a=jt,Le=Ot;switch(In){case Do:if(jt=ba(ee,y,ne,y,ue,ge,jt,Ot),isNaN(jt))return!0;ae+=jt,jt=a,Ot=Le;break;case Wi:if(ue=ba(ee,y,ne,y,ue,ge,a,Le),isNaN(ue))return!0;ae+=ue;break;case Go:ye=zt.Fo(ue,ge,Xt.point1X,Xt.point1Y,Xt.point2X,Xt.point2Y,a,Le,ne,y,ee,y,.5),ae+=ye;break;case ps:ye=zt.Fo(ue,ge,(ue+2*Xt.point1X)/3,(ge+2*Xt.point1Y)/3,(2*Xt.point1X+a)/3,(2*Xt.point1Y+Le)/3,a,Le,ne,y,ee,y,.5),ae+=ye;break;case xo:case Cs:In=Xt.type===xo?Ua(Xt,it):Ds(Xt,it,ue,ge);var nr=In.length;if(nr===0){if(ue=ba(ee,y,ne,y,ue,ge,Xt.type===xo?Xt.centerX:Xt.endX,Xt.type===xo?Xt.centerY:Xt.endY),isNaN(ue))return!0;ae+=ue;break}Xt=null;for(var $n=0;$n<nr;$n++){if(Xt=In[$n],$n===0){if(ye=ba(ee,y,ne,y,ue,ge,Xt[0],Xt[1]),isNaN(ye))return!0;ae+=ye}ye=zt.Fo(Xt[0],Xt[1],Xt[2],Xt[3],Xt[4],Xt[5],Xt[6],Xt[7],ne,y,ee,y,.5),ae+=ye}Xt!==null&&(a=Xt[6],Le=Xt[7]);break;default:Mt("Unknown Segment type: "+Xt.type)}ue=a,ge=Le}if(Tt){if(ae!==0)return!0}else if(ae%2!==0)return!0;ae=0}else if(it.ca(ee,y,E?x:x+2))return!0}return!1}function 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===wn.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===wn.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===wn.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===wn.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===wn.u){ne=this.startX,ae=this.startY;var ue=this.endX;if(E=this.endY,ne!==ue||ae!==E){y=ue-ne,x=E-ae,ee=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),ue),a=Math.min(Math.max(a,ae),E),ne=Math.abs(b-ne),ue=Math.abs(b-ue),ae=Math.abs(a-ae),E=Math.abs(a-E);var ge=Math.min(ne,ue,ae,E);if(ge===ae)return b/ee;if(ge===ue)return(y+a)/ee;if(ge===E)return(2*y+x-b)/ee;if(ge===ne)return(2*y+2*x-a)/ee}}else{y=this.flattenedSegments,x=this.flattenedLengths,ee=this.flattenedTotalLength,b=st.alloc(),E=1/0,ae=ne=0,ue=y.length;for(var ye=ge=0,Le=0;Le<ue;Le++)for(var ze=y[Le],We=x[Le],Qe=ze.length,it=0;it<Qe;it+=2){var Tt=ze[it],wt=ze[it+1];if(it!==0){zt.qh(ge,ye,Tt,wt,a.x,a.y,b);var jt=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);jt<E&&(E=jt,ne=ae,ne+=Math.sqrt((b.x-ge)*(b.x-ge)+(b.y-ye)*(b.y-ye))),ae+=We[(it-2)/2]}ge=Tt,ye=wt}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===wn.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===wn.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===wn.F){var ee=new Fo;ee.startX=a.endX,ee.startY=(a.startY+a.endY)/2;var ne=new Si(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,Le=0;Le<ye;Le++){var ze=ge[Le];switch(ze.type){case Do: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 Wi: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 We=Ua(ze,E),Qe=We.length;if(Qe===0){b.push(ze.centerX),b.push(ze.centerY),ne=ze.centerX,ee=ze.centerY;break}for(var it=0;it<Qe;it++){var Tt=We[it];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(We=Ds(ze,E,ne,ee),Qe=We.length,it=ze.endX,Tt=ze.endY,Qe===0){b.push(it),b.push(Tt),ne=it,ee=Tt;break}for(it=0;it<Qe;it++)Tt=We[it],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:Mt("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(xr(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&&Wt(this),this.fg=new ar(a,y,E,ee).freeze(),this.gg=new ar(x,b,ne,ae).freeze(),this},Ut.Object.defineProperties(wn.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===wn.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===wn.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&&Wt(this,a),this.na=a,a===wn.o?this.ee=new on:(wn.V===null&&(wn.V=new on().freeze()),this.ee=wn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Wt(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Wt(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Wt(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Wt(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Wt(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Wt(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Wt(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Wt(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),wn.prototype.setSpots=wn.prototype.pm,wn.prototype.add=wn.prototype.add,wn.prototype.getFractionForPoint=wn.prototype.xx,wn.prototype.getPointAndAngleAlongPath=wn.prototype.Qu,wn.prototype.getAngleAlongPath=wn.prototype.wx,wn.prototype.getPointAlongPath=wn.prototype.Pu,wn.prototype.containsPoint=wn.prototype.ca,wn.prototype.transform=wn.prototype.transform,wn.prototype.rotate=wn.prototype.rotate,wn.prototype.scale=wn.prototype.scale,wn.prototype.offset=wn.prototype.offset,wn.prototype.normalize=wn.prototype.normalize,wn.prototype.computeBoundsWithoutOrigin=wn.prototype.ix,wn.prototype.equalsApprox=wn.prototype.Xa,wn.className="Geometry",wn.j=new pn(wn,"Line",0),wn.u=new pn(wn,"Rectangle",1),wn.F=new pn(wn,"Ellipse",2),wn.o=new pn(wn,"Path",3),wn.V=null,wn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",wn.className="Geometry",wn.stringify=wn.ia,wn.fillPath=wn.nb,wn.parse=wn.parse,wn.Line=wn.j,wn.Rectangle=wn.u,wn.Ellipse=wn.F,wn.Path=wn.o;function Fo(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}Fo.prototype.copy=function(){var a=new Fo;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=Fo.prototype,et.Xa=function(a){if(!(a instanceof Fo&&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 Do:ee=ye.endX,ne=ye.endY,b=ye.endX,E=ye.endY;break;case Wi: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 Le=ye.type===xo?Ua(ye,this):Ds(ye,this,b,E),ze=Le.length,We=ye.type===xo?ye.centerX:ye.endX,Qe=ye.type===xo?ye.centerY:ye.endY;if(ze===0){if(zt.Yb(b,E,We,Qe,x,a,y))return!0;b=We,E=Qe;break}for(We=null,Qe=0;Qe<ze;Qe++)if(We=Le[Qe],Qe===0&&zt.Yb(b,E,We[0],We[1],x,a,y)||zt.cs(We[0],We[1],We[2],We[3],We[4],We[5],We[6],We[7],.5,a,y,x))return!0;We!==null&&(b=We[6],E=We[7]);break;default:Mt("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},Ut.Object.defineProperties(Fo.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&&Wt(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Wt(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Wt(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Wt(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Wt(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Wt(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Fo.prototype.add=Fo.prototype.add,Fo.prototype.equalsApprox=Fo.prototype.Xa,Fo.className="PathFigure";function Si(a,y,x,b,E,ee,ne,ae){gr(this),a===void 0&&(a=Wi),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}Si.prototype.copy=function(){var a=new Si;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=Si.prototype,et.Xa=function(a){if(!(a instanceof Si)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Do:case Wi: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===Si&&(this.type=a)},et.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Do:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Wi: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=kr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),wn.Ha(ee,ne),kr.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(it,Tt,wt,jt){return(it*jt<Tt*wt?-1:1)*Math.acos((it*wt+Tt*jt)/(Math.sqrt(it*it+Tt*Tt)*Math.sqrt(wt*wt+jt*jt)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var ee=a.Pg;y===0&&(y=1e-4),ee===0&&(ee=1e-4);var ne=Math.PI/180*a.Ne,ae=a.isLargeArc,ue=a.isClockwiseArc,ge=a.Dc,ye=a.Ec,Le=Math.cos(ne),ze=Math.sin(ne),We=Le*(x-ge)/2+ze*(b-ye)/2;ne=-ze*(x-ge)/2+Le*(b-ye)/2;var Qe=We*We/(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*We*We)/(y*y*ne*ne+ee*ee*We*We)),isNaN(Qe)&&(Qe=0),ae=Qe*y*ne/ee,Qe=Qe*-ee*We/y,isNaN(ae)&&(ae=0),isNaN(Qe)&&(Qe=0),x=(x+ge)/2+Le*ae-ze*Qe,b=(b+ye)/2+ze*ae+Le*Qe,ye=E(1,0,(We-ae)/y,(ne-Qe)/ee),Le=(We-ae)/y,ge=(ne-Qe)/ee,We=(-We-ae)/y,ae=(-ne-Qe)/ee,ne=E(Le,ge,We,ae),We=(Le*We+ge*ae)/(Math.sqrt(Le*Le+ge*ge)*Math.sqrt(We*We+ae*ae)),-1>=We?ne=Math.PI:1<=We&&(ne=0),!ue&&0<ne&&(ne-=2*Math.PI),ue&&0>ne&&(ne+=2*Math.PI),ue=y>ee?1:y/ee,We=y>ee?ee/y:1,y=zt.jx(0,0,y>ee?y:ee,ye,ye+ne,!0),ee=kr.alloc(),ee.reset(),ee.translate(x,b),ee.rotate(a.Ne,0,0),ee.scale(ue,We),wn.Ha(y,ee),kr.free(ee),a.ae=y,a.ae}Ut.Object.defineProperties(Si.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&&Wt(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Wt(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Wt(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Wt(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Wt(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Wt(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Wt(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Wt(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Wt(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Fn(a,">= zero",Si,"radiusX"),this._isFrozen&&Wt(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Fn(a,">= zero",Si,"radiusY"),this._isFrozen&&Wt(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Wt(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&&Wt(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&&Wt(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&&Wt(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&&Wt(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Si.prototype.equalsApprox=Si.prototype.Xa;var Do=new pn(Si,"Move",0),Wi=new pn(Si,"Line",1),Go=new pn(Si,"Bezier",2),ps=new pn(Si,"QuadraticBezier",3),xo=new pn(Si,"Arc",4),Cs=new pn(Si,"SvgArc",4);Si.className="PathSegment",Si.Move=Do,Si.Line=Wi,Si.Bezier=Go,Si.QuadraticBezier=ps,Si.Arc=xo,Si.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},Ut.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},Ut.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=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=tn(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+=Wr(this.object)),this.oldValue!==null&&(a+=" old: "+Wr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Wr(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))},Ut.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 pn(ao,"Transaction",-1),ro=new pn(ao,"Property",0),wo=new pn(ao,"Insert",1),Eo=new pn(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 $t,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 $t,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()}},Ut.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 an,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&&zn("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){zn("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){zn("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||zn("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},Ut.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 yi(){gr(this),this.H=gu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new ma,this.Zr=-1}yi.prototype.toString=function(){return this.name!==""?this.name+" Tool":er(this.constructor)},yi.prototype.updateAdornments=function(){},yi.prototype.canStart=function(){return this.isEnabled},yi.prototype.doStart=function(){},yi.prototype.doActivate=function(){this.isActive=!0},yi.prototype.doDeactivate=function(){this.isActive=!1},yi.prototype.doStop=function(){},yi.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},yi.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},yi.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},yi.prototype.doMouseMove=function(){},yi.prototype.doMouseUp=function(){this.stopTool()},yi.prototype.doMouseWheel=function(){},yi.prototype.canStartMultiTouch=function(){return!0},yi.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)},yi.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)},yi.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},yi.prototype.doKeyUp=function(){},yi.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},yi.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},yi.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(di?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||(di?y.meta:y.control)||y.shift||a.clearSelection()}},yi.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)}}}yi.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}},yi.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},yi.prototype.doCurrentObjectChanged=function(){},yi.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)}}},yi.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},yi.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Qr(function(){x.doWaitAfter(b)},a)},yi.prototype.cancelWaitAfter=function(){this.Zr!==-1&&xn.clearTimeout(this.Zr),this.Zr=-1},yi.prototype.doWaitAfter=function(){},yi.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof xi);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},yi.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},Ut.Object.defineProperties(yi.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Jt&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm},set:function(a){this.wm=a}}}),yi.prototype.startTransaction=yi.prototype.Ea,yi.className="Tool";function Qi(){yi.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 cn(2,2).ja(),this.Ha=5e3,this.ia=cu,this.u=_h,this.Mp=this.j=null,this.zj=-1}Zt(Qi,yi),Qi.prototype.initializeStandardTools=function(){},Qi.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof xi&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Qi.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)},Qi.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)}Qi.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof xi&&(y===a||y.rg(a))||this.hideToolTip()},Qi.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()))},Qi.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)},Qi.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 xi)||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()},Qi.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof xi){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&&(xn.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Qr(function(){E.hideToolTip()},a)}},Qi.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}},Qi.prototype.hideToolTip=function(){this.zj!==-1&&(xn.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof xi?(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)},Qi.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()},Qi.prototype.doMouseWheel=function(){this.standardMouseWheel()},Qi.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Qi.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Qi.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},Qi.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},Qi.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)},Ut.Object.defineProperties(Qi.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 xi?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}}}),Qi.prototype.replaceStandardTool=Qi.prototype.gb;var cu=new pn(Qi,"WheelScroll",0),ih=new pn(Qi,"WheelZoom",1),Ec=new pn(Qi,"WheelNone",2),_h=new pn(Qi,"GestureZoom",3),Ol=new pn(Qi,"GestureCancel",4),Bu=new pn(Qi,"GestureNone",5);Qi.className="ToolManager",Qi.WheelScroll=cu,Qi.WheelZoom=ih,Qi.WheelNone=Ec,Qi.GestureZoom=_h,Qi.GestureCancel=Ol,Qi.GestureNone=Bu;function uo(){yi.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 an().freeze(),this.ia=new ce,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var al;Zt(uo,yi),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,(di?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 Pn?(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(Bn):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),Ki(E),Yl(E),E.diagram.ug()}y.clear()}so(this),this.tl.h(NaN,NaN),oh!==null&&(oh.currentCursor=""),la=oh=null,Ki(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),bf(a,!0)},uo.prototype.stopTransaction=function(){var a=this.diagram,y=yi.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;Ki(a),Fa(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}uo.prototype.doCancel=function(){Ki(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 $t,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 Pn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,zh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ch(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Ki(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof Pn&&(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 Pn&&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 xi||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 yr&&!(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(zr,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=qt.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Wn&&$v(x,b,a);qt.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 Pn},!0,function(E){return E instanceof Pn},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()?(Ki(this),Xo(this,this.draggedParts,!0)):this.mayDragOut()?(Jl(this,!1),Xo(this,this.copiedParts,!1)):Ki(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?(Ki(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,Ki(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 Jt||(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||(di?!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,Ki(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 an;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=qt.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,qt.free(ee),ee=a.Fr,ne=new $t,ae=st.alloc(),ue=y.iterator;ue.next();)ge=ue.value,ge instanceof Pn&&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},Ut.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,Tr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Qi.prototype.doCancel=function(){la!==null&&la.doCancel(),yi.prototype.doCancel.call(this)};function yo(){yi.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Pn,y=new Gr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Gr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Wn,y=new Gr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Nr,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Wn,y=new Gr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Nr,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 $t,this.Of=this.gj=this.Pf=null}Zt(yo,yi),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=cn.alloc();ne.width=y.naturalBounds.width*ee,ne.height=y.naturalBounds.height*ee,b.desiredSize=ne,cn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=zr,ee=st.alloc(),x.location=y.ga(zr,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=Nr,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(Le){return E.findValidLinkablePort(Le,a)},null,!0);for(b=1/0,y=null,ee=ee.iterator;ee.next();){var ne=ee.value,ae=ne.part;if(ae instanceof Wn){var ue=ne.ga(zr,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 an;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 an,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 an,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}Ut.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 Ka(){yo.call(this),this.name="Linking",this.V={},this.F=null,this.K=Gh,this.Xd=null}Zt(Ka,yo),Ka.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},Ka.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},Ka.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)},Ka.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()},Ka.prototype.doStop=function(){yo.prototype.doStop.call(this),this.startObject=null},Ka.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)}}},Ka.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Pn)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)},Ka.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Ka.prototype.doNoLink=function(){},Ut.Object.defineProperties(Ka.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 pn(Ka,"Either",0),_g=new pn(Ka,"ForwardsOnly",0),zg=new pn(Ka,"BackwardsOnly",0);Ka.className="LinkingTool",Ka.Either=Gh,Ka.ForwardsOnly=_g,Ka.BackwardsOnly=zg;function Bs(){yo.call(this),this.name="Relinking";var a=new Gr;a.figure="Diamond",a.desiredSize=Ur,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Gr,a.figure="Diamond",a.desiredSize=Ur,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new qt}Zt(Bs,yo),Bs.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Pn){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 xi;return x.type=yn.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 xi&&x.adornedPart instanceof Pn))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=vr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=vr),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)}Ut.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 xi))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Bs.className="RelinkingTool",Tr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Tr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function ko(){yi.call(this),this.name="LinkReshaping";var a=new Gr;a.figure="Rectangle",a.desiredSize=si,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Gr,a.figure="Diamond",a.desiredSize=Ur,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}Zt(ko,yi),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 Pn){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 xi,E.type=yn.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 Pn){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=yi.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(zr)},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(zr,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(zr,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)}},Ut.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 xi))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 pn(ko,"None",0),sh=new pn(ko,"Horizontal",1),lh=new pn(ko,"Vertical",2),td=new pn(ko,"All",3);ko.className="LinkReshapingTool",ko.None=lp,ko.Horizontal=sh,ko.Vertical=lh,ko.All=td,Tr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Pa(){yi.call(this),this.name="Resizing",this.o=new cn(1,1).freeze(),this.j=new cn(9999,9999).freeze(),this.yg=new cn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Gr;a.alignmentFocus=zr,a.figure="Rectangle",a.desiredSize=si,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 cn,this.Tn=new st,this.rt=new cn(0,0),this.qt=new cn(1/0,1/0),this.pt=new cn(1,1)}Zt(Pa,yi),Pa.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Pn)){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 xi,y.type=yn.Spot,y.locationSpot=zr;var x=new Qa;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,li)),y.add(this.makeHandle(a,Oi)),y.add(this.makeHandle(a,Ii)),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=zr),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 yn)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=yi.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 ce;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=zr);var ne=this.adornedObject.naturalBounds,ae=ne.x,ue=ne.y,ge=ne.x+ne.width,ye=ne.y+ne.height,Le=1;if(!ee){Le=ne.width;var ze=ne.height;0>=Le&&(Le=1),0>=ze&&(ze=1),Le=ze/Le}return ze=st.alloc(),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(Le*a.width,b.height),x.height),a.width=a.height/Le):(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width),a.x=ge-a.width,a.y=ye-a.height)):1<=y.y?(a.x=Math.max(ze.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=Math.max(ge-a.x,x.width),a.height=Math.max(Math.min(ze.y-ue,b.height),x.height),ee||(1<=a.height/a.width?(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le):(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width),a.x=ge-a.width)):(a.x=Math.max(ze.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=ge-a.x,ee||(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le,a.y=ue+.5*(ye-ue-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(ze.x-ae,b.width),x.width),a.y=Math.max(ze.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=Math.max(ye-a.y,x.height),ee||(1<=a.height/a.width?(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le):(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width),a.y=ye-a.height)):1<=y.y?(a.width=Math.max(Math.min(ze.x-ae,b.width),x.width),a.height=Math.max(Math.min(ze.y-ue,b.height),x.height),ee||(1<=a.height/a.width?(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le):(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width))):(a.width=Math.max(Math.min(ze.x-ae,b.width),x.width),ee||(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le,a.y=ue+.5*(ye-ue-a.height))):0>=y.y?(a.y=Math.max(ze.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=ye-a.y,ee||(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width,a.x=ae+.5*(ge-ae-a.width))):1<=y.y&&(a.height=Math.max(Math.min(ze.y-ue,b.height),x.height),ee||(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width,a.x=ae+.5*(ge-ae-a.width))),st.free(ze),a},Pa.prototype.computeReshape=function(){var a=dn;return this.adornedObject instanceof Gr&&(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 cn(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},Ut.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 xi))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 xi)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",Tr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Va(){yi.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new st,this.ue=null;var a=new Gr;a.figure="Ellipse",a.desiredSize=Ur,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}Zt(Va,yi),Va.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)}},Va.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new xi,y.type=yn.Position,y.locationSpot=zr;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},Va.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},Va.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)},Va.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(zr)},Va.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)},Va.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},Va.prototype.stopTransaction=function(){var a=this.diagram,y=yi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Va.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Va.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Va.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()},Va.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()}},Va.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},Ut.Object.defineProperties(Va.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 xi))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 xi)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}}}),Va.className="RotatingTool",Tr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Uh(){yi.call(this),this.name="ClickSelecting"}Zt(Uh,yi),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(){yi.call(this),this.name="Action",this.pk=null}Zt(ll,yi),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(){yi.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new st(0,0)}Zt(uh,yi),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 yr)x.Zc()&&(dl(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);tn(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},Ut.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 Ks(){yi.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new yr;a.layerName="Tool",a.selectable=!1;var y=new Gr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Zt(Ks,yi),Ks.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))},Ks.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Ks.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Ks.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=cn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),cn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Ks.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()},Ks.prototype.computeBoxBounds=function(){var a=this.diagram;return new qt(a.firstInput.documentPoint,a.lastInput.documentPoint)},Ks.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),di?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)}},Ut.Object.defineProperties(Ks.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}}}),Ks.className="DragSelectingTool";function va(){yi.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(xn.document,"scroll",a.Kw,!1),a.stopTool()}}Zt(va,yi),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(xn.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)}},Ut.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",Tr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Tr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Tr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Tr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Tr("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}Ut.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(){yi.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()}}Zt(Za,yi);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=$r("div");var x=$r("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=$r("style");xn.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",xn.document.body&&(xn.document.body.appendChild(y),xn.document.body.appendChild(x)),cf=y,Lc=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 Jt||(a instanceof _t?b=a:b=y.ic(x.documentPoint,null,function(E){return!E.layer.isTemporary})),b!==null){for(a=b;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return b.part}else if(y.contextMenu!==null)return y;return null},Za.prototype.doActivate=function(){},Za.prototype.doMouseDown=function(){if(yi.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof xi){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 xi){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 xi&&!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 xi){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 xi?(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="",Lc.addEventListener("pointerdown",this.tu,!1);var y=this,x=$r("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=$r("li"),ee.className="goCXli";var ne=$r("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(ae){return this.ky(a),y.stopTool(),ae.preventDefault(),!1},!1),ne.textContent=E.text,ee.appendChild(ne),x.appendChild(ee)}}cf.style.display="block",Lc.style.display="block"},Za.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Hh){cf.style.display="none",Lc.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Lc,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Ut.Object.defineProperties(Za.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof xi?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,Lc=null,cf=null;Za.className="ContextMenuTool",Tr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function qi(){yi.call(this),this.name="TextEditing",this.Zh=new Zi,this.ia=null,this.V=Mc,this.vj=null,this.qa=Nc,this.u=1,this.F=!0,this.o=null,this.j=new $l,this.kt=null,ff(this,this.j)}Zt(qi,yi);function ff(a,y){if(po){var x=$r("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(df)):E==="Tab"?(a.acceptText(rd),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Nc){var b=a.kt;a.qa===pf&&(a.qa=gf),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Nc){var b=a.kt;typeof b.focus=="function"&&b.focus(),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(b,E,ee){if(b instanceof Zi&&ee instanceof qi)if(ee.state===mf)x.style.border="3px solid red",x.focus();else{var ne=b.ga(zr),ae=E.position,ue=E.scale,ge=b.Df()*ue;ge<ee.minimumEditorScale&&(ge=ee.minimumEditorScale);var ye=b.naturalBounds.width*ge+6,Le=b.naturalBounds.height*ge+2,ze=(ne.x-ae.x)*ue;ne=(ne.y-ae.y)*ue,ae=b.verticalAlignment,ue=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*ge,Le=ae.y*Le-ae.y*ue+ae.offsetY-(.5*Le-.5*ue)-ue/2,x.value=b.text,E.div.style.font=b.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*ge+"%",x.style.lineHeight="normal",x.style.width=ye+"px",x.style.left=(ze-ye/2|0)-1+"px",x.style.top=(ne+Le|0)-1+"px",x.style.textAlign=b.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=b.lineCount,x.wA=ge,x.className="goTXarea",E.div.appendChild(x),x.focus(),ee.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}qi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||ch&&ch!==this&&(ch.acceptText(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===Mc&&!y.isSelected||this.starting===id&&2>a.lastInput.clickCount)):!1},qi.prototype.doStart=function(){ch=this,this.textBlock!==null&&this.doActivate()},qi.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(a!==null){var y=this.textBlock;if(y===null&&(y=a.ic(a.lastInput.documentPoint)),y!==null&&y instanceof Zi&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=pf;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new qt(this.textBlock.ga(li),this.textBlock.ga(Ii));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},qi.prototype.doCancel=function(){this.stopTool()},qi.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},qi.prototype.doMouseDown=function(){this.isActive&&this.acceptText(ql)},qi.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))}}qi.prototype.doError=function(a,y){var x=this.textBlock;x.errorFunction!==null&&x.errorFunction(this,a,y),(a=this.currentTextEditor)&&a.show(x,this.diagram,this)},qi.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},qi.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Nc,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},qi.prototype.doStop=function(){ch=null},qi.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},qi.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ut.Object.defineProperties(qi.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj},set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}}),qi.prototype.measureTemporaryTextBlock=qi.prototype.Lx;var nd=new pn(qi,"LostFocus",0),ql=new pn(qi,"MouseDown",1),rd=new pn(qi,"Tab",2),df=new pn(qi,"Enter",3),e0=new pn(qi,"SingleClick",0),Mc=new pn(qi,"SingleClickSelected",1),id=new pn(qi,"DoubleClick",2),Nc=new pn(qi,"StateNone",0),pf=new pn(qi,"StateActive",1),gf=new pn(qi,"StateEditing",2),hp=new pn(qi,"StateValidating",3),mf=new pn(qi,"StateInvalid",4),Ac=new pn(qi,"StateValidated",5),ch=null;qi.className="TextEditingTool",qi.LostFocus=nd,qi.MouseDown=ql,qi.Tab=rd,qi.Enter=df,qi.SingleClick=e0,qi.SingleClickSelected=Mc,qi.DoubleClick=id,qi.StateNone=Nc,qi.StateActive=pf,qi.StateEditing=gf,qi.StateValidating=hp,qi.StateInvalid=mf,qi.StateValidated=Ac,Tr("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 an,this.ce=new ya,this.ce.Yd=this,this.Ei=new an,this.pu=new an,this.Sr=new an,this.pr=new an,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),xn.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 Pn&&(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 Jt){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)),xn.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),xn.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 Kh(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var ee=a[0],ne=a[1],ae=a[2];a=a[3];var ue=y[0],ge=y[1],ye=y[2];return y=y[3],ae===0||ae===100?(ee=ue,ne=ge):(ye===0||ye===100)&&(ue=ee,ge=ne),180<Math.abs(ue-ee)&&(ue>ee?ee+=360:ue+=360),ee=E(x,ee,ue-ee,b)%360,ne=E(x,ne,ge-ne,b),ae=E(x,ae,ye-ae,b),x=E(x,a,y-a,b),"hsla("+ee+", "+ne+"%, "+ae+"%, "+x+")"}function cp(){function a(x,b,E,ee,ne,ae){x.position=new st(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae))}var y=new $t;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 qt(ee(ne,b.width,E.width-b.width,ae),ee(ne,b.height,E.height-b.height,ae))}),y.add("width",function(x,b,E,ee,ne,ae){x.width=ee(ne,b,E-b,ae)}),y.add("height",function(x,b,E,ee,ne,ae){x.height=ee(ne,b,E-b,ae)}),y.add("fill",function(x,b,E,ee,ne,ae){x.fill=Kh(b,E,ne,ae,ee)}),y.add("stroke",function(x,b,E,ee,ne,ae){x.stroke=Kh(b,E,ne,ae,ee)}),y.add("strokeWidth",function(x,b,E,ee,ne,ae){x.strokeWidth=ee(ne,b,E-b,ae)}),y.add("strokeDashOffset",function(x,b,E,ee,ne,ae){x.strokeDashOffset=ee(ne,b,E-b,ae)}),y.add("background",function(x,b,E,ee,ne,ae){x.background=Kh(b,E,ne,ae,ee)}),y.add("areaBackground",function(x,b,E,ee,ne,ae){x.areaBackground=Kh(b,E,ne,ae,ee)}),y.add("opacity",function(x,b,E,ee,ne,ae){x.opacity=ee(ne,b,E-b,ae)}),y.add("scale",function(x,b,E,ee,ne,ae){x.scale=ee(ne,b,E-b,ae)}),y.add("angle",function(x,b,E,ee,ne,ae){x.angle=ee(ne,b,E-b,ae)}),vf=y}Ut.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&&Fn(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 pn(Es,"Default",1),Sf=new pn(Es,"AnimateLocations",2),fp=new pn(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=Bn,this.vc=new $t,this.Tt=new $t,this.yl=new an,this.Ut=new an,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 Jt?a=x:x instanceof _t&&(a=x.diagram))}if(a!==null)this.H=a,this.Yd=a.animationManager;else return this;return y=this.Yd,y.isEnabled===!1?this:(this.Gd=isNaN(this.Dg)?y.duration:this.Dg,this.Lp=this.ot,y.Ok&&y.Pk===_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=Lf),fh(y),this.yl.each(function(b){b.data=null,a.add(b)}),Wh(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,sd(y,this),this)},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 Jt?this.H=a:a instanceof _t&&a.diagram!==null&&(this.H=a.diagram)),a instanceof yr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return dh(this,a,y,x,b,E),this};function dh(a,y,x,b,E,ee){var ne=a.vc;if(y instanceof Jt&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(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]=Vh(b)),ge[x]=Vh(E)}else ue={},ge={},ue[x]=Vh(b),ge[x]=Vh(E),ae=ue.position,y instanceof _t&&ae instanceof st&&!ae.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&ae.assign(ge.position),ae=new Zh(ue,ge,ee),ne.add(y,ae);ne=ue[x],ne instanceof st&&!ne.w()&&ne.assign(a.o),ee&&x.indexOf("position:")===0&&y instanceof yr?ae.Ku.location=Vh(y.location):ee&&(ae.Ku[x]=Vh(b))}function Vh(a){return a instanceof st||a instanceof cn?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,Le;for(Le in ge)if(ee.get(Le)!==null){var ze=Le;!ae.Hu||ze!=="position:nodeCollapse"&&ze!=="position:placeholder"||(ze="position"),ee.get(ze)(ne,ue[Le],ye[Le]!==void 0?ye[Le]:ae.Hu?ue[Le]:ge[Le],this.Lp,this.Gd,this.Gd,this)}ae.Hu&&ye.location!==void 0&&ne instanceof yr&&(ne.location=ye.location),ae.nv&&ne instanceof yr&&ne.Zb(!1)}if(y.As.clear(),bf(y,!1),y.Ya(),y.N(),Zs(y,!0),x.defaultAnimation===this){for(Le=x.pr.iterator;Le.next();)E=Le.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}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(li),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(li);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},Ut.Object.defineProperties(ya.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Fn(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:Mt("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))}Ut.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 pn(wl,"Default",1),Xh=new pn(wl,"Immediate",2),Oc=new pn(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,Ma(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 Pn?ee++:ue instanceof xi?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&&ti(b)&&(ae+=" #"+ti(b)),x instanceof Wn?ae+=" "+Wr(b):x instanceof Pn&&(ae+=" "+Wr(x.fromNode)+" "+Wr(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),kn(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 an||(b=new an),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),kn(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 an||(E=new an),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 an)&&(ee=E),E=!0),ee instanceof on||ee instanceof an||(ee=new an),this.Uh===!1)return ee;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var ae=st.alloc(),ue=st.alloc(),ge=this.Pa.s,ye=ge.length;ye--;){var Le=ge[ye];if((ne!==!0||ic(Le)!==!1)&&Le.isVisible()){ae.assign(a),kn(ae,Le.oe),ue.h(a.x+y,a.y),kn(ue,Le.oe);var ze=Le;Le.og(ae,ue,x,b,E,ee)&&(x!==null&&(ze=x(ze)),ze===null||b!==null&&!b(ze)||ee.add(ze))}}return st.free(ae),st.free(ue),ee},et.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Kn();for(var E=Kn(),ee=0;ee<b;ee++){var ne=x[ee];if(ne.vw=ee,ne instanceof Pn){if(ne.fd===!1)continue}else if(ne instanceof xi&&ne.adornedPart!==null)continue;var ae=ne.actualBounds;ne.isVisible()&&Gi(ae,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&E.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],B0(x),x=x.adornments;x.next();)b=x.value,b.measure(1/0,1/0),b.arrange(),b.Fd(!0);for(y=0;y<E.length;y++)B0(E[y]);Jn(a),Jn(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=qt.alloc(),ue=0;ue<b;ue++)this.Oj(a,x[ue],y,ee,ne,ae,!0);if(qt.free(ae),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Kg(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var ee=E.length;if(ee!==0){var ne=zu(a,y),ae=a.Zq;ae.length=0;for(var ue=x.scale,ge=qt.alloc(),ye=0;ye<ee;ye++){var Le=E[ye];b.contains(Le)&&a.Oj(y,Le,x,ae,ue,ge,!1)}qt.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 Pn&&(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&&Ma(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),ud(this,a,y),a},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,Ma(y),a};function ud(a,y,x){if(y=Vg(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 Vg(a,y,x){var b=x.zOrder;if(isNaN(b))return y;a=a.Pa;var E=a.count;if(1>=E)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var ee=y-1,ne=NaN;0<=ee&&(ne=a.M(ee).zOrder,!!isNaN(ne));)ee--;for(var ae=y+1,ue=NaN;ae<E&&(ue=a.M(ae).zOrder,!!isNaN(ue));)ae++;if(!isNaN(ne)&&ne>b)for(;;){if(ee===-1||ne<=b){if(ee++,ee===y)break;return a.mb(y),a.Gb(ee,x),ee}for(ne=NaN;0<=--ee&&(ne=a.M(ee).zOrder,isNaN(ne)););}else if(!isNaN(ue)&&ue<b)for(;;){if(ae===E||ue>=b){if(ae--,ae===y)break;return a.mb(y),a.Gb(ae,x),ae}for(ue=NaN;++ae<E&&(ue=a.M(ae).zOrder,isNaN(ue)););}return y}Ut.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===""&&Mt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Mt("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)&&Fn(a,"0 <= value <= 1",ra,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,a!==null&&a.N())}},isTemporary:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&((this.o=a)&&(this.isInDocumentBounds=!1),this.g("isTemporary",y,a))}},visible:{get:function(){return this.u},set:function(a){var y=this.u;if(y!==a){for(this.u=a,this.g("visible",y,a),y=this.Pa.iterator;y.next();)y.value.Zb(a);a=this.diagram,a!==null&&a.N()}}},pickable:{get:function(){return this.Uh},set:function(a){var y=this.Uh;y!==a&&(this.Uh=a,this.g("pickable",y,a))}},isInDocumentBounds:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,this.diagram!==null&&this.diagram.Ya())}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}}}),ra.prototype.findObjectsNear=ra.prototype.og,ra.prototype.findObjectsIn=ra.prototype.Cf,ra.prototype.findObjectsAt=ra.prototype.ji,ra.prototype.findObjectAt=ra.prototype.ic,ra.className="Layer";function Jt(a,y){if(am||(Ta(),am=!0),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(xn.document,"DOMContentLoaded",b,!1),x.setRTL()};xn.document.body!==null?this.setRTL():x.addEventListener(xn.document,"DOMContentLoaded",b,!1)}this.ol=null,xd.add("Model",Bi);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"||xn.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 $t,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 kr,a.zu=new st(NaN,NaN).freeze(),a.ut=new qt(NaN,NaN,NaN,NaN).freeze(),a.rj=new Ir(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=li,a.Bt=li,a.Fc=!0,a.pn=!1,a.De=new an,a.Eh=new $t,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Ir(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 an,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 $t,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 Ir(5).freeze(),a.Hw=new an().freeze(),a.Nt=999999999,a.nw=new an().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 an,a.ow=new an,a.Xh=null,a.aw=new cn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new st,bounds:new qt,Py:new cn,bA:new cn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new qt(NaN,NaN,NaN,NaN).freeze(),a.wo=new cn(NaN,NaN).freeze(),a.Sp=new qt(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new $t;var y=new Wn,x=new Zi;x.bind(new Lo("text","",Wr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Wn,x=new Zi,x.stroke="brown",x.bind(new Lo("text","",Wr)),y.add(x),a.Lg.add("Comment",y),y=new Wn,y.selectable=!1,y.avoidable=!1,x=new Gr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new cn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new $t,y=new Or,y.selectionObjectName="GROUPPANEL",y.type=yn.Vertical,x=new Zi,x.font="bold 12pt sans-serif",x.bind(new Lo("text","",Wr)),y.add(x),x=new yn(yn.Auto),x.name="GROUPPANEL";var b=new Gr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Qa,b.padding=new Ir(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new $t,y=new Pn,x=new Gr,x.isPanelMain=!0,y.add(x),x=new Gr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Pn,x=new Gr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new xi,y.type=yn.Auto,x=new Gr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Qa,x.margin=new Ir(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new xi,y.type=yn.Link,x=new Gr,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 Bi,a.toolManager=new Qi,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ce,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}Jt.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),zc=null,ec="",gp(this,!1),this.Xn.clear(),Od(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function gp(a,y){a.animationManager.Cc(!0),a.Hw=new an().freeze(),a.nw=new an().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(),_i=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),ee}function Xg(){return null}Jt.prototype.reset=function(){this.clear(),this.vb=!0,Zg(this),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()},Jt.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=xn.document.body);var y=$r("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},Jt.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=xn.document.body);var y=0;if(po){var x=om;y=Yh,x===null&&(x=om=$r("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Yh=$r("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||di||(y=11)}this.Db=y,this.Gw=!0},Jt.prototype.qb=function(a){a.classType===Jt&&(this.autoScale=a)},Jt.prototype.toString=function(a){a===void 0&&(a=0);var y="";if(this.div&&this.div.id&&(y=this.div.id),y='Diagram "'+y+'"',0>=a)return y;for(var x=this.Wa.iterator;x.next();)y+=`
|
|
`+x.value.toString(a-1);return y};function mp(a,y){if(po){if(y!=null||Mt("Diagram setup requires an argument DIV."),a.Ka!==null&&Mt("Diagram has already completed setup."),typeof y=="string"?a.Ka=xn.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Mt("No DIV or DIV id supplied: "+y),a.Ka===null&&Mt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Mt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&xn.ResizeObserver){var x=Hn(function(){a.$b()},250);a.ol=new xn.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}xn.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=xn.go;var E=new fl(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",xn.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=$r("div");var ee=$r("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=Hn(function(){a.Yh=null,a.N()},300),a.Ov=Hn(function(){vp(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var ae=Vs(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,Vs(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=xn.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=xn.document.elementFromPoint(ne.clientX,ne.clientY)||null;ge!==null&&ge.shadowRoot!==void 0&&ge.shadowRoot!==null&&(ge=ge.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),ge!==null&&ge.H instanceof Jt&&ge.H!==a&&Dc(ge.H,ne,ue),ge===null&&(ge=ne.target),Dc(a,ne,ue),ue.clickCount=a.yq,ue.targetDiagram=xp(ne,ge),ue.targetObject=null,a.doMouseUp(),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,Mf,y,y),b.Vc(!0),t0(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Jt.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Jt.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function t0(a){var y=a.ta.Oa;y instanceof HTMLCanvasElement||(y=a.div),a.addEventListener(y,"pointerdown",a.ui,!1),a.addEventListener(y,"pointermove",a.dk,!1),a.addEventListener(y,"pointerup",a.fk,!1),a.addEventListener(y,"pointerout",a.ek,!1),a.addEventListener(y,"pointercancel",a.ck,!1),a.addEventListener(y,"pointerenter",a.bz,!1),a.addEventListener(y,"pointerleave",a.cz,!1),a.addEventListener(y,"wheel",a.$j,!1),a.addEventListener(y,"keydown",a.Qz,!1),a.addEventListener(y,"keyup",a.Rz,!1),a.addEventListener(y,"blur",a.Ny,!1),a.addEventListener(y,"focus",a.Oy,!1),a.addEventListener(y,"selectstart",function(x){return x.preventDefault(),!1},!1),a.addEventListener(y,"contextmenu",function(x){return x.preventDefault(),!1},!1),a.addEventListener(xn,"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(),wr&&wr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Jt.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:xn.devicePixelRatio||1},Jt.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Jt.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Jt.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Jt.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Jt.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Jt.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Jt.prototype.doFocus=function(){this.focus()},Jt.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=xn.scrollX||xn.pageXOffset,y=xn.scrollY||xn.pageYOffset;this.ta.focus(),xn.scrollTo(a,y)}},Jt.prototype.Oy=function(){this.H.R("GainedFocus")},Jt.prototype.Ny=function(){this.H.R("LostFocus")};function vp(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,b=a.Be?a.Db:0,E=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==E&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+b)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===Ba&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Yg(a){var y=new ra;y.name="Background",a.Al(y),y=new ra,y.name="",a.Al(y),y=new ra,y.name="Foreground",a.Al(y),y=new ra,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ra,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ra,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function Jg(a){var y=new yn(yn.Grid);y.name="GRID";var x=new Gr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Gr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Gr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Gr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Gr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Gr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new yr,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)}Jt.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var b=this.documentBounds,E=this.viewportBounds,ee=this.rj,ne=b.x-ee.left,ae=b.y-ee.top,ue=b.width+ee.left+ee.right,ge=b.height+ee.top+ee.bottom,ye=b.right+ee.right;ee=b.bottom+ee.bottom;var Le=E.x;b=E.y;var ze=E.width,We=E.height,Qe=E.right,it=E.bottom;E=this.scale;var Tt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Tt=Tt+a.scrollWidth-a.clientWidth;break;case"reverse":Tt=a.scrollWidth-Tt-a.clientWidth}var wt=Tt;ze<ue||We<ge?(Tt=st.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==wt&&(Tt.x=wt/E+ne,this.ju=wt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Tt.y=a.scrollTop/E+ae,this.lu=a.scrollTop),this.position=Tt,st.free(Tt),this.Ee=this.qr=!1):(Tt=st.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Le&&(this.position=Tt.h(wt+ne,this.position.y)),ye>Qe&&(this.position=Tt.h(-(y.scrollWidth-this.Aa)+wt-this.Aa/E+ye,this.position.y))),a.vy&&this.allowVerticalScroll&&(ae<b&&(this.position=Tt.h(this.position.x,a.scrollTop+ae)),ee>it&&(this.position=Tt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+ee))),st.free(Tt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ye=b.right,Qe=E.right,ee=b.bottom,it=E.bottom,ne=b.x,Le=E.x,ae=b.y,b=E.y,ze>=ue&&ne>=Le&&ye<=Qe&&(x.style.width="1px"),We>=ge&&ae>=b&&ee<=it&&(x.style.height="1px"))}},Jt.prototype.computeBounds=function(a){return a===void 0&&(a=new qt),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}Jt.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Nn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Pn||(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 Pn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new qt(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=qt.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,qt.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()?zr: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 qt(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}Jt.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=Jt.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(li,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(li,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 yr)return a}else if(a=mu(this,a,function(x){return x.part}),a instanceof yr)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 yr&&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 an||(E=new an),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 an||(b=new an),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 yr&&(!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 an||(E=new an),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 an;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 an||(E=new an),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 yr&&(!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 an)&&(ee=E),E=!0),ee instanceof on||ee instanceof an||(ee=new an),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 an)&&(ee=E),E=!0),ee instanceof on||ee instanceof an||(ee=new an),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}Jt.prototype.acceptEvent=function(a){return Vs(this,a,a instanceof MouseEvent)};function Vs(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),di&&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,di&&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)}Jt.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Vs(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)},Jt.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Vs(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)},Jt.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Vs(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),bl(x,a)},Jt.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Vs(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),bl(x,a)},Jt.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new st(0,0);var x=y.getBoundingClientRect();return y=a.clientX-this.Aa/x.width*x.left,a=a.clientY-this.ya/x.height*x.top,this.Ab!==null?kn(new st(y,a),this.Ab):new st(y,a)};function Dc(a,y,x){var b=a.ta,E=a.Aa,ee=a.ya,ne=0,ae=0;b!==null&&(b=b.getBoundingClientRect(),ne=y.clientX-E/b.width*b.left,ae=y.clientY-ee/b.height*b.top),x.viewPoint.h(ne,ae),a.Ab!==null?(y=st.allocAt(ne,ae),a.Ab.Cd(y),x.documentPoint.assign(y),st.free(y)):x.documentPoint.h(ne,ae)}function bp(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var b=a.ta;b!==null&&(b=b.getBoundingClientRect(),x.h(y.clientX-a.Aa/b.width*b.left,y.clientY-a.ya/b.height*b.top))}}Jt.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function qg(a){a.ld||Sa(a),a.Va()}Jt.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},et=Jt.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&&Qr(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;xn.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];Ro(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=qt.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),qt.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 an,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 Pn&&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 xi&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function Ef(a,y){for(var x=Kn(),b=Kn(),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 Pn?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(Jn(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();Jn(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&&Mt("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&&(kr.prototype.Cd=kr.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&&(kr.prototype.Cd=kr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=wr&&wr.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&&Mt("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 Le=a.Wa.s,ze=Le.length;try{var We=new qt(ee.x,ee.y,b.width/E,b.height/E),Qe=We.copy();Qe.Co(x),eu(a,Qe),Sa(a),a.Fd(Le,ze,a,We),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),ae!==null&&ae!==""&&(y.fillStyle=ae,y.ox(0,0,b.width,b.height));var it=a.Mb;y.scale(it,it);var Tt=kr.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),kr.free(Tt),ph(a,y),y.globalAlpha=a.pb;var wt=a.Qj("Grid");if(ne){var jt=new an,Ot=ne.iterator;for(Ot.reset();Ot.next();){var Bt=Ot.value;Bt instanceof yr&&(ge||Bt.layer!==wt)&&(Bt.Gj(),jt.add(Bt))}for(ge=0;ge<ze;ge++)Kg(Le[ge],y,a,jt,ue);jt.each(function(Xt){return Xt.Gj()})}else for(jt=0;jt<ze;jt++){var It=Le[jt];It===wt?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(Le,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 ir,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(di||ri),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 ir,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 yn,b=a instanceof Jt,E;for(E in y){E===""&&Mt("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])),tn(ee)?ne=E.substr(ae+1):Mt("Unable to find object named: "+ue+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!Cr(ee,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&Cr(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 Mt('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 $t,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")},Jt.prototype.invalidateViewport=function(a,y){if(this.Fc!==!0)if(this.Fc=!0,this.nl==="svg")this.bd();else{var x=this.Gf("temporaryPixelRatio")===!0;if(this.Gf("viewportOptimizations")===!0&&this.scrollMode!==Lf&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var b=this.scale,E=Math.max(a.y,y.y),ee=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*b&&0<Math.max(0,ee-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=qt.alloc(),Ap(this,this.computeBounds(b)),qt.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),Le=Math.max(y,0),ze=Math.floor(E-ye),We=Math.floor(ae-Le);a.drawImage(b.Oa,ye,Le,ze,We,0,0,ze,We),Hc(this.Yf,this)&&a.clearRect(0,0,ue,ge),b=Kn(),a=Kn(),We=Math.abs(ee),ze=Math.abs(y);var Qe=ye===0?0:E-We;ye=st.allocAt(Qe,0),We=st.allocAt(We+Qe,ae),a.push(new qt(Math.min(ye.x,We.x),Math.min(ye.y,We.y),Math.abs(ye.x-We.x),Math.abs(ye.y-We.y)));var it=this.Ab;if(it.reset(),it.scale(ne,ne),this.Ca!==1&&it.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&it.translate(-ne.x,-ne.y),kn(ye,it),kn(We,it),b.push(new qt(Math.min(ye.x,We.x),Math.min(ye.y,We.y),Math.abs(ye.x-We.x),Math.abs(ye.y-We.y))),Qe=Le===0?0:ae-ze,ye.h(0,Qe),We.h(E,ze+Qe),a.push(new qt(Math.min(ye.x,We.x),Math.min(ye.y,We.y),Math.abs(ye.x-We.x),Math.abs(ye.y-We.y))),kn(ye,it),kn(We,it),b.push(new qt(Math.min(ye.x,We.x),Math.min(ye.y,We.y),Math.abs(ye.x-We.x),Math.abs(ye.y-We.y))),Hc(this.Yf,this)&&(E=0<ee?0:-ee,ae=0<y?0:-y,ye.h(E,ae),We.h(ue+E,ge+ae),a.push(new qt(Math.min(ye.x,We.x),Math.min(ye.y,We.y),Math.abs(ye.x-We.x),Math.abs(ye.y-We.y))),kn(ye,it),kn(We,it),b.push(new qt(Math.min(ye.x,We.x),Math.min(ye.y,We.y),Math.abs(ye.x-We.x),Math.abs(ye.y-We.y)))),st.free(ye),st.free(We),Jh(this,!1,!0),this.Ka===null&&Mt("No div specified"),this.ta===null&&Mt("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),Le=ne.Zq,Le.length=0,ye=this.scale,ze=qt.alloc(),We=ne.Pa.s,it=We.length,Qe=ue.length;for(var Tt=0;Tt<it;Tt++){var wt=We[Tt],jt=Jc(wt,wt.actualBounds);e:{for(var Ot=2/ye,Bt=4/ye,It=0;It<Qe;It++){var Xt=ue[It];if(Xt.width!==0&&Xt.height!==0&&jt.Vu(Xt.x-Ot,Xt.y-Ot,Xt.width+Bt,Xt.height+Bt)){jt=!0;break e}}jt=!1}jt&&ne.Oj(E,wt,this,Le,ye,ze,!0)}qt.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()}Jn(b),Jn(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 Le=ye.y,ze=ye.width,We=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,it=a.hu;if(a.Ee=!1,!(ee||a.gf||a.Be||a.mn||a.nn))return!0;var Tt=a.documentBounds,wt=0,jt=0,Ot=0,Bt=0,It=ye.width,Xt=ye.height,In=a.rj;a.contentAlignment.sb()?(Tt.width>It&&(wt=In.left,jt=In.right),Tt.height>Xt&&(Ot=In.top,Bt=In.bottom)):(wt=In.left,jt=In.right,Ot=In.top,Bt=In.bottom);var nr=Tt.width+wt+jt,$n=Tt.height+Ot+Bt;In=a.scale;var bn=nr>ue/In,hn=$n>ge/In;if(!(ee||a.gf||a.Be||bn||hn))return!0;wt=Tt.x-wt,ue=ye.x,jt=Tt.right+jt,ge=ye.right+ne,Ot=Tt.y-Ot;var jr=ye.y;Tt=Tt.bottom+Bt,ye=ye.bottom+ae;var Lr="1px";if(Bt="1px",a.scrollMode===mh&&(bn||hn)&&(bn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(bn=1,wt+1<ue&&(bn=Math.max((ue-wt)*In+a.Aa,bn)),jt>ge+1&&(bn=Math.max((jt-ge)*In+a.Aa,bn)),It+ne+1<nr&&(bn=Math.max((nr-It)*In+a.Aa,bn)),Lr=bn.toString()+"px"),hn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(bn=1,Ot+1<jr&&(bn=Math.max((jr-Ot)*In+a.ya,bn)),Tt>ye+1&&(bn=Math.max((Tt-ye)*In+a.ya,bn)),Xt+ae+1<$n&&(bn=Math.max(($n-Xt)*In+a.ya,bn)),Bt=bn.toString()+"px")),bn=Lr!=="1px",hn=Bt!=="1px",bn&&hn||!bn&&!hn||(hn&&(ge-=a.Db),bn&&(ye-=a.Db),nr<It+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,wt+1<ue&&(ne=Math.max((ue-wt)*In+a.Aa,ne)),jt>ge+1&&(ne=Math.max((jt-ge)*In+a.Aa,ne)),It+1<nr&&(ne=Math.max((nr-It)*In+a.Aa,ne)),Lr=ne.toString()+"px"),bn=Lr!=="1px",ne=a.ya,bn!==a.Be&&(ne=bn?a.ya-a.Db:a.ya+a.Db),$n<Xt+ae||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ae=1,Ot+1<jr&&(ae=Math.max((jr-Ot)*In+ne,ae)),Tt>ye+1&&(ae=Math.max((Tt-ye)*In+ne,ae)),Xt+1<$n&&(ae=Math.max(($n-Xt)*In+ne,ae)),Bt=ae.toString()+"px"),hn=Bt!=="1px"),a.qr&&bn===a.Be&&hn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(bn!==a.Be&&(Lr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),ee=!0),a.Be=bn,it.style.width=Lr,hn!==a.gf&&(Bt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),ee=!0,a.tn&&(ae=st.alloc(),hn?(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=hn,it.style.height=Bt,a.gu=!0,ee&&(a.pn=!0),y=Qe.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(It+1<nr?y=(a.position.x-wt)*In:wt+1<ue?y=Qe.scrollWidth-Qe.clientWidth:jt>ge+1&&(y=a.position.x*In)),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&&(Xt+1<$n?Qe.scrollTop=(a.position.y-Ot)*In:Ot+1<jr?Qe.scrollTop=Qe.scrollHeight-Qe.clientHeight:Tt>ye+1&&(Qe.scrollTop=a.position.y*In)),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=qt.allocAt(E,Le,ze,We),a.onViewportBoundsChanged(x,a.viewportBounds,In,ee),qt.free(x),!1):!0}et=Jt.prototype,et.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Mt("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&&Mt('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 xi||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),Nn(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 an,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)},Jt.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=fd(this)),this.toolManager!==null){var E=new $t;if(a!==null)if(Nn(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 Pn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)vu(a,y,x.value,b,E);else x instanceof xi||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=Kn(),ue=Kn(),ge=y.iterator,ye=st.alloc();ge.next();){var Le=ge.key,ze=ge.value;if(Le.Zc()){var We=kp(a,Le,y);We!==null?ae.push(new re(Le,ze,We)):(!E||Le.canMove())&&(We=ze.point,ee.assign(We),a.computeMove(Le,ee.add(ne),b,ye),Le.location=ye,ze.shifted===void 0&&(ze.shifted=new st),ze.shifted.assign(ye.re(We)))}else ge.key instanceof Pn&&ue.push(ge.sa)}for(st.free(ye),E=ae.length,ge=0;ge<E;ge++)Le=ae[ge],ee.assign(Le.info.point),Le.Su.shifted===void 0&&(Le.Su.shifted=new st),Le.node.location=ee.add(Le.Su.shifted);for(E=st.alloc(),ge=st.alloc(),Le=ue.length,ze=0;ze<Le;ze++){var Qe=ue[ze];if(We=Qe.key,We instanceof Pn)if(We.suspendsRouting){We.Tg=null,ye=We.fromNode;var it=We.toNode;if(a.draggedLink!==null&&b.dragsLink)if(it=Qe.value.point,We.dragComputation===null)y.add(We,a.Pd(b,We,ne)),Ch(We,ne.x-it.x,ne.y-it.y);else{Qe=st.allocAt(0,0),(ye=We.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,We,ye,Tt,b)),ye.assign(We.dragComputation(We,ye,Tt)).re(Qe),y.add(We,a.Pd(b,We,ye)),Ch(We,ye.x-it.x,ye.y-it.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)),it!==null&&(ge.assign(it.location),Tt=y.I(it),Tt!==null&&ge.re(Tt.point)),ye!==null&&it!==null?E.Xa(ge)?(ye=Qe.value.point,it=ee,it.assign(E),it.re(ye),y.add(We,a.Pd(b,We,E)),Ch(We,it.x,it.y)):(We.suspendsRouting=!1,We.bb()):(Qe=Qe.value.point,ye=ye!==null?E:it!==null?ge:ne,y.add(We,a.Pd(b,We,ye)),Ch(We,ye.x-Qe.x,ye.y-Qe.y))}else(We.fromNode===null||We.toNode===null)&&(ye=Qe.value.point,y.add(We,a.Pd(b,We,ne)),Ch(We,ne.x-ye.x,ne.y-ye.y))}st.free(ee),st.free(ne),st.free(E),st.free(ge),Jn(ae),Jn(ue),x||(Sa(a),$h(a,y))}}Jt.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new st),b.assign(y),a===null)return b;var E=y,ee=x.isGridSnapEnabled;ee&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=st.alloc(),dd(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var ne=a.minLocation,ae=ne.x;isNaN(ae)&&(ae=ee?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=ee?Math.round(1e3*a.location.y)/1e3:a.location.y);var ue=a.maxLocation,ge=ue.x;return isNaN(ge)&&(ge=ee?Math.round(1e3*a.location.x)/1e3:a.location.x),ue=ue.y,isNaN(ue)&&(ue=ee?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(ae,Math.min(x.x,ge)),Math.max(ne,Math.min(x.y,ue))),E!==y&&st.free(E),b};function fd(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function dd(a,y,x,b,E){if(E===void 0&&(E=fd(a)),b.assign(x),y!==null){var ee=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var ne=E.gridSnapOrigin,ae=ne.x;if(ne=ne.y,E=E.gridSnapCellSpot,ee!==null){var ue=ee.gridCellSize;isNaN(a)&&(a=ue.width),isNaN(y)&&(y=ue.height),ee=ee.gridOrigin,isNaN(ae)&&(ae=ee.x),isNaN(ne)&&(ne=ee.y)}ee=st.allocAt(0,0),ee.yi(0,0,a,y,E),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 Pn&&(y.suspendsRouting=!0)}function $h(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Pn&&(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=Jt.prototype,et.Pd=function(a,y,x){if(x===void 0)return new Gu(Bn);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&&Mt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Mt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Mt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Mt("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&&Mt("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&&Mt("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)},Jt.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var b=a.change;if(b===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 yn)if(typeof ae=="number"&&ue instanceof _t){y?ne.pc(ae):ne.Gb(ae,ue);var ge=ne.part;ge!==null&&ge.Wb()}else typeof ae=="number"&&ue instanceof Io&&(ue.isRow?c1(ne,ae,y?void 0:ue):f1(ne,ae,y?void 0:ue));else if(ne instanceof ra){var ye=a.oldParam===!0;typeof ae=="number"&&ue instanceof yr&&(y?(ue.isSelected=!1,ue.isHighlighted=!1,ue.Wb(),ne.pc(ye?ae:-1,ue,ye)):ne.oi(ae,ue,ye))}else ne instanceof Jt?typeof ae=="number"&&ue instanceof ra&&(y?this.Wa.mb(ae):(ue.Xe(this),this.Wa.Gb(ae,ue))):Mt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===Eo){var Le=a.object,ze=a.oldParam,We=a.oldValue;if(Le instanceof yn)typeof ze=="number"&&We instanceof _t?y?Le.Gb(ze,We):Le.pc(ze):typeof ze=="number"&&We instanceof Io&&(We.isRow?c1(Le,ze,y?We:void 0):f1(Le,ze,y?We:void 0));else if(Le instanceof ra){var Qe=a.newParam===!0;typeof ze=="number"&&We instanceof yr&&(y?0>Le.Pa.indexOf(We)&&Le.oi(ze,We,Qe):(We.isSelected=!1,We.isHighlighted=!1,We.Wb(),Le.pc(Qe?ze:-1,We,Qe)))}else Le instanceof Jt?typeof ze=="number"&&We instanceof ra&&(y?(We.Xe(this),this.Wa.Gb(ze,We)):this.Wa.mb(ze)):Mt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ea&&Mt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Jt.prototype.Ea=function(a){return this.undoManager.Ea(a)},Jt.prototype.eb=function(a){return this.undoManager.eb(a)},Jt.prototype.Kf=function(){return this.undoManager.Kf()},Jt.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Jt.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Jt.prototype.rp=function(){this.partManager.rp()};function Lp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,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(Vo)?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))}}Jt.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==Ba||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Qi&&(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=cn.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=qt.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){qt.free(y);return}E=y.width,ee=y.height,a=y.x,ne=y.y,qt.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),cn.free(b),x.part.location=y,st.free(y)}}Jt.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),b=x.length,E=0;E<b;E++)x[E].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},Jt.prototype.select=function(a){a!==null&&a.diagram===this&&(!a.isSelected||1<this.selection.count)&&(this.R("ChangingSelection",this.selection),this.clearSelection(!0),a.isSelected=!0,this.R("ChangedSelection",this.selection))},Jt.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Nn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof yr||Mt("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 yr||Mt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Jt.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,b=0;b<x;b++)y[b].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},et=Jt.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 an().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 yr||Mt("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}Mt("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):Mt("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,Le=y.dy,ze=x*ne+b*ue+ye;y=x*ae+b*ge+Le;var We=E*ne+b*ue+ye;return a=E*ae+b*ge+Le,b=x*ne+ee*ue+ye,x=x*ae+ee*ge+Le,ne=E*ne+ee*ue+ye,E=E*ae+ee*ge+Le,ee=Math.min(ze,We),ze=Math.max(ze,We),We=Math.min(y,a),y=Math.max(y,a),ee=Math.min(ee,b),ze=Math.max(ze,b),We=Math.min(We,x),y=Math.max(y,x),ee=Math.min(ee,ne),ze=Math.max(ze,ne),We=Math.min(We,E),y=Math.max(y,E),new qt(ee,We,ze-ee,y-We)},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),kn(a.copy(),this.Ab)};function em(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Mp(a){return a=xd.get(a),a!==null?new a:new Bi}Jt.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Ea&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(ue){return ue.diagram=E}),a.mouseMoveTools.each(function(ue){return ue.diagram=E}),a.mouseUpTools.each(function(ue){return ue.diagram=E}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else b==="StartingUndo"||b==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):b==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===Ea){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),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;Qr(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 an&&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 an&&x.Bg.remove(a),Od(b));break}}}}}Jt.prototype.Wd=function(){this.partManager.Wd()},Jt.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Jt.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Jt.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Jt.prototype.Vb=function(a){return this.partManager.Vb(a)},Jt.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},et=Jt.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:En(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:En(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=qt.alloc();Ap(this,this.computeBounds(a)),qt.free(a)}},et.rz=function(){for(var a=new an,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 $t,b=new $t;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;Mt("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)},Jt.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?yp(this,a):a.assign(this.documentBounds)};function yd(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new lg(a.avoidanceCellSize)),E.vs||E.group!==x||E.Yx!==b){if(E.Hx=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),E.Ix=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=rm(a,x)),x===null){y=qt.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)}qt.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=qt.alloc(),ee=x.memberParts;ee.next();)ne=ee.value,ne instanceof Wn&&Sd(a,ne,b,y);qt.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)}Jt.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Fp(this)};function Fp(a){a.vk===-1&&(a.vk=Qr(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=qt.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Ap(a,y),qt.free(y),a.Fc=!0,a.bd(),Fp(a))}},a.vp))}Jt.prototype.ug=function(){this.vk!==-1&&(xn.clearTimeout(this.vk),this.vk=-1)},Jt.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var b=this.viewportBounds,E=this.scale;b=qt.allocAt(0,0,b.width*E,b.height*E);var ee=st.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,ee.x-=ne,a.x<b.x+x.left/2&&(ee.x-=ne),a.x<b.x+x.left/4&&(ee.x-=4*ne)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,ee.x+=ne,a.x>b.x+b.width-x.right/2&&(ee.x+=ne),a.x>b.x+b.width-x.right/4&&(ee.x+=4*ne));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,ee.y-=ne,a.y<b.y+x.top/2&&(ee.y-=ne),a.y<b.y+x.top/4&&(ee.y-=4*ne)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,ee.y+=ne,a.y>b.y+b.height-x.bottom/2&&(ee.y+=ne),a.y>b.y+b.height-x.bottom/4&&(ee.y+=4*ne)),ee.Xa(Bn)||(y=new st(y.x+ee.x/E,y.y+ee.y/E)),qt.free(b),st.free(ee),y},et=Jt.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):xn.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 xn.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"&&Mt('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"&&Mt("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 cn(1/0,1/0):new cn(2e3,2e3));var ae=y.position||null,ue=y.parts||null,ge=y.padding===void 0?1:y.padding,ye=y.background||null,Le=y.omitTemporary;Le===void 0&&(Le=!0);var ze=y.document||document,We=y.elementFinished||null,Qe=y.showTemporary;Qe===void 0&&(Qe=!Le),y=y.showGrid,y===void 0&&(y=Qe),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof ge=="number"?ge=new Ir(ge):ge instanceof Ir||Mt("MakeImage padding must be a Margin or a number."),ge.left=Math.max(ge.left,0),ge.right=Math.max(ge.right,0),ge.top=Math.max(ge.top,0),ge.bottom=Math.max(ge.bottom,0),a.ib.Vc(!0),Le=new fl(null,ze,void 0,!0);var it=Le.context;if(!(E||ee||ue||ae))return Le.width=a.Aa+Math.ceil(ge.left+ge.right),Le.height=a.ya+Math.ceil(ge.top+ge.bottom),x==="SVG"?b===null?null:(b.resize(Le.width,Le.height,Le.width,Le.height),b.ownerDocument=ze,b.hs=We,cd(a,b.context,ge,new cn(Le.width,Le.height),a.Ca,a.pa,ue,ye,Qe,y),b.context):(a.Xm=!1,cd(a,it,ge,new cn(Le.width,Le.height),a.Ca,a.pa,ue,ye,Qe,y),a.Xm=!0,Le.context);var Tt=a.Pp,wt=a.documentBounds.copy();if(wt.Fv(a.yb),Qe)for(var jt=a.Wa.s,Ot=jt.length,Bt=0;Bt<Ot;Bt++){var It=jt[Bt];if(It.visible&&It.isTemporary){It=It.Pa.s;for(var Xt=It.length,In=0;In<Xt;In++){var nr=It[In];nr.isInDocumentBounds&&nr.isVisible()&&(nr=nr.actualBounds,nr.w()&&wt.ed(nr))}}}if(jt=new st(wt.x,wt.y),ue!==null){for(Ot=new qt(0,0,0,0),Bt=!0,It=ue.iterator,It.reset();It.next();)Xt=It.value,Xt instanceof yr&&(In=Xt.layer,In!==null&&!In.visible||In!==null&&!Qe&&In.isTemporary||!Xt.isVisible()||(Xt=Xt.actualBounds,Xt.w()&&(Bt?(Bt=!1,Ot.assign(Xt)):Ot.ed(Xt))));wt.width=Ot.width,wt.height=Ot.height,jt.x=Ot.x,jt.y=Ot.y}return ae!==null&&ae.w()&&(jt=ae,ee||(ee=Tt)),Ot=ae=0,ge!==null&&(ae=ge.left+ge.right,Ot=ge.top+ge.bottom),Bt=It=0,E!==null&&(It=E.width,Bt=E.height,isFinite(It)&&(It=Math.max(0,It-ae)),isFinite(Bt)&&(Bt=Math.max(0,Bt-Ot))),E!==null&&ee!==null?(ee==="NaN"&&(ee=Tt),E.w()?(E=It,wt=Bt):isNaN(Bt)?(E=It,wt=wt.height*ee):(E=wt.width*ee,wt=Bt)):E!==null?E.w()?(ee=Math.min(It/wt.width,Bt/wt.height),E=It,wt=Bt):isNaN(Bt)?(ee=It/wt.width,E=It,wt=wt.height*ee):(ee=Bt/wt.height,E=wt.width*ee,wt=Bt):ee!==null?ee==="NaN"&&ne.w()?(ee=Math.min((ne.width-ae)/wt.width,(ne.height-Ot)/wt.height),ee>Tt?(ee=Tt,E=wt.width,wt=wt.height):(E=ne.width,wt=ne.height)):(E=wt.width*ee,wt=wt.height*ee):(ee=Tt,E=wt.width,wt=wt.height),ge!==null?(E+=ae,wt+=Ot):ge=new Ir(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)&&(wt=Math.min(wt,ne))),Le.width=Math.ceil(E),Le.height=Math.ceil(wt),x==="SVG"?b===null?null:(b.resize(Le.width,Le.height,Le.width,Le.height),b.ownerDocument=ze,b.hs=We,cd(a,b.context,ge,new cn(Math.ceil(E),Math.ceil(wt)),ee,jt,ue,ye,Qe,y),b.context):(a.Xm=!1,cd(a,it,ge,new cn(Math.ceil(E),Math.ceil(wt)),ee,jt,ue,ye,Qe,y),a.Xm=!0,Le.context)}Ut.Object.defineProperties(Jt.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Oe||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new nu(this,xn.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,xn.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(xn,"resize",this.Ov,!1),this.removeEventListener(xn,"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)&&Fn(a,"0 <= value <= 1",Jt,"opacity"),this.pb=a,this.g("opacity",y,a),this.N())}},validCycle:{get:function(){return this.wu},set:function(a){var y=this.wu;y!==a&&(this.wu=a,this.g("validCycle",y,a))}},layers:{get:function(){return this.Wa.iterator}},isModelReadOnly:{get:function(){var a=this.cc;return a===null?!1:a.isReadOnly},set:function(a){var y=this.cc;y!==null&&(y.isReadOnly=a)}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},isEnabled:{get:function(){return this.Jd},set:function(a){var y=this.Jd;y!==a&&(this.Jd=a,this.g("isEnabled",y,a))}},allowClipboard:{get:function(){return this.Us},set:function(a){var y=this.Us;y!==a&&(this.Us=a,this.g("allowClipboard",y,a))}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowDragOut:{get:function(){return this.Vs},set:function(a){var y=this.Vs;y!==a&&(this.Vs=a,this.g("allowDragOut",y,a))}},allowDrop:{get:function(){return this.Ws},set:function(a){var y=this.Ws;y!==a&&(this.Ws=a,this.g("allowDrop",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowInsert:{get:function(){return this.Ys},set:function(a){var y=this.Ys;y!==a&&(this.Ys=a,this.g("allowInsert",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}},allowUndo:{get:function(){return this.Zs},set:function(a){var y=this.Zs;y!==a&&(this.Zs=a,this.g("allowUndo",y,a))}},allowZoom:{get:function(){return this.at},set:function(a){var y=this.at;y!==a&&(this.at=a,this.g("allowZoom",y,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var y=this.nn;y!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",y,a),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&&Fn(a,">= 0",Jt,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&Fn(a,">= 0",Jt,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var b=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===b&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===b&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===b&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else Fn(a,">= 0",Jt,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var y=this.St;y!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",y,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(a){var y=this.wt;y!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",y,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var y=this.Kt;y!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",y,a))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?a.currentTransaction!==null?!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var y=this.undoManager;!a&&y.isEnabled&&(this.Ce=y.historyIndex),a||em(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&Mt("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=Mp(this.cc.type);for(var E=0;E<x.length;E++)this.add(x[E]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(ee){return a.Pe(ee)}),this.vb=b,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(xn,"pointermove",this.dk,!0),this.addEventListener(xn,"pointerdown",this.ui,!0),this.addEventListener(xn,"pointerup",this.fk,!0),this.addEventListener(xn,"pointerout",this.ek,!0),this.addEventListener(xn,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(xn,"wheel",this.$j,!0),this.addEventListener(xn,"selectstart",this.preventDefault,!1)):(this.removeEventListener(xn,"pointermove",this.dk,!0),this.removeEventListener(xn,"pointerdown",this.ui,!0),this.removeEventListener(xn,"pointerup",this.fk,!0),this.removeEventListener(xn,"pointerout",this.ek,!0),this.removeEventListener(xn,"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(xn,"wheel",this.$j,!0),this.removeEventListener(xn,"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!==yn.Grid&&Mt("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||Mt("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 Ir(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,Lp(this,this.scale,this.scale),this.g("scaleComputation",y,a))}},documentBounds:{get:function(){return this.Sp}},isVirtualized:{get:function(){return this.It},set:function(a){var y=this.It;y!==a&&(this.It=a,this.g("isVirtualized",y,a))}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&Lp(this,y,a)}},defaultScale:{get:function(){return this.Pp},set:function(a){this.Pp=a}},autoScale:{get:function(){return this.yh},set:function(a){var y=this.yh;y!==a&&(this.yh=a,this.g("autoScale",y,a),a!==Ba&&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()||Mt("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()||Mt("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)):Fn(a,"> 0",Jt,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):Fn(a,"> 0",Jt,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(a){this.zu.D(a)||(this.zu=a=a.J())}},contentAlignment:{get:function(){return this.zk},set:function(a){var y=this.zk;y.D(a)||(this.zk=a=a.J(),this.g("contentAlignment",y,a),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 Ir(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&&Mt("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!==Bo&&a!==wd&&Mt("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 cn(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 Ir(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ut.Object.defineProperties(Jt,{licenseKey:{get:function(){return zp.jc()},set:function(a){zp.add(a.replace(/\s/g,""))}},version:{get:function(){return Gc}}}),Jt.prototype.makeImageData=Jt.prototype.Jx,Jt.prototype.makeImage=Jt.prototype.Wz,Jt.prototype.cacheGroupExternalLinks=Jt.prototype.Fu,Jt.prototype.addRenderer=Jt.prototype.bs,Jt.prototype.makeSVG=Jt.prototype.av,Jt.prototype.makeSvg=Jt.prototype.Cs,Jt.prototype.stopAutoScroll=Jt.prototype.ug,Jt.prototype.doAutoScroll=Jt.prototype.gs,Jt.prototype.isUnoccupied=Jt.prototype.Yj,Jt.prototype.raiseDiagramEvent=Jt.prototype.R,Jt.prototype.removeDiagramListener=Jt.prototype.am,Jt.prototype.addDiagramListener=Jt.prototype.Bj,Jt.prototype.findTreeRoots=Jt.prototype.yz,Jt.prototype.layoutDiagram=Jt.prototype.Uz,Jt.prototype.findTopLevelGroups=Jt.prototype.qz,Jt.prototype.findTopLevelNodesAndLinks=Jt.prototype.rz,Jt.prototype.ensureBounds=Jt.prototype.Va,Jt.prototype.findLinksByExample=Jt.prototype.ls,Jt.prototype.findNodesByExample=Jt.prototype.ms,Jt.prototype.findLinkForData=Jt.prototype.Kc,Jt.prototype.findNodeForData=Jt.prototype.ii,Jt.prototype.findPartForData=Jt.prototype.Lc,Jt.prototype.findLinkForKey=Jt.prototype.findLinkForKey,Jt.prototype.findNodeForKey=Jt.prototype.Vb,Jt.prototype.findPartForKey=Jt.prototype.findPartForKey,Jt.prototype.rebuildParts=Jt.prototype.Wd,Jt.prototype.transformViewToDoc=Jt.prototype.Ps,Jt.prototype.transformRectDocToView=Jt.prototype.zA,Jt.prototype.transformDocToView=Jt.prototype.op,Jt.prototype.centerRect=Jt.prototype.es,Jt.prototype.scrollToRect=Jt.prototype.tv,Jt.prototype.scroll=Jt.prototype.scroll,Jt.prototype.highlightCollection=Jt.prototype.Jz,Jt.prototype.highlight=Jt.prototype.Iz,Jt.prototype.selectCollection=Jt.prototype.rA,Jt.prototype.select=Jt.prototype.select,Jt.prototype.updateAllRelationshipsFromData=Jt.prototype.rp,Jt.prototype.updateAllTargetBindings=Jt.prototype.updateAllTargetBindings,Jt.prototype.commit=Jt.prototype.commit,Jt.prototype.rollbackTransaction=Jt.prototype.Kf,Jt.prototype.commitTransaction=Jt.prototype.eb,Jt.prototype.startTransaction=Jt.prototype.Ea,Jt.prototype.raiseChanged=Jt.prototype.g,Jt.prototype.raiseChangedEvent=Jt.prototype.cb,Jt.prototype.removeChangedListener=Jt.prototype.ik,Jt.prototype.addChangedListener=Jt.prototype.Pe,Jt.prototype.removeModelChangedListener=Jt.prototype.mA,Jt.prototype.addModelChangedListener=Jt.prototype.Yw,Jt.prototype.findLayer=Jt.prototype.Qj,Jt.prototype.removeLayer=Jt.prototype.kA,Jt.prototype.addLayerAfter=Jt.prototype.Cy,Jt.prototype.addLayerBefore=Jt.prototype.Ww,Jt.prototype.addLayer=Jt.prototype.Al,Jt.prototype.moveParts=Jt.prototype.moveParts,Jt.prototype.copyParts=Jt.prototype.Kj,Jt.prototype.removeParts=Jt.prototype.Is,Jt.prototype.remove=Jt.prototype.remove,Jt.prototype.add=Jt.prototype.add,Jt.prototype.clearDelayedGeometries=Jt.prototype.bx,Jt.prototype.setProperties=Jt.prototype.nm,Jt.prototype.attach=Jt.prototype.Du,Jt.prototype.set=Jt.prototype.set,Jt.prototype.resetInputOptions=Jt.prototype.Sx,Jt.prototype.setInputOption=Jt.prototype.sA,Jt.prototype.getInputOption=Jt.prototype.Ql,Jt.prototype.resetRenderingHints=Jt.prototype.Tx,Jt.prototype.setRenderingHint=Jt.prototype.Xx,Jt.prototype.getRenderingHint=Jt.prototype.Gf,Jt.prototype.maybeUpdate=Jt.prototype.bd,Jt.prototype.requestUpdate=Jt.prototype.$b,Jt.prototype.delayInitialization=Jt.prototype.Xy,Jt.prototype.isUpdateRequested=Jt.prototype.Pz,Jt.prototype.invalidateDocumentBounds=Jt.prototype.Ya,Jt.prototype.findObjectsNear=Jt.prototype.og,Jt.prototype.findPartsNear=Jt.prototype.mz,Jt.prototype.findObjectsIn=Jt.prototype.Cf,Jt.prototype.findPartsIn=Jt.prototype.ux,Jt.prototype.findObjectsAt=Jt.prototype.ji,Jt.prototype.findPartsAt=Jt.prototype.lz,Jt.prototype.findObjectAt=Jt.prototype.ic,Jt.prototype.findPartAt=Jt.prototype.Ol,Jt.prototype.focusObject=Jt.prototype.zz,Jt.prototype.alignDocument=Jt.prototype.Jy,Jt.prototype.zoomToRect=Jt.prototype.BA,Jt.prototype.zoomToFit=Jt.prototype.zoomToFit,Jt.prototype.diagramScroll=Jt.prototype.kx,Jt.prototype.focus=Jt.prototype.focus;var xd=new $t,om=null,po=xn.document!==void 0,zc=null,ec="",Ba=new pn(Jt,"None",0),Rs=new pn(Jt,"Uniform",1),tc=new pn(Jt,"UniformToFill",2),Tf=new pn(Jt,"CycleAll",10),Dp=new pn(Jt,"CycleNotDirected",11),Bp=new pn(Jt,"CycleNotDirectedFast",12),Rp=new pn(Jt,"CycleNotUndirected",13),Ip=new pn(Jt,"CycleDestinationTree",14),_p=new pn(Jt,"CycleSourceTree",15),mh=new pn(Jt,"DocumentScroll",1),Lf=new pn(Jt,"InfiniteScroll",2),vh=new pn(Jt,"TreeParentCollapsed",21),Bo=new pn(Jt,"AllParentsCollapsed",22),wd=new pn(Jt,"AnyParentsCollapsed",23),zp=new on,Gc="2.3.10",Uc="image",Mf=null,am=!1;function Ta(){if(po){var a=xn.document.createElement("canvas"),y=a.getContext("2d"),x=ln("7ca11abfd022028846");y[x]=ln("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",Yn.Dx+"4ae6247590da4bb21c324ba3a84e385776",kr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",zt.za],E=1;5>E;E++)y[ln("7ca11abfd7330390")](ln(b[E-1]),10,15*E);for(y[x]=ln("39f046ebb36e4b"),x=1;5>x;x++)y[ln("7ca11abfd7330390")](ln(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(kr.prototype.Cd=kr.prototype.Eu),Mf=a}}Jt.className="Diagram",Jt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=xn.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Jt?y.H:null},Jt.inherit=function(a,y){function x(){}if(Object.getPrototypeOf(a).prototype)throw Error(`Used go.Diagram.inherit defining already defined class
|
|
`+a);x.prototype=y.prototype,a.prototype=new x,a.prototype.constructor=a},Jt.useDOM=function(a){po=a?xn.document!==void 0:!1},Jt.isUsingDOM=function(){return po},Jt.None=Ba,Jt.Uniform=Rs,Jt.UniformToFill=tc,Jt.CycleAll=Tf,Jt.CycleNotDirected=Dp,Jt.CycleNotDirectedFast=Bp,Jt.CycleNotUndirected=Rp,Jt.CycleDestinationTree=Ip,Jt.CycleSourceTree=_p,Jt.DocumentScroll=mh,Jt.InfiniteScroll=Lf,Jt.TreeParentCollapsed=vh,Jt.AllParentsCollapsed=Bo,Jt.AnyParentsCollapsed=wd;function sm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Hc(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=xn[ln("76a715b2f73f148a")][ln("72ba13b5")]||"";if(a.Rc=!0,po){var b=Jt[ln("76a115b6ed251eaf4692")];if(b)for(var E=zp.iterator;E.next()&&(b=E.value,b=ln(b).split(ln("39e9")),!(6>b.length));){var ee=ln(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=ln(Yn[ln("6cae19")]).split(".");if(ee[0]>ne[0]||ee[0]===ne[0]&&ee[1]>=ne[1]){var ae=xn[ln("74a900bae4370f8b51")][ln("6fbb13a1c2311e8a57")].toLowerCase();if(ne=ae[ln("73a612b6fb191d")](ln("3aad1ab6e022098b4dc4")),ee=ln(b[2]),-1<ne&&(ae=ae[ln("73a612b6fb191d")](ee.toLowerCase()+"/"),a.Rc=!(-1<ae&&ae<ne),!a.Rc))break;for(ne=x[ln("76ad18b4f73e")],ae=x[ln("73a612b6fb191d")](ln("35e7"))+2;ae<ne;ae++)y+=x[ae];if(ne=y[ln("73a612b6fb191d")](ee),0>ne&&ee!==ln("7da71ca0ad381e90")&&(ne=y[ln("73a612b6fb191d")](ln("76a715b2ef3e149757"))),0>ne&&(ne=y[ln("73a612b6fb191d")](ln("76a715b2ef3e149757"))),0>ne&&(ne=y[ln("73a612b6fb191d")](ln("2bfa41fdb3784bca12"))),0>ne&&(ne=x[ln("73a612b6fb191d")](ln("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[ln("73a612b6fb191d")](ln("35"))||y[ln("73a612b6fb191d")](ln("35"))===-1),!a.Rc||x[ln("73a612b6fb191d")](ln("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[ln("73a612b6fb191d")](ee)),!a.Rc)||(ne=xn[ln("76a715b2f73f148a")][ln("69ad17a1e03e")],ae=ne[ln("73a612b6fb191d")](ln("7fb002b6ed25128b4da25b2e")),-1<ae&&(a.Rc=!(ne[ln("73a612b6fb191d")](ee)>ae),!a.Rc)))break;if(ee[0]==="#"){ne=xn.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[ln("79a417a0f0181a8946")]=b,xn.document[ln("78a712aa")]){xn.document[ln("78a712aa")][ln("7bb806b6ed32388c4a875b")](ne),ue=xn.getComputedStyle(ne).getPropertyValue(ln("78a704b7e62456904c9b12701b6532a8"));var ge=xn.getComputedStyle(ne).getPropertyValue(ln("75b817b0ea2202"));if(xn.document[ln("78a712aa")][ln("68ad1bbcf533388c4a875b")](ne),ue){if(ne=xn[ln("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(ln("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[ln("76ad18b4f73e")],E=x[ln("73a612b6fb191d")](ln("35e7"))+2;E<ye;E++)y+=x[E];x=y[ln("73a612b6fb191d")](ln("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[ln("73a612b6fb191d")](ln("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}Ut.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 ce(){this.reset()}ce.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new cn(NaN,NaN).freeze(),this.gridSnapCellSpot=li,this.gridSnapOrigin=new st(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ce.className="DraggingOptions";function Ce(a,y){if(typeof a=="string"||xn.Element&&a instanceof Element)var x=Jt.call(this,a)||this;else x=Jt.call(this)||this,y=a;return Pe(x),y&&x.nm(y),x}Zt(Ce,Jt);function Pe(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Ci,a.layout=new ha}Ce.prototype.reset=function(){Jt.prototype.reset.call(this),Pe(this)},Ce.className="Palette";function Oe(a,y){if(typeof a=="string"||xn.Element&&a instanceof Element)var x=Jt.call(this,a)||this;else x=Jt.call(this)||this,y=a;var b=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new yr;var E=new Gr;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 Ir(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Lt,x.toolManager.mouseMoveTools),x.click=function(){var ee=b.observed;if(ee!==null){var ne=ee.viewportBounds,ae=b.lastInput.documentPoint;ee.position=new st(ae.x-ne.width/2,ae.y-ne.height/2)}},x.Pf=function(){b.Ya(),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}Zt(Oe,Jt),Oe.prototype.computePixelRatio=function(){return 1},Oe.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(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),$e(this)}finally{this.ta=a,this.ib=y}}}Jt.prototype.redraw.call(this)},Oe.prototype.gc=function(){if(this.Ka===null&&Mt("No div specified"),this.ta===null&&Mt("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?$e(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,b=0;b<x;b++)y[b].gc(a,this);this.Fc=this.vd=!1}}};function $e(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,b=a.drawsGrid&&x,E=y.grid;b&&E!==null&&E.visible&&!isNaN(E.width)&&!isNaN(E.height)&&(E=qt.alloc().assign(a.viewportBounds).ed(y.viewportBounds),eu(y,E),qt.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),Le=ue.scale,ze=qt.alloc(),We=ae.Pa.s,Qe=We.length,it=0;it<Qe;it++){var Tt=We[it];(b||Tt!==ge)&&ae.Oj(E,Tt,ue,null,Le,ze,!1)}qt.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=cn.alloc();E.h(x.width,x.height),b.desiredSize=E,cn.free(E),a=2/a.scale,b instanceof Gr&&(b.strokeWidth=a),y.location=new st(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Oe.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Ao;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Oe.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Oe.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),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))},Ut.Object.defineProperties(Oe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Oe&&Mt("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 Lt(){uo.call(this),this.j=null}Zt(Lt,uo),Lt.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new st(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new st(a.x-this.j.x,a.y-this.j.y)),!0)},Lt.prototype.doActivate=function(){this.j=null,uo.prototype.doActivate.call(this)},Lt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Lt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var b=a.firstInput.documentPoint;x=x.location,this.j=new st(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new st(a.x-this.j.x,a.y-this.j.y)}}},Lt.className="OverviewDraggingTool";function kt(){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=Ao,this.hb=!0,this.cg=null,this.ob=200}kt.prototype.toString=function(){return"CommandHandler"},kt.prototype.Xe=function(a){this.H=a},kt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=di?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 Qi&&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 an,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 an;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 an,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=Ao):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),od(y)},kt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},kt.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(ue){this.cg=null}a===null&&(0<y.highlighteds.count?this.cg=y.highlighteds.iterator:0<y.selection.count&&(this.cg=y.selection.iterator),this.cg!==null&&this.cg.next()&&(a=this.cg.value))}if(a!==null){var x=y.animationManager;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 yr&&y.tv(ue.actualBounds),ue instanceof Wn&&!ue.isTreeExpanded&&(ue.isTreeExpanded=!0),ue instanceof Or&&!ue.isSubGraphExpanded&&(ue.isSubGraphExpanded=!0)):(ue instanceof yr&&y.es(ue.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Qr(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 xi)Rt(a,y.adornedPart,x);else if(y instanceof Pn){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 yr)?!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 Le=ae.first().containingGroup;if(Le!==null)for(;Le!==null;){E=!1;for(var ze=ae.iterator;ze.next();)if(!ze.value.Td(Le)){E=!0;break}if(E)Le=Le.containingGroup;else break}if(x instanceof Or)dl(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var We=y.copyNodeData(x);tn(We)&&(y.xf(We),b=a.ii(We))}if(b!==null){Le!==null&&this.isValidMember(Le,b)&&(b.containingGroup=Le);for(var Qe=ae.iterator;Qe.next();){var it=Qe.value;this.isValidMember(b,it)&&(it.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},kt.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function nn(a){var y=Kn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Pn||y.push(x)}a=new an,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 Jn(y),a}kt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Pn)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 Le=ne.iterator;Le.next();){var ze=Le.value;if(ze.isSelected=!0,!(ze instanceof Pn)){var We=ze.data;We!==null?x.mp(We,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=nn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},kt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),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(zr):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 $t,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 Pn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},Ut.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||Mt("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 kr,this.wh=new kr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ta,this.uc=new qt(NaN,NaN,NaN,NaN).freeze(),this.Ib=new qt(NaN,NaN,NaN,NaN).freeze(),this.dc=new qt(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 mn,dn,lr,dr,br,Fr,ui,Yr,vi,zi;_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=jn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},_t.prototype.Vw=function(a){var y=this.Dh;if(Nn(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===Pn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Mt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===_t&&(this.stretch=a)},et.toString=function(){return er(this.constructor)+"#"+ti(this)},et.th=function(){this.A!==null&&(this.A.nc=!0)};function Hr(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&&da(this)&&eo(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 $t),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 yn&&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 yn&&Zc(ae,function(ue){ue.data!==null&&ue.l&16777216&&ue.La(y)})};function eo(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 kr);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?Zn(a.x,a.y,0,0,0,b.height)<=y||Zn(a.x,a.y,0,b.height,b.width,b.height)<=y||Zn(a.x,a.y,b.width,b.height,b.width,0)<=y||Zn(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=to(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 xi||this instanceof Gr?to(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 to(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=qt.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),qt.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=qt.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),qt.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 ar){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 qt);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),ci(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),ci(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),ci(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,Le=ne*(ee.m21*ee.dy-ee.m22*ee.dx),ze=ne*(ee.m12*ee.dx-ee.m11*ee.dy);return this.areaBackground!==null?(ee=this.actualBounds,zt.Ff(ee.left,ee.top,ee.right,ee.bottom,a,y,x,b,E)):(ne=a*ae+y*ge+Le,a=a*ue+y*ye+ze,y=x*ae+b*ge+Le,x=x*ue+b*ye+ze,E.h(0,0),b=this.naturalBounds,x=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 yn;switch(ss(this,!0)){case dn:ne=E=0,ae&&(y=a=1/0);break;case mn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case dr:isFinite(a)&&a>x&&(E=a),ne=0,ae&&(y=1/0);break;case br: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()||Mt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Ro(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=qt.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()||Mt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(ee,this.Ib),yu(this,!1),qt.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=dn),y){case dn:(x>b||ee>E)&&(Ro(a,!0),a.measure(x>b?b:x,ee>E?E:ee,0,0));break;case mn:Ro(a,!0),a.measure(b,E,0,0);break;case dr:Ro(a,!0),a.measure(b,ee,0,0);break;case br:Ro(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(),mi(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 yn&&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 Fi&&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 Fi&&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 Le=0;ge&&y.Gf("drawShadows")&&(ue=ge.isShadowed)&&(ye=ge.shadowOffset,Le=Math.max(ye.y,ye.x)*y.scale*y.Mb),ye=this.Dd();var ze;if(!(ze=y.$i||!ye)){var We=this.naturalBounds;ze=this.wh;var Qe=ze.m11,it=ze.m21,Tt=ze.dx,wt=ze.m12,jt=ze.m22,Ot=ze.dy,Bt,It=Bt=0;ze=Bt*Qe+It*it+Tt;var Xt=Bt*wt+It*jt+Ot;Bt=We.width+Le,It=0;var In=Bt*Qe+It*it+Tt;Bt=Bt*wt+It*jt+Ot,It=Math.min(ze,In);var nr=Math.min(Xt,Bt),$n=Math.max(ze+0,In)-It,bn=Math.max(Xt+0,Bt)-nr;ze=It,Xt=nr,Bt=We.width+Le,It=We.height+Le,In=Bt*Qe+It*it+Tt,Bt=Bt*wt+It*jt+Ot,It=Math.min(ze,In),nr=Math.min(Xt,Bt),$n=Math.max(ze+$n,In)-It,bn=Math.max(Xt+bn,Bt)-nr,ze=It,Xt=nr,Bt=0,It=We.height+Le,In=Bt*Qe+It*it+Tt,Bt=Bt*wt+It*jt+Ot,It=Math.min(ze,In),nr=Math.min(Xt,Bt),$n=Math.max(ze+$n,In)-It,bn=Math.max(Xt+bn,Bt)-nr,ze=It,Xt=nr,Le=y.viewportBounds,We=Le.x,Qe=Le.y,ze=!(ze>Le.width+We||We>$n+ze||Xt>Le.height+Qe||Qe>bn+Xt)}if(ze){if(ze=(this.l&256)!==0,a.clipInsteadOfFill&&(ze=!1),this instanceof Zi&&(a.font=this.font),ze){if(Xt=ae.se()?ae.naturalBounds:ae.actualBounds,$n=Math.max(ne.x,Xt.x),bn=Math.max(ne.y,Xt.y),Le=Math.min(ne.right,Xt.right)-$n,We=Math.min(ne.bottom,Xt.bottom)-bn,Qe=this.tb,Qe!==null&&($n=Qe.x,bn=Qe.y,Le=Qe.width,We=Qe.height),$n>ne.width+ne.x||ne.x>Xt.width+Xt.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect($n,bn,Le,We),a.clip()}if(ye){if(!ge.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}ue&&(Xt=ge.shadowOffset,a.Ev(Xt.x*y.scale*this.scale*y.Mb,Xt.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 yn)),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===yn.Auto||y.type===yn.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 Fi&&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 Fi&&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 La(a,y,x){for(var b=y.O.s,E=b.length,ee=-1,ne=0;ne<E;ne++)if(b[ne]===a){ee=ne;break}if(a=ee,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===yn.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&&La(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var ee=a.shadowOffset;y.Ev(ee.x*x.scale*a.scale*x.Mb,ee.y*x.scale*a.scale*x.Mb,a.shadowBlur),Uu(y),y.shadowColor=a.shadowColor}a instanceof Zi&&(y.font=a.font),y.yd=null;var ne=a.transform;ee=a instanceof yn;var ae=a instanceof yn?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&&La(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"+Ni++,ae=a.Ud("clipPath",{id:ee}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof yn&&(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 Ma(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 yn?xh(this):!1;if(!(this instanceof yn&&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 yn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof Gr){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 yn))&&(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 Vc)&&x.xe&&(x.type===Ld||x.yk===ae&&x.ft===ue))var ye=x.xe;else{var Le=0,ze=0,We=0,Qe=0,it=0,Tt=0;if(Tt=it=0,E?(it=ne.x,Tt=ne.y):b||(it-=ge/2,Tt-=ge/2),Le=x.start.x*ae+x.start.offsetX,ze=x.start.y*ue+x.start.offsetY,We=x.end.x*ae+x.end.offsetX,Qe=x.end.y*ue+x.end.offsetY,Le+=it,We+=it,ze+=Tt,Qe+=Tt,x.type===Wu)ye=y.createLinearGradient(Le,ze,We,Qe);else if(x.type===Qs)Tt=isNaN(x.endRadius)?Math.max(ae,ue)/2:x.endRadius,isNaN(x.startRadius)?(it=0,Tt=Math.max(ae,ue)/2):it=x.startRadius,ye=y.createRadialGradient(Le,ze,it,We,Qe,Tt);else if(x.type===Ld)try{ye=y.createPattern(x.pattern,"repeat")}catch(jt){ye=null}if(x.type!==Ld&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)ye.addColorStop(E.key,E.value);if(ee&&(x.xe=ye,ye!==null&&(x.yk=ae,x.ft=ue),ye===null&&x.type===Ld&&x.yk!==-1)){x.yk=-1;var wt=a.diagram;wt!==null&&x.yk===-1&&Qr(function(){wt.redraw()},600)}}b?y.fillStyle=ye:y.strokeStyle=ye}}}et.rg=function(a){if(a instanceof yn)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 yn?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,zr),a.rotate(this.Kb,ee.x,ee.y),st.free(ee)}},et.v=function(a){if(!_s(this)){a===void 0&&(a=!1),Ro(this,!0),yu(this,!0);var y=this.panel;y===null||a||y.v()}},et.Uj=function(){_s(this)||(Ro(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===yn.Table?Bl(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===yn.Auto&&b.Pb()===a?oa(a,mn,y):x===Fr?b!==null?b.type===yn.Spot&&b.Pb()===a?oa(a,mn,y):(x=b.defaultStretch,x===Fr?oa(a,dn,y):oa(a,x,y)):oa(a,dn,y):oa(a,x,y)}function Bl(a,y,x,b){var E=a.stretch;if(E!==Fr)return oa(a,E,b);var ee=E=null;switch(y.stretch){case br:ee=!0;break;case mn:ee=!0}switch(x.stretch){case dr:E=!0;break;case mn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===dr||y===mn),ee===null&&(ee=y===br||y===mn),E===!0&&ee===!0?oa(a,mn,b):E===!0?oa(a,dr,b):ee===!0?oa(a,br,b):oa(a,dn,b)}function oa(a,y,x){if(x)return y;if(y===dn||(x=a.desiredSize,x.w()))return dn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===dr)return dn;if(y===mn)return br}else{if(y===br)return dn;if(y===mn)return dr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===br)return dn;if(y===mn)return dr}else{if(y===dr)return dn;if(y===mn)return br}return y}function Pl(a,y){a.l=y?a.l|512:a.l&-513}function da(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 Ro(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 yn?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 Lo(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&d1(a)&&Mt("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 yn?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 $t),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=jn(arguments),b=ee(x),tn(b)||Mt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=xn.go[a]}if(b===null&&(E!=null&&E.constructor||Mt("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),b=new E),E=1,b instanceof Jt&&1<x.length){ee=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(mp(ee,ne),E++)}for(;E<x.length;E++)ee=x[E],ee===void 0?Mt("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 Gr)a.figure=y;else if(a instanceof us)a.source=y;else if(a instanceof yn)y=Cl.I(y),y!==null&&(a.type=y);else if(a instanceof Fi){var x=Xn(Fi,y);x!==null?a.type=x:Mt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof wn?(y=Xn(wn,y),y!==null&&(a.type=y)):a instanceof Si&&(y=Xn(Si,y),y!==null&&(a.type=y));else if(y instanceof _t)a instanceof yn||Mt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Io){var b;y.isRow&&typeof a.getRowDefinition=="function"?b=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(b=a.getColumnDefinition(y.index)),b instanceof Io?km(b,y):Mt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof pn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Ho)a.type=y;else if(y instanceof Lo)a instanceof _t||a instanceof Io?a.bind(y):Mt("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):Mt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Fo)a instanceof wn&&a.type===wn.o?a.figures.add(y):Mt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Si)a instanceof Fo?a.segments.add(y):Mt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof lo)a instanceof Jt||a instanceof Or?a.layout=y:Mt("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 Fi){x=new ir;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);Bc(a,x)}else if(a instanceof Io){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Mt("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)&&Mt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new ir;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Bc(a,E)}else Bc(a,y);else Mt('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}Ut.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&&(Hr(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&&(Hr(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:Bn},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new nc),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Fr},set:function(a){var y=this.stretch;y!==a&&(Hr(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&&(Hr(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)&&Fn(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 Fi&&a.freeze(),Hr(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 Fi&&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 yr)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&&Mt("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 Gr&&this.qc(),this.g("desiredSize",b,a),da(this)&&(a=this.part,a!==null&&(eo(this,a,"width"),eo(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 cn(a,this.jd.height).freeze(),this.v(),this instanceof Gr&&this.qc(),this.g("desiredSize",y,a),da(this)&&(a=this.part,a!==null&&eo(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 cn(this.jd.width,a).freeze(),this.v(),this instanceof Gr&&this.qc(),this.g("desiredSize",y,a),da(this)&&(a=this.part,a!==null&&eo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:vr},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(),Hr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Ei},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(),Hr(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 Ir(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&&(Hr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:dn},set:function(a){this.reshapingBehavior!==a&&(Hr(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()&&Mt("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&&Fn(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&&Fn(a,">= 1",_t,"columnSpan"),Hr(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&&Fn(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&&Fn(a,">= 1",_t,"rowSpan"),Hr(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&&(Hr(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||Mt("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&&Fn(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&&Fn(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&&Fn(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&&Fn(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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&&(Hr(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 $t,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(yn,yn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof yn){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(Gr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new ar(0,0,2.76142374915397,2.761423749153969),spot2:new ar(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 yn&&(x=b.fb("ButtonBorder"),x instanceof Gr)){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 yn&&(x=b.fb("ButtonBorder"),x instanceof Gr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof yn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Gr){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 yn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Gr){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 yn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof Gr){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 yn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof Gr))){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(Gr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ur},new Lo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Lo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof xi&&(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(Gr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ur},new Lo("figure","isSubGraphExpanded",function(y,x){return x=x.panel,y?x._subGraphExpandedFigure:x._subGraphCollapsedFigure}).cp()));return a.click=function(y,x){if(x=x.part,x instanceof xi&&(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(xi,yn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},Js(Gr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new ar(0,0,4,6),spot2:new ar(1,1,-4,-4)}))}),yh("ContextMenu",function(){return Js(xi,yn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},new Lo("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),yh("ContextMenuButton",function(){var a=Js("Button");a.stretch=dr;var y=a.fb("ButtonBorder");return y instanceof Gr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new ar(0,0,2,3),y.spot2=new ar(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(Gr,{name:"ButtonIcon",strokeWidth:2},new Lo("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Gr&&(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 cn(14,14)},Js(Gr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:mn,geometryStretch:lr,visible:!1},y!==""?new Lo("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof yn){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 Ir(0,1,0,0)});var y=Js(yn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Ir(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=dn=new pn(_t,"None",0),_t.Default=Fr=new pn(_t,"Default",0),_t.Vertical=br=new pn(_t,"Vertical",4),_t.Horizontal=dr=new pn(_t,"Horizontal",5),_t.Fill=mn=new pn(_t,"Fill",3),_t.Uniform=lr=new pn(_t,"Uniform",1),_t.UniformToFill=ui=new pn(_t,"UniformToFill",2),_t.FlipVertical=Yr=new pn(_t,"FlipVertical",1),_t.FlipHorizontal=vi=new pn(_t,"FlipHorizontal",2),_t.FlipBoth=zi=new pn(_t,"FlipBoth",3),_t.make=Js,_t.getBuilders=function(){var a=new $t,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;Mt('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=vr,this.o=Ei,this.hg=Fr,this.ob=this.Bi=1,this.Pf=dn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}jf.prototype.copy=function(){var a=new jf;return a.xa=this.xa,a.zp=this.zp,a.te=this.te,a.nb=this.nb,a.j=this.j,a.zh=this.zh,a.Fh=this.Fh,a.Bh=this.Bh,a.Mh=this.Mh,a.Ph=this.Ph,a.Qh=this.Qh,a.Oh=this.Oh,a.Nh=this.Nh,a.Of=this.Of,a.Xd=this.Xd,a.Lh=this.Lh,a.V=this.V,a.ia=this.ia,a.Ha=this.Ha,a.F=this.F,a.$h=this.$h,a.Ch=this.Ch,a.Hb=this.Hb,a.Di=this.Di,a.hb=this.hb,a.u=this.u.J(),a.o=this.o.J(),a.hg=this.hg,a.Bi=this.Bi,a.ob=this.ob,a.Pf=this.Pf,a.gd=this.gd,a.Ci=this.Ci,a.Pc=this.Pc,a.Oc=this.Oc,a};function nc(){this.u=-1/0,this.o=0,this.F=Bn,this.rr=$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 Kc(){this.ha=[1,0,0,1,0,0]}Kc.prototype.copy=function(){var a=new Kc;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},Kc.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},Kc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Kc.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,ee=this.ha[0]*-b+this.ha[2]*a,ne=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=ee,this.ha[3]=ne,this.translate(-y,-x)}},Kc.className="STransform";function Of(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Of.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Of.className="SGradient";function nu(a,y,x){this.ownerDocument=a=y===void 0?xn.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),tn(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},Ut.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 Kc,this.j=um(this),this.Nj=um(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Ni++,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),Le=x*Math.sin(b),ze=a+ye,We=y+Le,Qe=ee?0:1;b=ee?b-E:E-b,(1e-6<Math.abs(ne-ze)||1e-6<Math.abs(ae-We))&&this.path.push(["L",ze,+We]),0>b&&(b=b%ue+ue),b>ge?(this.path.push(["A",x,x,0,1,Qe,a-ye,y-Le]),this.path.push(["A",x,x,0,1,Qe,ze,We])):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"+Ni++,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"+Ni++,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=jn(a[E]),ne=[ee.shift()];if(ne[0]==="A")ne.push(ee.shift()+","+ee.shift(),ee.shift(),ee.shift()+","+ee.shift(),ee.shift()+","+ee.shift());else for(;ee.length;)ne.push(ee.shift()+","+ee.shift());b.push(ne.join(" "))}if(b=b.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+b+'")');else if(a.d=b,Pd(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var ae in a)ae!=="transform"&&y.setAttributeNS(null,ae,a[ae]);else{ae=y.getElementsByTagName("path");for(var ue in a)ue!=="transform"&&ae[x].setAttributeNS(null,ue,a[ue])}else this.addElement("path",a)};function Up(a,y,x,b,E,ee,ne){var ae=new Kc;ae.ha=[y,x,b,E,ee,ne],y={},Pd(a,"g",y,ae),ae=a.addElement("g",y),a.nh.push(ae)}function um(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}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",Jt.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new nu(this,xn.document));var y=new nu(this,xn.document,!0);a===void 0&&(a=new ir);var x=this;return kf(this,function(b,E){return b=im(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},Jt.prototype.makeSvg=Jt.prototype.Cs,Jt.prototype.av=function(a){return this.Cs(a)},Jt.prototype.makeSVG=Jt.prototype.av;function fl(a,y,x,b){this.ownerDocument=y=y===void 0?xn.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Vc(y,x,b),y.H=a}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},Ut.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 Vc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Mt("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 kr,this.isTemporary=!!x}et=Vc.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()},Vc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},et=Vc.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 Fi&&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(){},Ut.Object.defineProperties(Vc.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap},set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit=a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY=a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter=a===""?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var vx=Object.freeze([]);Vc.className="CanvasSurfaceContext";function Hp(){this.F=this.o=this.u=this.j=0}Hp.className="ColorNumbers";function Fi(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=Ci,this.Lk=Oo):this.Lk=a===Qs?this.Qd=zr: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)}Fi.prototype.copy=function(){var a=new Fi;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=Fi.prototype,et.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},et.ka=function(){return Object.isFrozen(this)&&Mt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},et.qb=function(a){a.classType===Fi&&(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===Ld?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,this.colorStops!==null)for(var y=this.colorStops.iterator;y.next();)a+=" "+y.key+":"+y.value;return a+")"},et.addColorStop=function(a,y){return this._isFrozen&&Wt(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Fn(a,"0 <= loc <= 1",Fi,"addColorStop:loc"),this.we===null&&(this.we=new $t),this.we.add(a,y),this.na===Sh&&(this.type=Wu),this.xe=null,this},et.Vz=function(a,y){if(this._isFrozen&&Wt(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Md: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?Md:x,Hu(a),Ed(y,x)}et.Wy=function(a,y){if(this._isFrozen&&Wt(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Md: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?Md: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 Fi?a.Gx():(Hu(a),128>(299*Yi.j+587*Yi.u+114*Yi.o)/1e3):!1}function Ed(a,y){switch(y){case Md:y=100*l0(Yi.j);var x=100*l0(Yi.u),b=100*l0(Yi.o);return 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:Mt("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 Fi||Mt("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}Ut.Object.defineProperties(Fi.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Wt(this,a),this.na=a,this.start.Mc()&&(a===Wu?this.start=Ci:a===Qs&&(this.start=zr)),this.end.Mc()&&(a===Wu?this.end=Oo:a===Qs&&(this.end=zr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Wt(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Wt(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Wt(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Wt(this,a),0>a&&Fn(a,">= zero",Fi,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Wt(this,a),0>a&&Fn(a,">= zero",Fi,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Wt(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Wt(this,a),this.cr=a,this.xe=null}}}),Fi.prototype.isDark=Fi.prototype.Gx,Fi.prototype.darkenBy=Fi.prototype.Wy,Fi.prototype.lightenBy=Fi.prototype.Vz,Fi.prototype.addColorStop=Fi.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;Fi.className="Brush";var Sh;Fi.Solid=Sh=new pn(Fi,"Solid",0);var Wu;Fi.Linear=Wu=new pn(Fi,"Linear",1);var Qs;Fi.Radial=Qs=new pn(Fi,"Radial",2);var Ld;Fi.Pattern=Ld=new pn(Fi,"Pattern",4);var Md;Fi.Lab=Md=new pn(Fi,"Lab",5);var r1;Fi.HSL=r1=new pn(Fi,"HSL",6),Fi.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},Fi.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)},Fi.lighten=function(a){return e1(a)},Fi.lightenBy=e1,Fi.darken=function(a){return t1(a)},Fi.darkenBy=t1,Fi.mix=a0,Fi.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(){},Ut.Object.defineProperties(Ho.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return yn}}}),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"}Zt(fm,Ho),fm.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=b.length;a=Ku(a);for(var ue=0;ue<ae;ue++){var ge=b[ue];if(ge.visible||ge===a){var ye=ge.margin,Le=ye.right+ye.left;ye=ye.top+ye.bottom,ge.measure(y,x,ee,ne);var ze=ge.measuredBounds;Le=Math.max(ze.width+Le,0),ye=Math.max(ze.height+ye,0),ze=ge.position.x;var We=ge.position.y;isFinite(ze)||(ze=0),isFinite(We)||(We=0),ge instanceof Gr&&ge.isGeometryPositioned&&(ge=ge.strokeWidth/2,ze-=ge,We-=ge),ci(E,ze,We,Le,ye)}}},fm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding;for(a=x.x-E.left,x=x.y-E.top,E=0;E<b;E++){var ee=y[E],ne=ee.measuredBounds,ae=ee.margin,ue=ee.position.x,ge=ee.position.y;if(ue=isNaN(ue)?-a:ue-a,ge=isNaN(ge)?-x:ge-x,ee instanceof Gr&&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"}Zt(dm,Ho),dm.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=b.length;y=Kn(),ee=Ku(a);for(var ue=0;ue<ae;ue++){var ge=b[ue];if(ge.visible||ge===ee){var ye=ss(ge,!1);if(ye!==dn&&ye!==dr)y.push(ge);else{ge.measure(1/0,x,0,ne),ye=ge.margin,ge=ge.measuredBounds;var Le=Math.max(ge.height+ye.top+ye.bottom,0);E.width+=Math.max(ge.width+ye.right+ye.left,0),E.height=Math.max(E.height,Le)}}}for(b=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):E.height!==0&&(x=Math.min(E.height,a.maxSize.height)),a=0;a<b;a++)ue=y[a],(ue.visible||ue===ee)&&(ye=ue.margin,ae=ye.right+ye.left,ye=ye.top+ye.bottom,ue.measure(1/0,x,0,ne),ue=ue.measuredBounds,ye=Math.max(ue.height+ye,0),E.width+=Math.max(ue.width+ae,0),E.height=Math.max(E.height,ye));Jn(y)},dm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,ee=E.top,ne=a.isOpposite,ae=ne?x.width:E.left,ue=0;ue<b;ue++){var ge=ee,ye=y[ue];if(ye.visible){var Le=ye.measuredBounds,ze=ye.margin,We=ze.top+ze.bottom,Qe=ee+E.bottom,it=Le.height,Tt=ss(ye,!1);(isNaN(ye.desiredSize.height)&&Tt===mn||Tt===br)&&(it=Math.max(x.height-We-Qe,0)),We=it+We+Qe,Qe=ye.alignment,Qe.Xb()&&(Qe=a.defaultAlignment),Qe.sb()||(Qe=zr),ne&&(ae-=Le.width+ze.left+ze.right),ye.arrange(ae+Qe.offsetX+ze.left,ge+Qe.offsetY+ze.top+(x.height*Qe.y-We*Qe.y),Le.width,it),ne||(ae+=Le.width+ze.left+ze.right)}}};function pm(){this.xa="Base"}Zt(pm,Ho),pm.prototype.measure=function(a,y,x,b,E,ee){var ne=b.length;x=Kn();for(var ae=Ku(a),ue=0;ue<ne;ue++){var ge=b[ue];if(ge.visible||ge===ae){var ye=ss(ge,!1);if(ye!==dn&&ye!==br)x.push(ge);else{var Le=ge.margin;ye=Le.right+Le.left,Le=Le.top+Le.bottom,ge.measure(y,1/0,ee,0),ge=ge.measuredBounds,Mi(E,Math.max(E.width,Math.max(ge.width+ye,0)),E.height+Math.max(ge.height+Le,0))}}}if(b=x.length,b!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):E.width!==0&&(y=Math.min(E.width,a.maxSize.width)),a=0;a<b;a++)ue=x[a],(ue.visible||ue===ae)&&(ge=ue.margin,ne=ge.right+ge.left,ge=ge.top+ge.bottom,ue.measure(y,1/0,ee,0),ue=ue.measuredBounds,ge=Math.max(ue.height+ge,0),E.width=Math.max(E.width,Math.max(ue.width+ne,0)),E.height+=ge);Jn(x)}},pm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,ee=E.left,ne=a.isOpposite,ae=ne?x.height:E.top,ue=0;ue<b;ue++){var ge=ee,ye=y[ue];if(ye.visible){var Le=ye.measuredBounds,ze=ye.margin,We=ze.left+ze.right,Qe=ee+E.right,it=Le.width,Tt=ss(ye,!1);(isNaN(ye.desiredSize.width)&&Tt===mn||Tt===dr)&&(it=Math.max(x.width-We-Qe,0)),We=it+We+Qe,Qe=ye.alignment,Qe.Xb()&&(Qe=a.defaultAlignment),Qe.sb()||(Qe=zr),ne&&(ae-=Le.height+ze.bottom+ze.top),ye.arrange(ge+Qe.offsetX+ze.left+(x.width*Qe.x-We*Qe.x),ae+Qe.offsetY+ze.top,it,Le.height),ne||(ae+=Le.height+ze.bottom+ze.top)}}};function gm(){this.xa="Base"}Zt(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,Le=ge.top+ge.bottom;ue.measure(y,x,ee,ne);var ze=ue.measuredBounds;ee=ze.width,ne=ze.height;var We=Math.max(ee+ye,0),Qe=Math.max(ne+Le,0),it=a.isClipping,Tt=qt.allocAt(-ge.left,-ge.top,We,Qe),wt=qt.allocAt(0,0,ee,ne);p0(ue,wt,!0),ee=wt.width,ne=wt.height;for(var jt=!0,Ot=Ku(a),Bt=0;Bt<ae;Bt++){var It=b[Bt];ze=y;var Xt=x;if(It!==ue&&(It.visible||It===Ot)){ge=It.margin;var In=ge.left,nr=ge.top;switch(We=ge.right+ge.left,Qe=ge.top+ge.bottom,ge=ss(It,!1),ge){case mn:ze=ee,Xt=ne,nr=In=Qe=We=0;break;case dr:ze=ee,In=We=0;break;case br:Xt=ne,nr=Qe=0}It.measure(ze,Xt,0,0),ze=It.measuredBounds,We=Math.max(ze.width+We,0),Qe=Math.max(ze.height+Qe,0),ge=It.alignment,ge.Xb()&&(ge=a.defaultAlignment),ge.sb()||(ge=zr);var $n=It.alignmentFocus;if($n.Xb()&&($n=zr),Xt=null,It instanceof yn&&It.$e!==""&&(Xt=It.fb(It.$e),Xt===It&&(Xt=null)),In=wt.x-In,nr=wt.y-nr,Xt!==null){for(It.arrange(0,0,ze.width,ze.height),ze=Xt.actualBounds,ze=st.allocAt(ze.x+($n.x*ze.width-$n.offsetX),ze.y+($n.y*ze.height-$n.offsetY)),Xt=Xt.panel;Xt!==It;)Xt.transform.Ga(ze),Xt=Xt.panel;In+=ge.x*ee+ge.offsetX-ze.x,nr+=ge.y*ne+ge.offsetY-ze.y,st.free(ze)}else In+=ge.x*ee+ge.offsetX-($n.x*ze.width+$n.offsetX),nr+=ge.y*ne+ge.offsetY-($n.y*ze.height+$n.offsetY);jt?(jt=!1,E.h(In,nr,We,Qe)):ci(E,In,nr,We,Qe)}}switch(jt?E.assign(Tt):it?E.Uu(wt.x,wt.y,wt.width,wt.height):ci(E,Tt.x,Tt.y,Tt.width,Tt.height),qt.free(Tt),qt.free(wt),ge=ue.stretch,ge===Fr&&(ge=ss(ue,!1)),ge){case dn:return;case mn:if(!isFinite(y)&&!isFinite(x))return;break;case dr:if(!isFinite(y))return;break;case br:if(!isFinite(x))return}for(ze=ue.measuredBounds,ee=ze.width,ne=ze.height,We=Math.max(ee+ye,0),Qe=Math.max(ne+Le,0),ge=ue.margin,wt=qt.allocAt(-ge.left,-ge.top,We,Qe),p0(ue,wt,!0),ee=wt.width,ne=wt.height,y=0;y<ae;y++)x=b[y],x===ue||!x.visible&&x!==Ot||(ge=x.margin,We=ge.right+ge.left,Qe=ge.top+ge.bottom,ze=x.measuredBounds,We=Math.max(ze.width+We,0),Qe=Math.max(ze.height+Qe,0),ye=x.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=zr),x=x.alignmentFocus,x.Xb()&&(x=zr),jt?(jt=!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,We,Qe)):ci(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,We,Qe));jt?E.assign(Tt):it?E.Uu(wt.x,wt.y,wt.width,wt.height):ci(E,Tt.x,Tt.y,Tt.width,Tt.height),qt.free(wt)},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=qt.allocAt(0,0,ne,ae),p0(E,ne,!1),ae=0;ae<b;ae++){var Le=y[ae];if(Le!==E){ge=Le.measuredBounds;var ze=ge.width,We=ge.height;ye=Le.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=zr);var Qe=Le.alignmentFocus;if(Qe.Xb()&&(Qe=zr),ge=null,Le instanceof yn&&Le.$e!==""&&(ge=Le.fb(Le.$e),ge===Le&&(ge=null)),ge!==null){var it=ge.actualBounds;for(Qe=st.allocAt(it.x+(Qe.x*it.width-Qe.offsetX),it.y+(Qe.y*it.height-Qe.offsetY)),ge=ge.panel;ge!==Le;)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*We+Qe.offsetY);ge+=ne.x-x.x,ye+=ne.y-x.y,Le.visible&&Le.arrange(ee+ge,ue+ye,ze,We)}}qt.free(ne)};function p0(a,y,x){var b=null;if(a instanceof yn&&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"}Zt(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,Le=x,ze=ge.right+ge.left,We=ge.top+ge.bottom;ue.measure(y,x,ee,ne),ge=ue.measuredBounds;var Qe=0,it=null;ue instanceof Gr&&(it=ue,Qe=it.strokeWidth*it.scale);var Tt=Math.max(ge.width+ze,0);ge=Math.max(ge.height+We,0);var wt=y0(ue),jt=wt.x*Tt+wt.offsetX;wt=wt.y*ge+wt.offsetY;var Ot=S0(ue),Bt=Ot.x*Tt+Ot.offsetX;for(Ot=Ot.y*ge+Ot.offsetY,isFinite(y)&&(ye=Math.max(Math.abs(jt-Bt)-Qe,0)),isFinite(x)&&(Le=Math.max(Math.abs(wt-Ot)-Qe,0)),Qe=cn.alloc(),Qe.h(0,0),a=Ku(a),Ot=0;Ot<ae;Ot++)wt=b[Ot],wt===ue||!wt.visible&&wt!==a||(ge=wt.margin,Tt=ge.right+ge.left,jt=ge.top+ge.bottom,wt.measure(ye,Le,0,0),ge=wt.measuredBounds,Tt=Math.max(ge.width+Tt,0),ge=Math.max(ge.height+jt,0),Qe.h(Math.max(Tt,Qe.width),Math.max(ge,Qe.height)));if(ae===1)E.width=Tt,E.height=ge,cn.free(Qe);else{switch(wt=y0(ue),Ot=S0(ue),ae=b=0,Ot.x!==wt.x&&Ot.y!==wt.y&&(b=Qe.width/Math.abs(Ot.x-wt.x),ae=Qe.height/Math.abs(Ot.y-wt.y)),cn.free(Qe),Qe=0,it!==null&&(Qe=it.strokeWidth*it.scale,E0(it)===lr&&(b=ae=Math.max(b,ae))),b+=Math.abs(wt.offsetX)+Math.abs(Ot.offsetX)+Qe,ae+=Math.abs(wt.offsetY)+Math.abs(Ot.offsetY)+Qe,it=ue.stretch,it===Fr&&(it=ss(ue,!1)),it){case dn:ne=ee=0;break;case mn:isFinite(y)&&(b=y),isFinite(x)&&(ae=x);break;case dr:isFinite(y)&&(b=y),ne=0;break;case br: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+We}},mm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,ee=qt.alloc();ee.h(0,0,1,1);var ne=b.margin,ae=ne.left;ne=ne.top;var ue=a.padding,ge=ue.left;ue=ue.top,b.arrange(ge+ae,ue+ne,E.width,E.height);var ye=y0(b),Le=S0(b),ze=ye.y*E.height+ye.offsetY,We=Le.x*E.width+Le.offsetX;for(Le=Le.y*E.height+Le.offsetY,ee.x=ye.x*E.width+ye.offsetX,ee.y=ze,ci(ee,We,Le,0,0),ee.x+=ae+ge,ee.y+=ne+ue,E=0;E<x;E++)ae=y[E],ae!==b&&(ge=ae.measuredBounds,ne=ae.margin,ue=Math.max(ge.width+ne.right+ne.left,0),ye=Math.max(ge.height+ne.top+ne.bottom,0),ze=ae.alignment,ze.Xb()&&(ze=a.defaultAlignment),ze.sb()||(ze=zr),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&&(to(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 qt(ee.x,ee.y,ee.width,ee.height))));qt.free(ee)};function vm(){this.xa="Base",this.name="Table"}Zt(vm,Ho),vm.prototype.measure=function(a,y,x,b,E){for(var ee=b.length,ne=Kn(),ae=Kn(),ue=0;ue<ee;ue++){var ge=b[ue],ye=ge instanceof yn?ge:null;if(ye!==null&&xh(ye)&&ge.visible){ae.push(ye);for(var Le=ye.O.s,ze=Le.length,We=0;We<ze;We++){var Qe=Le[We];ye.type===yn.TableRow?Qe.row=ge.row:ye.type===yn.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 it=[],Tt=0;Tt<ee;Tt++){var wt=ne[Tt];wt.visible&&(Ro(wt,!0),yu(wt,!0),it[wt.row]||(it[wt.row]=[]),it[wt.row][wt.column]||(it[wt.row][wt.column]=[]),it[wt.row][wt.column].push(wt))}Jn(ne);var jt=Kn(),Ot=Kn(),Bt=Kn(),It={count:0},Xt={count:0},In=y,nr=x,$n=a.rowDefs,bn=a.colDefs,hn=null;ee=$n.length;for(var jr=0;jr<ee;jr++)hn=$n[jr],hn!==void 0&&(hn.actual=0);ee=bn.length;for(var Lr=0;Lr<ee;Lr++)hn=bn[Lr],hn!==void 0&&(hn.actual=0);for(var wi=it.length,Vi=0,Jo=0;Jo<wi;Jo++)it[Jo]&&(Vi=Math.max(Vi,it[Jo].length));var ea=Math.min(a.topIndex,wi-1),Ia=Math.min(a.leftIndex,Vi-1),Qo=0;wi=it.length;for(var Nh=Ku(a),Mo=0;Mo<wi;Mo++)if(it[Mo]){Vi=it[Mo].length;var Gl=a.Fb(Mo);Gl.actual=0;for(var _a=Gl.oc=0;_a<Vi;_a++)if(it[Mo][_a]){var Ah=a.Eb(_a);jt[_a]===void 0&&(Ah.actual=0,Ah.oc=0,jt[_a]=!0);for(var Hs=it[Mo][_a],ml=Hs.length,Ms=0;Ms<ml;Ms++){var ys=Hs[Ms];if(ys.visible||ys===Nh){var mc=1<ys.rowSpan||1<ys.columnSpan;mc&&(Mo<ea||_a<Ia||Ot.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,Vf=!isNaN(Ng.height),ou=!isNaN(Ng.width)&&Vf;if(mc||za===dn||ou||Mo<ea||_a<Ia||(It[_a]!==void 0||za!==mn&&za!==dr||(It[_a]=-1,It.count++),Xt[Mo]!==void 0||za!==mn&&za!==br||(Xt[Mo]=-1,Xt.count++),Bt.push(ys)),ys.measure(1/0,1/0,0,0),!(Mo<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===dn||za===dr)){hn=a.Fb(Mo);var vc=hn.Wc();Qo=Math.max(As-hn.actual,0),Qo+vc>nr&&(Qo=Math.max(nr-vc,0));var zv=hn.oa===0;hn.oc=hn.oc+Qo,hn.actual=hn.oa+Qo,nr=Math.max(nr-(Qo+(zv?vc:0)),0)}if(ys.columnSpan===1&&(za===dn||za===br)){hn=a.Eb(_a);var Ag=hn.Wc();Qo=Math.max(tf-hn.actual,0),Qo+Ag>In&&(Qo=Math.max(In-Ag,0));var Gy=hn.oa===0;hn.oc=hn.oc+Qo,hn.actual=hn.oa+Qo,In=Math.max(In-(Qo+(Gy?Ag:0)),0)}mc&&ys.Uj()}}}}}Jn(jt);var Mu=0,Xu=0;ee=a.columnCount;for(var Zf=0;Zf<ee;Zf++){var yc=bn[Zf];yc!==void 0&&(Mu+=isNaN(yc.Hc)?yc.oc:yc.Hc,yc.oc!==0&&(Mu+=yc.Wc()))}ee=a.rowCount;for(var qd=0;qd<ee;qd++){var Sc=$n[qd];Sc!==void 0&&(Xu+=isNaN(Sc.Hc)?Sc.oc:Sc.Hc,Sc.oc!==0&&(Xu+=Sc.Wc()))}In=Math.max(y-Mu,0);var Nu=nr=Math.max(x-Xu,0),jh=In;ee=Bt.length;for(var xs=0;xs<ee;xs++){var au=Bt[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,Xt[au.row]=Gv.oc===0&&Xt[au.row]!==void 0?Math.max(ep.height+su,Xt[au.row]):null}var Xf=0,tp=0,Nl;for(Nl in Xt)Nl!=="count"&&(Xf+=Xt[Nl]);for(Nl in It)Nl!=="count"&&(tp+=It[Nl]);for(var ca=cn.alloc(),jg=0;jg<ee;jg++){var rs=Bt[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(In)&&It[rs.column]!==null?tp===0?Ju=is.actual+In:Ju=It[rs.column]/tp*jh:It[rs.column]!==null?Ju=In:Ju=is.actual||In,Ju=Math.max(0,Ju-is.Wc()));var Oh=0;switch(isFinite(No.height)?Oh=No.height:(isFinite(nr)&&Xt[rs.row]!==null?Xf===0?Oh=No.actual+nr:Oh=Xt[rs.row]/Xf*Nu:Xt[rs.row]!==null?Oh=nr:Oh=No.actual||nr,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 dr:ca.height=Math.max(ca.height,No.actual+nr);break;case br:ca.width=Math.max(ca.width,is.actual+In)}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(In)&&(of=Math.min(of,ca.width)),isFinite(nr)&&(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,nr=Math.max(nr-Qo,0),Xt[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,In=Math.max(In-Qo,0),It[rs.column]===null&&(jh=Math.max(jh-Qo,0))}}Jn(Bt);var Qu=cn.alloc(),Wl=Kn(),rl=Kn();if(ee=Ot.length,ee!==0){for(var xc=0;xc<wi;xc++)if(it[xc]){Vi=it[xc].length;var rp=a.Fb(xc);Wl[xc]=rp.actual;for(var wc=0;wc<Vi;wc++)if(it[xc][wc]){var Hv=a.Eb(wc);rl[wc]=Hv.actual}}}for(var ip=0;ip<ee;ip++){var So=Ot[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 mn: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 dr:rl[vl.index]!==0&&(ca.width=Math.min(ca.width,rl[vl.index]));break;case br: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++)hn=a.Fb(So.row+Fh),Qo=0,Qo=za===mn||za===br?Math.max(hn.minimum,Wl[So.row+Fh]===0?hn.maximum:Math.min(Wl[So.row+Fh],hn.maximum)):Math.max(hn.minimum,isNaN(hn.Hc)?hn.maximum:Math.min(hn.Hc,hn.maximum)),Qu.height+=Qo,js+=hn.minimum;for(var yl=1;yl<So.columnSpan&&!(So.column+yl>=a.columnCount);yl++)hn=a.Eb(So.column+yl),Qo=0,Qo=za===mn||za===dr?Math.max(hn.minimum,rl[So.column+yl]===0?hn.maximum:Math.min(rl[So.column+yl],hn.maximum)):Math.max(hn.minimum,isNaN(hn.Hc)?hn.maximum:Math.min(hn.Hc,hn.maximum)),Qu.width+=Qo,Wv+=hn.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++)hn=a.Fb(So.row+sp),Pc+=hn.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++){hn=a.Fb(So.row+$u);var Rh=hn.oa||0,sf=Bh(So,hn,Au);hn.actual=Math.min(hn.maximum,Rh+sf),hn.oa!==Rh&&(Dh-=hn.oa-Rh)}for(;0<Dh;){var Kl=hn.oa||0;if(isNaN(hn.height)&&hn.maximum>Kl&&(hn.actual=Math.min(hn.maximum,Kl+Dh),hn.oa!==Kl&&(Dh-=hn.oa-Kl)),hn.index===0)break;hn=a.Fb(hn.index-1)}}for(var Jf=0,Ih=0;Ih<So.columnSpan&&!(So.column+Ih>=a.columnCount);Ih++)hn=a.Eb(So.column+Ih),Jf+=hn.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++){hn=a.Eb(So.column+lf);var Fg=hn.oa||0,Wy=qu(So,hn,Hy);hn.actual=Math.min(hn.maximum,Fg+Wy),hn.oa!==Fg&&(Qf-=hn.oa-Fg)}for(;0<Qf;){var Kv=hn.oa||0;if(isNaN(hn.width)&&hn.maximum>Kv&&(hn.actual=Math.min(hn.maximum,Kv+Qf),hn.oa!==Kv&&(Qf-=hn.oa-Kv)),hn.index===0)break;hn=a.Eb(hn.index-1)}}}}Jn(Ot),cn.free(Qu),cn.free(ca),Wl!==void 0&&Jn(Wl),rl!==void 0&&Jn(rl);var $f=0,qf=0,Vv=a.desiredSize,gx=a.maxSize;za=ss(a,!0);var Dg=Xu=Mu=0,Bg=0;ee=a.columnCount;for(var Zv=0;Zv<ee;Zv++)bn[Zv]!==void 0&&(hn=a.Eb(Zv),isFinite(hn.width)?(Dg+=hn.width,Dg+=hn.Wc()):Tm(hn)===Zp?(Dg+=hn.oa,Dg+=hn.Wc()):hn.oa!==0&&(Mu+=hn.oa,Mu+=hn.Wc()));isFinite(Vv.width)?$f=Math.min(Vv.width,gx.width):$f=za!==dn&&isFinite(y)?y:Mu,$f=Math.max($f,a.minSize.width),$f=Math.max($f-Dg,0);for(var $x=Mu===0?1:Math.max($f/Mu,1),Xv=0;Xv<ee;Xv++)bn[Xv]!==void 0&&(hn=a.Eb(Xv),isFinite(hn.width)||Tm(hn)===Zp||(hn.actual=hn.oa*$x),hn.position=E.width,hn.oa!==0&&(E.width+=hn.oa,E.width+=hn.Wc()));ee=a.rowCount;for(var Yv=0;Yv<ee;Yv++)$n[Yv]!==void 0&&(hn=a.Fb(Yv),isFinite(hn.height)?(Bg+=hn.height,Bg+=hn.Wc()):Tm(hn)===Zp?(Bg+=hn.oa,Bg+=hn.Wc()):hn.oa!==0&&(Xu+=hn.oa,Xu+=hn.Wc()));isFinite(Vv.height)?qf=Math.min(Vv.height,gx.height):qf=za!==dn&&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++)$n[Jv]!==void 0&&(hn=a.Fb(Jv),isFinite(hn.height)||Tm(hn)===Zp||(hn.actual=hn.oa*qx),hn.position=E.height,hn.oa!==0&&(E.height+=hn.oa,E.height+=hn.Wc()));ee=ae.length;for(var Ky=0;Ky<ee;Ky++){var Rg=ae[Ky],Vy=0,Zy=0;Rg.type===yn.TableRow?(Vy=E.width,hn=a.Fb(Rg.row),Zy=hn.actual):(hn=a.Eb(Rg.column),Vy=hn.actual,Zy=E.height),Rg.measuredBounds.h(0,0,Vy,Zy),Ro(Rg,!1)}Jn(ae),a.inRowsCols=it},vm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,ee=E.left;E=E.top;var ne=a.inRowsCols;if(ne!==null){for(var ae,ue,ge=ne.length,ye=0,Le=0;Le<ge;Le++)ne[Le]&&(ye=Math.max(ye,ne[Le].length));ue=a.rowDefs,ae=a.colDefs;var ze=Le=0,We=Math.min(a.topIndex,ge-1);if(0<ue.length){for(;We!==ge&&(ue[We]===void 0||ue[We].oa===0);)We++;We=Math.max(Math.min(We,ge-1),0),Le=-ue[We].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 it=0,Tt=0;it!==ge&&ue[it]===void 0;)it++;for(;Tt!==ge&&ae[Tt]===void 0;)Tt++;ye=a.part,a.Fb(it),a.Eb(Tt);for(var wt=0;wt<y.length;wt++){var jt=y[wt];if(jt instanceof yn&&jt.visible&&xh(jt)){if(jt.type===yn.TableRow){ae=a.Fb(jt.row);var Ot=a.Eb(Tt)}else ae=a.Fb(it),Ot=a.Eb(jt.column);ue=ae.position+Le+E,ae.oa!==0&&(ue+=ae.Io(Math.max(it,We))),ae=Ot.position+ze+ee,Ot.oa!==0&&(ae+=Ot.Io(Math.max(Tt,Qe))),Ot=jt.measuredBounds,jt.Uk(),jt.actualBounds.ka();var Bt=jt.actualBounds,It=qt.allocAt(Bt.x,Bt.y,Bt.width,Bt.height);Bt.x=jt.type===yn.TableRow?ee:ae,Bt.y=jt.type===yn.TableColumn?E:ue,Bt.width=Ot.width,Bt.height=Ot.height,jt.actualBounds.freeze(),yu(jt,!1),mi(It,Bt)||ye===null||(ye.oh(),jt.Pn(ye)),qt.free(It)}}for(wt=cn.alloc(),jt=0;jt<ge;jt++)if(ne[jt]){for(ye=ne[jt].length,Ot=a.Fb(jt),ue=Ot.position+Le+E,Ot.oa!==0&&(ue+=Ot.Io(Math.max(it,We))),Bt=0;Bt<ye;Bt++)if(ne[jt][Bt]){It=a.Eb(Bt),ae=It.position+ze+ee,It.oa!==0&&(ae+=It.Io(Math.max(Tt,Qe)));for(var Xt=ne[jt][Bt],In=Xt.length,nr=0;nr<In;nr++){var $n=Xt[nr],bn=$n.measuredBounds;wt.h(0,0);for(var hn=1;hn<$n.rowSpan&&!(jt+hn>=a.rowCount);hn++){var jr=a.Fb(jt+hn);jr.oa!==0&&(wt.height+=jr.total)}for(hn=1;hn<$n.columnSpan&&!(Bt+hn>=a.columnCount);hn++)jr=a.Eb(Bt+hn),jr.oa!==0&&(wt.width+=jr.total);var Lr=It.oa+wt.width,wi=Ot.oa+wt.height;hn=ae,jr=ue;var Vi=Lr,Jo=wi,ea=ae,Ia=ue,Qo=Lr,Nh=wi;ae+Lr>x.width&&(Qo=Math.max(x.width-ae,0)),ue+wi>x.height&&(Nh=Math.max(x.height-ue,0));var Mo=$n.alignment;if(Mo.Xb()){Mo=a.defaultAlignment,Mo.sb()||(Mo=zr);var Gl=Mo.x,_a=Mo.y,Ah=Mo.offsetX;Mo=Mo.offsetY;var Hs=It.alignment,ml=Ot.alignment;Hs.sb()&&(Gl=Hs.x,Ah=Hs.offsetX),ml.sb()&&(_a=ml.y,Mo=ml.offsetY)}else Gl=Mo.x,_a=Mo.y,Ah=Mo.offsetX,Mo=Mo.offsetY;(isNaN(Gl)||isNaN(_a))&&(_a=Gl=.5,Mo=Ah=0),Hs=bn.width,ml=bn.height;var Ms=$n.margin,ys=Ms.left+Ms.right,mc=Ms.top+Ms.bottom,Ul=Bl($n,Ot,It,!1);!isNaN($n.desiredSize.width)||Ul!==mn&&Ul!==dr||(Hs=Math.max(Lr-ys,0)),!isNaN($n.desiredSize.height)||Ul!==mn&&Ul!==br||(ml=Math.max(wi-mc,0)),Lr=$n.maxSize,wi=$n.minSize,Hs=Math.min(Lr.width,Hs),ml=Math.min(Lr.height,ml),Hs=Math.max(wi.width,Hs),ml=Math.max(wi.height,ml),Lr=ml+mc,hn+=Vi*Gl-(Hs+ys)*Gl+Ah+Ms.left,jr+=Jo*_a-Lr*_a+Mo+Ms.top,$n.visible&&(to(ea,Ia,Qo,Nh,hn,jr,bn.width,bn.height)?$n.arrange(hn,jr,Hs,ml):$n.arrange(hn,jr,Hs,ml,new qt(ea,Ia,Qo,Nh)))}}}for(cn.free(wt),a=0;a<b;a++)x=y[a],ee=x instanceof yn?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"}Zt(ym,Ho),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}Zt(Sm,Ho),Sm.prototype.measure=function(){},Sm.prototype.arrange=function(){};function xm(){this.xa="Base"}Zt(xm,Ho),xm.prototype.measure=function(a,y,x,b,E,ee,ne){1<b.length&&Mt("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,ee,ne);var ae=b.measuredBounds,ue=b.margin,ge=ue.right+ue.left;if(ue=ue.top+ue.bottom,isFinite(y)||isFinite(x)){var ye=b.scale,Le=ae.width;ae=ae.height;var ze=Math.max(y-ge,0),We=Math.max(x-ue,0),Qe=1;a.viewboxStretch===lr?Le!==0&&ae!==0&&(Qe=Math.min(ze/Le,We/ae)):Le!==0&&ae!==0&&(Qe=Math.max(ze/Le,We/ae)),Qe===0&&(Qe=1e-4),b.Ca*=Qe,ye!==b.scale&&(Ro(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=zr),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"}Zt(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),Le=a.gridOrigin,ze=Le.x;Le=Le.y,y.save(),y.beginPath(),y.rect(0,0,ae,ue),y.clip(),y.Se();for(var We=[],Qe=a.O.s,it=Qe.length,Tt=0;Tt<it;Tt++){var wt=Qe[Tt],jt=[];if(We.push(jt),wt.visible){var Ot=wt.interval;if(!(0>Ot)){wt=m0(wt.figure);for(var Bt=0;Bt<it;Bt++)if(Bt!==Tt){var It=Qe[Bt];It.visible&&m0(It.figure)===wt&&(It=It.interval,It>Ot&&jt.push(It))}}}}for(Qe=a.O.s,it=Qe.length,Tt=0;Tt<it;Tt++){var Xt=Qe[Tt];if(Xt.visible&&(jt=Xt.interval||1,wt=Math.abs(jt),!(2>E*wt*x))){if(Ot=Xt.segmentIndex,(!isFinite(Ot)||isNaN(Ot))&&(Ot=0),0>Ot&&(Ot=wt-Math.min(-Ot,wt)),Ot=Math.round(Ot%wt),wt=Xt.opacity,Bt=1,wt!==1){if(wt===0)continue;Bt=y.globalAlpha,y.globalAlpha=Bt*wt}It=We[Tt];var In=!1,nr=Xt.strokeDashArray;if(nr!==null&&(In=!0,y.js(nr,Xt.strokeDashOffset)),Xt.figure==="LineV"&&Xt.stroke!==null&&0<Xt.strokeWidth){for(y.lineWidth=Xt.strokeWidth,mo(a,y,Xt.stroke,!1,!1,ee,ne),y.beginPath(),nr=Xt=Math.floor((ze-E)/E);nr<=Xt+ge;nr++){var $n=nr*E+ze;0<=$n&&$n<=ae&&wm(nr,jt,Ot,It)&&(y.moveTo($n,0),y.lineTo($n,ue))}y.stroke(),y.Se()}else if(Xt.figure==="LineH"&&Xt.stroke!==null&&0<Xt.strokeWidth){for(y.lineWidth=Xt.strokeWidth,mo(a,y,Xt.stroke,!1,!1,ee,ne),y.beginPath(),nr=Xt=Math.floor((Le-b)/b);nr<=Xt+ye;nr++)$n=nr*b+Le,0<=$n&&$n<=ue&&wm(nr,jt,Ot,It)&&(y.moveTo(0,$n),y.lineTo(ae,$n));y.stroke(),y.Se()}else if(Xt.figure==="BarV"&&Xt.fill!==null)for(mo(a,y,Xt.fill,!0,!1,ee,ne),Xt=Xt.width,isNaN(Xt)&&(Xt=E),$n=nr=Math.floor((ze-E)/E);$n<=nr+ge;$n++){var bn=$n*E+ze;0<=bn+Xt&&bn<=ae&&wm($n,jt,Ot,It)&&y.fillRect(bn,0,Xt,ue)}else if(Xt.figure==="BarH"&&Xt.fill!==null)for(mo(a,y,Xt.fill,!0,!1,ee,ne),Xt=Xt.height,isNaN(Xt)&&(Xt=b),$n=nr=Math.floor((Le-b)/b);$n<=nr+ye;$n++)bn=$n*b+Le,0<=bn+Xt&&bn<=ue&&wm($n,jt,Ot,It)&&y.fillRect(0,bn,ae,Xt);In&&y.fs(),wt!==1&&(y.globalAlpha=Bt)}}y.restore(),y.Vc(!1)};function wm(a,y,x,b){if(0>y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;E<y;E++)if(a%b[E]===x)return!1;return!0}function bm(){this.xa="Base"}Zt(bm,Ho),bm.prototype.measure=function(a,y,x,b,E){var ee=b.length;if(a instanceof xi||a instanceof Pn){var ne=null,ae=null;if(a instanceof Pn&&(ne=a),a instanceof xi&&(ae=a,ne=ae.adornedPart,a.j===null&&(a.j=[])),ne instanceof Pn){var ue=ne;if(ee===0)Mi(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var ge=a instanceof xi?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ye=ue.points,Le=ne.pointsCount;ae!==null?ae.Ul(!1):ne!==null&&ne.Ul(!1),ae=y.width;var ze=y.height,We=a.j;if(We.length=0,ge!==null){i1(a,ae,ze,ge);var Qe=ge.measuredBounds;x.ed(Qe),We.push(Qe)}Qe=kr.alloc();for(var it=st.alloc(),Tt=st.alloc(),wt=0;wt<ee;wt++){var jt=b[wt];if(jt!==ge)if(jt.isPanelMain&&jt instanceof Gr){i1(a,ae,ze,jt);var Ot=jt.measuredBounds;x.ed(Ot),We.push(Ot)}else if(2>Le)jt.measure(1/0,1/0,0,0),Ot=jt.measuredBounds,x.ed(Ot),We.push(Ot);else{var Bt=jt.segmentIndex,It=jt.segmentFraction,Xt=jt.alignmentFocus;Xt.Mc()&&(Xt=zr);var In=jt.segmentOrientation,nr=jt.segmentOffset;if(isNaN(Bt)){var $n=ue.ua;Ot=Kn(),$n.Qu(It,Ot);var bn=st.allocAt(Ot[0],Ot[1]);if(bn.add(ue.i(0)),$n.type===wn.j?bn.offset(-$n.startX,-$n.startY):($n=$n.figures.first(),$n!==null&&bn.offset(-$n.startX,-$n.startY)),$n=Ot[2],In!==$a){var hn=ue.computeAngle(jt,In,$n);jt.Kb=hn}hn=bn.x-y.x;var jr=bn.y-y.y;st.free(bn),Jn(Ot)}else if(Bt<-Le||Bt>=Le)Ot=st.alloc(),ue.vg(),ue.computeMidPoint(Ot),$n=ue.midAngle,In!==$a&&(hn=ue.computeAngle(jt,In,$n),jt.Kb=hn),hn=Ot.x-y.x,jr=Ot.y-y.y,st.free(Ot);else{if(hn=0,0<=Bt?(jr=ye.M(Bt),Ot=Bt<Le-1?ye.M(Bt+1):jr):(hn=Le+Bt,jr=ye.M(hn),Ot=0<hn?ye.M(hn-1):jr),jr.Xa(Ot)){0<=Bt?($n=0<Bt?ye.M(Bt-1):jr,hn=Bt<Le-2?ye.M(Bt+2):Ot):($n=hn<Le-1?ye.M(hn+1):jr,hn=1<hn?ye.M(hn-2):Ot),bn=$n.Bf(jr);var Lr=Ot.Bf(hn);$n=bn>Lr+10?0<=Bt?$n.ab(jr):jr.ab($n):Lr>bn+10?0<=Bt?Ot.ab(hn):hn.ab(Ot):0<=Bt?$n.ab(hn):hn.ab($n)}else $n=0<=Bt?jr.ab(Ot):Ot.ab(jr);In!==$a&&(hn=ue.computeAngle(jt,In,$n),jt.Kb=hn),hn=jr.x+(Ot.x-jr.x)*It-y.x,jr=jr.y+(Ot.y-jr.y)*It-y.y}jt.measure(1/0,1/0,0,0),Ot=jt.measuredBounds,bn=jt.naturalBounds;var wi=0;jt instanceof Gr&&(wi=jt.strokeWidth),Lr=bn.width+wi;var Vi=bn.height+wi;Qe.reset(),Qe.translate(-Ot.x,-Ot.y),Qe.scale(jt.scale,jt.scale),Qe.rotate(In===$a?jt.angle:$n,Lr/2,Vi/2),In!==rg&&In!==og||Qe.rotate(90,Lr/2,Vi/2),In!==ig&&In!==ag||Qe.rotate(-90,Lr/2,Vi/2),In===$m&&(45<$n&&135>$n||225<$n&&315>$n)&&Qe.rotate(-$n,Lr/2,Vi/2),bn=new qt(0,0,Lr,Vi),it.xi(bn,Xt),Qe.Ga(it),Xt=-it.x+wi/2*jt.scale,jt=-it.y+wi/2*jt.scale,Tt.assign(nr),wi=isNaN(nr.x);var Jo=isNaN(nr.y);if(wi||Jo){Lr=Lr/2+3,Vi=Vi/2+3;var ea=45<=$n&&135>=$n,Ia=225<=$n&&315>=$n;In===$a&&(ea||Ia)?(Tt.x=Jo?Lr:nr.y,Tt.y=wi?Vi:nr.x,ea?0<=Bt||isNaN(Bt)&&.5>It||!wi||(Tt.y=-Vi):Ia&&((0<=Bt||isNaN(Bt)&&.5>It)&&wi&&(Tt.y=-Vi),Jo&&(Tt.x=-Lr))):(wi&&(Tt.x=0<=Bt||isNaN(Bt)&&.5>It?Lr:-Lr),Jo&&(Tt.y=-Vi),Tt.rotate($n))}else Tt.rotate($n);hn+=Tt.x,jr+=Tt.y,bn.set(Ot),bn.h(hn+Xt,jr+jt,Ot.width,Ot.height),We.push(bn),x.ed(bn)}}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),Mi(E,x.width||0,x.height||0),kr.free(Qe),st.free(it),st.free(Tt)}}}},bm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof xi||a instanceof Pn){var b=a,E=null;a instanceof xi&&(E=a,b=E.adornedPart);var ee=a instanceof xi?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 Pn)for(ee=a.labelNodes;ee.next();){var Le=a;ne=ee.value,ae=ne.segmentIndex,ue=ne.segmentFraction;var ze=ne.alignmentFocus;if(ge=ne.segmentOrientation,ye=ne.segmentOffset,isNaN(ae)){var We=Le.ua,Qe=Kn();We.Qu(ue,Qe);var it=st.allocAt(Qe[0],Qe[1]);it.add(Le.i(0)),We.type===wn.j||(We=We.figures.first()),it.offset(-We.startX,-We.startY),We=Qe[2],ge!==$a&&(Le=Le.computeAngle(ne,ge,We),ne.angle=Le),Le=it.x;var Tt=it.y;st.free(it),Jn(Qe)}else if(ae<-x||ae>=x)Qe=st.alloc(),We=Le,Tt=Qe,We.vg(),We.computeMidPoint(Tt),We=Le.midAngle,ge!==$a&&(Le=Le.computeAngle(ne,ge,We),ne.angle=Le),Le=Qe.x,Tt=Qe.y,st.free(Qe);else{if(it=0,0<=ae?(Qe=y.s[ae],Tt=ae<x-1?y.s[ae+1]:Qe):(it=x+ae,Qe=y.s[it],Tt=0<it?y.s[it-1]:Qe),Qe.Xa(Tt)){0<=ae?(We=0<ae?y.s[ae-1]:Qe,it=ae<x-2?y.s[ae+2]:Tt):(We=it<x-1?y.s[it+1]:Qe,it=1<it?y.s[it-2]:Tt);var wt=We.Bf(Qe),jt=Tt.Bf(it);We=wt>jt+10?0<=ae?We.ab(Qe):Qe.ab(We):jt>wt+10?0<=ae?Tt.ab(it):it.ab(Tt):0<=ae?We.ab(it):it.ab(We)}else We=0<=ae?Qe.ab(Tt):Tt.ab(Qe);ge!==$a&&(Le=Le.computeAngle(ne,ge,We),ne.angle=Le),Le=Qe.x+(Tt.x-Qe.x)*ue,Tt=Qe.y+(Tt.y-Qe.y)*ue}if(ze.ys())ne.location=new st(Le,Tt);else{ze.Mc()&&(ze=zr),Qe=kr.alloc(),Qe.reset(),Qe.scale(ne.scale,ne.scale),Qe.rotate(ne.angle,0,0);var Ot=ne.naturalBounds;it=qt.allocAt(0,0,Ot.width,Ot.height),wt=st.alloc(),wt.xi(it,ze),Qe.Ga(wt),ze=-wt.x,jt=-wt.y;var Bt=Ot.width,It=Ot.height;Ot=st.alloc(),Ot.assign(ye);var Xt=isNaN(ye.x),In=isNaN(ye.y);if(Xt||In){Bt=Bt/2+3,It=It/2+3;var nr=45<=We&&135>=We,$n=225<=We&&315>=We;ge===$a&&(nr||$n)?(Ot.x=In?Bt:ye.y,Ot.y=Xt?It:ye.x,nr?0<=ae||isNaN(ae)&&.5>ue||!Xt||(Ot.y=-It):$n&&((0<=ae||isNaN(ae)&&.5>ue)&&Xt&&(Ot.y=-It),In&&(Ot.x=-Bt))):(Xt&&(Ot.x=0<=ae||isNaN(ae)&&.5>ue?Bt:-Bt),In&&(Ot.y=-It),Ot.rotate(We))}else Ot.rotate(We);Le+=Ot.x,Tt+=Ot.y,Qe.pp(it),ze+=it.x,jt+=it.y,ae=st.allocAt(Le+ze,Tt+jt),ne.move(ae),st.free(ae),st.free(Ot),st.free(wt),qt.free(it),kr.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 xi&&a.type===yn.Link&&a.adornedObject instanceof Gr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Pn&&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 xi&&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),Ro(b,!1)}}function Kp(){this.xa="Base"}Zt(Kp,Ho),Kp.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=a.Pb();a.graduatedBounds=[];var ue=ae.margin,ge=ue.right+ue.left,ye=ue.top+ue.bottom;ae.measure(y,x,ee,ne);var Le=ae.measuredBounds,ze=new qt(-ue.left,-ue.top,Math.max(Le.width+ge,0),Math.max(Le.height+ye,0));a.graduatedBounds.push(ze),E.assign(ze);for(var We=ae.geometry,Qe=ae.strokeWidth,it=We.flattenedSegments,Tt=We.flattenedLengths,wt=We.flattenedTotalLength,jt=it.length,Ot=0,Bt=0,It=Kn(),Xt=0;Xt<jt;Xt++){var In=it[Xt],nr=[];Bt=Ot=0;for(var $n=In.length,bn=0;bn<$n;bn+=2){var hn=In[bn],jr=In[bn+1];if(bn!==0){var Lr=180*Math.atan2(jr-Bt,hn-Ot)/Math.PI;0>Lr&&(Lr+=360),nr.push(Lr)}Ot=hn,Bt=jr}It.push(nr)}if(a.graduatedIntervals===null){for(var wi=[],Vi=a.O.s,Jo=Vi.length,ea=0;ea<Jo;ea++){var Ia=Vi[ea],Qo=[];if(wi.push(Qo),Ia.visible){var Nh=Ia.interval;if(!(0>Nh)){for(var Mo=0;Mo<Jo;Mo++)if(Mo!==ea){var Gl=Vi[Mo];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,Ms=0,ys=0,mc=wt;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*wt/a.graduatedRange&&Ns.graduatedSkip===null)){var Vf=Tt[0][0],ou=0,Ss=0;ys=wt*Ns.graduatedStart-1e-4,mc=wt*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,Mu=1;As<=a.graduatedMax+Gy;Mu++){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 Gr&&!Ns.graduatedSkip(As,Ns))&&(Ms=(As-a.graduatedMin)*wt/a.graduatedRange,Ms>wt&&(Ms=wt),ys<=Ms&&Ms<=mc)){for(var Nu=It[ou][Ss],jh=Tt[ou][Ss];ou<Tt.length;){for(;Ms>Vf&&Ss<Tt[ou].length-1;)Ss++,Nu=It[ou][Ss],jh=Tt[ou][Ss],Vf+=jh;if(Ms<=Vf)break;ou++,Ss=0,Nu=It[ou][Ss],jh=Tt[ou][Ss],Vf+=jh}var xs=it[ou],au=xs[2*Ss],Gv=xs[2*Ss+1],Yu=(Ms-(Vf-jh))/jh,ep=new st(au+(xs[2*Ss+2]-au)*Yu+Qe/2-We.bounds.x,Gv+(xs[2*Ss+3]-Gv)*Yu+Qe/2-We.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+Mu*tf}}}a.graduatedMarks.push(Ul)}Jn(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 Gr){var Ju=a,Oh=E,rf=No.alignmentFocus;rf.Mc()&&(rf=Ci);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=qt.allocAt(0,0,np,of),ws=st.alloc();ws.xi(Yf,rf),qt.free(Yf);for(var Qu=-ws.x,Wl=-ws.y,rl=new qt,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),ci(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=Ci);for(var yl=No.segmentOrientation,op=No.segmentOffset,bc=new qt,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=Pn.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,Kl=kr.alloc();Kl.reset(),Kl.translate(-Bh.x,-Bh.y),Kl.scale(js.scale,js.scale),Kl.rotate(Pc,Rh/2,sf/2),yl!==rg&&yl!==og||Kl.rotate(90,Rh/2,sf/2),yl!==ig&&yl!==ag||Kl.rotate(-90,Rh/2,sf/2),yl===$m&&(45<lu&&135>lu||225<lu&&315>lu)&&Kl.rotate(-lu,Rh/2,sf/2);var Jf=qt.allocAt(0,0,Rh,sf),Ih=st.alloc();Ih.xi(Jf,Fh),Kl.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 qt(Og,ap,Bh.width,Bh.height),Fg=new qt(Bh.x,Bh.y,Bh.width,Bh.height),Wy=new qt($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),qt.free(Jf),kr.free(Kl)}vl.graduatedBounds!==null&&vl.graduatedBounds.push(bc),ci(Wv,bc.x,bc.y,bc.width,bc.height)}Ro(No,!1)}}},Kp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var ee=a.graduatedBounds,ne=0,ae=ee[ne];ne++,b!==null&&b.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height);for(var ue=y.length,ge=0;ge<ue;ge++){var ye=y[ge];ae=E[ge],ye.visible&&ye!==b&&ae.length!==0&&(ae=ee[ne],ne++,ye.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height))}a.graduatedBounds=null}}},Kp.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,ee=E.width,ne=E.height;E=y instanceof 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,Le=0;Le<ye;Le++){var ze=ue[Le],We=ge[Le],Qe=We.length;if(ze.visible&&ze!==ee&&We.length!==0){if(ze instanceof Gr){if(!(2>a.graduatedTickUnit*ze.interval*ee.geometry.flattenedTotalLength/a.graduatedRange*ne&&ze.graduatedSkip===null)){var it=ze.measuredBounds,Tt=ze.strokeWidth*ze.scale,wt=ze.alignmentFocus;wt.Mc()&&(wt=Ci);for(var jt=0;jt<Qe;jt++){var Ot=We[jt].$l,Bt=We[jt].angle,It=wt,Xt=ze.Ab;Xt.reset(),Xt.translate(Ot.x+ae.x,Ot.y+ae.y),Xt.rotate(Bt+ze.angle,0,0),Xt.translate(-it.width*It.x+It.offsetX+Tt/2,-it.height*It.y+It.offsetY+Tt/2),Xt.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),it=a.temporaryTextBlock,S1(it,ze),Tt=0;Tt<Qe;Tt++)wt=We[Tt],wt.actualBounds&&wt.measuredBounds&&wt.naturalBounds&&(it.ec=wt.text||"",it.Kb=wt.Sz||0,it.Gc=wt.lineCount||0,jt=wt.lines,jt!==void 0&&(it.Cb=jt[0],it.Ih=jt[1],it.df=jt[2],it.Le=jt[3],it.Qc=jt[4],it.Qb=jt[5],it.ze=jt[6]),wt.naturalBounds&&(it.dc=wt.naturalBounds),wt.actualBounds&&(jt=wt.actualBounds,it.arrange(jt.x,jt.y,jt.width,jt.height)),jt=wt.actualBounds,it.arrange(jt.x,jt.y,jt.width,jt.height),Ot=wt.measuredBounds,wt=wt.naturalBounds,Bt=it.Ab,Bt.reset(),Bt.translate(jt.x+ae.x,jt.y+ae.y),Bt.translate(-Ot.x,-Ot.y),it.no(Bt,wt.x,wt.y,wt.width,wt.height),cl(it,!1),it.wh.set(it.Ab),it.Kk=it.scale,Ys(it,!1),it.Ng=ze.part,it.Me=ze.panel,it.gc(y,x),it.Me=null,it.Ng=null,E&&(a.svg.appendChild(it.svg),it.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function yn(a,y){if(_t.call(this),this.na=null,a===void 0)this.na=yn.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=yn.Position,y=a);this.na===null&&Mt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===yn.Grid?1048576:0),this.O=new on,this.yb=ta,this.Tm=Zo,this.Uf=Fr,this.$g=null,this.$e="",this.jg=new qt(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=lr,this.jn=Ti,this.kn=Bn,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Zt(yn,_t),yn.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},yn.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},yn.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=yn.prototype,et.toString=function(){return"Panel("+this.type.name+")#"+ti(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===yn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===yn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===yn.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===yn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,ee=E.length,ne=0;ne<ee;ne++){var ae=E[ne];x&&ae===b&&(a.clipInsteadOfFill=!0),ae.gc(a,y),x&&ae===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function g0(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Pm(a,y,!0,x,!0),b!==null&&Pm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&Pm(a,y,!0,x,!1),b!==null&&Pm(a,y,!1,b,!1)}function o1(a,y,x,b){for(var E=b.length,ee=a.actualBounds,ne=a.naturalBounds,ae=!0,ue=0;ue<E;ue++){var ge=b[ue];if(ge!==void 0&&ge.actual!==0)if(ae)ae=!1;else{if(x){if(ge.position>ne.height)continue}else if(ge.position>ne.width)continue;var ye=ge.separatorStrokeWidth;isNaN(ye)&&(ye=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Le=ge.separatorStroke;if(Le===null&&(Le=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ye!==0&&Le!==null){mo(a,y,Le,!1,!1,ne,ee),Le=!1;var ze=ge.separatorDashArray;ze===null&&(ze=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),ze!==null&&(Le=!0,y.js(ze,0)),y.beginPath(),ze=ge.position+ye,x?ze>ne.height&&(ye-=ze-ne.height):ze>ne.width&&(ye-=ze-ne.width),ge=ge.position+ye/2,y.lineWidth=ye,ye=a.yb,x?(ge+=ye.top,ze=ne.width-ye.right,y.moveTo(ye.left,ge),y.lineTo(ze,ge)):(ge+=ye.left,ze=ne.height-ye.bottom,y.moveTo(ge,ye.top),y.lineTo(ge,ze)),y.stroke(),y.Se(),Le&&y.fs()}}}}function Pm(a,y,x,b,E){for(var ee=b.length,ne=a.actualBounds,ae=a.naturalBounds,ue=a1(a,!0),ge=a1(a,!1),ye=0;ye<ee;ye++){var Le=b[ye];if(Le!==void 0&&Le.background!==null&&Le.coversSeparators!==E&&Le.actual!==0){var ze=x?ne.height:ne.width;if(!(Le.position>ze)){var We=Le.Wc(),Qe=Le.separatorStrokeWidth;isNaN(Qe)&&(Qe=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var it=Le.separatorStroke;it===null&&(it=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(it===null||Le.index===(x?ue:ge))&&(Qe=0),We-=Qe,Qe=Le.position+Qe,We+=Le.actual,Qe+We>ze&&(We=ze-Qe),0>=We||(ze=a.yb,mo(a,y,Le.background,!0,!1,ae,ne),x?y.fillRect(ze.left,Qe+ze.top,ne.width-(ze.left+ze.right),We):y.fillRect(Qe+ze.left,ze.top,We,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===yn.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===yn.Grid||this.na===yn.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,Le=ne.m11*ae,ze=ae*(ne.m21*ne.dy-ne.m22*ne.dx),We=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*Le+We,a=x*ue+b*ye+ze,ue=x*ge+b*Le+We,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,Le=1,We=ze=0),ae=a*ue+y*ye+ze,a=a*ge+y*Le+We,ue=x*ue+b*ye+ze,x=x*ge+b*Le+We,E.h(ue,x),b=(ue-ae)*(ue-ae)+(x-a)*(x-a),ge=!1,Le=this.O.s,We=Le.length,ye=st.alloc(),ze=null,y=1/0;var Qe=null,it=this.isClipping&&this.na===yn.Spot;it&&(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<We;Tt++){var wt=Le[Tt];wt.visible&&wt!==ze&&wt.Sj(ae,a,ue,x,ye)&&(ge=!0,wt=(ae-ye.x)*(ae-ye.x)+(a-ye.y)*(a-ye.y),wt<b&&(b=wt,E.set(ye)))}return it&&(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===yn.Auto||this.na===yn.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 yn||E instanceof Zi||ee!==dn)&&E.v(!0)}}}},et.Uj=function(){if(!_s(this)){Ro(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),Mi(E,a,ue),Mi(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 Ku(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=dn),a){case dn:(y>x||ee>b)&&(this.v(),this.measure(y>x?x:y,ee>b?b:ee,0,0));break;case mn:this.v(!0),this.measure(x+ae,b+ne,0,0);break;case dr:this.v(!0),this.measure(x+ae,ee+ne,0,0);break;case br: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=Ku(this);if(to(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)&&(kn(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 yn){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 yn&&s1(a,ee,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof yn){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 yn){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=Vp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof yn){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 yn?x=Math.max(x,h1(E)):E instanceof Gr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}et.se=function(){return!(this.type===yn.TableRow||this.type===yn.TableColumn)};function xh(a){return a.type===yn.TableRow||a.type===yn.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:kn(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),to(-(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===yn.Spot)?this.Pb():null,ue&&(ge.se()?kn(ae.set(a),ge.transform):ae.set(a),!ge.ca(ae)))return st.free(ae),ee||st.free(ne),null;for(var Le=Ku(this);ye--;){var ze=E[ye];if((ze.visible||ze===Le)&&(ze.se()?kn(ae.set(a),ze.transform):ae.set(a),!ue||ze!==ge)){var We=null;if(ze instanceof yn?We=ze.ic(ae,y,x):ze.pickable===!0&&ze.ca(ae)&&(We=ze),We!==null&&(y!==null&&(We=y(We)),We!==null&&(x===null||x(We))))return st.free(ae),ee||st.free(ne),We}}st.free(ae)}return this.background===null&&this.areaBackground===null?(ee||st.free(ne),null):(a=to(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:kn(st.allocAt(a.x,a.y),this.transform);if(E=to(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=Ku(this);ue--;){var Le=ae[ue];if(Le.visible||Le===ye){Le.se()?kn(ge.set(a),Le.transform):ge.set(a);var ze=Le;Le=Le instanceof yn?Le:null,(Le!==null?Le.ji(ge,y,x,b):ze.ca(ge))&&ze.pickable!==!1&&(y!==null&&(ze=y(ze)),ze===null||x!==null&&!x(ze)||b.add(ze))}}st.free(ge)}return ee||st.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return ee||st.free(ne),!1},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=kr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return v0(this,y,x,E),ee===void 0&&kr.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var ae=Ku(this),ue=this.O.s,ge=ue.length;ge--;){var ye=ue[ge];if(ye.visible||ye===ae){var Le=ye.actualBounds,ze=this.naturalBounds;Le.x>ze.width||Le.y>ze.height||0>Le.x+Le.width||0>Le.y+Le.height||(Le=ye,ye=ye instanceof yn?ye:null,ze=kr.alloc(),ze.set(ne),(ye!==null?ye.Cf(a,y,x,b,E,ze):Yo(Le,a,b,ze))&&(y!==null&&(Le=y(Le)),Le===null||x!==null&&!x(Le)||E.add(Le)),kr.free(ze))}}return ee===void 0&&kr.free(ne),b}return ee===void 0&&kr.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 yn&&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:kn(st.allocAt(a.x,a.y),this.transform),ge=ae?y:kn(st.allocAt(y.x,y.y),this.transform),ye=ue.Bf(ge),Le=0<ue.x&&ue.x<ne.width&&0<ue.y&&ue.y<ne.height||Zn(ue.x,ue.y,0,0,0,ne.height)<=ye||Zn(ue.x,ue.y,0,ne.height,ne.width,ne.height)<=ye||Zn(ue.x,ue.y,ne.width,ne.height,ne.width,0)<=ye||Zn(ue.x,ue.y,ne.width,0,0,0)<=ye;if(ne=ue.zd(0,0)<=ye&&ue.zd(0,ne.height)<=ye&&ue.zd(ne.width,0)<=ye&&ue.zd(ne.width,ne.height)<=ye,ae||(st.free(ue),st.free(ge)),Le){if(!this.isAtomic){ue=st.alloc(),ge=st.alloc(),ye=Ku(this);for(var ze=this.O.s,We=ze.length;We--;){var Qe=ze[We];if(Qe.visible||Qe===ye){var it=Qe.actualBounds,Tt=this.naturalBounds;(!ae||!(it.x>Tt.width||it.y>Tt.height||0>it.x+it.width||0>it.y+it.height))&&(Qe.se()?(it=Qe.transform,kn(ue.set(a),it),kn(ge.set(y),it)):(ue.set(a),ge.set(y)),it=Qe,Qe=Qe instanceof yn?Qe:null,(Qe!==null?Qe.og(ue,ge,x,b,E,ee):it.tx(ue,ge,E))&&(x!==null&&(it=x(it)),it===null||b!==null&&!b(it)||ee.add(it)))}}st.free(ue),st.free(ge)}return E?Le:ne}return!1};function y0(a){var y=null;return a instanceof Gr&&(y=a.spot1,y===Zo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=li),y}function S0(a){var y=null;return a instanceof Gr&&(y=a.spot2,y===Zo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Ii),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 yr&&Mt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Mt("Cannot make a Panel contain itself: "+this.toString()),Mt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Mt("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!==yn.Grid||y instanceof Gr||Mt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==yn.Graduated||y instanceof Gr||y instanceof Zi||Mt("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 $t),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 Mt("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 yn&&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),Ro(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 yn?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&&Fn(a,">= 0",yn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Io;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(wo,"rowdefs",this,null,x,null,a)}return y[a]},et.oA=function(a){if(0>a&&Fn(a,">= 0",yn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Eo,"rowdefs",this,x,null,a,null),this.v()}}};function c1(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof Io?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}et.Eb=function(a){0>a&&Fn(a,">= 0",yn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Io;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(wo,"coldefs",this,null,x,null,a)}return y[a]},et.jA=function(a){if(0>a&&Fn(a,">= 0",yn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Eo,"coldefs",this,x,null,a,null),this.v()}}};function f1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof Io?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}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 Io(y)),this},et.By=function(a,y){return(a=this.Eb(a))&&km(a,new Io(y)),this},et.nz=function(a){if(0>a||this.type!==yn.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!==yn.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!==yn.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!==yn.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&&Mt("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 Le=ye.localBindings;if(Le!==null)for(Af(ye,!1),Le=Le.iterator;Le.next();){var ze=Le.value;ze.mode===pg&&Af(ye,!0);var We=ze.sourceName;We!==null&&(We==="/"&&x0(ge,!0),We=TS(ze,ge,ye),We!==null&&(x.add(We),We.srcBindings===null&&(We.srcBindings=new on),We.srcBindings.add(ze))),y.add(ze)}if(ye instanceof yn&&ye.type===yn.Table){if(0<ye.rowCount){for(ge=ye.rowDefs,Le=ge.length,ze=0;ze<Le;ze++)if(We=ge[ze],We!==void 0&&We.be!==null)for(var Qe=We.be.iterator;Qe.next();){var it=Qe.value;it.xd=We,it.to=2,it.wl=We.index,y.add(it)}}if(0<ye.columnCount){for(ye=ye.colDefs,ge=ye.length,Le=0;Le<ge;Le++)if(ze=ye[Le],ze!==void 0&&ze.be!==null)for(We=ze.be.iterator;We.next();)Qe=We.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 yn&&(ne=ae.substring(0,ue),ae=ae.substr(ue+1),ue=ee.fb(ne),ue!==null?(ee=ue,E.targetProperty=ae):zn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),ee instanceof Io?(ne=ti(ee.panel),E.Ai=ne===void 0?-1:ne,ee.panel.bindingId=E.Ai):ee instanceof _t?(ne=ti(ee),E.Ai=ne===void 0?-1:ne,ee.bindingId=E.Ai):Mt("Unknown type of binding target: "+ee)}y.freeze(),a instanceof yr&&a.Zc()&&a.Va()}et.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof yn&&(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 yn))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 yn&&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 yn)||ee.data!==y[ne])return!0;E++,ne++}return!1}function Vp(a){if(a.type===yn.Spot||a.type===yn.Auto)return Math.min(a.O.length,1);if(a.type===yn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof Gr&&b.isPanelMain))break}return x}return a.type===yn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof yn&&xh(a))?1:0}et.mv=function(){for(var a=Vp(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=Vp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var b=0;b<x;b++)Cm(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var ee=y[E],ne=b<a.O.length?a.O.M(b):null;if(ne instanceof yn){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 $t),a.ge.add(y,E)),ee=x+Vp(a),a.Gb(ee,E),b&&(E.ub=y,w0(a,ee,x),E.ub=null),E.data=y}}}function w0(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof yn){var E=y,ee=x;b.type===yn.TableRow?b.row=E:b.type===yn.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;Mt("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,zn('No item template Panel found for category "'+y+'" on '+a),zn(" Using default item template."),a=new yn,y=new Zi,y.bind(new Lo("text","",Wr)),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 yn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var ee=y[E];x&&ee instanceof yn&&!ee.isEnabled||Em(a,ee,x)}}}function ru(a,y){y.name=a,Cl.add(a,y)}Ut.Object.defineProperties(yn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===yn.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&&Fn(a,">= 0",yn,"padding"),a=new Ir(a)):(0>a.left&&Fn(a.left,">= 0",yn,"padding:value.left"),0>a.right&&Fn(a.right,">= 0",yn,"padding:value.right"),0>a.top&&Fn(a.top,">= 0",yn,"padding:value.top"),0>a.bottom&&Fn(a.bottom,">= 0",yn,"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 Ir(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 Fi)&&(a instanceof Fi&&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)||Mt("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 Fi)&&(a instanceof Fi&&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)||Mt("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||Mt("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()||Mt("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 Vu),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),da(this)&&(a=this.part,a!==null&&eo(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 Vu),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),da(this)&&(a=this.part,a!==null&&eo(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 Vu),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 Vu),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 Vu,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 Vu,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 Vu,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 Vu,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:Lm},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:Lm},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)&&Mt("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)&&Mt("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 yr&&!(this instanceof xi);dl(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Pn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof yr&&(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 $t}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof yr||a.isPanelMain)&&Mt("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(););Hr(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&&(Hr(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))}}}),Ut.Object.defineProperties(yn,{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")}}}),yn.prototype.rebuildItemElements=yn.prototype.mv,yn.prototype.findItemPanelForData=yn.prototype.sx,yn.prototype.updateTargetBindings=yn.prototype.La,yn.prototype.copyTemplate=yn.prototype.Uy,yn.prototype.graduatedValueForPoint=yn.prototype.Gz,yn.prototype.graduatedPointForValue=yn.prototype.Fz,yn.prototype.findColumnForLocalX=yn.prototype.fz,yn.prototype.findRowForLocalY=yn.prototype.nz,yn.prototype.addColumnDefinition=yn.prototype.By,yn.prototype.addRowDefinition=yn.prototype.Hy,yn.prototype.addRowColumnDefinition=yn.prototype.Gy,yn.prototype.removeColumnDefinition=yn.prototype.jA,yn.prototype.getColumnDefinition=yn.prototype.Eb,yn.prototype.removeRowDefinition=yn.prototype.oA,yn.prototype.getRowDefinition=yn.prototype.Fb,yn.prototype.removeAt=yn.prototype.mb,yn.prototype.remove=yn.prototype.remove,yn.prototype.insertAt=yn.prototype.Gb,yn.prototype.elt=yn.prototype.M,yn.prototype.add=yn.prototype.add,yn.prototype.findObject=yn.prototype.fb,yn.prototype.findInVisualTree=yn.prototype.Nl,yn.prototype.walkVisualTreeFrom=yn.prototype.qm,yn.prototype.findMainElement=yn.prototype.Pb;var g1=!1,m1=null,Cl=new $t;yn.className="Panel",yn.definePanelLayout=ru,ru("Position",new fm),ru("Vertical",new pm),ru("Auto",new mm),ru("Link",new bm);function Vu(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Vu.prototype.copy=function(){var a=new Vu;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},Vu.className="GradPanelSettings";function $s(){this.Pc=[],this.Oc=[],this.j=this.ob=Lm,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 Io(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=Fr,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}Io.prototype.copy=function(){var a=new Io;return a.uq=this.uq,a.Za=this.Za,a.Hc=this.Hc,a.jj=this.jj,a.hj=this.hj,a.Jb=this.Jb,a.oa=this.oa,a.oc=this.oc,a.pa=this.pa,a.hg=this.hg,a.oo=this.oo,this.dg===null?a.dg=null:a.dg=this.dg.J(),a.lo=this.lo,a.mo=this.mo,a.tj=null,this.tj!==null&&(a.separatorDashArray=jn(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=jn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}et=Io.prototype,et.qb=function(a){a.classType===Io&&(this.sizing=a)},et.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+ti(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===yn.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 Lo(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&Mt("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},Ut.Object.defineProperties(Io.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Fn(a,">= 0",Io,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Fn(a,">= 0",Io,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&Fn(a,">= 0",Io,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&Fn(a,">= 0",Io,"maximum"),this.hj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("maximum",y,a))}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(this.Jb=a.J(),this.panel!==null&&this.panel.v(),this.Ob("alignment",y,a))}},stretch:{get:function(){return this.hg},set:function(a){var y=this.hg;y!==a&&(this.hg=a,this.panel!==null&&this.panel.v(),this.Ob("stretch",y,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){typeof a=="number"&&(a=new Ir(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 Fi&&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)||Mt("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 Fi&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),Io.prototype.computeEffectiveSpacing=Io.prototype.Wc,Io.prototype.computeEffectiveSpacingTop=Io.prototype.Io;var C0=new pn(Io,"Default",0),Zp=new pn(Io,"None",1),Lm=new pn(Io,"ProportionalExtra",2);Io.className="RowColumnDefinition",Io.Default=C0,Io.None=Zp,Io.ProportionalExtra=Lm;function Gr(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)}Zt(Gr,_t),Gr.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=jn(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=Gr.prototype,et.th=function(){_t.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},et.qb=function(a){a===dn||a===lr||a===ui||a===Fr?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)+")#"+ti(this)};function Nd(a,y,x,b){var E=x.length;if(!(4>E)){var ee=b.measuredBounds,ne=Math.max(1,ee.width);ee=ee.height;for(var ae=x[0],ue=x[1],ge,ye,Le,ze,We,Qe,it=0,Tt=Kn(),wt=2;wt<E;wt+=2)ge=x[wt],ye=x[wt+1],Le=ge-ae,ae=ye-ue,Le===0&&(Le=.001),ze=ae/Le,We=Math.atan2(ae,Le),Qe=Math.sqrt(Le*Le+ae*ae),Tt.push([Le,We,ze,Qe]),it+=Qe,ae=ge,ue=ye;ae=x[0],ue=x[1],Le=b.measuredBounds.width,b instanceof Gr&&(Le-=b.strokeWidth),1>Le&&(Le=1),E=x=Le,ge=ne/2,ye=ge!==0,wt=0,Qe=Tt[wt],Le=Qe[0],We=Qe[1],ze=Qe[2],Qe=Qe[3];for(var jt=0;.1<=it;){if(jt===0&&(ye?(E=x,E-=ge,it-=ge,ye=!1):E=x,E===0&&(E=1)),E>it){Jn(Tt);return}E>Qe?(jt=E-Qe,E=Qe):jt=0;var Ot=Math.sqrt(E*E/(1+ze*ze));if(0>Le&&(Ot=-Ot),ae+=Ot,ue+=ze*Ot,a.translate(ae,ue),a.rotate(We),a.translate(-(ne/2),-(ee/2)),jt===0&&b.hh(a,y),a.translate(ne/2,ee/2),a.rotate(-We),a.translate(-ae,-ue),it-=E,Qe-=E,jt!==0){if(wt++,wt===Tt.length){Jn(Tt);return}Qe=Tt[wt],Le=Qe[0],We=Qe[1],ze=Qe[2],Qe=Qe[3],E=jt}}Jn(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===yn.Link&&ae instanceof xi&&ae.category==="Selection"&&ae.adornedObject instanceof Gr&&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===wn.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===wn.u){var ge=E.startX;ue=E.startY;var ye=E.endX,Le=E.endY;E=Math.min(ge,ye);var ze=Math.min(ue,Le);ge=Math.abs(ye-ge),ue=Math.abs(Le-ue),a.beginPath(),a.rect(E,ze,ge,ue),b!==null&&a.ng(b),x!==null&&(ae&&ee&&Su(a),a.jk(),ae&&ee&&Uu(a)),a.Se()}else if(E.type===wn.F)ge=E.startX,ue=E.startY,ye=E.endX,Le=E.endY,E=Math.abs(ye-ge)/2,ze=Math.abs(Le-ue)/2,ge=Math.min(ge,ye)+E,ue=Math.min(ue,Le)+ze,a.beginPath(),a.moveTo(ge,ue-ze),a.bezierCurveTo(ge+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===wn.o)for(E=E.figures,ue=E.length,ze=0;ze<ue;ze++){ge=E.s[ze],a.beginPath(),a.moveTo(ge.startX,ge.startY),ye=ge.segments.s,Le=ye.length;for(var We=null,Qe=0;Qe<Le;Qe++){var it=ye[Qe];switch(it.type){case Do:a.moveTo(it.endX,it.endY);break;case Wi:a.lineTo(it.endX,it.endY);break;case Go:a.bezierCurveTo(it.point1X,it.point1Y,it.point2X,it.point2Y,it.endX,it.endY);break;case ps:a.quadraticCurveTo(it.point1X,it.point1Y,it.endX,it.endY);break;case xo:if(it.radiusX===it.radiusY){var Tt=Math.PI/180;a.arc(it.point1X,it.point1Y,it.radiusX,it.startAngle*Tt,(it.startAngle+it.sweepAngle)*Tt,0>it.sweepAngle,We!==null?We.endX:ge.startX,We!==null?We.endY:ge.startY)}else if(We=Ua(it,ge),Tt=We.length,Tt===0)a.lineTo(it.centerX,it.centerY);else for(var wt=0;wt<Tt;wt++){var jt=We[wt];wt===0&&a.lineTo(jt[0],jt[1]),a.bezierCurveTo(jt[2],jt[3],jt[4],jt[5],jt[6],jt[7])}break;case Cs:if(wt=Tt=0,We!==null&&We.type===xo){if(We=Ua(We,ge),jt=We.length,jt===0){a.lineTo(it.endX,it.endY);break}We=We[jt-1]||null,We!==null&&(Tt=We[6],wt=We[7])}else Tt=We!==null?We.endX:ge.startX,wt=We!==null?We.endY:ge.startY;if(We=Ds(it,ge,Tt,wt),Tt=We.length,Tt===0){a.lineTo(it.endX,it.endY);break}for(wt=0;wt<Tt;wt++)jt=We[wt],a.bezierCurveTo(jt[2],jt[3],jt[4],jt[5],jt[6],jt[7]);break;default:Mt("Segment not of valid type: "+it.type)}it.isClosed&&a.closePath(),We=it}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=Kn(),ee.type===wn.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===wn.o)for(ee=ee.figures.iterator;ee.next();){for(ae=ee.value,b.length=0,b.push(ae.startX),b.push(ae.startY),ne=ae.startX,E=ae.startY,ue=ne,ze=E,ge=ae.segments.s,ye=ge.length,Le=0;Le<ye;Le++){switch(Qe=ge[Le],Qe.type){case Do: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 Wi: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(it=Ua(Qe,ae),We=it.length,We===0){b.push(Qe.centerX),b.push(Qe.centerY),ne=Qe.centerX,E=Qe.centerY;break}for(Tt=0;Tt<We;Tt++)wt=it[Tt],zt.Qe(ne,E,wt[2],wt[3],wt[4],wt[5],wt[6],wt[7],.5,b),ne=wt[6],E=wt[7];break;case Cs:if(it=Ds(Qe,ae,ne,E),We=it.length,We===0){b.push(Qe.endX),b.push(Qe.endY),ne=Qe.endX,E=Qe.endY;break}for(Tt=0;Tt<We;Tt++)wt=it[Tt],zt.Qe(ne,E,wt[2],wt[3],wt[4],wt[5],wt[6],wt[7],.5,b),ne=wt[6],E=wt[7];break;default:Mt("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===wn.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===wn.F){if(E=new Fo,E.startX=ee.endX,E.startY=(ee.startY+ee.endY)/2,ne=new Si(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)}Jn(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 ar){a.Mc()&&Mt("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 qt);var y=this.naturalBounds,x=this.oe;y=qt.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),ci(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),ci(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),ci(a,b.x,b.y,0,0),qt.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!==wn.j||y||(E+=2);var ee=qt.alloc();if(ee.assign(b),ee.Bc(E+2,E+2),!ee.ca(a))return qt.free(ee),!1;if(b=E+1e-4,x.type===wn.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:(qt.free(ee),zt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===wn.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 qt.free(ee),!1;ee.Bc(b,b)}return this.stroke!==null&&ee.Bc(E,E),a=ee.ca(a),qt.free(ee),a}if(x.type===wn.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 qt.free(ee),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),qt.free(ee),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===wn.o)return qt.free(ee),this.fill===null?Fs(x,a.x,a.y,E):$o(x,a,E,1<this.strokeWidth,y);Mt("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):Mt("Unsupported Figure: "+ae)}ne=ue.bounds}ae=ne.width,ue=ne.height,ge=ne.width;var ye=ne.height;switch(ss(this,!0)){case dn:b=x=0;break;case mn:ge=Math.max(a-ee,0),ye=Math.max(y-ee,0);break;case dr:ge=Math.max(a-ee,0),b=0;break;case br:x=0,ye=Math.max(y-ee,0)}isFinite(E.width)&&(ge=E.width),isFinite(E.height)&&(ye=E.height);var Le=this.maxSize,ze=this.minSize;switch(x=Math.max(x-ee,ze.width),b=Math.max(b-ee,ze.height),ge=Math.min(Le.width,ge),ye=Math.min(Le.height,ye),ge=isFinite(ge)?Math.max(x,ge):Math.max(ae,x),ye=isFinite(ye)?Math.max(b,ye):Math.max(ue,b),x=E0(this),x){case dn:break;case mn:ae=ge,ue=ye;break;case lr:x=Math.min(ge/ae,ye/ue),isFinite(x)||(x=1),ae*=x,ue*=x;break;default:Mt(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=Gr.makeGeometry(this,ae,ue)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-ee/2,ne.y-ee/2,a===0&&ae===0?0:ne.width+ee,y===0&&ue===0?0:ne.height+ee):this.Ge(-(ee/2),-(ee/2),ge+ee,ye+ee),E.w()?(ge=E.width,ye=E.height,ge=Math.min(Le.width,ge),ye=Math.min(Le.height,ye),ge=Math.max(ze.width,ge),ye=Math.max(ze.height,ye),this.dc.h(0,0,ge,ye)):this.dc.assign(ne)};function E0(a){var y=a.geometryStretch;return a.Rd!==null?y===Fr?mn:y:y===Fr?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,Le=ne*(ee.m21*ee.dy-ee.m22*ee.dx),ze=ne*(ee.m12*ee.dx-ee.m11*ee.dy);ee=a*ae+y*ge+Le,ne=a*ue+y*ye+ze,ae=x*ae+b*ge+Le,ue=x*ue+b*ye+ze,Le=this.ig/2,ge=this.ua,ge===null&&(this.measure(1/0,1/0),ge=this.ua);var We=ge.bounds;if(ye=!1,ge.type===wn.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=Le,ye=0):(y=(ge.endY-ge.startY)/(ge.endX-ge.startX),ye=Le/Math.sqrt(1+y*y),b=ye*y),y=Kn(),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 Jn(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);Jn(y)}else if(ge.type===wn.u)ye=zt.Ff(We.x-Le,We.y-Le,We.x+We.width+Le,We.y+We.height+Le,ee,ne,ae,ue,E);else if(ge.type===wn.F){y=qt.allocAt(We.x,We.y,We.width,We.height).Bc(Le,Le);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}Le=Math.sqrt(a*a*x*x+ge*ge-ue*ue),ae=(-(a*a*x*ue)+a*ge*Le)/(ge*ge+a*a*x*x)+b,a=(-(a*a*x*ue)-a*ge*Le)/(ge*ge+a*a*x*x)+b,ge=x*(ae-b)+ue+ye,ue=x*(a-b)+ue+ye,Math.abs((ee-ae)*(ee-ae))+Math.abs((ne-ge)*(ne-ge))<Math.abs((ee-a)*(ee-a))+Math.abs((ne-ue)*(ne-ue))?(E.x=ae,E.y=ge):(E.x=a,E.y=ue)}else{if(ae=ge*ge,ue=ee-b,ae-=ae/(a*a)*ue*ue,0>ae){E.x=NaN,E.y=NaN,ye=!1;break e}ue=Math.sqrt(ae),ae=ye+ue,ue=ye-ue,Math.abs(ae-ne)<Math.abs(ue-ne)?(E.x=ee,E.y=ae):(E.x=ee,E.y=ue)}ye=!0}qt.free(y)}else if(ge.type===wn.o){ze=st.alloc();var Qe=ae-ee,it=ue-ne,Tt=Qe*Qe+it*it,wt=ee,jt=ne;if(0<Tt&&We.contains(wt,jt)&&(ze.x=wt,ze.y=jt,this.ca(ze)))for(Qe!==0&&.5>Math.abs(Qe)?(it*=.5/Qe,Qe=.5):it!==0&&.5>Math.abs(it)&&(Qe*=.5/it,it=.5),wt-=Qe,jt-=it;We.contains(wt,jt);)wt-=Qe,jt-=it;for(E.x=ae,E.y=ue,it=0;it<ge.figures.count;it++){var Ot=ge.figures.s[it],Bt=Ot.isFilled?wt:ee,It=Ot.isFilled?jt:ne,Xt=Ot.segments;We=Ot.startX,Qe=Ot.startY;for(var In=We,nr=Qe,$n=0;$n<Xt.count;$n++){var bn=Xt.s[$n],hn=bn.type,jr=bn.endX,Lr=bn.endY,wi=!1;switch(hn){case Do:In=jr,nr=Lr;break;case Wi:wi=Nm(We,Qe,jr,Lr,Bt,It,ae,ue,ze);break;case Go:wi=zt.Eo(We,Qe,bn.point1X,bn.point1Y,bn.point2X,bn.point2Y,jr,Lr,Bt,It,ae,ue,.6,ze);break;case ps:wi=zt.Eo(We,Qe,We+2/3*(bn.point1X-We),Qe+2/3*(bn.point1Y-Qe),jr+2/3*(bn.point1X-jr),Lr+2/3*(bn.point1Y-Lr),jr,Lr,Bt,It,ae,ue,.6,ze);break;case xo:case Cs:hn=bn.type===xo?Ua(bn,Ot):Ds(bn,Ot,We,Qe);var Vi=hn.length;if(Vi===0){wi=Nm(We,Qe,bn.type===xo?bn.centerX:bn.endX,bn.type===xo?bn.centerY:bn.endY,Bt,It,ae,ue,ze);break}for(Lr=null,jr=0;jr<Vi;jr++){if(Lr=hn[jr],jr===0&&Nm(We,Qe,Lr[0],Lr[1],Bt,It,ae,ue,ze)){var Jo=Mm(Bt,It,ze,Tt,E);Jo<Tt&&(Tt=Jo,ye=!0)}zt.Eo(Lr[0],Lr[1],Lr[2],Lr[3],Lr[4],Lr[5],Lr[6],Lr[7],Bt,It,ae,ue,.6,ze)&&(Jo=Mm(Bt,It,ze,Tt,E),Jo<Tt&&(Tt=Jo,ye=!0))}jr=Lr[6],Lr=Lr[7];break;default:Mt("Unknown Segment type: "+hn)}We=jr,Qe=Lr,wi&&(wi=Mm(Bt,It,ze,Tt,E),wi<Tt&&(Tt=wi,ye=!0)),bn.isClosed&&(jr=In,Lr=nr,Nm(We,Qe,jr,Lr,Bt,It,ae,ue,ze)&&(bn=Mm(Bt,It,ze,Tt,E),bn<Tt&&(Tt=bn,ye=!0)))}}ee=x-a,ne=b-y,ae=Math.sqrt(ee*ee+ne*ne),ae!==0&&(ee/=ae,ne/=ae),E.x-=ee*Le,E.y-=ne*Le,st.free(ze)}else Mt("Unknown Geometry type: "+ge.type);return ye?(this.transform.Ga(E),!0):!1};function Mm(a,y,x,b,E){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<b?(E.x=x.x,E.y=x.y,y):b}function Nm(a,y,x,b,E,ee,ne,ae,ue){if(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=kr.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),kr.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,wt){for(var jt=Tt.length,Ot=0;Ot<jt;Ot+=2)if(wt.zd(Tt[Ot],Tt[Ot+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,xr(a.x,a.y,ae,ue)<=E&&xr(a.x,a.y,ge,ue)<=E&&xr(a.x,a.y,ae,ne)<=E&&xr(a.x,a.y,ge,ne)<=E)return!0}if(ae=y.startX,ue=y.startY,ge=y.endX,ne=y.endY,y.type===wn.j){if(x=(ae-ge)*(a.x-ge)+(ue-ne)*(a.y-ne),Zn(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===wn.u)return y=!1,x&&(y=Zn(a.x,a.y,ae,ue,ae,ne)<=E||Zn(a.x,a.y,ae,ue,ge,ue)<=E||Zn(a.x,a.y,ge,ue,ge,ne)<=E||Zn(a.x,a.y,ae,ne,ge,ne)<=E),y;if(y.type===wn.F){y=a.x-(ae+ge)/2,ee=a.y-(ue+ne)/2;var ye=Math.abs(ge-ae)/2,Le=Math.abs(ne-ue)/2;if(ye===0||Le===0)return Zn(a.x,a.y,ae,ue,ge,ne)<=E;if(x){if(a=zt.$y(ye,Le,y,ee),a*a<=E)return!0}else return!(xr(y,ee,-ye,0)>=E||xr(y,ee,0,-Le)>=E||xr(y,ee,0,Le)>=E||xr(y,ee,ye,0)>=E)}else if(y.type===wn.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&&Zn(a.x,a.y,ee,ae,ee,ge)>E&&Zn(a.x,a.y,ee,ae,ue,ae)>E&&Zn(a.x,a.y,ue,ge,ee,ge)>E&&Zn(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(Le=ae[ge],Le.type){case Do:case Wi:if(ne=Le.endX,ye=Le.endY,a.zd(ne,ye)>E)return!1;break;case Go:var ze=Kn();if(zt.Qe(ne,ye,Le.point1X,Le.point1Y,Le.point2X,Le.point2Y,Le.endX,Le.endY,.8,ze),ne=b(ze,a),Jn(ze),ne||(ne=Le.endX,ye=Le.endY,a.zd(ne,ye)>E))return!1;break;case ps:if(ze=Kn(),zt.ep(ne,ye,Le.point1X,Le.point1Y,Le.endX,Le.endY,.8,ze),ne=b(ze,a),Jn(ze),ne||(ne=Le.endX,ye=Le.endY,a.zd(ne,ye)>E))return!1;break;case xo:case Cs:ze=Le.type===xo?Ua(Le,ee):Ds(Le,ee,ne,ye);var We=ze.length;if(We===0){if(ne=Le.type===xo?Le.centerX:Le.endX,ye=Le.type===xo?Le.centerY:Le.endY,a.zd(ne,ye)>E)return!1;break}Le=null;for(var Qe=Kn(),it=0;it<We;it++)if(Le=ze[it],Qe.length=0,zt.Qe(Le[0],Le[1],Le[2],Le[3],Le[4],Le[5],Le[6],Le[7],.8,Qe),b(Qe,a))return Jn(Qe),!1;Jn(Qe),Le!==null&&(ne=Le[6],ye=Le[7]);break;default:Mt("Unknown Segment type: "+Le.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 ar(1-aa.x,aa.y)))}Gr.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&&Mt("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=wn.parse(zt.um[b],!1),wu[b]=a,x!==b&&(wu[x]=b),b}}return typeof y=="string"?y:y instanceof wn?a:null}Ut.Object.defineProperties(Gr.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),da(this)&&(a=this.part,a!==null&&eo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=wn.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 Fi&&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 Fi&&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 Fn(a,"value >= 0",Gr,"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"?Fn(a,'"butt", "round", or "square"',Gr,"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"?Fn(a,'"miter", "bevel", or "round"',Gr,"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)||Mt("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()])||Mt("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?Mt("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?Mt("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:Fr},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))}}}),Gr.prototype.intersectsRect=Gr.prototype.Yc,Gr.prototype.containedInRect=Gr.prototype.fh,Gr.prototype.getNearestIntersectionPoint=Gr.prototype.rs,Gr.prototype.getDocumentBounds=Gr.prototype.mi,Gr.prototype.getDocumentPoint=Gr.prototype.ga;var wu=new ir,k0=new ir;Gr.className="Shape",Gr.getFigureGenerators=function(){var a=new $t,y;for(y in zt.Ze)y!==y.toLowerCase()&&a.add(y,zt.Ze[y]);return a.freeze(),a},Gr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=zt.Ze;b[a]=y,b[x]=a},Gr.getArrowheadGeometries=function(){var a=new $t;for(b in zt.um)if(wu[b]===void 0){var y=wn.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 wn&&a.add(x,b)}return a.freeze(),a},Gr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=wn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Mt("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=Fr,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}Zt(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,Le=ye.dx-(ne*ye.m21+ye.dx);ye=ye.dy-(ne*ye.m22+ye.dy);var ze=y.scale;switch(8>(Le*Le+ye*ye)*ze*ze&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof ks&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Le=this.spacingBelow,this.flip){case vi:a.translate(E,0),a.scale(-1,1);break;case Yr:a.translate(0,ee),a.scale(1,-1);break;case zi:a.translate(E,ee),a.scale(-1,-1)}if(a.yc(),ye=this.Gc,ze=(y+ne+Le)*ye,ee>ze&&(b=this.verticalAlignment,b=b.y*ee-b.y*ze+b.offsetY),ye===1&&this.ze!==null)Le=this.Cb,Le>E&&(Le=E),this.Oj(this.ze,a,0,b+y,E,ne,Le,x,ae,ue,ge);else if(this.Qc!==null&&this.Qb!==null)for(ze=0;ze<ye;ze++){var We=this.Qc[ze];We>E&&(We=E),b+=y,this.Oj(this.Qb[ze],a,0,b,E,ne,We,x,ae,ue,ge),b+=ne+Le}switch(this.flip){case vi:a.scale(-1,1),a.translate(-E,0);break;case Yr:a.scale(1,-1),a.translate(0,-ee);break;case zi:a.scale(-1,-1),a.translate(-E,-ee)}}},et.Oj=function(a,y,x,b,E,ee,ne,ae,ue,ge,ye){var Le=0;if(ae)ue==="left"?Le=0:ue==="right"?Le=E-ne:ue==="center"&&(Le=(E-ne)/2),y.fillRect(x+Le,b+.25*ee,ne,1);else{if(ue==="left"?Le=0:ue==="right"?Le=E:ue==="center"&&(Le=E/2),E=Am!==null?Am(this,ee):.75*ee,y.fillText(a,x+Le,b+E),a=ee/20|0,a===0&&(a=1),ue==="right"?Le-=ne:ue==="center"&&(Le-=ne/2),ge){ae=jm!==null?jm(this,ee):.8*ee,ue=x+Le,ge=b+ae,E=x+Le+ne,ae=b+ae;var ze=a;y.beginPath(),y.lineWidth=ze,y.moveTo(ue,ge),y.lineTo(E,ae),y.stroke(),y.Se(),y instanceof ks&&y.ad.classList.add("gojs-td")}ye&&(ye=b+ee-ee/2.2|0,a%2!==0&&(ye+=.5),b=x+Le,ee=ye,x=x+Le+ne,ne=ye,Le=a,y.beginPath(),y.lineWidth=Le,y.moveTo(b,ee),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof 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),Mi(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 L0(a,y,x,b){var E=a.formatting===Jp;E&&(y=y.trim());var ee=0,ne=a.Ae,ae=a.spacingAbove+a.spacingBelow;ae=Math.max(0,Yp(a)+ae);var ue=a.overflow===Om?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,ae);else if(ne=y,a.wrap===M0){a.Le=1;var ge=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 Le=1;for(ge=El(y.substr(0,Le)),ye=0;ge<=x;)Le++,ye=ge,ge=El(y.substr(0,Le));if(Le===1){var ze=ge;ee=Math.max(ee,ge)}else ze=ye,ee=Math.max(ee,ye);if(Le--,1>Le&&(Le=1),Xp(a,y.substr(0,Le),ze),ue++,y=y.substr(Le),a.Gc+ue>a.maxLines)break}for(ye=Ad(a,ne),ge=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?(Le=ge,ee=Math.max(ee,ge)):(Le=ye=El(y),ee=Math.max(ee,ye)),Xp(a,y,Le),ue++,a.Gc+ue>a.maxLines))break}a.Le=Math.min(a.maxLines,ue),a.Cb=Math.max(a.Cb,ee),b!==null&&b.h(a.Cb,ae*a.Le)}}function Ad(a,y){if(a.wrap===P1)return y.substr(0,1);for(var x=y.length,b=0,E=xx;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===C1&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function 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!==M0){a.Le=0;var ue=cn.alloc();L0(a,ee,y,ue),E+=ue.height,cn.free(ue),a.Gc+=a.Le}else L0(a,ee,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(ae=!0)}ee=ne+1}return a.Lq=E}Ut.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:dn},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=cn.alloc();L0(this,this.ec,999999,a);var y=a.width;cn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Mi(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 Fi&&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&&Fn(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,M0=new pn(Zi,"None",0),b1=new pn(Zi,"WrapFit",1),N0=new pn(Zi,"WrapDesiredSize",2),P1=new pn(Zi,"WrapBreakAll",3),A0=new pn(Zi,"OverflowClip",0),Om=new pn(Zi,"OverflowEllipsis",1),Jp=new pn(Zi,"FormatTrim",0),C1=new pn(Zi,"FormatNone",0),xx=/[ \u200b\u00ad]/,j0=new ir,E1=0,Fm=new ir,O0=0,Qp="...",k1="",ls=null,Dm=!1;Zi.className="TextBlock";function F0(){this.nc=!1,this.Hd=null,this.Xf=dn,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 ir,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=M0,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=mn,this.Zg=this.Hd=null,this.Mk=zr,this.Xf=dn,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;Zt(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===dn||a===lr||a===ui?this.imageStretch=a:_t.prototype.qb.call(this,a)},us.prototype.toString=function(){return"Picture("+this.source+")#"+ti(this)};function Od(a){a===void 0&&(a=""),a!==""?jd[a]&&(delete jd[a],Bm--):(jd=new ir,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()||(Ro(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=Kn();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);Jn(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 Vc)){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 Le=ue,ze=ae,We=this.Nk,Qe=this.Mk;switch(We){case dn:if(this.sourceRect.w())break;Le>=b.width&&(ee=ee+Qe.offsetX+(Le*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,Le),ae=Math.min(b.height,ze);break;case mn:Le=b.width,ze=b.height;break;case lr:case ui:We===lr?(We=Math.min(b.height/ze,b.width/Le),Le*=We,ze*=We):We===ui&&(We=Math.max(b.height/ze,b.width/Le),Le*=We,ze*=We,Le>=b.width&&(ee=(ee+Qe.offsetX+(Le*Qe.x-b.width*Qe.x)/Le)*ue),ze>=b.height&&(ne=(ne+Qe.offsetY+(ze*Qe.y-b.height*Qe.y)/ze)*ae),ue*=1/(Le/b.width),ae*=1/(ze/b.height),Le=b.width,ze=b.height)}We=this.Df()*y.scale;var it=Le*We*ze*We,Tt=ue*ae/it,wt=x.__goCache;We=null;var jt=wx;if(!E){if(x.sq&&wt!==void 0&&4<it&&Tt>jt*jt)for(wt.gi===null&&(M1(wt,4,ge,ye,x),M1(wt,16,ge,ye,x)),E=wt.gi,ge=E.length,ye=0;ye<ge&&E[ye].ratio*E[ye].ratio<Tt;ye++)We=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(Ot){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Ot){this.vl=!0}}if(this.vl)return}}switch(E=Le<b.width?Qe.offsetX+(b.width*Qe.x-Le*Qe.x):0,Qe=ze<b.height?Qe.offsetY+(b.height*Qe.y-ze*Qe.y):0,this.flip){case vi:a.translate(Math.min(b.width,Le),0),a.scale(-1,1);break;case Yr:a.translate(0,Math.min(b.height,ze)),a.scale(1,-1);break;case zi:a.translate(Math.min(b.width,Le),Math.min(b.height,ze)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&wt!==void 0&&We!==null&&We.ratio!==1){a.save(),y=We.ratio;try{a.drawImage(We.source,ee/y,ne/y,Math.min(We.source.width,ue/y),Math.min(We.source.height,ae/y),E,Qe,Math.min(b.width,Le),Math.min(b.height,ze)),a instanceof ks&&(this.bt=[ee/y,ne/y,Math.min(We.source.width,ue/y),Math.min(We.source.height,ae/y),E,Qe,Math.min(b.width,Le),Math.min(b.height,ze)])}catch(Ot){this.en=!1}a.restore()}else try{a.drawImage(x,ee,ne,ue,ae,E,Qe,Math.min(b.width,Le),Math.min(b.height,ze)),a instanceof ks&&(this.bt=[ee,ne,ue,ae,E,Qe,Math.min(b.width,Le),Math.min(b.height,ze)])}catch(Ot){this.en=!1}switch(this.flip){case vi:a.scale(-1,1),a.translate(-Math.min(b.width,Le),0);break;case Yr:a.scale(1,-1),a.translate(0,-Math.min(b.height,ze));break;case zi:a.scale(-1,-1),a.translate(-Math.min(b.width,Le),-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===mn||ee===dr?(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===mn||ee===br?(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)),Mi(this.dc,a,y),this.Ge(0,0,a,y)},us.prototype.eh=function(a,y,x,b){Ra(this,a,y,x,b)},Ut.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||Mt("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 an),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()||(Ro(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=$r("img"),b.hn=!0,T1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Bm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new L1),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),us.prototype.redraw=us.prototype.redraw,us.prototype.reloadSource=us.prototype.hA;var Bm=0,wx=4;us.className="Picture",jd=new ir,us.clearCache=Od;function L1(){this.gi=null}function M1(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))}L1.className="PictureCacheArray";function N1(a,y){this.source=a,this.ratio=y}N1.className="PictureCacheInstance";function Fd(){this.os=new wn,this.mc=null}Fd.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new wn,this.mc=null};function Dd(a,y,x,b,E,ee){a.mc=new Fo,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 Si(Do);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 Si(Wi);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 Si(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 Si(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 Si(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 Si(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 wn(wn.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 wn(wn.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 wn().add(new Fo(a,0,!0).add(new Si(Wi,y-a,0)).add(new Si(Go,y,a,y-ee,0,y,ee)).add(new Si(Wi,y,x-a)).add(new Si(Go,y-a,x,y,x-ee,y-ee,x)).add(new Si(Wi,a,x)).add(new Si(Go,0,x-a,ee,x,0,x-ee)).add(new Si(Wi,0,a)).add(new Si(Go,a,0,0,ee,ee,0).close())),1<ee&&(E.spot1=new ar(0,0,ee,ee),E.spot2=new ar(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 wn(wn.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 wn(wn.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 wn().add(new Fo(0,0).add(new Si(Wi,y,.5*x)).add(new Si(Wi,0,x).close())).pm(0,.25,.5,.75)}),Na("TriangleDown",function(a,y,x){return new wn().add(new Fo(0,0).add(new Si(Wi,y,0)).add(new Si(Wi,.5*y,x).close())).pm(.25,0,.75,.5)}),Na("TriangleLeft",function(a,y,x){return new wn().add(new Fo(y,x).add(new Si(Wi,0,.5*x)).add(new Si(Wi,y,0).close())).pm(.5,.25,1,.75)}),Na("TriangleUp",function(a,y,x){return new wn().add(new Fo(y,x).add(new Si(Wi,0,x)).add(new Si(Wi,.5*y,0).close())).pm(.25,.5,.75,1)}),Na("Triangle","TriangleUp"),Na("Diamond",function(a,y,x){return new wn().add(new Fo(.5*y,0).add(new Si(Wi,0,.5*x)).add(new Si(Wi,.5*y,x)).add(new Si(Wi,y,.5*x).close())).pm(.25,.25,.75,.75)}),Na("LineH",function(a,y,x){return a=new wn(wn.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 wn(wn.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 wn().add(new Fo(0,x/2,!1).add(new Si(Wi,y,x/2)).add(new Si(Do,y/2,0)).add(new Si(Wi,y/2,x)))}),Na("XLine",function(a,y,x){return new wn().add(new Fo(0,x,!1).add(new Si(Wi,y,0)).add(new Si(Do,0,0)).add(new Si(Wi,y,x)))}),Na("LineRight",function(a,y,x){return new wn().add(new Fo(.25*y,0,!1).add(new Si(Wi,.75*y,.5*x)).add(new Si(Wi,.25*y,x)))}),Na("LineDown",function(a,y,x){return new wn().add(new Fo(0,.25*x,!1).add(new Si(Wi,.5*y,.75*x)).add(new Si(Wi,y,.25*x)))}),Na("LineLeft",function(a,y,x){return new wn().add(new Fo(.75*y,0,!1).add(new Si(Wi,.25*y,.5*x)).add(new Si(Wi,.75*y,x)))}),Na("LineUp",function(a,y,x){return new wn().add(new Fo(0,.75*x,!1).add(new Si(Wi,.5*y,.25*x)).add(new Si(Wi,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=li,this.Pq=Gn,this.Kq=fr,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 yr(a,y){a===void 0||a instanceof Ho||typeof a=="string"?yn.call(this,a):(yn.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 qt,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Zt(yr,yn),yr.prototype.cloneProtected=function(a){yn.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=yr.prototype,et.Af=function(a){yn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},et.toString=function(){var a=er(this.constructor)+"#"+ti(this);return this.data!==null&&(a+="("+Wr(this.data)+")"),a};function hs(a){a.P===null?a.P=new D0:a.P.nc&&(a.P=a.P.copy())}et.th=function(){yn.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 yn?Zc(E,function(ue){ly(ae.partManager,ue),_c(ae,ue)}):qh(ae,E):a===Eo&&y==="elements"&&(E instanceof yn?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(yn.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 yn&&Zc(E,function(ee){ee.data!==null&&ee.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},yr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},yr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},yr.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 $t),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)))}}},yr.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)}},yr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Kn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Jn(y)}},yr.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 xi))break e;dl(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=yn.Link),x.adornedObject=y)}if(x!==null){x.type===yn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},yr.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=qt.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),qt.free(b),I0(a,!1)}}yr.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new kr);var ee=this.Lb;ee.reset(),this.no(ee,a,y,x,b),this.Lb=ee,ee.ws()||ee.pp(E)},yr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var ee=zr;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)}},yr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},yr.prototype.moveTo=function(a,y,x){a=st.allocAt(a,y),this.move(a,x),st.free(a)},yr.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())},yr.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())},yr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new $t),y.I(a)!==null)return y.I(a);var x=yn.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()?zr: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}yr.prototype.mi=function(a){return a===void 0&&(a=new qt),a.assign(this.actualBounds)},yr.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 Gr?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}yr.prototype.arrange=function(){if(Ya(this)===!1)j1(this);else{yu(this,!1);var a=this.Ib,y=qt.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),qt.free(y),I0(this,!1)}},et=yr.prototype,et.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=qt.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),qt.free(E)}!(this.G&65536)&&a.D(y)||I1(this,b,x),x.N(),!a.w()&&!y.w()||mi(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 xi||(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 xi||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)?(Gi(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,zn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),zn(" Old class: "+er(a.constructor)+", new class: "+er(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)}yr.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},yr.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},yr.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},yr.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},yr.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},yr.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},yr.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},yr.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},yr.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=yr.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(){yn.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&&K0(a,this))},et.Wo=function(a){a||(a=this.Ah,a!==null&&V0(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},yr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Wn&&this.isLinkLabel)},yr.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 xi)){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 Pn)for(y=y.labelNodes;y.next();)oc(a,y.value,x,b,E,ee)}}Ut.Object.defineProperties(yr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Kr: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 xi?this.type!==yn.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:Gn},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:fr},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:li},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 xi)){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 xi?this instanceof xi&&(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 Pn||(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 Pn?(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&&Mt("Cannot make a Group a member of itself: "+this.toString()),Mt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?V0(y,this):this instanceof Or&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?K0(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 an,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 Mt("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))}}}),yr.prototype.invalidateLayout=yr.prototype.C,yr.prototype.findCommonContainingGroup=yr.prototype.px,yr.prototype.isMemberOf=yr.prototype.Td,yr.prototype.findTopLevelPart=yr.prototype.sz,yr.prototype.findSubGraphLevel=yr.prototype.oz,yr.prototype.ensureBounds=yr.prototype.Va,yr.prototype.getDocumentBounds=yr.prototype.mi,yr.prototype.findObject=yr.prototype.fb,yr.prototype.moveTo=yr.prototype.moveTo,yr.prototype.invalidateAdornments=yr.prototype.Wb,yr.prototype.clearAdornments=yr.prototype.Ej,yr.prototype.removeAdornment=yr.prototype.Jf,yr.prototype.addAdornment=yr.prototype.bh,yr.prototype.findAdornment=yr.prototype.Pj,yr.prototype.updateTargetBindings=yr.prototype.La;var G1=!1;yr.className="Part",yr.LayoutNone=0,yr.LayoutAdded=1,yr.LayoutRemoved=2,yr.LayoutShown=4,yr.LayoutHidden=8,yr.LayoutNodeSized=16,yr.LayoutGroupLayout=32,yr.LayoutNodeReplaced=64,yr.LayoutStandard=127,yr.LayoutAll=16777215;function xi(a,y){a===void 0||a instanceof Ho||typeof a=="string"?yr.call(this,a):(yr.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)}Zt(xi,yr),xi.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},xi.prototype.updateRelationshipsFromData=function(){},xi.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Pn&&y instanceof Gr){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 Gr&&(E.ua=a)}}},xi.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Ya(a))},xi.prototype.Zc=function(){return!1},xi.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 yn){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 yn&&this.$a.rg(b)&&(this.$a=null));yr.prototype.gk.call(this,a,y,x,b,E,ee,ne)},xi.prototype.updateAdornments=function(){},xi.prototype.Lj=function(){},Ut.Object.defineProperties(xi.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}}}),xi.className="Adornment";function U0(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=jo,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"?yr.call(this,a):(yr.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)}Zt(Wn,yr),Wn.prototype.cloneProtected=function(a){yr.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){yr.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(){yr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new an),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),yr.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(!yr.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===Bo){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){yr.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 an,y=new an;return K1(this,this,a,y),y.iterator};function K1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,ee=a.diagram;ee!==null&&(E=ee.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(E?ne.fromNode===y:ne.toNode===y)&&K1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}Wn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new oi(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 oi(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 oi(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 an,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 an,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new ii(x):Kr},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 an,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new ii(x):Kr},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 an,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new ii(x):Kr},et.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new oi(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 oi(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){yr.prototype.Vo.call(this,a),a||($p(this),a=this.Yk,a!==null&&eS(a,this))},et.Wo=function(a){yr.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,yr.prototype.Lj.call(this)},et.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;V1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function V1(a){a.wc===null?a.wc=new $t: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=Kn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Jn(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 an;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 oi(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 ii(x):Kr},et.wz=function(a){a===void 0&&(a=1/0);var y=new an;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 an;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===vh),y.Ue=!1}};function Y1(a,y,x,b,E,ee,ne){if(1<b)for(var ae=x?a.Mo():a.Sd();ae.next();){var ue=ae.value;ue.isTreeLink&&(ue=ue.To(a),ue===null||ue===a||y.contains(ue)||(y.add(ue),Y1(ue,y,x,b-1,E,ee,ne)))}else J1(a,y,x,E,ee,ne)}function J1(a,y,x,b,E,ee){for(var ne=E===a?!0:a.isTreeExpanded,ae=x?a.Mo():a.Sd(),ue={};ae.next();){var ge=ae.value;if(ge.isTreeLink&&(ge=ge.To(a),ge!==null&&ge!==a)){var ye=y.contains(ge);if(ye||y.add(ge),ne){var Le=x?ge.Oo():ge.Po();ue.uv=a,Le.all(function(ze){return function(We){return We===ze.uv||!We.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 an;x.add(this),Q1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===vh),y.Ue=!1}};function Q1(a,y,x,b,E,ee,ne){for(var ae=ee===a?!1:a.isTreeExpanded,ue=x?a.Mo():a.Sd(),ge={};ue.next();){var ye=ue.value;if(ye.isTreeLink&&(ae||ye.fd||ye.bb(),ye=ye.To(a),ye!==null&&ye!==a&&!y.contains(ye))){if(y.add(ye),!ae){ye.Zb(!0),ye.oh();var Le=x?ye.Oo():ye.Po();ge.vv=a,Le.all(function(ze){return function(We){return We===ze.vv||!We.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}Ut.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:jo},set:function(a){typeof a=="number"&&(a=new Ir(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&&V1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(Ph(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),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 pn(Wn,"SpreadingNone",10),Hm=new pn(Wn,"SpreadingEvenly",11),W0=new pn(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 an,this.$a=null,this.Sc=new lo,this.Sc.group=this,this.gl=new an,this.tb=this.$p=null,y&&Object.assign(this,y)}Zt(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 Pn)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&&Mt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof yn){var ae=E.Nl(function(ue){return ue instanceof Qa});ae instanceof Qa&&(this.$a===null?this.$a=ae:this.$a!==ae&&Mt("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 yn&&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!==yn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof yn&&(a=a.Pb()),this.tb===null&&(this.tb=new qt),a.mi(this.tb),a instanceof Gr&&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 Pn||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 Pn&&y.isVisible()&&Ya(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function K0(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 Pn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function V0(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 Pn&&!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=nn(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=nn(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 an,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 an,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 an;return a(this,y),y},et.Rj=function(){var a=new an;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 Pn)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 Pn)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 an,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Pn&&(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 Pn&&(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)}},Ut.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&&Mt("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 qt(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Zt(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 to(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 xi)||Mt("Placeholder is not inside a Group or Adornment."),a instanceof Or){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Mi(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 Gr&&(ne=ee.strokeWidth);var ae=ee.Df(),ue=ee.naturalBounds,ge=(ue.width+ne)*ae;ne=(ue.height+ne)*ae,a.type!==yn.Link&&(ae=ee.ga(a.category==="Selection"?li:a.locationSpot,st.alloc()),a.location=ae,st.free(ae)),isNaN(ge)||isNaN(ne)?(a=ee.ga(li,st.alloc()),ge=qt.allocAt(a.x,a.y,0,0),ge.Ye(ee.ga(Ii,a)),ge.Ye(ee.ga(Oi,a)),ge.Ye(ee.ga(zo,a)),Mi(y,ge.width+b||0,ge.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),st.free(a),qt.free(ge)):(Mi(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=qt.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)),qt.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 Pn&&(!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},Ut.Object.defineProperties(Qa.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Ir(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Qa.className="Placeholder";function Pn(a){yr.call(this,yn.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 qt,this.ua=new wn,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)}Zt(Pn,yr),Pn.prototype.cloneProtected=function(a){yr.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=Pn.prototype,et.Af=function(a){yr.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===Pn?(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&&Mt("Unknown Link enum value for a Link property: "+a):yr.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},Pn.prototype.computeAngle=function(a,y,x){return Pn.computeAngle(y,x)},Pn.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&&V0(x,a),a.Ah=y,y!==null&&K0(y,a);var E=a.containingGroupChanged;if(E!==null){var ee=!0,ne=a.diagram;ne!==null&&(ee=ne.aa,ne.aa=!0),E(a,x,y),ne!==null&&(ne.aa=ee)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}et=Pn.prototype,et.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&yr.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 an),a.wd.add(y),a.v()}et.Vo=function(a){if(yr.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(yr.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))},Pn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Pn.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?yr.prototype.move.call(this,a,!1):(a=st.allocAt(x.x+b,x.y+E),yr.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)},Pn.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},Pn.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},Pn.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},Pn.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=Pn.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 Le=ue[ye];ne=Math.min(Le.x,ne),ae=Math.min(Le.y,ae),Le.freeze()}if(y.freeze(),ge===ee){for(ee=0;ee<ge;ee++)if(ye=E[ee],Le=ue[ee],ye.x-x!==Le.x-ne||ye.y-b!==Le.y-ae){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ld(x.animationManager,this,y),Wm(this),this.g("points",a,y)}},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()}}},Pn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Rf||(Rf=new Wn,Rf.desiredSize=vr,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=vr,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,Le=this.curve===Gs;this.Wf=ge&&!ye?Le=!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(),Le){ee=this.getLinkPoint(a,y,ne,!0,!1,b,E),ze=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=ze.x-ee.x,ue=ze.y-ee.y,ge=this.computeCurviness(),Le=ye=0;var We=ee.x+ae/3,Qe=ee.y+ue/3,it=We,Tt=Qe;zt.B(ue,0)?Tt=0<ae?Tt-ge:Tt+ge:(ye=-ae/ue,Le=Math.sqrt(ge*ge/(ye*ye+1)),0>ge&&(Le=-Le),it=(0>ue?-1:1)*Le+We,Tt=ye*(it-We)+Qe),We=ee.x+2*ae/3,Qe=ee.y+2*ue/3;var wt=We,jt=Qe;zt.B(ue,0)?jt=0<ae?jt-ge:jt+ge:(wt=(0>ue?-1:1)*Le+We,jt=ye*(wt-We)+Qe),this.Fj(),this.ne(ee),this.yf(it,Tt),this.yf(wt,jt),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=qt.alloc(),y.mi(ae),ue=ae.ca(E),ze.mi(ae),ge=ae.ca(b),(ue||ge)&&(ne=y.ga(Vm(ne),new st),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=ze.ga(Vm(x),new st),this.dd(1,this.getLinkPointFromPoint(ee,ze,x,b,!1,x))),qt.free(ae))}else{Le=this.isAvoiding,ze&&(ye&&Le||ge)&&this.Fj();var Ot=ge?this.computeCurviness():0;Le=this.getLinkPoint(a,y,ne,!0,ye,b,E),We=it=Qe=0,(ye||!ae||ge)&&(Tt=this.computeEndSegmentLength(a,y,ne,!0),We=this.getLinkDirection(a,y,Le,ne,!0,ye,b,E),ge&&(ae||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(We-=ye?90:30,0>Ot&&(We-=180)),0>We?We+=360:360<=We&&(We-=360),ge&&(Tt+=Math.abs(Ot)*(ye?1:2)),We===0?Qe=Tt:We===90?it=Tt:We===180?Qe=-Tt:We===270?it=-Tt:(Qe=Tt*Math.cos(We*Math.PI/180),it=Tt*Math.sin(We*Math.PI/180)),ne.Mc()&&ge&&(Tt=y.ga(zr,st.alloc()),wt=st.allocAt(Tt.x+1e3*Qe,Tt.y+1e3*it),this.getLinkPointFromPoint(a,y,Tt,wt,!0,Le),st.free(Tt),st.free(wt))),Tt=this.getLinkPoint(b,E,x,!1,ye,a,y);var Bt=jt=wt=0;if(ye||!ue||ge){var It=this.computeEndSegmentLength(b,E,x,!1);Bt=this.getLinkDirection(b,E,Tt,x,!1,ye,a,y),ge&&(ue||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(Bt+=ye?0:30,0>Ot&&(Bt+=180)),0>Bt?Bt+=360:360<=Bt&&(Bt-=360),ge&&(It+=Math.abs(Ot)*(ye?1:2)),Bt===0?wt=It:Bt===90?jt=It:Bt===180?wt=-It:Bt===270?jt=-It:(wt=It*Math.cos(Bt*Math.PI/180),jt=It*Math.sin(Bt*Math.PI/180)),x.Mc()&&ge&&(x=E.ga(zr,st.alloc()),ne=st.allocAt(x.x+1e3*wt,x.y+1e3*jt),this.getLinkPointFromPoint(b,E,x,ne,!1,Tt),st.free(x),st.free(ne))}x=Le,(ye||!ae||ge)&&(x=new st(Le.x+Qe,Le.y+it)),ne=Tt,(ye||!ue||ge)&&(ne=new st(Tt.x+wt,Tt.y+jt)),!ze&&!ye&&ae&&3<ee&&this.adjustPoints(0,Le,ee-2,ne)?this.dd(ee-1,Tt):!ze&&!ye&&ue&&3<ee&&this.adjustPoints(1,x,ee-1,Tt)?this.dd(0,Le):!ze&&(ye?6<=ee:4<ee)&&this.adjustPoints(1,x,ee-2,ne)?(this.dd(0,Le),this.dd(ee-1,Tt)):(this.Fj(),this.ne(Le),(ye||!ae||ge)&&this.ne(x),ye&&this.addOrthoPoints(x,We,ne,Bt,a,b),(ye||!ue||ge)&&this.ne(ne),this.ne(Tt))}return!0};function Z0(a,y){return Math.abs(y.x-a.x)>Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}Pn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,ee){if(ee===void 0&&(ee=new st),a===null||y===null)return ee.assign(x),ee;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var ne=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*E;var ae=-a.m12*E,ue=-a.m21*E,ge=a.m11*E,ye=E*(a.m21*a.dy-a.m22*a.dx),Le=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*ue+ye,b=b.x*ae+b.y*ge+Le,ne=x.x*ne+x.y*ue+ye,x=x.x*ae+x.y*ge+Le}return y.Sj(E,b,ne,x,ee),a!==null&&ee.transform(a),ee};function Km(a,y){var x=y.Zn;return x===null&&(x=new _f,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}Pn.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=Km(this,y);if(ue!==null){if(ae.assign(ue.Zo),E&&this.routing===nS){var ge=Km(this,ne);if(ge!==null&&ue.Gl<ge.Gl){ue=st.alloc(),ge=st.alloc();var ye=new qt(y.ga(li,ue),y.ga(Ii,ge)),Le=this.computeSpot(!b,ne);a=this.getLinkPoint(ee,ne,Le,!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(Vo)||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(Vm(x),st.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=Z0(x,ne.copy()))):(ue=this.computeSpot(!b,ne),ee=st.alloc(),ne=ne.ga(Vm(ue),ee),E&&(ne=Z0(x,ne)),st.free(ee)),this.getLinkPointFromPoint(a,y,x,ne,b,ae),st.free(x),ae},Pn.prototype.getLinkDirection=function(a,y,x,b,E,ee,ne,ae){e:if(b.sb())var ue=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x<b.y?b.x>1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5<b.x?45:0;else{if(b.$c()&&(ue=Km(this,y),ue!==null))switch(ue.Nc){case 1:ue=270;break e;case 2:ue=180;break e;default:case 4:ue=0;break e;case 8:ue=90;break e}ue=y.ga(zr,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(zr,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},Pn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Km(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Pn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=zr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Zo?_r:y)):(a=y||this.toPort,a===null?a=zr:(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 Vm(a){return a.x===.5&&a.y===.5?a:zr}Pn.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(zr))},Pn.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},Pn.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=kr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return v0(this,y,x,E),ee===void 0&&kr.free(ne),!0;if(this.Yc(a,ne)){var ae=!1;if(!this.isAtomic)for(var ue=this.O.s,ge=ue.length;ge--;){var ye=ue[ge];if(ye.visible||ye===this.locationObject){var Le=ye.actualBounds,ze=this.naturalBounds;if(!(Le.x>ze.width||Le.y>ze.height||0>Le.x+Le.width||0>Le.y+Le.height)){if(Le=kr.alloc(),Le.set(ne),ye instanceof yn)ae=ye.Cf(a,y,x,b,E,Le);else if(this.path===ye){if(ye instanceof Gr)if(ae=a,ze=b,ye.pickable===!1)ae=!1;else if(Le.multiply(ye.transform),ze)e:{var We=ae,Qe=Le;if(ye.fh(We,Qe))ae=!0;else{if(Qe===void 0&&(Qe=ye.transform,We.Re(ye.actualBounds))){ae=!0;break e}ae=We.left,ze=We.right;var it=We.top;We=We.bottom;var Tt=st.alloc(),wt=st.alloc(),jt=st.alloc(),Ot=kr.alloc();Ot.set(Qe),Ot.bv(ye.transform),Ot.Vj(),wt.x=ze,wt.y=it,wt.transform(Ot),Tt.x=ae,Tt.y=it,Tt.transform(Ot),Qe=!1,Yc(ye,Tt,wt,jt)?Qe=!0:(Tt.x=ze,Tt.y=We,Tt.transform(Ot),Yc(ye,Tt,wt,jt)?Qe=!0:(wt.x=ae,wt.y=We,wt.transform(Ot),Yc(ye,Tt,wt,jt)?Qe=!0:(Tt.x=ae,Tt.y=it,Tt.transform(Ot),Yc(ye,Tt,wt,jt)&&(Qe=!0)))),kr.free(Ot),st.free(Tt),st.free(wt),st.free(jt),ae=Qe}}else ae=ye.fh(ae,Le)}else ae=Yo(ye,a,b,Le);ae&&(ze=ye,y!==null&&(ze=y(ye)),ze&&(x===null||x(ze))&&E.add(ze)),kr.free(Le)}}}return ee===void 0&&kr.free(ne),ae||this.background!==null||this.areaBackground!==null}return ee===void 0&&kr.free(ne),!1},Pn.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},Pn.prototype.computeCorner=function(){if(this.curve===Gs)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Pn.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},Pn.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(zr).ab(x.ga(zr))/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},Pn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===$a&&x.bb()}},Pn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=Kn(),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),Jn(x)}}return a},Pn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Pn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Pn.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 Le=y.y;ae=b.x-ne;var ze=b.y-Le;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),Le+y*Math.sin(ae)));this.dd(x,b)}}return!0;case Jm:if(ee=this.i(a),Le=this.i(x),!ee.Xa(y)||!Le.Xa(b)){E=ee.x,ee=ee.y,ne=Le.x,Le=Le.y,ge=(ne-E)*(ne-E)+(Le-ee)*(Le-ee),ae=y.x,ye=y.y,ue=b.x,ze=b.y;var We=1;if(ue-ae!==0){var Qe=(ze-ye)/(ue-ae);We=Math.sqrt(1+1/(Qe*Qe))}else Qe=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var it=y.x,Tt=y.y,wt=.5;ge!==0&&(wt=((E-it)*(E-ne)+(ee-Tt)*(ee-Le))/ge);var jt=E+wt*(ne-E),Ot=ee+wt*(Le-ee);y=Math.sqrt((it-jt)*(it-jt)+(Tt-Ot)*(Tt-Ot)),Tt<Qe*(it-jt)+Ot&&(y=-y),0<Qe&&(y=-y),it=ae+wt*(ue-ae),wt=ye+wt*(ze-ye),Qe!==0?(y=it+y/We,this.L(a,y,wt-(y-it)/Qe)):this.L(a,it,wt+y)}this.dd(x,b)}return!0;case tg:e:{if(this.isOrthogonal&&(E=this.i(a),ee=this.i(a+1),ne=this.i(a+2),ae=ee.x,ye=ee.y,Le=ae,ge=ye,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,Le,ge),this.L(x-1,ue,ze),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Pn.prototype.addOrthoPoints=function(a,y,x,b,E,ee){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var ne=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var ae=E.actualBounds.copy(),ue=ee.actualBounds.copy();if(ae.w()&&ue.w()){ae.Bc(sg,sg),ue.Bc(sg,sg),ae.Ye(a),ue.Ye(x);var ge=st.alloc(),ye=st.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&ue.right>a.x||b===90&&x.y>a.y&&ue.right>a.x?(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===180?(ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=ge.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ge.x=a.x<ue.left?this.computeMidOrthoPosition(a.x,a.y,ue.left,x.y,!1):a.x<ue.right&&(b===270&&a.y<ue.top||b===90&&a.y>ue.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ue.right,ye.x=ge.x,ye.y=x.y):b===0&&a.x<ue.left&&a.y>ue.top&&a.y<ue.bottom&&(ge.x=a.x,ge.y=a.y<x.y?Math.min(x.y,ue.top):Math.max(x.y,ue.bottom),ye.y=ge.y)):(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<ae.top||b===270&&x.y>ae.bottom)&&(b===180&&(ue.ca(a)||ae.ca(x))?ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?ge.y=this.computeMidOrthoPosition(a.x,ae.top,x.x,Math.max(x.y,ue.bottom),!0):x.y>a.y&&(b===180||b===270)&&(ge.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,ue.top),!0)),ye.x=x.x,ye.y=ge.y),ge.y>ae.top&&ge.y<ae.bottom&&(x.x>=ae.left&&x.x<=a.x||a.x<=ue.right&&a.x>=x.x?(b===90||b===270)&&(ge.h(Math.max((a.x+x.x)/2,a.x),a.y),ye.h(ge.x,x.y)):(ge.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?ae.top:Math.min(ae.top,ue.top)):Math.max(x.y,b===0?ae.bottom:Math.max(ae.bottom,ue.bottom)),ye.x=x.x,ye.y=ge.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&ue.left<a.x||b===90&&x.y>a.y&&ue.left<a.x?(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===0?(ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=ge.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ge.x=a.x>ue.right?this.computeMidOrthoPosition(a.x,a.y,ue.right,x.y,!1):a.x>ue.left&&(b===270&&a.y<ue.top||b===90&&a.y>ue.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ue.left,ye.x=ge.x,ye.y=x.y):b===180&&a.x>ue.right&&a.y>ue.top&&a.y<ue.bottom&&(ge.x=a.x,ge.y=a.y<x.y?Math.min(x.y,ue.top):Math.max(x.y,ue.bottom),ye.y=ge.y)):(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<ae.top||b===270&&x.y>ae.bottom)&&(b===0&&(ue.ca(a)||ae.ca(x))?ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?ge.y=this.computeMidOrthoPosition(a.x,ae.top,x.x,Math.max(x.y,ue.bottom),!0):x.y>a.y&&(b===0||b===270)&&(ge.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,ue.top),!0)),ye.x=x.x,ye.y=ge.y),ge.y>ae.top&&ge.y<ae.bottom&&(x.x<=ae.right&&x.x>=a.x||a.x>=ue.left&&a.x<=x.x?(b===90||b===270)&&(ge.h(Math.min((a.x+x.x)/2,a.x),a.y),ye.h(ge.x,x.y)):(ge.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?ae.top:Math.min(ae.top,ue.top)):Math.max(x.y,b===180?ae.bottom:Math.max(ae.bottom,ue.bottom)),ye.x=x.x,ye.y=ge.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&ue.bottom>a.y||b===0&&x.x>a.x&&ue.bottom>a.y?(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===270?(ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=ge.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(ge.y=a.y<ue.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ue.top,!0):a.y<ue.bottom&&(b===180&&a.x<ue.left||b===0&&a.x>ue.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ue.bottom,ye.x=x.x,ye.y=ge.y):b===90&&a.y<ue.top&&a.x>ue.left&&a.x<ue.right&&(ge.x=a.x<x.x?Math.min(x.x,ue.left):Math.max(x.x,ue.right),ge.y=a.y,ye.x=ge.x)):(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<ae.left||b===180&&x.x>ae.right)&&(b===270&&(ue.ca(a)||ae.ca(x))?ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?ge.x=this.computeMidOrthoPosition(ae.left,a.y,Math.max(x.x,ue.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(ge.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,ue.left),x.y,!1)),ye.x=ge.x,ye.y=x.y),ge.x>ae.left&&ge.x<ae.right&&(x.y>=ae.top&&x.y<=a.y||a.y<=ue.bottom&&a.y>=x.y?(b===0||b===180)&&(ge.h(a.x,Math.max((a.y+x.y)/2,a.y)),ye.h(x.x,ge.y)):(ge.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?ae.left:Math.min(ae.left,ue.left)):Math.max(x.x,b===90?ae.right:Math.max(ae.right,ue.right)),ye.x=ge.x,ye.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&ue.top<a.y||b===0&&x.x>a.x&&ue.top<a.y?(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===90?(ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=ge.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(ge.y=a.y>ue.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ue.bottom,!0):a.y>ue.top&&(b===180&&a.x<ue.left||b===0&&a.x>ue.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ue.top,ye.x=x.x,ye.y=ge.y):b===270&&a.y>ue.bottom&&a.x>ue.left&&a.x<ue.right&&(ge.x=a.x<x.x?Math.min(x.x,ue.left):Math.max(x.x,ue.right),ge.y=a.y,ye.x=ge.x)):(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<ae.left||b===180&&x.x>ae.right)&&(b===90&&(ue.ca(a)||ae.ca(x))?ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?ge.x=this.computeMidOrthoPosition(ae.left,a.y,Math.max(x.x,ue.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(ge.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,ue.left),x.y,!1)),ye.x=ge.x,ye.y=x.y),ge.x>ae.left&&ge.x<ae.right&&(x.y<=ae.bottom&&x.y>=a.y||a.y>=ue.top&&a.y<=x.y?(b===0||b===180)&&(ge.h(a.x,Math.min((a.y+x.y)/2,a.y)),ye.h(x.x,ge.y)):(ge.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?ae.left:Math.min(ae.left,ue.left)):Math.max(x.x,b===270?ae.right:Math.max(ae.right,ue.right)),ye.x=ge.x,ye.y=x.y)));var Le=x;if(this.isAvoiding){var ze=this.diagram;if(ze===null||E===ee||this.layer.isTemporary||!vd(ze)||ae.ca(Le)&&!ee.Td(E)||ue.ca(a)&&!E.Td(ee))y=!1;else{var We=yd(ze,!0,this.containingGroup,null);if(this.segmentIndex!==17&&We.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))&&We.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))&&We.Yj(Math.min(ye.x,Le.x),Math.min(ye.y,Le.y),Math.abs(ye.x-Le.x),Math.abs(ye.y-Le.y)))y=!1;else{E=a,ee=Le;var Qe=x=null;if(ze.isVirtualized){ze=We.bounds.copy(),ze.Bc(-We.Ho,-We.Go);var it=st.alloc();_d(We,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,it)?(x=a=it.copy(),y=it.ab(ge)):zt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ge.x,ge.y,ye.x,ye.y,it)?(x=a=it.copy(),y=it.ab(ye)):zt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ye.x,ye.y,Le.x,Le.y,it)&&(x=a=it.copy(),y=it.ab(Le))),_d(We,Le.x,Le.y)||(zt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,Le.x,Le.y,ye.x,ye.y,it)?(Qe=Le=it.copy(),b=ye.ab(it)):zt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ye.x,ye.y,ge.x,ge.y,it)?(Qe=Le=it.copy(),b=ge.ab(it)):zt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ge.x,ge.y,a.x,a.y,it)&&(Qe=Le=it.copy(),b=a.ab(it))),st.free(it)}ae=ae.copy().ed(ue),ae.Bc(We.Ho*We.Os,We.Go*We.Os),aS(We,a,y,Le,b,ae,!0),ue=Pu(We,Le.x,Le.y),!We.abort&&ue>=zd&&(oS(We),ae.Bc(We.Ho*We.Hx,We.Go*We.Ix),aS(We,a,y,Le,b,ae,!1),ue=Pu(We,Le.x,Le.y)),!We.abort&&ue<zd&&Pu(We,Le.x,Le.y)!==kh?(Y0(this,We,Le.x,Le.y,b,!0,ne),ae=this.i(2),4>this.pointsCount?(y===0||y===180?(ae.x=a.x,ae.y=Le.y):(ae.x=Le.x,ae.y=a.y),this.L(2,ae.x,ae.y),this.m(3,ae.x,ae.y)):(ne=this.i(3),y===0||y===180?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)<=We.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)<=We.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)}},Pn.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,Le=b;for(E===0?ye+=ae:E===90?Le+=ue:E===180?ye-=ae:Le-=ue,E!==ne&&ge>$c&&Pu(y,ye,Le)!==ge-1&&(Pu(y,x-ae,b)===ge-1?(E=180,ye=x-ae,Le=b):Pu(y,x+ae,b)===ge-1?(E=0,ye=x+ae,Le=b):Pu(y,x,b-ue)===ge-1?(E=270,ye=x,Le=b-ue):Pu(y,x,b+ue)===ge-1&&(E=90,ye=x,Le=b+ue));ge>$c&&Pu(y,ye,Le)===ge-1;)x=ye,b=Le,E===0?ye+=ae:E===90?Le+=ue:E===180?ye-=ae:Le-=ue,--ge;ee?ge>$c&&(E===180||E===0?x=Math.floor(x/ae)*ae+ae/2:(E===90||E===270)&&(b=Math.floor(b/ue)*ue+ue/2)):(x=Math.floor(x/ae)*ae+ae/2,b=Math.floor(b/ue)*ue+ue/2),ge>$c&&(ee=E,ne=x,ye=b,E===0?(ee=90,ye+=ue):E===90?(ee=180,ne-=ae):E===180?(ee=270,ye-=ue):E===270&&(ee=0,ne+=ae),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)}Pn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=Zn(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=Zn(y,a,b.x,b.y,x.x,x.y);b=x,ae<E&&(ee=ne,E=ae)}return ee},Pn.prototype.qc=function(){this.lk=!1,this.v()},Pn.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 Gr&&(E.ua=this.ua)}}},Pn.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=wn.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,Le=1;Le<this.pointsCount-1;Le++){ge=this.i(Le);var ze=ne,We=ge,Qe=this.i(J0(this,ge,Le,!1));if((!zt.$(ze.x,We.x)||!zt.$(We.x,Qe.x))&&(!zt.$(ze.y,We.y)||!zt.$(We.y,Qe.y))){var it=ye;isNaN(it)&&(it=this.smoothness/3);var Tt=ze.x;ze=ze.y;var wt=We.x;We=We.y;var jt=Qe.x;Qe=Qe.y;var Ot=it*Zm(Tt,ze,wt,We);it*=Zm(wt,We,jt,Qe),zt.$(ze,We)&&zt.$(wt,jt)&&(wt>Tt?Qe>We?(ee.x=wt-Ot,ee.y=We-Ot,E.x=wt+it,E.y=We+it):(ee.x=wt-Ot,ee.y=We+Ot,E.x=wt+it,E.y=We-it):Qe>We?(ee.x=wt+Ot,ee.y=We-Ot,E.x=wt-it,E.y=We+it):(ee.x=wt+Ot,ee.y=We+Ot,E.x=wt-it,E.y=We-it)),zt.$(Tt,wt)&&zt.$(We,Qe)&&(We>ze?(jt>wt?(ee.x=wt-Ot,ee.y=We-Ot,E.x=wt+it):(ee.x=wt+Ot,ee.y=We-Ot,E.x=wt-it),E.y=We+it):(jt>wt?(ee.x=wt-Ot,ee.y=We+Ot,E.x=wt+it):(ee.x=wt+Ot,ee.y=We+Ot,E.x=wt-it),E.y=We-it)),(zt.$(Tt,wt)&&zt.$(wt,jt)||zt.$(ze,We)&&zt.$(We,Qe))&&(Tt=.5*(Tt+jt),ze=.5*(ze+Qe),ee.x=Tt,ee.y=ze,E.x=Tt,E.y=ze),(Le===1||Le===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,Bn)),ge=.5*(ge+ye.x),ne=.5*(ne+ye.y),wh(ae,E.x-b,E.y-ue,ge-b,ne-ue,ye.x-b,ye.y-ue),st.free(y),st.free(x),st.free(ee),st.free(E)}else for(x=3;x<y;x+=3)ee=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=Df(this,ne.copy(),!1,Bn)),wh(ae,ee.x-b,ee.y-ue,E.x-b,E.y-ue,ne.x-b,ne.y-ue);else{for(ee=st.alloc(),ee.assign(this.i(0)),E=st.alloc(),E.assign(ee),ne=this.computeCorner(),Le=1,ge=0;Le<y;){if(Le=J0(this,ee,Le,1<Le),ye=this.i(Le),Le>=y-1){if(!ee.D(ye))this.computeShortLength(!1)!==0&&(ye=Df(this,ye.copy(),!1,Bn)),Bf(this,ae,-b,-ue,ee,ye,x);else if(ge===0)for(Le=1;Le<y;)E.assign(ee),ye=this.i(Le++),Bf(this,ae,-b,-ue,ee,ye,x),ee.assign(ye);break}if(ge=J0(this,ye,Le+1,Le<y-3),Le=-b,Tt=-ue,ze=ye,wt=this.i(ge),it=x,zt.B(ee.y,ze.y)&&zt.B(ze.x,wt.x))if(Qe=Math.min(ne,Math.abs(ze.x-E.x)/2),Qe=Ot=Math.min(Qe,Math.abs(wt.y-ze.y)/2),zt.B(Qe,0))Bf(this,ae,Le,Tt,ee,ze,it),ee.assign(ze);else{var Bt=ze.x,It=ze.y;We=Bt,jt=It,ze.x>ee.x?Bt=ze.x-Qe:Bt=ze.x+Qe,wt.y>ze.y?jt=ze.y+Ot:jt=ze.y-Ot,wt=st.allocAt(Bt,It),Bf(this,ae,Le,Tt,ee,wt,it),st.free(wt),Rm(ae,ze.x+Le,ze.y+Tt,We+Le,jt+Tt),ee.h(We,jt)}else zt.B(ee.x,ze.x)&&zt.B(ze.y,wt.y)?(Qe=Math.min(ne,Math.abs(ze.y-E.y)/2),Qe=Ot=Math.min(Qe,Math.abs(wt.x-ze.x)/2),zt.B(Ot,0)?(Bf(this,ae,Le,Tt,ee,ze,it),ee.assign(ze)):(Bt=ze.x,It=ze.y,We=Bt,jt=It,ze.y>ee.y?It=ze.y-Qe:It=ze.y+Qe,wt.x>ze.x?We=ze.x+Ot:We=ze.x-Ot,wt=st.allocAt(Bt,It),Bf(this,ae,Le,Tt,ee,wt,it),st.free(wt),Rm(ae,ze.x+Le,ze.y+Tt,We+Le,jt+Tt),ee.h(We,jt))):(Bf(this,ae,Le,Tt,ee,ze,it),ee.assign(ze));E.assign(ye),Le=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=wn.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}Pn.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 Le=Math.max(E.x,Math.min(ue[ye++]-ae,ee.x-ne));y.lineTo(Le+x,ee.y+b);for(var ze=Le+x,We=Math.min(Le+ne,ee.x);ye<ge&&(Le=ue[ye],Le<We+ne);)ye++,We=Math.min(Le+ae,ee.x);Le=ee.y-ne+b,We+=x;var Qe=ee.y+b;a.curve===Eh?Dd(y,We,Qe,!1):wh(y,ze,Le,We,Le,We,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,Le=Math.max(ye-ne,ee.x);0<=ge&&(ye=ue[ge],ye>Le-ne);)ge--,Le=Math.max(ye-ae,ee.x);ye=ee.y-ne+b,Le+=x,We=ee.y+b,a.curve===Eh?Dd(y,Le,We,!1):wh(y,ze,ye,Le,ye,Le,We)}else if(zt.B(E.x,ee.x))if(E.y<ee.y)for(ye=0;ye<ge;){for(Le=Math.max(E.y,Math.min(ue[ye++]-ae,ee.y-ne)),y.lineTo(ee.x+x,Le+b),ze=Le+b,Le=Math.min(Le+ne,ee.y);ye<ge&&(We=ue[ye],We<Le+ne);)ye++,Le=Math.min(We+ae,ee.y);We=ee.x-ne+x,Qe=ee.x+x,Le+=b,a.curve===Eh?Dd(y,Qe,Le,!1):wh(y,We,ze,We,Le,Qe,Le)}else for(--ge;0<=ge;){for(ye=Math.min(E.y,Math.max(ue[ge--]+ae,ee.y+ne)),y.lineTo(ee.x+x,ye+b),ze=ye+b,ye=Math.max(ye-ne,ee.y);0<=ge&&(Le=ue[ge],Le>ye-ne);)ge--,ye=Math.max(Le-ae,ee.y);Le=ee.x-ne+x,We=ee.x+x,ye+=b,a.curve===Eh?Dd(y,We,ye,!1):wh(y,Le,ze,Le,ye,We,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 Pn){if(ue===a)return 0<b.length&&b.sort(function(ye,Le){return ye-Le}),b.length;if(ue.isVisible()&&Qc(ue)){var ge=ue.routeBounds;ge.w()&&a.routeBounds.Yc(ge)&&!a.usesSamePort(ue)&&(ge=ue.path,ge!==null&&ge.Ed()&&Tx(y,x,b,ue))}}}}}return 0<b.length&&b.sort(function(ye,Le){return ye-Le}),b.length}function Tx(a,y,x,b){for(var E=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 Le=a.y,ze=y.x,We=y.y,Qe=ne.x;ne=ne.y;var it=ge.x,Tt=ge.y;if(zt.B(ye,ze)){if(!zt.B(Le,We)&&zt.B(ne,Tt)&&Math.min(Le,We)<ne&&Math.max(Le,We)>ne&&Math.min(Qe,it)<ye&&Math.max(Qe,it)>ye&&!zt.B(Qe,it)){ae.x=ye,ae.y=ne,ye=!0;break e}}else if(zt.B(Le,We)&&zt.B(Qe,it)&&Math.min(ye,ze)<Qe&&Math.max(ye,ze)>Qe&&Math.min(ne,Tt)<Le&&Math.max(ne,Tt)>Le&&!zt.B(ne,Tt)){ae.x=Qe,ae.y=Le,ye=!0;break e}ae.x=0,ae.y=0,ye=!1}ye&&(E?x.push(ae.x):x.push(ae.y)),ne=ge}st.free(ae)}function Qc(a){return a=a.curve,a===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()))}Pn.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 Pn&&(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 Pn&&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())}}Pn.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},Pn.prototype.isVisible=function(){if(!yr.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},Pn.prototype.Zb=function(a){if(yr.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)},Pn.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&&(An(y.links,a),y.Sl()))}Pn.prototype.ph=function(){return!0},Ut.Object.defineProperties(Pn.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&&Fn(a,">= 0",Pn,"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&&Fn(a,">= 0",Pn,"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?Kr: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 Gr?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(!tn(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 Mt("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)}}}),Pn.prototype.invalidateOtherJumpOvers=Pn.prototype.Xo,Pn.prototype.findClosestSegment=Pn.prototype.ez,Pn.prototype.updateRoute=Pn.prototype.vg,Pn.prototype.invalidateRoute=Pn.prototype.bb,Pn.prototype.rollbackRoute=Pn.prototype.rv,Pn.prototype.commitRoute=Pn.prototype.zf,Pn.prototype.startRoute=Pn.prototype.uh,Pn.prototype.clearPoints=Pn.prototype.Fj,Pn.prototype.removePoint=Pn.prototype.pv,Pn.prototype.addPointAt=Pn.prototype.yf,Pn.prototype.addPoint=Pn.prototype.ne,Pn.prototype.insertPointAt=Pn.prototype.m,Pn.prototype.insertPoint=Pn.prototype.Kz,Pn.prototype.setPointAt=Pn.prototype.L,Pn.prototype.setPoint=Pn.prototype.dd,Pn.prototype.getPoint=Pn.prototype.i,Pn.prototype.getOtherPort=Pn.prototype.Cz,Pn.prototype.getOtherNode=Pn.prototype.To;var Rf=null,If=null,Q0=new pn(Pn,"Normal",1),Lx=new pn(Pn,"Orthogonal",2),Mx=new pn(Pn,"AvoidsNodes",6),nS=new pn(Pn,"AvoidsNodesStraight",7),$a=new pn(Pn,"None",0),Gs=new pn(Pn,"Bezier",9),Eh=new pn(Pn,"JumpGap",10),Id=new pn(Pn,"JumpOver",11),tg=new pn(Pn,"End",17),Ym=new pn(Pn,"Scale",18),Jm=new pn(Pn,"Stretch",19),ng=new pn(Pn,"OrientAlong",21),rg=new pn(Pn,"OrientPlus90",22),ig=new pn(Pn,"OrientMinus90",23),$0=new pn(Pn,"OrientOpposite",24),Qm=new pn(Pn,"OrientUpright",25),og=new pn(Pn,"OrientPlus90Upright",26),ag=new pn(Pn,"OrientMinus90Upright",27),$m=new pn(Pn,"OrientUpright45",28),rS=16,iS=14,sg=8;Pn.className="Link",Pn.Normal=Q0,Pn.Orthogonal=Lx,Pn.AvoidsNodes=Mx,Pn.AvoidsNodesStraight=nS,Pn.None=$a,Pn.Bezier=Gs,Pn.JumpGap=Eh,Pn.JumpOver=Id,Pn.End=tg,Pn.Scale=Ym,Pn.Stretch=Jm,Pn.OrientAlong=ng,Pn.OrientPlus90=rg,Pn.OrientMinus90=ig,Pn.OrientOpposite=$0,Pn.OrientUpright=Qm,Pn.OrientPlus90Upright=og,Pn.OrientMinus90Upright=ag,Pn.OrientUpright45=$m,Pn.EndSegmentStep=8,Pn.CurvinessStart=rS,Pn.SpacingMin=iS,Pn.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,Le=a.ac[ge][ye];if(Le>=$c&&Le<zd)for(E?ye+=b:ge+=b,Le+=1;ee<=ge&&ge<=ne&&ae<=ye&&ye<=ue&&!(Le>=a.ac[ge][ye]);)a.ac[ge][ye]=Le,Le+=1,E?ye+=b:ge+=b;if(ge=E?ye:ge,E)if(0<b)for(x+=b;x<ge;x+=b)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 Le=ee.x;b=ee.y,y=ee.x+ee.width;var ze=ee.y+ee.height;Le-=a.Nd,Le/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,ze-=a.Od,ze/=a.sc,ee=Math.max(0,Math.min(a.di,Le|0)),y=Math.min(a.di,Math.max(0,y|0)),Le=Math.max(0,Math.min(a.ei,b|0)),ze=Math.min(a.ei,Math.max(0,ze|0)),b=a.ac,ae|=0,ue|=0,ge|=0,ye|=0;var We=x===0||x===90?1:-1;if(x=x===90||x===270,b[ae][ue]===kh?(ev(a,ae,ue,We,x,ee,y,Le,ze),ev(a,ae,ue,1,!x,ee,y,Le,ze),ev(a,ae,ue,-1,!x,ee,y,Le,ze)):ev(a,ae,ue,We,x,ae,ue,ae,ue),b[ge][ye]===kh?(tv(a,ge,ye,E===0||E===90?1:-1,E===90||E===270,ee,y,Le,ze),tv(a,ge,ye,1,!(E===90||E===270),ee,y,Le,ze),tv(a,ge,ye,-1,!(E===90||E===270),ee,y,Le,ze)):tv(a,ge,ye,We,x,ge,ye,ge,ye),x=Kn(),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,Le,ze),Cu(a,ae,ue,-1,!1,ee,y,Le,ze),Cu(a,ae,ue,1,!0,ee,y,Le,ze),Cu(a,ae,ue,-1,!0,ee,y,Le,ze);Jn(x)}}}}function sS(a,y,x,b,E,ee,ne){for(var ae=a.ac,ue=y,ge=x;;){if(ue===E&&ge===ee)return!0;var ye=ue,Le=ge;if(b===0)if(ye<E)ye++;else break;else if(b===90)if(Le<ee)Le++;else break;else if(b===180)if(ye>E)ye--;else break;else if(Le>ee)Le--;else break;var ze=ae[ye][Le];if(ze===0||ze===ey)break;ue=ye,ge=Le}for(;;){if(ye=b,Le=ue,ze=ge,b===0?ze<ee?(ye=90,ze++):ze>ee&&(ye=270,ze--):b===90?Le<E?(ye=0,Le++):Le>E&&(ye=180,Le--):b===180?ze<ee?(ye=90,ze++):ze>ee&&(ye=270,ze--):Le<E?(ye=0,Le++):Le>E&&(ye=180,Le--),Le=ae[Le][ze],ye!==b&&Le!==0&&Le!==ey){if(ne.push(ue),ne.push(ge),sS(a,ue,ge,ye,E,ee,ne))return!0;ne.pop(),ne.pop()}if(ae[ue][ge]=ey,b===0){if(ue===y)return!1;ue--}else if(b===90){if(ge===x)return!1;ge--}else if(b===180){if(ue===y)return!1;ue++}else{if(ge===x)return!1;ge++}}}Ut.Object.defineProperties(lg.prototype,{bounds:{get:function(){return new qt(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(li,st.alloc()),ue=a.port.ga(Ii,st.alloc());for(E=qt.allocAt(ae.x,ae.y,0,0),E.Ye(ue),st.free(ae),st.free(ue),ae=st.allocAt(E.x+E.width/2,E.y+E.height/2),ue=a.port.li(),ne=ne.iterator;ne.next();){var ge=ne.value;if(ge.isVisible()&&ge.fromPort!==ge.toPort){var ye=ge.fromPort===a.port||ge.fromNode!==null&&ge.fromNode.Td(b),Le=ge.computeSpot(ye,a.port);if(Le.$c()&&(ye=ye?ge.toPort:ge.fromPort,ye!==null)){var ze=ye.part;if(ze!==null){var We=ze.findVisibleNode();We!==null&&We!==ze&&(ze=We,ye=ze.port),ye=ge.computeOtherPoint(ze,ye),ze=ae.ab(ye),ze-=ue,0>ze?ze+=360:360<=ze&&(ze-=360),Le=Nx(E,Le,ze,ge.isOrthogonal),Le===0?(Le=4,180<ze&&(ze-=360)):Le===90?(Le=8,270<ze&&(ze-=360)):Le===180?Le=2:(Le=1,90>ze&&(ze+=360)),We=a.pe[ee],We===void 0?(We=new ty(ge,ze,Le),a.pe[ee]=We):(We.link=ge,We.angle=ze,We.Nc=Le),We.hv.set(ye),ee++}}}}for(st.free(ae),a.pe.sort(_f.prototype.j),ue=a.pe.length,b=-1,ee=ae=0;ee<ue;ee++)ne=a.pe[ee],ne!==void 0&&(ne.Nc!==b&&(b=ne.Nc,ae=0),ne.Uo=ae,ae++);for(b=-1,ae=0,ee=ue-1;0<=ee;ee--)ue=a.pe[ee],ue!==void 0&&(ue.Nc!==b&&(b=ue.Nc,ae=ue.Uo+1),ue.Gl=ae);if(ee=a.pe,Le=a.port,b=a.node.portSpreading,ae=st.alloc(),ue=st.alloc(),ne=st.alloc(),ge=st.alloc(),Le.ga(li,ae),Le.ga(Oi,ue),Le.ga(Ii,ne),Le.ga(zo,ge),We=ze=ye=Le=0,b===W0)for(var Qe=0;Qe<ee.length;Qe++){var it=ee[Qe];if(it!==null){var Tt=it.link.computeThickness();switch(it.Nc){case 8:ze+=Tt;break;case 2:We+=Tt;break;case 1:Le+=Tt;break;default:case 4:ye+=Tt}}}var wt=Qe=0,jt=1,Ot=it=0;for(Tt=0;Tt<ee.length;Tt++){var Bt=ee[Tt];if(Bt!==null){if(Qe!==Bt.Nc){switch(Qe=Bt.Nc,Qe){case 8:var It=ne;wt=ge;break;case 2:It=ge,wt=ae;break;case 1:It=ae,wt=ue;break;default:case 4:It=ue,wt=ne}switch(it=wt.x-It.x,Ot=wt.y-It.y,Qe){case 8:ze>Math.abs(it)?(jt=Math.abs(it)/ze,ze=Math.abs(it)):jt=1;break;case 2:We>Math.abs(Ot)?(jt=Math.abs(Ot)/We,We=Math.abs(Ot)):jt=1;break;case 1:Le>Math.abs(it)?(jt=Math.abs(it)/Le,Le=Math.abs(it)):jt=1;break;default:case 4:ye>Math.abs(Ot)?(jt=Math.abs(Ot)/ye,ye=Math.abs(Ot)):jt=1}wt=0}var Xt=Bt.Zo;if(b===W0){switch(Bt=Bt.link.computeThickness(),Bt*=jt,Xt.set(It),Qe){case 8:Xt.x=It.x+it/2+ze/2-wt-Bt/2;break;case 2:Xt.y=It.y+Ot/2+We/2-wt-Bt/2;break;case 1:Xt.x=It.x+it/2-Le/2+wt+Bt/2;break;default:case 4:Xt.y=It.y+Ot/2-ye/2+wt+Bt/2}wt+=Bt}else{var In=.5;b===Hm&&(In=(Bt.Uo+1)/(Bt.Gl+1)),Xt.x=It.x+it*In,Xt.y=It.y+Ot*In}}}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,qt.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=er(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 Jt?(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 an;a instanceof Jt?(ac(this,y,a.nodes,!0,this.rh,!0,!1,!0),ac(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof 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 Pn)&&(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 Pn?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 qt),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},lo.prototype.ex=function(a){var y=new an;return a instanceof Jt?(ac(this,y,a.nodes,!0,null,!0,!0,!0),ac(this,y,a.links,!0,null,!0,!0,!0),ac(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof 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(li),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ut.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 an,this.ye=new an,this.Es=new $t,this.zs=new $t}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 an,this.ye=new an,this.Es=new $t,this.zs=new $t},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 Ls(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 Pn){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 Pn&&(!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=Kn(),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]);Jn(a)},Xi.prototype.deleteArtificialVertexes=function(){for(var a=Kn(),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=Kn(),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]);Jn(a),Jn(y)};function Ax(a){for(var y=Kn(),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]);Jn(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 an,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},Ut.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 qt(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#"+ti(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;tn(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=qt.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(zr);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),qt.free(x);return}qt.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}Ut.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=qt.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),qt.free(x),!(a instanceof Or)&&(a=a.locationObject.ga(zr),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 an,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new an,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new an,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 Ls(a){gr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Ls.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Ls.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+ti(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},Ls.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Ls.prototype.commit=function(){},Ls.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Ut.Object.defineProperties(Ls.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)}}}),Ls.prototype.getOtherVertex=Ls.prototype.Ax,Ls.className="LayoutEdge";function ha(a){lo.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new cn(NaN,NaN).freeze(),this.tf=new cn(10,10).freeze(),this.Jb=hg,this.Rb=rv,this.nd=cg,this.hd=hS,a&&Object.assign(this,a)}Zt(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:Mt("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=qt.alloc(),ye=Math.max(this.cellSize.width,1);if(!isFinite(ye))for(var Le=ye=0;Le<E.length;Le++){var ze=this.ni(E[Le],ge);ye=Math.max(ye,ze.width)}if(ye=Math.max(ye+ae,1),Le=Math.max(this.cellSize.height,1),!isFinite(Le))for(ze=Le=0;ze<E.length;ze++){var We=this.ni(E[ze],ge);Le=Math.max(Le,We.height)}Le=Math.max(Le+ue,1),ze=this.arrangement;for(var Qe=We=this.arrangementOrigin.x,it=this.arrangementOrigin.y,Tt=0,wt=0,jt=0;jt<E.length;jt++){var Ot=E[jt],Bt=this.ni(Ot,ge),It=Math.ceil((Bt.width+ae)/ye)*ye,Xt=Math.ceil((Bt.height+ue)/Le)*Le;switch(ze){case Rl:var In=Math.abs(Qe-Bt.width);break;default:In=Qe+Bt.width}switch((0<ee&&Tt>ee-1||0<ne&&0<Tt&&In-We>ne)&&(b.push(new qt(0,it,ne+ae,wt)),Tt=0,Qe=We,it+=wt,wt=0),wt=Math.max(wt,Xt),ze){case Rl:Bt=-Bt.width;break;default:Bt=0}switch(Ot.moveTo(Qe+Bt,it),ze){case Rl:Qe-=It;break;default:Qe+=It}Tt++}b.push(new qt(0,it,ne+ae,wt)),qt.free(ge);break;case hg:for(ue=ne,ye=ee,Le=y,ze=x,ne=qt.alloc(),We=Math.max(this.cellSize.width,1),ee=it=ge=0,ae=st.alloc(),Qe=0;Qe<E.length;Qe++)wt=E[Qe],Tt=this.ni(wt,ne),wt=bh(wt,wt.locationObject,wt.locationSpot,ae),ge=Math.max(ge,wt.x),it=Math.max(it,Tt.width-wt.x),ee=Math.max(ee,wt.y);switch(Qe=this.arrangement,Qe){case Rl:ge+=Le;break;default:it+=Le}We=isFinite(We)?Math.max(We+Le,1):Math.max(ge+it,1);var nr=wt=this.arrangementOrigin.x;for(jt=this.arrangementOrigin.y,it=0,ue>=ge&&(ue-=ge),ge=Ot=0,It=Math.max(this.cellSize.height,1),Bt=ee=0,Xt=!0,Tt=st.alloc(),In=0;In<E.length;In++){var $n=E[In],bn=this.ni($n,ne),hn=bh($n,$n.locationObject,$n.locationSpot,ae);if(0<it)switch(Qe){case Rl:nr=(nr-wt-(bn.width-hn.x))/We,nr=zt.$(Math.round(nr),nr)?Math.round(nr):Math.floor(nr),nr=nr*We+wt;break;default:nr=(nr-wt+hn.x)/We,nr=zt.$(Math.round(nr),nr)?Math.round(nr):Math.ceil(nr),nr=nr*We+wt}else switch(Qe){case Rl:Ot=nr+hn.x+bn.width;break;default:Ot=nr-hn.x}switch(Qe){case Rl:var jr=-(nr+hn.x)+Ot;break;default:jr=nr+bn.width-hn.x-Ot}if(0<ye&&it>ye-1||0<ue&&0<it&&jr>ue){for(b.push(new qt(0,Xt?jt-ee:jt,ue+Le,Bt+ee+ze)),nr=0;nr<it&&In!==it;nr++){jr=E[In-it+nr];var Lr=bh(jr,jr.locationObject,jr.locationSpot,Tt);jr.moveTo(jr.position.x,jr.position.y+ee-Lr.y)}Bt+=ze,jt=Xt?jt+Bt:jt+(Bt+ee),it=Bt=ee=0,nr=wt,Xt=!1}switch(nr===wt&&(ge=Qe===Rl?Math.max(ge,bn.width-hn.x):Math.min(ge,-hn.x)),ee=Math.max(ee,hn.y),Bt=Math.max(Bt,bn.height-hn.y),isFinite(It)&&(Bt=Math.max(Bt,Math.max(bn.height,It)-hn.y)),Xt?$n.moveTo(nr-hn.x,jt-hn.y):$n.moveTo(nr-hn.x,jt),Qe){case Rl:nr-=hn.x+Le;break;default:nr+=bn.width-hn.x+Le}it++}if(b.push(new qt(0,jt,ue+Le,(Xt?Bt:Bt+ee)+ze)),E.length!==it)for(ue=0;ue<it;ue++)ye=E[E.length-it+ue],Le=bh(ye,ye.locationObject,ye.locationSpot,ae),ye.moveTo(ye.position.x,ye.position.y+ee-Le.y);if(st.free(ae),st.free(Tt),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);qt.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}Ut.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 pn(ha,"Position",0),hg=new pn(ha,"Location",1),rv=new pn(ha,"LeftToRight",2),Rl=new pn(ha,"RightToLeft",3),ay=new pn(ha,"Forward",4),iv=new pn(ha,"Reverse",5),cg=new pn(ha,"Ascending",6),ov=new pn(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 Bi(){this.On=new an,this.Dn=new an,this.Pa=new an,this.cf=new $t,this.bf=new $t,this.aj=new $t,this.H=null,this.tp=!1}et=Bi.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 Pn?this.Dn.add(a):a instanceof xi||this.Pa.add(a);y=a.data,y===null||a instanceof xi||(a instanceof Pn?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 Pn?this.Dn.remove(a):a instanceof xi||this.Pa.remove(a);y=a.data,y===null||a instanceof xi||(a instanceof Pn?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)&&Mt('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||Mt('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 Pn||Mt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Kn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Kn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Kn(),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]);Jn(y),Jn(x),Jn(a)}},Bi.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Bi.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)}}Bi.prototype.insertLink=function(){return null},Bi.prototype.resolveReferencesForData=function(){},Bi.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,zn('No Group template found for category "'+x+'"'),zn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,zn('No Node template found for category "'+x+'"'),zn(" Using default node template")),y=a.ny))),y}Bi.prototype.getLinkCategoryForData=function(){return""},Bi.prototype.setLinkCategoryForData=function(){},Bi.prototype.setFromNodeForLink=function(){},Bi.prototype.setToNodeForLink=function(){},Bi.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,zn('No Link template found for category "'+a+'"'),zn(" Using default link template")),x=y.my)),x},Bi.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Bi.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Bi.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Ep(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Bi.prototype.unresolveReferencesForPart=function(){},Bi.prototype.removeDataForLink=function(){},Bi.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Bi.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)},Bi.prototype.findLinkForKey=function(){return null},et=Bi.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 an;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(tn(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 an;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(tn(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(Nn(ee)){if(!Nn(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(tn(y)&&tn(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}Bi.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"&&tn(ne)&&cS(this,ne),y.isModified=!0}else if(x===Eo){var ae=a.oldValue;b==="nodeDataArray"&&tn(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,Le=ye?a.newParam:a.oldParam,ze=ye?a.newValue:a.oldValue,We=this.aj.I(a.object);if(Array.isArray(We))for(a=0;a<We.length;a++){var Qe=We[a];if(ye)Cm(Qe,ze,Le,!0);else if(!(0>Le)){var it=Le+Vp(Qe);Qe.pc(it,!0),w0(Qe,it,Le)}}y.isModified=!0}}finally{y.aa=!0}}}}},Bi.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)},Bi.prototype.rp=function(){for(var a=this.H.model,y=new an,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()},Bi.prototype.refreshDataBoundLinks=function(){},Bi.prototype.updateRelationshipsFromData=function(){},Bi.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=Kn()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Jn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(Nn(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(Nn(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}}}}Bi.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new $t;if(Nn(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 an;for(var ee=new $t,ne=b.iterator;ne.next();){var ae=ne.value;if(ae instanceof Pn)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 $t;b.each(function(Le){Le.key.data!==null&&ye.add(Le.key.data,Le.value.data)}),x(ye,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function av(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var ee=a.copyPartData(y,x);if(!(ee instanceof yr))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 Pn||ne===null||(ne.containingGroup=ee)}else if(y instanceof Pn&&ee instanceof Pn)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}Bi.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Pn||(b=E.copyNodeData(b),tn(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 Pn||(E=y.copyNodeData(b)),tn(E)&&(x.data=E)));return x},Ut.Object.defineProperties(Bi.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}}}),Bi.prototype.updateAllRelationshipsFromData=Bi.prototype.rp,Bi.prototype.findLinksByExample=Bi.prototype.ls,Bi.prototype.findNodesByExample=Bi.prototype.ms,Bi.prototype.findLinkForData=Bi.prototype.Kc,Bi.prototype.findNodeForData=Bi.prototype.ii,Bi.prototype.findPartForData=Bi.prototype.Lc,Bi.prototype.findNodeForKey=Bi.prototype.Vb,Bi.prototype.removeModeledPart=Bi.prototype.ip,Bi.prototype.removeModeledParts=Bi.prototype.Gs,Bi.prototype.rebuildParts=Bi.prototype.Wd;var pS=!1,gS=!1,mS=!1;Bi.className="PartManager";function qo(a){Bi.apply(this,arguments)}Zt(qo,Bi),qo.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},qo.prototype.addModeledParts=function(a){for(Bi.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=Bi.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(Bi.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 Le=this.Kc(a.object);if(Le!==null){var ze=a.newValue;typeof ze=="string"&&(Le.toPortId=ze)}}else if(E==="nodeGroupKey"){var We=this.Lc(a.object);if(We!==null){var Qe=a.newValue;if(Qe!==void 0){var it=this.Vb(Qe);it instanceof Or?We.containingGroup=it:We.containingGroup=null}else We.containingGroup=null}}else if(E==="linkLabelKeys"){var Tt=this.Kc(a.object);if(Tt!==null){var wt=a.oldValue,jt=a.newValue;Array.isArray(wt)&&wt.forEach(function(hn){0<=jt.indexOf(hn)||(hn=y.Vb(hn),hn!==null&&(hn.labeledLink=null))}),Array.isArray(jt)&&jt.forEach(function(hn){hn=y.Vb(hn),hn!==null&&(hn.labeledLink=Tt)})}}else if(E==="linkCategory"){var Ot=this.Kc(a.object),Bt=a.newValue;Ot!==null&&typeof Bt=="string"&&(Ot.category=Bt)}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 Xt=this.Kc(a.object),In=this.Vb(It);Xt!==null&&In!==null&&(In.labeledLink=Xt)}x.isModified=!0}else if(b===Eo){var nr=a.oldValue;if(E==="linkDataArray"&&typeof nr=="object"&&nr!==null)this.ip(nr);else if(E==="linkLabelKeys"&&lc(nr)){var $n=this.Vb(nr);$n!==null&&($n.labeledLink=null)}x.isModified=!0}}else if(b===ro){var bn=a.propertyName;a.object!==x.model||bn!=="linkFromKeyProperty"&&bn!=="linkToKeyProperty"&&bn!=="linkFromPortIdProperty"&&bn!=="linkToPortIdProperty"&&bn!=="linkLabelKeysProperty"&&bn!=="nodeIsGroupProperty"&&bn!=="nodeGroupKeyProperty"&&bn!=="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 an,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 Pn){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 an().addAll(y);var ne=new an;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 xi)&&(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=Bi.prototype.copyPartData.call(this,a,y);if(a instanceof Pn)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 Pn){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(){Bi.apply(this,arguments),this.Sg=null}Zt(el,Bi);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(Bi.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 Le=a.propertyName;a.object===y.model&&Le==="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){Bi.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 an,this.il=new an,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 $t,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 $t,this.Lt=new on,this.Wg=!1,this.o=null,this.undoManager=new ho,a!==void 0&&(Nn(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)+":"+Wr(E)}}return y},hr.prototype.xA=function(a){a.change!==Ea&&Mt("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 an,ee=new an,ne=new an,ae=this.vh;a.changes.each(function(Le){Le.model===x&&(Le.modelChange==="nodeDataArray"?Le.change===wo?E.add(Le.newValue):Le.change===Eo&&ne.add(Le.oldValue):x.lb(Le.object)?ee.add(Le.object):Le.change!==ro||x.modelData!==Le.object&&Le.propertyName!=="modelData"?Le.object!==null&&(ae&&ae.contains(Le.object)?ae.get(Le.object).each(function(ze){x.lb(ze)&&ee.add(ze)}):Le.object instanceof hr||x.ri()&&x.Jc(Le.object)||bS(x,Le.object).each(function(ze){ee.add(ze)})):b=!0)});var ue=this.il;ue.clear(),E.each(function(Le){ue.add(x.wa(Le)),y||ee.add(Le)});var ge=this.kl;ge.clear(),ne.each(function(Le){ge.add(x.wa(Le)),y&&ee.add(Le)}),a=x.cloneDeep(ee.Fa());var ye=null;return b&&(ye===null&&(ye={}),ye.modelData=this.cloneDeep(this.modelData)),0<ue.count&&(ye===null&&(ye={}),y?ye.removedNodeKeys=ue.Fa():ye.insertedNodeKeys=ue.Fa()),0<a.length&&(ye===null&&(ye={}),ye.modifiedNodeData=a),0<ge.count&&(ye===null&&(ye={}),y?ye.insertedNodeKeys=ge.Fa():ye.removedNodeKeys=ge.Fa()),ge.clear(),ue.clear(),ye},hr.prototype.cloneDeep=function(a){return Gd(this,a,!0)};function Gd(a,y,x,b,E,ee){function ne(Le,ze){ae?(Le.__gohashid===void 0&&ee.push(Le),b.set(Le,ze)):(Le=Ni++,b.set(Le,ze),E.set(Le,y))}if(!tn(y))return y;ee||(ee=[]);var ae=Object.isExtensible(y);if(b||(b=new $t),ae){var ue=b.get(y);if(ue)return ue}else for(E||(E=new $t),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 cn||y instanceof qt||y instanceof Ir||y instanceof ar)ue=y.copy(),ne(y,ue);else{if(y instanceof Fi||y instanceof wn||y instanceof pn)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 an)ue=new an().addAll(Gd(a,y.Fa(),!1,b,E,ee)),ne(y,ue);else if(y instanceof $t)ue=new $t().addAll(Gd(a,y.Fa(),!1,b,E,ee)),ne(y,ue);else if(y instanceof Date)ue=new Date(y.getTime()),ne(y,ue);else if(y instanceof RegExp)ue=new RegExp(y),ne(y,ue),ue.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ue=y.copy(),ne(y,ue);else for(ye in ue={},ne(y,ue),y)ye!=="__gohashid"&&(ue[ye]=Gd(a,y[ye],!1,b,E,ee))}return x&&ee.forEach(function(Le){delete Le.__gohashid}),ue}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,tn(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,Nn(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 an,ne.add(ee),b.add(E,ne)):ne.add(ee)}}var b=a.vh;b===null&&(b=new $t,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 an,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(tn(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 an,ee=new an,ne=new an,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(Le){x.lb(Le)&&ee.add(Le)}):ye.object instanceof hr||x.ri()&&x.Jc(ye.object)||bS(x,ye.object).each(function(Le){ee.add(Le)})):b=!0)});var ue=this.il;ue.clear(),E.each(function(ye){ue.add(x.wa(ye)),y||ee.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(x.wa(ye)),y&&ee.add(ye)}),a="",b&&(a+=`,
|
|
"modelData": `+hy(this,this.modelData)),0<ue.count&&(a+=(y?this.Yv:this.Wv)+sc(this,ue.Fa(),!0)),0<ee.count&&(a+=this.jy+sc(this,ee.Fa(),!0)),0<ge.count&&(a+=(y?this.Wv:this.Yv)+sc(this,ge.Fa(),!0)),ge.clear(),ue.clear(),a},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)&&Mt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new $t;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&&Mt("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=xn.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Mt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Mt("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(Nn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(tn(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Mt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(tn(a)){for(y in a)if(x=a[y],tn(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()):Nn(a)?sc(this,a):tn(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 rr;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 cn)y={class:"go.Size",width:qa(x.width),height:qa(x.height)};else if(x instanceof qt)y={class:"go.Rect",x:qa(x.x),y:qa(x.y),width:qa(x.width),height:qa(x.height)};else if(x instanceof Ir)y={class:"go.Margin",top:qa(x.top),right:qa(x.right),bottom:qa(x.bottom),left:qa(x.left)};else if(x instanceof ar)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 Fi){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 wn?(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(li)||(y.spot1=x.spot1),x.spot2.D(Ii)||(y.spot2=x.spot2),x.type===wn.o&&(y.path=wn.ia(x))):x instanceof pn&&(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 cn(es(a.width),es(a.height));else if(y==="Rect")x=new qt(es(a.x),es(a.y),es(a.width),es(a.height));else if(y==="Margin")x=new Ir(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 ar(es(a.x),es(a.y),es(a.offsetX),es(a.offsetY));else if(y==="Brush"){if(x=new Fi,x.type=Xn(Fi,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof ar&&(x.start=a.start),a.end instanceof ar&&(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,tn(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=wn.parse(a.path):x=new wn,x.type=Xn(wn,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 ar&&(x.spot1=a.spot1),a.spot2 instanceof ar&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=Xn(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){_o(this,"",a,y,x,b,E,ee,ne)},et.g=function(a,y,x,b,E){_o(this,"",ro,a,this,y,x,b,E)},et.Fs=function(a,y,x,b,E,ee){_o(this,"",ro,y,a,x,b,E,ee)};function _o(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,tn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&An(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&Ln(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!Nn(b)&&a.propertyName&&(b=Co(a.object,a.propertyName)),Nn(b)&&typeof x=="number"&&(a=a.newValue,y?An(b,x):Ln(b,x,a))):Mt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Eo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,tn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&Ln(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&An(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!Nn(b)&&a.propertyName&&(b=Co(a.object,a.propertyName)),Nn(b)&&typeof x=="number"&&(a=a.oldValue,y?Ln(b,x,a):An(b,x))):Mt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ea&&Mt("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=""),_o(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;Mt("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),_o(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&&Mt("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&&(Vr(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&&Mt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,Ln(a.Tc,b,y)),_o(a,"nodeDataArray",wo,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}et.Fy=function(a){if(Nn(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;An(a.Tc,b)}_o(a,"nodeDataArray",Eo,"nodeDataArray",a,y,null,b,null),a.qp(y)}et.nA=function(a){if(Nn(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&&Nn(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 an&&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 an,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 an&&(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 an?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),tn(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&&tn(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 cn||y instanceof qt||y instanceof ar||y instanceof Ir?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,zn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),zn(" 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),Ln(a,y,x),_o(this,"",wo,"",a,null,x,null,y)},et.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Mt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];An(a,y),_o(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;Mt("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),_o(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]:xn.go!==void 0&&xn.go[a]?xn.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){}}Ut.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===""&&Mt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Mt("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];tn(E)||Mt("Model.nodeDataArray must only contain Objects, not: "+E),Vr(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(_o(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=xn.JSON.parse(a)}catch(ee){}else typeof a=="object"?x=a:Mt("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=xn[b])),typeof E=="function"&&(a=new E)}catch(ee){}a===null||a instanceof hr?y=a:Mt("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=Fi,kl.ChangedEvent=ao,kl.Geometry=wn,kl.Margin=Ir,kl.Panel=yn,kl.Point=st,kl.Rect=qt,kl.Size=cn,kl.Spot=ar,kl.Transaction=Uo,kl.UndoManager=ho;function Lo(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=LS,this.wk=null):(this.el=pg,this.wk=b),this.st=new an}Lo.prototype.copy=function(){var a=new Lo;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},et=Lo.prototype,et.qb=function(a){a.classType===Lo&&(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==="")zn("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 Le=ee(ne,y,ue);ue!==null?ue.setDataProperty(y,x,Le):io(y,x,Le)}else{var ze=ee(ne,y,ue);if(ze!==void 0&&ue!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var We=b.itemIndex,Qe=b.panel.itemArray;ue.ov(Qe,We),ue.ts(Qe,We,ze)}}}catch(it){}}finally{this.st.remove(a)}}}},Ut.Object.defineProperties(Lo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Wt(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Wt(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Wt(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Wt(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Wt(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Wt(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Wt(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Wt(this),this.el=a}}}),Lo.prototype.updateSource=Lo.prototype.sp,Lo.prototype.updateTarget=Lo.prototype.Mv,Lo.prototype.ofModel=Lo.prototype.dA,Lo.prototype.ofObject=Lo.prototype.cp,Lo.prototype.makeTwoWay=Lo.prototype.Kx;var Ox="Binding",LS=new pn(Lo,"OneWay",1),pg=new pn(Lo,"TwoWay",2);Lo.className="Binding",Lo.parseEnum=function(a,y){return function(x){return x=Xn(a,x),x===null?y:x}},Lo.toString=Wr,Lo.OneWay=LS,Lo.TwoWay=pg;function pi(a,y,x){hr.call(this),this.Vv=`,
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
"removedLinkKeys": `,this.md=[],this.$f=new an,this.wb=new $t,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&&(Nn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Zt(pi,hr),pi.constructGraphLinksModel=hr.constructGraphLinksModel,pi.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=pi.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)+":"+Wr(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===""&&Mt("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 an,ee=new an,ne=new an,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(Le){b.Jc(Le)&&ee.add(Le)}):ye.object instanceof hr||b.lb(ye.object)||MS(b,ye.object).each(function(Le){ee.add(Le)})))});var ue=this.il;ue.clear(),E.each(function(ye){ue.add(b.Ac(ye)),y||ee.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(b.Ac(ye)),y&&ee.add(ye)}),a=b.cloneDeep(ee.Fa()),0<ue.count&&(x===null&&(x={}),y?x.removedLinkKeys=ue.Fa():x.insertedLinkKeys=ue.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<ge.count&&(x===null&&(x={}),y?x.insertedLinkKeys=ge.Fa():x.removedLinkKeys=ge.Fa()),ge.clear(),ue.clear(),x},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 MS(a,y){for(var x=new an,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===""&&Mt("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 an,ee=new an,ne=new an,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(Le){b.Jc(Le)&&ee.add(Le)}):ye.object instanceof hr||b.lb(ye.object)||MS(b,ye.object).each(function(Le){ee.add(Le)})))});var ue=this.il;ue.clear(),E.each(function(ye){ue.add(b.Ac(ye)),y||ee.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(b.Ac(ye)),y&&ee.add(ye)}),a=x,0<ue.count&&(a+=(y?this.Xv:this.Vv)+sc(this,ue.Fa(),!0)),0<ee.count&&(a+=this.iy+sc(this,ee.Fa(),!0)),0<ge.count&&(a+=(y?this.Vv:this.Xv)+sc(this,ge.Fa(),!0)),ge.clear(),ue.clear(),a},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)&&Mt("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)},pi.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,tn(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,tn(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=pi.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;Mt((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),_o(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),_o(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)}_o(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),_o(this,"linkLabelKeys",wo,x,a,null,y,null,E)))}else Mt(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),_o(this,"linkLabelKeys",Eo,x,a,y,null,E,null)))}else b!==void 0&&Mt(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;Mt("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),_o(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&&Mt("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&&(Vr(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&&Mt("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)),_o(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(_o(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===""&&Mt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Nn(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),tn(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;Mt("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),_o(this,"nodeGroupKey",ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else io(a,x,y)}},pi.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)},pi.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=pi.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),_o(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),_o(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,_o(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),_o(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=Kn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;_o(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,_o(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,_o(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&&(_o(this,"linkLabelKeys",wo,ne,b,a,a,ae,ae),x.push(b))}for(y=0;y<x.length;y++)_l(this,a,x[y]);Jn(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;Mt("getCategoryForLinkData found a non-string category for "+a+": "+y)},pi.prototype.getLinkCategoryForData=function(a){return this.ps(a)},pi.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),_o(this,"linkCategory",ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else io(a,x,y)}},pi.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},et=pi.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},Ut.Object.defineProperties(pi.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];tn(E)||Mt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),Vr(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 an,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,_o(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"}}}),pi.prototype.setCategoryForLinkData=pi.prototype.lp,pi.prototype.getCategoryForLinkData=pi.prototype.ps,pi.prototype.assignAllDataProperties=pi.prototype.Do,pi.prototype.setGroupKeyForNodeData=pi.prototype.mp,pi.prototype.getGroupKeyForNodeData=pi.prototype.lh,pi.prototype.isGroupForNodeData=pi.prototype.Yu,pi.prototype.copyLinkData=pi.prototype.Jo,pi.prototype.mergeLinkDataArray=pi.prototype.Zz,pi.prototype.removeLinkDataCollection=pi.prototype.lA,pi.prototype.removeLinkData=pi.prototype.bm,pi.prototype.addLinkDataCollection=pi.prototype.Ey,pi.prototype.addLinkData=pi.prototype.fi,pi.prototype.containsLinkData=pi.prototype.Jc,pi.prototype.makeLinkDataKeyUnique=pi.prototype.Bs,pi.prototype.findLinkDataForKey=pi.prototype.jh,pi.prototype.setKeyForLinkData=pi.prototype.Ks,pi.prototype.getKeyForLinkData=pi.prototype.Ac,pi.prototype.removeLabelKeyForLinkData=pi.prototype.Qx,pi.prototype.addLabelKeyForLinkData=pi.prototype.Bu,pi.prototype.setLabelKeysForLinkData=pi.prototype.Ls,pi.prototype.getLabelKeysForLinkData=pi.prototype.Ef,pi.prototype.setToPortIdForLinkData=pi.prototype.Cv,pi.prototype.getToPortIdForLinkData=pi.prototype.Cx,pi.prototype.setFromPortIdForLinkData=pi.prototype.xv,pi.prototype.getFromPortIdForLinkData=pi.prototype.zx,pi.prototype.setToKeyForLinkData=pi.prototype.Bv,pi.prototype.getToKeyForLinkData=pi.prototype.Bx,pi.prototype.setFromKeyForLinkData=pi.prototype.wv,pi.prototype.getFromKeyForLinkData=pi.prototype.yx,pi.prototype.clear=pi.prototype.clear;var cv=Object.freeze([]);pi.className="GraphLinksModel",kl.GraphLinksModel=pi,hr.constructGraphLinksModel=hr.constructGraphLinksModel=function(){return new pi},hr.initDiagramModel=cy=function(){return new pi};function ts(a,y){hr.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Nn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Zt(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)+":"+Wr(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&&Mt("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;Mt("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),_o(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:(Mt("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),_o(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),_o(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=Kn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;_o(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]);Jn(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},Ut.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=Kd,this.hd=oy,this.tf=6,this.Nn=yv,a&&Object.assign(this,a)}Zt(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===Kd?this.sorting=a:a===qc||a===Wd||a===ns||a===hc?this.direction=a:a===Th||a===uc||a===Tl||a===Ll?this.arrangement=a:(a===zf||a===yv)&&(this.nodeDiameterFormula=a):lo.prototype.qb.call(this,a)},fo.prototype.createNetwork=function(){return new Vd(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 Le=this.startAngle;isFinite(Le)||(Le=0);var ze=this.sweepAngle;if((!isFinite(ze)||360<ze||1>ze)&&(ze=360),y=this.spacing,isFinite(y)||(y=NaN),ae===Ll&&ue===zf?ae=Tl:ae===Ll&&ue!==zf&&(ae=this.arrangement),(this.direction===qc||this.direction===Wd)&&this.sorting!==Kd){for(ue=0;!(ue>=b.length)&&(a.add(b.M(ue)),!(ue+1>=b.length));ue+=2)x.add(b.M(ue+1));this.direction===qc?(this.arrangement===Ll&&a.reverse(),b=new on,b.addAll(a),b.addAll(x)):(this.arrangement===Ll&&x.reverse(),b=new on,b.addAll(x),b.addAll(a))}ue=b.length;for(var We=ee=E=0;We<b.length;We++){var Qe=Le+ze*ee*(this.direction===ns?1:-1)/ue,it=b.M(We).diameter;isNaN(it)&&(it=cc(b.M(We),Qe)),360>ze&&(We===0||We===b.length-1)&&(it/=2),E+=it,ee++}if(isNaN(ge)||ae===Ll){if(isNaN(y)&&(y=6),ae!==Tl&&ae!==Ll){for(ee=-1/0,ne=0;ne<ue;ne++)We=b.M(ne),E=b.M(ne===ue-1?0:ne+1),isNaN(We.diameter)&&cc(We,0),isNaN(E.diameter)&&cc(E,0),ee=Math.max(ee,(We.diameter+E.diameter)/2);ne=ee+y,ae===Th?ge=(ee+y)/(2*Math.PI/ue):ge=fv(this,ne*(360<=ze?ue:ue-1),ye,Le*Math.PI/180,ze*Math.PI/180)}else ge=fv(this,E+(360<=ze?ue:ue-1)*(ae!==Ll?y:1.6*y),ye,Le*Math.PI/180,ze*Math.PI/180);ee=ge*ye}else if(ee=ge*ye,We=py(this,ge,ee,Le*Math.PI/180,ze*Math.PI/180),isNaN(y))(ae===Tl||ae===Ll)&&(y=(We-E)/(360<=ze?ue:ue-1));else if(ae===Tl||ae===Ll)We=(We-E)/(360<=ze?ue:ue-1),We<y?(ge=fv(this,E+y*(360<=ze?ue:ue-1),ye,Le*Math.PI/180,ze*Math.PI/180),ee=ge*ye):y=We;else{for(ne=-1/0,E=0;E<ue;E++)Qe=b.M(E),it=b.M(E===ue-1?0:E+1),isNaN(Qe.diameter)&&cc(Qe,0),isNaN(it.diameter)&&cc(it,0),ne=Math.max(ne,(Qe.diameter+it.diameter)/2);ne+=y,E=fv(this,ne*(360<=ze?ue:ue-1),ye,Le*Math.PI/180,ze*Math.PI/180),E>ge?(ge=E,ee=ge*ye):ne=We/(360<=ze?ue:ue-1)}if(this.kw=ae,this.lc=ge,this.Zm=ye,this.lw=Le,this.Wp=ze,this.Ti=y,this.me=ee,this.Jp=ne,y=b,b=this.kw,ae=this.lc,ge=this.lw,ye=this.Wp,Le=this.Ti,ze=this.me,ue=this.Jp,this.direction!==qc&&this.direction!==Wd||b!==Ll)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,Le+(y+ue)/2)/Math.PI;break;case Th:ne=ye/y.length}if(this.direction===qc){switch(b){case uc:vg(this,a,ge,hc);break;case 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 Ll: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),Le=ne*Math.tan(ge)/a;Le=Math.sqrt((ne*ne+a*a*Le*Le)/(1+Le*Le)),ye.centerX=Le*Math.cos(ge),ye.centerY=Le*Math.sin(ge),ye.actualAngle=180*ge/Math.PI}}function mg(a,y,x,b){var E=a.lc,ee=a.me,ne=a.Ti;x=x*Math.PI/180;for(var ae=y.length,ue=0;ue<ae;ue++){var ge=y.M(ue),ye=y.M(ue===ae-1?0:ue+1),Le=ee*Math.sin(x);ge.centerX=E*Math.cos(x),ge.centerY=Le,ge.actualAngle=180*x/Math.PI,isNaN(ge.diameter)&&cc(ge,0),isNaN(ye.diameter)&&cc(ye,0),ge=dv(a,E,ee,b===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 Le=0;Le<ye.length&&(ye[Le].centerX=ue,ye[Le].centerY=ge,!(Le>=ye.length-1));Le++)BS(a,ue,ge,ye,Le,E,ee)||RS(a,ue,ge,ye,Le,E,ee),ue=ee.x,ge=ee.y;if(st.free(ee),a.mj++,!(23<a.mj)){ue=ye[0].centerX,ge=ye[0].centerY,ee=ye[ye.length-1].centerX,Le=ye[ye.length-1].centerY;var ze=Math.abs(ue-ee)-((ye[0].width+ye[ye.length-1].width)/2+ne),We=Math.abs(ge-Le)-((ye[0].height+ye[ye.length-1].height)/2+ne);ne=0,1>Math.abs(We)?Math.abs(ue-ee)<(ye[0].width+ye[ye.length-1].width)/2&&(ne=0):ne=0<We?We:1>Math.abs(ze)?0:ze,ue=Math.abs(ee)>Math.abs(Le)?0<ee!=ge>Le:0<Le!=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(),Le=y.Fa(),ze=0;ze<Le.length&&(Le[ze].centerX=ue,Le[ze].centerY=ge,!(ze>=Le.length-1));ze++)BS(a,ue,ge,Le,ze,E,ye)||RS(a,ue,ge,Le,ze,E,ye),ue=ye.x,ge=ye.y;if(st.free(ye),a.mj++,!(23<a.mj)){if(ue=Math.atan2(ge,ue),ue=E===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<Le.length;ue++)ne.mk[ue]=Le[ue].bounds.x,ne.tm[ue]=Le[ue].bounds.y;1<Math.abs(ee)&&(a.lc=8>a.mj?a.lc-ee/(2*Math.PI):a.lc-(0<ee?1.7:-2.3),a.me=a.lc*ae,DS(a,y,x,b,E))}}function BS(a,y,x,b,E,ee,ne){var ae=a.lc,ue=a.me,ge=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var ye=!1;if(0<=x!=(ee===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 Kd:return this.ak(Fx(a));default:Mt("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 Le=ye=1/0,ze=-1,We=[],Qe=0;Qe<x.length;Qe++)0>y[x[Qe]].indexOf(x[Qe===x.length-1?0:Qe+1])&&We.push(Qe===x.length-1?0:Qe+1);if(We.length===0)for(Qe=0;Qe<x.length;Qe++)We.push(Qe);for(Qe=0;Qe<We.length;Qe++){for(var it=We[Qe],Tt=y[ge],wt=0,jt=0;jt<ne.length;jt++){var Ot=ee[ne[jt]],Bt=ee[ae[jt]];if(Ot<Bt){var It=Ot;Ot=Bt}else It=Bt;if(It<it&&it<=Ot)for(Bt=0;Bt<Tt.length;Bt++){var Xt=Tt[Bt];0>x.indexOf(Xt)||It<ee[Xt]&&ee[Xt]<Ot||It===ee[Xt]||Ot===ee[Xt]||wt++}else for(Bt=0;Bt<Tt.length;Bt++)Xt=Tt[Bt],0>x.indexOf(Xt)||It<ee[Xt]&&ee[Xt]<Ot&&It!==ee[Xt]&&Ot!==ee[Xt]&&wt++}for(Tt=wt,jt=wt=0;jt<y[ge].length;jt++)It=x.indexOf(y[ge][jt]),0<=It&&(It=Math.abs(it-(It>=it?It+1:It)),wt+=It<x.length+1-It?It:x.length+1-It);for(jt=0;jt<ne.length;jt++)It=ee[ne[jt]],Ot=ee[ae[jt]],It>=it&&It++,Ot>=it&&Ot++,It>Ot&&(Bt=Ot,Ot=It,It=Bt),Ot-It<(x.length+2)/2==(It<it&&it<=Ot)&&wt++;(Tt<ye||Tt===ye&&wt<Le)&&(ye=Tt,Le=wt,ze=it)}for(x.splice(ze,0,ge),ye=0;ye<x.length;ye++)ee[x[ye]]=ye;for(ye=0;ye<y[ge].length;ye++)Le=y[ge][ye],0<=x.indexOf(Le)&&(ne.push(ge),ae.push(Le))}ue++}}for(ne=x.length;;){for(ee=!0,ae=0;ae<b.length;ae++)if(ue=b[ae],ge=y[ue][0],ye=x.indexOf(ge),0<=ye){for(ze=Le=0;ze<y[ge].length;ze++)We=x.indexOf(y[ge][ze]),0>We||We===ye||(Qe=We>ye?We-ye:ye-We,Le+=We<ye!=Qe>ne-Qe?1:-1);x.splice(0>Le?ye:ye+1,0,ue),b.splice(ae,1),ae--}else ee=!1;if(ee)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},Ut.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!==Ll&&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!==Kd||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf!==a&&(this.tf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.Nn},set:function(a){this.Nn===a||a!==yv&&a!==zf||(this.Nn=a,this.C())}},actualXRadius:{get:function(){return this.lc}},actualYRadius:{get:function(){return this.me}},actualSpacing:{get:function(){return this.Ti}},actualCenter:{get:function(){return this.Zv}}});var Tl=new pn(fo,"ConstantSpacing",0),uc=new pn(fo,"ConstantDistance",1),Th=new pn(fo,"ConstantAngle",2),Ll=new pn(fo,"Packed",3),ns=new pn(fo,"Clockwise",4),hc=new pn(fo,"Counterclockwise",5),qc=new pn(fo,"BidirectionalLeft",6),Wd=new pn(fo,"BidirectionalRight",7),pv=new pn(fo,"Forwards",8),gv=new pn(fo,"Reverse",9),mv=new pn(fo,"Ascending",10),vv=new pn(fo,"Descending",11),Kd=new pn(fo,"Optimized",12),yv=new pn(fo,"Pythagorean",13),zf=new pn(fo,"Circular",14);fo.className="CircularLayout",fo.ConstantSpacing=Tl,fo.ConstantDistance=uc,fo.ConstantAngle=Th,fo.Packed=Ll,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=Kd,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 Vd(a){Xi.call(this,a)}Zt(Vd,Xi),Vd.prototype.createVertex=function(){return new Sg(this)},Vd.prototype.createEdge=function(){return new Sv(this)},Vd.className="CircularNetwork";function Sg(a){Wo.call(this,a),this.u=this.Si=NaN}Zt(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===Ll)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}Ut.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){Ls.call(this,a)}Zt(Sv,Ls),Sv.className="CircularEdge";function xa(a){lo.call(this),this.ah=null,this.An=0,this.$d=new cn(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)}Zt(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=Kn(),ye=0;ye<ae+y.vertexes.count+2;ye++)ge[ye]=null;ae=0,ne.reset();for(var Le=qt.alloc();ne.next();)if(ye=ne.value,this.computeBounds(ye,Le),ue)ue=!1,E=Le.x+Le.width/2,ee=Le.y+Le.height/2,ge[0]=new st(Le.x+Le.width+b.width,Le.y),ge[1]=new st(Le.x,Le.y+Le.height+b.height),ae=2;else{var ze=_S(ge,ae,E,ee,Le.width,Le.height,b),We=ge[ze],Qe=new st(We.x+Le.width+b.width,We.y),it=new st(We.x,We.y+Le.height+b.height);for(ze+1<ae&&ge.splice(ze+1,0,null),ge[ze]=Qe,ge[ze+1]=it,ae++,ze=We.x-Le.x,We=We.y-Le.y,ye=ye.vertexes.iterator;ye.next();)Qe=ye.value,Qe.centerX+=ze,Qe.centerY+=We}for(qt.free(Le),ye=y.vertexes.iterator;ye.next();)ne=ye.value,ze=ne.bounds,2>ae?(E=ze.x+ze.width/2,ee=ze.y+ze.height/2,ge[0]=new st(ze.x+ze.width+b.width,ze.y),ge[1]=new st(ze.x,ze.y+ze.height+b.height),ae=2):(ue=_S(ge,ae,E,ee,ze.width,ze.height,b),Le=ge[ue],We=new st(Le.x+ze.width+b.width,Le.y),ze=new st(Le.x,Le.y+ze.height+b.height),ue+1<ae&&ge.splice(ue+1,0,null),ge[ue]=We,ge[ue+1]=ze,ae++,ne.centerX=Le.x+ne.width/2,ne.centerY=Le.y+ne.height/2);for(Jn(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 Le=ue.M(ye),ze=null;for(ee=Le.edges.iterator;ee.next();){var We=ee.value;if(We.Ax(Le)===E){ze=We;break}}ze!==null&&(ge+=ze.length,ae+=Le.width*Le.height)}ee=E.centerX,ue=E.centerY,ye=E.width,Le=E.height,ze=E.focus,We=ye*Le,1>We&&(We=1),ae=zt.sqrt((ae+We+ge*ge*4/(ne*ne))/We),ne=(ae-1)*ye/2,ae=(ae-1)*Le/2,E.bounds=new qt(ee-ze.x-ne,ue-ze.y-ae,ye+2*ne,Le+2*ae),E.focus=new st(ze.x+ne,ze.y+ae)}}return a.network=b,x}function 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 qt(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 Le=ye.value;1>=Le.Vd?ue++:(ae=!0,ge++,ne+=Math.atan2(y.centerY-Le.centerY,y.centerX-Le.centerX))}if(ue!==0){for(0<ge&&(ne/=ge),ge=y=0,y=ae?2*Math.PI/(ue+1):2*Math.PI/ue,ue%2===0&&(ge=y/2),1<x.count&&x.sort(function(We,Qe){return We===null||Qe===null||We===Qe?0:Qe.width*Qe.height-We.width*We.height}),ae=ue%2===0?0:1,x=x.iterator;x.next();)if(ue=x.value,!(1<ue.Vd||a.isFixed(ue))){for(ye=null,Le=ue.edges.iterator;Le.next();){ye=Le.value;break}Le=ue.width;var ze=ue.height;Le=zt.sqrt(Le*Le+ze*ze)/2,ye=ee+ye.length+Le,Le=ne+(y*(ae/2>>1)+ge)*(ae%2===0?1:-1),ue.centerX=b+ye*Math.cos(Le),ue.centerY=E+ye*Math.sin(Le),ae++}}}}function _S(a,y,x,b,E,ee,ne){var ae=9e19,ue=-1,ge=0;e:for(;ge<y;ge++){var ye=a[ge],Le=ye.x-x,ze=ye.y-b;if(Le=Le*Le+ze*ze,Le<ae){for(ze=ge-1;0<=ze;ze--)if(a[ze].y>ye.y&&a[ze].x-ye.x<E+ne.width)continue e;for(ze=ge+1;ze<y;ze++)if(a[ze].x>ye.x&&a[ze].y-ye.y<ee+ne.height)continue e;ue=ge,ae=Le}}return ue}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(it,Tt){return it===null||Tt===null||it===Tt?0:it.centerX-Tt.centerX}):y.sort(function(it,Tt){return it===null||Tt===null||it===Tt?0:it.centerY-Tt.centerY}),x=a.Zf;var ge=b=ae=0;for(ee=0;ee<y.length;ee++){ne=y[ee],b=ne.bounds,ae=ne.focus,ue=b.x+ae.x;var ye=b.y+ae.y;b=ne.charge*a.electricalFieldX(ue,ye),ge=ne.charge*a.electricalFieldY(ue,ye),b+=ne.mass*a.gravitationalFieldX(ue,ye),ge+=ne.mass*a.gravitationalFieldY(ue,ye),ne.forceX+=b,ne.forceY+=ge;for(var Le=ee+1;Le<y.length;Le++){var ze=y[Le];if(ze!==ne){b=ze.bounds,ae=ze.focus,ge=b.x+ae.x;var We=b.y+ae.y;if(ue-ge>x||ge-ue>x){if(E)break}else if(ye-We>x||We-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>We?(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=(We-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,Le=ee.focus,ue=ye.x+Le.x,ye=ye.y+Le.y,Le=zS(x,ee),1>Le?(Le=a.randomNumberGenerator,Le===null&&(a.randomNumberGenerator=Le=new xv),ae=Le.random(),Le=Le.random(),b=(b>ue?1:-1)*(1+(ee.width>x.width?ee.width:x.width))*ae,ge=(ne>ye?1:-1)*(1+(ee.height>x.height?ee.height:x.height))*Le):(ae=ae.stiffness*(Le-ae.length),b=(ue-b)/Le*ae,ge=(ye-ne)/Le*ae),x.forceX+=b,x.forceY+=ge,ee.forceX-=b,ee.forceY-=ge;for(E=b=0;E<y.length;E++)x=y[E],a.isFixed(x)?a.moveFixedVertex(x):b=Math.max(b,a.moveVertex(x)||0);return b>a.epsilonDistance*a.epsilonDistance}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=qt.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,qt.free(x)}x=qt.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()}qt.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},Ut.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"&&Mt('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)}Zt(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}Zt(xg,Wo),Ut.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){Ls.call(this,a),this.j=this.o=NaN}Zt(wg,Ls),Ut.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 Ri(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=Lv,this.bg=15,this.sf=!0,this.Cn=4,this.Ra=this.Iq=this.Ia=-1,this.Md=this.Hn=0,this.Ta=this.Kd=this.Ld=this.he=this.tc=null,this.Kn=0,this.Jn=this.kj=null,this.le=0,this.fl=null,this.Rf=new st,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Zt(Ri,lo),Ri.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},Ri.prototype.qb=function(a){a.classType===Ri?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:Mt("Unknown enum value: "+a):lo.prototype.qb.call(this,a)},Ri.prototype.createNetwork=function(){return new Xd(this)},Ri.prototype.doLayout=function(a){for(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),this.Iq=-1,this.Md=this.Hn=0,this.fl=this.Jn=this.kj=null,a=0;a<this.He.length;a++)this.He[a]=null;if(0<this.network.vertexes.count){for(this.network.Ko(),this.cycleRemoveOption!==Pg&&this.removeCycles(),a=this.network.vertexes.iterator;a.next();)a.value.layer=-1;for(this.Ia=-1,this.assignLayers(),a.reset();a.next();)this.Ia=Math.max(this.Ia,a.value.layer);this.cycleRemoveOption===Pg&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var b=x.value;b.valid=!1,y.push(b)}for(x=0;x<y.length;x++){b=y[x];var E=b.fromVertex,ee=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||ee.node===null&&ee.data===null)&&E.layer===ee.layer)){var ne=0,ae=0,ue=0,ge=0;if(b.link!==null){if(ae=b.link,ae===null)continue;var ye=E.node;if(ne=ee.node,ye===null||ne===null)continue;var Le=ae.fromNode;ue=ae.toNode;for(var ze=ae.fromPort;ze!==null&&!ze.Ed();)ze=ze.panel;for(ae=ae.toPort;ae!==null&&!ae.Ed();)ae=ae.panel;if(b.rev){ge=Le;var We=ze;Le=ue,ze=ae,ue=ge,ae=We}var Qe=E.focus;ge=ee.focus;var it=b.rev?ee.bounds:E.bounds;We=st.alloc(),ye!==Le?it.w()&&Le.isVisible()?Le.actualBounds.w()?(bh(Le,ze,zr,We),We.x+=Le.actualBounds.x-it.x,We.y+=Le.actualBounds.y-it.y):(bh(Le,ze,zr,We),We.w()||We.assign(Qe)):We.assign(Qe):it.w()?(bh(Le,ze,zr,We),We.w()||We.assign(Qe)):We.assign(Qe),Le=b.rev?E.bounds:ee.bounds,ye=st.alloc(),ne!==ue?Le.w()&&ue.isVisible()?ue.actualBounds.w()?(bh(ue,ae,zr,ye),ye.x+=ue.actualBounds.x-Le.x,ye.y+=ue.actualBounds.y-Le.y):(bh(ue,ae,zr,ye),ye.w()||ye.assign(ge)):ye.assign(ge):Le.w()?(bh(ue,ae,zr,ye),ye.w()||ye.assign(ge)):ye.assign(ge),this.K===90||this.K===270?(ne=Math.round((We.x-Qe.x)/this.kc),ue=We.x,ae=Math.round((ye.x-ge.x)/this.kc),ge=ye.x):(ne=Math.round((We.y-Qe.y)/this.kc),ue=We.y,ae=Math.round((ye.y-ge.y)/this.kc),ge=ye.y),st.free(We),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(We=E.layer,ye=ee.layer,Le=0,it=b.link,it!==null){var Tt=it.fromPort,wt=it.toPort;if(Tt!==null&&wt!==null){var jt=it.fromNode;if(ze=it.toNode,jt!==null&&ze!==null){var Ot=Cv(this,!0),Bt=Cv(this,!1),It=this.setsPortSpots?Ot:it.computeSpot(!0,Tt);Qe=this.setsPortSpots?Bt:it.computeSpot(!1,wt);var Xt=it.isOrthogonal;It.$c()&&It.Hf(Bt)&&Qe.$c()&&Qe.Hf(Ot)?Le=0:(Ot=it.getLinkPoint(jt,Tt,It,!0,Xt,ze,wt,st.alloc()),Bt=it.getLinkDirection(jt,Tt,Ot,It,!0,Xt,ze,wt),st.free(Ot),It.ys()||Bt!==QS(this,b,!0)?this.setsPortSpots&&jt!==null&&jt.ports.count===1&&b.rev&&(Le+=1):Le+=1,It=it.getLinkPoint(ze,wt,Qe,!1,Xt,jt,Tt,st.alloc()),it=it.getLinkDirection(ze,wt,It,Qe,!1,Xt,jt,Tt),st.free(It),Qe.ys()||it!==QS(this,b,!1)?this.setsPortSpots&&ze!==null&&ze.ports.count===1&&b.rev&&(Le+=2):Le+=2)}}}if(ze=Le,Le=ze===1||ze===3,(ze=ze===2||ze===3)&&(Qe=a.createVertex(),Qe.node=null,Qe.Dj=1,Qe.layer=We,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),it=1,Le&&it--,We-ye>it&&0<We){for(b.valid=!1,Qe=a.createVertex(),Qe.node=null,Qe.Dj=2,Qe.layer=We-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,We--;We-ye>it&&0<We;)Qe=a.createVertex(),Qe.node=null,Qe.Dj=3,Qe.layer=We-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,We--;E=a.Zj(Qe,ee,b.link),E.valid=!Le,Le&&(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},Ri.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}Ri.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},Ri.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 Le=b[ye];Le.near===ge&&Le.Dj===ge.Dj||ae++}else for(ye=ne-1;ye>ue;ye--)Le=b[ye],Le.near===ge&&Le.Dj===ge.Dj||ae++;var ze;if(0<=x)for(ue=b[ne].sourceEdgesArrayAccess,ge=0;ge<ue.length;ge++){var We=ue[ge];if(We.valid&&We.fromVertex.layer!==y)for(Le=We.fromVertex.index,ye=We.portToPos,We=We.portFromPos,ze=ge+1;ze<ue.length;ze++){var Qe=ue[ze];if(Qe.valid&&Qe.fromVertex.layer!==y){var it=Qe.fromVertex.index,Tt=Qe.portToPos;Qe=Qe.portFromPos,ye<Tt&&(Le>it||Le===it&&We>Qe)&&ae++,Tt<ye&&(it>Le||it===Le&&Qe>We)&&ae++}}}if(0>=x){for(ue=b[ne].destinationEdgesArrayAccess,ge=0;ge<ue.length;ge++)if(We=ue[ge],We.valid&&We.toVertex.layer!==y)for(Le=We.toVertex.index,ye=We.portToPos,We=We.portFromPos,ze=ge+1;ze<ue.length;ze++)Qe=ue[ze],Qe.valid&&Qe.toVertex.layer!==y&&(it=Qe.toVertex.index,Tt=Qe.portToPos,Qe=Qe.portFromPos,We<Qe&&(Le>it||Le===it&&ye>Tt)&&ae++,Qe<We&&(it>Le||it===Le&&Tt>ye)&&ae++)}for(ee[ne*E+ne]=ae,ue=ne+1;ue<E;ue++){var wt=0,jt=0;if(0<=x){ae=b[ne].sourceEdgesArrayAccess;var Ot=b[ue].sourceEdgesArrayAccess;for(ge=0;ge<ae.length;ge++)if(We=ae[ge],We.valid&&We.fromVertex.layer!==y)for(Le=We.fromVertex.index,We=We.portFromPos,ze=0;ze<Ot.length;ze++)Qe=Ot[ze],Qe.valid&&Qe.fromVertex.layer!==y&&(it=Qe.fromVertex.index,Qe=Qe.portFromPos,(Le<it||Le===it&&We<Qe)&&jt++,(it<Le||it===Le&&Qe<We)&&wt++)}if(0>=x){for(ae=b[ne].destinationEdgesArrayAccess,Ot=b[ue].destinationEdgesArrayAccess,ge=0;ge<ae.length;ge++)if(We=ae[ge],We.valid&&We.toVertex.layer!==y)for(Le=We.toVertex.index,ye=We.portToPos,ze=0;ze<Ot.length;ze++)Qe=Ot[ze],Qe.valid&&Qe.toVertex.layer!==y&&(it=Qe.toVertex.index,Tt=Qe.portToPos,(Le<it||Le===it&&ye<Tt)&&jt++,(it<Le||it===Le&&Tt<ye)&&wt++)}ee[ne*E+ue]=wt,ee[ue*E+ne]=jt}}return dc(a,y,b),ee}Ri.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=HS(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var ee=E;ee<b;ee++)a+=x[E*b+ee];return a};function wv(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,ee=fc(b,E),ne=b.tc[E],ae=0,ue=0;ue<ne;ue++){var ge=ee[ue].destinationEdgesArrayAccess;if(ge!==null)for(var ye=0;ye<ge.length;ye++){var Le=ge[ye];if(Le.valid&&Le.toVertex.layer!==E){var ze=Le.fromVertex.column+Le.portFromColOffset,We=Le.toVertex.column+Le.portToColOffset;ae+=(Math.abs(ze-We)+1)*gy(Le)}}}dc(b,E,ee),y+=ae}return y}Ri.prototype.normalize=function(){var a=1/0;this.Ra=-1;for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;a=Math.min(a,x.column-this.nodeMinColumnSpace(x,!0)),this.Ra=Math.max(this.Ra,x.column+this.nodeMinColumnSpace(x,!1))}for(y.reset();y.next();)y.value.column-=a;this.Ra-=a};function my(a,y,x){for(var b=fc(a,y),E=a.tc[y],ee=[],ne=0;ne<E;ne++){var ae=b[ne],ue=null;0>=x&&(ue=ae.sourceEdgesArrayAccess);var ge=null;0<=x&&(ge=ae.destinationEdgesArrayAccess);var ye=0,Le=0,ze=ae.near;if(ze!==null&&ze.layer===ae.layer&&(ye+=ze.column-1,Le++),ue!==null)for(ze=0;ze<ue.length;ze++){ae=ue[ze];var We=ae.fromVertex;ae.valid&&!ae.rev&&We.layer!==y&&(ye+=We.column,Le++)}if(ge!==null)for(ue=0;ue<ge.length;ue++)ae=ge[ue],ze=ae.toVertex,ae.valid&&!ae.rev&&ze.layer!==y&&(ye+=ze.column,Le++);ee[ne]=Le===0?-1:ye/Le}return dc(a,y,b),ee}function WS(a,y,x){for(var b=fc(a,y),E=a.tc[y],ee=[],ne=0;ne<E;ne++){var ae=b[ne],ue=null;0>=x&&(ue=ae.sourceEdgesArrayAccess);var ge=null;0<=x&&(ge=ae.destinationEdgesArrayAccess);var ye=0,Le=[],ze=ae.near;if(ze!==null&&ze.layer===ae.layer&&(Le[ye]=ze.column-1,ye++),ae=void 0,ue!==null)for(ze=0;ze<ue.length;ze++){ae=ue[ze];var We=ae.fromVertex;ae.valid&&!ae.rev&&We.layer!==y&&(Le[ye]=We.column+ae.portFromColOffset,ye++)}if(ge!==null)for(ue=0;ue<ge.length;ue++)ae=ge[ue],ze=ae.toVertex,ae.valid&&!ae.rev&&ze.layer!==y&&(Le[ye]=ze.column+ae.portToColOffset,ye++);ye===0?ee[ne]=-1:(Le.sort(function(Qe,it){return Qe-it}),ge=ye>>1,ee[ne]=ye&1?Le[ge]:Le[ge-1]+Le[ge]>>1)}return dc(a,y,b),ee}function bg(a,y,x,b,E,ee){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var ae=ne.value,ue=ae.toVertex,ge=y.layer-ue.layer;ae=a.linkMinLength(ae),ge===ae&&bg(a,ue,x,b,E,ee)}if(ee)for(ne=y.sourceEdges;ne.next();)ae=ne.value,ue=ae.fromVertex,ge=ue.layer-y.layer,ae=a.linkMinLength(ae),ge===ae&&bg(a,ue,x,b,E,ee)}}function vy(a,y,x,b,E,ee){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();)vy(a,ne.value.toVertex,x,b,E,ee);if(ee)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,ee)}}Ri.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case xy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;zx(a)!==null;){for(E=KS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=KS(a);for(E=VS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=VS(a);E=null;for(var ee=0,ne=this.network.vertexes.iterator;ne.next();){var ae=ne.value;if(ae.valid){for(var ue=0,ge=ae.destinationEdges;ge.next();)ge.value.toVertex.valid&&ue++;ge=0;for(var ye=ae.sourceEdges;ye.next();)ye.value.fromVertex.valid&&ge++;(E===null||ee<ue-ge)&&(E=ae,ee=ue-ge)}}E!==null&&(b[y]=E,y++,E.valid=!1)}for(y=0;y<a.vertexes.count;y++)b[y].index=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case Ev:for(b=this.network.vertexes.iterator;b.next();)a=b.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,b.reset();b.next();)y=b.value,y.sourceEdges.count===0&&yy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&yy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,ee=E.finish,E.Ll<y.Ll&&x<ee&&(this.network.gm(b),b.rev=!0));break;case Pg:for(a=this.network,y=a.vertexes.iterator,b=1/0;y.next();)b=Math.min(b,y.value.layer);if(1/0>b){if(0>b)for(y.reset();y.next();)y.value.layer-=b;for(b=[],y.reset();y.next();)x=y.value,E=b[x.layer],E===void 0?b[x.layer]=[x]:E.push(x);for(x=y=0;x<b.length;x++)if(E=b[x],!E||E.length===0)y++;else if(0<x)for(ee=0;ee<E.length;ee++)E[ee].layer-=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function KS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function VS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.sourceEdges;b.next();)if(b.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function yy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var b=x.value,E=b.toVertex;E.Ll===-1&&(b.forest=!0,yy(a,E))}y.finish=a.Kn,a.Kn++}Ri.prototype.assignLayers=function(){switch(this.Zk){case wy:ZS(this);break;case by:for(var a,y=this.network.vertexes.iterator;y.next();)a=YS(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case kv:for(ZS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&JS(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function ZS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=XS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function XS(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,ee=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,XS(a,ee)+E)}y.layer=x}else x=y.layer;return x}function YS(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,ee=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,ee)+E)}y.layer=x}else x=y.layer;return x}function JS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)JS(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,ee=0;ee<E;ee++){var ne=b[ee],ae=ne.fromVertex,ue=ne.toVertex;ne=a.linkMinLength(ne),ae.layer-ue.layer>ne&&bg(a,ae,0,-1,!0,!1)}for(bg(a,y,1,-1,!0,!0);y.component!==0;){for(ee=0,b=1/0,ae=0,ue=null,ne=a.network.vertexes.iterator;ne.next();){var ge=ne.value;if(ge.component===1){var ye=0,Le=!1,ze=ge.sourceEdgesArrayAccess;E=ze.length;for(var We=0;We<E;We++){var Qe=ze[We],it=Qe.fromVertex;ye+=1,it.component!==1&&(ee+=1,it=it.layer-ge.layer,Qe=a.linkMinLength(Qe),b=Math.min(b,it-Qe))}for(ze=ge.destinationEdgesArrayAccess,E=ze.length,We=0;We<E;We++)Qe=ze[We].toVertex,--ye,Qe.component!==1?--ee:Le=!0;(ue===null||ye<ae)&&!Le&&(ue=ge,ae=ye)}}if(0<ee){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else ue.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(bg(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,ee=0,ae=null,ue=a.network.vertexes.iterator;ue.next();)if(ne=ue.value,ne.component===1){for(ge=0,ye=!1,ze=ne.sourceEdgesArrayAccess,Le=ze.length,We=0;We<Le;We++)Qe=ze[We].fromVertex,ge+=1,Qe.component!==1?b+=1:ye=!0;for(ze=ne.destinationEdgesArrayAccess,Le=ze.length,We=0;We<Le;We++)Qe=ze[We],it=Qe.toVertex,--ge,it.component!==1&&(--b,it=ne.layer-it.layer,Qe=a.linkMinLength(Qe),E=Math.min(E,it-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}Ri.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))}Ri.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 Lv:for(x=this.Ia,ne=0,ae=a+1;(b=this.countCrossings())<ae;){for(ae=b,ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=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],Le=x[b[ee+1].index*E+b[ee].index],ze=0,We=0,Qe=b[ee].column,it=b[ee+1].column,Tt=a.nodeMinColumnSpace(b[ee],!0),wt=a.nodeMinColumnSpace(b[ee],!1),jt=a.nodeMinColumnSpace(b[ee+1],!0),Ot=a.nodeMinColumnSpace(b[ee+1],!1);Tt=Qe-Tt+jt,wt=it-wt+Ot;var Bt=b[ee].sourceEdges.iterator;for(Bt.reset();Bt.next();)if(jt=Bt.value,Ot=jt.fromVertex,jt.valid&&Ot.layer===y){for(jt=0;b[jt]!==Ot;)jt++;jt<ee&&(ze+=2*(ee-jt),We+=2*(ee+1-jt)),jt===ee+1&&(ze+=1),jt>ee+1&&(ze+=4*(jt-ee),We+=4*(jt-(ee+1)))}for(Bt=b[ee].destinationEdges.iterator,Bt.reset();Bt.next();)if(jt=Bt.value,Ot=jt.toVertex,jt.valid&&Ot.layer===y){for(jt=0;b[jt]!==Ot;)jt++;jt===ee+1&&(We+=1)}for(Bt=b[ee+1].sourceEdges.iterator,Bt.reset();Bt.next();)if(jt=Bt.value,Ot=jt.fromVertex,jt.valid&&Ot.layer===y){for(jt=0;b[jt]!==Ot;)jt++;jt<ee&&(ze+=2*(ee+1-jt),We+=2*(ee-jt)),jt===ee&&(We+=1),jt>ee+1&&(ze+=4*(jt-(ee+1)),We+=4*(jt-ee))}for(Bt=b[ee+1].destinationEdges.iterator,Bt.reset();Bt.next();)if(jt=Bt.value,Ot=jt.toVertex,jt.valid&&Ot.layer===y){for(jt=0;b[jt]!==Ot;)jt++;jt===ee&&(ze+=1)}jt=Ot=0,Bt=ne[b[ee].index];var It=ae[b[ee].index],Xt=ne[b[ee+1].index],In=ae[b[ee+1].index];Bt!==-1&&(Ot+=Math.abs(Bt-Qe),jt+=Math.abs(Bt-wt)),It!==-1&&(Ot+=Math.abs(It-Qe),jt+=Math.abs(It-wt)),Xt!==-1&&(Ot+=Math.abs(Xt-it),jt+=Math.abs(Xt-Tt)),In!==-1&&(Ot+=Math.abs(In-it),jt+=Math.abs(In-Tt)),(We<ze-.5||We===ze&&Le<ye-.5||We===ze&&Le===ye&&jt<Ot-.5)&&(ge=ue=!0,b[ee].column=wt,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}Ri.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Xx)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var b,E=this.network.vertexes.iterator;E.next();){var ee=E.value;y=ee.layer,b=ee.column,ee=this.nodeMinColumnSpace(ee,!1),x[y]=Math.max(x[y],b+ee)}for(E.reset();E.next();)ee=E.value,y=ee.layer,b=ee.column,ee.column=(8*(this.Ra-x[y])>>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Zd(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Zd(this,y,-1)||x;x=Zd(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Sy(this,y,1);for(y=this.Md-1;0<=y;y--)Sy(this,y,-1);Sy(this,this.Md,0)}if(a&&(ex(this,-1),ex(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Zd(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Zd(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Zd(this,y,0)||x}}else Wx(this)};function Zd(a,y,x){for(var b=!1;Gx(a,y,x);)b=!0;return b}function Gx(a,y,x){var b,E=fc(a,y),ee=a.tc[y],ne=my(a,y,-1);if(0<x)for(b=0;b<ee;b++)ne[b]=-1;var ae=my(a,y,1);if(0>x)for(b=0;b<ee;b++)ae[b]=-1;for(var ue=!1,ge=!0;ge;)for(ge=!1,b=0;b<ee;b++){var ye=E[b].column,Le=a.nodeMinColumnSpace(E[b],!0),ze=a.nodeMinColumnSpace(E[b],!1),We=0;0>b-1||ye-E[b-1].column-1>Le+a.nodeMinColumnSpace(E[b-1],!1)?We=ye-1:We=ye,Le=b+1>=ee||E[b+1].column-ye-1>ze+a.nodeMinColumnSpace(E[b+1],!0)?ye+1:ye;var Qe=ze=0,it=0;if(0>=x)for(var Tt=E[b].sourceEdges.iterator;Tt.next();){var wt=Tt.value,jt=wt.fromVertex;if(wt.valid&&jt.layer!==y){var Ot=gy(wt),Bt=wt.portFromColOffset;wt=wt.portToColOffset,jt=jt.column,ze+=(Math.abs(ye+wt-(jt+Bt))+1)*Ot,Qe+=(Math.abs(We+wt-(jt+Bt))+1)*Ot,it+=(Math.abs(Le+wt-(jt+Bt))+1)*Ot}}if(0<=x)for(Tt=E[b].destinationEdges.iterator;Tt.next();)wt=Tt.value,jt=wt.toVertex,wt.valid&&jt.layer!==y&&(Ot=gy(wt),Bt=wt.portFromColOffset,wt=wt.portToColOffset,jt=jt.column,ze+=(Math.abs(ye+Bt-(jt+wt))+1)*Ot,Qe+=(Math.abs(We+Bt-(jt+wt))+1)*Ot,it+=(Math.abs(Le+Bt-(jt+wt))+1)*Ot);wt=Bt=Ot=0,Tt=ne[E[b].index],jt=ae[E[b].index],Tt!==-1&&(Ot+=Math.abs(Tt-ye),Bt+=Math.abs(Tt-We),wt+=Math.abs(Tt-Le)),jt!==-1&&(Ot+=Math.abs(jt-ye),Bt+=Math.abs(jt-We),wt+=Math.abs(jt-Le)),Qe<ze||Qe===ze&&Bt<Ot?(ge=ue=!0,E[b].column=We):(it<ze||it===ze&&wt<Ot)&&(ge=ue=!0,E[b].column=Le)}return dc(a,y,E),a.normalize(),ue}function Sy(a,y,x){var b=fc(a,y),E=a.tc[y],ee=WS(a,y,x),ne=[];for(x=0;x<E;x++)ne[x]=ee[x];for(ee=!0;ee;)for(ee=!1,x=0;x<E;x++){var ae=b[x].column,ue=a.nodeMinColumnSpace(b[x],!0),ge=a.nodeMinColumnSpace(b[x],!1),ye=0;if(ne[x]===-1)if(x===0&&x===E-1)ye=ae;else if(x===0){var Le=b[x+1].column;Le-ae===ge+a.nodeMinColumnSpace(b[x+1],!0)?ye=ae-1:ye=ae}else x===E-1?(Le=b[x-1].column,ye=ae-Le===ue+a.nodeMinColumnSpace(b[x-1],!1)?ae+1:ae):(Le=b[x-1].column,ue=Le+a.nodeMinColumnSpace(b[x-1],!1)+ue+1,Le=b[x+1].column,ge=Le-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ye=(ue+ge)/2|0);else x===0&&x===E-1?ye=ne[x]:x===0?(Le=b[x+1].column,ge=Le-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ye=Math.min(ne[x],ge)):x===E-1?(Le=b[x-1].column,ue=Le+a.nodeMinColumnSpace(b[x-1],!1)+ue+1,ye=Math.max(ne[x],ue)):(Le=b[x-1].column,ue=Le+a.nodeMinColumnSpace(b[x-1],!1)+ue+1,Le=b[x+1].column,ge=Le-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ue<ne[x]&&ne[x]<ge?ye=ne[x]:ue>=ne[x]?ye=ue:ge<=ne[x]&&(ye=ge));ye!==ae&&(ee=!0,b[x].column=ye)}dc(a,y,b),a.normalize()}function Ux(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,ee=a.nodeMinColumnSpace(E,!0),ne=a.nodeMinColumnSpace(E,!1);if(E.column-ee<=y&&E.column+ne>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Hx(a,y){var x=y+1,b,E=[],ee=[];for(b=0;b<=a.Ia;b++)E[b]=!1,ee[b]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){b=ne.value;var ae=b.column-a.nodeMinColumnSpace(b,!0),ue=b.column+a.nodeMinColumnSpace(b,!1);ae<=y&&ue>=y&&(E[b.layer]=!0),ae<=x&&ue>=x&&(ee[b.layer]=!0)}for(ae=!0,x=!1,b=0;b<=a.Ia;b++)ae=ae&&!(E[b]&&ee[b]);if(ae)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function ex(a,y){for(var x=0;x<=a.Ra;x++)for(;Ux(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Hx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=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=Kn(),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 an,Kx(y,x);var ee=null,ne=null,ae=null,ue=null,ge=(a.ve&1)!==0,ye=(a.ve&2)!==0,Le=(a.ve&4)!==0,ze=(a.ve&8)!==0;for(ge&&(a.verticalAlignment(y,x,!0),ee=Pv(a,y,!0,!1)),y.reverse(),Le&&(a.verticalAlignment(y,x,!1),ae=Pv(a,y,!1,!1)),b=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)),Jn(y),a.u(ee,ne,ae,ue),a.network.vertexes.each(function(We){var Qe=Kn();ge&&Qe.push(ee.get(We)),ye&&Qe.push(ne.get(We)),Le&&Qe.push(ae.get(We)),ze&&Qe.push(ue.get(We)),Qe.sort(function(Tt,wt){return Tt-wt});var it=Qe.length;it=(Qe[Math.floor((it-1)/2)]+Qe[Math.ceil((it-1)/2)])/2,Jn(Qe),We.zc=it})}function Kx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,ee=0,ne=a[b],ae=a[b+1],ue=0;ee<ae.length;ue++){var ge=ae[ue];e:{if(ge.node===null){var ye=Ty(ge);if(0<ye.length){ye=ye[0].node===null;break e}}ye=!1}var Le=ye;if(ue===ae.length-1||Le){for(ye=ne.length-1,Le&&(ye=Ty(ge)[0].index);ee<=ue;){if(ge=ae[ee],!ge.bo){Le=[];for(var ze=Er(ge.sourceEdgesArrayAccess),We=ze.next();!We.done;We=ze.next())We=We.value,We.valid&&Le.push(We);ge.bo=Le}for(ge=Er(ge.bo),Le=ge.next();!Le.done;Le=ge.next())Le=Le.value,ze=Le.fromVertex.index,(ze<E||ze>ye)&&y.add(Le);ee++}E=ye}}}Ri.prototype.verticalAlignment=function(a,y,x){Vx(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(Le,ze){return Le.vi-ze.vi});var ue=(ae-1)/2;for(ae=Math.floor(ue),ue=Math.ceil(ue);ae<=ue;ae++)if(ee.align===ee){var ge=ne[ae],ye=void 0;ye=x?Mv(ge,ee):Mv(ee,ge),!y.contains(ye)&&E<ge.vi&&(ge.align=ee,ee.root=ge.root,ee.align=ge.root,E=ge.vi)}}}}};function Vx(a){for(var y=0;y<a.length;y++)for(var x=a[y],b=0;b<x.length;b++){var E=x[b];E.root=E,E.align=E,E.Tz=y,E.vi=b}}function Pv(a,y,x,b){for(var E=a.K===90||a.K===270,ee=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 Le=ye.align,ze=ne?ye.width:ye.height,We=ne?Le.width:Le.height;if(x){var Qe=Mv(ye,Le),it=Qe.portFromPos,Tt=Qe.portToPos;Qe.link!==null&&(ye.node&&ye.node!==Qe.link.fromNode&&(it=ne?ye.focusX:ye.focusY),Le.node&&Le.node!==Qe.link.toNode&&(Tt=ne?Le.focusX:Le.focusY))}else Qe=Mv(Le,ye),it=Qe.portToPos,Tt=Qe.portFromPos,Qe.link!==null&&(ye.node&&ye.node!==Qe.link.toNode&&(it=ne?ye.focusX:ye.focusY),Le.node&&Le.node!==Qe.link.fromNode&&(Tt=ne?Le.focusX:Le.focusY));ze=b?ye.qg+(ze-it)-(We-Tt):ye.qg+it-Tt,Le.qg=ze,ge=Math.min(ge,ze),ye=ye.align}ye=ue;do ye.qg=ye.qg-ge,ye=ye.align;while(ye!==ue)}}for(x=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 $t,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&&Mt("Could not determine previous vertex in layer"),y[x][a-1]}Ri.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Kn(),E=Kn(),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)));Jn(b),Jn(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}Ri.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}Ri.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()},Ri.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 qt(0,0,x,Math.abs(this.Ta[0]))):y.push(new qt(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new qt(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new qt(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new qt(0,0,Math.abs(this.Ta[0]),x)):y.push(new qt(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new qt(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new qt(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},Ri.prototype.commitLayers=function(){},Ri.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var b=y,E=b.fromNode,ee=b.toNode,ne=b.fromPort,ae=b.toPort;if(E!==null){var ue=E.findVisibleNode();ue!==null&&ue!==E&&(E=ue,ne=ue.port)}ee!==null&&(ue=ee.findVisibleNode(),ue!==null&&ue!==ee&&(ee=ue,ae=ue.port));var ge=y.computeSpot(!0,ne);ue=y.computeSpot(!1,ae);var ye=x.fromVertex,Le=x.toVertex;if(x.valid)y.curve===Gs&&y.pointsCount===4&&(ye.column===Le.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,ge,!0,!1,ee,ae),ae=y.getLinkPoint(ee,ae,ue,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),ae.w()||ae.set(ee.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+ae.x)/3,(2*x.y+ae.y)/3),y.yf((x.x+2*ae.x)/3,(x.y+2*ae.y)/3),y.yf(ae.x,ae.y)):(x=b=!1,ne!==null&&ge===_r&&(b=!0),ae!==null&&ue===_r&&(x=!0),(b||x)&&(ue=null,b&&(ue=y.getLinkPointFromPoint(E,ne,ne.ga(zr),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(zr),y.i(0),!1),E.w()||E.set(ee.actualBounds.center),y.L(3,E.x,E.y)),ue&&(ee=y.i(2),y.L(1,(2*ue.x+ee.x)/3,(2*ue.y+ee.y)/3)),E&&(ee=y.i(1),y.L(2,(2*E.x+ee.x)/3,(2*E.y+ee.y)/3))))),y.zf();else if(ye.layer===Le.layer)y.zf();else{var ze=!1,We=!1,Qe=this.ie,it=y.firstPickIndex+1;if(y.isOrthogonal){We=!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&&(it=2);else{Tt=y.pointsCount;var wt=ge===_r,jt=ue===_r;2<Tt&&wt&&jt?y.points.removeRange(1,Tt-2):3<Tt&&wt&&!jt?y.points.removeRange(1,Tt-3):3<Tt&&!wt&&jt?y.points.removeRange(2,Tt-2):4<Tt&&!wt&&!jt&&y.points.removeRange(2,Tt-3)}if(x.rev){for(;Le!==null&&ye!==Le;){var Ot=Tt=null;for(wt=Le.sourceEdges.iterator;wt.next()&&(jt=wt.value,jt.link!==x.link||(Tt=jt.fromVertex,Ot=jt.toVertex,Tt.node!==null)););if(Tt===null)break;if(Tt!==ye){wt=y.i(it-1).x,jt=y.i(it-1).y;var Bt=Tt.centerX,It=Tt.centerY;if(We)this.K===180||this.K===0?it===y.firstPickIndex+1?(y.m(it++,wt,jt),y.m(it++,wt,It)):(Ot!==null?Ot.centerY:jt)!==It&&(Ot=this.Ta[Tt.layer-1]+this.Rf.x,y.m(it++,Ot,jt),y.m(it++,Ot,It)):it===y.firstPickIndex+1?(y.m(it++,wt,jt),y.m(it++,Bt,jt)):(Ot!==null?Ot.centerX:wt)!==Bt&&(Ot=this.Ta[Tt.layer-1]+this.Rf.y,y.m(it++,wt,Ot),y.m(it++,Bt,Ot));else if(it===y.firstPickIndex+1){Ot=Math.max(10,this.he[Le.layer]);var Xt=Math.max(10,this.Ld[Le.layer]);if(ze)this.K===180?Bt<=Le.bounds.x?(Le=Le.bounds.x,y.m(it++,Le-Ot,It),y.m(it++,Le,It),y.m(it++,Le+Xt,It)):(y.m(it++,Bt-Ot,It),y.m(it++,Bt,It),y.m(it++,Bt+Xt,It)):this.K===90?It>=Le.bounds.bottom?(Le=Le.bounds.y+Le.bounds.height,y.m(it++,Bt,Le+Xt),y.m(it++,Bt,Le),y.m(it++,Bt,Le-Ot)):(y.m(it++,Bt,It+Xt),y.m(it++,Bt,It),y.m(it++,Bt,It-Ot)):this.K===270?It<=Le.bounds.y?(Le=Le.bounds.y,y.m(it++,Bt,Le-Ot),y.m(it++,Bt,Le),y.m(it++,Bt,Le+Xt)):(y.m(it++,Bt,It-Ot),y.m(it++,Bt,It),y.m(it++,Bt,It+Xt)):this.K===0&&(Bt>=Le.bounds.right?(Le=Le.bounds.x+Le.bounds.width,y.m(it++,Le+Xt,It),y.m(it++,Le,It),y.m(it++,Le-Ot,It)):(y.m(it++,Bt+Xt,It),y.m(it++,Bt,It),y.m(it++,Bt-Ot,It)));else{y.m(it++,wt,jt);var In=0;this.K===180||this.K===0?((this.K===180?Bt>=Le.bounds.right:Bt<=Le.bounds.x)&&(In=(this.K===0?-Ot:Xt)/2),y.m(it++,wt+In,It)):((this.K===270?It>=Le.bounds.bottom:It<=Le.bounds.y)&&(In=(this.K===90?-Ot:Xt)/2),y.m(it++,Bt,jt+In)),y.m(it++,Bt,It)}}else Ot=Math.max(10,this.he[Tt.layer]),Xt=Math.max(10,this.Ld[Tt.layer]),ze?this.K===180?(y.m(it++,Bt-Ot-Qe,It),y.m(it++,Math.min(Bt-Ot+Qe/2,Bt),It),y.m(it++,Bt,It),y.m(it++,Bt,It),y.m(it++,Math.max(Bt+Xt-Qe/2,Bt),It),y.m(it++,Bt+Xt+Qe,It)):this.K===90?(y.m(it++,Bt,It+Xt+Qe),y.m(it++,Bt,Math.max(It+Xt-Qe/2,It)),y.m(it++,Bt,It),y.m(it++,Bt,It),y.m(it++,Bt,Math.min(It-Ot+Qe/2,It)),y.m(it++,Bt,It-Ot-Qe)):this.K===270?(y.m(it++,Bt,It-Ot-Qe),y.m(it++,Bt,Math.min(It-Ot+Qe/2,It)),y.m(it++,Bt,It),y.m(it++,Bt,It),y.m(it++,Bt,Math.max(It+Xt-Qe/2,It)),y.m(it++,Bt,It+Xt+Qe)):(y.m(it++,Bt+Xt+Qe,It),y.m(it++,Math.max(Bt+Xt-Qe/2,Bt),It),y.m(it++,Bt,It),y.m(it++,Bt,It),y.m(it++,Math.min(Bt-Ot+Qe/2,Bt),It),y.m(it++,Bt-Ot-Qe,It)):y.m(it++,Bt,It)}Le=Tt}(ae===null||ge!==_r||We)&&(wt=y.i(it-1).x,jt=y.i(it-1).y,Bt=y.i(it).x,It=y.i(it).y,We?(Qe=this.Ld[ye.layer],this.K===180||this.K===0?(We=jt,We>=ye.bounds.y&&We<=ye.bounds.bottom&&(this.K===180?Bt>=ye.bounds.x:Bt<=ye.bounds.right)&&(Le=ye.centerX+(this.K===180?-Qe:Qe),We<ye.bounds.y+ye.bounds.height/2?We=ye.bounds.y-this.kc/2:We=ye.bounds.bottom+this.kc/2,y.m(it++,Le,jt),y.m(it++,Le,We)),y.m(it++,Bt,We)):(We=wt,We>=ye.bounds.x&&We<=ye.bounds.right&&(this.K===270?It>=ye.bounds.y:It<=ye.bounds.bottom)&&(Le=ye.centerY+(this.K===270?-Qe:Qe),We<ye.bounds.x+ye.bounds.width/2?We=ye.bounds.x-this.kc/2:We=ye.bounds.right+this.kc/2,y.m(it++,wt,Le),y.m(it++,We,Le)),y.m(it++,We,It)),y.m(it++,Bt,It)):ze?(Ot=Math.max(10,this.he[ye.layer]),Xt=Math.max(10,this.Ld[ye.layer]),this.K===180&&Bt>=ye.bounds.x?(Le=ye.bounds.x+ye.bounds.width,y.L(it-2,Le,jt),y.L(it-1,Le+Xt,jt)):this.K===90&&It<=ye.bounds.bottom?(Le=ye.bounds.y,y.L(it-2,wt,Le),y.L(it-1,wt,Le-Ot)):this.K===270&&It>=ye.bounds.y?(Le=ye.bounds.y+ye.bounds.height,y.L(it-2,wt,Le),y.L(it-1,wt,Le+Xt)):this.K===0&&Bt<=ye.bounds.right&&(Le=ye.bounds.x,y.L(it-2,Le,jt),y.L(it-1,Le-Ot,jt))):(Ot=Math.max(10,this.he[ye.layer]),Xt=Math.max(10,this.Ld[ye.layer]),We=0,this.K===180||this.K===0?((this.K===180?Bt<=ye.bounds.x:Bt>=ye.bounds.right)&&(We=(this.K===0?Xt:-Ot)/2),y.m(it++,Bt+We,jt)):((this.K===270?It<=ye.bounds.y:It>=ye.bounds.bottom)&&(We=(this.K===90?Xt:-Ot)/2),y.m(it++,wt,It+We)),y.m(it++,Bt,It)))}else{for(;ye!==null&&ye!==Le;){for(Ot=Tt=null,ye=ye.destinationEdges.iterator;ye.next()&&(wt=ye.value,wt.link!==x.link||(Tt=wt.toVertex,Ot=wt.fromVertex,Ot.node!==null&&(Ot=null),Tt.node!==null)););if(Tt===null)break;Tt!==Le&&(wt=y.i(it-1).x,jt=y.i(it-1).y,Bt=Tt.centerX,It=Tt.centerY,We?this.K===180||this.K===0?(Ot!==null?Ot.centerY:jt)!==It&&(Ot=this.Ta[Tt.layer]+this.Rf.x,it===y.firstPickIndex+1&&(Ot=this.K===0?Math.max(Ot,wt):Math.min(Ot,wt)),y.m(it++,Ot,jt),y.m(it++,Ot,It)):(Ot!==null?Ot.centerX:wt)!==Bt&&(Ot=this.Ta[Tt.layer]+this.Rf.y,it===y.firstPickIndex+1&&(Ot=this.K===90?Math.max(Ot,jt):Math.min(Ot,jt)),y.m(it++,wt,Ot),y.m(it++,Bt,Ot)):(Ot=Math.max(10,this.he[Tt.layer]),Xt=Math.max(10,this.Ld[Tt.layer]),ze?this.K===180?(y.m(it++,Bt+Xt+Qe,It),y.m(it++,Math.max(Bt+Xt-Qe/2,Bt),It),y.m(it++,Bt,It),y.m(it++,Bt,It),y.m(it++,Math.min(Bt-Ot+Qe/2,Bt),It),y.m(it++,Bt-Ot-Qe,It)):this.K===90?(y.m(it++,Bt,It-Ot-Qe),y.m(it++,Bt,Math.min(It-Ot+Qe/2,It)),y.m(it++,Bt,It),y.m(it++,Bt,It),y.m(it++,Bt,Math.max(It+Xt-Qe/2,It)),y.m(it++,Bt,It+Xt+Qe)):this.K===270?(y.m(it++,Bt,It+Xt+Qe),y.m(it++,Bt,Math.max(It+Xt-Qe/2,It)),y.m(it++,Bt,It),y.m(it++,Bt,It),y.m(it++,Bt,Math.min(It-Ot+Qe/2,It)),y.m(it++,Bt,It-Ot-Qe)):(y.m(it++,Bt-Ot-Qe,It),y.m(it++,Math.min(Bt-Ot+Qe/2,Bt),It),y.m(it++,Bt,It),y.m(it++,Bt,It),y.m(it++,Math.max(Bt+Xt-Qe/2,Bt),It),y.m(it++,Bt+Xt+Qe,It)):this.K===180?(y.m(it++,Bt+Xt,It),y.m(it++,Bt-Ot,It)):this.K===90?(y.m(it++,Bt,It-Ot),y.m(it++,Bt,It+Xt)):this.K===270?(y.m(it++,Bt,It+Xt),y.m(it++,Bt,It-Ot)):(y.m(it++,Bt-Ot,It),y.m(it++,Bt+Xt,It)))),ye=Tt}We&&(wt=y.i(it-1).x,jt=y.i(it-1).y,Bt=y.i(it).x,It=y.i(it).y,this.K===180||this.K===0?jt!==It&&(Ot=this.K===0?Math.min(Math.max((Bt+wt)/2,this.Ta[Le.layer]+this.Rf.x),Bt):Math.max(Math.min((Bt+wt)/2,this.Ta[Le.layer]+this.Rf.x),Bt),y.m(it++,Ot,jt),y.m(it++,Ot,It)):wt!==Bt&&(Ot=this.K===90?Math.min(Math.max((It+jt)/2,this.Ta[Le.layer]+this.Rf.y),It):Math.max(Math.min((It+jt)/2,this.Ta[Le.layer]+this.Rf.y),It),y.m(it++,wt,Ot),y.m(it++,Bt,Ot)))}b!==null&&ze&&4<=y.pointsCount&&(ne!==null&&(ne=ge===_r?y.getLinkPointFromPoint(E,ne,ne.ga(zr),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(zr),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()},Ri.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 Le=1;for(ae=x[ee].first,ue=ee;ue<E;ue++)ge=x[ue],ge.first!==ae&&(Le++,ae=ge.first);for(ue=!0,ge=Le,ye<Le?(ue=!1,ge=ye,ae=x[ee].jc,this.zi(x,this.Js,ee,ee+ne)):ae=x[ee].first,ye=0,Le=ee;Le<E;Le++){var ze=x[Le];(ue?ze.first:ze.jc)!==ae&&(ye++,ae=ue?ze.first:ze.jc);var We=ze.link;ee=We.i(ze.index),ne=We.i(ze.index+1);var Qe=this.linkSpacing*(ye-(ge-1)/2);y++,We.uh(),We.L(ze.index,ee.x,ee.y+Qe),We.L(ze.index+1,ne.x,ne.y+Qe),We.zf()}}ee=E}a=b}}else{for(y=0,x=[],a=a.iterator;a.next();)if(b=a.value,b!==null&&b.isOrthogonal)for(E=2;E<b.pointsCount-3;E++)ee=b.i(E),ne=b.i(E+1),this.B(ee.x,ne.x)&&!this.B(ee.y,ne.y)&&(ae=new pc,ae.layer=Math.floor(ee.x/2),ue=b.i(0),ge=b.i(b.pointsCount-1),ae.first=ue.x+ue.y*ue.y,ae.jc=ge.x+ge.y*ge.y,ae.rd=Math.min(ee.y,ne.y),ae.Ic=Math.max(ee.y,ne.y),ae.index=E,ae.link=b,E+2<b.pointsCount&&(ue=b.i(E-1),ge=b.i(E+2),ye=0,ue.x<ee.x?ye=ge.x<ee.x?3:ee.y<ne.y?2:1:ue.x>ee.x&&(ye=ge.x>ee.x?0:ne.y<ee.y?2:1),ae.j=ye),x.push(ae));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(ee=x[a].layer,b=a+1;b<x.length&&x[b].layer===ee;)b++;if(1<b-a)for(ee=a;ee<b;){for(ne=x[ee].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-ee,1<ne){for(this.zi(x,this.Js,ee,ee+ne),ye=1,ae=x[ee].jc,ue=ee;ue<E;ue++)ge=x[ue],ge.jc!==ae&&(ye++,ae=ge.jc);for(this.zi(x,this.Ux,ee,ee+ne),Le=1,ae=x[ee].first,ue=ee;ue<E;ue++)ge=x[ue],ge.first!==ae&&(Le++,ae=ge.first);for(ue=!0,ge=Le,ye<Le?(ue=!1,ge=ye,ae=x[ee].jc,this.zi(x,this.Js,ee,ee+ne)):ae=x[ee].first,ye=0,Le=ee;Le<E;Le++)ze=x[Le],(ue?ze.first:ze.jc)!==ae&&(ye++,ae=ue?ze.first:ze.jc),We=ze.link,ee=We.i(ze.index),ne=We.i(ze.index+1),Qe=this.linkSpacing*(ye-(ge-1)/2),y++,We.uh(),We.L(ze.index,ee.x+Qe,ee.y),We.L(ze.index+1,ne.x+Qe,ne.y),We.zf()}ee=E}a=b}}}},et=Ri.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)&&Mt("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}Ut.Object.defineProperties(Ri.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()):Mt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==Ev&&a!==Pg||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==kv&&a!==wy&&a!==by||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==Tv&&a!==Py&&a!==Cy||(this.Qk=a,this.C())}},iterations:{get:function(){return this.bj},set:function(a){this.bj!==a&&0<=a&&(this.bj=a,this.C())}},aggressiveOption:{get:function(){return this.rk},set:function(a){this.rk===a||a!==Ey&&a!==Lv&&a!==ky||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var Ev=new pn(Ri,"CycleDepthFirst",0),xy=new pn(Ri,"CycleGreedy",1),Pg=new pn(Ri,"CycleFromLayers",2),kv=new pn(Ri,"LayerOptimalLinkLength",0),wy=new pn(Ri,"LayerLongestPathSink",1),by=new pn(Ri,"LayerLongestPathSource",2),Tv=new pn(Ri,"InitDepthFirstOut",0),Py=new pn(Ri,"InitDepthFirstIn",1),Cy=new pn(Ri,"InitNaive",2),Ey=new pn(Ri,"AggressiveNone",0),Lv=new pn(Ri,"AggressiveLess",1),ky=new pn(Ri,"AggressiveMore",2),Xx=8;Ri.className="LayeredDigraphLayout",Ri.CycleDepthFirst=Ev,Ri.CycleGreedy=xy,Ri.CycleFromLayers=Pg,Ri.LayerOptimalLinkLength=kv,Ri.LayerLongestPathSink=wy,Ri.LayerLongestPathSource=by,Ri.InitDepthFirstOut=Tv,Ri.InitDepthFirstIn=Py,Ri.InitNaive=Cy,Ri.AggressiveNone=Ey,Ri.AggressiveLess=Lv,Ri.AggressiveMore=ky,Ri.PackNone=0,Ri.PackExpand=1,Ri.PackStraighten=2,Ri.PackMedian=4,Ri.PackAll=15,Ri.AlignNone=0,Ri.AlignUpperLeft=1,Ri.AlignUpperRight=2,Ri.AlignLowerLeft=4,Ri.AlignLowerRight=8,Ri.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)}Zt(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}Zt(nl,Wo);function ix(a,y){return a.index-y.index}function Mv(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;Mt("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},Ut.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){Ls.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Zt(Cg,Ls),Ut.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 ni(a){lo.call(this),this.Ub=new an,this.Wn=Ov,this.ud=Eu,this.vo=Dv,this.Bq=Iy,this.$v=[],this.td=!0,this.Rb=Bv,this.$d=new cn(10,10).freeze();var y=new Kf(this);this.W=new gl(y),this.Y=new gl(y),this.ru=[],a&&Object.assign(this,a)}Zt(ni,lo),ni.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)},ni.prototype.qb=function(a){a.classType===ni?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:Mt("Unknown enum value: "+a):lo.prototype.qb.call(this,a)},ni.prototype.createNetwork=function(){return new Kf(this)},ni.prototype.makeNetwork=function(a){function y(b){if(b instanceof Wn)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Pn){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Jt?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Or?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},ni.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 Jt&&(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 an,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,Ly(this,y));for(y=this.network.vertexes,a=null;a=Jx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ly(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof 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 an,this.isValidLayout=!0};function Jx(a){var y=new an;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}ni.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:Mt("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:Mt("Unhandled path value "+a.ud.toString())}}return b}function Ly(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:Mt("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var ee=x[E];ee.initialized=!0,ee.level=y.level+1,ee.parent=y,a.Ub.remove(ee)}for(y=0;y<b;y++)Ly(a,x[y])}}function ax(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}ni.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===Lu&&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}}ni.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Qx(this,a)),a.parent!==null&&a.parent.alignment===Lu){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])}}ni.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Lu&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}ni.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Yd:break;case kg:a.children.reverse();break;case Tg:a.children.sort(a.comparer);break;case Lg:a.children.sort(a.comparer),a.children.reverse();break;default:Mt("Unhandled sorting value "+a.sorting.toString())}},ni.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},ni.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=qt.allocAt(0,0,a.bounds.width+ee,a.bounds.height+ne),a.bounds=E,qt.free(E))};function gc(a){return a===Lh||a===Lu||a===Mh||a===Zu}function Eg(a){return a===Lh||a===Lu}function My(a){var y=a.parent;if(y!==null){var x=y.alignment;if(gc(x)){if(Eg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Mh)return!0}}return!1}ni.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,ee=!1;x!==null&&(E=x.angle,ee=x.alignment,ee=gc(ee)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,ae=My(a),ue=0,ge=a.comments,ye=ge.length,Le=st.alloc(),ze=0;ze<ye;ze++){var We=ge[ze],Qe=We.measuredBounds;if(b&&!ne||!ee&&!x&&ne||ee&&x&&ne){if(135<E&&!ee||x&&ae)if(0<=a.commentMargin)for(Le.h(a.bounds.x-a.commentMargin-Qe.width,a.bounds.y+ue),We.move(Le),We=We.Sd();We.next();){var it=We.value;it.fromSpot=Oa,it.toSpot=aa}else for(Le.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ue),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=aa,it.toSpot=Oa;else if(0<=a.commentMargin)for(Le.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ue),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=aa,it.toSpot=Oa;else for(Le.h(a.bounds.x+a.commentMargin-Qe.width,a.bounds.y+ue),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=Oa,it.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(Le.h(a.bounds.x+ue,a.bounds.y-a.commentMargin-Qe.height),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=Ca,it.toSpot=ga;else for(Le.h(a.bounds.x+ue,a.bounds.y+2*a.focus.y-a.commentMargin),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=ga,it.toSpot=Ca;else if(0<=a.commentMargin)for(Le.h(a.bounds.x+ue,a.bounds.y+2*a.focus.y+a.commentMargin),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=ga,it.toSpot=Ca;else for(Le.h(a.bounds.x+ue,a.bounds.y+a.commentMargin-Qe.height),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=Ca,it.toSpot=ga;ue=0<=a.commentSpacing?ue+(Qe.width+a.commentSpacing):ue+(a.commentSpacing-Qe.width)}}if(st.free(Le),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)}},ni.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case Fv:hx(this,a);break;case Mg:if(a.alignment===Lu)hx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=gc(x)),b=My(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!b?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&b?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var E=Ml(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),Le=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var ze=a.nodeSpacing,We=this.computeNodeIndent(a),Qe=a.rowSpacing,it=0;(b||ge||a.hm||a.im&&a.maxGenerationCount===1)&&(it=Math.max(0,a.rowIndent)),b=a.width;var Tt=a.height,wt=0,jt=0,Ot=0,Bt=null,It=null,Xt=0,In=0,nr=0,$n=0,bn=0,hn=0,jr=0,Lr=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&&(Lr=Math.max(Lr,y?ne[wi].Da.width:ne[wi].Da.height));else ae===1&&(Lr=y?ne[0].Da.width:ne[0].Da.height);if(ye){switch(ue){case Lh:jt=135>E?cx(this,a,ne,Lr,wt,jt):fx(this,a,ne,Lr,wt,jt),Lr=jt.x,wt=jt.width,jt=jt.height;break;case Mh:for(Bt=0;Bt<ae;Bt++)It=ne[Bt],Le=It.Da,Ot=hn===0?0:Qe,y?(It.S.h(ee-Le.width,$n+Ot),wt=Math.max(wt,Le.width),jt=Math.max(jt,$n+Ot+Le.height),$n+=Ot+Le.height):(It.S.h(nr+Ot,ee-Le.height),wt=Math.max(wt,nr+Ot+Le.width),jt=Math.max(jt,Le.height),nr+=Ot+Le.width),hn++;break;case Zu:for(Bt=0;Bt<ae;Bt++)It=ne[Bt],ee=It.Da,Le=hn===0?0:Qe,y?(It.S.h(ze/2+a.focus.x,$n+Le),wt=Math.max(wt,ee.width),jt=Math.max(jt,$n+Le+ee.height),$n+=Le+ee.height):(It.S.h(nr+Le,ze/2+a.focus.y),wt=Math.max(wt,nr+Le+ee.width),jt=Math.max(jt,ee.height),nr+=Le+ee.width),hn++}Bt=vs(this,2),It=vs(this,2),y?(Bt[0].h(0,0),Bt[1].h(0,jt),It[0].h(wt,0)):(Bt[0].h(0,0),Bt[1].h(wt,0),It[0].h(0,jt)),It[1].h(wt,jt)}else for(wi=0;wi<ae;wi++){var Vi=ne[wi],Jo=Vi.Da;if(y){0<Le&&0<hn&&nr+ze+Jo.width>Le&&(nr<ee&&ef(a,ue,ee-nr,0,jr,wi-1),bn++,hn=0,jr=wi,Ot=jt,nr=0,$n=135<E?-jt-Qe:jt+Qe),Av(this,Vi,0,$n);var ea=0;if(hn===0)Bt=Vi.Yo,It=Vi.kp,Xt=Jo.width,In=Jo.height,(Bt===null||It===null||E!==Ml(Vi))&&(Bt=vs(this,2),It=vs(this,2),Bt[0].h(0,0),Bt[1].h(0,In),It[0].h(Xt,0),It[1].h(Xt,In));else{var Ia=Kn();In=dx(this,a,Vi,Bt,It,Xt,In,Ia),ea=In.x,Bt=Ia[0],It=Ia[1],Xt=In.width,In=In.height,Jn(Ia),nr<Jo.width&&0>ea&&(Uf(a,-ea,0,jr,wi-1),jv(Bt,-ea,0),jv(It,-ea,0),ea=0)}Vi.S.h(ea,$n),wt=Math.max(wt,Xt),jt=Math.max(jt,Ot+(bn===0?0:Qe)+Jo.height),nr=Xt}else 0<Le&&0<hn&&$n+ze+Jo.height>Le&&($n<ee&&ef(a,ue,0,ee-$n,jr,wi-1),bn++,hn=0,jr=wi,Ot=wt,$n=0,nr=135<E?-wt-Qe:wt+Qe),Av(this,Vi,nr,0),ea=0,hn===0?(Bt=Vi.Yo,It=Vi.kp,Xt=Jo.width,In=Jo.height,(Bt===null||It===null||E!==Ml(Vi))&&(Bt=vs(this,2),It=vs(this,2),Bt[0].h(0,0),Bt[1].h(Xt,0),It[0].h(0,In),It[1].h(Xt,In))):(Ia=Kn(),In=dx(this,a,Vi,Bt,It,Xt,In,Ia),ea=In.x,Bt=Ia[0],It=Ia[1],Xt=In.width,In=In.height,Jn(Ia),$n<Jo.height&&0>ea&&(Uf(a,0,-ea,jr,wi-1),jv(Bt,0,-ea),jv(It,0,-ea),ea=0)),Vi.S.h(nr,ea),jt=Math.max(jt,In),wt=Math.max(wt,Ot+(bn===0?0:Qe)+Jo.width),$n=In;hn++}switch(0<bn&&(y?(jt+=Math.max(0,x),nr<wt&&ef(a,ue,wt-nr,0,jr,ae-1),0<it&&(ge||Uf(a,it,0,0,ae-1),wt+=it)):(wt+=Math.max(0,x),$n<jt&&ef(a,ue,0,jt-$n,jr,ae-1),0<it&&(ge||Uf(a,0,it,0,ae-1),jt+=it))),it=ge=0,ue){case Jd:y?ge+=wt/2-a.focus.x-We/2:it+=jt/2-a.focus.y-We/2;break;case Wf:0<bn?y?ge+=wt/2-a.focus.x-We/2:it+=jt/2-a.focus.y-We/2:y?(Lr=ne[0].S.x+ne[0].la.x,ge+=Lr+(ne[ae-1].S.x+ne[ae-1].la.x+2*ne[ae-1].focus.x-Lr)/2-a.focus.x-We/2):(Lr=ne[0].S.y+ne[0].la.y,it+=Lr+(ne[ae-1].S.y+ne[ae-1].la.y+2*ne[ae-1].focus.y-Lr)/2-a.focus.y-We/2);break;case ku:y?(ge-=We,wt+=We):(it-=We,jt+=We);break;case Tu:y?(ge+=wt-a.width+We,wt+=We):(it+=jt-a.height+We,jt+=We);break;case Lh:y?1<ae?ge+=Lr+ze/2-a.focus.x:ge+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<ae?it+=Lr+ze/2-a.focus.y:it+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Mh:y?ge+=wt+ze/2-a.focus.x:it+=jt+ze/2-a.focus.y;break;case Zu:break;default:jt=this.customAlignment(a,ge,it,wt,jt),ge=jt[0],it=jt[1],wt=jt[2],jt=jt[3]}for(We=0;We<ae;We++)Lr=ne[We],y?Lr.S.h(Lr.S.x+Lr.la.x-ge,Lr.S.y+(135<E?(ye?-jt:-Lr.Da.height)+Lr.la.y-x:Tt+x+Lr.la.y)):Lr.S.h(Lr.S.x+(135<E?(ye?-wt:-Lr.Da.width)+Lr.la.x-x:b+x+Lr.la.x),Lr.S.y+Lr.la.y-it);if(ae=ne=0,ye?y?(wt=Ny(a,wt,ge),0>ge&&(ge=0),135<E&&(it+=jt+x),jt+=Tt+x,ue===Zu&&(ne+=ze/2+a.focus.x),ae+=Tt+x):(135<E&&(ge+=wt+x),wt+=b+x,jt=Ay(a,jt,it),0>it&&(it=0),ue===Zu&&(ae+=ze/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>wt&&(wt=jy(ue,b-wt,0),ne=wt.x,ae=wt.y,wt=b,ge=0):wt=Ny(a,wt,ge),0>ge&&(ne-=ge,ge=0),135<E&&(it+=jt+x),jt=Math.max(Math.max(jt,Tt),jt+Tt+x),ae+=Tt+x):(135<E&&(ge+=wt+x),wt=Math.max(Math.max(wt,b),wt+b+x),a.comments===null?Tt>jt&&(jt=jy(ue,0,Tt-jt),ne=jt.x,ae=jt.y,jt=Tt,it=0):jt=Ay(a,jt,it),0>it&&(ae-=it,it=0),ne+=b+x),0<bn)E=vs(this,4),bn=vs(this,4),y?(E[2].h(0,Tt+x),E[3].h(E[2].x,jt),bn[2].h(wt,E[2].y),bn[3].h(bn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(wt,E[2].y),bn[2].h(E[2].x,jt),bn[3].h(E[3].x,bn[2].y));else{for(E=vs(this,Bt.length+2),bn=vs(this,It.length+2),ue=0;ue<Bt.length;ue++)ye=Bt[ue],E[ue+2].h(ye.x+ne,ye.y+ae);for(ue=0;ue<It.length;ue++)ye=It[ue],bn[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])),bn[0].h(ge+b,0),bn[1].h(bn[0].x,Tt),bn[2].y<bn[1].y&&(bn[2].x<bn[0].x?bn[2].assign(bn[1]):bn[1].assign(bn[2])),bn[3].y<bn[2].y&&(bn[3].x<bn[0].x?bn[3].assign(bn[2]):bn[2].assign(bn[3])),E[2].y-=x/2,bn[2].y-=x/2):(E[0].h(0,it),E[1].h(b,E[0].y),E[2].x<E[1].x&&(E[2].y>E[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].x<E[2].x&&(E[3].y>E[0].y?E[3].assign(E[2]):E[2].assign(E[3])),bn[0].h(0,it+Tt),bn[1].h(b,bn[0].y),bn[2].x<bn[1].x&&(bn[2].y<bn[0].y?bn[2].assign(bn[1]):bn[1].assign(bn[2])),bn[3].x<bn[2].x&&(bn[3].y<bn[0].y?bn[3].assign(bn[2]):bn[2].assign(bn[3])),E[2].x-=x/2,bn[2].x-=x/2),zl(this,Bt),zl(this,It),a.Yo=E,a.kp=bn,a.la.h(ge,it),a.Da.h(wt,jt)}break;default:Mt("Unhandled compaction value "+a.compaction.toString())}}};function hx(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=gc(x));var E=My(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(b!==180&&b!==270||x)&&!E?y.la.h(0,0):b===180&&!x||(b===90||b===270)&&E?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{b=Ml(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,Le=ge===Tu;ae=gc(ge);var ze=Math.max(0,y.breadthLimit);ue=a.computeLayerSpacing(y);var We=y.nodeSpacing,Qe=a.computeNodeIndent(y),it=ye||Le?0:Qe/2,Tt=y.rowSpacing,wt=0;(ye||Le||y.hm||y.im&&y.maxGenerationCount===1)&&(wt=Math.max(0,y.rowIndent)),ye=y.width;var jt=y.height,Ot=0,Bt=0,It=0,Xt=0,In=0,nr=0,$n=0,bn=0,hn=0,jr=0;if(ae&&!Eg(ge)&&135<b&&E.reverse(),Eg(ge))if(1<ne)for(var Lr=0;Lr<ne;Lr++){var wi=E[Lr],Vi=wi.Da;Lr%2===0&&Lr!==ne-1?hn=Math.max(hn,(x?Vi.width:Vi.height)+a.computeBusNodeSpacing(wi)-We):Lr%2!==0&&(jr=Math.max(jr,(x?Vi.width:Vi.height)+a.computeBusNodeSpacing(wi)-We))}else ne===1&&(hn=x?E[0].Da.width:E[0].Da.height);if(ae)switch(ge){case Lh:case Lu:Bt=135>b?cx(a,y,E,hn,Ot,Bt):fx(a,y,E,hn,Ot,Bt),hn=Bt.x,Ot=Bt.width,Bt=Bt.height;break;case Mh:for(ze=0;ze<ne;ze++)it=E[ze],It=it.Da,jr=$n===0?0:Tt,x?(it.S.h(ee-It.width,In+jr),Ot=Math.max(Ot,It.width),Bt=Math.max(Bt,In+jr+It.height),In+=jr+It.height):(it.S.h(Xt+jr,ee-It.height),Ot=Math.max(Ot,Xt+jr+It.width),Bt=Math.max(Bt,It.height),Xt+=jr+It.width),$n++;break;case Zu:for(ee=0;ee<ne;ee++)ze=E[ee],it=ze.Da,It=$n===0?0:Tt,x?(ze.S.h(We/2+y.focus.x,In+It),Ot=Math.max(Ot,it.width),Bt=Math.max(Bt,In+It+it.height),In+=It+it.height):(ze.S.h(Xt+It,We/2+y.focus.y),Ot=Math.max(Ot,Xt+It+it.width),Bt=Math.max(Bt,it.height),Xt+=It+it.width),$n++}else for(jr=0;jr<ne;jr++)Lr=E[jr],wi=Lr.Da,x?(0<ze&&0<$n&&Xt+We+wi.width>ze&&(Xt<ee&&ef(y,ge,ee-Xt,0,bn,jr-1),nr++,$n=0,bn=jr,It=Bt,Xt=0,In=135<b?-Bt-Tt:Bt+Tt),Vi=$n===0?it:We,Av(a,Lr,0,In),Lr.S.h(Xt+Vi,In),Ot=Math.max(Ot,Xt+Vi+wi.width),Bt=Math.max(Bt,It+(nr===0?0:Tt)+wi.height),Xt+=Vi+wi.width):(0<ze&&0<$n&&In+We+wi.height>ze&&(In<ee&&ef(y,ge,0,ee-In,bn,jr-1),nr++,$n=0,bn=jr,It=Ot,In=0,Xt=135<b?-Ot-Tt:Ot+Tt),Vi=$n===0?it:We,Av(a,Lr,Xt,0),Lr.S.h(Xt,In+Vi),Bt=Math.max(Bt,In+Vi+wi.height),Ot=Math.max(Ot,It+(nr===0?0:Tt)+wi.width),In+=Vi+wi.height),$n++;switch(0<nr&&(x?(Bt+=Math.max(0,ue),Xt<Ot&&ef(y,ge,Ot-Xt,0,bn,ne-1),0<wt&&(Le||Uf(y,wt,0,0,ne-1),Ot+=wt)):(Ot+=Math.max(0,ue),In<Bt&&ef(y,ge,0,Bt-In,bn,ne-1),0<wt&&(Le||Uf(y,0,wt,0,ne-1),Bt+=wt))),wt=Le=0,ge){case Jd:x?Le+=Ot/2-y.focus.x-Qe/2:wt+=Bt/2-y.focus.y-Qe/2;break;case Wf:0<nr?x?Le+=Ot/2-y.focus.x-Qe/2:wt+=Bt/2-y.focus.y-Qe/2:x?(a=E[0].S.x+E[0].la.x,Le+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-Qe/2):(a=E[0].S.y+E[0].la.y,wt+=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?(Le-=Qe,Ot+=Qe):(wt-=Qe,Bt+=Qe);break;case Tu:x?(Le+=Ot-y.width+Qe,Ot+=Qe):(wt+=Bt-y.height+Qe,Bt+=Qe);break;case Lh:case Lu:x?1<ne?Le+=hn+We/2-y.focus.x:Le+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?wt+=hn+We/2-y.focus.y:wt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Mh:x?Le+=Ot+We/2-y.focus.x:wt+=Bt+We/2-y.focus.y;break;case Zu:break;default:a=a.customAlignment(y,Le,wt,Ot,Bt),Le=a[0],wt=a[1],Ot=a[2],Bt=a[3]}for(a=0;a<ne;a++)Qe=E[a],x?Qe.S.h(Qe.S.x+Qe.la.x-Le,Qe.S.y+(135<b?(ae?-Bt:-Qe.Da.height)+Qe.la.y-ue:jt+ue+Qe.la.y)):Qe.S.h(Qe.S.x+(135<b?(ae?-Ot:-Qe.Da.width)+Qe.la.x-ue:ye+ue+Qe.la.x),Qe.S.y+Qe.la.y-wt);x?(Ot=Ny(y,Ot,Le),0>Le&&(Le=0),135<b&&(wt+=Bt+ue),Bt=Math.max(Math.max(Bt,jt),Bt+jt+ue)):(135<b&&(Le+=Ot+ue),Ot=Math.max(Math.max(Ot,ye),Ot+ye+ue),Bt=Ay(y,Bt,wt),0>wt&&(wt=0)),y.la.h(Le,wt),y.Da.h(Ot,Bt)}}ni.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 qt(b,0,E,ee);if(ne===1)return y=x[0],E=y.Da.width,ee=y.Da.height,new qt(b,0,E,ee);for(var ae=y.nodeSpacing,ue=y.rowSpacing,ge=Ml(y)===90,ye=0,Le=0,ze=0,We=0;We<ne;We++)if(!(We%2!==0||1<ne&&We===ne-1)){var Qe=x[We],it=Qe.Da,Tt=ye===0?0:ue;if(ge){var wt=a.computeBusNodeSpacing(Qe)-ae;Qe.S.h(b-(it.width+wt),ze+Tt),E=Math.max(E,it.width+wt),ee=Math.max(ee,ze+Tt+it.height),ze+=Tt+it.height}else wt=a.computeBusNodeSpacing(Qe)-ae,Qe.S.h(Le+Tt,b-(it.height+wt)),ee=Math.max(ee,it.height+wt),E=Math.max(E,Le+Tt+it.width),Le+=Tt+it.width;ye++}for(ye=0,Qe=Le,We=ze,ge?(Le=b+ae,ze=0):(Le=0,ze=b+ae),it=0;it<ne;it++)if(it%2!==0){Tt=x[it],wt=Tt.Da;var jt=ye===0?0:ue;if(ge){var Ot=a.computeBusNodeSpacing(Tt)-ae;Tt.S.h(Le+Ot,ze+jt),E=Math.max(E,Le+wt.width+Ot),ee=Math.max(ee,ze+jt+wt.height),ze+=jt+wt.height}else Ot=a.computeBusNodeSpacing(Tt)-ae,Tt.S.h(Le+jt,ze+Ot),E=Math.max(E,Le+jt+wt.width),ee=Math.max(ee,ze+wt.height+Ot),Le+=jt+wt.width;ye++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,ge?Math.max(Math.abs(We),Math.abs(ze)):Math.max(Math.abs(Qe),Math.abs(Le))),ge?(x.S.h(b+ae/2-x.focus.x-x.la.x,ee+a),ge=b+ae/2-x.focus.x-x.la.x,E=Math.max(E,ge+ne.width),0>ge&&(E-=ge),ee=Math.max(ee,Math.max(We,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,Le)+a+ne.width),ze=b+ae/2-x.focus.y-x.la.y,ee=Math.max(ee,ze+ne.height),0>ze&&(ee-=ze),0>x.S.y&&(b=Nv(y,x.S.y,!0,b,ae)))),new qt(b,0,E,ee)}function fx(a,y,x,b,E,ee){var ne=x.length;if(ne===0)return new qt(b,0,E,ee);if(ne===1)return x=x[0],E=x.Da.width,ee=x.Da.height,new qt(b,0,E,ee);for(var ae=y.nodeSpacing,ue=y.rowSpacing,ge=Ml(y)===270,ye=0,Le=0,ze=0,We=0;We<ne;We++)if(!(We%2!==0||1<ne&&We===ne-1)){var Qe=x[We],it=Qe.Da,Tt=ye===0?0:ue;if(ge){var wt=a.computeBusNodeSpacing(Qe)-ae;ze-=Tt+it.height,Qe.S.h(b-(it.width+wt),ze),E=Math.max(E,it.width+wt),ee=Math.max(ee,Math.abs(ze))}else wt=a.computeBusNodeSpacing(Qe)-ae,Le-=Tt+it.width,Qe.S.h(Le,b-(it.height+wt)),ee=Math.max(ee,it.height+wt),E=Math.max(E,Math.abs(Le));ye++}for(ye=0,Qe=Le,We=ze,ge?(Le=b+ae,ze=0):(Le=0,ze=b+ae),it=0;it<ne;it++)if(it%2!==0){Tt=x[it],wt=Tt.Da;var jt=ye===0?0:ue;if(ge){var Ot=a.computeBusNodeSpacing(Tt)-ae;ze-=jt+wt.height,Tt.S.h(Le+Ot,ze),E=Math.max(E,Le+wt.width+Ot),ee=Math.max(ee,Math.abs(ze))}else Ot=a.computeBusNodeSpacing(Tt)-ae,Le-=jt+wt.width,Tt.S.h(Le,ze+Ot),ee=Math.max(ee,ze+wt.height+Ot),E=Math.max(E,Math.abs(Le));ye++}for(1<ne&&ne%2===1&&(ue=x[ne-1],ye=ue.Da,a=a.computeBusLastRowSpacing(ue,ge?Math.max(Math.abs(We),Math.abs(ze)):Math.max(Math.abs(Qe),Math.abs(Le))),ge?(ue.S.h(b+ae/2-ue.focus.x-ue.la.x,-ee-ye.height-a),Le=b+ae/2-ue.focus.x-ue.la.x,E=Math.max(E,Le+ye.width),0>Le&&(E-=Le),ee=Math.max(ee,Math.abs(Math.min(We,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,Le))+a+ye.width),ze=b+ae/2-ue.focus.y-ue.la.y,ee=Math.max(ee,ze+ye.height),0>ze&&(ee-=ze),0>ue.S.y&&(b=Nv(y,ue.S.y,!0,b,ae)))),y=0;y<ne;y++)ae=x[y],ge?ae.S.h(ae.S.x,ae.S.y+ee):ae.S.h(ae.S.x+E,ae.S.y);return new qt(b,0,E,ee)}ni.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},ni.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 Lh:case Lu:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Mh:return a.width-a.focus.x+a.nodeSpacing/2+y;case 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 Lh:case Lu:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Mh:return a.height-a.focus.y+a.nodeSpacing/2+y;case 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:Mt("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:Mt("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=Ml(y),ge=ue===90||ue===270,ye=y.nodeSpacing;y=b;var Le=E;b=ee;var ze=ne,We=x.Yo,Qe=x.kp;ne=x.Da;var it=ge?Math.max(ze,ne.height):Math.max(b,ne.width);if((We===null||ue!==Ml(x))&&(We=vs(a,2),Qe=vs(a,2),ge?(We[0].h(0,0),We[1].h(0,ne.height),Qe[0].h(ne.width,0),Qe[1].h(Qe[0].x,We[1].y)):(We[0].h(0,0),We[1].h(ne.width,0),Qe[0].h(0,ne.height),Qe[1].h(We[1].x,Qe[0].y))),ge){if(ze=9999999,!(Le===null||2>Le.length||We===null||2>We.length))for(E=x=0;x<Le.length&&E<We.length;){ee=Le[x];var Tt=We[E];ue=Tt.x,ge=Tt.y,ue+=b;var wt=ee;x+1<Le.length&&(wt=Le[x+1]);var jt=Tt;Tt=jt.x,jt=jt.y,E+1<We.length&&(jt=We[E+1],Tt=jt.x,jt=jt.y,Tt+=b);var Ot=ze;ee.y===ge?Ot=ue-ee.x:ee.y>ge&&ee.y<jt?Ot=ue+(ee.y-ge)/(jt-ge)*(Tt-ue)-ee.x:ge>ee.y&&ge<wt.y&&(Ot=ue-(ee.x+(ge-ee.y)/(wt.y-ee.y)*(wt.x-ee.x))),Ot<ze&&(ze=Ot),wt.y<=ee.y?x++:jt<=ge?E++:(wt.y<=jt&&x++,jt<=wt.y&&E++)}if(ze=b-ze,ze+=ye,x=We,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,Le===null||2>Le.length||ee===null||2>ee.length)E=null;else{for(ye=vs(a,Le.length+ee.length),E=ge=x=0;x<Le.length&&Le[x].y<ee[0].y;)wt=Le[x++],ye[E++].h(wt.x,wt.y);for(;ge<ee.length;)wt=ee[ge++],ye[E++].h(wt.x+ue,wt.y);for(ee=ee[ee.length-1].y;x<Le.length&&Le[x].y<=ee;)x++;for(;x<Le.length&&Le[x].y>ee;)ue=Le[x++],ye[E++].h(ue.x,ue.y);for(ee=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=it,zl(a,y),zl(a,We),zl(a,Le),zl(a,Qe),ae[0]=b,ae[1]=E,new qt(ze,0,ee,ne)}if(b=9999999,!(Le===null||2>Le.length||We===null||2>We.length))for(E=x=0;x<Le.length&&E<We.length;)ee=Le[x],Tt=We[E],ue=Tt.x,ge=Tt.y,ge+=ze,wt=ee,x+1<Le.length&&(wt=Le[x+1]),jt=Tt,Tt=jt.x,jt=jt.y,E+1<We.length&&(jt=We[E+1],Tt=jt.x,jt=jt.y,jt+=ze),Ot=b,ee.x===ue?Ot=ge-ee.y:ee.x>ue&&ee.x<Tt?Ot=ge+(ee.x-ue)/(Tt-ue)*(jt-ge)-ee.y:ue>ee.x&&ue<wt.x&&(Ot=ge-(ee.y+(ue-ee.x)/(wt.x-ee.x)*(wt.y-ee.y))),Ot<b&&(b=Ot),wt.x<=ee.x?x++:Tt<=ue?E++:(wt.x<=Tt&&x++,Tt<=wt.x&&E++);if(ze-=b,ze+=ye,x=We,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,Le===null||2>Le.length||ee===null||2>ee.length)E=null;else{for(ye=vs(a,Le.length+ee.length),E=ge=x=0;x<Le.length&&Le[x].x<ee[0].x;)wt=Le[x++],ye[E++].h(wt.x,wt.y);for(;ge<ee.length;)wt=ee[ge++],ye[E++].h(wt.x,wt.y+ue);for(ee=ee[ee.length-1].x;x<Le.length&&Le[x].x<=ee;)x++;for(;x<Le.length&&Le[x].x>ee;)ue=Le[x++],ye[E++].h(ue.x,ue.y);for(ee=vs(a,E),x=0;x<E;x++)ee[x].assign(ye[x]);zl(a,ye),E=ee}return ee=it,ne=Math.max(0,ze)+ne.height,zl(a,y),zl(a,We),zl(a,Le),zl(a,Qe),ae[0]=b,ae[1]=E,new qt(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)}ni.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 Lg:a.sort(this.comparer),a.reverse();break;default:Mt("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:Mt("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)}}}ni.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},ni.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},ni.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 qt(0,ee,x,ae))):this.angle===90?(E.push(new qt(0,ee,x,ae)),ee+=ae):this.angle===180?(ee-=ae,E.push(new qt(ee,0,ae,x))):(E.push(new qt(ee,0,ae,x)),ee+=ae)}this.commitLayers(E,b)}},ni.prototype.commitLayers=function(){},ni.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},ni.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])}}ni.prototype.setPortSpots=function(a){var y=a.alignment;if(gc(y)){var x=this.ud===Eu,b=Ml(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 Lh:case Lu: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 Mh: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=Ml(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 Ml(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}ni.prototype.computeLayerSpacing=function(a){var y=Ml(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},ni.prototype.computeNodeIndent=function(a){var y=Ml(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)},Ut.Object.defineProperties(ni.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&&!Lg||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):Mt("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==Fv&&a!==Mg||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit},set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!==a&&(this.W.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.D(a)||(this.W.portSpot=a,this.C())}},setsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.D(a)||(this.W.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==Yd&&a!==kg&&a!==Tg&&!Lg||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||a!==0&&a!==90&&a!==180&&a!==270||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!==a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing},set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==Fv&&a!==Mg||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.C())}},alternateSetsPortSpot:{get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.D(a)||(this.Y.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.D(a)||(this.Y.childPortSpot=a,this.C())}}});var Ov=new pn(ni,"PathDefault",-1),Eu=new pn(ni,"PathDestination",0),Hf=new pn(ni,"PathSource",1),Yd=new pn(ni,"SortingForwards",10),kg=new pn(ni,"SortingReverse",11),Tg=new pn(ni,"SortingAscending",12),Lg=new pn(ni,"SortingDescending",13),Jd=new pn(ni,"AlignmentCenterSubtrees",20),Wf=new pn(ni,"AlignmentCenterChildren",21),ku=new pn(ni,"AlignmentStart",22),Tu=new pn(ni,"AlignmentEnd",23),Lh=new pn(ni,"AlignmentBus",24),Lu=new pn(ni,"AlignmentBusBranching",25),Mh=new pn(ni,"AlignmentTopLeftBus",26),Zu=new pn(ni,"AlignmentBottomRightBus",27),Fv=new pn(ni,"CompactionNone",30),Mg=new pn(ni,"CompactionBlock",31),Dv=new pn(ni,"StyleLayered",40),Fy=new pn(ni,"StyleLastParents",41),Dy=new pn(ni,"StyleAlternating",42),By=new pn(ni,"StyleRootOnly",43),Bv=new pn(ni,"ArrangementVertical",50),Ry=new pn(ni,"ArrangementHorizontal",51),Rv=new pn(ni,"ArrangementFixedRoots",52),Iy=new pn(ni,"LayerIndividual",60),_y=new pn(ni,"LayerSiblings",61),Iv=new pn(ni,"LayerUniform",62);ni.className="TreeLayout",ni.PathDefault=Ov,ni.PathDestination=Eu,ni.PathSource=Hf,ni.SortingForwards=Yd,ni.SortingReverse=kg,ni.SortingAscending=Tg,ni.SortingDescending=Lg,ni.AlignmentCenterSubtrees=Jd,ni.AlignmentCenterChildren=Wf,ni.AlignmentStart=ku,ni.AlignmentEnd=Tu,ni.AlignmentBus=Lh,ni.AlignmentBusBranching=Lu,ni.AlignmentTopLeftBus=Mh,ni.AlignmentBottomRightBus=Zu,ni.CompactionNone=Fv,ni.CompactionBlock=Mg,ni.StyleLayered=Dv,ni.StyleLastParents=Fy,ni.StyleAlternating=Dy,ni.StyleRootOnly=By,ni.ArrangementVertical=Bv,ni.ArrangementHorizontal=Ry,ni.ArrangementFixedRoots=Rv,ni.LayerIndividual=Iy,ni.LayerSiblings=_y,ni.LayerUniform=Iv;function Kf(a){Xi.call(this,a)}Zt(Kf,Xi),Kf.prototype.createVertex=function(){return new gl(this)},Kf.prototype.createEdge=function(){return new Qd(this)},Kf.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 cn(0,0),this.la=new st(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Yd,this.hd=oy,this.Kb=0,this.Jb=Wf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Mg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Zo,this.wr=!0,this.Dp=Zo}Zt(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)},Ut.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){Ls.call(this,a),this.$t=new st(0,0)}Zt(Qd,Ls),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:Mt("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=Ml(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 Le=a.i(1),ze=a.i(2)}else{for(ye=1;3<a.pointsCount;)a.pv(1);Le=a.i(0),ze=a.i(a.pointsCount-1)}var We=a.i(a.pointsCount-1);ee===0?(x.alignment===Tu?(ee=b.bottom+E.y,E.y===0&&Le.y>We.y+x.rowIndent&&(ee=Math.min(ee,Math.max(Le.y,ee-y.computeNodeIndent(x))))):x.alignment===ku?(ee=b.top+E.y,E.y===0&&Le.y<We.y-x.rowIndent&&(ee=Math.max(ee,Math.min(Le.y,ee+y.computeNodeIndent(x))))):ee=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,ue?(a.m(ye,Le.x,ee),ye++,a.m(ye,b.right+ne,ee),ye++,a.m(ye,b.right+ne+(E.x-ae)/3,ee),ye++,a.m(ye,b.right+ne+2*(E.x-ae)/3,ee),ye++,a.m(ye,b.right+ne+(E.x-ae),ee),ye++,a.m(ye,ze.x,ee)):(ge&&(a.m(ye,b.right+ne/2,Le.y),ye++),a.m(ye,b.right+ne/2,ee),ye++,a.m(ye,b.right+ne+E.x-(ge?ae/2:ae),ee),ye++,ge&&a.m(ye,a.i(ye-1).x,ze.y))):ee===90?(x.alignment===Tu?(ee=b.right+E.x,E.x===0&&Le.x>We.x+x.rowIndent&&(ee=Math.min(ee,Math.max(Le.x,ee-y.computeNodeIndent(x))))):x.alignment===ku?(ee=b.left+E.x,E.x===0&&Le.x<We.x-x.rowIndent&&(ee=Math.max(ee,Math.min(Le.x,ee+y.computeNodeIndent(x))))):ee=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,ue?(a.m(ye,ee,Le.y),ye++,a.m(ye,ee,b.bottom+ne),ye++,a.m(ye,ee,b.bottom+ne+(E.y-ae)/3),ye++,a.m(ye,ee,b.bottom+ne+2*(E.y-ae)/3),ye++,a.m(ye,ee,b.bottom+ne+(E.y-ae)),ye++,a.m(ye,ee,ze.y)):(ge&&(a.m(ye,Le.x,b.bottom+ne/2),ye++),a.m(ye,ee,b.bottom+ne/2),ye++,a.m(ye,ee,b.bottom+ne+E.y-(ge?ae/2:ae)),ye++,ge&&a.m(ye,ze.x,a.i(ye-1).y))):ee===180?(x.alignment===Tu?(ee=b.bottom+E.y,E.y===0&&Le.y>We.y+x.rowIndent&&(ee=Math.min(ee,Math.max(Le.y,ee-y.computeNodeIndent(x))))):x.alignment===ku?(ee=b.top+E.y,E.y===0&&Le.y<We.y-x.rowIndent&&(ee=Math.max(ee,Math.min(Le.y,ee+y.computeNodeIndent(x))))):ee=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,ue?(a.m(ye,Le.x,ee),ye++,a.m(ye,b.left-ne,ee),ye++,a.m(ye,b.left-ne+(E.x+ae)/3,ee),ye++,a.m(ye,b.left-ne+2*(E.x+ae)/3,ee),ye++,a.m(ye,b.left-ne+(E.x+ae),ee),ye++,a.m(ye,ze.x,ee)):(ge&&(a.m(ye,b.left-ne/2,Le.y),ye++),a.m(ye,b.left-ne/2,ee),ye++,a.m(ye,b.left-ne+E.x+(ge?ae/2:ae),ee),ye++,ge&&a.m(ye,a.i(ye-1).x,ze.y))):ee===270?(x.alignment===Tu?(ee=b.right+E.x,E.x===0&&Le.x>We.x+x.rowIndent&&(ee=Math.min(ee,Math.max(Le.x,ee-y.computeNodeIndent(x))))):x.alignment===ku?(ee=b.left+E.x,E.x===0&&Le.x<We.x-x.rowIndent&&(ee=Math.max(ee,Math.min(Le.x,ee+y.computeNodeIndent(x))))):ee=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,ue?(a.m(ye,ee,Le.y),ye++,a.m(ye,ee,b.top-ne),ye++,a.m(ye,ee,b.top-ne+(E.y+ae)/3),ye++,a.m(ye,ee,b.top-ne+2*(E.y+ae)/3),ye++,a.m(ye,ee,b.top-ne+(E.y+ae)),ye++,a.m(ye,ee,ze.y)):(ge&&(a.m(ye,Le.x,b.top-ne/2),ye++),a.m(ye,ee,b.top-ne/2),ye++,a.m(ye,ee,b.top-ne+E.y+(ge?ae/2:ae)),ye++,ge&&a.m(ye,ze.x,a.i(ye-1).y))):Mt("Invalid angle "+ee),a.zf()}else E=b,a=this.link,b=this.network.layout,y=Ml(x),y!==Ml(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()))}}},Ut.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",Qi.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 Va,this.mouseDownTools),this.gb("Resizing",new Pa,this.mouseDownTools),this.gb("Linking",new Ka,this.mouseMoveTools),this.gb("Dragging",new uo,this.mouseMoveTools),this.gb("DragSelecting",new Ks,this.mouseMoveTools),this.gb("Panning",new va,this.mouseMoveTools),this.gb("ContextMenu",new Za,this.mouseUpTools),this.gb("TextEditing",new qi,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 Kp),ru("Grid",new Wp),xd.add("GraphLinksModel",qo),xd.add("TreeModel",el);var _v=xn.go,zy={get licenseKey(){return Jt.licenseKey},set licenseKey(a){Jt.licenseKey=a},get version(){return Jt.version},Group:Or,EnumValue:pn,List:on,Set:an,Map:$t,Point:st,Size:cn,Rect:qt,Margin:Ir,Spot:ar,Geometry:wn,PathFigure:Fo,PathSegment:Si,InputEvent:ma,DiagramEvent:hu,ChangedEvent:ao,Model:hr,GraphLinksModel:pi,TreeModel:ts,Binding:Lo,Transaction:Uo,UndoManager:ho,CommandHandler:kt,Tool:yi,DraggingTool:uo,DraggingInfo:Gu,DraggingOptions:ce,LinkingBaseTool:yo,LinkingTool:Ka,RelinkingTool:Bs,LinkReshapingTool:ko,ResizingTool:Pa,RotatingTool:Va,ClickSelectingTool:Uh,ActionTool:ll,ClickCreatingTool:uh,HTMLInfo:$l,ContextMenuTool:Za,DragSelectingTool:Ks,PanningTool:va,TextEditingTool:qi,ToolManager:Qi,Animation:ya,AnimationManager:Es,AnimationTrigger:wl,Layer:ra,Diagram:Jt,Palette:Ce,Overview:Oe,Brush:Fi,GraphObject:_t,Panel:yn,RowColumnDefinition:Io,Shape:Gr,TextBlock:Zi,Picture:us,Part:yr,Adornment:xi,Node:Wn,Link:Pn,Placeholder:Qa,Layout:lo,LayoutNetwork:Xi,LayoutVertex:Wo,LayoutEdge:Ls,GridLayout:ha,PanelLayout:Ho,CircularLayout:fo,CircularNetwork:Vd,CircularVertex:Sg,CircularEdge:Sv,ForceDirectedLayout:xa,ForceDirectedNetwork:Gf,ForceDirectedVertex:xg,ForceDirectedEdge:wg,LayeredDigraphLayout:Ri,LayeredDigraphNetwork:Xd,LayeredDigraphVertex:nl,LayeredDigraphEdge:Cg,TreeLayout:ni,TreeNetwork:Kf,TreeVertex:gl,TreeEdge:Qd};typeof _v=="object"&&_v.version&&zn("WARNING: a `go` object on the root object is already defined. "+("Debug"in _v?"debug ":"")+"version: "+_v.version+", replaced with version: "+zy.version),Jt.prototype.go=zy,xn.go=zy,typeof _n.exports=="object"&&(_n.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,Ae=Gt.Margin,me=Gt.Spot,be=Gt.Geometry,fe=Gt.PathFigure,z=Gt.PathSegment,te=Gt.InputEvent,se=Gt.DiagramEvent,ie=Gt.ChangedEvent,le=Gt.Model,he=Gt.GraphLinksModel,pe=Gt.TreeModel,xe=Gt.Binding,je=Gt.Transaction,De=Gt.UndoManager,Fe=Gt.CommandHandler,Te=Gt.Tool,Me=Gt.DraggingTool,Be=Gt.DraggingInfo,Ge=Gt.LinkingBaseTool,Ye=Gt.LinkingTool,Ke=Gt.RelinkingTool,Xe=Gt.LinkReshapingTool,ot=Gt.ResizingTool,lt=Gt.RotatingTool,ct=Gt.ClickSelectingTool,Ct=Gt.ActionTool,Je=Gt.ClickCreatingTool,rt=Gt.HTMLInfo,xt=Gt.ContextMenuTool,bt=Gt.DragSelectingTool,Pt=Gt.PanningTool,ht=Gt.TextEditingTool,St=Gt.ToolManager,mt=Gt.Animation,Nt=Gt.AnimationManager,dt=Gt.AnimationTrigger,Dt=Gt.Layer,gt=Gt.Diagram,yt=Gt.Palette,tt=Gt.Overview,He=Gt.Brush,we=Gt.GraphObject,Ne=Gt.Panel,Ve=Gt.RowColumnDefinition,nt=Gt.Shape,Re=Gt.TextBlock,_e=Gt.TextBlockMetrics,Ze=Gt.Picture,qe=Gt.Part,ut=Gt.Adornment,vt=Gt.Node,At=Gt.Link,Et=Gt.Placeholder,Ft=Gt.Layout,Kt=Gt.LayoutNetwork,Yt=Gt.LayoutVertex,Vt=Gt.LayoutEdge,Ht=Gt.GridLayout,sn=Gt.PanelLayout,rn=Gt.CircularLayout,un=Gt.CircularNetwork,Sn=Gt.CircularVertex,vn=Gt.CircularEdge,Cn=Gt.ForceDirectedLayout,On=Gt.ForceDirectedNetwork,Dr=Gt.ForceDirectedVertex,Sr=Gt.ForceDirectedEdge,qr=Gt.LayeredDigraphLayout,tr=Gt.LayeredDigraphNetwork,ai=Gt.LayeredDigraphVertex,gi=Gt.LayeredDigraphEdge,fi=Gt.TreeLayout,Di=Gt.TreeNetwork,ki=Gt.TreeVertex,Jr=Gt.TreeEdge,Li=Gt.version},2859:function(_n,Mn,ft){"use strict";ft.d(Mn,{hP:function(){return tt}});var at=function(He,we){return(at=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ne,Ve){Ne.__proto__=Ve}||function(Ne,Ve){for(var nt in Ve)Object.prototype.hasOwnProperty.call(Ve,nt)&&(Ne[nt]=Ve[nt])})(He,we)};function Gt(He,we){function Ne(){this.constructor=He}at(He,we),He.prototype=we===null?Object.create(we):(Ne.prototype=we.prototype,new Ne)}function oe(He,we,Ne,Ve){return new(Ne||(Ne=Promise))(function(nt,Re){function _e(ut){try{qe(Ve.next(ut))}catch(vt){Re(vt)}}function Ze(ut){try{qe(Ve.throw(ut))}catch(vt){Re(vt)}}function qe(ut){var vt;ut.done?nt(ut.value):(vt=ut.value,vt instanceof Ne?vt:new Ne(function(At){At(vt)})).then(_e,Ze)}qe((Ve=Ve.apply(He,we||[])).next())})}function Ue(He,we){var Ne,Ve,nt,Re,_e={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return Re={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(Re[Symbol.iterator]=function(){return this}),Re;function Ze(qe){return function(ut){return function(vt){if(Ne)throw new TypeError("Generator is already executing.");for(;_e;)try{if(Ne=1,Ve&&(nt=2&vt[0]?Ve.return:vt[0]?Ve.throw||((nt=Ve.return)&&nt.call(Ve),0):Ve.next)&&!(nt=nt.call(Ve,vt[1])).done)return nt;switch(Ve=0,nt&&(vt=[2&vt[0],nt.value]),vt[0]){case 0:case 1:nt=vt;break;case 4:return _e.label++,{value:vt[1],done:!1};case 5:_e.label++,Ve=vt[1],vt=[0];continue;case 7:vt=_e.ops.pop(),_e.trys.pop();continue;default:if(nt=_e.trys,!((nt=nt.length>0&&nt[nt.length-1])||vt[0]!==6&&vt[0]!==2)){_e=0;continue}if(vt[0]===3&&(!nt||vt[1]>nt[0]&&vt[1]<nt[3])){_e.label=vt[1];break}if(vt[0]===6&&_e.label<nt[1]){_e.label=nt[1],nt=vt;break}if(nt&&_e.label<nt[2]){_e.label=nt[2],_e.ops.push(vt);break}nt[2]&&_e.ops.pop(),_e.trys.pop();continue}vt=we.call(He,_e)}catch(At){vt=[6,At],Ve=0}finally{Ne=nt=0}if(5&vt[0])throw vt[1];return{value:vt[0]?vt[1]:void 0,done:!0}}([qe,ut])}}}function Ie(){for(var He=0,we=0,Ne=arguments.length;we<Ne;we++)He+=arguments[we].length;var Ve=Array(He),nt=0;for(we=0;we<Ne;we++)for(var Re=arguments[we],_e=0,Ze=Re.length;_e<Ze;_e++,nt++)Ve[nt]=Re[_e];return Ve}var de=function(){function He(){}return He.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},He.setAttributes=function(we,Ne){for(var Ve=0,nt=Ne;Ve<nt.length;Ve++){var Re=nt[Ve],_e=Re[0],Ze=Re[1];we.setAttribute(_e,Ze)}},He.createRect=function(we,Ne,Ve){var nt=document.createElementNS("http://www.w3.org/2000/svg","rect");return nt.setAttribute("width",we.toString()),nt.setAttribute("height",Ne.toString()),Ve&&He.setAttributes(nt,Ve),nt},He.createLine=function(we,Ne,Ve,nt,Re){var _e=document.createElementNS("http://www.w3.org/2000/svg","line");return _e.setAttribute("x1",we.toString()),_e.setAttribute("y1",Ne.toString()),_e.setAttribute("x2",Ve.toString()),_e.setAttribute("y2",nt.toString()),Re&&He.setAttributes(_e,Re),_e},He.createPolygon=function(we,Ne){var Ve=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ve.setAttribute("points",we),Ne&&He.setAttributes(Ve,Ne),Ve},He.createCircle=function(we,Ne){var Ve=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ve.setAttribute("cx",(we/2).toString()),Ve.setAttribute("cy",(we/2).toString()),Ve.setAttribute("r",we.toString()),Ne&&He.setAttributes(Ve,Ne),Ve},He.createEllipse=function(we,Ne,Ve){var nt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return nt.setAttribute("cx",(we/2).toString()),nt.setAttribute("cy",(Ne/2).toString()),nt.setAttribute("rx",(we/2).toString()),nt.setAttribute("ry",(Ne/2).toString()),Ve&&He.setAttributes(nt,Ve),nt},He.createGroup=function(we){var Ne=document.createElementNS("http://www.w3.org/2000/svg","g");return we&&He.setAttributes(Ne,we),Ne},He.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},He.createMarker=function(we,Ne,Ve,nt,Re,_e,Ze){var qe=document.createElementNS("http://www.w3.org/2000/svg","marker");return He.setAttributes(qe,[["id",we],["orient",Ne],["markerWidth",Ve.toString()],["markerHeight",nt.toString()],["refX",Re.toString()],["refY",_e.toString()]]),qe.appendChild(Ze),qe},He.createText=function(we){var Ne=document.createElementNS("http://www.w3.org/2000/svg","text");return Ne.setAttribute("x","0"),Ne.setAttribute("y","0"),we&&He.setAttributes(Ne,we),Ne},He.createTSpan=function(we,Ne){var Ve=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ve.textContent=we,Ne&&He.setAttributes(Ve,Ne),Ve},He.createImage=function(we){var Ne=document.createElementNS("http://www.w3.org/2000/svg","image");return we&&He.setAttributes(Ne,we),Ne},He.createPoint=function(we,Ne){var Ve=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ve.x=we,Ve.y=Ne,Ve},He.createPath=function(we,Ne){var Ve=document.createElementNS("http://www.w3.org/2000/svg","path");return Ve.setAttribute("d",we),Ne&&He.setAttributes(Ve,Ne),Ve},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,Ne,Ve){var nt=this;return new Promise(function(Re){var _e=Ve!==void 0?Ve:document.createElement("canvas");we===null&&(nt.markersOnly=!0,nt.naturalSize=!1);var Ze=document.createElementNS("http://www.w3.org/2000/svg","svg");Ze.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ze.setAttribute("width",Ne.width.baseVal.valueAsString),Ze.setAttribute("height",Ne.height.baseVal.valueAsString),Ze.setAttribute("viewBox","0 0 "+Ne.viewBox.baseVal.width.toString()+" "+Ne.viewBox.baseVal.height.toString()),Ze.innerHTML=Ne.innerHTML,nt.naturalSize===!0?(Ze.width.baseVal.value=we.naturalWidth,Ze.height.baseVal.value=we.naturalHeight):nt.width!==void 0&&nt.height!==void 0&&(Ze.width.baseVal.value=nt.width,Ze.height.baseVal.value=nt.height),_e.width=Ze.width.baseVal.value,_e.height=Ze.height.baseVal.value;var qe=Ze.outerHTML,ut=_e.getContext("2d");nt.markersOnly!==!0&&ut.drawImage(we,0,0,_e.width,_e.height);var vt=window.URL,At=new Image(_e.width,_e.height);At.setAttribute("crossOrigin","anonymous");var Et=new Blob([qe],{type:"image/svg+xml"}),Ft=vt.createObjectURL(Et);At.onload=function(){ut.drawImage(At,0,0),vt.revokeObjectURL(Ft);var Kt=_e.toDataURL(nt.imageType,nt.imageQuality);Re(Kt)},At.src=Ft})},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 Ae("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ae("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Ae("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new me("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new me("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},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}(),Ae=function(He,we){this.selector=He,this.style=we},me=function(He,we){this.localName=He,this.style=we},be=function(){function He(we,Ne,Ve,nt,Re){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=we,this.displayMode=Ne,this.markerItems=Ve,this.uiStyleSettings=nt,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 Ne=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=we,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Ve=document.createElement("div");Ve.className=this.toolbarBlockStyleClass.name,Ve.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ve),this.addActionButton(Ve,'<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(Ve,'<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(Ve,'<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(Ve,'<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(Ve,'<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(Ve,'<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(Ve,'<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(Ve,'<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=""+Ne.toolbarButtonStyleClass.name,_e.setAttribute("data-type-name",Re.typeName),_e.innerHTML=Re.icon,_e.addEventListener("click",function(){Ne.markerToolbarButtonClicked(_e,Re)}),Ne.buttons.push(_e),Ne.markerButtons.push(_e)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var nt=document.createElement("div");nt.className=this.toolbarBlockStyleClass.name,nt.style.whiteSpace="nowrap",nt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(nt),this.addActionButton(nt,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(nt,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},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 Ne=0;Ne<this.markerButtons.length;Ne++)Ne<we||Ne===we&&this.markerButtons.length-1===we?this.markerButtonBlock.appendChild(this.markerButtons[Ne]):(Ne===we&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Ne]))}},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(Ne){Ne.className=Ne.className.replace(we.uiStyleSettings.toolbarButtonStyleColorsClassName?we.uiStyleSettings.toolbarButtonStyleColorsClassName:we.toolbarButtonStyleColorsClass.name,"").trim(),Ne.className=Ne.className.replace(we.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?we.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:we.toolbarActiveButtonStyleColorsClass.name,"").trim(),Ne.className+=" "+(we.uiStyleSettings.toolbarButtonStyleColorsClassName?we.uiStyleSettings.toolbarButtonStyleColorsClassName:we.toolbarButtonStyleColorsClass.name)})},He.prototype.addActionButton=function(we,Ne,Ve){var nt=this,Re=document.createElement("div");switch(Re.className=""+this.toolbarButtonStyleClass.name,Re.innerHTML=Ne,Re.setAttribute("data-action",Ve),Re.addEventListener("click",function(){nt.actionToolbarButtonClicked(Re,Ve)}),Ve){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 Ae("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Ae("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},He.prototype.markerToolbarButtonClicked=function(we,Ne){this.setActiveButton(we),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ve){return Ve("marker",Ne)}),this.markerButtonOverflowBlock.style.display="none"},He.prototype.actionToolbarButtonClicked=function(we,Ne){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ve){return Ve("action",Ne)}),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 Ne=this.markerButtons.find(function(Ve){return Ve.getAttribute("data-type-name")===we});Ne&&this.setActiveButton(Ne)},He.prototype.setCurrentMarker=function(we){var Ne=this;this.currentMarker=we,this.buttons.filter(function(Ve){return/delete|notes/.test(Ve.getAttribute("data-action"))}).forEach(function(Ve){Ne.currentMarker===void 0?(Ve.style.fillOpacity="0.4",Ve.style.pointerEvents="none"):(Ve.style.fillOpacity="1",Ve.style.pointerEvents="all")})},He}(),fe=function(){function He(we,Ne,Ve,nt){this.panels=[],this.panelButtons=[],this.markerjsContainer=we,this.displayMode=Ne,this.uiStyleSettings=Ve,this.styles=nt,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 Ne=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new me("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new me("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new me("toolbox-panel-row",`
|
|
display: flex;
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
cursor: default;
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
box-sizing: content-box;
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new me("toolbox-panel-row_colors",`
|
|
background-color: `+((we=this.uiStyleSettings.toolboxBackgroundColor)!==null&&we!==void 0?we:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new me("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
|
|
padding: `+Ne+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new me("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new Ae("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Ae("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},He.prototype.show=function(we){var Ne;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=we,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},He.prototype.setPanelButtons=function(we){var Ne,Ve,nt=this;this.panels=we,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Ve=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ve!==void 0?Ve:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Re){var _e;Re.uiStyleSettings=nt.uiStyleSettings;var Ze=document.createElement("div");Ze.className=nt.toolboxButtonStyleClass.name+" "+((_e=nt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_e!==void 0?_e:nt.toolboxButtonStyleColorsClass.name),Ze.innerHTML=Re.icon,Ze.title=Re.title,Ze.addEventListener("click",function(){nt.panelButtonClick(Re)}),nt.panelButtons.push(Ze),nt.buttonRow.appendChild(Ze)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},He.prototype.panelButtonClick=function(we){var Ne=this,Ve=-1;if(we!==this.activePanel){Ve=this.panels.indexOf(we),this.panelRow.innerHTML="";var nt=we.getUi();nt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(nt),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=we}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Ne.displayMode==="inline"?Ne.panelRow.style.display="none":Ne.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Re,_e){var Ze,qe;Re.className=Ne.toolboxButtonStyleClass.name+" "+(_e===Ve?""+((Ze=Ne.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ze!==void 0?Ze:Ne.toolboxActiveButtonStyleColorsClass.name):""+((qe=Ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&qe!==void 0?qe:Ne.toolboxButtonStyleColorsClass.name))})},He}(),z=function(He,we){this.title=He,this.icon=we},te=function(He){function we(Ne,Ve,nt,Re){var _e=He.call(this,Ne,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=Ve,_e.currentColor=nt,_e.setCurrentColor=_e.setCurrentColor.bind(_e),_e.getColorBox=_e.getColorBox.bind(_e),_e}return Gt(we,He),we.prototype.getUi=function(){var Ne=this,Ve=document.createElement("div");return Ve.style.overflow="hidden",Ve.style.whiteSpace="nowrap",this.colors.forEach(function(nt){var Re=Ne.getColorBox(nt);Ve.appendChild(Re),Ne.colorBoxes.push(Re)}),Ve},we.prototype.getColorBox=function(Ne){var Ve=this,nt=this.uiStyleSettings.toolbarHeight/4,Re=this.uiStyleSettings.toolbarHeight-nt,_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=Ne===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_e.addEventListener("click",function(){Ve.setCurrentColor(Ne,_e)});var Ze=document.createElement("div");return Ze.style.display="inline-block",Ze.style.width=Re-2+"px",Ze.style.height=Re-2+"px",Ze.style.backgroundColor=Ne,Ze.style.borderRadius=Re/2+"px",Ne==="transparent"&&(Ze.style.fill=this.uiStyleSettings.toolboxAccentColor,Ze.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(Ze),_e},we.prototype.setCurrentColor=function(Ne,Ve){var nt=this;this.currentColor=Ne,this.colorBoxes.forEach(function(Re){Re.style.borderColor=Re===Ve?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Ne)},we}(z),se=function(){function He(we,Ne,Ve){this._state="new",this._isSelected=!1,this._container=we,this._overlayContainer=Ne,this.globalSettings=Ve,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,Ne){},He.prototype.dblClick=function(we,Ne){},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,Ne){},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}(),he=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,Ne){return we.a=Ne.a,we.b=Ne.b,we.c=Ne.c,we.d=Ne.d,we.e=Ne.e,we.f=Ne.f,we},He}(),pe=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||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(Ne){this._visual=Ne;var Ve=de.createTransform();this._visual.transform.baseVal.appendItem(Ve)},enumerable:!1,configurable:!0}),we.prototype.ownsTarget=function(Ne){return!!He.prototype.ownsTarget.call(this,Ne)||!!(this.controlGrips.findGripByVisual(Ne)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ne))},we.prototype.pointerDown=function(Ne,Ve){He.prototype.pointerDown.call(this,Ne,Ve),this.state==="new"&&(this.left=Ne.x,this.top=Ne.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var nt=this.unrotatePoint(Ne);if(this.manipulationStartX=nt.x,this.manipulationStartY=nt.y,this.offsetX=nt.x-this.left,this.offsetY=nt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Ve),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ve)){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(Ne){var Ve=this.state;He.prototype.pointerUp.call(this,Ne),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Ne),this._state="select",Ve==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},we.prototype.moveVisual=function(Ne){this.visual.style.transform="translate("+Ne.x+"px, "+Ne.y+"px)"},we.prototype.manipulate=function(Ne){var Ve=this.unrotatePoint(Ne);this.state==="creating"?this.resize(Ne):this.state==="move"?(this.left=this.manipulationStartLeft+(Ve.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ve.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ve):this.state==="rotate"&&this.rotate(Ne)},we.prototype.resize=function(Ne){var Ve=this.manipulationStartLeft,nt=this.manipulationStartWidth,Re=this.manipulationStartTop,_e=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ve=this.manipulationStartLeft+Ne.x-this.manipulationStartX,nt=this.manipulationStartWidth+this.manipulationStartLeft-Ve;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:nt=this.manipulationStartWidth+Ne.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Re=this.manipulationStartTop+Ne.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+Ne.y-this.manipulationStartY}nt>=0?(this.left=Ve,this.width=nt):(this.left=Ve+nt,this.width=-nt),_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(Ne){if(Math.abs(Ne.x-this.centerX)>.1){var Ve=Math.sign(Ne.x-this.centerX);this.rotationAngle=180*Math.atan((Ne.y-this.centerY)/(Ne.x-this.centerX))/Math.PI+90*Ve,this.applyRotation()}},we.prototype.applyRotation=function(){var Ne=this.container.transform.baseVal.getItem(0);Ne.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ne,0)},we.prototype.rotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var Ve=this.container.getCTM(),nt=de.createPoint(Ne.x,Ne.y);return{x:(nt=nt.matrixTransform(Ve)).x,y:nt.y}},we.prototype.unrotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var Ve=this.container.getCTM();Ve=Ve.inverse();var nt=de.createPoint(Ne.x,Ne.y);return{x:(nt=nt.matrixTransform(Ve)).x,y:nt.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 Ne=de.createTransform();Ne.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Ne),this.container.appendChild(this.controlBox),this.controlRect=de.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=de.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new ie,this.addControlGrips(),this.controlBox.style.display="none"},we.prototype.adjustControlBox=function(){var Ne=this.controlBox.transform.baseVal.getItem(0);Ne.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Ne,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},we.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},we.prototype.createGrip=function(){var Ne=new le;return Ne.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},we.prototype.positionGrips=function(){var Ne=this.controlGrips.topLeft.GRIP_SIZE,Ve=-Ne/2,nt=Ve,Re=(this.width+this.CB_DISTANCE)/2-Ne/2,_e=(this.height+this.CB_DISTANCE)/2-Ne/2,Ze=this.height+this.CB_DISTANCE-Ne/2,qe=this.width+this.CB_DISTANCE-Ne/2;this.positionGrip(this.controlGrips.topLeft.visual,Ve,nt),this.positionGrip(this.controlGrips.topCenter.visual,Re,nt),this.positionGrip(this.controlGrips.topRight.visual,qe,nt),this.positionGrip(this.controlGrips.centerLeft.visual,Ve,_e),this.positionGrip(this.controlGrips.centerRight.visual,qe,_e),this.positionGrip(this.controlGrips.bottomLeft.visual,Ve,Ze),this.positionGrip(this.controlGrips.bottomCenter.visual,Re,Ze),this.positionGrip(this.controlGrips.bottomRight.visual,qe,Ze),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Re,nt-3*this.CB_DISTANCE)},we.prototype.positionGrip=function(Ne,Ve,nt){var Re=Ne.transform.baseVal.getItem(0);Re.setTranslate(Ve,nt),Ne.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:he.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:he.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},He.prototype.getState.call(this))},we.prototype.restoreState=function(Ne){He.prototype.restoreState.call(this,Ne);var Ve=Ne;this.left=Ve.left,this.top=Ve.top,this.width=Ve.width,this.height=Ve.height,this.rotationAngle=Ve.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(he.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ve.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(he.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ve.containerTransformMatrix))},we.prototype.scale=function(Ne,Ve){He.prototype.scale.call(this,Ne,Ve);var nt=this.rotatePoint({x:this.left,y:this.top}),Re=this.unrotatePoint({x:nt.x*Ne,y:nt.y*Ve});this.left=Re.x,this.top=Re.y,this.width=this.width*Ne,this.height=this.height*Ve,this.adjustControlBox()},we}(se),xe=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||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(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},we.prototype.createVisual=function(){this.visual=de.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},we.prototype.pointerDown=function(Ne,Ve){He.prototype.pointerDown.call(this,Ne,Ve),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},we.prototype.manipulate=function(Ne){He.prototype.manipulate.call(this,Ne)},we.prototype.resize=function(Ne){He.prototype.resize.call(this,Ne),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(Ne){He.prototype.pointerUp.call(this,Ne),this.setSize()},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},we.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&de.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},we.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},He.prototype.getState.call(this))},we.prototype.restoreState=function(Ne){var Ve=Ne;this.fillColor=Ve.fillColor,this.strokeColor=Ve.strokeColor,this.strokeWidth=Ve.strokeWidth,this.strokeDasharray=Ve.strokeDasharray,this.opacity=Ve.opacity,this.createVisual(),He.prototype.restoreState.call(this,Ne),this.setSize()},we.prototype.scale=function(Ne,Ve){He.prototype.scale.call(this,Ne,Ve),this.setSize()},we.title="Rectangle marker",we}(pe),je=function(He){function we(Ne,Ve,nt,Re){var _e=He.call(this,Ne,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=Ve,_e.currentWidth=nt,_e.setCurrentWidth=_e.setCurrentWidth.bind(_e),_e}return Gt(we,He),we.prototype.getUi=function(){var Ne=this,Ve=document.createElement("div");return Ve.style.display="flex",Ve.style.overflow="hidden",Ve.style.flexGrow="2",this.widths.forEach(function(nt){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=nt===Ne.currentWidth?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){Ne.setCurrentWidth(nt,Re)}),Ve.appendChild(Re);var _e=document.createElement("div");_e.innerText=nt.toString(),_e.style.marginRight="5px",Re.appendChild(_e);var Ze=document.createElement("div");Ze.style.minHeight="20px",Ze.style.flexGrow="2",Ze.style.display="flex",Ze.style.alignItems="center";var qe=document.createElement("hr");qe.style.minWidth="20px",qe.style.border="0px",qe.style.borderTop=nt+"px solid "+Ne.uiStyleSettings.toolboxColor,qe.style.flexGrow="2",Ze.appendChild(qe),Re.appendChild(Ze),Ne.widthBoxes.push(Re)}),Ve},we.prototype.setCurrentWidth=function(Ne,Ve){var nt=this;this.currentWidth=Ne,this.widthBoxes.forEach(function(Re){Re.style.borderColor=Re===Ve?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},we}(z),De=function(He){function we(Ne,Ve,nt,Re){var _e=He.call(this,Ne,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=Ve,_e.currentStyle=nt,_e.setCurrentStyle=_e.setCurrentStyle.bind(_e),_e}return Gt(we,He),we.prototype.getUi=function(){var Ne=this,Ve=document.createElement("div");return Ve.style.display="flex",Ve.style.overflow="hidden",Ve.style.flexGrow="2",this.styles.forEach(function(nt){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/Ne.styles.length-5+"%",Re.style.borderColor=nt===Ne.currentStyle?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){Ne.setCurrentStyle(nt,Re)}),Ve.appendChild(Re);var _e=document.createElement("div");_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.overflow="hidden";var Ze=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Ne.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(nt!==""?'stroke-dasharray="'+nt+'"':"")+` />
|
|
</svg>`;_e.innerHTML=Ze,Re.appendChild(_e),Ne.styleBoxes.push(Re)}),Ve},we.prototype.setCurrentStyle=function(Ne,Ve){var nt=this;this.currentStyle=Ne,this.styleBoxes.forEach(function(Re){Re.style.borderColor=Re===Ve?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},we}(z),Fe=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||this;return Re.strokeColor=nt.defaultColor,Re.strokeWidth=nt.defaultStrokeWidth,Re.strokeDasharray=nt.defaultStrokeDasharray,Re.strokePanel=new te("Line color",nt.defaultColorSet,nt.defaultColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.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 Ne=He.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.typeName="FrameMarker",we.title="Frame marker",we.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',we}(xe),Te=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},Me=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||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(Ne){return!!He.prototype.ownsTarget.call(this,Ne)||!(!this.grip1.ownsTarget(Ne)&&!this.grip2.ownsTarget(Ne))},we.prototype.pointerDown=function(Ne,Ve){He.prototype.pointerDown.call(this,Ne,Ve),this.manipulationStartX=Ne.x,this.manipulationStartY=Ne.y,this.state==="new"&&(this.x1=Ne.x,this.y1=Ne.y,this.x2=Ne.x,this.y2=Ne.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(Ve)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ve)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},we.prototype.pointerUp=function(Ne){var Ve=this.state;He.prototype.pointerUp.call(this,Ne),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(Ne),this._state="select",Ve==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},we.prototype.adjustVisual=function(){},we.prototype.manipulate=function(Ne){this.state==="creating"?this.resize(Ne):this.state==="move"?(this.x1=this.manipulationStartX1+Ne.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Ne.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Ne.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Ne.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Ne)},we.prototype.resize=function(Ne){switch(this.activeGrip){case this.grip1:this.x1=Ne.x,this.y1=Ne.y;break;case this.grip2:case void 0:this.x2=Ne.x,this.y2=Ne.y}this.adjustVisual(),this.adjustControlBox()},we.prototype.select=function(){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 Ne=new le;return Ne.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},we.prototype.positionGrips=function(){var Ne=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Ne/2,this.y1-Ne/2),this.positionGrip(this.grip2.visual,this.x2-Ne/2,this.y2-Ne/2)},we.prototype.positionGrip=function(Ne,Ve,nt){var Re=Ne.transform.baseVal.getItem(0);Re.setTranslate(Ve,nt),Ne.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(Ne){He.prototype.restoreState.call(this,Ne);var Ve=Ne;this.x1=Ve.x1,this.y1=Ve.y1,this.x2=Ve.x2,this.y2=Ve.y2},we.prototype.scale=function(Ne,Ve){He.prototype.scale.call(this,Ne,Ve),this.x1=this.x1*Ne,this.y1=this.y1*Ve,this.x2=this.x2*Ne,this.y2=this.y2*Ve,this.adjustVisual(),this.adjustControlBox()},we}(se),Be=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||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=nt.defaultColor,Re.strokeWidth=nt.defaultStrokeWidth,Re.strokeDasharray=nt.defaultStrokeDasharray,Re.strokePanel=new te("Line color",nt.defaultColorSet,nt.defaultColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re}return Gt(we,He),we.prototype.ownsTarget=function(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorLine&&Ne!==this.visibleLine)},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.selectorLine=de.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=de.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},we.prototype.pointerDown=function(Ne,Ve){He.prototype.pointerDown.call(this,Ne,Ve),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},we.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),de.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),de.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),de.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){He.prototype.restoreState.call(this,Ne);var Ve=Ne;this.strokeColor=Ve.strokeColor,this.strokeWidth=Ve.strokeWidth,this.strokeDasharray=Ve.strokeDasharray,this.createVisual(),this.adjustVisual()},we.typeName="LineMarker",we.title="Line marker",we.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',we}(Me),Ge=function(He){function we(Ne,Ve,nt,Re){var _e=He.call(this,Ne,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=Ve,_e.currentFont=nt,_e.setCurrentFont=_e.setCurrentFont.bind(_e),_e}return Gt(we,He),we.prototype.getUi=function(){var Ne=this,Ve=document.createElement("div");return Ve.style.overflow="hidden",Ve.style.flexGrow="2",this.fonts.forEach(function(nt){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/Ne.fonts.length-5+"%",Re.style.borderColor=nt===Ne.currentFont?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){Ne.setCurrentFont(nt,Re)}),Ve.appendChild(Re);var _e=document.createElement("div");_e.style.display="flex",_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.fontFamily=nt,_e.style.overflow="hidden";var Ze=document.createElement("div");Ze.style.whiteSpace="nowrap",Ze.style.overflow="hidden",Ze.style.textOverflow="ellipsis",Ze.innerHTML="The quick brown fox jumps over the lazy dog",_e.appendChild(Ze),Re.appendChild(_e),Ne.fontBoxes.push(Re)}),Ve},we.prototype.setCurrentFont=function(Ne,Ve){var nt=this;this.currentFont=Ne,this.fontBoxes.forEach(function(Re){Re.style.borderColor=Re===Ve?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},we}(z),Ye=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||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=nt.defaultColor,Re.fontFamily=nt.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",nt.defaultColorSet,nt.defaultColor),Re.colorPanel.onColorChanged=Re.setColor,Re.fontFamilyPanel=new Ge("Font",nt.defaultFontFamilies,nt.defaultFontFamily),Re.fontFamilyPanel.onFontChanged=Re.setFont,Re}return Gt(we,He),we.prototype.ownsTarget=function(Ne){if(He.prototype.ownsTarget.call(this,Ne)||Ne===this.visual||Ne===this.textElement||Ne===this.bgRectangle)return!0;var Ve=!1;return this.textElement.childNodes.forEach(function(nt){nt===Ne&&(Ve=!0)}),Ve},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.bgRectangle=de.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=de.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(de.createTransform()),this.textElement.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},we.prototype.pointerDown=function(Ne,Ve){He.prototype.pointerDown.call(this,Ne,Ve),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},we.prototype.renderText=function(){var Ne=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(Ve){Ne.textElement.appendChild(de.createTSpan(Ve.trim()===""?" ":Ve.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},we.prototype.getTextScale=function(){var Ne=this.textElement.getBBox(),Ve=1;if(Ne.width>0&&Ne.height>0){var nt=(1*this.width-this.width*this.padding*2/100)/Ne.width,Re=(1*this.height-this.height*this.padding*2/100)/Ne.height;Ve=Math.min(nt,Re)}return Ve},we.prototype.getTextPosition=function(Ne){var Ve=this.textElement.getBBox(),nt=0,Re=0;return Ve.width>0&&Ve.height>0&&(nt=(this.width-Ve.width*Ne)/2,Re=this.height/2-Ve.height*Ne/2),{x:nt,y:Re}},we.prototype.sizeText=function(){var Ne=this.textElement.getBBox(),Ve=this.getTextScale(),nt=this.getTextPosition(Ve);nt.y-=Ne.y*Ve,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+nt.x+"px, "+nt.y+"px) scale("+Ve+", "+Ve+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(nt.x,nt.y),this.textElement.transform.baseVal.getItem(1).setScale(Ve,Ve))},we.prototype.manipulate=function(Ne){He.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},we.prototype.resize=function(Ne){He.prototype.resize.call(this,Ne),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(Ne){var Ve=this.state;Ve==="creating"&&(this._suppressMarkerCreateEvent=!0),He.prototype.pointerUp.call(this,Ne),this.setSize(),(Ve==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},we.prototype.showTextEditor=function(){var Ne=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(Ve){Ve.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ve=Number.parseFloat(Ne.textEditor.style.fontSize);Ne.textEditor.clientWidth>=Number.parseInt(Ne.textEditor.style.maxWidth)&&Ve>.9;)Ve-=.1,Ne.textEditor.style.fontSize=Math.max(Ve,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ve){Ve.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ve){if(Ve.clipboardData){var nt=Ve.clipboardData.getData("text"),Re=window.getSelection();if(!Re.rangeCount)return!1;Re.deleteFromDocument(),Re.getRangeAt(0).insertNode(document.createTextNode(nt)),Ve.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Ne.textEditDivClicked(Ne.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},we.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Ne=this.getTextScale(),Ve=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),nt=this.textElement.getBBox(),Re={x:nt.width*Ne,y:nt.height*Ne};Ve.x-=Re.x/2,Ve.y-=Re.y/2,this.textEditor.style.top=Ve.y+"px",this.textEditor.style.left=Ve.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ve.x+"px",this.textEditor.style.fontSize=Math.max(16*Ne,12)+"px",this.textElement.style.display="none"}},we.prototype.textEditDivClicked=function(Ne){this.text=Ne.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},we.prototype.select=function(){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(Ne,Ve){He.prototype.dblClick.call(this,Ne,Ve),this.showTextEditor()},we.prototype.setColor=function(Ne){this.textElement&&de.setAttributes(this.textElement,[["fill",Ne]]),this.color=Ne,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Ne)},we.prototype.setFont=function(Ne){this.textElement&&de.setAttributes(this.textElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},we.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},we.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){var Ve=Ne;this.color=Ve.color,this.fontFamily=Ve.fontFamily,this.padding=Ve.padding,this.text=Ve.text,this.createVisual(),He.prototype.restoreState.call(this,Ne),this.setSize()},we.prototype.scale=function(Ne,Ve){He.prototype.scale.call(this,Ne,Ve),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(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||this;return Re.color="transparent",Re.lineWidth=3,Re.drawing=!1,Re.pixelRatio=1,Re.color=nt.defaultColor,Re.lineWidth=nt.defaultStrokeWidth,Re.pixelRatio=nt.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",nt.defaultColorSet,nt.defaultColor),Re.colorPanel.onColorChanged=Re.setColor,Re.lineWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Re.lineWidthPanel.onWidthChanged=Re.setLineWidth,Re}return Gt(we,He),we.prototype.ownsTarget=function(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.drawingImage)},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.drawingImage=de.createImage(),this.visual.appendChild(this.drawingImage);var Ne=de.createTransform();this.visual.transform.baseVal.appendItem(Ne),this.addMarkerVisualToContainer(this.visual)},we.prototype.pointerDown=function(Ne,Ve){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Ne.x,Ne.y),this.drawing=!0):He.prototype.pointerDown.call(this,Ne,Ve)},we.prototype.manipulate=function(Ne){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Ne.x,Ne.y),this.canvasContext.stroke()):He.prototype.manipulate.call(this,Ne)},we.prototype.resize=function(Ne){He.prototype.resize.call(this,Ne),de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},we.prototype.pointerUp=function(Ne){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):He.prototype.pointerUp.call(this,Ne)},we.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},we.prototype.select=function(){this.state==="creating"&&this.finishCreation(),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 Ne=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ve=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],nt=Ve[0],Re=Ve[1],_e=Ve[2],Ze=Ve[3],qe=!1,ut=0;ut<this.canvasElement.height;ut++)for(var vt=0;vt<this.canvasElement.width;vt++)Ne.data[ut*this.canvasElement.width*4+4*vt+3]>0&&(qe=!0,ut<Re&&(Re=ut),vt<nt&&(nt=vt),ut>Ze&&(Ze=ut),vt>_e&&(_e=vt));if(qe){this.left=nt/this.pixelRatio,this.top=Re/this.pixelRatio,this.width=(_e-nt)/this.pixelRatio,this.height=(Ze-Re)/this.pixelRatio;var At=document.createElement("canvas");At.width=_e-nt,At.height=Ze-Re,At.getContext("2d").putImageData(this.canvasContext.getImageData(nt,Re,_e-nt,Ze-Re),0,0),this.drawingImgUrl=At.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},we.prototype.setDrawingImage=function(){de.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},we.prototype.setColor=function(Ne){this.color=Ne,this.colorChanged(Ne)},we.prototype.setLineWidth=function(Ne){this.lineWidth=Ne},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({drawingImgUrl:this.drawingImgUrl},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){this.createVisual(),He.prototype.restoreState.call(this,Ne),this.drawingImgUrl=Ne.drawingImgUrl,this.setDrawingImage()},we.prototype.scale=function(Ne,Ve){He.prototype.scale.call(this,Ne,Ve),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(Ne,Ve,nt){var Re=He.call(this,Ne,nt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Re.typeBoxes=[],Re.currentType=Ve,Re.setCurrentType=Re.setCurrentType.bind(Re),Re}return Gt(we,He),we.prototype.getUi=function(){var Ne=this,Ve=document.createElement("div");Ve.style.display="flex",Ve.style.overflow="hidden",Ve.style.flexGrow="2";for(var nt=function(Ze){var qe="both";switch(Ze){case 0:qe="both";break;case 1:qe="start";break;case 2:qe="end";break;case 3:qe="none"}var ut=document.createElement("div");if(ut.style.display="flex",ut.style.flexGrow="2",ut.style.alignItems="center",ut.style.justifyContent="space-between",ut.style.padding="5px",ut.style.borderWidth="2px",ut.style.borderStyle="solid",ut.style.borderColor=qe===Re.currentType?Re.uiStyleSettings.toolboxAccentColor:"transparent",ut.addEventListener("click",function(){Ne.setCurrentType(qe,ut)}),Ve.appendChild(ut),qe==="both"||qe==="start"){var vt=document.createElement("div");vt.style.display="flex",vt.style.alignItems="center",vt.style.minHeight="20px",vt.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>`,vt.style.marginLeft="5px",ut.appendChild(vt)}var At=document.createElement("div");At.style.display="flex",At.style.alignItems="center",At.style.minHeight="20px",At.style.flexGrow="2";var Et=document.createElement("hr");if(Et.style.minWidth="20px",Et.style.border="0px",Et.style.borderTop="3px solid "+(Re.uiStyleSettings!==void 0?Re.uiStyleSettings.toolboxColor:"#eeeeee"),Et.style.flexGrow="2",At.appendChild(Et),ut.appendChild(At),qe==="both"||qe==="end"){var Ft=document.createElement("div");Ft.style.display="flex",Ft.style.alignItems="center",Ft.style.minHeight="20px",Ft.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(Re.uiStyleSettings!==void 0?Re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Ft.style.marginRight="5px",ut.appendChild(Ft)}Re.typeBoxes.push(ut)},Re=this,_e=0;_e<4;_e++)nt(_e);return Ve},we.prototype.setCurrentType=function(Ne,Ve){var nt=this;this.currentType=Ne,this.typeBoxes.forEach(function(Re){Re.style.borderColor=Re===Ve?nt.uiStyleSettings!==void 0?nt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},we}(z),ot=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||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(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.arrow1&&Ne!==this.arrow2)},we.prototype.getArrowPoints=function(Ne,Ve){var nt=this.arrowBaseWidth+2*this.strokeWidth,Re=this.arrowBaseHeight+2*this.strokeWidth;return Ne-nt/2+","+(Ve+Re/2)+" "+Ne+","+(Ve-Re/2)+" "+(Ne+nt/2)+","+(Ve+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(Ne,Ve){He.prototype.pointerDown.call(this,Ne,Ve),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 Ne=0;Math.abs(this.x1-this.x2)>.1&&(Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Ve=this.arrow1.transform.baseVal.getItem(0);Ve.setRotate(Ne,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ve,0);var nt=this.arrow2.transform.baseVal.getItem(0);nt.setRotate(Ne+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(nt,0)}},we.prototype.setArrowType=function(Ne){this.arrowType=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({arrowType:this.arrowType},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){He.prototype.restoreState.call(this,Ne);var Ve=Ne;this.arrowType=Ve.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(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||this;return Re.fillColor=nt.defaultFillColor,Re.strokeWidth=0,Re.fillPanel=new te("Color",nt.defaultColorSet,nt.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 Ne=He.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.typeName="CoverMarker",we.title="Cover marker",we.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',we}(xe),ct=function(He){function we(Ne,Ve,nt,Re){var _e=He.call(this,Ne,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=Ve,_e.currentOpacity=nt,_e.setCurrentOpacity=_e.setCurrentOpacity.bind(_e),_e}return Gt(we,He),we.prototype.getUi=function(){var Ne=this,Ve=document.createElement("div");return Ve.style.display="flex",Ve.style.overflow="hidden",Ve.style.flexGrow="2",Ve.style.justifyContent="space-between",this.opacities.forEach(function(nt){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=nt===Ne.currentOpacity?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){Ne.setCurrentOpacity(nt,Re)}),Ve.appendChild(Re);var _e=document.createElement("div");_e.innerText=100*nt+"%",Re.appendChild(_e),Ne.opacityBoxes.push(Re)}),Ve},we.prototype.setCurrentOpacity=function(Ne,Ve){var nt=this;this.currentOpacity=Ne,this.opacityBoxes.forEach(function(Re){Re.style.borderColor=Re===Ve?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},we}(z),Ct=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||this;return Re.setOpacity=Re.setOpacity.bind(Re),Re.fillColor=nt.defaultHighlightColor,Re.strokeWidth=0,Re.opacity=nt.defaultHighlightOpacity,Re.fillPanel=new te("Color",nt.defaultColorSet,Re.fillColor),Re.fillPanel.onColorChanged=Re.setFillColor,Re.opacityPanel=new ct("Opacity",nt.defaultOpacitySteps,Re.opacity),Re.opacityPanel.onOpacityChanged=Re.setOpacity,Re}return Gt(we,He),we.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&de.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=He.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.typeName="HighlightMarker",we.title="Highlight marker",we.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',we}(lt),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>',rt='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',xt=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||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=nt.defaultStrokeColor,Re.bgColor=nt.defaultFillColor,Re.fontFamily=nt.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",nt.defaultColorSet,Re.color,Je),Re.colorPanel.onColorChanged=Re.setColor,Re.bgColorPanel=new te("Fill color",nt.defaultColorSet,Re.bgColor,rt),Re.bgColorPanel.onColorChanged=Re.setBgColor,Re.fontFamilyPanel=new Ge("Font",nt.defaultFontFamilies,nt.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(Ne){return He.prototype.ownsTarget.call(this,Ne)||this.tipGrip.ownsTarget(Ne)||this.tip===Ne},we.prototype.createTip=function(){de.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=de.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},we.prototype.pointerDown=function(Ne,Ve){this.state==="new"&&He.prototype.pointerDown.call(this,Ne,Ve),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ve)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):He.prototype.pointerDown.call(this,Ne,Ve)},we.prototype.pointerUp=function(Ne){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,He.prototype.pointerUp.call(this,Ne);else{var Ve=this.state==="creating";He.prototype.pointerUp.call(this,Ne),this.setTipPoints(Ve),this.positionTip()}},we.prototype.manipulate=function(Ne){if(this.tipMoving){var Ve=this.unrotatePoint(Ne);this.tipPosition={x:Ve.x-this.manipulationStartLeft,y:Ve.y-this.manipulationStartTop},this.positionTip()}else He.prototype.manipulate.call(this,Ne)},we.prototype.setBgColor=function(Ne){this.bgRectangle&&this.tip&&(de.setAttributes(this.bgRectangle,[["fill",Ne]]),de.setAttributes(this.tip,[["fill",Ne]])),this.bgColor=Ne,this.fillColorChanged(Ne)},we.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},we.prototype.setTipPoints=function(Ne){Ne===void 0&&(Ne=!1);var Ve=Math.min(this.height/2,15),nt=this.height/5;Ne&&(this.tipPosition={x:Ve+nt/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))?(nt=this.width/5,Ve=Math.min(this.width/2,15),this.tipBase1Position={x:Ve,y:0},this.tipBase2Position={x:Ve+nt,y:0}):(this.tipBase1Position={x:0,y:Ve},this.tipBase2Position={x:0,y:Ve+nt}):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))?(nt=this.width/5,Ve=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ve-nt,y:0},this.tipBase2Position={x:this.width-Ve,y:0}):(this.tipBase1Position={x:this.width,y:Ve},this.tipBase2Position={x:this.width,y:Ve+nt}):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))?(nt=this.width/5,Ve=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ve-nt,y:this.height},this.tipBase2Position={x:this.width-Ve,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ve-nt},this.tipBase2Position={x:this.width,y:this.height-Ve}):Re<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(nt=this.width/5,Ve=Math.min(this.width/2,15),this.tipBase1Position={x:Ve,y:this.height},this.tipBase2Position={x:Ve+nt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ve},this.tipBase2Position={x:0,y:this.height-Ve-nt})},we.prototype.resize=function(Ne){He.prototype.resize.call(this,Ne),this.positionTip()},we.prototype.positionTip=function(){de.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Ne=this.tipGrip.visual.transform.baseVal.getItem(0);Ne.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Ne,0)},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),we.prototype.select=function(){this.positionTip(),He.prototype.select.call(this)},we.prototype.getState=function(){var Ne=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){var Ve=Ne;this.bgColor=Ve.bgColor,this.tipPosition=Ve.tipPosition,He.prototype.restoreState.call(this,Ne),this.createTip(),this.setTipPoints()},we.prototype.scale=function(Ne,Ve){He.prototype.scale.call(this,Ne,Ve),this.tipPosition={x:this.tipPosition.x*Ne,y:this.tipPosition.y*Ve},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),bt=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||this;return Re.fillColor="transparent",Re.strokeColor="transparent",Re.strokeWidth=0,Re.strokeDasharray="",Re.opacity=1,Re.strokeColor=nt.defaultColor,Re.strokeWidth=nt.defaultStrokeWidth,Re.strokeDasharray=nt.defaultStrokeDasharray,Re.fillColor=nt.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(nt.defaultColorSet,["transparent"]),nt.defaultColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.fillPanel=new te("Fill color",Ie(nt.defaultColorSet,["transparent"]),Re.fillColor,rt),Re.fillPanel.onColorChanged=Re.setFillColor,Re.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re.opacityPanel=new ct("Opacity",nt.defaultOpacitySteps,Re.opacity),Re.opacityPanel.onOpacityChanged=Re.setOpacity,Re}return Gt(we,He),we.prototype.ownsTarget=function(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},we.prototype.createVisual=function(){this.visual=de.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},we.prototype.pointerDown=function(Ne,Ve){He.prototype.pointerDown.call(this,Ne,Ve),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},we.prototype.manipulate=function(Ne){He.prototype.manipulate.call(this,Ne)},we.prototype.resize=function(Ne){He.prototype.resize.call(this,Ne),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(Ne){He.prototype.pointerUp.call(this,Ne),this.setSize()},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},we.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&de.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},we.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&de.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){var Ve=Ne;this.fillColor=Ve.fillColor,this.strokeColor=Ve.strokeColor,this.strokeWidth=Ve.strokeWidth,this.strokeDasharray=Ve.strokeDasharray,this.opacity=Ve.opacity,this.createVisual(),He.prototype.restoreState.call(this,Ne),this.setSize()},we.prototype.scale=function(Ne,Ve){He.prototype.scale.call(this,Ne,Ve),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),Pt=function(He){function we(Ne,Ve,nt){return He.call(this,Ne,Ve,nt)||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(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.tip1&&Ne!==this.tip2)},we.prototype.createTips=function(){this.tip1=de.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.tip1),this.tip2=de.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.tip2)},we.prototype.pointerDown=function(Ne,Ve){He.prototype.pointerDown.call(this,Ne,Ve),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 Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Ve=this.tip1.transform.baseVal.getItem(0);Ve.setRotate(Ne,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ve,0);var nt=this.tip2.transform.baseVal.getItem(0);nt.setRotate(Ne+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(nt,0)}},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=He.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){He.prototype.restoreState.call(this,Ne),this.createTips(),this.adjustVisual()},we.typeName="MeasurementMarker",we.title="Measurement marker",we.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',we}(Be),ht=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||this;return Re.strokePanel.colors=nt.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 Ne=He.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.typeName="EllipseFrameMarker",we.title="Ellipse frame marker",we.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',we}(bt),St=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}(),mt=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||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=nt.defaultColor,Re.strokeWidth=nt.defaultStrokeWidth,Re.strokeDasharray=nt.defaultStrokeDasharray,Re.strokePanel=new te("Line color",nt.defaultColorSet,nt.defaultColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re}return Gt(we,He),we.prototype.ownsTarget=function(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorCurve&&Ne!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ne))},we.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.selectorCurve=de.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=de.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},we.prototype.pointerDown=function(Ne,Ve){He.prototype.pointerDown.call(this,Ne,Ve),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Ne.x,this.curveY=Ne.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Ve)&&(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 Ne=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Ne/2,this.curveY-Ne/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},we.prototype.manipulate=function(Ne){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Ne.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Ne.y-this.manipulationStartY),He.prototype.manipulate.call(this,Ne)},we.prototype.resize=function(Ne){this.activeGrip===this.curveGrip&&(this.curveX=Ne.x,this.curveY=Ne.y),He.prototype.resize.call(this,Ne),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual()},we.prototype.scale=function(Ne,Ve){this.curveX=this.curveX*Ne,this.curveY=this.curveY*Ve,He.prototype.scale.call(this,Ne,Ve)},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){He.prototype.restoreState.call(this,Ne);var Ve=Ne;this.strokeColor=Ve.strokeColor,this.strokeWidth=Ve.strokeWidth,this.strokeDasharray=Ve.strokeDasharray,this.curveX=Ve.curveX,this.curveY=Ve.curveY,this.createVisual(),this.adjustVisual()},we.typeName="CurveMarker",we.title="Curve marker",we.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',we}(Me),Nt=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,Ve,nt)||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=nt.defaultColor,Re.strokeWidth=nt.defaultStrokeWidth,Re.strokeDasharray=nt.defaultStrokeDasharray,Re.fillColor=nt.defaultFillColor,Re.textColor=nt.defaultStrokeColor,Re.fontFamily=nt.defaultFontFamily,Re.fontSize=nt.defaultCaptionFontSize,Re.captionText=nt.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(nt.defaultColorSet,["transparent"]),Re.strokeColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.fillPanel=new te("Fill color",Ie(nt.defaultColorSet,["transparent"]),Re.fillColor,rt),Re.fillPanel.onColorChanged=Re.setFillColor,Re.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re.fontFamilyPanel=new Ge("Font",nt.defaultFontFamilies,nt.defaultFontFamily),Re.fontFamilyPanel.onFontChanged=Re.setFont,Re.textColorPanel=new te("Text color",nt.defaultColorSet,Re.textColor,Je),Re.textColorPanel.onColorChanged=Re.setTextColor,Re}return Gt(we,He),we.prototype.ownsTarget=function(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.frame&&Ne!==this.captionBg&&Ne!==this.captionElement)},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=de.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=de.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=de.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},we.prototype.setCaptionText=function(Ne){this.captionText=Ne,this.captionElement.textContent=this.captionText,this.sizeCaption()},we.prototype.pointerDown=function(Ne,Ve){He.prototype.pointerDown.call(this,Ne,Ve),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},we.prototype.manipulate=function(Ne){He.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},we.prototype.resize=function(Ne){He.prototype.resize.call(this,Ne),this.setSize()},we.prototype.sizeCaption=function(){var Ne=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Ne.width+2*this.PADDING,this.captionBoxHeight=Ne.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),de.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),de.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},we.prototype.showTextEditor=function(){var Ne=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(Ve){Ve.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ve){Ve.key==="Enter"&&Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ve){Ve.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},we.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},we.prototype.finishTextEditing=function(Ne){this.setCaptionText(Ne.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},we.prototype.setFont=function(Ne){this.captionElement&&de.setAttributes(this.captionElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},we.prototype.setTextColor=function(Ne){this.captionElement&&de.setAttributes(this.captionElement,[["fill",Ne]]),this.textColor=Ne,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},we.prototype.setSize=function(){He.prototype.setSize.call(this),de.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},we.prototype.pointerUp=function(Ne){He.prototype.pointerUp.call(this,Ne),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},we.prototype.dblClick=function(Ne,Ve){He.prototype.dblClick.call(this,Ne,Ve),this.showTextEditor()},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.frame&&de.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},we.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.captionBg&&de.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.frame&&de.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.frame&&de.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},He.prototype.getState.call(this));return Ne.typeName=this.typeName,Ne},we.prototype.restoreState=function(Ne){var Ve=Ne;this.fillColor=Ve.fillColor,this.strokeColor=Ve.strokeColor,this.strokeWidth=Ve.strokeWidth,this.strokeDasharray=Ve.strokeDasharray,this.textColor=Ve.textColor,this.fontFamily=Ve.fontFamily,this.captionText=Ve.captionText,this.fontSize=Ve.fontSize,this.createVisual(),He.prototype.restoreState.call(this,Ne),this.setSize()},we.prototype.scale=function(Ne,Ve){He.prototype.scale.call(this,Ne,Ve),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,Ne){Ne===void 0&&(Ne=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=we,this.cancelable=Ne}return Object.defineProperty(He.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),He.prototype.preventDefault=function(){this._defaultPrevented=!0},He}(),Dt=function(He){function we(Ne,Ve,nt){var Re=He.call(this,Ne,!1)||this;return Re.dataUrl=Ve,Re.state=nt,Re}return Gt(we,He),we}(dt),gt=function(He){function we(Ne,Ve,nt){nt===void 0&&(nt=!1);var Re=He.call(this,Ne,nt)||this;return Re.marker=Ve,Re}return Gt(we,He),we}(dt),yt=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,Ne){this[we].push(Ne)},He.prototype.removeEventListener=function(we,Ne){var Ve=this[we].indexOf(Ne);Ve>-1&&this[we].splice(Ve,1)},He}(),tt=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 St,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 yt,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,ht,bt,Ct,xt,Pt,lt,Be,mt,Nt]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Fe,Ke,ot,Ye,bt,Ct,xt]},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 Ne=this;this._availableMarkerTypes.splice(0),we.forEach(function(Ve){if(typeof Ve=="string"){var nt=Ne.ALL_MARKER_TYPES.find(function(Re){return Re.typeName===Ve});nt!==void 0&&Ne._availableMarkerTypes.push(nt)}else Ne._availableMarkerTypes.push(Ve)})},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(Ne){return Ne(new dt(we))})},He.prototype.render=function(){return oe(this,void 0,void 0,function(){var we;return Ue(this,function(Ne){switch(Ne.label){case 0:return this.setCurrentMarker(),(we=new Ee).naturalSize=this.renderAtNaturalSize,we.imageType=this.renderImageType,we.imageQuality=this.renderImageQuality,we.markersOnly=this.renderMarkersOnly,we.width=this.renderWidth,we.height=this.renderHeight,[4,we.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Ne.sent(),[4,we.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ne.sent()]}})})},He.prototype.close=function(we){var Ne=this;if(we===void 0&&(we=!1),this.isOpen){var Ve=!1;we||this.eventListeners.beforeclose.forEach(function(nt){var Re=new dt(Ne,!0);nt(Re),Re.defaultPrevented&&(Ve=!0)}),Ve||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(nt){return nt(new dt(Ne))}),this.detachEvents(),this._isOpen=!1)}},He.prototype.addMarkersToToolbar=function(){for(var we,Ne=[],Ve=0;Ve<arguments.length;Ve++)Ne[Ve]=arguments[Ve];(we=this._availableMarkerTypes).push.apply(we,Ne)},He.prototype.addRenderEventListener=function(we){this.addEventListener("render",function(Ne){we(Ne.dataUrl,Ne.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,Ne=this.editorCanvas.clientWidth/we>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*we:this.editorCanvas.clientWidth,Ve=Ne<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/we;this.resize(Ne,Ve)},He.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},He.prototype.resize=function(we,Ne){this._isResizing=!0;var Ve=we/this.imageWidth,nt=Ne/this.imageHeight;this.imageWidth=Math.round(we),this.imageHeight=Math.round(Ne),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(Ve,nt),this._isResizing=!1},He.prototype.scaleMarkers=function(we,Ne){var Ve,nt=this;this._currentMarker&&this._currentMarker instanceof Ye?this._currentMarker.scale(we,Ne):(Ve=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Re){Re!==nt._currentMarker&&Re.scale(we,Ne)}),Ve!==void 0&&this.setCurrentMarker(Ve)},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(),Ne=this.editorCanvas.getBoundingClientRect();this.left=we.left-Ne.left,this.top=we.top-Ne.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,Ne=[],Ve=0;Ve<arguments.length;Ve++)Ne[Ve]=arguments[Ve];this.defs=de.createDefs(),this.addDefsToImage(),(we=this.defs).append.apply(we,Ne)},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 be(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,Ne){if(we==="marker"&&Ne!==void 0)this.createNewMarker(Ne);else if(we==="action")switch(Ne){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},He.prototype.deleteSelectedMarker=function(){var we=this;if(this._currentMarker!==void 0){var Ne=!1;if(this.eventListeners.markerbeforedelete.forEach(function(nt){var Re=new gt(we,we._currentMarker,!0);nt(Re),Re.defaultPrevented&&(Ne=!0)}),!Ne){var Ve=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(nt){return nt(new gt(we,Ve))})}}},He.prototype.clear=function(){var we=this,Ne=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_e){var Ze=new gt(we,void 0,!0);_e(Ze),Ze.defaultPrevented&&(Ne=!0)}),!Ne)){this.setCurrentMarker();for(var Ve=function(_e){var Ze=nt.markers[_e];nt.setCurrentMarker(nt.markers[_e]),nt._currentMarker.dispose(),nt.markerImage.removeChild(nt._currentMarker.container),nt.markers.splice(nt.markers.indexOf(nt._currentMarker),1),nt.eventListeners.markerdelete.forEach(function(qe){return qe(new gt(we,Ze))})},nt=this,Re=this.markers.length-1;Re>=0;Re--)Ve(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 Ne=this.getState(),Ve=this.undoRedoManager.getLastUndoStep();if(!Ve||Ve.width===Ne.width&&Ve.height===Ne.height){var nt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Ne),nt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Re){return Re(new dt(we))})}else this.undoRedoManager.replaceLastUndoStep(Ne),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,Ne=this.undoRedoManager.undo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ve){return Ve(new dt(we))}))},He.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},He.prototype.redoStep=function(){var we=this,Ne=this.undoRedoManager.redo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ve){return Ve(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,Ne,Ve=this;return Ue(this,function(nt){switch(nt.label){case 0:return[4,this.render()];case 1:return we=nt.sent(),Ne=this.getState(),this.eventListeners.render.forEach(function(Re){return Re(new Dt(Ve,we,Ne))}),this.close(!0),[2]}})})},He.prototype.getState=function(we){we===!0&&this.setCurrentMarker();var Ne={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Ve){return Ne.markers.push(Ve.getState())}),Ne},He.prototype.restoreState=function(we){var Ne=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);we.markers.forEach(function(Ve){var nt=Ne._availableMarkerTypes.find(function(_e){return _e.typeName===Ve.typeName});if(nt!==void 0){var Re=Ne.addNewMarker(nt);Re.restoreState(Ve),Ne.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(Ve){return Ve(new dt(Ne))})},He.prototype.addNewMarker=function(we){var Ne=de.createGroup();return this.markerImage.appendChild(Ne),new we(Ne,this.overlayContainer,this.settings)},He.prototype.createNewMarker=function(we){var Ne,Ve=this;(Ne=typeof we=="string"?this._availableMarkerTypes.find(function(nt){return nt.typeName===we}):we)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Ne),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(Ne.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(nt){return nt(new gt(Ve,Ve._currentMarker))}))},He.prototype.markerCreated=function(we){var Ne=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(Ve){return Ve(new gt(Ne,Ne._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 Ne=this;this.eventListeners.markerchange.forEach(function(Ve){return Ve(new gt(Ne,we))})},He.prototype.setCurrentMarker=function(we){var Ne=this;this._currentMarker!==we&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ve){return Ve(new gt(Ne,Ne._currentMarker))})),this._currentMarker=we,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(Ve){return Ve(new gt(Ne,Ne._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 Ne=this.markers.find(function(Ve){return Ve.ownsTarget(we.target)});Ne!==void 0?(this.setCurrentMarker(Ne),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(we.clientX,we.clientY),we.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:we.clientX,y:we.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(we.clientX,we.clientY))},He.prototype.onDblClick=function(we){if(this._isFocused||this.focus(),this.mode==="select"){var Ne=this.markers.find(function(Ve){return Ve.ownsTarget(we.target)});Ne!==void 0&&Ne!==this._currentMarker&&this.setCurrentMarker(Ne),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(we.clientX,we.clientY),we.target):this.setCurrentMarker()}},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,Ne){var Ve=this.markerImage.getBoundingClientRect();return{x:(we-Ve.left)/this.zoomLevel,y:(Ne-Ve.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,Ne){this.eventListeners.addEventListener(we,Ne)},He.prototype.removeEventListener=function(we,Ne){this.eventListeners.removeEventListener(we,Ne)},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(Ne){return Ne(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(Ne){return Ne(new dt(we))}))},He.instanceCounter=0,He}()},23425:function(_n,Mn,ft){"use strict";ft.d(Mn,{Z:function(){return De}});var at=ft(87075),Gt=ft(71409),oe=ft(28788),Ue=ft(89490),Ie=ft(11036),de=ft(92310),ve=ft.n(de),Ee=ft(18929),ke=ft(10228),Se=ft(26112),Ae=ft(48736),me=ft(59301),be=ft(17119),fe=[10,20,50,100],z=function(Te){var Me=Te.pageSizeOptions,Be=Me===void 0?fe:Me,Ge=Te.locale,Ye=Te.changeSize,Ke=Te.pageSize,Xe=Te.goButton,ot=Te.quickGo,lt=Te.rootPrefixCls,ct=Te.disabled,Ct=Te.buildOptionText,Je=Te.showSizeChanger,rt=Te.sizeChangerRender,xt=me.useState(""),bt=(0,Ie.Z)(xt,2),Pt=bt[0],ht=bt[1],St=function(){return!Pt||Number.isNaN(Pt)?void 0:Number(Pt)},mt=typeof Ct=="function"?Ct:function(Ne){return"".concat(Ne," ").concat(Ge.items_per_page)},Nt=function(Ve){ht(Ve.target.value)},dt=function(Ve){Xe||Pt===""||(ht(""),!(Ve.relatedTarget&&(Ve.relatedTarget.className.indexOf("".concat(lt,"-item-link"))>=0||Ve.relatedTarget.className.indexOf("".concat(lt,"-item"))>=0))&&(ot==null||ot(St())))},Dt=function(Ve){Pt!==""&&(Ve.keyCode===ke.Z.ENTER||Ve.type==="click")&&(ht(""),ot==null||ot(St()))},gt=function(){return Be.some(function(Ve){return Ve.toString()===Ke.toString()})?Be:Be.concat([Ke]).sort(function(Ve,nt){var Re=Number.isNaN(Number(Ve))?0:Number(Ve),_e=Number.isNaN(Number(nt))?0:Number(nt);return Re-_e})},yt="".concat(lt,"-options");if(!Je&&!ot)return null;var tt=null,He=null,we=null;return Je&&rt&&(tt=rt({disabled:ct,size:Ke,onSizeChange:function(Ve){Ye==null||Ye(Number(Ve))},"aria-label":Ge.page_size,className:"".concat(yt,"-size-changer"),options:gt().map(function(Ne){return{label:mt(Ne),value:Ne}})})),ot&&(Xe&&(we=typeof Xe=="boolean"?me.createElement("button",{type:"button",onClick:Dt,onKeyUp:Dt,disabled:ct,className:"".concat(yt,"-quick-jumper-button")},Ge.jump_to_confirm):me.createElement("span",{onClick:Dt,onKeyUp:Dt},Xe)),He=me.createElement("div",{className:"".concat(yt,"-quick-jumper")},Ge.jump_to,me.createElement("input",{disabled:ct,type:"text",value:Pt,onChange:Nt,onKeyUp:Dt,onBlur:dt,"aria-label":Ge.page}),Ge.page,we)),me.createElement("li",{className:yt},tt,He)},te=z,se=function(Te){var Me=Te.rootPrefixCls,Be=Te.page,Ge=Te.active,Ye=Te.className,Ke=Te.showTitle,Xe=Te.onClick,ot=Te.onKeyPress,lt=Te.itemRender,ct="".concat(Me,"-item"),Ct=ve()(ct,"".concat(ct,"-").concat(Be),(0,at.Z)((0,at.Z)({},"".concat(ct,"-active"),Ge),"".concat(ct,"-disabled"),!Be),Ye),Je=function(){Xe(Be)},rt=function(Pt){ot(Pt,Xe,Be)},xt=lt(Be,"page",me.createElement("a",{rel:"nofollow"},Be));return xt?me.createElement("li",{title:Ke?String(Be):null,className:Ct,onClick:Je,onKeyDown:rt,tabIndex:0},xt):null},ie=se,le=function(Te,Me,Be){return Be};function he(){}function pe(Fe){var Te=Number(Fe);return typeof Te=="number"&&!Number.isNaN(Te)&&isFinite(Te)&&Math.floor(Te)===Te}function xe(Fe,Te,Me){var Be=typeof Fe=="undefined"?Te:Fe;return Math.floor((Me-1)/Be)+1}var je=function(Te){var Me=Te.prefixCls,Be=Me===void 0?"rc-pagination":Me,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,ct=Te.total,Ct=ct===void 0?0:ct,Je=Te.pageSize,rt=Te.defaultPageSize,xt=rt===void 0?10:rt,bt=Te.onChange,Pt=bt===void 0?he:bt,ht=Te.hideOnSinglePage,St=Te.align,mt=Te.showPrevNextJumpers,Nt=mt===void 0?!0:mt,dt=Te.showQuickJumper,Dt=Te.showLessItems,gt=Te.showTitle,yt=gt===void 0?!0:gt,tt=Te.onShowSizeChange,He=tt===void 0?he:tt,we=Te.locale,Ne=we===void 0?be.Z:we,Ve=Te.style,nt=Te.totalBoundaryShowSizeChanger,Re=nt===void 0?50:nt,_e=Te.disabled,Ze=Te.simple,qe=Te.showTotal,ut=Te.showSizeChanger,vt=ut===void 0?Ct>Re:ut,At=Te.sizeChangerRender,Et=Te.pageSizeOptions,Ft=Te.itemRender,Kt=Ft===void 0?le:Ft,Yt=Te.jumpPrevIcon,Vt=Te.jumpNextIcon,Ht=Te.prevIcon,sn=Te.nextIcon,rn=me.useRef(null),un=(0,Ee.Z)(10,{value:Je,defaultValue:xt}),Sn=(0,Ie.Z)(un,2),vn=Sn[0],Cn=Sn[1],On=(0,Ee.Z)(1,{value:Xe,defaultValue:lt,postState:function(Vr){return Math.max(1,Math.min(Vr,xe(void 0,vn,Ct)))}}),Dr=(0,Ie.Z)(On,2),Sr=Dr[0],qr=Dr[1],tr=me.useState(Sr),ai=(0,Ie.Z)(tr,2),gi=ai[0],fi=ai[1];(0,me.useEffect)(function(){fi(Sr)},[Sr]);var Di=Pt!==he,ki="current"in Te,Jr=Math.max(1,Sr-(Dt?3:5)),Li=Math.min(xe(void 0,vn,Ct),Sr+(Dt?3:5));function et(gr,Vr){var ti=gr||me.createElement("button",{type:"button","aria-label":Vr,className:"".concat(Be,"-item-link")});return typeof gr=="function"&&(ti=me.createElement(gr,(0,Ue.Z)({},Te))),ti}function Mr(gr){var Vr=gr.target.value,ti=xe(void 0,vn,Ct),Ni;return Vr===""?Ni=Vr:Number.isNaN(Number(Vr))?Ni=gi:Vr>=ti?Ni=ti:Ni=Number(Vr),Ni}function Er(gr){return pe(gr)&&gr!==Sr&&pe(Ct)&&Ct>0}var En=Ct>vn?dt:!1;function Tn(gr){(gr.keyCode===ke.Z.UP||gr.keyCode===ke.Z.DOWN)&&gr.preventDefault()}function Dn(gr){var Vr=Mr(gr);switch(Vr!==gi&&fi(Vr),gr.keyCode){case ke.Z.ENTER:Ar(Vr);break;case ke.Z.UP:Ar(Vr-1);break;case ke.Z.DOWN:Ar(Vr+1);break;default:break}}function Pr(gr){Ar(Mr(gr))}function Br(gr){var Vr=xe(gr,vn,Ct),ti=Sr>Vr&&Vr!==0?Vr:Sr;Cn(gr),fi(ti),He==null||He(Sr,gr),qr(ti),Pt==null||Pt(ti,gr)}function Ar(gr){if(Er(gr)&&!_e){var Vr=xe(void 0,vn,Ct),ti=gr;return gr>Vr?ti=Vr:gr<1&&(ti=1),ti!==gi&&fi(ti),qr(ti),Pt==null||Pt(ti,vn),ti}return Sr}var Qt=Sr>1,Zt=Sr<xe(void 0,vn,Ct);function Ut(){Qt&&Ar(Sr-1)}function Un(){Zt&&Ar(Sr+1)}function pr(){Ar(Jr)}function mr(){Ar(Li)}function xn(gr,Vr){if(gr.key==="Enter"||gr.charCode===ke.Z.ENTER||gr.keyCode===ke.Z.ENTER){for(var ti=arguments.length,Ni=new Array(ti>2?ti-2:0),hi=2;hi<ti;hi++)Ni[hi-2]=arguments[hi];Vr.apply(void 0,Ni)}}function Yn(gr){xn(gr,Ut)}function Hn(gr){xn(gr,Un)}function Qr(gr){xn(gr,pr)}function $r(gr){xn(gr,mr)}function Mt(gr){var Vr=Kt(gr,"prev",et(Ht,"prev page"));return me.isValidElement(Vr)?me.cloneElement(Vr,{disabled:!Qt}):Vr}function Wt(gr){var Vr=Kt(gr,"next",et(sn,"next page"));return me.isValidElement(Vr)?me.cloneElement(Vr,{disabled:!Zt}):Vr}function Fn(gr){(gr.type==="click"||gr.keyCode===ke.Z.ENTER)&&Ar(gi)}var zn=null,tn=(0,Se.Z)(Te,{aria:!0,data:!0}),Nn=qe&&me.createElement("li",{className:"".concat(Be,"-total-text")},qe(Ct,[Ct===0?0:(Sr-1)*vn+1,Sr*vn>Ct?Ct:Sr*vn])),jn=null,Ln=xe(void 0,vn,Ct);if(ht&&Ct<=vn)return null;var An=[],Kn={rootPrefixCls:Be,onClick:Ar,onKeyPress:xn,showTitle:yt,itemRender:Kt,page:-1},Jn=Sr-1>0?Sr-1:0,er=Sr+1<Ln?Sr+1:Ln,Wr=dt&&dt.goButton,Cr=(0,oe.Z)(Ze)==="object"?Ze.readOnly:!Ze,Tr=Wr,ln=null;Ze&&(Wr&&(typeof Wr=="boolean"?Tr=me.createElement("button",{type:"button",onClick:Fn,onKeyUp:Fn},Ne.jump_to_confirm):Tr=me.createElement("span",{onClick:Fn,onKeyUp:Fn},Wr),Tr=me.createElement("li",{title:yt?"".concat(Ne.jump_to).concat(Sr,"/").concat(Ln):null,className:"".concat(Be,"-simple-pager")},Tr)),ln=me.createElement("li",{title:yt?"".concat(Sr,"/").concat(Ln):null,className:"".concat(Be,"-simple-pager")},Cr?gi:me.createElement("input",{type:"text","aria-label":Ne.jump_to,value:gi,disabled:_e,onKeyDown:Tn,onKeyUp:Dn,onChange:Dn,onBlur:Pr,size:3}),me.createElement("span",{className:"".concat(Be,"-slash")},"/"),Ln));var ri=Dt?1:2;if(Ln<=3+ri*2){Ln||An.push(me.createElement(ie,(0,Gt.Z)({},Kn,{key:"noPager",page:1,className:"".concat(Be,"-item-disabled")})));for(var di=1;di<=Ln;di+=1)An.push(me.createElement(ie,(0,Gt.Z)({},Kn,{key:di,page:di,active:Sr===di})))}else{var _i=Dt?Ne.prev_3:Ne.prev_5,pn=Dt?Ne.next_3:Ne.next_5,Xn=Kt(Jr,"jump-prev",et(Yt,"prev page")),rr=Kt(Li,"jump-next",et(Vt,"next page"));Nt&&(zn=Xn?me.createElement("li",{title:yt?_i:null,key:"prev",onClick:pr,tabIndex:0,onKeyDown:Qr,className:ve()("".concat(Be,"-jump-prev"),(0,at.Z)({},"".concat(Be,"-jump-prev-custom-icon"),!!Yt))},Xn):null,jn=rr?me.createElement("li",{title:yt?pn:null,key:"next",onClick:mr,tabIndex:0,onKeyDown:$r,className:ve()("".concat(Be,"-jump-next"),(0,at.Z)({},"".concat(Be,"-jump-next-custom-icon"),!!Vt))},rr):null);var ir=Math.max(1,Sr-ri),wr=Math.min(Sr+ri,Ln);Sr-1<=ri&&(wr=1+ri*2),Ln-Sr<=ri&&(ir=Ln-ri*2);for(var Rr=ir;Rr<=wr;Rr+=1)An.push(me.createElement(ie,(0,Gt.Z)({},Kn,{key:Rr,page:Rr,active:Sr===Rr})));if(Sr-1>=ri*2&&Sr!==3&&(An[0]=me.cloneElement(An[0],{className:ve()("".concat(Be,"-item-after-jump-prev"),An[0].props.className)}),An.unshift(zn)),Ln-Sr>=ri*2&&Sr!==Ln-2){var Kr=An[An.length-1];An[An.length-1]=me.cloneElement(Kr,{className:ve()("".concat(Be,"-item-before-jump-next"),Kr.props.className)}),An.push(jn)}ir!==1&&An.unshift(me.createElement(ie,(0,Gt.Z)({},Kn,{key:1,page:1}))),wr!==Ln&&An.push(me.createElement(ie,(0,Gt.Z)({},Kn,{key:Ln,page:Ln})))}var ii=Mt(Jn);if(ii){var oi=!Qt||!Ln;ii=me.createElement("li",{title:yt?Ne.prev_page:null,onClick:Ut,tabIndex:oi?null:0,onKeyDown:Yn,className:ve()("".concat(Be,"-prev"),(0,at.Z)({},"".concat(Be,"-disabled"),oi)),"aria-disabled":oi},ii)}var cr=Wt(er);if(cr){var on,or;Ze?(on=!Zt,or=Qt?0:null):(on=!Zt||!Ln,or=on?null:0),cr=me.createElement("li",{title:yt?Ne.next_page:null,onClick:Un,tabIndex:or,onKeyDown:Hn,className:ve()("".concat(Be,"-next"),(0,at.Z)({},"".concat(Be,"-disabled"),on)),"aria-disabled":on},cr)}var an=ve()(Be,Ke,(0,at.Z)((0,at.Z)((0,at.Z)((0,at.Z)((0,at.Z)({},"".concat(Be,"-start"),St==="start"),"".concat(Be,"-center"),St==="center"),"".concat(Be,"-end"),St==="end"),"".concat(Be,"-simple"),Ze),"".concat(Be,"-disabled"),_e));return me.createElement("ul",(0,Gt.Z)({className:an,style:Ve,ref:rn},tn),Nn,ii,Ze?ln:An,cr,me.createElement(te,{locale:Ne,rootPrefixCls:Be,disabled:_e,selectPrefixCls:Ye,changeSize:Br,pageSize:vn,pageSizeOptions:Et,quickGo:En?Ar:null,goButton:Tr,showSizeChanger:vt,sizeChangerRender:At}))},De=je},25930:function(_n,Mn,ft){"use strict";ft.d(Mn,{Cd:function(){return Be}});var at=ft(71409),Gt=ft(89490),oe=ft(39224),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(ct){if(ct){lt=!0;var Ct=ct.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,ct=Xe.prefixCls,Ct=Xe.strokeColor,Je=Xe.strokeLinecap,rt=Xe.strokeWidth,xt=Xe.style,bt=Xe.trailColor,Pt=Xe.trailWidth,ht=Xe.transition,St=(0,oe.Z)(Xe,ke);delete St.gapPosition;var mt=Array.isArray(lt)?lt:[lt],Nt=Array.isArray(Ct)?Ct:[Ct],dt=Ee(),Dt=rt/2,gt=100-rt/2,yt="M ".concat(Je==="round"?Dt:0,",").concat(Dt,`
|
|
L `).concat(Je==="round"?gt:100,",").concat(Dt),tt="0 0 100 ".concat(rt),He=0;return Ue.createElement("svg",(0,at.Z)({className:de()("".concat(ct,"-line"),ot),viewBox:tt,preserveAspectRatio:"none",style:xt},St),Ue.createElement("path",{className:"".concat(ct,"-line-trail"),d:yt,strokeLinecap:Je,stroke:bt,strokeWidth:Pt||rt,fillOpacity:"0"}),mt.map(function(we,Ne){var Ve=1;switch(Je){case"round":Ve=1-rt/100;break;case"square":Ve=1-rt/2/100;break;default:Ve=1;break}var nt={strokeDasharray:"".concat(we*Ve,"px, 100px"),strokeDashoffset:"-".concat(He,"px"),transition:ht||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Re=Nt[Ne]||Nt[Nt.length-1];return He+=we,Ue.createElement("path",{key:Ne,className:"".concat(ct,"-line-path"),d:yt,strokeLinecap:Je,stroke:Re,strokeWidth:rt,fillOpacity:"0",ref:function(Ze){dt[Ne]=Ze},style:nt})}))},Ae=Se,me=ft(28788),be=ft(11036),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,be.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 he(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,ct=Ye.radius,Ct=Ye.style,Je=Ye.ptg,rt=Ye.strokeLinecap,xt=Ye.strokeWidth,bt=Ye.size,Pt=Ye.gapDegree,ht=ot&&(0,me.Z)(ot)==="object",St=ht?"#FFF":void 0,mt=bt/2,Nt=Ue.createElement("circle",{className:"".concat(Xe,"-circle-path"),r:ct,cx:mt,cy:mt,stroke:St,strokeLinecap:rt,strokeWidth:xt,opacity:Je===0?0:1,style:Ct,ref:Ke});if(!ht)return Nt;var dt="".concat(lt,"-conic"),Dt=Pt?"".concat(180+Pt/2,"deg"):"0deg",gt=he(ot,(360-Pt)/360),yt=he(ot,1),tt="conic-gradient(from ".concat(Dt,", ").concat(gt.join(", "),")"),He="linear-gradient(to ".concat(Pt?"bottom":"top",", ").concat(yt.join(", "),")");return Ue.createElement(Ue.Fragment,null,Ue.createElement("mask",{id:dt},Nt),Ue.createElement("foreignObject",{x:0,y:0,width:bt,height:bt,mask:"url(#".concat(dt,")")},Ue.createElement(le,{bg:He},Ue.createElement(le,{bg:tt}))))}),xe=pe,je=100,De=function(Ke,Xe,ot,lt,ct,Ct,Je,rt,xt,bt){var Pt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,ht=ot/100*360*((360-Ct)/360),St=Ct===0?0:{bottom:0,top:180,left:90,right:-90}[Je],mt=(100-lt)/100*Xe;xt==="round"&<!==100&&(mt+=bt/2,mt>=Xe&&(mt=Xe-.01));var Nt=je/2;return{stroke:typeof rt=="string"?rt:void 0,strokeDasharray:"".concat(Xe,"px ").concat(Ke),strokeDashoffset:mt+Pt,transform:"rotate(".concat(ct+ht+St,"deg)"),transformOrigin:"".concat(Nt,"px ").concat(Nt,"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 Me=function(Ke){var Xe=(0,Gt.Z)((0,Gt.Z)({},ve),Ke),ot=Xe.id,lt=Xe.prefixCls,ct=Xe.steps,Ct=Xe.strokeWidth,Je=Xe.trailWidth,rt=Xe.gapDegree,xt=rt===void 0?0:rt,bt=Xe.gapPosition,Pt=Xe.trailColor,ht=Xe.strokeLinecap,St=Xe.style,mt=Xe.className,Nt=Xe.strokeColor,dt=Xe.percent,Dt=(0,oe.Z)(Xe,Fe),gt=je/2,yt=ie(ot),tt="".concat(yt,"-gradient"),He=gt-Ct/2,we=Math.PI*2*He,Ne=xt>0?90+xt/2:-90,Ve=we*((360-xt)/360),nt=(0,me.Z)(ct)==="object"?ct:{count:ct,gap:2},Re=nt.count,_e=nt.gap,Ze=Te(dt),qe=Te(Nt),ut=qe.find(function(Vt){return Vt&&(0,me.Z)(Vt)==="object"}),vt=ut&&(0,me.Z)(ut)==="object",At=vt?"butt":ht,Et=De(we,Ve,0,100,Ne,xt,bt,Pt,At,Ct),Ft=Ee(),Kt=function(){var Ht=0;return Ze.map(function(sn,rn){var un=qe[rn]||qe[qe.length-1],Sn=De(we,Ve,Ht,sn,Ne,xt,bt,un,At,Ct);return Ht+=sn,Ue.createElement(xe,{key:rn,color:un,ptg:sn,radius:He,prefixCls:lt,gradientId:tt,style:Sn,strokeLinecap:At,strokeWidth:Ct,gapDegree:xt,ref:function(Cn){Ft[rn]=Cn},size:je})}).reverse()},Yt=function(){var Ht=Math.round(Re*(Ze[0]/100)),sn=100/Re,rn=0;return new Array(Re).fill(null).map(function(un,Sn){var vn=Sn<=Ht-1?qe[0]:Pt,Cn=vn&&(0,me.Z)(vn)==="object"?"url(#".concat(tt,")"):void 0,On=De(we,Ve,rn,sn,Ne,xt,bt,vn,"butt",Ct,_e);return rn+=(Ve-On.strokeDashoffset+_e)*100/Ve,Ue.createElement("circle",{key:Sn,className:"".concat(lt,"-circle-path"),r:He,cx:gt,cy:gt,stroke:Cn,strokeWidth:Ct,opacity:1,style:On,ref:function(Sr){Ft[Sn]=Sr}})})};return Ue.createElement("svg",(0,at.Z)({className:de()("".concat(lt,"-circle"),mt),viewBox:"0 0 ".concat(je," ").concat(je),style:St,id:ot,role:"presentation"},Dt),!Re&&Ue.createElement("circle",{className:"".concat(lt,"-circle-trail"),r:He,cx:gt,cy:gt,stroke:Pt,strokeLinecap:At,strokeWidth:Je||Ct,style:Et}),Re?Yt():Kt())},Be=Me,Ge={Line:Ae,Circle:Be}},738:function(_n,Mn,ft){"use strict";ft.d(Mn,{Z:function(){return he}});var at=ft(71409),Gt=ft(87075),oe=ft(11036),Ue=ft(39224),Ie=ft(92310),de=ft.n(Ie),ve=ft(18929),Ee=ft(10228),ke=ft(26112),Se=ft(59301);function Ae(pe,xe){var je=pe.disabled,De=pe.prefixCls,Fe=pe.character,Te=pe.characterRender,Me=pe.index,Be=pe.count,Ge=pe.value,Ye=pe.allowHalf,Ke=pe.focused,Xe=pe.onHover,ot=pe.onClick,lt=function(ht){Xe(ht,Me)},ct=function(ht){ot(ht,Me)},Ct=function(ht){ht.keyCode===Ee.Z.ENTER&&ot(ht,Me)},Je=Me+1,rt=new Set([De]);Ge===0&&Me===0&&Ke?rt.add("".concat(De,"-focused")):Ye&&Ge+.5>=Je&&Ge<Je?(rt.add("".concat(De,"-half")),rt.add("".concat(De,"-active")),Ke&&rt.add("".concat(De,"-focused"))):(Je<=Ge?rt.add("".concat(De,"-full")):rt.add("".concat(De,"-zero")),Je===Ge&&Ke&&rt.add("".concat(De,"-focused")));var xt=typeof Fe=="function"?Fe(pe):Fe,bt=Se.createElement("li",{className:de()(Array.from(rt)),ref:xe},Se.createElement("div",{onClick:je?null:ct,onKeyDown:je?null:Ct,onMouseMove:je?null:lt,role:"radio","aria-checked":Ge>Me?"true":"false","aria-posinset":Me+1,"aria-setsize":Be,tabIndex:je?-1:0},Se.createElement("div",{className:"".concat(De,"-first")},xt),Se.createElement("div",{className:"".concat(De,"-second")},xt)));return Te&&(bt=Te(bt,pe)),bt}var me=Se.forwardRef(Ae);function be(){var pe=Se.useRef({});function xe(De){return pe.current[De]}function je(De){return function(Fe){pe.current[De]=Fe}}return[xe,je]}function fe(pe){var xe=pe.pageXOffset,je="scrollLeft";if(typeof xe!="number"){var De=pe.document;xe=De.documentElement[je],typeof xe!="number"&&(xe=De.body[je])}return xe}function z(pe){var xe,je,De=pe.ownerDocument,Fe=De.body,Te=De&&De.documentElement,Me=pe.getBoundingClientRect();return xe=Me.left,je=Me.top,xe-=Te.clientLeft||Fe.clientLeft||0,je-=Te.clientTop||Fe.clientTop||0,{left:xe,top:je}}function te(pe){var xe=z(pe),je=pe.ownerDocument,De=je.defaultView||je.parentWindow;return xe.left+=fe(De),xe.left}var se=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function ie(pe,xe){var je=pe.prefixCls,De=je===void 0?"rc-rate":je,Fe=pe.className,Te=pe.defaultValue,Me=pe.value,Be=pe.count,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,ct=lt===void 0?!0:lt,Ct=pe.character,Je=Ct===void 0?"\u2605":Ct,rt=pe.characterRender,xt=pe.disabled,bt=pe.direction,Pt=bt===void 0?"ltr":bt,ht=pe.tabIndex,St=ht===void 0?0:ht,mt=pe.autoFocus,Nt=pe.onHoverChange,dt=pe.onChange,Dt=pe.onFocus,gt=pe.onBlur,yt=pe.onKeyDown,tt=pe.onMouseLeave,He=(0,Ue.Z)(pe,se),we=be(),Ne=(0,oe.Z)(we,2),Ve=Ne[0],nt=Ne[1],Re=Se.useRef(null),_e=function(){if(!xt){var Jr;(Jr=Re.current)===null||Jr===void 0||Jr.focus()}};Se.useImperativeHandle(xe,function(){return{focus:_e,blur:function(){if(!xt){var Jr;(Jr=Re.current)===null||Jr===void 0||Jr.blur()}}}});var Ze=(0,ve.Z)(Te||0,{value:Me}),qe=(0,oe.Z)(Ze,2),ut=qe[0],vt=qe[1],At=(0,ve.Z)(null),Et=(0,oe.Z)(At,2),Ft=Et[0],Kt=Et[1],Yt=function(Jr,Li){var et=Pt==="rtl",Mr=Jr+1;if(Ke){var Er=Ve(Jr),En=te(Er),Tn=Er.clientWidth;(et&&Li-En>Tn/2||!et&&Li-En<Tn/2)&&(Mr-=.5)}return Mr},Vt=function(Jr){vt(Jr),dt==null||dt(Jr)},Ht=Se.useState(!1),sn=(0,oe.Z)(Ht,2),rn=sn[0],un=sn[1],Sn=function(){un(!0),Dt==null||Dt()},vn=function(){un(!1),gt==null||gt()},Cn=Se.useState(null),On=(0,oe.Z)(Cn,2),Dr=On[0],Sr=On[1],qr=function(Jr,Li){var et=Yt(Li,Jr.pageX);et!==Ft&&(Sr(et),Kt(null)),Nt==null||Nt(et)},tr=function(Jr){xt||(Sr(null),Kt(null),Nt==null||Nt(void 0)),Jr&&(tt==null||tt(Jr))},ai=function(Jr,Li){var et=Yt(Li,Jr.pageX),Mr=!1;ot&&(Mr=et===ut),tr(),Vt(Mr?0:et),Kt(Mr?et:null)},gi=function(Jr){var Li=Jr.keyCode,et=Pt==="rtl",Mr=Ke?.5:1;ct&&(Li===Ee.Z.RIGHT&&ut<Ge&&!et?(Vt(ut+Mr),Jr.preventDefault()):Li===Ee.Z.LEFT&&ut>0&&!et||Li===Ee.Z.RIGHT&&ut>0&&et?(Vt(ut-Mr),Jr.preventDefault()):Li===Ee.Z.LEFT&&ut<Ge&&et&&(Vt(ut+Mr),Jr.preventDefault())),yt==null||yt(Jr)};Se.useEffect(function(){mt&&!xt&&_e()},[]);var fi=new Array(Ge).fill(0).map(function(ki,Jr){return Se.createElement(me,{ref:nt(Jr),index:Jr,count:Ge,disabled:xt,prefixCls:"".concat(De,"-star"),allowHalf:Ke,value:Dr===null?ut:Dr,onClick:ai,onHover:qr,key:ki||Jr,character:Je,characterRender:rt,focused:rn})}),Di=de()(De,Fe,(0,Gt.Z)((0,Gt.Z)({},"".concat(De,"-disabled"),xt),"".concat(De,"-rtl"),Pt==="rtl"));return Se.createElement("ul",(0,at.Z)({className:Di,onMouseLeave:tr,tabIndex:xt?-1:St,onFocus:xt?null:Sn,onBlur:xt?null:vn,onKeyDown:xt?null:gi,ref:Re},(0,ke.Z)(He,{aria:!0,data:!0,attr:!0})),fi)}var le=Se.forwardRef(ie),he=le},6551:function(_n,Mn,ft){"use strict";ft.d(Mn,{ZP:function(){return ve}});var at=ft(11036),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),Ae=Se[0],me=Se[1];return Gt.useEffect(function(){me("rc_select_".concat(de()))},[]),Ee||Ae}},37463:function(_n,Mn,ft){"use strict";ft.d(Mn,{Ac:function(){return un},Xo:function(){return vn},Wx:function(){return On},ZP:function(){return $r},lk:function(){return he}});var at=ft(71409),Gt=ft(62730),oe=ft(87075),Ue=ft(89490),Ie=ft(11036),de=ft(39224),ve=ft(28788),Ee=ft(18929),ke=ft(48736),Se=ft(59301),Ae=ft(92310),me=ft.n(Ae),be=ft(34280),fe=ft(49658),z=ft(8654),te=function(Wt){var Fn=Wt.className,zn=Wt.customizeIcon,tn=Wt.customizeIconProps,Nn=Wt.children,jn=Wt.onMouseDown,Ln=Wt.onClick,An=typeof zn=="function"?zn(tn):zn;return Se.createElement("span",{className:Fn,onMouseDown:function(Jn){Jn.preventDefault(),jn==null||jn(Jn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Ln,"aria-hidden":!0},An!==void 0?An:Se.createElement("span",{className:me()(Fn.split(/\s+/).map(function(Kn){return"".concat(Kn,"-icon")}))},Nn))},se=te,ie=function(Wt,Fn,zn,tn,Nn){var jn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Ln=arguments.length>6?arguments[6]:void 0,An=arguments.length>7?arguments[7]:void 0,Kn=Se.useMemo(function(){if((0,ve.Z)(tn)==="object")return tn.clearIcon;if(Nn)return Nn},[tn,Nn]),Jn=Se.useMemo(function(){return!!(!jn&&tn&&(zn.length||Ln)&&!(An==="combobox"&&Ln===""))},[tn,jn,zn.length,Ln,An]);return{allowClear:Jn,clearIcon:Se.createElement(se,{className:"".concat(Wt,"-clear"),onMouseDown:Fn,customizeIcon:Kn},"\xD7")}},le=Se.createContext(null);function he(){return Se.useContext(le)}function pe(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Wt=Se.useState(!1),Fn=(0,Ie.Z)(Wt,2),zn=Fn[0],tn=Fn[1],Nn=Se.useRef(null),jn=function(){window.clearTimeout(Nn.current)};Se.useEffect(function(){return jn},[]);var Ln=function(Kn,Jn){jn(),Nn.current=window.setTimeout(function(){tn(Kn),Jn&&Jn()},Mt)};return[zn,Ln,jn]}function xe(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Wt=Se.useRef(null),Fn=Se.useRef(null);Se.useEffect(function(){return function(){window.clearTimeout(Fn.current)}},[]);function zn(tn){(tn||Wt.current===null)&&(Wt.current=tn),window.clearTimeout(Fn.current),Fn.current=window.setTimeout(function(){Wt.current=null},Mt)}return[function(){return Wt.current},zn]}function je(Mt,Wt,Fn,zn){var tn=Se.useRef(null);tn.current={open:Wt,triggerOpen:Fn,customizedTrigger:zn},Se.useEffect(function(){function Nn(jn){var Ln;if(!((Ln=tn.current)!==null&&Ln!==void 0&&Ln.customizedTrigger)){var An=jn.target;An.shadowRoot&&jn.composed&&(An=jn.composedPath()[0]||An),tn.current.open&&Mt().filter(function(Kn){return Kn}).every(function(Kn){return!Kn.contains(An)&&Kn!==An})&&tn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Nn),function(){return window.removeEventListener("mousedown",Nn)}},[])}var De=ft(10228);function Fe(Mt){return Mt&&![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(Mt)}var Te=ft(26112),Me=ft(11780);function Be(Mt,Wt,Fn){var zn=(0,Ue.Z)((0,Ue.Z)({},Mt),Fn?Wt:{});return Object.keys(Wt).forEach(function(tn){var Nn=Wt[tn];typeof Nn=="function"&&(zn[tn]=function(){for(var jn,Ln=arguments.length,An=new Array(Ln),Kn=0;Kn<Ln;Kn++)An[Kn]=arguments[Kn];return Nn.apply(void 0,An),(jn=Mt[tn])===null||jn===void 0?void 0:jn.call.apply(jn,[Mt].concat(An))})}),zn}var Ge=Be,Ye=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ke=function(Wt,Fn){var zn=Wt.prefixCls,tn=Wt.id,Nn=Wt.inputElement,jn=Wt.autoFocus,Ln=Wt.autoComplete,An=Wt.editable,Kn=Wt.activeDescendantId,Jn=Wt.value,er=Wt.open,Wr=Wt.attrs,Cr=(0,de.Z)(Wt,Ye),Tr=Nn||Se.createElement("input",null),ln=Tr,ri=ln.ref,di=ln.props;return(0,ke.Kp)(!("maxLength"in Tr.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Tr=Se.cloneElement(Tr,(0,Ue.Z)((0,Ue.Z)((0,Ue.Z)({type:"search"},Ge(Cr,di,!0)),{},{id:tn,ref:(0,z.sQ)(Fn,ri),autoComplete:Ln||"off",autoFocus:jn,className:me()("".concat(zn,"-selection-search-input"),di==null?void 0:di.className),role:"combobox","aria-expanded":er||!1,"aria-haspopup":"listbox","aria-owns":"".concat(tn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(tn,"_list"),"aria-activedescendant":er?Kn:void 0},Wr),{},{value:An?Jn:"",readOnly:!An,unselectable:An?null:"on",style:(0,Ue.Z)((0,Ue.Z)({},di.style),{},{opacity:An?null:0})})),Tr},Xe=Se.forwardRef(Ke),ot=Xe;function lt(Mt){return Array.isArray(Mt)?Mt:Mt!==void 0?[Mt]:[]}var ct=typeof window!="undefined"&&window.document&&window.document.documentElement,Ct=ct;function Je(Mt){return Mt!=null}function rt(Mt){return!Mt&&Mt!==0}function xt(Mt){return["string","number"].includes((0,ve.Z)(Mt))}function bt(Mt){var Wt=void 0;return Mt&&(xt(Mt.title)?Wt=Mt.title.toString():xt(Mt.label)&&(Wt=Mt.label.toString())),Wt}function Pt(Mt,Wt){Ct?Se.useLayoutEffect(Mt,Wt):Se.useEffect(Mt,Wt)}function ht(Mt){var Wt;return(Wt=Mt.key)!==null&&Wt!==void 0?Wt:Mt.value}var St=function(Wt){Wt.preventDefault(),Wt.stopPropagation()},mt=function(Wt){var Fn=Wt.id,zn=Wt.prefixCls,tn=Wt.values,Nn=Wt.open,jn=Wt.searchValue,Ln=Wt.autoClearSearchValue,An=Wt.inputRef,Kn=Wt.placeholder,Jn=Wt.disabled,er=Wt.mode,Wr=Wt.showSearch,Cr=Wt.autoFocus,Tr=Wt.autoComplete,ln=Wt.activeDescendantId,ri=Wt.tabIndex,di=Wt.removeIcon,_i=Wt.maxTagCount,pn=Wt.maxTagTextLength,Xn=Wt.maxTagPlaceholder,rr=Xn===void 0?function(Vn){return"+ ".concat(Vn.length," ...")}:Xn,ir=Wt.tagRender,wr=Wt.onToggleOpen,Rr=Wt.onRemove,Kr=Wt.onInputChange,ii=Wt.onInputPaste,oi=Wt.onInputKeyDown,cr=Wt.onInputMouseDown,on=Wt.onInputCompositionStart,or=Wt.onInputCompositionEnd,an=Wt.onInputBlur,gr=Se.useRef(null),Vr=(0,Se.useState)(0),ti=(0,Ie.Z)(Vr,2),Ni=ti[0],hi=ti[1],Zr=(0,Se.useState)(!1),Ui=(0,Ie.Z)(Zr,2),en=Ui[0],fn=Ui[1],$t="".concat(zn,"-selection"),st=Nn||er==="multiple"&&Ln===!1||er==="tags"?jn:"",Bn=er==="tags"||er==="multiple"&&Ln===!1||Wr&&(Nn||en);Pt(function(){hi(gr.current.scrollWidth)},[st]);var Gn=function(kn,Zn,xr,sr,Qn){return Se.createElement("span",{title:bt(kn),className:me()("".concat($t,"-item"),(0,oe.Z)({},"".concat($t,"-item-disabled"),xr))},Se.createElement("span",{className:"".concat($t,"-item-content")},Zn),sr&&Se.createElement(se,{className:"".concat($t,"-item-remove"),onMouseDown:St,onClick:Qn,customizeIcon:di},"\xD7"))},fr=function(kn,Zn,xr,sr,Qn,cn){var vr=function(si){St(si),wr(!Nn)};return Se.createElement("span",{onMouseDown:vr},ir({label:Zn,value:kn,disabled:xr,closable:sr,onClose:Qn,isMaxTag:!!cn}))},ur=function(kn){var Zn=kn.disabled,xr=kn.label,sr=kn.value,Qn=!Jn&&!Zn,cn=xr;if(typeof pn=="number"&&(typeof xr=="string"||typeof xr=="number")){var vr=String(cn);vr.length>pn&&(cn="".concat(vr.slice(0,pn),"..."))}var Nr=function(Ur){Ur&&Ur.stopPropagation(),Rr(kn)};return typeof ir=="function"?fr(sr,cn,Zn,Qn,Nr):Gn(kn,cn,Zn,Qn,Nr)},qn=function(kn){if(!tn.length)return null;var Zn=typeof rr=="function"?rr(kn):rr;return typeof ir=="function"?fr(void 0,Zn,!1,!1,void 0,!0):Gn({title:Zn},Zn,!1)},gn=Se.createElement("div",{className:"".concat($t,"-search"),style:{width:Ni},onFocus:function(){fn(!0)},onBlur:function(){fn(!1)}},Se.createElement(ot,{ref:An,open:Nn,prefixCls:zn,id:Fn,inputElement:null,disabled:Jn,autoFocus:Cr,autoComplete:Tr,editable:Bn,activeDescendantId:ln,value:st,onKeyDown:oi,onMouseDown:cr,onChange:Kr,onPaste:ii,onCompositionStart:on,onCompositionEnd:or,onBlur:an,tabIndex:ri,attrs:(0,Te.Z)(Wt,!0)}),Se.createElement("span",{ref:gr,className:"".concat($t,"-search-mirror"),"aria-hidden":!0},st,"\xA0")),Rn=Se.createElement(Me.Z,{prefixCls:"".concat($t,"-overflow"),data:tn,renderItem:ur,renderRest:qn,suffix:gn,itemKey:ht,maxCount:_i});return Se.createElement("span",{className:"".concat($t,"-wrap")},Rn,!tn.length&&!st&&Se.createElement("span",{className:"".concat($t,"-placeholder")},Kn))},Nt=mt,dt=function(Wt){var Fn=Wt.inputElement,zn=Wt.prefixCls,tn=Wt.id,Nn=Wt.inputRef,jn=Wt.disabled,Ln=Wt.autoFocus,An=Wt.autoComplete,Kn=Wt.activeDescendantId,Jn=Wt.mode,er=Wt.open,Wr=Wt.values,Cr=Wt.placeholder,Tr=Wt.tabIndex,ln=Wt.showSearch,ri=Wt.searchValue,di=Wt.activeValue,_i=Wt.maxLength,pn=Wt.onInputKeyDown,Xn=Wt.onInputMouseDown,rr=Wt.onInputChange,ir=Wt.onInputPaste,wr=Wt.onInputCompositionStart,Rr=Wt.onInputCompositionEnd,Kr=Wt.onInputBlur,ii=Wt.title,oi=Se.useState(!1),cr=(0,Ie.Z)(oi,2),on=cr[0],or=cr[1],an=Jn==="combobox",gr=an||ln,Vr=Wr[0],ti=ri||"";an&&di&&!on&&(ti=di),Se.useEffect(function(){an&&or(!1)},[an,di]);var Ni=Jn!=="combobox"&&!er&&!ln?!1:!!ti,hi=ii===void 0?bt(Vr):ii,Zr=Se.useMemo(function(){return Vr?null:Se.createElement("span",{className:"".concat(zn,"-selection-placeholder"),style:Ni?{visibility:"hidden"}:void 0},Cr)},[Vr,Ni,Cr,zn]);return Se.createElement("span",{className:"".concat(zn,"-selection-wrap")},Se.createElement("span",{className:"".concat(zn,"-selection-search")},Se.createElement(ot,{ref:Nn,prefixCls:zn,id:tn,open:er,inputElement:Fn,disabled:jn,autoFocus:Ln,autoComplete:An,editable:gr,activeDescendantId:Kn,value:ti,onKeyDown:pn,onMouseDown:Xn,onChange:function(en){or(!0),rr(en)},onPaste:ir,onCompositionStart:wr,onCompositionEnd:Rr,onBlur:Kr,tabIndex:Tr,attrs:(0,Te.Z)(Wt,!0),maxLength:an?_i:void 0})),!an&&Vr?Se.createElement("span",{className:"".concat(zn,"-selection-item"),title:hi,style:Ni?{visibility:"hidden"}:void 0},Vr.label):null,Zr)},Dt=dt,gt=function(Wt,Fn){var zn=(0,Se.useRef)(null),tn=(0,Se.useRef)(!1),Nn=Wt.prefixCls,jn=Wt.open,Ln=Wt.mode,An=Wt.showSearch,Kn=Wt.tokenWithEnter,Jn=Wt.disabled,er=Wt.prefix,Wr=Wt.autoClearSearchValue,Cr=Wt.onSearch,Tr=Wt.onSearchSubmit,ln=Wt.onToggleOpen,ri=Wt.onInputKeyDown,di=Wt.onInputBlur,_i=Wt.domRef;Se.useImperativeHandle(Fn,function(){return{focus:function(hi){zn.current.focus(hi)},blur:function(){zn.current.blur()}}});var pn=xe(0),Xn=(0,Ie.Z)(pn,2),rr=Xn[0],ir=Xn[1],wr=function(hi){var Zr=hi.which,Ui=zn.current instanceof HTMLTextAreaElement;!Ui&&jn&&(Zr===De.Z.UP||Zr===De.Z.DOWN)&&hi.preventDefault(),ri&&ri(hi),Zr===De.Z.ENTER&&Ln==="tags"&&!tn.current&&!jn&&(Tr==null||Tr(hi.target.value)),!(Ui&&!jn&&~[De.Z.UP,De.Z.DOWN,De.Z.LEFT,De.Z.RIGHT].indexOf(Zr))&&Fe(Zr)&&ln(!0)},Rr=function(){ir(!0)},Kr=(0,Se.useRef)(null),ii=function(hi){Cr(hi,!0,tn.current)!==!1&&ln(!0)},oi=function(){tn.current=!0},cr=function(hi){tn.current=!1,Ln!=="combobox"&&ii(hi.target.value)},on=function(hi){var Zr=hi.target.value;if(Kn&&Kr.current&&/[\r\n]/.test(Kr.current)){var Ui=Kr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Zr=Zr.replace(Ui,Kr.current)}Kr.current=null,ii(Zr)},or=function(hi){var Zr=hi.clipboardData,Ui=Zr==null?void 0:Zr.getData("text");Kr.current=Ui||""},an=function(hi){var Zr=hi.target;if(Zr!==zn.current){var Ui=document.body.style.msTouchAction!==void 0;Ui?setTimeout(function(){zn.current.focus()}):zn.current.focus()}},gr=function(hi){var Zr=rr();hi.target!==zn.current&&!Zr&&!(Ln==="combobox"&&Jn)&&hi.preventDefault(),(Ln!=="combobox"&&(!An||!Zr)||!jn)&&(jn&&Wr!==!1&&Cr("",!0,!1),ln())},Vr={inputRef:zn,onInputKeyDown:wr,onInputMouseDown:Rr,onInputChange:on,onInputPaste:or,onInputCompositionStart:oi,onInputCompositionEnd:cr,onInputBlur:di},ti=Ln==="multiple"||Ln==="tags"?Se.createElement(Nt,(0,at.Z)({},Wt,Vr)):Se.createElement(Dt,(0,at.Z)({},Wt,Vr));return Se.createElement("div",{ref:_i,className:"".concat(Nn,"-selector"),onClick:an,onMouseDown:gr},er&&Se.createElement("div",{className:"".concat(Nn,"-prefix")},er),ti)},yt=Se.forwardRef(gt),tt=yt,He=ft(65352),we=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ne=function(Wt){var Fn=Wt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Fn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Fn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Fn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Fn,adjustY:1},htmlRegion:"scroll"}}},Ve=function(Wt,Fn){var zn=Wt.prefixCls,tn=Wt.disabled,Nn=Wt.visible,jn=Wt.children,Ln=Wt.popupElement,An=Wt.animation,Kn=Wt.transitionName,Jn=Wt.dropdownStyle,er=Wt.dropdownClassName,Wr=Wt.direction,Cr=Wr===void 0?"ltr":Wr,Tr=Wt.placement,ln=Wt.builtinPlacements,ri=Wt.dropdownMatchSelectWidth,di=Wt.dropdownRender,_i=Wt.dropdownAlign,pn=Wt.getPopupContainer,Xn=Wt.empty,rr=Wt.getTriggerDOMNode,ir=Wt.onPopupVisibleChange,wr=Wt.onPopupMouseEnter,Rr=(0,de.Z)(Wt,we),Kr="".concat(zn,"-dropdown"),ii=Ln;di&&(ii=di(Ln));var oi=Se.useMemo(function(){return ln||Ne(ri)},[ln,ri]),cr=An?"".concat(Kr,"-").concat(An):Kn,on=typeof ri=="number",or=Se.useMemo(function(){return on?null:ri===!1?"minWidth":"width"},[ri,on]),an=Jn;on&&(an=(0,Ue.Z)((0,Ue.Z)({},an),{},{width:ri}));var gr=Se.useRef(null);return Se.useImperativeHandle(Fn,function(){return{getPopupElement:function(){var ti;return(ti=gr.current)===null||ti===void 0?void 0:ti.popupElement}}}),Se.createElement(He.Z,(0,at.Z)({},Rr,{showAction:ir?["click"]:[],hideAction:ir?["click"]:[],popupPlacement:Tr||(Cr==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:oi,prefixCls:Kr,popupTransitionName:cr,popup:Se.createElement("div",{onMouseEnter:wr},ii),ref:gr,stretch:or,popupAlign:_i,popupVisible:Nn,getPopupContainer:pn,popupClassName:me()(er,(0,oe.Z)({},"".concat(Kr,"-empty"),Xn)),popupStyle:an,getTriggerDOMNode:rr,onPopupVisibleChange:ir}),jn)},nt=Se.forwardRef(Ve),Re=nt,_e=ft(67900);function Ze(Mt,Wt){var Fn=Mt.key,zn;return"value"in Mt&&(zn=Mt.value),Fn!=null?Fn:zn!==void 0?zn:"rc-index-key-".concat(Wt)}function qe(Mt){return typeof Mt!="undefined"&&!Number.isNaN(Mt)}function ut(Mt,Wt){var Fn=Mt||{},zn=Fn.label,tn=Fn.value,Nn=Fn.options,jn=Fn.groupLabel,Ln=zn||(Wt?"children":"label");return{label:Ln,value:tn||"value",options:Nn||"options",groupLabel:jn||Ln}}function vt(Mt){var Wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fn=Wt.fieldNames,zn=Wt.childrenAsData,tn=[],Nn=ut(Fn,!1),jn=Nn.label,Ln=Nn.value,An=Nn.options,Kn=Nn.groupLabel;function Jn(er,Wr){Array.isArray(er)&&er.forEach(function(Cr){if(Wr||!(An in Cr)){var Tr=Cr[Ln];tn.push({key:Ze(Cr,tn.length),groupOption:Wr,data:Cr,label:Cr[jn],value:Tr})}else{var ln=Cr[Kn];ln===void 0&&zn&&(ln=Cr.label),tn.push({key:Ze(Cr,tn.length),group:!0,data:Cr,label:ln}),Jn(Cr[An],!0)}})}return Jn(Mt,!1),tn}function At(Mt){var Wt=(0,Ue.Z)({},Mt);return"props"in Wt||Object.defineProperty(Wt,"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`."),Wt}}),Wt}var Et=function(Wt,Fn,zn){if(!Fn||!Fn.length)return null;var tn=!1,Nn=function Ln(An,Kn){var Jn=(0,_e.Z)(Kn),er=Jn[0],Wr=Jn.slice(1);if(!er)return[An];var Cr=An.split(er);return tn=tn||Cr.length>1,Cr.reduce(function(Tr,ln){return[].concat((0,Gt.Z)(Tr),(0,Gt.Z)(Ln(ln,Wr)))},[]).filter(Boolean)},jn=Nn(Wt,Fn);return tn?typeof zn!="undefined"?jn.slice(0,zn):jn:null},Ft=Se.createContext(null),Kt=Ft;function Yt(Mt){var Wt=Mt.visible,Fn=Mt.values;if(!Wt)return null;var zn=50;return Se.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Fn.slice(0,zn).map(function(tn){var Nn=tn.label,jn=tn.value;return["number","string"].includes((0,ve.Z)(Nn))?Nn:jn}).join(", ")),Fn.length>zn?", ...":null)}var Vt=["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"],Ht=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],sn=function(Wt){return Wt==="tags"||Wt==="multiple"},rn=Se.forwardRef(function(Mt,Wt){var Fn,zn=Mt.id,tn=Mt.prefixCls,Nn=Mt.className,jn=Mt.showSearch,Ln=Mt.tagRender,An=Mt.direction,Kn=Mt.omitDomProps,Jn=Mt.displayValues,er=Mt.onDisplayValuesChange,Wr=Mt.emptyOptions,Cr=Mt.notFoundContent,Tr=Cr===void 0?"Not Found":Cr,ln=Mt.onClear,ri=Mt.mode,di=Mt.disabled,_i=Mt.loading,pn=Mt.getInputElement,Xn=Mt.getRawInputElement,rr=Mt.open,ir=Mt.defaultOpen,wr=Mt.onDropdownVisibleChange,Rr=Mt.activeValue,Kr=Mt.onActiveValueChange,ii=Mt.activeDescendantId,oi=Mt.searchValue,cr=Mt.autoClearSearchValue,on=Mt.onSearch,or=Mt.onSearchSplit,an=Mt.tokenSeparators,gr=Mt.allowClear,Vr=Mt.prefix,ti=Mt.suffixIcon,Ni=Mt.clearIcon,hi=Mt.OptionList,Zr=Mt.animation,Ui=Mt.transitionName,en=Mt.dropdownStyle,fn=Mt.dropdownClassName,$t=Mt.dropdownMatchSelectWidth,st=Mt.dropdownRender,Bn=Mt.dropdownAlign,Gn=Mt.placement,fr=Mt.builtinPlacements,ur=Mt.getPopupContainer,qn=Mt.showAction,gn=qn===void 0?[]:qn,Rn=Mt.onFocus,Vn=Mt.onBlur,kn=Mt.onKeyUp,Zn=Mt.onKeyDown,xr=Mt.onMouseDown,sr=(0,de.Z)(Mt,Vt),Qn=sn(ri),cn=(jn!==void 0?jn:Qn)||ri==="combobox",vr=(0,Ue.Z)({},sr);Ht.forEach(function(oo){delete vr[oo]}),Kn==null||Kn.forEach(function(oo){delete vr[oo]});var Nr=Se.useState(!1),si=(0,Ie.Z)(Nr,2),Ur=si[0],Ti=si[1];Se.useEffect(function(){Ti((0,fe.Z)())},[]);var Ei=Se.useRef(null),bi=Se.useRef(null),Ai=Se.useRef(null),ji=Se.useRef(null),$i=Se.useRef(null),qt=Se.useRef(!1),Mi=pe(),Pi=(0,Ie.Z)(Mi,3),Xr=Pi[0],mi=Pi[1],ei=Pi[2];Se.useImperativeHandle(Wt,function(){var oo,Ji;return{focus:(oo=ji.current)===null||oo===void 0?void 0:oo.focus,blur:(Ji=ji.current)===null||Ji===void 0?void 0:Ji.blur,scrollTo:function(kr){var fa;return(fa=$i.current)===null||fa===void 0?void 0:fa.scrollTo(kr)},nativeElement:Ei.current||bi.current}});var Hi=Se.useMemo(function(){var oo;if(ri!=="combobox")return oi;var Ji=(oo=Jn[0])===null||oo===void 0?void 0:oo.value;return typeof Ji=="string"||typeof Ji=="number"?String(Ji):""},[oi,ri,Jn]),Gi=ri==="combobox"&&typeof pn=="function"&&pn()||null,ci=typeof Xn=="function"&&Xn(),to=(0,z.x1)(bi,ci==null||(Fn=ci.props)===null||Fn===void 0?void 0:Fn.ref),pa=Se.useState(!1),Ao=(0,Ie.Z)(pa,2),bs=Ao[0],wa=Ao[1];(0,be.Z)(function(){wa(!0)},[]);var Ir=(0,Ee.Z)(!1,{defaultValue:ir,value:rr}),bo=(0,Ie.Z)(Ir,2),Po=bo[0],ta=bo[1],jo=bs?Po:!1,Ko=!Tr&&Wr;(di||Ko&&jo&&ri==="combobox")&&(jo=!1);var ar=Ko?!1:jo,_r=Se.useCallback(function(oo){var Ji=oo!==void 0?oo:!jo;di||(ta(Ji),jo!==Ji&&(wr==null||wr(Ji)))},[di,jo,ta,wr]),li=Se.useMemo(function(){return(an||[]).some(function(oo){return[`
|
|
`,`\r
|
|
`].includes(oo)})},[an]),Ci=Se.useContext(Kt)||{},Oi=Ci.maxCount,no=Ci.rawValues,zr=function(Ji,sa,kr){if(!(Qn&&qe(Oi)&&(no==null?void 0:no.size)>=Oi)){var fa=!0,zt=Ji;Kr==null||Kr(null);var wn=Et(Ji,an,qe(Oi)?Oi-no.size:void 0),Ws=kr?null:wn;return ri!=="combobox"&&Ws&&(zt="",or==null||or(Ws),_r(!1),fa=!1),on&&Hi!==zt&&on(zt,{source:sa?"typing":"effect"}),fa}},Aa=function(Ji){!Ji||!Ji.trim()||on(Ji,{source:"submit"})};Se.useEffect(function(){!jo&&!Qn&&ri!=="combobox"&&zr("",!1,!1)},[jo]),Se.useEffect(function(){Po&&di&&ta(!1),di&&!qt.current&&mi(!1)},[di]);var zo=xe(),Oo=(0,Ie.Z)(zo,2),Ii=Oo[0],Vo=Oo[1],ja=Se.useRef(!1),vo=function(Ji){var sa=Ii(),kr=Ji.key,fa=kr==="Enter";if(fa&&(ri!=="combobox"&&Ji.preventDefault(),jo||_r(!0)),Vo(!!Hi),kr==="Backspace"&&!sa&&Qn&&!Hi&&Jn.length){for(var zt=(0,Gt.Z)(Jn),wn=null,Ws=zt.length-1;Ws>=0;Ws-=1){var jl=zt[Ws];if(!jl.disabled){zt.splice(Ws,1),wn=jl;break}}wn&&er(zt,{type:"remove",values:[wn]})}for(var $o=arguments.length,ba=new Array($o>1?$o-1:0),Fs=1;Fs<$o;Fs++)ba[Fs-1]=arguments[Fs];if(jo&&(!fa||!ja.current)){var ol;fa&&(ja.current=!0),(ol=$i.current)===null||ol===void 0||ol.onKeyDown.apply(ol,[Ji].concat(ba))}Zn==null||Zn.apply(void 0,[Ji].concat(ba))},fs=function(Ji){for(var sa=arguments.length,kr=new Array(sa>1?sa-1:0),fa=1;fa<sa;fa++)kr[fa-1]=arguments[fa];if(jo){var zt;(zt=$i.current)===null||zt===void 0||zt.onKeyUp.apply(zt,[Ji].concat(kr))}Ji.key==="Enter"&&(ja.current=!1),kn==null||kn.apply(void 0,[Ji].concat(kr))},ds=function(Ji){var sa=Jn.filter(function(kr){return kr!==Ji});er(sa,{type:"remove",values:[Ji]})},Ps=function(){ja.current=!1},na=Se.useRef(!1),eh=function(){mi(!0),di||(Rn&&!na.current&&Rn.apply(void 0,arguments),gn.includes("focus")&&_r(!0)),na.current=!0},ju=function(){qt.current=!0,mi(!1,function(){na.current=!1,qt.current=!1,_r(!1)}),!di&&(Hi&&(ri==="tags"?on(Hi,{source:"submit"}):ri==="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(Ji){var sa,kr=Ji.target,fa=(sa=Ai.current)===null||sa===void 0?void 0:sa.getPopupElement();if(fa&&fa.contains(kr)){var zt=setTimeout(function(){var $o=il.indexOf(zt);if($o!==-1&&il.splice($o,1),ei(),!Ur&&!fa.contains(document.activeElement)){var ba;(ba=ji.current)===null||ba===void 0||ba.focus()}});il.push(zt)}for(var wn=arguments.length,Ws=new Array(wn>1?wn-1:0),jl=1;jl<wn;jl++)Ws[jl-1]=arguments[jl];xr==null||xr.apply(void 0,[Ji].concat(Ws))},Os=Se.useState({}),Vl=(0,Ie.Z)(Os,2),th=Vl[1];function nh(){th({})}var Zo;ci&&(Zo=function(Ji){_r(Ji)}),je(function(){var oo;return[Ei.current,(oo=Ai.current)===null||oo===void 0?void 0:oo.getPopupElement()]},ar,_r,!!ci);var Ou=Se.useMemo(function(){return(0,Ue.Z)((0,Ue.Z)({},Mt),{},{notFoundContent:Tr,open:jo,triggerOpen:ar,id:zn,showSearch:cn,multiple:Qn,toggleOpen:_r})},[Mt,Tr,ar,jo,zn,cn,Qn,_r]),rh=!!ti||_i,Zl;rh&&(Zl=Se.createElement(se,{className:me()("".concat(tn,"-arrow"),(0,oe.Z)({},"".concat(tn,"-arrow-loading"),_i)),customizeIcon:ti,customizeIconProps:{loading:_i,searchValue:Hi,open:jo,focused:Xr,showSearch:cn}}));var uu=function(){var Ji;ln==null||ln(),(Ji=ji.current)===null||Ji===void 0||Ji.focus(),er([],{type:"clear",values:Jn}),zr("",!1,!1)},Ca=ie(tn,uu,Jn,gr,Ni,di,Hi,ri),Oa=Ca.allowClear,aa=Ca.clearIcon,ga=Se.createElement(hi,{ref:$i}),Xl=me()(tn,Nn,(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(tn,"-focused"),Xr),"".concat(tn,"-multiple"),Qn),"".concat(tn,"-single"),!Qn),"".concat(tn,"-allow-clear"),gr),"".concat(tn,"-show-arrow"),rh),"".concat(tn,"-disabled"),di),"".concat(tn,"-loading"),_i),"".concat(tn,"-open"),jo),"".concat(tn,"-customize-input"),Gi),"".concat(tn,"-show-search"),cn)),Ga=Se.createElement(Re,{ref:Ai,disabled:di,prefixCls:tn,visible:ar,popupElement:ga,animation:Zr,transitionName:Ui,dropdownStyle:en,dropdownClassName:fn,direction:An,dropdownMatchSelectWidth:$t,dropdownRender:st,dropdownAlign:Bn,placement:Gn,builtinPlacements:fr,getPopupContainer:ur,empty:Wr,getTriggerDOMNode:function(Ji){return bi.current||Ji},onPopupVisibleChange:Zo,onPopupMouseEnter:nh},ci?Se.cloneElement(ci,{ref:to}):Se.createElement(tt,(0,at.Z)({},Mt,{domRef:bi,prefixCls:tn,inputElement:Gi,ref:ji,id:zn,prefix:Vr,showSearch:cn,autoClearSearchValue:cr,mode:ri,activeDescendantId:ii,tagRender:Ln,values:Jn,open:jo,onToggleOpen:_r,activeValue:Rr,searchValue:Hi,onSearch:zr,onSearchSubmit:Aa,onRemove:ds,tokenWithEnter:li,onInputBlur:Ps}))),co;return ci?co=Ga:co=Se.createElement("div",(0,at.Z)({className:Xl},vr,{ref:Ei,onMouseDown:Sl,onKeyDown:vo,onKeyUp:fs,onFocus:eh,onBlur:ju}),Se.createElement(Yt,{visible:Xr&&!jo,values:Jn}),Ga,Zl,Oa&&aa),Se.createElement(le.Provider,{value:Ou},co)}),un=rn,Sn=function(){return null};Sn.isSelectOptGroup=!0;var vn=Sn,Cn=function(){return null};Cn.isSelectOption=!0;var On=Cn,Dr=ft(80547),Sr=ft(2738),qr=ft(65283);function tr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var ai=["disabled","title","children","style","className"];function gi(Mt){return typeof Mt=="string"||typeof Mt=="number"}var fi=function(Wt,Fn){var zn=he(),tn=zn.prefixCls,Nn=zn.id,jn=zn.open,Ln=zn.multiple,An=zn.mode,Kn=zn.searchValue,Jn=zn.toggleOpen,er=zn.notFoundContent,Wr=zn.onPopupScroll,Cr=Se.useContext(Kt),Tr=Cr.maxCount,ln=Cr.flattenOptions,ri=Cr.onActiveValue,di=Cr.defaultActiveFirstOption,_i=Cr.onSelect,pn=Cr.menuItemSelectedIcon,Xn=Cr.rawValues,rr=Cr.fieldNames,ir=Cr.virtual,wr=Cr.direction,Rr=Cr.listHeight,Kr=Cr.listItemHeight,ii=Cr.optionRender,oi="".concat(tn,"-item"),cr=(0,Dr.Z)(function(){return ln},[jn,ln],function(qn,gn){return gn[0]&&qn[1]!==gn[1]}),on=Se.useRef(null),or=Se.useMemo(function(){return Ln&&qe(Tr)&&(Xn==null?void 0:Xn.size)>=Tr},[Ln,Tr,Xn==null?void 0:Xn.size]),an=function(gn){gn.preventDefault()},gr=function(gn){var Rn;(Rn=on.current)===null||Rn===void 0||Rn.scrollTo(typeof gn=="number"?{index:gn}:gn)},Vr=Se.useCallback(function(qn){return An==="combobox"?!1:Xn.has(qn)},[An,(0,Gt.Z)(Xn).toString(),Xn.size]),ti=function(gn){for(var Rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Vn=cr.length,kn=0;kn<Vn;kn+=1){var Zn=(gn+kn*Rn+Vn)%Vn,xr=cr[Zn]||{},sr=xr.group,Qn=xr.data;if(!sr&&!(Qn!=null&&Qn.disabled)&&(Vr(Qn.value)||!or))return Zn}return-1},Ni=Se.useState(function(){return ti(0)}),hi=(0,Ie.Z)(Ni,2),Zr=hi[0],Ui=hi[1],en=function(gn){var Rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ui(gn);var Vn={source:Rn?"keyboard":"mouse"},kn=cr[gn];if(!kn){ri(null,-1,Vn);return}ri(kn.value,gn,Vn)};(0,Se.useEffect)(function(){en(di!==!1?ti(0):-1)},[cr.length,Kn]);var fn=Se.useCallback(function(qn){return An==="combobox"?String(qn).toLowerCase()===Kn.toLowerCase():Xn.has(qn)},[An,Kn,(0,Gt.Z)(Xn).toString(),Xn.size]);(0,Se.useEffect)(function(){var qn=setTimeout(function(){if(!Ln&&jn&&Xn.size===1){var Rn=Array.from(Xn)[0],Vn=cr.findIndex(function(kn){var Zn=kn.data;return Kn?String(Zn.value).startsWith(Kn):Zn.value===Rn});Vn!==-1&&(en(Vn),gr(Vn))}});if(jn){var gn;(gn=on.current)===null||gn===void 0||gn.scrollTo(void 0)}return function(){return clearTimeout(qn)}},[jn,Kn]);var $t=function(gn){gn!==void 0&&_i(gn,{selected:!Xn.has(gn)}),Ln||Jn(!1)};if(Se.useImperativeHandle(Fn,function(){return{onKeyDown:function(gn){var Rn=gn.which,Vn=gn.ctrlKey;switch(Rn){case De.Z.N:case De.Z.P:case De.Z.UP:case De.Z.DOWN:{var kn=0;if(Rn===De.Z.UP?kn=-1:Rn===De.Z.DOWN?kn=1:tr()&&Vn&&(Rn===De.Z.N?kn=1:Rn===De.Z.P&&(kn=-1)),kn!==0){var Zn=ti(Zr+kn,kn);gr(Zn),en(Zn,!0)}break}case De.Z.TAB:case De.Z.ENTER:{var xr,sr=cr[Zr];sr&&!(sr!=null&&(xr=sr.data)!==null&&xr!==void 0&&xr.disabled)&&!or?$t(sr.value):$t(void 0),jn&&gn.preventDefault();break}case De.Z.ESC:Jn(!1),jn&&gn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(gn){gr(gn)}}}),cr.length===0)return Se.createElement("div",{role:"listbox",id:"".concat(Nn,"_list"),className:"".concat(oi,"-empty"),onMouseDown:an},er);var st=Object.keys(rr).map(function(qn){return rr[qn]}),Bn=function(gn){return gn.label};function Gn(qn,gn){var Rn=qn.group;return{role:Rn?"presentation":"option",id:"".concat(Nn,"_list_").concat(gn)}}var fr=function(gn){var Rn=cr[gn];if(!Rn)return null;var Vn=Rn.data||{},kn=Vn.value,Zn=Rn.group,xr=(0,Te.Z)(Vn,!0),sr=Bn(Rn);return Rn?Se.createElement("div",(0,at.Z)({"aria-label":typeof sr=="string"&&!Zn?sr:null},xr,{key:gn},Gn(Rn,gn),{"aria-selected":fn(kn)}),kn):null},ur={role:"listbox",id:"".concat(Nn,"_list")};return Se.createElement(Se.Fragment,null,ir&&Se.createElement("div",(0,at.Z)({},ur,{style:{height:0,width:0,overflow:"hidden"}}),fr(Zr-1),fr(Zr),fr(Zr+1)),Se.createElement(qr.Z,{itemKey:"key",ref:on,data:cr,height:Rr,itemHeight:Kr,fullHeight:!1,onMouseDown:an,onScroll:Wr,virtual:ir,direction:wr,innerProps:ir?null:ur},function(qn,gn){var Rn=qn.group,Vn=qn.groupOption,kn=qn.data,Zn=qn.label,xr=qn.value,sr=kn.key;if(Rn){var Qn,cn=(Qn=kn.title)!==null&&Qn!==void 0?Qn:gi(Zn)?Zn.toString():void 0;return Se.createElement("div",{className:me()(oi,"".concat(oi,"-group"),kn.className),title:cn},Zn!==void 0?Zn:sr)}var vr=kn.disabled,Nr=kn.title,si=kn.children,Ur=kn.style,Ti=kn.className,Ei=(0,de.Z)(kn,ai),bi=(0,Sr.Z)(Ei,st),Ai=Vr(xr),ji=vr||!Ai&&or,$i="".concat(oi,"-option"),qt=me()(oi,$i,Ti,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat($i,"-grouped"),Vn),"".concat($i,"-active"),Zr===gn&&!ji),"".concat($i,"-disabled"),ji),"".concat($i,"-selected"),Ai)),Mi=Bn(qn),Pi=!pn||typeof pn=="function"||Ai,Xr=typeof Mi=="number"?Mi:Mi||xr,mi=gi(Xr)?Xr.toString():void 0;return Nr!==void 0&&(mi=Nr),Se.createElement("div",(0,at.Z)({},(0,Te.Z)(bi),ir?{}:Gn(qn,gn),{"aria-selected":fn(xr),className:qt,title:mi,onMouseMove:function(){Zr===gn||ji||en(gn)},onClick:function(){ji||$t(xr)},style:Ur}),Se.createElement("div",{className:"".concat($i,"-content")},typeof ii=="function"?ii(qn,{index:gn}):Xr),Se.isValidElement(pn)||Ai,Pi&&Se.createElement(se,{className:"".concat(oi,"-option-state"),customizeIcon:pn,customizeIconProps:{value:xr,disabled:ji,isSelected:Ai}},Ai?"\u2713":null))}))},Di=Se.forwardRef(fi),ki=Di,Jr=function(Mt,Wt){var Fn=Se.useRef({values:new Map,options:new Map}),zn=Se.useMemo(function(){var Nn=Fn.current,jn=Nn.values,Ln=Nn.options,An=Mt.map(function(er){if(er.label===void 0){var Wr;return(0,Ue.Z)((0,Ue.Z)({},er),{},{label:(Wr=jn.get(er.value))===null||Wr===void 0?void 0:Wr.label})}return er}),Kn=new Map,Jn=new Map;return An.forEach(function(er){Kn.set(er.value,er),Jn.set(er.value,Wt.get(er.value)||Ln.get(er.value))}),Fn.current.values=Kn,Fn.current.options=Jn,An},[Mt,Wt]),tn=Se.useCallback(function(Nn){return Wt.get(Nn)||Fn.current.options.get(Nn)},[Wt]);return[zn,tn]};function Li(Mt,Wt){return lt(Mt).join("").toUpperCase().includes(Wt)}var et=function(Mt,Wt,Fn,zn,tn){return Se.useMemo(function(){if(!Fn||zn===!1)return Mt;var Nn=Wt.options,jn=Wt.label,Ln=Wt.value,An=[],Kn=typeof zn=="function",Jn=Fn.toUpperCase(),er=Kn?zn:function(Cr,Tr){return tn?Li(Tr[tn],Jn):Tr[Nn]?Li(Tr[jn!=="children"?jn:"label"],Jn):Li(Tr[Ln],Jn)},Wr=Kn?function(Cr){return At(Cr)}:function(Cr){return Cr};return Mt.forEach(function(Cr){if(Cr[Nn]){var Tr=er(Fn,Wr(Cr));if(Tr)An.push(Cr);else{var ln=Cr[Nn].filter(function(ri){return er(Fn,Wr(ri))});ln.length&&An.push((0,Ue.Z)((0,Ue.Z)({},Cr),{},(0,oe.Z)({},Nn,ln)))}return}er(Fn,Wr(Cr))&&An.push(Cr)}),An},[Mt,zn,tn,Fn,Wt])},Mr=ft(6551),Er=ft(11592),En=["children","value"],Tn=["children"];function Dn(Mt){var Wt=Mt,Fn=Wt.key,zn=Wt.props,tn=zn.children,Nn=zn.value,jn=(0,de.Z)(zn,En);return(0,Ue.Z)({key:Fn,value:Nn!==void 0?Nn:Fn,children:tn},jn)}function Pr(Mt){var Wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Er.Z)(Mt).map(function(Fn,zn){if(!Se.isValidElement(Fn)||!Fn.type)return null;var tn=Fn,Nn=tn.type.isSelectOptGroup,jn=tn.key,Ln=tn.props,An=Ln.children,Kn=(0,de.Z)(Ln,Tn);return Wt||!Nn?Dn(Fn):(0,Ue.Z)((0,Ue.Z)({key:"__RC_SELECT_GRP__".concat(jn===null?zn:jn,"__"),label:jn},Kn),{},{options:Pr(An)})}).filter(function(Fn){return Fn})}var Br=function(Wt,Fn,zn,tn,Nn){return Se.useMemo(function(){var jn=Wt,Ln=!Wt;Ln&&(jn=Pr(Fn));var An=new Map,Kn=new Map,Jn=function(Cr,Tr,ln){ln&&typeof ln=="string"&&Cr.set(Tr[ln],Tr)},er=function Wr(Cr){for(var Tr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ln=0;ln<Cr.length;ln+=1){var ri=Cr[ln];!ri[zn.options]||Tr?(An.set(ri[zn.value],ri),Jn(Kn,ri,zn.label),Jn(Kn,ri,tn),Jn(Kn,ri,Nn)):Wr(ri[zn.options],!0)}};return er(jn),{options:jn,valueOptions:An,labelOptions:Kn}},[Wt,Fn,zn,tn,Nn])},Ar=Br;function Qt(Mt){var Wt=Se.useRef();Wt.current=Mt;var Fn=Se.useCallback(function(){return Wt.current.apply(Wt,arguments)},[]);return Fn}function Zt(Mt){var Wt=Mt.mode,Fn=Mt.options,zn=Mt.children,tn=Mt.backfill,Nn=Mt.allowClear,jn=Mt.placeholder,Ln=Mt.getInputElement,An=Mt.showSearch,Kn=Mt.onSearch,Jn=Mt.defaultOpen,er=Mt.autoFocus,Wr=Mt.labelInValue,Cr=Mt.value,Tr=Mt.inputValue,ln=Mt.optionLabelProp,ri=isMultiple(Wt),di=An!==void 0?An:ri||Wt==="combobox",_i=Fn||convertChildrenToData(zn);if(warning(Wt!=="tags"||_i.every(function(ir){return!ir.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Wt==="tags"||Wt==="combobox"){var pn=_i.some(function(ir){return ir.options?ir.options.some(function(wr){return typeof("value"in wr?wr.value:wr.key)=="number"}):typeof("value"in ir?ir.value:ir.key)=="number"});warning(!pn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Wt!=="combobox"||!ln,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Wt==="combobox"||!tn,"`backfill` only works with `combobox` mode."),warning(Wt==="combobox"||!Ln,"`getInputElement` only work with `combobox` mode."),noteOnce(Wt!=="combobox"||!Ln||!Nn||!jn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Kn&&!di&&Wt!=="combobox"&&Wt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Jn||er,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Cr!=null){var Xn=toArray(Cr);warning(!Wr||Xn.every(function(ir){return _typeof(ir)==="object"&&("key"in ir||"value"in ir)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ri||Array.isArray(Cr),"`value` should be array when `mode` is `multiple` or `tags`")}if(zn){var rr=null;toNodeArray(zn).some(function(ir){if(!React.isValidElement(ir)||!ir.type)return!1;var wr=ir,Rr=wr.type;if(Rr.isSelectOption)return!1;if(Rr.isSelectOptGroup){var Kr=toNodeArray(ir.props.children).every(function(ii){return!React.isValidElement(ii)||!ir.type||ii.type.isSelectOption?!0:(rr=ii.type,!1)});return!Kr}return rr=Rr,!0}),rr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(rr.displayName||rr.name||rr,"`.")),warning(Tr===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ut(Mt,Wt){if(Mt){var Fn=function zn(tn){for(var Nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,jn=0;jn<tn.length;jn++){var Ln=tn[jn];if(Ln[Wt==null?void 0:Wt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Nn&&Array.isArray(Ln[Wt==null?void 0:Wt.options])&&zn(Ln[Wt==null?void 0:Wt.options],!0))break}};Fn(Mt)}}var Un=null,pr=["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"],mr=["inputValue"];function xn(Mt){return!Mt||(0,ve.Z)(Mt)!=="object"}var Yn=Se.forwardRef(function(Mt,Wt){var Fn=Mt.id,zn=Mt.mode,tn=Mt.prefixCls,Nn=tn===void 0?"rc-select":tn,jn=Mt.backfill,Ln=Mt.fieldNames,An=Mt.inputValue,Kn=Mt.searchValue,Jn=Mt.onSearch,er=Mt.autoClearSearchValue,Wr=er===void 0?!0:er,Cr=Mt.onSelect,Tr=Mt.onDeselect,ln=Mt.dropdownMatchSelectWidth,ri=ln===void 0?!0:ln,di=Mt.filterOption,_i=Mt.filterSort,pn=Mt.optionFilterProp,Xn=Mt.optionLabelProp,rr=Mt.options,ir=Mt.optionRender,wr=Mt.children,Rr=Mt.defaultActiveFirstOption,Kr=Mt.menuItemSelectedIcon,ii=Mt.virtual,oi=Mt.direction,cr=Mt.listHeight,on=cr===void 0?200:cr,or=Mt.listItemHeight,an=or===void 0?20:or,gr=Mt.labelRender,Vr=Mt.value,ti=Mt.defaultValue,Ni=Mt.labelInValue,hi=Mt.onChange,Zr=Mt.maxCount,Ui=(0,de.Z)(Mt,pr),en=(0,Mr.ZP)(Fn),fn=sn(zn),$t=!!(!rr&&wr),st=Se.useMemo(function(){return di===void 0&&zn==="combobox"?!1:di},[di,zn]),Bn=Se.useMemo(function(){return ut(Ln,$t)},[JSON.stringify(Ln),$t]),Gn=(0,Ee.Z)("",{value:Kn!==void 0?Kn:An,postState:function(li){return li||""}}),fr=(0,Ie.Z)(Gn,2),ur=fr[0],qn=fr[1],gn=Ar(rr,wr,Bn,pn,Xn),Rn=gn.valueOptions,Vn=gn.labelOptions,kn=gn.options,Zn=Se.useCallback(function(_r){var li=lt(_r);return li.map(function(Ci){var Oi,no,zr,Aa,zo;if(xn(Ci))Oi=Ci;else{var Oo;zr=Ci.key,no=Ci.label,Oi=(Oo=Ci.value)!==null&&Oo!==void 0?Oo:zr}var Ii=Rn.get(Oi);if(Ii){var Vo;if(no===void 0&&(no=Ii==null?void 0:Ii[Xn||Bn.label]),zr===void 0&&(zr=(Vo=Ii==null?void 0:Ii.key)!==null&&Vo!==void 0?Vo:Oi),Aa=Ii==null?void 0:Ii.disabled,zo=Ii==null?void 0:Ii.title,0)var ja}return{label:no,value:Oi,key:zr,disabled:Aa,title:zo}})},[Bn,Xn,Rn]),xr=(0,Ee.Z)(ti,{value:Vr}),sr=(0,Ie.Z)(xr,2),Qn=sr[0],cn=sr[1],vr=Se.useMemo(function(){var _r,li=fn&&Qn===null?[]:Qn,Ci=Zn(li);return zn==="combobox"&&rt((_r=Ci[0])===null||_r===void 0?void 0:_r.value)?[]:Ci},[Qn,Zn,zn,fn]),Nr=Jr(vr,Rn),si=(0,Ie.Z)(Nr,2),Ur=si[0],Ti=si[1],Ei=Se.useMemo(function(){if(!zn&&Ur.length===1){var _r=Ur[0];if(_r.value===null&&(_r.label===null||_r.label===void 0))return[]}return Ur.map(function(li){var Ci;return(0,Ue.Z)((0,Ue.Z)({},li),{},{label:(Ci=typeof gr=="function"?gr(li):li.label)!==null&&Ci!==void 0?Ci:li.value})})},[zn,Ur,gr]),bi=Se.useMemo(function(){return new Set(Ur.map(function(_r){return _r.value}))},[Ur]);Se.useEffect(function(){if(zn==="combobox"){var _r,li=(_r=Ur[0])===null||_r===void 0?void 0:_r.value;qn(Je(li)?String(li):"")}},[Ur]);var Ai=Qt(function(_r,li){var Ci=li!=null?li:_r;return(0,oe.Z)((0,oe.Z)({},Bn.value,_r),Bn.label,Ci)}),ji=Se.useMemo(function(){if(zn!=="tags")return kn;var _r=(0,Gt.Z)(kn),li=function(Oi){return Rn.has(Oi)};return(0,Gt.Z)(Ur).sort(function(Ci,Oi){return Ci.value<Oi.value?-1:1}).forEach(function(Ci){var Oi=Ci.value;li(Oi)||_r.push(Ai(Oi,Ci.label))}),_r},[Ai,kn,Rn,Ur,zn]),$i=et(ji,Bn,ur,st,pn),qt=Se.useMemo(function(){return zn!=="tags"||!ur||$i.some(function(_r){return _r[pn||"value"]===ur})||$i.some(function(_r){return _r[Bn.value]===ur})?$i:[Ai(ur)].concat((0,Gt.Z)($i))},[Ai,pn,zn,$i,ur,Bn]),Mi=function _r(li){var Ci=(0,Gt.Z)(li).sort(function(Oi,no){return _i(Oi,no,{searchValue:ur})});return Ci.map(function(Oi){return Array.isArray(Oi.options)?(0,Ue.Z)((0,Ue.Z)({},Oi),{},{options:Oi.options.length>0?_r(Oi.options):Oi.options}):Oi})},Pi=Se.useMemo(function(){return _i?Mi(qt):qt},[qt,_i,ur]),Xr=Se.useMemo(function(){return vt(Pi,{fieldNames:Bn,childrenAsData:$t})},[Pi,Bn,$t]),mi=function(li){var Ci=Zn(li);if(cn(Ci),hi&&(Ci.length!==Ur.length||Ci.some(function(zr,Aa){var zo;return((zo=Ur[Aa])===null||zo===void 0?void 0:zo.value)!==(zr==null?void 0:zr.value)}))){var Oi=Ni?Ci:Ci.map(function(zr){return zr.value}),no=Ci.map(function(zr){return At(Ti(zr.value))});hi(fn?Oi:Oi[0],fn?no:no[0])}},ei=Se.useState(null),Hi=(0,Ie.Z)(ei,2),Gi=Hi[0],ci=Hi[1],to=Se.useState(0),pa=(0,Ie.Z)(to,2),Ao=pa[0],bs=pa[1],wa=Rr!==void 0?Rr:zn!=="combobox",Ir=Se.useCallback(function(_r,li){var Ci=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Oi=Ci.source,no=Oi===void 0?"keyboard":Oi;bs(li),jn&&zn==="combobox"&&_r!==null&&no==="keyboard"&&ci(String(_r))},[jn,zn]),bo=function(li,Ci,Oi){var no=function(){var ds,Ps=Ti(li);return[Ni?{label:Ps==null?void 0:Ps[Bn.label],value:li,key:(ds=Ps==null?void 0:Ps.key)!==null&&ds!==void 0?ds:li}:li,At(Ps)]};if(Ci&&Cr){var zr=no(),Aa=(0,Ie.Z)(zr,2),zo=Aa[0],Oo=Aa[1];Cr(zo,Oo)}else if(!Ci&&Tr&&Oi!=="clear"){var Ii=no(),Vo=(0,Ie.Z)(Ii,2),ja=Vo[0],vo=Vo[1];Tr(ja,vo)}},Po=Qt(function(_r,li){var Ci,Oi=fn?li.selected:!0;Oi?Ci=fn?[].concat((0,Gt.Z)(Ur),[_r]):[_r]:Ci=Ur.filter(function(no){return no.value!==_r}),mi(Ci),bo(_r,Oi),zn==="combobox"?ci(""):(!sn||Wr)&&(qn(""),ci(""))}),ta=function(li,Ci){mi(li);var Oi=Ci.type,no=Ci.values;(Oi==="remove"||Oi==="clear")&&no.forEach(function(zr){bo(zr.value,!1,Oi)})},jo=function(li,Ci){if(qn(li),ci(null),Ci.source==="submit"){var Oi=(li||"").trim();if(Oi){var no=Array.from(new Set([].concat((0,Gt.Z)(bi),[Oi])));mi(no),bo(Oi,!0),qn("")}return}Ci.source!=="blur"&&(zn==="combobox"&&mi(li),Jn==null||Jn(li))},Ko=function(li){var Ci=li;zn!=="tags"&&(Ci=li.map(function(no){var zr=Vn.get(no);return zr==null?void 0:zr.value}).filter(function(no){return no!==void 0}));var Oi=Array.from(new Set([].concat((0,Gt.Z)(bi),(0,Gt.Z)(Ci))));mi(Oi),Oi.forEach(function(no){bo(no,!0)})},ar=Se.useMemo(function(){var _r=ii!==!1&&ri!==!1;return(0,Ue.Z)((0,Ue.Z)({},gn),{},{flattenOptions:Xr,onActiveValue:Ir,defaultActiveFirstOption:wa,onSelect:Po,menuItemSelectedIcon:Kr,rawValues:bi,fieldNames:Bn,virtual:_r,direction:oi,listHeight:on,listItemHeight:an,childrenAsData:$t,maxCount:Zr,optionRender:ir})},[Zr,gn,Xr,Ir,wa,Po,Kr,bi,Bn,ii,ri,oi,on,an,$t,ir]);return Se.createElement(Kt.Provider,{value:ar},Se.createElement(un,(0,at.Z)({},Ui,{id:en,prefixCls:Nn,ref:Wt,omitDomProps:mr,mode:zn,displayValues:Ei,onDisplayValuesChange:ta,direction:oi,searchValue:ur,onSearch:jo,autoClearSearchValue:Wr,onSearchSplit:Ko,dropdownMatchSelectWidth:ri,OptionList:ki,emptyOptions:!Xr.length,activeValue:Gi,activeDescendantId:"".concat(en,"_list_").concat(Ao)})))}),Hn=Yn;Hn.Option=On,Hn.OptGroup=vn;var Qr=Hn,$r=Qr},63158:function(_n,Mn,ft){"use strict";var at=ft(71409),Gt=ft(87075),oe=ft(11036),Ue=ft(39224),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"],Ae=Ie.forwardRef(function(me,be){var fe,z=me.prefixCls,te=z===void 0?"rc-switch":z,se=me.className,ie=me.checked,le=me.defaultChecked,he=me.disabled,pe=me.loadingIcon,xe=me.checkedChildren,je=me.unCheckedChildren,De=me.onClick,Fe=me.onChange,Te=me.onKeyDown,Me=(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 rt=Ye;return he||(rt=Ct,Ke(rt),Fe==null||Fe(rt,Je)),rt}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 ct=ve()(te,se,(fe={},(0,Gt.Z)(fe,"".concat(te,"-checked"),Ye),(0,Gt.Z)(fe,"".concat(te,"-disabled"),he),fe));return Ie.createElement("button",(0,at.Z)({},Me,{type:"button",role:"switch","aria-checked":Ye,disabled:he,className:ct,ref:be,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")},je)))});Ae.displayName="Switch",Mn.Z=Ae},86351:function(_n,Mn,ft){"use strict";ft.d(Mn,{R:function(){return Gt},w:function(){return at}});var at={},Gt="rc-table-internal-hook"},97347:function(_n,Mn,ft){"use strict";ft.d(Mn,{L:function(){return te},Z:function(){return pe}});var at=ft(11036),Gt=ft(87075),oe=ft(62730),Ue=ft(28788),Ie=ft(89490),de=ft(39224),ve=ft(11592),Ee=ft(48736),ke=ft(59301),Se=ft(86351),Ae=ft(54451);function me(xe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof je=="number"?je:je.endsWith("%")?xe*parseFloat(je)/100:null}function be(xe,je,De){return ke.useMemo(function(){if(je&&je>0){var Fe=0,Te=0;xe.forEach(function(lt){var ct=me(je,lt.width);ct?Fe+=ct:Te+=1});var Me=Math.max(je,De),Be=Math.max(Me-Fe,Te),Ge=Te,Ye=Be/Te,Ke=0,Xe=xe.map(function(lt){var ct=(0,Ie.Z)({},lt),Ct=me(je,ct.width);if(Ct)ct.width=Ct;else{var Je=Math.floor(Ye);ct.width=Ge===1?Be:Je,Be-=Je,Ge-=1}return Ke+=ct.width,ct});if(Ke<Me){var ot=Me/Ke;Be=Me,Xe.forEach(function(lt,ct){var Ct=Math.floor(lt.width*ot);lt.width=ct===Xe.length-1?Be:Ct,Be-=Ct})}return[Xe,Math.max(Ke,Me)]}return[xe,je]},[xe,je,De])}var fe=["children"],z=["fixed"];function te(xe){return(0,ve.Z)(xe).filter(function(je){return ke.isValidElement(je)}).map(function(je){var De=je.key,Fe=je.props,Te=Fe.children,Me=(0,de.Z)(Fe,fe),Be=(0,Ie.Z)({key:De},Me);return Te&&(Be.children=te(Te)),Be})}function se(xe){return xe.filter(function(je){return je&&(0,Ue.Z)(je)==="object"&&!je.hidden}).map(function(je){var De=je.children;return De&&De.length>0?(0,Ie.Z)((0,Ie.Z)({},je),{},{children:se(De)}):je})}function ie(xe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return xe.filter(function(De){return De&&(0,Ue.Z)(De)==="object"}).reduce(function(De,Fe,Te){var Me=Fe.fixed,Be=Me===!0?"left":Me,Ge="".concat(je,"-").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(je){var De=je.fixed,Fe=(0,de.Z)(je,z),Te=De;return De==="left"?Te="right":De==="right"&&(Te="left"),(0,Ie.Z)({fixed:Te},Fe)})}function he(xe,je){var De=xe.prefixCls,Fe=xe.columns,Te=xe.children,Me=xe.expandable,Be=xe.expandedKeys,Ge=xe.columnTitle,Ye=xe.getRowKey,Ke=xe.onTriggerExpand,Xe=xe.expandIcon,ot=xe.rowExpandable,lt=xe.expandIconColumnIndex,ct=xe.direction,Ct=xe.expandRowByClick,Je=xe.columnWidth,rt=xe.fixed,xt=xe.scrollWidth,bt=xe.clientWidth,Pt=ke.useMemo(function(){var tt=Fe||te(Te)||[];return se(tt.slice())},[Fe,Te]),ht=ke.useMemo(function(){if(Me){var tt=Pt.slice();if(!tt.includes(Se.w)){var He=lt||0;He>=0&&(He||rt==="left"||!rt)&&tt.splice(He,0,Se.w),rt==="right"&&tt.splice(Pt.length,0,Se.w)}var we=tt.indexOf(Se.w);tt=tt.filter(function(Re,_e){return Re!==Se.w||_e===we});var Ne=Pt[we],Ve;rt?Ve=rt:Ve=Ne?Ne.fixed:null;var nt=(0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)((0,Gt.Z)({},Ae.v,{className:"".concat(De,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Ge),"fixed",Ve),"className","".concat(De,"-row-expand-icon-cell")),"width",Je),"render",function(_e,Ze,qe){var ut=Ye(Ze,qe),vt=Be.has(ut),At=ot?ot(Ze):!0,Et=Xe({prefixCls:De,expanded:vt,expandable:At,record:Ze,onExpand:Ke});return Ct?ke.createElement("span",{onClick:function(Kt){return Kt.stopPropagation()}},Et):Et});return tt.map(function(Re){return Re===Se.w?nt:Re})}return Pt.filter(function(Re){return Re!==Se.w})},[Me,Pt,Ye,Be,Xe,ct]),St=ke.useMemo(function(){var tt=ht;return je&&(tt=je(tt)),tt.length||(tt=[{render:function(){return null}}]),tt},[je,ht,ct]),mt=ke.useMemo(function(){return ct==="rtl"?le(ie(St)):ie(St)},[St,ct,xt]),Nt=ke.useMemo(function(){for(var tt=-1,He=mt.length-1;He>=0;He-=1){var we=mt[He].fixed;if(we==="left"||we===!0){tt=He;break}}if(tt>=0)for(var Ne=0;Ne<=tt;Ne+=1){var Ve=mt[Ne].fixed;if(Ve!=="left"&&Ve!==!0)return!0}var nt=mt.findIndex(function(Ze){var qe=Ze.fixed;return qe==="right"});if(nt>=0)for(var Re=nt;Re<mt.length;Re+=1){var _e=mt[Re].fixed;if(_e!=="right")return!0}return!1},[mt]),dt=be(mt,xt,bt),Dt=(0,at.Z)(dt,2),gt=Dt[0],yt=Dt[1];return[St,gt,yt,Nt]}var pe=he},4030:function(_n,Mn,ft){"use strict";ft.d(Mn,{w2:function(){return at.w},vP:function(){return gi.v},RQ:function(){return at.R},ER:function(){return ut},Q$:function(){return di},TN:function(){return hi}});var at=ft(86351),Gt=ft(11036),oe=ft(6089),Ue=ft(34280),Ie=ft(13697),de=ft(59301),ve=ft(4676);function Ee(en){var fn=de.createContext(void 0),$t=function(Bn){var Gn=Bn.value,fr=Bn.children,ur=de.useRef(Gn);ur.current=Gn;var qn=de.useState(function(){return{getValue:function(){return ur.current},listeners:new Set}}),gn=(0,Gt.Z)(qn,1),Rn=gn[0];return(0,Ue.Z)(function(){(0,ve.unstable_batchedUpdates)(function(){Rn.listeners.forEach(function(Vn){Vn(Gn)})})},[Gn]),de.createElement(fn.Provider,{value:Rn},fr)};return{Context:fn,Provider:$t,defaultValue:en}}function ke(en,fn){var $t=(0,oe.Z)(typeof fn=="function"?fn:function(Vn){if(fn===void 0)return Vn;if(!Array.isArray(fn))return Vn[fn];var kn={};return fn.forEach(function(Zn){kn[Zn]=Vn[Zn]}),kn}),st=de.useContext(en==null?void 0:en.Context),Bn=st||{},Gn=Bn.listeners,fr=Bn.getValue,ur=de.useRef();ur.current=$t(st?fr():en==null?void 0:en.defaultValue);var qn=de.useState({}),gn=(0,Gt.Z)(qn,2),Rn=gn[1];return(0,Ue.Z)(function(){if(!st)return;function Vn(kn){var Zn=$t(kn);(0,Ie.Z)(ur.current,Zn,!0)||Rn({})}return Gn.add(Vn),function(){Gn.delete(Vn)}},[st]),ur.current}var Se=ft(71409),Ae=ft(8654);function me(){var en=de.createContext(null);function fn(){return de.useContext(en)}function $t(Bn,Gn){var fr=(0,Ae.Yr)(Bn),ur=function(gn,Rn){var Vn=fr?{ref:Rn}:{},kn=de.useRef(0),Zn=de.useRef(gn),xr=fn();return xr!==null?de.createElement(Bn,(0,Se.Z)({},gn,Vn)):((!Gn||Gn(Zn.current,gn))&&(kn.current+=1),Zn.current=gn,de.createElement(en.Provider,{value:kn.current},de.createElement(Bn,(0,Se.Z)({},gn,Vn))))};return fr?de.forwardRef(ur):ur}function st(Bn,Gn){var fr=(0,Ae.Yr)(Bn),ur=function(gn,Rn){var Vn=fr?{ref:Rn}:{};return fn(),de.createElement(Bn,(0,Se.Z)({},gn,Vn))};return fr?de.memo(de.forwardRef(ur),Gn):de.memo(ur,Gn)}return{makeImmutable:$t,responseImmutable:st,useImmutableMark:fn}}var be=me(),fe=be.makeImmutable,z=be.responseImmutable,te=be.useImmutableMark,se=me(),ie=se.makeImmutable,le=se.responseImmutable,he=se.useImmutableMark,pe=Ee(),xe=pe;function je(en,fn){var $t=React.useRef(0);$t.current+=1;var st=React.useRef(en),Bn=[];Object.keys(en||{}).map(function(fr){var ur;(en==null?void 0:en[fr])!==((ur=st.current)===null||ur===void 0?void 0:ur[fr])&&Bn.push(fr)}),st.current=en;var Gn=React.useRef([]);return Bn.length&&(Gn.current=Bn),React.useDebugValue($t.current),React.useDebugValue(Gn.current.join(", ")),fn&&console.log("".concat(fn,":"),$t.current,Gn.current),$t.current}var De=null,Fe=null,Te=ft(28788),Me=ft(89490),Be=ft(87075),Ge=ft(92310),Ye=ft.n(Ge),Ke=ft(80547),Xe=ft(97938),ot=ft(48736),lt=de.createContext({renderWithProps:!1}),ct=lt,Ct="RC_TABLE_KEY";function Je(en){return en==null?[]:Array.isArray(en)?en:[en]}function rt(en){var fn=[],$t={};return en.forEach(function(st){for(var Bn=st||{},Gn=Bn.key,fr=Bn.dataIndex,ur=Gn||Je(fr).join("-")||Ct;$t[ur];)ur="".concat(ur,"_next");$t[ur]=!0,fn.push(ur)}),fn}function xt(en){return en!=null}function bt(en){return typeof en=="number"&&!Number.isNaN(en)}function Pt(en){return en&&(0,Te.Z)(en)==="object"&&!Array.isArray(en)&&!de.isValidElement(en)}function ht(en,fn,$t,st,Bn,Gn){var fr=de.useContext(ct),ur=he(),qn=(0,Ke.Z)(function(){if(xt(st))return[st];var gn=fn==null||fn===""?[]:Array.isArray(fn)?fn:[fn],Rn=(0,Xe.Z)(en,gn),Vn=Rn,kn=void 0;if(Bn){var Zn=Bn(Rn,en,$t);Pt(Zn)?(Vn=Zn.children,kn=Zn.props,fr.renderWithProps=!0):Vn=Zn}return[Vn,kn]},[ur,en,st,fn,Bn,$t],function(gn,Rn){if(Gn){var Vn=(0,Gt.Z)(gn,2),kn=Vn[1],Zn=(0,Gt.Z)(Rn,2),xr=Zn[1];return Gn(xr,kn)}return fr.renderWithProps?!0:!(0,Ie.Z)(gn,Rn,!0)});return qn}function St(en,fn,$t,st){var Bn=en+fn-1;return en<=st&&Bn>=$t}function mt(en,fn){return ke(xe,function($t){var st=St(en,fn||1,$t.hoverStartRow,$t.hoverEndRow);return[st,$t.onHover]})}var Nt=ft(70425),dt=function(fn){var $t=fn.ellipsis,st=fn.rowType,Bn=fn.children,Gn,fr=$t===!0?{showTitle:!0}:$t;return fr&&(fr.showTitle||st==="header")&&(typeof Bn=="string"||typeof Bn=="number"?Gn=Bn.toString():de.isValidElement(Bn)&&typeof Bn.props.children=="string"&&(Gn=Bn.props.children)),Gn};function Dt(en){var fn,$t,st,Bn,Gn,fr,ur,qn,gn=en.component,Rn=en.children,Vn=en.ellipsis,kn=en.scope,Zn=en.prefixCls,xr=en.className,sr=en.align,Qn=en.record,cn=en.render,vr=en.dataIndex,Nr=en.renderIndex,si=en.shouldCellUpdate,Ur=en.index,Ti=en.rowType,Ei=en.colSpan,bi=en.rowSpan,Ai=en.fixLeft,ji=en.fixRight,$i=en.firstFixLeft,qt=en.lastFixLeft,Mi=en.firstFixRight,Pi=en.lastFixRight,Xr=en.appendNode,mi=en.additionalProps,ei=mi===void 0?{}:mi,Hi=en.isSticky,Gi="".concat(Zn,"-cell"),ci=ke(xe,["supportSticky","allColumnsFixedLeft","rowHoverable"]),to=ci.supportSticky,pa=ci.allColumnsFixedLeft,Ao=ci.rowHoverable,bs=ht(Qn,vr,Nr,Rn,cn,si),wa=(0,Gt.Z)(bs,2),Ir=wa[0],bo=wa[1],Po={},ta=typeof Ai=="number"&&to,jo=typeof ji=="number"&&to;ta&&(Po.position="sticky",Po.left=Ai),jo&&(Po.position="sticky",Po.right=ji);var Ko=(fn=($t=(st=bo==null?void 0:bo.colSpan)!==null&&st!==void 0?st:ei.colSpan)!==null&&$t!==void 0?$t:Ei)!==null&&fn!==void 0?fn:1,ar=(Bn=(Gn=(fr=bo==null?void 0:bo.rowSpan)!==null&&fr!==void 0?fr:ei.rowSpan)!==null&&Gn!==void 0?Gn:bi)!==null&&Bn!==void 0?Bn:1,_r=mt(Ur,ar),li=(0,Gt.Z)(_r,2),Ci=li[0],Oi=li[1],no=(0,Nt.zX)(function(ja){var vo;Qn&&Oi(Ur,Ur+ar-1),ei==null||(vo=ei.onMouseEnter)===null||vo===void 0||vo.call(ei,ja)}),zr=(0,Nt.zX)(function(ja){var vo;Qn&&Oi(-1,-1),ei==null||(vo=ei.onMouseLeave)===null||vo===void 0||vo.call(ei,ja)});if(Ko===0||ar===0)return null;var Aa=(ur=ei.title)!==null&&ur!==void 0?ur:dt({rowType:Ti,ellipsis:Vn,children:Ir}),zo=Ye()(Gi,xr,(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(Gi,"-fix-left"),ta&&to),"".concat(Gi,"-fix-left-first"),$i&&to),"".concat(Gi,"-fix-left-last"),qt&&to),"".concat(Gi,"-fix-left-all"),qt&&pa&&to),"".concat(Gi,"-fix-right"),jo&&to),"".concat(Gi,"-fix-right-first"),Mi&&to),"".concat(Gi,"-fix-right-last"),Pi&&to),"".concat(Gi,"-ellipsis"),Vn),"".concat(Gi,"-with-append"),Xr),"".concat(Gi,"-fix-sticky"),(ta||jo)&&Hi&&to),(0,Be.Z)(qn,"".concat(Gi,"-row-hover"),!bo&&Ci)),ei.className,bo==null?void 0:bo.className),Oo={};sr&&(Oo.textAlign=sr);var Ii=(0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({},bo==null?void 0:bo.style),Po),Oo),ei.style),Vo=Ir;return(0,Te.Z)(Vo)==="object"&&!Array.isArray(Vo)&&!de.isValidElement(Vo)&&(Vo=null),Vn&&(qt||Mi)&&(Vo=de.createElement("span",{className:"".concat(Gi,"-content")},Vo)),de.createElement(gn,(0,Se.Z)({},bo,ei,{className:zo,style:Ii,title:Aa,scope:kn,onMouseEnter:Ao?no:void 0,onMouseLeave:Ao?zr:void 0,colSpan:Ko!==1?Ko:null,rowSpan:ar!==1?ar:null}),Xr,Vo)}var gt=de.memo(Dt);function yt(en,fn,$t,st,Bn){var Gn=$t[en]||{},fr=$t[fn]||{},ur,qn;Gn.fixed==="left"?ur=st.left[Bn==="rtl"?fn:en]:fr.fixed==="right"&&(qn=st.right[Bn==="rtl"?en:fn]);var gn=!1,Rn=!1,Vn=!1,kn=!1,Zn=$t[fn+1],xr=$t[en-1],sr=Zn&&!Zn.fixed||xr&&!xr.fixed||$t.every(function(si){return si.fixed==="left"});if(Bn==="rtl"){if(ur!==void 0){var Qn=xr&&xr.fixed==="left";kn=!Qn&&sr}else if(qn!==void 0){var cn=Zn&&Zn.fixed==="right";Vn=!cn&&sr}}else if(ur!==void 0){var vr=Zn&&Zn.fixed==="left";gn=!vr&&sr}else if(qn!==void 0){var Nr=xr&&xr.fixed==="right";Rn=!Nr&&sr}return{fixLeft:ur,fixRight:qn,lastFixLeft:gn,firstFixRight:Rn,lastFixRight:Vn,firstFixLeft:kn,isSticky:st.isSticky}}var tt=de.createContext({}),He=tt;function we(en){var fn=en.className,$t=en.index,st=en.children,Bn=en.colSpan,Gn=Bn===void 0?1:Bn,fr=en.rowSpan,ur=en.align,qn=ke(xe,["prefixCls","direction"]),gn=qn.prefixCls,Rn=qn.direction,Vn=de.useContext(He),kn=Vn.scrollColumnIndex,Zn=Vn.stickyOffsets,xr=Vn.flattenColumns,sr=$t+Gn-1,Qn=sr+1===kn?Gn+1:Gn,cn=yt($t,$t+Qn-1,xr,Zn,Rn);return de.createElement(gt,(0,Se.Z)({className:fn,index:$t,component:"td",prefixCls:gn,record:null,dataIndex:null,align:ur,colSpan:Qn,rowSpan:fr,render:function(){return st}},cn))}var Ne=ft(39224),Ve=["children"];function nt(en){var fn=en.children,$t=(0,Ne.Z)(en,Ve);return de.createElement("tr",$t,fn)}function Re(en){var fn=en.children;return fn}Re.Row=nt,Re.Cell=we;var _e=Re;function Ze(en){var fn=en.children,$t=en.stickyOffsets,st=en.flattenColumns,Bn=ke(xe,"prefixCls"),Gn=st.length-1,fr=st[Gn],ur=de.useMemo(function(){return{stickyOffsets:$t,flattenColumns:st,scrollColumnIndex:fr!=null&&fr.scrollbar?Gn:null}},[fr,st,Gn,$t]);return de.createElement(He.Provider,{value:ur},de.createElement("tfoot",{className:"".concat(Bn,"-summary")},fn))}var qe=le(Ze),ut=_e,vt=ft(29301),At=ft(24514),Et=ft(75152),Ft=ft(26112);function Kt(en,fn,$t,st,Bn,Gn,fr){en.push({record:fn,indent:$t,index:fr});var ur=Gn(fn),qn=Bn==null?void 0:Bn.has(ur);if(fn&&Array.isArray(fn[st])&&qn)for(var gn=0;gn<fn[st].length;gn+=1)Kt(en,fn[st][gn],$t+1,st,Bn,Gn,gn)}function Yt(en,fn,$t,st){var Bn=de.useMemo(function(){if($t!=null&&$t.size){for(var Gn=[],fr=0;fr<(en==null?void 0:en.length);fr+=1){var ur=en[fr];Kt(Gn,ur,0,fn,$t,st,fr)}return Gn}return en==null?void 0:en.map(function(qn,gn){return{record:qn,indent:0,index:gn}})},[en,fn,$t,st]);return Bn}function Vt(en,fn,$t,st){var Bn=ke(xe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Gn=Bn.flattenColumns,fr=Bn.expandableType,ur=Bn.expandedKeys,qn=Bn.childrenColumnName,gn=Bn.onTriggerExpand,Rn=Bn.rowExpandable,Vn=Bn.onRow,kn=Bn.expandRowByClick,Zn=Bn.rowClassName,xr=fr==="nest",sr=fr==="row"&&(!Rn||Rn(en)),Qn=sr||xr,cn=ur&&ur.has(fn),vr=qn&&en&&en[qn],Nr=(0,Nt.zX)(gn),si=Vn==null?void 0:Vn(en,$t),Ur=si==null?void 0:si.onClick,Ti=function(ji){kn&&Qn&&gn(en,ji);for(var $i=arguments.length,qt=new Array($i>1?$i-1:0),Mi=1;Mi<$i;Mi++)qt[Mi-1]=arguments[Mi];Ur==null||Ur.apply(void 0,[ji].concat(qt))},Ei;typeof Zn=="string"?Ei=Zn:typeof Zn=="function"&&(Ei=Zn(en,$t,st));var bi=rt(Gn);return(0,Me.Z)((0,Me.Z)({},Bn),{},{columnsKey:bi,nestExpandable:xr,expanded:cn,hasNestChildren:vr,record:en,onTriggerExpand:Nr,rowSupportExpand:sr,expandable:Qn,rowProps:(0,Me.Z)((0,Me.Z)({},si),{},{className:Ye()(Ei,si==null?void 0:si.className),onClick:Ti})})}function Ht(en){var fn=en.prefixCls,$t=en.children,st=en.component,Bn=en.cellComponent,Gn=en.className,fr=en.expanded,ur=en.colSpan,qn=en.isEmpty,gn=ke(xe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Rn=gn.scrollbarSize,Vn=gn.fixHeader,kn=gn.fixColumn,Zn=gn.componentWidth,xr=gn.horizonScroll,sr=$t;return(qn?xr&&Zn:kn)&&(sr=de.createElement("div",{style:{width:Zn-(Vn&&!qn?Rn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(fn,"-expanded-row-fixed")},sr)),de.createElement(st,{className:Gn,style:{display:fr?null:"none"}},de.createElement(gt,{component:Bn,prefixCls:fn,colSpan:ur},sr))}var sn=Ht;function rn(en){var fn=en.prefixCls,$t=en.record,st=en.onExpand,Bn=en.expanded,Gn=en.expandable,fr="".concat(fn,"-row-expand-icon");if(!Gn)return de.createElement("span",{className:Ye()(fr,"".concat(fn,"-row-spaced"))});var ur=function(gn){st($t,gn),gn.stopPropagation()};return de.createElement("span",{className:Ye()(fr,(0,Be.Z)((0,Be.Z)({},"".concat(fn,"-row-expanded"),Bn),"".concat(fn,"-row-collapsed"),!Bn)),onClick:ur})}function un(en,fn,$t){var st=[];function Bn(Gn){(Gn||[]).forEach(function(fr,ur){st.push(fn(fr,ur)),Bn(fr[$t])})}return Bn(en),st}function Sn(en,fn,$t,st){return typeof en=="string"?en:typeof en=="function"?en(fn,$t,st):""}function vn(en,fn,$t,st,Bn){var Gn=en.record,fr=en.prefixCls,ur=en.columnsKey,qn=en.fixedInfoList,gn=en.expandIconColumnIndex,Rn=en.nestExpandable,Vn=en.indentSize,kn=en.expandIcon,Zn=en.expanded,xr=en.hasNestChildren,sr=en.onTriggerExpand,Qn=ur[$t],cn=qn[$t],vr;$t===(gn||0)&&Rn&&(vr=de.createElement(de.Fragment,null,de.createElement("span",{style:{paddingLeft:"".concat(Vn*st,"px")},className:"".concat(fr,"-row-indent indent-level-").concat(st)}),kn({prefixCls:fr,expanded:Zn,expandable:xr,record:Gn,onExpand:sr})));var Nr;return fn.onCell&&(Nr=fn.onCell(Gn,Bn)),{key:Qn,fixedInfo:cn,appendCellNode:vr,additionalCellProps:Nr||{}}}function Cn(en){var fn=en.className,$t=en.style,st=en.record,Bn=en.index,Gn=en.renderIndex,fr=en.rowKey,ur=en.indent,qn=ur===void 0?0:ur,gn=en.rowComponent,Rn=en.cellComponent,Vn=en.scopeCellComponent,kn=Vt(st,fr,Bn,qn),Zn=kn.prefixCls,xr=kn.flattenColumns,sr=kn.expandedRowClassName,Qn=kn.expandedRowRender,cn=kn.rowProps,vr=kn.expanded,Nr=kn.rowSupportExpand,si=de.useRef(!1);si.current||(si.current=vr);var Ur=Sn(sr,st,Bn,qn),Ti=de.createElement(gn,(0,Se.Z)({},cn,{"data-row-key":fr,className:Ye()(fn,"".concat(Zn,"-row"),"".concat(Zn,"-row-level-").concat(qn),cn==null?void 0:cn.className,(0,Be.Z)({},Ur,qn>=1)),style:(0,Me.Z)((0,Me.Z)({},$t),cn==null?void 0:cn.style)}),xr.map(function(Ai,ji){var $i=Ai.render,qt=Ai.dataIndex,Mi=Ai.className,Pi=vn(kn,Ai,ji,qn,Bn),Xr=Pi.key,mi=Pi.fixedInfo,ei=Pi.appendCellNode,Hi=Pi.additionalCellProps;return de.createElement(gt,(0,Se.Z)({className:Mi,ellipsis:Ai.ellipsis,align:Ai.align,scope:Ai.rowScope,component:Ai.rowScope?Vn:Rn,prefixCls:Zn,key:Xr,record:st,index:Bn,renderIndex:Gn,dataIndex:qt,render:$i,shouldCellUpdate:Ai.shouldCellUpdate},mi,{appendNode:ei,additionalProps:Hi}))})),Ei;if(Nr&&(si.current||vr)){var bi=Qn(st,Bn,qn+1,vr);Ei=de.createElement(sn,{expanded:vr,className:Ye()("".concat(Zn,"-expanded-row"),"".concat(Zn,"-expanded-row-level-").concat(qn+1),Ur),prefixCls:Zn,component:gn,cellComponent:Rn,colSpan:xr.length,isEmpty:!1},bi)}return de.createElement(de.Fragment,null,Ti,Ei)}var On=le(Cn);function Dr(en){var fn=en.columnKey,$t=en.onColumnResize,st=de.useRef();return(0,Ue.Z)(function(){st.current&&$t(fn,st.current.offsetWidth)},[]),de.createElement(vt.Z,{data:fn},de.createElement("td",{ref:st,style:{padding:0,border:0,height:0}},de.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var Sr=ft(29194);function qr(en){var fn=en.prefixCls,$t=en.columnsKey,st=en.onColumnResize,Bn=de.useRef(null);return de.createElement("tr",{"aria-hidden":"true",className:"".concat(fn,"-measure-row"),style:{height:0,fontSize:0},ref:Bn},de.createElement(vt.Z.Collection,{onBatchResize:function(fr){(0,Sr.Z)(Bn.current)&&fr.forEach(function(ur){var qn=ur.data,gn=ur.size;st(qn,gn.offsetWidth)})}},$t.map(function(Gn){return de.createElement(Dr,{key:Gn,columnKey:Gn,onColumnResize:st})})))}function tr(en){var fn=en.data,$t=en.measureColumnWidth,st=ke(xe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Bn=st.prefixCls,Gn=st.getComponent,fr=st.onColumnResize,ur=st.flattenColumns,qn=st.getRowKey,gn=st.expandedKeys,Rn=st.childrenColumnName,Vn=st.emptyNode,kn=Yt(fn,Rn,gn,qn),Zn=de.useRef({renderWithProps:!1}),xr=Gn(["body","wrapper"],"tbody"),sr=Gn(["body","row"],"tr"),Qn=Gn(["body","cell"],"td"),cn=Gn(["body","cell"],"th"),vr;fn.length?vr=kn.map(function(si,Ur){var Ti=si.record,Ei=si.indent,bi=si.index,Ai=qn(Ti,Ur);return de.createElement(On,{key:Ai,rowKey:Ai,record:Ti,index:Ur,renderIndex:bi,rowComponent:sr,cellComponent:Qn,scopeCellComponent:cn,indent:Ei})}):vr=de.createElement(sn,{expanded:!0,className:"".concat(Bn,"-placeholder"),prefixCls:Bn,component:sr,cellComponent:Qn,colSpan:ur.length,isEmpty:!0},Vn);var Nr=rt(ur);return de.createElement(ct.Provider,{value:Zn.current},de.createElement(xr,{className:"".concat(Bn,"-tbody")},$t&&de.createElement(qr,{prefixCls:Bn,columnsKey:Nr,onColumnResize:fr}),vr))}var ai=le(tr),gi=ft(54451),fi=["columnType"];function Di(en){for(var fn=en.colWidths,$t=en.columns,st=en.columCount,Bn=ke(xe,["tableLayout"]),Gn=Bn.tableLayout,fr=[],ur=st||$t.length,qn=!1,gn=ur-1;gn>=0;gn-=1){var Rn=fn[gn],Vn=$t&&$t[gn],kn=void 0,Zn=void 0;if(Vn&&(kn=Vn[gi.v],Gn==="auto"&&(Zn=Vn.minWidth)),Rn||Zn||kn||qn){var xr=kn||{},sr=xr.columnType,Qn=(0,Ne.Z)(xr,fi);fr.unshift(de.createElement("col",(0,Se.Z)({key:gn,style:{width:Rn,minWidth:Zn}},Qn))),qn=!0}}return de.createElement("colgroup",null,fr)}var ki=Di,Jr=ft(62730),Li=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function et(en,fn){return(0,de.useMemo)(function(){for(var $t=[],st=0;st<fn;st+=1){var Bn=en[st];if(Bn!==void 0)$t[st]=Bn;else return null}return $t},[en.join("_"),fn])}var Mr=de.forwardRef(function(en,fn){var $t=en.className,st=en.noData,Bn=en.columns,Gn=en.flattenColumns,fr=en.colWidths,ur=en.columCount,qn=en.stickyOffsets,gn=en.direction,Rn=en.fixHeader,Vn=en.stickyTopOffset,kn=en.stickyBottomOffset,Zn=en.stickyClassName,xr=en.onScroll,sr=en.maxContentScroll,Qn=en.children,cn=(0,Ne.Z)(en,Li),vr=ke(xe,["prefixCls","scrollbarSize","isSticky","getComponent"]),Nr=vr.prefixCls,si=vr.scrollbarSize,Ur=vr.isSticky,Ti=vr.getComponent,Ei=Ti(["header","table"],"table"),bi=Ur&&!Rn?0:si,Ai=de.useRef(null),ji=de.useCallback(function(Hi){(0,Ae.mH)(fn,Hi),(0,Ae.mH)(Ai,Hi)},[]);de.useEffect(function(){var Hi;function Gi(ci){var to=ci,pa=to.currentTarget,Ao=to.deltaX;Ao&&(xr({currentTarget:pa,scrollLeft:pa.scrollLeft+Ao}),ci.preventDefault())}return(Hi=Ai.current)===null||Hi===void 0||Hi.addEventListener("wheel",Gi,{passive:!1}),function(){var ci;(ci=Ai.current)===null||ci===void 0||ci.removeEventListener("wheel",Gi)}},[]);var $i=de.useMemo(function(){return Gn.every(function(Hi){return Hi.width})},[Gn]),qt=Gn[Gn.length-1],Mi={fixed:qt?qt.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Nr,"-cell-scrollbar")}}},Pi=(0,de.useMemo)(function(){return bi?[].concat((0,Jr.Z)(Bn),[Mi]):Bn},[bi,Bn]),Xr=(0,de.useMemo)(function(){return bi?[].concat((0,Jr.Z)(Gn),[Mi]):Gn},[bi,Gn]),mi=(0,de.useMemo)(function(){var Hi=qn.right,Gi=qn.left;return(0,Me.Z)((0,Me.Z)({},qn),{},{left:gn==="rtl"?[].concat((0,Jr.Z)(Gi.map(function(ci){return ci+bi})),[0]):Gi,right:gn==="rtl"?Hi:[].concat((0,Jr.Z)(Hi.map(function(ci){return ci+bi})),[0]),isSticky:Ur})},[bi,qn,Ur]),ei=et(fr,ur);return de.createElement("div",{style:(0,Me.Z)({overflow:"hidden"},Ur?{top:Vn,bottom:kn}:{}),ref:ji,className:Ye()($t,(0,Be.Z)({},Zn,!!Zn))},de.createElement(Ei,{style:{tableLayout:"fixed",visibility:st||ei?null:"hidden"}},(!st||!sr||$i)&&de.createElement(ki,{colWidths:ei?[].concat((0,Jr.Z)(ei),[bi]):[],columCount:ur+1,columns:Xr}),Qn((0,Me.Z)((0,Me.Z)({},cn),{},{stickyOffsets:mi,columns:Pi,flattenColumns:Xr}))))}),Er=de.memo(Mr),En=function(fn){var $t=fn.cells,st=fn.stickyOffsets,Bn=fn.flattenColumns,Gn=fn.rowComponent,fr=fn.cellComponent,ur=fn.onHeaderRow,qn=fn.index,gn=ke(xe,["prefixCls","direction"]),Rn=gn.prefixCls,Vn=gn.direction,kn;ur&&(kn=ur($t.map(function(xr){return xr.column}),qn));var Zn=rt($t.map(function(xr){return xr.column}));return de.createElement(Gn,kn,$t.map(function(xr,sr){var Qn=xr.column,cn=yt(xr.colStart,xr.colEnd,Bn,st,Vn),vr;return Qn&&Qn.onHeaderCell&&(vr=xr.column.onHeaderCell(Qn)),de.createElement(gt,(0,Se.Z)({},xr,{scope:Qn.title?xr.colSpan>1?"colgroup":"col":null,ellipsis:Qn.ellipsis,align:Qn.align,component:fr,prefixCls:Rn,key:Zn[sr]},cn,{additionalProps:vr,rowType:"header"}))}))},Tn=En;function Dn(en){var fn=[];function $t(fr,ur){var qn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;fn[qn]=fn[qn]||[];var gn=ur,Rn=fr.filter(Boolean).map(function(Vn){var kn={key:Vn.key,className:Vn.className||"",children:Vn.title,column:Vn,colStart:gn},Zn=1,xr=Vn.children;return xr&&xr.length>0&&(Zn=$t(xr,gn,qn+1).reduce(function(sr,Qn){return sr+Qn},0),kn.hasSubColumns=!0),"colSpan"in Vn&&(Zn=Vn.colSpan),"rowSpan"in Vn&&(kn.rowSpan=Vn.rowSpan),kn.colSpan=Zn,kn.colEnd=kn.colStart+Zn-1,fn[qn].push(kn),gn+=Zn,Zn});return Rn}$t(en,0);for(var st=fn.length,Bn=function(ur){fn[ur].forEach(function(qn){!("rowSpan"in qn)&&!qn.hasSubColumns&&(qn.rowSpan=st-ur)})},Gn=0;Gn<st;Gn+=1)Bn(Gn);return fn}var Pr=function(fn){var $t=fn.stickyOffsets,st=fn.columns,Bn=fn.flattenColumns,Gn=fn.onHeaderRow,fr=ke(xe,["prefixCls","getComponent"]),ur=fr.prefixCls,qn=fr.getComponent,gn=de.useMemo(function(){return Dn(st)},[st]),Rn=qn(["header","wrapper"],"thead"),Vn=qn(["header","row"],"tr"),kn=qn(["header","cell"],"th");return de.createElement(Rn,{className:"".concat(ur,"-thead")},gn.map(function(Zn,xr){var sr=de.createElement(Tn,{key:xr,flattenColumns:Bn,cells:Zn,stickyOffsets:$t,rowComponent:Vn,cellComponent:kn,onHeaderRow:Gn,index:xr});return sr}))},Br=le(Pr),Ar=ft(97347);function Qt(en,fn,$t){var st=(0,gi.g)(en),Bn=st.expandIcon,Gn=st.expandedRowKeys,fr=st.defaultExpandedRowKeys,ur=st.defaultExpandAllRows,qn=st.expandedRowRender,gn=st.onExpand,Rn=st.onExpandedRowsChange,Vn=st.childrenColumnName,kn=Bn||rn,Zn=Vn||"children",xr=de.useMemo(function(){return qn?"row":en.expandable&&en.internalHooks===at.R&&en.expandable.__PARENT_RENDER_ICON__||fn.some(function(Ur){return Ur&&(0,Te.Z)(Ur)==="object"&&Ur[Zn]})?"nest":!1},[!!qn,fn]),sr=de.useState(function(){return fr||(ur?un(fn,$t,Zn):[])}),Qn=(0,Gt.Z)(sr,2),cn=Qn[0],vr=Qn[1],Nr=de.useMemo(function(){return new Set(Gn||cn||[])},[Gn,cn]),si=de.useCallback(function(Ur){var Ti=$t(Ur,fn.indexOf(Ur)),Ei,bi=Nr.has(Ti);bi?(Nr.delete(Ti),Ei=(0,Jr.Z)(Nr)):Ei=[].concat((0,Jr.Z)(Nr),[Ti]),vr(Ei),gn&&gn(!bi,Ur),Rn&&Rn(Ei)},[$t,Nr,fn,gn,Rn]);return[st,xr,Nr,kn,Zn,si]}function Zt(en,fn,$t){var st=en.map(function(Bn,Gn){return yt(Gn,Gn,en,fn,$t)});return(0,Ke.Z)(function(){return st},[st],function(Bn,Gn){return!(0,Ie.Z)(Bn,Gn)})}function Ut(en){var fn=(0,de.useRef)(en),$t=(0,de.useState)({}),st=(0,Gt.Z)($t,2),Bn=st[1],Gn=(0,de.useRef)(null),fr=(0,de.useRef)([]);function ur(qn){fr.current.push(qn);var gn=Promise.resolve();Gn.current=gn,gn.then(function(){if(Gn.current===gn){var Rn=fr.current,Vn=fn.current;fr.current=[],Rn.forEach(function(kn){fn.current=kn(fn.current)}),Gn.current=null,Vn!==fn.current&&Bn({})}})}return(0,de.useEffect)(function(){return function(){Gn.current=null}},[]),[fn.current,ur]}function Un(en){var fn=(0,de.useRef)(en||null),$t=(0,de.useRef)();function st(){window.clearTimeout($t.current)}function Bn(fr){fn.current=fr,st(),$t.current=window.setTimeout(function(){fn.current=null,$t.current=void 0},100)}function Gn(){return fn.current}return(0,de.useEffect)(function(){return st},[]),[Bn,Gn]}function pr(){var en=de.useState(-1),fn=(0,Gt.Z)(en,2),$t=fn[0],st=fn[1],Bn=de.useState(-1),Gn=(0,Gt.Z)(Bn,2),fr=Gn[0],ur=Gn[1],qn=de.useCallback(function(gn,Rn){st(gn),ur(Rn)},[]);return[$t,fr,qn]}var mr=ft(47273),xn=(0,mr.Z)()?window:null;function Yn(en,fn){var $t=(0,Te.Z)(en)==="object"?en:{},st=$t.offsetHeader,Bn=st===void 0?0:st,Gn=$t.offsetSummary,fr=Gn===void 0?0:Gn,ur=$t.offsetScroll,qn=ur===void 0?0:ur,gn=$t.getContainer,Rn=gn===void 0?function(){return xn}:gn,Vn=Rn()||xn,kn=!!en;return de.useMemo(function(){return{isSticky:kn,stickyClassName:kn?"".concat(fn,"-sticky-holder"):"",offsetHeader:Bn,offsetSummary:fr,offsetScroll:qn,container:Vn}},[kn,qn,Bn,fr,fn,Vn])}function Hn(en,fn,$t){var st=(0,de.useMemo)(function(){var Bn=fn.length,Gn=function(gn,Rn,Vn){for(var kn=[],Zn=0,xr=gn;xr!==Rn;xr+=Vn)kn.push(Zn),fn[xr].fixed&&(Zn+=en[xr]||0);return kn},fr=Gn(0,Bn,1),ur=Gn(Bn-1,-1,-1).reverse();return $t==="rtl"?{left:ur,right:fr}:{left:fr,right:ur}},[en,fn,$t]);return st}var Qr=Hn;function $r(en){var fn=en.className,$t=en.children;return de.createElement("div",{className:fn},$t)}var Mt=$r,Wt=ft(8224),Fn=ft(16089),zn=ft(76846);function tn(en){var fn=(0,zn.bn)(en),$t=fn.getBoundingClientRect(),st=document.documentElement;return{left:$t.left+(window.pageXOffset||st.scrollLeft)-(st.clientLeft||document.body.clientLeft||0),top:$t.top+(window.pageYOffset||st.scrollTop)-(st.clientTop||document.body.clientTop||0)}}var Nn=function(fn,$t){var st,Bn,Gn=fn.scrollBodyRef,fr=fn.onScroll,ur=fn.offsetScroll,qn=fn.container,gn=fn.direction,Rn=ke(xe,"prefixCls"),Vn=((st=Gn.current)===null||st===void 0?void 0:st.scrollWidth)||0,kn=((Bn=Gn.current)===null||Bn===void 0?void 0:Bn.clientWidth)||0,Zn=Vn&&kn*(kn/Vn),xr=de.useRef(),sr=Ut({scrollLeft:0,isHiddenScrollBar:!0}),Qn=(0,Gt.Z)(sr,2),cn=Qn[0],vr=Qn[1],Nr=de.useRef({delta:0,x:0}),si=de.useState(!1),Ur=(0,Gt.Z)(si,2),Ti=Ur[0],Ei=Ur[1],bi=de.useRef(null);de.useEffect(function(){return function(){Fn.Z.cancel(bi.current)}},[]);var Ai=function(){Ei(!1)},ji=function(Xr){Xr.persist(),Nr.current.delta=Xr.pageX-cn.scrollLeft,Nr.current.x=0,Ei(!0),Xr.preventDefault()},$i=function(Xr){var mi,ei=Xr||((mi=window)===null||mi===void 0?void 0:mi.event),Hi=ei.buttons;if(!Ti||Hi===0){Ti&&Ei(!1);return}var Gi=Nr.current.x+Xr.pageX-Nr.current.x-Nr.current.delta,ci=gn==="rtl";Gi=Math.max(ci?Zn-kn:0,Math.min(ci?0:kn-Zn,Gi));var to=!ci||Math.abs(Gi)+Math.abs(Zn)<kn;to&&(fr({scrollLeft:Gi/kn*(Vn+2)}),Nr.current.x=Xr.pageX)},qt=function(){Fn.Z.cancel(bi.current),bi.current=(0,Fn.Z)(function(){if(Gn.current){var Xr=tn(Gn.current).top,mi=Xr+Gn.current.offsetHeight,ei=qn===window?document.documentElement.scrollTop+window.innerHeight:tn(qn).top+qn.clientHeight;mi-(0,Et.Z)()<=ei||Xr>=ei-ur?vr(function(Hi){return(0,Me.Z)((0,Me.Z)({},Hi),{},{isHiddenScrollBar:!0})}):vr(function(Hi){return(0,Me.Z)((0,Me.Z)({},Hi),{},{isHiddenScrollBar:!1})})}})},Mi=function(Xr){vr(function(mi){return(0,Me.Z)((0,Me.Z)({},mi),{},{scrollLeft:Xr/Vn*kn||0})})};return de.useImperativeHandle($t,function(){return{setScrollLeft:Mi,checkScrollBarVisible:qt}}),de.useEffect(function(){var Pi=(0,Wt.Z)(document.body,"mouseup",Ai,!1),Xr=(0,Wt.Z)(document.body,"mousemove",$i,!1);return qt(),function(){Pi.remove(),Xr.remove()}},[Zn,Ti]),de.useEffect(function(){if(Gn.current){for(var Pi=[],Xr=(0,zn.bn)(Gn.current);Xr;)Pi.push(Xr),Xr=Xr.parentElement;return Pi.forEach(function(mi){return mi.addEventListener("scroll",qt,!1)}),window.addEventListener("resize",qt,!1),window.addEventListener("scroll",qt,!1),qn.addEventListener("scroll",qt,!1),function(){Pi.forEach(function(mi){return mi.removeEventListener("scroll",qt)}),window.removeEventListener("resize",qt),window.removeEventListener("scroll",qt),qn.removeEventListener("scroll",qt)}}},[qn]),de.useEffect(function(){cn.isHiddenScrollBar||vr(function(Pi){var Xr=Gn.current;return Xr?(0,Me.Z)((0,Me.Z)({},Pi),{},{scrollLeft:Xr.scrollLeft/Xr.scrollWidth*Xr.clientWidth}):Pi})},[cn.isHiddenScrollBar]),Vn<=kn||!Zn||cn.isHiddenScrollBar?null:de.createElement("div",{style:{height:(0,Et.Z)(),width:kn,bottom:ur},className:"".concat(Rn,"-sticky-scroll")},de.createElement("div",{onMouseDown:ji,ref:xr,className:Ye()("".concat(Rn,"-sticky-scroll-bar"),(0,Be.Z)({},"".concat(Rn,"-sticky-scroll-bar-active"),Ti)),style:{width:"".concat(Zn,"px"),transform:"translate3d(".concat(cn.scrollLeft,"px, 0, 0)")}}))},jn=de.forwardRef(Nn);function Ln(en){return null}var An=Ln;function Kn(en){return null}var Jn=Kn,er="rc-table",Wr=[],Cr={};function Tr(){return"No Data"}function ln(en,fn){var $t=(0,Me.Z)({rowKey:"key",prefixCls:er,emptyText:Tr},en),st=$t.prefixCls,Bn=$t.className,Gn=$t.rowClassName,fr=$t.style,ur=$t.data,qn=$t.rowKey,gn=$t.scroll,Rn=$t.tableLayout,Vn=$t.direction,kn=$t.title,Zn=$t.footer,xr=$t.summary,sr=$t.caption,Qn=$t.id,cn=$t.showHeader,vr=$t.components,Nr=$t.emptyText,si=$t.onRow,Ur=$t.onHeaderRow,Ti=$t.onScroll,Ei=$t.internalHooks,bi=$t.transformColumns,Ai=$t.internalRefs,ji=$t.tailor,$i=$t.getContainerWidth,qt=$t.sticky,Mi=$t.rowHoverable,Pi=Mi===void 0?!0:Mi,Xr=ur||Wr,mi=!!Xr.length,ei=Ei===at.R,Hi=de.useCallback(function(Ki,so){return(0,Xe.Z)(vr,Ki)||so},[vr]),Gi=de.useMemo(function(){return typeof qn=="function"?qn:function(Ki){var so=Ki&&Ki[qn];return so}},[qn]),ci=Hi(["body"]),to=pr(),pa=(0,Gt.Z)(to,3),Ao=pa[0],bs=pa[1],wa=pa[2],Ir=Qt($t,Xr,Gi),bo=(0,Gt.Z)(Ir,6),Po=bo[0],ta=bo[1],jo=bo[2],Ko=bo[3],ar=bo[4],_r=bo[5],li=gn==null?void 0:gn.x,Ci=de.useState(0),Oi=(0,Gt.Z)(Ci,2),no=Oi[0],zr=Oi[1],Aa=(0,Ar.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({},$t),Po),{},{expandable:!!Po.expandedRowRender,columnTitle:Po.columnTitle,expandedKeys:jo,getRowKey:Gi,onTriggerExpand:_r,expandIcon:Ko,expandIconColumnIndex:Po.expandIconColumnIndex,direction:Vn,scrollWidth:ei&&ji&&typeof li=="number"?li:null,clientWidth:no}),ei?bi:null),zo=(0,Gt.Z)(Aa,4),Oo=zo[0],Ii=zo[1],Vo=zo[2],ja=zo[3],vo=Vo!=null?Vo:li,fs=de.useMemo(function(){return{columns:Oo,flattenColumns:Ii}},[Oo,Ii]),ds=de.useRef(),Ps=de.useRef(),na=de.useRef(),eh=de.useRef();de.useImperativeHandle(fn,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(bt(ka)){var Ql;(Ql=na.current)===null||Ql===void 0||Ql.scrollTo({top:ka})}else{var du,sl=fu!=null?fu:Gi(Xr[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],Vl=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=rt(Ii),aa=Oa.map(function(Ki){return uu.get(Ki)}),ga=de.useMemo(function(){return aa},[aa.join("_")]),Xl=Qr(ga,Ii,Vn),Ga=gn&&xt(gn.y),co=gn&&xt(vo)||!!Po.fixed,oo=co&&Ii.some(function(Ki){var so=Ki.fixed;return so}),Ji=de.useRef(),sa=Yn(qt,st),kr=sa.isSticky,fa=sa.offsetHeader,zt=sa.offsetSummary,wn=sa.offsetScroll,Ws=sa.stickyClassName,jl=sa.container,$o=de.useMemo(function(){return xr==null?void 0:xr(Xr)},[xr,Xr]),ba=(Ga||kr)&&de.isValidElement($o)&&$o.type===_e&&$o.props.fixed,Fs,ol,Fu;Ga&&(ol={overflowY:mi?"scroll":"auto",maxHeight:gn.y}),co&&(Fs={overflowX:"auto"},Ga||(ol={overflowY:"hidden"}),Fu={width:vo===!0?"auto":vo,minWidth:"100%"});var Fo=de.useCallback(function(Ki,so){Ca(function(Xo){if(Xo.get(Ki)!==so){var Fa=new Map(Xo);return Fa.set(Ki,so),Fa}return Xo})},[]),Si=Un(null),Ua=(0,Gt.Z)(Si,2),Ds=Ua[0],Do=Ua[1];function Wi(Ki,so){so&&(typeof so=="function"?so(Ki):so.scrollLeft!==Ki&&(so.scrollLeft=Ki,so.scrollLeft!==Ki&&setTimeout(function(){so.scrollLeft=Ki},0)))}var Go=(0,oe.Z)(function(Ki){var so=Ki.currentTarget,Xo=Ki.scrollLeft,Fa=Vn==="rtl",ka=typeof Xo=="number"?Xo:so.scrollLeft,fu=so||Cr;if(!Do()||Do()===fu){var Ql;Ds(fu),Wi(ka,Ps.current),Wi(ka,na.current),Wi(ka,ju.current),Wi(ka,(Ql=Ji.current)===null||Ql===void 0?void 0:Ql.setScrollLeft)}var du=so||Ps.current;if(du){var sl=ei&&ji&&typeof vo=="number"?vo:du.scrollWidth,Fl=du.clientWidth;if(sl===Fl){Vl(!1),Ou(!1);return}Fa?(Vl(-ka<sl-Fl),Ou(-ka>0)):(Vl(ka>0),Ou(ka<sl-Fl))}}),ps=(0,oe.Z)(function(Ki){Go(Ki),Ti==null||Ti(Ki)}),xo=function(){if(co&&na.current){var so;Go({currentTarget:(0,zn.bn)(na.current),scrollLeft:(so=na.current)===null||so===void 0?void 0:so.scrollLeft})}else Vl(!1),Ou(!1)},Cs=function(so){var Xo,Fa=so.width;(Xo=Ji.current)===null||Xo===void 0||Xo.checkScrollBarVisible();var ka=ds.current?ds.current.offsetWidth:Fa;ei&&$i&&ds.current&&(ka=$i(ds.current,ka)||ka),ka!==no&&(xo(),zr(ka))},ma=de.useRef(!1);de.useEffect(function(){ma.current&&xo()},[co,ur,Oo.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(){(!ji||!ei)&&(na.current instanceof Element?ro((0,Et.o)(na.current).width):ro((0,Et.o)(eh.current).width)),ho((0,At.G)("position","sticky"))},[]),de.useEffect(function(){ei&&Ai&&(Ai.body.current=na.current)});var Du=de.useCallback(function(Ki){return de.createElement(de.Fragment,null,de.createElement(Br,Ki),ba==="top"&&de.createElement(qe,Ki,$o))},[ba,$o]),yi=de.useCallback(function(Ki){return de.createElement(qe,Ki,$o)},[$o]),uf=Hi(["table"],"table"),Qi=de.useMemo(function(){return Rn||(oo?vo==="max-content"?"auto":"fixed":Ga||kr||Ii.some(function(Ki){var so=Ki.ellipsis;return so})?"fixed":"auto")},[Ga,oo,Ii,Rn,kr]),Cc,cu={colWidths:ga,columCount:Ii.length,stickyOffsets:Xl,onHeaderRow:Ur,fixHeader:Ga,scroll:gn},ih=de.useMemo(function(){return mi?null:typeof Nr=="function"?Nr():Nr},[mi,Nr]),Ec=de.createElement(ai,{data:Xr,measureColumnWidth:Ga||co||kr}),_h=de.createElement(ki,{colWidths:Ii.map(function(Ki){var so=Ki.width;return so}),columns:Ii}),Ol=sr!=null?de.createElement("caption",{className:"".concat(st,"-caption")},sr):void 0,Bu=(0,Ft.Z)($t,{data:!0}),uo=(0,Ft.Z)($t,{aria:!0});if(Ga||kr){var al;typeof ci=="function"?(al=ci(Xr,{scrollbarSize:Ea,ref:na,onScroll:Go}),cu.colWidths=Ii.map(function(Ki,so){var Xo=Ki.width,Fa=so===Ii.length-1?Xo-Ea:Xo;return typeof Fa=="number"&&!Number.isNaN(Fa)?Fa:0})):al=de.createElement("div",{style:(0,Me.Z)((0,Me.Z)({},Fs),ol),onScroll:ps,ref:na,className:Ye()("".concat(st,"-body"))},de.createElement(uf,(0,Se.Z)({style:(0,Me.Z)((0,Me.Z)({},Fu),{},{tableLayout:Qi})},uo),Ol,_h,Ec,!ba&&$o&&de.createElement(qe,{stickyOffsets:Xl,flattenColumns:Ii},$o)));var zh=(0,Me.Z)((0,Me.Z)((0,Me.Z)({noData:!Xr.length,maxContentScroll:co&&vo==="max-content"},cu),fs),{},{direction:Vn,stickyClassName:Ws,onScroll:Go});Cc=de.createElement(de.Fragment,null,cn!==!1&&de.createElement(Er,(0,Se.Z)({},zh,{stickyTopOffset:fa,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}),yi),kr&&na.current&&na.current instanceof Element&&de.createElement(jn,{ref:Ji,offsetScroll:wn,scrollBodyRef:na,onScroll:Go,container:jl,direction:Vn}))}else Cc=de.createElement("div",{style:(0,Me.Z)((0,Me.Z)({},Fs),ol),className:Ye()("".concat(st,"-content")),onScroll:Go,ref:na},de.createElement(uf,(0,Se.Z)({style:(0,Me.Z)((0,Me.Z)({},Fu),{},{tableLayout:Qi})},uo),Ol,_h,cn!==!1&&de.createElement(Br,(0,Se.Z)({},cu,fs)),Ec,$o&&de.createElement(qe,{stickyOffsets:Xl,flattenColumns:Ii},$o)));var Yl=de.createElement("div",(0,Se.Z)({className:Ye()(st,Bn,(0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)({},"".concat(st,"-rtl"),Vn==="rtl"),"".concat(st,"-ping-left"),Os),"".concat(st,"-ping-right"),Zo),"".concat(st,"-layout-fixed"),Rn==="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"),Ii[0]&&Ii[0].fixed),"".concat(st,"-has-fix-right"),Ii[Ii.length-1]&&Ii[Ii.length-1].fixed==="right")),style:fr,id:Qn,ref:ds},Bu),kn&&de.createElement(Mt,{className:"".concat(st,"-title")},kn(Xr)),de.createElement("div",{ref:eh,className:"".concat(st,"-container")},Cc),Zn&&de.createElement(Mt,{className:"".concat(st,"-footer")},Zn(Xr)));co&&(Yl=de.createElement(vt.Z,{onResize:Cs},Yl));var kc=Zt(Ii,Xl,Vn),Jl=de.useMemo(function(){return{scrollX:vo,prefixCls:st,getComponent:Hi,scrollbarSize:Ea,direction:Vn,fixedInfoList:kc,isSticky:kr,supportSticky:Uo,componentWidth:no,fixHeader:Ga,fixColumn:oo,horizonScroll:co,tableLayout:Qi,rowClassName:Gn,expandedRowClassName:Po.expandedRowClassName,expandIcon:Ko,expandableType:ta,expandRowByClick:Po.expandRowByClick,expandedRowRender:Po.expandedRowRender,onTriggerExpand:_r,expandIconColumnIndex:Po.expandIconColumnIndex,indentSize:Po.indentSize,allColumnsFixedLeft:Ii.every(function(Ki){return Ki.fixed==="left"}),emptyNode:ih,columns:Oo,flattenColumns:Ii,onColumnResize:Fo,hoverStartRow:Ao,hoverEndRow:bs,onHover:wa,rowExpandable:Po.rowExpandable,onRow:si,getRowKey:Gi,expandedKeys:jo,childrenColumnName:ar,rowHoverable:Pi}},[vo,st,Hi,Ea,Vn,kc,kr,Uo,no,Ga,oo,co,Qi,Gn,Po.expandedRowClassName,Ko,ta,Po.expandRowByClick,Po.expandedRowRender,_r,Po.expandIconColumnIndex,Po.indentSize,ih,Oo,Ii,Fo,Ao,bs,wa,Po.rowExpandable,si,Gi,jo,ar,Pi]);return de.createElement(xe.Provider,{value:Jl},Yl)}var ri=de.forwardRef(ln);function di(en){return ie(ri,en)}var _i=di();_i.EXPAND_COLUMN=at.w,_i.INTERNAL_HOOKS=at.R,_i.Column=An,_i.ColumnGroup=Jn,_i.Summary=ut;var pn=_i,Xn=ft(65283),rr=Ee(null),ir=Ee(null);function wr(en,fn,$t){var st=fn||1;return $t[en+st]-($t[en]||0)}function Rr(en){var fn=en.rowInfo,$t=en.column,st=en.colIndex,Bn=en.indent,Gn=en.index,fr=en.component,ur=en.renderIndex,qn=en.record,gn=en.style,Rn=en.className,Vn=en.inverse,kn=en.getHeight,Zn=$t.render,xr=$t.dataIndex,sr=$t.className,Qn=$t.width,cn=ke(ir,["columnsOffset"]),vr=cn.columnsOffset,Nr=vn(fn,$t,st,Bn,Gn),si=Nr.key,Ur=Nr.fixedInfo,Ti=Nr.appendCellNode,Ei=Nr.additionalCellProps,bi=Ei.style,Ai=Ei.colSpan,ji=Ai===void 0?1:Ai,$i=Ei.rowSpan,qt=$i===void 0?1:$i,Mi=st-1,Pi=wr(Mi,ji,vr),Xr=ji>1?Qn-Pi:0,mi=(0,Me.Z)((0,Me.Z)((0,Me.Z)({},bi),gn),{},{flex:"0 0 ".concat(Pi,"px"),width:"".concat(Pi,"px"),marginRight:Xr,pointerEvents:"auto"}),ei=de.useMemo(function(){return Vn?qt<=1:ji===0||qt===0||qt>1},[qt,ji,Vn]);ei?mi.visibility="hidden":Vn&&(mi.height=kn==null?void 0:kn(qt));var Hi=ei?function(){return null}:Zn,Gi={};return(qt===0||ji===0)&&(Gi.rowSpan=1,Gi.colSpan=1),de.createElement(gt,(0,Se.Z)({className:Ye()(sr,Rn),ellipsis:$t.ellipsis,align:$t.align,scope:$t.rowScope,component:fr,prefixCls:fn.prefixCls,key:si,record:qn,index:Gn,renderIndex:ur,dataIndex:xr,render:Hi,shouldCellUpdate:$t.shouldCellUpdate},Ur,{appendNode:Ti,additionalProps:(0,Me.Z)((0,Me.Z)({},Ei),{},{style:mi},Gi)}))}var Kr=Rr,ii=["data","index","className","rowKey","style","extra","getHeight"],oi=de.forwardRef(function(en,fn){var $t=en.data,st=en.index,Bn=en.className,Gn=en.rowKey,fr=en.style,ur=en.extra,qn=en.getHeight,gn=(0,Ne.Z)(en,ii),Rn=$t.record,Vn=$t.indent,kn=$t.index,Zn=ke(xe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),xr=Zn.scrollX,sr=Zn.flattenColumns,Qn=Zn.prefixCls,cn=Zn.fixColumn,vr=Zn.componentWidth,Nr=ke(rr,["getComponent"]),si=Nr.getComponent,Ur=Vt(Rn,Gn,st,Vn),Ti=si(["body","row"],"div"),Ei=si(["body","cell"],"div"),bi=Ur.rowSupportExpand,Ai=Ur.expanded,ji=Ur.rowProps,$i=Ur.expandedRowRender,qt=Ur.expandedRowClassName,Mi;if(bi&&Ai){var Pi=$i(Rn,st,Vn+1,Ai),Xr=Sn(qt,Rn,st,Vn),mi={};cn&&(mi={style:(0,Be.Z)({},"--virtual-width","".concat(vr,"px"))});var ei="".concat(Qn,"-expanded-row-cell");Mi=de.createElement(Ti,{className:Ye()("".concat(Qn,"-expanded-row"),"".concat(Qn,"-expanded-row-level-").concat(Vn+1),Xr)},de.createElement(gt,{component:Ei,prefixCls:Qn,className:Ye()(ei,(0,Be.Z)({},"".concat(ei,"-fixed"),cn)),additionalProps:mi},Pi))}var Hi=(0,Me.Z)((0,Me.Z)({},fr),{},{width:xr});ur&&(Hi.position="absolute",Hi.pointerEvents="none");var Gi=de.createElement(Ti,(0,Se.Z)({},ji,gn,{"data-row-key":Gn,ref:bi?null:fn,className:Ye()(Bn,"".concat(Qn,"-row"),ji==null?void 0:ji.className,(0,Be.Z)({},"".concat(Qn,"-row-extra"),ur)),style:(0,Me.Z)((0,Me.Z)({},Hi),ji==null?void 0:ji.style)}),sr.map(function(ci,to){return de.createElement(Kr,{key:to,component:Ei,rowInfo:Ur,column:ci,colIndex:to,indent:Vn,index:st,renderIndex:kn,record:Rn,inverse:ur,getHeight:qn})}));return bi?de.createElement("div",{ref:fn},Gi,Mi):Gi}),cr=le(oi),on=cr,or=de.forwardRef(function(en,fn){var $t=en.data,st=en.onScroll,Bn=ke(xe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Gn=Bn.flattenColumns,fr=Bn.onColumnResize,ur=Bn.getRowKey,qn=Bn.expandedKeys,gn=Bn.prefixCls,Rn=Bn.childrenColumnName,Vn=Bn.scrollX,kn=Bn.direction,Zn=ke(rr),xr=Zn.sticky,sr=Zn.scrollY,Qn=Zn.listItemHeight,cn=Zn.getComponent,vr=Zn.onScroll,Nr=de.useRef(),si=Yt($t,Rn,qn,ur),Ur=de.useMemo(function(){var Mi=0;return Gn.map(function(Pi){var Xr=Pi.width,mi=Pi.key;return Mi+=Xr,[mi,Xr,Mi]})},[Gn]),Ti=de.useMemo(function(){return Ur.map(function(Mi){return Mi[2]})},[Ur]);de.useEffect(function(){Ur.forEach(function(Mi){var Pi=(0,Gt.Z)(Mi,2),Xr=Pi[0],mi=Pi[1];fr(Xr,mi)})},[Ur]),de.useImperativeHandle(fn,function(){var Mi,Pi={scrollTo:function(mi){var ei;(ei=Nr.current)===null||ei===void 0||ei.scrollTo(mi)},nativeElement:(Mi=Nr.current)===null||Mi===void 0?void 0:Mi.nativeElement};return Object.defineProperty(Pi,"scrollLeft",{get:function(){var mi;return((mi=Nr.current)===null||mi===void 0?void 0:mi.getScrollInfo().x)||0},set:function(mi){var ei;(ei=Nr.current)===null||ei===void 0||ei.scrollTo({left:mi})}}),Pi});var Ei=function(Pi,Xr){var mi,ei=(mi=si[Xr])===null||mi===void 0?void 0:mi.record,Hi=Pi.onCell;if(Hi){var Gi,ci=Hi(ei,Xr);return(Gi=ci==null?void 0:ci.rowSpan)!==null&&Gi!==void 0?Gi:1}return 1},bi=function(Pi){var Xr=Pi.start,mi=Pi.end,ei=Pi.getSize,Hi=Pi.offsetY;if(mi<0)return null;for(var Gi=Gn.filter(function(Ko){return Ei(Ko,Xr)===0}),ci=Xr,to=function(ar){if(Gi=Gi.filter(function(_r){return Ei(_r,ar)===0}),!Gi.length)return ci=ar,1},pa=Xr;pa>=0&&!to(pa);pa-=1);for(var Ao=Gn.filter(function(Ko){return Ei(Ko,mi)!==1}),bs=mi,wa=function(ar){if(Ao=Ao.filter(function(_r){return Ei(_r,ar)!==1}),!Ao.length)return bs=Math.max(ar-1,mi),1},Ir=mi;Ir<si.length&&!wa(Ir);Ir+=1);for(var bo=[],Po=function(ar){var _r=si[ar];if(!_r)return 1;Gn.some(function(li){return Ei(li,ar)>1})&&bo.push(ar)},ta=ci;ta<=bs;ta+=1)Po(ta);var jo=bo.map(function(Ko){var ar=si[Ko],_r=ur(ar.record,Ko),li=function(no){var zr=Ko+no-1,Aa=ur(si[zr].record,zr),zo=ei(_r,Aa);return zo.bottom-zo.top},Ci=ei(_r);return de.createElement(on,{key:Ko,data:ar,rowKey:_r,index:Ko,style:{top:-Hi+Ci.top},extra:!0,getHeight:li})});return jo},Ai=de.useMemo(function(){return{columnsOffset:Ti}},[Ti]),ji="".concat(gn,"-tbody"),$i=cn(["body","wrapper"]),qt={};return xr&&(qt.position="sticky",qt.bottom=0,(0,Te.Z)(xr)==="object"&&xr.offsetScroll&&(qt.bottom=xr.offsetScroll)),de.createElement(ir.Provider,{value:Ai},de.createElement(Xn.Z,{fullHeight:!1,ref:Nr,prefixCls:"".concat(ji,"-virtual"),styles:{horizontalScrollBar:qt},className:ji,height:sr,itemHeight:Qn||24,data:si,itemKey:function(Pi){return ur(Pi.record)},component:$i,scrollWidth:Vn,direction:kn,onVirtualScroll:function(Pi){var Xr,mi=Pi.x;st({currentTarget:(Xr=Nr.current)===null||Xr===void 0?void 0:Xr.nativeElement,scrollLeft:mi})},onScroll:vr,extraRender:bi},function(Mi,Pi,Xr){var mi=ur(Mi.record,Pi);return de.createElement(on,{data:Mi,rowKey:mi,index:Pi,style:Xr.style})}))}),an=le(or),gr=an,Vr=function(fn,$t){var st=$t.ref,Bn=$t.onScroll;return de.createElement(gr,{ref:st,data:fn,onScroll:Bn})};function ti(en,fn){var $t=en.data,st=en.columns,Bn=en.scroll,Gn=en.sticky,fr=en.prefixCls,ur=fr===void 0?er:fr,qn=en.className,gn=en.listItemHeight,Rn=en.components,Vn=en.onScroll,kn=Bn||{},Zn=kn.x,xr=kn.y;typeof Zn!="number"&&(Zn=1),typeof xr!="number"&&(xr=500);var sr=(0,Nt.zX)(function(vr,Nr){return(0,Xe.Z)(Rn,vr)||Nr}),Qn=(0,Nt.zX)(Vn),cn=de.useMemo(function(){return{sticky:Gn,scrollY:xr,listItemHeight:gn,getComponent:sr,onScroll:Qn}},[Gn,xr,gn,sr,Qn]);return de.createElement(rr.Provider,{value:cn},de.createElement(pn,(0,Se.Z)({},en,{className:Ye()(qn,"".concat(ur,"-virtual")),scroll:(0,Me.Z)((0,Me.Z)({},Bn),{},{x:Zn}),components:(0,Me.Z)((0,Me.Z)({},Rn),{},{body:$t!=null&&$t.length?Vr:void 0}),columns:st,internalHooks:at.R,tailor:!0,ref:fn})))}var Ni=de.forwardRef(ti);function hi(en){return ie(Ni,en)}var Zr=hi(),Ui=null},54451:function(_n,Mn,ft){"use strict";ft.d(Mn,{g:function(){return de},v:function(){return Ie}});var at=ft(89490),Gt=ft(39224),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(_n,Mn,ft){"use strict";ft.r(Mn),ft.d(Mn,{ResizableTextArea:function(){return Ge},default:function(){return ot}});var at=ft(71409),Gt=ft(87075),oe=ft(89490),Ue=ft(62730),Ie=ft(11036),de=ft(39224),ve=ft(92310),Ee=ft.n(ve),ke=ft(36901),Se=ft(66003),Ae=ft(30292),me=ft(18929),be=ft(59301),fe=ft(28788),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"],he={},pe;function xe(lt){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ct=lt.getAttribute("id")||lt.getAttribute("data-reactid")||lt.getAttribute("name");if(ct&&he[Ct])return he[Ct];var Je=window.getComputedStyle(lt),rt=Je.getPropertyValue("box-sizing")||Je.getPropertyValue("-moz-box-sizing")||Je.getPropertyValue("-webkit-box-sizing"),xt=parseFloat(Je.getPropertyValue("padding-bottom"))+parseFloat(Je.getPropertyValue("padding-top")),bt=parseFloat(Je.getPropertyValue("border-bottom-width"))+parseFloat(Je.getPropertyValue("border-top-width")),Pt=le.map(function(St){return"".concat(St,":").concat(Je.getPropertyValue(St))}).join(";"),ht={sizingStyle:Pt,paddingSize:xt,borderSize:bt,boxSizing:rt};return ct&&Ct&&(he[Ct]=ht),ht}function je(lt){var ct=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 rt=xe(lt,ct),xt=rt.paddingSize,bt=rt.borderSize,Pt=rt.boxSizing,ht=rt.sizingStyle;pe.setAttribute("style","".concat(ht,";").concat(ie)),pe.value=lt.value||lt.placeholder||"";var St=void 0,mt=void 0,Nt,dt=pe.scrollHeight;if(Pt==="border-box"?dt+=bt:Pt==="content-box"&&(dt-=xt),Ct!==null||Je!==null){pe.value=" ";var Dt=pe.scrollHeight-xt;Ct!==null&&(St=Dt*Ct,Pt==="border-box"&&(St=St+xt+bt),dt=Math.max(St,dt)),Je!==null&&(mt=Dt*Je,Pt==="border-box"&&(mt=mt+xt+bt),Nt=dt>mt?"":"hidden",dt=Math.min(mt,dt))}var gt={height:dt,overflowY:Nt,resize:"none"};return St&&(gt.minHeight=St),mt&&(gt.maxHeight=mt),gt}var De=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Fe=0,Te=1,Me=2,Be=be.forwardRef(function(lt,ct){var Ct=lt,Je=Ct.prefixCls,rt=Ct.defaultValue,xt=Ct.value,bt=Ct.autoSize,Pt=Ct.onResize,ht=Ct.className,St=Ct.style,mt=Ct.disabled,Nt=Ct.onChange,dt=Ct.onInternalAutoSize,Dt=(0,de.Z)(Ct,De),gt=(0,me.Z)(rt,{value:xt,postState:function(On){return On!=null?On:""}}),yt=(0,Ie.Z)(gt,2),tt=yt[0],He=yt[1],we=function(On){He(On.target.value),Nt==null||Nt(On)},Ne=be.useRef();be.useImperativeHandle(ct,function(){return{textArea:Ne.current}});var Ve=be.useMemo(function(){return bt&&(0,fe.Z)(bt)==="object"?[bt.minRows,bt.maxRows]:[]},[bt]),nt=(0,Ie.Z)(Ve,2),Re=nt[0],_e=nt[1],Ze=!!bt,qe=function(){try{if(document.activeElement===Ne.current){var On=Ne.current,Dr=On.selectionStart,Sr=On.selectionEnd,qr=On.scrollTop;Ne.current.setSelectionRange(Dr,Sr),Ne.current.scrollTop=qr}}catch(tr){}},ut=be.useState(Me),vt=(0,Ie.Z)(ut,2),At=vt[0],Et=vt[1],Ft=be.useState(),Kt=(0,Ie.Z)(Ft,2),Yt=Kt[0],Vt=Kt[1],Ht=function(){Et(Fe)};(0,te.Z)(function(){Ze&&Ht()},[xt,Re,_e,Ze]),(0,te.Z)(function(){if(At===Fe)Et(Te);else if(At===Te){var Cn=je(Ne.current,!1,Re,_e);Et(Me),Vt(Cn)}else qe()},[At]);var sn=be.useRef(),rn=function(){se.Z.cancel(sn.current)},un=function(On){At===Me&&(Pt==null||Pt(On),bt&&(rn(),sn.current=(0,se.Z)(function(){Ht()})))};be.useEffect(function(){return rn},[]);var Sn=Ze?Yt:null,vn=(0,oe.Z)((0,oe.Z)({},St),Sn);return(At===Fe||At===Te)&&(vn.overflowY="hidden",vn.overflowX="hidden"),be.createElement(z.Z,{onResize:un,disabled:!(bt||Pt)},be.createElement("textarea",(0,at.Z)({},Dt,{ref:Ne,style:vn,className:Ee()(Je,ht,(0,Gt.Z)({},"".concat(Je,"-disabled"),mt)),disabled:mt,value:tt,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=be.forwardRef(function(lt,ct){var Ct,Je=lt.defaultValue,rt=lt.value,xt=lt.onFocus,bt=lt.onBlur,Pt=lt.onChange,ht=lt.allowClear,St=lt.maxLength,mt=lt.onCompositionStart,Nt=lt.onCompositionEnd,dt=lt.suffix,Dt=lt.prefixCls,gt=Dt===void 0?"rc-textarea":Dt,yt=lt.showCount,tt=lt.count,He=lt.className,we=lt.style,Ne=lt.disabled,Ve=lt.hidden,nt=lt.classNames,Re=lt.styles,_e=lt.onResize,Ze=lt.onClear,qe=lt.onPressEnter,ut=lt.readOnly,vt=lt.autoSize,At=lt.onKeyDown,Et=(0,de.Z)(lt,Ye),Ft=(0,me.Z)(Je,{value:rt,defaultValue:Je}),Kt=(0,Ie.Z)(Ft,2),Yt=Kt[0],Vt=Kt[1],Ht=Yt==null?"":String(Yt),sn=be.useState(!1),rn=(0,Ie.Z)(sn,2),un=rn[0],Sn=rn[1],vn=be.useRef(!1),Cn=be.useState(null),On=(0,Ie.Z)(Cn,2),Dr=On[0],Sr=On[1],qr=(0,be.useRef)(null),tr=(0,be.useRef)(null),ai=function(){var Hn;return(Hn=tr.current)===null||Hn===void 0?void 0:Hn.textArea},gi=function(){ai().focus()};(0,be.useImperativeHandle)(ct,function(){var Yn;return{resizableTextArea:tr.current,focus:gi,blur:function(){ai().blur()},nativeElement:((Yn=qr.current)===null||Yn===void 0?void 0:Yn.nativeElement)||ai()}}),(0,be.useEffect)(function(){Sn(function(Yn){return!Ne&&Yn})},[Ne]);var fi=be.useState(null),Di=(0,Ie.Z)(fi,2),ki=Di[0],Jr=Di[1];be.useEffect(function(){if(ki){var Yn;(Yn=ai()).setSelectionRange.apply(Yn,(0,Ue.Z)(ki))}},[ki]);var Li=(0,Se.Z)(tt,yt),et=(Ct=Li.max)!==null&&Ct!==void 0?Ct:St,Mr=Number(et)>0,Er=Li.strategy(Ht),En=!!et&&Er>et,Tn=function(Hn,Qr){var $r=Qr;!vn.current&&Li.exceedFormatter&&Li.max&&Li.strategy(Qr)>Li.max&&($r=Li.exceedFormatter(Qr,{max:Li.max}),Qr!==$r&&Jr([ai().selectionStart||0,ai().selectionEnd||0])),Vt($r),(0,Ae.rJ)(Hn.currentTarget,Hn,Pt,$r)},Dn=function(Hn){vn.current=!0,mt==null||mt(Hn)},Pr=function(Hn){vn.current=!1,Tn(Hn,Hn.currentTarget.value),Nt==null||Nt(Hn)},Br=function(Hn){Tn(Hn,Hn.target.value)},Ar=function(Hn){Hn.key==="Enter"&&qe&&qe(Hn),At==null||At(Hn)},Qt=function(Hn){Sn(!0),xt==null||xt(Hn)},Zt=function(Hn){Sn(!1),bt==null||bt(Hn)},Ut=function(Hn){Vt(""),gi(),(0,Ae.rJ)(ai(),Hn,Pt)},Un=dt,pr;Li.show&&(Li.showFormatter?pr=Li.showFormatter({value:Ht,count:Er,maxLength:et}):pr="".concat(Er).concat(Mr?" / ".concat(et):""),Un=be.createElement(be.Fragment,null,Un,be.createElement("span",{className:Ee()("".concat(gt,"-data-count"),nt==null?void 0:nt.count),style:Re==null?void 0:Re.count},pr)));var mr=function(Hn){var Qr;_e==null||_e(Hn),(Qr=ai())!==null&&Qr!==void 0&&Qr.style.height&&Sr(!0)},xn=!vt&&!yt&&!ht;return be.createElement(ke.BaseInput,{ref:qr,value:Ht,allowClear:ht,handleReset:Ut,suffix:Un,prefixCls:gt,classNames:(0,oe.Z)((0,oe.Z)({},nt),{},{affixWrapper:Ee()(nt==null?void 0:nt.affixWrapper,(0,Gt.Z)((0,Gt.Z)({},"".concat(gt,"-show-count"),yt),"".concat(gt,"-textarea-allow-clear"),ht))}),disabled:Ne,focused:un,className:Ee()(He,En&&"".concat(gt,"-out-of-range")),style:(0,oe.Z)((0,oe.Z)({},we),Dr&&!xn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof pr=="string"?pr:void 0}},hidden:Ve,readOnly:ut,onClear:Ze},be.createElement(Ge,(0,at.Z)({},Et,{autoSize:vt,maxLength:St,onKeyDown:Ar,onChange:Br,onFocus:Qt,onBlur:Zt,onCompositionStart:Dn,onCompositionEnd:Pr,className:Ee()(nt==null?void 0:nt.textarea),style:(0,oe.Z)((0,oe.Z)({},Re==null?void 0:Re.textarea),{},{resize:we==null?void 0:we.resize}),disabled:Ne,prefixCls:gt,onResize:mr,ref:tr,readOnly:ut})))}),Xe=Ke,ot=Xe},639:function(_n,Mn,ft){"use strict";ft.d(Mn,{Z:function(){return he}});var at=ft(71409),Gt=ft(87075),oe=ft(89490),Ue=ft(11036),Ie=ft(39224),de=ft(59301),ve=ft(92310),Ee=ft.n(ve),ke=ft(26112),Se=ft(30699),Ae=function(xe){for(var je=xe.prefixCls,De=xe.level,Fe=xe.isStart,Te=xe.isEnd,Me="".concat(je,"-indent-unit"),Be=[],Ge=0;Ge<De;Ge+=1)Be.push(de.createElement("span",{key:Ge,className:Ee()(Me,(0,Gt.Z)((0,Gt.Z)({},"".concat(Me,"-start"),Fe[Ge]),"".concat(Me,"-end"),Te[Ge]))}));return de.createElement("span",{"aria-hidden":"true",className:"".concat(je,"-indent")},Be)},me=de.memo(Ae),be=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 je,De,Fe,Te=xe.eventKey,Me=xe.className,Be=xe.style,Ge=xe.dragOver,Ye=xe.dragOverGapTop,Ke=xe.dragOverGapBottom,Xe=xe.isLeaf,ot=xe.isStart,lt=xe.isEnd,ct=xe.expanded,Ct=xe.selected,Je=xe.checked,rt=xe.halfChecked,xt=xe.loading,bt=xe.domRef,Pt=xe.active,ht=xe.data,St=xe.onMouseMove,mt=xe.selectable,Nt=(0,Ie.Z)(xe,z),dt=de.useContext(Se.k),Dt=de.useContext(Se.y),gt=de.useRef(null),yt=de.useState(!1),tt=(0,Ue.Z)(yt,2),He=tt[0],we=tt[1],Ne=!!(dt.disabled||xe.disabled||(je=Dt.nodeDisabled)!==null&&je!==void 0&&je.call(Dt,ht)),Ve=de.useMemo(function(){return!dt.checkable||xe.checkable===!1?!1:dt.checkable},[dt.checkable,xe.checkable]),nt=function(Er){Ne||dt.onNodeSelect(Er,(0,fe.F)(xe))},Re=function(Er){Ne||!Ve||xe.disableCheckbox||dt.onNodeCheck(Er,(0,fe.F)(xe),!Je)},_e=de.useMemo(function(){return typeof mt=="boolean"?mt:dt.selectable},[mt,dt.selectable]),Ze=function(Er){dt.onNodeClick(Er,(0,fe.F)(xe)),_e?nt(Er):Re(Er)},qe=function(Er){dt.onNodeDoubleClick(Er,(0,fe.F)(xe))},ut=function(Er){dt.onNodeMouseEnter(Er,(0,fe.F)(xe))},vt=function(Er){dt.onNodeMouseLeave(Er,(0,fe.F)(xe))},At=function(Er){dt.onNodeContextMenu(Er,(0,fe.F)(xe))},Et=de.useMemo(function(){return!!(dt.draggable&&(!dt.draggable.nodeDraggable||dt.draggable.nodeDraggable(ht)))},[dt.draggable,ht]),Ft=function(Er){Er.stopPropagation(),we(!0),dt.onNodeDragStart(Er,xe);try{Er.dataTransfer.setData("text/plain","")}catch(En){}},Kt=function(Er){Er.preventDefault(),Er.stopPropagation(),dt.onNodeDragEnter(Er,xe)},Yt=function(Er){Er.preventDefault(),Er.stopPropagation(),dt.onNodeDragOver(Er,xe)},Vt=function(Er){Er.stopPropagation(),dt.onNodeDragLeave(Er,xe)},Ht=function(Er){Er.stopPropagation(),we(!1),dt.onNodeDragEnd(Er,xe)},sn=function(Er){Er.preventDefault(),Er.stopPropagation(),we(!1),dt.onNodeDrop(Er,xe)},rn=function(Er){xt||dt.onNodeExpand(Er,(0,fe.F)(xe))},un=de.useMemo(function(){var Mr=(0,be.Z)(dt.keyEntities,Te)||{},Er=Mr.children;return!!(Er||[]).length},[dt.keyEntities,Te]),Sn=de.useMemo(function(){return Xe===!1?!1:Xe||!dt.loadData&&!un||dt.loadData&&xe.loaded&&!un},[Xe,dt.loadData,un,xe.loaded]);de.useEffect(function(){xt||typeof dt.loadData=="function"&&ct&&!Sn&&!xe.loaded&&dt.onNodeLoad((0,fe.F)(xe))},[xt,dt.loadData,dt.onNodeLoad,ct,Sn,xe]);var vn=de.useMemo(function(){var Mr;return(Mr=dt.draggable)!==null&&Mr!==void 0&&Mr.icon?de.createElement("span",{className:"".concat(dt.prefixCls,"-draggable-icon")},dt.draggable.icon):null},[dt.draggable]),Cn=function(Er){var En=xe.switcherIcon||dt.switcherIcon;return typeof En=="function"?En((0,oe.Z)((0,oe.Z)({},xe),{},{isLeaf:Er})):En},On=function(){if(Sn){var Er=Cn(!0);return Er!==!1?de.createElement("span",{className:Ee()("".concat(dt.prefixCls,"-switcher"),"".concat(dt.prefixCls,"-switcher-noop"))},Er):null}var En=Cn(!1);return En!==!1?de.createElement("span",{onClick:rn,className:Ee()("".concat(dt.prefixCls,"-switcher"),"".concat(dt.prefixCls,"-switcher_").concat(ct?te:se))},En):null},Dr=de.useMemo(function(){if(!Ve)return null;var Mr=typeof Ve!="boolean"?Ve: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&&rt),"".concat(dt.prefixCls,"-checkbox-disabled"),Ne||xe.disableCheckbox)),onClick:Re,role:"checkbox","aria-checked":rt?"mixed":Je,"aria-disabled":Ne||xe.disableCheckbox,"aria-label":"Select ".concat(typeof xe.title=="string"?xe.title:"tree node")},Mr)},[Ve,Je,rt,Ne,xe.disableCheckbox,xe.title]),Sr=de.useMemo(function(){return Sn?null:ct?te:se},[Sn,ct]),qr=de.useMemo(function(){return de.createElement("span",{className:Ee()("".concat(dt.prefixCls,"-iconEle"),"".concat(dt.prefixCls,"-icon__").concat(Sr||"docu"),(0,Gt.Z)({},"".concat(dt.prefixCls,"-icon_loading"),xt))})},[dt.prefixCls,Sr,xt]),tr=de.useMemo(function(){var Mr=!!dt.draggable,Er=!xe.disabled&&Mr&&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]),ai=de.useMemo(function(){var Mr=xe.title,Er=Mr===void 0?ie:Mr,En="".concat(dt.prefixCls,"-node-content-wrapper"),Tn;if(dt.showIcon){var Dn=xe.icon||dt.icon;Tn=Dn?de.createElement("span",{className:Ee()("".concat(dt.prefixCls,"-iconEle"),"".concat(dt.prefixCls,"-icon__customize"))},typeof Dn=="function"?Dn(xe):Dn):qr}else dt.loadData&&xt&&(Tn=qr);var Pr;return typeof Er=="function"?Pr=Er(ht):dt.titleRender?Pr=dt.titleRender(ht):Pr=Er,de.createElement("span",{ref:gt,title:typeof Er=="string"?Er:"",className:Ee()(En,"".concat(En,"-").concat(Sr||"normal"),(0,Gt.Z)({},"".concat(dt.prefixCls,"-node-selected"),!Ne&&(Ct||He))),onMouseEnter:ut,onMouseLeave:vt,onContextMenu:At,onClick:Ze,onDoubleClick:qe},Tn,de.createElement("span",{className:"".concat(dt.prefixCls,"-title")},Pr),tr)},[dt.prefixCls,dt.showIcon,xe,dt.icon,qr,dt.titleRender,ht,Sr,ut,vt,At,Ze,qe]),gi=(0,ke.Z)(Nt,{aria:!0,data:!0}),fi=(0,be.Z)(dt.keyEntities,Te)||{},Di=fi.level,ki=lt[lt.length-1],Jr=!Ne&&Et,Li=dt.draggingNodeKey===Te,et=mt!==void 0?{"aria-selected":!!mt}:void 0;return de.createElement("div",(0,at.Z)({ref:bt,role:"treeitem","aria-expanded":Xe?void 0:ct,className:Ee()(Me,"".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"),Ne),"".concat(dt.prefixCls,"-treenode-switcher-").concat(ct?"open":"close"),!Xe),"".concat(dt.prefixCls,"-treenode-checkbox-checked"),Je),"".concat(dt.prefixCls,"-treenode-checkbox-indeterminate"),rt),"".concat(dt.prefixCls,"-treenode-selected"),Ct),"".concat(dt.prefixCls,"-treenode-loading"),xt),"".concat(dt.prefixCls,"-treenode-active"),Pt),"".concat(dt.prefixCls,"-treenode-leaf-last"),ki),"".concat(dt.prefixCls,"-treenode-draggable"),Et),"dragging",Li),(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",!Ne&&Ge),"drag-over-gap-top",!Ne&&Ye),"drag-over-gap-bottom",!Ne&&Ke),"filter-node",(De=dt.filterTreeNode)===null||De===void 0?void 0:De.call(dt,(0,fe.F)(xe))),"".concat(dt.prefixCls,"-treenode-leaf"),Sn))),style:Be,draggable:Jr,onDragStart:Jr?Ft:void 0,onDragEnter:Et?Kt:void 0,onDragOver:Et?Yt:void 0,onDragLeave:Et?Vt:void 0,onDrop:Et?sn:void 0,onDragEnd:Et?Ht:void 0,onMouseMove:St},et,gi),de.createElement(me,{prefixCls:dt.prefixCls,level:Di,isStart:ot,isEnd:lt}),vn,On(),Dr,ai)};le.isTreeNode=1;var he=le},30699:function(_n,Mn,ft){"use strict";ft.d(Mn,{k:function(){return Gt},y:function(){return oe}});var at=ft(59301),Gt=at.createContext(null),oe=at.createContext({})},62379:function(_n,Mn,ft){"use strict";ft.d(Mn,{OF:function(){return Te.Z},y6:function(){return se.y},ZP:function(){return Ne}});var at=ft(71409),Gt=ft(28788),oe=ft(89490),Ue=ft(62730),Ie=ft(16552),de=ft(19210),ve=ft(90264),Ee=ft(46654),ke=ft(37205),Se=ft(87075),Ae=ft(92310),me=ft.n(Ae),be=ft(10228),fe=ft(26112),z=ft(48736),te=ft(59301),se=ft(30699),ie=function(nt){var Re=nt.dropPosition,_e=nt.dropLevelOffset,Ze=nt.indent,qe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Re){case-1:qe.top=0,qe.left=-_e*Ze;break;case 1:qe.bottom=0,qe.left=-_e*Ze;break;case 0:qe.bottom=0,qe.left=Ze;break}return te.createElement("div",{style:qe})},le=ie;function he(Ve){if(Ve==null)throw new TypeError("Cannot destructure "+Ve)}var pe=ft(11036),xe=ft(39224),je=ft(34280),De=ft(65283),Fe=ft(77900),Te=ft(639);function Me(Ve,nt){var Re=te.useState(!1),_e=(0,pe.Z)(Re,2),Ze=_e[0],qe=_e[1];(0,je.Z)(function(){if(Ze)return Ve(),function(){nt()}},[Ze]),(0,je.Z)(function(){return qe(!0),function(){qe(!1)}},[])}var Be=Me,Ge=ft(34061),Ye=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ke=te.forwardRef(function(Ve,nt){var Re=Ve.className,_e=Ve.style,Ze=Ve.motion,qe=Ve.motionNodes,ut=Ve.motionType,vt=Ve.onMotionStart,At=Ve.onMotionEnd,Et=Ve.active,Ft=Ve.treeNodeRequiredProps,Kt=(0,xe.Z)(Ve,Ye),Yt=te.useState(!0),Vt=(0,pe.Z)(Yt,2),Ht=Vt[0],sn=Vt[1],rn=te.useContext(se.k),un=rn.prefixCls,Sn=qe&&ut!=="hide";(0,je.Z)(function(){qe&&Sn!==Ht&&sn(Sn)},[qe]);var vn=function(){qe&&vt()},Cn=te.useRef(!1),On=function(){qe&&!Cn.current&&(Cn.current=!0,At())};Be(vn,On);var Dr=function(qr){Sn===qr&&On()};return qe?te.createElement(Fe.default,(0,at.Z)({ref:nt,visible:Ht},Ze,{motionAppear:ut==="show",onVisibleChanged:Dr}),function(Sr,qr){var tr=Sr.className,ai=Sr.style;return te.createElement("div",{ref:qr,className:me()("".concat(un,"-treenode-motion"),tr),style:ai},qe.map(function(gi){var fi=Object.assign({},(he(gi.data),gi.data)),Di=gi.title,ki=gi.key,Jr=gi.isStart,Li=gi.isEnd;delete fi.children;var et=(0,Ge.H8)(ki,Ft);return te.createElement(Te.Z,(0,at.Z)({},fi,et,{title:Di,active:Et,data:gi.data,key:ki,isStart:Jr,isEnd:Li}))}))}):te.createElement(Te.Z,(0,at.Z)({domRef:nt,className:Re,style:_e},Kt,{active:Et}))}),Xe=Ke;function ot(){var Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Re=Ve.length,_e=nt.length;if(Math.abs(Re-_e)!==1)return{add:!1,key:null};function Ze(qe,ut){var vt=new Map;qe.forEach(function(Et){vt.set(Et,!0)});var At=ut.filter(function(Et){return!vt.has(Et)});return At.length===1?At[0]:null}return Re<_e?{add:!0,key:Ze(Ve,nt)}:{add:!1,key:Ze(nt,Ve)}}function lt(Ve,nt,Re){var _e=Ve.findIndex(function(vt){return vt.key===Re}),Ze=Ve[_e+1],qe=nt.findIndex(function(vt){return vt.key===Re});if(Ze){var ut=nt.findIndex(function(vt){return vt.key===Ze.key});return nt.slice(qe+1,ut)}return nt.slice(qe+1)}var ct=["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(){},rt="RC_TREE_MOTION_".concat(Math.random()),xt={key:rt},bt={key:rt,level:0,index:0,pos:"0",node:xt,nodes:[xt]},Pt={parent:null,children:[],pos:bt.pos,data:xt,title:null,key:rt,isStart:[],isEnd:[]};function ht(Ve,nt,Re,_e){return nt===!1||!Re?Ve:Ve.slice(0,Math.ceil(Re/_e)+1)}function St(Ve){var nt=Ve.key,Re=Ve.pos;return(0,Ge.km)(nt,Re)}function mt(Ve){for(var nt=String(Ve.data.key),Re=Ve;Re.parent;)Re=Re.parent,nt="".concat(Re.data.key," > ").concat(nt);return nt}var Nt=te.forwardRef(function(Ve,nt){var Re=Ve.prefixCls,_e=Ve.data,Ze=Ve.selectable,qe=Ve.checkable,ut=Ve.expandedKeys,vt=Ve.selectedKeys,At=Ve.checkedKeys,Et=Ve.loadedKeys,Ft=Ve.loadingKeys,Kt=Ve.halfCheckedKeys,Yt=Ve.keyEntities,Vt=Ve.disabled,Ht=Ve.dragging,sn=Ve.dragOverNodeKey,rn=Ve.dropPosition,un=Ve.motion,Sn=Ve.height,vn=Ve.itemHeight,Cn=Ve.virtual,On=Ve.scrollWidth,Dr=Ve.focusable,Sr=Ve.activeItem,qr=Ve.focused,tr=Ve.tabIndex,ai=Ve.onKeyDown,gi=Ve.onFocus,fi=Ve.onBlur,Di=Ve.onActiveChange,ki=Ve.onListChangeStart,Jr=Ve.onListChangeEnd,Li=(0,xe.Z)(Ve,ct),et=te.useRef(null),Mr=te.useRef(null);te.useImperativeHandle(nt,function(){return{scrollTo:function(Ln){et.current.scrollTo(Ln)},getIndentWidth:function(){return Mr.current.offsetWidth}}});var Er=te.useState(ut),En=(0,pe.Z)(Er,2),Tn=En[0],Dn=En[1],Pr=te.useState(_e),Br=(0,pe.Z)(Pr,2),Ar=Br[0],Qt=Br[1],Zt=te.useState(_e),Ut=(0,pe.Z)(Zt,2),Un=Ut[0],pr=Ut[1],mr=te.useState([]),xn=(0,pe.Z)(mr,2),Yn=xn[0],Hn=xn[1],Qr=te.useState(null),$r=(0,pe.Z)(Qr,2),Mt=$r[0],Wt=$r[1],Fn=te.useRef(_e);Fn.current=_e;function zn(){var jn=Fn.current;Qt(jn),pr(jn),Hn([]),Wt(null),Jr()}(0,je.Z)(function(){Dn(ut);var jn=ot(Tn,ut);if(jn.key!==null)if(jn.add){var Ln=Ar.findIndex(function(Cr){var Tr=Cr.key;return Tr===jn.key}),An=ht(lt(Ar,_e,jn.key),Cn,Sn,vn),Kn=Ar.slice();Kn.splice(Ln+1,0,Pt),pr(Kn),Hn(An),Wt("show")}else{var Jn=_e.findIndex(function(Cr){var Tr=Cr.key;return Tr===jn.key}),er=ht(lt(_e,Ar,jn.key),Cn,Sn,vn),Wr=_e.slice();Wr.splice(Jn+1,0,Pt),pr(Wr),Hn(er),Wt("hide")}else Ar!==_e&&(Qt(_e),pr(_e))},[ut,_e]),te.useEffect(function(){Ht||zn()},[Ht]);var tn=un?Un:_e,Nn={expandedKeys:ut,selectedKeys:vt,loadedKeys:Et,loadingKeys:Ft,checkedKeys:At,halfCheckedKeys:Kt,dragOverNodeKey:sn,dropPosition:rn,keyEntities:Yt};return te.createElement(te.Fragment,null,qr&&Sr&&te.createElement("span",{style:Ct,"aria-live":"assertive"},mt(Sr)),te.createElement("div",null,te.createElement("input",{style:Ct,disabled:Dr===!1||Vt,tabIndex:Dr!==!1?tr:null,onKeyDown:ai,onFocus:gi,onBlur:fi,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:Mr,className:"".concat(Re,"-indent-unit")}))),te.createElement(De.Z,(0,at.Z)({},Li,{data:tn,itemKey:St,height:Sn,fullHeight:!1,virtual:Cn,itemHeight:vn,scrollWidth:On,prefixCls:"".concat(Re,"-list"),ref:et,role:"tree",onVisibleChange:function(Ln){Ln.every(function(An){return St(An)!==rt})&&zn()}}),function(jn){var Ln=jn.pos,An=Object.assign({},(he(jn.data),jn.data)),Kn=jn.title,Jn=jn.key,er=jn.isStart,Wr=jn.isEnd,Cr=(0,Ge.km)(Jn,Ln);delete An.key,delete An.children;var Tr=(0,Ge.H8)(Cr,Nn);return te.createElement(Xe,(0,at.Z)({},An,Tr,{title:Kn,active:!!Sr&&Jn===Sr.key,pos:Ln,data:jn.data,isStart:er,isEnd:Wr,motion:un,motionNodes:Jn===rt?Yn:null,motionType:Mt,onMotionStart:ki,onMotionEnd:zn,treeNodeRequiredProps:Nn,onMouseMove:function(){Di(null)}}))}))}),dt=Nt,Dt=ft(82661),gt=ft(34643),yt=ft(65065),tt=10,He=function(Ve){(0,Ee.Z)(Re,Ve);var nt=(0,ke.Z)(Re);function Re(){var _e;(0,Ie.Z)(this,Re);for(var Ze=arguments.length,qe=new Array(Ze),ut=0;ut<Ze;ut++)qe[ut]=arguments[ut];return _e=nt.call.apply(nt,[this].concat(qe)),(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(vt,At){var Et=_e.state,Ft=Et.expandedKeys,Kt=Et.keyEntities,Yt=_e.props.onDragStart,Vt=At.eventKey;_e.dragNodeProps=At,_e.dragStartMousePosition={x:vt.clientX,y:vt.clientY};var Ht=(0,Dt._5)(Ft,Vt);_e.setState({draggingNodeKey:Vt,dragChildrenKeys:(0,Dt.wA)(Vt,Kt),indent:_e.listRef.current.getIndentWidth()}),_e.setExpandedKeys(Ht),window.addEventListener("dragend",_e.onWindowDragEnd),Yt==null||Yt({event:vt,node:(0,Ge.F)(At)})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDragEnter",function(vt,At){var Et=_e.state,Ft=Et.expandedKeys,Kt=Et.keyEntities,Yt=Et.dragChildrenKeys,Vt=Et.flattenNodes,Ht=Et.indent,sn=_e.props,rn=sn.onDragEnter,un=sn.onExpand,Sn=sn.allowDrop,vn=sn.direction,Cn=At.pos,On=At.eventKey;if(_e.currentMouseOverDroppableNodeKey!==On&&(_e.currentMouseOverDroppableNodeKey=On),!_e.dragNodeProps){_e.resetDragState();return}var Dr=(0,Dt.OM)(vt,_e.dragNodeProps,At,Ht,_e.dragStartMousePosition,Sn,Vt,Kt,Ft,vn),Sr=Dr.dropPosition,qr=Dr.dropLevelOffset,tr=Dr.dropTargetKey,ai=Dr.dropContainerKey,gi=Dr.dropTargetPos,fi=Dr.dropAllowed,Di=Dr.dragOverNodeKey;if(Yt.includes(tr)||!fi){_e.resetDragState();return}if(_e.delayedDragEnterLogic||(_e.delayedDragEnterLogic={}),Object.keys(_e.delayedDragEnterLogic).forEach(function(ki){clearTimeout(_e.delayedDragEnterLogic[ki])}),_e.dragNodeProps.eventKey!==At.eventKey&&(vt.persist(),_e.delayedDragEnterLogic[Cn]=window.setTimeout(function(){if(_e.state.draggingNodeKey!==null){var ki=(0,Ue.Z)(Ft),Jr=(0,yt.Z)(Kt,At.eventKey);Jr&&(Jr.children||[]).length&&(ki=(0,Dt.L0)(Ft,At.eventKey)),_e.props.hasOwnProperty("expandedKeys")||_e.setExpandedKeys(ki),un==null||un(ki,{node:(0,Ge.F)(At),expanded:!0,nativeEvent:vt.nativeEvent})}},800)),_e.dragNodeProps.eventKey===tr&&qr===0){_e.resetDragState();return}_e.setState({dragOverNodeKey:Di,dropPosition:Sr,dropLevelOffset:qr,dropTargetKey:tr,dropContainerKey:ai,dropTargetPos:gi,dropAllowed:fi}),rn==null||rn({event:vt,node:(0,Ge.F)(At),expandedKeys:Ft})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDragOver",function(vt,At){var Et=_e.state,Ft=Et.dragChildrenKeys,Kt=Et.flattenNodes,Yt=Et.keyEntities,Vt=Et.expandedKeys,Ht=Et.indent,sn=_e.props,rn=sn.onDragOver,un=sn.allowDrop,Sn=sn.direction;if(_e.dragNodeProps){var vn=(0,Dt.OM)(vt,_e.dragNodeProps,At,Ht,_e.dragStartMousePosition,un,Kt,Yt,Vt,Sn),Cn=vn.dropPosition,On=vn.dropLevelOffset,Dr=vn.dropTargetKey,Sr=vn.dropContainerKey,qr=vn.dropTargetPos,tr=vn.dropAllowed,ai=vn.dragOverNodeKey;Ft.includes(Dr)||!tr||(_e.dragNodeProps.eventKey===Dr&&On===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():Cn===_e.state.dropPosition&&On===_e.state.dropLevelOffset&&Dr===_e.state.dropTargetKey&&Sr===_e.state.dropContainerKey&&qr===_e.state.dropTargetPos&&tr===_e.state.dropAllowed&&ai===_e.state.dragOverNodeKey||_e.setState({dropPosition:Cn,dropLevelOffset:On,dropTargetKey:Dr,dropContainerKey:Sr,dropTargetPos:qr,dropAllowed:tr,dragOverNodeKey:ai}),rn==null||rn({event:vt,node:(0,Ge.F)(At)}))}}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDragLeave",function(vt,At){_e.currentMouseOverDroppableNodeKey===At.eventKey&&!vt.currentTarget.contains(vt.relatedTarget)&&(_e.resetDragState(),_e.currentMouseOverDroppableNodeKey=null);var Et=_e.props.onDragLeave;Et==null||Et({event:vt,node:(0,Ge.F)(At)})}),(0,Se.Z)((0,ve.Z)(_e),"onWindowDragEnd",function(vt){_e.onNodeDragEnd(vt,null,!0),window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDragEnd",function(vt,At){var Et=_e.props.onDragEnd;_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),Et==null||Et({event:vt,node:(0,Ge.F)(At)}),_e.dragNodeProps=null,window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDrop",function(vt,At){var Et,Ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Kt=_e.state,Yt=Kt.dragChildrenKeys,Vt=Kt.dropPosition,Ht=Kt.dropTargetKey,sn=Kt.dropTargetPos,rn=Kt.dropAllowed;if(rn){var un=_e.props.onDrop;if(_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),Ht!==null){var Sn=(0,oe.Z)((0,oe.Z)({},(0,Ge.H8)(Ht,_e.getTreeNodeRequiredProps())),{},{active:((Et=_e.getActiveItem())===null||Et===void 0?void 0:Et.key)===Ht,data:(0,yt.Z)(_e.state.keyEntities,Ht).node}),vn=Yt.includes(Ht);(0,z.ZP)(!vn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Cn=(0,Dt.yx)(sn),On={event:vt,node:(0,Ge.F)(Sn),dragNode:_e.dragNodeProps?(0,Ge.F)(_e.dragNodeProps):null,dragNodesKeys:[_e.dragNodeProps.eventKey].concat(Yt),dropToGap:Vt!==0,dropPosition:Vt+Number(Cn[Cn.length-1])};Ft||un==null||un(On),_e.dragNodeProps=null}}}),(0,Se.Z)((0,ve.Z)(_e),"cleanDragState",function(){var vt=_e.state.draggingNodeKey;vt!==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(vt,At){var Et=_e.state,Ft=Et.expandedKeys,Kt=Et.flattenNodes,Yt=At.expanded,Vt=At.key,Ht=At.isLeaf;if(!(Ht||vt.shiftKey||vt.metaKey||vt.ctrlKey)){var sn=Kt.filter(function(un){return un.key===Vt})[0],rn=(0,Ge.F)((0,oe.Z)((0,oe.Z)({},(0,Ge.H8)(Vt,_e.getTreeNodeRequiredProps())),{},{data:sn.data}));_e.setExpandedKeys(Yt?(0,Dt._5)(Ft,Vt):(0,Dt.L0)(Ft,Vt)),_e.onNodeExpand(vt,rn)}}),(0,Se.Z)((0,ve.Z)(_e),"onNodeClick",function(vt,At){var Et=_e.props,Ft=Et.onClick,Kt=Et.expandAction;Kt==="click"&&_e.triggerExpandActionExpand(vt,At),Ft==null||Ft(vt,At)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeDoubleClick",function(vt,At){var Et=_e.props,Ft=Et.onDoubleClick,Kt=Et.expandAction;Kt==="doubleClick"&&_e.triggerExpandActionExpand(vt,At),Ft==null||Ft(vt,At)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeSelect",function(vt,At){var Et=_e.state.selectedKeys,Ft=_e.state,Kt=Ft.keyEntities,Yt=Ft.fieldNames,Vt=_e.props,Ht=Vt.onSelect,sn=Vt.multiple,rn=At.selected,un=At[Yt.key],Sn=!rn;Sn?sn?Et=(0,Dt.L0)(Et,un):Et=[un]:Et=(0,Dt._5)(Et,un);var vn=Et.map(function(Cn){var On=(0,yt.Z)(Kt,Cn);return On?On.node:null}).filter(Boolean);_e.setUncontrolledState({selectedKeys:Et}),Ht==null||Ht(Et,{event:"select",selected:Sn,node:At,selectedNodes:vn,nativeEvent:vt.nativeEvent})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeCheck",function(vt,At,Et){var Ft=_e.state,Kt=Ft.keyEntities,Yt=Ft.checkedKeys,Vt=Ft.halfCheckedKeys,Ht=_e.props,sn=Ht.checkStrictly,rn=Ht.onCheck,un=At.key,Sn,vn={event:"check",node:At,checked:Et,nativeEvent:vt.nativeEvent};if(sn){var Cn=Et?(0,Dt.L0)(Yt,un):(0,Dt._5)(Yt,un),On=(0,Dt._5)(Vt,un);Sn={checked:Cn,halfChecked:On},vn.checkedNodes=Cn.map(function(gi){return(0,yt.Z)(Kt,gi)}).filter(Boolean).map(function(gi){return gi.node}),_e.setUncontrolledState({checkedKeys:Cn})}else{var Dr=(0,gt.S)([].concat((0,Ue.Z)(Yt),[un]),!0,Kt),Sr=Dr.checkedKeys,qr=Dr.halfCheckedKeys;if(!Et){var tr=new Set(Sr);tr.delete(un);var ai=(0,gt.S)(Array.from(tr),{checked:!1,halfCheckedKeys:qr},Kt);Sr=ai.checkedKeys,qr=ai.halfCheckedKeys}Sn=Sr,vn.checkedNodes=[],vn.checkedNodesPositions=[],vn.halfCheckedKeys=qr,Sr.forEach(function(gi){var fi=(0,yt.Z)(Kt,gi);if(fi){var Di=fi.node,ki=fi.pos;vn.checkedNodes.push(Di),vn.checkedNodesPositions.push({node:Di,pos:ki})}}),_e.setUncontrolledState({checkedKeys:Sr},!1,{halfCheckedKeys:qr})}rn==null||rn(Sn,vn)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeLoad",function(vt){var At,Et=vt.key,Ft=_e.state.keyEntities,Kt=(0,yt.Z)(Ft,Et);if(!(Kt!=null&&(At=Kt.children)!==null&&At!==void 0&&At.length)){var Yt=new Promise(function(Vt,Ht){_e.setState(function(sn){var rn=sn.loadedKeys,un=rn===void 0?[]:rn,Sn=sn.loadingKeys,vn=Sn===void 0?[]:Sn,Cn=_e.props,On=Cn.loadData,Dr=Cn.onLoad;if(!On||un.includes(Et)||vn.includes(Et))return null;var Sr=On(vt);return Sr.then(function(){var qr=_e.state.loadedKeys,tr=(0,Dt.L0)(qr,Et);Dr==null||Dr(tr,{event:"load",node:vt}),_e.setUncontrolledState({loadedKeys:tr}),_e.setState(function(ai){return{loadingKeys:(0,Dt._5)(ai.loadingKeys,Et)}}),Vt()}).catch(function(qr){if(_e.setState(function(ai){return{loadingKeys:(0,Dt._5)(ai.loadingKeys,Et)}}),_e.loadingRetryTimes[Et]=(_e.loadingRetryTimes[Et]||0)+1,_e.loadingRetryTimes[Et]>=tt){var tr=_e.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),_e.setUncontrolledState({loadedKeys:(0,Dt.L0)(tr,Et)}),Vt()}Ht(qr)}),{loadingKeys:(0,Dt.L0)(vn,Et)}})});return Yt.catch(function(){}),Yt}}),(0,Se.Z)((0,ve.Z)(_e),"onNodeMouseEnter",function(vt,At){var Et=_e.props.onMouseEnter;Et==null||Et({event:vt,node:At})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeMouseLeave",function(vt,At){var Et=_e.props.onMouseLeave;Et==null||Et({event:vt,node:At})}),(0,Se.Z)((0,ve.Z)(_e),"onNodeContextMenu",function(vt,At){var Et=_e.props.onRightClick;Et&&(vt.preventDefault(),Et({event:vt,node:At}))}),(0,Se.Z)((0,ve.Z)(_e),"onFocus",function(){var vt=_e.props.onFocus;_e.setState({focused:!0});for(var At=arguments.length,Et=new Array(At),Ft=0;Ft<At;Ft++)Et[Ft]=arguments[Ft];vt==null||vt.apply(void 0,Et)}),(0,Se.Z)((0,ve.Z)(_e),"onBlur",function(){var vt=_e.props.onBlur;_e.setState({focused:!1}),_e.onActiveChange(null);for(var At=arguments.length,Et=new Array(At),Ft=0;Ft<At;Ft++)Et[Ft]=arguments[Ft];vt==null||vt.apply(void 0,Et)}),(0,Se.Z)((0,ve.Z)(_e),"getTreeNodeRequiredProps",function(){var vt=_e.state,At=vt.expandedKeys,Et=vt.selectedKeys,Ft=vt.loadedKeys,Kt=vt.loadingKeys,Yt=vt.checkedKeys,Vt=vt.halfCheckedKeys,Ht=vt.dragOverNodeKey,sn=vt.dropPosition,rn=vt.keyEntities;return{expandedKeys:At||[],selectedKeys:Et||[],loadedKeys:Ft||[],loadingKeys:Kt||[],checkedKeys:Yt||[],halfCheckedKeys:Vt||[],dragOverNodeKey:Ht,dropPosition:sn,keyEntities:rn}}),(0,Se.Z)((0,ve.Z)(_e),"setExpandedKeys",function(vt){var At=_e.state,Et=At.treeData,Ft=At.fieldNames,Kt=(0,Ge.oH)(Et,vt,Ft);_e.setUncontrolledState({expandedKeys:vt,flattenNodes:Kt},!0)}),(0,Se.Z)((0,ve.Z)(_e),"onNodeExpand",function(vt,At){var Et=_e.state.expandedKeys,Ft=_e.state,Kt=Ft.listChanging,Yt=Ft.fieldNames,Vt=_e.props,Ht=Vt.onExpand,sn=Vt.loadData,rn=At.expanded,un=At[Yt.key];if(!Kt){var Sn=Et.includes(un),vn=!rn;if((0,z.ZP)(rn&&Sn||!rn&&!Sn,"Expand state not sync with index check"),Et=vn?(0,Dt.L0)(Et,un):(0,Dt._5)(Et,un),_e.setExpandedKeys(Et),Ht==null||Ht(Et,{node:At,expanded:vn,nativeEvent:vt.nativeEvent}),vn&&sn){var Cn=_e.onNodeLoad(At);Cn&&Cn.then(function(){var On=(0,Ge.oH)(_e.state.treeData,Et,Yt);_e.setUncontrolledState({flattenNodes:On})}).catch(function(){var On=_e.state.expandedKeys,Dr=(0,Dt._5)(On,un);_e.setExpandedKeys(Dr)})}}}),(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(vt){var At=_e.state.activeKey,Et=_e.props,Ft=Et.onActiveChange,Kt=Et.itemScrollOffset,Yt=Kt===void 0?0:Kt;At!==vt&&(_e.setState({activeKey:vt}),vt!==null&&_e.scrollTo({key:vt,offset:Yt}),Ft==null||Ft(vt))}),(0,Se.Z)((0,ve.Z)(_e),"getActiveItem",function(){var vt=_e.state,At=vt.activeKey,Et=vt.flattenNodes;return At===null?null:Et.find(function(Ft){var Kt=Ft.key;return Kt===At})||null}),(0,Se.Z)((0,ve.Z)(_e),"offsetActiveKey",function(vt){var At=_e.state,Et=At.flattenNodes,Ft=At.activeKey,Kt=Et.findIndex(function(Ht){var sn=Ht.key;return sn===Ft});Kt===-1&&vt<0&&(Kt=Et.length),Kt=(Kt+vt+Et.length)%Et.length;var Yt=Et[Kt];if(Yt){var Vt=Yt.key;_e.onActiveChange(Vt)}else _e.onActiveChange(null)}),(0,Se.Z)((0,ve.Z)(_e),"onKeyDown",function(vt){var At=_e.state,Et=At.activeKey,Ft=At.expandedKeys,Kt=At.checkedKeys,Yt=At.fieldNames,Vt=_e.props,Ht=Vt.onKeyDown,sn=Vt.checkable,rn=Vt.selectable;switch(vt.which){case be.Z.UP:{_e.offsetActiveKey(-1),vt.preventDefault();break}case be.Z.DOWN:{_e.offsetActiveKey(1),vt.preventDefault();break}}var un=_e.getActiveItem();if(un&&un.data){var Sn=_e.getTreeNodeRequiredProps(),vn=un.data.isLeaf===!1||!!(un.data[Yt.children]||[]).length,Cn=(0,Ge.F)((0,oe.Z)((0,oe.Z)({},(0,Ge.H8)(Et,Sn)),{},{data:un.data,active:!0}));switch(vt.which){case be.Z.LEFT:{vn&&Ft.includes(Et)?_e.onNodeExpand({},Cn):un.parent&&_e.onActiveChange(un.parent.key),vt.preventDefault();break}case be.Z.RIGHT:{vn&&!Ft.includes(Et)?_e.onNodeExpand({},Cn):un.children&&un.children.length&&_e.onActiveChange(un.children[0].key),vt.preventDefault();break}case be.Z.ENTER:case be.Z.SPACE:{sn&&!Cn.disabled&&Cn.checkable!==!1&&!Cn.disableCheckbox?_e.onNodeCheck({},Cn,!Kt.includes(Et)):!sn&&rn&&!Cn.disabled&&Cn.selectable!==!1&&_e.onNodeSelect({},Cn);break}}}Ht==null||Ht(vt)}),(0,Se.Z)((0,ve.Z)(_e),"setUncontrolledState",function(vt){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!_e.destroyed){var Ft=!1,Kt=!0,Yt={};Object.keys(vt).forEach(function(Vt){if(_e.props.hasOwnProperty(Vt)){Kt=!1;return}Ft=!0,Yt[Vt]=vt[Vt]}),Ft&&(!At||Kt)&&_e.setState((0,oe.Z)((0,oe.Z)({},Yt),Et))}}),(0,Se.Z)((0,ve.Z)(_e),"scrollTo",function(vt){_e.listRef.current.scrollTo(vt)}),_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 Ze=this.props,qe=Ze.activeKey,ut=Ze.itemScrollOffset,vt=ut===void 0?0:ut;qe!==void 0&&qe!==this.state.activeKey&&(this.setState({activeKey:qe}),qe!==null&&this.scrollTo({key:qe,offset:vt}))}},{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 Ze=this.state,qe=Ze.focused,ut=Ze.flattenNodes,vt=Ze.keyEntities,At=Ze.draggingNodeKey,Et=Ze.activeKey,Ft=Ze.dropLevelOffset,Kt=Ze.dropContainerKey,Yt=Ze.dropTargetKey,Vt=Ze.dropPosition,Ht=Ze.dragOverNodeKey,sn=Ze.indent,rn=this.props,un=rn.prefixCls,Sn=rn.className,vn=rn.style,Cn=rn.showLine,On=rn.focusable,Dr=rn.tabIndex,Sr=Dr===void 0?0:Dr,qr=rn.selectable,tr=rn.showIcon,ai=rn.icon,gi=rn.switcherIcon,fi=rn.draggable,Di=rn.checkable,ki=rn.checkStrictly,Jr=rn.disabled,Li=rn.motion,et=rn.loadData,Mr=rn.filterTreeNode,Er=rn.height,En=rn.itemHeight,Tn=rn.scrollWidth,Dn=rn.virtual,Pr=rn.titleRender,Br=rn.dropIndicatorRender,Ar=rn.onContextMenu,Qt=rn.onScroll,Zt=rn.direction,Ut=rn.rootClassName,Un=rn.rootStyle,pr=(0,fe.Z)(this.props,{aria:!0,data:!0}),mr;fi&&((0,Gt.Z)(fi)==="object"?mr=fi:typeof fi=="function"?mr={nodeDraggable:fi}:mr={});var xn={prefixCls:un,selectable:qr,showIcon:tr,icon:ai,switcherIcon:gi,draggable:mr,draggingNodeKey:At,checkable:Di,checkStrictly:ki,disabled:Jr,keyEntities:vt,dropLevelOffset:Ft,dropContainerKey:Kt,dropTargetKey:Yt,dropPosition:Vt,dragOverNodeKey:Ht,indent:sn,direction:Zt,dropIndicatorRender:Br,loadData:et,filterTreeNode:Mr,titleRender:Pr,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:xn},te.createElement("div",{className:me()(un,Sn,Ut,(0,Se.Z)((0,Se.Z)((0,Se.Z)({},"".concat(un,"-show-line"),Cn),"".concat(un,"-focused"),qe),"".concat(un,"-active-focused"),Et!==null)),style:Un},te.createElement(dt,(0,at.Z)({ref:this.listRef,prefixCls:un,style:vn,data:ut,disabled:Jr,selectable:qr,checkable:!!Di,motion:Li,dragging:At!==null,height:Er,itemHeight:En,virtual:Dn,focusable:On,focused:qe,tabIndex:Sr,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ar,onScroll:Qt,scrollWidth:Tn},this.getTreeNodeRequiredProps(),pr))))}}],[{key:"getDerivedStateFromProps",value:function(Ze,qe){var ut=qe.prevProps,vt={prevProps:Ze};function At(Sr){return!ut&&Ze.hasOwnProperty(Sr)||ut&&ut[Sr]!==Ze[Sr]}var Et,Ft=qe.fieldNames;if(At("fieldNames")&&(Ft=(0,Ge.w$)(Ze.fieldNames),vt.fieldNames=Ft),At("treeData")?Et=Ze.treeData:At("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Et=(0,Ge.zn)(Ze.children)),Et){vt.treeData=Et;var Kt=(0,Ge.I8)(Et,{fieldNames:Ft});vt.keyEntities=(0,oe.Z)((0,Se.Z)({},rt,bt),Kt.keyEntities)}var Yt=vt.keyEntities||qe.keyEntities;if(At("expandedKeys")||ut&&At("autoExpandParent"))vt.expandedKeys=Ze.autoExpandParent||!ut&&Ze.defaultExpandParent?(0,Dt.r7)(Ze.expandedKeys,Yt):Ze.expandedKeys;else if(!ut&&Ze.defaultExpandAll){var Vt=(0,oe.Z)({},Yt);delete Vt[rt];var Ht=[];Object.keys(Vt).forEach(function(Sr){var qr=Vt[Sr];qr.children&&qr.children.length&&Ht.push(qr.key)}),vt.expandedKeys=Ht}else!ut&&Ze.defaultExpandedKeys&&(vt.expandedKeys=Ze.autoExpandParent||Ze.defaultExpandParent?(0,Dt.r7)(Ze.defaultExpandedKeys,Yt):Ze.defaultExpandedKeys);if(vt.expandedKeys||delete vt.expandedKeys,Et||vt.expandedKeys){var sn=(0,Ge.oH)(Et||qe.treeData,vt.expandedKeys||qe.expandedKeys,Ft);vt.flattenNodes=sn}if(Ze.selectable&&(At("selectedKeys")?vt.selectedKeys=(0,Dt.BT)(Ze.selectedKeys,Ze):!ut&&Ze.defaultSelectedKeys&&(vt.selectedKeys=(0,Dt.BT)(Ze.defaultSelectedKeys,Ze))),Ze.checkable){var rn;if(At("checkedKeys")?rn=(0,Dt.E6)(Ze.checkedKeys)||{}:!ut&&Ze.defaultCheckedKeys?rn=(0,Dt.E6)(Ze.defaultCheckedKeys)||{}:Et&&(rn=(0,Dt.E6)(Ze.checkedKeys)||{checkedKeys:qe.checkedKeys,halfCheckedKeys:qe.halfCheckedKeys}),rn){var un=rn,Sn=un.checkedKeys,vn=Sn===void 0?[]:Sn,Cn=un.halfCheckedKeys,On=Cn===void 0?[]:Cn;if(!Ze.checkStrictly){var Dr=(0,gt.S)(vn,!0,Yt);vn=Dr.checkedKeys,On=Dr.halfCheckedKeys}vt.checkedKeys=vn,vt.halfCheckedKeys=On}}return At("loadedKeys")&&(vt.loadedKeys=Ze.loadedKeys),vt}}]),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,Ne=we},82661:function(_n,Mn,ft){"use strict";ft.d(Mn,{BT:function(){return te},E6:function(){return le},L0:function(){return Se},OM:function(){return z},_5:function(){return ke},r7:function(){return he},wA:function(){return me},yx:function(){return Ae}});var at=ft(62730),Gt=ft(28788),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 je=pe.slice(),De=je.indexOf(xe);return De>=0&&je.splice(De,1),je}function Se(pe,xe){var je=(pe||[]).slice();return je.indexOf(xe)===-1&&je.push(xe),je}function Ae(pe){return pe.split("-")}function me(pe,xe){var je=[],De=(0,de.Z)(xe,pe);function Fe(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Te.forEach(function(Me){var Be=Me.key,Ge=Me.children;je.push(Be),Fe(Ge)})}return Fe(De.children),je}function be(pe){if(pe.parent){var xe=Ae(pe.pos);return Number(xe[xe.length-1])===pe.parent.children.length-1}return!1}function fe(pe){var xe=Ae(pe.pos);return Number(xe[xe.length-1])===0}function z(pe,xe,je,De,Fe,Te,Me,Be,Ge,Ye){var Ke,Xe=pe.clientX,ot=pe.clientY,lt=pe.target.getBoundingClientRect(),ct=lt.top,Ct=lt.height,Je=(Ye==="rtl"?-1:1)*(((Fe==null?void 0:Fe.x)||0)-Xe),rt=(Je-12)/De,xt=Ge.filter(function(Ne){var Ve;return(Ve=Be[Ne])===null||Ve===void 0||(Ve=Ve.children)===null||Ve===void 0?void 0:Ve.length}),bt=(0,de.Z)(Be,je.eventKey);if(ot<ct+Ct/2){var Pt=Me.findIndex(function(Ne){return Ne.key===bt.key}),ht=Pt<=0?0:Pt-1,St=Me[ht].key;bt=(0,de.Z)(Be,St)}var mt=bt.key,Nt=bt,dt=bt.key,Dt=0,gt=0;if(!xt.includes(mt))for(var yt=0;yt<rt&&be(bt);yt+=1)bt=bt.parent,gt+=1;var tt=xe.data,He=bt.node,we=!0;return fe(bt)&&bt.level===0&&ot<ct+Ct/2&&Te({dragNode:tt,dropNode:He,dropPosition:-1})&&bt.key===je.eventKey?Dt=-1:(Nt.children||[]).length&&xt.includes(dt)?Te({dragNode:tt,dropNode:He,dropPosition:0})?Dt=0:we=!1:gt===0?rt>-1.5?Te({dragNode:tt,dropNode:He,dropPosition:1})?Dt=1:we=!1:Te({dragNode:tt,dropNode:He,dropPosition:0})?Dt=0:Te({dragNode:tt,dropNode:He,dropPosition:1})?Dt=1:we=!1:Te({dragNode:tt,dropNode:He,dropPosition:1})?Dt=1:we=!1,{dropPosition:Dt,dropLevelOffset:gt,dropTargetKey:bt.key,dropTargetPos:bt.pos,dragOverNodeKey:dt,dropContainerKey:Dt===0?null:((Ke=bt.parent)===null||Ke===void 0?void 0:Ke.key)||null,dropAllowed:we}}function te(pe,xe){if(pe){var je=xe.multiple;return je?pe.slice():pe.length?[pe[0]]:pe}}var se=function(xe){return xe};function ie(pe,xe){if(!pe)return[];var je=xe||{},De=je.processProps,Fe=De===void 0?se:De,Te=Array.isArray(pe)?pe:[pe];return Te.map(function(Me){var Be=Me.children,Ge=_objectWithoutProperties(Me,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 he(pe,xe){var je=new Set;function De(Fe){if(!je.has(Fe)){var Te=(0,de.Z)(xe,Fe);if(Te){je.add(Fe);var Me=Te.parent,Be=Te.node;Be.disabled||Me&&De(Me.key)}}}return(pe||[]).forEach(function(Fe){De(Fe)}),(0,at.Z)(je)}},34643:function(_n,Mn,ft){"use strict";ft.d(Mn,{S:function(){return ve}});var at=ft(48736),Gt=ft(65065);function oe(Ee,ke){var Se=new Set;return Ee.forEach(function(Ae){ke.has(Ae)||Se.add(Ae)}),Se}function Ue(Ee){var ke=Ee||{},Se=ke.disabled,Ae=ke.disableCheckbox,me=ke.checkable;return!!(Se||Ae)||me===!1}function Ie(Ee,ke,Se,Ae){for(var me=new Set(Ee),be=new Set,fe=0;fe<=Se;fe+=1){var z=ke.get(fe)||new Set;z.forEach(function(le){var he=le.key,pe=le.node,xe=le.children,je=xe===void 0?[]:xe;me.has(he)&&!Ae(pe)&&je.filter(function(De){return!Ae(De.node)}).forEach(function(De){me.add(De.key)})})}for(var te=new Set,se=Se;se>=0;se-=1){var ie=ke.get(se)||new Set;ie.forEach(function(le){var he=le.parent,pe=le.node;if(!(Ae(pe)||!le.parent||te.has(le.parent.key))){if(Ae(le.parent.node)){te.add(he.key);return}var xe=!0,je=!1;(he.children||[]).filter(function(De){return!Ae(De.node)}).forEach(function(De){var Fe=De.key,Te=me.has(Fe);xe&&!Te&&(xe=!1),!je&&(Te||be.has(Fe))&&(je=!0)}),xe&&me.add(he.key),je&&be.add(he.key),te.add(he.key)}})}return{checkedKeys:Array.from(me),halfCheckedKeys:Array.from(oe(be,me))}}function de(Ee,ke,Se,Ae,me){for(var be=new Set(Ee),fe=new Set(ke),z=0;z<=Ae;z+=1){var te=Se.get(z)||new Set;te.forEach(function(he){var pe=he.key,xe=he.node,je=he.children,De=je===void 0?[]:je;!be.has(pe)&&!fe.has(pe)&&!me(xe)&&De.filter(function(Fe){return!me(Fe.node)}).forEach(function(Fe){be.delete(Fe.key)})})}fe=new Set;for(var se=new Set,ie=Ae;ie>=0;ie-=1){var le=Se.get(ie)||new Set;le.forEach(function(he){var pe=he.parent,xe=he.node;if(!(me(xe)||!he.parent||se.has(he.parent.key))){if(me(he.parent.node)){se.add(pe.key);return}var je=!0,De=!1;(pe.children||[]).filter(function(Fe){return!me(Fe.node)}).forEach(function(Fe){var Te=Fe.key,Me=be.has(Te);je&&!Me&&(je=!1),!De&&(Me||fe.has(Te))&&(De=!0)}),je||be.delete(pe.key),De&&fe.add(pe.key),se.add(pe.key)}})}return{checkedKeys:Array.from(be),halfCheckedKeys:Array.from(oe(fe,be))}}function ve(Ee,ke,Se,Ae){var me=[],be;Ae?be=Ae:be=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],he=le.level,pe=z.get(he);pe||(pe=new Set,z.set(he,pe)),pe.add(le),te=Math.max(te,he)}),(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,be):se=de(fe,ke.halfCheckedKeys,z,te,be),se}},65065:function(_n,Mn,ft){"use strict";ft.d(Mn,{Z:function(){return at}});function at(Gt,oe){return Gt[oe]}},34061:function(_n,Mn,ft){"use strict";ft.d(Mn,{F:function(){return he},H8:function(){return le},I8:function(){return ie},km:function(){return me},oH:function(){return te},w$:function(){return be},zn:function(){return z}});var at=ft(28788),Gt=ft(62730),oe=ft(89490),Ue=ft(39224),Ie=ft(11592),de=ft(2738),ve=ft(48736),Ee=ft(65065),ke=["children"];function Se(pe,xe){return"".concat(pe,"-").concat(xe)}function Ae(pe){return pe&&pe.type&&pe.type.isTreeNode}function me(pe,xe){return pe!=null?pe:xe}function be(pe){var xe=pe||{},je=xe.title,De=xe._title,Fe=xe.key,Te=xe.children,Me=je||"title";return{title:Me,_title:De||[Me],key:Fe||"key",children:Te||"children"}}function fe(pe,xe){var je=new Map;function De(Fe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Fe||[]).forEach(function(Me){var Be=Me[xe.key],Ge=Me[xe.children];warning(Be!=null,"Tree node must have a certain key: [".concat(Te).concat(Be,"]"));var Ye=String(Be);warning(!je.has(Ye)||Be===null||Be===void 0,"Same 'key' exist in the Tree: ".concat(Ye)),je.set(Ye,!0),De(Ge,"".concat(Te).concat(Ye," > "))})}De(pe)}function z(pe){function xe(je){var De=(0,Ie.Z)(je);return De.map(function(Fe){if(!Ae(Fe))return(0,ve.ZP)(!Fe,"Tree/TreeNode can only accept TreeNode as children."),null;var Te=Fe.key,Me=Fe.props,Be=Me.children,Ge=(0,Ue.Z)(Me,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,je){var De=be(je),Fe=De._title,Te=De.key,Me=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 ct=Se(Xe?Xe.pos:"0",lt),Ct=me(ot[Te],ct),Je,rt=0;rt<Fe.length;rt+=1){var xt=Fe[rt];if(ot[xt]!==void 0){Je=ot[xt];break}}var bt=Object.assign((0,de.Z)(ot,[].concat((0,Gt.Z)(Fe),[Te,Me])),{title:Je,key:Ct,parent:Xe,pos:ct,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(bt),xe===!0||Be.has(Ct)?bt.children=Ye(ot[Me]||[],bt):bt.children=[],bt})}return Ye(pe),Ge}function se(pe,xe,je){var De={};(0,at.Z)(je)==="object"?De=je:De={externalGetKey:je},De=De||{};var Fe=De,Te=Fe.childrenPropName,Me=Fe.externalGetKey,Be=Fe.fieldNames,Ge=be(Be),Ye=Ge.key,Ke=Ge.children,Xe=Te||Ke,ot;Me?typeof Me=="string"?ot=function(Ct){return Ct[Me]}:typeof Me=="function"&&(ot=function(Ct){return Me(Ct)}):ot=function(Ct,Je){return me(Ct[Ye],Je)};function lt(ct,Ct,Je,rt){var xt=ct?ct[Xe]:pe,bt=ct?Se(Je.pos,Ct):"0",Pt=ct?[].concat((0,Gt.Z)(rt),[ct]):[];if(ct){var ht=ot(ct,bt),St={node:ct,index:Ct,pos:bt,key:ht,parentPos:Je.node?Je.pos:null,level:Je.level+1,nodes:Pt};xe(St)}xt&&xt.forEach(function(mt,Nt){lt(mt,Nt,{node:ct,pos:bt,level:Je?Je.level+1:-1},Pt)})}lt(null)}function ie(pe){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=xe.initWrapper,De=xe.processEntity,Fe=xe.onProcessFinished,Te=xe.externalGetKey,Me=xe.childrenPropName,Be=xe.fieldNames,Ge=arguments.length>2?arguments[2]:void 0,Ye=Te||Ge,Ke={},Xe={},ot={posEntities:Ke,keyEntities:Xe};return je&&(ot=je(ot)||ot),se(pe,function(lt){var ct=lt.node,Ct=lt.index,Je=lt.pos,rt=lt.key,xt=lt.parentPos,bt=lt.level,Pt=lt.nodes,ht={node:ct,nodes:Pt,index:Ct,key:rt,pos:Je,level:bt},St=me(rt,Je);Ke[Je]=ht,Xe[St]=ht,ht.parent=Ke[xt],ht.parent&&(ht.parent.children=ht.parent.children||[],ht.parent.children.push(ht)),De&&De(ht,ot)},{externalGetKey:Ye,childrenPropName:Me,fieldNames:Be}),Fe&&Fe(ot),ot}function le(pe,xe){var je=xe.expandedKeys,De=xe.selectedKeys,Fe=xe.loadedKeys,Te=xe.loadingKeys,Me=xe.checkedKeys,Be=xe.halfCheckedKeys,Ge=xe.dragOverNodeKey,Ye=xe.dropPosition,Ke=xe.keyEntities,Xe=(0,Ee.Z)(Ke,pe),ot={eventKey:pe,expanded:je.indexOf(pe)!==-1,selected:De.indexOf(pe)!==-1,loaded:Fe.indexOf(pe)!==-1,loading:Te.indexOf(pe)!==-1,checked:Me.indexOf(pe)!==-1,halfChecked:Be.indexOf(pe)!==-1,pos:String(Xe?Xe.pos:""),dragOver:Ge===pe&&Ye===0,dragOverGapTop:Ge===pe&&Ye===-1,dragOverGapBottom:Ge===pe&&Ye===1};return ot}function he(pe){var xe=pe.data,je=pe.expanded,De=pe.selected,Fe=pe.checked,Te=pe.loaded,Me=pe.loading,Be=pe.halfChecked,Ge=pe.dragOver,Ye=pe.dragOverGapTop,Ke=pe.dragOverGapBottom,Xe=pe.pos,ot=pe.active,lt=pe.eventKey,ct=(0,oe.Z)((0,oe.Z)({},xe),{},{expanded:je,selected:De,checked:Fe,loaded:Te,loading:Me,halfChecked:Be,dragOver:Ge,dragOverGapTop:Ye,dragOverGapBottom:Ke,pos:Xe,active:ot,key:lt});return"props"in ct||Object.defineProperty(ct,"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}}),ct}},90472:function(_n,Mn,ft){"use strict";ft.d(Mn,{Z:function(){return lt}});var at=ft(71409),Gt=ft(16552),oe=ft(19210),Ue=ft(90264),Ie=ft(46654),de=ft(37205),ve=ft(87075),Ee=ft(59301),ke=ft(89490),Se=ft(39224),Ae=ft(28788),me=ft(58676),be=ft(93195),fe=ft(62730),z=ft(92310),te=ft.n(z),se=ft(26112),ie=ft(48736),le=function(ct,Ct){if(ct&&Ct){var Je=Array.isArray(Ct)?Ct:Ct.split(","),rt=ct.name||"",xt=ct.type||"",bt=xt.replace(/\/.*$/,"");return Je.some(function(Pt){var ht=Pt.trim();if(/^\*(\/\*)?$/.test(Pt))return!0;if(ht.charAt(0)==="."){var St=rt.toLowerCase(),mt=ht.toLowerCase(),Nt=[mt];return(mt===".jpg"||mt===".jpeg")&&(Nt=[".jpg",".jpeg"]),Nt.some(function(dt){return St.endsWith(dt)})}return/\/\*$/.test(ht)?bt===ht.replace(/\/.*$/,""):xt===ht?!0:/^\w+$/.test(ht)?((0,ie.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(ht,"'.Skip for check.")),!0):!1})}return!0};function he(ct,Ct){var Je="cannot ".concat(ct.method," ").concat(ct.action," ").concat(Ct.status,"'"),rt=new Error(Je);return rt.status=Ct.status,rt.method=ct.method,rt.url=ct.action,rt}function pe(ct){var Ct=ct.responseText||ct.response;if(!Ct)return Ct;try{return JSON.parse(Ct)}catch(Je){return Ct}}function xe(ct){var Ct=new XMLHttpRequest;ct.onProgress&&Ct.upload&&(Ct.upload.onprogress=function(bt){bt.total>0&&(bt.percent=bt.loaded/bt.total*100),ct.onProgress(bt)});var Je=new FormData;ct.data&&Object.keys(ct.data).forEach(function(xt){var bt=ct.data[xt];if(Array.isArray(bt)){bt.forEach(function(Pt){Je.append("".concat(xt,"[]"),Pt)});return}Je.append(xt,bt)}),ct.file instanceof Blob?Je.append(ct.filename,ct.file,ct.file.name):Je.append(ct.filename,ct.file),Ct.onerror=function(bt){ct.onError(bt)},Ct.onload=function(){return Ct.status<200||Ct.status>=300?ct.onError(he(ct,Ct),pe(Ct)):ct.onSuccess(pe(Ct),Ct)},Ct.open(ct.method,ct.action,!0),ct.withCredentials&&"withCredentials"in Ct&&(Ct.withCredentials=!0);var rt=ct.headers||{};return rt["X-Requested-With"]!==null&&Ct.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(rt).forEach(function(xt){rt[xt]!==null&&Ct.setRequestHeader(xt,rt[xt])}),Ct.send(Je),{abort:function(){Ct.abort()}}}var je=function(){var ct=(0,be.Z)((0,me.Z)().mark(function Ct(Je,rt){var xt,bt,Pt,ht,St,mt,Nt,dt;return(0,me.Z)().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:mt=function(){return mt=(0,be.Z)((0,me.Z)().mark(function tt(He){return(0,me.Z)().wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.abrupt("return",new Promise(function(Ve){He.file(function(nt){rt(nt)?(He.fullPath&&!nt.webkitRelativePath&&(Object.defineProperties(nt,{webkitRelativePath:{writable:!0}}),nt.webkitRelativePath=He.fullPath.replace(/^\//,""),Object.defineProperties(nt,{webkitRelativePath:{writable:!1}})),Ve(nt)):Ve(null)})}));case 1:case"end":return Ne.stop()}},tt)})),mt.apply(this,arguments)},St=function(tt){return mt.apply(this,arguments)},ht=function(){return ht=(0,be.Z)((0,me.Z)().mark(function tt(He){var we,Ne,Ve,nt,Re;return(0,me.Z)().wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:we=He.createReader(),Ne=[];case 2:return Ze.next=5,new Promise(function(qe){we.readEntries(qe,function(){return qe([])})});case 5:if(Ve=Ze.sent,nt=Ve.length,nt){Ze.next=9;break}return Ze.abrupt("break",12);case 9:for(Re=0;Re<nt;Re++)Ne.push(Ve[Re]);Ze.next=2;break;case 12:return Ze.abrupt("return",Ne);case 13:case"end":return Ze.stop()}},tt)})),ht.apply(this,arguments)},Pt=function(tt){return ht.apply(this,arguments)},xt=[],bt=[],Je.forEach(function(yt){return bt.push(yt.webkitGetAsEntry())}),Nt=function(){var yt=(0,be.Z)((0,me.Z)().mark(function tt(He,we){var Ne,Ve;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,St(He);case 6:Ne=Re.sent,Ne&&xt.push(Ne),Re.next=15;break;case 10:if(!He.isDirectory){Re.next=15;break}return Re.next=13,Pt(He);case 13:Ve=Re.sent,bt.push.apply(bt,(0,fe.Z)(Ve));case 15:case"end":return Re.stop()}},tt)}));return function(He,we){return yt.apply(this,arguments)}}(),dt=0;case 9:if(!(dt<bt.length)){gt.next=15;break}return gt.next=12,Nt(bt[dt]);case 12:dt++,gt.next=9;break;case 15:return gt.abrupt("return",xt);case 16:case"end":return gt.stop()}},Ct)}));return function(Je,rt){return ct.apply(this,arguments)}}(),De=je,Fe=+new Date,Te=0;function Me(){return"rc-upload-".concat(Fe,"-").concat(++Te)}var Be=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Ge=function(ct){(0,Ie.Z)(Je,ct);var Ct=(0,de.Z)(Je);function Je(){var rt;(0,Gt.Z)(this,Je);for(var xt=arguments.length,bt=new Array(xt),Pt=0;Pt<xt;Pt++)bt[Pt]=arguments[Pt];return rt=Ct.call.apply(Ct,[this].concat(bt)),(0,ve.Z)((0,Ue.Z)(rt),"state",{uid:Me()}),(0,ve.Z)((0,Ue.Z)(rt),"reqs",{}),(0,ve.Z)((0,Ue.Z)(rt),"fileInput",void 0),(0,ve.Z)((0,Ue.Z)(rt),"_isMounted",void 0),(0,ve.Z)((0,Ue.Z)(rt),"onChange",function(ht){var St=rt.props,mt=St.accept,Nt=St.directory,dt=ht.target.files,Dt=(0,fe.Z)(dt).filter(function(gt){return!Nt||le(gt,mt)});rt.uploadFiles(Dt),rt.reset()}),(0,ve.Z)((0,Ue.Z)(rt),"onClick",function(ht){var St=rt.fileInput;if(St){var mt=ht.target,Nt=rt.props.onClick;if(mt&&mt.tagName==="BUTTON"){var dt=St.parentNode;dt.focus(),mt.blur()}St.click(),Nt&&Nt(ht)}}),(0,ve.Z)((0,Ue.Z)(rt),"onKeyDown",function(ht){ht.key==="Enter"&&rt.onClick(ht)}),(0,ve.Z)((0,Ue.Z)(rt),"onFileDrop",function(){var ht=(0,be.Z)((0,me.Z)().mark(function St(mt){var Nt,dt,Dt;return(0,me.Z)().wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:if(Nt=rt.props.multiple,mt.preventDefault(),mt.type!=="dragover"){yt.next=4;break}return yt.abrupt("return");case 4:if(!rt.props.directory){yt.next=11;break}return yt.next=7,De(Array.prototype.slice.call(mt.dataTransfer.items),function(tt){return le(tt,rt.props.accept)});case 7:dt=yt.sent,rt.uploadFiles(dt),yt.next=14;break;case 11:Dt=(0,fe.Z)(mt.dataTransfer.files).filter(function(tt){return le(tt,rt.props.accept)}),Nt===!1&&(Dt=Dt.slice(0,1)),rt.uploadFiles(Dt);case 14:case"end":return yt.stop()}},St)}));return function(St){return ht.apply(this,arguments)}}()),(0,ve.Z)((0,Ue.Z)(rt),"uploadFiles",function(ht){var St=(0,fe.Z)(ht),mt=St.map(function(Nt){return Nt.uid=Me(),rt.processFile(Nt,St)});Promise.all(mt).then(function(Nt){var dt=rt.props.onBatchStart;dt==null||dt(Nt.map(function(Dt){var gt=Dt.origin,yt=Dt.parsedFile;return{file:gt,parsedFile:yt}})),Nt.filter(function(Dt){return Dt.parsedFile!==null}).forEach(function(Dt){rt.post(Dt)})})}),(0,ve.Z)((0,Ue.Z)(rt),"processFile",function(){var ht=(0,be.Z)((0,me.Z)().mark(function St(mt,Nt){var dt,Dt,gt,yt,tt,He,we,Ne,Ve;return(0,me.Z)().wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:if(dt=rt.props.beforeUpload,Dt=mt,!dt){Re.next=14;break}return Re.prev=3,Re.next=6,dt(mt,Nt);case 6:Dt=Re.sent,Re.next=12;break;case 9:Re.prev=9,Re.t0=Re.catch(3),Dt=!1;case 12:if(Dt!==!1){Re.next=14;break}return Re.abrupt("return",{origin:mt,parsedFile:null,action:null,data:null});case 14:if(gt=rt.props.action,typeof gt!="function"){Re.next=21;break}return Re.next=18,gt(mt);case 18:yt=Re.sent,Re.next=22;break;case 21:yt=gt;case 22:if(tt=rt.props.data,typeof tt!="function"){Re.next=29;break}return Re.next=26,tt(mt);case 26:He=Re.sent,Re.next=30;break;case 29:He=tt;case 30:return we=((0,Ae.Z)(Dt)==="object"||typeof Dt=="string")&&Dt?Dt:mt,we instanceof File?Ne=we:Ne=new File([we],mt.name,{type:mt.type}),Ve=Ne,Ve.uid=mt.uid,Re.abrupt("return",{origin:mt,data:He,parsedFile:Ve,action:yt});case 35:case"end":return Re.stop()}},St,null,[[3,9]])}));return function(St,mt){return ht.apply(this,arguments)}}()),(0,ve.Z)((0,Ue.Z)(rt),"saveFileInput",function(ht){rt.fileInput=ht}),rt}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(xt){var bt=this,Pt=xt.data,ht=xt.origin,St=xt.action,mt=xt.parsedFile;if(this._isMounted){var Nt=this.props,dt=Nt.onStart,Dt=Nt.customRequest,gt=Nt.name,yt=Nt.headers,tt=Nt.withCredentials,He=Nt.method,we=ht.uid,Ne=Dt||xe,Ve={action:St,filename:gt,data:Pt,file:mt,headers:yt,withCredentials:tt,method:He||"post",onProgress:function(Re){var _e=bt.props.onProgress;_e==null||_e(Re,mt)},onSuccess:function(Re,_e){var Ze=bt.props.onSuccess;Ze==null||Ze(Re,mt,_e),delete bt.reqs[we]},onError:function(Re,_e){var Ze=bt.props.onError;Ze==null||Ze(Re,_e,mt),delete bt.reqs[we]}};dt(ht),this.reqs[we]=Ne(Ve)}}},{key:"reset",value:function(){this.setState({uid:Me()})}},{key:"abort",value:function(xt){var bt=this.reqs;if(xt){var Pt=xt.uid?xt.uid:xt;bt[Pt]&&bt[Pt].abort&&bt[Pt].abort(),delete bt[Pt]}else Object.keys(bt).forEach(function(ht){bt[ht]&&bt[ht].abort&&bt[ht].abort(),delete bt[ht]})}},{key:"render",value:function(){var xt=this.props,bt=xt.component,Pt=xt.prefixCls,ht=xt.className,St=xt.classNames,mt=St===void 0?{}:St,Nt=xt.disabled,dt=xt.id,Dt=xt.name,gt=xt.style,yt=xt.styles,tt=yt===void 0?{}:yt,He=xt.multiple,we=xt.accept,Ne=xt.capture,Ve=xt.children,nt=xt.directory,Re=xt.openFileDialogOnClick,_e=xt.onMouseEnter,Ze=xt.onMouseLeave,qe=xt.hasControlInside,ut=(0,Se.Z)(xt,Be),vt=te()((0,ve.Z)((0,ve.Z)((0,ve.Z)({},Pt,!0),"".concat(Pt,"-disabled"),Nt),ht,ht)),At=nt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Et=Nt?{}:{onClick:Re?this.onClick:function(){},onKeyDown:Re?this.onKeyDown:function(){},onMouseEnter:_e,onMouseLeave:Ze,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:qe?void 0:"0"};return Ee.createElement(bt,(0,at.Z)({},Et,{className:vt,role:qe?void 0:"button",style:gt}),Ee.createElement("input",(0,at.Z)({},(0,se.Z)(ut,{aria:!0,data:!0}),{id:dt,name:Dt,disabled:Nt,type:"file",ref:this.saveFileInput,onClick:function(Kt){return Kt.stopPropagation()},key:this.state.uid,style:(0,ke.Z)({display:"none"},tt.input),className:mt.input,accept:we},At,{multiple:He,onChange:this.onChange},Ne!=null?{capture:Ne}:{})),Ve)}}]),Je}(Ee.Component),Ye=Ge;function Ke(){}var Xe=function(ct){(0,Ie.Z)(Je,ct);var Ct=(0,de.Z)(Je);function Je(){var rt;(0,Gt.Z)(this,Je);for(var xt=arguments.length,bt=new Array(xt),Pt=0;Pt<xt;Pt++)bt[Pt]=arguments[Pt];return rt=Ct.call.apply(Ct,[this].concat(bt)),(0,ve.Z)((0,Ue.Z)(rt),"uploader",void 0),(0,ve.Z)((0,Ue.Z)(rt),"saveUploader",function(ht){rt.uploader=ht}),rt}return(0,oe.Z)(Je,[{key:"abort",value:function(xt){this.uploader.abort(xt)}},{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(_n,Mn,ft){"use strict";ft.d(Mn,{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(_n,Mn,ft){"use strict";ft.d(Mn,{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)}},65283:function(_n,Mn,ft){"use strict";ft.d(Mn,{Z:function(){return tt}});var at=ft(71409),Gt=ft(28788),oe=ft(89490),Ue=ft(87075),Ie=ft(11036),de=ft(39224),ve=ft(92310),Ee=ft.n(ve),ke=ft(29301),Se=ft(70425),Ae=ft(34280),me=ft(59301),be=ft(4676),fe=me.forwardRef(function(He,we){var Ne=He.height,Ve=He.offsetY,nt=He.offsetX,Re=He.children,_e=He.prefixCls,Ze=He.onInnerResize,qe=He.innerProps,ut=He.rtl,vt=He.extra,At={},Et={display:"flex",flexDirection:"column"};return Ve!==void 0&&(At={height:Ne,position:"relative",overflow:"hidden"},Et=(0,oe.Z)((0,oe.Z)({},Et),{},(0,Ue.Z)((0,Ue.Z)((0,Ue.Z)((0,Ue.Z)((0,Ue.Z)({transform:"translateY(".concat(Ve,"px)")},ut?"marginRight":"marginLeft",-nt),"position","absolute"),"left",0),"right",0),"top",0))),me.createElement("div",{style:At},me.createElement(ke.Z,{onResize:function(Kt){var Yt=Kt.offsetHeight;Yt&&Ze&&Ze()}},me.createElement("div",(0,at.Z)({style:Et,className:Ee()((0,Ue.Z)({},"".concat(_e,"-holder-inner"),_e)),ref:we},qe),Re,vt)))});fe.displayName="Filler";var z=fe;function te(He){var we=He.children,Ne=He.setRef,Ve=me.useCallback(function(nt){Ne(nt)},[]);return me.cloneElement(we,{ref:Ve})}function se(He,we,Ne,Ve,nt,Re,_e,Ze){var qe=Ze.getKey;return He.slice(we,Ne+1).map(function(ut,vt){var At=we+vt,Et=_e(ut,At,{style:{width:Ve},offsetX:nt}),Ft=qe(ut);return me.createElement(te,{key:Ft,setRef:function(Yt){return Re(ut,Yt)}},Et)})}function ie(He,we,Ne,Ve){var nt=Ne-He,Re=we-Ne,_e=Math.min(nt,Re)*2;if(Ve<=_e){var Ze=Math.floor(Ve/2);return Ve%2?Ne+Ze+1:Ne-Ze}return nt>Re?Ne-(Ve-Re):Ne+(Ve-nt)}function le(He,we,Ne){var Ve=He.length,nt=we.length,Re,_e;if(Ve===0&&nt===0)return null;Ve<nt?(Re=He,_e=we):(Re=we,_e=He);var Ze={__EMPTY_ITEM__:!0};function qe(Kt){return Kt!==void 0?Ne(Kt):Ze}for(var ut=null,vt=Math.abs(Ve-nt)!==1,At=0;At<_e.length;At+=1){var Et=qe(Re[At]),Ft=qe(_e[At]);if(Et!==Ft){ut=At,vt=vt||Et!==qe(_e[At+1]);break}}return ut===null?null:{index:ut,multiple:vt}}function he(He,we,Ne){var Ve=me.useState(He),nt=(0,Ie.Z)(Ve,2),Re=nt[0],_e=nt[1],Ze=me.useState(null),qe=(0,Ie.Z)(Ze,2),ut=qe[0],vt=qe[1];return me.useEffect(function(){var At=le(Re||[],He||[],we);(At==null?void 0:At.index)!==void 0&&(Ne==null||Ne(At.index),vt(He[At.index])),_e(He)},[He]),[ut]}var pe=ft(16089),xe=(typeof navigator=="undefined"?"undefined":(0,Gt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),je=xe,De=function(He,we,Ne,Ve){var nt=(0,me.useRef)(!1),Re=(0,me.useRef)(null);function _e(){clearTimeout(Re.current),nt.current=!0,Re.current=setTimeout(function(){nt.current=!1},50)}var Ze=(0,me.useRef)({top:He,bottom:we,left:Ne,right:Ve});return Ze.current.top=He,Ze.current.bottom=we,Ze.current.left=Ne,Ze.current.right=Ve,function(qe,ut){var vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,At=qe?ut<0&&Ze.current.left||ut>0&&Ze.current.right:ut<0&&Ze.current.top||ut>0&&Ze.current.bottom;return vt&&At?(clearTimeout(Re.current),nt.current=!1):(!At||nt.current)&&_e(),!nt.current&&At}};function Fe(He,we,Ne,Ve,nt,Re,_e){var Ze=(0,me.useRef)(0),qe=(0,me.useRef)(null),ut=(0,me.useRef)(null),vt=(0,me.useRef)(!1),At=De(we,Ne,Ve,nt);function Et(sn,rn){if(pe.Z.cancel(qe.current),!At(!1,rn)){var un=sn;if(!un._virtualHandled)un._virtualHandled=!0;else return;Ze.current+=rn,ut.current=rn,je||un.preventDefault(),qe.current=(0,pe.Z)(function(){var Sn=vt.current?10:1;_e(Ze.current*Sn,!1),Ze.current=0})}}function Ft(sn,rn){_e(rn,!0),je||sn.preventDefault()}var Kt=(0,me.useRef)(null),Yt=(0,me.useRef)(null);function Vt(sn){if(He){pe.Z.cancel(Yt.current),Yt.current=(0,pe.Z)(function(){Kt.current=null},2);var rn=sn.deltaX,un=sn.deltaY,Sn=sn.shiftKey,vn=rn,Cn=un;(Kt.current==="sx"||!Kt.current&&Sn&&un&&!rn)&&(vn=un,Cn=0,Kt.current="sx");var On=Math.abs(vn),Dr=Math.abs(Cn);Kt.current===null&&(Kt.current=Re&&On>Dr?"x":"y"),Kt.current==="y"?Et(sn,Cn):Ft(sn,vn)}}function Ht(sn){He&&(vt.current=sn.detail===ut.current)}return[Vt,Ht]}function Te(He,we,Ne,Ve){var nt=me.useMemo(function(){return[new Map,[]]},[He,Ne.id,Ve]),Re=(0,Ie.Z)(nt,2),_e=Re[0],Ze=Re[1],qe=function(vt){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vt,Et=_e.get(vt),Ft=_e.get(At);if(Et===void 0||Ft===void 0)for(var Kt=He.length,Yt=Ze.length;Yt<Kt;Yt+=1){var Vt,Ht=He[Yt],sn=we(Ht);_e.set(sn,Yt);var rn=(Vt=Ne.get(sn))!==null&&Vt!==void 0?Vt:Ve;if(Ze[Yt]=(Ze[Yt-1]||0)+rn,sn===vt&&(Et=Yt),sn===At&&(Ft=Yt),Et!==void 0&&Ft!==void 0)break}return{top:Ze[Et-1]||0,bottom:Ze[Ft]}};return qe}var Me=ft(16552),Be=ft(19210),Ge=function(){function He(){(0,Me.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(Ne,Ve){this.diffRecords.set(Ne,this.maps[Ne]),this.maps[Ne]=Ve,this.id+=1}},{key:"get",value:function(Ne){return this.maps[Ne]}},{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,Ne){var Ve=me.useState(0),nt=(0,Ie.Z)(Ve,2),Re=nt[0],_e=nt[1],Ze=(0,me.useRef)(new Map),qe=(0,me.useRef)(new Ye),ut=(0,me.useRef)(0);function vt(){ut.current+=1}function At(){var Ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;vt();var Kt=function(){var Ht=!1;Ze.current.forEach(function(sn,rn){if(sn&&sn.offsetParent){var un=sn.offsetHeight,Sn=getComputedStyle(sn),vn=Sn.marginTop,Cn=Sn.marginBottom,On=Ke(vn),Dr=Ke(Cn),Sr=un+On+Dr;qe.current.get(rn)!==Sr&&(qe.current.set(rn,Sr),Ht=!0)}}),Ht&&_e(function(sn){return sn+1})};if(Ft)Kt();else{ut.current+=1;var Yt=ut.current;Promise.resolve().then(function(){Yt===ut.current&&Kt()})}}function Et(Ft,Kt){var Yt=He(Ft),Vt=Ze.current.get(Yt);Kt?(Ze.current.set(Yt,Kt),At()):Ze.current.delete(Yt),!Vt!=!Kt&&(Kt?we==null||we(Ft):Ne==null||Ne(Ft))}return(0,me.useEffect)(function(){return vt},[]),[Et,At,qe.current,Re]}var ot=14/15;function lt(He,we,Ne){var Ve=(0,me.useRef)(!1),nt=(0,me.useRef)(0),Re=(0,me.useRef)(0),_e=(0,me.useRef)(null),Ze=(0,me.useRef)(null),qe,ut=function(Ft){if(Ve.current){var Kt=Math.ceil(Ft.touches[0].pageX),Yt=Math.ceil(Ft.touches[0].pageY),Vt=nt.current-Kt,Ht=Re.current-Yt,sn=Math.abs(Vt)>Math.abs(Ht);sn?nt.current=Kt:Re.current=Yt;var rn=Ne(sn,sn?Vt:Ht,!1,Ft);rn&&Ft.preventDefault(),clearInterval(Ze.current),rn&&(Ze.current=setInterval(function(){sn?Vt*=ot:Ht*=ot;var un=Math.floor(sn?Vt:Ht);(!Ne(sn,un,!0)||Math.abs(un)<=.1)&&clearInterval(Ze.current)},16))}},vt=function(){Ve.current=!1,qe()},At=function(Ft){qe(),Ft.touches.length===1&&!Ve.current&&(Ve.current=!0,nt.current=Math.ceil(Ft.touches[0].pageX),Re.current=Math.ceil(Ft.touches[0].pageY),_e.current=Ft.target,_e.current.addEventListener("touchmove",ut,{passive:!1}),_e.current.addEventListener("touchend",vt,{passive:!0}))};qe=function(){_e.current&&(_e.current.removeEventListener("touchmove",ut),_e.current.removeEventListener("touchend",vt))},(0,Ae.Z)(function(){return He&&we.current.addEventListener("touchstart",At,{passive:!0}),function(){var Et;(Et=we.current)===null||Et===void 0||Et.removeEventListener("touchstart",At),qe(),clearInterval(Ze.current)}},[He])}function ct(He){return Math.floor(Math.pow(He,.5))}function Ct(He,we){var Ne="touches"in He?He.touches[0]:He;return Ne[we?"pageX":"pageY"]-window[we?"scrollX":"scrollY"]}function Je(He,we,Ne){me.useEffect(function(){var Ve=we.current;if(He&&Ve){var nt=!1,Re,_e,Ze=function(){pe.Z.cancel(Re)},qe=function Et(){Ze(),Re=(0,pe.Z)(function(){Ne(_e),Et()})},ut=function(Ft){if(!(Ft.target.draggable||Ft.button!==0)){var Kt=Ft;Kt._virtualHandled||(Kt._virtualHandled=!0,nt=!0)}},vt=function(){nt=!1,Ze()},At=function(Ft){if(nt){var Kt=Ct(Ft,!1),Yt=Ve.getBoundingClientRect(),Vt=Yt.top,Ht=Yt.bottom;if(Kt<=Vt){var sn=Vt-Kt;_e=-ct(sn),qe()}else if(Kt>=Ht){var rn=Kt-Ht;_e=ct(rn),qe()}else Ze()}};return Ve.addEventListener("mousedown",ut),Ve.ownerDocument.addEventListener("mouseup",vt),Ve.ownerDocument.addEventListener("mousemove",At),function(){Ve.removeEventListener("mousedown",ut),Ve.ownerDocument.removeEventListener("mouseup",vt),Ve.ownerDocument.removeEventListener("mousemove",At),Ze()}}},[He])}var rt=10;function xt(He,we,Ne,Ve,nt,Re,_e,Ze){var qe=me.useRef(),ut=me.useState(null),vt=(0,Ie.Z)(ut,2),At=vt[0],Et=vt[1];return(0,Ae.Z)(function(){if(At&&At.times<rt){if(!He.current){Et(function(Li){return(0,oe.Z)({},Li)});return}Re();var Ft=At.targetAlign,Kt=At.originAlign,Yt=At.index,Vt=At.offset,Ht=He.current.clientHeight,sn=!1,rn=Ft,un=null;if(Ht){for(var Sn=Ft||Kt,vn=0,Cn=0,On=0,Dr=Math.min(we.length-1,Yt),Sr=0;Sr<=Dr;Sr+=1){var qr=nt(we[Sr]);Cn=vn;var tr=Ne.get(qr);On=Cn+(tr===void 0?Ve:tr),vn=On}for(var ai=Sn==="top"?Vt:Ht-Vt,gi=Dr;gi>=0;gi-=1){var fi=nt(we[gi]),Di=Ne.get(fi);if(Di===void 0){sn=!0;break}if(ai-=Di,ai<=0)break}switch(Sn){case"top":un=Cn-Vt;break;case"bottom":un=On-Ht+Vt;break;default:{var ki=He.current.scrollTop,Jr=ki+Ht;Cn<ki?rn="top":On>Jr&&(rn="bottom")}}un!==null&&_e(un),un!==At.lastTop&&(sn=!0)}sn&&Et((0,oe.Z)((0,oe.Z)({},At),{},{times:At.times+1,targetAlign:rn,lastTop:un}))}},[At,He.current]),function(Ft){if(Ft==null){Ze();return}if(pe.Z.cancel(qe.current),typeof Ft=="number")_e(Ft);else if(Ft&&(0,Gt.Z)(Ft)==="object"){var Kt,Yt=Ft.align;"index"in Ft?Kt=Ft.index:Kt=we.findIndex(function(sn){return nt(sn)===Ft.key});var Vt=Ft.offset,Ht=Vt===void 0?0:Vt;Et({times:0,index:Kt,offset:Ht,originAlign:Yt})}}}var bt=me.forwardRef(function(He,we){var Ne=He.prefixCls,Ve=He.rtl,nt=He.scrollOffset,Re=He.scrollRange,_e=He.onStartMove,Ze=He.onStopMove,qe=He.onScroll,ut=He.horizontal,vt=He.spinSize,At=He.containerSize,Et=He.style,Ft=He.thumbStyle,Kt=He.showScrollBar,Yt=me.useState(!1),Vt=(0,Ie.Z)(Yt,2),Ht=Vt[0],sn=Vt[1],rn=me.useState(null),un=(0,Ie.Z)(rn,2),Sn=un[0],vn=un[1],Cn=me.useState(null),On=(0,Ie.Z)(Cn,2),Dr=On[0],Sr=On[1],qr=!Ve,tr=me.useRef(),ai=me.useRef(),gi=me.useState(Kt),fi=(0,Ie.Z)(gi,2),Di=fi[0],ki=fi[1],Jr=me.useRef(),Li=function(){Kt===!0||Kt===!1||(clearTimeout(Jr.current),ki(!0),Jr.current=setTimeout(function(){ki(!1)},3e3))},et=Re-At||0,Mr=At-vt||0,Er=me.useMemo(function(){if(nt===0||et===0)return 0;var Ut=nt/et;return Ut*Mr},[nt,et,Mr]),En=function(Un){Un.stopPropagation(),Un.preventDefault()},Tn=me.useRef({top:Er,dragging:Ht,pageY:Sn,startTop:Dr});Tn.current={top:Er,dragging:Ht,pageY:Sn,startTop:Dr};var Dn=function(Un){sn(!0),vn(Ct(Un,ut)),Sr(Tn.current.top),_e(),Un.stopPropagation(),Un.preventDefault()};me.useEffect(function(){var Ut=function(xn){xn.preventDefault()},Un=tr.current,pr=ai.current;return Un.addEventListener("touchstart",Ut,{passive:!1}),pr.addEventListener("touchstart",Dn,{passive:!1}),function(){Un.removeEventListener("touchstart",Ut),pr.removeEventListener("touchstart",Dn)}},[]);var Pr=me.useRef();Pr.current=et;var Br=me.useRef();Br.current=Mr,me.useEffect(function(){if(Ht){var Ut,Un=function(xn){var Yn=Tn.current,Hn=Yn.dragging,Qr=Yn.pageY,$r=Yn.startTop;pe.Z.cancel(Ut);var Mt=tr.current.getBoundingClientRect(),Wt=At/(ut?Mt.width:Mt.height);if(Hn){var Fn=(Ct(xn,ut)-Qr)*Wt,zn=$r;!qr&&ut?zn-=Fn:zn+=Fn;var tn=Pr.current,Nn=Br.current,jn=Nn?zn/Nn:0,Ln=Math.ceil(jn*tn);Ln=Math.max(Ln,0),Ln=Math.min(Ln,tn),Ut=(0,pe.Z)(function(){qe(Ln,ut)})}},pr=function(){sn(!1),Ze()};return window.addEventListener("mousemove",Un,{passive:!0}),window.addEventListener("touchmove",Un,{passive:!0}),window.addEventListener("mouseup",pr,{passive:!0}),window.addEventListener("touchend",pr,{passive:!0}),function(){window.removeEventListener("mousemove",Un),window.removeEventListener("touchmove",Un),window.removeEventListener("mouseup",pr),window.removeEventListener("touchend",pr),pe.Z.cancel(Ut)}}},[Ht]),me.useEffect(function(){return Li(),function(){clearTimeout(Jr.current)}},[nt]),me.useImperativeHandle(we,function(){return{delayHidden:Li}});var Ar="".concat(Ne,"-scrollbar"),Qt={position:"absolute",visibility:Di?null:"hidden"},Zt={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ut?(Qt.height=8,Qt.left=0,Qt.right=0,Qt.bottom=0,Zt.height="100%",Zt.width=vt,qr?Zt.left=Er:Zt.right=Er):(Qt.width=8,Qt.top=0,Qt.bottom=0,qr?Qt.right=0:Qt.left=0,Zt.width="100%",Zt.height=vt,Zt.top=Er),me.createElement("div",{ref:tr,className:Ee()(Ar,(0,Ue.Z)((0,Ue.Z)((0,Ue.Z)({},"".concat(Ar,"-horizontal"),ut),"".concat(Ar,"-vertical"),!ut),"".concat(Ar,"-visible"),Di)),style:(0,oe.Z)((0,oe.Z)({},Qt),Et),onMouseDown:En,onMouseMove:Li},me.createElement("div",{ref:ai,className:Ee()("".concat(Ar,"-thumb"),(0,Ue.Z)({},"".concat(Ar,"-thumb-moving"),Ht)),style:(0,oe.Z)((0,oe.Z)({},Zt),Ft),onMouseDown:Dn}))}),Pt=bt,ht=20;function St(){var He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ne=He/we*He;return isNaN(Ne)&&(Ne=0),Ne=Math.max(Ne,ht),Math.floor(Ne)}var mt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Nt=[],dt={overflowY:"auto",overflowAnchor:"none"};function Dt(He,we){var Ne=He.prefixCls,Ve=Ne===void 0?"rc-virtual-list":Ne,nt=He.className,Re=He.height,_e=He.itemHeight,Ze=He.fullHeight,qe=Ze===void 0?!0:Ze,ut=He.style,vt=He.data,At=He.children,Et=He.itemKey,Ft=He.virtual,Kt=He.direction,Yt=He.scrollWidth,Vt=He.component,Ht=Vt===void 0?"div":Vt,sn=He.onScroll,rn=He.onVirtualScroll,un=He.onVisibleChange,Sn=He.innerProps,vn=He.extraRender,Cn=He.styles,On=He.showScrollBar,Dr=On===void 0?"optional":On,Sr=(0,de.Z)(He,mt),qr=me.useCallback(function(gn){return typeof Et=="function"?Et(gn):gn==null?void 0:gn[Et]},[Et]),tr=Xe(qr,null,null),ai=(0,Ie.Z)(tr,4),gi=ai[0],fi=ai[1],Di=ai[2],ki=ai[3],Jr=!!(Ft!==!1&&Re&&_e),Li=me.useMemo(function(){return Object.values(Di.maps).reduce(function(gn,Rn){return gn+Rn},0)},[Di.id,Di.maps]),et=Jr&&vt&&(Math.max(_e*vt.length,Li)>Re||!!Yt),Mr=Kt==="rtl",Er=Ee()(Ve,(0,Ue.Z)({},"".concat(Ve,"-rtl"),Mr),nt),En=vt||Nt,Tn=(0,me.useRef)(),Dn=(0,me.useRef)(),Pr=(0,me.useRef)(),Br=(0,me.useState)(0),Ar=(0,Ie.Z)(Br,2),Qt=Ar[0],Zt=Ar[1],Ut=(0,me.useState)(0),Un=(0,Ie.Z)(Ut,2),pr=Un[0],mr=Un[1],xn=(0,me.useState)(!1),Yn=(0,Ie.Z)(xn,2),Hn=Yn[0],Qr=Yn[1],$r=function(){Qr(!0)},Mt=function(){Qr(!1)},Wt={getKey:qr};function Fn(gn){Zt(function(Rn){var Vn;typeof gn=="function"?Vn=gn(Rn):Vn=gn;var kn=Rr(Vn);return Tn.current.scrollTop=kn,kn})}var zn=(0,me.useRef)({start:0,end:En.length}),tn=(0,me.useRef)(),Nn=he(En,qr),jn=(0,Ie.Z)(Nn,1),Ln=jn[0];tn.current=Ln;var An=me.useMemo(function(){if(!Jr)return{scrollHeight:void 0,start:0,end:En.length-1,offset:void 0};if(!et){var gn;return{scrollHeight:((gn=Dn.current)===null||gn===void 0?void 0:gn.offsetHeight)||0,start:0,end:En.length-1,offset:void 0}}for(var Rn=0,Vn,kn,Zn,xr=En.length,sr=0;sr<xr;sr+=1){var Qn=En[sr],cn=qr(Qn),vr=Di.get(cn),Nr=Rn+(vr===void 0?_e:vr);Nr>=Qt&&Vn===void 0&&(Vn=sr,kn=Rn),Nr>Qt+Re&&Zn===void 0&&(Zn=sr),Rn=Nr}return Vn===void 0&&(Vn=0,kn=0,Zn=Math.ceil(Re/_e)),Zn===void 0&&(Zn=En.length-1),Zn=Math.min(Zn+1,En.length-1),{scrollHeight:Rn,start:Vn,end:Zn,offset:kn}},[et,Jr,Qt,En,ki,Re]),Kn=An.scrollHeight,Jn=An.start,er=An.end,Wr=An.offset;zn.current.start=Jn,zn.current.end=er,me.useLayoutEffect(function(){var gn=Di.getRecord();if(gn.size===1){var Rn=Array.from(gn.keys())[0],Vn=gn.get(Rn),kn=En[Jn];if(kn&&Vn===void 0){var Zn=qr(kn);if(Zn===Rn){var xr=Di.get(Rn),sr=xr-_e;Fn(function(Qn){return Qn+sr})}}}Di.resetRecord()},[Kn]);var Cr=me.useState({width:0,height:Re}),Tr=(0,Ie.Z)(Cr,2),ln=Tr[0],ri=Tr[1],di=function(Rn){ri({width:Rn.offsetWidth,height:Rn.offsetHeight})},_i=(0,me.useRef)(),pn=(0,me.useRef)(),Xn=me.useMemo(function(){return St(ln.width,Yt)},[ln.width,Yt]),rr=me.useMemo(function(){return St(ln.height,Kn)},[ln.height,Kn]),ir=Kn-Re,wr=(0,me.useRef)(ir);wr.current=ir;function Rr(gn){var Rn=gn;return Number.isNaN(wr.current)||(Rn=Math.min(Rn,wr.current)),Rn=Math.max(Rn,0),Rn}var Kr=Qt<=0,ii=Qt>=ir,oi=pr<=0,cr=pr>=Yt,on=De(Kr,ii,oi,cr),or=function(){return{x:Mr?-pr:pr,y:Qt}},an=(0,me.useRef)(or()),gr=(0,Se.zX)(function(gn){if(rn){var Rn=(0,oe.Z)((0,oe.Z)({},or()),gn);(an.current.x!==Rn.x||an.current.y!==Rn.y)&&(rn(Rn),an.current=Rn)}});function Vr(gn,Rn){var Vn=gn;Rn?((0,be.flushSync)(function(){mr(Vn)}),gr()):Fn(Vn)}function ti(gn){var Rn=gn.currentTarget.scrollTop;Rn!==Qt&&Fn(Rn),sn==null||sn(gn),gr()}var Ni=function(Rn){var Vn=Rn,kn=Yt?Yt-ln.width:0;return Vn=Math.max(Vn,0),Vn=Math.min(Vn,kn),Vn},hi=(0,Se.zX)(function(gn,Rn){Rn?((0,be.flushSync)(function(){mr(function(Vn){var kn=Vn+(Mr?-gn:gn);return Ni(kn)})}),gr()):Fn(function(Vn){var kn=Vn+gn;return kn})}),Zr=Fe(Jr,Kr,ii,oi,cr,!!Yt,hi),Ui=(0,Ie.Z)(Zr,2),en=Ui[0],fn=Ui[1];lt(Jr,Tn,function(gn,Rn,Vn,kn){var Zn=kn;return on(gn,Rn,Vn)?!1:!Zn||!Zn._virtualHandled?(Zn&&(Zn._virtualHandled=!0),en({preventDefault:function(){},deltaX:gn?Rn:0,deltaY:gn?0:Rn}),!0):!1}),Je(et,Tn,function(gn){Fn(function(Rn){return Rn+gn})}),(0,Ae.Z)(function(){function gn(Vn){var kn=Kr&&Vn.detail<0,Zn=ii&&Vn.detail>0;Jr&&!kn&&!Zn&&Vn.preventDefault()}var Rn=Tn.current;return Rn.addEventListener("wheel",en,{passive:!1}),Rn.addEventListener("DOMMouseScroll",fn,{passive:!0}),Rn.addEventListener("MozMousePixelScroll",gn,{passive:!1}),function(){Rn.removeEventListener("wheel",en),Rn.removeEventListener("DOMMouseScroll",fn),Rn.removeEventListener("MozMousePixelScroll",gn)}},[Jr,Kr,ii]),(0,Ae.Z)(function(){if(Yt){var gn=Ni(pr);mr(gn),gr({x:gn})}},[ln.width,Yt]);var $t=function(){var Rn,Vn;(Rn=_i.current)===null||Rn===void 0||Rn.delayHidden(),(Vn=pn.current)===null||Vn===void 0||Vn.delayHidden()},st=xt(Tn,En,Di,_e,qr,function(){return fi(!0)},Fn,$t);me.useImperativeHandle(we,function(){return{nativeElement:Pr.current,getScrollInfo:or,scrollTo:function(Rn){function Vn(kn){return kn&&(0,Gt.Z)(kn)==="object"&&("left"in kn||"top"in kn)}Vn(Rn)?(Rn.left!==void 0&&mr(Ni(Rn.left)),st(Rn.top)):st(Rn)}}}),(0,Ae.Z)(function(){if(un){var gn=En.slice(Jn,er+1);un(gn,En)}},[Jn,er,En]);var Bn=Te(En,qr,Di,_e),Gn=vn==null?void 0:vn({start:Jn,end:er,virtual:et,offsetX:pr,offsetY:Wr,rtl:Mr,getSize:Bn}),fr=se(En,Jn,er,Yt,pr,gi,At,Wt),ur=null;Re&&(ur=(0,oe.Z)((0,Ue.Z)({},qe?"height":"maxHeight",Re),dt),Jr&&(ur.overflowY="hidden",Yt&&(ur.overflowX="hidden"),Hn&&(ur.pointerEvents="none")));var qn={};return Mr&&(qn.dir="rtl"),me.createElement("div",(0,at.Z)({ref:Pr,style:(0,oe.Z)((0,oe.Z)({},ut),{},{position:"relative"}),className:Er},qn,Sr),me.createElement(ke.Z,{onResize:di},me.createElement(Ht,{className:"".concat(Ve,"-holder"),style:ur,ref:Tn,onScroll:ti,onMouseEnter:$t},me.createElement(z,{prefixCls:Ve,height:Kn,offsetX:pr,offsetY:Wr,scrollWidth:Yt,onInnerResize:fi,ref:Dn,innerProps:Sn,rtl:Mr,extra:Gn},fr))),et&&Kn>Re&&me.createElement(Pt,{ref:_i,prefixCls:Ve,scrollOffset:Qt,scrollRange:Kn,rtl:Mr,onScroll:Vr,onStartMove:$r,onStopMove:Mt,spinSize:rr,containerSize:ln.height,style:Cn==null?void 0:Cn.verticalScrollBar,thumbStyle:Cn==null?void 0:Cn.verticalScrollBarThumb,showScrollBar:Dr}),et&&Yt>ln.width&&me.createElement(Pt,{ref:pn,prefixCls:Ve,scrollOffset:pr,scrollRange:Yt,rtl:Mr,onScroll:Vr,onStartMove:$r,onStopMove:Mt,spinSize:Xn,containerSize:ln.width,horizontal:!0,style:Cn==null?void 0:Cn.horizontalScrollBar,thumbStyle:Cn==null?void 0:Cn.horizontalScrollBarThumb,showScrollBar:Dr}))}var gt=me.forwardRef(Dt);gt.displayName="List";var yt=gt,tt=yt},93314:function(_n){"use strict";_n.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(_n){"use strict";_n.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(_n){"use strict";_n.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(_n){"use strict";_n.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(_n,Mn,ft){"use strict";ft.d(Mn,{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 Ae=getComputedStyle(ke,null);return Gt(Ae.overflowY,Se)||Gt(Ae.overflowX,Se)||(me=>{const be=(fe=>{if(!fe.ownerDocument||!fe.ownerDocument.defaultView)return null;try{return fe.ownerDocument.defaultView.frameElement}catch(z){return null}})(me);return!!be&&(be.clientHeight<me.scrollHeight||be.clientWidth<me.scrollWidth)})(ke)}return!1},Ue=(ke,Se,Ae,me,be,fe,z,te)=>fe<ke&&z>Se||fe>ke&&z<Se?0:fe<=ke&&te<=Ae||z>=Se&&te>=Ae?fe-ke-me:z>Se&&te<Ae||fe<ke&&te>Ae?z-Se+be:0,Ie=ke=>{const Se=ke.parentElement;return Se==null?ke.getRootNode().host||null:Se},de=(ke,Se)=>{var Ae,me,be,fe;if(typeof document=="undefined")return[];const{scrollMode:z,block:te,inline:se,boundary:ie,skipOverflowHiddenElements:le}=Se,he=typeof ie=="function"?ie:Pt=>Pt!==ie;if(!at(ke))throw new TypeError("Invalid target");const pe=document.scrollingElement||document.documentElement,xe=[];let je=ke;for(;at(je)&&he(je);){if(je=Ie(je),je===pe){xe.push(je);break}je!=null&&je===document.body&&oe(je)&&!oe(document.documentElement)||je!=null&&oe(je,le)&&xe.push(je)}const De=(me=(Ae=window.visualViewport)==null?void 0:Ae.width)!=null?me:innerWidth,Fe=(fe=(be=window.visualViewport)==null?void 0:be.height)!=null?fe:innerHeight,{scrollX:Te,scrollY:Me}=window,{height:Be,width:Ge,top:Ye,right:Ke,bottom:Xe,left:ot}=ke.getBoundingClientRect(),{top:lt,right:ct,bottom:Ct,left:Je}=(Pt=>{const ht=window.getComputedStyle(Pt);return{top:parseFloat(ht.scrollMarginTop)||0,right:parseFloat(ht.scrollMarginRight)||0,bottom:parseFloat(ht.scrollMarginBottom)||0,left:parseFloat(ht.scrollMarginLeft)||0}})(ke);let rt=te==="start"||te==="nearest"?Ye-lt:te==="end"?Xe+Ct:Ye+Be/2-lt+Ct,xt=se==="center"?ot+Ge/2-Je+ct:se==="end"?Ke+ct:ot-Je;const bt=[];for(let Pt=0;Pt<xe.length;Pt++){const ht=xe[Pt],{height:St,width:mt,top:Nt,right:dt,bottom:Dt,left:gt}=ht.getBoundingClientRect();if(z==="if-needed"&&Ye>=0&&ot>=0&&Xe<=Fe&&Ke<=De&&(ht===pe&&!oe(ht)||Ye>=Nt&&Xe<=Dt&&ot>=gt&&Ke<=dt))return bt;const yt=getComputedStyle(ht),tt=parseInt(yt.borderLeftWidth,10),He=parseInt(yt.borderTopWidth,10),we=parseInt(yt.borderRightWidth,10),Ne=parseInt(yt.borderBottomWidth,10);let Ve=0,nt=0;const Re="offsetWidth"in ht?ht.offsetWidth-ht.clientWidth-tt-we:0,_e="offsetHeight"in ht?ht.offsetHeight-ht.clientHeight-He-Ne:0,Ze="offsetWidth"in ht?ht.offsetWidth===0?0:mt/ht.offsetWidth:0,qe="offsetHeight"in ht?ht.offsetHeight===0?0:St/ht.offsetHeight:0;if(pe===ht)Ve=te==="start"?rt:te==="end"?rt-Fe:te==="nearest"?Ue(Me,Me+Fe,Fe,He,Ne,Me+rt,Me+rt+Be,Be):rt-Fe/2,nt=se==="start"?xt:se==="center"?xt-De/2:se==="end"?xt-De:Ue(Te,Te+De,De,tt,we,Te+xt,Te+xt+Ge,Ge),Ve=Math.max(0,Ve+Me),nt=Math.max(0,nt+Te);else{Ve=te==="start"?rt-Nt-He:te==="end"?rt-Dt+Ne+_e:te==="nearest"?Ue(Nt,Dt,St,He,Ne+_e,rt,rt+Be,Be):rt-(Nt+St/2)+_e/2,nt=se==="start"?xt-gt-tt:se==="center"?xt-(gt+mt/2)+Re/2:se==="end"?xt-dt+we+Re:Ue(gt,dt,mt,tt,we+Re,xt,xt+Ge,Ge);const{scrollLeft:ut,scrollTop:vt}=ht;Ve=qe===0?0:Math.max(0,Math.min(vt+Ve/qe,ht.scrollHeight-St/qe+_e)),nt=Ze===0?0:Math.max(0,Math.min(ut+nt/Ze,ht.scrollWidth-mt/Ze+Re)),rt+=vt-Ve,xt+=ut-nt}bt.push({el:ht,top:Ve,left:nt})}return bt},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||!(be=>{let fe=be;for(;fe&&fe.parentNode;){if(fe.parentNode===document)return!0;fe=fe.parentNode instanceof ShadowRoot?fe.parentNode.host:fe.parentNode}return!1})(ke))return;const Ae=(be=>{const fe=window.getComputedStyle(be);return{top:parseFloat(fe.scrollMarginTop)||0,right:parseFloat(fe.scrollMarginRight)||0,bottom:parseFloat(fe.scrollMarginBottom)||0,left:parseFloat(fe.scrollMarginLeft)||0}})(ke);if((be=>typeof be=="object"&&typeof be.behavior=="function")(Se))return Se.behavior(de(ke,Se));const me=typeof Se=="boolean"||Se==null?void 0:Se.behavior;for(const{el:be,top:fe,left:z}of de(ke,ve(Se))){const te=fe-Ae.top+Ae.bottom,se=z-Ae.left+Ae.right;be.scroll({top:te,left:se,behavior:me})}}}}]);
|