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.
1245 lines
2.6 MiB
1245 lines
2.6 MiB
(self.webpackChunk=self.webpackChunk||[]).push([[8863],{8336:function(){"use strict"},12469:function(){"use strict"},99587:function(dn,fn){"use strict";fn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},8423:function(dn,fn){"use strict";fn.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},39744:function(){"use strict"},63720:function(){"use strict";function dn(ft,z,tt,at){tt===void 0&&(tt=0),at===void 0&&(at=1/0),this._name=ft,this._defaultValue=z,this._minimum=tt,this._maximum=at}Object.defineProperty(dn.prototype,"name",{get:function(){return this._name},set:function(ft){if(typeof ft!="string"||ft==="")throw new Error("Shape name must be a valid string.");this._name=ft}}),Object.defineProperty(dn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(ft){if(typeof ft!="number"||isNaN(ft))throw new Error("The default value must be a real number, not: "+ft);this._defaultValue=ft}}),Object.defineProperty(dn.prototype,"minimum",{get:function(){return this._minimum},set:function(ft){if(typeof ft!="number"||isNaN(ft))throw new Error("Minimum must be a real number, not: "+ft);this._minimum=ft}}),Object.defineProperty(dn.prototype,"maximum",{get:function(){return this._maximum},set:function(ft){if(typeof ft!="number"||isNaN(ft))throw new Error("Maximum must be a real number, not: "+ft);this._maximum=ft}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(ft,z){var tt=go.Shape._FigureParameters[ft];return tt?tt[z]:null},go.Shape.setFigureParameter=function(ft,z,tt){if(!(tt instanceof dn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+tt);if(tt.defaultValue<tt.minimum||tt.defaultValue>tt.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+tt.defaultValue);var at=go.Shape._FigureParameters[ft];at||(at=[],go.Shape._FigureParameters[ft]=at),at[z]=tt};var fn=[];function le(ft,z){var tt=fn.pop();return tt===void 0?new go.Point(ft,z):(tt.x=ft,tt.y=z,tt)}function ae(){var ft=fn.pop();return ft===void 0?new go.Point:ft}function Re(ft){fn.push(ft)}function ot(ft,z,tt,at,it,lt,ut,dt,Pt){Pt||(Pt=new go.Point);var At=ft-tt,Dt=it-ut,Ft=NaN,Nt=NaN;if(At===0)if(Dt===0)ft===tt&&(Ft=ft,Nt=z);else{var jt=(lt-dt)/Dt,Gt=lt-jt*it;Ft=ft,Nt=jt*Ft+Gt}else if(Dt===0){var Wt=(z-at)/At,Jt=z-Wt*ft;Ft=it,Nt=Wt*Ft+Jt}else{var Wt=(z-at)/At,jt=(lt-dt)/Dt,Jt=z-Wt*ft,Gt=lt-jt*it;Ft=(Gt-Jt)/(Wt-jt),Nt=Wt*Ft+Jt}return Pt.x=Ft,Pt.y=Nt,Pt}function _t(ft,z,tt,at,it,lt,ut,dt,Pt,At,Dt,Ft,Nt,jt){var Gt=1-Pt,Wt=Pt,Jt=ft*Gt+tt*Wt,Ut=z*Gt+at*Wt,Ht=tt*Gt+it*Wt,oe=at*Gt+lt*Wt,se=it*Gt+ut*Wt,ce=lt*Gt+dt*Wt,Pe=Jt*Gt+Ht*Wt,Yt=Ut*Gt+oe*Wt,ne=Ht*Gt+se*Wt,ve=oe*Gt+ce*Wt,Se=Pe*Gt+ne*Wt,be=Yt*Gt+ve*Wt;At.x=Jt,At.y=Ut,Dt.x=Pe,Dt.y=Yt,Ft.x=Se,Ft.y=be,Nt.x=ne,Nt.y=ve,jt.x=se,jt.y=ce}var Bt=new go.Spot(.156,.156),vt=new go.Spot(.844,.844),gt=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new dn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=5),at=Math.min(at,z/3),at=Math.min(at,tt/3);var it=at*gt,lt=new go.Geometry().add(new go.PathFigure(at,0,!0).add(new go.PathSegment(go.PathSegment.Line,z-at,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,at,z-it,0,z,it)).add(new go.PathSegment(go.PathSegment.Line,z,tt-at)).add(new go.PathSegment(go.PathSegment.Bezier,z-at,tt,z,tt-it,z-it,tt)).add(new go.PathSegment(go.PathSegment.Line,at,tt)).add(new go.PathSegment(go.PathSegment.Bezier,0,tt-at,it,tt,0,tt-it)).add(new go.PathSegment(go.PathSegment.Line,0,at)).add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,it,it,0).close()));return it>1&&(lt.spot1=new go.Spot(0,0,it,it),lt.spot2=new go.Spot(1,1,-it,-it)),lt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(ft,z,tt){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,tt).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(z,tt).add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,z,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(z,tt).add(new go.PathSegment(go.PathSegment.Line,0,tt)).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(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.5*z,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(ft,z,tt){var at=new go.Geometry(go.Geometry.Line);return at.startX=0,at.startY=tt/2,at.endX=z,at.endY=tt/2,at}),go.Shape.defineFigureGenerator("LineV",function(ft,z,tt){var at=new go.Geometry(go.Geometry.Line);return at.startX=z/2,at.startY=0,at.endX=z/2,at.endY=tt,at}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,tt/2,!1).add(new go.PathSegment(go.PathSegment.Line,z,tt/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,tt)))}),go.Shape.defineFigureGenerator("XLine",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,tt,!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,tt)))}),go.Shape.defineFigureGenerator("LineRight",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.25*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,.25*z,tt)))}),go.Shape.defineFigureGenerator("LineDown",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,.25*tt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.75*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)))}),go.Shape.defineFigureGenerator("LineLeft",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.75*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,.75*z,tt)))}),go.Shape.defineFigureGenerator("LineUp",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,.75*tt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.25*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.75*tt)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(ft,z,tt){var at=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(at*z,(1-at)*tt,!1).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,at*tt)).add(new go.PathSegment(go.PathSegment.Move,at*z,at*tt)).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,(1-at)*tt)).add(new go.PathSegment(go.PathSegment.Move,0,tt/2)).add(new go.PathSegment(go.PathSegment.Line,z,tt/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,tt)))}),go.Shape.defineFigureGenerator("CircleLine",function(ft,z,tt){var at=z/2,it=new go.Geometry().add(new go.PathFigure(z,z/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,at,at,at,at).close()));return it.spot1=Bt,it.spot2=vt,it.defaultStretch=go.GraphObject.Uniform,it}),go.Shape.defineFigureGenerator("Line1",function(ft,z,tt){var at=new go.Geometry(go.Geometry.Line);return at.startX=0,at.startY=0,at.endX=z,at.endY=tt,at}),go.Shape.defineFigureGenerator("Line2",function(ft,z,tt){var at=new go.Geometry(go.Geometry.Line);return at.startX=z,at.startY=0,at.endX=0,at.endY=tt,at}),go.Shape.defineFigureGenerator("Curve1",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,tt,gt*z,0,z,(1-gt)*tt)))}),go.Shape.defineFigureGenerator("Curve2",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,tt,0,gt*tt,(1-gt)*z,tt)))}),go.Shape.defineFigureGenerator("Curve3",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,tt,z,gt*tt,gt*z,tt)))}),go.Shape.defineFigureGenerator("Curve4",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,tt,(1-gt)*z,0,0,(1-gt)*tt)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(z,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(ft,z,tt){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,tt).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(ft,z,tt){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,tt).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new dn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)?at=.1:at<-1?at=-1:at>1&&(at=1);var it=Math.abs(at)*z;if(at===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=z,lt.endY=tt,lt}else{var lt=new go.Geometry;return at>0?lt.add(new go.PathFigure(it,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-it,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())):lt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-it,0)).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,it,tt).close())),it<z/2&<.setSpots(it/z,0,(z-it)/z,1),lt}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new dn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)?at=10:at<-z?at=-z:at>z&&(at=z);var it=Math.abs(at);if(at===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=z,lt.endY=tt,lt}else{var lt=new go.Geometry;return at>0?lt.add(new go.PathFigure(it,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-it,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())):lt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-it,0)).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,it,tt).close())),it<z/2&<.setSpots(it/z,0,(z-it)/z,1),lt}}),go.Shape.setFigureParameter("Trapezoid1",0,new dn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)?at=.2:at<.5?at=-.5:at>.5&&(at=.5);var it=Math.abs(at)*z;if(at===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=z,lt.endY=tt,lt}else{var lt=new go.Geometry;return at>0?lt.add(new go.PathFigure(it,0).add(new go.PathSegment(go.PathSegment.Line,z-it,0)).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())):lt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-it,tt)).add(new go.PathSegment(go.PathSegment.Line,it,tt).close())),it<z/2&<.setSpots(it/z,0,(z-it)/z,1),lt}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new dn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)?at=20:at<-z?at=-z/2:at>z&&(at=z/2);var it=Math.abs(at);if(at===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=z,lt.endY=tt,lt}else{var lt=new go.Geometry;return at>0?lt.add(new go.PathFigure(it,0).add(new go.PathSegment(go.PathSegment.Line,z-it,0)).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())):lt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-it,tt)).add(new go.PathSegment(go.PathSegment.Line,it,tt).close())),it<z/2&<.setSpots(it/z,0,(z-it)/z,1),lt}}),go.Shape.setFigureParameter("ManualOperation",0,new dn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)?at=10:at<-z?at=-z/2:at>z&&(at=z/2);var it=Math.abs(at);if(at===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=z,lt.endY=tt,lt}else{var lt=new go.Geometry;return at>0?lt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-it,tt)).add(new go.PathSegment(go.PathSegment.Line,it,tt).close())):lt.add(new go.PathFigure(it,0).add(new go.PathSegment(go.PathSegment.Line,z-it,0)).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())),it<z/2&<.setSpots(it/z,0,(z-it)/z,1),lt}});var kt=[];function bt(){var ft=kt.pop();return ft===void 0?[]:ft}function St(ft){ft.length=0,kt.push(ft)}function Tt(ft){for(var z=bt(),tt=.5,at=.5,it=Math.PI*1.5,lt=0,ut=0;ut<ft;ut++)lt=2*Math.PI/ft*ut+it,z[ut]=new go.Point(at+tt*Math.cos(lt),at+tt*Math.sin(lt));return z.push(z[0]),z}function mt(ft){var z=xt(ft),tt=bt();tt[0]=z[0];for(var at=1,it=1;at<z.length;at+=2,it+=3)tt[it]=z[at],tt[it+1]=z[at],tt[it+2]=z[at+1];return St(z),tt}function xt(ft){for(var z=Tt(ft),tt=bt(),at=Math.floor(z.length/2),it=z.length-1,lt=ft%2===0?2:1,ut=0;ut<it;ut++){var dt=z[ut],Pt=z[ut+1],At=z[(at+ut-1)%it],Dt=z[(at+ut+lt)%it];tt[ut*2]=dt,tt[ut*2+1]=ot(dt.x,dt.y,At.x,At.y,Pt.x,Pt.y,Dt.x,Dt.y,new go.Point)}return tt[tt.length]=tt[0],St(z),tt}go.Shape.defineFigureGenerator("Pentagon",function(ft,z,tt){var at=Tt(5),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<5;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),St(at),it.spot1=new go.Spot(.2,.22),it.spot2=new go.Spot(.8,.9),it}),go.Shape.defineFigureGenerator("Hexagon",function(ft,z,tt){var at=Tt(6),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<6;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),St(at),it.spot1=new go.Spot(.07,.25),it.spot2=new go.Spot(.93,.75),it}),go.Shape.defineFigureGenerator("Heptagon",function(ft,z,tt){var at=Tt(7),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<7;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),St(at),it.spot1=new go.Spot(.2,.15),it.spot2=new go.Spot(.8,.85),it}),go.Shape.defineFigureGenerator("Octagon",function(ft,z,tt){var at=Tt(8),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<8;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),St(at),it.spot1=new go.Spot(.15,.15),it.spot2=new go.Spot(.85,.85),it}),go.Shape.defineFigureGenerator("Nonagon",function(ft,z,tt){var at=Tt(9),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<9;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),St(at),it.spot1=new go.Spot(.17,.13),it.spot2=new go.Spot(.82,.82),it}),go.Shape.defineFigureGenerator("Decagon",function(ft,z,tt){var at=Tt(10),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<10;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),St(at),it.spot1=new go.Spot(.16,.16),it.spot2=new go.Spot(.84,.84),it}),go.Shape.defineFigureGenerator("Dodecagon",function(ft,z,tt){var at=Tt(12),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<12;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),St(at),it.spot1=new go.Spot(.16,.16),it.spot2=new go.Spot(.84,.84),it}),go.Shape.defineFigureGenerator("FivePointedStar",function(ft,z,tt){var at=xt(5),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<10;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),St(at),it.spot1=new go.Spot(.266,.333),it.spot2=new go.Spot(.733,.733),it}),go.Shape.defineFigureGenerator("SixPointedStar",function(ft,z,tt){var at=xt(6),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<12;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),St(at),it.spot1=new go.Spot(.17,.25),it.spot2=new go.Spot(.83,.75),it}),go.Shape.defineFigureGenerator("SevenPointedStar",function(ft,z,tt){var at=xt(7),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<14;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),St(at),it.spot1=new go.Spot(.222,.277),it.spot2=new go.Spot(.777,.666),it}),go.Shape.defineFigureGenerator("EightPointedStar",function(ft,z,tt){var at=xt(8),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<16;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),St(at),it.spot1=new go.Spot(.25,.25),it.spot2=new go.Spot(.75,.75),it}),go.Shape.defineFigureGenerator("NinePointedStar",function(ft,z,tt){var at=xt(9),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<18;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),St(at),it.spot1=new go.Spot(.222,.277),it.spot2=new go.Spot(.777,.666),it}),go.Shape.defineFigureGenerator("TenPointedStar",function(ft,z,tt){var at=xt(10),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<20;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),St(at),it.spot1=new go.Spot(.281,.261),it.spot2=new go.Spot(.723,.748),it}),go.Shape.defineFigureGenerator("FivePointedBurst",function(ft,z,tt){var at=mt(5),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<at.length;ut+=3)lt.add(new go.PathSegment(go.PathSegment.Bezier,at[ut+2].x*z,at[ut+2].y*tt,at[ut].x*z,at[ut].y*tt,at[ut+1].x*z,at[ut+1].y*tt));return lt.segments.last().close(),St(at),it.spot1=new go.Spot(.222,.277),it.spot2=new go.Spot(.777,.777),it}),go.Shape.defineFigureGenerator("SixPointedBurst",function(ft,z,tt){var at=mt(6),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<at.length;ut+=3)lt.add(new go.PathSegment(go.PathSegment.Bezier,at[ut+2].x*z,at[ut+2].y*tt,at[ut].x*z,at[ut].y*tt,at[ut+1].x*z,at[ut+1].y*tt));return lt.segments.last().close(),St(at),it.spot1=new go.Spot(.17,.222),it.spot2=new go.Spot(.833,.777),it}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(ft,z,tt){var at=mt(7),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<at.length;ut+=3)lt.add(new go.PathSegment(go.PathSegment.Bezier,at[ut+2].x*z,at[ut+2].y*tt,at[ut].x*z,at[ut].y*tt,at[ut+1].x*z,at[ut+1].y*tt));return lt.segments.last().close(),St(at),it.spot1=new go.Spot(.222,.222),it.spot2=new go.Spot(.777,.777),it}),go.Shape.defineFigureGenerator("EightPointedBurst",function(ft,z,tt){var at=mt(8),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<at.length;ut+=3)lt.add(new go.PathSegment(go.PathSegment.Bezier,at[ut+2].x*z,at[ut+2].y*tt,at[ut].x*z,at[ut].y*tt,at[ut+1].x*z,at[ut+1].y*tt));return lt.segments.last().close(),St(at),it.spot1=new go.Spot(.222,.222),it.spot2=new go.Spot(.777,.777),it}),go.Shape.defineFigureGenerator("NinePointedBurst",function(ft,z,tt){var at=mt(9),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<at.length;ut+=3)lt.add(new go.PathSegment(go.PathSegment.Bezier,at[ut+2].x*z,at[ut+2].y*tt,at[ut].x*z,at[ut].y*tt,at[ut+1].x*z,at[ut+1].y*tt));return lt.segments.last().close(),St(at),it.spot1=new go.Spot(.222,.222),it.spot2=new go.Spot(.777,.777),it}),go.Shape.defineFigureGenerator("TenPointedBurst",function(ft,z,tt){var at=mt(10),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<at.length;ut+=3)lt.add(new go.PathSegment(go.PathSegment.Bezier,at[ut+2].x*z,at[ut+2].y*tt,at[ut].x*z,at[ut].y*tt,at[ut+1].x*z,at[ut+1].y*tt));return lt.segments.last().close(),St(at),it.spot1=new go.Spot(.222,.222),it.spot2=new go.Spot(.777,.777),it}),go.Shape.setFigureParameter("FramedRectangle",0,new dn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new dn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(ft,z,tt){var at=ft?ft.parameter1:NaN,it=ft?ft.parameter2:NaN;isNaN(at)&&(at=8),isNaN(it)&&(it=8);var lt=new go.Geometry,ut=new go.PathFigure(0,0,!0);return lt.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at<z/2&&it<tt/2&&(ut.add(new go.PathSegment(go.PathSegment.Move,at,it)),ut.add(new go.PathSegment(go.PathSegment.Line,at,tt-it)),ut.add(new go.PathSegment(go.PathSegment.Line,z-at,tt-it)),ut.add(new go.PathSegment(go.PathSegment.Line,z-at,it).close())),lt.setSpots(0,0,1,1,at,it,-at,-it),lt}),go.Shape.setFigureParameter("Ring",0,new dn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=8);var it=z/2,lt=new go.Geometry,ut=new go.PathFigure(z,z/2,!0);lt.add(ut),ut.add(new go.PathSegment(go.PathSegment.Arc,0,360,it,it,it,it).close());var dt=Math.max(it-at,0);return dt>0&&(ut.add(new go.PathSegment(go.PathSegment.Move,z/2+dt,z/2)),ut.add(new go.PathSegment(go.PathSegment.Arc,0,-360,it,it,dt,dt).close())),lt.spot1=Bt,lt.spot2=vt,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Cloud",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.08034461*z,.1944299*tt,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*z,.05349299*tt,-.09239631*z,.07836421*tt,.1406031*z,-.0542823*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*z,.074219*tt,.2450511*z,-.00697547*tt,.3776197*z,-.01112067*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*z,.07004196*tt,.4539471*z,0,.6066018*z,-.02526587*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*z,.08370865*tt,.6914277*z,-.01904177*tt,.8921095*z,-.01220843*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*z,.3194596*tt,1.036446*z,.04105738*tt,1.020377*z,.3022052*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*z,.562044*tt,1.04448*z,.360238*tt,.992256*z,.5219009*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*z,.8217117*tt,1.032337*z,.5771781*tt,1.018411*z,.8120651*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*z,.9156953*tt,1.028411*z,.9571472*tt,.8556702*z,1.052487*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*z,.9310455*tt,.7431877*z,1.009325*tt,.5624123*z,1.021761*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*z,.9344623*tt,.4820677*z,1.031761*tt,.3030112*z,1.002796*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.870098*tt,.2329994*z,1.01518*tt,.03213784*z,1.01518*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*z,.6545475*tt,-.02812061*z,.9032597*tt,-.01205169*z,.6835638*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*z,.4265613*tt,-.01812061*z,.6089503*tt,-.00606892*z,.4555777*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.1944299*tt,-.01606892*z,.3892545*tt,-.01205169*z,.1944299*tt))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(ft,z,tt){var at=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(at*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,at*tt)).add(new go.PathSegment(go.PathSegment.Line,z,(1-at)*tt)).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,tt)).add(new go.PathSegment(go.PathSegment.Line,at*z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,(1-at)*tt)).add(new go.PathSegment(go.PathSegment.Line,0,at*tt).close())).setSpots(at/2,at/2,1-at/2,1-at/2)}),go.Shape.setFigureParameter("Pie",0,new dn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new dn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(ft,z,tt){var at=ft?ft.parameter1:NaN,it=ft?ft.parameter2:NaN;isNaN(at)&&(at=0),isNaN(it)&&(it=315);var lt=at%360;lt<0&&(lt+=360);var ut=it%360,dt=Math.min(z,tt)/2;return new go.Geometry().add(new go.PathFigure(dt,dt).add(new go.PathSegment(go.PathSegment.Arc,lt,ut,dt,dt,dt,dt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(ft,z,tt){var at=gt/Math.SQRT2*.5,it=Math.SQRT2/2,lt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(z,tt,!0).add(new go.PathSegment(go.PathSegment.Bezier,it*z,lt*tt,z,(1-at)*tt,(it+at)*z,(lt+at)*tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close()))}),go.Shape.setFigureParameter("ThickCross",0,new dn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=30);var it=Math.min(at,z)/2,lt=z/2,ut=tt/2;return new go.Geometry().add(new go.PathFigure(lt-it,0,!0).add(new go.PathSegment(go.PathSegment.Line,lt+it,0)).add(new go.PathSegment(go.PathSegment.Line,lt+it,ut-it)).add(new go.PathSegment(go.PathSegment.Line,z,ut-it)).add(new go.PathSegment(go.PathSegment.Line,z,ut+it)).add(new go.PathSegment(go.PathSegment.Line,lt+it,ut+it)).add(new go.PathSegment(go.PathSegment.Line,lt+it,tt)).add(new go.PathSegment(go.PathSegment.Line,lt-it,tt)).add(new go.PathSegment(go.PathSegment.Line,lt-it,ut+it)).add(new go.PathSegment(go.PathSegment.Line,0,ut+it)).add(new go.PathSegment(go.PathSegment.Line,0,ut-it)).add(new go.PathSegment(go.PathSegment.Line,lt-it,ut-it).close()))}),go.Shape.setFigureParameter("ThinCross",0,new dn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=10);var it=Math.min(at,z)/2,lt=z/2,ut=tt/2;return new go.Geometry().add(new go.PathFigure(lt-it,0,!0).add(new go.PathSegment(go.PathSegment.Line,lt+it,0)).add(new go.PathSegment(go.PathSegment.Line,lt+it,ut-it)).add(new go.PathSegment(go.PathSegment.Line,z,ut-it)).add(new go.PathSegment(go.PathSegment.Line,z,ut+it)).add(new go.PathSegment(go.PathSegment.Line,lt+it,ut+it)).add(new go.PathSegment(go.PathSegment.Line,lt+it,tt)).add(new go.PathSegment(go.PathSegment.Line,lt-it,tt)).add(new go.PathSegment(go.PathSegment.Line,lt-it,ut+it)).add(new go.PathSegment(go.PathSegment.Line,0,ut+it)).add(new go.PathSegment(go.PathSegment.Line,0,ut-it)).add(new go.PathSegment(go.PathSegment.Line,lt-it,ut-it).close()))}),go.Shape.setFigureParameter("ThickX",0,new dn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(ft,z,tt){var at=ft?ft.parameter1:NaN;if((isNaN(at)||at<0)&&(at=30),z===0||tt===0){var it=new go.Geometry(go.Geometry.Rectangle);return it.startX=0,it.startY=0,it.endX=z,it.endY=tt,it}else{var lt=z/2,ut=tt/2,dt=Math.atan2(tt,z),Pt=at-Math.min(Math.cos(dt)*at/2,lt),At=at-Math.min(Math.sin(dt)*at/2,ut),it=new go.Geometry,Dt=new go.PathFigure(Pt,0,!0);return it.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,lt,.2*tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,z-Pt,0)),Dt.add(new go.PathSegment(go.PathSegment.Line,z,At)),Dt.add(new go.PathSegment(go.PathSegment.Line,.8*z,ut)),Dt.add(new go.PathSegment(go.PathSegment.Line,z,tt-At)),Dt.add(new go.PathSegment(go.PathSegment.Line,z-Pt,tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,lt,.8*tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,Pt,tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,tt-At)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,ut)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,At).close()),it}}),go.Shape.setFigureParameter("ThinX",0,new dn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=10);var it=new go.Geometry,lt=new go.PathFigure(.1*z,0,!0);return it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.1*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.9*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.9*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.1*tt).close()),it}),go.Shape.setFigureParameter("SquareIBeam",0,new dn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.2);var it=new go.Geometry,lt=new go.PathFigure(0,0,!0);return it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,at*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(.5+at/2)*z,at*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(.5+at/2)*z,(1-at)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,(1-at)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,(1-at)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(.5-at/2)*z,(1-at)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(.5-at/2)*z,at*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,at*tt).close()),it}),go.Shape.setFigureParameter("RoundedIBeam",0,new dn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.5);var it=new go.Geometry,lt=new go.PathFigure(0,0,!0);return it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,z,tt,Math.abs(1-at)*z,.25*tt,Math.abs(1-at)*z,.75*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,at*z,.75*tt,at*z,.25*tt).close()),it}),go.Shape.defineFigureGenerator("HalfEllipse",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,gt*z,0,z,(.5-gt/2)*tt)).add(new go.PathSegment(go.PathSegment.Bezier,0,tt,z,(.5+gt/2)*tt,gt*z,tt).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,tt,z,0,z,tt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*z,.75*tt,.5*z,.25*tt).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.5*z,tt,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*tt,.1*z,.8*tt,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*tt,0,0,.45*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,.3*tt,.55*z,0,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,.5*tt,.9*z,.8*tt).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.5*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*z,.01*tt)).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,.6*z,.2*tt,z,.25*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.7*tt,z,.8*tt,.6*z,.8*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.75*z,tt,.5*z,.75*tt,.55*z,.95*tt)).add(new go.PathSegment(go.PathSegment.Line,.25*z,tt)).add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.7*tt,.45*z,.95*tt,.5*z,.75*tt)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*tt,.4*z,.8*tt,0,.8*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.49*z,.01*tt,0,.25*tt,.4*z,.2*tt).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.4*z,.6*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,.15*z,tt,.5*z,.75*tt,.45*z,.95*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.85*z,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.6*tt,.55*z,.95*tt,.5*z,.75*tt));var lt=.2,ut=.3,dt=0,Pt=lt*gt;return it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5+lt+dt)*tt,(.5-lt+ut)*z,(.5+Pt+dt)*tt,(.5-Pt+ut)*z,(.5+lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+ut)*z,(.5+dt)*tt,(.5+Pt+ut)*z,(.5+lt+dt)*tt,(.5+lt+ut)*z,(.5+Pt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5-lt+dt)*tt,(1-.5+lt+ut)*z,(.5-Pt+dt)*tt,(.5+Pt+ut)*z,(.5-lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*tt,(.5-Pt+ut)*z,(.5-lt+dt)*tt,(.5-lt+ut+.05)*z,(.5-Pt+dt-.02)*tt)),lt=.2,ut=0,dt=-.3,Pt=lt*gt,it.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+ut)*z,(.5+dt)*tt,(.5+Pt+ut)*z,(.5+lt+dt)*tt,(.5+lt+ut)*z,(.5+Pt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5-lt+dt)*tt,(1-.5+lt+ut)*z,(.5-Pt+dt)*tt,(.5+Pt+ut)*z,(.5-lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+ut)*z,(.5+dt)*tt,(.5-Pt+ut)*z,(.5-lt+dt)*tt,(.5-lt+ut)*z,(.5-Pt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Pt+ut)*z,(.5+lt+dt)*tt,(.5-lt+ut)*z,(.5+Pt+dt)*tt,(.5-Pt+ut)*z,(.5+lt+dt)*tt)),lt=.2,ut=-.3,dt=0,Pt=lt*gt,it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5-lt+dt)*tt,(1-.5+lt+ut-.05)*z,(.5-Pt+dt-.02)*tt,(.5+Pt+ut)*z,(.5-lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+ut)*z,(.5+dt)*tt,(.5-Pt+ut)*z,(.5-lt+dt)*tt,(.5-lt+ut)*z,(.5-Pt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5+lt+dt)*tt,(.5-lt+ut)*z,(.5+Pt+dt)*tt,(.5-Pt+ut)*z,(.5+lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*tt,(.5+Pt+ut)*z,(.5+lt+dt)*tt,(.5+lt+ut)*z,(.5+Pt+dt)*tt).close()),at.setSpots(.06,.33,.93,.68),at}),go.Shape.defineFigureGenerator("YinYang",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*.5,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*.5,z*.5,z*.5,z*.5)),it.add(new go.PathSegment(go.PathSegment.Arc,90,-180,z*.5,z*.75,z*.25,z*.25)),it.add(new go.PathSegment(go.PathSegment.Arc,90,180,z*.5,z*.25,z*.25,z*.25));var lt=.1,ut=.5,dt=.25;return it.add(new go.PathSegment(go.PathSegment.Move,(ut+lt)*z,dt*tt)),it.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*ut,tt*dt,lt*z,lt*z).close()),it=new go.PathFigure(z*.5,0,!1),at.add(it),it.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*.5,z*.5,z*.5,z*.5)),dt=.75,it=new go.PathFigure((ut+lt)*z,dt*tt,!0),at.add(it),it.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*ut,tt*dt,lt*z,lt*z).close()),at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("Peace",function(ft,z,tt){var at=.8535533905932737,it=.5*z,lt=.5*tt;return new go.Geometry().add(new go.PathFigure(it,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,it,lt,it,lt)).add(new go.PathSegment(go.PathSegment.Line,it,tt)).add(new go.PathSegment(go.PathSegment.Move,it,lt)).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,at*tt)).add(new go.PathSegment(go.PathSegment.Move,it,lt)).add(new go.PathSegment(go.PathSegment.Line,at*z,at*tt)))}),go.Shape.defineFigureGenerator("NotAllowed",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=.5,ut=.5,dt=.5,Pt=new go.PathFigure(ut*z,(dt-lt)*tt);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),lt=.4,it=gt*.4;var At=ae(),Dt=ae(),Ft=ae(),Nt=ae();_t(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.42,At,Dt,Ft,Nt,Nt);var jt=ae(),Gt=ae(),Wt=ae();_t(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.58,Nt,Nt,Wt,jt,Gt);var Jt=ae(),Ut=ae(),Ht=ae();_t(ut,dt+lt,ut-it,dt+lt,ut-lt,dt+it,ut-lt,dt,.42,Jt,Ut,Ht,Nt,Nt);var oe=ae(),se=ae(),ce=ae();return _t(ut,dt+lt,ut-it,dt+lt,ut-lt,dt+it,ut-lt,dt,.58,Nt,Nt,ce,oe,se),Pt.add(new go.PathSegment(go.PathSegment.Move,ce.x*z,ce.y*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,oe.x*z,oe.y*tt,se.x*z,se.y*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,Ft.x*z,Ft.y*tt,At.x*z,At.y*tt,Dt.x*z,Dt.y*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,ce.x*z,ce.y*tt).close()),Pt.add(new go.PathSegment(go.PathSegment.Move,Ht.x*z,Ht.y*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,Wt.x*z,Wt.y*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,jt.x*z,jt.y*tt,Gt.x*z,Gt.y*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,Ht.x*z,Ht.y*tt,Jt.x*z,Jt.y*tt,Ut.x*z,Ut.y*tt).close()),Re(At),Re(Dt),Re(Ft),Re(Nt),Re(jt),Re(Gt),Re(Wt),Re(Jt),Re(Ut),Re(Ht),Re(oe),Re(se),Re(ce),at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("Fragile",function(ft,z,tt){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*tt)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.25*tt)).add(new go.PathSegment(go.PathSegment.Line,.29*z,.33*tt)).add(new go.PathSegment(go.PathSegment.Line,.35*z,.25*tt)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.15*tt)).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*tt,z,.25*tt,.75*z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)).add(new go.PathSegment(go.PathSegment.Line,.3*z,tt)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*tt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.5*tt,0,.25*tt).close()))}),go.Shape.setFigureParameter("HourGlass",0,new dn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=30),at>z&&(at=z);var it=(z-at)/2,lt=it+at;return new go.Geometry().add(new go.PathFigure(lt,.5*tt).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt)).add(new go.PathSegment(go.PathSegment.Line,it,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,.55*tt).add(new go.PathSegment(go.PathSegment.Line,.6*z,0)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.45*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.45*tt)).add(new go.PathSegment(go.PathSegment.Line,.4*z,tt)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.55*tt).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(ft,z,tt){var at=new go.Geometry,it=gt*.4,lt=.4,ut=.5,dt=.5,Pt=ae(),At=ae(),Dt=ae(),Ft=ae(),Nt=new go.PathFigure((ut-lt)*z,dt*tt,!1);at.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt)),_t(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.44,Dt,Ft,At,Pt,Pt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,At.x*z,At.y*tt,Dt.x*z,Dt.y*tt,Ft.x*z,Ft.y*tt));var jt=le(At.x,At.y);_t(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.56,Pt,Pt,At,Dt,Ft);var Gt=le(At.x,At.y);Nt.add(new go.PathSegment(go.PathSegment.Line,(jt.x*.1+.95*.9)*z,jt.y*.1*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.85*z,jt.y*.1*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),Nt.add(new go.PathSegment(go.PathSegment.Line,z,0)),Nt.add(new go.PathSegment(go.PathSegment.Line,z,.15*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,(Gt.x*.1+.9)*z,.15*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,(Gt.x*.1+.9)*z,(Gt.y*.1+.05*.9)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,Gt.x*z,Gt.y*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,Dt.x*z,Dt.y*tt,Ft.x*z,Ft.y*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt)),lt=.35,it=gt*.35;var Wt=new go.PathFigure(ut*z,(dt-lt)*tt,!1);at.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt));var Jt=new go.PathFigure((ut-lt)*z,dt*tt,!1);return at.add(Jt),Re(Pt),Re(At),Re(Dt),Re(Ft),Re(jt),Re(Gt),at.spot1=new go.Spot(.202,.257),at.spot2=new go.Spot(.792,.739),at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("GenderFemale",function(ft,z,tt){var at=new go.Geometry,it=.375,lt=0,ut=-.125,dt=it*gt,Pt=new go.PathFigure((.525+lt)*z,(.5+it+ut)*tt,!1);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+it+lt)*z,(.5+ut)*tt,(.5+dt+lt)*z,(.5+it+ut)*tt,(.5+it+lt)*z,(.5+dt+ut)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+lt)*z,(.5-it+ut)*tt,(1-.5+it+lt)*z,(.5-dt+ut)*tt,(.5+dt+lt)*z,(.5-it+ut)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-it+lt)*z,(.5+ut)*tt,(.5-dt+lt)*z,(.5-it+ut)*tt,(.5-it+lt)*z,(.5-dt+ut)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+lt)*z,(.5+it+ut)*tt,(.5-it+lt)*z,(.5+dt+ut)*tt,(.5-dt+lt)*z,(.5+it+ut)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.475*z,.85*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.425*z,.85*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.425*z,.9*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.475*z,.9*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.475*z,tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.525*z,tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.525*z,.9*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.575*z,.9*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.575*z,.85*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*tt).close()),it=.325,lt=0,ut=-.125,dt=it*gt;var Pt=new go.PathFigure((1-.5+it+lt)*z,(.5+ut)*tt,!1);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+lt)*z,(.5+it+ut)*tt,(.5+it+lt)*z,(.5+dt+ut)*tt,(.5+dt+lt)*z,(.5+it+ut)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-it+lt)*z,(.5+ut)*tt,(.5-dt+lt)*z,(.5+it+ut)*tt,(.5-it+lt)*z,(.5+dt+ut)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+lt)*z,(.5-it+ut)*tt,(.5-it+lt)*z,(.5-dt+ut)*tt,(.5-dt+lt)*z,(.5-it+ut)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+it+lt)*z,(.5+ut)*tt,(.5+dt+lt)*z,(.5-it+ut)*tt,(1-.5+it+lt)*z,(.5-dt+ut)*tt));var Pt=new go.PathFigure((.525+lt)*z,(.5+it+ut)*tt,!1);return at.add(Pt),at.spot1=new go.Spot(.232,.136),at.spot2=new go.Spot(.682,.611),at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("LogicImplies",function(ft,z,tt){var at=ft?ft.parameter1:NaN;return isNaN(at)&&(at=.2),new go.Geometry().add(new go.PathFigure((1-at)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,tt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(ft,z,tt){var at=ft?ft.parameter1:NaN;return isNaN(at)&&(at=.2),new go.Geometry().add(new go.PathFigure((1-at)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,tt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Move,at*z,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,at*z,tt))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(ft,z,tt){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,tt)))}),go.Shape.defineFigureGenerator("LogicAnd",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,tt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,tt))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)).add(new go.PathSegment(go.PathSegment.Line,z,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(ft,z,tt){var at=new go.Geometry().add(new go.PathFigure(.5*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*z,.5*tt,.5*z,.5*tt)));return at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("LogicTruth",function(ft,z,tt){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,tt)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,tt,!1).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Move,.5*z,tt)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(ft,z,tt){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*tt)).add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Move,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt)))}),go.Shape.defineFigureGenerator("LogicForAll",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*tt))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(ft,z,tt){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*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Move,0,tt)).add(new go.PathSegment(go.PathSegment.Line,z,tt))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(ft,z,tt){var at=.5;return new go.Geometry().add(new go.PathFigure(0,tt,!1).add(new go.PathSegment(go.PathSegment.Line,0,at*tt)).add(new go.PathSegment(go.PathSegment.Arc,180,180,at*z,at*tt,at*z,at*tt)).add(new go.PathSegment(go.PathSegment.Line,z,tt))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(ft,z,tt){var at=.5;return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,at*tt)).add(new go.PathSegment(go.PathSegment.Arc,0,180,at*z,at*tt,at*z,at*tt)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new dn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new dn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.3);var it=ft?ft.parameter2:NaN;isNaN(it)&&(it=.3);var lt=(1-at)*z,ut=(.5-it/2)*tt,dt=(.5+it/2)*tt,Pt=new go.Geometry,At=new go.PathFigure(0,ut,!0);Pt.add(At),At.add(new go.PathSegment(go.PathSegment.Line,lt,ut)),At.add(new go.PathSegment(go.PathSegment.Line,lt,0)),At.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),At.add(new go.PathSegment(go.PathSegment.Line,lt,tt)),At.add(new go.PathSegment(go.PathSegment.Line,lt,dt)),At.add(new go.PathSegment(go.PathSegment.Line,0,dt).close()),Pt.spot1=new go.Spot(0,ut/tt);var Dt=ot(0,dt/tt,1,dt/tt,lt/z,1,1,.5,ae());return Pt.spot2=new go.Spot(Dt.x,Dt.y),Re(Dt),Pt}),go.Shape.setFigureParameter("Arrow2",0,new dn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new dn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=30),at>z&&(at=z);var it=ft?ft.parameter2:NaN;isNaN(it)&&(it=30),it=Math.min(it,tt/2);var lt=z-at,ut=(tt-it)/2,dt=ut+it,Pt=new go.Geometry,At=new go.PathFigure(0,ut,!0);Pt.add(At),At.add(new go.PathSegment(go.PathSegment.Line,lt,ut)),At.add(new go.PathSegment(go.PathSegment.Line,lt,0)),At.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),At.add(new go.PathSegment(go.PathSegment.Line,lt,tt)),At.add(new go.PathSegment(go.PathSegment.Line,lt,dt)),At.add(new go.PathSegment(go.PathSegment.Line,0,dt).close()),Pt.spot1=new go.Spot(0,ut/tt);var Dt=ot(0,dt/tt,1,dt/tt,lt/z,1,1,.5,ae());return Pt.spot2=new go.Spot(Dt.x,Dt.y),Re(Dt),Pt}),go.Shape.defineFigureGenerator("Chevron",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt).close()),at}),go.Shape.defineFigureGenerator("DoubleArrow",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,.214*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,1*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,.786*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,1*tt).close()),at}),go.Shape.setFigureParameter("DoubleEndArrow",0,new dn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.3);var it=(.5-at/2)*tt,lt=(.5+at/2)*tt,ut=new go.Geometry,dt=new go.PathFigure(z,.5*tt,!0);ut.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close());var Pt=ot(0,.5,.3,0,0,it/tt,.1,it/tt,ae());return ut.spot1=new go.Spot(Pt.x,Pt.y),Pt=ot(.7,1,1,.5,0,lt/tt,1,lt/tt,Pt),ut.spot2=new go.Spot(Pt.x,Pt.y),Re(Pt),ut}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new dn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new dn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=40);var it=ft?ft.parameter2:NaN;isNaN(it)&&(it=100);var lt=(tt-at)/2,ut=lt+at,dt=(tt-it)/2,Pt=dt+it;(at>tt||it>tt)&&(it>at?(at=at*tt/it,lt=(tt-at)/2,ut=lt+at,dt=0,Pt=tt):(lt=0,ut=tt,dt=0,Pt=tt));var At=new go.Geometry,Dt=new go.PathFigure(z,.5*tt,!0);At.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,Pt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,ut)),Dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,ut)),Dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,Pt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,dt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,lt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,lt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,dt).close());var Ft=ot(0,.5,.3,dt/tt,0,lt/tt,1,lt/tt,ae());return At.spot1=new go.Spot(Ft.x,Ft.y),Ft=ot(.7,Pt/tt,1,.5,0,ut/tt,1,ut/tt,Ft),At.spot2=new go.Spot(Ft.x,Ft.y),Re(Ft),At}),go.Shape.setFigureParameter("IBeamArrow",0,new dn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.3);var it=(.5-at/2)*tt,lt=(.5+at/2)*tt,ut=new go.Geometry,dt=new go.PathFigure(z,.5*tt,!0);ut.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ut.spot1=new go.Spot(0,it/tt);var Pt=ot(.7,1,1,.5,0,lt/tt,1,lt/tt,ae());return ut.spot2=new go.Spot(Pt.x,Pt.y),Re(Pt),ut}),go.Shape.setFigureParameter("IBeamArrow2",0,new dn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new dn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=40);var it=ft?ft.parameter2:NaN;isNaN(it)&&(it=100);var lt=(tt-at)/2,ut=lt+at,dt=(tt-it)/2,Pt=dt+it;(at>tt||it>tt)&&(it>at?(at=at*tt/it,lt=(tt-at)/2,ut=lt+at,dt=0,Pt=tt):(lt=0,ut=tt,dt=0,Pt=tt));var At=new go.Geometry,Dt=new go.PathFigure(z,.5*tt,!0);At.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,Pt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,ut)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,ut)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,Pt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,Pt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,dt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,dt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,lt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,lt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,dt).close()),At.spot1=new go.Spot(0,lt/tt);var Ft=ot(.7,Pt/tt,1,.5,0,ut/tt,1,ut/tt,ae());return At.spot2=new go.Spot(Ft.x,Ft.y),Re(Ft),At}),go.Shape.setFigureParameter("Pointer",0,new dn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.1);var it=new go.Geometry,lt=new go.PathFigure(z,.5*tt,!0);it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,at*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),it.spot1=new go.Spot(at,.35);var ut=ot(.2,.65,1,.65,0,1,1,.5,ae());return it.spot2=new go.Spot(ut.x,ut.y),Re(ut),it}),go.Shape.setFigureParameter("RoundedPointer",0,new dn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.3);var it=new go.Geometry,lt=new go.PathFigure(z,.5*tt,!0);it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,at*z,.75*tt,at*z,.25*tt).close()),it.spot1=new go.Spot(at,.35);var ut=ot(0,.65,1,.65,0,1,1,.5,ae());return it.spot2=new go.Spot(ut.x,ut.y),Re(ut),it}),go.Shape.setFigureParameter("SplitEndArrow",0,new dn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.4);var it=(.5-at/2)*tt,lt=(.5+at/2)*tt,ut=new go.Geometry,dt=new go.PathFigure(z,.5*tt,!0);ut.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ut.spot1=new go.Spot(.2,.3);var Pt=ot(.7,1,1,.5,0,lt/tt,1,lt/tt,ae());return ut.spot2=new go.Spot(Pt.x,Pt.y),Re(Pt),ut}),go.Shape.setFigureParameter("SplitEndArrow2",0,new dn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=50);var it=(tt-at)/2,lt=it+at;at>tt&&(it=0,lt=tt);var ut=new go.Geometry,dt=new go.PathFigure(z,.5*tt,!0);ut.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ut.spot1=new go.Spot(.2,it/tt);var Pt=ot(.7,1,1,.5,0,lt/tt,1,lt/tt,ae());return ut.spot2=new go.Spot(Pt.x,Pt.y),Re(Pt),ut}),go.Shape.setFigureParameter("SquareArrow",0,new dn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.7);var it=new go.Geometry,lt=new go.PathFigure(z,.5*tt,!0);return it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,at*z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,at*z,0).close()),it.spot1=go.Spot.TopLeft,it.spot2=new go.Spot(at,1),it}),go.Shape.defineFigureGenerator("Cone1",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=gt*.1,ut=new go.PathFigure(0,.9*tt,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,(.9+lt)*tt,(.5+it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*tt,(.5-it)*z,tt,0,(.9+lt)*tt).close()),at.spot1=new go.Spot(.25,.5),at.spot2=new go.Spot(.75,.97),at}),go.Shape.defineFigureGenerator("Cone2",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.9*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*tt,(1-.85/.9)*z,tt,.85/.9*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,0,.9*tt).close());var lt=new go.PathFigure(0,.9*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*tt,(1-.85/.9)*z,.8*tt,.85/.9*z,.8*tt)),at.spot1=new go.Spot(.25,.5),at.spot2=new go.Spot(.75,.82),at}),go.Shape.defineFigureGenerator("Cube1",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.15*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,0,.15*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.85*tt).close());var lt=new go.PathFigure(.5*z,tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.15*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.15*tt)),at.spot1=new go.Spot(0,.3),at.spot2=new go.Spot(.5,.85),at}),go.Shape.defineFigureGenerator("Cube2",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.3*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,0).close());var lt=new go.PathFigure(0,.3*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.7*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.7*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)),at.spot1=new go.Spot(0,.3),at.spot2=new go.Spot(.7,1),at}),go.Shape.defineFigureGenerator("Cylinder1",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=5),at=Math.min(at,tt/3);var it=new go.Geometry,lt=gt*.5,ut=new go.PathFigure(0,at,!0);it.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,gt*at,(.5-lt)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,1*z,at,(.5+lt)*z,0,1*z,gt*at)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt-at)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*tt,1*z,tt-gt*at,(.5+lt)*z,1*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,tt-at,(.5-lt)*z,1*tt,0,tt-gt*at)),ut.add(new go.PathSegment(go.PathSegment.Line,0,at));var dt=new go.PathFigure(z,at,!1);return it.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*at,1*z,2*at-gt*at,(.5+lt)*z,2*at)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,at,(.5-lt)*z,2*at,0,2*at-gt*at)),it.spot1=new go.Spot(0,0,0,2*at),it.spot2=new go.Spot(1,1),it}),go.Shape.defineFigureGenerator("Cylinder2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=5),at=Math.min(at,tt/3);var it=new go.Geometry,lt=gt*.5,ut=new go.PathFigure(0,tt-at,!0);it.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,0,at)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,gt*at,(.5-lt)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,at,(.5+lt)*z,0,z,gt*at)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt-at)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,tt-gt*at,(.5+lt)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,tt-at,(.5-lt)*z,tt,0,tt-gt*at));var dt=new go.PathFigure(0,tt-at,!1);return it.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt-2*at,0,tt-at-gt*at,(.5-lt)*z,tt-2*at)),dt.add(new go.PathSegment(go.PathSegment.Bezier,z,tt-at,(.5+lt)*z,tt-2*at,z,tt-at-gt*at)),it.spot1=new go.Spot(0,0),it.spot2=new go.Spot(1,1,0,-2*at),it}),go.Shape.defineFigureGenerator("Cylinder3",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=5),at=Math.min(at,z/3);var it=new go.Geometry,lt=gt*.5,ut=new go.PathFigure(at,0,!0);it.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z-at,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,z-gt*at,0,z,(.5-lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z-at,tt,z,(.5+lt)*tt,z-gt*at,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,at,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*tt,gt*at,tt,0,(.5+lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,(.5-lt)*tt,gt*at,0));var dt=new go.PathFigure(at,0,!1);return it.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,2*at,.5*tt,at+gt*at,0,2*at,(.5-lt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,at,tt,2*at,(.5+lt)*tt,at+gt*at,tt)),it.spot1=new go.Spot(0,0,2*at,0),it.spot2=new go.Spot(1,1),it}),go.Shape.defineFigureGenerator("Cylinder4",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=5),at=Math.min(at,z/3);var it=new go.Geometry,lt=gt*.5,ut=new go.PathFigure(z-at,0,!0);it.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,z-gt*at,0,z,(.5-lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z-at,tt,z,(.5+lt)*tt,z-gt*at,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,at,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*tt,gt*at,tt,0,(.5+lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,(.5-lt)*tt,gt*at,0)),ut.add(new go.PathSegment(go.PathSegment.Line,z-at,0));var dt=new go.PathFigure(z-at,0,!1);return it.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,z-2*at,.5*tt,z-at-gt*at,0,z-2*at,(.5-lt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,z-at,tt,z-2*at,(.5+lt)*tt,z-at-gt*at,tt)),it.spot1=new go.Spot(0,0),it.spot2=new go.Spot(1,1,-2*at,0),it}),go.Shape.defineFigureGenerator("Prism1",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.25*z,.25*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var lt=new go.PathFigure(.25*z,.25*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),at.spot1=new go.Spot(.408,.172),at.spot2=new go.Spot(.833,.662),at}),go.Shape.defineFigureGenerator("Prism2",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.25*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var lt=new go.PathFigure(0,tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.25*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*tt)),at.spot1=new go.Spot(.25,.5),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("Pyramid1",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.75*tt).close());var lt=new go.PathFigure(.5*z,0,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),at.spot1=new go.Spot(.25,.367),at.spot2=new go.Spot(.75,.875),at}),go.Shape.defineFigureGenerator("Pyramid2",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.85*tt).close());var lt=new go.PathFigure(.5*z,0,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.85*tt)),at.spot1=new go.Spot(.25,.367),at.spot2=new go.Spot(.75,.875),at}),go.Shape.defineFigureGenerator("Actor",function(ft,z,tt){var at=new go.Geometry,it=.2,lt=.1,ut=gt*it,dt=gt*lt,Pt=.5,At=.1,Dt=new go.PathFigure(Pt*z,(At+lt)*tt,!0);at.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-it)*z,At*tt,(Pt-ut)*z,(At+lt)*tt,(Pt-it)*z,(At+dt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-lt)*tt,(Pt-it)*z,(At-dt)*tt,(Pt-ut)*z,(At-lt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+it)*z,At*tt,(Pt+ut)*z,(At-lt)*tt,(Pt+it)*z,(At-dt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At+lt)*tt,(Pt+it)*z,(At+dt)*tt,(Pt+ut)*z,(At+lt)*tt));var Ft=.05,Nt=gt*Ft;Pt=.05,At=.25;var jt=new go.PathFigure(.5*z,.2*tt,!0);return at.add(jt),jt.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*tt)),Pt=.95,At=.25,jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+Ft)*z,At*tt,(Pt+Nt)*z,(At-Ft)*tt,(Pt+Ft)*z,(At-Nt)*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,z,.6*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*tt)),Ft=.025,Nt=gt*Ft,Pt=.825,At=.35,jt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-Ft)*tt,(Pt+Ft)*z,(At-Nt)*tt,(Pt+Nt)*z,(At-Ft)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-Ft)*z,At*tt,(Pt-Nt)*z,(At-Ft)*tt,(Pt-Ft)*z,(At-Nt)*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.8*z,tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.55*z,tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*tt)),Ft=.05,Nt=gt*Ft,Pt=.5,At=.7,jt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-Ft)*tt,(Pt+Ft)*z,(At-Nt)*tt,(Pt+Nt)*z,(At-Ft)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-Ft)*z,At*tt,(Pt-Nt)*z,(At-Ft)*tt,(Pt-Ft)*z,(At-Nt)*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.45*z,tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.2*z,tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*tt)),Ft=.025,Nt=gt*Ft,Pt=.175,At=.35,jt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-Ft)*tt,(Pt+Ft)*z,(At-Nt)*tt,(Pt+Nt)*z,(At-Ft)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-Ft)*z,At*tt,(Pt-Nt)*z,(At-Ft)*tt,(Pt-Ft)*z,(At-Nt)*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,0,.6*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,0,.25*tt)),Ft=.05,Nt=gt*Ft,Pt=.05,At=.25,jt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-Ft)*tt,(Pt-Ft)*z,(At-Nt)*tt,(Pt-Nt)*z,(At-Ft)*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*tt)),at.spot1=new go.Spot(.2,.2),at.spot2=new go.Spot(.8,.65),at}),go.Shape.setFigureParameter("Card",0,new dn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.2);var it=new go.Geometry,lt=new go.PathFigure(z,0,!0);return it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,at*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,at*z,0).close()),it.spot1=new go.Spot(0,at),it.spot2=go.Spot.BottomRight,it}),go.Shape.defineFigureGenerator("Collate",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,.5*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt));var lt=new go.PathFigure(.5*z,.5*tt,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),at.spot1=new go.Spot(.25,0),at.spot2=new go.Spot(.75,.25),at}),go.Shape.defineFigureGenerator("CreateRequest",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.1);var lt=new go.PathFigure(0,0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var ut=new go.PathFigure(0,it*tt,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,it*tt)),ut.add(new go.PathSegment(go.PathSegment.Move,0,(1-it)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,(1-it)*tt)),at}),go.Shape.defineFigureGenerator("Database",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=gt*.1,ut=new go.PathFigure(z,.1*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,(.9+lt)*tt,(.5+it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*tt,(.5-it)*z,tt,0,(.9+lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,.1*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-lt)*tt,(.5-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*tt,(.5+it)*z,0,z,(.1-lt)*tt));var dt=new go.PathFigure(z,.1*tt,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*tt,z,(.1+lt)*tt,(.5+it)*z,.2*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*tt,(.5-it)*z,.2*tt,0,(.1+lt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,z,.2*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*tt,z,(.2+lt)*tt,(.5+it)*z,.3*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*tt,(.5-it)*z,.3*tt,0,(.2+lt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,z,.3*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*tt,z,(.3+lt)*tt,(.5+it)*z,.4*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*tt,(.5-it)*z,.4*tt,0,(.3+lt)*tt)),at.spot1=new go.Spot(0,.4),at.spot2=new go.Spot(1,.9),at}),go.Shape.defineFigureGenerator("DataStorage",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,tt,z,0,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.9*tt,.25*z,.1*tt).close()),at.spot1=new go.Spot(.226,0),at.spot2=new go.Spot(.81,1),at}),go.Shape.defineFigureGenerator("DiskStorage",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=gt*.1,ut=new go.PathFigure(z,.1*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,(.9+lt)*tt,(.5+it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*tt,(.5-it)*z,tt,0,(.9+lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,.1*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-lt)*tt,(.5-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*tt,(.5+it)*z,0,z,(.1-lt)*tt));var dt=new go.PathFigure(z,.1*tt,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*tt,z,(.1+lt)*tt,(.5+it)*z,.2*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*tt,(.5-it)*z,.2*tt,0,(.1+lt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,z,.2*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*tt,z,(.2+lt)*tt,(.5+it)*z,.3*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*tt,(.5-it)*z,.3*tt,0,(.2+lt)*tt)),at.spot1=new go.Spot(0,.3),at.spot2=new go.Spot(1,.9),at}),go.Shape.defineFigureGenerator("Display",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.25*z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,tt,z,0,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.25*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt).close()),at.spot1=new go.Spot(.25,0),at.spot2=new go.Spot(.75,1),at}),go.Shape.defineFigureGenerator("DividedEvent",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)?it=.2:it<.15&&(it=.15);var lt=gt*.2,ut=new go.PathFigure(0,.2*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-lt)*tt,(.2-lt)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*tt,(.8+lt)*z,0,z,(.2-lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,.8*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,tt,z,(.8+lt)*tt,(.8+lt)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.2*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*tt,(.2-lt)*z,tt,0,(.8+lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,.2*tt));var dt=new go.PathFigure(0,it*tt,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z,it*tt)),at}),go.Shape.defineFigureGenerator("DividedProcess",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;(isNaN(it)||it<.1)&&(it=.1);var lt=new go.PathFigure(0,0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var ut=new go.PathFigure(0,it*tt,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,it*tt)),at}),go.Shape.defineFigureGenerator("Document",function(ft,z,tt){var at=new go.Geometry;tt=tt/.8;var it=new go.PathFigure(0,.7*tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*tt,.5*z,.4*tt,.5*z,tt).close()),at.spot1=go.Spot.TopLeft,at.spot2=new go.Spot(1,.6),at}),go.Shape.defineFigureGenerator("ExternalOrganization",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;(isNaN(it)||it<.2)&&(it=.2);var lt=new go.PathFigure(0,0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var ut=new go.PathFigure(it*z,0,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,0,it*tt)),ut.add(new go.PathSegment(go.PathSegment.Move,z,it*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,(1-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Move,0,(1-it)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,it*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Move,(1-it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,(1-it)*tt)),at}),go.Shape.defineFigureGenerator("ExternalProcess",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt).close());var lt=new go.PathFigure(.1*z,.4*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.9*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.6*z,.1*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.1*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*z,.9*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.9*tt)),at.spot1=new go.Spot(.25,.25),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("File",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var lt=new go.PathFigure(.75*z,0,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)),at.spot1=new go.Spot(0,.25),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("Interrupt",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z,.5*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt));var lt=new go.PathFigure(z,.5*tt,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt));var ut=new go.PathFigure(z,.5*tt,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,0)),at.spot1=new go.Spot(0,.25),at.spot2=new go.Spot(.5,.75),at}),go.Shape.defineFigureGenerator("InternalStorage",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN,lt=ft?ft.parameter2:NaN;isNaN(it)&&(it=.1),isNaN(lt)&&(lt=.1);var ut=new go.PathFigure(0,0,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var dt=new go.PathFigure(it*z,0,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,it*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Move,0,lt*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,z,lt*tt)),at}),go.Shape.defineFigureGenerator("Junction",function(ft,z,tt){var at=new go.Geometry,it=1/Math.SQRT2,lt=(1-1/Math.SQRT2)/2,ut=gt*.5,dt=.5,Pt=new go.PathFigure(z,dt*tt,!0);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,dt*z,tt,z,(dt+ut)*tt,(dt+ut)*z,tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,dt*tt,(dt-ut)*z,tt,0,(dt+ut)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,dt*z,0,0,(dt-ut)*tt,(dt-ut)*z,0)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,z,dt*tt,(dt+ut)*z,0,z,(dt-ut)*tt));var At=new go.PathFigure((lt+it)*z,(lt+it)*tt,!1);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Line,lt*z,lt*tt)),At.add(new go.PathSegment(go.PathSegment.Move,lt*z,(lt+it)*tt)),At.add(new go.PathSegment(go.PathSegment.Line,(lt+it)*z,lt*tt)),at}),go.Shape.defineFigureGenerator("LinedDocument",function(ft,z,tt){var at=new go.Geometry;tt=tt/.8;var it=new go.PathFigure(0,.7*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*tt,.5*z,.4*tt,.5*z,tt).close());var lt=new go.PathFigure(.1*z,0,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.1*z,.75*tt)),at.spot1=new go.Spot(.1,0),at.spot2=new go.Spot(1,.6),at}),go.Shape.defineFigureGenerator("LoopLimit",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt).close()),at.spot1=new go.Spot(0,.25),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("MagneticTape",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=.5,ut=new go.PathFigure(.5*z,tt,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*tt,(lt-it)*z,tt,0,(lt+it)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,lt*z,0,0,(lt-it)*tt,(lt-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,lt*tt,(lt+it)*z,0,z,(lt-it)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,(lt+.1)*z,.9*tt,z,(lt+it)*tt,(lt+it)*z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),at.spot1=new go.Spot(.15,.15),at.spot2=new go.Spot(.85,.8),at}),go.Shape.defineFigureGenerator("ManualInput",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.25*tt).close()),at.spot1=new go.Spot(0,.25),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("MessageFromUser",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.7);var lt=new go.PathFigure(0,0,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,it*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at.spot1=go.Spot.TopLeft,at}),go.Shape.defineFigureGenerator("MicroformProcessing",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.25);var lt=new go.PathFigure(0,0,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,it*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,(1-it)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at}),go.Shape.defineFigureGenerator("MicroformRecording",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.15*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at.spot1=new go.Spot(0,.25),at.spot2=new go.Spot(1,.75),at}),go.Shape.defineFigureGenerator("MultiDocument",function(ft,z,tt){var at=new go.Geometry;tt=tt/.8;var it=new go.PathFigure(z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.44*tt,.96*z,.47*tt,.93*z,.45*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.54*tt,.86*z,.57*tt,.83*z,.55*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*tt,.4*z,.4*tt,.4*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,0).close());var lt=new go.PathFigure(.1*z,.2*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.54*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,.44*tt)),at.spot1=new go.Spot(0,.25),at.spot2=new go.Spot(.8,.77),at}),go.Shape.defineFigureGenerator("MultiProcess",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.1*z,.1*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*tt).close());var lt=new go.PathFigure(.2*z,.1*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1*z,.2*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*tt)),at.spot1=new go.Spot(0,.2),at.spot2=new go.Spot(.8,1),at}),go.Shape.defineFigureGenerator("OfflineStorage",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.1);var lt=1-it,ut=new go.PathFigure(0,0,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt).close());var dt=new go.PathFigure(.5*it*z,it*tt,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*it)*z,it*tt)),at}),go.Shape.defineFigureGenerator("OffPageConnector",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at.spot1=go.Spot.TopLeft,at.spot2=new go.Spot(.75,1),at}),go.Shape.defineFigureGenerator("Or",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=.5,ut=new go.PathFigure(z,lt*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,lt*z,tt,z,(lt+it)*tt,(lt+it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*tt,(lt-it)*z,tt,0,(lt+it)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,lt*z,0,0,(lt-it)*tt,(lt-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,lt*tt,(lt+it)*z,0,z,(lt-it)*tt));var dt=new go.PathFigure(z,.5*tt,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,.5*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),at}),go.Shape.defineFigureGenerator("PaperTape",function(ft,z,tt){var at=new go.Geometry;tt=tt/.8;var it=new go.PathFigure(0,.7*tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.3*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,z,.3*tt,.5*z,.6*tt,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*tt,.5*z,.4*tt,.5*z,tt).close()),at.spot1=new go.Spot(0,.49),at.spot2=new go.Spot(1,.75),at}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN,lt=ft?ft.parameter2:NaN;isNaN(it)&&(it=.1),isNaN(lt)&&(lt=.3);var ut=new go.PathFigure(0,0,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*z,.5*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN,lt=ft?ft.parameter2:NaN;isNaN(it)&&(it=.1),isNaN(lt)&&(lt=.3);var ut=new go.PathFigure(0,0,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at}),go.Shape.defineFigureGenerator("Procedure",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.1);var lt=new go.PathFigure(0,0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var ut=new go.PathFigure((1-it)*z,0,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,(1-it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Move,it*z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,it*z,tt)),at}),go.Shape.defineFigureGenerator("Process",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.1);var lt=new go.PathFigure(0,0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var ut=new go.PathFigure(it*z,0,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,it*z,tt)),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("Sort",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt).close());var lt=new go.PathFigure(0,.5*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),at.spot1=new go.Spot(.25,.25),at.spot2=new go.Spot(.75,.5),at}),go.Shape.defineFigureGenerator("Start",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.25);var lt=new go.PathFigure(it*z,0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*tt,.25*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*tt,.25*z,.5*tt));var ut=new go.PathFigure(it*z,0,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,it*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Move,(1-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,(1-it)*z,tt)),at.spot1=new go.Spot(it,0),at.spot2=new go.Spot(1-it,1),at}),go.Shape.defineFigureGenerator("Terminator",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.25*z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*tt,.25*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*tt,.25*z,.5*tt)),at.spot1=new go.Spot(.23,0),at.spot2=new go.Spot(.77,1),at}),go.Shape.defineFigureGenerator("TransmittalTape",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.1);var lt=new go.PathFigure(0,0,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*z,(1-it)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,(1-it)*tt).close()),at.spot1=go.Spot.TopLeft,at}),go.Shape.defineFigureGenerator("AndGate",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=new go.PathFigure(0,0,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,(.5+it)*z,0,z,(.5-it)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,(.5+it)*tt,(.5+it)*z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at.spot1=go.Spot.TopLeft,at.spot2=new go.Spot(.55,1),at}),go.Shape.defineFigureGenerator("Buffer",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at.spot1=new go.Spot(0,.25),at.spot2=new go.Spot(.5,.75),at}),go.Shape.defineFigureGenerator("Clock",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=.5,ut=new go.PathFigure(z,lt*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,lt*z,tt,z,(lt+it)*tt,(lt+it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*tt,(lt-it)*z,tt,0,(lt+it)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,lt*z,0,0,(lt-it)*tt,(lt-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,lt*tt,(lt+it)*z,0,z,(lt-it)*tt));var dt=new go.PathFigure(z,lt*tt,!1);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z,lt*tt));var Pt=new go.PathFigure(.8*z,.75*tt,!1);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.25*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.25*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.75*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.75*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.25*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.25*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.75*tt)),at}),go.Shape.defineFigureGenerator("Ground",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.3*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.7*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.4*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,tt)),at}),go.Shape.defineFigureGenerator("Inverter",function(ft,z,tt){var at=new go.Geometry,it=gt*.1,lt=.1,ut=.9,dt=.5,Pt=new go.PathFigure(.8*z,.5*tt,!0);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Pt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*tt));var At=new go.PathFigure((ut+lt)*z,dt*tt,!0);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,(ut+it)*z,(dt-lt)*tt,(ut+lt)*z,(dt-it)*tt)),at.spot1=new go.Spot(0,.25),at.spot2=new go.Spot(.4,.75),at}),go.Shape.defineFigureGenerator("NandGate",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=gt*.4,ut=gt*.1,dt=.1,Pt=.9,At=.5,Dt=new go.PathFigure(.8*z,.5*tt,!0);at.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,tt,.8*z,(.5+lt)*tt,(.4+it)*z,tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Dt.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*tt,(.4+it)*z,0,.8*z,(.5-lt)*tt));var Ft=new go.PathFigure((Pt+dt)*z,At*tt,!0);return at.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At+dt)*tt,(Pt+dt)*z,(At+ut)*tt,(Pt+ut)*z,(At+dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-dt)*z,At*tt,(Pt-ut)*z,(At+dt)*tt,(Pt-dt)*z,(At+ut)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-dt)*tt,(Pt-dt)*z,(At-ut)*tt,(Pt-ut)*z,(At-dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+dt)*z,At*tt,(Pt+ut)*z,(At-dt)*tt,(Pt+dt)*z,(At-ut)*tt)),at.spot1=new go.Spot(0,.05),at.spot2=new go.Spot(.55,.95),at}),go.Shape.defineFigureGenerator("NorGate",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*it,ut=0,dt=.5,Pt=new go.PathFigure(.8*z,.5*tt,!0);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,tt,.7*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*tt,.25*z,.25*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*tt,(ut+lt)*z,(dt-it)*tt,.7*z,(dt-lt)*tt)),it=.1,lt=gt*.1,ut=.9,dt=.5;var At=new go.PathFigure((ut-it)*z,dt*tt,!0);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(ut-it)*z,dt*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt)),at.spot1=new go.Spot(.2,.25),at.spot2=new go.Spot(.6,.75),at}),go.Shape.defineFigureGenerator("OrGate",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*it,ut=0,dt=.5,Pt=new go.PathFigure(0,0,!0);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,(ut+lt+lt)*z,(dt-it)*tt,.8*z,(dt-lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,tt,.8*z,(dt+lt)*tt,(ut+lt+lt)*z,(dt+it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*tt,.25*z,.25*tt).close()),at.spot1=new go.Spot(.2,.25),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("XnorGate",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*it,ut=.2,dt=.5,Pt=new go.PathFigure(.1*z,0,!1);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,tt,.35*z,.25*tt,.35*z,.75*tt));var At=new go.PathFigure(.8*z,.5*tt,!0);at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,tt,.7*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*tt,.45*z,.25*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*tt,(ut+lt)*z,(dt-it)*tt,.7*z,(dt-lt)*tt)),it=.1,lt=gt*.1,ut=.9,dt=.5;var Dt=new go.PathFigure((ut-it)*z,dt*tt,!0);return at.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-it)*z,dt*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt)),at.spot1=new go.Spot(.4,.25),at.spot2=new go.Spot(.65,.75),at}),go.Shape.defineFigureGenerator("XorGate",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*it,ut=.2,dt=.5,Pt=new go.PathFigure(.1*z,0,!1);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,tt,.35*z,.25*tt,.35*z,.75*tt));var At=new go.PathFigure(.2*z,0,!0);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,(ut+lt)*z,(dt-it)*tt,.9*z,(dt-lt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,tt,.9*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*tt,.45*z,.25*tt).close()),at.spot1=new go.Spot(.4,.25),at.spot2=new go.Spot(.8,.75),at}),go.Shape.defineFigureGenerator("Capacitor",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Move,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),at}),go.Shape.defineFigureGenerator("Resistor",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.5*tt,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*tt)),at}),go.Shape.defineFigureGenerator("Inductor",function(ft,z,tt){var at=new go.Geometry,it=gt*.1,lt=.1,ut=.1,dt=.5,Pt=new go.PathFigure((ut-it*.5)*z,tt,!1);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,0,(ut-it)*z,tt,(ut-lt)*z,0)),ut=.3,Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,tt,(ut+lt)*z,0,(ut+it)*z,tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,0,(ut-it)*z,tt,(ut-lt)*z,0)),ut=.5,Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,tt,(ut+lt)*z,0,(ut+it)*z,tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,0,(ut-it)*z,tt,(ut-lt)*z,0)),ut=.7,Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,tt,(ut+lt)*z,0,(ut+it)*z,tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,0,(ut-it)*z,tt,(ut-lt)*z,0)),ut=.9,Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it*.5)*z,tt,(ut+lt)*z,0,(ut+it)*z,tt)),at}),go.Shape.defineFigureGenerator("ACvoltageSource",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=.5,ut=.5,dt=.5,Pt=new go.PathFigure((ut-lt)*z,dt*tt,!1);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,(ut+it)*z,(dt-lt)*tt,(ut+lt)*z,(dt-it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Move,(ut-lt+.1)*z,dt*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt-.1)*z,dt*tt,ut*z,(dt-lt)*tt,ut*z,(dt+lt)*tt)),at}),go.Shape.defineFigureGenerator("DCvoltageSource",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.75*tt,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Move,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),at}),go.Shape.defineFigureGenerator("Diode",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),at.spot1=new go.Spot(0,.25),at.spot2=new go.Spot(.5,.75),at}),go.Shape.defineFigureGenerator("Wifi",function(ft,z,tt){var at=new go.Geometry,it=z,lt=tt;z=z*.38,tt=tt*.6;var ut=gt*.8,dt=.8,Pt=0,At=.5,Dt=(it-z)/2,Ft=(lt-tt)/2,Nt=new go.PathFigure(Pt*z+Dt,(At+dt)*tt+Ft,!0);at.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-dt)*z+Dt,At*tt+Ft,(Pt-ut)*z+Dt,(At+dt)*tt+Ft,(Pt-dt)*z+Dt,(At+ut)*tt+Ft)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At-dt)*tt+Ft,(Pt-dt)*z+Dt,(At-ut)*tt+Ft,(Pt-ut)*z+Dt,(At-dt)*tt+Ft)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-dt+ut*.5)*z+Dt,At*tt+Ft,Pt*z+Dt,(At-dt)*tt+Ft,(Pt-dt+ut*.5)*z+Dt,(At-ut)*tt+Ft)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At+dt)*tt+Ft,(Pt-dt+ut*.5)*z+Dt,(At+ut)*tt+Ft,Pt*z+Dt,(At+dt)*tt+Ft).close()),ut=gt*.4,dt=.4,Pt=.2,At=.5;var jt=new go.PathFigure(Pt*z+Dt,(At+dt)*tt+Ft,!0);at.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-dt)*z+Dt,At*tt+Ft,(Pt-ut)*z+Dt,(At+dt)*tt+Ft,(Pt-dt)*z+Dt,(At+ut)*tt+Ft)),jt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At-dt)*tt+Ft,(Pt-dt)*z+Dt,(At-ut)*tt+Ft,(Pt-ut)*z+Dt,(At-dt)*tt+Ft)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-dt+ut*.5)*z+Dt,At*tt+Ft,Pt*z+Dt,(At-dt)*tt+Ft,(Pt-dt+ut*.5)*z+Dt,(At-ut)*tt+Ft)),jt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At+dt)*tt+Ft,(Pt-dt+ut*.5)*z+Dt,(At+ut)*tt+Ft,Pt*z+Dt,(At+dt)*tt+Ft).close()),ut=gt*.2,dt=.2,Pt=.5,At=.5;var Gt=new go.PathFigure((Pt-dt)*z+Dt,At*tt+Ft,!0);at.add(Gt),Gt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At-dt)*tt+Ft,(Pt-dt)*z+Dt,(At-ut)*tt+Ft,(Pt-ut)*z+Dt,(At-dt)*tt+Ft)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+dt)*z+Dt,At*tt+Ft,(Pt+ut)*z+Dt,(At-dt)*tt+Ft,(Pt+dt)*z+Dt,(At-ut)*tt+Ft)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At+dt)*tt+Ft,(Pt+dt)*z+Dt,(At+ut)*tt+Ft,(Pt+ut)*z+Dt,(At+dt)*tt+Ft)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-dt)*z+Dt,At*tt+Ft,(Pt-ut)*z+Dt,(At+dt)*tt+Ft,(Pt-dt)*z+Dt,(At+ut)*tt+Ft)),ut=gt*.4,dt=.4,Pt=.8,At=.5;var Wt=new go.PathFigure(Pt*z+Dt,(At-dt)*tt+Ft,!0);at.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+dt)*z+Dt,At*tt+Ft,(Pt+ut)*z+Dt,(At-dt)*tt+Ft,(Pt+dt)*z+Dt,(At-ut)*tt+Ft)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At+dt)*tt+Ft,(Pt+dt)*z+Dt,(At+ut)*tt+Ft,(Pt+ut)*z+Dt,(At+dt)*tt+Ft)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+dt-ut*.5)*z+Dt,At*tt+Ft,Pt*z+Dt,(At+dt)*tt+Ft,(Pt+dt-ut*.5)*z+Dt,(At+ut)*tt+Ft)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At-dt)*tt+Ft,(Pt+dt-ut*.5)*z+Dt,(At-ut)*tt+Ft,Pt*z+Dt,(At-dt)*tt+Ft).close()),ut=gt*.8,dt=.8,Pt=1,At=.5;var Jt=new go.PathFigure(Pt*z+Dt,(At-dt)*tt+Ft,!0);return at.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+dt)*z+Dt,At*tt+Ft,(Pt+ut)*z+Dt,(At-dt)*tt+Ft,(Pt+dt)*z+Dt,(At-ut)*tt+Ft)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At+dt)*tt+Ft,(Pt+dt)*z+Dt,(At+ut)*tt+Ft,(Pt+ut)*z+Dt,(At+dt)*tt+Ft)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+dt-ut*.5)*z+Dt,At*tt+Ft,Pt*z+Dt,(At+dt)*tt+Ft,(Pt+dt-ut*.5)*z+Dt,(At+ut)*tt+Ft)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At-dt)*tt+Ft,(Pt+dt-ut*.5)*z+Dt,(At-ut)*tt+Ft,Pt*z+Dt,(At-dt)*tt+Ft).close()),at}),go.Shape.defineFigureGenerator("Email",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var lt=new go.PathFigure(0,0,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Move,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*z,.54*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.55*z,.54*tt)),at}),go.Shape.defineFigureGenerator("Ethernet",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.35*z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.65*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.35*z,0).close());var lt=new go.PathFigure(.1*z,tt,!0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.4*z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*z,tt).close());var ut=new go.PathFigure(.6*z,tt,!0,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.9*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.6*z,tt).close());var dt=new go.PathFigure(0,.5*tt,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.25*z,.6*tt)),at}),go.Shape.defineFigureGenerator("Power",function(ft,z,tt){var at=new go.Geometry,it=gt*.4,lt=.4,ut=.5,dt=.5,Pt=ae(),At=ae(),Dt=ae(),Ft=ae();_t(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.5,Pt,Pt,At,Dt,Ft);var Nt=le(At.x,At.y),jt=new go.PathFigure(At.x*z,At.y*tt,!0);at.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,Dt.x*z,Dt.y*tt,Ft.x*z,Ft.y*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt)),_t(ut-lt,dt,ut-lt,dt-it,ut-it,dt-lt,ut,dt-lt,.5,Dt,Ft,At,Pt,Pt),jt.add(new go.PathSegment(go.PathSegment.Bezier,At.x*z,At.y*tt,Dt.x*z,Dt.y*tt,Ft.x*z,Ft.y*tt)),it=gt*.3,lt=.3,_t(ut-lt,dt,ut-lt,dt-it,ut-it,dt-lt,ut,dt-lt,.5,Dt,Ft,At,Pt,Pt),jt.add(new go.PathSegment(go.PathSegment.Line,At.x*z,At.y*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,Ft.x*z,Ft.y*tt,Dt.x*z,Dt.y*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),_t(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.5,Pt,Pt,At,Dt,Ft),jt.add(new go.PathSegment(go.PathSegment.Bezier,At.x*z,At.y*tt,Ft.x*z,Ft.y*tt,Dt.x*z,Dt.y*tt).close());var jt=new go.PathFigure(.45*z,0,!0);return at.add(jt),jt.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),Re(Pt),Re(At),Re(Dt),Re(Ft),Re(Nt),at.spot1=new go.Spot(.25,.45),at.spot2=new go.Spot(.75,.8),at}),go.Shape.defineFigureGenerator("Fallout",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt/2,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Arc,180,360,z/2,tt/2,z/2,tt/2));function lt(ut,dt,Pt){ut.add(new go.PathSegment(go.PathSegment.Move,(.3+dt)*z,(.8+Pt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,(.5+dt)*z,(.5+Pt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,(.1+dt)*z,(.5+Pt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,(.3+dt)*z,(.8+Pt)*tt).close())}return lt(it,0,0),lt(it,.4,0),lt(it,.2,-.3),at}),go.Shape.defineFigureGenerator("IrritationHazard",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.2*z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.2*tt).close()),at.spot1=new go.Spot(.3,.3),at.spot2=new go.Spot(.7,.7),at}),go.Shape.defineFigureGenerator("ElectricalHazard",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.37*z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.11*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.77*z,.04*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.33*z,.49*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.37*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.63*z,.86*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.77*z,.91*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.34*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.34*z,.78*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.44*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.65*z,.56*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.68*tt).close()),at}),go.Shape.defineFigureGenerator("FireHazard",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.1*z,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,.29*z,0,-.25*z,.63*tt,.45*z,.44*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.51*z,.42*tt,.48*z,.17*tt,.54*z,.35*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.59*z,.18*tt,.59*z,.29*tt,.58*z,.28*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,.6*tt,.8*z,.34*tt,.88*z,.43*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.88*z,.31*tt,.87*z,.48*tt,.88*z,.43*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,tt,1.17*z,.76*tt,.82*z,.8*tt).close()),at.spot1=new go.Spot(.07,.445),at.spot2=new go.Spot(.884,.958),at}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=0,ut=0,dt=it*gt,Pt=.4*Math.SQRT2/2+.5,At=.5-.5*Math.SQRT2/2,Dt=1,Ft=.5,Nt=.5,jt=0,Gt=new go.PathFigure(Pt*z,(1-At)*tt,!1);return at.add(Gt),Gt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,Ft*tt,Dt*z,.7*tt,Dt*z,Ft*tt)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+lt)*z,(jt+lt)*tt,(.5+it+lt)*z,(.5-dt+lt)*tt,(.5+dt+lt)*z,(.5-it+lt)*tt)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-it+lt)*z,(.5+ut)*tt,(.5-dt+lt)*z,(.5-it+ut)*tt,(.5-it+lt)*z,(.5-dt+ut)*tt)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,(.35+lt)*z,.9*tt,(.5-it+lt)*z,(.5+dt+ut)*tt,(.5-dt+lt)*z,.9*tt)),Gt.add(new go.PathSegment(go.PathSegment.Move,(.25+lt)*z,.8*tt)),Gt.add(new go.PathSegment(go.PathSegment.Line,(.35+lt)*z,.9*tt)),Gt.add(new go.PathSegment(go.PathSegment.Line,(.2+lt)*z,.95*tt)),at}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Move,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),at}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Move,0,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Move,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),at}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);at.add(it);var lt=new go.PathFigure(z,tt,!1);at.add(lt);var ut=new go.PathFigure(0,.5*tt,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*tt,.2*z,.35*tt,.3*z,.35*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,.7*z,.65*tt,.8*z,.65*tt)),at}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.5*tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt).close()),at}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.2*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt).close());var it=new go.PathFigure(0,.2*tt,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.2*tt)),at}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.7*z,tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,0,.6*z,.5*tt,0,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.7*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,tt,.4*z,.5*tt,z,.5*tt).close());var lt=new go.PathFigure(.45*z,.73*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.7*z,.73*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.38*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.63*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.31*z,.27*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.56*z,.27*tt)),at}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);at.add(it);var lt=new go.PathFigure(.335*z,(1-.555)*tt,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,z,.68*tt,(1-.12)*z,.46*tt,(1-.02)*z,.54*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.68*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.335*z,(1-.555)*tt,.02*z,.54*tt,.12*z,.46*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.365*z,(1-.595)*tt));var ut=.5-.285,dt=.5,Pt=ut,At=Math.PI/4,Dt=4*(1-Math.cos(At))/(3*Math.sin(At)),Ft=Dt*.5,Nt=ut,jt=ut,Gt=Dt*Nt,Wt=Dt*jt;lt.add(new go.PathSegment(go.PathSegment.Bezier,(dt-Nt)*z,Pt*tt,(dt-(Gt+Nt)/2)*z,(Pt+(jt+Wt)/2)*tt,(dt-Nt)*z,(Pt+Wt)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,dt*z,(Pt-jt)*tt,(dt-Nt)*z,(Pt-Wt)*tt,(dt-Gt)*z,(Pt-jt)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(dt+Nt)*z,Pt*tt,(dt+Gt)*z,(Pt-jt)*tt,(dt+Nt)*z,(Pt-Wt)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*tt,(dt+Nt)*z,(Pt+Wt)*tt,(dt+(Gt+Nt)/2)*z,(Pt+(jt+Wt)/2)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*z,(1-.595)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*tt));var Jt=new go.PathFigure(.2*z,tt,!1);at.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*tt));var Ut=new go.PathFigure(.8*z,tt,!1);return at.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*tt)),at}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.1*z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,tt).close());var lt=new go.PathFigure(.2*z,.2*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*z,.8*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*tt)),at}),go.Shape.defineFigureGenerator("BpmnEventError",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.66*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.66*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.33*z,.5*tt).close()),at}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);at.add(it);var lt=new go.PathFigure(z,tt,!1);at.add(lt);var ut=new go.PathFigure(.1*z,tt,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,.9*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt).close()),at}),go.Shape.defineFigureGenerator("Caution",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.05*z,tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.8*tt,0,tt,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.45*z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.1*tt,.5*z,0,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.95*z,.9*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,tt,z,tt,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.05*z,tt));var lt=.05;return it.add(new go.PathSegment(go.PathSegment.Move,(.5-lt)*z,.875*tt)),it.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*z,.875*tt,lt*z,lt*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.325*tt,.575*z,.725*tt,.625*z,.375*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.75*tt,.375*z,.375*tt,.425*z,.725*tt)),at}),go.Shape.defineFigureGenerator("Recycle",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.45*z,.95*tt,!1);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,.95*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.185*z,.85*tt,.17*z,.95*tt,.15*z,.9*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.235*z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,.625*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.35*z,.65*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.275*z,.45*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.05*z,.45*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.05*z,.575*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.1875*z,.95*tt,0,.675*tt,0,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.45*z,.95*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.45*z,.775*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.22*z,.775*tt));var lt=new go.PathFigure(.475*z,.2*tt,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.225*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.275*z,.175*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.325*z,.05*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.05*tt,.35*z,0,.375*z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.575*z,.375*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.525*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*z,.475*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*z,.315*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.32*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*z,.05*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,0,.65*z,.05*tt,.625*z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.38*z,.0105*tt));var ut=new go.PathFigure(.675*z,.575*tt,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,.775*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*tt,z,.8*tt,z,.85*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.65*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,.775*tt)),ut.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.775*z,.775*tt)),at}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*.5,ut=new go.PathFigure(z,it*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,it*z,tt,z,(it+lt)*tt,(it+lt)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,it*tt,(it-lt)*z,tt,0,(it+lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,it*z,0,0,(it-lt)*tt,(it-lt)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,it*tt,(it+lt)*z,0,z,(it-lt)*tt));var dt=new go.PathFigure(it*z,0,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,it*z,.15*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,it*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,it*z,.85*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,0,it*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.15*z,it*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,z,it*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.85*z,it*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,it*z,it*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,it*z,it*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.78*z,.54*tt)),at}),go.Shape.defineFigureGenerator("Package",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.15*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.15*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var lt=new go.PathFigure(0,.15*tt,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*z,.15*tt).close()),at.spot1=new go.Spot(0,.1),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Class",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var lt=new go.PathFigure(0,.2*tt,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,.2*tt).close());var ut=new go.PathFigure(0,.5*tt,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt).close()),at}),go.Shape.defineFigureGenerator("Component",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z,tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.15*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.15*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt).close());var lt=new go.PathFigure(0,.2*tt,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.45*z,.2*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*tt).close());var ut=new go.PathFigure(0,.6*tt,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,.6*tt).close()),at}),go.Shape.defineFigureGenerator("Boat Shipment",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.15*z,.6*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.15*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.85*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*tt));var lt=new go.PathFigure(.15*z,.6*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*tt)),at}),go.Shape.defineFigureGenerator("Customer/Supplier",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.66*z,.33*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.66*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.33*z,.33*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,0,.33*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt).close()),at}),go.Shape.defineFigureGenerator("Workcell",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.65*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.35*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at}),go.Shape.defineFigureGenerator("Supermarket",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.33*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.33*tt)),it.add(new go.PathSegment(go.PathSegment.Move,z,.33*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.66*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.66*tt)),it.add(new go.PathSegment(go.PathSegment.Move,z,.66*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),at}),go.Shape.defineFigureGenerator("TruckShipment",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var lt=new go.PathFigure(z,.8*tt,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.8*tt).close());var ut=.1,dt=gt*.1,Pt=.2,At=.9,Dt=new go.PathFigure((Pt-ut)*z,At*tt,!0);at.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-ut)*tt,(Pt-ut)*z,(At-dt)*tt,(Pt-dt)*z,(At-ut)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+ut)*z,At*tt,(Pt+dt)*z,(At-ut)*tt,(Pt+ut)*z,(At-dt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At+ut)*tt,(Pt+ut)*z,(At+dt)*tt,(Pt+dt)*z,(At+ut)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-ut)*z,At*tt,(Pt-dt)*z,(At+ut)*tt,(Pt-ut)*z,(At+dt)*tt).close()),ut=.1,dt=gt*.1,Pt=.8,At=.9;var Ft=new go.PathFigure((Pt-ut)*z,At*tt,!0);return at.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-ut)*tt,(Pt-ut)*z,(At-dt)*tt,(Pt-dt)*z,(At-ut)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+ut)*z,At*tt,(Pt+dt)*z,(At-ut)*tt,(Pt+ut)*z,(At-dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At+ut)*tt,(Pt+ut)*z,(At+dt)*tt,(Pt+dt)*z,(At+ut)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-ut)*z,At*tt,(Pt-dt)*z,(At+ut)*tt,(Pt-ut)*z,(At+dt)*tt).close()),at}),go.Shape.defineFigureGenerator("KanbanPost",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.2*z,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,tt)),at}),go.Shape.defineFigureGenerator("Forklift",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,0,0));var lt=new go.PathFigure(0,.5*tt,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt));var ut=new go.PathFigure(.5*z,.8*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*tt));var dt=new go.PathFigure(.5*z,.7*tt,!1);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z,.7*tt));var Pt=.1,At=gt*.1,Dt=.1,Ft=.9,Nt=new go.PathFigure((Dt-Pt)*z,Ft*tt,!0);at.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,(Ft-Pt)*tt,(Dt-Pt)*z,(Ft-At)*tt,(Dt-At)*z,(Ft-Pt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+Pt)*z,Ft*tt,(Dt+At)*z,(Ft-Pt)*tt,(Dt+Pt)*z,(Ft-At)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,(Ft+Pt)*tt,(Dt+Pt)*z,(Ft+At)*tt,(Dt+At)*z,(Ft+Pt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-Pt)*z,Ft*tt,(Dt-At)*z,(Ft+Pt)*tt,(Dt-Pt)*z,(Ft+At)*tt)),Pt=.1,At=gt*.1,Dt=.4,Ft=.9;var jt=new go.PathFigure((Dt-Pt)*z,Ft*tt,!0);return at.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,(Ft-Pt)*tt,(Dt-Pt)*z,(Ft-At)*tt,(Dt-At)*z,(Ft-Pt)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+Pt)*z,Ft*tt,(Dt+At)*z,(Ft-Pt)*tt,(Dt+Pt)*z,(Ft-At)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,(Ft+Pt)*tt,(Dt+Pt)*z,(Ft+At)*tt,(Dt+At)*z,(Ft+Pt)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-Pt)*z,Ft*tt,(Dt-At)*z,(Ft+Pt)*tt,(Dt-Pt)*z,(Ft+At)*tt)),at}),go.Shape.defineFigureGenerator("RailShipment",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.1*z,.4*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.4*tt).close());var lt=new go.PathFigure(.45*z,.7*tt,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*tt));var ut=new go.PathFigure(.55*z,.4*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*tt).close());var Dt=.05,Ft=gt*.05,Nt=.175,jt=.95,dt=new go.PathFigure((Nt-Dt)*z,jt*tt,!0);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*z,(jt-Dt)*tt,(Nt-Dt)*z,(jt-Ft)*tt,(Nt-Ft)*z,(jt-Dt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Dt)*z,jt*tt,(Nt+Ft)*z,(jt-Dt)*tt,(Nt+Dt)*z,(jt-Ft)*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*z,(jt+Dt)*tt,(Nt+Dt)*z,(jt+Ft)*tt,(Nt+Ft)*z,(jt+Dt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Dt)*z,jt*tt,(Nt-Ft)*z,(jt+Dt)*tt,(Nt-Dt)*z,(jt+Ft)*tt));var Dt=.05,Ft=gt*.05,Nt=.375,jt=.95,Pt=new go.PathFigure((Nt-Dt)*z,jt*tt,!0);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*z,(jt-Dt)*tt,(Nt-Dt)*z,(jt-Ft)*tt,(Nt-Ft)*z,(jt-Dt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Dt)*z,jt*tt,(Nt+Ft)*z,(jt-Dt)*tt,(Nt+Dt)*z,(jt-Ft)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*z,(jt+Dt)*tt,(Nt+Dt)*z,(jt+Ft)*tt,(Nt+Ft)*z,(jt+Dt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Dt)*z,jt*tt,(Nt-Ft)*z,(jt+Dt)*tt,(Nt-Dt)*z,(jt+Ft)*tt));var Dt=.05,Ft=gt*.05,Nt=.625,jt=.95,At=new go.PathFigure((Nt-Dt)*z,jt*tt,!0);at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,Nt*z,(jt-Dt)*tt,(Nt-Dt)*z,(jt-Ft)*tt,(Nt-Ft)*z,(jt-Dt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Dt)*z,jt*tt,(Nt+Ft)*z,(jt-Dt)*tt,(Nt+Dt)*z,(jt-Ft)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,Nt*z,(jt+Dt)*tt,(Nt+Dt)*z,(jt+Ft)*tt,(Nt+Ft)*z,(jt+Dt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Dt)*z,jt*tt,(Nt-Ft)*z,(jt+Dt)*tt,(Nt-Dt)*z,(jt+Ft)*tt));var Dt=.05,Ft=gt*.05,Nt=.825,jt=.95,Gt=new go.PathFigure((Nt-Dt)*z,jt*tt,!0);at.add(Gt),Gt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*z,(jt-Dt)*tt,(Nt-Dt)*z,(jt-Ft)*tt,(Nt-Ft)*z,(jt-Dt)*tt)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Dt)*z,jt*tt,(Nt+Ft)*z,(jt-Dt)*tt,(Nt+Dt)*z,(jt-Ft)*tt)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*z,(jt+Dt)*tt,(Nt+Dt)*z,(jt+Ft)*tt,(Nt+Ft)*z,(jt+Dt)*tt)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Dt)*z,jt*tt,(Nt-Ft)*z,(jt+Dt)*tt,(Nt-Dt)*z,(jt+Ft)*tt).close());var Wt=new go.PathFigure(0,tt,!1);return at.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Line,z,tt).close()),at}),go.Shape.defineFigureGenerator("Warehouse",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var lt=new go.PathFigure(0,.2*tt,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,.2*tt).close());var ut=new go.PathFigure(.15*z,tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.4*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.15*z,tt).close());var dt=.05,Pt=gt*.05,At=.35,Dt=.775,Ft=new go.PathFigure((At-dt)*z,Dt*tt,!0);return at.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,At*z,(Dt-dt)*tt,(At-dt)*z,(Dt-Pt)*tt,(At-Pt)*z,(Dt-dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(At+dt)*z,Dt*tt,(At+Pt)*z,(Dt-dt)*tt,(At+dt)*z,(Dt-Pt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,At*z,(Dt+dt)*tt,(At+dt)*z,(Dt+Pt)*tt,(At+Pt)*z,(Dt+dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(At-dt)*z,Dt*tt,(At-Pt)*z,(Dt+dt)*tt,(At-dt)*z,(Dt+Pt)*tt).close()),at}),go.Shape.defineFigureGenerator("ControlCenter",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Move,.1*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*tt).close()),at}),go.Shape.defineFigureGenerator("Bluetooth",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.75*tt,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.25*tt)),at}),go.Shape.defineFigureGenerator("Bookmark",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*tt)),at}),go.Shape.defineFigureGenerator("Bookmark",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*tt)),at}),go.Shape.defineFigureGenerator("Globe",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Move,0,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,.75*z,0,z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,.75*tt,.75*z,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*tt,.25*z,tt,0,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,.25*tt,.25*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,.15*z,.25*tt,.15*z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.85*z,.75*tt,.85*z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.15*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.15*tt,.35*z,.3*tt,.65*z,.3*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.85*tt,.35*z,.7*tt,.65*z,.7*tt)),at}),go.Shape.defineFigureGenerator("Wave",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.25*tt,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.25*tt,.1*z,0,.2*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.25*tt,.425*z,.5*tt,.575*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,z,.25*tt,.8*z,0,.9*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Move,0,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.75*tt,.1*z,.5*tt,.2*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.75*tt,.425*z,tt,.575*z,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,z,.75*tt,.8*z,.5*tt,.9*z,.5*tt)),at}),go.Shape.defineFigureGenerator("Operator",function(ft,z,tt){var at=new go.Geometry,it=.3,lt=gt*.3,ut=.5,dt=.7,Pt=new go.PathFigure((ut-it)*z,dt*tt,!0);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-it)*z,dt*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt));var At=new go.PathFigure(0,.7*tt,!1);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*tt,0,0,z,0)),at}),go.Shape.defineFigureGenerator("TripleFanBlades",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*tt,.65*z,.3*tt,.65*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.35*z,.5*tt,.35*z,.3*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,tt,.3*z,.6*tt,.1*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*tt,.2*z,tt,.35*z,.95*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,z,tt,.7*z,.6*tt,.9*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*tt,.8*z,tt,.65*z,.95*tt)),at}),go.Shape.defineFigureGenerator("CentrifugalPump",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*tt,0,.075*tt,0,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,tt,0,tt,.4*z,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.4*tt,.8*z,tt,.85*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),at}),go.Shape.defineFigureGenerator("Battery",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Move,.4*z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,.1*tt));var lt=new go.PathFigure(0,.6*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Move,0,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.4*tt)),at}),go.Shape.defineFigureGenerator("Delete",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*.5,ut=.5,dt=.5,Pt=new go.PathFigure((ut-it)*z,dt*tt,!0);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-it)*z,dt*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt));var At=new go.PathFigure(.15*z,.5*tt,!1);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*tt)),at}),go.Shape.defineFigureGenerator("Flag",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.1*tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Move,0,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.1*tt,.15*z,0,.35*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*tt,.65*z,.2*tt,.85*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*tt,.85*z,.6*tt,.65*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*tt,.35*z,.4*tt,.15*z,.4*tt).close()),at}),go.Shape.defineFigureGenerator("Help",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*.5,ut=.5,dt=.5,Pt=new go.PathFigure((ut-it)*z,dt*tt,!1);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-it)*z,dt*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt).close()),it=.05,lt=gt*.05,ut=.5,dt=.8;var At=new go.PathFigure((ut-it)*z,dt*tt,!1);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(ut-it)*z,dt*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt).close()),At.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*tt)),At.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*tt,.75*z,.475*tt,.75*z,.225*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.35*tt,.4*z,.2*tt,.3*z,.25*tt)),at}),go.Shape.defineFigureGenerator("Location",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.5*z,tt,!0).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.975*z,.025*tt,.5*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*z,.5*tt,.5*z,0,.025*z,.025*tt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*tt)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*z,.3*tt,.1*z,.1*tt).close()))}),go.Shape.defineFigureGenerator("Lock",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.5*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt));var lt=new go.PathFigure(.2*z,.5*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*tt,.25*z,0,.75*z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.3*tt)),at}),go.Shape.defineFigureGenerator("Unlocked",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.5*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt));var lt=new go.PathFigure(.2*z,.5*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*tt,.25*z,0,.75*z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.35*tt)),at}),go.Shape.defineFigureGenerator("Gear",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.9375*z,.56246875*tt,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.4375*tt)).add(new go.PathSegment(go.PathSegment.Line,.80621875*z,.4375*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.763*z,.3316875*tt,.79840625*z,.39915625*tt,.7834375*z,.3635*tt)).add(new go.PathSegment(go.PathSegment.Line,.8566875*z,.23796875*tt)).add(new go.PathSegment(go.PathSegment.Line,.76825*z,.14959375*tt)).add(new go.PathSegment(go.PathSegment.Line,.67596875*z,.24184375*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*z,.19378125*tt,.64228125*z,.2188125*tt,.603875*z,.2021875*tt)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.0625*tt)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.0625*tt)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.19378125*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*z,.239375*tt,.39759375*z,.20190625*tt,.36053125*z,.2176875*tt)).add(new go.PathSegment(go.PathSegment.Line,.2379375*z,.14959375*tt)).add(new go.PathSegment(go.PathSegment.Line,.14953125*z,.2379375*tt)).add(new go.PathSegment(go.PathSegment.Line,.23934375*z,.3278125*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*z,.4375*tt,.21765625*z,.36059375*tt,.201875*z,.397625*tt)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.4375*tt)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.5625*tt)).add(new go.PathSegment(go.PathSegment.Line,.1938125*z,.5625*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*z,.67596875*tt,.20221875*z,.603875*tt,.21884375*z,.64228125*tt)).add(new go.PathSegment(go.PathSegment.Line,.1495625*z,.76825*tt)).add(new go.PathSegment(go.PathSegment.Line,.238*z,.8566875*tt)).add(new go.PathSegment(go.PathSegment.Line,.3316875*z,.76296875*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*z,.80621875*tt,.36353125*z,.78340625*tt,.3991875*z,.79840625*tt)).add(new go.PathSegment(go.PathSegment.Line,.43753125*z,.9375*tt)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.9375*tt)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.80621875*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*z,.760625*tt,.602375*z,.79809375*tt,.63946875*z,.78234375*tt)).add(new go.PathSegment(go.PathSegment.Line,.76828125*z,.8566875*tt)).add(new go.PathSegment(go.PathSegment.Line,.85671875*z,.76825*tt)).add(new go.PathSegment(go.PathSegment.Line,.76065625*z,.67221875*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*z,.56246875*tt,.78234375*z,.63940625*tt,.798125*z,.602375*tt)).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.56246875*tt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.6*tt)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*z,.5*tt,.1*z,.1*tt).close()))}),go.Shape.defineFigureGenerator("Hand",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.5*tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.3*tt,0,.375*tt,.05*z,.325*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.075*tt,.3*z,.225*tt,.4*z,.175*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.525*z,.075*tt,.46*z,.05*tt,.525*z,.05*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.4*tt,.525*z,.275*tt,.475*z,.325*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.55*tt,z,.4*tt,z,.55*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.425*z,.55*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,.55*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.7*tt,.675*z,.55*tt,.675*z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.575*z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,.85*tt,.65*z,.7*tt,.65*z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.535*z,tt,.61*z,.85*tt,.61*z,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*tt,.435*z,tt,0,tt).close()),at}),go.Shape.defineFigureGenerator("Map",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.2*tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),it.add(new go.PathSegment(go.PathSegment.Move,.25*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Move,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*tt)),at}),go.Shape.defineFigureGenerator("Eject",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt*.7)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*.7).close());var lt=new go.PathFigure(0,tt*.6,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close()),at}),go.Shape.defineFigureGenerator("Pencil",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.9*z,tt)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*tt).close()))}),go.Shape.defineFigureGenerator("Building",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*1,tt*1,!1);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*.85)),it.add(new go.PathSegment(go.PathSegment.Line,.046*z,tt*.85)),it.add(new go.PathSegment(go.PathSegment.Line,.046*z,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*.3)),it.add(new go.PathSegment(go.PathSegment.Line,.046*z,tt*.3)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,tt*.3)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt*.3)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,tt*.85)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt*.85).close());var lt=new go.PathFigure(.126*z,.85*tt,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.126*z,.45*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.322*z,.45*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.322*z,.85*tt).close());var ut=new go.PathFigure(.402*z,.85*tt,!1);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.598*z,.85*tt).close());var dt=new go.PathFigure(.678*z,.85*tt,!1);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.874*z,.85*tt).close());var Pt=new go.PathFigure(.5*z,.1*tt,!1);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*z,.3*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*z,.3*tt).close()),at}),go.Shape.defineFigureGenerator("Staircase",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt*1,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.2,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.2,tt*.8)),it.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.8)),it.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.6)),it.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*.6)),it.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*.4)),it.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*.4)),it.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*.2)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.2)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.15)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*.15)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*.35)),it.add(new go.PathSegment(go.PathSegment.Line,z*.55,tt*.35)),it.add(new go.PathSegment(go.PathSegment.Line,z*.55,tt*.55)),it.add(new go.PathSegment(go.PathSegment.Line,z*.35,tt*.55)),it.add(new go.PathSegment(go.PathSegment.Line,z*.35,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.15,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.15,tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*.95).close()),at}),go.Shape.defineFigureGenerator("5Bars",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt*1,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.184,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.184,tt*(1-.184)).close());var lt=new go.PathFigure(z*.204,tt,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z*.204,tt*(1-.184))),lt.add(new go.PathSegment(go.PathSegment.Line,z*.388,tt*(1-.184*2))),lt.add(new go.PathSegment(go.PathSegment.Line,z*.388,tt*1).close());var ut=new go.PathFigure(z*.408,tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*.408,tt*(1-.184*2))),ut.add(new go.PathSegment(go.PathSegment.Line,z*.592,tt*(1-.184*3))),ut.add(new go.PathSegment(go.PathSegment.Line,z*.592,tt*1).close());var dt=new go.PathFigure(z*.612,tt,!0);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z*.612,tt*(1-.184*3))),dt.add(new go.PathSegment(go.PathSegment.Line,z*.796,tt*(1-.184*4))),dt.add(new go.PathSegment(go.PathSegment.Line,z*.796,tt*1).close());var Pt=new go.PathFigure(z*.816,tt,!0);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,z*.816,tt*(1-.184*4))),Pt.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*(1-.184*5))),Pt.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1).close()),at}),go.Shape.defineFigureGenerator("PC",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,0).close());var lt=new go.PathFigure(z*.055,.07*tt,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z*.245,tt*.07)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.245,tt*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.055,tt*.1).close());var ut=new go.PathFigure(z*.055,.13*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*.245,tt*.13)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.245,tt*.16)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.055,tt*.16).close());var dt=new go.PathFigure(z*.055,.18*tt,!0);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z*.245,tt*.18)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.245,tt*.21)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.055,tt*.21).close());var Pt=new go.PathFigure(z*1,0,!0);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,z*.4,0)),Pt.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.65)),Pt.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.65).close()),at}),go.Shape.defineFigureGenerator("Plane",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.55*z,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.475*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.35*z,.525*tt,0,.4*tt,.225*z,.45*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,.475*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.15*z,.35*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,.325*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,.325*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.85*z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.2*tt,.975*z,0,z,.08*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.7*z,.45*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,.95*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.55*z,tt).close()),at}),go.Shape.defineFigureGenerator("Key",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*1,tt*.5,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.9,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,.35*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.45,.35*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.15,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.35*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.65*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.15,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.45,.65*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,.65*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.6,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.65,.55*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.7,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,.55*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.8,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.85,.575*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.9,.6*tt).close()),it.add(new go.PathSegment(go.PathSegment.Move,.17*z,.425*tt)),it.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*z,.5*tt,.075*z,.075*tt).close()),at}),go.Shape.defineFigureGenerator("FilmTape",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);at.add(it),it.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*0,z*.3,z*.055)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.08,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.08,tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1));var lt=new go.PathFigure(0,0,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*0)),lt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*1,z*.3,z*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1));var ut=new go.PathFigure(z*.11,tt*.1,!1);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),tt*.1)),ut.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),tt*.8)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.11,tt*.8).close());var dt=new go.PathFigure(z*(.11+.24133333*1+.028*1),tt*.1,!1);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),tt*.1)),dt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),tt*.8)),dt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*1),tt*.8).close());var Pt=new go.PathFigure(z*(.11+.24133333*2+.028*2),tt*.1,!1);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),tt*.1)),Pt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),tt*.8)),Pt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*2),tt*.8).close()),at}),go.Shape.defineFigureGenerator("FloppyDisk",function(ft,z,tt){var at=new go.Geometry,it=8,lt=it*gt,ut=new go.PathFigure(it,0,!1);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),ut.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.14)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt-it)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z-it,tt,z,tt-lt,z-lt,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,it,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,tt-it,lt,tt,0,tt-lt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,it)),ut.add(new go.PathSegment(go.PathSegment.Bezier,it,0,0,lt,lt,0).close());var dt=new go.PathFigure(z*.83,0,!1);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z*.83,tt*.3)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.17,tt*.3)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.17,tt*0).close());var Pt=new go.PathFigure(z*.83,tt*1,!1);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,z*.83,tt*.5)),Pt.add(new go.PathSegment(go.PathSegment.Line,z*.17,tt*.5)),Pt.add(new go.PathSegment(go.PathSegment.Line,z*.17,tt*1).close());var At=new go.PathFigure(z*.78,tt*.05,!1);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*.05)),At.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*.25)),At.add(new go.PathSegment(go.PathSegment.Line,z*.78,tt*.25).close()),at}),go.Shape.defineFigureGenerator("SpeechBubble",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=15),at=Math.min(at,z/3),at=Math.min(at,tt/3);var it=at*gt,lt=tt*.8,ut=new go.Geometry,dt=new go.PathFigure(at,0,!0);return ut.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z-at,0)),dt.add(new go.PathSegment(go.PathSegment.Bezier,z,at,z-it,0,z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,z,lt-at)),dt.add(new go.PathSegment(go.PathSegment.Bezier,z-at,lt,z,lt-it,z-it,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.7,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.7,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.55,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,at,lt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,lt-at,it,lt,0,lt-it)),dt.add(new go.PathSegment(go.PathSegment.Line,0,at)),dt.add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,it,it,0).close()),it>1?(ut.spot1=new go.Spot(0,0,it,it),ut.spot2=new go.Spot(1,.8,-it,-it)):(ut.spot1=go.Spot.TopLeft,ut.spot2=new go.Spot(1,.8)),ut}),go.Shape.defineFigureGenerator("Repeat",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*0,tt*.45,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.25,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,tt*.9)),it.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*.9)),it.add(new go.PathSegment(go.PathSegment.Line,z*.65,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.2,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.2,tt*.45).close());var lt=new go.PathFigure(z*1,tt*.55,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.7,tt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.7,tt*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.35,tt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*.55).close()),at}),go.Shape.defineFigureGenerator("Windows",function(ft,z,tt){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,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close()).add(new go.PathSegment(go.PathSegment.Move,.4*z,.4*tt)).add(new go.PathSegment(go.PathSegment.Line,.4*z,.8*tt)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*tt)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*tt).close()).add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*tt)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.6*tt)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.6*tt)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.1*tt).close()).add(new go.PathSegment(go.PathSegment.Move,.1*z,.6*tt)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*tt).close()))}),go.Shape.defineFigureGenerator("Terminal",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*0,tt*.1,!1);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.1)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.9)),it.add(new go.PathSegment(go.PathSegment.Line,z*0,tt*.9).close());var lt=new go.PathFigure(z*.1,tt*.2,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z*.1,tt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.22,tt*.285)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.1,tt*.32)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.1,tt*.37)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.275,tt*.32)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.275,tt*.25).close());var ut=new go.PathFigure(z*.28,tt*.37,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*.45,tt*.37)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.45,tt*.41)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.28,tt*.41).close()),at}),go.Shape.defineFigureGenerator("Beaker",function(ft,z,tt){var at=new go.Geometry,it=15,lt=it*gt,ut=new go.PathFigure(z*.62,tt*.475,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt-it)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z-it,tt,z,tt-lt,z-lt,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,it,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,tt-it,lt,tt,0,tt-lt)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.38,tt*.475)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.38,tt*.03)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.36,tt*0)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.64,tt*0)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.62,tt*.03).close()),lt>1?(at.spot1=new go.Spot(0,0,lt,lt),at.spot2=new go.Spot(1,1,-lt,-lt)):(at.spot1=go.Spot.TopLeft,at.spot2=go.Spot.BottomRight),at}),go.Shape.defineFigureGenerator("Download",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*0,tt*1,!0);at.add(it);var lt=.1/.3;it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*.755,tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*.93,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.64,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.61,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.39,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.36,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.07,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*0,tt*(1-lt)).close());var ut=new go.PathFigure(z*.4,tt*0,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.44)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.26,tt*.44)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*.66)),ut.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),tt*.44)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*.44)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*0).close()),at}),go.Shape.defineFigureGenerator("Bin",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*0,tt*1,!0);at.add(it);var lt=.1/.3;return it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*.755,tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*.93,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.64,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.61,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.39,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.36,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.07,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*0,tt*(1-lt)).close()),at}),go.Shape.defineFigureGenerator("Upload",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*0,tt*1,!0);at.add(it);var lt=.1/.3;it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*.755,tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*.93,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.64,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.61,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.39,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.36,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.07,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*0,tt*(1-lt)).close());var ut=new go.PathFigure(z*.5,tt*0,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*.26,tt*.25)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.25)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.63)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*.63)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*.25)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.74,tt*.25).close()),at}),go.Shape.defineFigureGenerator("EmptyDrink",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*.15,tt*0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.85,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.7,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,tt*1).close()),at}),go.Shape.defineFigureGenerator("Drink",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*.15,tt*0,!1);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.85,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.7,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,tt*1).close());var lt=new go.PathFigure(z*.235,tt*.28,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z*.765,tt*.28)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.655,tt*.97)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.345,tt*.97).close()),at}),go.Shape.defineFigureGenerator("4Arrows",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*.5,tt*0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.65,tt*.25)),it.add(new go.PathSegment(go.PathSegment.Line,z*.55,tt*.25)),it.add(new go.PathSegment(go.PathSegment.Line,z*.55,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*.35)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.5)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*.65)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*.55)),it.add(new go.PathSegment(go.PathSegment.Line,z*.55,tt*.55)),it.add(new go.PathSegment(go.PathSegment.Line,z*.55,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.65,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.35,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.45,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.45,tt*.55)),it.add(new go.PathSegment(go.PathSegment.Line,z*.25,tt*.55)),it.add(new go.PathSegment(go.PathSegment.Line,z*.25,tt*.65)),it.add(new go.PathSegment(go.PathSegment.Line,z*0,tt*.5)),it.add(new go.PathSegment(go.PathSegment.Line,z*.25,tt*.35)),it.add(new go.PathSegment(go.PathSegment.Line,z*.25,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,z*.45,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,z*.45,tt*.25)),it.add(new go.PathSegment(go.PathSegment.Line,z*.35,tt*.25).close()),at}),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 dn={},fn="5.0",le={},ae=null,Re=!1,ot=!1,_t=null,Bt=!1,vt=null,gt=null,kt=0;kt<arguments.length;kt++){var bt=arguments[kt];if(bt!==null)switch(typeof bt){case"number":fn=bt.toFixed(1);break;case"string":bt.match(new RegExp("^[0-9]\\.[0-9]+$"))?fn=bt:_t=bt;break;case"object":typeof bt.is3D!="undefined"?ae=bt:le=bt;break;case"boolean":Re=bt,ot=!0;break}}ae===null&&(ae={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},le.material_id!==void 0&&!ot&&(Re=!0)),_t!==null&&le.id===void 0&&(le.id=_t);var St="",Tt="",mt=!1,xt=null,ft=null,z=null,tt=!1,at=null,it=null,lt=null,ut=null,dt=null;le.height!==void 0&&(le.height=Math.round(le.height)),le.width!==void 0&&(le.width=Math.round(le.width));var Pt=function(fe){return parseFloat(fe)>4?parseFloat(fe):5};dn.setHTML5Codebase=function(fe,pe){gt=fe,ve(fe,pe)},dn.setJavaCodebase=dn.setJavaCodebaseVersion=dn.isCompiledInstalled=dn.setPreCompiledScriptPath=dn.setPreCompiledResourcePath=function(){},dn.setHTML5CodebaseVersion=function(fe,pe){var he=parseFloat(fe);if(he!==NaN&&he<5){console.log("The GeoGebra HTML5 codebase version "+he+" is deprecated. Using version latest instead.");return}vt=fe,ne(fe,pe)},dn.getHTML5CodebaseVersion=function(){return ft},dn.getParameters=function(){return le},dn.setFontsCSSURL=function(fe){ut=fe},dn.setGiacJSURL=function(fe){},dn.setJNLPFile=function(fe){St=fe},dn.setJNLPBaseDir=function(fe){},dn.inject=function(){function fe(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var pe="auto",he=le.id,Ce,de=!1,ye=0;ye<arguments.length;ye++){var Ne=arguments[ye];typeof Ne=="string"?(Ne=Ne.toLowerCase(),Ne.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?pe=Ne:he=arguments[ye]):typeof Ne=="boolean"?de=Ne:Ne instanceof HTMLElement&&(Ce=Ne)}xe();function xe(){if(!Bt){setTimeout(xe,200);return}pe=Pe(pe);var re=Ce||document.getElementById(he);if(!re){console.log("possibly bug on ajax loading? ");return}if(dn.removeExistingApplet(re,!1),le.width===void 0&&re.clientWidth&&(le.width=re.clientWidth),le.height===void 0&&re.clientHeight&&(le.height=re.clientHeight),!(le.width&&le.height)&&pe==="html5"&&(delete le.width,delete le.height),xt=pe,pe==="screenshot")Ut(re,le);else{var Kt=!1;le.hasOwnProperty("playButton")&&le.playButton||le.hasOwnProperty("clickToLoad")&&le.clickToLoad?Kt=!0:le.hasOwnProperty("playButtonAutoDecide")&&le.playButtonAutoDecide&&(Kt=(!At()||fe())&&Dt()),Kt?(xt="screenshot",oe(re,le,de,pe)):Jt(re,le,de)}}};function At(){try{return window.self!==window.top}catch(fe){return!0}}function Dt(){return le.hasOwnProperty("screenshotGenerator")&&le.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}dn.getViews=function(){return ae},dn.isJavaInstalled=function(){return!1};var Ft=function(fe){var pe=function(ye){var Ne=JSON.parse(ye),xe=function(wt){return wt.type=="G"||wt.type=="E"},re=Ne.elements?Ne.elements.filter(xe)[0]:Ne;if(!re||!re.url){he();return}le.fileName=re.url,Nt(re.settings||{}),ae.is3D=!0;var Kt="https://www.geogebra.org/images/";dn.setPreviewImage(at||re.previewUrl,Kt+"GeoGebra_loading.png",Kt+"applet_play.png"),fe()},he=function(){le.onError&&le.onError(),Se("Error: Fetching material (id "+le.material_id+") failed.",le)},Ce=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",de="/materials/"+le.material_id+"?scope=basic";jt("https://"+Ce+"/api/proxy.php?path="+encodeURIComponent(de),pe,he)};function Nt(fe){var pe=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(he){fe[he]=!!fe[he]}),pe.forEach(function(he){le[he]===void 0&&fe[he]!==void 0&&(le[he]=fe[he])}),le.showToolBarHelp===void 0&&(le.showToolBarHelp=le.showToolBar)}function jt(fe,pe,he){var Ce=new XMLHttpRequest;Ce.open("GET",fe),Ce.onload=function(){pe(Ce.responseText)},Ce.onerror=he,Ce.send()}dn.isHTML5Installed=function(){return!0},dn.getLoadedAppletType=function(){return xt},dn.setPreviewImage=function(fe,pe,he){at=fe,it=pe,lt=he},dn.removeExistingApplet=function(fe,pe){var he;typeof fe=="string"&&(fe=document.getElementById(fe)),xt=null;var Ce=null;for(he=0;he<fe.childNodes.length;he++){var de=fe.childNodes[he],ye=de.className;ye==="applet_screenshot"?pe?(de.style.display="block",xt="screenshot"):de.style.display="none":ye!=="applet_scaler prerender"&&(fe.removeChild(de),Ce=ye&&ye.indexOf("appletParameters")!=-1?de.id:null,he--)}var Ne=le.id!==void 0?le.id:Ce,xe=window[Ne];xe&&typeof xe.getBase64=="function"&&(xe.remove(),window[Ne]=null)},dn.refreshHitPoints=function(){if(Pt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var fe=dn.getAppletObject();return fe&&typeof fe.recalculateEnvironments=="function"?(fe.recalculateEnvironments(),!0):!1},dn.startAnimation=function(){var fe=dn.getAppletObject();return fe&&typeof fe.startAnimation=="function"?(fe.startAnimation(),!0):!1},dn.stopAnimation=function(){var fe=dn.getAppletObject();return fe&&typeof fe.stopAnimation=="function"?(fe.stopAnimation(),!0):!1},dn.getAppletObject=function(){var fe=le.id!==void 0?le.id:"ggbApplet";return window[fe]},dn.resize=function(){};var Gt=function(fe,pe,he){var Ce=document.createElement("param");Ce.setAttribute("name",pe),Ce.setAttribute("value",he),fe.appendChild(Ce)},Wt=function(fe){return fe&&fe!=="false"},Jt=function(fe,pe,he){Pt(ft)<=4.2&&(he=!0);var Ce=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ft||ggbHTML5LoadedCodebaseIsWebSimple&&!tt)&&(Ce=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var de=document.createElement("div");de.classList.add("appletParameters","notranslate");var ye=pe.width,Ne=pe.height;if(pe.disableAutoScale=pe.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():pe.disableAutoScale,pe.width!==void 0)if(Pt(ft)<=4.4)Wt(pe.showToolBar)&&(pe.height-=7),Wt(pe.showAlgebraInput)&&(pe.height-=37),pe.width<605&&Wt(pe.showToolBar)&&(pe.width=605,ye=605);else{var xe=100;(Wt(pe.showToolBar)||Wt(pe.showMenuBar))&&(pe.hasOwnProperty("customToolBar")&&(pe.customToolbar=pe.customToolBar),xe=Wt(pe.showMenuBar)?245:155),ye<xe&&(pe.width=xe,ye=xe)}de.style.border="none",de.style.display="inline-block";for(var re in pe)pe.hasOwnProperty(re)&&re!=="appletOnLoad"&&de.setAttribute("data-param-"+re,pe[re]);ut&&de.setAttribute("data-param-fontscssurl",ut),dn.resize=function(){GGBAppletUtils.responsiveResize(fe,pe)},window.addEventListener("resize",function(Ae){dn.resize()});var Kt=typeof pe.appletOnLoad=="function"?pe.appletOnLoad:function(){};if(!he&&pe.width!==void 0){pe.hasOwnProperty("showSplash")||de.setAttribute("data-param-showSplash","false");var wt=fe.querySelector(".applet_scaler.prerender"),Lt=wt!==null;if(Lt)var Xt=wt.querySelector(".ggb_preview");else{var Xt=ce(ye,Ne,pe.borderColor,!1);wt=document.createElement("div"),wt.className="applet_scaler",wt.style.position="relative",wt.style.display="block",wt.style.width=ye+"px",wt.style.height=Ne+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(wt,"66%"),Pt(ft)>=5?(pe.appletOnLoad=function(Ae){var Be=fe.querySelector(".ggb_preview");Be&&Be.parentNode.removeChild(Be),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(wt),window.GGBT_wsf_view&&$(window).trigger("resize"),Kt(Ae)},Lt||wt.appendChild(Xt)):de.appendChild(Xt),wt.appendChild(de),Lt||fe.appendChild(wt),setTimeout(function(){dn.resize()},1)}else{var ee=document.createElement("div");ee.className="applet_scaler",ee.style.position="relative",ee.style.display="block",ee.appendChild(de),fe.appendChild(ee),pe.appletOnLoad=function(Ae){dn.resize(),Kt(Ae)}}function It(Ae,Be){Be&&typeof Be.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Ae,Be.appletOnLoad):renderGGBElement(Ae),Se("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Be)}function Rt(Ae,Be){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Ae,params:Be}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Ze){It(Ze.article,Ze.params)}),html5AppletsToProcess=null)},Pt(ft)<5&&(Ae.className+=" geogebraweb")):It(Ae,Be)}if(Ce){scriptLoadStarted=!0;for(var Vt=0;Vt<de.childNodes.length;Vt++){var $t=de.childNodes[Vt].tagName;$t==="TABLE"&&(de.removeChild(de.childNodes[Vt]),Vt--)}if(ggbHTML5LoadedScript!==null){var ue=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');ue!=null&&ue.parentNode.removeChild(ue)}var ge=document.createElement("script"),Me=function(){Rt(de,pe)};ge.src=Tt+z,ggbHTML5LoadedCodebaseIsWebSimple=tt,ggbHTML5LoadedCodebaseVersion=ft,ggbHTML5LoadedScript=ge.src,Se("GeoGebra HTML5 codebase loaded: '"+Tt+"'.",pe),!gt&&(!vt||vt=="5.0")?(tt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Me()):Tt.requirejs?__webpack_require__.e(7963).then(function(){var Ae=[__webpack_require__(87963)];Me.apply(null,Ae)}.bind(this)).catch(__webpack_require__.oe):(ge.onload=Me,fe.appendChild(ge))}else Rt(de,pe);pe.height=Ne,pe.width=ye},Ut=function(fe,pe,he){var Ce=ce(pe.width,pe.height,pe.borderColor,he),de=document.createElement("div");de.style.position="relative",de.style.display="block",de.style.width=pe.width+"px",de.style.height=pe.height+"px",de.className="applet_screenshot applet_scaler"+(he?" applet_screenshot_play":""),de.appendChild(Ce);var ye=GGBAppletUtils.getScale(pe,fe,he);he?(fe.appendChild(se()),window.GGBT_wsf_view||(fe.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(de,"66%"),fe.appendChild(de),ye!==1&&!isNaN(ye)&&(GGBAppletUtils.scaleElement(de,ye),de.style.width=pe.width+"px",de.style.height=pe.height+"px",de.parentNode.style.width=pe.width*ye+"px",de.parentNode.style.height=pe.height*ye+"px"),dn.resize=function(){Ht(fe,Ce,de,he)},window.addEventListener("resize",function(Ne){dn.resize()}),dn.resize()};function Ht(fe,pe,he,Ce){if(fe.contains(pe)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(fe.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(fe)}var de=GGBAppletUtils.getScale(le,fe,Ce);he.parentNode!==null&&(!isNaN(de)&&de!==1?(GGBAppletUtils.scaleElement(he,de),he.parentNode.style.width=le.width*de+"px",he.parentNode.style.height=le.height*de+"px"):(GGBAppletUtils.scaleElement(he,1),he.parentNode.style.width=le.width+"px",he.parentNode.style.height=le.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(fe),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}dn.onExitFullscreen=function(fe,pe){pe.appendChild(fe)};var oe=function(fe,pe,he,Ce){Ut(fe,pe,!0);for(var de=function(){var xe=[];for(Ne=0;Ne<fe.childNodes.length;Ne++)xe.push(fe.childNodes[Ne]);if(window.GGBT_wsf_view){var re=window.GGBT_wsf_view.renderFullScreen(fe,pe.id),Kt=document.getElementById("fullscreencontainer"),wt=jQuery(fe).find(".fullscreencontent");wt.length>0?(re.remove(),wt.attr("id","fullscreencontent").show(),jQuery(Kt).append(wt),window.dispatchEvent(new Event("resize"))):Jt(re,pe,!1),window.GGBT_wsf_view.launchFullScreen(Kt)}else xt=Ce,Jt(fe,pe,!1);if(!window.GGBT_wsf_view)for(Ne=0;Ne<xe.length;Ne++)fe.removeChild(xe[Ne])},ye=fe.getElementsByClassName("ggb_preview_play"),Ne=0;Ne<ye.length;Ne++)ye[Ne].addEventListener("click",de,!1),ye[Ne].addEventListener("ontouchstart",de,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(fe),Dt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},se=function(){var fe=document.createElement("div");if(fe.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var pe='.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");}',he=document.createElement("style");he.styleSheet?he.styleSheet.cssText=pe:he.appendChild(document.createTextNode(pe)),document.getElementsByTagName("head")[0].appendChild(he)}return fe},ce=function(fe,pe,he,Ce){var de=document.createElement("div");de.className="ggb_preview",de.style.position="absolute",de.style.zIndex="90",de.style.width=fe-2+"px",de.style.height=pe-2+"px",de.style.top="0px",de.style.left="0px",de.style.overflow="hidden",de.style.backgroundColor="white";var ye="lightgrey";he!==void 0&&(he==="none"?ye="transparent":ye=he),de.style.border="1px solid "+ye;var Ne=document.createElement("img");if(Ne.style.position="relative",Ne.style.zIndex="1000",Ne.style.top="-1px",Ne.style.left="-1px",at!==null&&Ne.setAttribute("src",at),Ne.style.opacity=.7,it!==null){var xe,re,Kt;if(!Ce){xe=document.createElement("img"),xe.style.position="absolute",xe.style.zIndex="1001",xe.style.opacity=1,Ne.style.opacity=.3,re=360,re>fe/4*3&&(re=fe/4*3),Kt=re/5.8,xe.setAttribute("src",it),xe.setAttribute("width",re),xe.setAttribute("height",Kt);var wt=(fe-re)/2,Lt=(pe-Kt)/2;xe.style.left=wt+"px",xe.style.top=Lt+"px",de.appendChild(xe)}}return de.appendChild(Ne),de},Pe=function(fe){return fe=fe.toLowerCase(),fe==="html5"||fe==="screenshot"?fe:"html5"},Yt=["web","webSimple","web3d","tablet","tablet3d","phone"],ne=function(fe,pe){if(ft=fe,pe){ve(ft,!0);return}var he=!Re;if(he){var Ce=Pt(ft);!isNaN(Ce)&&Ce<4.4&&(he=!1)}var de,ye;window.location.protocol.substr(0,4)==="http"?de=window.location.protocol:de="http:";var Ne=ft.indexOf("//");Ne>0?ye=ft:Ne===0?ye=de+ft:ye="https://www.geogebra.org/apps/5.2.814.0/";for(var xe in Yt)if(ft.slice(Yt[xe].length*-1)===Yt[xe]||ft.slice((Yt[xe].length+1)*-1)===Yt[xe]+"/"){ve(ye,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&he&&!ae.is3D&&!ae.AV&&!ae.SV&&!ae.CV&&!ae.EV2&&!ae.CP&&!ae.PC&&!ae.DA&&!ae.FI&&!ae.PV&&!Wt(le.showToolBar)&&!Wt(le.showMenuBar)&&!Wt(le.showAlgebraInput)&&!Wt(le.enableRightClick)&&(!le.appName||le.appName=="classic")?ye+="webSimple/":ye+="web3d/",ve(ye,!1)},ve=function(fe,pe){if(fe.requirejs){Tt=fe;return}fe.slice(-1)!=="/"&&(fe+="/"),Tt=fe,pe===null&&(pe=fe.indexOf("http")===-1),mt=pe,z="web.nocache.js",tt=!1;var he=Tt.split("/");he.length>1&&(!pe&&he[he.length-2]==="webSimple"?(z="webSimple.nocache.js",tt=!0):Yt.indexOf(he[he.length-2])>=0&&(z=he[he.length-2]+".nocache.js")),he=fe.split("/"),ft=he[he.length-3],ft.substr(0,4)==="test"?ft=ft.substr(4,1)+"."+ft.substr(5,1):(ft.substr(0,3)==="war"||ft.substr(0,4)==="beta")&&(ft="5.0");var Ce=parseFloat(ft);Ce!==NaN&&Ce<5&&fe.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Ce+" is deprecated. Using version latest instead."),ne("5.0",pe))},Se=function(fe,pe){window.console&&window.console.log&&(!pe||typeof pe.showLogging=="undefined"||pe.showLogging&&pe.showLogging!=="false")&&console.log(fe)};le.material_id!==void 0?Ft(be):be();function be(){var fe=fn;vt!==null?fe=vt:parseFloat(fe)<5&&(fe="5.0"),ne(fe,!1),gt!==null&&ve(gt,mt),Bt=!0}return dn},GGBAppletUtils=function(){"use strict";function dn(){return window.GGBT_wsf_edit!==void 0}function fn(Bt,vt){vt!=1?(Bt.style.transformOrigin="0% 0% 0px",Bt.style.webkitTransformOrigin="0% 0% 0px",Bt.style.transform="scale("+vt+","+vt+")",Bt.style.webkitTransform="scale("+vt+","+vt+")",Bt.style.maxWidth="initial",Bt.querySelector(".ggb_preview")!==null&&(Bt.querySelector(".ggb_preview").style.maxWidth="initial"),Bt.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Bt.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Bt.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Bt.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Bt.style.transform="none",Bt.style.webkitTransform="none")}function le(Bt,vt,gt,kt,bt,St){var Tt=null;if(St!=null&&St!="")for(var mt=Bt.parentNode;mt!=null;)if((" "+mt.className+" ").indexOf(" "+St+" ")>-1){Tt=mt;break}else mt=mt.parentNode;var xt=0,ft=0,z=0,tt=0,at=0,it=0,lt=0;if(Tt)xt=Tt.offsetWidth,ft=Math.max(kt?Tt.offsetWidth:0,Tt.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(xt=Math.min(window.innerWidth,document.documentElement.clientWidth),ft=Math.min(window.innerHeight,document.documentElement.clientHeight),z=xt):(xt=window.innerWidth,ft=window.innerHeight,z=window.innerWidth),Bt){var ut=Bt.getBoundingClientRect();ut.left>0&&ut.left<=xt&&(bt===void 0||!bt)&&(document.dir==="rtl"?(at=xt-ut.width-ut.left,it=z<=480?10:30):(it=ut.left,at=z<=480?10:30),tt=it+at)}if(Bt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var dt=Bt.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(tt=40,lt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(tt=0,lt=40)}}return Bt&&((gt===void 0||!gt)&&vt>0&&vt+tt<xt?xt=vt:xt-=tt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(gt===void 0||!gt)&&(ft-=lt)),{width:xt,height:ft}}function ae(Bt,vt,gt,kt,bt){if(Bt.isScreenshoGenerator)return 1;var St=kt!==void 0&&kt,Tt=Bt.noScaleMargin!=null&&Bt.noScaleMargin,mt=function(dt){return dt&&dt!=="false"},xt=mt(Bt.autoHeight),ft=le(vt,Bt.width,gt,xt,St&&window.GGBT_wsf_view||Tt,bt),z=parseInt(ft.width),tt=Bt.width,at=Bt.height;if(tt===void 0){var it=vt.querySelector(".appletParameters");it&&(tt=it.offsetWidth,at=it.offsetHeight)}var lt=z/tt,ut=St?1:ft.height/at;return gt!==void 0&&!gt&&(lt=Math.min(1,lt),ut=Math.min(1,ut)),Math.min(lt,ut)}function Re(Bt,vt,gt){var kt=1,bt,St=!1;if(Bt.hasOwnProperty("allowUpscale")&&(St=Bt.allowUpscale),Bt.hasOwnProperty("scale")&&(kt=parseFloat(Bt.scale),(isNaN(kt)||kt===null||kt===0)&&(kt=1),kt>1&&(St=!0)),vt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(St=!0),!(Bt.hasOwnProperty("disableAutoScale")&&Bt.disableAutoScale))bt=ae(Bt,vt,St,gt,Bt.scaleContainerClass);else return kt;return St&&(!Bt.hasOwnProperty("scale")||kt===1)?bt:Math.min(kt,bt)}function ot(Bt){var vt=Math.min(window.innerWidth,document.documentElement.clientWidth),gt=Math.min(window.innerHeight,document.documentElement.clientHeight),kt=Bt.getBoundingClientRect(),bt=(vt-kt.width)/2,St=(gt-kt.height)/2;St<0&&(St=0),Bt.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(bt<40?Bt.style.left="40px":Bt.style.left=bt+"px",Bt.style.top=St+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(St<40?Bt.style.top="40px":Bt.style.top=St+"px",Bt.style.left=bt+"px")}function _t(Bt,vt){var gt=Bt.querySelector(".appletParameters");if(gt){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(vt.id!==gt.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Bt)}if(gt.parentElement&&/fullscreen/.test(gt.parentElement.className))return;var kt=Re(vt,Bt);dn()&>.setAttribute("data-param-scale",kt);for(var bt=null,St=0;St<Bt.childNodes.length;St++)if(Bt.childNodes[St].className!==void 0&&Bt.childNodes[St].className.match(/^applet_scaler/)){bt=Bt.childNodes[St];break}if(bt!==null&&bt.querySelector(".noscale")!==null)return;var Tt=vt.id!==void 0?vt.id:"ggbApplet",mt=window[Tt];(mt==null||!mt.recalculateEnvironments)&&bt!==null&&!bt.className.match(/fullscreen/)&&(bt.parentNode.style.transform="",!isNaN(kt)&&kt!==1?(bt.parentNode.style.width=vt.width*kt+"px",bt.parentNode.style.height=vt.height*kt+"px",fn(bt,kt)):(fn(bt,1),bt.parentNode.style.width=vt.width+"px",bt.parentNode.style.height=vt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&ot(Bt),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(gt).parents(".content-added-content"))}}return{responsiveResize:_t,isFlexibleWorksheetEditor:dn,positionCenter:ot,getScale:Re,scaleElement:fn}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var dn=n.location.search;return dn.indexOf(J)!=-1||dn.indexOf(K)!=-1}function q(dn,fn){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(dn){var fn=s[L].bindings;s[L].bindings=function(){for(var le=fn?fn():{},ae=dn[webModule.__softPermutationId],Re=O;Re<ae.length;Re++){var ot=ae[Re];le[ot[O]]=ot[P]}return le}};var t;function u(){return v(),t}function v(){if(!t){var dn=o.createElement(Q);if(dn.id=L,dn.style.cssText=R+S,dn.tabIndex=-1,o.body.appendChild(dn),t=dn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var fn=document.compatMode==U?V:W;t.write(fn+X),t.close()}}}function w(dn){function fn(ae){function Re(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var ot=Re();if(ot){ae();return}function _t(){if(!ot){if(!Re())return;ot=!0,ae(),o.removeEventListener&&o.removeEventListener(Z,_t,!1),Bt&&clearInterval(Bt)}}o.addEventListener&&o.addEventListener(Z,_t,!1);var Bt=setInterval(function(){_t()},$)}function le(ae){var Re=u(),ot=Re.body,_t=Re.createElement(_);_t.language=ab,_t.crossOrigin=W,_t.src=ae,webModule.__errFn&&(_t.onerror=function(){webModule.__errFn(L,new Error(bb+ae))}),ot.appendChild(_t)}fn(function(){le(dn)})}webModule.__startLoadingFragment=function(dn){return C(dn)},webModule.__installRunAsyncCode=function(dn){var fn=u(),le=fn.body,ae=fn.createElement(_);ae.language=ab,ae.text=dn,le.appendChild(ae),le.removeChild(ae)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(dn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(dn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(dn){var fn=c[dn];return fn==null?null:fn},r=d,webModule.__errFn=e}function B(){function dn(Bt){var vt=Bt.lastIndexOf(rb);vt==-1&&(vt=Bt.length);var gt=Bt.indexOf(sb);gt==-1&&(gt=Bt.length);var kt=Bt.lastIndexOf(tb,Math.min(gt,vt));return kt>=O?Bt.substring(O,kt+P):W}function fn(Bt){if(!Bt.match(/^\w+:\/\//)){var vt=o.createElement(ub);vt.src=Bt+vb,Bt=dn(vt.src)}return Bt}function le(){var Bt=__gwt_getMetaProperty(wb);return Bt!=null?Bt:W}function ae(){for(var Bt=o.getElementsByTagName(_),vt=O;vt<Bt.length;++vt)if(Bt[vt].src.indexOf(xb)!=-1)return dn(Bt[vt].src);return W}function Re(){var Bt=o.getElementsByTagName(yb);return Bt.length>O?Bt[Bt.length-P].href:W}function ot(){var Bt=o.location;return Bt.href==Bt.protocol+zb+Bt.host+Bt.pathname+Bt.search+Bt.hash}var _t=le();return _t==W&&(_t=ae()),_t==W&&(_t=Re()),_t==W&&ot()&&(_t=dn(o.location.href)),_t=fn(_t),_t}function C(dn){return dn.match(/^\//)||dn.match(/^[a-zA-Z]+:\/\//)?dn:webModule.__moduleBase+dn}function D(){var dn=[],fn=O,le=[],ae=[];function Re(Bt){var vt=ae[Bt](),gt=le[Bt];if(vt in gt)return vt;var kt=[];for(var bt in gt)kt[gt[bt]]=bt;throw r&&r(Bt,kt,vt),null}if(__gwt_isKnownPropertyValue=function(Bt,vt){return vt in le[Bt]},webModule.__getPropMap=function(){var Bt={};for(var vt in le)le.hasOwnProperty(vt)&&(Bt[vt]=Re(vt));return Bt},webModule.__computePropValue=Re,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var ot;try{ot=Cb;var _t=ot.indexOf(Db);_t!=-1&&(fn=parseInt(ot.substring(_t+P),$),ot=ot.substring(O,_t))}catch(Bt){}return webModule.__softPermutationId=fn,C(ot+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(dn,fn,le){"use strict";le.d(fn,{Ax:function(){return _t},Ds:function(){return Bt},KI:function(){return gt},SI:function(){return ot},f1:function(){return Re}});var ae=le(346);function Re(kt){let bt=!0;if(kt.length>0){for(let St=0;St<kt.length;St++)if(kt[St].compile_success==0||!kt[St].compile_success){bt=!1;break}}else bt=!1;return bt}function ot(kt,bt=""){let St=[];for(let Tt=0;Tt<kt.length;Tt++){let mt=kt[Tt],xt=bt?`${bt}/${mt.name}`:`${mt.name}`;St.push({title:mt.name,type:mt.type,isLeaf:mt.type!=="tree",key:xt})}return St}function _t(kt,bt,St){for(let Tt=0;Tt<kt.length;Tt++){let mt=kt[Tt];if(mt.key===bt){mt.children=St;break}mt.children&&_t(mt.children,bt,St)}return kt}function Bt(kt,bt,St){let Tt;return function(){let mt=this,xt=arguments,ft=function(){Tt=null,St||kt.apply(mt,xt)},z=St&&!Tt;clearTimeout(Tt),Tt=setTimeout(ft,bt),z&&kt.apply(mt,xt)}}const vt=!0,gt=ae.Z.API_SERVER},9507:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return Tt}});var ae=le(59301),Re={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ot=le(92310),_t=le.n(ot),Bt=le(29787),vt=le(2859),gt=le(38986),kt=le(51257),bt=(mt,xt,ft)=>new Promise((z,tt)=>{var at=ut=>{try{lt(ft.next(ut))}catch(dt){tt(dt)}},it=ut=>{try{lt(ft.throw(ut))}catch(dt){tt(dt)}},lt=ut=>ut.done?z(ut.value):Promise.resolve(ut.value).then(at,it);lt((ft=ft.apply(mt,xt)).next())}),Tt=({data:mt,className:xt,fullWidth:ft,style:z={},onClose:tt,onOk:at,showFullTools:it,noAssociationId:lt})=>{const ut=(0,ae.useRef)(null),dt=(0,ae.useRef)(null),Pt=(0,ae.useRef)(null),At=(0,ae.useRef)(null),[Dt,Ft]=(0,ae.useState)(!1),[Nt,jt]=(0,ae.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ae.useEffect)(()=>(Pt.current||(Pt.current=document.createElement("style"),document.head.appendChild(Pt.current)),mt!=null&&mt.visible?(document.body.setAttribute("data-custom","y-hidden"),Pt.current.innerHTML=" html { overflow-y: hidden; }",mt!=null&&mt.src&&Gt()):(document.body.removeAttribute("data-custom"),Pt.current&&(document.head.removeChild(Pt.current),Pt.current=null)),()=>{document.body.removeAttribute("data-custom"),Pt.current&&(document.head.removeChild(Pt.current),Pt.current=null)}),[mt==null?void 0:mt.visible]);const Gt=()=>bt(void 0,null,function*(){Ft(!0),jt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ht=yield(0,kt.ZJ)(mt==null?void 0:mt.src);ut.current.src="",ut.current.src=Ht,ut.current.onload=function(){Ut()},Ft(!1),jt("")}),Wt=Ht=>bt(void 0,null,function*(){Ft(!0),jt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const oe=yield(0,gt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:mt.title,file:Ht.dataUrl}});oe!=null&&oe.id&&!lt?(yield(0,gt.ZP)(`/api/attachments/${mt.id}/add_subitem.json`,{method:"post",body:{subitem_id:oe==null?void 0:oe.id,settings:JSON.stringify(Ht.state)}})).status===0&&at():oe!=null&&oe.id&&at(oe),Ft(!1),jt("")}),Jt=()=>{const Ht=document.querySelector('a[href="https://markerjs.com/"]');Ht&&Ht.parentNode&&(Ht.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(se=>{const ce=document.querySelector(se.name);ce&&ce.setAttribute("title",se.title)})},Ut=()=>{dt.current=new vt.hP(ut.current),dt.current.targetRoot=At.current,dt.current.addEventListener("render",Wt),dt.current.addEventListener("beforeclose",tt),it&&(dt.current.availableMarkerTypes=dt.current.ALL_MARKER_TYPES,dt.current.uiStyleSettings.redoButtonVisible=!0,dt.current.uiStyleSettings.notesButtonVisible=!0,dt.current.uiStyleSettings.zoomButtonVisible=!0,dt.current.uiStyleSettings.zoomOutButtonVisible=!0,dt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=dt.current.uiStyleSettings,dt.current.show(),mt!=null&&mt.snapshotData&&dt.current.restoreState(mt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Jt()},300)};return ae.createElement(ae.Fragment,null,(mt==null?void 0:mt.visible)&&ae.createElement(Bt.Z,{spinning:Dt,tip:Nt,style:{position:"absolute",width:"100vw"}},ae.createElement("div",{ref:At,className:_t()(Re.imageDimensions,xt,ft?Re.fullWidth:""),style:z},ae.createElement("img",{className:Re.img,ref:ut}))))}},1041:function(dn,fn,le){"use strict";le.d(fn,{N:function(){return tt}});var ae=le(59301),Re=le(82326),ot=le(62957),_t=le(37568),Bt=le(6767),vt=le(77019),gt=le(5269),kt=le(38986),bt={wrap:"wrap___F7E3F",selectWrapper:"selectWrapper____kESB",tips:"tips___aHjQY",linkBtn:"linkBtn___uggVr",mainText:"mainText____S1I0",public_tips:"public_tips___sZVWd",inputCss:"inputCss___t66EO",bt:"bt___lXptu",add_style:"add_style___knrMF"},St=le(92310),Tt=le.n(St),mt=le(87169),xt=le(59301),ft=(at,it,lt)=>new Promise((ut,dt)=>{var Pt=Ft=>{try{Dt(lt.next(Ft))}catch(Nt){dt(Nt)}},At=Ft=>{try{Dt(lt.throw(Ft))}catch(Nt){dt(Nt)}},Dt=Ft=>Ft.done?ut(Ft.value):Promise.resolve(Ft.value).then(Pt,At);Dt((lt=lt.apply(at,it)).next())});const{Option:z}=Re.default,tt=({subId:at,value:it,selectvalues:lt,disabled:ut,knowledgeOptions:dt=[],className:Pt,height:At,onChange:Dt=()=>{},onAddKnowledgeFinish:Ft=()=>{},zIndex:Nt=1e3})=>{const jt=(0,ae.useRef)(),[Gt,Wt]=(0,ae.useState)([]);it=it||[];const Jt=(Ht,oe)=>{Ht?(Wt([...oe]),Dt([...oe])):(Wt([]),Dt([]))};(0,ae.useEffect)(()=>{(lt==null?void 0:lt.length)>0?(Wt([...lt]),Dt([...lt])):(Wt([]),Dt([]))},[dt]),(0,ae.useEffect)(()=>{(it==null?void 0:it.length)>0&&Dt([...it])},[dt]);const Ut=Ht=>{Ht.preventDefault(),jt.current="",ot.default.confirm({centered:!0,width:585,zIndex:Nt,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",icon:null,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",className:"custom-modal-divider",content:xt.createElement("div",{className:"font14"},xt.createElement("div",{className:bt.public_tips},xt.createElement(mt.Z,{style:{color:"#FF8C29",marginRight:10,paddingTop:5}}),"\u65B0\u5EFA\u7684\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u5E73\u53F0\u5BA1\u6838\u5217\u5165\u516C\u5F00\u77E5\u8BC6\u70B9\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\u3002 \u5E73\u53F0\u6709\u6743\u5220\u9664\u4E0D\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF0C\u8BF7\u8BA4\u771F\u586B\u5199\u77E5\u8BC6\u70B9\u540D\u79F0\u3002"),xt.createElement("div",{style:{display:"flex",alignItems:"center"}},xt.createElement("div",{style:{width:"95px"}},xt.createElement("span",{className:bt.bt},"*"),"\u77E5\u8BC6\u70B9\u540D\u79F0"),xt.createElement(_t.default,{className:bt.inputCss,style:{width:"calc(100% - 95px)"},maxLength:20,size:"middle",showCount:!0,placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0",defaultValue:jt.current,onChange:oe=>{jt.current=oe.target.value}}))),onOk:()=>new Promise((oe,se)=>ft(void 0,null,function*(){if(!jt.current)return Bt.ZP.warning("\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"),se();if(jt.current.length>20)return Bt.ZP.warning("\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0"),se();const ce=yield(0,kt.ZP)("/api/tag_disciplines.json",{method:"post",body:{name:jt.current,sub_discipline_id:at}});if((ce==null?void 0:ce.status)===0){Ft({id:ce.tag_discipline_id,name:jt.current,type:"personal"});let Pe=lt||[];Pe.push(ce.tag_discipline_id),Dt([...Pe]),Wt([...Pe]),Dt([...Pe])}return oe()}))})};return xt.createElement(vt.Z,{wrap:!1,align:"middle",className:Tt()(bt.wrap,Pt)},xt.createElement(gt.Z,null,xt.createElement(Re.default,{mode:"multiple",disabled:!at||ut,className:bt.selectWrapper,placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9\uFF0C\u652F\u6301\u9009\u62E9\u591A\u4E2A",onChange:Jt,style:{width:At||490},showSearch:!0,allowClear:!0,value:Gt,filterOption:(Ht,oe)=>oe.label.indexOf(Ht.toLowerCase())>=0},dt==null?void 0:dt.map(Ht=>xt.createElement(z,{key:Ht.id,value:Ht.id,label:Ht.name},xt.createElement("div",{style:{display:"flex",alignItems:"center"}},xt.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},Ht.name),(Ht==null?void 0:Ht.type)==="personal"&&xt.createElement("div",{style:{marginLeft:"5px",border:"1px solid #24C074",color:"#24C074",padding:"0 4px",borderRadius:"2px",fontSize:"12px",height:"20px",lineHeight:"20px"}},"\u81EA\u7528")))))),at&&xt.createElement(gt.Z,{className:`ml20 ${At&&bt.add_style}`},xt.createElement("span",{className:bt.tips},"\u6CA1\u6709\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF1F"),xt.createElement("span",{className:bt.linkBtn,onClick:Ut},"\u65B0\u5EFA\u77E5\u8BC6\u70B9")))}},76562:function(dn,fn,le){"use strict";var ae=le(59301),Re=le(77019),ot=le(5269),_t=le(20554),Bt=le(99571),vt=le(76902),gt=le(99587),kt=le(48136),bt=le(59301);const St=(0,ae.forwardRef)(({callback:Tt,showSaveButton:mt,value:xt=""},ft)=>{const z=(0,ae.useRef)(),tt=[{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 "}]}]}],at=[{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}`}]}]}],it=dt=>{z.current.setValue(z.current.getValue()+" "+dt.value+" ")},lt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:bt.createElement(Re.Z,{className:gt.Z.lists,gutter:[10,10]},tt.map((dt,Pt)=>bt.createElement(ot.Z,{flex:"110px",className:gt.Z.item},bt.createElement("div",null,bt.createElement(vt.Z,{value:`$$${dt.value}$$`}),dt.name),bt.createElement("div",{className:gt.Z.children},dt.children.map((At,Dt)=>bt.createElement("div",{key:Dt},bt.createElement("h1",null,At.name),bt.createElement(Re.Z,{gutter:[10,10]},At.data.map((Ft,Nt)=>bt.createElement(ot.Z,{key:Nt,onClick:()=>it(Ft),className:gt.Z.diamond},bt.createElement(vt.Z,{value:"`$$"+Ft.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:bt.createElement(Re.Z,{className:gt.Z.lists,gutter:[10,10]},at.map((dt,Pt)=>bt.createElement(ot.Z,{flex:"110px",className:gt.Z.item},bt.createElement("div",null,bt.createElement(vt.Z,{value:"`$$"+dt.value+"$$`"}),dt.name),bt.createElement("div",{className:gt.Z.children},dt.children.map((At,Dt)=>bt.createElement("div",{key:Dt},At.name&&bt.createElement("h1",null,At.name),bt.createElement(Re.Z,{gutter:[10,10]},At.data.map((Ft,Nt)=>bt.createElement(ot.Z,{key:Nt,onClick:()=>it(Ft),className:gt.Z.diamond},bt.createElement(vt.Z,{value:"`$$"+Ft.value+"$$`"}))))))))))}],ut=()=>{var dt=document.createElement("div");dt.innerHTML=z.current.getValue();var Pt=dt.innerText;return Tt&&Tt(Pt),Pt};return(0,ae.useImperativeHandle)(ft,()=>({getData:ut})),bt.createElement("div",{className:gt.Z.mathWrap},bt.createElement(_t.default,{defaultActiveKey:"1",items:lt}),bt.createElement("math-field",{locale:"zh_cn",className:gt.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:z,style:{width:800,marginTop:30,fontSize:18}},xt||""),mt&&bt.createElement("div",{className:gt.Z.button},bt.createElement(Bt.ZP,{size:"large",onClick:ut,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});fn.Z=St},28426:function(dn,fn,le){"use strict";var ae=le(59301),Re=le(93314),ot=le(99571),_t=Object.defineProperty,Bt=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,St=(ft,z,tt)=>z in ft?_t(ft,z,{enumerable:!0,configurable:!0,writable:!0,value:tt}):ft[z]=tt,Tt=(ft,z)=>{for(var tt in z||(z={}))kt.call(z,tt)&&St(ft,tt,z[tt]);if(gt)for(var tt of gt(z))bt.call(z,tt)&&St(ft,tt,z[tt]);return ft},mt=(ft,z)=>Bt(ft,vt(z));const xt=({img:ft,buttonProps:z={},styles:tt={},customText:at,ButtonText:it,ButtonClick:lt,Buttonclass:ut,ButtonTwo:dt,imgStyles:Pt,loading:At=!1,className:Dt=""})=>ae.createElement("section",{className:`tc animated fadeIn ${Dt}`,style:Tt({color:"#999",margin:"100px auto",visibility:At?"hidden":"visible"},tt)},ae.createElement("img",{src:ft||Re,style:mt(Tt({},Pt),{pointerEvents:"none",userSelect:"none"})}),ae.createElement("p",{className:"mt20 font14"},at||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),it&&ae.createElement(ot.ZP,Tt({className:ut,onClick:lt},z),it),dt&&dt);fn.Z=xt},45677:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return ut}});var ae=le(59301),Re={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ot=le(99571),_t=le(70557),Bt=le(75975),vt=le(25399),gt=le(51257),kt=le(81722),bt=le(28426),St=le(346),Tt=le(44203),mt=le(59301),xt=Object.defineProperty,ft=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,at=(dt,Pt,At)=>Pt in dt?xt(dt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:At}):dt[Pt]=At,it=(dt,Pt)=>{for(var At in Pt||(Pt={}))z.call(Pt,At)&&at(dt,At,Pt[At]);if(ft)for(var At of ft(Pt))tt.call(Pt,At)&&at(dt,At,Pt[At]);return dt},lt=(dt,Pt,At)=>new Promise((Dt,Ft)=>{var Nt=Wt=>{try{Gt(At.next(Wt))}catch(Jt){Ft(Jt)}},jt=Wt=>{try{Gt(At.throw(Wt))}catch(Jt){Ft(Jt)}},Gt=Wt=>Wt.done?Dt(Wt.value):Promise.resolve(Wt.value).then(Nt,jt);Gt((At=At.apply(dt,Pt)).next())}),ut=({editOffice:dt="view",data:Pt,issaver:At,onSaver:Dt,theme:Ft,type:Nt,filename:jt,monacoEditor:Gt,className:Wt,style:Jt,close:Ut,onClose:Ht,hasMask:oe,disabledDownload:se,onImgDimensions:ce,showNodata:Pe,recordInfo:Yt})=>{const[ne,ve]=(0,ae.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Se,be]=(0,ae.useState)(""),[fe,pe]=(0,ae.useState)(),he=window.ENV==="build"?"/react/build":"",Ce=location.host.startsWith("localhost")?St.Z.PROXY_SERVER:St.Z.API_SERVER,ye=10*(1024*1024),Ne=(0,ae.useRef)();Pt!=null&&Pt.startsWith("/api")&&Nt!=="txt"&&(Pt=St.Z.API_SERVER+Pt);const xe=Xt=>Xt.substring(Xt.lastIndexOf("/")+1).split(".").pop();jt&&Gt&&(Gt.filename=jt),(0,ae.useEffect)(()=>{var Xt,ee;const It=(ee=(Xt=document.cookie)==null?void 0:Xt.replace(/\s/g,""))==null?void 0:ee.split(";");It==null||It.map(Rt=>{let Vt=Rt.split("=");Vt[0]==="_educoder_session"&&be(Vt[1])})},[]),(0,ae.useEffect)(()=>{Nt==="office"&&(Pt.indexOf("bigfilescdn.")>-1||Pt.indexOf("bigfiles1")>-1?pe({url:Pt,fileType:xe(Pt),model:Pt.indexOf("model=edit")?"edit":"view"}):Kt())},[Nt,Pt]);function re(Xt){return lt(this,null,function*(){Xt.data.type==="pdfdata"&&(Dt(Xt.data.data),window.removeEventListener("message",re,!1)),console.log("mess---:",Xt.data)})}const Kt=()=>lt(void 0,null,function*(){console.log("data:",Pt);let Xt=Pt;Pt.startsWith("http")||(Xt=location.origin+Xt);let ee=new URL(Xt).pathname.split("/").pop();const It=yield(0,kt.gJ)({attachment_id:ee});It.url=Ce+It.url,pe(It)}),wt=()=>{if(Pt.startsWith("http")||Pt.startsWith("blob:")){Lt();return}(0,gt.Sv)(jt||"educoder",Pt,jt)},Lt=()=>{Yt&&(0,Tt.fc)({id:Yt==null?void 0:Yt.id,watch_type:1,course_id:Yt==null?void 0:Yt.course_id}),(0,gt.Nd)(jt||"educoder",decodeURIComponent(Pt))};return mt.createElement("div",{style:it({},Jt||{}),className:`${oe&&Re.bgBlack} ${Nt?Re.wrp:"hide"}`},Ut&&mt.createElement("div",{className:Re.close,ref:Ne},!!ce&&mt.createElement(vt.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Ne.current},mt.createElement("span",{onClick:()=>{Ht(),ce()}},mt.createElement("i",{className:"icon-yulanpizhu"}))),!se&&mt.createElement(vt.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Ne.current},mt.createElement("span",{onClick:Lt},mt.createElement("i",{className:"icon-quxiaozhiding"}))),At&&mt.createElement(vt.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Ne.current},mt.createElement("span",{className:"",onClick:()=>{const Xt=document.getElementById("pdfiframe");window.addEventListener("message",re,!1),setTimeout(()=>{Xt.contentWindow.postMessage("getData","*")},300)}},mt.createElement("i",{className:"icon-baocun"}))),mt.createElement(vt.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Ne.current},mt.createElement("span",{className:"",onClick:()=>{Ht()}},mt.createElement("i",{className:"icon-guanbi1"})))),mt.createElement("div",{className:`${Re[Wt]} ${Wt} ${Re.monaco} ${Nt==="txt"?"show":"hide"}`},Nt==="txt"&&mt.createElement(mt.Fragment,null,mt.createElement(Bt.ZP,it({},Gt)))),Nt==="audio"&&mt.createElement("audio",{src:`${(Pt==null?void 0:Pt.indexOf("http://"))>-1||(Pt==null?void 0:Pt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Pt}`,autoPlay:!0}),Nt==="video"&&mt.createElement(mt.Fragment,null,(Pt==null?void 0:Pt.indexOf("http"))>-1?mt.createElement("video",{controls:!0,src:`${Pt}`,autoPlay:!0}):mt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Pt}`,autoPlay:!0})),Nt==="office"&&fe&&mt.createElement("iframe",{src:`${he}/office.html?key=${fe.key}&url=${btoa(fe.url)}&callbackUrl=${Ce+(fe.callbackUrl||"")}&fileType=${fe.fileType}&title=${fe.title||""}&model=${dt}&officeServer=${St.Z.ONLYOFFICE}&disabledDownload=${!!se}`}),Nt==="html"&&mt.createElement("iframe",{src:Pt+"&disposition=inline"}),Nt==="pdf"&&mt.createElement("iframe",{id:"pdfiframe",src:`${he}/js/pdfview/index.html?filename=${jt||"educoder.pdf"}&url=${encodeURIComponent(Pt)}&disabledDownload=${!!se}&model=${dt}`}),Nt==="image"&&mt.createElement("img",{src:`${(Pt==null?void 0:Pt.indexOf("http://"))>-1||(Pt==null?void 0:Pt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Pt}`}),(Nt==="other"||Nt==="download")&&mt.createElement(mt.Fragment,null,Pe?mt.createElement(bt.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:mt.createElement(ot.ZP,{icon:mt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:wt,disabled:se},"\u4E0B\u8F7D")}):mt.createElement(ot.ZP,{type:"primary",size:"middle",onClick:wt,disabled:se},mt.createElement(_t.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},31457:function(dn,fn,le){"use strict";le.d(fn,{h:function(){return z},x:function(){return tt}});var ae=le(39793),Re=le(8423),ot=le(76902),_t=le(59301),Bt=Object.defineProperty,vt=Object.defineProperties,gt=Object.getOwnPropertyDescriptors,kt=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,Tt=(at,it,lt)=>it in at?Bt(at,it,{enumerable:!0,configurable:!0,writable:!0,value:lt}):at[it]=lt,mt=(at,it)=>{for(var lt in it||(it={}))bt.call(it,lt)&&Tt(at,lt,it[lt]);if(kt)for(var lt of kt(it))St.call(it,lt)&&Tt(at,lt,it[lt]);return at},xt=(at,it)=>vt(at,gt(it)),ft=(at,it)=>{var lt={};for(var ut in at)bt.call(at,ut)&&it.indexOf(ut)<0&&(lt[ut]=at[ut]);if(at!=null&&kt)for(var ut of kt(at))it.indexOf(ut)<0&&St.call(at,ut)&&(lt[ut]=at[ut]);return lt};const z=at=>{var it=at,{value:lt,onChange:ut,scrollId:dt}=it,Pt=ft(it,["value","onChange","scrollId"]);return _t.createElement("div",{id:dt||""},_t.createElement(ae.Z,xt(mt({},Pt),{defaultValue:lt,onChange:(At,Dt)=>{Dt!=null&&Dt.length?ut(At,Dt):ut(At)}})))},tt=({value:at,onChange:it,placeholder:lt,height:ut=140,isEdit:dt,miniToolbar:Pt,watch:At=!0})=>dt?_t.createElement(ae.Z,{watch:At,isFocus:!0,height:ut||void 0,placeholder:lt,defaultValue:at,onChange:it,miniToolbar:Pt}):_t.createElement("div",{style:{cursor:"pointer"}},at?_t.createElement(ot.Z,{className:Re.Z.inputBorder,value:at}):_t.createElement("div",{className:`${Re.Z.inputBorder} ${Re.Z.placeholder} inputBorderError`},lt))},76902:function(dn,fn,le){"use strict";le.d(fn,{z:function(){return Ft},Z:function(){return Nt}});var ae=le(59301),Re=le(8944),ot=le(81428),_t=le(64018),Bt=le(15360),vt=le(346),gt=le(51257),kt=le(15342),bt=le(1012),St=le(45677),Tt=le(59301),xt=({html:jt})=>{const Gt=(0,ae.useRef)(null),Wt=(0,ae.useRef)(null),Jt=`.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,ae.useEffect)(()=>{const Ut=Gt.current.attachShadow({mode:"open"});Wt.current=document.createElement("div"),Wt.current.className="markdown-body",Wt.current.innerHTML=jt,Ut.appendChild(Wt.current);const Ht=document.createElement("style");return Ht.textContent=Jt,Ut.appendChild(Ht),()=>{Ut.innerHTML=""}},[]),(0,ae.useEffect)(()=>{Wt.current&&(Wt.current.innerHTML=jt)},[jt]),Tt.createElement("div",{ref:Gt})};function ft(jt){const Gt=["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"],Wt=new RegExp(`\\b(${Gt.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return jt.replace(Wt,"").trim()}var z=Object.defineProperty,tt=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,lt=(jt,Gt,Wt)=>Gt in jt?z(jt,Gt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):jt[Gt]=Wt,ut=(jt,Gt)=>{for(var Wt in Gt||(Gt={}))at.call(Gt,Wt)&<(jt,Wt,Gt[Wt]);if(tt)for(var Wt of tt(Gt))it.call(Gt,Wt)&<(jt,Wt,Gt[Wt]);return jt};const dt="@\u2581\u2581@",Pt="@\u2581@",At=/<pre[^>]*>/g;function Dt(jt){let Gt=document.createElement("div");return Gt.innerHTML=jt,Gt.childNodes.length===0?"":Gt.childNodes[0].nodeValue}const Ft=(jt,Gt)=>{jt=jt||"";const Wt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Jt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ut=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ht=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Gt?jt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Wt,(oe,se,ce,Pe,Yt,ne,ve)=>{const Se=se||Pe||ne,be=ce||Yt||ve||"?";return vt.Z.API_SERVER+"/api/attachments/"+Se+be+"&t="+(0,gt.Jn)(Se,Date.now())+(oe.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(jt=jt.replace(Ht,(oe,se,ce,Pe,Yt,ne,ve)=>{const Se=se||Pe||ne,be=ce||Yt||ve||"?";return vt.Z.API_SERVER+"/attachments/download/"+Se+be+"&t="+(0,gt.Jn)(Se,Date.now())+(oe.indexOf(")")>-1?")":"&")}).replace(Wt,(oe,se,ce,Pe,Yt,ne,ve)=>{const Se=se||Pe||ne,be=ce||Yt||ve||"?";return vt.Z.API_SERVER+"/api/attachments/"+Se+be+"&t="+(0,gt.Jn)(Se,Date.now())+(oe.indexOf(")")>-1?")":"&")}).replace(Jt,(oe,se,ce,Pe,Yt)=>{const ne=se||Pe,ve=ce||Yt||"";return'"'+vt.Z.API_SERVER+"/api/attachments/"+ne+ve+ne+ve+"&t="+(0,gt.Jn)(ne,Date.now())}).replace(Ut,(oe,se,ce,Pe,Yt)=>{const ne=se||Pe,ve=ce||Yt||"";return"("+vt.Z.API_SERVER+"/files/uploads/"+ne+ve+ne+ve+"&t="+(0,gt.Jn)(ne,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),jt)};var Nt=({value:jt="",className:Gt,showTextOnly:Wt,showLines:Jt,style:Ut={},stylesPrev:Ht={},highlightKeywords:oe,showProgramFill:se,isProgramFill:ce,disabledFill:Pe=!1,programFillValue:Yt,onFillChange:ne=be=>{},onFillBlur:ve=()=>{},onFillFocus:Se=()=>{}})=>{let be=ft(String(jt||""));const[fe,pe]=(0,ae.useState)(""),[he,Ce]=(0,ae.useState)("office"),[de,ye]=(0,ae.useState)([]),Ne=(0,ae.useRef)("a"+(0,bt.Z)()),xe={},re=Me=>/<style[\s\S]*?>/i.test(Me||""),Kt=(Me,Ae,Be)=>{const Ze=document.createElement(Me===Pt?"input":"textarea");Ze.style.width="100%",Ze.style.height=Me===Pt?"40px":"151px",Ze.rows=5,Ze.spellcheck=!1,Ze.name="edu-program-fill",Ze.placeholder="\u8BF7\u8F93\u5165",Ze.dataset.id=Ae;const Ye=Object.keys(xe).length;return xe[Ye]=Ze,`<span class="edu-program-fill-wrap ${Me===Pt?"":"show"}" style="width:${Me===Pt?"400px":"100%"}" title=${Be||""}><span>${Ze.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function wt(Me){return Me=Me.replace(/!\[.*?\]\(.*?\)/g,""),Me=Me.replace(/\[.*?\]\(.*?\)/g,""),Me=Me.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Me=Me.replace(/<embed.*?>/g,""),Me=Me.replace(/<img.*?>/g,""),Me=Me.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Me=Me.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Me=Me.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Me=Me.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Me}const Lt=Me=>!Wt&&re(be)?Me:Me.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ae,Be){let Ze=Be.replace(/(\n|\r)/g,"").split("}"),Ye=[];return Ze.map(Qe=>{Qe!=""&&Ye.push(`.${Ne.current} ${Qe}`)}),`<style>${Ye.join("}")}</style>`}),Xt=(0,ae.useMemo)(()=>{try{const Ze=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Ye=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Qe=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,He=/\(\/attachments\/download\//g;be=be.replace(He,"("+vt.Z.API_SERVER+"/attachments/download/").replace(Ze,"("+vt.Z.API_SERVER+"/api/attachments/").replace(Ye,'"'+vt.Z.API_SERVER+"/api/attachments/").replace(Qe,'"'+vt.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(Ze){}if(se){let Ze=-1;return be=be.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Ye,Qe,He){var Ue;return++Ze,Kt(Ye,Ze,(Ue=Yt==null?void 0:Yt[Ze])==null?void 0:Ue.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Lt(be||"")}</pre>`}let Me=Lt(be);Me=(0,ot.ZP)(Me);const Ae=(0,ot.ez)();be.match(/\[TOC\]/)&&(Me=Me.replace("<p>[TOC]</p>",(0,ot.Qv)()),(0,ot.Iy)()),Me=Me.replace(/(__special_katext_id_\d+__)/g,(Ze,Ye)=>{const{type:Qe,expression:He}=Ae[Ye];return(0,kt.renderToString)(Dt(He)||"",{displayMode:Qe==="block",throwOnError:!1,output:"html"})}),Me=Me.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ot.AL)();const Be=document.createElement("div");if(Be.innerHTML=Me,Wt)return Be.innerText;if(oe){const Ze=oe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Vt(Be,Ze),Be.innerHTML}return setTimeout(()=>ge(),500),Be.innerHTML},[be,oe]);(0,ae.useEffect)(()=>{$t.current&&$t.current.querySelectorAll(["input","textarea"]).forEach(Ae=>{Ae.oninput=ee,Ae.onblur=It,Ae.onfocus=Rt})},[de]),(0,ae.useEffect)(()=>{var Me,Ae,Be,Ze,Ye;if(Yt!=null&&Yt.length)try{const Qe=$t.current.querySelectorAll(".edu-program-fill-score"),He=$t.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ue,We]of He.entries())We.value=((Me=Yt==null?void 0:Yt[Ue])==null?void 0:Me.value)||"",((Ae=Yt==null?void 0:Yt[Ue])==null?void 0:Ae.type)==="warning"?We.className="program-fill-warning":((Be=Yt==null?void 0:Yt[Ue])==null?void 0:Be.type)==="success"?We.className="program-fill-success":We.className="";for(const[Ue,We]of Qe.entries())We.innerHTML=(Ze=Yt==null?void 0:Yt[Ue])!=null&&Ze.score?`${(Ye=Yt==null?void 0:Yt[Ue])==null?void 0:Ye.score}\u5206`:"";ye(Yt)}catch(Qe){console.log(Qe,"error")}},[Yt]);const ee=Me=>{de[Me.target.dataset.id]=de[Me.target.dataset.id]||{},de[Me.target.dataset.id].value=Me.target.value,ye([...de]),ne(de,Me.target.dataset.id)},It=Me=>{de[Me.target.dataset.id]=de[Me.target.dataset.id]||{},de[Me.target.dataset.id].value=Me.target.value,ye([...de]),ve(de,Me.target.dataset.id)},Rt=Me=>{de[Me.target.dataset.id]=de[Me.target.dataset.id]||{},de[Me.target.dataset.id].value=Me.target.value,ye([...de]),Se(de,Me.target.dataset.id)};function Vt(Me,Ae){return Me.childNodes.forEach(Be=>{var Ze;if(Be.childNodes.length>0)Vt(Be,Ae);else if(Be.nodeName!=="IMG")if(Be.innerHTML)Be.innerHTML=(Ze=Be.innerHTML)==null?void 0:Ze.replace(new RegExp(Ae,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Ye=document.createElement("span");Ye.innerHTML=Be.textContent.replace(new RegExp(Ae,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Be.replaceWith(Ye)}})}const $t=(0,ae.useRef)();ot.jb.WebkitLineClamp=Jt,Jt&&(Ut=ut(ut({},Ut),ot.jb));function ue(Me){let Ae=Me.target;if(Ae.tagName.toUpperCase()==="A"){let Be=Ae.getAttribute("href");if(Be.indexOf("office")>-1)Me.preventDefault(),pe(Be),Ce("office");else if(Be.indexOf("application/pdf")>-1)Me.preventDefault(),pe(Be),Ce("pdf");else if(Be.indexOf("text/html")>-1)Me.preventDefault(),pe(Be),Ce("html");else if(Be.startsWith("#")){Me.preventDefault();let Ze=document.getElementById(Be.replace("#",""));Ze&&Ze.scrollIntoView(!0)}}}const ge=()=>{var Me;const Ae=(Me=$t.current)==null?void 0:Me.querySelectorAll("video");Ae==null||Ae.forEach(Be=>{if(Be.oncontextmenu=()=>!1,Be.src.indexOf(".m3u8")>-1&&!Be.canPlayType("application/vnd.apple.mpegurl")){if(Bt.ZP.isSupported()){var Ze=new Bt.ZP;Ze.loadSource(Be.src),Ze.attachMedia(Be)}}})};return(0,ae.useEffect)(()=>{if($t.current&&Xt&&Xt.match(At)&&window.PR.prettyPrint(),$t.current)return $t.current.addEventListener("click",ue),()=>{var Me;(Me=$t.current)==null||Me.removeEventListener("click",ue),(0,ot.AL)(),(0,ot.Iy)()}},[Xt,$t.current,ue]),(0,ae.useEffect)(()=>{var Me;const Ae=Be=>{Be.preventDefault(),Be.clipboardData.setData("text",window.getSelection().toString())};return(Me=$t.current)==null||Me.addEventListener("copy",Ae),()=>{var Be;(Be=$t.current)==null||Be.removeEventListener("copy",Ae)}},[$t.current]),ae.createElement(ae.Fragment,null,Wt&&ae.createElement("div",{ref:$t},Xt),!Wt&&!re(Xt)&&ae.createElement("div",{ref:$t,style:ut({},Ut),className:`${Gt||""} ${Pe?"disabled-fill":""} markdown-body ${Ne.current}`,dangerouslySetInnerHTML:{__html:Xt}}),!Wt&&re(Xt)&&ae.createElement(xt,{html:Xt}),ae.createElement(St.Z,{close:!0,data:fe,type:fe!=null&&fe.length?he:"",style:ut({},Ht),onClose:()=>pe("")}))}},16253:function(dn,fn,le){"use strict";le.d(fn,{cT:function(){return Nt},pe:function(){return At}});var ae=le(59301),Re=le(14566),ot=le(6767),_t=le(38986),Bt=le(28209),vt=le.n(Bt),gt=le(1012),kt=le(25690),bt=le(47257),St=le.n(bt),Tt=Object.defineProperty,mt=Object.defineProperties,xt=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,at=(Gt,Wt,Jt)=>Wt in Gt?Tt(Gt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Gt[Wt]=Jt,it=(Gt,Wt)=>{for(var Jt in Wt||(Wt={}))z.call(Wt,Jt)&&at(Gt,Jt,Wt[Jt]);if(ft)for(var Jt of ft(Wt))tt.call(Wt,Jt)&&at(Gt,Jt,Wt[Jt]);return Gt},lt=(Gt,Wt)=>mt(Gt,xt(Wt)),ut=(Gt,Wt)=>{var Jt={};for(var Ut in Gt)z.call(Gt,Ut)&&Wt.indexOf(Ut)<0&&(Jt[Ut]=Gt[Ut]);if(Gt!=null&&ft)for(var Ut of ft(Gt))Wt.indexOf(Ut)<0&&tt.call(Gt,Ut)&&(Jt[Ut]=Gt[Ut]);return Jt},dt=(Gt,Wt,Jt)=>new Promise((Ut,Ht)=>{var oe=Pe=>{try{ce(Jt.next(Pe))}catch(Yt){Ht(Yt)}},se=Pe=>{try{ce(Jt.throw(Pe))}catch(Yt){Ht(Yt)}},ce=Pe=>Pe.done?Ut(Pe.value):Promise.resolve(Pe.value).then(oe,se);ce((Jt=Jt.apply(Gt,Wt)).next())});const{Dragger:Pt}=Re.default,At=Gt=>{const Wt="bf3c199c2470cb477d907b1e0917c17b",Jt="5183666c72eec9e4";var Ut=vt().enc.Utf8.parse(Wt);let Ht=vt().enc.Utf8.parse(Jt);var oe=vt().AES.decrypt(Gt,Ut,{iv:Ht,mode:vt().mode.CBC});return oe.toString(vt().enc.Utf8)};let Dt;const Ft=Gt=>dt(void 0,[Gt],function*({identifier:Wt,oldFilename:Jt,newFilename:Ut}){var Ht,oe,se,ce,Pe,Yt;const ne=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});ne.data=JSON.parse(At(ne.data));const ve=new OSS({endpoint:(Ht=ne==null?void 0:ne.data)==null?void 0:Ht.end_point,region:(oe=ne==null?void 0:ne.data)==null?void 0:oe.region,accessKeyId:(se=ne==null?void 0:ne.data)==null?void 0:se.access_key_id,accessKeySecret:(ce=ne==null?void 0:ne.data)==null?void 0:ce.access_key_secret,bucket:(Pe=ne==null?void 0:ne.data)==null?void 0:Pe.bucket,stsToken:(Yt=ne==null?void 0:ne.data)==null?void 0:Yt.security_token});return new Promise((Se,be)=>{console.log(11111,`${Wt}/${Jt}`,`${Wt}/${Ut}`,ne.data),ve.copy(`/${Wt}/${Jt}`,`/${Wt}/${Ut}`).then(fe=>{console.log("\u62F7\u8D1D\u6210\u529F",fe)}).catch(fe=>{console.log(fe)})})}),Nt=(Gt,Wt,Jt)=>dt(void 0,null,function*(){var Ut,Ht,oe,se,ce,Pe;Wt.file_name=Gt.name;const Yt=yield(0,_t.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",At(Yt.data)),Yt.data=JSON.parse(At(Yt.data));const ne=Gt.name.split(".");ne.pop();const ve=Wt.realFileName?ne.join(""):(0,gt.Z)(),Se=new(St())({endpoint:(Ut=Yt==null?void 0:Yt.data)==null?void 0:Ut.end_point,region:(Ht=Yt==null?void 0:Yt.data)==null?void 0:Ht.region,accessKeyId:(oe=Yt==null?void 0:Yt.data)==null?void 0:oe.access_key_id,accessKeySecret:(se=Yt==null?void 0:Yt.data)==null?void 0:se.access_key_secret,bucket:(ce=Yt==null?void 0:Yt.data)==null?void 0:ce.bucket,stsToken:(Pe=Yt==null?void 0:Yt.data)==null?void 0:Pe.security_token});return new Promise((be,fe)=>{var pe;Se.multipartUpload(`${ve}`,new Blob([Gt],{type:Gt.type}),lt(it({timeout:200*1e3,partSize:102400},Jt),{callback:{url:(pe=Yt==null?void 0:Yt.data)==null?void 0:pe.callback_url,host:Yt==null?void 0:Yt.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,_t.rz)(Wt)}})).then(function(he){var Ce;Gt.response=(Ce=he.data)==null?void 0:Ce.data,be(he==null?void 0:he.data)}).catch(function(he){fe(he),console.log("err:",he)})})}),jt=Gt=>{var Wt=Gt,{user:Jt,cancelUpload:Ut}=Wt,Ht=ut(Wt,["user","cancelUpload"]);const[oe,se]=(0,ae.useState)([]);let[ce,Pe]=(0,ae.useState)();const Yt={onRemove:ve=>{se([...oe.filter(Se=>Se.name!==ve.name)]),Ht.onChange(oe.filter(Se=>Se.name!==ve.name))},disabled:Ht.disabled,multiple:!0,fileList:oe==null?void 0:oe.map(ve=>ve.file),customRequest:()=>{},beforeUpload:ve=>dt(void 0,null,function*(){let Se=Ht.maxSize||1073741824;if(oe.filter(be=>be.name===ve.name).length){ot.ZP.info(`${ve.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(ve==null?void 0:ve.size)>Se?(ot.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${Se/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(oe.push({name:ve.name,file:ve}),se([...oe]),Ht.onChange(oe),!1)})},ne=(ve,Se)=>dt(void 0,null,function*(){var be,fe,pe,he,Ce,de;Se.file_name=ve.name;const ye=ve.name,Ne=yield(0,_t.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(Ne.data=JSON.parse(At(Ne.data)),(Ne==null?void 0:Ne.status)!==0){oe[oe.findIndex(Kt=>Kt.name===ye)].status="error",oe[oe.findIndex(Kt=>Kt.name===ye)].file.status="error",Ht.onChange(oe),ot.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}ce=new(St())({endpoint:(be=Ne==null?void 0:Ne.data)==null?void 0:be.end_point,region:(fe=Ne==null?void 0:Ne.data)==null?void 0:fe.region,accessKeyId:(pe=Ne==null?void 0:Ne.data)==null?void 0:pe.access_key_id,accessKeySecret:(he=Ne==null?void 0:Ne.data)==null?void 0:he.access_key_secret,bucket:(Ce=Ne==null?void 0:Ne.data)==null?void 0:Ce.bucket,stsToken:(de=Ne==null?void 0:Ne.data)==null?void 0:de.security_token}),console.log(ve,"file"),Pe(ce);const xe=ve.name.split(".");xe.pop();const re=ye.indexOf(".")>-1?Se.realFileName?xe.join("."):(0,gt.Z)():ye;return new Promise((Kt,wt)=>{var Lt;try{ce.multipartUpload(`${Ht.identifier}/${re}${ye.indexOf(".")>-1?"."+ye.split(".").pop():""}`,new Blob([ve.file],{type:ve.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Xt,ee,It)=>{try{console.log("\u8FDB\u5EA6",Xt,ee,It);const Rt=oe.findIndex(Vt=>Vt.name===ye);oe[Rt].file.percent=Xt*100,oe[Rt].tempCheckpoint=ee,se([...oe])}catch(Rt){}},checkpoint:oe[oe.findIndex(Xt=>Xt.name===ye)].tempCheckpoint,callback:{customValue:{id:ye+""},url:(Lt=Ne==null?void 0:Ne.data)==null?void 0:Lt.callback_url,host:Ne==null?void 0:Ne.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,_t.rz)(Se)}}).then(function(Xt){var ee,It,Rt;const Vt=oe.findIndex(ue=>ue.name===ye);let $t="done";if(((ee=Xt.data)==null?void 0:ee.status)===0){ve.response=(It=Xt.data)==null?void 0:It.data;const ue=oe.findIndex(ge=>ge.name===ye);oe[ue].status="done",oe[ue].file.status="done"}else ot.ZP.warning((Rt=Xt.data)==null?void 0:Rt.message),$t="error";oe[Vt].status=$t,oe[Vt].file.status=$t,Ht.onChange(oe),Kt(Xt==null?void 0:Xt.data)}).catch(function(Xt){oe[oe.findIndex(ee=>ee.name===ye)].status="error",oe[oe.findIndex(ee=>ee.name===ye)].file.status="error",ot.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),se([...oe]),Ht.onChange(oe),wt(Xt),console.log("err:",Xt)})}catch(Xt){}})});return(0,ae.useEffect)(()=>{oe.every(ve=>ve==="done"||ve==="error")&&Ht.onComplete(oe)},[oe]),(0,ae.useEffect)(()=>{Ut&&(ce==null||ce.cancel())},[Ut]),(0,ae.useEffect)(()=>{Ht.uploading&&oe.map(ve=>dt(void 0,null,function*(){var Se;if((!ve.status||ve.status==="error")&&!Ut){ve.status="uploading",ve.file.status="uploading";const be=yield ne(ve,{login:(Se=Jt==null?void 0:Jt.userInfo)==null?void 0:Se.login,container_type:Ht.container_type,container_id:Ht.container_id,description:Ht.description,realFileName:Ht.realFileName})}}))},[Ht.uploading]),ae.createElement(Pt,lt(it({},Yt),{height:Ht.height,className:Ht.className}),ae.createElement("p",{className:"ant-upload-hint"},Ht.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};fn.ZP=(0,kt.connect)(({loading:Gt,globalSetting:Wt,user:Jt})=>({globalSetting:Wt,loading:Gt.models.competitions,user:Jt}))(jt)},69720:function(dn,fn,le){"use strict";le.d(fn,{h:function(){return dt}});var ae=le(59301),Re=le(82326),ot=le(28284),_t=le(99571),Bt=le(89780),vt=le.n(Bt),gt=le(8336),kt=le(12469),bt=Object.defineProperty,St=Object.defineProperties,Tt=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,z=(Pt,At,Dt)=>At in Pt?bt(Pt,At,{enumerable:!0,configurable:!0,writable:!0,value:Dt}):Pt[At]=Dt,tt=(Pt,At)=>{for(var Dt in At||(At={}))xt.call(At,Dt)&&z(Pt,Dt,At[Dt]);if(mt)for(var Dt of mt(At))ft.call(At,Dt)&&z(Pt,Dt,At[Dt]);return Pt},at=(Pt,At)=>St(Pt,Tt(At));const it=Re.default.Option,lt={labelCol:{span:4},wrapperCol:{span:20}},ut={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"]};fn.Z=({callback:Pt,onCancel:At})=>{const[Dt,Ft]=(0,ae.useState)("python");function Nt(Gt){Ft(ut[Gt][1])}function jt(Gt){Pt(Gt)}return ae.createElement(ot.default,at(tt({},lt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:jt,style:{width:500}}),ae.createElement(ot.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ae.createElement(Re.default,{getPopupContainer:Gt=>Gt.parentNode,onChange:Nt},Object.keys(ut).map(Gt=>ae.createElement(it,{key:Gt,value:Gt},ut[Gt][0])))),ae.createElement(ot.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ae.createElement(dt,{mode:Dt})),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(_t.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(_t.ZP,{type:"ghost",onClick:At},"\u53D6\u6D88")))};function dt({value:Pt,onChange:At,mode:Dt,options:Ft={}}){const Nt=(0,ae.useRef)(),[jt,Gt]=(0,ae.useState)();return(0,ae.useEffect)(()=>{if(jt){let Wt=function(Jt){const Ut=Jt.getValue();At&&At(Ut)};return jt.on("change",Wt),()=>{jt.off("change",Wt)}}},[jt,At]),(0,ae.useEffect)(()=>{jt&&jt.setOption("mode",Dt)},[jt,Dt]),(0,ae.useEffect)(()=>{jt&&(Pt!==jt.getValue()||Pt==="")&&setTimeout(()=>{jt.setValue(Pt||"")},300)},[jt,Pt]),(0,ae.useEffect)(()=>{if(Nt.current&&!jt){const Wt=vt().fromTextArea(Nt.current,tt({mode:Dt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ft));Gt(Wt)}},[Nt.current,jt]),ae.createElement("div",{className:"my-codemirror-container"},ae.createElement("textarea",{ref:Nt}))}},39793:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return Ar}});var ae=le(59301),Re=le(89780),ot=le.n(Re),_t=le(76374),Bt=le(8336),vt=le(6313),gt=le(25717),kt=le(99498),bt=le(25419),St=le(67549),Tt=le(76902),mt=({value:sn="",className:qe,showTextOnly:$e,showLines:un,style:or={}})=>{const Qn=(0,ae.useMemo)(()=>"",[sn]);return ae.createElement(ae.Fragment,null,ae.createElement("div",{dangerouslySetInnerHTML:{__html:Qn}}))},xt=Object.defineProperty,ft=Object.defineProperties,z=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,lt=(sn,qe,$e)=>qe in sn?xt(sn,qe,{enumerable:!0,configurable:!0,writable:!0,value:$e}):sn[qe]=$e,ut=(sn,qe)=>{for(var $e in qe||(qe={}))at.call(qe,$e)&<(sn,$e,qe[$e]);if(tt)for(var $e of tt(qe))it.call(qe,$e)&<(sn,$e,qe[$e]);return sn},dt=(sn,qe)=>ft(sn,z(qe));let Pt=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function At({onActionCallback:sn,title:qe,icon:$e,actionName:un,className:or="",children:Qn}){function pr(){sn(un)}return ae.createElement("a",{title:qe,className:or,onClick:pr},ae.createElement("i",{className:`${$e}`}),Qn)}var Dt=({watch:sn,showNullButton:qe,showNullProgramButton:$e,onActionCallback:un,fullScreen:or,insertTemp:Qn,hidetoolBar:pr,extraUse:xn})=>{const Rn=[...Pt,{title:`${sn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${sn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ae.createElement("ul",{className:"markdown-toolbar-container"},!pr&&Rn.map((vr,Nr)=>ae.createElement("li",{key:Nr},vr.actionName?ae.createElement(At,dt(ut({},vr),{onActionCallback:un})):ae.createElement("span",{className:"v-line"}))),qe?ae.createElement("li",null,ae.createElement(At,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:un},ae.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,$e?ae.createElement(ae.Fragment,null,ae.createElement("li",null,ae.createElement(At,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:un},ae.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ae.createElement("li",null,ae.createElement(At,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:un},ae.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Qn&&ae.createElement("li",null,ae.createElement(At,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Qn}`,onActionCallback:un},ae.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),xn&&ae.createElement("li",null,xn),ae.createElement("li",{className:"btn-full-screen"},ae.createElement(At,{icon:`${or?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:or?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:un})))},Ft=le(91558),Nt=le(28284),jt=le(37568),Gt=le(99571),Wt=Object.defineProperty,Jt=Object.defineProperties,Ut=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,ce=(sn,qe,$e)=>qe in sn?Wt(sn,qe,{enumerable:!0,configurable:!0,writable:!0,value:$e}):sn[qe]=$e,Pe=(sn,qe)=>{for(var $e in qe||(qe={}))oe.call(qe,$e)&&ce(sn,$e,qe[$e]);if(Ht)for(var $e of Ht(qe))se.call(qe,$e)&&ce(sn,$e,qe[$e]);return sn},Yt=(sn,qe)=>Jt(sn,Ut(qe));const ne={labelCol:{span:4},wrapperCol:{span:20}};var ve=({callback:sn,onCancel:qe})=>{function $e(un){sn(un)}return ae.createElement(Nt.default,Yt(Pe({},ne),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:$e,style:{width:500}}),ae.createElement(Nt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ae.createElement(jt.default,null)),ae.createElement(Nt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ae.createElement(jt.default,null)),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(Gt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Gt.ZP,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},Se=le(69720),be=le(17077),fe=le(62957),pe=le(77019),he=le(9507),Ce=le(59301),de=({callback:sn,onCancel:qe})=>{const $e=document.createElement("canvas"),un=$e.getContext("2d");$e.width=1e3,$e.height=800,un.fillStyle="#ffffff",un.fillRect(0,0,$e.width,$e.height);const or=$e.toDataURL("image/png");return Ce.createElement(fe.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Ce.createElement(pe.Z,{style:{height:"100vh"}},Ce.createElement(he.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:or,visible:!0,title:String(Date.now())},onOk:Qn=>{sn({src:Qn.url})},onClose:qe})))},ye=le(12378);function Ne(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Ne,go.CommandHandler),Ne.prototype.canAlignSelection=function(){var sn=this.diagram;return!(sn===null||sn.isReadOnly||sn.isModelReadOnly||sn.selection.count<2)},Ne.prototype.alignLeft=function(){var sn=this.diagram;sn.startTransaction("aligning left");var qe=1/0;sn.selection.each(function($e){$e instanceof go.Link||(qe=Math.min($e.position.x,qe))}),sn.selection.each(function($e){$e instanceof go.Link||$e.move(new go.Point(qe,$e.position.y))}),sn.commitTransaction("aligning left")},Ne.prototype.alignRight=function(){var sn=this.diagram;sn.startTransaction("aligning right");var qe=-1/0;sn.selection.each(function($e){if(!($e instanceof go.Link)){var un=$e.actualBounds.x+$e.actualBounds.width;qe=Math.max(un,qe)}}),sn.selection.each(function($e){$e instanceof go.Link||$e.move(new go.Point(qe-$e.actualBounds.width,$e.position.y))}),sn.commitTransaction("aligning right")},Ne.prototype.alignTop=function(){var sn=this.diagram;sn.startTransaction("alignTop");var qe=1/0;sn.selection.each(function($e){$e instanceof go.Link||(qe=Math.min($e.position.y,qe))}),sn.selection.each(function($e){$e instanceof go.Link||$e.move(new go.Point($e.position.x,qe))}),sn.commitTransaction("alignTop")},Ne.prototype.alignBottom=function(){var sn=this.diagram;sn.startTransaction("aligning bottom");var qe=-1/0;sn.selection.each(function($e){if(!($e instanceof go.Link)){var un=$e.actualBounds.y+$e.actualBounds.height;qe=Math.max(un,qe)}}),sn.selection.each(function($e){$e instanceof go.Link||$e.move(new go.Point($e.actualBounds.x,qe-$e.actualBounds.height))}),sn.commitTransaction("aligning bottom")},Ne.prototype.alignCenterX=function(){var sn=this.diagram,qe=sn.selection.first();if(qe){sn.startTransaction("aligning Center X");var $e=qe.actualBounds.x+qe.actualBounds.width/2;sn.selection.each(function(un){un instanceof go.Link||un.move(new go.Point($e-un.actualBounds.width/2,un.actualBounds.y))}),sn.commitTransaction("aligning Center X")}},Ne.prototype.alignCenterY=function(){var sn=this.diagram,qe=sn.selection.first();if(qe){sn.startTransaction("aligning Center Y");var $e=qe.actualBounds.y+qe.actualBounds.height/2;sn.selection.each(function(un){un instanceof go.Link||un.move(new go.Point(un.actualBounds.x,$e-un.actualBounds.height/2))}),sn.commitTransaction("aligning Center Y")}},Ne.prototype.alignColumn=function(sn){var qe=this.diagram;qe.startTransaction("align Column"),sn===void 0&&(sn=0),sn=parseFloat(sn);var $e=new Array;qe.selection.each(function(xn){xn instanceof go.Link||$e.push(xn)});for(var un=0;un<$e.length-1;un++){var or=$e[un],Qn=or.actualBounds.y+or.actualBounds.height+sn,pr=$e[un+1];pr.move(new go.Point(or.actualBounds.x,Qn))}qe.commitTransaction("align Column")},Ne.prototype.alignRow=function(sn){sn===void 0&&(sn=0),sn=parseFloat(sn);var qe=this.diagram;qe.startTransaction("align Row");var $e=new Array;qe.selection.each(function(xn){xn instanceof go.Link||$e.push(xn)});for(var un=0;un<$e.length-1;un++){var or=$e[un],Qn=or.actualBounds.x+or.actualBounds.width+sn,pr=$e[un+1];pr.move(new go.Point(Qn,or.actualBounds.y))}qe.commitTransaction("align Row")},Ne.prototype.canRotate=function(sn){var qe=this.diagram;return!(qe===null||qe.isReadOnly||qe.isModelReadOnly||qe.selection.count<1)},Ne.prototype.rotate=function(sn){sn===void 0&&(sn=90);var qe=this.diagram;qe.startTransaction("rotate "+sn.toString());var qe=this.diagram;qe.selection.each(function($e){$e instanceof go.Link||$e instanceof go.Group||($e.angle+=sn)}),qe.commitTransaction("rotate "+sn.toString())},Ne.prototype.pullToFront=function(){var sn=this.diagram;sn.startTransaction("pullToFront");var qe=new go.Map;sn.selection.each(function($e){qe.set($e.layer,0)}),qe.iteratorKeys.each(function($e){var un=0;$e.parts.each(function(or){if(!or.isSelected){var Qn=or.zOrder;isNaN(Qn)?or.zOrder=0:un=Math.max(un,Qn)}}),qe.set($e,un)}),sn.selection.each(function($e){Ne._assignZOrder($e,qe.get($e.layer)+1)}),sn.commitTransaction("pullToFront")},Ne.prototype.pushToBack=function(){var sn=this.diagram;sn.startTransaction("pushToBack");var qe=new go.Map;sn.selection.each(function($e){qe.set($e.layer,0)}),qe.iteratorKeys.each(function($e){var un=0;$e.parts.each(function(or){if(!or.isSelected){var Qn=or.zOrder;isNaN(Qn)?or.zOrder=0:un=Math.min(un,Qn)}}),qe.set($e,un)}),sn.selection.each(function($e){Ne._assignZOrder($e,qe.get($e.layer)-1-Ne._findGroupDepth($e))}),sn.commitTransaction("pushToBack")},Ne._assignZOrder=function(sn,qe,$e){$e===void 0&&($e=sn),sn.layer===$e.layer&&(sn.zOrder=qe),sn instanceof go.Group&&sn.memberParts.each(function(un){Ne._assignZOrder(un,qe+1,$e)})},Ne._findGroupDepth=function(sn){if(sn instanceof go.Group){var qe=0;return sn.memberParts.each(function($e){qe=Math.max(qe,Ne._findGroupDepth($e))}),qe+1}else return 0},Ne.prototype.doKeyDown=function(){var sn=this.diagram;if(sn!==null){var qe=sn.lastInput;if(qe.key==="Up"||qe.key==="Down"||qe.key==="Left"||qe.key==="Right"){var $e=this.arrowKeyBehavior;if($e==="none")return;if($e==="select"){this._arrowKeySelect();return}else if($e==="move"){this._arrowKeyMove();return}else if($e==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Ne.prototype._getAllParts=function(){var sn=new Array;return this.diagram.nodes.each(function(qe){sn.push(qe)}),this.diagram.parts.each(function(qe){sn.push(qe)}),sn},Ne.prototype._arrowKeyMove=function(){var sn=this.diagram,qe=sn.lastInput,$e=0,un=0;if(qe.control||qe.meta)$e=1,un=1;else if(sn.grid!==null){var or=sn.grid.gridCellSize;un=or.width,$e=or.height}sn.startTransaction("arrowKeyMove"),sn.selection.each(function(Qn){qe.key==="Up"?Qn.move(new go.Point(Qn.actualBounds.x,Qn.actualBounds.y-$e)):qe.key==="Down"?Qn.move(new go.Point(Qn.actualBounds.x,Qn.actualBounds.y+$e)):qe.key==="Left"?Qn.move(new go.Point(Qn.actualBounds.x-un,Qn.actualBounds.y)):qe.key==="Right"&&Qn.move(new go.Point(Qn.actualBounds.x+un,Qn.actualBounds.y))}),sn.commitTransaction("arrowKeyMove")},Ne.prototype._arrowKeySelect=function(){var sn=this.diagram,qe=sn.lastInput,$e=null;qe.key==="Up"?$e=this._findNearestPartTowards(270):qe.key==="Down"?$e=this._findNearestPartTowards(90):qe.key==="Left"?$e=this._findNearestPartTowards(180):qe.key==="Right"&&($e=this._findNearestPartTowards(0)),$e!==null&&(qe.shift?$e.isSelected=!0:qe.control||qe.meta?$e.isSelected=!$e.isSelected:sn.select($e))},Ne.prototype._findNearestPartTowards=function(sn){var qe=this.diagram.selection.first();if(qe===null)return null;for(var $e=qe.actualBounds.center,un=this._getAllParts(),or=1/0,Qn=qe,pr=0;pr<un.length;pr++){var xn=un[pr];if(xn!==qe&&xn.canSelect()){var Rn=xn.actualBounds.center,vr=$e.directionPoint(Rn),Nr=this._angleCloseness(vr,sn);if(Nr<=45){var Nn=$e.distanceSquaredPoint(Rn);Nn*=1+Math.sin(Nr*Math.PI/180),Nn<or&&(or=Nn,Qn=xn)}}}return Qn},Ne.prototype._angleCloseness=function(sn,qe){return Math.min(Math.abs(qe-sn),Math.min(Math.abs(qe+360-sn),Math.abs(qe-360-sn)))},Ne.prototype._arrowKeyTree=function(){var sn=this.diagram,qe=sn.selection.first();if(qe instanceof go.Node){var $e=sn.lastInput;if($e.key==="Right"){if(!qe.isTreeLeaf)if(!qe.isTreeExpanded)sn.commandHandler.canExpandTree(qe)&&sn.commandHandler.expandTree(qe);else{var un=this._sortTreeChildrenByY(qe).first();un!==null&&sn.select(un)}}else if($e.key==="Left")if(!qe.isTreeLeaf&&qe.isTreeExpanded)sn.commandHandler.canCollapseTree(qe)&&sn.commandHandler.collapseTree(qe);else{var or=qe.findTreeParentNode();or!==null&&sn.select(or)}else if($e.key==="Up"){var or=qe.findTreeParentNode();if(or!==null){var Qn=this._sortTreeChildrenByY(or),pr=Qn.indexOf(qe);if(pr>0){for(var xn=Qn.elt(pr-1);xn!==null&&xn.isTreeExpanded&&!xn.isTreeLeaf;){var Rn=this._sortTreeChildrenByY(xn);xn=Rn.last()}xn!==null&&sn.select(xn)}else sn.select(or)}}else if($e.key==="Down")if(qe.isTreeExpanded&&!qe.isTreeLeaf){var un=this._sortTreeChildrenByY(qe).first();un!==null&&sn.select(un)}else for(;qe!==null;){var or=qe.findTreeParentNode();if(or===null)break;var Qn=this._sortTreeChildrenByY(or),pr=Qn.indexOf(qe);if(pr<Qn.length-1){sn.select(Qn.elt(pr+1));break}else qe=or}var vr=sn.selection.first();vr!==null&&sn.scrollToRect(vr.actualBounds)}},Ne.prototype._sortTreeChildrenByY=function(sn){var qe=new go.List().addAll(sn.findTreeChildrenNodes());return qe.sort(function($e,un){var or=$e.location,Qn=un.location;return or.y<Qn.y?-1:or.y>Qn.y?1:or.x<Qn.x?-1:or.x>Qn.x?1:0}),qe},Ne.prototype.copyToClipboard=function(sn){go.CommandHandler.prototype.copyToClipboard.call(this,sn),this._lastPasteOffset.set(this.pasteOffset)},Ne.prototype.pasteFromClipboard=function(){var sn=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(sn,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),sn},Object.defineProperty(Ne.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(sn){if(sn!=="move"&&sn!=="select"&&sn!=="scroll"&&sn!=="tree"&&sn!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+sn);this._arrowKeyBehavior=sn}}),Object.defineProperty(Ne.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(sn){if(!(sn instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+sn);this._pasteOffset.set(sn)}});var xe=Ne,re=le(63720),Kt=le(5269),wt=le(38986),Lt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Xt=le(48790),ee=le(59301),It=(sn,qe,$e)=>new Promise((un,or)=>{var Qn=Rn=>{try{xn($e.next(Rn))}catch(vr){or(vr)}},pr=Rn=>{try{xn($e.throw(Rn))}catch(vr){or(vr)}},xn=Rn=>Rn.done?un(Rn.value):Promise.resolve(Rn.value).then(Qn,pr);xn(($e=$e.apply(sn,qe)).next())});function Rt({onCancel:sn,callback:qe}){let $e=(0,ae.useRef)(),un=(0,ae.useRef)(),or=(0,ae.useRef)(),Qn=(0,ae.useRef)(!1);const pr=(0,ae.useRef)(!1),[xn,Rn]=(0,ae.useState)(0);function vr(){const Nn=ye.bx.make,Oe={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};$e.current=new ye.S0(un.current,{padding:20,grid:Nn(ye.s_,"Grid",Nn(ye.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Nn(ye.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:tn=>{var tr=tn.diagram.commandHandler.addTopLevelParts(tn.diagram.selection,!0);tr||tn.diagram.currentTool.doCancel()},commandHandler:Nn(xe),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:tn=>{var tr=tn.subject;tr.location=tr.location.copy().snapToGridPoint(tn.diagram.grid.gridOrigin,tn.diagram.grid.gridCellSize),setTimeout(()=>{tn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:tn=>{var tr=tn.subject;setTimeout(()=>{tn.diagram.commandHandler.editTextBlock()})},LinkRelinked:tn=>{var tr=tn.parameter.part;tr.invalidateConnectedLinks();var gr=tn.subject;tn.diagram.toolManager.linkingTool.isForwards?gr.toNode.invalidateConnectedLinks():gr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),$e.current.nodeTemplate=Nn(ye.NB,"Auto",{locationSpot:ye.z6.Center,locationObjectName:"SHAPE",desiredSize:new ye.$u(120,60),minSize:new ye.$u(40,40),resizable:!0,resizeCellSize:new ye.$u(10,10),rotatable:!0},new ye.KX("location","loc",ye.E9.parse).makeTwoWay(ye.E9.stringify),new ye.KX("desiredSize","size",ye.$u.parse).makeTwoWay(ye.$u.stringify),Nn(ye.bn,{name:"SHAPE",fill:Oe.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:ye.z6.AllSides,toSpot:ye.z6.AllSides},new ye.KX("figure"),new ye.KX("fill"),new ye.KX("stroke","borderColor"),new ye.KX("strokeWidth","thickness"),new ye.KX("strokeDashArray","dash")),Nn(ye.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Nn(ye.al,{margin:1,textAlign:"center",overflow:ye.al.OverflowEllipsis,editable:!0},new ye.KX("text").makeTwoWay(),new ye.KX("stroke","color"))),$e.current.nodeTemplate.toolTip=Nn("ToolTip",Nn(ye.s_,"Vertical",{maxSize:new ye.$u(200,NaN)},Nn(ye.al,{font:"bold 10pt sans-serif",textAlign:"center"},new ye.KX("text")),Nn(ye.al,{font:"10pt sans-serif",textAlign:"center"},new ye.KX("text","details"))));function Ke(tn,tr){var gr=(Hn,Zr)=>{Hn.handled=!0,Hn.diagram.model.commit(Ir=>{var Hr=Zr.part.adornedPart,Qr=new ye.E9().setRectSpot(Hr.actualBounds,tn);Qr.subtract(Hr.location),Qr.scale(2,2),Qr.x+=Math.sign(Qr.x)*130,Qr.y+=Math.sign(Qr.y)*130,Qr.add(Hr.location),Qr.snapToGridPoint(Hn.diagram.grid.gridOrigin,Hn.diagram.grid.gridCellSize);var ei=Ir.copyNodeData(Hr.data);Ir.setGroupKeyForNodeData(ei,Ir.getGroupKeyForNodeData(Hr.data)),Ir.addNodeData(ei);var hi={from:Hr.key,to:Ir.getKeyForNodeData(ei)};Ir.addLinkData(hi);var mn=Hn.diagram.findNodeForData(ei);mn.location=Qr,Hn.diagram.select(mn),setTimeout(()=>{Hn.diagram.commandHandler.editTextBlock()},20)})};return Nn(ye.bn,{figure:tr,alignment:tn,alignmentFocus:tn.opposite(),width:tn.equals(ye.z6.Top)||tn.equals(ye.z6.Bottom)?25:18,height:tn.equals(ye.z6.Top)||tn.equals(ye.z6.Bottom)?18:25,fill:"orange",stroke:Oe.white,strokeWidth:4,mouseEnter:(Hn,Zr)=>Zr.fill="dodgerblue",mouseLeave:(Hn,Zr)=>Zr.fill="orange",isActionable:!0,click:gr,contextClick:gr})}function Ln(tn){return Nn(ye.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:(tr,gr)=>gr.fill="dodgerblue",mouseLeave:(tr,gr)=>gr.fill="orange",click:(tr,gr)=>{tr.diagram.commandHandler.showContextMenu(gr.part.adornedPart)}},tn||{})}$e.current.nodeTemplate.selectionAdornmentTemplate=Nn(ye.uz,"Spot",Nn(ye.Vm,{padding:10}),Ke(ye.z6.Top,"TriangleUp"),Ke(ye.z6.Left,"TriangleLeft"),Ke(ye.z6.Right,"TriangleRight"),Ke(ye.z6.Bottom,"TriangleDown"),Ln({alignment:new ye.z6(.75,0)}));function An(tn,tr){return(gr,Hn)=>{gr.handled=!0,gr.diagram.model.commit(Zr=>{Zr.set(Hn.part.adornedPart.data,tn,tr)})}}function en(tn,tr){return tr||(tr="color"),Nn(ye.bn,{width:16,height:16,stroke:"lightgray",fill:tn,margin:1,background:"transparent",mouseEnter:(gr,Hn)=>Hn.stroke="dodgerblue",mouseLeave:(gr,Hn)=>Hn.stroke="lightgray",click:An(tr,tn),contextClick:An(tr,tn)})}function Tn(){return[Nn("ContextMenuButton",Nn(ye.s_,"Horizontal",en(Oe.white,"fill"),en(Oe.beige,"fill"),en(Oe.extralightblue,"fill"),en(Oe.extralightred,"fill"))),Nn("ContextMenuButton",Nn(ye.s_,"Horizontal",en(Oe.lightgray,"fill"),en(Oe.lightgreen,"fill"),en(Oe.lightblue,"fill"),en(Oe.lightred,"fill")))]}function kn(){return[Nn("ContextMenuButton",Nn(ye.s_,"Horizontal",en(Oe.black),en(Oe.green),en(Oe.blue),en(Oe.red))),Nn("ContextMenuButton",Nn(ye.s_,"Horizontal",en(Oe.white),en(Oe.magenta),en(Oe.purple),en(Oe.orange)))]}function On(tn,tr){return tr||(tr="thickness"),Nn(ye.bn,"LineH",{width:16,height:16,strokeWidth:tn,margin:1,background:"transparent",mouseEnter:(gr,Hn)=>Hn.background="dodgerblue",mouseLeave:(gr,Hn)=>Hn.background="transparent",click:An(tr,tn),contextClick:An(tr,tn)})}function er(tn,tr){return tr||(tr="dash"),Nn(ye.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:tn,margin:1,background:"transparent",mouseEnter:(gr,Hn)=>Hn.background="dodgerblue",mouseLeave:(gr,Hn)=>Hn.background="transparent",click:An(tr,tn),contextClick:An(tr,tn)})}function Fn(){return[Nn("ContextMenuButton",Nn(ye.s_,"Horizontal",On(1),On(2),On(3),On(4))),Nn("ContextMenuButton",Nn(ye.s_,"Horizontal",er(null),er([2,4]),er([4,4])))]}function Bn(tn,tr){return tr||(tr="figure"),Nn(ye.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:tn,margin:1,background:"transparent",mouseEnter:(gr,Hn)=>Hn.fill="dodgerblue",mouseLeave:(gr,Hn)=>Hn.fill="lightgray",click:An(tr,tn),contextClick:An(tr,tn)})}$e.current.nodeTemplate.contextMenu=Nn("ContextMenu",Nn("ContextMenuButton",Nn(ye.s_,"Horizontal",Bn("Rectangle"),Bn("RoundedRectangle"),Bn("Ellipse"),Bn("Diamond"))),Nn("ContextMenuButton",Nn(ye.s_,"Horizontal",Bn("Parallelogram2"),Bn("ManualOperation"),Bn("Procedure"),Bn("Cylinder1"))),Nn("ContextMenuButton",Nn(ye.s_,"Horizontal",Bn("Terminator"),Bn("CreateRequest"),Bn("Document"),Bn("TriangleDown"))),Tn(),kn(),Fn()),$e.current.groupTemplate=Nn(ye.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:ye.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(tn,tr)=>{var gr=tr.addMembers(tr.diagram.selection,!0);gr||tr.diagram.currentTool.doCancel()},avoidable:!1},new ye.KX("location","loc",ye.E9.parse).makeTwoWay(ye.E9.stringify),Nn(ye.s_,"Auto",{name:"BODY"},Nn(ye.bn,{parameter1:10,fill:Oe.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:ye.z6.AllSides,toSpot:ye.z6.AllSides},new ye.KX("fill"),new ye.KX("stroke","color"),new ye.KX("strokeWidth","thickness"),new ye.KX("strokeDashArray","dash")),Nn(ye.Vm,{background:"transparent",margin:20})),Nn(ye.al,{alignment:ye.z6.Top,alignmentFocus:ye.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new ye.KX("text"),new ye.KX("stroke","color"))),$e.current.groupTemplate.selectionAdornmentTemplate=Nn(ye.uz,"Spot",Nn(ye.s_,"Auto",Nn(ye.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Nn(ye.Vm,{margin:1.5})),Ln({alignment:ye.z6.TopRight,alignmentFocus:ye.z6.BottomRight})),$e.current.groupTemplate.contextMenu=Nn("ContextMenu",Tn(),kn(),Fn()),$e.current.linkTemplate=Nn(ye.rU,{layerName:"Foreground",routing:ye.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new ye.KX("fromSpot","fromSpot",ye.z6.parse),new ye.KX("toSpot","toSpot",ye.z6.parse),new ye.KX("fromShortLength","dir",tn=>tn>=1?10:0),new ye.KX("toShortLength","dir",tn=>tn>=1?10:0),new ye.KX("points").makeTwoWay(),Nn(ye.bn,{strokeWidth:2},new ye.KX("stroke","color"),new ye.KX("strokeWidth","thickness"),new ye.KX("strokeDashArray","dash")),Nn(ye.bn,{segmentIndex:0,segmentOffset:new ye.E9(15,0),segmentOrientation:ye.rU.OrientAlong,alignmentFocus:ye.z6.Right,figure:"circle",width:10,strokeWidth:0},new ye.KX("fill","color"),new ye.KX("visible","dir",tn=>tn===1)),Nn(ye.bn,{segmentIndex:-1,segmentOffset:new ye.E9(-10,6),segmentOrientation:ye.rU.OrientPlus90,alignmentFocus:ye.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new ye.KX("fill","color"),new ye.KX("visible","dir",tn=>tn>=1),new ye.KX("width","thickness",tn=>7+3*tn),new ye.KX("height","thickness",tn=>7+3*tn),new ye.KX("segmentOffset","thickness",tn=>new ye.E9(-15,4+1.5*tn))),Nn(ye.bn,{segmentIndex:0,segmentOffset:new ye.E9(15,-6),segmentOrientation:ye.rU.OrientMinus90,alignmentFocus:ye.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new ye.KX("fill","color"),new ye.KX("visible","dir",tn=>tn===2),new ye.KX("width","thickness",tn=>7+3*tn),new ye.KX("height","thickness",tn=>7+3*tn),new ye.KX("segmentOffset","thickness",tn=>new ye.E9(-15,4+1.5*tn))),Nn(ye.al,{alignmentFocus:new ye.z6(0,1,-4,0),editable:!0},new ye.KX("text").makeTwoWay(),new ye.KX("stroke","color"))),$e.current.linkTemplate.selectionAdornmentTemplate=Nn(ye.uz,Nn(ye.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Un(2)},new ye.KX("pathPattern","thickness",Un)),Ln({alignmentFocus:new ye.z6(0,0,-6,-4)}));function Un(tn){return Nn(ye.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(tn+4).toString()+" H3"})}function cr(tn){var tr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return tn===0?tr="M0 0 M16 16 M0 8 L16 8":tn===2&&(tr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Nn(ye.bn,{geometryString:tr,margin:2,background:"transparent",mouseEnter:(gr,Hn)=>Hn.background="dodgerblue",mouseLeave:(gr,Hn)=>Hn.background="transparent",click:An("dir",tn),contextClick:An("dir",tn)})}function lr(tn){var tr=(gr,Hn)=>{gr.handled=!0,gr.diagram.model.commit(Zr=>{var Ir=Hn.part.adornedPart;Zr.set(Ir.data,tn?"toSpot":"fromSpot",ye.z6.stringify(ye.z6.AllSides)),(tn?Ir.toNode:Ir.fromNode).invalidateConnectedLinks()})};return Nn(ye.bn,{width:12,height:12,fill:"transparent",mouseEnter:(gr,Hn)=>Hn.background="dodgerblue",mouseLeave:(gr,Hn)=>Hn.background="transparent",click:tr,contextClick:tr})}function yn(tn,tr){var gr=0,Hn=ye.z6.RightSide;tn.equals(ye.z6.Top)?(gr=270,Hn=ye.z6.TopSide):tn.equals(ye.z6.Left)?(gr=180,Hn=ye.z6.LeftSide):tn.equals(ye.z6.Bottom)&&(gr=90,Hn=ye.z6.BottomSide),tr||(gr-=180);var Zr=(Ir,Hr)=>{Ir.handled=!0,Ir.diagram.model.commit(Qr=>{var ei=Hr.part.adornedPart;Qr.set(ei.data,tr?"toSpot":"fromSpot",ye.z6.stringify(Hn)),(tr?ei.toNode:ei.fromNode).invalidateConnectedLinks()})};return Nn(ye.bn,{alignment:tn,alignmentFocus:tn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:gr,background:"transparent",mouseEnter:(Ir,Hr)=>Hr.background="dodgerblue",mouseLeave:(Ir,Hr)=>Hr.background="transparent",click:Zr,contextClick:Zr})}$e.current.linkTemplate.contextMenu=Nn("ContextMenu",kn(),Fn(),Nn("ContextMenuButton",Nn(ye.s_,"Horizontal",cr(0),cr(1),cr(2))),Nn("ContextMenuButton",Nn(ye.s_,"Horizontal",Nn(ye.s_,"Spot",lr(!1),yn(ye.z6.Top,!1),yn(ye.z6.Left,!1),yn(ye.z6.Right,!1),yn(ye.z6.Bottom,!1)),Nn(ye.s_,"Spot",{margin:new ye.Zt(0,0,0,2)},lr(!0),yn(ye.z6.Top,!0),yn(ye.z6.Left,!0),yn(ye.z6.Right,!0),yn(ye.z6.Bottom,!0)))));const In=`{ "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 Gr=["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 Yr(tn){return console.log("shapeName:",tn),Gr.indexOf(tn)>=0}var fi=new ye.YI(or.current,{maxSelectionCount:1,linkTemplate:Nn(ye.rU,{locationSpot:ye.z6.Center,selectionAdornmentTemplate:Nn(ye.uz,"Link",{locationSpot:ye.z6.Center},Nn(ye.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Nn(ye.bn,{toArrow:"Standard",stroke:null}))},{routing:ye.rU.AvoidsNodes,curve:ye.rU.JumpOver,corner:5,toShortLength:4},new ye.KX("points"),Nn(ye.bn,{isPanelMain:!0,strokeWidth:2}),Nn(ye.bn,{toArrow:"Standard",stroke:null})),model:new ye.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...ye.bn.getFigureGenerators().toArray().map(tn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:tn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return $e.current.addDiagramListener("TextEdited",function(tn){var tr;const gr=tn.subject.part;var Hn=(tr=document.activeElement)==null?void 0:tr.value;typeof Hn=="string"&&Hn.trim()===""&&$e.current.model.commit(function(Zr){Zr.set(gr.data,"text","\u672A\u547D\u540D"),$e.current.commandHandler.stopCommand()},"increment")}),fi.nodeTemplate=Nn(ye.NB,"Auto",{locationSpot:ye.z6.Center},new ye.KX("location","location",ye.E9.parse).makeTwoWay(ye.E9.stringify),Nn(ye.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 ye.KX("stroke").makeTwoWay(),new ye.KX("fill").makeTwoWay(),new ye.KX("figure")),Nn(ye.al,{margin:new ye.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new ye.$u(16,16),maxSize:new ye.$u(10,NaN),textAlign:"center",editable:!0},new ye.KX("key").makeTwoWay())),setTimeout(()=>{$e.current.grid=Nn(ye.s_,"Grid",Nn(ye.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Nn(ye.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),$e.current.grid.visible=!0,$e.current.grid.gridCellStroke="darkgray",$e.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=$e.current,$e.current}const Nr=()=>It(this,null,function*(){var Nn,Oe=$e.current.makeImage();const Ke=yield(0,wt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Oe.src,file_data:JSON.stringify({login:(Nn=(0,Xt.eY)())==null?void 0:Nn.login,data:JSON.parse($e.current.model.toJson())})}});qe({src:Ke.url})});return(0,ae.useEffect)(()=>(setTimeout(()=>{vr()},500),Rn(xn+1),()=>{$e.current=null}),[]),ee.createElement("div",{ref:pr,className:"body-overflow-initial"},ee.createElement(fe.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!xn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:ee.createElement(pe.Z,null,ee.createElement(Kt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ee.createElement(Kt.Z,{onClick:()=>{var Nn,Oe,Ke=$e.current.selection.first();if(Qn.current=!Qn.current,document.activeElement&&Ke){let Ln=(Oe=(Nn=document.activeElement)==null?void 0:Nn.value)==null?void 0:Oe.trim();typeof Ln=="string"&&$e.current.model.commit(function(An){An.set(Ke.data,"text",Ln||"\u672A\u547D\u540D"),$e.current.commandHandler.stopCommand()},"increment")}Rn(xn+1)}},ee.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:sn},ee.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:Qn.current?"none":"block"},className:Lt.flowChartWrp},ee.createElement("div",{style:{display:"flex",height:"100%"}},ee.createElement("div",{style:{width:"300px",height:"100%"}},ee.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),ee.createElement("div",{style:{height:"calc(100% - 50px)"},className:Lt.myPaletteDiv,ref:or})),ee.createElement("div",{style:{flex:1,position:"relative"}},ee.createElement("div",{ref:un,style:{height:"80vh"}}))),ee.createElement("div",{className:"tr"},ee.createElement(Gt.ZP,{size:"large",onClick:Nr,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Vt=Rt,$t=le(47889),ue=le(71051);const ge=$t.ZP.Group,Me={margin:"0 8px"};var Ae=({callback:sn,onCancel:qe})=>{function $e(un){sn(un)}return ae.createElement(Nt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:$e},ae.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ae.createElement("span",{style:Me},"\u5355\u5143\u683C\u6570\uFF1A"),ae.createElement("span",{style:Me},"\u884C\u6570"),ae.createElement(Nt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ae.createElement(ue.Z,null)),ae.createElement("span",{style:Me},"\u5217\u6570"),ae.createElement(Nt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ae.createElement(ue.Z,null))),ae.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ae.createElement("span",{style:Me},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ae.createElement(Nt.default.Item,{name:"align"},ae.createElement(ge,null,ae.createElement($t.ZP,{value:"default"},ae.createElement("i",{className:"fa fa-align-justify"})),ae.createElement($t.ZP,{value:"left"},ae.createElement("i",{className:"fa fa-align-left"})),ae.createElement($t.ZP,{value:"center"},ae.createElement("i",{className:"fa fa-align-center"})),ae.createElement($t.ZP,{value:"right"},ae.createElement("i",{className:"fa fa-align-right"}))))),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(Gt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Gt.ZP,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},Be=le(71411),Ze=le(43001),Ye=le.n(Ze),He=(0,ae.forwardRef)(({use3d:sn,width:qe,height:$e,callback:un,showSaveButton:or},Qn)=>{const pr=(0,ae.useRef)(),xn=(0,ae.useRef)(),[Rn,vr]=(0,ae.useState)(!1),Nr=(0,ae.useRef)({id:pr,appName:"graphing",width:qe||1e3,height:$e||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ae.useEffect)(()=>{xn.current=new(Ye())(Nr.current,!0),window.onload=function(){xn.current.inject("applet_container")}},[]);const Nn=()=>{var Oe=window.ggbApplet.getPNGBase64(1,!0,72);return un&&un(Oe),Oe};return(0,ae.useEffect)(()=>{Nr.current.appName=Rn?"3D":"graphing",xn.current.inject("applet_container")},[Rn]),(0,ae.useEffect)(()=>{vr(sn)},[sn]),(0,ae.useImperativeHandle)(Qn,()=>({getImgData:Nn})),ae.createElement(ae.Fragment,null,ae.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:pr}),ae.createElement(pe.Z,{align:"middle"},ae.createElement(Kt.Z,{flex:1},ae.createElement(Be.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Rn,onChange:Oe=>vr(Oe)})),ae.createElement(Kt.Z,null,ae.createElement(Gt.ZP,{size:"large",onClick:Nn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Ue=le(76562),We=le(6767);const Ve="link",rn="upload-image",an="add-flowchart",ln="draw-image",Sn="add-flowchart",_n="code-block",Xn="add-table",Yn="------------",Er={default:Yn,left:`:${Yn}`,center:`:${Yn}:`,right:`${Yn}:`};var dr=le(37808);function Mr(){}let Tr=0;const Or=1e4,Sr="\u2581",hr="@\u2581\u2581@",zr="@\u2581@",qt=`
|
|
**\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`,jn=["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 Jn(sn){return/^\d+$/.test(sn)?`${sn}px`:sn}const Wn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Kn={[Wn+"-B"]:"bold",[Wn+"-I"]:"italic"},ir={[Ve]:"\u6DFB\u52A0\u94FE\u63A5",[_n]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[rn]:"\u6DFB\u52A0\u56FE\u7247",[ln]:"\u6DFB\u52A0\u753B\u56FE",[an]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Xn]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Ar=({defaultValue:sn="",onChange:qe,width:$e="100%",height:un=400,miniToolbar:or=!1,isFocus:Qn=!1,watch:pr,insertTemp:xn,mode:Rn="markdown",id:vr="markdown-editor-id",showResizeBar:Nr=!1,noStorage:Nn=!1,showNullButton:Oe=!1,showNullProgramButton:Ke=!1,hidetoolBar:Ln=!1,fullScreen:An=!1,onBlur:en,onCMBeforeChange:Tn,onFullScreen:kn,className:On="",disablePaste:er=!1,disabled:Fn=!1,disabledFill:Bn=!1,placeholder:Un="",values:cr="",extraUse:lr})=>{const[yn,In]=(0,ae.useState)(null),[Gr,Yr]=(0,ae.useState)(sn),[fi,tn]=(0,ae.useState)(pr),[tr,gr]=(0,ae.useState)(An),[Hn,Zr]=(0,ae.useState)(""),[Ir,Hr]=(0,ae.useState)(0),[Qr,ei]=(0,ae.useState)(un),[hi,mn]=(0,ae.useState)(!1),[vi,gn]=(0,ae.useState)(0),[oi,Gi]=(0,ae.useState)(0),mi=(0,ae.useRef)(),Bi=(0,ae.useRef)(),ii=(0,ae.useRef)(),Rr=(0,ae.useRef)();(0,ae.useEffect)(()=>{const yr=window.scrollY||window.pageYOffset;Yr(cr),yn==null||yn.setValue(cr),window.scrollTo(0,yr)},[cr]),(0,ae.useEffect)(()=>{kn==null||kn(tr)},[tr]),(0,ae.useEffect)(()=>{if(mi.current){let yr=function(kr,Cn){var di;if(er){Cn.preventDefault();return}const Ci=Cn.clipboardData;if(Ci){const io=Ci.types.toString(),bi=Ci.items;if(io==="Files"||Ci.types.indexOf("Files")>-1){if(Cn.preventDefault(),Rn=="stex")return;try{let lo=bi[1];((di=bi[0])==null?void 0:di.kind)==="file"&&(lo=bi[0]);const xo=lo.getAsFile(),Bo=xo.name.split(".").pop();(0,be.I)(xo,po=>{var na,Ao,on;po.id?((na=xo==null?void 0:xo.type)==null?void 0:na.indexOf("image"))>-1?ur.replaceSelection(`<img width="100%" src="/api/attachments/${po.id}?type=${po.content_type})" alt="" />`):((Ao=xo==null?void 0:xo.type)==null?void 0:Ao.indexOf("video"))>-1?ur.replaceSelection(`<video width="100%" controls src="/api/attachments/${po.id}"></video>`):((on=xo==null?void 0:xo.type)==null?void 0:on.indexOf("pdf"))>-1?ur.replaceSelection(`<a href="/api/attachments/${po.id}?type=${xo.type}&disposition=inline" target="_blank">${xo.name}</a>`):jn.includes(Bo)?ur.replaceSelection(`<a href="/api/attachments/${po.id}?type=office&disposition=inline" target="_blank">${xo.name}</a>`):ur.replaceSelection(`[${xo.name}](/api/attachments/${po.id}?type=${po.content_type})`):(po==null?void 0:po.status)===401&&(document.location.href="/user/login")})}catch(lo){We.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const ur=ot().fromTextArea(mi.current,{mode:Rn,lineNumbers:!or,lineWrapping:!0,value:sn,autoCloseTags:!0,autoCloseBrackets:!0});return ur.on("keyup",function(kr,Cn){Cn.keyCode===8&&(kr.getValue()==""?ur.setOption("placeholder",Un):ur.setOption("placeholder",null))}),ur.on("keydown",function(kr,Cn){if(Cn.keyCode===8){var di=Eo(kr);di&&Cn.preventDefault()}}),Qn&&ur.focus(),ur.on("paste",yr),Fn&&ur.on("beforeChange",function(kr,Cn){(Cn.origin==="paste"||Cn.origin==="+input")&&Cn.cancel()}),In(ur),()=>{ur.off("paste",yr)}}},[]);const wi=(0,ae.useCallback)(()=>{if(Bi.current)try{}catch(yr){console.log(yr,"---- to set md editor body height")}},[Qr,Bi,tr]);(0,ae.useEffect)(()=>{function yr(){let ur=new _t.Z(kr=>{for(let Cn of kr)(Cn.target.offsetHeight>0||Cn.target.offsetWidth>0)&&(wi(),yn.setSize("100%","100%"),yn.refresh())});return ur.observe(mi.current.parentElement),ur}if(yn){const ur=yr();return()=>{var kr,Cn;(kr=mi.current)!=null&&kr.parentElement&&ur.unobserve((Cn=mi.current)==null?void 0:Cn.parentElement)}}},[yn,wi]),(0,ae.useEffect)(()=>{if(yn){let yr=[];for(const[ur,kr]of Object.entries(Kn)){let Cn={[ur]:()=>{Oi(kr)}};yr.push(Cn),yn.addKeyMap(Cn)}return()=>{for(let ur of yr)yn.removeKeyMap(ur)}}},[yn]),(0,ae.useEffect)(()=>{An!==tr&&gr(An)},[An]),(0,dr.Z)(()=>{if(!Nn&&Ir>0){let yr=new Date().getTime(),ur=window.sessionStorage.getItem(vr);yr>=Ir+Or&&(!ur||ur!==Gr)&&(window.sessionStorage.setItem(vr,Gr),mn(!0))}},Or),(0,ae.useEffect)(()=>{tn(pr)},[yn,pr]),(0,ae.useEffect)(()=>{yn&&Qn&&yn.focus()},[yn,Qn]),(0,ae.useEffect)(()=>{if(fi&&yn){let yr=function(kr){let Cn=kr.target;if(Rr.current){let di=Cn.scrollTop/Cn.scrollHeight;Rr.current.scrollTop=Rr.current.scrollHeight*di}};const ur=yn.getScrollerElement();return ur.addEventListener("scroll",yr),()=>{ur.removeEventListener("scroll",yr)}}},[yn,fi]),(0,ae.useEffect)(()=>{if(yn&&Tn){let yr=function(ur,kr){Tn(ur,kr)};return yn.on("beforeChange",yr),()=>{yn.off("beforeChange",yr)}}},[yn,Tn]),(0,ae.useEffect)(()=>{if(yn&&en){let yr=function(){en(yn.getValue())};return yn.on("blur",yr),()=>{yn.off("blur",yr)}}},[yn,en]);function Eo(yr,ur){var kr=yr.getDoc(),Cn=kr.getCursor(),di=kr.getLine(Cn.line),Ci=di.charAt(Cn.ch-1),io=di.lastIndexOf("@\u2581@",Cn.ch),bi=di.lastIndexOf("@\u2581\u2581@",Cn.ch),lo=io>bi?io:bi,xo=io>bi?3:4;if(hr.indexOf(Ci)===-1)return null;if(console.log("change1:",ur,yr,di,Cn,lo,io,bi,Ci),lo>=0&&Cn.ch-lo<5){var Bo=lo+xo;return kr.replaceRange("",{line:Cn.line,ch:lo},{line:Cn.line,ch:Bo}),{line:Cn.line,ch:Bo}}return null}(0,ae.useEffect)(()=>{if(yn){let yr=function(ur,kr){const Cn=ur.getValue();Yr(Cn),Hr(new Date().getTime()),ur.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),qe&&(Ke?qe(Cn,sr(Cn)):qe(Cn))};return yn.on("change",yr),()=>{yn.off("change",yr)}}},[yn,qe]),(0,ae.useEffect)(()=>{if(yn)if(sn==null)yn.setValue(""),Yr("");else{const yr=window.scrollY||window.pageYOffset;sn!==yn.getValue()&&(yn.setValue(sn),Yr(sn),yn.setCursor(Fn?1:yn.lineCount(),0),window.scrollTo(0,yr))}},[yn,sn]);const Oi=(0,ae.useCallback)(yr=>{const ur=yn.getCursor(),kr=yn.getSelection();let Cn=kr.split(`
|
|
`);switch(yr){case"bold":return yn.replaceSelection("**"+kr+"**"),kr===""&&yn.setCursor(ur.line,ur.ch+2),yn.focus();case"italic":return yn.replaceSelection("*"+kr+"*"),kr===""&&yn.setCursor(ur.line,ur.ch+1),yn.focus();case"code":return yn.replaceSelection("`"+kr+"`"),kr===""&&yn.setCursor(ur.line,ur.ch+1),yn.focus();case"inline-latex":return Zr("inline-latex"),yn.focus();case"latex":return yn.replaceSelection("```latex\n"+kr+"\n```"),yn.setCursor(ur.line+1,kr.length+1),yn.focus();case"line-break":return yn.replaceSelection(`<br/>
|
|
`),yn.focus();case"list-ul":return kr===""?yn.replaceSelection("- "+kr):yn.replaceSelection(Cn.map(di=>di===""?"":`- ${di}`).join(`
|
|
`)),yn.focus();case"list-ol":return kr===""?yn.replaceSelection("1. "+kr):yn.replaceSelection(Cn.map((di,Ci)=>di===""?"":`${Ci+1}. ${di}`).join(`
|
|
`)),yn.focus();case"add-null-ch":return kr===""&&yn.setCursor(ur.line,ur.ch),yn.replaceSelection(Sr),yn.focus();case"add-signal":return kr===""&&yn.setCursor(ur.line,ur.ch),yn.replaceSelection(zr),yn.focus();case"add-multiple":return kr===""&&yn.setCursor(ur.line,ur.ch),yn.replaceSelection(hr),yn.focus();case"inster-template-1":return kr===""&&yn.setCursor(ur.line,ur.ch),yn.replaceSelection(qt),yn.focus();case"eraser":return yn.setValue(""),yn.focus();case"trigger-watch":return tn(!fi),yn.focus();case"trigger-full-screen":return gr(!tr),yn.focus();case Ve:Zr(Ve);return;case _n:Zr(_n);return;case rn:Zr(rn);return;case ln:Zr(ln);return;case"maths-latex":Zr("maths-latex");return;case an:Zr(an);return;case Xn:Zr(Xn);return;default:throw new Error}},[yn,fi,tr]),$n=(0,ae.useCallback)((yr,ur)=>{var kr,Cn,di,Ci,io,bi;switch(Zr(""),Hn){case Ve:const{title:na,link:Ao}=yr;return yn.replaceSelection(`[${na}](${Ao})`),yn.focus();case _n:const{language:on,content:ra}=yr;return yn.replaceSelection(["```"+on,ra,"```"].join(`
|
|
`)),yn.focus();case"maths-latex":for(var lo=atob(yr),xo=new Uint8Array(lo.length),Bo=0;Bo<lo.length;Bo++)xo[Bo]=lo.charCodeAt(Bo);var po=new Blob([xo],{type:"image/png"});(0,be.I)(po,Ga=>{Ga.id?yn.replaceSelection(``):(Ga==null?void 0:Ga.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":yn.replaceSelection("`$$"+yr+"$$`");break;case rn:case ln:case Sn:const{src:za,alt:Ya}=yr,Hi=ur,Js=(di=(Cn=(kr=Hi==null?void 0:Hi.name)==null?void 0:kr.split("."))==null?void 0:Cn.pop)==null?void 0:di.call(Cn);return((Ci=Hi==null?void 0:Hi.type)==null?void 0:Ci.indexOf("image"))>-1||!(Hi!=null&&Hi.type)?Hi!=null&&Hi.align||Hi!=null&&Hi.width?yn.replaceSelection(`<p style="text-align:${Hi.align||"initial"}"><img width="${Hi.width?Hi.width+"%":"initial"}" src="${za}" alt="${Ya||""}" /></p>`):yn.replaceSelection(`<img width="100%" src="${za}" alt="${Ya||""}" />`):((io=Hi==null?void 0:Hi.type)==null?void 0:io.indexOf("video"))>-1?yn.replaceSelection(`<video width="100%" controls src="${za}"></video>`):((bi=Hi==null?void 0:Hi.type)==null?void 0:bi.indexOf("pdf"))>-1?yn.replaceSelection(`<a href="${za}?type=${Hi.type}&disposition=inline" target="_blank">${Hi.name}</a>`):jn.includes(Js)?yn.replaceSelection(`<a href="${za}?type=office&disposition=inline" target="_blank">${Hi.name}</a>`):yn.replaceSelection(`[${Hi.name}](${za})`),yn.focus();case Xn:const{row:ls,col:Ml,align:Ai}=yr;let No=`
|
|
`;for(let Ga=0;Ga<ls;Ga++){let dl=[],uu=[];for(let xs=0;xs<Ml;xs++)Ga===1&&uu.push(Er[Ai]),dl.push(" ");Ga===1&&(No+=`| ${uu.join(" | ")} |
|
|
`),No+=`| ${dl.join(Ml===1?"":" | ")} |
|
|
`}return yn.replaceSelection(No+`
|
|
`),yn.focus();default:throw new Error}},[yn,Hn]),Le=(0,ae.useMemo)(()=>{switch(Hn){case Ve:return ae.createElement(ve,{callback:$n,onCancel:Ti});case _n:return ae.createElement(Se.Z,{callback:$n,onCancel:Ti});case rn:return ae.createElement(be.Z,{callback:$n,onCancel:Ti});case an:return ae.createElement(Vt,{callback:$n,onCancel:Ti});case Xn:return ae.createElement(Ae,{callback:$n,onCancel:Ti});case"maths-latex":return ae.createElement(He,{showSaveButton:!0,callback:$n});case"inline-latex":return ae.createElement(Ue.Z,{showSaveButton:!0,callback:$n});default:return null}},[Hn]);function Ti(){Zr("")}(0,ae.useEffect)(()=>{if(ii.current){let yr=function(io){di=!0,Ci=io.pageY},ur=function(){di=!1},kr=function(io){if(di){let bi=io.pageY-Ci;bi<0&&(bi=0),bi>300&&(bi=300);let lo=un+bi+"px";ei(lo)}},Cn=ii.current,di=!1,Ci=0;return Cn.addEventListener("mousedown",yr),document.addEventListener("mousemove",kr),document.addEventListener("mouseup",ur),()=>{Cn.removeEventListener("mousedown",yr),document.removeEventListener("mousemove",kr),document.removeEventListener("mouseup",ur)}}},[yn,ii]),(0,ae.useEffect)(()=>{ei(un)},[un]);const so=Jn($e),Ji=Jn(Qr),Zi={width:so,height:Ji},pi=(0,ae.useMemo)(()=>{if(Ir){let yr=new Date(Ir),ur=yr.getHours(),kr=yr.getMinutes(),Cn=yr.getSeconds();return ur=ur<10?"0"+ur:ur,kr=kr<10?"0"+kr:kr,Cn=Cn<10?"0"+Cn:Cn,`${ur}:${kr}:${Cn}`}return 0},[Ir]),sr=yr=>{const ur=[];if(Ke){let kr=-1;yr=yr.replace(/(@▁▁@|@▁@)/g,function(Cn,di,Ci){ur.push({multiLine:Cn!==zr})})}return ur};function wr(){window.sessionStorage.removeItem(vr),mn(!1),Hr(0)}function Jr(){mn(!1),Hr(0),yn.setValue(window.sessionStorage.getItem(vr))}(0,ae.useEffect)(()=>{ir[Hn]&&Hn!==ln&&Hn!==an&&setTimeout(()=>{const yr=document.getElementsByClassName("markdown-popup-form")[0],ur=window.innerWidth/2-yr.offsetWidth/2,kr=window.innerHeight/2-yr.offsetHeight/2;gn(ur),Gi(kr)},0)},[Hn]);const mr=yr=>{yr.preventDefault();const ur=yr.clientX-vi,kr=yr.clientY-oi;document.body.onmousemove=Cn=>{let di=Cn.clientX-ur,Ci=Cn.clientY-kr;const io=document.getElementsByClassName("markdown-popup-form")[0],bi=window.innerWidth-io.offsetWidth,lo=window.innerHeight-io.offsetHeight;di=Math.max(0,Math.min(di,bi)),Ci=Math.max(0,Math.min(Ci,lo)),Vr(Cn.clientX,Cn.clientY,ur,kr)&&(gn(di),Gi(Ci))},document.body.onmouseup=function(){document.body.onmousemove=null}},Vr=(yr,ur,kr,Cn)=>{const di=document.body.clientHeight,Ci=document.body.clientWidth;return yr<20&&kr>yr||yr>Ci-20&&kr<yr||ur<20&&Cn>ur||ur>di-20&&Cn<ur?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ae.createElement(ae.Fragment,null,ae.createElement("div",{className:"markdown-editor-wrapper",ref:Bi},ae.createElement("div",{className:`markdown-editor-container ${On} ${fi?"on-preview":""} ${or?"mini":""} ${tr?"full-screen":""}`,style:Zi},ae.createElement(Dt,{insertTemp:xn,watch:fi,fullScreen:tr,showNullButton:Oe,showNullProgramButton:Ke,onActionCallback:Oi,hidetoolBar:Ln,extraUse:lr}),ae.createElement("div",{className:"markdown-editor-body"},ae.createElement("div",{className:"codemirror-container"},ae.createElement("textarea",{ref:mi,placeholder:Un})),fi?ae.createElement("div",{ref:Rr,className:"preview-container"},Rn==="stex"&&ae.createElement(mt,{value:Gr}),Rn!=="stex"&&ae.createElement(Tt.Z,{disabledFill:Bn,showProgramFill:Ke,value:Gr})):null))),Nr?ae.createElement("a",{ref:ii,className:"editor-resize"}):null,Hn===ln&&ae.createElement(de,{callback:$n,onCancel:Ti}),Hn===an&&ae.createElement(Vt,{callback:$n,onCancel:Ti}),ae.createElement(Ft.Z,null,ir[Hn]&&Hn!==ln&&Hn!==an?ae.createElement(fe.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:vi,top:oi},title:ae.createElement("div",{style:{cursor:"move"},onMouseDown:mr},ir[Hn]),open:!0,onCancel:Ti,footer:null,destroyOnClose:!0,width:Hn===an?"1200px":null,height:Hn===an?"80vh":null,className:"markdown-popup-form"},Le):null))}},17077:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return At},I:function(){return Ft}});var ae=le(28284),Re=le(6767),ot=le(37568),_t=le(77736),Bt=le(71051),vt=le(47889),gt=le(99571),kt=le(46699),bt=le(59301),St=le(59301),Tt=Object.defineProperty,mt=Object.defineProperties,xt=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,at=(Nt,jt,Gt)=>jt in Nt?Tt(Nt,jt,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):Nt[jt]=Gt,it=(Nt,jt)=>{for(var Gt in jt||(jt={}))z.call(jt,Gt)&&at(Nt,Gt,jt[Gt]);if(ft)for(var Gt of ft(jt))tt.call(jt,Gt)&&at(Nt,Gt,jt[Gt]);return Nt},lt=(Nt,jt)=>mt(Nt,xt(jt));const{useForm:ut}=ae.default,dt={width:280,marginRight:10},Pt={labelCol:{span:5},wrapperCol:{span:19}};var At=({callback:Nt,onCancel:jt})=>{const[Gt]=ut();let Wt=(0,bt.useRef)();function Jt(oe){Wt.current.width=Gt.getFieldValue("width"),Wt.current.align=Gt.getFieldValue("align"),Nt(oe,Wt.current)}function Ut(oe,se){if(oe.status===-1){Re.ZP.error(oe.message);return}Gt.setFieldsValue({src:`/api/attachments/${oe.id}`,type:se.type})}function Ht(oe){let se=oe.target.files[0];Wt.current=se,Ft(se,Ut)}return St.createElement(ae.default,lt(it({form:Gt},Pt),{className:"upload-image-panel",onFinish:Jt,style:{width:470,overflow:"hidden"}}),St.createElement(ae.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},St.createElement("div",{className:"flex-container"},St.createElement(ae.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},St.createElement(ot.default,{style:dt})),St.createElement(Dt,{onFileChange:Ht}))),St.createElement(ae.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},St.createElement(ot.default,{style:{width:264}})),St.createElement(ae.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},St.createElement(_t.Z,null,St.createElement(ae.default.Item,{name:"width",style:{margin:0}},St.createElement(Bt.Z,{style:{width:264}})),St.createElement("span",{className:"ml8"},"%"))),St.createElement(ae.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},St.createElement(vt.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"}]})),St.createElement("aside",null,St.createElement(ae.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},St.createElement(gt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),St.createElement(gt.ZP,{type:"default",onClick:jt},"\u53D6\u6D88"))))};function Dt({onFileChange:Nt}){return St.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",St.createElement("input",{type:"file",onChange:Nt}))}function Ft(Nt,jt){if(!Nt)throw new String("\u6CA1\u6709\u6587\u4EF6");let Gt=new FormData;Gt.append("editormd-image-file",Nt),Gt.append("file_param_name","editormd-image-file"),Gt.append("byxhr","true");var Wt=new window.XMLHttpRequest;Wt.withCredentials=!0,Wt.addEventListener("load",function(Jt){jt(JSON.parse(Jt.target.responseText),Nt)},!1),Wt.addEventListener("error",function(Jt){console.error(Jt)},!1),Wt.open("POST",`${kt.KI}/api/attachments.json`),Wt.send(Gt)}},91558:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return ot}});var ae=le(59301),Re=le(4676);class ot extends ae.Component{constructor(Bt){super(Bt);const vt=window.document;this.node=vt.createElement("div"),vt.body.appendChild(this.node)}render(){const{children:Bt}=this.props;return(0,Re.createPortal)(Bt,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},75975:function(dn,fn,le){"use strict";le.d(fn,{SV:function(){return Vt},ZP:function(){return Rt}});var ae=le(59301),Re=le(76374);const ot={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"]},_t={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"]},Bt={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(`
|
|
`)}]},vt={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(`
|
|
`)}]},gt={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 kt=le(53184),bt=le.n(kt),St=Object.defineProperty,Tt=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,tt=($t,ue,ge)=>ue in $t?St($t,ue,{enumerable:!0,configurable:!0,writable:!0,value:ge}):$t[ue]=ge,at=($t,ue)=>{for(var ge in ue||(ue={}))ft.call(ue,ge)&&tt($t,ge,ue[ge]);if(xt)for(var ge of xt(ue))z.call(ue,ge)&&tt($t,ge,ue[ge]);return $t},it=($t,ue)=>Tt($t,mt(ue)),lt=($t,ue,ge)=>new Promise((Me,Ae)=>{var Be=Qe=>{try{Ye(ge.next(Qe))}catch(He){Ae(He)}},Ze=Qe=>{try{Ye(ge.throw(Qe))}catch(He){Ae(He)}},Ye=Qe=>Qe.done?Me(Qe.value):Promise.resolve(Qe.value).then(Be,Ze);Ye((ge=ge.apply($t,ue)).next())});const ut={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"]}},dt=($t,ue)=>ue.map(ge=>({label:ge,kind:$t.languages.CompletionItemKind.Keyword,insertText:ge})),Pt=$t=>Object.keys(ut.tables).map(ue=>({label:ue,kind:$t.languages.CompletionItemKind.Variable,insertText:ue})),At=($t,ue)=>{const ge=ut.tables[$t];return ge?ge.map(Me=>({label:Me,kind:ue.languages.CompletionItemKind.Field,insertText:Me})):[]};function Dt($t,ue,ge,Me,Ae){let Be=ue.getWordUntilPosition(ge),Ze={startLineNumber:ge.lineNumber,endLineNumber:ge.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},Ye=Me.map(Qe=>({label:Qe,kind:$t.languages.CompletionItemKind.Keyword,insertText:Qe,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ze}));return Ae.map(Qe=>{Ye.push(it(at({},Qe),{range:Ze}))}),Ye}var Ft=$t=>{ut.languages.map(Ae=>($t.languages.registerDocumentFormattingEditProvider(Ae,{provideDocumentFormattingEdits(Be,Ze,Ye){return lt(this,null,function*(){const Qe=bt()(Be.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:Be.getFullModelRange(),text:Qe}]})}}),Ae));const ue=Bt.quickKey.map(Ae=>({label:Ae.label,kind:$t.languages.CompletionItemKind.Method,insertText:Ae.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ge=vt.quickKey.map(Ae=>({label:Ae.label,kind:$t.languages.CompletionItemKind.Method,insertText:Ae.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Me=_t.quickKey.map(Ae=>({label:Ae.label,kind:$t.languages.CompletionItemKind.Method,insertText:Ae.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet}));$t.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ae,Be){var Ze=Ae.getWordUntilPosition(Be),Ye={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Ze.startColumn,endColumn:Ze.endColumn},Qe=Ae.getLineContent(Be.lineNumber).substring(Ze.startColumn-2,Ze.endColumn);return{suggestions:[...Bt.keywords.map(He=>({label:He,kind:$t.languages.CompletionItemKind.Function,documentation:He,insertText:He,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ye})),...Bt.quickKey.map(He=>({label:He.label,kind:$t.languages.CompletionItemKind.Function,documentation:He.content,insertText:Qe.startsWith("#")?He.content.replace(/#/,""):He.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ye}))]}}}),$t.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ae,Be){var Ze=Ae.getWordUntilPosition(Be),Ye={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Ze.startColumn,endColumn:Ze.endColumn};return{suggestions:[...ot.keywords.map(Qe=>({label:Qe,kind:$t.languages.CompletionItemKind.Function,documentation:Qe,insertText:Qe,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ye}))]}}}),$t.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ae,Be){var Ze=Ae.getWordUntilPosition(Be),Ye={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Ze.startColumn,endColumn:Ze.endColumn},Qe=Ae.getLineContent(Be.lineNumber).substring(Ze.startColumn-2,Ze.endColumn);return{suggestions:[..._t.keywords.map(He=>({label:He,kind:$t.languages.CompletionItemKind.Function,documentation:He,insertText:He,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ye})),..._t.quickKey.map(He=>({label:He.label,kind:$t.languages.CompletionItemKind.Function,documentation:He.content,insertText:Qe.startsWith("#")?He.content.replace(/#/,""):He.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ye}))]}}}),$t.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Ae,Be){var Ze=Ae.getWordUntilPosition(Be),Ye={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Ze.startColumn,endColumn:Ze.endColumn},Qe=Ae.getLineContent(Be.lineNumber).substring(Ze.startColumn-2,Ze.endColumn);return{suggestions:[...gt.keywords.map(He=>({label:He,kind:$t.languages.CompletionItemKind.Function,documentation:He,insertText:He,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ye})),...gt.quickKey.map(He=>({label:He.label,kind:$t.languages.CompletionItemKind.Function,documentation:He.content,insertText:Qe.startsWith("#")?He.content.replace(/#/,""):He.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ye}))]}}}),$t.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ae,Be){var Ze=Ae.getWordUntilPosition(Be),Ye={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Ze.startColumn,endColumn:Ze.endColumn},Qe=Ae.getLineContent(Be.lineNumber).substring(Ze.startColumn-2,Ze.endColumn);return{suggestions:[...vt.keywords.map(He=>({label:He,kind:$t.languages.CompletionItemKind.Function,documentation:He,insertText:He,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ye})),...vt.quickKey.map(He=>({label:He.label,kind:$t.languages.CompletionItemKind.Function,documentation:He.content,insertText:Qe.startsWith("#")?He.content.replace(/#/,""):He.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ye}))]}}})};const Nt="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var jt=Object.defineProperty,Gt=($t,ue,ge)=>ue in $t?jt($t,ue,{enumerable:!0,configurable:!0,writable:!0,value:ge}):$t[ue]=ge,Wt=($t,ue,ge)=>Gt($t,typeof ue!="symbol"?ue+"":ue,ge);const Jt=class mx{constructor(ue,ge,Me){this.placeholder=ue,this.editor=ge,this.monaco=Me,ge.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)}};Wt(Jt,"ID","editor.widget.placeholderHint");var Ht=Jt,oe=le(96236),se=le(6767),ce=le(25399),Pe=le(89392),Yt=le(49535),ne=le(56102),ve=Object.defineProperty,Se=Object.defineProperties,be=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,Ce=($t,ue,ge)=>ue in $t?ve($t,ue,{enumerable:!0,configurable:!0,writable:!0,value:ge}):$t[ue]=ge,de=($t,ue)=>{for(var ge in ue||(ue={}))pe.call(ue,ge)&&Ce($t,ge,ue[ge]);if(fe)for(var ge of fe(ue))he.call(ue,ge)&&Ce($t,ge,ue[ge]);return $t},ye=($t,ue)=>Se($t,be(ue)),Ne=($t,ue)=>{var ge={};for(var Me in $t)pe.call($t,Me)&&ue.indexOf(Me)<0&&(ge[Me]=$t[Me]);if($t!=null&&fe)for(var Me of fe($t))ue.indexOf(Me)<0&&he.call($t,Me)&&(ge[Me]=$t[Me]);return ge},xe=($t,ue,ge)=>new Promise((Me,Ae)=>{var Be=Qe=>{try{Ye(ge.next(Qe))}catch(He){Ae(He)}},Ze=Qe=>{try{Ye(ge.throw(Qe))}catch(He){Ae(He)}},Ye=Qe=>Qe.done?Me(Qe.value):Promise.resolve(Qe.value).then(Be,Ze);Ye((ge=ge.apply($t,ue)).next())});function re($t){return/^\d+$/.test($t)?`${$t}px`:$t}function Kt(){}let wt=!1;const Lt={"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 Xt($t=[]){let ue=$t;if(Array.isArray($t)){for(let ge=0;ge<$t.length;ge++){let Me=Lt[$t[ge]];if(Me)return Me}return ue[0]}return Lt[ue]||ue}let ee=null;const It=()=>xe(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch($t){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",$t)}});var Rt=$t=>{var ue=$t,{width:ge="100%",height:Me="100%",value:Ae,language:Be="javascript",style:Ze={},options:Ye={},overrideServices:Qe={},theme:He="vs-dark",onEditBlur:Ue,isCopy:We=!1,onSave:Ve,autoHeight:rn=!1,forbidCopy:an=!1,onChange:ln=Kt,editorDidMount:Sn=Kt,onFocus:_n=Kt,onBreakPoint:Xn=Kt,breakPointValue:Yn=[],filename:Er="educoder.txt",errorLine:dr,errorContent:Mr="",highlightLine:Tr,openBreakPoint:Or=!1,placeholder:Sr="",showMiniMap:hr=!0}=ue,zr=Ne(ue,["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 qt=(0,ae.useRef)(),jn=(0,ae.useRef)({}),Jn=(0,ae.useRef)(),zn=(0,ae.useRef)(),Wn=(0,ae.useRef)([]),Kn=(0,ae.useRef)(!1),ir=(0,ae.useRef)(),Ar=(0,ae.useRef)(),sn=(0,ae.useRef)(!1),[qe,$e]=(0,ae.useState)(!1);function un(){let kn;return qt.current&&(kn=new Re.Z(On=>{for(let er of On)(er.target.offsetHeight>0||er.target.offsetWidth>0)&&jn.current.instance.layout()}),kn.observe(qt.current)),kn}function or(){se.ZP.warning({content:decodeURIComponent(Nt),key:"monaco-editor-tip"})}const Qn=()=>{let kn=jn.current.instance;if(Ae!=null&&kn&&qe){const On=kn.getModel();On&&Ae!==On.getValue()&&(wt=!0,On.setValue(Ae),kn.layout(),wt=!1)}};(0,ae.useEffect)(()=>{const kn=Yt.Z.subscribe("formatDocument",On=>{var er;let Fn=jn.current.instance;(er=Fn==null?void 0:Fn.getAction)==null||er.call(Fn,"editor.action.formatDocument").run()});return window.updateMonacoValue=On=>{ln(On)},kn},[]),(0,ae.useEffect)(()=>{var kn;let On=jn.current.instance;zn.current&&clearTimeout(zn.current),zn.current=setTimeout(()=>{Qn()},500),Ae&&(Ae!=null&&Ae.length)&&((kn=On==null?void 0:On.updateOptions)==null||kn.call(On,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ae.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ae,qe,jn.current]),(0,ae.useEffect)(()=>{if(dr&&jn.current&&jn.current.instance){let On=jn.current.instance;On.changeViewZones(function(er){var Fn=document.createElement("div");Fn.style.padding="10px 20px",Fn.style.width="calc(100% - 20px)",Fn.className="my-error-line-wrp",Fn.innerHTML=Mr,er.addZone({afterLineNumber:dr||11,heightInLines:3,domNode:Fn})});var kn={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}};On.addOverlayWidget(kn),On.revealPositionInCenter({lineNumber:20,column:1})}},[dr,jn.current,qe]);const pr=(kn="",On)=>{if(!kn||kn.trim()==="")return!0;const Fn=jn.current.instance.getModel().getLineTokens(On);let Bn=!1;for(let Un=0;Un<2;Un++)Fn.getStandardTokenType(Un)===1&&(Bn=!0);return Bn};(0,ae.useEffect)(()=>{var kn;const On=(kn=jn.current)==null?void 0:kn.instance;if(On&&qe&&an){const er=On.onDidBlurEditorWidget(()=>{sn.current=!1}),Fn=On.onDidFocusEditorText(()=>{sn.current=!0});return()=>{er.dispose(),Fn.dispose()}}},[jn.current,qe,an]),(0,ae.useEffect)(()=>{var kn;if((kn=jn.current)!=null&&kn.instance&&qe&&Or){let On=jn.current.instance,er=On.getModel();if(!er)return;(()=>{var tr;let gr=[],Hn=[];const Zr=er.getAllDecorations();for(let Hr of Zr)Hr.options.className==="highlighted-line"&&(gr.push((tr=Hr==null?void 0:Hr.range)==null?void 0:tr.startLineNumber),Hn.push(Hr==null?void 0:Hr.id));if(Tr===gr[0])return;er.deltaDecorations(Hn,[]);const Ir=er.getLineCount();Tr&&Tr<=Ir&&(On.deltaDecorations([],[{range:new ee.Range(Tr,1,Tr,er.getLineMaxColumn(Tr)),options:{isWholeLine:!0,className:"highlighted-line"}}]),On.revealLineInCenter(Tr))})();const Bn=(tr=!1)=>{var gr;let Hn=[],Zr=[];const Ir=er.getAllDecorations();for(let Hr of Ir)Hr.options.linesDecorationsClassName==="breakpoints-select"&&(Hn.push((gr=Hr==null?void 0:Hr.range)==null?void 0:gr.startLineNumber),Zr.push(Hr==null?void 0:Hr.id));if(tr)return{lines:Hn,ids:Zr};Xn(Hn)},Un=tr=>xe(void 0,null,function*(){let gr={range:new ee.Range(tr,1,tr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield er.deltaDecorations([],[gr]),Bn()}),cr=tr=>xe(void 0,null,function*(){let gr=[];const Hn=On.getLineDecorations(tr);for(let Zr of Hn)Zr.options.linesDecorationsClassName==="breakpoints-select"&&gr.push(Zr.id);yield er.deltaDecorations(gr,[]),Bn()}),lr=tr=>{let gr=On.getLineDecorations(tr);for(let Hn of gr)if(Hn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Pe.isEqual)(Yn,Bn(!0).lines)){er.deltaDecorations(Bn(!0).ids,[]);const tr=Yn.map(gr=>({range:new ee.Range(gr,1,gr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));er.deltaDecorations([],tr)}const yn=On.onDidChangeModelContent(tr=>{let gr=On.getPosition();if(gr){let Hn=gr.lineNumber;clearTimeout(Ar.current),Ar.current=setTimeout(()=>{pr(er.getLineContent(Hn),Hn)?cr(Hn):lr(Hn)?(cr(Hn),Un(Hn)):Bn()},100)}}),In=On.onMouseDown(tr=>{var gr,Hn,Zr;if(tr.target.detail&&((Zr=(Hn=(gr=tr.target)==null?void 0:gr.element)==null?void 0:Hn.className)!=null&&Zr.includes("line-numbers"))){let Ir=tr.target.position.lineNumber;if(pr(er.getLineContent(Ir),Ir))return;lr(Ir)?cr(Ir):Un(Ir)}}),Gr=tr=>{let gr={range:new ee.Range(tr,1,tr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Wn.current=On.deltaDecorations(Wn.current,[gr])},Yr=()=>{Wn.current=On.deltaDecorations(Wn.current,[])},fi=On.onMouseMove(tr=>{var gr,Hn,Zr;if(Yr(),tr.target.detail&&((Zr=(Hn=(gr=tr.target)==null?void 0:gr.element)==null?void 0:Hn.className)!=null&&Zr.includes("line-numbers"))){let Ir=tr.target.position.lineNumber;if(pr(er.getLineContent(Ir),Ir))return;Gr(Ir)}}),tn=On.onMouseLeave(()=>{Yr()});return()=>{yn.dispose(),In.dispose(),fi.dispose(),tn.dispose()}}},[jn.current,qe,Yn,Tr,Or,Be]),(0,ae.useEffect)(()=>{var kn;(kn=jn.current)!=null&&kn.instance&&Or&&jn.current.instance.setPosition({lineNumber:0,column:0})},[Tr]);function xn(){let kn=jn.current.instance;if(kn){const On=kn.getSelection(),er=jn.current.pastePos||{},Fn=new ee.Range(er.startLineNumber||On.endLineNumber,er.startColumn||On.endColumn,er.endLineNumber||On.endLineNumber,er.endColumn||On.endColumn);setTimeout(()=>{kn.executeEdits("",[{range:Fn,text:""}])},300)}}function Rn(kn){(window.navigator.platform.match("Mac")?kn.metaKey:kn.ctrlKey)&&kn.keyCode==83&&(kn.preventDefault(),Ve())}const vr=()=>{if(rn&&jn.current.instance){const kn=jn.current.instance.getContentHeight();en(kn<Me?Me:kn)}else en(Me)};function Nr(kn){var On=document.createEvent("MouseEvents");On.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),kn.dispatchEvent(On)}const Nn=kn=>{if(!sn.current)return;const{keyCode:On,ctrlKey:er,metaKey:Fn,target:Bn,type:Un}=kn;return(Un==="paste"||(On===67||On===86)&&(Fn||er))&&Bn.nodeName==="TEXTAREA"&&(or(),kn.preventDefault()),!1};function Oe(kn,On){var er=window.URL||window.webkitURL||window,Fn=new Blob([On]),Bn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Bn.href=er.createObjectURL(Fn),Bn.download=kn,Nr(Bn)}(0,ae.useEffect)(()=>{vr()},[vr]),(0,ae.useEffect)(()=>{qt.current&&!qe&&Promise.all([le.e(8909),le.e(6656)]).then(le.bind(le,71448)).then(kn=>{try{ee=kn,jn.current.instance=ee.editor.create(qt.current,{value:Ae,language:Xt(Be),theme:He,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:hr||!1}},Qe);const On=jn.current.instance;let Bn=[...oe.BH._menuItems].find(yn=>yn[0]._debugName=="EditorContext")[1],Un=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],cr=(yn,In)=>{var Gr,Yr;let fi=yn._first;do In.includes((Yr=(Gr=fi.element)==null?void 0:Gr.command)==null?void 0:Yr.id)&&yn._remove(fi);while(fi=fi.next)};if(Sn(On,ee),setTimeout(()=>{vr(),jn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Oe(Er||"educoder.txt",On.getValue())}})},500),jn.current.subscription=On.onDidChangeModelContent(yn=>{Kn.current?clearTimeout(ir.current):(vr(),ln(On.getValue(),yn)),ir.current=setTimeout(()=>{Kn.current=!1},500)}),window.Monaco||Ft(ee,Xt(Be)),an&&(cr(Bn,Un),qt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Nn),window.removeEventListener("paste",Nn),window.addEventListener("keydown",Nn),window.addEventListener("paste",Nn)),window.Monaco=ee,Ue&&On.onDidBlurEditorWidget(()=>{Ue(On.getValue())}),_n&&On.onDidFocusEditorText(()=>{an&&It(),_n(On.getValue())}),an){It();try{On.onDidPaste(yn=>{const In=On.getSelection(),Gr=jn.current.pastePos||{},Yr=new ee.Range(Gr.startLineNumber||In.endLineNumber,Gr.startColumn||In.endColumn,Gr.endLineNumber||In.endLineNumber,Gr.endColumn||In.endColumn);On.executeEdits("",[{range:yn.range,text:""}])})}catch(yn){}}let lr=un();return Sr&&typeof Sr=="string"&&new Ht(Sr,On,ee),$e(!0),()=>{const yn=jn.current.instance;yn.dispose();const In=yn.getModel();In&&In.dispose(),jn.current.subscription&&jn.current.subscription.dispose(),lr.unobserve(qt.current)}}catch(On){}})},[]),(0,ae.useEffect)(()=>{if(jn.current.instance&&qe)return document.addEventListener("keydown",Rn,!1),()=>{document.removeEventListener("keydown",Rn)}},[Ve,qe]),(0,ae.useEffect)(()=>{let kn=jn.current.instance;if(kn&&qe){let On=Xt(Be);ee.editor.setModelLanguage(kn.getModel(),On)}},[Be,qe]),(0,ae.useEffect)(()=>{jn.current.instance&&qe&&ee.editor.setTheme(He)},[He,qe]),(0,ae.useEffect)(()=>{let kn=jn.current.instance;Jn.current=Ye,kn&&qe&&(kn.updateOptions(de({},Ye)),setTimeout(()=>{kn.getModel().updateOptions(de({},Ye))},200))},[JSON.stringify(Ye),qe]),(0,ae.useEffect)(()=>{let kn=jn.current.instance;kn&&qe&&kn.layout()},[ge,Me,qe]);const[Ke,Ln]=(0,ae.useState)(re(ge)),[An,en]=(0,ae.useState)(re(Me)),Tn=ye(de({},Ze),{width:Ke,height:An,position:"relative"});return ae.createElement("div",{className:"my-monaco-editor",ref:qt,style:Tn},We&&ae.createElement(ne.CopyToClipboard,{text:Ae,onCopy:()=>se.ZP.success("\u590D\u5236\u6210\u529F")},ae.createElement(ce.Z,{title:"\u590D\u5236\u4EE3\u7801"},ae.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ae.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Vt({width:$t="100%",height:ue="100%",original:ge,modified:Me,language:Ae,options:Be={}}){const Ze=(0,ae.useRef)(),[Ye,Qe]=(0,ae.useState)(null);function He(rn){let an;return Ze.current&&(an=new Re.Z(ln=>{for(let Sn of ln)(Sn.target.offsetHeight>0||Sn.target.offsetWidth>0)&&rn.layout()}),an.observe(Ze.current)),an}(0,ae.useEffect)(()=>(Ze.current&&Promise.all([le.e(8909),le.e(9404)]).then(le.bind(le,2550)).then(rn=>{ee=rn;const an=ee.editor.createDiffEditor(Ze.current,ye(de({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},Be),{wordWrap:!0}));Qe(an);let ln=He(an);return()=>{an.dispose();const Sn=an.getModel();Sn&&Sn.dispose(),ln.unobserve(Ze.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ae.useEffect)(()=>{Ye&&Ye.setModel({original:ee.editor.createModel(ge,Ae),modified:ee.editor.createModel(Me,Ae)})},[ge,Me,Ae,Ye]);const Ue=re($t),We=re(ue),Ve={width:Ue,height:We};return ae.createElement("div",{className:"my-diff-editor",ref:Ze,style:Ve})}},58397:function(dn,fn,le){"use strict";var ae=le(39744),Re=le(82326),ot=le(71411),_t=le(59301);const Bt=Re.default.Option;fn.Z=({isTheoretical:vt,onFontSizeChange:gt,cmFontSize:kt,cmCodeMode:bt,autoFormat:St,onCodeModeChange:Tt,onTabToSpace:mt,onAutoFormat:xt,formatDocument:ft,className:z="",tabToSpace:tt,children:at,code_editor:it,challenge:lt})=>{const ut={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"};return _t.createElement("div",{className:`tpi-code-setting ${z}`},_t.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),_t.createElement("section",null,_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),_t.createElement(Re.default,{bordered:!1,size:"small",value:bt,onChange:Tt},_t.createElement(Bt,{value:"vs"},"\u767D\u8272\u80CC\u666F"),_t.createElement(Bt,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!vt&&_t.createElement(_t.Fragment,null,_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),_t.createElement(Re.default,{bordered:!1,size:"small",value:kt,onChange:gt},_t.createElement(Bt,{value:12},"12px"),_t.createElement(Bt,{value:14},"14px"),_t.createElement(Bt,{value:16},"16px"),_t.createElement(Bt,{value:18},"18px"),_t.createElement(Bt,{value:20},"20px"),_t.createElement(Bt,{value:22},"22px"))),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"Tab\u8F6C\u6362"),_t.createElement(ot.Z,{checked:tt,onChange:mt})),_t.createElement("div",{className:"file-item",onClick:ft},_t.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!vt&&_t.createElement(_t.Fragment,null,_t.createElement("h3",null,"\u5FEB\u6377\u952E"),_t.createElement("section",null,_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),_t.createElement("span",null,"Ctrl + S")),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),_t.createElement("span",null,"F1 / Alt + F1")),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),_t.createElement("span",null,"Ctrl + ]/[")),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),_t.createElement("span",null,"Ctrl + Shift + \\")),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),_t.createElement("span",null,"Home")),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),_t.createElement("span",null,"End"))),at),!vt&&_t.createElement(_t.Fragment,null,_t.createElement("h3",null,"\u5FEB\u6377\u952E"),_t.createElement("section",null,_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),_t.createElement("span",null,ut[lt==null?void 0:lt.difficulty])),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),_t.createElement("span",null,it==null?void 0:it.name)),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),_t.createElement("span",null,it!=null&&it.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},10661:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return Tt}});var ae={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"},Re=le(29787),ot=le(25399),_t=le(92310),Bt=le.n(_t),vt=le(51257),gt=le(28426),kt=le(48790),bt=le(59301),Tt=({className:mt,dataSource:xt=[],col:ft=4,right:z,bottom:tt=23,precision:at=0,wrapWidth:it=1200,trackEventItems:lt,loading:ut,onRemove:dt=()=>{},isCurrent:Pt=!0,showAlias:At=!1})=>{const Dt=Math.floor((it-(ft-1)*z)/ft),Ft=[{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 bt.createElement(Re.Z,{spinning:ut},bt.createElement("div",{className:Bt()(ae.list,mt)},!!(xt!=null&&xt.length)&&(xt==null?void 0:xt.map((Nt,jt)=>{var Gt;const{name:Wt,id:Jt,identifier:Ut,featured:Ht,school_name:oe,image_url:se,excellent:ce,is_plan:Pe}=Nt;return bt.createElement("div",{key:Jt,className:ae.wrap,style:{width:Dt,marginRight:(1+jt)%ft===0?0:z+at,marginBottom:tt}},bt.createElement("a",{className:ae.li,onClick:Yt=>{Yt.preventDefault(),Yt.stopPropagation(),lt&&(0,vt.L9)([lt]),(0,vt.xg)(`/paths/${Ut}`)}},bt.createElement("div",{className:ae.img},bt.createElement("img",{className:ae.cover,src:`${se}`}),Pt&&(0,kt.bg)()&&(Nt==null?void 0:Nt.studying)&&bt.createElement("div",{className:`${ae.movebq} user-path-items`,onClick:Yt=>{Yt.stopPropagation(),dt(Nt)}},bt.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),bt.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Gt=Nt==null?void 0:Nt.subject_tags)==null?void 0:Gt.map((Yt,ne)=>{var ve,Se;if(ne===0){const fe=(ve=Ft.find(pe=>pe.name==Yt))==null?void 0:ve.swimg;return bt.createElement("img",{className:ae.sign,src:fe,style:{left:"-4px"}})}const be=(Se=Ft.find(fe=>fe.name==Yt))==null?void 0:Se.ptimg;return bt.createElement("img",{className:ae.sign,src:be,style:{left:`${48+52*(ne-1)+2*ne}px`}})}),bt.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Nt==null?void 0:Nt.excellent)&&bt.createElement("div",{className:ae.bq},"\u5F00\u653E\u8BFE\u7A0B"))),bt.createElement("div",{className:ae.name},bt.createElement(ot.Z,{title:At&&(Nt!=null&&Nt.excellent_alias_name)?bt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Wt}`,bt.createElement("br",null),bt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Nt==null?void 0:Nt.excellent_alias_name}`)):Wt},bt.createElement("span",{className:ae.e},At&&(Nt==null?void 0:Nt.excellent_alias_name)||Wt))),bt.createElement(ot.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${oe}`},bt.createElement("div",{className:ae.unit},bt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),oe)),bt.createElement("div",{className:ae.tags},bt.createElement("div",null,bt.createElement(ot.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),bt.createElement("span",null,Nt.stages_count))),bt.createElement(ot.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),bt.createElement("span",null,Nt.members_count)))))))})),!xt.length&&bt.createElement(gt.Z,null)))}},9148:function(dn,fn,le){"use strict";le.d(fn,{jL:function(){return Bt},w9:function(){return ve},QD:function(){return Ue},cQ:function(){return se.Z},op:function(){return Ae},O5:function(){return Jn},_b:function(){return Sn},t7:function(){return it},Gi:function(){return Ce},YG:function(){return pe},qp:function(){return Tt},vr:function(){return rn},qE:function(){return Ye},Je:function(){return dt},wb:function(){return oe},cq:function(){return Kt},tp:function(){return ft}});var ae=le(59301),Re={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"},ot="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==",Bt=({dataSource:zn=[],img:Wn,imgWidth:Kn=346,title:ir,sunTitle:Ar,bannerExtraContent:sn})=>ae.createElement("div",{className:Re.banner},ae.createElement("div",{className:Re.content},ae.createElement("aside",null,ae.createElement("p",null,ae.createElement("b",null,ir),ae.createElement("span",null,Ar)),zn.length>0&&ae.createElement("div",{className:Re.btns},zn.map((qe,$e)=>ae.createElement("div",{key:$e,onClick:qe.click},qe.name,qe.sign?ae.createElement("img",{src:ot,width:39}):null))),sn),Wn&&ae.createElement("img",{style:{marginTop:33,marginRight:38},src:Wn,width:Kn}))),vt={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"},gt=le(92310),kt=le.n(gt),bt=le(89392),Tt=({dataSource:zn=[],value:Wn,onChange:Kn,onTitleChange:ir,className:Ar,title:sn,titleWidth:qe=41,style:$e={},fontColor:un="#6A7283",showCount:or})=>{const[Qn,pr]=(0,ae.useState)(0),[xn,Rn]=(0,ae.useState)(!1),vr=(0,ae.useRef)(null),Nr=(0,ae.useRef)(null);return(0,ae.useEffect)(()=>{var Nn;zn.length!==0&&(((Nn=vr==null?void 0:vr.current)==null?void 0:Nn.clientHeight)>97?pr(1):pr(0)),zn.length===0&&pr(0),Rn(!1)},[zn]),ae.createElement("div",{className:kt()(vt.row,Ar),style:$e},ae.createElement("div",{onClick:(0,bt.throttle)(()=>ir==null?void 0:ir(),2e3),style:{width:qe,marginTop:xn?12:4},className:`${vt.title} ${ir?"current":""}`},sn),ae.createElement("div",{className:xn?`${vt.tagsWrap} ${vt.tagsBorderWrap}`:vt.tagsWrap},ae.createElement("div",{className:vt.bar,ref:Nr,style:Qn>0?{height:Qn===1?97:"auto",overflow:Qn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ae.createElement("div",{className:vt.tag,ref:vr},zn==null?void 0:zn.map(Nn=>ae.createElement("span",{onClick:()=>Kn(Nn.id),key:Nn.id,style:{color:un},className:Wn===Nn.id?vt.active:""},ae.createElement("span",{title:Nn.name,className:vt.name},Nn.name),!!or&&ae.createElement("span",{className:vt.num},Nn.count))))),!!Qn&&ae.createElement(ae.Fragment,null,Qn===1?ae.createElement("div",{onClick:()=>{var Nn;pr(2),((Nn=vr==null?void 0:vr.current)==null?void 0:Nn.clientHeight)>245?Rn(!0):Rn(!1)},className:vt.action},"\u5C55\u5F00",ae.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ae.createElement("div",{onClick:()=>{Nr.current.scrollTop=0,pr(1),Rn(!1)},className:vt.action},"\u6536\u8D77",ae.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},mt={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"},ft=({dataSource:zn=[],value:Wn,onChange:Kn,className:ir,style:Ar={}})=>ae.createElement("div",{style:Ar,className:kt()(mt.tabs,ir)},zn.map(sn=>ae.createElement("span",{onClick:()=>Kn(sn.id),className:Wn===sn.id?mt.active:"",key:sn.id},sn.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"},tt=le(37568),it=({dataSource:zn=[],value:Wn="",onChange:Kn,onInputChange:ir=()=>{},className:Ar,style:sn={},placeholder:qe,allowClear:$e=!1})=>{var un;const[or,Qn]=(0,ae.useState)(""),[pr,xn]=(0,ae.useState)("");(0,ae.useEffect)(()=>{var Nr;let Nn=Wn;(Nr=JSON.stringify(Wn))!=null&&Nr.includes("{")&&(Qn(Wn.id),Nn=Wn.value||"");try{xn(decodeURIComponent(Nn||""))}catch(Oe){xn(decodeURIComponent(Nn||""))}},[Wn]);const Rn=()=>{Kn(encodeURIComponent(pr),or||null)},vr=Nr=>{Nr!==or&&(Qn(Nr),Kn(encodeURIComponent(pr),Nr))};return ae.createElement("div",{className:kt()(z.input,Ar),style:sn},!!zn.length&&ae.createElement("div",{className:z.dropdown},ae.createElement("div",{className:z.text},(un=zn.find(Nr=>Nr.id===or))==null?void 0:un.name,ae.createElement("i",{className:"iconfont icon-zhankai4"}),ae.createElement("b",{className:z.b1}),ae.createElement("b",{className:z.b2})),ae.createElement("div",{className:z.menu},zn.map((Nr,Nn)=>ae.createElement("div",{key:Nn,onClick:()=>vr(Nr.id)},Nr.name)))),ae.createElement(tt.default,{onPressEnter:Rn,value:pr,onChange:Nr=>{xn(Nr.target.value),ir(encodeURIComponent(Nr.target.value),or||null)},bordered:!1,placeholder:qe}),ae.createElement("i",{onClick:Rn,className:"iconfont icon-sousuo9 font14 pl10 current"}))},lt={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"},dt=({value:zn,onChange:Wn,className:Kn,total:ir,pageSize:Ar,style:sn={}})=>{const qe=zn<2,$e=zn>=Math.ceil(ir/Ar);return ir<=Ar?ae.createElement(ae.Fragment,null):ae.createElement("div",{className:kt()(lt.quickPager,Kn),style:sn},ae.createElement("div",{onClick:()=>{qe||Wn(zn-1,"prev")},className:qe?lt.disabled:""},"\u4E0A\u4E00\u9875"),ae.createElement("div",{onClick:()=>{$e||Wn(zn+1,"next")},className:$e?lt.disabled:""},"\u4E0B\u4E00\u9875"))},Pt={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"},At=le(29787),Dt=le(25399),Ft=le(58018),Nt=le(346),jt=le(51257),Gt=le(96908),Wt=le(57177),Jt=le(81378),Ut=le(28426),oe=({className:zn,dataSource:Wn=[],col:Kn=4,right:ir,bottom:Ar=23,precision:sn=0,wrapWidth:qe=1200,trackEventItems:$e,loading:un})=>{const or=Math.floor((qe-(Kn-1)*ir)/Kn);return ae.createElement(At.Z,{spinning:un},ae.createElement("div",{className:kt()(Pt.list,zn)},!!Wn.length&&Wn.map((Qn,pr)=>{const{name:xn,id:Rn,identifier:vr,power:Nr,cover_image_id:Nn,pic:Oe}=Qn;return ae.createElement("div",{className:Pt.wrap,key:Rn,style:{width:or,marginRight:(1+pr)%Kn===0?0:ir+sn,marginBottom:Ar}},ae.createElement("a",{target:"_blank",href:`/shixuns/${vr}/challenges`,className:Pt.li,onClick:Ke=>{Ke.preventDefault(),$e&&(0,jt.L9)([$e]),Nr&&(0,jt.xg)(`/shixuns/${vr}/challenges`)}},ae.createElement("div",{className:Pt.img},ae.createElement("img",{className:Pt.cover,src:`${Oe}`}),Qn.is_jupyter&&ae.createElement("img",{className:Pt.sign,src:Gt}),Qn.is_jupyter_lab&&ae.createElement("img",{className:Pt.sign,src:Wt}),Qn.is_unity_3d&&ae.createElement("img",{className:Pt.sign,src:Jt})),ae.createElement("div",{className:Pt.name},ae.createElement(Dt.Z,{title:xn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ae.createElement("span",{className:Pt.e},xn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),ae.createElement("div",{className:Pt.tags},ae.createElement(Dt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},ae.createElement("span",null,ae.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),ae.createElement("span",null,Qn.challenges_count))),!!Qn.myshixuns_count&&ae.createElement(Dt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ae.createElement("span",null,ae.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),ae.createElement("span",null,Qn.myshixuns_count))),ae.createElement(Dt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ae.createElement("span",null,ae.createElement("span",null,Qn.level))),ae.createElement("div",{className:Pt.rate},ae.createElement(Ft.Z,{allowHalf:!0,disabled:!0,defaultValue:Qn.score_info}),ae.createElement("span",null,"\xA0",Qn.score_info?`${Qn.score_info}\u5206`:"5\u5206")))),!Nr&&ae.createElement("div",{className:Pt.lockWrap},ae.createElement("img",{src:`${Nt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ae.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Wn.length&&ae.createElement(Ut.Z,null)))},se=le(10661),ce={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"},Pe="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",Yt=le(59301),ve=({className:zn,dataSource:Wn=[],col:Kn=4,right:ir,bottom:Ar=23,precision:sn=0,wrapWidth:qe=1200,trackEventItems:$e,loading:un,handleVery:or=()=>!0})=>{const Qn=Math.floor((qe-(Kn-1)*ir)/Kn);return Yt.createElement(At.Z,{spinning:un},Yt.createElement("div",{className:kt()(ce.list,zn)},!!Wn.length&&Wn.map((pr,xn)=>{const{subject_identifier:Rn,id:vr,identifier:Nr,power:Nn}=pr,Oe=pr.is_public!=0&&pr.is_public;return Yt.createElement("div",{className:ce.wrap,key:vr,style:{width:Qn,marginRight:(1+xn)%Kn===0?0:ir+sn,marginBottom:Ar}},Yt.createElement("a",{className:ce.li,onClick:Ke=>{Ke.preventDefault(),or(pr==null?void 0:pr.first_category_url)&&($e&&(0,jt.L9)([$e]),(0,jt.xg)(pr.first_category_url))}},Yt.createElement("div",{className:ce.top},Yt.createElement(Dt.Z,{title:pr.name},Yt.createElement("div",{className:ce.name},pr.name)),Yt.createElement("img",{className:ce.img,src:Nt.Z.IMG_SERVER+"/images/"+pr.avatar_url}),Yt.createElement("div",{className:ce.text,title:pr.creator},pr.creator),Rn&&Yt.createElement("div",{className:ce.btns},Yt.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Yt.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Oe&&Yt.createElement("div",{className:ce.sign},"\u516C\u5F00")),Yt.createElement("div",{className:ce.bottom},pr.visits>0&&Yt.createElement(Dt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Yt.createElement("span",null,Yt.createElement("i",{className:"iconfont icon-liulanyan"}),Yt.createElement("span",null,pr.visits))),pr.course_members_count>0&&Yt.createElement(Dt.Z,{title:"\u6210\u5458",placement:"bottom"},Yt.createElement("span",null,Yt.createElement("i",{className:"iconfont icon-chengyuan"}),pr.course_members_count)),pr.tasks_count>0&&Yt.createElement(Dt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Yt.createElement("span",null,Yt.createElement("i",{className:"iconfont icon-zuoye"}),pr.tasks_count)),pr.is_end?Yt.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Yt.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!pr.is_accessible&&Yt.createElement("div",{className:ce.lockWrap},Yt.createElement("img",{src:`${Nt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Yt.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Wn.length&&Yt.createElement(Ut.Z,null)))},Se={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"},be=le(25690),pe=({dataSource:zn=[],value:Wn,onChange:Kn,className:ir,style:Ar={},tabBarExtraContent:sn})=>ae.createElement("div",{className:kt()(Se.tabs,ir),style:Ar},ae.createElement("div",{className:Se.tabsWrap},zn.map((qe,$e)=>!(qe!=null&&qe.hide)&&ae.createElement("aside",{className:Se.tab,onClick:()=>{Kn(qe.id),qe.link&&be.history.push(qe.link)},key:$e},ae.createElement("div",{className:Wn===qe.id?Se.active:""},qe.name),(qe==null?void 0:qe.resetCount)==null&&(qe==null?void 0:qe.total)!==void 0&&ae.createElement("span",null,"\uFF08",qe==null?void 0:qe.total,"\uFF09"),(qe==null?void 0:qe.resetCount)!==void 0&&(qe==null?void 0:qe.total)!==void 0&&ae.createElement(Dt.Z,{title:(qe==null?void 0:qe.tip)!=null?qe==null?void 0:qe.tip:""},ae.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ae.createElement("span",{style:{color:"#000"}},qe==null?void 0:qe.resetCount),"/",ae.createElement("span",null,qe==null?void 0:qe.total),"\uFF09"))))),ae.createElement("div",{className:Se.tabBar},sn)),Ce=({className:zn,style:Wn={},children:Kn})=>ae.createElement("div",{className:kt()(zn),style:Wn},Kn),de={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"},ye=le(75727),Ne=le(93041);const xe=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Kt=({sortValue:zn,dropValue:Wn,className:Kn,onSort:ir,onDrop:Ar,dataSource:sn=xe})=>{var qe;return ae.createElement("div",{className:kt()(de.orderWrap,Kn)},ae.createElement(ye.Z,{dropdownRender:()=>ae.createElement(Ne.default,null,sn.map(($e,un)=>ae.createElement(Ne.default.Item,{key:un,onClick:()=>Ar($e.id)},$e.name)))},ae.createElement("span",{className:de.orderTextWrap},(qe=sn.find($e=>Wn===$e.id))==null?void 0:qe.name)),ae.createElement("span",{className:de.orderIconWrap},ae.createElement("span",{className:de.orderAsc},ae.createElement("i",{className:zn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${de.cursorPointer} ${de.active}`:`iconfont icon-sanjiaoxing-up font12 ${de.cursorPointer}`,onClick:()=>ir(zn==="asc"?"desc":"asc")})),ae.createElement("span",{className:de.orderDesc},ae.createElement("i",{className:zn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${de.cursorPointer} ${de.active}`:`iconfont icon-sanjiaoxing-down font12 ${de.cursorPointer}`,onClick:()=>ir(zn==="asc"?"desc":"asc")}))))},wt={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"},Lt=le(99571),Xt=Object.defineProperty,ee=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Vt=(zn,Wn,Kn)=>Wn in zn?Xt(zn,Wn,{enumerable:!0,configurable:!0,writable:!0,value:Kn}):zn[Wn]=Kn,$t=(zn,Wn)=>{for(var Kn in Wn||(Wn={}))It.call(Wn,Kn)&&Vt(zn,Kn,Wn[Kn]);if(ee)for(var Kn of ee(Wn))Rt.call(Wn,Kn)&&Vt(zn,Kn,Wn[Kn]);return zn},ue=(zn,Wn)=>{var Kn={};for(var ir in zn)It.call(zn,ir)&&Wn.indexOf(ir)<0&&(Kn[ir]=zn[ir]);if(zn!=null&&ee)for(var ir of ee(zn))Wn.indexOf(ir)<0&&Rt.call(zn,ir)&&(Kn[ir]=zn[ir]);return Kn},ge=(zn,Wn,Kn)=>new Promise((ir,Ar)=>{var sn=un=>{try{$e(Kn.next(un))}catch(or){Ar(or)}},qe=un=>{try{$e(Kn.throw(un))}catch(or){Ar(or)}},$e=un=>un.done?ir(un.value):Promise.resolve(un.value).then(sn,qe);$e((Kn=Kn.apply(zn,Wn)).next())}),Ae=zn=>{var Wn=zn,{className:Kn,style:ir,children:Ar,loading:sn=!1,openLoading:qe,onClick:$e=()=>{},size:un="middle",shape:or="round"}=Wn,Qn=ue(Wn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[pr,xn]=(0,ae.useState)(!1);return ae.createElement(Lt.ZP,$t({onClick:(0,bt.throttle)(Rn=>ge(void 0,null,function*(){qe&&xn(!0);try{yield $e(Rn)}catch(vr){console.log("error",vr)}qe&&xn(!1)}),2e3,{leading:!0,trailing:!1}),className:kt()(wt.btn,wt[`${un}-${or}`],Kn),style:ir,size:un,shape:or,loading:pr||sn},Qn),Ar)},Be={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"},Ye=({className:zn,style:Wn,children:Kn=null,onClick:ir,title:Ar})=>ae.createElement("div",{className:kt()(Be.head,zn),style:Wn},ae.createElement("span",{className:"primary-hover",onClick:ir},ae.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ae.createElement("b",{title:Ar},Ar),ae.createElement("div",{className:Be.node},Kn)),Qe={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"},Ue=({confirmShow:zn=!0,confirmTitle:Wn,confirmClick:Kn,cancelShow:ir=!0,cancelTitle:Ar,cancelClick:sn,className:qe,style:$e,confirmLoading:un=!1})=>ae.createElement("div",{className:kt()(Qe.btns,qe),style:$e},zn&&ae.createElement(Lt.ZP,{loading:un,onClick:Kn,type:"primary",className:Qe.confirm},Wn),ir&&ae.createElement(Lt.ZP,{onClick:sn,className:Qe.cancel},Ar)),We={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"},rn=({className:zn,style:Wn={},LeftContent:Kn,children:ir,RightContent:Ar})=>ae.createElement("div",{className:kt()(We.fixedBottom,zn),style:Wn},ae.createElement("div",{className:We.wrap},ae.createElement("div",{className:We.left},Kn),ae.createElement("div",{className:We.center},ir),ae.createElement("div",{className:We.right},Ar))),an={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"},Sn=({className:zn,style:Wn={},dataSource:Kn=[]})=>ae.createElement("div",{className:kt()(an.crumbs,zn),style:Wn},Kn.map((ir,Ar)=>Ar<Kn.length-1?ae.createElement(ae.Fragment,{key:Ar},ir.path||ir.onClick?ae.createElement("span",{className:an.hover,onClick:ir!=null&&ir.onClick?ir.onClick:()=>be.history.push(ir.path)},ir.name):ae.createElement("span",null,ir.name),ae.createElement("span",null,"\xA0",">","\xA0")):ae.createElement("span",{key:Ar,style:{color:"#5F6368"}},ir.name))),_n=le(11938),Xn=Object.defineProperty,Yn=Object.defineProperties,Er=Object.getOwnPropertyDescriptors,dr=Object.getOwnPropertySymbols,Mr=Object.prototype.hasOwnProperty,Tr=Object.prototype.propertyIsEnumerable,Or=(zn,Wn,Kn)=>Wn in zn?Xn(zn,Wn,{enumerable:!0,configurable:!0,writable:!0,value:Kn}):zn[Wn]=Kn,Sr=(zn,Wn)=>{for(var Kn in Wn||(Wn={}))Mr.call(Wn,Kn)&&Or(zn,Kn,Wn[Kn]);if(dr)for(var Kn of dr(Wn))Tr.call(Wn,Kn)&&Or(zn,Kn,Wn[Kn]);return zn},hr=(zn,Wn)=>Yn(zn,Er(Wn)),zr=(zn,Wn)=>{var Kn={};for(var ir in zn)Mr.call(zn,ir)&&Wn.indexOf(ir)<0&&(Kn[ir]=zn[ir]);if(zn!=null&&dr)for(var ir of dr(zn))Wn.indexOf(ir)<0&&Tr.call(zn,ir)&&(Kn[ir]=zn[ir]);return Kn};const{Countdown:qt}=_n.default;var Jn=zn=>{var Wn=zn,{onChange:Kn}=Wn,ir=zr(Wn,["onChange"]);const[Ar,sn]=(0,ae.useState)(null);(0,ae.useEffect)(()=>{typeof Ar=="number"&&Ar>=0&&Kn(Ar)},[Ar]);const qe=$e=>{const un=Math.floor($e/1e3);sn(un)};return ae.createElement(qt,hr(Sr({},ir),{onChange:qe}))}},37808:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return Re}});var ae=le(59301);function Re(ot,_t){const Bt=(0,ae.useRef)();(0,ae.useEffect)(()=>{Bt.current=ot}),(0,ae.useEffect)(()=>{function vt(){Bt.current()}if(_t!==null){let gt=setInterval(vt,_t);return()=>clearInterval(gt)}},[_t])}},96662:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return Gt}});var ae=le(59301),Re=le(28284),ot=le(30641),_t=le(62957),Bt=le(6767),vt=le(62673),gt=le(75975),kt=le(58397),bt=le(91558),St=le(23992),Tt={"code-panel-container":"code-panel-container___RFtv_","action-oj-bar":"action-oj-bar___ByFmZ",active:"active___s9gT5",tip:"tip___XZhl7"},mt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAcCAYAAAAJKR1YAAAAAXNSR0IArs4c6QAAA8pJREFUWEfdl1toHUUYx//f7p7LbnIuSU4bk2JqS3qxbTA9FsQXBamJNMVS8CEPAfGhakQFUaHQh2Kp4IPgBfTBBx9UUHyQGgslscGCIr2QHlpfWg1pktPW0rTunvttdqadTY85yUmTTXJSwe9pZ3dm/r/5f8PMtzQYs96FwEEI0Yj/KojGVUV5Y3dn8DgNnrduV8IQAWtCXty0iggYGmybI1vgiIS8MFNF2Hx1qInoRFc0vIcGR0xRKaEqQGuTH/GpPBqDHjDGkczaWBfxOZAlNqt77eiIznZHw09UAWkqIaCrEKDaiVXNJJDMMPDKtc0HJBE624PwaMoqwkxPnciUcDmemdGZD8irETrbQ6sOIwVKjCM2mvyfAp25VsTjLV7Ml9kEB0gAQXVho2vm0MCfOXwxksbeTTpe3VU/S5UBOJ6afvWMsTBUTYDKMA/Vq/hgdxgRvXrzT5SA03nAtwjUioHcwJTtcgO1IqClwLiFWjYQ48BbQyaumAz7thg4EK1zdSwUBPBzFkhz4DEv8KjMYUUsG0jOkSoIHPrFwpjJ0LujDn0dxoJQEuZUFjA5sN0HdHiru68IaClQbmBqdjBWOtXXUYfeHbOdkvfu8Bxn4qyAj1Pj2KgZ6NEjeETTHbtW7FDZdAl19NcEXuysx7aIVpWLWB7OgVlOk31X/JD1F+IsBxWE/kAbnvSFage02I5mEBhjOWzWZtyT7cPWKDgEfKTgw4atCHDlwdxl54pJfJqcwJFwOzbcS49cxDeZv3EiN+Wsp9dowXPepgcD9GP2Jr7P3kCbpuNoeBPKV9rZYgKfJCccoKf9jXjJ37o4kELT9ZAmy8ZlxnD+H3yZvuqM3m804wWjGb8VLHyVuY4Ml7cdsFdfix6K4NJkekblfhWjz6MgWFe9Wd3ymcTwkTqOcultQEUWcmvPxAF7HYJJDcyuKBkrgBIAgm4F3fQ7bSRwxpDTzh99ZguabM/sj0Qnu6PhZ2loxHpfEN6GEHMOdzfS9+8T01OQYEWq/k1pK/mxP7H238FEZAlQf3c09J1Tyf8eF3ohm1r0kmJ58R5n/DW3qNwvXvmh3hzLodBqonREAOvLY0PQ3nw5//C3sh3YHEjsIirJZ9e/FsPnc+sZCpeX5CTRaNPO0DYptmfy4lMATkEIR5MASzV8bQNrtt4r6aZRXQMNxcyvBUefW3fK/UhRXu/aGfpMtnsmL3wuBPodYcJ1TyC4/VjDBqtyTldAJ/9IN/MiOyYISz4PCOJGV7RhnxR9fupSwM4VBwBMKJrvnZ9at9yau8A7ulgdO7eZq+0AAAAASUVORK5CYII=",xt=le(89392),ft=le(9148),z=le(59301),tt=Object.defineProperty,at=Object.defineProperties,it=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,Pt=(Jt,Ut,Ht)=>Ut in Jt?tt(Jt,Ut,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):Jt[Ut]=Ht,At=(Jt,Ut)=>{for(var Ht in Ut||(Ut={}))ut.call(Ut,Ht)&&Pt(Jt,Ht,Ut[Ht]);if(lt)for(var Ht of lt(Ut))dt.call(Ut,Ht)&&Pt(Jt,Ht,Ut[Ht]);return Jt},Dt=(Jt,Ut)=>at(Jt,it(Ut));const Ft={theme:(0,St.G)("cmCodeMode","vs-dark"),fontSize:(0,St.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,St.G)("cmTabToSpace",!0)};var Nt=(Jt=>(Jt[Jt.set_font_size=0]="set_font_size",Jt[Jt.set_theme=1]="set_theme",Jt[Jt.on_tab_to_space=2]="on_tab_to_space",Jt[Jt.set_show_editor_setting=3]="set_show_editor_setting",Jt))(Nt||{});function jt(Jt,Ut){switch(Ut.type){case 3:return Dt(At({},Jt),{showEditorSetting:Ut.payload});case 1:return Dt(At({},Jt),{theme:Ut.payload});case 0:return Dt(At({},Jt),{fontSize:Ut.payload});case 2:return Dt(At({},Jt),{tabToSpace:Ut.payload});default:throw new Error}}var Gt=({isLoading:Jt,value:Ut=[],onChange:Ht,form:oe})=>{var se;const[ce,Pe]=(0,ae.useReducer)(jt,Ft),{theme:Yt,fontSize:ne,showEditorSetting:ve,tabToSpace:Se}=ce,[be,fe]=(0,ae.useState)("C"),[pe,he]=(0,ae.useState)(!1),[Ce,de]=(0,ae.useState)([]),ye=(0,ae.useRef)([]),Ne=Re.default.useWatch(["hack","languages"],oe);(0,ae.useEffect)(()=>{Ut!=null&&Ut.length&&(ye.current=(0,xt.cloneDeep)(Ut))},[Ut]),(0,ae.useEffect)(()=>{pe&&de(Ne)},[pe]),(0,ae.useEffect)(()=>{fe(Ne==null?void 0:Ne[0])},[Ne]);const xe={onFontSizeChange:ee=>{Pe({type:0,payload:ee}),(0,St.t)("cmFontSize",ee)},tabToSpace:Se,cmFontSize:ne,className:"oj",cmCodeMode:Yt,onTabToSpace:ee=>{Pe({type:2,payload:ee}),(0,St.t)("cmTabToSpace",ee)},onCodeModeChange:ee=>{Pe({type:1,payload:ee}),(0,St.t)("cmCodeMode",ee)}};function re(){Pe({type:3,payload:!1})}function Kt(){Pe({type:3,payload:!0})}function wt(ee){var It;const Rt=(It=ye.current)==null?void 0:It.map(Vt=>(Vt.language===be&&(Vt.code=ee),Vt));ye.current=(0,xt.cloneDeep)(Rt),Ht(Rt)}const Lt={key:be,value:(se=Ut==null?void 0:Ut.find(ee=>ee.language===be))==null?void 0:se.code,language:be,onChange:wt,theme:"vs",height:"calc(100% - 40px)",options:{fontSize:ne,insertSpaces:Se}};console.log(888,Ut,Ne);const Xt=Ut.filter(ee=>Ne==null?void 0:Ne.includes(ee.language));return z.createElement(ae.Fragment,null,z.createElement("div",{className:Tt["code-panel-container"]},z.createElement(Wt,{setVisible:he,languageItems:Xt,onLanguage:ee=>fe(ee),language:be,onShowCodeSetting:Kt}),!Jt&&z.createElement(gt.ZP,At({},Lt))),z.createElement(bt.Z,null,z.createElement(ot.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ve,onClose:re},z.createElement(kt.Z,At({},xe)))),z.createElement(_t.default,{centered:!0,open:pe,title:"\u7F16\u7A0B\u8BED\u8A00\u914D\u7F6E",width:564,onOk:()=>{if(!Ce.length){Bt.ZP.warning("\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00");return}oe.setFieldValue(["hack","languages"],Ce),he(!1)},onCancel:()=>he(!1)},z.createElement("div",{style:{background:"#F6F7F9",padding:"20px 20px 20px 26px"}},z.createElement(vt.default.Group,{value:Ce,options:[{label:"C\u8BED\u8A00",value:"C"},{label:"C++\u8BED\u8A00",value:"C++",style:{marginLeft:30}},{label:"Java\u8BED\u8A00",value:"Java",style:{marginLeft:30}},{label:"Python\u8BED\u8A00",value:"Python",style:{marginLeft:30}}],onChange:ee=>{de(ee)}}))))};function Wt({languageItems:Jt,language:Ut,onShowCodeSetting:Ht,onLanguage:oe,setVisible:se}){return z.createElement("div",{className:Tt["action-oj-bar"]},Jt==null?void 0:Jt.map(ce=>z.createElement("aside",{className:Ut===(ce==null?void 0:ce.language)?Tt.active:"",onClick:()=>oe(ce==null?void 0:ce.language),key:ce==null?void 0:ce.language},z.createElement("i",{className:"iconfont icon-bianchengyuyan1"}),z.createElement("span",null,ce==null?void 0:ce.language))),z.createElement("div",{className:Tt.tip},z.createElement("i",{className:"iconfont icon-tishi12 font14",style:{color:"#FEB636",marginRight:3}}),z.createElement("span",null,"\u8BBE\u7F6E\u521D\u59CB\u4EE3\u7801\uFF0C\u4E3A\u5B66\u751F\u63D0\u4F9B\u660E\u786E\u7F16\u8BD1\u8D77\u70B9")),z.createElement(ft.op,{onClick:()=>se(!0),shape:"default"},z.createElement("img",{src:mt,width:18,style:{marginRight:8}}),"\u7F16\u7A0B\u8BED\u8A00\u914D\u7F6E"))}},93946:function(dn,fn,le){"use strict";le.d(fn,{GM:function(){return kt},MK:function(){return gt},PR:function(){return Re},ZS:function(){return St},d1:function(){return ot},fu:function(){return _t},j2:function(){return bt},l_:function(){return Bt},uE:function(){return Tt},zQ:function(){return vt}});var ae=le(38986);function Re(){return(0,ae.U2)("problems/new.json")}function ot(xt="question"){return(0,ae.U2)("disciplines.json",{source:xt})}function _t(xt){return(0,ae.U2)(`problems/${xt}/edit.json`)}function Bt(xt,ft){return(0,ae.gz)(`problems/${xt}.json`,ft)}function vt(xt){return(0,ae.v_)("problems.json",xt)}function gt(xt,ft){return(0,ae.v_)(`exercises/${xt}/exercise_questions.json`,ft)}function kt(xt,ft){return(0,ae.gz)(`exercise_questions/${xt}.json`,ft)}function bt(xt){return(0,ae.v_)(`problems/${xt}/publish.json`)}function St(xt){return(0,ae.v_)(`problems/${xt}/cancel_publish.json`)}function Tt(xt){return(0,ae.U2)(`problems/${xt}/start.json`)}function mt(xt,ft){return post("tag_disciplines.json",{name:ft,sub_discipline_id:xt})}},72937:function(dn,fn,le){"use strict";le.d(fn,{D0:function(){return gt},R8:function(){return _t},jw:function(){return vt},y3:function(){return kt}});var ae=le(82326),Re=le(59301);const{Option:ot}=ae.default;var _t=(bt=>(bt[bt.language=0]="language",bt[bt.difficult=1]="difficult",bt[bt.category=2]="category",bt[bt.openOrNot=3]="openOrNot",bt))(_t||{});const Bt={0:[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],1:[{title:"\u7B80\u5355",key:1},{title:"\u4E2D\u7B49",key:2},{title:"\u56F0\u96BE",key:3}],2:[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}],3:[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]};function vt(bt){return Bt[bt].map(St=>Re.createElement(ot,{key:St.title,value:St.key}," ",St.title," "))}function gt(bt,St){bt.map(Tt=>{const{id:mt,name:xt,sub_disciplines:ft}=Tt;let z={value:mt,label:xt};St.push(z),ft&&ft.length>0&&(z.children=[],gt(ft,z.children))})}function kt(bt,St){var Tt;let mt=[];for(let xt=0;xt<bt.length;xt++){const ft=bt[xt];if(((Tt=ft.sub_disciplines)==null?void 0:Tt.length)>0){mt[0]=ft.id;for(let z=0;z<ft.sub_disciplines.length;z++){const tt=ft.sub_disciplines[z];if(tt.id===St)return mt[1]=tt.id,[mt,tt.tag_disciplines||tt.sub_disciplines||[]]}}}return[mt,[]]}},3532:function(dn,fn,le){"use strict";le.d(fn,{Y2:function(){return se},ZP:function(){return ce}});var ae=le(59301),Re=le(14566),ot=le(6767),_t=le(62957),Bt=le(77019),vt=le(47889),gt=le(99571),kt=le(62673),bt=le(25399),St=le(37568),Tt={wrap:"wrap___MkYbQ",colorBlue:"colorBlue___onjbP",repeatedName:"repeatedName___nbqnE",text:"text___xvutp",greyText:"greyText___dihvZ",noData:"noData___LxOJA",dragger:"dragger___y7F4A",uploadText:"uploadText___Et3KS",btnS:"btnS___k1e6j",testCaseRadio:"testCaseRadio___q1wXT",head:"head___s4Eix",operation:"operation___JCAVh",headProgram:"headProgram___uWA_M",listWrapper:"listWrapper___xW3b4",list:"list___dCbd6",del:"del___abNho",info:"info___J1Wmf"},mt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAADICAYAAACAj9YNAAAAAXNSR0IArs4c6QAAD59JREFUeF7tnet527gShsFUZFeQpJN1GkncyG46iVJBVFG4D6mLKYmSMLgQM4NXf855NrgMvm/8egBC9BD4oIBhBV7++fPlHP6n8PH/p/84Dp8XS7v8txB2N8sext/h7+G/73++3v67YZ08hz54Xhxr86fAy7c/P+ZVHQB1DaYaCz7AbBzfgVsNefPHBGL5GjJCRQUW0PpecRrp0DugJpWsXnsgVk9bRk5QQCm0nq1khhpb0Gcy1fl3IFZHV0YVKDCfa03nWeOgqdoSrODc9Lz1BGgp8qX1AWJputGrgAJz1bXd2VaBiEVDUJ2J5EpvDMTStaNnogJHeFmvuiSrB2gStYRtgZhQMJqnKWD0rCttsfd7AbPSioYQgFgFURnyQwHnW8ZUq4FZqnIr/YBYQTEZ6lKBDreNshQYxvf9v6+He298khUAYsnS0fGeAsBLmBvj+JWnmULNFs2BWLp29LxSYL4qMczXJLa4Se9Nf7aYiY4CsUTh6MbWsUoOsMUUywrExJLRYakAW8cq+UBVJpAViAnEoinV16Y5QFUWJTcQi5KJRtcKUIFtlBOA7KnQQOypRDS42D5yeN8iIdhePlAdiLVISaNzUn01No6rGKsGALHGeWllegCmxCm2lzdGADEluak5DACmzB1AdmEIEFOWn9rCAWDaHDnGA8jOxgAxpTmqIayXt/0vbt9rcOJODIBsFgaIKc7RlqFRgbVUXzA3IANignTppikAM2Z15yCjEjOWr7XDBWC1Fa40fscgA2KVcsrisADMomuLmDsFGRAznrelwj++Rmc6yOdjWYEOL8QCMcsJWyh2AFZISCXD7P976ernuqvFKskxVWEAMFV2lAmms20lECuTNmZH4S6YWeseB94RyICY0xyOWRYH+TEqGW7TCciAmOEczQmdbWSOenb69nA+BsTs5GPRSNlGFpVT72AdVGNATG/6VYuMbWQ1aXUO7BxkQExn2lWN6uVtP1adgMHVKeB5WwnE1KVb3YDYRtbVV+3ojqsxIKY268oHxmF+eU0tjei1GgNilrIwM1a2kZkCWu/utBoDYtYTMzJ+tpGRQnlv5hBkQMx70h7XRxXWidHPl7nb//fy9XkzOy2AmB2vkiPlSkWydD47OqvGgJjPNL1YFVVYByZLlgjEJGrRtrUCPJFs7YDS+R2BjEpMSY7NsDl+9j9fd6XC4kC/lJLOxgFizgzdYDnzudTpMw6fj//3DK4HIRyANoy/w9+wkwCOKmwDYy1P4QRkVGIVk/AMrnH4XniaXQzUqMIKq+5tOCDmzdH89cyVz6fwJRwqrZgqK3/SEFaBRhVWQlr/Y3i4xU8lVihPlVxj2IVxfJ+2nFRhhYz1PoyDagyIZSapEnhdr2I6R9uqEsxUkO5NFQBiTeVvOrlSeDXVhMltKmB9S0klJsw74CUUjOb6FTBejQExQYoBMIFYNLWkgOnvUwKxyFTjoDxSKJqZVMDylhKIPUk5riqY/JkkaKkChreUQOyB2WwfpT8JtDerABAza93dwAGYP09Z0WMFrG4pqcRWfGULyY97jwoAMSeuAzAnRrIMuQJGt5RUYldW8xRSnvv0cKIAELNvJACz7yEryFLA5H0xKrGj5xzkZyU/nZ0oYPFcDIiFEDgHc/ITyDKyFQBi2RK2GYBtZBvdmVWhAuP4VfL2YA0r6L4SYxupIQ2JQY0CBg/3gdjbflSTQASCAq0VAGKtHZDNTxUm04vWHSgAxOyYzGG+Ha+IdFMFzF2z6HY7yWH+pj8YTGZHASBmwSuqMAsuEWMjBYBYI+FF0wIxkVw07kwBa3fFutxOspXs7KeS5YoUAGIiudo0fuFaRRvhmdWEAkBMuU1sJZUbRHjNFQBizS14HABbSeUGEV5zBYBYcwueQowb+so9Iry2CgCxtvo/nJ2tpGJzCE2NAkBMjRW3gQAxxeYQmhoFgJgaK1Yg9u3PjzAO3xWHSGgo0FoBLru2duDR/HzhW7M7xKZEASCmxIjVMHgyqdkdYlOiABBTYgQQ02wEsWlWAIhpdodKTLM7xKZCAd4npsKGu0HwdSPd/hCdAgV4x35bE+YrFNPnUzj87/IzDp9DWPnvbUNmdhTQpQAQ286P+Unj9DnAafrcgmu7cJgJBVwoYO2O2CS6mVfxXEELYLn4kWERShXYhXF8t/Kn21RDbAEuLqgqzXbCcq+AeqCpgxjgcv9DwQLtKqASaGogxm16u5lN5B0qoOgqRnOIAa8OfwBYshcFVFRmzSAGvLzkMetAgdAUZptD7Agv7myR+SjgT4EmMNsUYlRf/rKWFaHAigKbwmwTiAEvEh0FOlRgo8P/6hADYB0mL0tGgZMCG4CsGsSOr4KeLqlyu56URoG+Fai6vawCMaqvvjOW1aPAqgKVqrLiEANgJDAKoMBdBSqArCjEABjJiwIoEKFA0bfHFoMYAIuwjiYogAInBYqBrAjEeO0zmYkCKJCgQBGQZUMMgCVYRxcUQIFiFVkWxNhCkokogALZCmQe9idDDIBlW8cAKIACJwUyQJYEMQBG7qEAChRXIBFkYogdb+L/Kr4ABkQBFECBBJDJIfa2H1EaBVAABaopIASZCGI8iaxmGwOjAAosFJD86bhoiHEORo6hAApspoCgGouCGOdgm1nHRCiAAsInlnEQe9tPB/m8Uof0kiswjO/hb9jNHYeBVzPJFey6R8y28inE2EZ2nUM5i1/9Sgn5lCNph30jtpUPIcY2ssOkKbTkR79BAVkhkXsZ5gnIHkOMbWQvaVJ2neP4df/z9bCFvPMBZGUl9z7ao1+KdyFGFeY9LSqtLwJgp5m5slPJA4/DPqjG7kOMKsxjKtRdU8T5xXUAL1yeruuJo9HvVWOrEKMKc+T8VktJANgUGrm2lUEO5rmTY+sQowpz4PiGS0gE2Hlb+c+fL2EY+D7uhpaZnCoWYvxmNGlvu6AzAXYG2bc/P8I43yPjgwL3FVjJt5tKjMNWMkigQJHXCwMygeK9N42EGG+p6D1R4tZfFGCALE50WoVwfcB/UYmxlSRFohUQXKWIHvPYkDtkUsU6a39VjV1CjAP9zrIhcbkVAXauyMjFRHP66Lasxq4hxlayjxxIX+UGAANk6fZ003ORh2eIsZXsxv70hRZ6EikJgMuwErU6arvIxQ+IUb53lAEJS20AsClKfrkmeNVHl/ODpSXE2Er2Yb58lY0AxhNLuVU99Tidi80Q47ddT9aL11rlKoU0Cp5YShXroP3xlysQ68DrjCWqABgVWYaDnrteQIzzMM9Wp65NFcAAWaqNrvvNOXqoxICYa6eTFrfhVQppfGwtpYr5bT+di50gxqG+X5/lK1MMsHNFxi9eua8eewzj+8ChvkdnM9bU+EmkJHJ2EBK1nLYFYk6NTV2WIYDNxyC8hyzVaT/9ZojxHic/huasxBjAzttKQJbjuv2+M8Q4W7BvZO4KjAKMJ5a5xrvovwNiLnzMWoTKqxTSFbGjkCrmpj0Qc2Nl2kJcAIyKLM18L72oxLw4mbIOA1cppMuiIpMqZr/9BDHuiNn3Ub4ChwCjIpOngYceQMyDi9I1OAbYGWQ8sJJmhdn2QMysdYmBG38SKVk1uwyJWnbbAjG73skj7whgkzhchpWniMUeQMyiaykxdwaw87aSy7Ap2WKqD08nTdmVHKyrqxRSFXhiKVXMVnsgZsuvlGi7BhhPLFNSxlYfIGbLL2m0AGyhGBWZNH1stAdiNnxKi7KDqxRSYQCZVDH97XmLhX6P0iIEYHd146UHaSmltNcOiCl1JissAPZUPkD2VCIrDXa82dWKVbFxdnqVIlaeZTsuw6aopqzP9D6xKSTMVGZMajgATKQcl2FFculsPI7nv3bEl8B1WiSJiieRErWObTnoTxBNU5cFxH6FEL5oio1YhApwDiYU7KM5IEuWrnnHjz/Zxnv2m5uRGQBVWIaAQCxDvLZdF388l++XtbWiwOzTb6QCw3Q5BBAzavvxDPic+BzuGzXyFDbbyWQDuW6RLF3bjsecX0KMc7G2luTPDsjEGlKFiSVT0+G0+/iAGOdiaszJDGSX1X8c3/c/X/PGyAogrvMMn+kzDp/jeqy24mFWhniNu57PgT8gxrlYY09UTa/6QQHVk6pcaRPMYtdxcRjM2UAbP1TOqvTiLBdUVWbL5kEtH2RdQowt5eZmqJ0QiKm1hsDCxU7h5rE8TylJkaMCKreUVGLkZ7h6gHULMaoxsuSgABAjE1QqcH0nEoiptElFUEBMhQ0EcaXATV6u3vJmS0niUImRAyoVWLkLuQ4xtpQq/ds4KCqxjQVnuqcKrObk3e/bUY09FdR7AyDm3WFr67vzjZT7EKMas2Zx6XiBWGlFGS9Hgbv5+PDNB1RjOZqb7wvEzFvoaAEPvhf8GGJUY46yQLwUICaWjA5VFHhy8frpO6j4nloVWywMCsQsuOQ/xqd5+BRik0ZsK/1nysoKnyZPC1W4sd9C9YZzRrxeKg5ibCsbuthsaiDWTHomPioQlYNREJurMUDWW2ZFJdDWolCJba14u/liX7keDTG2le3MbDQzEGskPNNOL7scv8a+nFMGMaqxnvILiPXktqa1Cl8DJYIY20pNTlePBYhVl5gJSjxQEkMMkHWTeECsG6v1LDT2HGwZcRLEjudj/HUkPd7XiASI1VCVMe8rIDgHKwIxQOY+G4GYe4sVLTARYNMKkiuxGWL8hSRFWVA8FCBWXFIGXFVAeJB/PUYWxACZ66QEYq7tVbK4TIBlV2InGajIlCRE2TCAWFk9Ge2mhBrf9/++Hv4IcsYnuxK7Atn3EAJ/VTnDEEVdgZgiM9yFUqACO2lSDGJnmL3teWrpI+OAmA8f9a0i4xB/bTHFITafkwEyfYkjjwiIyTWjx2MFdmEc32O/ThQrZhWIzSDjK0qxHmhtB8S0OmMxroLbx5ujtZp6HA/8OSerKXK9sYFYPW37GrkiwCYhq1ViS5fYXprMWSBm0jZVQVfZPm5aiV2A7HAxlqpMVY49DAaI2fFKX6SVq6/lgjepxC5gxlmZvoRbjwiIWXFKU5wbwuu07M0hNh/6U5VpSrt7sQAxCy5pirEBwDY7E7unMzDTlIE3sQAx1fYoCq4RvJpWYtfyAzNFCfkRChBTaYuioBrDSxXETsEAM0UJGgIQU2WHkmCG8X2KpMR3HkutqMmZWEzwAC1GpaptgFhVeU0NvgvD+FsTuJbqqYXYMkiA1iThgVgT2dVMqhpc5iB2A7T5kcR852z68NaMOnkPxOroqnXUGVrhb9iV/m5j7QWbqMSeiTBXatPnU/gSxuHzSntA90zE238HYnLNWvTYXU26lusfbSZQnT4GgbUm8P/6C+VmwqlgeQAAAABJRU5ErkJggg==",xt=le(47257),ft=le.n(xt),z=le(16253),tt=le(38986),at=le(1012),it=le(51257),lt=le(45677),ut=le(59301),dt=Object.defineProperty,Pt=Object.defineProperties,At=Object.getOwnPropertyDescriptors,Dt=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,jt=(Pe,Yt,ne)=>Yt in Pe?dt(Pe,Yt,{enumerable:!0,configurable:!0,writable:!0,value:ne}):Pe[Yt]=ne,Gt=(Pe,Yt)=>{for(var ne in Yt||(Yt={}))Ft.call(Yt,ne)&&jt(Pe,ne,Yt[ne]);if(Dt)for(var ne of Dt(Yt))Nt.call(Yt,ne)&&jt(Pe,ne,Yt[ne]);return Pe},Wt=(Pe,Yt)=>Pt(Pe,At(Yt)),Jt=(Pe,Yt,ne)=>new Promise((ve,Se)=>{var be=he=>{try{pe(ne.next(he))}catch(Ce){Se(Ce)}},fe=he=>{try{pe(ne.throw(he))}catch(Ce){Se(Ce)}},pe=he=>he.done?ve(he.value):Promise.resolve(he.value).then(be,fe);pe((ne=ne.apply(Pe,Yt)).next())});const{Dragger:Ut}=Re.default,Ht=Pe=>{const Yt=Ce=>Ce&&Ce.substring(0,Ce.lastIndexOf("."));for(var ne=[...Pe],ve=0,Se=[],be=0;be<ne.length;be++){for(var fe="",pe=0;pe<Se.length;pe++)if(Yt(Se[pe][0].name)==Yt(ne[be].name)){ve=1,fe=pe;break}if(ve==1)Se[fe].push(ne[be]),ve=0;else if(ve==0){let Ce=new Array;Ce.push(ne[be]),Se.push(Ce)}}return Se.map(Ce=>{if(Ce.forEach(de=>{let ye=de.name.split(/\.(?=[^\.]+$)/);de.name=`${ye[0]}.${ye[1].toLowerCase()}`}),Ce[0].name.includes(".in"))return Ce.length===2?Ce:[Ce[0],{}];if(Ce[0].name.includes(".out"))return Ce.length===2?Ce.reverse():[{},Ce[0]]})},oe=({onClose:Pe,onOK:Yt,visible:ne,wrapClassName:ve,rootIdentifier:Se,multiple:be=!1,defaultMultipleValue:fe=!0})=>{const[pe,he]=(0,ae.useState)([]),[Ce,de]=(0,ae.useState)({}),[ye,Ne]=(0,ae.useState)(!1),[xe,re]=(0,ae.useState)(!0),Kt=(0,ae.useRef)([]),wt=(0,ae.useRef)(0),Lt=()=>{Pe()};(0,ae.useEffect)(()=>{Xt()},[]),(0,ae.useEffect)(()=>{ne&&(Kt.current=[],wt.current=0,he([]),re(fe))},[ne]);const Xt=()=>Jt(void 0,null,function*(){try{const Me=yield(0,tt.ZP)("/api/buckets/get_upload_token_for_big_files",{method:"get"}),Ae=JSON.parse((0,z.pe)(Me.data));de(Ae)}catch(Me){}}),ee=Me=>Me&&Me.substring(0,Me.lastIndexOf(".")),It=Me=>{var Ae,Be;const Ze=ee((Ae=Me[0])==null?void 0:Ae.name)||ee((Be=Me[1])==null?void 0:Be.name),Ye=pe.filter(Qe=>ee(Qe.name)!==Ze);Kt.current=[...Ye],he([...Ye])},Rt=Me=>{if(!xe){const He=new FormData;He.append("file",Me.file),(0,tt.ZP)("/api/attachments/get_file_content.json",{method:"post",body:He},!0).then(We=>{if(We.status===0){wt.current=wt.current+1;const Ve=Kt.current.map(rn=>{var an;if(rn.name===Me.name){const ln=Gt({},rn);return(an=Me==null?void 0:Me.name)!=null&&an.includes(".in")?ln.input=We==null?void 0:We.content:ln.output=We==null?void 0:We.content,ln}return rn});if(Kt.current=[...Ve],he([...Ve]),wt.current>0&&wt.current===pe.length){Ne(!1);let rn=Ht(Ve);rn=rn.filter(an=>{var ln,Sn;return!!((ln=an[0])!=null&&ln.name&&((Sn=an[1])!=null&&Sn.name))}),rn=rn.map(an=>Wt(Gt(Gt({},an[0]),an[1]),{is_file:!1})),Yt(rn),Pe()}}else Ne(!1),Pe()});return}const Ae=new(ft())({endpoint:Ce.end_point,region:Ce.region,accessKeyId:Ce.access_key_id,accessKeySecret:Ce.access_key_secret,bucket:Ce.bucket,stsToken:Ce.security_token}),Be=Me.name,Ze={container_type:"TestSet",file_name:Be},Ye=(0,at.Z)();let Qe=`testsets/${Se}/${Ye}${Be.indexOf(".")>-1?"."+Be.split(".").pop():""}`;Se===null&&(Qe=`testsets/${Ye}${Be.indexOf(".")>-1?"."+Be.split(".").pop():""}`),Ae.multipartUpload(Qe,new Blob([Me.file],{type:Me.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Be+""},url:Ce==null?void 0:Ce.callback_url,host:Ce==null?void 0:Ce.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,tt.rz)(Ze)}}).then(function(He){if(He.data.status===0){wt.current=wt.current+1;const Ue=Kt.current.map(We=>{var Ve,rn,an,ln,Sn,_n,Xn,Yn,Er,dr,Mr,Tr,Or,Sr,hr,zr,qt;if(We.name===((rn=(Ve=He.data)==null?void 0:Ve.data)==null?void 0:rn.file_name)){const jn=Gt({},We);return(Sn=(ln=(an=He.data)==null?void 0:an.data)==null?void 0:ln.file_name)!=null&&Sn.includes(".in")?(jn.in_object_key=(Xn=(_n=He.data)==null?void 0:_n.data)==null?void 0:Xn.object,jn.in_object_size=(Er=(Yn=He.data)==null?void 0:Yn.data)==null?void 0:Er.size,jn.input=(Mr=(dr=He.data)==null?void 0:dr.data)==null?void 0:Mr.file_name,jn.in_file=Me):(jn.out_object_key=(Or=(Tr=He.data)==null?void 0:Tr.data)==null?void 0:Or.object,jn.out_object_size=(hr=(Sr=He.data)==null?void 0:Sr.data)==null?void 0:hr.size,jn.output=(qt=(zr=He.data)==null?void 0:zr.data)==null?void 0:qt.file_name,jn.out_file=Me),jn}return We});if(Kt.current=[...Ue],he([...Ue]),wt.current>0&&wt.current===pe.length){Ne(!1);let We=Ht(Ue);We=We.filter(Ve=>{var rn,an;return!!((rn=Ve[0])!=null&&rn.name&&((an=Ve[1])!=null&&an.name))}),We=We.map(Ve=>Wt(Gt(Gt({},Ve[0]),Ve[1]),{is_file:!0})),Yt(We),Pe()}}})},Vt=Me=>new Promise((Ae,Be)=>{let Ze=0,Ye=[];for(let Qe=0;Qe<Me.length;Qe++)Me[Qe].file.slice(0,1).arrayBuffer().then(()=>{Ze++,Ze===Me.length&&(Ye.length?(ot.ZP.warning(`${Ye.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Be()):Ae(Me))}).catch(He=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",He),Ze++,Ye.push(Me[Qe].name),Ze===Me.length&&(Ye.length?(ot.ZP.warning(`${Ye.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Be()):Ae(Me))})}),$t=()=>Jt(void 0,null,function*(){if(pe.length===0){ot.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield Vt(pe),Ne(!0),Ht(pe).some(Ae=>{var Be,Ze;return!((Be=Ae[0])!=null&&Be.name&&((Ze=Ae[1])!=null&&Ze.name))})){_t.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:()=>Jt(void 0,null,function*(){pe.map(Ae=>Jt(void 0,null,function*(){Rt(Ae)}))}),onCancel:()=>{Ne(!1)}});return}pe.map(Ae=>Jt(void 0,null,function*(){Rt(Ae)}))}),ue={name:"file",fileList:pe,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:Me=>{if(pe!=null&&pe.some(Be=>Be.name===Me.name))return ot.ZP.info(`${Me.name}\u6587\u4EF6\u5DF2\u5B58\u5728`),!1;if(Me.size/1024/1024>100)return ot.ZP.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Me.name))return ot.ZP.warning("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;const Ae={name:Me.name,uid:Me.uid,file:Me,percent:0};return pe.push(Ae),Kt.current=[...pe],he([...pe]),!1}},ge=Ht(pe);return console.log(pe,ge,"fileList"),ut.createElement(_t.default,{open:ne,wrapClassName:ve,onOk:$t,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:ye},onCancel:Lt,width:730,title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},ut.createElement("div",{className:Tt.wrap},pe.length?ut.createElement("div",null,ut.createElement(Bt.Z,{justify:"space-between",align:"middle",style:{marginBottom:40}},ut.createElement("div",{style:{visibility:be?"visible":"hidden"}},ut.createElement("span",{className:Tt.greyText},"\u7528\u4F8B\u7C7B\u578B"),ut.createElement(vt.ZP.Group,{className:`ml20 ${Tt.testCaseRadio}`,optionType:"button",value:xe,onChange:Me=>re(Me.target.value)},ut.createElement(vt.ZP,{value:!1},"\u6587\u672C"),ut.createElement(vt.ZP,{value:!0},"\u6587\u4EF6"))),ut.createElement(Re.default,Gt({},ue),ut.createElement(gt.ZP,{type:"primary",className:Tt.btnS},ut.createElement("i",{className:"iconfont icon-shangchuan2"}),"\u4E0A\u4F20\u6587\u4EF6"))),ut.createElement(se,{data:ge,onRemove:It})):ut.createElement("div",{className:`${Tt.noData} mb30`},ut.createElement(Re.default.Dragger,Wt(Gt({},ue),{className:Tt.dragger}),ut.createElement("img",{src:mt,alt:"",className:"mb20"}),ut.createElement("div",null,ut.createElement("span",null,"\u62D6\u62FD\u6587\u4EF6\u6216"),ut.createElement("span",{className:Tt.uploadText},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))),ut.createElement("div",{className:Tt.text},ut.createElement("span",{style:{color:"#FA6400"}},"\u63D0\u793A"),ut.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",ut.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",ut.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",ut.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",ut.createElement("br",null))))},se=({data:Pe=[],onRemove:Yt,width:ne="auto",showScore:ve=!1,disabled:Se=!1,inputChange:be,onEvaluatingChange:fe,onSelectAll:pe,checkAll1:he,checkAll2:Ce,checkAll3:de,checkAll4:ye,checkAll5:Ne,showEvaluatingSetting:xe=!1,className:re="",isProgramHomework:Kt=!1})=>{const wt={value:"",filename:"",dataUrl:""},[Lt,Xt]=(0,ae.useState)(Gt({},wt)),ee=Vt=>{let $t=document.createElement("a");document.body.appendChild($t);let ue=URL.createObjectURL(Vt.file);$t.href=ue,$t.download=Vt.name,$t.click(),URL.revokeObjectURL(ue),document.body.removeChild($t)},It=(Vt,$t)=>{(0,it.LR)(Vt,$t)},Rt=(Vt,$t)=>{_t.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ut.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:()=>{Yt(Vt,$t)},onCancel:()=>{}})};return Pe.length?ut.createElement("div",{className:re,style:{width:ne}},ut.createElement("div",{className:`${Kt?Tt.headProgram:Tt.head}`},xe&&ut.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:he,onChange:Vt=>{pe(Vt.target.checked,"hidden")}}),ut.createElement(bt.Z,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},ut.createElement("span",{style:{marginLeft:"8px"}},"\u9690\u85CF"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ut.createElement("div",{style:{width:Kt?"25%":"15%"}},"\u7528\u4F8B"),ut.createElement("div",{style:{width:ve?Kt?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u5165"),ut.createElement("div",{style:{width:ve?Kt?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u51FA"),ve&&ut.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),xe&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:ye,onChange:Vt=>{pe(Vt.target.checked,"input_visible")}}),ut.createElement(bt.Z,{title:"\u52FE\u9009\u540E\uFF0C\u8F93\u5165\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ut.createElement("span",{style:{marginLeft:"8px"}},"\u8F93\u5165"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),xe&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:Ce,onChange:Vt=>{pe(Vt.target.checked,"is_invisible")}}),ut.createElement(bt.Z,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ut.createElement("span",{style:{marginLeft:"8px"}},"\u9884\u671F\u8F93\u51FA"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),xe&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:Ne,onChange:Vt=>{pe(Vt.target.checked,"actual_output_visible")}}),ut.createElement(bt.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ut.createElement("span",{style:{marginLeft:"8px"}},"\u5B9E\u9645\u8F93\u51FA"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),xe&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:de,onChange:Vt=>{pe(Vt.target.checked,"last_match_rule")}}),ut.createElement(bt.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},ut.createElement("span",{style:{marginLeft:"8px"}},"\u7279\u6B8A\u5224\u5B9A"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ut.createElement("div",{className:Tt.operation,style:Kt?{flex:1,textAlign:"right"}:{width:"10%"}},"\u64CD\u4F5C")),ut.createElement("div",{className:Tt.listWrapper,style:{boxShadow:Kt?"0px 2px 4px 0px #EAEEF4":"unset"}},Pe.map((Vt,$t)=>{var ue,ge,Me,Ae;return ut.createElement("div",{key:$t,className:Tt.list,style:Kt?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},xe&&ut.createElement("div",{style:{width:"15%"}},ut.createElement(kt.default,{checked:!!Vt.hidden,onChange:Be=>{fe(Be.target.checked,$t,"hidden")}})),ut.createElement("div",{style:{width:Kt?"25%":"15%",paddingLeft:Kt?"5px":"0px",paddingRight:Kt?"5px":"0px"}},"\u6D4B\u8BD5\u7528\u4F8B",$t+1),ut.createElement("div",{className:Tt.info,style:{width:ve?Kt?"20%":"15%":"25%"}},ut.createElement("span",{title:Vt.input||((ue=Vt[0])==null?void 0:ue.name),onClick:()=>Jt(void 0,null,function*(){let Be;Vt.input?Vt.input_file_url?Be=Vt.input_file_url:Be=Vt.in_file:Be=Vt[0];let Ze;typeof Be=="string"?(Ze=yield fetch(Be,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Xt({value:yield Ze.text(),filename:"",dataUrl:Be})):(Ze=yield(0,it.db)(Be.file),Xt({value:Ze.text,filename:Be.name,dataUrl:Ze.link}))})},Vt.input||((ge=Vt[0])==null?void 0:ge.name))),ut.createElement("div",{className:Tt.info,style:{width:ve?Kt?"20%":"15%":"25%"}},ut.createElement("span",{title:Vt.output||((Me=Vt[1])==null?void 0:Me.name),onClick:()=>Jt(void 0,null,function*(){let Be;Vt.input?Vt.output_file_url?Be=Vt.output_file_url:Be=Vt.out_file:Be=Vt[1];let Ze;typeof Be=="string"?(Ze=yield fetch(Be,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Xt({value:yield Ze.text(),filename:"",dataUrl:Be})):(Ze=yield(0,it.db)(Be.file),Xt({value:Ze.text,filename:Be.name,dataUrl:Ze.link}))})},Vt.output||((Ae=Vt[1])==null?void 0:Ae.name))),ve&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(St.default,{size:"large",addonAfter:Kt?"%":null,disabled:Se,style:{width:"80%"},onChange:Be=>be(Be,$t),value:Vt.score}),!Kt&&ut.createElement("span",null,"\xA0%")),xe&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(kt.default,{checked:Vt.input_visible||!1,onChange:Be=>{fe(Be.target.checked,$t,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),xe&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(kt.default,{checked:Vt.is_invisible||!1,onChange:Be=>{fe(Be.target.checked,$t,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),xe&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(kt.default,{checked:Vt.actual_output_visible||!1,onChange:Be=>{fe(Be.target.checked,$t,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),xe&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(kt.default,{checked:Vt.last_match_rule||!1,onChange:Be=>{fe(Be.target.checked,$t,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),ut.createElement("div",{onClick:()=>Rt(Vt,$t),style:Kt?{flex:1,textAlign:"right",paddingLeft:"5px",paddingRight:"5px"}:{width:"10%",textAlign:"center"}},ut.createElement("span",{className:Tt.del},"\u5220\u9664")))})),ut.createElement(lt.Z,{close:!0,data:Lt.dataUrl,filename:Lt.filename,type:Lt.dataUrl.length?"txt":"",onClose:()=>Xt(Gt({},wt)),monacoEditor:{value:Lt.value,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):ut.createElement(ut.Fragment,null)};var ce=oe},34269:function(dn,fn,le){"use strict";le.d(fn,{c:function(){return Re}});var ae=(ot=>(ot.FirstPage="firstPage",ot.PrevPage="prevPage",ot.NextPage="nextPage",ot))(ae||{}),Re=(ot=>(ot[ot.Single=0]="Single",ot[ot.Multiple=1]="Multiple",ot[ot.Judge=2]="Judge",ot[ot.Fill=3]="Fill",ot[ot.Subjective=4]="Subjective",ot[ot.Shixun=5]="Shixun",ot[ot.Program=6]="Program",ot[ot.Combine=7]="Combine",ot))(Re||{})},81428:function(dn,fn,le){"use strict";le.d(fn,{AL:function(){return dt},Iy:function(){return Tt},Qv:function(){return ft},ez:function(){return ut},jb:function(){return mt}});var ae=le(32834),Re=le.n(ae),ot=le(11690),_t=le.n(ot);let Bt=1;function vt(Nt,jt){const Gt=Nt.match(/^(\s+)(?:```)/);if(Gt===null)return jt;const Wt=Gt[1];return jt.split(`
|
|
`).map(Jt=>{const Ut=Jt.match(/^\s+/);if(Ut===null)return Jt;const[Ht]=Ut;return Ht.length>=Wt.length?Jt.slice(Wt.length):Jt}).join(`
|
|
`)}let gt=[],kt=["<ul>"];const bt=new(Re()).Renderer,St=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Tt(){gt.length=0,kt=["<ul>"]}const mt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function xt(Nt,jt,Gt,Wt){if(jt>=Nt.length||Nt[jt].level<=Gt)return jt;var Jt=Nt[jt];Wt.push("<li><a href='#"+Bt+Jt.anchor+"'>"+Jt.text+"</a>"),jt++;var Ut=[];return jt=xt(Nt,jt,Jt.level,Ut),Ut.length>0&&(Wt.push("<ul>"),Ut.forEach(function(Ht){Wt.push(Ht)}),Wt.push("</ul>")),Wt.push("</li>"),jt=xt(Nt,jt,Gt,Wt),jt}function ft(){return xt(gt,0,0,kt),kt.push("</ul>"),kt.join("")}const z={heading(Nt){const jt=St.exec(Nt);if(Bt+=1,jt)return{type:"heading",raw:jt[0],depth:jt[1].length,text:jt[2]}},fences(Nt){const jt=this.rules.block.fences.exec(Nt);if(jt){const Gt=jt[0];let Wt=vt(Gt,jt[3]||"");const Jt=jt[2]?jt[2].trim():jt[2];if(["latex","katex","math"].indexOf(Jt)>=0){const Ut=it(),Ht=Wt;Wt=Ut,lt[Ut]={type:"block",expression:Ht}}return{type:"code",raw:Gt,lang:Jt,text:Wt}}}},tt=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let at=0;const it=()=>`__special_katext_id_${at++}__`;let lt={};function ut(){return lt}function dt(){at=0,lt={}}function Pt(Nt){return Nt=Nt.replace(tt,(jt,Gt)=>{const Wt=it();return lt[Wt]={type:"inline",expression:Gt},Wt}),Nt}const At=bt.listitem;bt.listitem=function(Nt){return At(Pt(Nt))};const Dt=bt.paragraph;bt.paragraph=function(Nt){return Dt(Pt(Nt))};const Ft=bt.tablecell;bt.tablecell=function(Nt,jt){return Ft(Pt(Nt),jt)},bt.code=function(Nt,jt,Gt){const Wt=(jt||"").match(/\S*/)[0];return Wt?["latex","katex","math"].indexOf(Wt)>=0?`<p class='editormd-tex'>${Nt}</p>`:`<pre class="prettyprint linenums"><code class="language-${jt}">${Gt?Nt:(0,ot.escape)(Nt,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(Gt?Nt:(0,ot.escape)(Nt,!0))+"</code></pre>"},bt.heading=function(Nt,jt,Gt){let Wt=this.options.headerPrefix+Gt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return gt.push({anchor:Wt,level:jt,text:Nt}),"<h"+jt+' id="'+Bt+Wt+'">'+Nt+"</h"+jt+">"},Re().setOptions({silent:!0,gfm:!0,pedantic:!1}),Re().use({tokenizer:z,renderer:bt}),fn.ZP=Re()},23992:function(dn,fn,le){"use strict";le.d(fn,{G:function(){return Bt},t:function(){return _t}});var ae=le(7062),Re=le.n(ae);const ot=null;function _t(vt,gt){let kt=Re().get("__ec");kt||(kt={}),kt[vt]=gt,Re().set("__ec",kt)}function Bt(vt,gt){let kt=Re().get("__ec");return kt?kt[vt]===void 0?gt:kt[vt]:gt}},47257:function(dn){(function(fn){(function(le){if(1)dn.exports=le();else var ae})(function(){var le,ae,Re;return function(){function ot(_t,Bt,vt){function gt(St,Tt){if(!Bt[St]){if(!_t[St]){var mt=void 0;if(!Tt&&mt)return require(St,!0);if(kt)return kt(St,!0);var xt=new Error("Cannot find module '"+St+"'");throw xt.code="MODULE_NOT_FOUND",xt}var ft=Bt[St]={exports:{}};_t[St][0].call(ft.exports,function(z){var tt=_t[St][1][z];return gt(tt||z)},ft,ft.exports,ot,_t,Bt,vt)}return Bt[St].exports}for(var kt=void 0,bt=0;bt<vt.length;bt++)gt(vt[bt]);return gt}return ot}()({1:[function(ot,_t,Bt){"use strict";var vt=ot("./browser/client");vt.Buffer=ot("buffer").Buffer,vt.urllib=ot("../shims/xhr"),vt.version=ot("./browser/version").version,_t.exports=vt},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.slice.js");var bt=ot("assert"),St=ot("../common/utils/checkBucketName"),Tt=St.checkBucketName,mt=Bt;function xt(z){return Array.isArray?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"}function ft(z){return z?xt(z)?z:[z]:[]}mt.useBucket=function(tt){return Tt(tt),this.options.bucket=tt,this},mt.setBucket=function(tt){return Tt(tt),this.options.bucket=tt,this},mt.getBucket=function(){return this.options.bucket},mt.deleteBucket=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt;return gt.default.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return ut=this._bucketRequestParams("DELETE",it,"",lt),At.next=3,this.request(ut);case 3:if(dt=At.sent,!(dt.status===200||dt.status===204)){At.next=6;break}return At.abrupt("return",{res:dt.res});case 6:return At.next=8,this.requestError(dt);case 8:throw At.sent;case 9:case"end":return At.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.putBucketACL=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt,ut){var dt,Pt;return gt.default.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return dt=this._bucketRequestParams("PUT",it,"acl",ut),dt.headers={"x-oss-acl":lt},dt.successStatuses=[200],Dt.next=5,this.request(dt);case 5:return Pt=Dt.sent,Dt.abrupt("return",{bucket:Pt.headers.location&&Pt.headers.location.substring(1)||null,res:Pt.res});case 7:case"end":return Dt.stop()}},at,this)}));function tt(at,it,lt){return z.apply(this,arguments)}return tt}(),mt.getBucketACL=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt;return gt.default.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return ut=this._bucketRequestParams("GET",it,"acl",lt),ut.successStatuses=[200],ut.xmlResponse=!0,At.next=5,this.request(ut);case 5:return dt=At.sent,At.abrupt("return",{acl:dt.data.AccessControlList.Grant,owner:{id:dt.data.Owner.ID,displayName:dt.data.Owner.DisplayName},res:dt.res});case 7:case"end":return At.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.putBucketLogging=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt,ut){var dt,Pt,At;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return dt=this._bucketRequestParams("PUT",it,"logging",ut),Pt=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<BucketLoggingStatus>
|
|
<LoggingEnabled>
|
|
<TargetBucket>`.concat(it,`</TargetBucket>
|
|
`),lt&&(Pt+="<TargetPrefix>".concat(lt,`</TargetPrefix>
|
|
`)),Pt+=`</LoggingEnabled>
|
|
</BucketLoggingStatus>`,dt.content=Pt,dt.mime="xml",dt.successStatuses=[200],Ft.next=9,this.request(dt);case 9:return At=Ft.sent,Ft.abrupt("return",{res:At.res});case 11:case"end":return Ft.stop()}},at,this)}));function tt(at,it,lt){return z.apply(this,arguments)}return tt}(),mt.getBucketLogging=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt,Pt;return gt.default.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return ut=this._bucketRequestParams("GET",it,"logging",lt),ut.successStatuses=[200],ut.xmlResponse=!0,Dt.next=5,this.request(ut);case 5:return dt=Dt.sent,Pt=dt.data.LoggingEnabled,Dt.abrupt("return",{enable:!!Pt,prefix:Pt&&Pt.TargetPrefix||null,res:dt.res});case 8:case"end":return Dt.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.deleteBucketLogging=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt;return gt.default.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return ut=this._bucketRequestParams("DELETE",it,"logging",lt),ut.successStatuses=[204,200],At.next=4,this.request(ut);case 4:return dt=At.sent,At.abrupt("return",{res:dt.res});case 6:case"end":return At.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.putBucketCORS=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt,ut){var dt,Pt,At,Dt,Ft,Nt,jt,Gt,Wt,Jt;return gt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:for(lt=lt||[],bt(lt.length,"rules is required"),lt.forEach(function(oe){bt(oe.allowedOrigin,"allowedOrigin is required"),bt(oe.allowedMethod,"allowedMethod is required")}),dt=this._bucketRequestParams("PUT",it,"cors",ut),Pt=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CORSConfiguration>`,At=function(se){Pt+="<AllowedOrigin>".concat(se,"</AllowedOrigin>")},Dt=function(se){Pt+="<AllowedMethod>".concat(se,"</AllowedMethod>")},Ft=function(se){Pt+="<AllowedHeader>".concat(se,"</AllowedHeader>")},Nt=function(se){Pt+="<ExposeHeader>".concat(se,"</ExposeHeader>")},jt=0,Gt=lt.length;jt<Gt;jt++)Wt=lt[jt],Pt+="<CORSRule>",ft(Wt.allowedOrigin).forEach(At),ft(Wt.allowedMethod).forEach(Dt),ft(Wt.allowedHeader).forEach(Ft),ft(Wt.exposeHeader).forEach(Nt),Wt.maxAgeSeconds&&(Pt+="<MaxAgeSeconds>".concat(Wt.maxAgeSeconds,"</MaxAgeSeconds>")),Pt+="</CORSRule>";return Pt+="</CORSConfiguration>",dt.content=Pt,dt.mime="xml",dt.successStatuses=[200],Ht.next=16,this.request(dt);case 16:return Jt=Ht.sent,Ht.abrupt("return",{res:Jt.res});case 18:case"end":return Ht.stop()}},at,this)}));function tt(at,it,lt){return z.apply(this,arguments)}return tt}(),mt.getBucketCORS=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt,Pt,At;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return ut=this._bucketRequestParams("GET",it,"cors",lt),ut.successStatuses=[200],ut.xmlResponse=!0,Ft.next=5,this.request(ut);case 5:return dt=Ft.sent,Pt=[],dt.data&&dt.data.CORSRule&&(At=dt.data.CORSRule,xt(At)||(At=[At]),At.forEach(function(Nt){var jt={};Object.keys(Nt).forEach(function(Gt){jt[Gt.slice(0,1).toLowerCase()+Gt.slice(1,Gt.length)]=Nt[Gt]}),Pt.push(jt)})),Ft.abrupt("return",{rules:Pt,res:dt.res});case 9:case"end":return Ft.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.deleteBucketCORS=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt;return gt.default.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return ut=this._bucketRequestParams("DELETE",it,"cors",lt),ut.successStatuses=[204],At.next=4,this.request(ut);case 4:return dt=At.sent,At.abrupt("return",{res:dt.res});case 6:case"end":return At.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.putBucketReferer=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt,ut,dt){var Pt,At,Dt,Ft;return gt.default.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(Pt=this._bucketRequestParams("PUT",it,"referer",dt),At=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<RefererConfiguration>
|
|
`,At+=" <AllowEmptyReferer>".concat(lt?"true":"false",`</AllowEmptyReferer>
|
|
`),ut&&ut.length>0){for(At+=` <RefererList>
|
|
`,Dt=0;Dt<ut.length;Dt++)At+=" <Referer>".concat(ut[Dt],`</Referer>
|
|
`);At+=` </RefererList>
|
|
`}else At+=` <RefererList />
|
|
`;return At+="</RefererConfiguration>",Pt.content=At,Pt.mime="xml",Pt.successStatuses=[200],jt.next=10,this.request(Pt);case 10:return Ft=jt.sent,jt.abrupt("return",{res:Ft.res});case 12:case"end":return jt.stop()}},at,this)}));function tt(at,it,lt,ut){return z.apply(this,arguments)}return tt}(),mt.getBucketReferer=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt,Pt;return gt.default.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return ut=this._bucketRequestParams("GET",it,"referer",lt),ut.successStatuses=[200],ut.xmlResponse=!0,Dt.next=5,this.request(ut);case 5:return dt=Dt.sent,Pt=dt.data.RefererList.Referer||null,Pt&&(xt(Pt)||(Pt=[Pt])),Dt.abrupt("return",{allowEmpty:dt.data.AllowEmptyReferer==="true",referers:Pt,res:dt.res});case 9:case"end":return Dt.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.deleteBucketReferer=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){return gt.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return dt.next=2,this.putBucketReferer(it,!0,null,lt);case 2:return dt.abrupt("return",dt.sent);case 3:case"end":return dt.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt._bucketRequestParams=function(tt,at,it,lt){return{method:tt,bucket:at,subres:it,timeout:lt&<.timeout,ctx:lt&<.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(ot,_t,Bt){(function(vt,gt){(function(){"use strict";var kt=ot("@babel/runtime/helpers/interopRequireDefault"),bt=kt(ot("@babel/runtime/regenerator")),St=kt(ot("@babel/runtime/helpers/asyncToGenerator"));ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.split.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.symbol.js"),ot("core-js/modules/es.symbol.description.js"),ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.regexp.to-string.js");var Tt=ot("debug")("ali-oss"),mt=ot("xml2js"),xt=ot("agentkeepalive"),ft=ot("merge-descriptors"),z=ot("platform"),tt=ot("utility"),at=ot("urllib"),it=ot("./version"),lt=ot("bowser"),ut=ot("../common/signUtils"),dt=ot("../common/client/initOptions"),Pt=ot("../common/utils/createRequest"),At=Pt.createRequest,Dt=ot("../common/utils/encoder"),Ft=Dt.encoder,Nt=ot("../common/client/getReqUrl"),jt=Nt.getReqUrl,Gt=ot("../common/utils/setSTSToken"),Wt=Gt.setSTSToken,Jt=ot("../common/utils/retry"),Ut=Jt.retry,Ht=ot("../common/utils/isFunction"),oe=Ht.isFunction,se=new xt;function ce(){var be=z.name,fe=z.version;be&&be.toLowerCase&&be.toLowerCase()==="ie"&&fe.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function Pe(){return location&&location.protocol==="https:"}function Yt(be,fe){if(ce(),!(this instanceof Yt))return new Yt(be,fe);be&&be.inited?this.options=be:this.options=Yt.initOptions(be),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=at,this.agent=this.options.agent||se),this.ctx=fe,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}_t.exports=Yt,Yt.initOptions=function(fe){fe.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var pe=Object.assign({secure:Pe(),useFetch:!1},fe);return dt(pe)};var ne=Yt.prototype;ne.debug=Tt,ft(ne,ot("./object")),ft(ne,ot("./bucket")),ft(ne,ot("../common/bucket/getBucketWebsite")),ft(ne,ot("../common/bucket/putBucketWebsite")),ft(ne,ot("../common/bucket/deleteBucketWebsite")),ft(ne,ot("../common/bucket/getBucketLifecycle")),ft(ne,ot("../common/bucket/putBucketLifecycle")),ft(ne,ot("../common/bucket/deleteBucketLifecycle")),ft(ne,ot("../common/bucket/putBucketVersioning")),ft(ne,ot("../common/bucket/getBucketVersioning")),ft(ne,ot("../common/bucket/getBucketInventory")),ft(ne,ot("../common/bucket/deleteBucketInventory")),ft(ne,ot("../common/bucket/listBucketInventory")),ft(ne,ot("../common/bucket/putBucketInventory")),ft(ne,ot("../common/bucket/abortBucketWorm")),ft(ne,ot("../common/bucket/completeBucketWorm")),ft(ne,ot("../common/bucket/extendBucketWorm")),ft(ne,ot("../common/bucket/getBucketWorm")),ft(ne,ot("../common/bucket/initiateBucketWorm")),ft(ne,ot("./managed-upload")),ft(ne,ot("../common/multipart-copy")),ft(ne,ot("../common/multipart")),ft(ne,ot("../common/parallel")),ne.signature=function(fe){return this.debug("authorization stringToSign: %s",fe,"info"),ut.computeSignature(this.options.accessKeySecret,fe,this.options.headerEncoding)},ne._getReqUrl=jt,ne.authorization=function(fe,pe,he,Ce){var de=ut.buildCanonicalString(fe.toUpperCase(),pe,{headers:Ce,parameters:he});return ut.authorization(this.options.accessKeyId,this.options.accessKeySecret,de,this.options.headerEncoding)},ne.request=function(){var be=(0,St.default)(bt.default.mark(function fe(pe){var he=this;return bt.default.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:if(!this.options.retryMax){de.next=6;break}return de.next=3,Ut(ve.bind(this),this.options.retryMax,{errorHandler:function(Ne){var xe=function(Kt){if(pe.stream)return!1;var wt=[-1,-2].includes(Kt.status),Lt=he.options.requestErrorRetryHandle||function(){return!0};return wt&&Lt(Kt)};return!!xe(Ne)}})(pe);case 3:return de.abrupt("return",de.sent);case 6:return de.abrupt("return",ve.call(this,pe));case 7:case"end":return de.stop()}},fe,this)}));return function(fe){return be.apply(this,arguments)}}();function ve(be){return Se.apply(this,arguments)}function Se(){return Se=(0,St.default)(bt.default.mark(function be(fe){var pe,he,Ce,de,ye,Ne;return bt.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(!(this.options.stsToken&&oe(this.options.refreshSTSToken))){re.next=3;break}return re.next=3,Wt.call(this);case 3:return pe=At.call(this,fe),this.options.useFetch||(pe.params.mode="disable-fetch"),de=!!fe.stream,re.prev=6,re.next=9,this.urllib.request(pe.url,pe.params);case 9:he=re.sent,this.debug("response %s %s, got %s, headers: %j",fe.method,pe.url,he.status,he.headers,"info"),re.next=16;break;case 13:re.prev=13,re.t0=re.catch(6),Ce=re.t0;case 16:if(!(he&&fe.successStatuses&&fe.successStatuses.indexOf(he.status)===-1)){re.next=28;break}return re.next=19,this.requestError(he);case 19:if(ye=re.sent,!(ye.code==="RequestTimeTooSkewed"&&!de)){re.next=25;break}return this.options.amendTimeSkewed=+new Date(ye.serverTime)-new Date,re.next=24,this.request(fe);case 24:return re.abrupt("return",re.sent);case 25:ye.params=fe,re.next=32;break;case 28:if(!Ce){re.next=32;break}return re.next=31,this.requestError(Ce);case 31:ye=re.sent;case 32:if(!ye){re.next=34;break}throw ye;case 34:if(!fe.xmlResponse){re.next=39;break}return re.next=37,this.parseXML(he.data);case 37:Ne=re.sent,he.data=Ne;case 39:return re.abrupt("return",he);case 40:case"end":return re.stop()}},be,this,[[6,13]])})),Se.apply(this,arguments)}ne._getResource=function(fe){var pe="/";return fe.bucket&&(pe+="".concat(fe.bucket,"/")),fe.object&&(pe+=Ft(fe.object,this.options.headerEncoding)),pe},ne._escape=function(fe){return tt.encodeURIComponent(fe).replace(/%2F/g,"/")},ne._getUserAgent=function(){var fe=gt&>.browser?"js":"nodejs",pe="aliyun-sdk-".concat(fe,"/").concat(it.version),he=z.description;return!he&>&&(he="Node.js ".concat(gt.version.slice(1)," on ").concat(gt.platform," ").concat(gt.arch)),this._checkUserAgent("".concat(pe," ").concat(he))},ne._checkUserAgent=function(fe){var pe=fe.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return pe},ne.checkBrowserAndVersion=function(fe,pe){return lt.name===fe&<.version.split(".")[0]===pe},ne.parseXML=function(fe){return new Promise(function(pe,he){vt.isBuffer(fe)&&(fe=fe.toString()),mt.parseString(fe,{explicitRoot:!1,explicitArray:!1},function(Ce,de){Ce?he(Ce):pe(de)})})},ne.requestError=function(){var be=(0,St.default)(bt.default.mark(function pe(he){var Ce,de,ye,Ne;return bt.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(Ce=null,!(!he.data||!he.data.length)){re.next=5;break}he.status===-1||he.status===-2?(Ce=new Error(he.message),Ce.name=he.name,Ce.status=he.status,Ce.code=he.name):(he.status===404?(Ce=new Error("Object not exists"),Ce.name="NoSuchKeyError",Ce.status=404,Ce.code="NoSuchKey"):he.status===412?(Ce=new Error("Pre condition failed"),Ce.name="PreconditionFailedError",Ce.status=412,Ce.code="PreconditionFailed"):(Ce=new Error("Unknow error, status: ".concat(he.status)),Ce.name="UnknownError",Ce.status=he.status),Ce.requestId=he.headers["x-oss-request-id"],Ce.host=""),re.next=32;break;case 5:return de=String(he.data),this.debug("request response error data: %s",de,"error"),re.prev=7,re.next=10,this.parseXML(de);case 10:if(re.t0=re.sent,re.t0){re.next=13;break}re.t0={};case 13:ye=re.t0,re.next=23;break;case 16:return re.prev=16,re.t1=re.catch(7),this.debug(de,"error"),re.t1.message+=`
|
|
raw xml: `.concat(de),re.t1.status=he.status,re.t1.requestId=he.headers["x-oss-request-id"],re.abrupt("return",re.t1);case 23:Ne=ye.Message||"unknow request error, status: ".concat(he.status),ye.Condition&&(Ne+=" (condition: ".concat(ye.Condition,")")),Ce=new Error(Ne),Ce.name=ye.Code?"".concat(ye.Code,"Error"):"UnknownError",Ce.status=he.status,Ce.code=ye.Code,Ce.requestId=ye.RequestId,Ce.hostId=ye.HostId,Ce.serverTime=ye.ServerTime;case 32:return this.debug("generate error %j",Ce,"error"),re.abrupt("return",Ce);case 34:case"end":return re.stop()}},pe,this,[[7,16]])}));function fe(pe){return be.apply(this,arguments)}return fe}()}).call(this)}).call(this,{isBuffer:ot("../../node_modules/is-buffer/index.js")},ot("_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(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=ot("@babel/runtime/helpers/interopRequireDefault"),kt=gt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.array.from.js"),ot("core-js/modules/es.string.iterator.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.array.filter.js"),ot("core-js/modules/es.array.find.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.array.iterator.js"),ot("core-js/modules/es.array-buffer.slice.js"),ot("core-js/modules/es.typed-array.uint8-array.js"),ot("core-js/modules/es.typed-array.copy-within.js"),ot("core-js/modules/es.typed-array.every.js"),ot("core-js/modules/es.typed-array.fill.js"),ot("core-js/modules/es.typed-array.filter.js"),ot("core-js/modules/es.typed-array.find.js"),ot("core-js/modules/es.typed-array.find-index.js"),ot("core-js/modules/es.typed-array.for-each.js"),ot("core-js/modules/es.typed-array.includes.js"),ot("core-js/modules/es.typed-array.index-of.js"),ot("core-js/modules/es.typed-array.iterator.js"),ot("core-js/modules/es.typed-array.join.js"),ot("core-js/modules/es.typed-array.last-index-of.js"),ot("core-js/modules/es.typed-array.map.js"),ot("core-js/modules/es.typed-array.reduce.js"),ot("core-js/modules/es.typed-array.reduce-right.js"),ot("core-js/modules/es.typed-array.reverse.js"),ot("core-js/modules/es.typed-array.set.js"),ot("core-js/modules/es.typed-array.slice.js"),ot("core-js/modules/es.typed-array.some.js"),ot("core-js/modules/es.typed-array.sort.js"),ot("core-js/modules/es.typed-array.subarray.js"),ot("core-js/modules/es.typed-array.to-locale-string.js"),ot("core-js/modules/es.typed-array.to-string.js");var bt=gt(ot("@babel/runtime/helpers/asyncToGenerator")),St=ot("util"),Tt=ot("path"),mt=ot("mime"),xt=ot("copy-to"),ft=ot("../common/utils/isBlob"),z=ft.isBlob,tt=ot("../common/utils/isFile"),at=tt.isFile,it=ot("../common/utils/isBuffer"),lt=it.isBuffer,ut=Bt;ut.multipartUpload=function(){var Ft=(0,bt.default)(kt.default.mark(function jt(Gt,Wt){var Jt,Ut,Ht,oe,se,ce,Pe,Yt,ne,ve=arguments;return kt.default.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:if(Jt=ve.length>2&&ve[2]!==void 0?ve[2]:{},this.resetCancelFlag(),Jt.disabledMD5=Jt.disabledMD5===void 0?!0:!!Jt.disabledMD5,!(Jt.checkpoint&&Jt.checkpoint.uploadId)){be.next=8;break}return Wt&&at(Wt)&&(Jt.checkpoint.file=Wt),be.next=7,this._resumeMultipart(Jt.checkpoint,Jt);case 7:return be.abrupt("return",be.sent);case 8:return Ut=102400,Jt.mime||(at(Wt)?Jt.mime=mt.getType(Tt.extname(Wt.name)):z(Wt)?Jt.mime=Wt.type:lt(Wt)?Jt.mime="":Jt.mime=mt.getType(Tt.extname(Wt))),Jt.headers=Jt.headers||{},this._convertMetaToHeaders(Jt.meta,Jt.headers),be.next=14,this._getFileSize(Wt);case 14:if(Ht=be.sent,!(Ht<Ut)){be.next=26;break}return Jt.contentLength=Ht,be.next=19,this.put(Gt,Wt,Jt);case 19:if(oe=be.sent,!(Jt&&Jt.progress)){be.next=23;break}return be.next=23,Jt.progress(1);case 23:return se={res:oe.res,bucket:this.options.bucket,name:Gt,etag:oe.res.headers.etag},(Jt.headers&&Jt.headers["x-oss-callback"]||Jt.callback)&&(se.data=oe.data),be.abrupt("return",se);case 26:if(!(Jt.partSize&&parseInt(Jt.partSize,10)!==Jt.partSize)){be.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Jt.partSize&&Jt.partSize<Ut)){be.next=30;break}throw new Error("partSize must not be smaller than ".concat(Ut));case 30:return be.next=32,this.initMultipartUpload(Gt,Jt);case 32:if(ce=be.sent,Pe=ce.uploadId,Yt=this._getPartSize(Ht,Jt.partSize),ne={file:Wt,name:Gt,fileSize:Ht,partSize:Yt,uploadId:Pe,doneParts:[]},!(Jt&&Jt.progress)){be.next=39;break}return be.next=39,Jt.progress(0,ne,ce.res);case 39:return be.next=41,this._resumeMultipart(ne,Jt);case 41:return be.abrupt("return",be.sent);case 42:case"end":return be.stop()}},jt,this)}));function Nt(jt,Gt){return Ft.apply(this,arguments)}return Nt}(),ut._resumeMultipart=function(){var Ft=(0,bt.default)(kt.default.mark(function jt(Gt,Wt){var Jt,Ut,Ht,oe,se,ce,Pe,Yt,ne,ve,Se,be,fe,pe,he,Ce,de,ye,Ne;return kt.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(Jt=this,!this.isCancel()){re.next=3;break}throw this._makeCancelEvent();case 3:return Ut=Gt.file,Ht=Gt.fileSize,oe=Gt.partSize,se=Gt.uploadId,ce=Gt.doneParts,Pe=Gt.name,Yt=[],ce.length>0&&xt(ce).to(Yt),ne=this._divideParts(Ht,oe),ve=ne.length,Se=!1,be=function(wt,Lt){return new Promise(function(){var Xt=(0,bt.default)(kt.default.mark(function ee(It,Rt){var Vt,$t,ue,ge,Me;return kt.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:if(Be.prev=0,wt.isCancel()){Be.next=29;break}return Vt=ne[Lt-1],Be.next=5,wt._createBuffer(Ut,Vt.start,Vt.end);case 5:return $t=Be.sent,ue={content:$t,size:Vt.end-Vt.start},Be.prev=7,Be.next=10,wt._uploadPart(Pe,se,Lt,ue,Wt);case 10:ge=Be.sent,Be.next=18;break;case 13:if(Be.prev=13,Be.t0=Be.catch(7),Be.t0.status!==404){Be.next=17;break}throw wt._makeAbortEvent();case 17:throw Be.t0;case 18:if(!(!wt.isCancel()&&!Se)){Be.next=26;break}if(Gt.doneParts.push({number:Lt,etag:ge.res.headers.etag}),!Wt.progress){Be.next=23;break}return Be.next=23,Wt.progress(ce.length/(ve+1),Gt,ge.res);case 23:It({number:Lt,etag:ge.res.headers.etag}),Be.next=27;break;case 26:It();case 27:Be.next=30;break;case 29:It();case 30:Be.next=41;break;case 32:Be.prev=32,Be.t1=Be.catch(0),Me=new Error,Me.name=Be.t1.name,Me.message=Be.t1.message,Me.stack=Be.t1.stack,Me.partNum=Lt,xt(Be.t1).to(Me),Rt(Me);case 41:case"end":return Be.stop()}},ee,null,[[0,32],[7,13]])}));return function(ee,It){return Xt.apply(this,arguments)}}())},fe=Array.from(new Array(ve),function(Kt,wt){return wt+1}),pe=Yt.map(function(Kt){return Kt.number}),he=fe.filter(function(Kt){return pe.indexOf(Kt)<0}),Ce=5,de=Wt.parallel||Ce,re.next=17,this._parallel(he,de,function(Kt){return new Promise(function(wt,Lt){be(Jt,Kt).then(function(Xt){Xt&&Yt.push(Xt),wt()}).catch(function(Xt){Lt(Xt)})})});case 17:if(ye=re.sent,Se=!0,Ne=ye.find(function(Kt){return Kt.name==="abort"}),!Ne){re.next=22;break}throw Ne;case 22:if(!this.isCancel()){re.next=25;break}throw be=null,this._makeCancelEvent();case 25:if(!(ye&&ye.length>0)){re.next=28;break}throw ye[0].message="Failed to upload some parts with error: ".concat(ye[0].toString()," part_num: ").concat(ye[0].partNum),ye[0];case 28:return re.next=30,this.completeMultipartUpload(Pe,se,Yt,Wt);case 30:return re.abrupt("return",re.sent);case 31:case"end":return re.stop()}},jt,this)}));function Nt(jt,Gt){return Ft.apply(this,arguments)}return Nt}(),ut._getFileSize=function(){var Ft=(0,bt.default)(kt.default.mark(function jt(Gt){return kt.default.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:if(!lt(Gt)){Jt.next=4;break}return Jt.abrupt("return",Gt.length);case 4:if(!(z(Gt)||at(Gt))){Jt.next=6;break}return Jt.abrupt("return",Gt.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return Jt.stop()}},jt)}));function Nt(jt){return Ft.apply(this,arguments)}return Nt}();var dt=ot("stream"),Pt=dt.Readable;function At(Ft,Nt){if(!(this instanceof At))return new At(Ft,Nt);Pt.call(this,Nt),this.file=Ft,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}St.inherits(At,Pt),At.prototype.readFileAndPush=function(Nt){if(this.fileBuffer)for(var jt=!0;jt&&this.fileBuffer&&this.start<this.fileBuffer.length;){var Gt=this.start,Wt=Gt+Nt;Wt=Wt>this.fileBuffer.length?this.fileBuffer.length:Wt,this.start=Wt,jt=this.push(this.fileBuffer.slice(Gt,Wt))}},At.prototype._read=function(Nt){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 jt=16*1024;Nt=Nt||jt;var Gt=this;this.reader.onload=function(Jt){Gt.fileBuffer=vt.from(new Uint8Array(Jt.target.result)),Gt.file=null,Gt.readFileAndPush(Nt)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(Nt)};function Dt(Ft){return Ft.arrayBuffer?Ft.arrayBuffer():new Promise(function(Nt,jt){var Gt=new FileReader;Gt.onload=function(Wt){Nt(Wt.target.result)},Gt.onerror=function(Wt){jt(Wt)},Gt.readAsArrayBuffer(Ft)})}ut._createBuffer=function(){var Ft=(0,bt.default)(kt.default.mark(function jt(Gt,Wt,Jt){var Ut,Ht;return kt.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(!(z(Gt)||at(Gt))){se.next=8;break}return Ut=Gt.slice(Wt,Jt),se.next=4,Dt(Ut);case 4:return Ht=se.sent,se.abrupt("return",vt.from(Ht));case 8:if(!lt(Gt)){se.next=12;break}return se.abrupt("return",Gt.subarray(Wt,Jt));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return se.stop()}},jt)}));function Nt(jt,Gt,Wt){return Ft.apply(this,arguments)}return Nt}(),ut._getPartSize=function(Nt,jt){var Gt=1e4,Wt=1*1024*1024;jt||(jt=Wt);var Jt=Math.ceil(Nt/Gt);return jt<Jt&&(jt=Jt,console.warn("partSize has been set to ".concat(jt,", because the partSize you provided causes partNumber to be greater than 10,000"))),jt},ut._divideParts=function(Nt,jt){for(var Gt=Math.ceil(Nt/jt),Wt=[],Jt=0;Jt<Gt;Jt++){var Ut=jt*Jt,Ht=Math.min(Ut+jt,Nt);Wt.push({start:Ut,end:Ht})}return Wt}}).call(this)}).call(this,ot("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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault");ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.number.constructor.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.promise.js");var gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("fs"),St=ot("copy-to"),Tt=ot("path"),mt=ot("mime"),xt=ot("../common/callback"),ft=ot("merge-descriptors"),z=ot("../common/utils/isBlob"),tt=z.isBlob,at=ot("../common/utils/isFile"),it=at.isFile,lt=ot("../common/utils/isBuffer"),ut=lt.isBuffer,dt=ot("../common/utils/obj2xml"),Pt=dt.obj2xml,At=Bt;At.append=function(){var Dt=(0,kt.default)(gt.default.mark(function Nt(jt,Gt,Wt){var Jt;return gt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Wt=Wt||{},Wt.position===void 0&&(Wt.position="0"),Wt.subres={append:"",position:Wt.position},Wt.method="POST",Ht.next=6,this.put(jt,Gt,Wt);case 6:return Jt=Ht.sent,Jt.nextAppendPosition=Jt.res.headers["x-oss-next-append-position"],Ht.abrupt("return",Jt);case 9:case"end":return Ht.stop()}},Nt,this)}));function Ft(Nt,jt,Gt){return Dt.apply(this,arguments)}return Ft}(),At.put=function(){var Dt=(0,kt.default)(gt.default.mark(function Nt(jt,Gt,Wt){var Jt,Ut,Ht,oe,se;return gt.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(Wt=Wt||{},Wt.disabledMD5=Wt.disabledMD5===void 0?!0:!!Wt.disabledMD5,Wt.headers=Wt.headers||{},jt=this._objectName(jt),!ut(Gt)){Pe.next=8;break}Jt=Gt,Pe.next=19;break;case 8:if(!(tt(Gt)||it(Gt))){Pe.next=18;break}return Wt.mime||(it(Gt)?Wt.mime=mt.getType(Tt.extname(Gt.name)):Wt.mime=Gt.type),Pe.next=12,this._createBuffer(Gt,0,Gt.size);case 12:return Jt=Pe.sent,Pe.next=15,this._getFileSize(Gt);case 15:Wt.contentLength=Pe.sent,Pe.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(Wt.meta,Wt.headers),Ut=Wt.method||"PUT",Ht=this._objectRequestParams(Ut,jt,Wt),xt.encodeCallback(Ht,Wt),Ht.mime=Wt.mime,Ht.disabledMD5=Wt.disabledMD5,Ht.content=Jt,Ht.successStatuses=[200],Pe.next=29,this.request(Ht);case 29:return oe=Pe.sent,se={name:jt,url:this._objectUrl(jt),res:oe.res},Ht.headers&&Ht.headers["x-oss-callback"]&&(se.data=JSON.parse(oe.data.toString())),Pe.abrupt("return",se);case 33:case"end":return Pe.stop()}},Nt,this)}));function Ft(Nt,jt,Gt){return Dt.apply(this,arguments)}return Ft}(),At.putStream=function(){var Dt=(0,kt.default)(gt.default.mark(function Nt(jt,Gt,Wt){var Jt,Ut,Ht,oe;return gt.default.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return Wt=Wt||{},Wt.headers=Wt.headers||{},jt=this._objectName(jt),Wt.contentLength?Wt.headers["Content-Length"]=Wt.contentLength:Wt.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(Wt.meta,Wt.headers),Jt=Wt.method||"PUT",Ut=this._objectRequestParams(Jt,jt,Wt),xt.encodeCallback(Ut,Wt),Ut.mime=Wt.mime,Ut.stream=Gt,Ut.successStatuses=[200],ce.next=13,this.request(Ut);case 13:return Ht=ce.sent,oe={name:jt,url:this._objectUrl(jt),res:Ht.res},Ut.headers&&Ut.headers["x-oss-callback"]&&(oe.data=JSON.parse(Ht.data.toString())),ce.abrupt("return",oe);case 17:case"end":return ce.stop()}},Nt,this)}));function Ft(Nt,jt,Gt){return Dt.apply(this,arguments)}return Ft}(),ft(At,ot("../common/object/copyObject")),ft(At,ot("../common/object/getObjectTagging")),ft(At,ot("../common/object/putObjectTagging")),ft(At,ot("../common/object/deleteObjectTagging")),ft(At,ot("../common/image")),ft(At,ot("../common/object/getBucketVersions")),ft(At,ot("../common/object/getACL")),ft(At,ot("../common/object/putACL")),ft(At,ot("../common/object/head")),ft(At,ot("../common/object/delete")),ft(At,ot("../common/object/get")),ft(At,ot("../common/object/putSymlink")),ft(At,ot("../common/object/getSymlink")),ft(At,ot("../common/object/deleteMulti")),ft(At,ot("../common/object/getObjectMeta")),ft(At,ot("../common/object/getObjectUrl")),ft(At,ot("../common/object/generateObjectUrl")),ft(At,ot("../common/object/signatureUrl")),ft(At,ot("../common/object/asyncSignatureUrl")),At.putMeta=function(){var Dt=(0,kt.default)(gt.default.mark(function Nt(jt,Gt,Wt){var Jt;return gt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,this.copy(jt,jt,{meta:Gt||{},timeout:Wt&&Wt.timeout,ctx:Wt&&Wt.ctx});case 2:return Jt=Ht.sent,Ht.abrupt("return",Jt);case 4:case"end":return Ht.stop()}},Nt,this)}));function Ft(Nt,jt,Gt){return Dt.apply(this,arguments)}return Ft}(),At.list=function(){var Dt=(0,kt.default)(gt.default.mark(function Nt(jt,Gt){var Wt,Jt,Ut,Ht,oe;return gt.default.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return Wt=this._objectRequestParams("GET","",Gt),Wt.query=jt,Wt.xmlResponse=!0,Wt.successStatuses=[200],ce.next=6,this.request(Wt);case 6:return Jt=ce.sent,Ut=Jt.data.Contents||[],Ht=this,Ut&&(Array.isArray(Ut)||(Ut=[Ut]),Ut=Ut.map(function(Pe){return{name:Pe.Key,url:Ht._objectUrl(Pe.Key),lastModified:Pe.LastModified,etag:Pe.ETag,type:Pe.Type,size:Number(Pe.Size),storageClass:Pe.StorageClass,owner:{id:Pe.Owner.ID,displayName:Pe.Owner.DisplayName}}})),oe=Jt.data.CommonPrefixes||null,oe&&(Array.isArray(oe)||(oe=[oe]),oe=oe.map(function(Pe){return Pe.Prefix})),ce.abrupt("return",{res:Jt.res,objects:Ut,prefixes:oe,nextMarker:Jt.data.NextMarker||null,isTruncated:Jt.data.IsTruncated==="true"});case 13:case"end":return ce.stop()}},Nt,this)}));function Ft(Nt,jt){return Dt.apply(this,arguments)}return Ft}(),At.listV2=function(){var Dt=(0,kt.default)(gt.default.mark(function Nt(jt){var Gt,Wt,Jt,Ut,Ht,oe,se,ce=arguments;return gt.default.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Gt=ce.length>1&&ce[1]!==void 0?ce[1]:{},Wt=jt["continuation-token"]||jt.continuationToken,Wt&&(Gt.subres=Object.assign({"continuation-token":Wt},Gt.subres)),Jt=this._objectRequestParams("GET","",Gt),Jt.query=Object.assign({"list-type":2},jt),delete Jt.query["continuation-token"],delete Jt.query.continuationToken,Jt.xmlResponse=!0,Jt.successStatuses=[200],Yt.next=11,this.request(Jt);case 11:return Ut=Yt.sent,Ht=Ut.data.Contents||[],oe=this,Ht&&(Array.isArray(Ht)||(Ht=[Ht]),Ht=Ht.map(function(ne){var ve=null;return ne.Owner&&(ve={id:ne.Owner.ID,displayName:ne.Owner.DisplayName}),{name:ne.Key,url:oe._objectUrl(ne.Key),lastModified:ne.LastModified,etag:ne.ETag,type:ne.Type,size:Number(ne.Size),storageClass:ne.StorageClass,owner:ve}})),se=Ut.data.CommonPrefixes||null,se&&(Array.isArray(se)||(se=[se]),se=se.map(function(ne){return ne.Prefix})),Yt.abrupt("return",{res:Ut.res,objects:Ht,prefixes:se,isTruncated:Ut.data.IsTruncated==="true",keyCount:+Ut.data.KeyCount,continuationToken:Ut.data.ContinuationToken||null,nextContinuationToken:Ut.data.NextContinuationToken||null});case 18:case"end":return Yt.stop()}},Nt,this)}));function Ft(Nt){return Dt.apply(this,arguments)}return Ft}(),At.restore=function(){var Dt=(0,kt.default)(gt.default.mark(function Nt(jt){var Gt,Wt,Jt,Ut,Ht=arguments;return gt.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return Gt=Ht.length>1&&Ht[1]!==void 0?Ht[1]:{type:"Archive"},Gt=Gt||{},Gt.subres=Object.assign({restore:""},Gt.subres),Gt.versionId&&(Gt.subres.versionId=Gt.versionId),Wt=this._objectRequestParams("POST",jt,Gt),Gt.type==="ColdArchive"&&(Jt={RestoreRequest:{Days:Gt.Days?Gt.Days:2,JobParameters:{Tier:Gt.JobParameters?Gt.JobParameters:"Standard"}}},Wt.content=Pt(Jt,{headers:!0}),Wt.mime="xml"),Wt.successStatuses=[202],se.next=9,this.request(Wt);case 9:return Ut=se.sent,se.abrupt("return",{res:Ut.res});case 11:case"end":return se.stop()}},Nt,this)}));function Ft(Nt){return Dt.apply(this,arguments)}return Ft}(),At._objectUrl=function(Ft){return this._getReqUrl({bucket:this.options.bucket,object:Ft})},At._objectRequestParams=function(Ft,Nt,jt){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");jt=jt||{},Nt=this._objectName(Nt);var Gt={object:Nt,bucket:this.options.bucket,method:Ft,subres:jt&&jt.subres,timeout:jt&&jt.timeout,ctx:jt&&jt.ctx};return jt.headers&&(Gt.headers={},St(jt.headers).to(Gt.headers)),Gt},At._objectName=function(Ft){return Ft.replace(/^\/+/,"")},At._convertMetaToHeaders=function(Ft,Nt){Ft&&Object.keys(Ft).forEach(function(jt){Nt["x-oss-meta-".concat(jt)]=Ft[jt]})},At._deleteFileSafe=function(Ft){var Nt=this;return new Promise(function(jt){bt.exists(Ft,function(Gt){Gt?bt.unlink(Ft,function(Wt){Wt&&Nt.debug("unlink %j error: %s",Ft,Wt,"error"),jt()}):jt()})})}},{"../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(ot,_t,Bt){"use strict";Bt.version="6.18.1"},{}],7:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.abortBucketWorm=void 0;var bt=ot("../utils/checkBucketName");function St(mt,xt){return Tt.apply(this,arguments)}function Tt(){return Tt=(0,kt.default)(gt.default.mark(function mt(xt,ft){var z,tt;return gt.default.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return bt.checkBucketName(xt),z=this._bucketRequestParams("DELETE",xt,"worm",ft),it.next=4,this.request(z);case 4:return tt=it.sent,it.abrupt("return",{res:tt.res,status:tt.status});case 6:case"end":return it.stop()}},mt,this)})),Tt.apply(this,arguments)}Bt.abortBucketWorm=St},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.completeBucketWorm=void 0;var bt=ot("../utils/checkBucketName");function St(mt,xt,ft){return Tt.apply(this,arguments)}function Tt(){return Tt=(0,kt.default)(gt.default.mark(function mt(xt,ft,z){var tt,at;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return bt.checkBucketName(xt),tt=this._bucketRequestParams("POST",xt,{wormId:ft},z),lt.next=4,this.request(tt);case 4:return at=lt.sent,lt.abrupt("return",{res:at.res,status:at.status});case 6:case"end":return lt.stop()}},mt,this)})),Tt.apply(this,arguments)}Bt.completeBucketWorm=St},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.deleteBucketInventory=void 0;var bt=ot("../utils/checkBucketName");function St(mt,xt){return Tt.apply(this,arguments)}function Tt(){return Tt=(0,kt.default)(gt.default.mark(function mt(xt,ft){var z,tt,at,it,lt=arguments;return gt.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return z=lt.length>2&<[2]!==void 0?lt[2]:{},tt=Object.assign({inventory:"",inventoryId:ft},z.subres),bt.checkBucketName(xt),at=this._bucketRequestParams("DELETE",xt,tt,z),at.successStatuses=[204],dt.next=7,this.request(at);case 7:return it=dt.sent,dt.abrupt("return",{status:it.status,res:it.res});case 9:case"end":return dt.stop()}},mt,this)})),Tt.apply(this,arguments)}Bt.deleteBucketInventory=St},{"../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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.checkBucketName,Tt=Bt;Tt.deleteBucketLifecycle=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt){var at,it;return gt.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return St(z),at=this._bucketRequestParams("DELETE",z,"lifecycle",tt),at.successStatuses=[204],ut.next=5,this.request(at);case 5:return it=ut.sent,ut.abrupt("return",{res:it.res});case 7:case"end":return ut.stop()}},ft,this)}));function xt(ft,z){return mt.apply(this,arguments)}return xt}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.checkBucketName,Tt=Bt;Tt.deleteBucketWebsite=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt){var at,it;return gt.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return St(z),at=this._bucketRequestParams("DELETE",z,"website",tt),at.successStatuses=[204],ut.next=5,this.request(at);case 5:return it=ut.sent,ut.abrupt("return",{res:it.res});case 7:case"end":return ut.stop()}},ft,this)}));function xt(ft,z){return mt.apply(this,arguments)}return xt}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.extendBucketWorm=void 0;var bt=ot("../utils/checkBucketName"),St=ot("../utils/obj2xml");function Tt(xt,ft,z,tt){return mt.apply(this,arguments)}function mt(){return mt=(0,kt.default)(gt.default.mark(function xt(ft,z,tt,at){var it,lt,ut;return gt.default.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return bt.checkBucketName(ft),it=this._bucketRequestParams("POST",ft,{wormExtend:"",wormId:z},at),lt={ExtendWormConfiguration:{RetentionPeriodInDays:tt}},it.mime="xml",it.content=St.obj2xml(lt,{headers:!0}),it.successStatuses=[200],Pt.next=8,this.request(it);case 8:return ut=Pt.sent,Pt.abrupt("return",{res:ut.res,status:ut.status});case 10:case"end":return Pt.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.extendBucketWorm=Tt},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getBucketInventory=void 0;var bt=ot("../utils/checkBucketName"),St=ot("../utils/formatInventoryConfig");function Tt(xt,ft){return mt.apply(this,arguments)}function mt(){return mt=(0,kt.default)(gt.default.mark(function xt(ft,z){var tt,at,it,lt,ut=arguments;return gt.default.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return tt=ut.length>2&&ut[2]!==void 0?ut[2]:{},at=Object.assign({inventory:"",inventoryId:z},tt.subres),bt.checkBucketName(ft),it=this._bucketRequestParams("GET",ft,at,tt),it.successStatuses=[200],it.xmlResponse=!0,Pt.next=8,this.request(it);case 8:return lt=Pt.sent,Pt.abrupt("return",{status:lt.status,res:lt.res,inventory:St.formatInventoryConfig(lt.data)});case 10:case"end":return Pt.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.getBucketInventory=Tt},{"../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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.map.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.checkBucketName,Tt=ot("../utils/isArray"),mt=Tt.isArray,xt=ot("../utils/formatObjKey"),ft=xt.formatObjKey,z=Bt;z.getBucketLifecycle=function(){var tt=(0,kt.default)(gt.default.mark(function it(lt,ut){var dt,Pt,At;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return St(lt),dt=this._bucketRequestParams("GET",lt,"lifecycle",ut),dt.successStatuses=[200],dt.xmlResponse=!0,Ft.next=6,this.request(dt);case 6:return Pt=Ft.sent,At=Pt.data.Rule||null,At&&(mt(At)||(At=[At]),At=At.map(function(Nt){return Nt.ID&&(Nt.id=Nt.ID,delete Nt.ID),Nt.Tag&&!mt(Nt.Tag)&&(Nt.Tag=[Nt.Tag]),ft(Nt,"firstLowerCase")})),Ft.abrupt("return",{rules:At,res:Pt.res});case 10:case"end":return Ft.stop()}},it,this)}));function at(it,lt){return tt.apply(this,arguments)}return at}()},{"../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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.checkBucketName,Tt=Bt;Tt.getBucketVersioning=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt){var at,it,lt;return gt.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return St(z),at=this._bucketRequestParams("GET",z,"versioning",tt),at.xmlResponse=!0,at.successStatuses=[200],dt.next=6,this.request(at);case 6:return it=dt.sent,lt=it.data.Status,dt.abrupt("return",{status:it.status,versionStatus:lt,res:it.res});case 9:case"end":return dt.stop()}},ft,this)}));function xt(ft,z){return mt.apply(this,arguments)}return xt}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.checkBucketName,Tt=ot("../utils/isObject"),mt=Tt.isObject,xt=Bt;xt.getBucketWebsite=function(){var ft=(0,kt.default)(gt.default.mark(function tt(at,it){var lt,ut,dt;return gt.default.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return St(at),lt=this._bucketRequestParams("GET",at,"website",it),lt.successStatuses=[200],lt.xmlResponse=!0,At.next=6,this.request(lt);case 6:return ut=At.sent,dt=[],ut.data.RoutingRules&&ut.data.RoutingRules.RoutingRule&&(mt(ut.data.RoutingRules.RoutingRule)?dt=[ut.data.RoutingRules.RoutingRule]:dt=ut.data.RoutingRules.RoutingRule),At.abrupt("return",{index:ut.data.IndexDocument&&ut.data.IndexDocument.Suffix||"",supportSubDir:ut.data.IndexDocument&&ut.data.IndexDocument.SupportSubDir||"false",type:ut.data.IndexDocument&&ut.data.IndexDocument.Type,routingRules:dt,error:ut.data.ErrorDocument&&ut.data.ErrorDocument.Key||null,res:ut.res});case 10:case"end":return At.stop()}},tt,this)}));function z(tt,at){return ft.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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getBucketWorm=void 0;var bt=ot("../utils/checkBucketName"),St=ot("../utils/dataFix");function Tt(xt,ft){return mt.apply(this,arguments)}function mt(){return mt=(0,kt.default)(gt.default.mark(function xt(ft,z){var tt,at;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return bt.checkBucketName(ft),tt=this._bucketRequestParams("GET",ft,"worm",z),tt.successStatuses=[200],tt.xmlResponse=!0,lt.next=6,this.request(tt);case 6:return at=lt.sent,St.dataFix(at.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),lt.abrupt("return",Object.assign(Object.assign({},at.data),{res:at.res,status:at.status}));case 9:case"end":return lt.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.getBucketWorm=Tt},{"../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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.initiateBucketWorm=void 0;var bt=ot("../utils/obj2xml"),St=ot("../utils/checkBucketName");function Tt(xt,ft,z){return mt.apply(this,arguments)}function mt(){return mt=(0,kt.default)(gt.default.mark(function xt(ft,z,tt){var at,it,lt;return gt.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return St.checkBucketName(ft),at=this._bucketRequestParams("POST",ft,"worm",tt),it={InitiateWormConfiguration:{RetentionPeriodInDays:z}},at.mime="xml",at.content=bt.obj2xml(it,{headers:!0}),at.successStatuses=[200],dt.next=8,this.request(at);case 8:return lt=dt.sent,dt.abrupt("return",{res:lt.res,wormId:lt.res.headers["x-oss-worm-id"],status:lt.status});case 10:case"end":return dt.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.initiateBucketWorm=Tt},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.listBucketInventory=void 0;var bt=ot("../utils/checkBucketName"),St=ot("../utils/formatInventoryConfig");function Tt(xt){return mt.apply(this,arguments)}function mt(){return mt=(0,kt.default)(gt.default.mark(function xt(ft){var z,tt,at,it,lt,ut,dt,Pt,At=arguments;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return z=At.length>1&&At[1]!==void 0?At[1]:{},tt=z.continuationToken,at=Object.assign({inventory:""},tt&&{"continuation-token":tt},z.subres),bt.checkBucketName(ft),it=this._bucketRequestParams("GET",ft,at,z),it.successStatuses=[200],it.xmlResponse=!0,Ft.next=9,this.request(it);case 9:return lt=Ft.sent,ut=lt.data,dt=lt.res,Pt=lt.status,Ft.abrupt("return",{isTruncated:ut.IsTruncated==="true",nextContinuationToken:ut.NextContinuationToken,inventoryList:St.formatInventoryConfig(ut.InventoryConfiguration,!0),status:Pt,res:dt});case 12:case"end":return Ft.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.listBucketInventory=Tt},{"../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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.concat.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.putBucketInventory=void 0;var bt=ot("../utils/checkBucketName"),St=ot("../utils/obj2xml");function Tt(xt,ft){return mt.apply(this,arguments)}function mt(){return mt=(0,kt.default)(gt.default.mark(function xt(ft,z){var tt,at,it,lt,ut,dt,Pt,At,Dt,Ft,Nt,jt=arguments;return gt.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return tt=jt.length>2&&jt[2]!==void 0?jt[2]:{},at=Object.assign({inventory:"",inventoryId:z.id},tt.subres),bt.checkBucketName(ft),it=z.OSSBucketDestination,lt=z.optionalFields,ut=z.includedObjectVersions,dt="acs:oss:::",Pt="acs:ram::".concat(it.accountId,":role/"),At={InventoryConfiguration:{Id:z.id,IsEnabled:z.isEnabled,Filter:{Prefix:z.prefix||""},Destination:{OSSBucketDestination:{Format:it.format,AccountId:it.accountId,RoleArn:"".concat(Pt).concat(it.rolename),Bucket:"".concat(dt).concat(it.bucket),Prefix:it.prefix||"",Encryption:it.encryption||""}},Schedule:{Frequency:z.frequency},IncludedObjectVersions:ut,OptionalFields:{Field:(lt==null?void 0:lt.field)||[]}}},Dt=St.obj2xml(At,{headers:!0,firstUpperCase:!0}),Ft=this._bucketRequestParams("PUT",ft,at,tt),Ft.successStatuses=[200],Ft.mime="xml",Ft.content=Dt,Wt.next=14,this.request(Ft);case 14:return Nt=Wt.sent,Wt.abrupt("return",{status:Nt.status,res:Nt.res});case 16:case"end":return Wt.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.putBucketInventory=Tt},{"../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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.array.includes.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.checkBucketName,Tt=ot("../utils/isArray"),mt=Tt.isArray,xt=ot("../utils/deepCopy"),ft=xt.deepCopy,z=ot("../utils/isObject"),tt=z.isObject,at=ot("../utils/obj2xml"),it=at.obj2xml,lt=ot("../utils/checkObjectTag"),ut=lt.checkObjectTag,dt=ot("../utils/getStrBytesCount"),Pt=dt.getStrBytesCount,At=Bt;At.putBucketLifecycle=function(){var Gt=(0,kt.default)(gt.default.mark(function Jt(Ut,Ht,oe){var se,ce,Pe,Yt,ne;return gt.default.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(St(Ut),mt(Ht)){Se.next=3;break}throw new Error("rules must be Array");case 3:return se=this._bucketRequestParams("PUT",Ut,"lifecycle",oe),ce=[],Pe={LifecycleConfiguration:{Rule:ce}},Ht.forEach(function(be){Dt(be),jt(be),be.id&&(be.ID=be.id,delete be.id),ce.push(be)}),Yt=it(Pe,{headers:!0,firstUpperCase:!0}),se.content=Yt,se.mime="xml",se.successStatuses=[200],Se.next=13,this.request(se);case 13:return ne=Se.sent,Se.abrupt("return",{res:ne.res});case 15:case"end":return Se.stop()}},Jt,this)}));function Wt(Jt,Ut,Ht){return Gt.apply(this,arguments)}return Wt}();function Dt(Gt){Gt.days&&(Gt.expiration={days:Gt.days}),Gt.date&&(Gt.expiration={createdBeforeDate:Gt.date})}function Ft(Gt,Wt){var Jt=Gt.days,Ut=Gt.createdBeforeDate;if(!Jt&&!Ut)throw new Error("".concat(Wt," must includes days or createdBeforeDate"));if(Jt&&!/^[1-9][0-9]*$/.test(Jt))throw new Error("days must be a positive integer");if(Ut&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(Ut))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function Nt(Gt){if(!mt(Gt)&&!tt(Gt))throw new Error("tag must be Object or Array");Gt=tt(Gt)?[Gt]:Gt;var Wt={},Jt=ft(Gt);Jt.forEach(function(Ut){Wt[Ut.key]=Ut.value}),ut(Wt)}function jt(Gt){if(Gt.id&&Pt(Gt.id)>255)throw new Error("ID is composed of 255 bytes at most");if(Gt.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(Gt.status))throw new Error("Status must be Enabled or Disabled");if(Gt.transition){if(!["IA","Archive"].includes(Gt.transition.storageClass))throw new Error("StorageClass must be IA or Archive");Ft(Gt.transition,"Transition")}if(Gt.expiration){if(!Gt.expiration.expiredObjectDeleteMarker)Ft(Gt.expiration,"Expiration");else if(Gt.expiration.days||Gt.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(Gt.abortMultipartUpload&&Ft(Gt.abortMultipartUpload,"AbortMultipartUpload"),!Gt.expiration&&!Gt.abortMultipartUpload&&!Gt.transition&&!Gt.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(Gt.tag){if(Gt.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");Nt(Gt.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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.includes.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.checkBucketName,Tt=ot("../utils/obj2xml"),mt=Tt.obj2xml,xt=Bt;xt.putBucketVersioning=function(){var ft=(0,kt.default)(gt.default.mark(function tt(at,it){var lt,ut,dt,Pt,At=arguments;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(lt=At.length>2&&At[2]!==void 0?At[2]:{},St(at),["Enabled","Suspended"].includes(it)){Ft.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return ut=this._bucketRequestParams("PUT",at,"versioning",lt),dt={VersioningConfiguration:{Status:it}},ut.mime="xml",ut.content=mt(dt,{headers:!0}),Ft.next=10,this.request(ut);case 10:return Pt=Ft.sent,Ft.abrupt("return",{res:Pt.res,status:Pt.status});case 12:case"end":return Ft.stop()}},tt,this)}));function z(tt,at){return ft.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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.checkBucketName,Tt=ot("../utils/obj2xml"),mt=Tt.obj2xml,xt=ot("../utils/isArray"),ft=xt.isArray,z=Bt;z.putBucketWebsite=function(){var tt=(0,kt.default)(gt.default.mark(function it(lt){var ut,dt,Pt,At,Dt,Ft,Nt,jt=arguments;return gt.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:if(ut=jt.length>1&&jt[1]!==void 0?jt[1]:{},dt=jt.length>2?jt[2]:void 0,St(lt),Pt=this._bucketRequestParams("PUT",lt,"website",dt),At={Suffix:ut.index||"index.html"},Dt={IndexDocument:At},Ft={WebsiteConfiguration:Dt},ut.supportSubDir&&(At.SupportSubDir=ut.supportSubDir),ut.type&&(At.Type=ut.type),ut.error&&(Dt.ErrorDocument={Key:ut.error}),ut.routingRules===void 0){Wt.next=14;break}if(ft(ut.routingRules)){Wt.next=13;break}throw new Error("RoutingRules must be Array");case 13:Dt.RoutingRules={RoutingRule:ut.routingRules};case 14:return Ft=mt(Ft),Pt.content=Ft,Pt.mime="xml",Pt.successStatuses=[200],Wt.next=20,this.request(Pt);case 20:return Nt=Wt.sent,Wt.abrupt("return",{res:Nt.res});case 22:case"end":return Wt.stop()}},it,this)}));function at(it){return tt.apply(this,arguments)}return at}()},{"../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(ot,_t,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),Bt.encodeCallback=function(kt,bt){if(kt.headers=kt.headers||{},!Object.prototype.hasOwnProperty.call(kt.headers,"x-oss-callback")&&bt.callback){var St={callbackUrl:encodeURI(bt.callback.url),callbackBody:bt.callback.body};bt.callback.host&&(St.callbackHost=bt.callback.host),bt.callback.contentType&&(St.callbackBodyType=bt.callback.contentType);var Tt=vt.from(JSON.stringify(St)).toString("base64");if(kt.headers["x-oss-callback"]=Tt,bt.callback.customValue){var mt={};Object.keys(bt.callback.customValue).forEach(function(xt){mt["x:".concat(xt)]=bt.callback.customValue[xt].toString()}),kt.headers["x-oss-callback-var"]=vt.from(JSON.stringify(mt)).toString("base64")}}}}).call(this)}).call(this,ot("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(ot,_t,Bt){"use strict";ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js");var vt=function(ft){return ft&&ft.__esModule?ft:{default:ft}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getReqUrl=void 0;var gt=vt(ot("copy-to")),kt=vt(ot("url")),bt=vt(ot("merge-descriptors")),St=vt(ot("is-type-of")),Tt=ot("../utils/isIP"),mt=ot("../utils/checkConfigValid");function xt(ft){var z={},tt=this.options.cname;mt.checkConfigValid(this.options.endpoint,"endpoint"),gt.default(this.options.endpoint,!1).to(z),ft.bucket&&!tt&&!Tt.isIP(z.hostname)&&!this.options.sldEnable&&(z.host="".concat(ft.bucket,".").concat(z.host));var at="/";ft.bucket&&this.options.sldEnable&&(at+="".concat(ft.bucket,"/")),ft.object&&(at+=this._escape(ft.object).replace(/\+/g,"%2B")),z.pathname=at;var it={};if(ft.query&&bt.default(it,ft.query),ft.subres){var lt={};St.default.string(ft.subres)?lt[ft.subres]="":St.default.array(ft.subres)?ft.subres.forEach(function(ut){lt[ut]=""}):lt=ft.subres,bt.default(it,lt)}return z.query=it,kt.default.format(z)}Bt.getReqUrl=xt},{"../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(ot,_t,Bt){"use strict";ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.string.trim.js");var vt=ot("humanize-ms"),gt=ot("url"),kt=ot("../utils/checkBucketName"),bt=kt.checkBucketName,St=ot("../utils/setRegion"),Tt=St.setRegion,mt=ot("../utils/checkConfigValid"),xt=mt.checkConfigValid;function ft(z,tt){xt(z,"endpoint");var at=gt.parse(z);if(at.protocol||(at=gt.parse("http".concat(tt?"s":"","://").concat(z))),at.protocol!=="http:"&&at.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return at}_t.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&&bt(z.bucket);var tt=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(tt.accessKeyId=tt.accessKeyId.trim(),tt.accessKeySecret=tt.accessKeySecret.trim(),tt.timeout&&(tt.timeout=vt(tt.timeout)),tt.endpoint)tt.endpoint=ft(tt.endpoint,tt.secure);else if(tt.region)tt.endpoint=Tt(tt.region,tt.internal,tt.secure);else throw new Error("require options.endpoint or options.region");return tt.inited=!0,tt}},{"../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(ot,_t,Bt){"use strict";var vt=ot("merge-descriptors"),gt=Bt;vt(gt,ot("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.concat.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.checkBucketName,Tt=ot("querystring"),mt=ot("js-base64"),xt=mt.Base64.encode,ft=Bt;ft.processObjectSave=function(){var tt=(0,kt.default)(gt.default.mark(function it(lt,ut,dt,Pt){var At,Dt,Ft,Nt;return gt.default.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return z(lt,"sourceObject"),z(ut,"targetObject"),z(dt,"process"),ut=this._objectName(ut),Pt&&St(Pt),At=this._objectRequestParams("POST",lt,{subres:"x-oss-process"}),Dt=Pt?",b_".concat(xt(Pt)):"",ut=xt(ut),Ft={"x-oss-process":"".concat(dt,"|sys/saveas,o_").concat(ut).concat(Dt)},At.content=Tt.stringify(Ft),Gt.next=12,this.request(At);case 12:return Nt=Gt.sent,Gt.abrupt("return",{res:Nt.res,status:Nt.res.status});case 14:case"end":return Gt.stop()}},it,this)}));function at(it,lt,ut,dt){return tt.apply(this,arguments)}return at}();function z(tt,at){if(!tt)throw new Error("".concat(at," is required"));if(typeof tt!="string")throw new Error("".concat(at," 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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.array.from.js"),ot("core-js/modules/es.string.iterator.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.array.filter.js"),ot("core-js/modules/es.array.find.js"),ot("core-js/modules/es.regexp.to-string.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("debug")("ali-oss:multipart-copy"),St=ot("copy-to"),Tt=Bt;Tt.uploadPartCopy=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt,at,it,lt){var ut,dt,Pt,At,Dt,Ft=arguments;return gt.default.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:return ut=Ft.length>5&&Ft[5]!==void 0?Ft[5]:{},ut.headers=ut.headers||{},dt=ut.versionId||ut.subres&&ut.subres.versionId||null,dt?Pt="/".concat(lt.sourceBucketName,"/").concat(encodeURIComponent(lt.sourceKey),"?versionId=").concat(dt):Pt="/".concat(lt.sourceBucketName,"/").concat(encodeURIComponent(lt.sourceKey)),ut.headers["x-oss-copy-source"]=Pt,it&&(ut.headers["x-oss-copy-source-range"]="bytes=".concat(it)),ut.subres={partNumber:at,uploadId:tt},At=this._objectRequestParams("PUT",z,ut),At.mime=ut.mime,At.successStatuses=[200],jt.next=12,this.request(At);case 12:return Dt=jt.sent,jt.abrupt("return",{name:z,etag:Dt.res.headers.etag,res:Dt.res});case 14:case"end":return jt.stop()}},ft,this)}));function xt(ft,z,tt,at,it){return mt.apply(this,arguments)}return xt}(),Tt.multipartUploadCopy=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt){var at,it,lt,ut,dt,Pt,At,Dt,Ft,Nt,jt,Gt,Wt=arguments;return gt.default.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return at=Wt.length>2&&Wt[2]!==void 0?Wt[2]:{},this.resetCancelFlag(),it=at.versionId,lt=it===void 0?null:it,ut={versionId:lt},Ut.next=6,this._getObjectMeta(tt.sourceBucketName,tt.sourceKey,ut);case 6:if(dt=Ut.sent,Pt=dt.res.headers["content-length"],tt.startOffset=tt.startOffset||0,tt.endOffset=tt.endOffset||Pt,!(at.checkpoint&&at.checkpoint.uploadId)){Ut.next=14;break}return Ut.next=13,this._resumeMultipartCopy(at.checkpoint,tt,at);case 13:return Ut.abrupt("return",Ut.sent);case 14:if(At=102400,Dt=tt.endOffset-tt.startOffset,!(Dt<At)){Ut.next=18;break}throw new Error("copySize must not be smaller than ".concat(At));case 18:if(!(at.partSize&&at.partSize<At)){Ut.next=20;break}throw new Error("partSize must not be smaller than ".concat(At));case 20:return Ut.next=22,this.initMultipartUpload(z,at);case 22:if(Ft=Ut.sent,Nt=Ft.uploadId,jt=this._getPartSize(Dt,at.partSize),Gt={name:z,copySize:Dt,partSize:jt,uploadId:Nt,doneParts:[]},!(at&&at.progress)){Ut.next=29;break}return Ut.next=29,at.progress(0,Gt,Ft.res);case 29:return Ut.next=31,this._resumeMultipartCopy(Gt,tt,at);case 31:return Ut.abrupt("return",Ut.sent);case 32:case"end":return Ut.stop()}},ft,this)}));function xt(ft,z){return mt.apply(this,arguments)}return xt}(),Tt._resumeMultipartCopy=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt,at){var it,lt,ut,dt,Pt,At,Dt,Ft,Nt,jt,Gt,Wt,Jt,Ut,Ht,oe,se,ce,Pe,Yt,ne;return gt.default.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(!this.isCancel()){Se.next=2;break}throw this._makeCancelEvent();case 2:if(it=at.versionId,lt=it===void 0?null:it,ut={versionId:lt},dt=z.copySize,Pt=z.partSize,At=z.uploadId,Dt=z.doneParts,Ft=z.name,Nt=this._divideMultipartCopyParts(dt,Pt,tt.startOffset),jt=Nt.length,Gt={headers:{}},at.copyheaders&&St(at.copyheaders).to(Gt.headers),lt&&St(ut).to(Gt),Wt=function(fe,pe,he){return new Promise(function(){var Ce=(0,kt.default)(gt.default.mark(function de(ye,Ne){var xe,re,Kt;return gt.default.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:if(Lt.prev=0,fe.isCancel()){Lt.next=22;break}return xe=Nt[pe-1],re="".concat(xe.start,"-").concat(xe.end-1),Lt.prev=4,Lt.next=7,fe.uploadPartCopy(Ft,At,pe,re,he,Gt);case 7:Kt=Lt.sent,Lt.next=15;break;case 10:if(Lt.prev=10,Lt.t0=Lt.catch(4),Lt.t0.status!==404){Lt.next=14;break}throw fe._makeAbortEvent();case 14:throw Lt.t0;case 15:if(fe.isCancel()){Lt.next=22;break}if(bt("content-range ".concat(Kt.res.headers["content-range"])),Dt.push({number:pe,etag:Kt.res.headers.etag}),z.doneParts=Dt,!(at&&at.progress)){Lt.next=22;break}return Lt.next=22,at.progress(Dt.length/jt,z,Kt.res);case 22:ye(),Lt.next=29;break;case 25:Lt.prev=25,Lt.t1=Lt.catch(0),Lt.t1.partNum=pe,Ne(Lt.t1);case 29:case"end":return Lt.stop()}},de,null,[[0,25],[4,10]])}));return function(de,ye){return Ce.apply(this,arguments)}}())},Jt=Array.from(new Array(jt),function(be,fe){return fe+1}),Ut=Dt.map(function(be){return be.number}),Ht=Jt.filter(function(be){return Ut.indexOf(be)<0}),oe=5,se=at.parallel||oe,!(this.checkBrowserAndVersion("Internet Explorer","10")||se===1)){Se.next=28;break}ce=0;case 18:if(!(ce<Ht.length)){Se.next=26;break}if(!this.isCancel()){Se.next=21;break}throw this._makeCancelEvent();case 21:return Se.next=23,Wt(this,Ht[ce],tt);case 23:ce++,Se.next=18;break;case 26:Se.next=40;break;case 28:return Se.next=30,this._parallelNode(Ht,se,Wt,tt);case 30:if(Pe=Se.sent,Yt=Pe.find(function(be){return be.name==="abort"}),!Yt){Se.next=34;break}throw Yt;case 34:if(!this.isCancel()){Se.next=36;break}throw this._makeCancelEvent();case 36:if(!(Pe&&Pe.length>0)){Se.next=40;break}throw ne=Pe[0],ne.message="Failed to copy some parts with error: ".concat(ne.toString()," part_num: ").concat(ne.partNum),ne;case 40:return Se.next=42,this.completeMultipartUpload(Ft,At,Dt,at);case 42:return Se.abrupt("return",Se.sent);case 43:case"end":return Se.stop()}},ft,this)}));function xt(ft,z,tt){return mt.apply(this,arguments)}return xt}(),Tt._divideMultipartCopyParts=function(xt,ft,z){for(var tt=Math.ceil(xt/ft),at=[],it=0;it<tt;it++){var lt=ft*it+z,ut=Math.min(lt+ft,xt+z);at.push({start:lt,end:ut})}return at},Tt._getObjectMeta=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt,at){var it,lt;return gt.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return it=this.getBucket(),this.setBucket(z),dt.next=4,this.head(tt,at);case 4:return lt=dt.sent,this.setBucket(it),dt.abrupt("return",lt);case 7:case"end":return dt.stop()}},ft,this)}));function xt(ft,z,tt){return mt.apply(this,arguments)}return xt}()},{"@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(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=ot("@babel/runtime/helpers/interopRequireDefault"),kt=gt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.array.filter.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.array.sort.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.to-string.js");var bt=gt(ot("@babel/runtime/helpers/asyncToGenerator")),St=ot("copy-to"),Tt=ot("./callback"),mt=ot("./utils/deepCopy"),xt=mt.deepCopyWith,ft=ot("./utils/isBuffer"),z=ft.isBuffer,tt=ot("./utils/omit"),at=tt.omit,it=Bt;it.listUploads=function(){var lt=(0,bt.default)(kt.default.mark(function dt(Pt,At){var Dt,Ft,Nt,jt;return kt.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return At=At||{},Dt={},St(At).to(Dt),Dt.subres="uploads",Ft=this._objectRequestParams("GET","",Dt),Ft.query=Pt,Ft.xmlResponse=!0,Ft.successStatuses=[200],Wt.next=10,this.request(Ft);case 10:return Nt=Wt.sent,jt=Nt.data.Upload||[],Array.isArray(jt)||(jt=[jt]),jt=jt.map(function(Jt){return{name:Jt.Key,uploadId:Jt.UploadId,initiated:Jt.Initiated}}),Wt.abrupt("return",{res:Nt.res,uploads:jt,bucket:Nt.data.Bucket,nextKeyMarker:Nt.data.NextKeyMarker,nextUploadIdMarker:Nt.data.NextUploadIdMarker,isTruncated:Nt.data.IsTruncated==="true"});case 15:case"end":return Wt.stop()}},dt,this)}));function ut(dt,Pt){return lt.apply(this,arguments)}return ut}(),it.listParts=function(){var lt=(0,bt.default)(kt.default.mark(function dt(Pt,At,Dt,Ft){var Nt,jt,Gt;return kt.default.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return Ft=Ft||{},Nt={},St(Ft).to(Nt),Nt.subres={uploadId:At},jt=this._objectRequestParams("GET",Pt,Nt),jt.query=Dt,jt.xmlResponse=!0,jt.successStatuses=[200],Jt.next=10,this.request(jt);case 10:return Gt=Jt.sent,Jt.abrupt("return",{res:Gt.res,uploadId:Gt.data.UploadId,bucket:Gt.data.Bucket,name:Gt.data.Key,partNumberMarker:Gt.data.PartNumberMarker,nextPartNumberMarker:Gt.data.NextPartNumberMarker,maxParts:Gt.data.MaxParts,isTruncated:Gt.data.IsTruncated,parts:Gt.data.Part||[]});case 12:case"end":return Jt.stop()}},dt,this)}));function ut(dt,Pt,At,Dt){return lt.apply(this,arguments)}return ut}(),it.abortMultipartUpload=function(){var lt=(0,bt.default)(kt.default.mark(function dt(Pt,At,Dt){var Ft,Nt,jt;return kt.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return this._stop(),Dt=Dt||{},Ft={},St(Dt).to(Ft),Ft.subres={uploadId:At},Nt=this._objectRequestParams("DELETE",Pt,Ft),Nt.successStatuses=[204],Wt.next=9,this.request(Nt);case 9:return jt=Wt.sent,Wt.abrupt("return",{res:jt.res});case 11:case"end":return Wt.stop()}},dt,this)}));function ut(dt,Pt,At){return lt.apply(this,arguments)}return ut}(),it.initMultipartUpload=function(){var lt=(0,bt.default)(kt.default.mark(function dt(Pt,At){var Dt,Ft,Nt;return kt.default.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return At=At||{},Dt={},St(At).to(Dt),Dt.headers=Dt.headers||{},this._convertMetaToHeaders(At.meta,Dt.headers),Dt.subres="uploads",Ft=this._objectRequestParams("POST",Pt,Dt),Ft.mime=At.mime,Ft.xmlResponse=!0,Ft.successStatuses=[200],Gt.next=12,this.request(Ft);case 12:return Nt=Gt.sent,Gt.abrupt("return",{res:Nt.res,bucket:Nt.data.Bucket,name:Nt.data.Key,uploadId:Nt.data.UploadId});case 14:case"end":return Gt.stop()}},dt,this)}));function ut(dt,Pt){return lt.apply(this,arguments)}return ut}(),it.uploadPart=function(){var lt=(0,bt.default)(kt.default.mark(function dt(Pt,At,Dt,Ft,Nt,jt,Gt){var Wt,Jt;return kt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(Wt={size:jt-Nt},Jt=vt&&vt.browser,!Jt){Ht.next=8;break}return Ht.next=5,this._createBuffer(Ft,Nt,jt);case 5:Wt.content=Ht.sent,Ht.next=11;break;case 8:return Ht.next=10,this._createStream(Ft,Nt,jt);case 10:Wt.stream=Ht.sent;case 11:return Ht.next=13,this._uploadPart(Pt,At,Dt,Wt,Gt);case 13:return Ht.abrupt("return",Ht.sent);case 14:case"end":return Ht.stop()}},dt,this)}));function ut(dt,Pt,At,Dt,Ft,Nt,jt){return lt.apply(this,arguments)}return ut}(),it.completeMultipartUpload=function(){var lt=(0,bt.default)(kt.default.mark(function dt(Pt,At,Dt,Ft){var Nt,jt,Gt,Wt,Jt,Ut,Ht,oe;return kt.default.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:for(Nt=Dt.concat().sort(function(Pe,Yt){return Pe.number-Yt.number}).filter(function(Pe,Yt,ne){return!Yt||Pe.number!==ne[Yt-1].number}),jt=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CompleteMultipartUpload>
|
|
`,Gt=0;Gt<Nt.length;Gt++)Wt=Nt[Gt],jt+=`<Part>
|
|
`,jt+="<PartNumber>".concat(Wt.number,`</PartNumber>
|
|
`),jt+="<ETag>".concat(Wt.etag,`</ETag>
|
|
`),jt+=`</Part>
|
|
`;return jt+="</CompleteMultipartUpload>",Ft=Ft||{},Jt={},Jt=xt(Ft,function(Pe){if(z(Pe))return null}),Jt.subres={uploadId:At},Jt.headers=at(Jt.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),Ut=this._objectRequestParams("POST",Pt,Jt),Tt.encodeCallback(Ut,Jt),Ut.mime="xml",Ut.content=jt,Ut.headers&&Ut.headers["x-oss-callback"]||(Ut.xmlResponse=!0),Ut.successStatuses=[200],ce.next=17,this.request(Ut);case 17:if(Ht=ce.sent,!Ft.progress){ce.next=21;break}return ce.next=21,Ft.progress(1,null,Ht.res);case 21:return oe={res:Ht.res,bucket:Ut.bucket,name:Pt,etag:Ht.res.headers.etag},Ut.headers&&Ut.headers["x-oss-callback"]&&(oe.data=JSON.parse(Ht.data.toString())),ce.abrupt("return",oe);case 24:case"end":return ce.stop()}},dt,this)}));function ut(dt,Pt,At,Dt){return lt.apply(this,arguments)}return ut}(),it._uploadPart=function(){var lt=(0,bt.default)(kt.default.mark(function dt(Pt,At,Dt,Ft,Nt){var jt,Gt,Wt,Jt;return kt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Nt=Nt||{},jt={},St(Nt).to(jt),jt.headers=jt.headers||{},jt.headers["Content-Length"]=Ft.size,jt.headers=at(jt.headers,["x-oss-server-side-encryption"]),jt.subres={partNumber:Dt,uploadId:At},Gt=this._objectRequestParams("PUT",Pt,jt),Gt.mime=jt.mime,Wt=vt&&vt.browser,Wt?Gt.content=Ft.content:Gt.stream=Ft.stream,Gt.successStatuses=[200],Gt.disabledMD5=Nt.disabledMD5,Ht.next=15,this.request(Gt);case 15:if(Jt=Ht.sent,Jt.res.headers.etag){Ht.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 Ft.stream&&(Ft.stream=null,Gt.stream=null),Ht.abrupt("return",{name:Pt,etag:Jt.res.headers.etag,res:Jt.res});case 20:case"end":return Ht.stop()}},dt,this)}));function ut(dt,Pt,At,Dt,Ft){return lt.apply(this,arguments)}return ut}()}).call(this)}).call(this,ot("_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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("url"),St=ot("utility"),Tt=ot("copy-to"),mt=ot("../../common/signUtils"),xt=ot("../utils/isIP"),ft=xt.isIP,z=ot("../utils/setSTSToken"),tt=z.setSTSToken,at=ot("../utils/isFunction"),it=at.isFunction,lt=Bt;lt.asyncSignatureUrl=function(){var ut=(0,kt.default)(gt.default.mark(function Pt(At,Dt){var Ft,Nt,jt,Gt,Wt;return gt.default.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:if(!ft(this.options.endpoint.hostname)){Ut.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(Dt=Dt||{},At=this._objectName(At),Dt.method=Dt.method||"GET",Ft=St.timestamp()+(Dt.expires||1800),Nt={bucket:this.options.bucket,object:At},jt=this._getResource(Nt),!(this.options.stsToken&&it(this.options.refreshSTSToken))){Ut.next=11;break}return Ut.next=11,tt.call(this);case 11:return this.options.stsToken&&(Dt["security-token"]=this.options.stsToken),Gt=mt._signatureForURL(this.options.accessKeySecret,Dt,jt,Ft),Wt=bt.parse(this._getReqUrl(Nt)),Wt.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Ft,Signature:Gt.Signature},Tt(Gt.subResource).to(Wt.query),Ut.abrupt("return",Wt.format());case 17:case"end":return Ut.stop()}},Pt,this)}));function dt(Pt,At){return ut.apply(this,arguments)}return dt}()},{"../../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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.find.js"),ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js");var kt=vt(ot("@babel/runtime/helpers/typeof")),bt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),St=ot("../utils/checkBucketName"),Tt=St.checkBucketName,mt=Bt,xt=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];mt.copy=function(){var ft=(0,bt.default)(gt.default.mark(function tt(at,it,lt,ut){var dt,Pt,At;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return(0,kt.default)(lt)==="object"&&(ut=lt),ut=ut||{},ut.headers=ut.headers||{},Object.keys(ut.headers).forEach(function(Nt){ut.headers["x-oss-copy-source-".concat(Nt.toLowerCase())]=ut.headers[Nt]}),(ut.meta||Object.keys(ut.headers).find(function(Nt){return xt.includes(Nt.toLowerCase())}))&&(ut.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(ut.meta,ut.headers),it=this._getSourceName(it,lt),ut.versionId&&(it="".concat(it,"?versionId=").concat(ut.versionId)),ut.headers["x-oss-copy-source"]=it,dt=this._objectRequestParams("PUT",at,ut),dt.xmlResponse=!0,dt.successStatuses=[200,304],Ft.next=14,this.request(dt);case 14:return Pt=Ft.sent,At=Pt.data,At&&(At={etag:At.ETag,lastModified:At.LastModified}),Ft.abrupt("return",{data:At,res:Pt.res});case 18:case"end":return Ft.stop()}},tt,this)}));function z(tt,at,it,lt){return ft.apply(this,arguments)}return z}(),mt._getSourceName=function(z,tt){return typeof tt=="string"?z=this._objectName(z):z[0]!=="/"?tt=this.options.bucket:(tt=z.replace(/\/(.+?)(\/.*)/,"$1"),z=z.replace(/(\/.+?\/)(.*)/,"$2")),Tt(tt),z=encodeURIComponent(z),z="/".concat(tt,"/").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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=Bt;bt.delete=function(){var St=(0,kt.default)(gt.default.mark(function mt(xt){var ft,z,tt,at=arguments;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return ft=at.length>1&&at[1]!==void 0?at[1]:{},ft.subres=Object.assign({},ft.subres),ft.versionId&&(ft.subres.versionId=ft.versionId),z=this._objectRequestParams("DELETE",xt,ft),z.successStatuses=[204],lt.next=7,this.request(z);case 7:return tt=lt.sent,lt.abrupt("return",{res:tt.res});case 9:case"end":return lt.stop()}},mt,this)}));function Tt(mt){return St.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("utility"),St=ot("../utils/obj2xml"),Tt=St.obj2xml,mt=Bt;mt.deleteMulti=function(){var xt=(0,kt.default)(gt.default.mark(function z(tt){var at,it,lt,ut,dt,Pt,At,Dt,Ft,Nt,jt,Gt,Wt,Jt=arguments;return gt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(at=Jt.length>1&&Jt[1]!==void 0?Jt[1]:{},it=[],!(!tt||!tt.length)){Ht.next=4;break}throw new Error("names is required");case 4:for(lt=0;lt<tt.length;lt++)ut={},typeof tt[lt]=="string"?ut.Key=bt.escape(this._objectName(tt[lt])):(dt=tt[lt],Pt=dt.key,At=dt.versionId,ut.Key=bt.escape(this._objectName(Pt)),ut.VersionId=At),it.push(ut);return Dt={Delete:{Quiet:!!at.quiet,Object:it}},Ft=Tt(Dt,{headers:!0}),at.subres=Object.assign({delete:""},at.subres),at.versionId&&(at.subres.versionId=at.versionId),Nt=this._objectRequestParams("POST","",at),Nt.mime="xml",Nt.content=Ft,Nt.xmlResponse=!0,Nt.successStatuses=[200],Ht.next=16,this.request(Nt);case 16:return jt=Ht.sent,Gt=jt.data,Wt=Gt&&Gt.Deleted||null,Wt&&(Array.isArray(Wt)||(Wt=[Wt])),Ht.abrupt("return",{res:jt.res,deleted:Wt||[]});case 21:case"end":return Ht.stop()}},z,this)}));function ft(z){return xt.apply(this,arguments)}return ft}()},{"../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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=Bt;bt.deleteObjectTagging=function(){var St=(0,kt.default)(gt.default.mark(function mt(xt){var ft,z,tt,at=arguments;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return ft=at.length>1&&at[1]!==void 0?at[1]:{},ft.subres=Object.assign({tagging:""},ft.subres),ft.versionId&&(ft.subres.versionId=ft.versionId),xt=this._objectName(xt),z=this._objectRequestParams("DELETE",xt,ft),z.successStatuses=[204],lt.next=8,this.request(z);case 8:return tt=lt.sent,lt.abrupt("return",{status:tt.status,res:tt.res});case 10:case"end":return lt.stop()}},mt,this)}));function Tt(mt){return St.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(ot,_t,Bt){"use strict";ot("core-js/modules/es.array.concat.js");var vt=ot("url"),gt=ot("../utils/isIP"),kt=gt.isIP,bt=Bt;bt.generateObjectUrl=function(Tt,mt){if(kt(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(mt)mt[mt.length-1]!=="/"&&(mt+="/");else{mt=this.options.endpoint.format();var xt=vt.parse(mt),ft=this.options.bucket;xt.hostname="".concat(ft,".").concat(xt.hostname),xt.host="".concat(ft,".").concat(xt.host),mt=xt.format()}return mt+this._escape(this._objectName(Tt))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=ot("@babel/runtime/helpers/interopRequireDefault"),kt=gt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var bt=gt(ot("@babel/runtime/helpers/asyncToGenerator")),St=ot("fs"),Tt=ot("is-type-of"),mt=Bt;mt.get=function(){var xt=(0,bt.default)(kt.default.mark(function z(tt,at){var it,lt,ut,dt,Pt,At,Dt,Ft,Nt=arguments;return kt.default.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return it=Nt.length>2&&Nt[2]!==void 0?Nt[2]:{},lt=null,ut=!1,Tt.writableStream(at)?lt=at:Tt.string(at)?(lt=St.createWriteStream(at),ut=!0):it=at,it=it||{},dt=vt&&vt.browser,Pt=it.responseCacheControl===null?"":"no-cache",At=dt&&Pt?{"response-cache-control":Pt}:{},it.subres=Object.assign(At,it.subres),it.versionId&&(it.subres.versionId=it.versionId),it.process&&(it.subres["x-oss-process"]=it.process),Gt.prev=11,Ft=this._objectRequestParams("GET",tt,it),Ft.writeStream=lt,Ft.successStatuses=[200,206,304],Gt.next=17,this.request(Ft);case 17:Dt=Gt.sent,ut&<.destroy(),Gt.next=28;break;case 21:if(Gt.prev=21,Gt.t0=Gt.catch(11),!ut){Gt.next=27;break}return lt.destroy(),Gt.next=27,this._deleteFileSafe(at);case 27:throw Gt.t0;case 28:return Gt.abrupt("return",{res:Dt.res,content:Dt.data});case 29:case"end":return Gt.stop()}},z,this,[[11,21]])}));function ft(z,tt){return xt.apply(this,arguments)}return ft}()}).call(this)}).call(this,ot("_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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=Bt;bt.getACL=function(){var St=(0,kt.default)(gt.default.mark(function mt(xt){var ft,z,tt,at=arguments;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return ft=at.length>1&&at[1]!==void 0?at[1]:{},ft.subres=Object.assign({acl:""},ft.subres),ft.versionId&&(ft.subres.versionId=ft.versionId),xt=this._objectName(xt),z=this._objectRequestParams("GET",xt,ft),z.successStatuses=[200],z.xmlResponse=!0,lt.next=9,this.request(z);case 9:return tt=lt.sent,lt.abrupt("return",{acl:tt.data.AccessControlList.Grant,owner:{id:tt.data.Owner.ID,displayName:tt.data.Owner.DisplayName},res:tt.res});case 11:case"end":return lt.stop()}},mt,this)}));function Tt(mt){return St.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.number.constructor.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=Bt,St=ot("../utils/isObject"),Tt=St.isObject,mt=ot("../utils/isArray"),xt=mt.isArray;bt.getBucketVersions=ft,bt.listObjectVersions=ft;function ft(){return z.apply(this,arguments)}function z(){return z=(0,kt.default)(gt.default.mark(function it(){var lt,ut,dt,Pt,At,Dt,Ft,Nt,jt=arguments;return gt.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:if(lt=jt.length>0&&jt[0]!==void 0?jt[0]:{},ut=jt.length>1&&jt[1]!==void 0?jt[1]:{},!(lt.versionIdMarker&<.keyMarker===void 0)){Wt.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return ut.subres=Object.assign({versions:""},ut.subres),ut.versionId&&(ut.subres.versionId=ut.versionId),dt=this._objectRequestParams("GET","",ut),dt.xmlResponse=!0,dt.successStatuses=[200],dt.query=at(lt),Wt.next=12,this.request(dt);case 12:return Pt=Wt.sent,At=Pt.data.Version||[],Dt=Pt.data.DeleteMarker||[],Ft=this,At&&(Array.isArray(At)||(At=[At]),At=At.map(function(Jt){return{name:Jt.Key,url:Ft._objectUrl(Jt.Key),lastModified:Jt.LastModified,isLatest:Jt.IsLatest==="true",versionId:Jt.VersionId,etag:Jt.ETag,type:Jt.Type,size:Number(Jt.Size),storageClass:Jt.StorageClass,owner:{id:Jt.Owner.ID,displayName:Jt.Owner.DisplayName}}})),Dt&&(xt(Dt)||(Dt=[Dt]),Dt=Dt.map(function(Jt){return{name:Jt.Key,lastModified:Jt.LastModified,versionId:Jt.VersionId,owner:{id:Jt.Owner.ID,displayName:Jt.Owner.DisplayName}}})),Nt=Pt.data.CommonPrefixes||null,Nt&&(xt(Nt)||(Nt=[Nt]),Nt=Nt.map(function(Jt){return Jt.Prefix})),Wt.abrupt("return",{res:Pt.res,objects:At,deleteMarker:Dt,prefixes:Nt,nextMarker:Pt.data.NextKeyMarker||null,NextVersionIdMarker:Pt.data.NextVersionIdMarker||null,nextKeyMarker:Pt.data.NextKeyMarker||null,nextVersionIdMarker:Pt.data.NextVersionIdMarker||null,isTruncated:Pt.data.IsTruncated==="true"});case 21:case"end":return Wt.stop()}},it,this)})),z.apply(this,arguments)}function tt(it){return it.replace(/([A-Z])/g,"-$1").toLowerCase()}function at(){var it=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},lt={};return Tt(it)&&Object.keys(it).forEach(function(ut){lt[tt(ut)]=it[ut]}),lt}},{"../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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=Bt;bt.getObjectMeta=function(){var St=(0,kt.default)(gt.default.mark(function mt(xt,ft){var z,tt;return gt.default.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return ft=ft||{},xt=this._objectName(xt),ft.subres=Object.assign({objectMeta:""},ft.subres),ft.versionId&&(ft.subres.versionId=ft.versionId),z=this._objectRequestParams("HEAD",xt,ft),z.successStatuses=[200],it.next=8,this.request(z);case 8:return tt=it.sent,it.abrupt("return",{status:tt.status,res:tt.res});case 10:case"end":return it.stop()}},mt,this)}));function Tt(mt,xt){return St.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=Bt,St=ot("../utils/isObject"),Tt=St.isObject;bt.getObjectTagging=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z){var tt,at,it,lt,ut,dt,Pt=arguments;return gt.default.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return tt=Pt.length>1&&Pt[1]!==void 0?Pt[1]:{},tt.subres=Object.assign({tagging:""},tt.subres),tt.versionId&&(tt.subres.versionId=tt.versionId),z=this._objectName(z),at=this._objectRequestParams("GET",z,tt),at.successStatuses=[200],Dt.next=8,this.request(at);case 8:return it=Dt.sent,Dt.next=11,this.parseXML(it.data);case 11:return lt=Dt.sent,ut=lt.TagSet.Tag,ut=ut&&Tt(ut)?[ut]:ut||[],dt={},ut.forEach(function(Ft){dt[Ft.Key]=Ft.Value}),Dt.abrupt("return",{status:it.status,res:it.res,tag:dt});case 17:case"end":return Dt.stop()}},ft,this)}));function xt(ft){return mt.apply(this,arguments)}return xt}()},{"../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(ot,_t,Bt){"use strict";var vt=ot("../utils/isIP"),gt=vt.isIP,kt=Bt;kt.getObjectUrl=function(St,Tt){if(gt(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return Tt?Tt[Tt.length-1]!=="/"&&(Tt+="/"):Tt=this.options.endpoint.format(),Tt+this._escape(this._objectName(St))}},{"../utils/isIP":69}],43:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=Bt;bt.getSymlink=function(){var St=(0,kt.default)(gt.default.mark(function mt(xt){var ft,z,tt,at,it=arguments;return gt.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return ft=it.length>1&&it[1]!==void 0?it[1]:{},ft.subres=Object.assign({symlink:""},ft.subres),ft.versionId&&(ft.subres.versionId=ft.versionId),xt=this._objectName(xt),z=this._objectRequestParams("GET",xt,ft),z.successStatuses=[200],ut.next=8,this.request(z);case 8:return tt=ut.sent,at=tt.res.headers["x-oss-symlink-target"],ut.abrupt("return",{targetName:decodeURIComponent(at),res:tt.res});case 11:case"end":return ut.stop()}},mt,this)}));function Tt(mt){return St.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkEnv"),St=bt.checkEnv,Tt=Bt;Tt.head=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z){var tt,at,it,lt,ut=arguments;return gt.default.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return tt=ut.length>1&&ut[1]!==void 0?ut[1]:{},St("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),tt.subres=Object.assign({},tt.subres),tt.versionId&&(tt.subres.versionId=tt.versionId),at=this._objectRequestParams("HEAD",z,tt),at.successStatuses=[200,304],Pt.next=8,this.request(at);case 8:return it=Pt.sent,lt={meta:null,res:it.res,status:it.status},it.status===200&&Object.keys(it.headers).forEach(function(At){At.indexOf("x-oss-meta-")===0&&(lt.meta||(lt.meta={}),lt.meta[At.substring(11)]=it.headers[At])}),Pt.abrupt("return",lt);case 12:case"end":return Pt.stop()}},ft,this)}));function xt(ft){return mt.apply(this,arguments)}return xt}()},{"../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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=Bt;bt.putACL=function(){var St=(0,kt.default)(gt.default.mark(function mt(xt,ft,z){var tt,at;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.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"]=ft,xt=this._objectName(xt),tt=this._objectRequestParams("PUT",xt,z),tt.successStatuses=[200],lt.next=10,this.request(tt);case 10:return at=lt.sent,lt.abrupt("return",{res:at.res});case 12:case"end":return lt.stop()}},mt,this)}));function Tt(mt,xt,ft){return St.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.object.keys.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/obj2xml"),St=bt.obj2xml,Tt=ot("../utils/checkObjectTag"),mt=Tt.checkObjectTag,xt=Bt;xt.putObjectTagging=function(){var ft=(0,kt.default)(gt.default.mark(function tt(at,it){var lt,ut,dt,Pt,At=arguments;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return lt=At.length>2&&At[2]!==void 0?At[2]:{},mt(it),lt.subres=Object.assign({tagging:""},lt.subres),lt.versionId&&(lt.subres.versionId=lt.versionId),at=this._objectName(at),ut=this._objectRequestParams("PUT",at,lt),ut.successStatuses=[200],it=Object.keys(it).map(function(Nt){return{Key:Nt,Value:it[Nt]}}),dt={Tagging:{TagSet:{Tag:it}}},ut.mime="xml",ut.content=St(dt),Ft.next=13,this.request(ut);case 13:return Pt=Ft.sent,Ft.abrupt("return",{res:Pt.res,status:Pt.status});case 15:case"end":return Ft.stop()}},tt,this)}));function z(tt,at){return ft.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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=Bt;bt.putSymlink=function(){var St=(0,kt.default)(gt.default.mark(function mt(xt,ft,z){var tt,at;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return z=z||{},z.headers=z.headers||{},ft=this._escape(this._objectName(ft)),this._convertMetaToHeaders(z.meta,z.headers),z.headers["x-oss-symlink-target"]=ft,z.subres=Object.assign({symlink:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.storageClass&&(z.headers["x-oss-storage-class"]=z.storageClass),xt=this._objectName(xt),tt=this._objectRequestParams("PUT",xt,z),tt.successStatuses=[200],lt.next=13,this.request(tt);case 13:return at=lt.sent,lt.abrupt("return",{res:at.res});case 15:case"end":return lt.stop()}},mt,this)}));function Tt(mt,xt,ft){return St.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(ot,_t,Bt){"use strict";var vt=ot("url"),gt=ot("utility"),kt=ot("copy-to"),bt=ot("../../common/signUtils"),St=ot("../utils/isIP"),Tt=St.isIP,mt=Bt;mt.signatureUrl=function(ft,z){if(Tt(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");z=z||{},ft=this._objectName(ft),z.method=z.method||"GET";var tt=gt.timestamp()+(z.expires||1800),at={bucket:this.options.bucket,object:ft},it=this._getResource(at);this.options.stsToken&&(z["security-token"]=this.options.stsToken);var lt=bt._signatureForURL(this.options.accessKeySecret,z,it,tt),ut=vt.parse(this._getReqUrl(at));return ut.query={OSSAccessKeyId:this.options.accessKeyId,Expires:tt,Signature:lt.Signature},kt(lt.subResource).to(ut.query),ut.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.iterator.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.string.iterator.js"),ot("core-js/modules/web.dom-collections.iterator.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.function.name.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("./utils/isArray"),St=bt.isArray,Tt=Bt;Tt._parallelNode=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt,at,it){var lt,ut,dt,Pt,At,Dt,Ft,Nt;return gt.default.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:lt=this,ut=[],dt=[],Pt=z.length/tt,At=z.length%tt,Dt=At===0?Pt:(z.length-At)/tt+1,Ft=1,Nt=0;case 8:if(!(Nt<z.length)){Gt.next=26;break}if(!lt.isCancel()){Gt.next=11;break}return Gt.abrupt("break",26);case 11:if(it?dt.push(at(lt,z[Nt],it)):dt.push(at(lt,z[Nt])),!(dt.length===tt||Ft===Dt&&Nt===z.length-1)){Gt.next=23;break}return Gt.prev=13,Ft+=1,Gt.next=17,Promise.all(dt);case 17:Gt.next=22;break;case 19:Gt.prev=19,Gt.t0=Gt.catch(13),ut.push(Gt.t0);case 22:dt=[];case 23:Nt++,Gt.next=8;break;case 26:return Gt.abrupt("return",ut);case 27:case"end":return Gt.stop()}},ft,this,[[13,19]])}));function xt(ft,z,tt,at){return mt.apply(this,arguments)}return xt}(),Tt._parallel=function(xt,ft,z){var tt=this;return new Promise(function(at){var it=[];if(ft<=0||!xt){at(it);return}function lt(Gt){return function(){if(Gt===null)throw new Error("Callback was already called.");var Wt=Gt;Gt=null;for(var Jt=arguments.length,Ut=new Array(Jt),Ht=0;Ht<Jt;Ht++)Ut[Ht]=arguments[Ht];Wt.apply(this,Ut)}}function ut(Gt){var Wt=-1,Jt=Gt.length;return function(){return++Wt<Jt&&!tt.isCancel()?{value:Gt[Wt],key:Wt}:null}}var dt=ut(xt),Pt=!1,At=0,Dt=!1;function Ft(Gt){At-=1,Gt?(Pt=!0,it.push(Gt),at(it)):Pt&&At<=0?(Pt=!0,at(it)):Dt||(tt.isCancel()?at(it):jt())}function Nt(Gt,Wt){z(Gt).then(function(Jt){Wt(null,Jt)}).catch(function(Jt){Wt(Jt)})}function jt(){for(Dt=!0;At<ft&&!Pt&&!tt.isCancel();){var Gt=dt();if(Gt===null||it.length>0){Pt=!0,At<=0&&at(it);return}At+=1,Nt(Gt.value,lt(Ft))}Dt=!1}jt()})},Tt.cancel=function(xt){this.options.cancelFlag=!0,St(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(ft){if(ft.destroyed===!1){var z={name:"cancel",message:"cancel"};ft.destroy(z)}}),this.multipartUploadStreams=[],xt&&this.abortMultipartUpload(xt.name,xt.uploadId,xt.options)},Tt.isCancel=function(){return this.options.cancelFlag},Tt.resetCancelFlag=function(){this.options.cancelFlag=!1},Tt._stop=function(){this.options.cancelFlag=!0},Tt._makeCancelEvent=function(){var xt={status:0,name:"cancel"};return xt},Tt._makeAbortEvent=function(){var xt={status:0,name:"abort",message:"upload task has been abort"};return xt}},{"./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(ot,_t,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.string.trim.js"),ot("core-js/modules/es.array.sort.js"),ot("core-js/modules/es.array.join.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.to-string.js");var gt=ot("./../../shims/crypto/crypto.js"),kt=ot("is-type-of"),bt=ot("./utils/lowercaseKeyHeader"),St=bt.lowercaseKeyHeader;Bt.buildCanonicalizedResource=function(mt,xt){var ft="".concat(mt),z="?";if(kt.string(xt)&&xt.trim()!=="")ft+=z+xt;else if(kt.array(xt))xt.sort(),ft+=z+xt.join("&");else if(xt){var tt=function(lt,ut){return lt[0]>ut[0]?1:lt[0]<ut[0]?-1:0},at=function(lt){ft+=z+lt,(xt[lt]||xt[lt]===0)&&(ft+="=".concat(xt[lt])),z="&"};Object.keys(xt).sort(tt).forEach(at)}return ft},Bt.buildCanonicalString=function(mt,xt,ft,z){ft=ft||{};var tt=St(ft.headers),at="x-oss-",it=[],lt={},ut=[mt.toUpperCase(),tt["content-md5"]||"",tt["content-type"],z||tt["x-oss-date"]];return Object.keys(tt).forEach(function(dt){var Pt=dt.toLowerCase();Pt.indexOf(at)===0&&(lt[Pt]=String(tt[dt]).trim())}),Object.keys(lt).sort().forEach(function(dt){it.push("".concat(dt,":").concat(lt[dt]))}),ut=ut.concat(it),ut.push(this.buildCanonicalizedResource(xt,ft.parameters)),ut.join(`
|
|
`)},Bt.computeSignature=function(mt,xt){var ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",z=gt.createHmac("sha1",mt);return z.update(vt.from(xt,ft)).digest("base64")},Bt.authorization=function(mt,xt,ft,z){return"OSS ".concat(mt,":").concat(this.computeSignature(xt,ft,z))},Bt._signatureForURL=function(mt){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ft=arguments.length>2?arguments[2]:void 0,z=arguments.length>3?arguments[3]:void 0,tt=arguments.length>4?arguments[4]:void 0,at={},it=xt.subResource,lt=it===void 0?{}:it;if(xt.process){var ut="x-oss-process";lt[ut]=xt.process}if(xt.trafficLimit){var dt="x-oss-traffic-limit";lt[dt]=xt.trafficLimit}if(xt.response&&Object.keys(xt.response).forEach(function(Ft){var Nt="response-".concat(Ft.toLowerCase());lt[Nt]=xt.response[Ft]}),Object.keys(xt).forEach(function(Ft){var Nt=Ft.toLowerCase(),jt=xt[Ft];Nt.indexOf("x-oss-")===0?at[Nt]=jt:(Nt.indexOf("content-md5")===0||Nt.indexOf("content-type")===0)&&(at[Ft]=jt)}),Object.prototype.hasOwnProperty.call(xt,"security-token")&&(lt["security-token"]=xt["security-token"]),Object.prototype.hasOwnProperty.call(xt,"callback")){var Pt={callbackUrl:encodeURI(xt.callback.url),callbackBody:xt.callback.body};if(xt.callback.host&&(Pt.callbackHost=xt.callback.host),xt.callback.contentType&&(Pt.callbackBodyType=xt.callback.contentType),lt.callback=vt.from(JSON.stringify(Pt)).toString("base64"),xt.callback.customValue){var At={};Object.keys(xt.callback.customValue).forEach(function(Ft){At["x:".concat(Ft)]=xt.callback.customValue[Ft]}),lt["callback-var"]=vt.from(JSON.stringify(At)).toString("base64")}}var Dt=this.buildCanonicalString(xt.method,ft,{headers:at,parameters:lt},z.toString());return{Signature:this.computeSignature(mt,Dt,tt),subResource:lt}}}).call(this)}).call(this,ot("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(ot,_t,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkBucketName=void 0,Bt.checkBucketName=function(vt){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,kt=gt?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!kt.test(vt))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(ot,_t,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkConfigValid=void 0;var vt={endpoint:gt,region:/^[a-zA-Z0-9\-_]+$/};function gt(kt){return typeof kt=="string"?/^[a-zA-Z0-9._:/-]+$/.test(kt):kt.host?/^[a-zA-Z0-9._:/-]+$/.test(kt.host):!1}Bt.checkConfigValid=function(kt,bt){if(vt[bt]){var St=!0;if(vt[bt]instanceof Function?St=vt[bt](kt):St=vt[bt].test(kt),!St)throw new Error("The ".concat(bt," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(ot,_t,Bt){(function(vt){(function(){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkEnv=void 0;function gt(kt){vt.browser&&console.warn(kt)}Bt.checkEnv=gt}).call(this)}).call(this,ot("_process"))},{_process:467}],54:[function(ot,_t,Bt){"use strict";ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.object.entries.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkObjectTag=void 0;var vt=ot("./checkValid"),gt=vt.checkValid,kt=ot("./isObject"),bt=kt.isObject,St=[{validator:function(ft){if(typeof ft!="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 (/)"}],Tt={key:[].concat(St,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(St,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function mt(xt){if(!bt(xt))throw new Error("tag must be Object");var ft=Object.entries(xt);if(ft.length>10)throw new Error("maximum of 10 tags for a object");var z=["key","value"];ft.forEach(function(tt){tt.forEach(function(at,it){gt(at,Tt[z[it]])})})}Bt.checkObjectTag=mt},{"./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(ot,_t,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkValid=void 0;function vt(gt,kt){kt.forEach(function(bt){if(bt.validator)bt.validator(gt);else if(bt.pattern&&!bt.pattern.test(gt))throw new Error(bt.msg)})}Bt.checkValid=vt},{"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(ot,_t,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.string.includes.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.concat.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.createRequest=void 0;var gt=ot("./../../../shims/crypto/crypto.js"),kt=ot("debug")("ali-oss"),bt=ot("mime"),St=ot("dateformat"),Tt=ot("copy-to"),mt=ot("path"),xt=ot("./encoder"),ft=xt.encoder,z=ot("./isIP"),tt=z.isIP,at=ot("./setRegion"),it=at.setRegion,lt=ot("../client/getReqUrl"),ut=lt.getReqUrl,dt=ot("./isDingTalk"),Pt=dt.isDingTalk;function At(Nt,jt){return Nt[jt]||Nt[jt.toLowerCase()]}function Dt(Nt,jt){delete Nt[jt],delete Nt[jt.toLowerCase()]}function Ft(Nt){var jt=new Date;this.options.amendTimeSkewed&&(jt=+new Date+this.options.amendTimeSkewed);var Gt={"x-oss-date":St(jt,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(Gt["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(Gt["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(Gt,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(Gt["x-oss-security-token"]=this.options.stsToken),Tt(Nt.headers).to(Gt),At(Gt,"Content-Type")||(Nt.mime&&Nt.mime.indexOf("/")>0?Gt["Content-Type"]=Nt.mime:Pt()?Gt["Content-Type"]="application/octet-stream":Gt["Content-Type"]=bt.getType(Nt.mime||mt.extname(Nt.object||""))),At(Gt,"Content-Type")||Dt(Gt,"Content-Type"),Nt.content&&(Nt.disabledMD5||(!Nt.headers||!Nt.headers["Content-MD5"]?Gt["Content-MD5"]=gt.createHash("md5").update(vt.from(Nt.content,"utf8")).digest("base64"):Gt["Content-MD5"]=Nt.headers["Content-MD5"]),Gt["Content-Length"]||(Gt["Content-Length"]=Nt.content.length));var Wt=Object.prototype.hasOwnProperty;for(var Jt in Gt)Gt[Jt]&&Wt.call(Gt,Jt)&&(Gt[Jt]=ft(String(Gt[Jt]),this.options.headerEncoding));var Ut=this._getResource(Nt);if(Gt.authorization=this.authorization(Nt.method,Ut,Nt.subres,Gt,this.options.headerEncoding),tt(this.options.endpoint.hostname)){var Ht=this.options,oe=Ht.region,se=Ht.internal,ce=Ht.secure,Pe=it(oe,se,ce);Gt.host="".concat(Nt.bucket,".").concat(Pe.host)}var Yt=ut.bind(this)(Nt);kt("request %s %s, with headers %j, !!stream: %s",Nt.method,Yt,Gt,!!Nt.stream);var ne=Nt.timeout||this.options.timeout,ve={method:Nt.method,content:Nt.content,stream:Nt.stream,headers:Gt,timeout:ne,writeStream:Nt.writeStream,customResponse:Nt.customResponse,ctx:Nt.ctx||this.ctx};return this.agent&&(ve.agent=this.agent),this.httpsAgent&&(ve.httpsAgent=this.httpsAgent),ve.enableProxy=!!this.options.enableProxy,ve.proxy=this.options.proxy?this.options.proxy:null,{url:Yt,params:ve}}Bt.createRequest=Ft}).call(this)}).call(this,ot("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(ot,_t,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.entries.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.object.keys.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.dataFix=void 0;var vt=ot("./isObject"),gt=["true","TRUE","1",1],kt=["false","FALSE","0",0];function bt(mt,xt,ft){if(vt.isObject(mt)){var z=xt.remove,tt=z===void 0?[]:z,at=xt.rename,it=at===void 0?{}:at,lt=xt.camel,ut=lt===void 0?[]:lt,dt=xt.bool,Pt=dt===void 0?[]:dt,At=xt.lowerFirst,Dt=At===void 0?!1:At;return tt.forEach(function(Ft){return delete mt[Ft]}),Object.entries(it).forEach(function(Ft){mt[Ft[0]]&&(mt[Ft[1]]||(mt[Ft[1]]=mt[Ft[0]],delete mt[Ft[0]]))}),ut.forEach(function(Ft){if(mt[Ft]){var Nt=Ft.replace(/^(.)/,function(jt){return jt.toLowerCase()}).replace(/-(\w)/g,function(jt,Gt){return Gt.toUpperCase()});mt[Nt]||(mt[Nt]=mt[Ft])}}),Pt.forEach(function(Ft){mt[Ft]=St(mt[Ft])}),typeof ft=="function"&&ft(mt),Tt(mt,Dt),bt}}Bt.dataFix=bt;function St(mt){return mt?gt.includes(mt)?!0:kt.includes(mt)?!1:mt:!1}function Tt(mt,xt){xt&&Object.keys(mt).forEach(function(ft){var z=ft.replace(/^\w/,function(tt){return tt.toLowerCase()});typeof mt[z]=="undefined"&&(mt[z]=mt[ft],delete mt[ft])})}},{"./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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault");ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js");var gt=vt(ot("@babel/runtime/helpers/typeof"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.deepCopyWith=Bt.deepCopy=void 0;var kt=ot("./isBuffer");Bt.deepCopy=function(bt){if(bt===null||(0,gt.default)(bt)!=="object")return bt;if(kt.isBuffer(bt))return bt.slice();var St=Array.isArray(bt)?[]:{};return Object.keys(bt).forEach(function(Tt){St[Tt]=Bt.deepCopy(bt[Tt])}),St},Bt.deepCopyWith=function(bt,St){function Tt(mt,xt,ft){var z=St(mt,xt,ft);if(z!==void 0)return z;if(mt===null||(0,gt.default)(mt)!=="object")return mt;if(kt.isBuffer(mt))return mt.slice();var tt=Array.isArray(mt)?[]:{};return Object.keys(mt).forEach(function(at){tt[at]=Tt(mt[at],at,mt)}),tt}return St?Tt(bt,"",null):Bt.deepCopy(bt)}},{"./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(ot,_t,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.encoder=void 0;function gt(kt){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return bt==="utf-8"?kt:vt.from(kt).toString("latin1")}Bt.encoder=gt}).call(this)}).call(this,ot("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(ot,_t,Bt){"use strict";ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.formatInventoryConfig=void 0;var vt=ot("../utils/dataFix"),gt=ot("../utils/isObject"),kt=ot("../utils/isArray"),bt=ot("../utils/formatObjKey");function St(mt){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return xt&>.isObject(mt)&&(mt=[mt]),kt.isArray(mt)?mt=mt.map(Tt):mt=Tt(mt),mt}Bt.formatInventoryConfig=St;function Tt(mt){return vt.dataFix(mt,{bool:["IsEnabled"]},function(xt){var ft,z;xt.prefix=xt.Filter.Prefix,delete xt.Filter,xt.OSSBucketDestination=xt.Destination.OSSBucketDestination,xt.OSSBucketDestination.rolename=xt.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete xt.OSSBucketDestination.RoleArn,xt.OSSBucketDestination.bucket=xt.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete xt.OSSBucketDestination.Bucket,delete xt.Destination,xt.frequency=xt.Schedule.Frequency,delete xt.Schedule.Frequency,!((ft=xt==null?void 0:xt.OptionalFields)===null||ft===void 0)&&ft.Field&&!kt.isArray((z=xt.OptionalFields)===null||z===void 0?void 0:z.Field)&&(xt.OptionalFields.Field=[xt.OptionalFields.Field])}),mt=bt.formatObjKey(mt,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),mt}},{"../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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault");ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.string.includes.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js");var gt=vt(ot("@babel/runtime/helpers/typeof"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.formatObjKey=void 0;function kt(St,Tt,mt){if(St===null||(0,gt.default)(St)!=="object")return St;var xt;if(Array.isArray(St)){xt=[];for(var ft=0;ft<St.length;ft++)xt.push(kt(St[ft],Tt,mt))}else xt={},Object.keys(St).forEach(function(z){xt[bt(z,Tt,mt)]=kt(St[z],Tt,mt)});return xt}Bt.formatObjKey=kt;function bt(St,Tt,mt){return mt&&mt.exclude&&mt.exclude.includes(St)||(Tt==="firstUpperCase"?St=St.replace(/^./,function(xt){return xt.toUpperCase()}):Tt==="firstLowerCase"&&(St=St.replace(/^./,function(xt){return xt.toLowerCase()}))),St}},{"@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(ot,_t,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getStrBytesCount=void 0;function vt(gt){for(var kt=0,bt=0;bt<gt.length;bt++){var St=gt.charAt(bt);/^[\u00-\uff]$/.test(St)?kt+=1:kt+=2}return kt}Bt.getStrBytesCount=vt},{"core-js/modules/es.regexp.exec.js":300}],63:[function(ot,_t,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isArray=void 0,Bt.isArray=function(vt){return Object.prototype.toString.call(vt)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(ot,_t,Bt){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isBlob=void 0;function vt(gt){return typeof Blob!="undefined"&> instanceof Blob}Bt.isBlob=vt},{}],65:[function(ot,_t,Bt){(function(vt){(function(){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isBuffer=void 0;function gt(kt){return vt.isBuffer(kt)}Bt.isBuffer=gt}).call(this)}).call(this,{isBuffer:ot("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(ot,_t,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.string.includes.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isDingTalk=void 0;function gt(){return!!(vt.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}Bt.isDingTalk=gt}).call(this)}).call(this,ot("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(ot,_t,Bt){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isFile=void 0,Bt.isFile=function(vt){return typeof File!="undefined"&&vt instanceof File}},{}],68:[function(ot,_t,Bt){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isFunction=void 0,Bt.isFunction=function(vt){return typeof vt=="function"}},{}],69:[function(ot,_t,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isIP=void 0,Bt.isIP=function(vt){var gt=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,kt=/^\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 gt.test(vt)||kt.test(vt)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(ot,_t,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isObject=void 0,Bt.isObject=function(vt){return Object.prototype.toString.call(vt)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(ot,_t,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.lowercaseKeyHeader=void 0;var vt=ot("./isObject");function gt(kt){var bt={};return vt.isObject(kt)&&Object.keys(kt).forEach(function(St){bt[St.toLowerCase()]=kt[St]}),bt}Bt.lowercaseKeyHeader=gt},{"./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(ot,_t,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.array.join.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.obj2xml=void 0;var vt=ot("./formatObjKey");function gt(bt){return Object.prototype.toString.call(bt).replace(/(.*? |])/g,"").toLowerCase()}function kt(bt,St){var Tt="";return St&&St.headers&&(Tt=`<?xml version="1.0" encoding="UTF-8"?>
|
|
`),St&&St.firstUpperCase&&(bt=vt.formatObjKey(bt,"firstUpperCase")),gt(bt)==="object"?Object.keys(bt).forEach(function(mt){gt(bt[mt])!=="undefined"&>(bt[mt])!=="null"&&(gt(bt[mt])==="string"||gt(bt[mt])==="number"?Tt+="<".concat(mt,">").concat(bt[mt],"</").concat(mt,">"):gt(bt[mt])==="object"?Tt+="<".concat(mt,">").concat(kt(bt[mt]),"</").concat(mt,">"):gt(bt[mt])==="array"?Tt+=bt[mt].map(function(xt){return"<".concat(mt,">").concat(kt(xt),"</").concat(mt,">")}).join(""):Tt+="<".concat(mt,">").concat(bt[mt].toString(),"</").concat(mt,">"))}):Tt+=bt.toString(),Tt}Bt.obj2xml=kt},{"./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(ot,_t,Bt){"use strict";ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.array.from.js"),ot("core-js/modules/es.string.iterator.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.symbol.js"),ot("core-js/modules/es.symbol.description.js"),ot("core-js/modules/es.symbol.iterator.js"),ot("core-js/modules/es.array.iterator.js"),ot("core-js/modules/web.dom-collections.iterator.js"),ot("core-js/modules/es.object.assign.js");function vt(St,Tt){var mt=typeof Symbol!="undefined"&&St[Symbol.iterator]||St["@@iterator"];if(!mt){if(Array.isArray(St)||(mt=gt(St))||Tt&&St&&typeof St.length=="number"){mt&&(St=mt);var xt=0,ft=function(){};return{s:ft,n:function(){return xt>=St.length?{done:!0}:{done:!1,value:St[xt++]}},e:function(lt){throw lt},f:ft}}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,tt=!1,at;return{s:function(){mt=mt.call(St)},n:function(){var lt=mt.next();return z=lt.done,lt},e:function(lt){tt=!0,at=lt},f:function(){try{!z&&mt.return!=null&&mt.return()}finally{if(tt)throw at}}}}function gt(St,Tt){if(St){if(typeof St=="string")return kt(St,Tt);var mt=Object.prototype.toString.call(St).slice(8,-1);if(mt==="Object"&&St.constructor&&(mt=St.constructor.name),mt==="Map"||mt==="Set")return Array.from(St);if(mt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(mt))return kt(St,Tt)}}function kt(St,Tt){(Tt==null||Tt>St.length)&&(Tt=St.length);for(var mt=0,xt=new Array(Tt);mt<Tt;mt++)xt[mt]=St[mt];return xt}Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.omit=void 0;function bt(St,Tt){var mt=Object.assign({},St),xt=vt(Tt),ft;try{for(xt.s();!(ft=xt.n()).done;){var z=ft.value;delete mt[z]}}catch(tt){xt.e(tt)}finally{xt.f()}return mt}Bt.omit=bt},{"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(ot,_t,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.retry=void 0;function vt(gt,kt){var bt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},St=0,Tt=bt.retryDelay,mt=Tt===void 0?500:Tt,xt=bt.errorHandler,ft=xt===void 0?function(){return!0}:xt,z=function tt(){for(var at=arguments.length,it=new Array(at),lt=0;lt<at;lt++)it[lt]=arguments[lt];return new Promise(function(ut,dt){gt.apply(void 0,it).then(function(Pt){St=0,ut(Pt)}).catch(function(Pt){St<kt&&ft(Pt)?(St++,setTimeout(function(){ut(tt.apply(void 0,it))},mt)):(St=0,dt(Pt))})})};return z}Bt.retry=vt},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(ot,_t,Bt){"use strict";var vt=function(St){return St&&St.__esModule?St:{default:St}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.setRegion=void 0;var gt=vt(ot("url")),kt=ot("./checkConfigValid");function bt(St){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;kt.checkConfigValid(St,"region");var xt=mt?"https://":"http://",ft=Tt?"-internal.aliyuncs.com":".aliyuncs.com",z="vpc100-oss-cn-";return St.substr(0,z.length)===z&&(ft=".aliyuncs.com"),gt.default.parse(xt+St+ft)}Bt.setRegion=bt},{"./checkConfigValid":52,url:472}],76:[function(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.array.find.js"),ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkCredentials=Bt.setSTSToken=void 0;var bt=ot("./formatObjKey");function St(){return Tt.apply(this,arguments)}function Tt(){return Tt=(0,kt.default)(gt.default.mark(function xt(){var ft,z;return gt.default.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(this.options||(this.options={}),ft=new Date,!this.stsTokenFreshTime){at.next=14;break}if(!(+ft-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){at.next=12;break}return this.stsTokenFreshTime=ft,at.next=7,this.options.refreshSTSToken();case 7:z=at.sent,z=bt.formatObjKey(z,"firstLowerCase"),z.securityToken&&(z.stsToken=z.securityToken),mt(z),Object.assign(this.options,z);case 12:at.next=15;break;case 14:this.stsTokenFreshTime=ft;case 15:return at.abrupt("return",null);case 16:case"end":return at.stop()}},xt,this)})),Tt.apply(this,arguments)}Bt.setSTSToken=St;function mt(xt){var ft=["accessKeySecret","accessKeyId","stsToken"],z=Object.keys(xt);ft.forEach(function(tt){if(!z.find(function(at){return at===tt}))throw Error("refreshSTSToken must return contains ".concat(tt))})}Bt.checkCredentials=mt},{"./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(ot,_t,Bt){function vt(kt,bt,St,Tt,mt,xt,ft){try{var z=kt[xt](ft),tt=z.value}catch(at){St(at);return}z.done?bt(tt):Promise.resolve(tt).then(Tt,mt)}function gt(kt){return function(){var bt=this,St=arguments;return new Promise(function(Tt,mt){var xt=kt.apply(bt,St);function ft(tt){vt(xt,Tt,mt,ft,z,"next",tt)}function z(tt){vt(xt,Tt,mt,ft,z,"throw",tt)}ft(void 0)})}}_t.exports=gt,_t.exports.__esModule=!0,_t.exports.default=_t.exports},{}],78:[function(ot,_t,Bt){function vt(gt){return gt&>.__esModule?gt:{default:gt}}_t.exports=vt,_t.exports.__esModule=!0,_t.exports.default=_t.exports},{}],79:[function(ot,_t,Bt){function vt(gt){"@babel/helpers - typeof";return _t.exports=vt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(kt){return typeof kt}:function(kt){return kt&&typeof Symbol=="function"&&kt.constructor===Symbol&&kt!==Symbol.prototype?"symbol":typeof kt},_t.exports.__esModule=!0,_t.exports.default=_t.exports,vt(gt)}_t.exports=vt,_t.exports.__esModule=!0,_t.exports.default=_t.exports},{}],80:[function(ot,_t,Bt){_t.exports=ot("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(ot,_t,Bt){_t.exports=vt,_t.exports.HttpsAgent=vt;function vt(){}},{}],82:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=ot("object-assign");function kt(oe,se){if(oe===se)return 0;for(var ce=oe.length,Pe=se.length,Yt=0,ne=Math.min(ce,Pe);Yt<ne;++Yt)if(oe[Yt]!==se[Yt]){ce=oe[Yt],Pe=se[Yt];break}return ce<Pe?-1:Pe<ce?1:0}function bt(oe){return vt.Buffer&&typeof vt.Buffer.isBuffer=="function"?vt.Buffer.isBuffer(oe):!!(oe!=null&&oe._isBuffer)}var St=ot("util/"),Tt=Object.prototype.hasOwnProperty,mt=Array.prototype.slice,xt=function(){return function(){}.name==="foo"}();function ft(oe){return Object.prototype.toString.call(oe)}function z(oe){return bt(oe)||typeof vt.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(oe):oe?!!(oe instanceof DataView||oe.buffer&&oe.buffer instanceof ArrayBuffer):!1}var tt=_t.exports=At,at=/\s*function\s+([^\(\s]*)\s*/;function it(oe){if(St.isFunction(oe)){if(xt)return oe.name;var se=oe.toString(),ce=se.match(at);return ce&&ce[1]}}tt.AssertionError=function(se){this.name="AssertionError",this.actual=se.actual,this.expected=se.expected,this.operator=se.operator,se.message?(this.message=se.message,this.generatedMessage=!1):(this.message=dt(this),this.generatedMessage=!0);var ce=se.stackStartFunction||Pt;if(Error.captureStackTrace)Error.captureStackTrace(this,ce);else{var Pe=new Error;if(Pe.stack){var Yt=Pe.stack,ne=it(ce),ve=Yt.indexOf(`
|
|
`+ne);if(ve>=0){var Se=Yt.indexOf(`
|
|
`,ve+1);Yt=Yt.substring(Se+1)}this.stack=Yt}}},St.inherits(tt.AssertionError,Error);function lt(oe,se){return typeof oe=="string"?oe.length<se?oe:oe.slice(0,se):oe}function ut(oe){if(xt||!St.isFunction(oe))return St.inspect(oe);var se=it(oe),ce=se?": "+se:"";return"[Function"+ce+"]"}function dt(oe){return lt(ut(oe.actual),128)+" "+oe.operator+" "+lt(ut(oe.expected),128)}function Pt(oe,se,ce,Pe,Yt){throw new tt.AssertionError({message:ce,actual:oe,expected:se,operator:Pe,stackStartFunction:Yt})}tt.fail=Pt;function At(oe,se){oe||Pt(oe,!0,se,"==",tt.ok)}tt.ok=At,tt.equal=function(se,ce,Pe){se!=ce&&Pt(se,ce,Pe,"==",tt.equal)},tt.notEqual=function(se,ce,Pe){se==ce&&Pt(se,ce,Pe,"!=",tt.notEqual)},tt.deepEqual=function(se,ce,Pe){Dt(se,ce,!1)||Pt(se,ce,Pe,"deepEqual",tt.deepEqual)},tt.deepStrictEqual=function(se,ce,Pe){Dt(se,ce,!0)||Pt(se,ce,Pe,"deepStrictEqual",tt.deepStrictEqual)};function Dt(oe,se,ce,Pe){if(oe===se)return!0;if(bt(oe)&&bt(se))return kt(oe,se)===0;if(St.isDate(oe)&&St.isDate(se))return oe.getTime()===se.getTime();if(St.isRegExp(oe)&&St.isRegExp(se))return oe.source===se.source&&oe.global===se.global&&oe.multiline===se.multiline&&oe.lastIndex===se.lastIndex&&oe.ignoreCase===se.ignoreCase;if((oe===null||typeof oe!="object")&&(se===null||typeof se!="object"))return ce?oe===se:oe==se;if(z(oe)&&z(se)&&ft(oe)===ft(se)&&!(oe instanceof Float32Array||oe instanceof Float64Array))return kt(new Uint8Array(oe.buffer),new Uint8Array(se.buffer))===0;if(bt(oe)!==bt(se))return!1;Pe=Pe||{actual:[],expected:[]};var Yt=Pe.actual.indexOf(oe);return Yt!==-1&&Yt===Pe.expected.indexOf(se)?!0:(Pe.actual.push(oe),Pe.expected.push(se),Nt(oe,se,ce,Pe))}function Ft(oe){return Object.prototype.toString.call(oe)=="[object Arguments]"}function Nt(oe,se,ce,Pe){if(oe==null||se===null||se===void 0)return!1;if(St.isPrimitive(oe)||St.isPrimitive(se))return oe===se;if(ce&&Object.getPrototypeOf(oe)!==Object.getPrototypeOf(se))return!1;var Yt=Ft(oe),ne=Ft(se);if(Yt&&!ne||!Yt&&ne)return!1;if(Yt)return oe=mt.call(oe),se=mt.call(se),Dt(oe,se,ce);var ve=Ht(oe),Se=Ht(se),be,fe;if(ve.length!==Se.length)return!1;for(ve.sort(),Se.sort(),fe=ve.length-1;fe>=0;fe--)if(ve[fe]!==Se[fe])return!1;for(fe=ve.length-1;fe>=0;fe--)if(be=ve[fe],!Dt(oe[be],se[be],ce,Pe))return!1;return!0}tt.notDeepEqual=function(se,ce,Pe){Dt(se,ce,!1)&&Pt(se,ce,Pe,"notDeepEqual",tt.notDeepEqual)},tt.notDeepStrictEqual=jt;function jt(oe,se,ce){Dt(oe,se,!0)&&Pt(oe,se,ce,"notDeepStrictEqual",jt)}tt.strictEqual=function(se,ce,Pe){se!==ce&&Pt(se,ce,Pe,"===",tt.strictEqual)},tt.notStrictEqual=function(se,ce,Pe){se===ce&&Pt(se,ce,Pe,"!==",tt.notStrictEqual)};function Gt(oe,se){if(!oe||!se)return!1;if(Object.prototype.toString.call(se)=="[object RegExp]")return se.test(oe);try{if(oe instanceof se)return!0}catch(ce){}return Error.isPrototypeOf(se)?!1:se.call({},oe)===!0}function Wt(oe){var se;try{oe()}catch(ce){se=ce}return se}function Jt(oe,se,ce,Pe){var Yt;if(typeof se!="function")throw new TypeError('"block" argument must be a function');typeof ce=="string"&&(Pe=ce,ce=null),Yt=Wt(se),Pe=(ce&&ce.name?" ("+ce.name+").":".")+(Pe?" "+Pe:"."),oe&&!Yt&&Pt(Yt,ce,"Missing expected exception"+Pe);var ne=typeof Pe=="string",ve=!oe&&St.isError(Yt),Se=!oe&&Yt&&!ce;if((ve&&ne&&Gt(Yt,ce)||Se)&&Pt(Yt,ce,"Got unwanted exception"+Pe),oe&&Yt&&ce&&!Gt(Yt,ce)||!oe&&Yt)throw Yt}tt.throws=function(oe,se,ce){Jt(!0,oe,se,ce)},tt.doesNotThrow=function(oe,se,ce){Jt(!1,oe,se,ce)},tt.ifError=function(oe){if(oe)throw oe};function Ut(oe,se){oe||Pt(oe,!0,se,"==",Ut)}tt.strict=gt(Ut,tt,{equal:tt.strictEqual,deepEqual:tt.deepStrictEqual,notEqual:tt.notStrictEqual,notDeepEqual:tt.notDeepStrictEqual}),tt.strict.strict=tt.strict;var Ht=Object.keys||function(oe){var se=[];for(var ce in oe)Tt.call(oe,ce)&&se.push(ce);return se}}).call(this)}).call(this,typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(ot,_t,Bt){typeof Object.create=="function"?_t.exports=function(gt,kt){gt.super_=kt,gt.prototype=Object.create(kt.prototype,{constructor:{value:gt,enumerable:!1,writable:!0,configurable:!0}})}:_t.exports=function(gt,kt){gt.super_=kt;var bt=function(){};bt.prototype=kt.prototype,gt.prototype=new bt,gt.prototype.constructor=gt}},{}],84:[function(ot,_t,Bt){_t.exports=function(gt){return gt&&typeof gt=="object"&&typeof gt.copy=="function"&&typeof gt.fill=="function"&&typeof gt.readUInt8=="function"}},{}],85:[function(ot,_t,Bt){(function(vt,gt){(function(){var kt=/%[sdj%]/g;Bt.format=function(Se){if(!Nt(Se)){for(var be=[],fe=0;fe<arguments.length;fe++)be.push(Tt(arguments[fe]));return be.join(" ")}for(var fe=1,pe=arguments,he=pe.length,Ce=String(Se).replace(kt,function(ye){if(ye==="%%")return"%";if(fe>=he)return ye;switch(ye){case"%s":return String(pe[fe++]);case"%d":return Number(pe[fe++]);case"%j":try{return JSON.stringify(pe[fe++])}catch(Ne){return"[Circular]"}default:return ye}}),de=pe[fe];fe<he;de=pe[++fe])At(de)||!Jt(de)?Ce+=" "+de:Ce+=" "+Tt(de);return Ce},Bt.deprecate=function(Se,be){if(Gt(gt.process))return function(){return Bt.deprecate(Se,be).apply(this,arguments)};if(vt.noDeprecation===!0)return Se;var fe=!1;function pe(){if(!fe){if(vt.throwDeprecation)throw new Error(be);vt.traceDeprecation?console.trace(be):console.error(be),fe=!0}return Se.apply(this,arguments)}return pe};var bt={},St;Bt.debuglog=function(Se){if(Gt(St)&&(St=vt.env.NODE_DEBUG||""),Se=Se.toUpperCase(),!bt[Se])if(new RegExp("\\b"+Se+"\\b","i").test(St)){var be=vt.pid;bt[Se]=function(){var fe=Bt.format.apply(Bt,arguments);console.error("%s %d: %s",Se,be,fe)}}else bt[Se]=function(){};return bt[Se]};function Tt(Se,be){var fe={seen:[],stylize:xt};return arguments.length>=3&&(fe.depth=arguments[2]),arguments.length>=4&&(fe.colors=arguments[3]),Pt(be)?fe.showHidden=be:be&&Bt._extend(fe,be),Gt(fe.showHidden)&&(fe.showHidden=!1),Gt(fe.depth)&&(fe.depth=2),Gt(fe.colors)&&(fe.colors=!1),Gt(fe.customInspect)&&(fe.customInspect=!0),fe.colors&&(fe.stylize=mt),z(fe,Se,fe.depth)}Bt.inspect=Tt,Tt.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]},Tt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function mt(Se,be){var fe=Tt.styles[be];return fe?"\x1B["+Tt.colors[fe][0]+"m"+Se+"\x1B["+Tt.colors[fe][1]+"m":Se}function xt(Se,be){return Se}function ft(Se){var be={};return Se.forEach(function(fe,pe){be[fe]=!0}),be}function z(Se,be,fe){if(Se.customInspect&&be&&oe(be.inspect)&&be.inspect!==Bt.inspect&&!(be.constructor&&be.constructor.prototype===be)){var pe=be.inspect(fe,Se);return Nt(pe)||(pe=z(Se,pe,fe)),pe}var he=tt(Se,be);if(he)return he;var Ce=Object.keys(be),de=ft(Ce);if(Se.showHidden&&(Ce=Object.getOwnPropertyNames(be)),Ht(be)&&(Ce.indexOf("message")>=0||Ce.indexOf("description")>=0))return at(be);if(Ce.length===0){if(oe(be)){var ye=be.name?": "+be.name:"";return Se.stylize("[Function"+ye+"]","special")}if(Wt(be))return Se.stylize(RegExp.prototype.toString.call(be),"regexp");if(Ut(be))return Se.stylize(Date.prototype.toString.call(be),"date");if(Ht(be))return at(be)}var Ne="",xe=!1,re=["{","}"];if(dt(be)&&(xe=!0,re=["[","]"]),oe(be)){var Kt=be.name?": "+be.name:"";Ne=" [Function"+Kt+"]"}if(Wt(be)&&(Ne=" "+RegExp.prototype.toString.call(be)),Ut(be)&&(Ne=" "+Date.prototype.toUTCString.call(be)),Ht(be)&&(Ne=" "+at(be)),Ce.length===0&&(!xe||be.length==0))return re[0]+Ne+re[1];if(fe<0)return Wt(be)?Se.stylize(RegExp.prototype.toString.call(be),"regexp"):Se.stylize("[Object]","special");Se.seen.push(be);var wt;return xe?wt=it(Se,be,fe,de,Ce):wt=Ce.map(function(Lt){return lt(Se,be,fe,de,Lt,xe)}),Se.seen.pop(),ut(wt,Ne,re)}function tt(Se,be){if(Gt(be))return Se.stylize("undefined","undefined");if(Nt(be)){var fe="'"+JSON.stringify(be).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Se.stylize(fe,"string")}if(Ft(be))return Se.stylize(""+be,"number");if(Pt(be))return Se.stylize(""+be,"boolean");if(At(be))return Se.stylize("null","null")}function at(Se){return"["+Error.prototype.toString.call(Se)+"]"}function it(Se,be,fe,pe,he){for(var Ce=[],de=0,ye=be.length;de<ye;++de)ve(be,String(de))?Ce.push(lt(Se,be,fe,pe,String(de),!0)):Ce.push("");return he.forEach(function(Ne){Ne.match(/^\d+$/)||Ce.push(lt(Se,be,fe,pe,Ne,!0))}),Ce}function lt(Se,be,fe,pe,he,Ce){var de,ye,Ne;if(Ne=Object.getOwnPropertyDescriptor(be,he)||{value:be[he]},Ne.get?Ne.set?ye=Se.stylize("[Getter/Setter]","special"):ye=Se.stylize("[Getter]","special"):Ne.set&&(ye=Se.stylize("[Setter]","special")),ve(pe,he)||(de="["+he+"]"),ye||(Se.seen.indexOf(Ne.value)<0?(At(fe)?ye=z(Se,Ne.value,null):ye=z(Se,Ne.value,fe-1),ye.indexOf(`
|
|
`)>-1&&(Ce?ye=ye.split(`
|
|
`).map(function(xe){return" "+xe}).join(`
|
|
`).substr(2):ye=`
|
|
`+ye.split(`
|
|
`).map(function(xe){return" "+xe}).join(`
|
|
`))):ye=Se.stylize("[Circular]","special")),Gt(de)){if(Ce&&he.match(/^\d+$/))return ye;de=JSON.stringify(""+he),de.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(de=de.substr(1,de.length-2),de=Se.stylize(de,"name")):(de=de.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),de=Se.stylize(de,"string"))}return de+": "+ye}function ut(Se,be,fe){var pe=0,he=Se.reduce(function(Ce,de){return pe++,de.indexOf(`
|
|
`)>=0&&pe++,Ce+de.replace(/\u001b\[\d\d?m/g,"").length+1},0);return he>60?fe[0]+(be===""?"":be+`
|
|
`)+" "+Se.join(`,
|
|
`)+" "+fe[1]:fe[0]+be+" "+Se.join(", ")+" "+fe[1]}function dt(Se){return Array.isArray(Se)}Bt.isArray=dt;function Pt(Se){return typeof Se=="boolean"}Bt.isBoolean=Pt;function At(Se){return Se===null}Bt.isNull=At;function Dt(Se){return Se==null}Bt.isNullOrUndefined=Dt;function Ft(Se){return typeof Se=="number"}Bt.isNumber=Ft;function Nt(Se){return typeof Se=="string"}Bt.isString=Nt;function jt(Se){return typeof Se=="symbol"}Bt.isSymbol=jt;function Gt(Se){return Se===void 0}Bt.isUndefined=Gt;function Wt(Se){return Jt(Se)&&ce(Se)==="[object RegExp]"}Bt.isRegExp=Wt;function Jt(Se){return typeof Se=="object"&&Se!==null}Bt.isObject=Jt;function Ut(Se){return Jt(Se)&&ce(Se)==="[object Date]"}Bt.isDate=Ut;function Ht(Se){return Jt(Se)&&(ce(Se)==="[object Error]"||Se instanceof Error)}Bt.isError=Ht;function oe(Se){return typeof Se=="function"}Bt.isFunction=oe;function se(Se){return Se===null||typeof Se=="boolean"||typeof Se=="number"||typeof Se=="string"||typeof Se=="symbol"||typeof Se=="undefined"}Bt.isPrimitive=se,Bt.isBuffer=ot("./support/isBuffer");function ce(Se){return Object.prototype.toString.call(Se)}function Pe(Se){return Se<10?"0"+Se.toString(10):Se.toString(10)}var Yt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ne(){var Se=new Date,be=[Pe(Se.getHours()),Pe(Se.getMinutes()),Pe(Se.getSeconds())].join(":");return[Se.getDate(),Yt[Se.getMonth()],be].join(" ")}Bt.log=function(){console.log("%s - %s",ne(),Bt.format.apply(Bt,arguments))},Bt.inherits=ot("inherits"),Bt._extend=function(Se,be){if(!be||!Jt(be))return Se;for(var fe=Object.keys(be),pe=fe.length;pe--;)Se[fe[pe]]=be[fe[pe]];return Se};function ve(Se,be){return Object.prototype.hasOwnProperty.call(Se,be)}}).call(this)}).call(this,ot("_process"),typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],kt=typeof globalThis=="undefined"?vt:globalThis;_t.exports=function(){for(var St=[],Tt=0;Tt<gt.length;Tt++)typeof kt[gt[Tt]]=="function"&&(St[St.length]=gt[Tt]);return St}}).call(this)}).call(this,typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(ot,_t,Bt){"use strict";Bt.byteLength=xt,Bt.toByteArray=z,Bt.fromByteArray=it;for(var vt=[],gt=[],kt=typeof Uint8Array!="undefined"?Uint8Array:Array,bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",St=0,Tt=bt.length;St<Tt;++St)vt[St]=bt[St],gt[bt.charCodeAt(St)]=St;gt[45]=62,gt[95]=63;function mt(lt){var ut=lt.length;if(ut%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var dt=lt.indexOf("=");dt===-1&&(dt=ut);var Pt=dt===ut?0:4-dt%4;return[dt,Pt]}function xt(lt){var ut=mt(lt),dt=ut[0],Pt=ut[1];return(dt+Pt)*3/4-Pt}function ft(lt,ut,dt){return(ut+dt)*3/4-dt}function z(lt){var ut,dt=mt(lt),Pt=dt[0],At=dt[1],Dt=new kt(ft(lt,Pt,At)),Ft=0,Nt=At>0?Pt-4:Pt,jt;for(jt=0;jt<Nt;jt+=4)ut=gt[lt.charCodeAt(jt)]<<18|gt[lt.charCodeAt(jt+1)]<<12|gt[lt.charCodeAt(jt+2)]<<6|gt[lt.charCodeAt(jt+3)],Dt[Ft++]=ut>>16&255,Dt[Ft++]=ut>>8&255,Dt[Ft++]=ut&255;return At===2&&(ut=gt[lt.charCodeAt(jt)]<<2|gt[lt.charCodeAt(jt+1)]>>4,Dt[Ft++]=ut&255),At===1&&(ut=gt[lt.charCodeAt(jt)]<<10|gt[lt.charCodeAt(jt+1)]<<4|gt[lt.charCodeAt(jt+2)]>>2,Dt[Ft++]=ut>>8&255,Dt[Ft++]=ut&255),Dt}function tt(lt){return vt[lt>>18&63]+vt[lt>>12&63]+vt[lt>>6&63]+vt[lt&63]}function at(lt,ut,dt){for(var Pt,At=[],Dt=ut;Dt<dt;Dt+=3)Pt=(lt[Dt]<<16&16711680)+(lt[Dt+1]<<8&65280)+(lt[Dt+2]&255),At.push(tt(Pt));return At.join("")}function it(lt){for(var ut,dt=lt.length,Pt=dt%3,At=[],Dt=16383,Ft=0,Nt=dt-Pt;Ft<Nt;Ft+=Dt)At.push(at(lt,Ft,Ft+Dt>Nt?Nt:Ft+Dt));return Pt===1?(ut=lt[dt-1],At.push(vt[ut>>2]+vt[ut<<4&63]+"==")):Pt===2&&(ut=(lt[dt-2]<<8)+lt[dt-1],At.push(vt[ut>>10]+vt[ut>>4&63]+vt[ut<<2&63]+"=")),At.join("")}},{}],88:[function(ot,_t,Bt){(function(vt,gt,kt){typeof _t!="undefined"&&_t.exports?_t.exports=kt():typeof le=="function"&&le.amd?le(gt,kt):vt[gt]=kt()})(this,"bowser",function(){var vt=!0;function gt(ft){function z(be){var fe=ft.match(be);return fe&&fe.length>1&&fe[1]||""}function tt(be){var fe=ft.match(be);return fe&&fe.length>1&&fe[2]||""}var at=z(/(ipod|iphone|ipad)/i).toLowerCase(),it=/like android/i.test(ft),lt=!it&&/android/i.test(ft),ut=/nexus\s*[0-6]\s*/i.test(ft),dt=!ut&&/nexus\s*[0-9]+/i.test(ft),Pt=/CrOS/.test(ft),At=/silk/i.test(ft),Dt=/sailfish/i.test(ft),Ft=/tizen/i.test(ft),Nt=/(web|hpw)(o|0)s/i.test(ft),jt=/windows phone/i.test(ft),Gt=/SamsungBrowser/i.test(ft),Wt=!jt&&/windows/i.test(ft),Jt=!at&&!At&&/macintosh/i.test(ft),Ut=!lt&&!Dt&&!Ft&&!Nt&&/linux/i.test(ft),Ht=tt(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),oe=z(/version\/(\d+(\.\d+)?)/i),se=/tablet/i.test(ft)&&!/tablet pc/i.test(ft),ce=!se&&/[^-]mobi/i.test(ft),Pe=/xbox/i.test(ft),Yt;/opera/i.test(ft)?Yt={name:"Opera",opera:vt,version:oe||z(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(ft)?Yt={name:"Opera",opera:vt,version:z(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||oe}:/SamsungBrowser/i.test(ft)?Yt={name:"Samsung Internet for Android",samsungBrowser:vt,version:oe||z(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(ft)?Yt={name:"NAVER Whale browser",whale:vt,version:z(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(ft)?Yt={name:"MZ Browser",mzbrowser:vt,version:z(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(ft)?Yt={name:"Opera Coast",coast:vt,version:oe||z(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(ft)?Yt={name:"Focus",focus:vt,version:z(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(ft)?Yt={name:"Yandex Browser",yandexbrowser:vt,version:oe||z(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(ft)?Yt={name:"UC Browser",ucbrowser:vt,version:z(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(ft)?Yt={name:"Maxthon",maxthon:vt,version:z(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(ft)?Yt={name:"Epiphany",epiphany:vt,version:z(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(ft)?Yt={name:"Puffin",puffin:vt,version:z(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(ft)?Yt={name:"Sleipnir",sleipnir:vt,version:z(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(ft)?Yt={name:"K-Meleon",kMeleon:vt,version:z(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:jt?(Yt={name:"Windows Phone",osname:"Windows Phone",windowsphone:vt},Ht?(Yt.msedge=vt,Yt.version=Ht):(Yt.msie=vt,Yt.version=z(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(ft)?Yt={name:"Internet Explorer",msie:vt,version:z(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:Pt?Yt={name:"Chrome",osname:"Chrome OS",chromeos:vt,chromeBook:vt,chrome:vt,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(ft)?Yt={name:"Microsoft Edge",msedge:vt,version:Ht}:/vivaldi/i.test(ft)?Yt={name:"Vivaldi",vivaldi:vt,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||oe}:Dt?Yt={name:"Sailfish",osname:"Sailfish OS",sailfish:vt,version:z(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(ft)?Yt={name:"SeaMonkey",seamonkey:vt,version:z(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(ft)?(Yt={name:"Firefox",firefox:vt,version:z(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ft)&&(Yt.firefoxos=vt,Yt.osname="Firefox OS")):At?Yt={name:"Amazon Silk",silk:vt,version:z(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(ft)?Yt={name:"PhantomJS",phantom:vt,version:z(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(ft)?Yt={name:"SlimerJS",slimer:vt,version:z(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(ft)||/rim\stablet/i.test(ft)?Yt={name:"BlackBerry",osname:"BlackBerry OS",blackberry:vt,version:oe||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Nt?(Yt={name:"WebOS",osname:"WebOS",webos:vt,version:oe||z(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(ft)&&(Yt.touchpad=vt)):/bada/i.test(ft)?Yt={name:"Bada",osname:"Bada",bada:vt,version:z(/dolfin\/(\d+(\.\d+)?)/i)}:Ft?Yt={name:"Tizen",osname:"Tizen",tizen:vt,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||oe}:/qupzilla/i.test(ft)?Yt={name:"QupZilla",qupzilla:vt,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||oe}:/chromium/i.test(ft)?Yt={name:"Chromium",chromium:vt,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||oe}:/chrome|crios|crmo/i.test(ft)?Yt={name:"Chrome",chrome:vt,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:lt?Yt={name:"Android",version:oe}:/safari|applewebkit/i.test(ft)?(Yt={name:"Safari",safari:vt},oe&&(Yt.version=oe)):at?(Yt={name:at=="iphone"?"iPhone":at=="ipad"?"iPad":"iPod"},oe&&(Yt.version=oe)):/googlebot/i.test(ft)?Yt={name:"Googlebot",googlebot:vt,version:z(/googlebot\/(\d+(\.\d+))/i)||oe}:Yt={name:z(/^(.*)\/(.*) /),version:tt(/^(.*)\/(.*) /)},!Yt.msedge&&/(apple)?webkit/i.test(ft)?(/(apple)?webkit\/537\.36/i.test(ft)?(Yt.name=Yt.name||"Blink",Yt.blink=vt):(Yt.name=Yt.name||"Webkit",Yt.webkit=vt),!Yt.version&&oe&&(Yt.version=oe)):!Yt.opera&&/gecko\//i.test(ft)&&(Yt.name=Yt.name||"Gecko",Yt.gecko=vt,Yt.version=Yt.version||z(/gecko\/(\d+(\.\d+)?)/i)),!Yt.windowsphone&&(lt||Yt.silk)?(Yt.android=vt,Yt.osname="Android"):!Yt.windowsphone&&at?(Yt[at]=vt,Yt.ios=vt,Yt.osname="iOS"):Jt?(Yt.mac=vt,Yt.osname="macOS"):Pe?(Yt.xbox=vt,Yt.osname="Xbox"):Wt?(Yt.windows=vt,Yt.osname="Windows"):Ut&&(Yt.linux=vt,Yt.osname="Linux");function ne(be){switch(be){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 ve="";Yt.windows?ve=ne(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):Yt.windowsphone?ve=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):Yt.mac?(ve=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),ve=ve.replace(/[_\s]/g,".")):at?(ve=z(/os (\d+([_\s]\d+)*) like mac os x/i),ve=ve.replace(/[_\s]/g,".")):lt?ve=z(/android[ \/-](\d+(\.\d+)*)/i):Yt.webos?ve=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):Yt.blackberry?ve=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):Yt.bada?ve=z(/bada\/(\d+(\.\d+)*)/i):Yt.tizen&&(ve=z(/tizen[\/\s](\d+(\.\d+)*)/i)),ve&&(Yt.osversion=ve);var Se=!Yt.windows&&ve.split(".")[0];return se||dt||at=="ipad"||lt&&(Se==3||Se>=4&&!ce)||Yt.silk?Yt.tablet=vt:(ce||at=="iphone"||at=="ipod"||lt||ut||Yt.blackberry||Yt.webos||Yt.bada)&&(Yt.mobile=vt),Yt.msedge||Yt.msie&&Yt.version>=10||Yt.yandexbrowser&&Yt.version>=15||Yt.vivaldi&&Yt.version>=1||Yt.chrome&&Yt.version>=20||Yt.samsungBrowser&&Yt.version>=4||Yt.whale&&Tt([Yt.version,"1.0"])===1||Yt.mzbrowser&&Tt([Yt.version,"6.0"])===1||Yt.focus&&Tt([Yt.version,"1.0"])===1||Yt.firefox&&Yt.version>=20||Yt.safari&&Yt.version>=6||Yt.opera&&Yt.version>=10||Yt.ios&&Yt.osversion&&Yt.osversion.split(".")[0]>=6||Yt.blackberry&&Yt.version>=10.1||Yt.chromium&&Yt.version>=20?Yt.a=vt:Yt.msie&&Yt.version<10||Yt.chrome&&Yt.version<20||Yt.firefox&&Yt.version<20||Yt.safari&&Yt.version<6||Yt.opera&&Yt.version<10||Yt.ios&&Yt.osversion&&Yt.osversion.split(".")[0]<6||Yt.chromium&&Yt.version<20?Yt.c=vt:Yt.x=vt,Yt}var kt=gt(typeof navigator!="undefined"&&navigator.userAgent||"");kt.test=function(ft){for(var z=0;z<ft.length;++z){var tt=ft[z];if(typeof tt=="string"&&tt in kt)return!0}return!1};function bt(ft){return ft.split(".").length}function St(ft,z){var tt=[],at;if(Array.prototype.map)return Array.prototype.map.call(ft,z);for(at=0;at<ft.length;at++)tt.push(z(ft[at]));return tt}function Tt(ft){for(var z=Math.max(bt(ft[0]),bt(ft[1])),tt=St(ft,function(at){var it=z-bt(at);return at=at+new Array(it+1).join(".0"),St(at.split("."),function(lt){return new Array(20-lt.length).join("0")+lt}).reverse()});--z>=0;){if(tt[0][z]>tt[1][z])return 1;if(tt[0][z]===tt[1][z]){if(z===0)return 0}else return-1}}function mt(ft,z,tt){var at=kt;typeof z=="string"&&(tt=z,z=void 0),z===void 0&&(z=!1),tt&&(at=gt(tt));var it=""+at.version;for(var lt in ft)if(ft.hasOwnProperty(lt)&&at[lt]){if(typeof ft[lt]!="string")throw new Error("Browser version in the minVersion map should be a string: "+lt+": "+String(ft));return Tt([it,ft[lt]])<0}return z}function xt(ft,z,tt){return!mt(ft,z,tt)}return kt.isUnsupportedBrowser=mt,kt.compareVersions=Tt,kt.check=xt,kt._detect=gt,kt.detect=gt,kt})},{}],89:[function(ot,_t,Bt){},{}],90:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=ot("base64-js"),kt=ot("ieee754");Bt.Buffer=mt,Bt.SlowBuffer=Pt,Bt.INSPECT_MAX_BYTES=50;var bt=2147483647;Bt.kMaxLength=bt,mt.TYPED_ARRAY_SUPPORT=St(),!mt.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 St(){try{var Rt=new Uint8Array(1);return Rt.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Rt.foo()===42}catch(Vt){return!1}}Object.defineProperty(mt.prototype,"parent",{enumerable:!0,get:function(){if(mt.isBuffer(this))return this.buffer}}),Object.defineProperty(mt.prototype,"offset",{enumerable:!0,get:function(){if(mt.isBuffer(this))return this.byteOffset}});function Tt(Rt){if(Rt>bt)throw new RangeError('The value "'+Rt+'" is invalid for option "size"');var Vt=new Uint8Array(Rt);return Vt.__proto__=mt.prototype,Vt}function mt(Rt,Vt,$t){if(typeof Rt=="number"){if(typeof Vt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return tt(Rt)}return xt(Rt,Vt,$t)}typeof Symbol!="undefined"&&Symbol.species!=null&&mt[Symbol.species]===mt&&Object.defineProperty(mt,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),mt.poolSize=8192;function xt(Rt,Vt,$t){if(typeof Rt=="string")return at(Rt,Vt);if(ArrayBuffer.isView(Rt))return it(Rt);if(Rt==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Rt);if(ee(Rt,ArrayBuffer)||Rt&&ee(Rt.buffer,ArrayBuffer))return lt(Rt,Vt,$t);if(typeof Rt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ue=Rt.valueOf&&Rt.valueOf();if(ue!=null&&ue!==Rt)return mt.from(ue,Vt,$t);var ge=ut(Rt);if(ge)return ge;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof Rt[Symbol.toPrimitive]=="function")return mt.from(Rt[Symbol.toPrimitive]("string"),Vt,$t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Rt)}mt.from=function(Rt,Vt,$t){return xt(Rt,Vt,$t)},mt.prototype.__proto__=Uint8Array.prototype,mt.__proto__=Uint8Array;function ft(Rt){if(typeof Rt!="number")throw new TypeError('"size" argument must be of type number');if(Rt<0)throw new RangeError('The value "'+Rt+'" is invalid for option "size"')}function z(Rt,Vt,$t){return ft(Rt),Rt<=0?Tt(Rt):Vt!==void 0?typeof $t=="string"?Tt(Rt).fill(Vt,$t):Tt(Rt).fill(Vt):Tt(Rt)}mt.alloc=function(Rt,Vt,$t){return z(Rt,Vt,$t)};function tt(Rt){return ft(Rt),Tt(Rt<0?0:dt(Rt)|0)}mt.allocUnsafe=function(Rt){return tt(Rt)},mt.allocUnsafeSlow=function(Rt){return tt(Rt)};function at(Rt,Vt){if((typeof Vt!="string"||Vt==="")&&(Vt="utf8"),!mt.isEncoding(Vt))throw new TypeError("Unknown encoding: "+Vt);var $t=At(Rt,Vt)|0,ue=Tt($t),ge=ue.write(Rt,Vt);return ge!==$t&&(ue=ue.slice(0,ge)),ue}function it(Rt){for(var Vt=Rt.length<0?0:dt(Rt.length)|0,$t=Tt(Vt),ue=0;ue<Vt;ue+=1)$t[ue]=Rt[ue]&255;return $t}function lt(Rt,Vt,$t){if(Vt<0||Rt.byteLength<Vt)throw new RangeError('"offset" is outside of buffer bounds');if(Rt.byteLength<Vt+($t||0))throw new RangeError('"length" is outside of buffer bounds');var ue;return Vt===void 0&&$t===void 0?ue=new Uint8Array(Rt):$t===void 0?ue=new Uint8Array(Rt,Vt):ue=new Uint8Array(Rt,Vt,$t),ue.__proto__=mt.prototype,ue}function ut(Rt){if(mt.isBuffer(Rt)){var Vt=dt(Rt.length)|0,$t=Tt(Vt);return $t.length===0||Rt.copy($t,0,0,Vt),$t}if(Rt.length!==void 0)return typeof Rt.length!="number"||It(Rt.length)?Tt(0):it(Rt);if(Rt.type==="Buffer"&&Array.isArray(Rt.data))return it(Rt.data)}function dt(Rt){if(Rt>=bt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+bt.toString(16)+" bytes");return Rt|0}function Pt(Rt){return+Rt!=Rt&&(Rt=0),mt.alloc(+Rt)}mt.isBuffer=function(Vt){return Vt!=null&&Vt._isBuffer===!0&&Vt!==mt.prototype},mt.compare=function(Vt,$t){if(ee(Vt,Uint8Array)&&(Vt=mt.from(Vt,Vt.offset,Vt.byteLength)),ee($t,Uint8Array)&&($t=mt.from($t,$t.offset,$t.byteLength)),!mt.isBuffer(Vt)||!mt.isBuffer($t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Vt===$t)return 0;for(var ue=Vt.length,ge=$t.length,Me=0,Ae=Math.min(ue,ge);Me<Ae;++Me)if(Vt[Me]!==$t[Me]){ue=Vt[Me],ge=$t[Me];break}return ue<ge?-1:ge<ue?1:0},mt.isEncoding=function(Vt){switch(String(Vt).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}},mt.concat=function(Vt,$t){if(!Array.isArray(Vt))throw new TypeError('"list" argument must be an Array of Buffers');if(Vt.length===0)return mt.alloc(0);var ue;if($t===void 0)for($t=0,ue=0;ue<Vt.length;++ue)$t+=Vt[ue].length;var ge=mt.allocUnsafe($t),Me=0;for(ue=0;ue<Vt.length;++ue){var Ae=Vt[ue];if(ee(Ae,Uint8Array)&&(Ae=mt.from(Ae)),!mt.isBuffer(Ae))throw new TypeError('"list" argument must be an Array of Buffers');Ae.copy(ge,Me),Me+=Ae.length}return ge};function At(Rt,Vt){if(mt.isBuffer(Rt))return Rt.length;if(ArrayBuffer.isView(Rt)||ee(Rt,ArrayBuffer))return Rt.byteLength;if(typeof Rt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Rt);var $t=Rt.length,ue=arguments.length>2&&arguments[2]===!0;if(!ue&&$t===0)return 0;for(var ge=!1;;)switch(Vt){case"ascii":case"latin1":case"binary":return $t;case"utf8":case"utf-8":return re(Rt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $t*2;case"hex":return $t>>>1;case"base64":return Lt(Rt).length;default:if(ge)return ue?-1:re(Rt).length;Vt=(""+Vt).toLowerCase(),ge=!0}}mt.byteLength=At;function Dt(Rt,Vt,$t){var ue=!1;if((Vt===void 0||Vt<0)&&(Vt=0),Vt>this.length||(($t===void 0||$t>this.length)&&($t=this.length),$t<=0)||($t>>>=0,Vt>>>=0,$t<=Vt))return"";for(Rt||(Rt="utf8");;)switch(Rt){case"hex":return Se(this,Vt,$t);case"utf8":case"utf-8":return ce(this,Vt,$t);case"ascii":return ne(this,Vt,$t);case"latin1":case"binary":return ve(this,Vt,$t);case"base64":return se(this,Vt,$t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be(this,Vt,$t);default:if(ue)throw new TypeError("Unknown encoding: "+Rt);Rt=(Rt+"").toLowerCase(),ue=!0}}mt.prototype._isBuffer=!0;function Ft(Rt,Vt,$t){var ue=Rt[Vt];Rt[Vt]=Rt[$t],Rt[$t]=ue}mt.prototype.swap16=function(){var Vt=this.length;if(Vt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var $t=0;$t<Vt;$t+=2)Ft(this,$t,$t+1);return this},mt.prototype.swap32=function(){var Vt=this.length;if(Vt%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var $t=0;$t<Vt;$t+=4)Ft(this,$t,$t+3),Ft(this,$t+1,$t+2);return this},mt.prototype.swap64=function(){var Vt=this.length;if(Vt%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var $t=0;$t<Vt;$t+=8)Ft(this,$t,$t+7),Ft(this,$t+1,$t+6),Ft(this,$t+2,$t+5),Ft(this,$t+3,$t+4);return this},mt.prototype.toString=function(){var Vt=this.length;return Vt===0?"":arguments.length===0?ce(this,0,Vt):Dt.apply(this,arguments)},mt.prototype.toLocaleString=mt.prototype.toString,mt.prototype.equals=function(Vt){if(!mt.isBuffer(Vt))throw new TypeError("Argument must be a Buffer");return this===Vt?!0:mt.compare(this,Vt)===0},mt.prototype.inspect=function(){var Vt="",$t=Bt.INSPECT_MAX_BYTES;return Vt=this.toString("hex",0,$t).replace(/(.{2})/g,"$1 ").trim(),this.length>$t&&(Vt+=" ... "),"<Buffer "+Vt+">"},mt.prototype.compare=function(Vt,$t,ue,ge,Me){if(ee(Vt,Uint8Array)&&(Vt=mt.from(Vt,Vt.offset,Vt.byteLength)),!mt.isBuffer(Vt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Vt);if($t===void 0&&($t=0),ue===void 0&&(ue=Vt?Vt.length:0),ge===void 0&&(ge=0),Me===void 0&&(Me=this.length),$t<0||ue>Vt.length||ge<0||Me>this.length)throw new RangeError("out of range index");if(ge>=Me&&$t>=ue)return 0;if(ge>=Me)return-1;if($t>=ue)return 1;if($t>>>=0,ue>>>=0,ge>>>=0,Me>>>=0,this===Vt)return 0;for(var Ae=Me-ge,Be=ue-$t,Ze=Math.min(Ae,Be),Ye=this.slice(ge,Me),Qe=Vt.slice($t,ue),He=0;He<Ze;++He)if(Ye[He]!==Qe[He]){Ae=Ye[He],Be=Qe[He];break}return Ae<Be?-1:Be<Ae?1:0};function Nt(Rt,Vt,$t,ue,ge){if(Rt.length===0)return-1;if(typeof $t=="string"?(ue=$t,$t=0):$t>2147483647?$t=2147483647:$t<-2147483648&&($t=-2147483648),$t=+$t,It($t)&&($t=ge?0:Rt.length-1),$t<0&&($t=Rt.length+$t),$t>=Rt.length){if(ge)return-1;$t=Rt.length-1}else if($t<0)if(ge)$t=0;else return-1;if(typeof Vt=="string"&&(Vt=mt.from(Vt,ue)),mt.isBuffer(Vt))return Vt.length===0?-1:jt(Rt,Vt,$t,ue,ge);if(typeof Vt=="number")return Vt=Vt&255,typeof Uint8Array.prototype.indexOf=="function"?ge?Uint8Array.prototype.indexOf.call(Rt,Vt,$t):Uint8Array.prototype.lastIndexOf.call(Rt,Vt,$t):jt(Rt,[Vt],$t,ue,ge);throw new TypeError("val must be string, number or Buffer")}function jt(Rt,Vt,$t,ue,ge){var Me=1,Ae=Rt.length,Be=Vt.length;if(ue!==void 0&&(ue=String(ue).toLowerCase(),ue==="ucs2"||ue==="ucs-2"||ue==="utf16le"||ue==="utf-16le")){if(Rt.length<2||Vt.length<2)return-1;Me=2,Ae/=2,Be/=2,$t/=2}function Ze(We,Ve){return Me===1?We[Ve]:We.readUInt16BE(Ve*Me)}var Ye;if(ge){var Qe=-1;for(Ye=$t;Ye<Ae;Ye++)if(Ze(Rt,Ye)===Ze(Vt,Qe===-1?0:Ye-Qe)){if(Qe===-1&&(Qe=Ye),Ye-Qe+1===Be)return Qe*Me}else Qe!==-1&&(Ye-=Ye-Qe),Qe=-1}else for($t+Be>Ae&&($t=Ae-Be),Ye=$t;Ye>=0;Ye--){for(var He=!0,Ue=0;Ue<Be;Ue++)if(Ze(Rt,Ye+Ue)!==Ze(Vt,Ue)){He=!1;break}if(He)return Ye}return-1}mt.prototype.includes=function(Vt,$t,ue){return this.indexOf(Vt,$t,ue)!==-1},mt.prototype.indexOf=function(Vt,$t,ue){return Nt(this,Vt,$t,ue,!0)},mt.prototype.lastIndexOf=function(Vt,$t,ue){return Nt(this,Vt,$t,ue,!1)};function Gt(Rt,Vt,$t,ue){$t=Number($t)||0;var ge=Rt.length-$t;ue?(ue=Number(ue),ue>ge&&(ue=ge)):ue=ge;var Me=Vt.length;ue>Me/2&&(ue=Me/2);for(var Ae=0;Ae<ue;++Ae){var Be=parseInt(Vt.substr(Ae*2,2),16);if(It(Be))return Ae;Rt[$t+Ae]=Be}return Ae}function Wt(Rt,Vt,$t,ue){return Xt(re(Vt,Rt.length-$t),Rt,$t,ue)}function Jt(Rt,Vt,$t,ue){return Xt(Kt(Vt),Rt,$t,ue)}function Ut(Rt,Vt,$t,ue){return Jt(Rt,Vt,$t,ue)}function Ht(Rt,Vt,$t,ue){return Xt(Lt(Vt),Rt,$t,ue)}function oe(Rt,Vt,$t,ue){return Xt(wt(Vt,Rt.length-$t),Rt,$t,ue)}mt.prototype.write=function(Vt,$t,ue,ge){if($t===void 0)ge="utf8",ue=this.length,$t=0;else if(ue===void 0&&typeof $t=="string")ge=$t,ue=this.length,$t=0;else if(isFinite($t))$t=$t>>>0,isFinite(ue)?(ue=ue>>>0,ge===void 0&&(ge="utf8")):(ge=ue,ue=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Me=this.length-$t;if((ue===void 0||ue>Me)&&(ue=Me),Vt.length>0&&(ue<0||$t<0)||$t>this.length)throw new RangeError("Attempt to write outside buffer bounds");ge||(ge="utf8");for(var Ae=!1;;)switch(ge){case"hex":return Gt(this,Vt,$t,ue);case"utf8":case"utf-8":return Wt(this,Vt,$t,ue);case"ascii":return Jt(this,Vt,$t,ue);case"latin1":case"binary":return Ut(this,Vt,$t,ue);case"base64":return Ht(this,Vt,$t,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,Vt,$t,ue);default:if(Ae)throw new TypeError("Unknown encoding: "+ge);ge=(""+ge).toLowerCase(),Ae=!0}},mt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function se(Rt,Vt,$t){return Vt===0&&$t===Rt.length?gt.fromByteArray(Rt):gt.fromByteArray(Rt.slice(Vt,$t))}function ce(Rt,Vt,$t){$t=Math.min(Rt.length,$t);for(var ue=[],ge=Vt;ge<$t;){var Me=Rt[ge],Ae=null,Be=Me>239?4:Me>223?3:Me>191?2:1;if(ge+Be<=$t){var Ze,Ye,Qe,He;switch(Be){case 1:Me<128&&(Ae=Me);break;case 2:Ze=Rt[ge+1],(Ze&192)===128&&(He=(Me&31)<<6|Ze&63,He>127&&(Ae=He));break;case 3:Ze=Rt[ge+1],Ye=Rt[ge+2],(Ze&192)===128&&(Ye&192)===128&&(He=(Me&15)<<12|(Ze&63)<<6|Ye&63,He>2047&&(He<55296||He>57343)&&(Ae=He));break;case 4:Ze=Rt[ge+1],Ye=Rt[ge+2],Qe=Rt[ge+3],(Ze&192)===128&&(Ye&192)===128&&(Qe&192)===128&&(He=(Me&15)<<18|(Ze&63)<<12|(Ye&63)<<6|Qe&63,He>65535&&He<1114112&&(Ae=He))}}Ae===null?(Ae=65533,Be=1):Ae>65535&&(Ae-=65536,ue.push(Ae>>>10&1023|55296),Ae=56320|Ae&1023),ue.push(Ae),ge+=Be}return Yt(ue)}var Pe=4096;function Yt(Rt){var Vt=Rt.length;if(Vt<=Pe)return String.fromCharCode.apply(String,Rt);for(var $t="",ue=0;ue<Vt;)$t+=String.fromCharCode.apply(String,Rt.slice(ue,ue+=Pe));return $t}function ne(Rt,Vt,$t){var ue="";$t=Math.min(Rt.length,$t);for(var ge=Vt;ge<$t;++ge)ue+=String.fromCharCode(Rt[ge]&127);return ue}function ve(Rt,Vt,$t){var ue="";$t=Math.min(Rt.length,$t);for(var ge=Vt;ge<$t;++ge)ue+=String.fromCharCode(Rt[ge]);return ue}function Se(Rt,Vt,$t){var ue=Rt.length;(!Vt||Vt<0)&&(Vt=0),(!$t||$t<0||$t>ue)&&($t=ue);for(var ge="",Me=Vt;Me<$t;++Me)ge+=xe(Rt[Me]);return ge}function be(Rt,Vt,$t){for(var ue=Rt.slice(Vt,$t),ge="",Me=0;Me<ue.length;Me+=2)ge+=String.fromCharCode(ue[Me]+ue[Me+1]*256);return ge}mt.prototype.slice=function(Vt,$t){var ue=this.length;Vt=~~Vt,$t=$t===void 0?ue:~~$t,Vt<0?(Vt+=ue,Vt<0&&(Vt=0)):Vt>ue&&(Vt=ue),$t<0?($t+=ue,$t<0&&($t=0)):$t>ue&&($t=ue),$t<Vt&&($t=Vt);var ge=this.subarray(Vt,$t);return ge.__proto__=mt.prototype,ge};function fe(Rt,Vt,$t){if(Rt%1!==0||Rt<0)throw new RangeError("offset is not uint");if(Rt+Vt>$t)throw new RangeError("Trying to access beyond buffer length")}mt.prototype.readUIntLE=function(Vt,$t,ue){Vt=Vt>>>0,$t=$t>>>0,ue||fe(Vt,$t,this.length);for(var ge=this[Vt],Me=1,Ae=0;++Ae<$t&&(Me*=256);)ge+=this[Vt+Ae]*Me;return ge},mt.prototype.readUIntBE=function(Vt,$t,ue){Vt=Vt>>>0,$t=$t>>>0,ue||fe(Vt,$t,this.length);for(var ge=this[Vt+--$t],Me=1;$t>0&&(Me*=256);)ge+=this[Vt+--$t]*Me;return ge},mt.prototype.readUInt8=function(Vt,$t){return Vt=Vt>>>0,$t||fe(Vt,1,this.length),this[Vt]},mt.prototype.readUInt16LE=function(Vt,$t){return Vt=Vt>>>0,$t||fe(Vt,2,this.length),this[Vt]|this[Vt+1]<<8},mt.prototype.readUInt16BE=function(Vt,$t){return Vt=Vt>>>0,$t||fe(Vt,2,this.length),this[Vt]<<8|this[Vt+1]},mt.prototype.readUInt32LE=function(Vt,$t){return Vt=Vt>>>0,$t||fe(Vt,4,this.length),(this[Vt]|this[Vt+1]<<8|this[Vt+2]<<16)+this[Vt+3]*16777216},mt.prototype.readUInt32BE=function(Vt,$t){return Vt=Vt>>>0,$t||fe(Vt,4,this.length),this[Vt]*16777216+(this[Vt+1]<<16|this[Vt+2]<<8|this[Vt+3])},mt.prototype.readIntLE=function(Vt,$t,ue){Vt=Vt>>>0,$t=$t>>>0,ue||fe(Vt,$t,this.length);for(var ge=this[Vt],Me=1,Ae=0;++Ae<$t&&(Me*=256);)ge+=this[Vt+Ae]*Me;return Me*=128,ge>=Me&&(ge-=Math.pow(2,8*$t)),ge},mt.prototype.readIntBE=function(Vt,$t,ue){Vt=Vt>>>0,$t=$t>>>0,ue||fe(Vt,$t,this.length);for(var ge=$t,Me=1,Ae=this[Vt+--ge];ge>0&&(Me*=256);)Ae+=this[Vt+--ge]*Me;return Me*=128,Ae>=Me&&(Ae-=Math.pow(2,8*$t)),Ae},mt.prototype.readInt8=function(Vt,$t){return Vt=Vt>>>0,$t||fe(Vt,1,this.length),this[Vt]&128?(255-this[Vt]+1)*-1:this[Vt]},mt.prototype.readInt16LE=function(Vt,$t){Vt=Vt>>>0,$t||fe(Vt,2,this.length);var ue=this[Vt]|this[Vt+1]<<8;return ue&32768?ue|4294901760:ue},mt.prototype.readInt16BE=function(Vt,$t){Vt=Vt>>>0,$t||fe(Vt,2,this.length);var ue=this[Vt+1]|this[Vt]<<8;return ue&32768?ue|4294901760:ue},mt.prototype.readInt32LE=function(Vt,$t){return Vt=Vt>>>0,$t||fe(Vt,4,this.length),this[Vt]|this[Vt+1]<<8|this[Vt+2]<<16|this[Vt+3]<<24},mt.prototype.readInt32BE=function(Vt,$t){return Vt=Vt>>>0,$t||fe(Vt,4,this.length),this[Vt]<<24|this[Vt+1]<<16|this[Vt+2]<<8|this[Vt+3]},mt.prototype.readFloatLE=function(Vt,$t){return Vt=Vt>>>0,$t||fe(Vt,4,this.length),kt.read(this,Vt,!0,23,4)},mt.prototype.readFloatBE=function(Vt,$t){return Vt=Vt>>>0,$t||fe(Vt,4,this.length),kt.read(this,Vt,!1,23,4)},mt.prototype.readDoubleLE=function(Vt,$t){return Vt=Vt>>>0,$t||fe(Vt,8,this.length),kt.read(this,Vt,!0,52,8)},mt.prototype.readDoubleBE=function(Vt,$t){return Vt=Vt>>>0,$t||fe(Vt,8,this.length),kt.read(this,Vt,!1,52,8)};function pe(Rt,Vt,$t,ue,ge,Me){if(!mt.isBuffer(Rt))throw new TypeError('"buffer" argument must be a Buffer instance');if(Vt>ge||Vt<Me)throw new RangeError('"value" argument is out of bounds');if($t+ue>Rt.length)throw new RangeError("Index out of range")}mt.prototype.writeUIntLE=function(Vt,$t,ue,ge){if(Vt=+Vt,$t=$t>>>0,ue=ue>>>0,!ge){var Me=Math.pow(2,8*ue)-1;pe(this,Vt,$t,ue,Me,0)}var Ae=1,Be=0;for(this[$t]=Vt&255;++Be<ue&&(Ae*=256);)this[$t+Be]=Vt/Ae&255;return $t+ue},mt.prototype.writeUIntBE=function(Vt,$t,ue,ge){if(Vt=+Vt,$t=$t>>>0,ue=ue>>>0,!ge){var Me=Math.pow(2,8*ue)-1;pe(this,Vt,$t,ue,Me,0)}var Ae=ue-1,Be=1;for(this[$t+Ae]=Vt&255;--Ae>=0&&(Be*=256);)this[$t+Ae]=Vt/Be&255;return $t+ue},mt.prototype.writeUInt8=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,1,255,0),this[$t]=Vt&255,$t+1},mt.prototype.writeUInt16LE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,2,65535,0),this[$t]=Vt&255,this[$t+1]=Vt>>>8,$t+2},mt.prototype.writeUInt16BE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,2,65535,0),this[$t]=Vt>>>8,this[$t+1]=Vt&255,$t+2},mt.prototype.writeUInt32LE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,4,4294967295,0),this[$t+3]=Vt>>>24,this[$t+2]=Vt>>>16,this[$t+1]=Vt>>>8,this[$t]=Vt&255,$t+4},mt.prototype.writeUInt32BE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,4,4294967295,0),this[$t]=Vt>>>24,this[$t+1]=Vt>>>16,this[$t+2]=Vt>>>8,this[$t+3]=Vt&255,$t+4},mt.prototype.writeIntLE=function(Vt,$t,ue,ge){if(Vt=+Vt,$t=$t>>>0,!ge){var Me=Math.pow(2,8*ue-1);pe(this,Vt,$t,ue,Me-1,-Me)}var Ae=0,Be=1,Ze=0;for(this[$t]=Vt&255;++Ae<ue&&(Be*=256);)Vt<0&&Ze===0&&this[$t+Ae-1]!==0&&(Ze=1),this[$t+Ae]=(Vt/Be>>0)-Ze&255;return $t+ue},mt.prototype.writeIntBE=function(Vt,$t,ue,ge){if(Vt=+Vt,$t=$t>>>0,!ge){var Me=Math.pow(2,8*ue-1);pe(this,Vt,$t,ue,Me-1,-Me)}var Ae=ue-1,Be=1,Ze=0;for(this[$t+Ae]=Vt&255;--Ae>=0&&(Be*=256);)Vt<0&&Ze===0&&this[$t+Ae+1]!==0&&(Ze=1),this[$t+Ae]=(Vt/Be>>0)-Ze&255;return $t+ue},mt.prototype.writeInt8=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,1,127,-128),Vt<0&&(Vt=255+Vt+1),this[$t]=Vt&255,$t+1},mt.prototype.writeInt16LE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,2,32767,-32768),this[$t]=Vt&255,this[$t+1]=Vt>>>8,$t+2},mt.prototype.writeInt16BE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,2,32767,-32768),this[$t]=Vt>>>8,this[$t+1]=Vt&255,$t+2},mt.prototype.writeInt32LE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,4,2147483647,-2147483648),this[$t]=Vt&255,this[$t+1]=Vt>>>8,this[$t+2]=Vt>>>16,this[$t+3]=Vt>>>24,$t+4},mt.prototype.writeInt32BE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,4,2147483647,-2147483648),Vt<0&&(Vt=4294967295+Vt+1),this[$t]=Vt>>>24,this[$t+1]=Vt>>>16,this[$t+2]=Vt>>>8,this[$t+3]=Vt&255,$t+4};function he(Rt,Vt,$t,ue,ge,Me){if($t+ue>Rt.length)throw new RangeError("Index out of range");if($t<0)throw new RangeError("Index out of range")}function Ce(Rt,Vt,$t,ue,ge){return Vt=+Vt,$t=$t>>>0,ge||he(Rt,Vt,$t,4,34028234663852886e22,-34028234663852886e22),kt.write(Rt,Vt,$t,ue,23,4),$t+4}mt.prototype.writeFloatLE=function(Vt,$t,ue){return Ce(this,Vt,$t,!0,ue)},mt.prototype.writeFloatBE=function(Vt,$t,ue){return Ce(this,Vt,$t,!1,ue)};function de(Rt,Vt,$t,ue,ge){return Vt=+Vt,$t=$t>>>0,ge||he(Rt,Vt,$t,8,17976931348623157e292,-17976931348623157e292),kt.write(Rt,Vt,$t,ue,52,8),$t+8}mt.prototype.writeDoubleLE=function(Vt,$t,ue){return de(this,Vt,$t,!0,ue)},mt.prototype.writeDoubleBE=function(Vt,$t,ue){return de(this,Vt,$t,!1,ue)},mt.prototype.copy=function(Vt,$t,ue,ge){if(!mt.isBuffer(Vt))throw new TypeError("argument should be a Buffer");if(ue||(ue=0),!ge&&ge!==0&&(ge=this.length),$t>=Vt.length&&($t=Vt.length),$t||($t=0),ge>0&&ge<ue&&(ge=ue),ge===ue||Vt.length===0||this.length===0)return 0;if($t<0)throw new RangeError("targetStart out of bounds");if(ue<0||ue>=this.length)throw new RangeError("Index out of range");if(ge<0)throw new RangeError("sourceEnd out of bounds");ge>this.length&&(ge=this.length),Vt.length-$t<ge-ue&&(ge=Vt.length-$t+ue);var Me=ge-ue;if(this===Vt&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin($t,ue,ge);else if(this===Vt&&ue<$t&&$t<ge)for(var Ae=Me-1;Ae>=0;--Ae)Vt[Ae+$t]=this[Ae+ue];else Uint8Array.prototype.set.call(Vt,this.subarray(ue,ge),$t);return Me},mt.prototype.fill=function(Vt,$t,ue,ge){if(typeof Vt=="string"){if(typeof $t=="string"?(ge=$t,$t=0,ue=this.length):typeof ue=="string"&&(ge=ue,ue=this.length),ge!==void 0&&typeof ge!="string")throw new TypeError("encoding must be a string");if(typeof ge=="string"&&!mt.isEncoding(ge))throw new TypeError("Unknown encoding: "+ge);if(Vt.length===1){var Me=Vt.charCodeAt(0);(ge==="utf8"&&Me<128||ge==="latin1")&&(Vt=Me)}}else typeof Vt=="number"&&(Vt=Vt&255);if($t<0||this.length<$t||this.length<ue)throw new RangeError("Out of range index");if(ue<=$t)return this;$t=$t>>>0,ue=ue===void 0?this.length:ue>>>0,Vt||(Vt=0);var Ae;if(typeof Vt=="number")for(Ae=$t;Ae<ue;++Ae)this[Ae]=Vt;else{var Be=mt.isBuffer(Vt)?Vt:mt.from(Vt,ge),Ze=Be.length;if(Ze===0)throw new TypeError('The value "'+Vt+'" is invalid for argument "value"');for(Ae=0;Ae<ue-$t;++Ae)this[Ae+$t]=Be[Ae%Ze]}return this};var ye=/[^+/0-9A-Za-z-_]/g;function Ne(Rt){if(Rt=Rt.split("=")[0],Rt=Rt.trim().replace(ye,""),Rt.length<2)return"";for(;Rt.length%4!==0;)Rt=Rt+"=";return Rt}function xe(Rt){return Rt<16?"0"+Rt.toString(16):Rt.toString(16)}function re(Rt,Vt){Vt=Vt||1/0;for(var $t,ue=Rt.length,ge=null,Me=[],Ae=0;Ae<ue;++Ae){if($t=Rt.charCodeAt(Ae),$t>55295&&$t<57344){if(!ge){if($t>56319){(Vt-=3)>-1&&Me.push(239,191,189);continue}else if(Ae+1===ue){(Vt-=3)>-1&&Me.push(239,191,189);continue}ge=$t;continue}if($t<56320){(Vt-=3)>-1&&Me.push(239,191,189),ge=$t;continue}$t=(ge-55296<<10|$t-56320)+65536}else ge&&(Vt-=3)>-1&&Me.push(239,191,189);if(ge=null,$t<128){if((Vt-=1)<0)break;Me.push($t)}else if($t<2048){if((Vt-=2)<0)break;Me.push($t>>6|192,$t&63|128)}else if($t<65536){if((Vt-=3)<0)break;Me.push($t>>12|224,$t>>6&63|128,$t&63|128)}else if($t<1114112){if((Vt-=4)<0)break;Me.push($t>>18|240,$t>>12&63|128,$t>>6&63|128,$t&63|128)}else throw new Error("Invalid code point")}return Me}function Kt(Rt){for(var Vt=[],$t=0;$t<Rt.length;++$t)Vt.push(Rt.charCodeAt($t)&255);return Vt}function wt(Rt,Vt){for(var $t,ue,ge,Me=[],Ae=0;Ae<Rt.length&&!((Vt-=2)<0);++Ae)$t=Rt.charCodeAt(Ae),ue=$t>>8,ge=$t%256,Me.push(ge),Me.push(ue);return Me}function Lt(Rt){return gt.toByteArray(Ne(Rt))}function Xt(Rt,Vt,$t,ue){for(var ge=0;ge<ue&&!(ge+$t>=Vt.length||ge>=Rt.length);++ge)Vt[ge+$t]=Rt[ge];return ge}function ee(Rt,Vt){return Rt instanceof Vt||Rt!=null&&Rt.constructor!=null&&Rt.constructor.name!=null&&Rt.constructor.name===Vt.name}function It(Rt){return Rt!==Rt}}).call(this)}).call(this,ot("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(ot,_t,Bt){_t.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(ot,_t,Bt){"use strict";var vt=ot("get-intrinsic"),gt=ot("./"),kt=gt(vt("String.prototype.indexOf"));_t.exports=function(St,Tt){var mt=vt(St,!!Tt);return typeof mt=="function"&&kt(St,".prototype.")>-1?gt(mt):mt}},{"./":93,"get-intrinsic":348}],93:[function(ot,_t,Bt){"use strict";var vt=ot("function-bind"),gt=ot("get-intrinsic"),kt=gt("%Function.prototype.apply%"),bt=gt("%Function.prototype.call%"),St=gt("%Reflect.apply%",!0)||vt.call(bt,kt),Tt=gt("%Object.getOwnPropertyDescriptor%",!0),mt=gt("%Object.defineProperty%",!0),xt=gt("%Math.max%");if(mt)try{mt({},"a",{value:1})}catch(z){mt=null}_t.exports=function(tt){var at=St(vt,bt,arguments);if(Tt&&mt){var it=Tt(at,"length");it.configurable&&mt(at,"length",{value:1+xt(0,tt.length-(arguments.length-1))})}return at};var ft=function(){return St(vt,kt,arguments)};mt?mt(_t.exports,"apply",{value:ft}):_t.exports.apply=ft},{"function-bind":347,"get-intrinsic":348}],94:[function(ot,_t,Bt){"use strict";var vt=Array.prototype.slice;_t.exports=gt;function gt(bt,St){if(!(this instanceof gt))return new gt(bt,St);this.src=bt,this._withAccess=St}gt.prototype.withAccess=function(bt){return this._withAccess=bt!==!1,this},gt.prototype.pick=function(bt){return Array.isArray(bt)||(bt=vt.call(arguments)),bt.length&&(this.keys=bt),this},gt.prototype.to=function(bt){if(bt=bt||{},!this.src)return bt;var St=this.keys||Object.keys(this.src);if(!this._withAccess){for(var Tt=0;Tt<St.length;Tt++)mt=St[Tt],bt[mt]===void 0&&(bt[mt]=this.src[mt]);return bt}for(var Tt=0;Tt<St.length;Tt++){var mt=St[Tt];if(kt(bt,mt)){var xt=this.src.__lookupGetter__(mt),ft=this.src.__lookupSetter__(mt);xt&&bt.__defineGetter__(mt,xt),ft&&bt.__defineSetter__(mt,ft),!xt&&!ft&&(bt[mt]=this.src[mt])}}return bt},gt.prototype.toCover=function(bt){for(var St=this.keys||Object.keys(this.src),Tt=0;Tt<St.length;Tt++){var mt=St[Tt];delete bt[mt];var xt=this.src.__lookupGetter__(mt),ft=this.src.__lookupSetter__(mt);xt&&bt.__defineGetter__(mt,xt),ft&&bt.__defineSetter__(mt,ft),!xt&&!ft&&(bt[mt]=this.src[mt])}},gt.prototype.override=gt.prototype.toCover,gt.prototype.and=function(bt){var St={};return this.to(St),this.src=bt,this.to(St),this.src=St,this};function kt(bt,St){return bt[St]===void 0&&bt.__lookupGetter__(St)===void 0&&bt.__lookupSetter__(St)===void 0}},{}],95:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=ot("../internals/try-to-string"),bt=vt.TypeError;_t.exports=function(St){if(gt(St))return St;throw bt(kt(St)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-constructor"),kt=ot("../internals/try-to-string"),bt=vt.TypeError;_t.exports=function(St){if(gt(St))return St;throw bt(kt(St)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=vt.String,bt=vt.TypeError;_t.exports=function(St){if(typeof St=="object"||gt(St))return St;throw bt("Can't set "+kt(St)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(ot,_t,Bt){var vt=ot("../internals/well-known-symbol"),gt=ot("../internals/object-create"),kt=ot("../internals/object-define-property"),bt=vt("unscopables"),St=Array.prototype;St[bt]==null&&kt.f(St,bt,{configurable:!0,value:gt(null)}),_t.exports=function(Tt){St[bt][Tt]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/string-multibyte").charAt;_t.exports=function(gt,kt,bt){return kt+(bt?vt(gt,kt).length:1)}},{"../internals/string-multibyte":239}],100:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/object-is-prototype-of"),kt=vt.TypeError;_t.exports=function(bt,St){if(gt(St,bt))return bt;throw kt("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-object"),kt=vt.String,bt=vt.TypeError;_t.exports=function(St){if(gt(St))return St;throw bt(kt(St)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(ot,_t,Bt){_t.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-native"),gt=ot("../internals/descriptors"),kt=ot("../internals/global"),bt=ot("../internals/is-callable"),St=ot("../internals/is-object"),Tt=ot("../internals/has-own-property"),mt=ot("../internals/classof"),xt=ot("../internals/try-to-string"),ft=ot("../internals/create-non-enumerable-property"),z=ot("../internals/redefine"),tt=ot("../internals/object-define-property").f,at=ot("../internals/object-is-prototype-of"),it=ot("../internals/object-get-prototype-of"),lt=ot("../internals/object-set-prototype-of"),ut=ot("../internals/well-known-symbol"),dt=ot("../internals/uid"),Pt=kt.Int8Array,At=Pt&&Pt.prototype,Dt=kt.Uint8ClampedArray,Ft=Dt&&Dt.prototype,Nt=Pt&&it(Pt),jt=At&&it(At),Gt=Object.prototype,Wt=kt.TypeError,Jt=ut("toStringTag"),Ut=dt("TYPED_ARRAY_TAG"),Ht=dt("TYPED_ARRAY_CONSTRUCTOR"),oe=vt&&!!lt&&mt(kt.opera)!=="Opera",se=!1,ce,Pe,Yt,ne={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},ve={BigInt64Array:8,BigUint64Array:8},Se=function(ye){if(!St(ye))return!1;var Ne=mt(ye);return Ne==="DataView"||Tt(ne,Ne)||Tt(ve,Ne)},be=function(de){if(!St(de))return!1;var ye=mt(de);return Tt(ne,ye)||Tt(ve,ye)},fe=function(de){if(be(de))return de;throw Wt("Target is not a typed array")},pe=function(de){if(bt(de)&&(!lt||at(Nt,de)))return de;throw Wt(xt(de)+" is not a typed array constructor")},he=function(de,ye,Ne,xe){if(gt){if(Ne)for(var re in ne){var Kt=kt[re];if(Kt&&Tt(Kt.prototype,de))try{delete Kt.prototype[de]}catch(wt){try{Kt.prototype[de]=ye}catch(Lt){}}}(!jt[de]||Ne)&&z(jt,de,Ne?ye:oe&&At[de]||ye,xe)}},Ce=function(de,ye,Ne){var xe,re;if(gt){if(lt){if(Ne){for(xe in ne)if(re=kt[xe],re&&Tt(re,de))try{delete re[de]}catch(Kt){}}if(!Nt[de]||Ne)try{return z(Nt,de,Ne?ye:oe&&Nt[de]||ye)}catch(Kt){}else return}for(xe in ne)re=kt[xe],re&&(!re[de]||Ne)&&z(re,de,ye)}};for(ce in ne)Pe=kt[ce],Yt=Pe&&Pe.prototype,Yt?ft(Yt,Ht,Pe):oe=!1;for(ce in ve)Pe=kt[ce],Yt=Pe&&Pe.prototype,Yt&&ft(Yt,Ht,Pe);if((!oe||!bt(Nt)||Nt===Function.prototype)&&(Nt=function(){throw Wt("Incorrect invocation")},oe))for(ce in ne)kt[ce]&<(kt[ce],Nt);if((!oe||!jt||jt===Gt)&&(jt=Nt.prototype,oe))for(ce in ne)kt[ce]&<(kt[ce].prototype,jt);if(oe&&it(Ft)!==jt&<(Ft,jt),gt&&!Tt(jt,Jt)){se=!0,tt(jt,Jt,{get:function(){return St(this)?this[Ut]:void 0}});for(ce in ne)kt[ce]&&ft(kt[ce],Ut,ce)}_t.exports={NATIVE_ARRAY_BUFFER_VIEWS:oe,TYPED_ARRAY_CONSTRUCTOR:Ht,TYPED_ARRAY_TAG:se&&Ut,aTypedArray:fe,aTypedArrayConstructor:pe,exportTypedArrayMethod:he,exportTypedArrayStaticMethod:Ce,isView:Se,isTypedArray:be,TypedArray:Nt,TypedArrayPrototype:jt}},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/descriptors"),bt=ot("../internals/array-buffer-native"),St=ot("../internals/function-name"),Tt=ot("../internals/create-non-enumerable-property"),mt=ot("../internals/redefine-all"),xt=ot("../internals/fails"),ft=ot("../internals/an-instance"),z=ot("../internals/to-integer-or-infinity"),tt=ot("../internals/to-length"),at=ot("../internals/to-index"),it=ot("../internals/ieee754"),lt=ot("../internals/object-get-prototype-of"),ut=ot("../internals/object-set-prototype-of"),dt=ot("../internals/object-get-own-property-names").f,Pt=ot("../internals/object-define-property").f,At=ot("../internals/array-fill"),Dt=ot("../internals/array-slice-simple"),Ft=ot("../internals/set-to-string-tag"),Nt=ot("../internals/internal-state"),jt=St.PROPER,Gt=St.CONFIGURABLE,Wt=Nt.get,Jt=Nt.set,Ut="ArrayBuffer",Ht="DataView",oe="prototype",se="Wrong length",ce="Wrong index",Pe=vt[Ut],Yt=Pe,ne=Yt&&Yt[oe],ve=vt[Ht],Se=ve&&ve[oe],be=Object.prototype,fe=vt.Array,pe=vt.RangeError,he=gt(At),Ce=gt([].reverse),de=it.pack,ye=it.unpack,Ne=function(Ae){return[Ae&255]},xe=function(Ae){return[Ae&255,Ae>>8&255]},re=function(Ae){return[Ae&255,Ae>>8&255,Ae>>16&255,Ae>>24&255]},Kt=function(Ae){return Ae[3]<<24|Ae[2]<<16|Ae[1]<<8|Ae[0]},wt=function(Ae){return de(Ae,23,4)},Lt=function(Ae){return de(Ae,52,8)},Xt=function(Ae,Be){Pt(Ae[oe],Be,{get:function(){return Wt(this)[Be]}})},ee=function(Ae,Be,Ze,Ye){var Qe=at(Ze),He=Wt(Ae);if(Qe+Be>He.byteLength)throw pe(ce);var Ue=Wt(He.buffer).bytes,We=Qe+He.byteOffset,Ve=Dt(Ue,We,We+Be);return Ye?Ve:Ce(Ve)},It=function(Ae,Be,Ze,Ye,Qe,He){var Ue=at(Ze),We=Wt(Ae);if(Ue+Be>We.byteLength)throw pe(ce);for(var Ve=Wt(We.buffer).bytes,rn=Ue+We.byteOffset,an=Ye(+Qe),ln=0;ln<Be;ln++)Ve[rn+ln]=an[He?ln:Be-ln-1]};if(!bt)Yt=function(Be){ft(this,ne);var Ze=at(Be);Jt(this,{bytes:he(fe(Ze),0),byteLength:Ze}),kt||(this.byteLength=Ze)},ne=Yt[oe],ve=function(Be,Ze,Ye){ft(this,Se),ft(Be,ne);var Qe=Wt(Be).byteLength,He=z(Ze);if(He<0||He>Qe)throw pe("Wrong offset");if(Ye=Ye===void 0?Qe-He:tt(Ye),He+Ye>Qe)throw pe(se);Jt(this,{buffer:Be,byteLength:Ye,byteOffset:He}),kt||(this.buffer=Be,this.byteLength=Ye,this.byteOffset=He)},Se=ve[oe],kt&&(Xt(Yt,"byteLength"),Xt(ve,"buffer"),Xt(ve,"byteLength"),Xt(ve,"byteOffset")),mt(Se,{getInt8:function(Be){return ee(this,1,Be)[0]<<24>>24},getUint8:function(Be){return ee(this,1,Be)[0]},getInt16:function(Be){var Ze=ee(this,2,Be,arguments.length>1?arguments[1]:void 0);return(Ze[1]<<8|Ze[0])<<16>>16},getUint16:function(Be){var Ze=ee(this,2,Be,arguments.length>1?arguments[1]:void 0);return Ze[1]<<8|Ze[0]},getInt32:function(Be){return Kt(ee(this,4,Be,arguments.length>1?arguments[1]:void 0))},getUint32:function(Be){return Kt(ee(this,4,Be,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Be){return ye(ee(this,4,Be,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Be){return ye(ee(this,8,Be,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Be,Ze){It(this,1,Be,Ne,Ze)},setUint8:function(Be,Ze){It(this,1,Be,Ne,Ze)},setInt16:function(Be,Ze){It(this,2,Be,xe,Ze,arguments.length>2?arguments[2]:void 0)},setUint16:function(Be,Ze){It(this,2,Be,xe,Ze,arguments.length>2?arguments[2]:void 0)},setInt32:function(Be,Ze){It(this,4,Be,re,Ze,arguments.length>2?arguments[2]:void 0)},setUint32:function(Be,Ze){It(this,4,Be,re,Ze,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Be,Ze){It(this,4,Be,wt,Ze,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Be,Ze){It(this,8,Be,Lt,Ze,arguments.length>2?arguments[2]:void 0)}});else{var Rt=jt&&Pe.name!==Ut;if(!xt(function(){Pe(1)})||!xt(function(){new Pe(-1)})||xt(function(){return new Pe,new Pe(1.5),new Pe(NaN),Rt&&!Gt})){Yt=function(Be){return ft(this,ne),new Pe(at(Be))},Yt[oe]=ne;for(var Vt=dt(Pe),$t=0,ue;Vt.length>$t;)(ue=Vt[$t++])in Yt||Tt(Yt,ue,Pe[ue]);ne.constructor=Yt}else Rt&&Gt&&Tt(Pe,"name",Ut);ut&<(Se)!==be&&ut(Se,be);var ge=new ve(new Yt(2)),Me=gt(Se.setInt8);ge.setInt8(0,2147483648),ge.setInt8(1,2147483649),(ge.getInt8(0)||!ge.getInt8(1))&&mt(Se,{setInt8:function(Be,Ze){Me(this,Be,Ze<<24>>24)},setUint8:function(Be,Ze){Me(this,Be,Ze<<24>>24)}},{unsafe:!0})}Ft(Yt,Ut),Ft(ve,Ht),_t.exports={ArrayBuffer:Yt,DataView:ve}},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/to-object"),gt=ot("../internals/to-absolute-index"),kt=ot("../internals/length-of-array-like"),bt=Math.min;_t.exports=[].copyWithin||function(Tt,mt){var xt=vt(this),ft=kt(xt),z=gt(Tt,ft),tt=gt(mt,ft),at=arguments.length>2?arguments[2]:void 0,it=bt((at===void 0?ft:gt(at,ft))-tt,ft-z),lt=1;for(tt<z&&z<tt+it&&(lt=-1,tt+=it-1,z+=it-1);it-- >0;)tt in xt?xt[z]=xt[tt]:delete xt[z],z+=lt,tt+=lt;return xt}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/to-object"),gt=ot("../internals/to-absolute-index"),kt=ot("../internals/length-of-array-like");_t.exports=function(St){for(var Tt=vt(this),mt=kt(Tt),xt=arguments.length,ft=gt(xt>1?arguments[1]:void 0,mt),z=xt>2?arguments[2]:void 0,tt=z===void 0?mt:gt(z,mt);tt>ft;)Tt[ft++]=St;return Tt}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-iteration").forEach,gt=ot("../internals/array-method-is-strict"),kt=gt("forEach");_t.exports=kt?[].forEach:function(St){return vt(this,St,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(ot,_t,Bt){var vt=ot("../internals/length-of-array-like");_t.exports=function(gt,kt){for(var bt=0,St=vt(kt),Tt=new gt(St);St>bt;)Tt[bt]=kt[bt++];return Tt}},{"../internals/length-of-array-like":188}],109:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-bind-context"),kt=ot("../internals/function-call"),bt=ot("../internals/to-object"),St=ot("../internals/call-with-safe-iteration-closing"),Tt=ot("../internals/is-array-iterator-method"),mt=ot("../internals/is-constructor"),xt=ot("../internals/length-of-array-like"),ft=ot("../internals/create-property"),z=ot("../internals/get-iterator"),tt=ot("../internals/get-iterator-method"),at=vt.Array;_t.exports=function(lt){var ut=bt(lt),dt=mt(this),Pt=arguments.length,At=Pt>1?arguments[1]:void 0,Dt=At!==void 0;Dt&&(At=gt(At,Pt>2?arguments[2]:void 0));var Ft=tt(ut),Nt=0,jt,Gt,Wt,Jt,Ut,Ht;if(Ft&&!(this==at&&Tt(Ft)))for(Jt=z(ut,Ft),Ut=Jt.next,Gt=dt?new this:[];!(Wt=kt(Ut,Jt)).done;Nt++)Ht=Dt?St(Jt,At,[Wt.value,Nt],!0):Wt.value,ft(Gt,Nt,Ht);else for(jt=xt(ut),Gt=dt?new this(jt):at(jt);jt>Nt;Nt++)Ht=Dt?At(ut[Nt],Nt):ut[Nt],ft(Gt,Nt,Ht);return Gt.length=Nt,Gt}},{"../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(ot,_t,Bt){var vt=ot("../internals/to-indexed-object"),gt=ot("../internals/to-absolute-index"),kt=ot("../internals/length-of-array-like"),bt=function(St){return function(Tt,mt,xt){var ft=vt(Tt),z=kt(ft),tt=gt(xt,z),at;if(St&&mt!=mt){for(;z>tt;)if(at=ft[tt++],at!=at)return!0}else for(;z>tt;tt++)if((St||tt in ft)&&ft[tt]===mt)return St||tt||0;return!St&&-1}};_t.exports={includes:bt(!0),indexOf:bt(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(ot,_t,Bt){var vt=ot("../internals/function-bind-context"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/indexed-object"),bt=ot("../internals/to-object"),St=ot("../internals/length-of-array-like"),Tt=ot("../internals/array-species-create"),mt=gt([].push),xt=function(ft){var z=ft==1,tt=ft==2,at=ft==3,it=ft==4,lt=ft==6,ut=ft==7,dt=ft==5||lt;return function(Pt,At,Dt,Ft){for(var Nt=bt(Pt),jt=kt(Nt),Gt=vt(At,Dt),Wt=St(jt),Jt=0,Ut=Ft||Tt,Ht=z?Ut(Pt,Wt):tt||ut?Ut(Pt,0):void 0,oe,se;Wt>Jt;Jt++)if((dt||Jt in jt)&&(oe=jt[Jt],se=Gt(oe,Jt,Nt),ft))if(z)Ht[Jt]=se;else if(se)switch(ft){case 3:return!0;case 5:return oe;case 6:return Jt;case 2:mt(Ht,oe)}else switch(ft){case 4:return!1;case 7:mt(Ht,oe)}return lt?-1:at||it?it:Ht}};_t.exports={forEach:xt(0),map:xt(1),filter:xt(2),some:xt(3),every:xt(4),find:xt(5),findIndex:xt(6),filterReject:xt(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(ot,_t,Bt){"use strict";var vt=ot("../internals/function-apply"),gt=ot("../internals/to-indexed-object"),kt=ot("../internals/to-integer-or-infinity"),bt=ot("../internals/length-of-array-like"),St=ot("../internals/array-method-is-strict"),Tt=Math.min,mt=[].lastIndexOf,xt=!!mt&&1/[1].lastIndexOf(1,-0)<0,ft=St("lastIndexOf"),z=xt||!ft;_t.exports=z?function(at){if(xt)return vt(mt,this,arguments)||0;var it=gt(this),lt=bt(it),ut=lt-1;for(arguments.length>1&&(ut=Tt(ut,kt(arguments[1]))),ut<0&&(ut=lt+ut);ut>=0;ut--)if(ut in it&&it[ut]===at)return ut||0;return-1}:mt},{"../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(ot,_t,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/well-known-symbol"),kt=ot("../internals/engine-v8-version"),bt=gt("species");_t.exports=function(St){return kt>=51||!vt(function(){var Tt=[],mt=Tt.constructor={};return mt[bt]=function(){return{foo:1}},Tt[St](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/fails");_t.exports=function(gt,kt){var bt=[][gt];return!!bt&&vt(function(){bt.call(null,kt||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/a-callable"),kt=ot("../internals/to-object"),bt=ot("../internals/indexed-object"),St=ot("../internals/length-of-array-like"),Tt=vt.TypeError,mt=function(xt){return function(ft,z,tt,at){gt(z);var it=kt(ft),lt=bt(it),ut=St(it),dt=xt?ut-1:0,Pt=xt?-1:1;if(tt<2)for(;;){if(dt in lt){at=lt[dt],dt+=Pt;break}if(dt+=Pt,xt?dt<0:ut<=dt)throw Tt("Reduce of empty array with no initial value")}for(;xt?dt>=0:ut>dt;dt+=Pt)dt in lt&&(at=z(at,lt[dt],dt,it));return at}};_t.exports={left:mt(!1),right:mt(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-absolute-index"),kt=ot("../internals/length-of-array-like"),bt=ot("../internals/create-property"),St=vt.Array,Tt=Math.max;_t.exports=function(mt,xt,ft){for(var z=kt(mt),tt=gt(xt,z),at=gt(ft===void 0?z:ft,z),it=St(Tt(at-tt,0)),lt=0;tt<at;tt++,lt++)bt(it,lt,mt[tt]);return it.length=lt,it}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this");_t.exports=vt([].slice)},{"../internals/function-uncurry-this":157}],118:[function(ot,_t,Bt){var vt=ot("../internals/array-slice-simple"),gt=Math.floor,kt=function(Tt,mt){var xt=Tt.length,ft=gt(xt/2);return xt<8?bt(Tt,mt):St(Tt,kt(vt(Tt,0,ft),mt),kt(vt(Tt,ft),mt),mt)},bt=function(Tt,mt){for(var xt=Tt.length,ft=1,z,tt;ft<xt;){for(tt=ft,z=Tt[ft];tt&&mt(Tt[tt-1],z)>0;)Tt[tt]=Tt[--tt];tt!==ft++&&(Tt[tt]=z)}return Tt},St=function(Tt,mt,xt,ft){for(var z=mt.length,tt=xt.length,at=0,it=0;at<z||it<tt;)Tt[at+it]=at<z&&it<tt?ft(mt[at],xt[it])<=0?mt[at++]:xt[it++]:at<z?mt[at++]:xt[it++];return Tt};_t.exports=kt},{"../internals/array-slice-simple":116}],119:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-array"),kt=ot("../internals/is-constructor"),bt=ot("../internals/is-object"),St=ot("../internals/well-known-symbol"),Tt=St("species"),mt=vt.Array;_t.exports=function(xt){var ft;return gt(xt)&&(ft=xt.constructor,kt(ft)&&(ft===mt||gt(ft.prototype))?ft=void 0:bt(ft)&&(ft=ft[Tt],ft===null&&(ft=void 0))),ft===void 0?mt:ft}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(ot,_t,Bt){var vt=ot("../internals/array-species-constructor");_t.exports=function(gt,kt){return new(vt(gt))(kt===0?0:kt)}},{"../internals/array-species-constructor":119}],121:[function(ot,_t,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/iterator-close");_t.exports=function(kt,bt,St,Tt){try{return Tt?bt(vt(St)[0],St[1]):bt(St)}catch(mt){gt(kt,"throw",mt)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(ot,_t,Bt){var vt=ot("../internals/well-known-symbol"),gt=vt("iterator"),kt=!1;try{var bt=0,St={next:function(){return{done:!!bt++}},return:function(){kt=!0}};St[gt]=function(){return this},Array.from(St,function(){throw 2})}catch(Tt){}_t.exports=function(Tt,mt){if(!mt&&!kt)return!1;var xt=!1;try{var ft={};ft[gt]=function(){return{next:function(){return{done:xt=!0}}}},Tt(ft)}catch(z){}return xt}},{"../internals/well-known-symbol":268}],123:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=vt({}.toString),kt=vt("".slice);_t.exports=function(bt){return kt(gt(bt),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-string-tag-support"),kt=ot("../internals/is-callable"),bt=ot("../internals/classof-raw"),St=ot("../internals/well-known-symbol"),Tt=St("toStringTag"),mt=vt.Object,xt=bt(function(){return arguments}())=="Arguments",ft=function(z,tt){try{return z[tt]}catch(at){}};_t.exports=gt?bt:function(z){var tt,at,it;return z===void 0?"Undefined":z===null?"Null":typeof(at=ft(tt=mt(z),Tt))=="string"?at:xt?bt(tt):(it=bt(tt))=="Object"&&kt(tt.callee)?"Arguments":it}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(ot,_t,Bt){var vt=ot("../internals/has-own-property"),gt=ot("../internals/own-keys"),kt=ot("../internals/object-get-own-property-descriptor"),bt=ot("../internals/object-define-property");_t.exports=function(St,Tt,mt){for(var xt=gt(Tt),ft=bt.f,z=kt.f,tt=0;tt<xt.length;tt++){var at=xt[tt];!vt(St,at)&&!(mt&&vt(mt,at))&&ft(St,at,z(Tt,at))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(ot,_t,Bt){var vt=ot("../internals/well-known-symbol"),gt=vt("match");_t.exports=function(kt){var bt=/./;try{"/./"[kt](bt)}catch(St){try{return bt[gt]=!1,"/./"[kt](bt)}catch(Tt){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(ot,_t,Bt){var vt=ot("../internals/fails");_t.exports=!vt(function(){function gt(){}return gt.prototype.constructor=null,Object.getPrototypeOf(new gt)!==gt.prototype})},{"../internals/fails":150}],128:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/iterators-core").IteratorPrototype,gt=ot("../internals/object-create"),kt=ot("../internals/create-property-descriptor"),bt=ot("../internals/set-to-string-tag"),St=ot("../internals/iterators"),Tt=function(){return this};_t.exports=function(mt,xt,ft,z){var tt=xt+" Iterator";return mt.prototype=gt(vt,{next:kt(+!z,ft)}),bt(mt,tt,!1,!0),St[tt]=Tt,mt}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(ot,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/object-define-property"),kt=ot("../internals/create-property-descriptor");_t.exports=vt?function(bt,St,Tt){return gt.f(bt,St,kt(1,Tt))}:function(bt,St,Tt){return bt[St]=Tt,bt}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(ot,_t,Bt){_t.exports=function(vt,gt){return{enumerable:!(vt&1),configurable:!(vt&2),writable:!(vt&4),value:gt}}},{}],131:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/to-property-key"),gt=ot("../internals/object-define-property"),kt=ot("../internals/create-property-descriptor");_t.exports=function(bt,St,Tt){var mt=vt(St);mt in bt?gt.f(bt,mt,kt(0,Tt)):bt[mt]=Tt}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),kt=ot("../internals/is-pure"),bt=ot("../internals/function-name"),St=ot("../internals/is-callable"),Tt=ot("../internals/create-iterator-constructor"),mt=ot("../internals/object-get-prototype-of"),xt=ot("../internals/object-set-prototype-of"),ft=ot("../internals/set-to-string-tag"),z=ot("../internals/create-non-enumerable-property"),tt=ot("../internals/redefine"),at=ot("../internals/well-known-symbol"),it=ot("../internals/iterators"),lt=ot("../internals/iterators-core"),ut=bt.PROPER,dt=bt.CONFIGURABLE,Pt=lt.IteratorPrototype,At=lt.BUGGY_SAFARI_ITERATORS,Dt=at("iterator"),Ft="keys",Nt="values",jt="entries",Gt=function(){return this};_t.exports=function(Wt,Jt,Ut,Ht,oe,se,ce){Tt(Ut,Jt,Ht);var Pe=function(de){if(de===oe&&be)return be;if(!At&&de in ve)return ve[de];switch(de){case Ft:return function(){return new Ut(this,de)};case Nt:return function(){return new Ut(this,de)};case jt:return function(){return new Ut(this,de)}}return function(){return new Ut(this)}},Yt=Jt+" Iterator",ne=!1,ve=Wt.prototype,Se=ve[Dt]||ve["@@iterator"]||oe&&ve[oe],be=!At&&Se||Pe(oe),fe=Jt=="Array"&&ve.entries||Se,pe,he,Ce;if(fe&&(pe=mt(fe.call(new Wt)),pe!==Object.prototype&&pe.next&&(!kt&&mt(pe)!==Pt&&(xt?xt(pe,Pt):St(pe[Dt])||tt(pe,Dt,Gt)),ft(pe,Yt,!0,!0),kt&&(it[Yt]=Gt))),ut&&oe==Nt&&Se&&Se.name!==Nt&&(!kt&&dt?z(ve,"name",Nt):(ne=!0,be=function(){return gt(Se,this)})),oe)if(he={values:Pe(Nt),keys:se?be:Pe(Ft),entries:Pe(jt)},ce)for(Ce in he)(At||ne||!(Ce in ve))&&tt(ve,Ce,he[Ce]);else vt({target:Jt,proto:!0,forced:At||ne},he);return(!kt||ce)&&ve[Dt]!==be&&tt(ve,Dt,be,{name:oe}),it[Jt]=be,he}},{"../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(ot,_t,Bt){var vt=ot("../internals/path"),gt=ot("../internals/has-own-property"),kt=ot("../internals/well-known-symbol-wrapped"),bt=ot("../internals/object-define-property").f;_t.exports=function(St){var Tt=vt.Symbol||(vt.Symbol={});gt(Tt,St)||bt(Tt,St,{value:kt.f(St)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(ot,_t,Bt){var vt=ot("../internals/fails");_t.exports=!vt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-object"),kt=vt.document,bt=gt(kt)&>(kt.createElement);_t.exports=function(St){return bt?kt.createElement(St):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(ot,_t,Bt){_t.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(ot,_t,Bt){var vt=ot("../internals/document-create-element"),gt=vt("span").classList,kt=gt&>.constructor&>.constructor.prototype;_t.exports=kt===Object.prototype?void 0:kt},{"../internals/document-create-element":135}],138:[function(ot,_t,Bt){var vt=ot("../internals/engine-user-agent"),gt=vt.match(/firefox\/(\d+)/i);_t.exports=!!gt&&+gt[1]},{"../internals/engine-user-agent":145}],139:[function(ot,_t,Bt){_t.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(ot,_t,Bt){var vt=ot("../internals/engine-user-agent");_t.exports=/MSIE|Trident/.test(vt)},{"../internals/engine-user-agent":145}],141:[function(ot,_t,Bt){var vt=ot("../internals/engine-user-agent"),gt=ot("../internals/global");_t.exports=/ipad|iphone|ipod/i.test(vt)&>.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(ot,_t,Bt){var vt=ot("../internals/engine-user-agent");_t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(vt)},{"../internals/engine-user-agent":145}],143:[function(ot,_t,Bt){var vt=ot("../internals/classof-raw"),gt=ot("../internals/global");_t.exports=vt(gt.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(ot,_t,Bt){var vt=ot("../internals/engine-user-agent");_t.exports=/web0s(?!.*chrome)/i.test(vt)},{"../internals/engine-user-agent":145}],145:[function(ot,_t,Bt){var vt=ot("../internals/get-built-in");_t.exports=vt("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/engine-user-agent"),kt=vt.process,bt=vt.Deno,St=kt&&kt.versions||bt&&bt.version,Tt=St&&St.v8,mt,xt;Tt&&(mt=Tt.split("."),xt=mt[0]>0&&mt[0]<4?1:+(mt[0]+mt[1])),!xt&>&&(mt=gt.match(/Edge\/(\d+)/),(!mt||mt[1]>=74)&&(mt=gt.match(/Chrome\/(\d+)/),mt&&(xt=+mt[1]))),_t.exports=xt},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(ot,_t,Bt){var vt=ot("../internals/engine-user-agent"),gt=vt.match(/AppleWebKit\/(\d+)\./);_t.exports=!!gt&&+gt[1]},{"../internals/engine-user-agent":145}],148:[function(ot,_t,Bt){_t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/object-get-own-property-descriptor").f,kt=ot("../internals/create-non-enumerable-property"),bt=ot("../internals/redefine"),St=ot("../internals/set-global"),Tt=ot("../internals/copy-constructor-properties"),mt=ot("../internals/is-forced");_t.exports=function(xt,ft){var z=xt.target,tt=xt.global,at=xt.stat,it,lt,ut,dt,Pt,At;if(tt?lt=vt:at?lt=vt[z]||St(z,{}):lt=(vt[z]||{}).prototype,lt)for(ut in ft){if(Pt=ft[ut],xt.noTargetGet?(At=gt(lt,ut),dt=At&&At.value):dt=lt[ut],it=mt(tt?ut:z+(at?".":"#")+ut,xt.forced),!it&&dt!==void 0){if(typeof Pt==typeof dt)continue;Tt(Pt,dt)}(xt.sham||dt&&dt.sham)&&kt(Pt,"sham",!0),bt(lt,ut,Pt,xt)}}},{"../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(ot,_t,Bt){_t.exports=function(vt){try{return!!vt()}catch(gt){return!0}}},{}],151:[function(ot,_t,Bt){"use strict";ot("../modules/es.regexp.exec");var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/redefine"),kt=ot("../internals/regexp-exec"),bt=ot("../internals/fails"),St=ot("../internals/well-known-symbol"),Tt=ot("../internals/create-non-enumerable-property"),mt=St("species"),xt=RegExp.prototype;_t.exports=function(ft,z,tt,at){var it=St(ft),lt=!bt(function(){var At={};return At[it]=function(){return 7},""[ft](At)!=7}),ut=lt&&!bt(function(){var At=!1,Dt=/a/;return ft==="split"&&(Dt={},Dt.constructor={},Dt.constructor[mt]=function(){return Dt},Dt.flags="",Dt[it]=/./[it]),Dt.exec=function(){return At=!0,null},Dt[it](""),!At});if(!lt||!ut||tt){var dt=vt(/./[it]),Pt=z(it,""[ft],function(At,Dt,Ft,Nt,jt){var Gt=vt(At),Wt=Dt.exec;return Wt===kt||Wt===xt.exec?lt&&!jt?{done:!0,value:dt(Dt,Ft,Nt)}:{done:!0,value:Gt(Ft,Dt,Nt)}:{done:!1}});gt(String.prototype,ft,Pt[0]),gt(xt,it,Pt[1])}at&&Tt(xt[it],"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(ot,_t,Bt){var vt=ot("../internals/function-bind-native"),gt=Function.prototype,kt=gt.apply,bt=gt.call;_t.exports=typeof Reflect=="object"&&Reflect.apply||(vt?bt.bind(kt):function(){return bt.apply(kt,arguments)})},{"../internals/function-bind-native":154}],153:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/a-callable"),kt=ot("../internals/function-bind-native"),bt=vt(vt.bind);_t.exports=function(St,Tt){return gt(St),Tt===void 0?St:kt?bt(St,Tt):function(){return St.apply(Tt,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(ot,_t,Bt){var vt=ot("../internals/fails");_t.exports=!vt(function(){var gt=function(){}.bind();return typeof gt!="function"||gt.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(ot,_t,Bt){var vt=ot("../internals/function-bind-native"),gt=Function.prototype.call;_t.exports=vt?gt.bind(gt):function(){return gt.apply(gt,arguments)}},{"../internals/function-bind-native":154}],156:[function(ot,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/has-own-property"),kt=Function.prototype,bt=vt&&Object.getOwnPropertyDescriptor,St=gt(kt,"name"),Tt=St&&function(){}.name==="something",mt=St&&(!vt||vt&&bt(kt,"name").configurable);_t.exports={EXISTS:St,PROPER:Tt,CONFIGURABLE:mt}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(ot,_t,Bt){var vt=ot("../internals/function-bind-native"),gt=Function.prototype,kt=gt.bind,bt=gt.call,St=vt&&kt.bind(bt,bt);_t.exports=vt?function(Tt){return Tt&&St(Tt)}:function(Tt){return Tt&&function(){return bt.apply(Tt,arguments)}}},{"../internals/function-bind-native":154}],158:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=function(bt){return gt(bt)?bt:void 0};_t.exports=function(bt,St){return arguments.length<2?kt(vt[bt]):vt[bt]&&vt[bt][St]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(ot,_t,Bt){var vt=ot("../internals/classof"),gt=ot("../internals/get-method"),kt=ot("../internals/iterators"),bt=ot("../internals/well-known-symbol"),St=bt("iterator");_t.exports=function(Tt){if(Tt!=null)return gt(Tt,St)||gt(Tt,"@@iterator")||kt[vt(Tt)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/a-callable"),bt=ot("../internals/an-object"),St=ot("../internals/try-to-string"),Tt=ot("../internals/get-iterator-method"),mt=vt.TypeError;_t.exports=function(xt,ft){var z=arguments.length<2?Tt(xt):ft;if(kt(z))return bt(gt(z,xt));throw mt(St(xt)+" 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(ot,_t,Bt){var vt=ot("../internals/a-callable");_t.exports=function(gt,kt){var bt=gt[kt];return bt==null?void 0:vt(bt)}},{"../internals/a-callable":95}],162:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/to-object"),kt=Math.floor,bt=vt("".charAt),St=vt("".replace),Tt=vt("".slice),mt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,xt=/\$([$&'`]|\d{1,2})/g;_t.exports=function(ft,z,tt,at,it,lt){var ut=tt+ft.length,dt=at.length,Pt=xt;return it!==void 0&&(it=gt(it),Pt=mt),St(lt,Pt,function(At,Dt){var Ft;switch(bt(Dt,0)){case"$":return"$";case"&":return ft;case"`":return Tt(z,0,tt);case"'":return Tt(z,ut);case"<":Ft=it[Tt(Dt,1,-1)];break;default:var Nt=+Dt;if(Nt===0)return At;if(Nt>dt){var jt=kt(Nt/10);return jt===0?At:jt<=dt?at[jt-1]===void 0?bt(Dt,1):at[jt-1]+bt(Dt,1):At}Ft=at[Nt-1]}return Ft===void 0?"":Ft})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(ot,_t,Bt){(function(vt){(function(){var gt=function(kt){return kt&&kt.Math==Math&&kt};_t.exports=gt(typeof globalThis=="object"&&globalThis)||gt(typeof window=="object"&&window)||gt(typeof self=="object"&&self)||gt(typeof vt=="object"&&vt)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/to-object"),kt=vt({}.hasOwnProperty);_t.exports=Object.hasOwn||function(St,Tt){return kt(gt(St),Tt)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(ot,_t,Bt){_t.exports={}},{}],166:[function(ot,_t,Bt){var vt=ot("../internals/global");_t.exports=function(gt,kt){var bt=vt.console;bt&&bt.error&&(arguments.length==1?bt.error(gt):bt.error(gt,kt))}},{"../internals/global":163}],167:[function(ot,_t,Bt){var vt=ot("../internals/get-built-in");_t.exports=vt("document","documentElement")},{"../internals/get-built-in":158}],168:[function(ot,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/fails"),kt=ot("../internals/document-create-element");_t.exports=!vt&&!gt(function(){return Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=vt.Array,kt=Math.abs,bt=Math.pow,St=Math.floor,Tt=Math.log,mt=Math.LN2,xt=function(z,tt,at){var it=gt(at),lt=at*8-tt-1,ut=(1<<lt)-1,dt=ut>>1,Pt=tt===23?bt(2,-24)-bt(2,-77):0,At=z<0||z===0&&1/z<0?1:0,Dt=0,Ft,Nt,jt;for(z=kt(z),z!=z||z===1/0?(Nt=z!=z?1:0,Ft=ut):(Ft=St(Tt(z)/mt),jt=bt(2,-Ft),z*jt<1&&(Ft--,jt*=2),Ft+dt>=1?z+=Pt/jt:z+=Pt*bt(2,1-dt),z*jt>=2&&(Ft++,jt/=2),Ft+dt>=ut?(Nt=0,Ft=ut):Ft+dt>=1?(Nt=(z*jt-1)*bt(2,tt),Ft=Ft+dt):(Nt=z*bt(2,dt-1)*bt(2,tt),Ft=0));tt>=8;)it[Dt++]=Nt&255,Nt/=256,tt-=8;for(Ft=Ft<<tt|Nt,lt+=tt;lt>0;)it[Dt++]=Ft&255,Ft/=256,lt-=8;return it[--Dt]|=At*128,it},ft=function(z,tt){var at=z.length,it=at*8-tt-1,lt=(1<<it)-1,ut=lt>>1,dt=it-7,Pt=at-1,At=z[Pt--],Dt=At&127,Ft;for(At>>=7;dt>0;)Dt=Dt*256+z[Pt--],dt-=8;for(Ft=Dt&(1<<-dt)-1,Dt>>=-dt,dt+=tt;dt>0;)Ft=Ft*256+z[Pt--],dt-=8;if(Dt===0)Dt=1-ut;else{if(Dt===lt)return Ft?NaN:At?-1/0:1/0;Ft=Ft+bt(2,tt),Dt=Dt-ut}return(At?-1:1)*Ft*bt(2,Dt-tt)};_t.exports={pack:xt,unpack:ft}},{"../internals/global":163}],170:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/fails"),bt=ot("../internals/classof-raw"),St=vt.Object,Tt=gt("".split);_t.exports=kt(function(){return!St("z").propertyIsEnumerable(0)})?function(mt){return bt(mt)=="String"?Tt(mt,""):St(mt)}:St},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(ot,_t,Bt){var vt=ot("../internals/is-callable"),gt=ot("../internals/is-object"),kt=ot("../internals/object-set-prototype-of");_t.exports=function(bt,St,Tt){var mt,xt;return kt&&vt(mt=St.constructor)&&mt!==Tt&>(xt=mt.prototype)&&xt!==Tt.prototype&&kt(bt,xt),bt}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/is-callable"),kt=ot("../internals/shared-store"),bt=vt(Function.toString);gt(kt.inspectSource)||(kt.inspectSource=function(St){return bt(St)}),_t.exports=kt.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(ot,_t,Bt){var vt=ot("../internals/native-weak-map"),gt=ot("../internals/global"),kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/is-object"),St=ot("../internals/create-non-enumerable-property"),Tt=ot("../internals/has-own-property"),mt=ot("../internals/shared-store"),xt=ot("../internals/shared-key"),ft=ot("../internals/hidden-keys"),z="Object already initialized",tt=gt.TypeError,at=gt.WeakMap,it,lt,ut,dt=function(Gt){return ut(Gt)?lt(Gt):it(Gt,{})},Pt=function(Gt){return function(Wt){var Jt;if(!bt(Wt)||(Jt=lt(Wt)).type!==Gt)throw tt("Incompatible receiver, "+Gt+" required");return Jt}};if(vt||mt.state){var At=mt.state||(mt.state=new at),Dt=kt(At.get),Ft=kt(At.has),Nt=kt(At.set);it=function(Gt,Wt){if(Ft(At,Gt))throw new tt(z);return Wt.facade=Gt,Nt(At,Gt,Wt),Wt},lt=function(Gt){return Dt(At,Gt)||{}},ut=function(Gt){return Ft(At,Gt)}}else{var jt=xt("state");ft[jt]=!0,it=function(Gt,Wt){if(Tt(Gt,jt))throw new tt(z);return Wt.facade=Gt,St(Gt,jt,Wt),Wt},lt=function(Gt){return Tt(Gt,jt)?Gt[jt]:{}},ut=function(Gt){return Tt(Gt,jt)}}_t.exports={set:it,get:lt,has:ut,enforce:dt,getterFor:Pt}},{"../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(ot,_t,Bt){var vt=ot("../internals/well-known-symbol"),gt=ot("../internals/iterators"),kt=vt("iterator"),bt=Array.prototype;_t.exports=function(St){return St!==void 0&&(gt.Array===St||bt[kt]===St)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(ot,_t,Bt){var vt=ot("../internals/classof-raw");_t.exports=Array.isArray||function(kt){return vt(kt)=="Array"}},{"../internals/classof-raw":123}],176:[function(ot,_t,Bt){_t.exports=function(vt){return typeof vt=="function"}},{}],177:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/fails"),kt=ot("../internals/is-callable"),bt=ot("../internals/classof"),St=ot("../internals/get-built-in"),Tt=ot("../internals/inspect-source"),mt=function(){},xt=[],ft=St("Reflect","construct"),z=/^\s*(?:class|function)\b/,tt=vt(z.exec),at=!z.exec(mt),it=function(dt){if(!kt(dt))return!1;try{return ft(mt,xt,dt),!0}catch(Pt){return!1}},lt=function(dt){if(!kt(dt))return!1;switch(bt(dt)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return at||!!tt(z,Tt(dt))}catch(Pt){return!0}};lt.sham=!0,_t.exports=!ft||gt(function(){var ut;return it(it.call)||!it(Object)||!it(function(){ut=!0})||ut})?lt:it},{"../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(ot,_t,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/is-callable"),kt=/#|\.prototype\./,bt=function(ft,z){var tt=Tt[St(ft)];return tt==xt?!0:tt==mt?!1:gt(z)?vt(z):!!z},St=bt.normalize=function(ft){return String(ft).replace(kt,".").toLowerCase()},Tt=bt.data={},mt=bt.NATIVE="N",xt=bt.POLYFILL="P";_t.exports=bt},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(ot,_t,Bt){var vt=ot("../internals/is-object"),gt=Math.floor;_t.exports=Number.isInteger||function(bt){return!vt(bt)&&isFinite(bt)&>(bt)===bt}},{"../internals/is-object":180}],180:[function(ot,_t,Bt){var vt=ot("../internals/is-callable");_t.exports=function(gt){return typeof gt=="object"?gt!==null:vt(gt)}},{"../internals/is-callable":176}],181:[function(ot,_t,Bt){_t.exports=!1},{}],182:[function(ot,_t,Bt){var vt=ot("../internals/is-object"),gt=ot("../internals/classof-raw"),kt=ot("../internals/well-known-symbol"),bt=kt("match");_t.exports=function(St){var Tt;return vt(St)&&((Tt=St[bt])!==void 0?!!Tt:gt(St)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/get-built-in"),kt=ot("../internals/is-callable"),bt=ot("../internals/object-is-prototype-of"),St=ot("../internals/use-symbol-as-uid"),Tt=vt.Object;_t.exports=St?function(mt){return typeof mt=="symbol"}:function(mt){var xt=gt("Symbol");return kt(xt)&&bt(xt.prototype,Tt(mt))}},{"../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(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-bind-context"),kt=ot("../internals/function-call"),bt=ot("../internals/an-object"),St=ot("../internals/try-to-string"),Tt=ot("../internals/is-array-iterator-method"),mt=ot("../internals/length-of-array-like"),xt=ot("../internals/object-is-prototype-of"),ft=ot("../internals/get-iterator"),z=ot("../internals/get-iterator-method"),tt=ot("../internals/iterator-close"),at=vt.TypeError,it=function(ut,dt){this.stopped=ut,this.result=dt},lt=it.prototype;_t.exports=function(ut,dt,Pt){var At=Pt&&Pt.that,Dt=!!(Pt&&Pt.AS_ENTRIES),Ft=!!(Pt&&Pt.IS_ITERATOR),Nt=!!(Pt&&Pt.INTERRUPTED),jt=gt(dt,At),Gt,Wt,Jt,Ut,Ht,oe,se,ce=function(Yt){return Gt&&tt(Gt,"normal",Yt),new it(!0,Yt)},Pe=function(Yt){return Dt?(bt(Yt),Nt?jt(Yt[0],Yt[1],ce):jt(Yt[0],Yt[1])):Nt?jt(Yt,ce):jt(Yt)};if(Ft)Gt=ut;else{if(Wt=z(ut),!Wt)throw at(St(ut)+" is not iterable");if(Tt(Wt)){for(Jt=0,Ut=mt(ut);Ut>Jt;Jt++)if(Ht=Pe(ut[Jt]),Ht&&xt(lt,Ht))return Ht;return new it(!1)}Gt=ft(ut,Wt)}for(oe=Gt.next;!(se=kt(oe,Gt)).done;){try{Ht=Pe(se.value)}catch(Yt){tt(Gt,"throw",Yt)}if(typeof Ht=="object"&&Ht&&xt(lt,Ht))return Ht}return new it(!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(ot,_t,Bt){var vt=ot("../internals/function-call"),gt=ot("../internals/an-object"),kt=ot("../internals/get-method");_t.exports=function(bt,St,Tt){var mt,xt;gt(bt);try{if(mt=kt(bt,"return"),!mt){if(St==="throw")throw Tt;return Tt}mt=vt(mt,bt)}catch(ft){xt=!0,mt=ft}if(St==="throw")throw Tt;if(xt)throw mt;return gt(mt),Tt}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/fails"),gt=ot("../internals/is-callable"),kt=ot("../internals/object-create"),bt=ot("../internals/object-get-prototype-of"),St=ot("../internals/redefine"),Tt=ot("../internals/well-known-symbol"),mt=ot("../internals/is-pure"),xt=Tt("iterator"),ft=!1,z,tt,at;[].keys&&(at=[].keys(),"next"in at?(tt=bt(bt(at)),tt!==Object.prototype&&(z=tt)):ft=!0);var it=z==null||vt(function(){var lt={};return z[xt].call(lt)!==lt});it?z={}:mt&&(z=kt(z)),gt(z[xt])||St(z,xt,function(){return this}),_t.exports={IteratorPrototype:z,BUGGY_SAFARI_ITERATORS:ft}},{"../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(ot,_t,Bt){arguments[4][165][0].apply(Bt,arguments)},{dup:165}],188:[function(ot,_t,Bt){var vt=ot("../internals/to-length");_t.exports=function(gt){return vt(gt.length)}},{"../internals/to-length":249}],189:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-bind-context"),kt=ot("../internals/object-get-own-property-descriptor").f,bt=ot("../internals/task").set,St=ot("../internals/engine-is-ios"),Tt=ot("../internals/engine-is-ios-pebble"),mt=ot("../internals/engine-is-webos-webkit"),xt=ot("../internals/engine-is-node"),ft=vt.MutationObserver||vt.WebKitMutationObserver,z=vt.document,tt=vt.process,at=vt.Promise,it=kt(vt,"queueMicrotask"),lt=it&&it.value,ut,dt,Pt,At,Dt,Ft,Nt,jt;lt||(ut=function(){var Gt,Wt;for(xt&&(Gt=tt.domain)&&Gt.exit();dt;){Wt=dt.fn,dt=dt.next;try{Wt()}catch(Jt){throw dt?At():Pt=void 0,Jt}}Pt=void 0,Gt&&Gt.enter()},!St&&!xt&&!mt&&ft&&z?(Dt=!0,Ft=z.createTextNode(""),new ft(ut).observe(Ft,{characterData:!0}),At=function(){Ft.data=Dt=!Dt}):!Tt&&at&&at.resolve?(Nt=at.resolve(void 0),Nt.constructor=at,jt=gt(Nt.then,Nt),At=function(){jt(ut)}):xt?At=function(){tt.nextTick(ut)}:(bt=gt(bt,vt),At=function(){bt(ut)})),_t.exports=lt||function(Gt){var Wt={fn:Gt,next:void 0};Pt&&(Pt.next=Wt),dt||(dt=Wt,At()),Pt=Wt}},{"../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(ot,_t,Bt){var vt=ot("../internals/native-symbol");_t.exports=vt&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(ot,_t,Bt){var vt=ot("../internals/engine-v8-version"),gt=ot("../internals/fails");_t.exports=!!Object.getOwnPropertySymbols&&!gt(function(){var kt=Symbol();return!String(kt)||!(Object(kt)instanceof Symbol)||!Symbol.sham&&vt&&vt<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=ot("../internals/inspect-source"),bt=vt.WeakMap;_t.exports=gt(bt)&&/native code/.test(kt(bt))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/a-callable"),gt=function(kt){var bt,St;this.promise=new kt(function(Tt,mt){if(bt!==void 0||St!==void 0)throw TypeError("Bad Promise constructor");bt=Tt,St=mt}),this.resolve=vt(bt),this.reject=vt(St)};_t.exports.f=function(kt){return new gt(kt)}},{"../internals/a-callable":95}],194:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-regexp"),kt=vt.TypeError;_t.exports=function(bt){if(gt(bt))throw kt("The method doesn't accept regular expressions");return bt}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/descriptors"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/function-call"),bt=ot("../internals/fails"),St=ot("../internals/object-keys"),Tt=ot("../internals/object-get-own-property-symbols"),mt=ot("../internals/object-property-is-enumerable"),xt=ot("../internals/to-object"),ft=ot("../internals/indexed-object"),z=Object.assign,tt=Object.defineProperty,at=gt([].concat);_t.exports=!z||bt(function(){if(vt&&z({b:1},z(tt({},"a",{enumerable:!0,get:function(){tt(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var it={},lt={},ut=Symbol(),dt="abcdefghijklmnopqrst";return it[ut]=7,dt.split("").forEach(function(Pt){lt[Pt]=Pt}),z({},it)[ut]!=7||St(z({},lt)).join("")!=dt})?function(lt,ut){for(var dt=xt(lt),Pt=arguments.length,At=1,Dt=Tt.f,Ft=mt.f;Pt>At;)for(var Nt=ft(arguments[At++]),jt=Dt?at(St(Nt),Dt(Nt)):St(Nt),Gt=jt.length,Wt=0,Jt;Gt>Wt;)Jt=jt[Wt++],(!vt||kt(Ft,Nt,Jt))&&(dt[Jt]=Nt[Jt]);return dt}: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(ot,_t,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/object-define-properties"),kt=ot("../internals/enum-bug-keys"),bt=ot("../internals/hidden-keys"),St=ot("../internals/html"),Tt=ot("../internals/document-create-element"),mt=ot("../internals/shared-key"),xt=">",ft="<",z="prototype",tt="script",at=mt("IE_PROTO"),it=function(){},lt=function(Dt){return ft+tt+xt+Dt+ft+"/"+tt+xt},ut=function(Dt){Dt.write(lt("")),Dt.close();var Ft=Dt.parentWindow.Object;return Dt=null,Ft},dt=function(){var Dt=Tt("iframe"),Ft="java"+tt+":",Nt;return Dt.style.display="none",St.appendChild(Dt),Dt.src=String(Ft),Nt=Dt.contentWindow.document,Nt.open(),Nt.write(lt("document.F=Object")),Nt.close(),Nt.F},Pt,At=function(){try{Pt=new ActiveXObject("htmlfile")}catch(Ft){}At=typeof document!="undefined"?document.domain&&Pt?ut(Pt):dt():ut(Pt);for(var Dt=kt.length;Dt--;)delete At[z][kt[Dt]];return At()};bt[at]=!0,_t.exports=Object.create||function(Ft,Nt){var jt;return Ft!==null?(it[z]=vt(Ft),jt=new it,it[z]=null,jt[at]=Ft):jt=At(),Nt===void 0?jt:gt.f(jt,Nt)}},{"../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(ot,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/v8-prototype-define-bug"),kt=ot("../internals/object-define-property"),bt=ot("../internals/an-object"),St=ot("../internals/to-indexed-object"),Tt=ot("../internals/object-keys");Bt.f=vt&&!gt?Object.defineProperties:function(xt,ft){bt(xt);for(var z=St(ft),tt=Tt(ft),at=tt.length,it=0,lt;at>it;)kt.f(xt,lt=tt[it++],z[lt]);return xt}},{"../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(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/descriptors"),kt=ot("../internals/ie8-dom-define"),bt=ot("../internals/v8-prototype-define-bug"),St=ot("../internals/an-object"),Tt=ot("../internals/to-property-key"),mt=vt.TypeError,xt=Object.defineProperty,ft=Object.getOwnPropertyDescriptor,z="enumerable",tt="configurable",at="writable";Bt.f=gt?bt?function(lt,ut,dt){if(St(lt),ut=Tt(ut),St(dt),typeof lt=="function"&&ut==="prototype"&&"value"in dt&&at in dt&&!dt[at]){var Pt=ft(lt,ut);Pt&&Pt[at]&&(lt[ut]=dt.value,dt={configurable:tt in dt?dt[tt]:Pt[tt],enumerable:z in dt?dt[z]:Pt[z],writable:!1})}return xt(lt,ut,dt)}:xt:function(lt,ut,dt){if(St(lt),ut=Tt(ut),St(dt),kt)try{return xt(lt,ut,dt)}catch(Pt){}if("get"in dt||"set"in dt)throw mt("Accessors not supported");return"value"in dt&&(lt[ut]=dt.value),lt}},{"../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(ot,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/function-call"),kt=ot("../internals/object-property-is-enumerable"),bt=ot("../internals/create-property-descriptor"),St=ot("../internals/to-indexed-object"),Tt=ot("../internals/to-property-key"),mt=ot("../internals/has-own-property"),xt=ot("../internals/ie8-dom-define"),ft=Object.getOwnPropertyDescriptor;Bt.f=vt?ft:function(tt,at){if(tt=St(tt),at=Tt(at),xt)try{return ft(tt,at)}catch(it){}if(mt(tt,at))return bt(!gt(kt.f,tt,at),tt[at])}},{"../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(ot,_t,Bt){var vt=ot("../internals/classof-raw"),gt=ot("../internals/to-indexed-object"),kt=ot("../internals/object-get-own-property-names").f,bt=ot("../internals/array-slice-simple"),St=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Tt=function(mt){try{return kt(mt)}catch(xt){return bt(St)}};_t.exports.f=function(xt){return St&&vt(xt)=="Window"?Tt(xt):kt(gt(xt))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(ot,_t,Bt){var vt=ot("../internals/object-keys-internal"),gt=ot("../internals/enum-bug-keys"),kt=gt.concat("length","prototype");Bt.f=Object.getOwnPropertyNames||function(St){return vt(St,kt)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(ot,_t,Bt){Bt.f=Object.getOwnPropertySymbols},{}],203:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/has-own-property"),kt=ot("../internals/is-callable"),bt=ot("../internals/to-object"),St=ot("../internals/shared-key"),Tt=ot("../internals/correct-prototype-getter"),mt=St("IE_PROTO"),xt=vt.Object,ft=xt.prototype;_t.exports=Tt?xt.getPrototypeOf:function(z){var tt=bt(z);if(gt(tt,mt))return tt[mt];var at=tt.constructor;return kt(at)&&tt instanceof at?at.prototype:tt instanceof xt?ft: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(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this");_t.exports=vt({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/has-own-property"),kt=ot("../internals/to-indexed-object"),bt=ot("../internals/array-includes").indexOf,St=ot("../internals/hidden-keys"),Tt=vt([].push);_t.exports=function(mt,xt){var ft=kt(mt),z=0,tt=[],at;for(at in ft)!gt(St,at)&>(ft,at)&&Tt(tt,at);for(;xt.length>z;)gt(ft,at=xt[z++])&&(~bt(tt,at)||Tt(tt,at));return tt}},{"../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(ot,_t,Bt){var vt=ot("../internals/object-keys-internal"),gt=ot("../internals/enum-bug-keys");_t.exports=Object.keys||function(bt){return vt(bt,gt)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(ot,_t,Bt){"use strict";var vt={}.propertyIsEnumerable,gt=Object.getOwnPropertyDescriptor,kt=gt&&!vt.call({1:2},1);Bt.f=kt?function(St){var Tt=gt(this,St);return!!Tt&&Tt.enumerable}:vt},{}],208:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/an-object"),kt=ot("../internals/a-possible-prototype");_t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var bt=!1,St={},Tt;try{Tt=vt(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),Tt(St,[]),bt=St instanceof Array}catch(mt){}return function(xt,ft){return gt(xt),kt(ft),bt?Tt(xt,ft):xt.__proto__=ft,xt}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(ot,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/object-keys"),bt=ot("../internals/to-indexed-object"),St=ot("../internals/object-property-is-enumerable").f,Tt=gt(St),mt=gt([].push),xt=function(ft){return function(z){for(var tt=bt(z),at=kt(tt),it=at.length,lt=0,ut=[],dt;it>lt;)dt=at[lt++],(!vt||Tt(tt,dt))&&mt(ut,ft?[dt,tt[dt]]:tt[dt]);return ut}};_t.exports={entries:xt(!0),values:xt(!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(ot,_t,Bt){"use strict";var vt=ot("../internals/to-string-tag-support"),gt=ot("../internals/classof");_t.exports=vt?{}.toString:function(){return"[object "+gt(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/is-callable"),bt=ot("../internals/is-object"),St=vt.TypeError;_t.exports=function(Tt,mt){var xt,ft;if(mt==="string"&&kt(xt=Tt.toString)&&!bt(ft=gt(xt,Tt))||kt(xt=Tt.valueOf)&&!bt(ft=gt(xt,Tt))||mt!=="string"&&kt(xt=Tt.toString)&&!bt(ft=gt(xt,Tt)))return ft;throw St("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(ot,_t,Bt){var vt=ot("../internals/get-built-in"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/object-get-own-property-names"),bt=ot("../internals/object-get-own-property-symbols"),St=ot("../internals/an-object"),Tt=gt([].concat);_t.exports=vt("Reflect","ownKeys")||function(xt){var ft=kt.f(St(xt)),z=bt.f;return z?Tt(ft,z(xt)):ft}},{"../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(ot,_t,Bt){var vt=ot("../internals/global");_t.exports=vt},{"../internals/global":163}],214:[function(ot,_t,Bt){_t.exports=function(vt){try{return{error:!1,value:vt()}}catch(gt){return{error:!0,value:gt}}}},{}],215:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/promise-native-constructor"),kt=ot("../internals/is-callable"),bt=ot("../internals/is-forced"),St=ot("../internals/inspect-source"),Tt=ot("../internals/well-known-symbol"),mt=ot("../internals/engine-is-browser"),xt=ot("../internals/is-pure"),ft=ot("../internals/engine-v8-version"),z=gt&>.prototype,tt=Tt("species"),at=!1,it=kt(vt.PromiseRejectionEvent),lt=bt("Promise",function(){var ut=St(gt),dt=ut!==String(gt);if(!dt&&ft===66||xt&&!(z.catch&&z.finally))return!0;if(ft>=51&&/native code/.test(ut))return!1;var Pt=new gt(function(Ft){Ft(1)}),At=function(Ft){Ft(function(){},function(){})},Dt=Pt.constructor={};return Dt[tt]=At,at=Pt.then(function(){})instanceof At,at?!dt&&mt&&!it:!0});_t.exports={CONSTRUCTOR:lt,REJECTION_EVENT:it,SUBCLASSING:at}},{"../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(ot,_t,Bt){var vt=ot("../internals/global");_t.exports=vt.Promise},{"../internals/global":163}],217:[function(ot,_t,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/is-object"),kt=ot("../internals/new-promise-capability");_t.exports=function(bt,St){if(vt(bt),gt(St)&&St.constructor===bt)return St;var Tt=kt.f(bt),mt=Tt.resolve;return mt(St),Tt.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(ot,_t,Bt){var vt=ot("../internals/promise-native-constructor"),gt=ot("../internals/check-correctness-of-iteration"),kt=ot("../internals/promise-constructor-detection").CONSTRUCTOR;_t.exports=kt||!gt(function(bt){vt.all(bt).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(ot,_t,Bt){var vt=ot("../internals/object-define-property").f;_t.exports=function(gt,kt,bt){bt in gt||vt(gt,bt,{configurable:!0,get:function(){return kt[bt]},set:function(St){kt[bt]=St}})}},{"../internals/object-define-property":198}],220:[function(ot,_t,Bt){var vt=function(){this.head=null,this.tail=null};vt.prototype={add:function(gt){var kt={item:gt,next:null};this.head?this.tail.next=kt:this.head=kt,this.tail=kt},get:function(){var gt=this.head;if(gt)return this.head=gt.next,this.tail===gt&&(this.tail=null),gt.item}},_t.exports=vt},{}],221:[function(ot,_t,Bt){var vt=ot("../internals/redefine");_t.exports=function(gt,kt,bt){for(var St in kt)vt(gt,St,kt[St],bt);return gt}},{"../internals/redefine":222}],222:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=ot("../internals/has-own-property"),bt=ot("../internals/create-non-enumerable-property"),St=ot("../internals/set-global"),Tt=ot("../internals/inspect-source"),mt=ot("../internals/internal-state"),xt=ot("../internals/function-name").CONFIGURABLE,ft=mt.get,z=mt.enforce,tt=String(String).split("String");(_t.exports=function(at,it,lt,ut){var dt=ut?!!ut.unsafe:!1,Pt=ut?!!ut.enumerable:!1,At=ut?!!ut.noTargetGet:!1,Dt=ut&&ut.name!==void 0?ut.name:it,Ft;if(gt(lt)&&(String(Dt).slice(0,7)==="Symbol("&&(Dt="["+String(Dt).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!kt(lt,"name")||xt&<.name!==Dt)&&bt(lt,"name",Dt),Ft=z(lt),Ft.source||(Ft.source=tt.join(typeof Dt=="string"?Dt:""))),at===vt){Pt?at[it]=lt:St(it,lt);return}else dt?!At&&at[it]&&(Pt=!0):delete at[it];Pt?at[it]=lt:bt(at,it,lt)})(Function.prototype,"toString",function(){return gt(this)&&ft(this).source||Tt(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(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/an-object"),bt=ot("../internals/is-callable"),St=ot("../internals/classof-raw"),Tt=ot("../internals/regexp-exec"),mt=vt.TypeError;_t.exports=function(xt,ft){var z=xt.exec;if(bt(z)){var tt=gt(z,xt,ft);return tt!==null&&kt(tt),tt}if(St(xt)==="RegExp")return gt(Tt,xt,ft);throw mt("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(ot,_t,Bt){"use strict";var vt=ot("../internals/function-call"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/to-string"),bt=ot("../internals/regexp-flags"),St=ot("../internals/regexp-sticky-helpers"),Tt=ot("../internals/shared"),mt=ot("../internals/object-create"),xt=ot("../internals/internal-state").get,ft=ot("../internals/regexp-unsupported-dot-all"),z=ot("../internals/regexp-unsupported-ncg"),tt=Tt("native-string-replace",String.prototype.replace),at=RegExp.prototype.exec,it=at,lt=gt("".charAt),ut=gt("".indexOf),dt=gt("".replace),Pt=gt("".slice),At=function(){var jt=/a/,Gt=/b*/g;return vt(at,jt,"a"),vt(at,Gt,"a"),jt.lastIndex!==0||Gt.lastIndex!==0}(),Dt=St.BROKEN_CARET,Ft=/()??/.exec("")[1]!==void 0,Nt=At||Ft||Dt||ft||z;Nt&&(it=function(Gt){var Wt=this,Jt=xt(Wt),Ut=kt(Gt),Ht=Jt.raw,oe,se,ce,Pe,Yt,ne,ve;if(Ht)return Ht.lastIndex=Wt.lastIndex,oe=vt(it,Ht,Ut),Wt.lastIndex=Ht.lastIndex,oe;var Se=Jt.groups,be=Dt&&Wt.sticky,fe=vt(bt,Wt),pe=Wt.source,he=0,Ce=Ut;if(be&&(fe=dt(fe,"y",""),ut(fe,"g")===-1&&(fe+="g"),Ce=Pt(Ut,Wt.lastIndex),Wt.lastIndex>0&&(!Wt.multiline||Wt.multiline&<(Ut,Wt.lastIndex-1)!==`
|
|
`)&&(pe="(?: "+pe+")",Ce=" "+Ce,he++),se=new RegExp("^(?:"+pe+")",fe)),Ft&&(se=new RegExp("^"+pe+"$(?!\\s)",fe)),At&&(ce=Wt.lastIndex),Pe=vt(at,be?se:Wt,Ce),be?Pe?(Pe.input=Pt(Pe.input,he),Pe[0]=Pt(Pe[0],he),Pe.index=Wt.lastIndex,Wt.lastIndex+=Pe[0].length):Wt.lastIndex=0:At&&Pe&&(Wt.lastIndex=Wt.global?Pe.index+Pe[0].length:ce),Ft&&Pe&&Pe.length>1&&vt(tt,Pe[0],se,function(){for(Yt=1;Yt<arguments.length-2;Yt++)arguments[Yt]===void 0&&(Pe[Yt]=void 0)}),Pe&&Se)for(Pe.groups=ne=mt(null),Yt=0;Yt<Se.length;Yt++)ve=Se[Yt],ne[ve[0]]=Pe[ve[1]];return Pe}),_t.exports=it},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/an-object");_t.exports=function(){var gt=vt(this),kt="";return gt.hasIndices&&(kt+="d"),gt.global&&(kt+="g"),gt.ignoreCase&&(kt+="i"),gt.multiline&&(kt+="m"),gt.dotAll&&(kt+="s"),gt.unicode&&(kt+="u"),gt.sticky&&(kt+="y"),kt}},{"../internals/an-object":101}],226:[function(ot,_t,Bt){var vt=ot("../internals/function-call"),gt=ot("../internals/has-own-property"),kt=ot("../internals/object-is-prototype-of"),bt=ot("../internals/regexp-flags"),St=RegExp.prototype;_t.exports=function(Tt){var mt=Tt.flags;return mt===void 0&&!("flags"in St)&&!gt(Tt,"flags")&&kt(St,Tt)?vt(bt,Tt):mt}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(ot,_t,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/global"),kt=gt.RegExp,bt=vt(function(){var mt=kt("a","y");return mt.lastIndex=2,mt.exec("abcd")!=null}),St=bt||vt(function(){return!kt("a","y").sticky}),Tt=bt||vt(function(){var mt=kt("^r","gy");return mt.lastIndex=2,mt.exec("str")!=null});_t.exports={BROKEN_CARET:Tt,MISSED_STICKY:St,UNSUPPORTED_Y:bt}},{"../internals/fails":150,"../internals/global":163}],228:[function(ot,_t,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/global"),kt=gt.RegExp;_t.exports=vt(function(){var bt=kt(".","s");return!(bt.dotAll&&bt.exec(`
|
|
`)&&bt.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(ot,_t,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/global"),kt=gt.RegExp;_t.exports=vt(function(){var bt=kt("(?<a>b)","g");return bt.exec("b").groups.a!=="b"||"b".replace(bt,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=vt.TypeError;_t.exports=function(kt){if(kt==null)throw gt("Can't call method on "+kt);return kt}},{"../internals/global":163}],231:[function(ot,_t,Bt){_t.exports=Object.is||function(gt,kt){return gt===kt?gt!==0||1/gt===1/kt:gt!=gt&&kt!=kt}},{}],232:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=Object.defineProperty;_t.exports=function(kt,bt){try{gt(vt,kt,{value:bt,configurable:!0,writable:!0})}catch(St){vt[kt]=bt}return bt}},{"../internals/global":163}],233:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/get-built-in"),gt=ot("../internals/object-define-property"),kt=ot("../internals/well-known-symbol"),bt=ot("../internals/descriptors"),St=kt("species");_t.exports=function(Tt){var mt=vt(Tt),xt=gt.f;bt&&mt&&!mt[St]&&xt(mt,St,{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(ot,_t,Bt){var vt=ot("../internals/object-define-property").f,gt=ot("../internals/has-own-property"),kt=ot("../internals/well-known-symbol"),bt=kt("toStringTag");_t.exports=function(St,Tt,mt){St&&!mt&&(St=St.prototype),St&&!gt(St,bt)&&vt(St,bt,{configurable:!0,value:Tt})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(ot,_t,Bt){var vt=ot("../internals/shared"),gt=ot("../internals/uid"),kt=vt("keys");_t.exports=function(bt){return kt[bt]||(kt[bt]=gt(bt))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/set-global"),kt="__core-js_shared__",bt=vt[kt]||gt(kt,{});_t.exports=bt},{"../internals/global":163,"../internals/set-global":232}],237:[function(ot,_t,Bt){var vt=ot("../internals/is-pure"),gt=ot("../internals/shared-store");(_t.exports=function(kt,bt){return gt[kt]||(gt[kt]=bt!==void 0?bt:{})})("versions",[]).push({version:"3.22.1",mode:vt?"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(ot,_t,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/a-constructor"),kt=ot("../internals/well-known-symbol"),bt=kt("species");_t.exports=function(St,Tt){var mt=vt(St).constructor,xt;return mt===void 0||(xt=vt(mt)[bt])==null?Tt:gt(xt)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/to-integer-or-infinity"),kt=ot("../internals/to-string"),bt=ot("../internals/require-object-coercible"),St=vt("".charAt),Tt=vt("".charCodeAt),mt=vt("".slice),xt=function(ft){return function(z,tt){var at=kt(bt(z)),it=gt(tt),lt=at.length,ut,dt;return it<0||it>=lt?ft?"":void 0:(ut=Tt(at,it),ut<55296||ut>56319||it+1===lt||(dt=Tt(at,it+1))<56320||dt>57343?ft?St(at,it):ut:ft?mt(at,it,it+2):(ut-55296<<10)+(dt-56320)+65536)}};_t.exports={codeAt:xt(!1),charAt:xt(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(ot,_t,Bt){var vt=ot("../internals/function-name").PROPER,gt=ot("../internals/fails"),kt=ot("../internals/whitespaces"),bt="\u200B\x85\u180E";_t.exports=function(St){return gt(function(){return!!kt[St]()||bt[St]()!==bt||vt&&kt[St].name!==St})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/require-object-coercible"),kt=ot("../internals/to-string"),bt=ot("../internals/whitespaces"),St=vt("".replace),Tt="["+bt+"]",mt=RegExp("^"+Tt+Tt+"*"),xt=RegExp(Tt+Tt+"*$"),ft=function(z){return function(tt){var at=kt(gt(tt));return z&1&&(at=St(at,mt,"")),z&2&&(at=St(at,xt,"")),at}};_t.exports={start:ft(1),end:ft(2),trim:ft(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(ot,_t,Bt){var vt=ot("../internals/function-call"),gt=ot("../internals/get-built-in"),kt=ot("../internals/well-known-symbol"),bt=ot("../internals/redefine");_t.exports=function(){var St=gt("Symbol"),Tt=St&&St.prototype,mt=Tt&&Tt.valueOf,xt=kt("toPrimitive");Tt&&!Tt[xt]&&bt(Tt,xt,function(ft){return vt(mt,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-apply"),kt=ot("../internals/function-bind-context"),bt=ot("../internals/is-callable"),St=ot("../internals/has-own-property"),Tt=ot("../internals/fails"),mt=ot("../internals/html"),xt=ot("../internals/array-slice"),ft=ot("../internals/document-create-element"),z=ot("../internals/validate-arguments-length"),tt=ot("../internals/engine-is-ios"),at=ot("../internals/engine-is-node"),it=vt.setImmediate,lt=vt.clearImmediate,ut=vt.process,dt=vt.Dispatch,Pt=vt.Function,At=vt.MessageChannel,Dt=vt.String,Ft=0,Nt={},jt="onreadystatechange",Gt,Wt,Jt,Ut;try{Gt=vt.location}catch(Pe){}var Ht=function(Pe){if(St(Nt,Pe)){var Yt=Nt[Pe];delete Nt[Pe],Yt()}},oe=function(Pe){return function(){Ht(Pe)}},se=function(Pe){Ht(Pe.data)},ce=function(Pe){vt.postMessage(Dt(Pe),Gt.protocol+"//"+Gt.host)};(!it||!lt)&&(it=function(Yt){z(arguments.length,1);var ne=bt(Yt)?Yt:Pt(Yt),ve=xt(arguments,1);return Nt[++Ft]=function(){gt(ne,void 0,ve)},Wt(Ft),Ft},lt=function(Yt){delete Nt[Yt]},at?Wt=function(Pe){ut.nextTick(oe(Pe))}:dt&&dt.now?Wt=function(Pe){dt.now(oe(Pe))}:At&&!tt?(Jt=new At,Ut=Jt.port2,Jt.port1.onmessage=se,Wt=kt(Ut.postMessage,Ut)):vt.addEventListener&&bt(vt.postMessage)&&!vt.importScripts&&Gt&&Gt.protocol!=="file:"&&!Tt(ce)?(Wt=ce,vt.addEventListener("message",se,!1)):jt in ft("script")?Wt=function(Pe){mt.appendChild(ft("script"))[jt]=function(){mt.removeChild(this),Ht(Pe)}}:Wt=function(Pe){setTimeout(oe(Pe),0)}),_t.exports={set:it,clear:lt}},{"../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(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this");_t.exports=vt(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(ot,_t,Bt){var vt=ot("../internals/to-integer-or-infinity"),gt=Math.max,kt=Math.min;_t.exports=function(bt,St){var Tt=vt(bt);return Tt<0?gt(Tt+St,0):kt(Tt,St)}},{"../internals/to-integer-or-infinity":248}],246:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-integer-or-infinity"),kt=ot("../internals/to-length"),bt=vt.RangeError;_t.exports=function(St){if(St===void 0)return 0;var Tt=gt(St),mt=kt(Tt);if(Tt!==mt)throw bt("Wrong length or index");return mt}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(ot,_t,Bt){var vt=ot("../internals/indexed-object"),gt=ot("../internals/require-object-coercible");_t.exports=function(kt){return vt(gt(kt))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(ot,_t,Bt){var vt=Math.ceil,gt=Math.floor;_t.exports=function(kt){var bt=+kt;return bt!==bt||bt===0?0:(bt>0?gt:vt)(bt)}},{}],249:[function(ot,_t,Bt){var vt=ot("../internals/to-integer-or-infinity"),gt=Math.min;_t.exports=function(kt){return kt>0?gt(vt(kt),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/require-object-coercible"),kt=vt.Object;_t.exports=function(bt){return kt(gt(bt))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-positive-integer"),kt=vt.RangeError;_t.exports=function(bt,St){var Tt=gt(bt);if(Tt%St)throw kt("Wrong offset");return Tt}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-integer-or-infinity"),kt=vt.RangeError;_t.exports=function(bt){var St=gt(bt);if(St<0)throw kt("The argument can't be less than 0");return St}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/is-object"),bt=ot("../internals/is-symbol"),St=ot("../internals/get-method"),Tt=ot("../internals/ordinary-to-primitive"),mt=ot("../internals/well-known-symbol"),xt=vt.TypeError,ft=mt("toPrimitive");_t.exports=function(z,tt){if(!kt(z)||bt(z))return z;var at=St(z,ft),it;if(at){if(tt===void 0&&(tt="default"),it=gt(at,z,tt),!kt(it)||bt(it))return it;throw xt("Can't convert object to primitive value")}return tt===void 0&&(tt="number"),Tt(z,tt)}},{"../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(ot,_t,Bt){var vt=ot("../internals/to-primitive"),gt=ot("../internals/is-symbol");_t.exports=function(kt){var bt=vt(kt,"string");return gt(bt)?bt:bt+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(ot,_t,Bt){var vt=ot("../internals/well-known-symbol"),gt=vt("toStringTag"),kt={};kt[gt]="z",_t.exports=String(kt)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/classof"),kt=vt.String;_t.exports=function(bt){if(gt(bt)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return kt(bt)}},{"../internals/classof":124,"../internals/global":163}],257:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=vt.String;_t.exports=function(kt){try{return gt(kt)}catch(bt){return"Object"}}},{"../internals/global":163}],258:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/function-call"),bt=ot("../internals/descriptors"),St=ot("../internals/typed-array-constructors-require-wrappers"),Tt=ot("../internals/array-buffer-view-core"),mt=ot("../internals/array-buffer"),xt=ot("../internals/an-instance"),ft=ot("../internals/create-property-descriptor"),z=ot("../internals/create-non-enumerable-property"),tt=ot("../internals/is-integral-number"),at=ot("../internals/to-length"),it=ot("../internals/to-index"),lt=ot("../internals/to-offset"),ut=ot("../internals/to-property-key"),dt=ot("../internals/has-own-property"),Pt=ot("../internals/classof"),At=ot("../internals/is-object"),Dt=ot("../internals/is-symbol"),Ft=ot("../internals/object-create"),Nt=ot("../internals/object-is-prototype-of"),jt=ot("../internals/object-set-prototype-of"),Gt=ot("../internals/object-get-own-property-names").f,Wt=ot("../internals/typed-array-from"),Jt=ot("../internals/array-iteration").forEach,Ut=ot("../internals/set-species"),Ht=ot("../internals/object-define-property"),oe=ot("../internals/object-get-own-property-descriptor"),se=ot("../internals/internal-state"),ce=ot("../internals/inherit-if-required"),Pe=se.get,Yt=se.set,ne=Ht.f,ve=oe.f,Se=Math.round,be=gt.RangeError,fe=mt.ArrayBuffer,pe=fe.prototype,he=mt.DataView,Ce=Tt.NATIVE_ARRAY_BUFFER_VIEWS,de=Tt.TYPED_ARRAY_CONSTRUCTOR,ye=Tt.TYPED_ARRAY_TAG,Ne=Tt.TypedArray,xe=Tt.TypedArrayPrototype,re=Tt.aTypedArrayConstructor,Kt=Tt.isTypedArray,wt="BYTES_PER_ELEMENT",Lt="Wrong length",Xt=function(ue,ge){re(ue);for(var Me=0,Ae=ge.length,Be=new ue(Ae);Ae>Me;)Be[Me]=ge[Me++];return Be},ee=function(ue,ge){ne(ue,ge,{get:function(){return Pe(this)[ge]}})},It=function(ue){var ge;return Nt(pe,ue)||(ge=Pt(ue))=="ArrayBuffer"||ge=="SharedArrayBuffer"},Rt=function(ue,ge){return Kt(ue)&&!Dt(ge)&&ge in ue&&tt(+ge)&&ge>=0},Vt=function(ge,Me){return Me=ut(Me),Rt(ge,Me)?ft(2,ge[Me]):ve(ge,Me)},$t=function(ge,Me,Ae){return Me=ut(Me),Rt(ge,Me)&&At(Ae)&&dt(Ae,"value")&&!dt(Ae,"get")&&!dt(Ae,"set")&&!Ae.configurable&&(!dt(Ae,"writable")||Ae.writable)&&(!dt(Ae,"enumerable")||Ae.enumerable)?(ge[Me]=Ae.value,ge):ne(ge,Me,Ae)};bt?(Ce||(oe.f=Vt,Ht.f=$t,ee(xe,"buffer"),ee(xe,"byteOffset"),ee(xe,"byteLength"),ee(xe,"length")),vt({target:"Object",stat:!0,forced:!Ce},{getOwnPropertyDescriptor:Vt,defineProperty:$t}),_t.exports=function(ue,ge,Me){var Ae=ue.match(/\d+$/)[0]/8,Be=ue+(Me?"Clamped":"")+"Array",Ze="get"+ue,Ye="set"+ue,Qe=gt[Be],He=Qe,Ue=He&&He.prototype,We={},Ve=function(ln,Sn){var _n=Pe(ln);return _n.view[Ze](Sn*Ae+_n.byteOffset,!0)},rn=function(ln,Sn,_n){var Xn=Pe(ln);Me&&(_n=(_n=Se(_n))<0?0:_n>255?255:_n&255),Xn.view[Ye](Sn*Ae+Xn.byteOffset,_n,!0)},an=function(ln,Sn){ne(ln,Sn,{get:function(){return Ve(this,Sn)},set:function(_n){return rn(this,Sn,_n)},enumerable:!0})};Ce?St&&(He=ge(function(ln,Sn,_n,Xn){return xt(ln,Ue),ce(function(){return At(Sn)?It(Sn)?Xn!==void 0?new Qe(Sn,lt(_n,Ae),Xn):_n!==void 0?new Qe(Sn,lt(_n,Ae)):new Qe(Sn):Kt(Sn)?Xt(He,Sn):kt(Wt,He,Sn):new Qe(it(Sn))}(),ln,He)}),jt&&jt(He,Ne),Jt(Gt(Qe),function(ln){ln in He||z(He,ln,Qe[ln])}),He.prototype=Ue):(He=ge(function(ln,Sn,_n,Xn){xt(ln,Ue);var Yn=0,Er=0,dr,Mr,Tr;if(!At(Sn))Tr=it(Sn),Mr=Tr*Ae,dr=new fe(Mr);else if(It(Sn)){dr=Sn,Er=lt(_n,Ae);var Or=Sn.byteLength;if(Xn===void 0){if(Or%Ae||(Mr=Or-Er,Mr<0))throw be(Lt)}else if(Mr=at(Xn)*Ae,Mr+Er>Or)throw be(Lt);Tr=Mr/Ae}else return Kt(Sn)?Xt(He,Sn):kt(Wt,He,Sn);for(Yt(ln,{buffer:dr,byteOffset:Er,byteLength:Mr,length:Tr,view:new he(dr)});Yn<Tr;)an(ln,Yn++)}),jt&&jt(He,Ne),Ue=He.prototype=Ft(xe)),Ue.constructor!==He&&z(Ue,"constructor",He),z(Ue,de,He),ye&&z(Ue,ye,Be),We[Be]=He,vt({global:!0,forced:He!=Qe,sham:!Ce},We),wt in He||z(He,wt,Ae),wt in Ue||z(Ue,wt,Ae),Ut(Be)}):_t.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(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/fails"),kt=ot("../internals/check-correctness-of-iteration"),bt=ot("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,St=vt.ArrayBuffer,Tt=vt.Int8Array;_t.exports=!bt||!gt(function(){Tt(1)})||!gt(function(){new Tt(-1)})||!kt(function(mt){new Tt,new Tt(null),new Tt(1.5),new Tt(mt)},!0)||gt(function(){return new Tt(new St(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(ot,_t,Bt){var vt=ot("../internals/array-from-constructor-and-list"),gt=ot("../internals/typed-array-species-constructor");_t.exports=function(kt,bt){return vt(gt(kt),bt)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(ot,_t,Bt){var vt=ot("../internals/function-bind-context"),gt=ot("../internals/function-call"),kt=ot("../internals/a-constructor"),bt=ot("../internals/to-object"),St=ot("../internals/length-of-array-like"),Tt=ot("../internals/get-iterator"),mt=ot("../internals/get-iterator-method"),xt=ot("../internals/is-array-iterator-method"),ft=ot("../internals/array-buffer-view-core").aTypedArrayConstructor;_t.exports=function(tt){var at=kt(this),it=bt(tt),lt=arguments.length,ut=lt>1?arguments[1]:void 0,dt=ut!==void 0,Pt=mt(it),At,Dt,Ft,Nt,jt,Gt;if(Pt&&!xt(Pt))for(jt=Tt(it,Pt),Gt=jt.next,it=[];!(Nt=gt(Gt,jt)).done;)it.push(Nt.value);for(dt&<>2&&(ut=vt(ut,arguments[2])),Dt=St(it),Ft=new(ft(at))(Dt),At=0;Dt>At;At++)Ft[At]=dt?ut(it[At],At):it[At];return Ft}},{"../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(ot,_t,Bt){var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/species-constructor"),kt=vt.TYPED_ARRAY_CONSTRUCTOR,bt=vt.aTypedArrayConstructor;_t.exports=function(St){return bt(gt(St,St[kt]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=0,kt=Math.random(),bt=vt(1 .toString);_t.exports=function(St){return"Symbol("+(St===void 0?"":St)+")_"+bt(++gt+kt,36)}},{"../internals/function-uncurry-this":157}],264:[function(ot,_t,Bt){var vt=ot("../internals/native-symbol");_t.exports=vt&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(ot,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/fails");_t.exports=vt&>(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=vt.TypeError;_t.exports=function(kt,bt){if(kt<bt)throw gt("Not enough arguments");return kt}},{"../internals/global":163}],267:[function(ot,_t,Bt){var vt=ot("../internals/well-known-symbol");Bt.f=vt},{"../internals/well-known-symbol":268}],268:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/shared"),kt=ot("../internals/has-own-property"),bt=ot("../internals/uid"),St=ot("../internals/native-symbol"),Tt=ot("../internals/use-symbol-as-uid"),mt=gt("wks"),xt=vt.Symbol,ft=xt&&xt.for,z=Tt?xt:xt&&xt.withoutSetter||bt;_t.exports=function(tt){if(!kt(mt,tt)||!(St||typeof mt[tt]=="string")){var at="Symbol."+tt;St&&kt(xt,tt)?mt[tt]=xt[tt]:Tt&&ft?mt[tt]=ft(at):mt[tt]=z(at)}return mt[tt]}},{"../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(ot,_t,Bt){_t.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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/array-buffer"),bt=ot("../internals/set-species"),St="ArrayBuffer",Tt=kt[St],mt=gt[St];vt({global:!0,forced:mt!==Tt},{ArrayBuffer:Tt}),bt(St)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/fails"),bt=ot("../internals/array-buffer"),St=ot("../internals/an-object"),Tt=ot("../internals/to-absolute-index"),mt=ot("../internals/to-length"),xt=ot("../internals/species-constructor"),ft=bt.ArrayBuffer,z=bt.DataView,tt=z.prototype,at=gt(ft.prototype.slice),it=gt(tt.getUint8),lt=gt(tt.setUint8),ut=kt(function(){return!new ft(2).slice(1,void 0).byteLength});vt({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:ut},{slice:function(Pt,At){if(at&&At===void 0)return at(St(this),Pt);for(var Dt=St(this).byteLength,Ft=Tt(Pt,Dt),Nt=Tt(At===void 0?Dt:At,Dt),jt=new(xt(this,ft))(mt(Nt-Ft)),Gt=new z(this),Wt=new z(jt),Jt=0;Ft<Nt;)lt(Wt,Jt++,it(Gt,Ft++));return jt}})},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/fails"),bt=ot("../internals/is-array"),St=ot("../internals/is-object"),Tt=ot("../internals/to-object"),mt=ot("../internals/length-of-array-like"),xt=ot("../internals/create-property"),ft=ot("../internals/array-species-create"),z=ot("../internals/array-method-has-species-support"),tt=ot("../internals/well-known-symbol"),at=ot("../internals/engine-v8-version"),it=tt("isConcatSpreadable"),lt=9007199254740991,ut="Maximum allowed index exceeded",dt=gt.TypeError,Pt=at>=51||!kt(function(){var Nt=[];return Nt[it]=!1,Nt.concat()[0]!==Nt}),At=z("concat"),Dt=function(Nt){if(!St(Nt))return!1;var jt=Nt[it];return jt!==void 0?!!jt:bt(Nt)},Ft=!Pt||!At;vt({target:"Array",proto:!0,forced:Ft},{concat:function(jt){var Gt=Tt(this),Wt=ft(Gt,0),Jt=0,Ut,Ht,oe,se,ce;for(Ut=-1,oe=arguments.length;Ut<oe;Ut++)if(ce=Ut===-1?Gt:arguments[Ut],Dt(ce)){if(se=mt(ce),Jt+se>lt)throw dt(ut);for(Ht=0;Ht<se;Ht++,Jt++)Ht in ce&&xt(Wt,Jt,ce[Ht])}else{if(Jt>=lt)throw dt(ut);xt(Wt,Jt++,ce)}return Wt.length=Jt,Wt}})},{"../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(ot,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/array-fill"),kt=ot("../internals/add-to-unscopables");vt({target:"Array",proto:!0},{fill:gt}),kt("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-iteration").filter,kt=ot("../internals/array-method-has-species-support"),bt=kt("filter");vt({target:"Array",proto:!0,forced:!bt},{filter:function(Tt){return gt(this,Tt,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-iteration").find,kt=ot("../internals/add-to-unscopables"),bt="find",St=!0;bt in[]&&Array(1)[bt](function(){St=!1}),vt({target:"Array",proto:!0,forced:St},{find:function(mt){return gt(this,mt,arguments.length>1?arguments[1]:void 0)}}),kt(bt)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(ot,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/array-from"),kt=ot("../internals/check-correctness-of-iteration"),bt=!kt(function(St){Array.from(St)});vt({target:"Array",stat:!0,forced:bt},{from:gt})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-includes").includes,kt=ot("../internals/add-to-unscopables");vt({target:"Array",proto:!0},{includes:function(St){return gt(this,St,arguments.length>1?arguments[1]:void 0)}}),kt("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/to-indexed-object"),gt=ot("../internals/add-to-unscopables"),kt=ot("../internals/iterators"),bt=ot("../internals/internal-state"),St=ot("../internals/object-define-property").f,Tt=ot("../internals/define-iterator"),mt=ot("../internals/is-pure"),xt=ot("../internals/descriptors"),ft="Array Iterator",z=bt.set,tt=bt.getterFor(ft);_t.exports=Tt(Array,"Array",function(it,lt){z(this,{type:ft,target:vt(it),index:0,kind:lt})},function(){var it=tt(this),lt=it.target,ut=it.kind,dt=it.index++;return!lt||dt>=lt.length?(it.target=void 0,{value:void 0,done:!0}):ut=="keys"?{value:dt,done:!1}:ut=="values"?{value:lt[dt],done:!1}:{value:[dt,lt[dt]],done:!1}},"values");var at=kt.Arguments=kt.Array;if(gt("keys"),gt("values"),gt("entries"),!mt&&xt&&at.name!=="values")try{St(at,"name",{value:"values"})}catch(it){}},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/indexed-object"),bt=ot("../internals/to-indexed-object"),St=ot("../internals/array-method-is-strict"),Tt=gt([].join),mt=kt!=Object,xt=St("join",",");vt({target:"Array",proto:!0,forced:mt||!xt},{join:function(z){return Tt(bt(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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-iteration").map,kt=ot("../internals/array-method-has-species-support"),bt=kt("map");vt({target:"Array",proto:!0,forced:!bt},{map:function(Tt){return gt(this,Tt,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/is-array"),bt=ot("../internals/is-constructor"),St=ot("../internals/is-object"),Tt=ot("../internals/to-absolute-index"),mt=ot("../internals/length-of-array-like"),xt=ot("../internals/to-indexed-object"),ft=ot("../internals/create-property"),z=ot("../internals/well-known-symbol"),tt=ot("../internals/array-method-has-species-support"),at=ot("../internals/array-slice"),it=tt("slice"),lt=z("species"),ut=gt.Array,dt=Math.max;vt({target:"Array",proto:!0,forced:!it},{slice:function(At,Dt){var Ft=xt(this),Nt=mt(Ft),jt=Tt(At,Nt),Gt=Tt(Dt===void 0?Nt:Dt,Nt),Wt,Jt,Ut;if(kt(Ft)&&(Wt=Ft.constructor,bt(Wt)&&(Wt===ut||kt(Wt.prototype))?Wt=void 0:St(Wt)&&(Wt=Wt[lt],Wt===null&&(Wt=void 0)),Wt===ut||Wt===void 0))return at(Ft,jt,Gt);for(Jt=new(Wt===void 0?ut:Wt)(dt(Gt-jt,0)),Ut=0;jt<Gt;jt++,Ut++)jt in Ft&&ft(Jt,Ut,Ft[jt]);return Jt.length=Ut,Jt}})},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/a-callable"),bt=ot("../internals/to-object"),St=ot("../internals/length-of-array-like"),Tt=ot("../internals/to-string"),mt=ot("../internals/fails"),xt=ot("../internals/array-sort"),ft=ot("../internals/array-method-is-strict"),z=ot("../internals/engine-ff-version"),tt=ot("../internals/engine-is-ie-or-edge"),at=ot("../internals/engine-v8-version"),it=ot("../internals/engine-webkit-version"),lt=[],ut=gt(lt.sort),dt=gt(lt.push),Pt=mt(function(){lt.sort(void 0)}),At=mt(function(){lt.sort(null)}),Dt=ft("sort"),Ft=!mt(function(){if(at)return at<70;if(!(z&&z>3)){if(tt)return!0;if(it)return it<603;var Gt="",Wt,Jt,Ut,Ht;for(Wt=65;Wt<76;Wt++){switch(Jt=String.fromCharCode(Wt),Wt){case 66:case 69:case 70:case 72:Ut=3;break;case 68:case 71:Ut=4;break;default:Ut=2}for(Ht=0;Ht<47;Ht++)lt.push({k:Jt+Ht,v:Ut})}for(lt.sort(function(oe,se){return se.v-oe.v}),Ht=0;Ht<lt.length;Ht++)Jt=lt[Ht].k.charAt(0),Gt.charAt(Gt.length-1)!==Jt&&(Gt+=Jt);return Gt!=="DGBEFHACIJK"}}),Nt=Pt||!At||!Dt||!Ft,jt=function(Gt){return function(Wt,Jt){return Jt===void 0?-1:Wt===void 0?1:Gt!==void 0?+Gt(Wt,Jt)||0:Tt(Wt)>Tt(Jt)?1:-1}};vt({target:"Array",proto:!0,forced:Nt},{sort:function(Wt){Wt!==void 0&&kt(Wt);var Jt=bt(this);if(Ft)return Wt===void 0?ut(Jt):ut(Jt,Wt);var Ut=[],Ht=St(Jt),oe,se;for(se=0;se<Ht;se++)se in Jt&&dt(Ut,Jt[se]);for(xt(Ut,jt(Wt)),oe=Ut.length,se=0;se<oe;)Jt[se]=Ut[se++];for(;se<Ht;)delete Jt[se++];return Jt}})},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/to-absolute-index"),bt=ot("../internals/to-integer-or-infinity"),St=ot("../internals/length-of-array-like"),Tt=ot("../internals/to-object"),mt=ot("../internals/array-species-create"),xt=ot("../internals/create-property"),ft=ot("../internals/array-method-has-species-support"),z=ft("splice"),tt=gt.TypeError,at=Math.max,it=Math.min,lt=9007199254740991,ut="Maximum allowed length exceeded";vt({target:"Array",proto:!0,forced:!z},{splice:function(Pt,At){var Dt=Tt(this),Ft=St(Dt),Nt=kt(Pt,Ft),jt=arguments.length,Gt,Wt,Jt,Ut,Ht,oe;if(jt===0?Gt=Wt=0:jt===1?(Gt=0,Wt=Ft-Nt):(Gt=jt-2,Wt=it(at(bt(At),0),Ft-Nt)),Ft+Gt-Wt>lt)throw tt(ut);for(Jt=mt(Dt,Wt),Ut=0;Ut<Wt;Ut++)Ht=Nt+Ut,Ht in Dt&&xt(Jt,Ut,Dt[Ht]);if(Jt.length=Wt,Gt<Wt){for(Ut=Nt;Ut<Ft-Wt;Ut++)Ht=Ut+Wt,oe=Ut+Gt,Ht in Dt?Dt[oe]=Dt[Ht]:delete Dt[oe];for(Ut=Ft;Ut>Ft-Wt+Gt;Ut--)delete Dt[Ut-1]}else if(Gt>Wt)for(Ut=Ft-Wt;Ut>Nt;Ut--)Ht=Ut+Wt-1,oe=Ut+Gt-1,Ht in Dt?Dt[oe]=Dt[Ht]:delete Dt[oe];for(Ut=0;Ut<Gt;Ut++)Dt[Ut+Nt]=arguments[Ut+2];return Dt.length=Ft-Wt+Gt,Jt}})},{"../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(ot,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/function-name").EXISTS,kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/object-define-property").f,St=Function.prototype,Tt=kt(St.toString),mt=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,xt=kt(mt.exec),ft="name";vt&&!gt&&bt(St,ft,{configurable:!0,get:function(){try{return xt(mt,Tt(this))[1]}catch(z){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(ot,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/get-built-in"),kt=ot("../internals/function-apply"),bt=ot("../internals/function-call"),St=ot("../internals/function-uncurry-this"),Tt=ot("../internals/fails"),mt=ot("../internals/is-array"),xt=ot("../internals/is-callable"),ft=ot("../internals/is-object"),z=ot("../internals/is-symbol"),tt=ot("../internals/array-slice"),at=ot("../internals/native-symbol"),it=gt("JSON","stringify"),lt=St(/./.exec),ut=St("".charAt),dt=St("".charCodeAt),Pt=St("".replace),At=St(1 .toString),Dt=/[\uD800-\uDFFF]/g,Ft=/^[\uD800-\uDBFF]$/,Nt=/^[\uDC00-\uDFFF]$/,jt=!at||Tt(function(){var Ut=gt("Symbol")();return it([Ut])!="[null]"||it({a:Ut})!="{}"||it(Object(Ut))!="{}"}),Gt=Tt(function(){return it("\uDF06\uD834")!=='"\\udf06\\ud834"'||it("\uDEAD")!=='"\\udead"'}),Wt=function(Ut,Ht){var oe=tt(arguments),se=Ht;if(!(!ft(Ht)&&Ut===void 0||z(Ut)))return mt(Ht)||(Ht=function(ce,Pe){if(xt(se)&&(Pe=bt(se,this,ce,Pe)),!z(Pe))return Pe}),oe[1]=Ht,kt(it,null,oe)},Jt=function(Ut,Ht,oe){var se=ut(oe,Ht-1),ce=ut(oe,Ht+1);return lt(Ft,Ut)&&!lt(Nt,ce)||lt(Nt,Ut)&&!lt(Ft,se)?"\\u"+At(dt(Ut,0),16):Ut};it&&vt({target:"JSON",stat:!0,forced:jt||Gt},{stringify:function(Ht,oe,se){var ce=tt(arguments),Pe=kt(jt?Wt:it,null,ce);return Gt&&typeof Pe=="string"?Pt(Pe,Dt,Jt):Pe}})},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/descriptors"),gt=ot("../internals/global"),kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/is-forced"),St=ot("../internals/redefine"),Tt=ot("../internals/has-own-property"),mt=ot("../internals/inherit-if-required"),xt=ot("../internals/object-is-prototype-of"),ft=ot("../internals/is-symbol"),z=ot("../internals/to-primitive"),tt=ot("../internals/fails"),at=ot("../internals/object-get-own-property-names").f,it=ot("../internals/object-get-own-property-descriptor").f,lt=ot("../internals/object-define-property").f,ut=ot("../internals/this-number-value"),dt=ot("../internals/string-trim").trim,Pt="Number",At=gt[Pt],Dt=At.prototype,Ft=gt.TypeError,Nt=kt("".slice),jt=kt("".charCodeAt),Gt=function(se){var ce=z(se,"number");return typeof ce=="bigint"?ce:Wt(ce)},Wt=function(se){var ce=z(se,"number"),Pe,Yt,ne,ve,Se,be,fe,pe;if(ft(ce))throw Ft("Cannot convert a Symbol value to a number");if(typeof ce=="string"&&ce.length>2){if(ce=dt(ce),Pe=jt(ce,0),Pe===43||Pe===45){if(Yt=jt(ce,2),Yt===88||Yt===120)return NaN}else if(Pe===48){switch(jt(ce,1)){case 66:case 98:ne=2,ve=49;break;case 79:case 111:ne=8,ve=55;break;default:return+ce}for(Se=Nt(ce,2),be=Se.length,fe=0;fe<be;fe++)if(pe=jt(Se,fe),pe<48||pe>ve)return NaN;return parseInt(Se,ne)}}return+ce};if(bt(Pt,!At(" 0o1")||!At("0b1")||At("+0x1"))){for(var Jt=function(ce){var Pe=arguments.length<1?0:At(Gt(ce)),Yt=this;return xt(Dt,Yt)&&tt(function(){ut(Yt)})?mt(Object(Pe),Yt,Jt):Pe},Ut=vt?at(At):"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(","),Ht=0,oe;Ut.length>Ht;Ht++)Tt(At,oe=Ut[Ht])&&!Tt(Jt,oe)&<(Jt,oe,it(At,oe));Jt.prototype=Dt,Dt.constructor=Jt,St(gt,Pt,Jt)}},{"../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(ot,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/object-assign");vt({target:"Object",stat:!0,forced:Object.assign!==gt},{assign:gt})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(ot,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/object-to-array").entries;vt({target:"Object",stat:!0},{entries:function(bt){return gt(bt)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(ot,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/native-symbol"),kt=ot("../internals/fails"),bt=ot("../internals/object-get-own-property-symbols"),St=ot("../internals/to-object"),Tt=!gt||kt(function(){bt.f(1)});vt({target:"Object",stat:!0,forced:Tt},{getOwnPropertySymbols:function(xt){var ft=bt.f;return ft?ft(St(xt)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(ot,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/to-object"),kt=ot("../internals/object-keys"),bt=ot("../internals/fails"),St=bt(function(){kt(1)});vt({target:"Object",stat:!0,forced:St},{keys:function(mt){return kt(gt(mt))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(ot,_t,Bt){var vt=ot("../internals/to-string-tag-support"),gt=ot("../internals/redefine"),kt=ot("../internals/object-to-string");vt||gt(Object.prototype,"toString",kt,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),kt=ot("../internals/a-callable"),bt=ot("../internals/new-promise-capability"),St=ot("../internals/perform"),Tt=ot("../internals/iterate"),mt=ot("../internals/promise-statics-incorrect-iteration");vt({target:"Promise",stat:!0,forced:mt},{all:function(ft){var z=this,tt=bt.f(z),at=tt.resolve,it=tt.reject,lt=St(function(){var ut=kt(z.resolve),dt=[],Pt=0,At=1;Tt(ft,function(Dt){var Ft=Pt++,Nt=!1;At++,gt(ut,z,Dt).then(function(jt){Nt||(Nt=!0,dt[Ft]=jt,--At||at(dt))},it)}),--At||at(dt)});return lt.error&&it(lt.value),tt.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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/is-pure"),kt=ot("../internals/promise-constructor-detection").CONSTRUCTOR,bt=ot("../internals/promise-native-constructor"),St=ot("../internals/get-built-in"),Tt=ot("../internals/is-callable"),mt=ot("../internals/redefine"),xt=bt&&bt.prototype;if(vt({target:"Promise",proto:!0,forced:kt,real:!0},{catch:function(z){return this.then(void 0,z)}}),!gt&&Tt(bt)){var ft=St("Promise").prototype.catch;xt.catch!==ft&&mt(xt,"catch",ft,{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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/is-pure"),kt=ot("../internals/engine-is-node"),bt=ot("../internals/global"),St=ot("../internals/function-call"),Tt=ot("../internals/redefine"),mt=ot("../internals/redefine-all"),xt=ot("../internals/object-set-prototype-of"),ft=ot("../internals/set-to-string-tag"),z=ot("../internals/set-species"),tt=ot("../internals/a-callable"),at=ot("../internals/is-callable"),it=ot("../internals/is-object"),lt=ot("../internals/an-instance"),ut=ot("../internals/species-constructor"),dt=ot("../internals/task").set,Pt=ot("../internals/microtask"),At=ot("../internals/host-report-errors"),Dt=ot("../internals/perform"),Ft=ot("../internals/queue"),Nt=ot("../internals/internal-state"),jt=ot("../internals/promise-native-constructor"),Gt=ot("../internals/promise-constructor-detection"),Wt=ot("../internals/new-promise-capability"),Jt="Promise",Ut=Gt.CONSTRUCTOR,Ht=Gt.REJECTION_EVENT,oe=Gt.SUBCLASSING,se=Nt.getterFor(Jt),ce=Nt.set,Pe=jt&&jt.prototype,Yt=jt,ne=Pe,ve=bt.TypeError,Se=bt.document,be=bt.process,fe=Wt.f,pe=fe,he=!!(Se&&Se.createEvent&&bt.dispatchEvent),Ce="unhandledrejection",de="rejectionhandled",ye=0,Ne=1,xe=2,re=1,Kt=2,wt,Lt,Xt,ee,It=function(Ye){var Qe;return it(Ye)&&at(Qe=Ye.then)?Qe:!1},Rt=function(Ye,Qe){var He=Qe.value,Ue=Qe.state==Ne,We=Ue?Ye.ok:Ye.fail,Ve=Ye.resolve,rn=Ye.reject,an=Ye.domain,ln,Sn,_n;try{We?(Ue||(Qe.rejection===Kt&&Me(Qe),Qe.rejection=re),We===!0?ln=He:(an&&an.enter(),ln=We(He),an&&(an.exit(),_n=!0)),ln===Ye.promise?rn(ve("Promise-chain cycle")):(Sn=It(ln))?St(Sn,ln,Ve,rn):Ve(ln)):rn(He)}catch(Xn){an&&!_n&&an.exit(),rn(Xn)}},Vt=function(Ye,Qe){Ye.notified||(Ye.notified=!0,Pt(function(){for(var He=Ye.reactions,Ue;Ue=He.get();)Rt(Ue,Ye);Ye.notified=!1,Qe&&!Ye.rejection&&ue(Ye)}))},$t=function(Ye,Qe,He){var Ue,We;he?(Ue=Se.createEvent("Event"),Ue.promise=Qe,Ue.reason=He,Ue.initEvent(Ye,!1,!0),bt.dispatchEvent(Ue)):Ue={promise:Qe,reason:He},!Ht&&(We=bt["on"+Ye])?We(Ue):Ye===Ce&&At("Unhandled promise rejection",He)},ue=function(Ye){St(dt,bt,function(){var Qe=Ye.facade,He=Ye.value,Ue=ge(Ye),We;if(Ue&&(We=Dt(function(){kt?be.emit("unhandledRejection",He,Qe):$t(Ce,Qe,He)}),Ye.rejection=kt||ge(Ye)?Kt:re,We.error))throw We.value})},ge=function(Ye){return Ye.rejection!==re&&!Ye.parent},Me=function(Ye){St(dt,bt,function(){var Qe=Ye.facade;kt?be.emit("rejectionHandled",Qe):$t(de,Qe,Ye.value)})},Ae=function(Ye,Qe,He){return function(Ue){Ye(Qe,Ue,He)}},Be=function(Ye,Qe,He){Ye.done||(Ye.done=!0,He&&(Ye=He),Ye.value=Qe,Ye.state=xe,Vt(Ye,!0))},Ze=function(Ye,Qe,He){if(!Ye.done){Ye.done=!0,He&&(Ye=He);try{if(Ye.facade===Qe)throw ve("Promise can't be resolved itself");var Ue=It(Qe);Ue?Pt(function(){var We={done:!1};try{St(Ue,Qe,Ae(Ze,We,Ye),Ae(Be,We,Ye))}catch(Ve){Be(We,Ve,Ye)}}):(Ye.value=Qe,Ye.state=Ne,Vt(Ye,!1))}catch(We){Be({done:!1},We,Ye)}}};if(Ut&&(Yt=function(Qe){lt(this,ne),tt(Qe),St(wt,this);var He=se(this);try{Qe(Ae(Ze,He),Ae(Be,He))}catch(Ue){Be(He,Ue)}},ne=Yt.prototype,wt=function(Qe){ce(this,{type:Jt,done:!1,notified:!1,parent:!1,reactions:new Ft,rejection:!1,state:ye,value:void 0})},wt.prototype=mt(ne,{then:function(Qe,He){var Ue=se(this),We=fe(ut(this,Yt));return Ue.parent=!0,We.ok=at(Qe)?Qe:!0,We.fail=at(He)&&He,We.domain=kt?be.domain:void 0,Ue.state==ye?Ue.reactions.add(We):Pt(function(){Rt(We,Ue)}),We.promise}}),Lt=function(){var Ye=new wt,Qe=se(Ye);this.promise=Ye,this.resolve=Ae(Ze,Qe),this.reject=Ae(Be,Qe)},Wt.f=fe=function(Ye){return Ye===Yt||Ye===Xt?new Lt(Ye):pe(Ye)},!gt&&at(jt)&&Pe!==Object.prototype)){ee=Pe.then,oe||Tt(Pe,"then",function(Qe,He){var Ue=this;return new Yt(function(We,Ve){St(ee,Ue,We,Ve)}).then(Qe,He)},{unsafe:!0});try{delete Pe.constructor}catch(Ye){}xt&&xt(Pe,ne)}vt({global:!0,wrap:!0,forced:Ut},{Promise:Yt}),ft(Yt,Jt,!1,!0),z(Jt)},{"../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(ot,_t,Bt){ot("../modules/es.promise.constructor"),ot("../modules/es.promise.all"),ot("../modules/es.promise.catch"),ot("../modules/es.promise.race"),ot("../modules/es.promise.reject"),ot("../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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),kt=ot("../internals/a-callable"),bt=ot("../internals/new-promise-capability"),St=ot("../internals/perform"),Tt=ot("../internals/iterate"),mt=ot("../internals/promise-statics-incorrect-iteration");vt({target:"Promise",stat:!0,forced:mt},{race:function(ft){var z=this,tt=bt.f(z),at=tt.reject,it=St(function(){var lt=kt(z.resolve);Tt(ft,function(ut){gt(lt,z,ut).then(tt.resolve,at)})});return it.error&&at(it.value),tt.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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),kt=ot("../internals/new-promise-capability"),bt=ot("../internals/promise-constructor-detection").CONSTRUCTOR;vt({target:"Promise",stat:!0,forced:bt},{reject:function(Tt){var mt=kt.f(this);return gt(mt.reject,void 0,Tt),mt.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/get-built-in"),kt=ot("../internals/is-pure"),bt=ot("../internals/promise-native-constructor"),St=ot("../internals/promise-constructor-detection").CONSTRUCTOR,Tt=ot("../internals/promise-resolve"),mt=gt("Promise"),xt=kt&&!St;vt({target:"Promise",stat:!0,forced:kt||St},{resolve:function(z){return Tt(xt&&this===mt?bt: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(ot,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/global"),kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/is-forced"),St=ot("../internals/inherit-if-required"),Tt=ot("../internals/create-non-enumerable-property"),mt=ot("../internals/object-get-own-property-names").f,xt=ot("../internals/object-is-prototype-of"),ft=ot("../internals/is-regexp"),z=ot("../internals/to-string"),tt=ot("../internals/regexp-get-flags"),at=ot("../internals/regexp-sticky-helpers"),it=ot("../internals/proxy-accessor"),lt=ot("../internals/redefine"),ut=ot("../internals/fails"),dt=ot("../internals/has-own-property"),Pt=ot("../internals/internal-state").enforce,At=ot("../internals/set-species"),Dt=ot("../internals/well-known-symbol"),Ft=ot("../internals/regexp-unsupported-dot-all"),Nt=ot("../internals/regexp-unsupported-ncg"),jt=Dt("match"),Gt=gt.RegExp,Wt=Gt.prototype,Jt=gt.SyntaxError,Ut=kt(Wt.exec),Ht=kt("".charAt),oe=kt("".replace),se=kt("".indexOf),ce=kt("".slice),Pe=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Yt=/a/g,ne=/a/g,ve=new Gt(Yt)!==Yt,Se=at.MISSED_STICKY,be=at.UNSUPPORTED_Y,fe=vt&&(!ve||Se||Ft||Nt||ut(function(){return ne[jt]=!1,Gt(Yt)!=Yt||Gt(ne)==ne||Gt(Yt,"i")!="/a/i"})),pe=function(Ne){for(var xe=Ne.length,re=0,Kt="",wt=!1,Lt;re<=xe;re++){if(Lt=Ht(Ne,re),Lt==="\\"){Kt+=Lt+Ht(Ne,++re);continue}!wt&&Lt==="."?Kt+="[\\s\\S]":(Lt==="["?wt=!0:Lt==="]"&&(wt=!1),Kt+=Lt)}return Kt},he=function(Ne){for(var xe=Ne.length,re=0,Kt="",wt=[],Lt={},Xt=!1,ee=!1,It=0,Rt="",Vt;re<=xe;re++){if(Vt=Ht(Ne,re),Vt==="\\")Vt=Vt+Ht(Ne,++re);else if(Vt==="]")Xt=!1;else if(!Xt)switch(!0){case Vt==="[":Xt=!0;break;case Vt==="(":Ut(Pe,ce(Ne,re+1))&&(re+=2,ee=!0),Kt+=Vt,It++;continue;case(Vt===">"&&ee):if(Rt===""||dt(Lt,Rt))throw new Jt("Invalid capture group name");Lt[Rt]=!0,wt[wt.length]=[Rt,It],ee=!1,Rt="";continue}ee?Rt+=Vt:Kt+=Vt}return[Kt,wt]};if(bt("RegExp",fe)){for(var Ce=function(xe,re){var Kt=xt(Wt,this),wt=ft(xe),Lt=re===void 0,Xt=[],ee=xe,It,Rt,Vt,$t,ue,ge;if(!Kt&&wt&&Lt&&xe.constructor===Ce)return xe;if((wt||xt(Wt,xe))&&(xe=xe.source,Lt&&(re=tt(ee))),xe=xe===void 0?"":z(xe),re=re===void 0?"":z(re),ee=xe,Ft&&"dotAll"in Yt&&(Rt=!!re&&se(re,"s")>-1,Rt&&(re=oe(re,/s/g,""))),It=re,Se&&"sticky"in Yt&&(Vt=!!re&&se(re,"y")>-1,Vt&&be&&(re=oe(re,/y/g,""))),Nt&&($t=he(xe),xe=$t[0],Xt=$t[1]),ue=St(Gt(xe,re),Kt?this:Wt,Ce),(Rt||Vt||Xt.length)&&(ge=Pt(ue),Rt&&(ge.dotAll=!0,ge.raw=Ce(pe(xe),It)),Vt&&(ge.sticky=!0),Xt.length&&(ge.groups=Xt)),xe!==ee)try{Tt(ue,"source",ee===""?"(?:)":ee)}catch(Me){}return ue},de=mt(Gt),ye=0;de.length>ye;)it(Ce,Gt,de[ye++]);Wt.constructor=Ce,Ce.prototype=Wt,lt(gt,"RegExp",Ce)}At("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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/regexp-exec");vt({target:"RegExp",proto:!0,forced:/./.exec!==gt},{exec:gt})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/function-name").PROPER,gt=ot("../internals/redefine"),kt=ot("../internals/an-object"),bt=ot("../internals/to-string"),St=ot("../internals/fails"),Tt=ot("../internals/regexp-get-flags"),mt="toString",xt=RegExp.prototype,ft=xt[mt],z=St(function(){return ft.call({source:"a",flags:"b"})!="/a/b"}),tt=vt&&ft.name!=mt;(z||tt)&>(RegExp.prototype,mt,function(){var it=kt(this),lt=bt(it.source),ut=bt(Tt(it));return"/"+lt+"/"+ut},{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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/not-a-regexp"),bt=ot("../internals/require-object-coercible"),St=ot("../internals/to-string"),Tt=ot("../internals/correct-is-regexp-logic"),mt=gt("".indexOf);vt({target:"String",proto:!0,forced:!Tt("includes")},{includes:function(ft){return!!~mt(St(bt(this)),St(kt(ft)),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(ot,_t,Bt){"use strict";var vt=ot("../internals/string-multibyte").charAt,gt=ot("../internals/to-string"),kt=ot("../internals/internal-state"),bt=ot("../internals/define-iterator"),St="String Iterator",Tt=kt.set,mt=kt.getterFor(St);bt(String,"String",function(xt){Tt(this,{type:St,string:gt(xt),index:0})},function(){var ft=mt(this),z=ft.string,tt=ft.index,at;return tt>=z.length?{value:void 0,done:!0}:(at=vt(z,tt),ft.index+=at.length,{value:at,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/function-call"),gt=ot("../internals/fix-regexp-well-known-symbol-logic"),kt=ot("../internals/an-object"),bt=ot("../internals/to-length"),St=ot("../internals/to-string"),Tt=ot("../internals/require-object-coercible"),mt=ot("../internals/get-method"),xt=ot("../internals/advance-string-index"),ft=ot("../internals/regexp-exec-abstract");gt("match",function(z,tt,at){return[function(lt){var ut=Tt(this),dt=lt==null?void 0:mt(lt,z);return dt?vt(dt,lt,ut):new RegExp(lt)[z](St(ut))},function(it){var lt=kt(this),ut=St(it),dt=at(tt,lt,ut);if(dt.done)return dt.value;if(!lt.global)return ft(lt,ut);var Pt=lt.unicode;lt.lastIndex=0;for(var At=[],Dt=0,Ft;(Ft=ft(lt,ut))!==null;){var Nt=St(Ft[0]);At[Dt]=Nt,Nt===""&&(lt.lastIndex=xt(ut,bt(lt.lastIndex),Pt)),Dt++}return Dt===0?null:At}]})},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/function-apply"),gt=ot("../internals/function-call"),kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/fix-regexp-well-known-symbol-logic"),St=ot("../internals/fails"),Tt=ot("../internals/an-object"),mt=ot("../internals/is-callable"),xt=ot("../internals/to-integer-or-infinity"),ft=ot("../internals/to-length"),z=ot("../internals/to-string"),tt=ot("../internals/require-object-coercible"),at=ot("../internals/advance-string-index"),it=ot("../internals/get-method"),lt=ot("../internals/get-substitution"),ut=ot("../internals/regexp-exec-abstract"),dt=ot("../internals/well-known-symbol"),Pt=dt("replace"),At=Math.max,Dt=Math.min,Ft=kt([].concat),Nt=kt([].push),jt=kt("".indexOf),Gt=kt("".slice),Wt=function(oe){return oe===void 0?oe:String(oe)},Jt=function(){return"a".replace(/./,"$0")==="$0"}(),Ut=function(){return/./[Pt]?/./[Pt]("a","$0")==="":!1}(),Ht=!St(function(){var oe=/./;return oe.exec=function(){var se=[];return se.groups={a:"7"},se},"".replace(oe,"$<a>")!=="7"});bt("replace",function(oe,se,ce){var Pe=Ut?"$":"$0";return[function(ne,ve){var Se=tt(this),be=ne==null?void 0:it(ne,Pt);return be?gt(be,ne,Se,ve):gt(se,z(Se),ne,ve)},function(Yt,ne){var ve=Tt(this),Se=z(Yt);if(typeof ne=="string"&&jt(ne,Pe)===-1&&jt(ne,"$<")===-1){var be=ce(se,ve,Se,ne);if(be.done)return be.value}var fe=mt(ne);fe||(ne=z(ne));var pe=ve.global;if(pe){var he=ve.unicode;ve.lastIndex=0}for(var Ce=[];;){var de=ut(ve,Se);if(de===null||(Nt(Ce,de),!pe))break;var ye=z(de[0]);ye===""&&(ve.lastIndex=at(Se,ft(ve.lastIndex),he))}for(var Ne="",xe=0,re=0;re<Ce.length;re++){de=Ce[re];for(var Kt=z(de[0]),wt=At(Dt(xt(de.index),Se.length),0),Lt=[],Xt=1;Xt<de.length;Xt++)Nt(Lt,Wt(de[Xt]));var ee=de.groups;if(fe){var It=Ft([Kt],Lt,wt,Se);ee!==void 0&&Nt(It,ee);var Rt=z(vt(ne,void 0,It))}else Rt=lt(Kt,Se,wt,Lt,ee,ne);wt>=xe&&(Ne+=Gt(Se,xe,wt)+Rt,xe=wt+Kt.length)}return Ne+Gt(Se,xe)}]},!Ht||!Jt||Ut)},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/function-call"),gt=ot("../internals/fix-regexp-well-known-symbol-logic"),kt=ot("../internals/an-object"),bt=ot("../internals/require-object-coercible"),St=ot("../internals/same-value"),Tt=ot("../internals/to-string"),mt=ot("../internals/get-method"),xt=ot("../internals/regexp-exec-abstract");gt("search",function(ft,z,tt){return[function(it){var lt=bt(this),ut=it==null?void 0:mt(it,ft);return ut?vt(ut,it,lt):new RegExp(it)[ft](Tt(lt))},function(at){var it=kt(this),lt=Tt(at),ut=tt(z,it,lt);if(ut.done)return ut.value;var dt=it.lastIndex;St(dt,0)||(it.lastIndex=0);var Pt=xt(it,lt);return St(it.lastIndex,dt)||(it.lastIndex=dt),Pt===null?-1:Pt.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(ot,_t,Bt){"use strict";var vt=ot("../internals/function-apply"),gt=ot("../internals/function-call"),kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/fix-regexp-well-known-symbol-logic"),St=ot("../internals/is-regexp"),Tt=ot("../internals/an-object"),mt=ot("../internals/require-object-coercible"),xt=ot("../internals/species-constructor"),ft=ot("../internals/advance-string-index"),z=ot("../internals/to-length"),tt=ot("../internals/to-string"),at=ot("../internals/get-method"),it=ot("../internals/array-slice-simple"),lt=ot("../internals/regexp-exec-abstract"),ut=ot("../internals/regexp-exec"),dt=ot("../internals/regexp-sticky-helpers"),Pt=ot("../internals/fails"),At=dt.UNSUPPORTED_Y,Dt=4294967295,Ft=Math.min,Nt=[].push,jt=kt(/./.exec),Gt=kt(Nt),Wt=kt("".slice),Jt=!Pt(function(){var Ut=/(?:)/,Ht=Ut.exec;Ut.exec=function(){return Ht.apply(this,arguments)};var oe="ab".split(Ut);return oe.length!==2||oe[0]!=="a"||oe[1]!=="b"});bt("split",function(Ut,Ht,oe){var se;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?se=function(ce,Pe){var Yt=tt(mt(this)),ne=Pe===void 0?Dt:Pe>>>0;if(ne===0)return[];if(ce===void 0)return[Yt];if(!St(ce))return gt(Ht,Yt,ce,ne);for(var ve=[],Se=(ce.ignoreCase?"i":"")+(ce.multiline?"m":"")+(ce.unicode?"u":"")+(ce.sticky?"y":""),be=0,fe=new RegExp(ce.source,Se+"g"),pe,he,Ce;(pe=gt(ut,fe,Yt))&&(he=fe.lastIndex,!(he>be&&(Gt(ve,Wt(Yt,be,pe.index)),pe.length>1&&pe.index<Yt.length&&vt(Nt,ve,it(pe,1)),Ce=pe[0].length,be=he,ve.length>=ne)));)fe.lastIndex===pe.index&&fe.lastIndex++;return be===Yt.length?(Ce||!jt(fe,""))&&Gt(ve,""):Gt(ve,Wt(Yt,be)),ve.length>ne?it(ve,0,ne):ve}:"0".split(void 0,0).length?se=function(ce,Pe){return ce===void 0&&Pe===0?[]:gt(Ht,this,ce,Pe)}:se=Ht,[function(Pe,Yt){var ne=mt(this),ve=Pe==null?void 0:at(Pe,Ut);return ve?gt(ve,Pe,ne,Yt):gt(se,tt(ne),Pe,Yt)},function(ce,Pe){var Yt=Tt(this),ne=tt(ce),ve=oe(se,Yt,ne,Pe,se!==Ht);if(ve.done)return ve.value;var Se=xt(Yt,RegExp),be=Yt.unicode,fe=(Yt.ignoreCase?"i":"")+(Yt.multiline?"m":"")+(Yt.unicode?"u":"")+(At?"g":"y"),pe=new Se(At?"^(?:"+Yt.source+")":Yt,fe),he=Pe===void 0?Dt:Pe>>>0;if(he===0)return[];if(ne.length===0)return lt(pe,ne)===null?[ne]:[];for(var Ce=0,de=0,ye=[];de<ne.length;){pe.lastIndex=At?0:de;var Ne=lt(pe,At?Wt(ne,de):ne),xe;if(Ne===null||(xe=Ft(z(pe.lastIndex+(At?de:0)),ne.length))===Ce)de=ft(ne,de,be);else{if(Gt(ye,Wt(ne,Ce,de)),ye.length===he)return ye;for(var re=1;re<=Ne.length-1;re++)if(Gt(ye,Ne[re]),ye.length===he)return ye;de=Ce=xe}}return Gt(ye,Wt(ne,Ce)),ye}]},!Jt,At)},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/string-trim").trim,kt=ot("../internals/string-trim-forced");vt({target:"String",proto:!0,forced:kt("trim")},{trim:function(){return gt(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/function-call"),bt=ot("../internals/function-uncurry-this"),St=ot("../internals/is-pure"),Tt=ot("../internals/descriptors"),mt=ot("../internals/native-symbol"),xt=ot("../internals/fails"),ft=ot("../internals/has-own-property"),z=ot("../internals/object-is-prototype-of"),tt=ot("../internals/an-object"),at=ot("../internals/to-indexed-object"),it=ot("../internals/to-property-key"),lt=ot("../internals/to-string"),ut=ot("../internals/create-property-descriptor"),dt=ot("../internals/object-create"),Pt=ot("../internals/object-keys"),At=ot("../internals/object-get-own-property-names"),Dt=ot("../internals/object-get-own-property-names-external"),Ft=ot("../internals/object-get-own-property-symbols"),Nt=ot("../internals/object-get-own-property-descriptor"),jt=ot("../internals/object-define-property"),Gt=ot("../internals/object-define-properties"),Wt=ot("../internals/object-property-is-enumerable"),Jt=ot("../internals/redefine"),Ut=ot("../internals/shared"),Ht=ot("../internals/shared-key"),oe=ot("../internals/hidden-keys"),se=ot("../internals/uid"),ce=ot("../internals/well-known-symbol"),Pe=ot("../internals/well-known-symbol-wrapped"),Yt=ot("../internals/define-well-known-symbol"),ne=ot("../internals/symbol-define-to-primitive"),ve=ot("../internals/set-to-string-tag"),Se=ot("../internals/internal-state"),be=ot("../internals/array-iteration").forEach,fe=Ht("hidden"),pe="Symbol",he="prototype",Ce=Se.set,de=Se.getterFor(pe),ye=Object[he],Ne=gt.Symbol,xe=Ne&&Ne[he],re=gt.TypeError,Kt=gt.QObject,wt=Nt.f,Lt=jt.f,Xt=Dt.f,ee=Wt.f,It=bt([].push),Rt=Ut("symbols"),Vt=Ut("op-symbols"),$t=Ut("wks"),ue=!Kt||!Kt[he]||!Kt[he].findChild,ge=Tt&&xt(function(){return dt(Lt({},"a",{get:function(){return Lt(this,"a",{value:7}).a}})).a!=7})?function(We,Ve,rn){var an=wt(ye,Ve);an&&delete ye[Ve],Lt(We,Ve,rn),an&&We!==ye&&Lt(ye,Ve,an)}:Lt,Me=function(We,Ve){var rn=Rt[We]=dt(xe);return Ce(rn,{type:pe,tag:We,description:Ve}),Tt||(rn.description=Ve),rn},Ae=function(Ve,rn,an){Ve===ye&&Ae(Vt,rn,an),tt(Ve);var ln=it(rn);return tt(an),ft(Rt,ln)?(an.enumerable?(ft(Ve,fe)&&Ve[fe][ln]&&(Ve[fe][ln]=!1),an=dt(an,{enumerable:ut(0,!1)})):(ft(Ve,fe)||Lt(Ve,fe,ut(1,{})),Ve[fe][ln]=!0),ge(Ve,ln,an)):Lt(Ve,ln,an)},Be=function(Ve,rn){tt(Ve);var an=at(rn),ln=Pt(an).concat(Ue(an));return be(ln,function(Sn){(!Tt||kt(Ye,an,Sn))&&Ae(Ve,Sn,an[Sn])}),Ve},Ze=function(Ve,rn){return rn===void 0?dt(Ve):Be(dt(Ve),rn)},Ye=function(Ve){var rn=it(Ve),an=kt(ee,this,rn);return this===ye&&ft(Rt,rn)&&!ft(Vt,rn)?!1:an||!ft(this,rn)||!ft(Rt,rn)||ft(this,fe)&&this[fe][rn]?an:!0},Qe=function(Ve,rn){var an=at(Ve),ln=it(rn);if(!(an===ye&&ft(Rt,ln)&&!ft(Vt,ln))){var Sn=wt(an,ln);return Sn&&ft(Rt,ln)&&!(ft(an,fe)&&an[fe][ln])&&(Sn.enumerable=!0),Sn}},He=function(Ve){var rn=Xt(at(Ve)),an=[];return be(rn,function(ln){!ft(Rt,ln)&&!ft(oe,ln)&&It(an,ln)}),an},Ue=function(We){var Ve=We===ye,rn=Xt(Ve?Vt:at(We)),an=[];return be(rn,function(ln){ft(Rt,ln)&&(!Ve||ft(ye,ln))&&It(an,Rt[ln])}),an};mt||(Ne=function(){if(z(xe,this))throw re("Symbol is not a constructor");var Ve=!arguments.length||arguments[0]===void 0?void 0:lt(arguments[0]),rn=se(Ve),an=function(ln){this===ye&&kt(an,Vt,ln),ft(this,fe)&&ft(this[fe],rn)&&(this[fe][rn]=!1),ge(this,rn,ut(1,ln))};return Tt&&ue&&ge(ye,rn,{configurable:!0,set:an}),Me(rn,Ve)},xe=Ne[he],Jt(xe,"toString",function(){return de(this).tag}),Jt(Ne,"withoutSetter",function(We){return Me(se(We),We)}),Wt.f=Ye,jt.f=Ae,Gt.f=Be,Nt.f=Qe,At.f=Dt.f=He,Ft.f=Ue,Pe.f=function(We){return Me(ce(We),We)},Tt&&(Lt(xe,"description",{configurable:!0,get:function(){return de(this).description}}),St||Jt(ye,"propertyIsEnumerable",Ye,{unsafe:!0}))),vt({global:!0,wrap:!0,forced:!mt,sham:!mt},{Symbol:Ne}),be(Pt($t),function(We){Yt(We)}),vt({target:pe,stat:!0,forced:!mt},{useSetter:function(){ue=!0},useSimple:function(){ue=!1}}),vt({target:"Object",stat:!0,forced:!mt,sham:!Tt},{create:Ze,defineProperty:Ae,defineProperties:Be,getOwnPropertyDescriptor:Qe}),vt({target:"Object",stat:!0,forced:!mt},{getOwnPropertyNames:He}),ne(),ve(Ne,pe),oe[fe]=!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(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/descriptors"),kt=ot("../internals/global"),bt=ot("../internals/function-uncurry-this"),St=ot("../internals/has-own-property"),Tt=ot("../internals/is-callable"),mt=ot("../internals/object-is-prototype-of"),xt=ot("../internals/to-string"),ft=ot("../internals/object-define-property").f,z=ot("../internals/copy-constructor-properties"),tt=kt.Symbol,at=tt&&tt.prototype;if(gt&&Tt(tt)&&(!("description"in at)||tt().description!==void 0)){var it={},lt=function(){var jt=arguments.length<1||arguments[0]===void 0?void 0:xt(arguments[0]),Gt=mt(at,this)?new tt(jt):jt===void 0?tt():tt(jt);return jt===""&&(it[Gt]=!0),Gt};z(lt,tt),lt.prototype=at,at.constructor=lt;var ut=String(tt("test"))=="Symbol(test)",dt=bt(at.toString),Pt=bt(at.valueOf),At=/^Symbol\((.*)\)[^)]+$/,Dt=bt("".replace),Ft=bt("".slice);ft(at,"description",{configurable:!0,get:function(){var jt=Pt(this),Gt=dt(jt);if(St(it,jt))return"";var Wt=ut?Ft(Gt,7,-1):Dt(Gt,At,"$1");return Wt===""?void 0:Wt}}),vt({global:!0,forced:!0},{Symbol:lt})}},{"../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(ot,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/get-built-in"),kt=ot("../internals/has-own-property"),bt=ot("../internals/to-string"),St=ot("../internals/shared"),Tt=ot("../internals/native-symbol-registry"),mt=St("string-to-symbol-registry"),xt=St("symbol-to-string-registry");vt({target:"Symbol",stat:!0,forced:!Tt},{for:function(ft){var z=bt(ft);if(kt(mt,z))return mt[z];var tt=gt("Symbol")(z);return mt[z]=tt,xt[tt]=z,tt}})},{"../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(ot,_t,Bt){var vt=ot("../internals/define-well-known-symbol");vt("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(ot,_t,Bt){ot("../modules/es.symbol.constructor"),ot("../modules/es.symbol.for"),ot("../modules/es.symbol.key-for"),ot("../modules/es.json.stringify"),ot("../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(ot,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/has-own-property"),kt=ot("../internals/is-symbol"),bt=ot("../internals/try-to-string"),St=ot("../internals/shared"),Tt=ot("../internals/native-symbol-registry"),mt=St("symbol-to-string-registry");vt({target:"Symbol",stat:!0,forced:!Tt},{keyFor:function(ft){if(!kt(ft))throw TypeError(bt(ft)+" is not a symbol");if(gt(mt,ft))return mt[ft]}})},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/array-buffer-view-core"),kt=ot("../internals/array-copy-within"),bt=vt(kt),St=gt.aTypedArray,Tt=gt.exportTypedArrayMethod;Tt("copyWithin",function(xt,ft){return bt(St(this),xt,ft,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(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").every,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("every",function(Tt){return gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/function-call"),kt=ot("../internals/array-fill"),bt=vt.aTypedArray,St=vt.exportTypedArrayMethod;St("fill",function(mt){var xt=arguments.length;return gt(kt,bt(this),mt,xt>1?arguments[1]:void 0,xt>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").filter,kt=ot("../internals/typed-array-from-species-and-list"),bt=vt.aTypedArray,St=vt.exportTypedArrayMethod;St("filter",function(mt){var xt=gt(bt(this),mt,arguments.length>1?arguments[1]:void 0);return kt(this,xt)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").findIndex,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("findIndex",function(Tt){return gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").find,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("find",function(Tt){return gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").forEach,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("forEach",function(Tt){gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-includes").includes,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("includes",function(Tt){return gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-includes").indexOf,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("indexOf",function(Tt){return gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/fails"),kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/array-buffer-view-core"),St=ot("../modules/es.array.iterator"),Tt=ot("../internals/well-known-symbol"),mt=Tt("iterator"),xt=vt.Uint8Array,ft=kt(St.values),z=kt(St.keys),tt=kt(St.entries),at=bt.aTypedArray,it=bt.exportTypedArrayMethod,lt=xt&&xt.prototype,ut=!gt(function(){lt[mt].call([1])}),dt=!!lt&<.values&<[mt]===lt.values&<.values.name==="values",Pt=function(){return ft(at(this))};it("entries",function(){return tt(at(this))},ut),it("keys",function(){return z(at(this))},ut),it("values",Pt,ut||!dt,{name:"values"}),it(mt,Pt,ut||!dt,{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(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/function-uncurry-this"),kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod,St=gt([].join);bt("join",function(mt){return St(kt(this),mt)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/function-apply"),kt=ot("../internals/array-last-index-of"),bt=vt.aTypedArray,St=vt.exportTypedArrayMethod;St("lastIndexOf",function(mt){var xt=arguments.length;return gt(kt,bt(this),xt>1?[mt,arguments[1]]:[mt])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").map,kt=ot("../internals/typed-array-species-constructor"),bt=vt.aTypedArray,St=vt.exportTypedArrayMethod;St("map",function(mt){return gt(bt(this),mt,arguments.length>1?arguments[1]:void 0,function(xt,ft){return new(kt(xt))(ft)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-reduce").right,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("reduceRight",function(Tt){var mt=arguments.length;return gt(kt(this),Tt,mt,mt>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-reduce").left,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("reduce",function(Tt){var mt=arguments.length;return gt(kt(this),Tt,mt,mt>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=vt.aTypedArray,kt=vt.exportTypedArrayMethod,bt=Math.floor;kt("reverse",function(){for(var Tt=this,mt=gt(Tt).length,xt=bt(mt/2),ft=0,z;ft<xt;)z=Tt[ft],Tt[ft++]=Tt[--mt],Tt[mt]=z;return Tt})},{"../internals/array-buffer-view-core":103}],331:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/array-buffer-view-core"),bt=ot("../internals/length-of-array-like"),St=ot("../internals/to-offset"),Tt=ot("../internals/to-object"),mt=ot("../internals/fails"),xt=vt.RangeError,ft=vt.Int8Array,z=ft&&ft.prototype,tt=z&&z.set,at=kt.aTypedArray,it=kt.exportTypedArrayMethod,lt=!mt(function(){var dt=new Uint8ClampedArray(2);return gt(tt,dt,{length:1,0:3},1),dt[1]!==3}),ut=lt&&kt.NATIVE_ARRAY_BUFFER_VIEWS&&mt(function(){var dt=new ft(2);return dt.set(1),dt.set("2",1),dt[0]!==0||dt[1]!==2});it("set",function(Pt){at(this);var At=St(arguments.length>1?arguments[1]:void 0,1),Dt=Tt(Pt);if(lt)return gt(tt,this,Dt,At);var Ft=this.length,Nt=bt(Dt),jt=0;if(Nt+At>Ft)throw xt("Wrong length");for(;jt<Nt;)this[At+jt]=Dt[jt++]},!lt||ut)},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/typed-array-species-constructor"),kt=ot("../internals/fails"),bt=ot("../internals/array-slice"),St=vt.aTypedArray,Tt=vt.exportTypedArrayMethod,mt=kt(function(){new Int8Array(1).slice()});Tt("slice",function(ft,z){for(var tt=bt(St(this),ft,z),at=gt(this),it=0,lt=tt.length,ut=new at(lt);lt>it;)ut[it]=tt[it++];return ut},mt)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").some,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("some",function(Tt){return gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/fails"),bt=ot("../internals/a-callable"),St=ot("../internals/array-sort"),Tt=ot("../internals/array-buffer-view-core"),mt=ot("../internals/engine-ff-version"),xt=ot("../internals/engine-is-ie-or-edge"),ft=ot("../internals/engine-v8-version"),z=ot("../internals/engine-webkit-version"),tt=Tt.aTypedArray,at=Tt.exportTypedArrayMethod,it=vt.Uint16Array,lt=it&>(it.prototype.sort),ut=!!lt&&!(kt(function(){lt(new it(2),null)})&&kt(function(){lt(new it(2),{})})),dt=!!lt&&!kt(function(){if(ft)return ft<74;if(mt)return mt<67;if(xt)return!0;if(z)return z<602;var At=new it(516),Dt=Array(516),Ft,Nt;for(Ft=0;Ft<516;Ft++)Nt=Ft%4,At[Ft]=515-Ft,Dt[Ft]=Ft-2*Nt+3;for(lt(At,function(jt,Gt){return(jt/4|0)-(Gt/4|0)}),Ft=0;Ft<516;Ft++)if(At[Ft]!==Dt[Ft])return!0}),Pt=function(At){return function(Dt,Ft){return At!==void 0?+At(Dt,Ft)||0:Ft!==Ft?-1:Dt!==Dt?1:Dt===0&&Ft===0?1/Dt>0&&1/Ft<0?1:-1:Dt>Ft}};at("sort",function(Dt){return Dt!==void 0&&bt(Dt),dt?lt(this,Dt):St(tt(this),Pt(Dt))},!dt||ut)},{"../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(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/to-length"),kt=ot("../internals/to-absolute-index"),bt=ot("../internals/typed-array-species-constructor"),St=vt.aTypedArray,Tt=vt.exportTypedArrayMethod;Tt("subarray",function(xt,ft){var z=St(this),tt=z.length,at=kt(xt,tt),it=bt(z);return new it(z.buffer,z.byteOffset+at*z.BYTES_PER_ELEMENT,gt((ft===void 0?tt:kt(ft,tt))-at))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-apply"),kt=ot("../internals/array-buffer-view-core"),bt=ot("../internals/fails"),St=ot("../internals/array-slice"),Tt=vt.Int8Array,mt=kt.aTypedArray,xt=kt.exportTypedArrayMethod,ft=[].toLocaleString,z=!!Tt&&bt(function(){ft.call(new Tt(1))}),tt=bt(function(){return[1,2].toLocaleString()!=new Tt([1,2]).toLocaleString()})||!bt(function(){Tt.prototype.toLocaleString.call([1,2])});xt("toLocaleString",function(){return gt(ft,z?St(mt(this)):mt(this),St(arguments))},tt)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core").exportTypedArrayMethod,gt=ot("../internals/fails"),kt=ot("../internals/global"),bt=ot("../internals/function-uncurry-this"),St=kt.Uint8Array,Tt=St&&St.prototype||{},mt=[].toString,xt=bt([].join);gt(function(){mt.call({})})&&(mt=function(){return xt(this)});var ft=Tt.toString!=mt;vt("toString",mt,ft)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(ot,_t,Bt){var vt=ot("../internals/typed-array-constructor");vt("Uint8",function(gt){return function(bt,St,Tt){return gt(this,bt,St,Tt)}})},{"../internals/typed-array-constructor":258}],339:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/dom-iterables"),kt=ot("../internals/dom-token-list-prototype"),bt=ot("../internals/array-for-each"),St=ot("../internals/create-non-enumerable-property"),Tt=function(xt){if(xt&&xt.forEach!==bt)try{St(xt,"forEach",bt)}catch(ft){xt.forEach=bt}};for(var mt in gt)gt[mt]&&Tt(vt[mt]&&vt[mt].prototype);Tt(kt)},{"../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(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/dom-iterables"),kt=ot("../internals/dom-token-list-prototype"),bt=ot("../modules/es.array.iterator"),St=ot("../internals/create-non-enumerable-property"),Tt=ot("../internals/well-known-symbol"),mt=Tt("iterator"),xt=Tt("toStringTag"),ft=bt.values,z=function(at,it){if(at){if(at[mt]!==ft)try{St(at,mt,ft)}catch(ut){at[mt]=ft}if(at[xt]||St(at,xt,it),gt[it]){for(var lt in bt)if(at[lt]!==bt[lt])try{St(at,lt,bt[lt])}catch(ut){at[lt]=bt[lt]}}}};for(var tt in gt)z(vt[tt]&&vt[tt].prototype,tt);z(kt,"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(ot,_t,Bt){function vt(dt){return Array.isArray?Array.isArray(dt):ut(dt)==="[object Array]"}Bt.isArray=vt;function gt(dt){return typeof dt=="boolean"}Bt.isBoolean=gt;function kt(dt){return dt===null}Bt.isNull=kt;function bt(dt){return dt==null}Bt.isNullOrUndefined=bt;function St(dt){return typeof dt=="number"}Bt.isNumber=St;function Tt(dt){return typeof dt=="string"}Bt.isString=Tt;function mt(dt){return typeof dt=="symbol"}Bt.isSymbol=mt;function xt(dt){return dt===void 0}Bt.isUndefined=xt;function ft(dt){return ut(dt)==="[object RegExp]"}Bt.isRegExp=ft;function z(dt){return typeof dt=="object"&&dt!==null}Bt.isObject=z;function tt(dt){return ut(dt)==="[object Date]"}Bt.isDate=tt;function at(dt){return ut(dt)==="[object Error]"||dt instanceof Error}Bt.isError=at;function it(dt){return typeof dt=="function"}Bt.isFunction=it;function lt(dt){return dt===null||typeof dt=="boolean"||typeof dt=="number"||typeof dt=="string"||typeof dt=="symbol"||typeof dt=="undefined"}Bt.isPrimitive=lt,Bt.isBuffer=ot("buffer").Buffer.isBuffer;function ut(dt){return Object.prototype.toString.call(dt)}},{buffer:90}],342:[function(ot,_t,Bt){(function(vt){"use strict";var gt=function(){var mt=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,xt=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,ft=/[^-+\dA-Z]/g;return function(z,tt,at,it){if(arguments.length===1&&Tt(z)==="string"&&!/\d/.test(z)&&(tt=z,z=void 0),z=z||new Date,z instanceof Date||(z=new Date(z)),isNaN(z))throw TypeError("Invalid date");tt=String(gt.masks[tt]||tt||gt.masks.default);var lt=tt.slice(0,4);(lt==="UTC:"||lt==="GMT:")&&(tt=tt.slice(4),at=!0,lt==="GMT:"&&(it=!0));var ut=at?"getUTC":"get",dt=z[ut+"Date"](),Pt=z[ut+"Day"](),At=z[ut+"Month"](),Dt=z[ut+"FullYear"](),Ft=z[ut+"Hours"](),Nt=z[ut+"Minutes"](),jt=z[ut+"Seconds"](),Gt=z[ut+"Milliseconds"](),Wt=at?0:z.getTimezoneOffset(),Jt=bt(z),Ut=St(z),Ht={d:dt,dd:kt(dt),ddd:gt.i18n.dayNames[Pt],dddd:gt.i18n.dayNames[Pt+7],m:At+1,mm:kt(At+1),mmm:gt.i18n.monthNames[At],mmmm:gt.i18n.monthNames[At+12],yy:String(Dt).slice(2),yyyy:Dt,h:Ft%12||12,hh:kt(Ft%12||12),H:Ft,HH:kt(Ft),M:Nt,MM:kt(Nt),s:jt,ss:kt(jt),l:kt(Gt,3),L:kt(Math.round(Gt/10)),t:Ft<12?"a":"p",tt:Ft<12?"am":"pm",T:Ft<12?"A":"P",TT:Ft<12?"AM":"PM",Z:it?"GMT":at?"UTC":(String(z).match(xt)||[""]).pop().replace(ft,""),o:(Wt>0?"-":"+")+kt(Math.floor(Math.abs(Wt)/60)*100+Math.abs(Wt)%60,4),S:["th","st","nd","rd"][dt%10>3?0:(dt%100-dt%10!=10)*dt%10],W:Jt,N:Ut};return tt.replace(mt,function(oe){return oe in Ht?Ht[oe]:oe.slice(1,oe.length-1)})}}();gt.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"},gt.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 kt(mt,xt){for(mt=String(mt),xt=xt||2;mt.length<xt;)mt="0"+mt;return mt}function bt(mt){var xt=new Date(mt.getFullYear(),mt.getMonth(),mt.getDate());xt.setDate(xt.getDate()-(xt.getDay()+6)%7+3);var ft=new Date(xt.getFullYear(),0,4);ft.setDate(ft.getDate()-(ft.getDay()+6)%7+3);var z=xt.getTimezoneOffset()-ft.getTimezoneOffset();xt.setHours(xt.getHours()-z);var tt=(xt-ft)/(864e5*7);return 1+Math.floor(tt)}function St(mt){var xt=mt.getDay();return xt===0&&(xt=7),xt}function Tt(mt){return mt===null?"null":mt===void 0?"undefined":typeof mt!="object"?typeof mt:Array.isArray(mt)?"array":{}.toString.call(mt).slice(8,-1).toLowerCase()}typeof le=="function"&&le.amd?le(function(){return gt}):typeof Bt=="object"?_t.exports=gt:vt.dateFormat=gt})(this)},{}],343:[function(ot,_t,Bt){"use strict";var vt=/["'&<>]/;_t.exports=gt;function gt(kt){var bt=""+kt,St=vt.exec(bt);if(!St)return bt;var Tt,mt="",xt=0,ft=0;for(xt=St.index;xt<bt.length;xt++){switch(bt.charCodeAt(xt)){case 34:Tt=""";break;case 38:Tt="&";break;case 39:Tt="'";break;case 60:Tt="<";break;case 62:Tt=">";break;default:continue}ft!==xt&&(mt+=bt.substring(ft,xt)),ft=xt+1,mt+=Tt}return ft!==xt?mt+bt.substring(ft,xt):mt}},{}],344:[function(ot,_t,Bt){"use strict";var vt=typeof Reflect=="object"?Reflect:null,gt=vt&&typeof vt.apply=="function"?vt.apply:function(jt,Gt,Wt){return Function.prototype.apply.call(jt,Gt,Wt)},kt;vt&&typeof vt.ownKeys=="function"?kt=vt.ownKeys:Object.getOwnPropertySymbols?kt=function(jt){return Object.getOwnPropertyNames(jt).concat(Object.getOwnPropertySymbols(jt))}:kt=function(jt){return Object.getOwnPropertyNames(jt)};function bt(Nt){console&&console.warn&&console.warn(Nt)}var St=Number.isNaN||function(jt){return jt!==jt};function Tt(){Tt.init.call(this)}_t.exports=Tt,_t.exports.once=At,Tt.EventEmitter=Tt,Tt.prototype._events=void 0,Tt.prototype._eventsCount=0,Tt.prototype._maxListeners=void 0;var mt=10;function xt(Nt){if(typeof Nt!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Nt)}Object.defineProperty(Tt,"defaultMaxListeners",{enumerable:!0,get:function(){return mt},set:function(Nt){if(typeof Nt!="number"||Nt<0||St(Nt))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+Nt+".");mt=Nt}}),Tt.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},Tt.prototype.setMaxListeners=function(jt){if(typeof jt!="number"||jt<0||St(jt))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+jt+".");return this._maxListeners=jt,this};function ft(Nt){return Nt._maxListeners===void 0?Tt.defaultMaxListeners:Nt._maxListeners}Tt.prototype.getMaxListeners=function(){return ft(this)},Tt.prototype.emit=function(jt){for(var Gt=[],Wt=1;Wt<arguments.length;Wt++)Gt.push(arguments[Wt]);var Jt=jt==="error",Ut=this._events;if(Ut!==void 0)Jt=Jt&&Ut.error===void 0;else if(!Jt)return!1;if(Jt){var Ht;if(Gt.length>0&&(Ht=Gt[0]),Ht instanceof Error)throw Ht;var oe=new Error("Unhandled error."+(Ht?" ("+Ht.message+")":""));throw oe.context=Ht,oe}var se=Ut[jt];if(se===void 0)return!1;if(typeof se=="function")gt(se,this,Gt);else for(var ce=se.length,Pe=ut(se,ce),Wt=0;Wt<ce;++Wt)gt(Pe[Wt],this,Gt);return!0};function z(Nt,jt,Gt,Wt){var Jt,Ut,Ht;if(xt(Gt),Ut=Nt._events,Ut===void 0?(Ut=Nt._events=Object.create(null),Nt._eventsCount=0):(Ut.newListener!==void 0&&(Nt.emit("newListener",jt,Gt.listener?Gt.listener:Gt),Ut=Nt._events),Ht=Ut[jt]),Ht===void 0)Ht=Ut[jt]=Gt,++Nt._eventsCount;else if(typeof Ht=="function"?Ht=Ut[jt]=Wt?[Gt,Ht]:[Ht,Gt]:Wt?Ht.unshift(Gt):Ht.push(Gt),Jt=ft(Nt),Jt>0&&Ht.length>Jt&&!Ht.warned){Ht.warned=!0;var oe=new Error("Possible EventEmitter memory leak detected. "+Ht.length+" "+String(jt)+" listeners added. Use emitter.setMaxListeners() to increase limit");oe.name="MaxListenersExceededWarning",oe.emitter=Nt,oe.type=jt,oe.count=Ht.length,bt(oe)}return Nt}Tt.prototype.addListener=function(jt,Gt){return z(this,jt,Gt,!1)},Tt.prototype.on=Tt.prototype.addListener,Tt.prototype.prependListener=function(jt,Gt){return z(this,jt,Gt,!0)};function tt(){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 at(Nt,jt,Gt){var Wt={fired:!1,wrapFn:void 0,target:Nt,type:jt,listener:Gt},Jt=tt.bind(Wt);return Jt.listener=Gt,Wt.wrapFn=Jt,Jt}Tt.prototype.once=function(jt,Gt){return xt(Gt),this.on(jt,at(this,jt,Gt)),this},Tt.prototype.prependOnceListener=function(jt,Gt){return xt(Gt),this.prependListener(jt,at(this,jt,Gt)),this},Tt.prototype.removeListener=function(jt,Gt){var Wt,Jt,Ut,Ht,oe;if(xt(Gt),Jt=this._events,Jt===void 0)return this;if(Wt=Jt[jt],Wt===void 0)return this;if(Wt===Gt||Wt.listener===Gt)--this._eventsCount===0?this._events=Object.create(null):(delete Jt[jt],Jt.removeListener&&this.emit("removeListener",jt,Wt.listener||Gt));else if(typeof Wt!="function"){for(Ut=-1,Ht=Wt.length-1;Ht>=0;Ht--)if(Wt[Ht]===Gt||Wt[Ht].listener===Gt){oe=Wt[Ht].listener,Ut=Ht;break}if(Ut<0)return this;Ut===0?Wt.shift():dt(Wt,Ut),Wt.length===1&&(Jt[jt]=Wt[0]),Jt.removeListener!==void 0&&this.emit("removeListener",jt,oe||Gt)}return this},Tt.prototype.off=Tt.prototype.removeListener,Tt.prototype.removeAllListeners=function(jt){var Gt,Wt,Jt;if(Wt=this._events,Wt===void 0)return this;if(Wt.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Wt[jt]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Wt[jt]),this;if(arguments.length===0){var Ut=Object.keys(Wt),Ht;for(Jt=0;Jt<Ut.length;++Jt)Ht=Ut[Jt],Ht!=="removeListener"&&this.removeAllListeners(Ht);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Gt=Wt[jt],typeof Gt=="function")this.removeListener(jt,Gt);else if(Gt!==void 0)for(Jt=Gt.length-1;Jt>=0;Jt--)this.removeListener(jt,Gt[Jt]);return this};function it(Nt,jt,Gt){var Wt=Nt._events;if(Wt===void 0)return[];var Jt=Wt[jt];return Jt===void 0?[]:typeof Jt=="function"?Gt?[Jt.listener||Jt]:[Jt]:Gt?Pt(Jt):ut(Jt,Jt.length)}Tt.prototype.listeners=function(jt){return it(this,jt,!0)},Tt.prototype.rawListeners=function(jt){return it(this,jt,!1)},Tt.listenerCount=function(Nt,jt){return typeof Nt.listenerCount=="function"?Nt.listenerCount(jt):lt.call(Nt,jt)},Tt.prototype.listenerCount=lt;function lt(Nt){var jt=this._events;if(jt!==void 0){var Gt=jt[Nt];if(typeof Gt=="function")return 1;if(Gt!==void 0)return Gt.length}return 0}Tt.prototype.eventNames=function(){return this._eventsCount>0?kt(this._events):[]};function ut(Nt,jt){for(var Gt=new Array(jt),Wt=0;Wt<jt;++Wt)Gt[Wt]=Nt[Wt];return Gt}function dt(Nt,jt){for(;jt+1<Nt.length;jt++)Nt[jt]=Nt[jt+1];Nt.pop()}function Pt(Nt){for(var jt=new Array(Nt.length),Gt=0;Gt<jt.length;++Gt)jt[Gt]=Nt[Gt].listener||Nt[Gt];return jt}function At(Nt,jt){return new Promise(function(Gt,Wt){function Jt(Ht){Nt.removeListener(jt,Ut),Wt(Ht)}function Ut(){typeof Nt.removeListener=="function"&&Nt.removeListener("error",Jt),Gt([].slice.call(arguments))}Ft(Nt,jt,Ut,{once:!0}),jt!=="error"&&Dt(Nt,Jt,{once:!0})})}function Dt(Nt,jt,Gt){typeof Nt.on=="function"&&Ft(Nt,"error",jt,Gt)}function Ft(Nt,jt,Gt,Wt){if(typeof Nt.on=="function")Wt.once?Nt.once(jt,Gt):Nt.on(jt,Gt);else if(typeof Nt.addEventListener=="function")Nt.addEventListener(jt,function Jt(Ut){Wt.once&&Nt.removeEventListener(jt,Jt),Gt(Ut)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof Nt)}},{}],345:[function(ot,_t,Bt){"use strict";var vt=ot("is-callable"),gt=Object.prototype.toString,kt=Object.prototype.hasOwnProperty,bt=function(ft,z,tt){for(var at=0,it=ft.length;at<it;at++)kt.call(ft,at)&&(tt==null?z(ft[at],at,ft):z.call(tt,ft[at],at,ft))},St=function(ft,z,tt){for(var at=0,it=ft.length;at<it;at++)tt==null?z(ft.charAt(at),at,ft):z.call(tt,ft.charAt(at),at,ft)},Tt=function(ft,z,tt){for(var at in ft)kt.call(ft,at)&&(tt==null?z(ft[at],at,ft):z.call(tt,ft[at],at,ft))},mt=function(ft,z,tt){if(!vt(z))throw new TypeError("iterator must be a function");var at;arguments.length>=3&&(at=tt),gt.call(ft)==="[object Array]"?bt(ft,z,at):typeof ft=="string"?St(ft,z,at):Tt(ft,z,at)};_t.exports=mt},{"is-callable":367}],346:[function(ot,_t,Bt){"use strict";var vt="Function.prototype.bind called on incompatible ",gt=Array.prototype.slice,kt=Object.prototype.toString,bt="[object Function]";_t.exports=function(Tt){var mt=this;if(typeof mt!="function"||kt.call(mt)!==bt)throw new TypeError(vt+mt);for(var xt=gt.call(arguments,1),ft,z=function(){if(this instanceof ft){var ut=mt.apply(this,xt.concat(gt.call(arguments)));return Object(ut)===ut?ut:this}else return mt.apply(Tt,xt.concat(gt.call(arguments)))},tt=Math.max(0,mt.length-xt.length),at=[],it=0;it<tt;it++)at.push("$"+it);if(ft=Function("binder","return function ("+at.join(",")+"){ return binder.apply(this,arguments); }")(z),mt.prototype){var lt=function(){};lt.prototype=mt.prototype,ft.prototype=new lt,lt.prototype=null}return ft}},{}],347:[function(ot,_t,Bt){"use strict";var vt=ot("./implementation");_t.exports=Function.prototype.bind||vt},{"./implementation":346}],348:[function(ot,_t,Bt){"use strict";var vt,gt=SyntaxError,kt=Function,bt=TypeError,St=function(se){try{return kt('"use strict"; return ('+se+").constructor;")()}catch(ce){}},Tt=Object.getOwnPropertyDescriptor;if(Tt)try{Tt({},"")}catch(se){Tt=null}var mt=function(){throw new bt},xt=Tt?function(){try{return arguments.callee,mt}catch(se){try{return Tt(arguments,"callee").get}catch(ce){return mt}}}():mt,ft=ot("has-symbols")(),z=ot("has-proto")(),tt=Object.getPrototypeOf||(z?function(se){return se.__proto__}:null),at={},it=typeof Uint8Array=="undefined"||!tt?vt:tt(Uint8Array),lt={"%AggregateError%":typeof AggregateError=="undefined"?vt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?vt:ArrayBuffer,"%ArrayIteratorPrototype%":ft&&tt?tt([][Symbol.iterator]()):vt,"%AsyncFromSyncIteratorPrototype%":vt,"%AsyncFunction%":at,"%AsyncGenerator%":at,"%AsyncGeneratorFunction%":at,"%AsyncIteratorPrototype%":at,"%Atomics%":typeof Atomics=="undefined"?vt:Atomics,"%BigInt%":typeof BigInt=="undefined"?vt:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?vt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?vt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?vt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?vt:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?vt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?vt:FinalizationRegistry,"%Function%":kt,"%GeneratorFunction%":at,"%Int8Array%":typeof Int8Array=="undefined"?vt:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?vt:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?vt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ft&&tt?tt(tt([][Symbol.iterator]())):vt,"%JSON%":typeof JSON=="object"?JSON:vt,"%Map%":typeof Map=="undefined"?vt:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!ft||!tt?vt:tt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?vt:Promise,"%Proxy%":typeof Proxy=="undefined"?vt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?vt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?vt:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!ft||!tt?vt:tt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?vt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ft&&tt?tt(""[Symbol.iterator]()):vt,"%Symbol%":ft?Symbol:vt,"%SyntaxError%":gt,"%ThrowTypeError%":xt,"%TypedArray%":it,"%TypeError%":bt,"%Uint8Array%":typeof Uint8Array=="undefined"?vt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?vt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?vt:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?vt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?vt:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?vt:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?vt:WeakSet};if(tt)try{null.error}catch(se){var ut=tt(tt(se));lt["%Error.prototype%"]=ut}var dt=function se(ce){var Pe;if(ce==="%AsyncFunction%")Pe=St("async function () {}");else if(ce==="%GeneratorFunction%")Pe=St("function* () {}");else if(ce==="%AsyncGeneratorFunction%")Pe=St("async function* () {}");else if(ce==="%AsyncGenerator%"){var Yt=se("%AsyncGeneratorFunction%");Yt&&(Pe=Yt.prototype)}else if(ce==="%AsyncIteratorPrototype%"){var ne=se("%AsyncGenerator%");ne&&tt&&(Pe=tt(ne.prototype))}return lt[ce]=Pe,Pe},Pt={"%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"]},At=ot("function-bind"),Dt=ot("has"),Ft=At.call(Function.call,Array.prototype.concat),Nt=At.call(Function.apply,Array.prototype.splice),jt=At.call(Function.call,String.prototype.replace),Gt=At.call(Function.call,String.prototype.slice),Wt=At.call(Function.call,RegExp.prototype.exec),Jt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ut=/\\(\\)?/g,Ht=function(ce){var Pe=Gt(ce,0,1),Yt=Gt(ce,-1);if(Pe==="%"&&Yt!=="%")throw new gt("invalid intrinsic syntax, expected closing `%`");if(Yt==="%"&&Pe!=="%")throw new gt("invalid intrinsic syntax, expected opening `%`");var ne=[];return jt(ce,Jt,function(ve,Se,be,fe){ne[ne.length]=be?jt(fe,Ut,"$1"):Se||ve}),ne},oe=function(ce,Pe){var Yt=ce,ne;if(Dt(Pt,Yt)&&(ne=Pt[Yt],Yt="%"+ne[0]+"%"),Dt(lt,Yt)){var ve=lt[Yt];if(ve===at&&(ve=dt(Yt)),typeof ve=="undefined"&&!Pe)throw new bt("intrinsic "+ce+" exists, but is not available. Please file an issue!");return{alias:ne,name:Yt,value:ve}}throw new gt("intrinsic "+ce+" does not exist!")};_t.exports=function(ce,Pe){if(typeof ce!="string"||ce.length===0)throw new bt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Pe!="boolean")throw new bt('"allowMissing" argument must be a boolean');if(Wt(/^%?[^%]*%?$/,ce)===null)throw new gt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Yt=Ht(ce),ne=Yt.length>0?Yt[0]:"",ve=oe("%"+ne+"%",Pe),Se=ve.name,be=ve.value,fe=!1,pe=ve.alias;pe&&(ne=pe[0],Nt(Yt,Ft([0,1],pe)));for(var he=1,Ce=!0;he<Yt.length;he+=1){var de=Yt[he],ye=Gt(de,0,1),Ne=Gt(de,-1);if((ye==='"'||ye==="'"||ye==="`"||Ne==='"'||Ne==="'"||Ne==="`")&&ye!==Ne)throw new gt("property names with quotes must have matching quotes");if((de==="constructor"||!Ce)&&(fe=!0),ne+="."+de,Se="%"+ne+"%",Dt(lt,Se))be=lt[Se];else if(be!=null){if(!(de in be)){if(!Pe)throw new bt("base intrinsic for "+ce+" exists, but the property is not available.");return}if(Tt&&he+1>=Yt.length){var xe=Tt(be,de);Ce=!!xe,Ce&&"get"in xe&&!("originalValue"in xe.get)?be=xe.get:be=be[de]}else Ce=Dt(be,de),be=be[de];Ce&&!fe&&(lt[Se]=be)}}return be}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(ot,_t,Bt){"use strict";var vt=ot("get-intrinsic"),gt=vt("%Object.getOwnPropertyDescriptor%",!0);if(gt)try{gt([],"length")}catch(kt){gt=null}_t.exports=gt},{"get-intrinsic":348}],350:[function(ot,_t,Bt){"use strict";var vt={foo:{}},gt=Object;_t.exports=function(){return{__proto__:vt}.foo===vt.foo&&!({__proto__:null}instanceof gt)}},{}],351:[function(ot,_t,Bt){"use strict";var vt=typeof Symbol!="undefined"&&Symbol,gt=ot("./shams");_t.exports=function(){return typeof vt!="function"||typeof Symbol!="function"||typeof vt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:gt()}},{"./shams":352}],352:[function(ot,_t,Bt){"use strict";_t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var gt={},kt=Symbol("test"),bt=Object(kt);if(typeof kt=="string"||Object.prototype.toString.call(kt)!=="[object Symbol]"||Object.prototype.toString.call(bt)!=="[object Symbol]")return!1;var St=42;gt[kt]=St;for(kt in gt)return!1;if(typeof Object.keys=="function"&&Object.keys(gt).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(gt).length!==0)return!1;var Tt=Object.getOwnPropertySymbols(gt);if(Tt.length!==1||Tt[0]!==kt||!Object.prototype.propertyIsEnumerable.call(gt,kt))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var mt=Object.getOwnPropertyDescriptor(gt,kt);if(mt.value!==St||mt.enumerable!==!0)return!1}return!0}},{}],353:[function(ot,_t,Bt){"use strict";var vt=ot("has-symbols/shams");_t.exports=function(){return vt()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(ot,_t,Bt){"use strict";var vt=ot("function-bind");_t.exports=vt.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(ot,_t,Bt){var vt=ot("http"),gt=ot("url"),kt=_t.exports;for(var bt in vt)vt.hasOwnProperty(bt)&&(kt[bt]=vt[bt]);kt.request=function(Tt,mt){return Tt=St(Tt),vt.request.call(this,Tt,mt)},kt.get=function(Tt,mt){return Tt=St(Tt),vt.get.call(this,Tt,mt)};function St(Tt){if(typeof Tt=="string"&&(Tt=gt.parse(Tt)),Tt.protocol||(Tt.protocol="https:"),Tt.protocol!=="https:")throw new Error('Protocol "'+Tt.protocol+'" not supported. Expected "https:"');return Tt}},{http:468,url:472}],356:[function(ot,_t,Bt){"use strict";var vt=ot("util"),gt=ot("ms");_t.exports=function(kt){if(typeof kt=="number")return kt;var bt=gt(kt);if(bt===void 0){var St=new Error(vt.format("humanize-ms(%j) result undefined",kt));console.warn(St.stack)}return bt}},{ms:376,util:419}],357:[function(ot,_t,Bt){Bt.read=function(vt,gt,kt,bt,St){var Tt,mt,xt=St*8-bt-1,ft=(1<<xt)-1,z=ft>>1,tt=-7,at=kt?St-1:0,it=kt?-1:1,lt=vt[gt+at];for(at+=it,Tt=lt&(1<<-tt)-1,lt>>=-tt,tt+=xt;tt>0;Tt=Tt*256+vt[gt+at],at+=it,tt-=8);for(mt=Tt&(1<<-tt)-1,Tt>>=-tt,tt+=bt;tt>0;mt=mt*256+vt[gt+at],at+=it,tt-=8);if(Tt===0)Tt=1-z;else{if(Tt===ft)return mt?NaN:(lt?-1:1)*(1/0);mt=mt+Math.pow(2,bt),Tt=Tt-z}return(lt?-1:1)*mt*Math.pow(2,Tt-bt)},Bt.write=function(vt,gt,kt,bt,St,Tt){var mt,xt,ft,z=Tt*8-St-1,tt=(1<<z)-1,at=tt>>1,it=St===23?Math.pow(2,-24)-Math.pow(2,-77):0,lt=bt?0:Tt-1,ut=bt?1:-1,dt=gt<0||gt===0&&1/gt<0?1:0;for(gt=Math.abs(gt),isNaN(gt)||gt===1/0?(xt=isNaN(gt)?1:0,mt=tt):(mt=Math.floor(Math.log(gt)/Math.LN2),gt*(ft=Math.pow(2,-mt))<1&&(mt--,ft*=2),mt+at>=1?gt+=it/ft:gt+=it*Math.pow(2,1-at),gt*ft>=2&&(mt++,ft/=2),mt+at>=tt?(xt=0,mt=tt):mt+at>=1?(xt=(gt*ft-1)*Math.pow(2,St),mt=mt+at):(xt=gt*Math.pow(2,at-1)*Math.pow(2,St),mt=0));St>=8;vt[kt+lt]=xt&255,lt+=ut,xt/=256,St-=8);for(mt=mt<<St|xt,z+=St;z>0;vt[kt+lt]=mt&255,lt+=ut,mt/=256,z-=8);vt[kt+lt-ut]|=dt*128}},{}],358:[function(ot,_t,Bt){"use strict";var vt=[ot("./nextTick"),ot("./queueMicrotask"),ot("./mutation.js"),ot("./messageChannel"),ot("./stateChange"),ot("./timeout")],gt,kt,bt=-1,St=[],Tt=!1;function mt(){!gt||!kt||(gt=!1,kt.length?St=kt.concat(St):bt=-1,St.length&&xt())}function xt(){if(!gt){Tt=!1,gt=!0;for(var lt=St.length,ut=setTimeout(mt);lt;){for(kt=St,St=[];kt&&++bt<lt;)kt[bt].run();bt=-1,lt=St.length}kt=null,bt=-1,gt=!1,clearTimeout(ut)}}for(var ft,z=-1,tt=vt.length;++z<tt;)if(vt[z]&&vt[z].test&&vt[z].test()){ft=vt[z].install(xt);break}function at(lt,ut){this.fun=lt,this.array=ut}at.prototype.run=function(){var lt=this.fun,ut=this.array;switch(ut.length){case 0:return lt();case 1:return lt(ut[0]);case 2:return lt(ut[0],ut[1]);case 3:return lt(ut[0],ut[1],ut[2]);default:return lt.apply(null,ut)}},_t.exports=it;function it(lt){var ut=new Array(arguments.length-1);if(arguments.length>1)for(var dt=1;dt<arguments.length;dt++)ut[dt-1]=arguments[dt];St.push(new at(lt,ut)),!Tt&&!gt&&(Tt=!0,ft())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(ot,_t,Bt){(function(vt){(function(){"use strict";Bt.test=function(){return vt.setImmediate?!1:typeof vt.MessageChannel!="undefined"},Bt.install=function(gt){var kt=new vt.MessageChannel;return kt.port1.onmessage=gt,function(){kt.port2.postMessage(0)}}}).call(this)}).call(this,typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=vt.MutationObserver||vt.WebKitMutationObserver;Bt.test=function(){return gt},Bt.install=function(kt){var bt=0,St=new gt(kt),Tt=vt.document.createTextNode("");return St.observe(Tt,{characterData:!0}),function(){Tt.data=bt=++bt%2}}}).call(this)}).call(this,typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(ot,_t,Bt){(function(vt){(function(){"use strict";Bt.test=function(){return typeof vt.queueMicrotask=="function"},Bt.install=function(gt){return function(){vt.queueMicrotask(gt)}}}).call(this)}).call(this,typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(ot,_t,Bt){(function(vt){(function(){"use strict";Bt.test=function(){return"document"in vt&&"onreadystatechange"in vt.document.createElement("script")},Bt.install=function(gt){return function(){var kt=vt.document.createElement("script");return kt.onreadystatechange=function(){gt(),kt.onreadystatechange=null,kt.parentNode.removeChild(kt),kt=null},vt.document.documentElement.appendChild(kt),gt}}}).call(this)}).call(this,typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(ot,_t,Bt){"use strict";Bt.test=function(){return!0},Bt.install=function(vt){return function(){setTimeout(vt,0)}}},{}],364:[function(ot,_t,Bt){typeof Object.create=="function"?_t.exports=function(gt,kt){kt&&(gt.super_=kt,gt.prototype=Object.create(kt.prototype,{constructor:{value:gt,enumerable:!1,writable:!0,configurable:!0}}))}:_t.exports=function(gt,kt){if(kt){gt.super_=kt;var bt=function(){};bt.prototype=kt.prototype,gt.prototype=new bt,gt.prototype.constructor=gt}}},{}],365:[function(ot,_t,Bt){"use strict";var vt=ot("has-tostringtag/shams")(),gt=ot("call-bind/callBound"),kt=gt("Object.prototype.toString"),bt=function(xt){return vt&&xt&&typeof xt=="object"&&Symbol.toStringTag in xt?!1:kt(xt)==="[object Arguments]"},St=function(xt){return bt(xt)?!0:xt!==null&&typeof xt=="object"&&typeof xt.length=="number"&&xt.length>=0&&kt(xt)!=="[object Array]"&&kt(xt.callee)==="[object Function]"},Tt=function(){return bt(arguments)}();bt.isLegacyArguments=St,_t.exports=Tt?bt:St},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(ot,_t,Bt){_t.exports=function(kt){return kt!=null&&(vt(kt)||gt(kt)||!!kt._isBuffer)};function vt(kt){return!!kt.constructor&&typeof kt.constructor.isBuffer=="function"&&kt.constructor.isBuffer(kt)}function gt(kt){return typeof kt.readFloatLE=="function"&&typeof kt.slice=="function"&&vt(kt.slice(0,0))}},{}],367:[function(ot,_t,Bt){"use strict";var vt=Function.prototype.toString,gt=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,kt,bt;if(typeof gt=="function"&&typeof Object.defineProperty=="function")try{kt=Object.defineProperty({},"length",{get:function(){throw bt}}),bt={},gt(function(){throw 42},null,kt)}catch(Dt){Dt!==bt&&(gt=null)}else gt=null;var St=/^\s*class\b/,Tt=function(Ft){try{var Nt=vt.call(Ft);return St.test(Nt)}catch(jt){return!1}},mt=function(Ft){try{return Tt(Ft)?!1:(vt.call(Ft),!0)}catch(Nt){return!1}},xt=Object.prototype.toString,ft="[object Object]",z="[object Function]",tt="[object GeneratorFunction]",at="[object HTMLAllCollection]",it="[object HTML document.all class]",lt="[object HTMLCollection]",ut=typeof Symbol=="function"&&!!Symbol.toStringTag,dt=!(0 in[,]),Pt=function(){return!1};if(typeof document=="object"){var At=document.all;xt.call(At)===xt.call(document.all)&&(Pt=function(Ft){if((dt||!Ft)&&(typeof Ft=="undefined"||typeof Ft=="object"))try{var Nt=xt.call(Ft);return(Nt===at||Nt===it||Nt===lt||Nt===ft)&&Ft("")==null}catch(jt){}return!1})}_t.exports=gt?function(Ft){if(Pt(Ft))return!0;if(!Ft||typeof Ft!="function"&&typeof Ft!="object")return!1;try{gt(Ft,null,kt)}catch(Nt){if(Nt!==bt)return!1}return!Tt(Ft)&&mt(Ft)}:function(Ft){if(Pt(Ft))return!0;if(!Ft||typeof Ft!="function"&&typeof Ft!="object")return!1;if(ut)return mt(Ft);if(Tt(Ft))return!1;var Nt=xt.call(Ft);return Nt!==z&&Nt!==tt&&!/^\[object HTML/.test(Nt)?!1:mt(Ft)}},{}],368:[function(ot,_t,Bt){"use strict";var vt=Object.prototype.toString,gt=Function.prototype.toString,kt=/^\s*(?:function)?\*/,bt=ot("has-tostringtag/shams")(),St=Object.getPrototypeOf,Tt=function(){if(!bt)return!1;try{return Function("return function*() {}")()}catch(xt){}},mt;_t.exports=function(ft){if(typeof ft!="function")return!1;if(kt.test(gt.call(ft)))return!0;if(!bt){var z=vt.call(ft);return z==="[object GeneratorFunction]"}if(!St)return!1;if(typeof mt=="undefined"){var tt=Tt();mt=tt?St(tt):!1}return St(ft)===mt}},{"has-tostringtag/shams":353}],369:[function(ot,_t,Bt){"use strict";var vt=ot("which-typed-array");_t.exports=function(kt){return!!vt(kt)}},{"which-typed-array":420}],370:[function(ot,_t,Bt){var vt={}.toString;_t.exports=Array.isArray||function(gt){return vt.call(gt)=="[object Array]"}},{}],371:[function(ot,_t,Bt){(function(vt){(function(){(function(gt,kt){typeof Bt=="object"&&typeof _t!="undefined"?_t.exports=kt(gt):typeof le=="function"&&le.amd?le(kt):kt(gt)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof vt!="undefined"?vt:this,function(gt){"use strict";gt=gt||{};var kt=gt.Base64,bt="2.6.4",St="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tt=function(ce){for(var Pe={},Yt=0,ne=ce.length;Yt<ne;Yt++)Pe[ce.charAt(Yt)]=Yt;return Pe}(St),mt=String.fromCharCode,xt=function(ce){if(ce.length<2){var Pe=ce.charCodeAt(0);return Pe<128?ce:Pe<2048?mt(192|Pe>>>6)+mt(128|Pe&63):mt(224|Pe>>>12&15)+mt(128|Pe>>>6&63)+mt(128|Pe&63)}else{var Pe=65536+(ce.charCodeAt(0)-55296)*1024+(ce.charCodeAt(1)-56320);return mt(240|Pe>>>18&7)+mt(128|Pe>>>12&63)+mt(128|Pe>>>6&63)+mt(128|Pe&63)}},ft=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(ce){return ce.replace(ft,xt)},tt=function(ce){var Pe=[0,2,1][ce.length%3],Yt=ce.charCodeAt(0)<<16|(ce.length>1?ce.charCodeAt(1):0)<<8|(ce.length>2?ce.charCodeAt(2):0),ne=[St.charAt(Yt>>>18),St.charAt(Yt>>>12&63),Pe>=2?"=":St.charAt(Yt>>>6&63),Pe>=1?"=":St.charAt(Yt&63)];return ne.join("")},at=gt.btoa&&typeof gt.btoa=="function"?function(ce){return gt.btoa(ce)}:function(ce){if(ce.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ce.replace(/[\s\S]{1,3}/g,tt)},it=function(ce){return at(z(String(ce)))},lt=function(ce){return ce.replace(/[+\/]/g,function(Pe){return Pe=="+"?"-":"_"}).replace(/=/g,"")},ut=function(ce,Pe){return Pe?lt(it(ce)):it(ce)},dt=function(ce){return ut(ce,!0)},Pt;gt.Uint8Array&&(Pt=function(ce,Pe){for(var Yt="",ne=0,ve=ce.length;ne<ve;ne+=3){var Se=ce[ne],be=ce[ne+1],fe=ce[ne+2],pe=Se<<16|be<<8|fe;Yt+=St.charAt(pe>>>18)+St.charAt(pe>>>12&63)+(typeof be!="undefined"?St.charAt(pe>>>6&63):"=")+(typeof fe!="undefined"?St.charAt(pe&63):"=")}return Pe?lt(Yt):Yt});var At=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Dt=function(ce){switch(ce.length){case 4:var Pe=(7&ce.charCodeAt(0))<<18|(63&ce.charCodeAt(1))<<12|(63&ce.charCodeAt(2))<<6|63&ce.charCodeAt(3),Yt=Pe-65536;return mt((Yt>>>10)+55296)+mt((Yt&1023)+56320);case 3:return mt((15&ce.charCodeAt(0))<<12|(63&ce.charCodeAt(1))<<6|63&ce.charCodeAt(2));default:return mt((31&ce.charCodeAt(0))<<6|63&ce.charCodeAt(1))}},Ft=function(ce){return ce.replace(At,Dt)},Nt=function(ce){var Pe=ce.length,Yt=Pe%4,ne=(Pe>0?Tt[ce.charAt(0)]<<18:0)|(Pe>1?Tt[ce.charAt(1)]<<12:0)|(Pe>2?Tt[ce.charAt(2)]<<6:0)|(Pe>3?Tt[ce.charAt(3)]:0),ve=[mt(ne>>>16),mt(ne>>>8&255),mt(ne&255)];return ve.length-=[0,0,2,1][Yt],ve.join("")},jt=gt.atob&&typeof gt.atob=="function"?function(ce){return gt.atob(ce)}:function(ce){return ce.replace(/\S{1,4}/g,Nt)},Gt=function(ce){return jt(String(ce).replace(/[^A-Za-z0-9\+\/]/g,""))},Wt=function(ce){return Ft(jt(ce))},Jt=function(ce){return String(ce).replace(/[-_]/g,function(Pe){return Pe=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ut=function(ce){return Wt(Jt(ce))},Ht;gt.Uint8Array&&(Ht=function(ce){return Uint8Array.from(Gt(Jt(ce)),function(Pe){return Pe.charCodeAt(0)})});var oe=function(){var ce=gt.Base64;return gt.Base64=kt,ce};if(gt.Base64={VERSION:bt,atob:Gt,btoa:at,fromBase64:Ut,toBase64:ut,utob:z,encode:ut,encodeURI:dt,btou:Ft,decode:Ut,noConflict:oe,fromUint8Array:Pt,toUint8Array:Ht},typeof Object.defineProperty=="function"){var se=function(ce){return{value:ce,enumerable:!1,writable:!0,configurable:!0}};gt.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",se(function(){return Ut(this)})),Object.defineProperty(String.prototype,"toBase64",se(function(ce){return ut(this,ce)})),Object.defineProperty(String.prototype,"toBase64URI",se(function(){return ut(this,!0)}))}}return gt.Meteor&&(Base64=gt.Base64),typeof _t!="undefined"&&_t.exports?_t.exports.Base64=gt.Base64:typeof le=="function"&&le.amd&&le([],function(){return gt.Base64}),{Base64:gt.Base64}})}).call(this)}).call(this,typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(ot,_t,Bt){"use strict";_t.exports=gt;var vt=Object.prototype.hasOwnProperty;function gt(kt,bt,St){if(!kt)throw new TypeError("argument dest is required");if(!bt)throw new TypeError("argument src is required");return St===void 0&&(St=!0),Object.getOwnPropertyNames(bt).forEach(function(mt){if(!(!St&&vt.call(kt,mt))){var xt=Object.getOwnPropertyDescriptor(bt,mt);Object.defineProperty(kt,mt,xt)}}),kt}},{}],373:[function(ot,_t,Bt){"use strict";ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.regexp.constructor.js"),ot("core-js/modules/es.regexp.to-string.js");function vt(){this._types=Object.create(null),this._extensions=Object.create(null);for(var gt=0;gt<arguments.length;gt++)this.define(arguments[gt]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}vt.prototype.define=function(gt,kt){for(var bt in gt){var St=gt[bt].map(function(ft){return ft.toLowerCase()});bt=bt.toLowerCase();for(var Tt=0;Tt<St.length;Tt++){var mt=St[Tt];if(mt[0]!=="*"){if(!kt&&mt in this._types)throw new Error('Attempt to change mapping for "'+mt+'" extension from "'+this._types[mt]+'" to "'+bt+'". Pass `force=true` to allow this, otherwise remove "'+mt+'" from the list of extensions for "'+bt+'".');this._types[mt]=bt}}if(kt||!this._extensions[bt]){var xt=St[0];this._extensions[bt]=xt[0]!=="*"?xt:xt.substr(1)}}},vt.prototype.getType=function(gt){gt=String(gt);var kt=gt.replace(/^.*[/\\]/,"").toLowerCase(),bt=kt.replace(/^.*\./,"").toLowerCase(),St=kt.length<gt.length,Tt=bt.length<kt.length-1;return(Tt||!St)&&this._types[bt]||null},vt.prototype.getExtension=function(gt){return gt=/^\s*([^;\s]*)/.test(gt)&&RegExp.$1,gt&&this._extensions[gt.toLowerCase()]||null},_t.exports=vt},{"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(ot,_t,Bt){"use strict";var vt=ot("./Mime");_t.exports=new vt(ot("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(ot,_t,Bt){"use strict";_t.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(ot,_t,Bt){var vt=1e3,gt=vt*60,kt=gt*60,bt=kt*24,St=bt*7,Tt=bt*365.25;_t.exports=function(tt,at){at=at||{};var it=typeof tt;if(it==="string"&&tt.length>0)return mt(tt);if(it==="number"&&isFinite(tt))return at.long?ft(tt):xt(tt);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(tt))};function mt(tt){if(tt=String(tt),!(tt.length>100)){var at=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(tt);if(at){var it=parseFloat(at[1]),lt=(at[2]||"ms").toLowerCase();switch(lt){case"years":case"year":case"yrs":case"yr":case"y":return it*Tt;case"weeks":case"week":case"w":return it*St;case"days":case"day":case"d":return it*bt;case"hours":case"hour":case"hrs":case"hr":case"h":return it*kt;case"minutes":case"minute":case"mins":case"min":case"m":return it*gt;case"seconds":case"second":case"secs":case"sec":case"s":return it*vt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return it;default:return}}}}function xt(tt){var at=Math.abs(tt);return at>=bt?Math.round(tt/bt)+"d":at>=kt?Math.round(tt/kt)+"h":at>=gt?Math.round(tt/gt)+"m":at>=vt?Math.round(tt/vt)+"s":tt+"ms"}function ft(tt){var at=Math.abs(tt);return at>=bt?z(tt,at,bt,"day"):at>=kt?z(tt,at,kt,"hour"):at>=gt?z(tt,at,gt,"minute"):at>=vt?z(tt,at,vt,"second"):tt+" ms"}function z(tt,at,it,lt){var ut=at>=it*1.5;return Math.round(tt/it)+" "+lt+(ut?"s":"")}},{}],377:[function(ot,_t,Bt){"use strict";var vt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable;function bt(Tt){if(Tt==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Tt)}function St(){try{if(!Object.assign)return!1;var Tt=new String("abc");if(Tt[5]="de",Object.getOwnPropertyNames(Tt)[0]==="5")return!1;for(var mt={},xt=0;xt<10;xt++)mt["_"+String.fromCharCode(xt)]=xt;var ft=Object.getOwnPropertyNames(mt).map(function(tt){return mt[tt]});if(ft.join("")!=="0123456789")return!1;var z={};return"abcdefghijklmnopqrst".split("").forEach(function(tt){z[tt]=tt}),Object.keys(Object.assign({},z)).join("")==="abcdefghijklmnopqrst"}catch(tt){return!1}}_t.exports=St()?Object.assign:function(Tt,mt){for(var xt,ft=bt(Tt),z,tt=1;tt<arguments.length;tt++){xt=Object(arguments[tt]);for(var at in xt)gt.call(xt,at)&&(ft[at]=xt[at]);if(vt){z=vt(xt);for(var it=0;it<z.length;it++)kt.call(xt,z[it])&&(ft[z[it]]=xt[z[it]])}}return ft}},{}],378:[function(ot,_t,Bt){(function(vt){(function(){"use strict";function gt(Tt){if(typeof Tt!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(Tt))}function kt(Tt,mt){for(var xt="",ft=0,z=-1,tt=0,at,it=0;it<=Tt.length;++it){if(it<Tt.length)at=Tt.charCodeAt(it);else{if(at===47)break;at=47}if(at===47){if(!(z===it-1||tt===1))if(z!==it-1&&tt===2){if(xt.length<2||ft!==2||xt.charCodeAt(xt.length-1)!==46||xt.charCodeAt(xt.length-2)!==46){if(xt.length>2){var lt=xt.lastIndexOf("/");if(lt!==xt.length-1){lt===-1?(xt="",ft=0):(xt=xt.slice(0,lt),ft=xt.length-1-xt.lastIndexOf("/")),z=it,tt=0;continue}}else if(xt.length===2||xt.length===1){xt="",ft=0,z=it,tt=0;continue}}mt&&(xt.length>0?xt+="/..":xt="..",ft=2)}else xt.length>0?xt+="/"+Tt.slice(z+1,it):xt=Tt.slice(z+1,it),ft=it-z-1;z=it,tt=0}else at===46&&tt!==-1?++tt:tt=-1}return xt}function bt(Tt,mt){var xt=mt.dir||mt.root,ft=mt.base||(mt.name||"")+(mt.ext||"");return xt?xt===mt.root?xt+ft:xt+Tt+ft:ft}var St={resolve:function(){for(var mt="",xt=!1,ft,z=arguments.length-1;z>=-1&&!xt;z--){var tt;z>=0?tt=arguments[z]:(ft===void 0&&(ft=vt.cwd()),tt=ft),gt(tt),tt.length!==0&&(mt=tt+"/"+mt,xt=tt.charCodeAt(0)===47)}return mt=kt(mt,!xt),xt?mt.length>0?"/"+mt:"/":mt.length>0?mt:"."},normalize:function(mt){if(gt(mt),mt.length===0)return".";var xt=mt.charCodeAt(0)===47,ft=mt.charCodeAt(mt.length-1)===47;return mt=kt(mt,!xt),mt.length===0&&!xt&&(mt="."),mt.length>0&&ft&&(mt+="/"),xt?"/"+mt:mt},isAbsolute:function(mt){return gt(mt),mt.length>0&&mt.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var mt,xt=0;xt<arguments.length;++xt){var ft=arguments[xt];gt(ft),ft.length>0&&(mt===void 0?mt=ft:mt+="/"+ft)}return mt===void 0?".":St.normalize(mt)},relative:function(mt,xt){if(gt(mt),gt(xt),mt===xt||(mt=St.resolve(mt),xt=St.resolve(xt),mt===xt))return"";for(var ft=1;ft<mt.length&&mt.charCodeAt(ft)===47;++ft);for(var z=mt.length,tt=z-ft,at=1;at<xt.length&&xt.charCodeAt(at)===47;++at);for(var it=xt.length,lt=it-at,ut=tt<lt?tt:lt,dt=-1,Pt=0;Pt<=ut;++Pt){if(Pt===ut){if(lt>ut){if(xt.charCodeAt(at+Pt)===47)return xt.slice(at+Pt+1);if(Pt===0)return xt.slice(at+Pt)}else tt>ut&&(mt.charCodeAt(ft+Pt)===47?dt=Pt:Pt===0&&(dt=0));break}var At=mt.charCodeAt(ft+Pt),Dt=xt.charCodeAt(at+Pt);if(At!==Dt)break;At===47&&(dt=Pt)}var Ft="";for(Pt=ft+dt+1;Pt<=z;++Pt)(Pt===z||mt.charCodeAt(Pt)===47)&&(Ft.length===0?Ft+="..":Ft+="/..");return Ft.length>0?Ft+xt.slice(at+dt):(at+=dt,xt.charCodeAt(at)===47&&++at,xt.slice(at))},_makeLong:function(mt){return mt},dirname:function(mt){if(gt(mt),mt.length===0)return".";for(var xt=mt.charCodeAt(0),ft=xt===47,z=-1,tt=!0,at=mt.length-1;at>=1;--at)if(xt=mt.charCodeAt(at),xt===47){if(!tt){z=at;break}}else tt=!1;return z===-1?ft?"/":".":ft&&z===1?"//":mt.slice(0,z)},basename:function(mt,xt){if(xt!==void 0&&typeof xt!="string")throw new TypeError('"ext" argument must be a string');gt(mt);var ft=0,z=-1,tt=!0,at;if(xt!==void 0&&xt.length>0&&xt.length<=mt.length){if(xt.length===mt.length&&xt===mt)return"";var it=xt.length-1,lt=-1;for(at=mt.length-1;at>=0;--at){var ut=mt.charCodeAt(at);if(ut===47){if(!tt){ft=at+1;break}}else lt===-1&&(tt=!1,lt=at+1),it>=0&&(ut===xt.charCodeAt(it)?--it===-1&&(z=at):(it=-1,z=lt))}return ft===z?z=lt:z===-1&&(z=mt.length),mt.slice(ft,z)}else{for(at=mt.length-1;at>=0;--at)if(mt.charCodeAt(at)===47){if(!tt){ft=at+1;break}}else z===-1&&(tt=!1,z=at+1);return z===-1?"":mt.slice(ft,z)}},extname:function(mt){gt(mt);for(var xt=-1,ft=0,z=-1,tt=!0,at=0,it=mt.length-1;it>=0;--it){var lt=mt.charCodeAt(it);if(lt===47){if(!tt){ft=it+1;break}continue}z===-1&&(tt=!1,z=it+1),lt===46?xt===-1?xt=it:at!==1&&(at=1):xt!==-1&&(at=-1)}return xt===-1||z===-1||at===0||at===1&&xt===z-1&&xt===ft+1?"":mt.slice(xt,z)},format:function(mt){if(mt===null||typeof mt!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof mt);return bt("/",mt)},parse:function(mt){gt(mt);var xt={root:"",dir:"",base:"",ext:"",name:""};if(mt.length===0)return xt;var ft=mt.charCodeAt(0),z=ft===47,tt;z?(xt.root="/",tt=1):tt=0;for(var at=-1,it=0,lt=-1,ut=!0,dt=mt.length-1,Pt=0;dt>=tt;--dt){if(ft=mt.charCodeAt(dt),ft===47){if(!ut){it=dt+1;break}continue}lt===-1&&(ut=!1,lt=dt+1),ft===46?at===-1?at=dt:Pt!==1&&(Pt=1):at!==-1&&(Pt=-1)}return at===-1||lt===-1||Pt===0||Pt===1&&at===lt-1&&at===it+1?lt!==-1&&(it===0&&z?xt.base=xt.name=mt.slice(1,lt):xt.base=xt.name=mt.slice(it,lt)):(it===0&&z?(xt.name=mt.slice(1,at),xt.base=mt.slice(1,lt)):(xt.name=mt.slice(it,at),xt.base=mt.slice(it,lt)),xt.ext=mt.slice(at,lt)),it>0?xt.dir=mt.slice(0,it-1):z&&(xt.dir="/"),xt},sep:"/",delimiter:":",win32:null,posix:null};St.posix=St,_t.exports=St}).call(this)}).call(this,ot("_process"))},{_process:467}],379:[function(ot,_t,Bt){(function(vt){(function(){(function(){"use strict";var gt={function:!0,object:!0},kt=gt[typeof window]&&window||this,bt=kt,St=gt[typeof Bt]&&Bt,Tt=gt[typeof _t]&&_t&&!_t.nodeType&&_t,mt=St&&Tt&&typeof vt=="object"&&vt;mt&&(mt.global===mt||mt.window===mt||mt.self===mt)&&(kt=mt);var xt=Math.pow(2,53)-1,ft=/\bOpera/,z=this,tt=Object.prototype,at=tt.hasOwnProperty,it=tt.toString;function lt(Ut){return Ut=String(Ut),Ut.charAt(0).toUpperCase()+Ut.slice(1)}function ut(Ut,Ht,oe){var se={"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 Ht&&oe&&/^Win/i.test(Ut)&&!/^Windows Phone /i.test(Ut)&&(se=se[/[\d.]+$/.exec(Ut)])&&(Ut="Windows "+se),Ut=String(Ut),Ht&&oe&&(Ut=Ut.replace(RegExp(Ht,"i"),oe)),Ut=Pt(Ut.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]),Ut}function dt(Ut,Ht){var oe=-1,se=Ut?Ut.length:0;if(typeof se=="number"&&se>-1&&se<=xt)for(;++oe<se;)Ht(Ut[oe],oe,Ut);else At(Ut,Ht)}function Pt(Ut){return Ut=Gt(Ut),/^(?:webOS|i(?:OS|P))/.test(Ut)?Ut:lt(Ut)}function At(Ut,Ht){for(var oe in Ut)at.call(Ut,oe)&&Ht(Ut[oe],oe,Ut)}function Dt(Ut){return Ut==null?lt(Ut):it.call(Ut).slice(8,-1)}function Ft(Ut,Ht){var oe=Ut!=null?typeof Ut[Ht]:"number";return!/^(?:boolean|number|string|undefined)$/.test(oe)&&(oe=="object"?!!Ut[Ht]:!0)}function Nt(Ut){return String(Ut).replace(/([ -])(?!$)/g,"$1?")}function jt(Ut,Ht){var oe=null;return dt(Ut,function(se,ce){oe=Ht(oe,se,ce,Ut)}),oe}function Gt(Ut){return String(Ut).replace(/^ +| +$/g,"")}function Wt(Ut){var Ht=kt,oe=Ut&&typeof Ut=="object"&&Dt(Ut)!="String";oe&&(Ht=Ut,Ut=null);var se=Ht.navigator||{},ce=se.userAgent||"";Ut||(Ut=ce);var Pe=oe||z==bt,Yt=oe?!!se.likeChrome:/\bChrome\b/.test(Ut)&&!/internal|\n/i.test(it.toString()),ne="Object",ve=oe?ne:"ScriptBridgingProxyObject",Se=oe?ne:"Environment",be=oe&&Ht.java?"JavaPackage":Dt(Ht.java),fe=oe?ne:"RuntimeObject",pe=/\bJava/.test(be)&&Ht.java,he=pe&&Dt(Ht.environment)==Se,Ce=pe?"a":"\u03B1",de=pe?"b":"\u03B2",ye=Ht.document||{},Ne=Ht.operamini||Ht.opera,xe=ft.test(xe=oe&&Ne?Ne["[[Class]]"]:Dt(Ne))?xe:Ne=null,re,Kt=Ut,wt=[],Lt=null,Xt=Ut==ce,ee=Xt&&Ne&&typeof Ne.version=="function"&&Ne.version(),It,Rt=Me([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Vt=Be(["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"]),$t=Ye([{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"]),ue=Ae({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}}),ge=Ze(["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 Me(We){return jt(We,function(Ve,rn){return Ve||RegExp("\\b"+(rn.pattern||Nt(rn))+"\\b","i").exec(Ut)&&(rn.label||rn)})}function Ae(We){return jt(We,function(Ve,rn,an){return Ve||(rn[$t]||rn[/^[a-z]+(?: +[a-z]+\b)*/i.exec($t)]||RegExp("\\b"+Nt(an)+"(?:\\b|\\w*\\d)","i").exec(Ut))&&an})}function Be(We){return jt(We,function(Ve,rn){return Ve||RegExp("\\b"+(rn.pattern||Nt(rn))+"\\b","i").exec(Ut)&&(rn.label||rn)})}function Ze(We){return jt(We,function(Ve,rn){var an=rn.pattern||Nt(rn);return!Ve&&(Ve=RegExp("\\b"+an+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Ut))&&(Ve=ut(Ve,an,rn.label||rn)),Ve})}function Ye(We){return jt(We,function(Ve,rn){var an=rn.pattern||Nt(rn);return!Ve&&(Ve=RegExp("\\b"+an+" *\\d+[.\\w_]*","i").exec(Ut)||RegExp("\\b"+an+" *\\w+-[\\w]*","i").exec(Ut)||RegExp("\\b"+an+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Ut))&&((Ve=String(rn.label&&!RegExp(an,"i").test(rn.label)?rn.label:Ve).split("/"))[1]&&!/[\d.]+/.test(Ve[0])&&(Ve[0]+=" "+Ve[1]),rn=rn.label||rn,Ve=Pt(Ve[0].replace(RegExp(an,"i"),rn).replace(RegExp("; *(?:"+rn+"[_-])?","i")," ").replace(RegExp("("+rn+")[-_.]?(\\w)","i"),"$1 $2"))),Ve})}function Qe(We){return jt(We,function(Ve,rn){return Ve||(RegExp(rn+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Ut)||0)[1]||null})}function He(){return this.description||""}if(Rt&&(Rt=[Rt]),/\bAndroid\b/.test(ge)&&!$t&&(re=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(Ut))&&($t=Gt(re[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),ue&&!$t?$t=Ye([ue]):ue&&$t&&($t=$t.replace(RegExp("^("+Nt(ue)+")[-_.\\s]","i"),ue+" ").replace(RegExp("^("+Nt(ue)+")[-_.]?(\\w)","i"),ue+" $2")),(re=/\bGoogle TV\b/.exec($t))&&($t=re[0]),/\bSimulator\b/i.test(Ut)&&($t=($t?$t+" ":"")+"Simulator"),Vt=="Opera Mini"&&/\bOPiOS\b/.test(Ut)&&wt.push("running in Turbo/Uncompressed mode"),Vt=="IE"&&/\blike iPhone OS\b/.test(Ut)?(re=Wt(Ut.replace(/like iPhone OS/,"")),ue=re.manufacturer,$t=re.product):/^iP/.test($t)?(Vt||(Vt="Safari"),ge="iOS"+((re=/ OS ([\d_]+)/i.exec(Ut))?" "+re[1].replace(/_/g,"."):"")):Vt=="Konqueror"&&/^Linux\b/i.test(ge)?ge="Kubuntu":ue&&ue!="Google"&&(/Chrome/.test(Vt)&&!/\bMobile Safari\b/i.test(Ut)||/\bVita\b/.test($t))||/\bAndroid\b/.test(ge)&&/^Chrome/.test(Vt)&&/\bVersion\//i.test(Ut)?(Vt="Android Browser",ge=/\bAndroid\b/.test(ge)?ge:"Android"):Vt=="Silk"?(/\bMobi/i.test(Ut)||(ge="Android",wt.unshift("desktop mode")),/Accelerated *= *true/i.test(Ut)&&wt.unshift("accelerated")):Vt=="UC Browser"&&/\bUCWEB\b/.test(Ut)?wt.push("speed mode"):Vt=="PaleMoon"&&(re=/\bFirefox\/([\d.]+)\b/.exec(Ut))?wt.push("identifying as Firefox "+re[1]):Vt=="Firefox"&&(re=/\b(Mobile|Tablet|TV)\b/i.exec(Ut))?(ge||(ge="Firefox OS"),$t||($t=re[1])):!Vt||(re=!/\bMinefield\b/i.test(Ut)&&/\b(?:Firefox|Safari)\b/.exec(Vt))?(Vt&&!$t&&/[\/,]|^[^(]+?\)/.test(Ut.slice(Ut.indexOf(re+"/")+8))&&(Vt=null),(re=$t||ue||ge)&&($t||ue||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(ge))&&(Vt=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(ge)?ge:re)+" Browser")):Vt=="Electron"&&(re=(/\bChrome\/([\d.]+)\b/.exec(Ut)||0)[1])&&wt.push("Chromium "+re),ee||(ee=Qe(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",Nt(Vt),"(?:Firefox|Minefield|NetFront)"])),(re=Rt=="iCab"&&parseFloat(ee)>3&&"WebKit"||/\bOpera\b/.test(Vt)&&(/\bOPR\b/.test(Ut)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Ut)&&!/^(?:Trident|EdgeHTML)$/.test(Rt)&&"WebKit"||!Rt&&/\bMSIE\b/i.test(Ut)&&(ge=="Mac OS"?"Tasman":"Trident")||Rt=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Vt)&&"NetFront")&&(Rt=[re]),Vt=="IE"&&(re=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Ut)||0)[1])?(Vt+=" Mobile",ge="Windows Phone "+(/\+$/.test(re)?re:re+".x"),wt.unshift("desktop mode")):/\bWPDesktop\b/i.test(Ut)?(Vt="IE Mobile",ge="Windows Phone 8.x",wt.unshift("desktop mode"),ee||(ee=(/\brv:([\d.]+)/.exec(Ut)||0)[1])):Vt!="IE"&&Rt=="Trident"&&(re=/\brv:([\d.]+)/.exec(Ut))&&(Vt&&wt.push("identifying as "+Vt+(ee?" "+ee:"")),Vt="IE",ee=re[1]),Xt){if(Ft(Ht,"global"))if(pe&&(re=pe.lang.System,Kt=re.getProperty("os.arch"),ge=ge||re.getProperty("os.name")+" "+re.getProperty("os.version")),he){try{ee=Ht.require("ringo/engine").version.join("."),Vt="RingoJS"}catch(We){(re=Ht.system)&&re.global.system==Ht.system&&(Vt="Narwhal",ge||(ge=re[0].os||null))}Vt||(Vt="Rhino")}else typeof Ht.process=="object"&&!Ht.process.browser&&(re=Ht.process)&&(typeof re.versions=="object"&&(typeof re.versions.electron=="string"?(wt.push("Node "+re.versions.node),Vt="Electron",ee=re.versions.electron):typeof re.versions.nw=="string"&&(wt.push("Chromium "+ee,"Node "+re.versions.node),Vt="NW.js",ee=re.versions.nw)),Vt||(Vt="Node.js",Kt=re.arch,ge=re.platform,ee=/[\d.]+/.exec(re.version),ee=ee?ee[0]:null));else Dt(re=Ht.runtime)==ve?(Vt="Adobe AIR",ge=re.flash.system.Capabilities.os):Dt(re=Ht.phantom)==fe?(Vt="PhantomJS",ee=(re=re.version||null)&&re.major+"."+re.minor+"."+re.patch):typeof ye.documentMode=="number"&&(re=/\bTrident\/(\d+)/i.exec(Ut))?(ee=[ee,ye.documentMode],(re=+re[1]+4)!=ee[1]&&(wt.push("IE "+ee[1]+" mode"),Rt&&(Rt[1]=""),ee[1]=re),ee=Vt=="IE"?String(ee[1].toFixed(1)):ee[0]):typeof ye.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Vt)&&(wt.push("masking as "+Vt+" "+ee),Vt="IE",ee="11.0",Rt=["Trident"],ge="Windows");ge=ge&&Pt(ge)}if(ee&&(re=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ee)||/(?:alpha|beta)(?: ?\d)?/i.exec(Ut+";"+(Xt&&se.appMinorVersion))||/\bMinefield\b/i.test(Ut)&&"a")&&(Lt=/b/i.test(re)?"beta":"alpha",ee=ee.replace(RegExp(re+"\\+?$"),"")+(Lt=="beta"?de:Ce)+(/\d+\+?/.exec(re)||"")),Vt=="Fennec"||Vt=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(ge))Vt="Firefox Mobile";else if(Vt=="Maxthon"&&ee)ee=ee.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test($t))$t=="Xbox 360"&&(ge=null),$t=="Xbox 360"&&/\bIEMobile\b/.test(Ut)&&wt.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Vt)||Vt&&!$t&&!/Browser|Mobi/.test(Vt))&&(ge=="Windows CE"||/Mobi/i.test(Ut)))Vt+=" Mobile";else if(Vt=="IE"&&Xt)try{Ht.external===null&&wt.unshift("platform preview")}catch(We){wt.unshift("embedded")}else(/\bBlackBerry\b/.test($t)||/\bBB10\b/.test(Ut))&&(re=(RegExp($t.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Ut)||0)[1]||ee)?(re=[re,/BB10/.test(Ut)],ge=(re[1]?($t=null,ue="BlackBerry"):"Device Software")+" "+re[0],ee=null):this!=At&&$t!="Wii"&&(Xt&&Ne||/Opera/.test(Vt)&&/\b(?:MSIE|Firefox)\b/i.test(Ut)||Vt=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(ge)||Vt=="IE"&&(ge&&!/^Win/.test(ge)&&ee>5.5||/\bWindows XP\b/.test(ge)&&ee>8||ee==8&&!/\bTrident\b/.test(Ut)))&&!ft.test(re=Wt.call(At,Ut.replace(ft,"")+";"))&&re.name&&(re="ing as "+re.name+((re=re.version)?" "+re:""),ft.test(Vt)?(/\bIE\b/.test(re)&&ge=="Mac OS"&&(ge=null),re="identify"+re):(re="mask"+re,xe?Vt=Pt(xe.replace(/([a-z])([A-Z])/g,"$1 $2")):Vt="Opera",/\bIE\b/.test(re)&&(ge=null),Xt||(ee=null)),Rt=["Presto"],wt.push(re));(re=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Ut)||0)[1])&&(re=[parseFloat(re.replace(/\.(\d)$/,".0$1")),re],Vt=="Safari"&&re[1].slice(-1)=="+"?(Vt="WebKit Nightly",Lt="alpha",ee=re[1].slice(0,-1)):(ee==re[1]||ee==(re[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Ut)||0)[1]))&&(ee=null),re[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(Ut)||0)[1],re[0]==537.36&&re[2]==537.36&&parseFloat(re[1])>=28&&Rt=="WebKit"&&(Rt=["Blink"]),!Xt||!Yt&&!re[1]?(Rt&&(Rt[1]="like Safari"),re=(re=re[0],re<400?1:re<500?2:re<526?3:re<533?4:re<534?"4+":re<535?5:re<537?6:re<538?7:re<601?8:re<602?9:re<604?10:re<606?11:re<608?12:"12")):(Rt&&(Rt[1]="like Chrome"),re=re[1]||(re=re[0],re<530?1:re<532?2:re<532.05?3:re<533?4:re<534.03?5:re<534.07?6:re<534.1?7:re<534.13?8:re<534.16?9:re<534.24?10:re<534.3?11:re<535.01?12:re<535.02?"13+":re<535.07?15:re<535.11?16:re<535.19?17:re<536.05?18:re<536.1?19:re<537.01?20:re<537.11?"21+":re<537.13?23:re<537.18?24:re<537.24?25:re<537.36?26:Rt!="Blink"?"27":"28")),Rt&&(Rt[1]+=" "+(re+=typeof re=="number"?".x":/[.+]/.test(re)?"":"+")),Vt=="Safari"&&(!ee||parseInt(ee)>45)?ee=re:Vt=="Chrome"&&/\bHeadlessChrome/i.test(Ut)&&wt.unshift("headless")),Vt=="Opera"&&(re=/\bzbov|zvav$/.exec(ge))?(Vt+=" ",wt.unshift("desktop mode"),re=="zvav"?(Vt+="Mini",ee=null):Vt+="Mobile",ge=ge.replace(RegExp(" *"+re+"$"),"")):Vt=="Safari"&&/\bChrome\b/.exec(Rt&&Rt[1])?(wt.unshift("desktop mode"),Vt="Chrome Mobile",ee=null,/\bOS X\b/.test(ge)?(ue="Apple",ge="iOS 4.3+"):ge=null):/\bSRWare Iron\b/.test(Vt)&&!ee&&(ee=Qe("Chrome")),ee&&ee.indexOf(re=/[\d.]+$/.exec(ge))==0&&Ut.indexOf("/"+re+"-")>-1&&(ge=Gt(ge.replace(re,""))),ge&&ge.indexOf(Vt)!=-1&&!RegExp(Vt+" OS").test(ge)&&(ge=ge.replace(RegExp(" *"+Nt(Vt)+" *"),"")),Rt&&!/\b(?:Avant|Nook)\b/.test(Vt)&&(/Browser|Lunascape|Maxthon/.test(Vt)||Vt!="Safari"&&/^iOS/.test(ge)&&/\bSafari\b/.test(Rt[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(Vt)&&Rt[1])&&(re=Rt[Rt.length-1])&&wt.push(re),wt.length&&(wt=["("+wt.join("; ")+")"]),ue&&$t&&$t.indexOf(ue)<0&&wt.push("on "+ue),$t&&wt.push((/^on /.test(wt[wt.length-1])?"":"on ")+$t),ge&&(re=/ ([\d.+]+)$/.exec(ge),It=re&&ge.charAt(ge.length-re[0].length-1)=="/",ge={architecture:32,family:re&&!It?ge.replace(re[0],""):ge,version:re?re[1]:null,toString:function(){var We=this.version;return this.family+(We&&!It?" "+We:"")+(this.architecture==64?" 64-bit":"")}}),(re=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Kt))&&!/\bi686\b/i.test(Kt)?(ge&&(ge.architecture=64,ge.family=ge.family.replace(RegExp(" *"+re),"")),Vt&&(/\bWOW64\b/i.test(Ut)||Xt&&/\w(?:86|32)$/.test(se.cpuClass||se.platform)&&!/\bWin64; x64\b/i.test(Ut))&&wt.unshift("32-bit")):ge&&/^OS X/.test(ge.family)&&Vt=="Chrome"&&parseFloat(ee)>=39&&(ge.architecture=64),Ut||(Ut=null);var Ue={};return Ue.description=Ut,Ue.layout=Rt&&Rt[0],Ue.manufacturer=ue,Ue.name=Vt,Ue.prerelease=Lt,Ue.product=$t,Ue.ua=Ut,Ue.version=Vt&&ee,Ue.os=ge||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ue.parse=Wt,Ue.toString=He,Ue.version&&wt.unshift(ee),Ue.name&&wt.unshift(Vt),ge&&Vt&&!(ge==String(ge).split(" ")[0]&&(ge==Vt.split(" ")[0]||$t))&&wt.push($t?"("+ge+")":"on "+ge),wt.length&&(Ue.description=wt.join(" ")),Ue}var Jt=Wt();typeof le=="function"&&typeof le.amd=="object"&&le.amd?(kt.platform=Jt,le(function(){return Jt})):St&&Tt?At(Jt,function(Ut,Ht){St[Ht]=Ut}):kt.platform=Jt}).call(this)}).call(this)}).call(this,typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(ot,_t,Bt){(function(vt){(function(){"use strict";typeof vt=="undefined"||!vt.version||vt.version.indexOf("v0.")===0||vt.version.indexOf("v1.")===0&&vt.version.indexOf("v1.8.")!==0?_t.exports={nextTick:gt}:_t.exports=vt;function gt(kt,bt,St,Tt){if(typeof kt!="function")throw new TypeError('"callback" argument must be a function');var mt=arguments.length,xt,ft;switch(mt){case 0:case 1:return vt.nextTick(kt);case 2:return vt.nextTick(function(){kt.call(null,bt)});case 3:return vt.nextTick(function(){kt.call(null,bt,St)});case 4:return vt.nextTick(function(){kt.call(null,bt,St,Tt)});default:for(xt=new Array(mt-1),ft=0;ft<xt.length;)xt[ft++]=arguments[ft];return vt.nextTick(function(){kt.apply(null,xt)})}}}).call(this)}).call(this,ot("_process"))},{_process:467}],381:[function(ot,_t,Bt){var vt=_t.exports={},gt,kt;function bt(){throw new Error("setTimeout has not been defined")}function St(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?gt=setTimeout:gt=bt}catch(dt){gt=bt}try{typeof clearTimeout=="function"?kt=clearTimeout:kt=St}catch(dt){kt=St}})();function Tt(dt){if(gt===setTimeout)return setTimeout(dt,0);if((gt===bt||!gt)&&setTimeout)return gt=setTimeout,setTimeout(dt,0);try{return gt(dt,0)}catch(Pt){try{return gt.call(null,dt,0)}catch(At){return gt.call(this,dt,0)}}}function mt(dt){if(kt===clearTimeout)return clearTimeout(dt);if((kt===St||!kt)&&clearTimeout)return kt=clearTimeout,clearTimeout(dt);try{return kt(dt)}catch(Pt){try{return kt.call(null,dt)}catch(At){return kt.call(this,dt)}}}var xt=[],ft=!1,z,tt=-1;function at(){!ft||!z||(ft=!1,z.length?xt=z.concat(xt):tt=-1,xt.length&&it())}function it(){if(!ft){var dt=Tt(at);ft=!0;for(var Pt=xt.length;Pt;){for(z=xt,xt=[];++tt<Pt;)z&&z[tt].run();tt=-1,Pt=xt.length}z=null,ft=!1,mt(dt)}}vt.nextTick=function(dt){var Pt=new Array(arguments.length-1);if(arguments.length>1)for(var At=1;At<arguments.length;At++)Pt[At-1]=arguments[At];xt.push(new lt(dt,Pt)),xt.length===1&&!ft&&Tt(it)};function lt(dt,Pt){this.fun=dt,this.array=Pt}lt.prototype.run=function(){this.fun.apply(null,this.array)},vt.title="browser",vt.browser=!0,vt.env={},vt.argv=[],vt.version="",vt.versions={};function ut(){}vt.on=ut,vt.addListener=ut,vt.once=ut,vt.off=ut,vt.removeListener=ut,vt.removeAllListeners=ut,vt.emit=ut,vt.prependListener=ut,vt.prependOnceListener=ut,vt.listeners=function(dt){return[]},vt.binding=function(dt){throw new Error("process.binding is not supported")},vt.cwd=function(){return"/"},vt.chdir=function(dt){throw new Error("process.chdir is not supported")},vt.umask=function(){return 0}},{}],382:[function(ot,_t,Bt){(function(vt){(function(){(function(gt){var kt=typeof Bt=="object"&&Bt&&!Bt.nodeType&&Bt,bt=typeof _t=="object"&&_t&&!_t.nodeType&&_t,St=typeof vt=="object"&&vt;(St.global===St||St.window===St||St.self===St)&&(gt=St);var Tt,mt=2147483647,xt=36,ft=1,z=26,tt=38,at=700,it=72,lt=128,ut="-",dt=/^xn--/,Pt=/[^\x20-\x7E]/,At=/[\x2E\u3002\uFF0E\uFF61]/g,Dt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ft=xt-ft,Nt=Math.floor,jt=String.fromCharCode,Gt;function Wt(be){throw new RangeError(Dt[be])}function Jt(be,fe){for(var pe=be.length,he=[];pe--;)he[pe]=fe(be[pe]);return he}function Ut(be,fe){var pe=be.split("@"),he="";pe.length>1&&(he=pe[0]+"@",be=pe[1]),be=be.replace(At,".");var Ce=be.split("."),de=Jt(Ce,fe).join(".");return he+de}function Ht(be){for(var fe=[],pe=0,he=be.length,Ce,de;pe<he;)Ce=be.charCodeAt(pe++),Ce>=55296&&Ce<=56319&&pe<he?(de=be.charCodeAt(pe++),(de&64512)==56320?fe.push(((Ce&1023)<<10)+(de&1023)+65536):(fe.push(Ce),pe--)):fe.push(Ce);return fe}function oe(be){return Jt(be,function(fe){var pe="";return fe>65535&&(fe-=65536,pe+=jt(fe>>>10&1023|55296),fe=56320|fe&1023),pe+=jt(fe),pe}).join("")}function se(be){return be-48<10?be-22:be-65<26?be-65:be-97<26?be-97:xt}function ce(be,fe){return be+22+75*(be<26)-((fe!=0)<<5)}function Pe(be,fe,pe){var he=0;for(be=pe?Nt(be/at):be>>1,be+=Nt(be/fe);be>Ft*z>>1;he+=xt)be=Nt(be/Ft);return Nt(he+(Ft+1)*be/(be+tt))}function Yt(be){var fe=[],pe=be.length,he,Ce=0,de=lt,ye=it,Ne,xe,re,Kt,wt,Lt,Xt,ee,It;for(Ne=be.lastIndexOf(ut),Ne<0&&(Ne=0),xe=0;xe<Ne;++xe)be.charCodeAt(xe)>=128&&Wt("not-basic"),fe.push(be.charCodeAt(xe));for(re=Ne>0?Ne+1:0;re<pe;){for(Kt=Ce,wt=1,Lt=xt;re>=pe&&Wt("invalid-input"),Xt=se(be.charCodeAt(re++)),(Xt>=xt||Xt>Nt((mt-Ce)/wt))&&Wt("overflow"),Ce+=Xt*wt,ee=Lt<=ye?ft:Lt>=ye+z?z:Lt-ye,!(Xt<ee);Lt+=xt)It=xt-ee,wt>Nt(mt/It)&&Wt("overflow"),wt*=It;he=fe.length+1,ye=Pe(Ce-Kt,he,Kt==0),Nt(Ce/he)>mt-de&&Wt("overflow"),de+=Nt(Ce/he),Ce%=he,fe.splice(Ce++,0,de)}return oe(fe)}function ne(be){var fe,pe,he,Ce,de,ye,Ne,xe,re,Kt,wt,Lt=[],Xt,ee,It,Rt;for(be=Ht(be),Xt=be.length,fe=lt,pe=0,de=it,ye=0;ye<Xt;++ye)wt=be[ye],wt<128&&Lt.push(jt(wt));for(he=Ce=Lt.length,Ce&&Lt.push(ut);he<Xt;){for(Ne=mt,ye=0;ye<Xt;++ye)wt=be[ye],wt>=fe&&wt<Ne&&(Ne=wt);for(ee=he+1,Ne-fe>Nt((mt-pe)/ee)&&Wt("overflow"),pe+=(Ne-fe)*ee,fe=Ne,ye=0;ye<Xt;++ye)if(wt=be[ye],wt<fe&&++pe>mt&&Wt("overflow"),wt==fe){for(xe=pe,re=xt;Kt=re<=de?ft:re>=de+z?z:re-de,!(xe<Kt);re+=xt)Rt=xe-Kt,It=xt-Kt,Lt.push(jt(ce(Kt+Rt%It,0))),xe=Nt(Rt/It);Lt.push(jt(ce(xe,0))),de=Pe(pe,ee,he==Ce),pe=0,++he}++pe,++fe}return Lt.join("")}function ve(be){return Ut(be,function(fe){return dt.test(fe)?Yt(fe.slice(4).toLowerCase()):fe})}function Se(be){return Ut(be,function(fe){return Pt.test(fe)?"xn--"+ne(fe):fe})}if(Tt={version:"1.4.1",ucs2:{decode:Ht,encode:oe},decode:Yt,encode:ne,toASCII:Se,toUnicode:ve},typeof le=="function"&&typeof le.amd=="object"&&le.amd)le("punycode",function(){return Tt});else if(kt&&bt)if(_t.exports==kt)bt.exports=Tt;else for(Gt in Tt)Tt.hasOwnProperty(Gt)&&(kt[Gt]=Tt[Gt]);else gt.punycode=Tt})(this)}).call(this)}).call(this,typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(ot,_t,Bt){"use strict";function vt(kt,bt){return Object.prototype.hasOwnProperty.call(kt,bt)}_t.exports=function(kt,bt,St,Tt){bt=bt||"&",St=St||"=";var mt={};if(typeof kt!="string"||kt.length===0)return mt;var xt=/\+/g;kt=kt.split(bt);var ft=1e3;Tt&&typeof Tt.maxKeys=="number"&&(ft=Tt.maxKeys);var z=kt.length;ft>0&&z>ft&&(z=ft);for(var tt=0;tt<z;++tt){var at=kt[tt].replace(xt,"%20"),it=at.indexOf(St),lt,ut,dt,Pt;it>=0?(lt=at.substr(0,it),ut=at.substr(it+1)):(lt=at,ut=""),dt=decodeURIComponent(lt),Pt=decodeURIComponent(ut),vt(mt,dt)?gt(mt[dt])?mt[dt].push(Pt):mt[dt]=[mt[dt],Pt]:mt[dt]=Pt}return mt};var gt=Array.isArray||function(kt){return Object.prototype.toString.call(kt)==="[object Array]"}},{}],384:[function(ot,_t,Bt){"use strict";var vt=function(St){switch(typeof St){case"string":return St;case"boolean":return St?"true":"false";case"number":return isFinite(St)?St:"";default:return""}};_t.exports=function(St,Tt,mt,xt){return Tt=Tt||"&",mt=mt||"=",St===null&&(St=void 0),typeof St=="object"?kt(bt(St),function(ft){var z=encodeURIComponent(vt(ft))+mt;return gt(St[ft])?kt(St[ft],function(tt){return z+encodeURIComponent(vt(tt))}).join(Tt):z+encodeURIComponent(vt(St[ft]))}).join(Tt):xt?encodeURIComponent(vt(xt))+mt+encodeURIComponent(vt(St)):""};var gt=Array.isArray||function(St){return Object.prototype.toString.call(St)==="[object Array]"};function kt(St,Tt){if(St.map)return St.map(Tt);for(var mt=[],xt=0;xt<St.length;xt++)mt.push(Tt(St[xt],xt));return mt}var bt=Object.keys||function(St){var Tt=[];for(var mt in St)Object.prototype.hasOwnProperty.call(St,mt)&&Tt.push(mt);return Tt}},{}],385:[function(ot,_t,Bt){"use strict";Bt.decode=Bt.parse=ot("./decode"),Bt.encode=Bt.stringify=ot("./encode")},{"./decode":383,"./encode":384}],386:[function(ot,_t,Bt){"use strict";var vt=ot("process-nextick-args"),gt=Object.keys||function(at){var it=[];for(var lt in at)it.push(lt);return it};_t.exports=ft;var kt=Object.create(ot("core-util-is"));kt.inherits=ot("inherits");var bt=ot("./_stream_readable"),St=ot("./_stream_writable");kt.inherits(ft,bt);for(var Tt=gt(St.prototype),mt=0;mt<Tt.length;mt++){var xt=Tt[mt];ft.prototype[xt]||(ft.prototype[xt]=St.prototype[xt])}function ft(at){if(!(this instanceof ft))return new ft(at);bt.call(this,at),St.call(this,at),at&&at.readable===!1&&(this.readable=!1),at&&at.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,at&&at.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",z)}Object.defineProperty(ft.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(){this.allowHalfOpen||this._writableState.ended||vt.nextTick(tt,this)}function tt(at){at.end()}Object.defineProperty(ft.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(at){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=at,this._writableState.destroyed=at)}}),ft.prototype._destroy=function(at,it){this.push(null),this.end(),vt.nextTick(it,at)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(ot,_t,Bt){"use strict";_t.exports=kt;var vt=ot("./_stream_transform"),gt=Object.create(ot("core-util-is"));gt.inherits=ot("inherits"),gt.inherits(kt,vt);function kt(bt){if(!(this instanceof kt))return new kt(bt);vt.call(this,bt)}kt.prototype._transform=function(bt,St,Tt){Tt(null,bt)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(ot,_t,Bt){(function(vt,gt){(function(){"use strict";var kt=ot("process-nextick-args");_t.exports=jt;var bt=ot("isarray"),St;jt.ReadableState=Nt;var Tt=ot("events").EventEmitter,mt=function(wt,Lt){return wt.listeners(Lt).length},xt=ot("./internal/streams/stream"),ft=ot("safe-buffer").Buffer,z=gt.Uint8Array||function(){};function tt(wt){return ft.from(wt)}function at(wt){return ft.isBuffer(wt)||wt instanceof z}var it=Object.create(ot("core-util-is"));it.inherits=ot("inherits");var lt=ot("util"),ut=void 0;lt&<.debuglog?ut=lt.debuglog("stream"):ut=function(){};var dt=ot("./internal/streams/BufferList"),Pt=ot("./internal/streams/destroy"),At;it.inherits(jt,xt);var Dt=["error","close","destroy","pause","resume"];function Ft(wt,Lt,Xt){if(typeof wt.prependListener=="function")return wt.prependListener(Lt,Xt);!wt._events||!wt._events[Lt]?wt.on(Lt,Xt):bt(wt._events[Lt])?wt._events[Lt].unshift(Xt):wt._events[Lt]=[Xt,wt._events[Lt]]}function Nt(wt,Lt){St=St||ot("./_stream_duplex"),wt=wt||{};var Xt=Lt instanceof St;this.objectMode=!!wt.objectMode,Xt&&(this.objectMode=this.objectMode||!!wt.readableObjectMode);var ee=wt.highWaterMark,It=wt.readableHighWaterMark,Rt=this.objectMode?16:16*1024;ee||ee===0?this.highWaterMark=ee:Xt&&(It||It===0)?this.highWaterMark=It:this.highWaterMark=Rt,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new dt,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=wt.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,wt.encoding&&(At||(At=ot("string_decoder/").StringDecoder),this.decoder=new At(wt.encoding),this.encoding=wt.encoding)}function jt(wt){if(St=St||ot("./_stream_duplex"),!(this instanceof jt))return new jt(wt);this._readableState=new Nt(wt,this),this.readable=!0,wt&&(typeof wt.read=="function"&&(this._read=wt.read),typeof wt.destroy=="function"&&(this._destroy=wt.destroy)),xt.call(this)}Object.defineProperty(jt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(wt){this._readableState&&(this._readableState.destroyed=wt)}}),jt.prototype.destroy=Pt.destroy,jt.prototype._undestroy=Pt.undestroy,jt.prototype._destroy=function(wt,Lt){this.push(null),Lt(wt)},jt.prototype.push=function(wt,Lt){var Xt=this._readableState,ee;return Xt.objectMode?ee=!0:typeof wt=="string"&&(Lt=Lt||Xt.defaultEncoding,Lt!==Xt.encoding&&(wt=ft.from(wt,Lt),Lt=""),ee=!0),Gt(this,wt,Lt,!1,ee)},jt.prototype.unshift=function(wt){return Gt(this,wt,null,!0,!1)};function Gt(wt,Lt,Xt,ee,It){var Rt=wt._readableState;if(Lt===null)Rt.reading=!1,ce(wt,Rt);else{var Vt;It||(Vt=Jt(Rt,Lt)),Vt?wt.emit("error",Vt):Rt.objectMode||Lt&&Lt.length>0?(typeof Lt!="string"&&!Rt.objectMode&&Object.getPrototypeOf(Lt)!==ft.prototype&&(Lt=tt(Lt)),ee?Rt.endEmitted?wt.emit("error",new Error("stream.unshift() after end event")):Wt(wt,Rt,Lt,!0):Rt.ended?wt.emit("error",new Error("stream.push() after EOF")):(Rt.reading=!1,Rt.decoder&&!Xt?(Lt=Rt.decoder.write(Lt),Rt.objectMode||Lt.length!==0?Wt(wt,Rt,Lt,!1):ne(wt,Rt)):Wt(wt,Rt,Lt,!1))):ee||(Rt.reading=!1)}return Ut(Rt)}function Wt(wt,Lt,Xt,ee){Lt.flowing&&Lt.length===0&&!Lt.sync?(wt.emit("data",Xt),wt.read(0)):(Lt.length+=Lt.objectMode?1:Xt.length,ee?Lt.buffer.unshift(Xt):Lt.buffer.push(Xt),Lt.needReadable&&Pe(wt)),ne(wt,Lt)}function Jt(wt,Lt){var Xt;return!at(Lt)&&typeof Lt!="string"&&Lt!==void 0&&!wt.objectMode&&(Xt=new TypeError("Invalid non-string/buffer chunk")),Xt}function Ut(wt){return!wt.ended&&(wt.needReadable||wt.length<wt.highWaterMark||wt.length===0)}jt.prototype.isPaused=function(){return this._readableState.flowing===!1},jt.prototype.setEncoding=function(wt){return At||(At=ot("string_decoder/").StringDecoder),this._readableState.decoder=new At(wt),this._readableState.encoding=wt,this};var Ht=8388608;function oe(wt){return wt>=Ht?wt=Ht:(wt--,wt|=wt>>>1,wt|=wt>>>2,wt|=wt>>>4,wt|=wt>>>8,wt|=wt>>>16,wt++),wt}function se(wt,Lt){return wt<=0||Lt.length===0&&Lt.ended?0:Lt.objectMode?1:wt!==wt?Lt.flowing&&Lt.length?Lt.buffer.head.data.length:Lt.length:(wt>Lt.highWaterMark&&(Lt.highWaterMark=oe(wt)),wt<=Lt.length?wt:Lt.ended?Lt.length:(Lt.needReadable=!0,0))}jt.prototype.read=function(wt){ut("read",wt),wt=parseInt(wt,10);var Lt=this._readableState,Xt=wt;if(wt!==0&&(Lt.emittedReadable=!1),wt===0&&Lt.needReadable&&(Lt.length>=Lt.highWaterMark||Lt.ended))return ut("read: emitReadable",Lt.length,Lt.ended),Lt.length===0&&Lt.ended?xe(this):Pe(this),null;if(wt=se(wt,Lt),wt===0&&Lt.ended)return Lt.length===0&&xe(this),null;var ee=Lt.needReadable;ut("need readable",ee),(Lt.length===0||Lt.length-wt<Lt.highWaterMark)&&(ee=!0,ut("length less than watermark",ee)),Lt.ended||Lt.reading?(ee=!1,ut("reading or ended",ee)):ee&&(ut("do read"),Lt.reading=!0,Lt.sync=!0,Lt.length===0&&(Lt.needReadable=!0),this._read(Lt.highWaterMark),Lt.sync=!1,Lt.reading||(wt=se(Xt,Lt)));var It;return wt>0?It=Ce(wt,Lt):It=null,It===null?(Lt.needReadable=!0,wt=0):Lt.length-=wt,Lt.length===0&&(Lt.ended||(Lt.needReadable=!0),Xt!==wt&&Lt.ended&&xe(this)),It!==null&&this.emit("data",It),It};function ce(wt,Lt){if(!Lt.ended){if(Lt.decoder){var Xt=Lt.decoder.end();Xt&&Xt.length&&(Lt.buffer.push(Xt),Lt.length+=Lt.objectMode?1:Xt.length)}Lt.ended=!0,Pe(wt)}}function Pe(wt){var Lt=wt._readableState;Lt.needReadable=!1,Lt.emittedReadable||(ut("emitReadable",Lt.flowing),Lt.emittedReadable=!0,Lt.sync?kt.nextTick(Yt,wt):Yt(wt))}function Yt(wt){ut("emit readable"),wt.emit("readable"),he(wt)}function ne(wt,Lt){Lt.readingMore||(Lt.readingMore=!0,kt.nextTick(ve,wt,Lt))}function ve(wt,Lt){for(var Xt=Lt.length;!Lt.reading&&!Lt.flowing&&!Lt.ended&&Lt.length<Lt.highWaterMark&&(ut("maybeReadMore read 0"),wt.read(0),Xt!==Lt.length);)Xt=Lt.length;Lt.readingMore=!1}jt.prototype._read=function(wt){this.emit("error",new Error("_read() is not implemented"))},jt.prototype.pipe=function(wt,Lt){var Xt=this,ee=this._readableState;switch(ee.pipesCount){case 0:ee.pipes=wt;break;case 1:ee.pipes=[ee.pipes,wt];break;default:ee.pipes.push(wt);break}ee.pipesCount+=1,ut("pipe count=%d opts=%j",ee.pipesCount,Lt);var It=(!Lt||Lt.end!==!1)&&wt!==vt.stdout&&wt!==vt.stderr,Rt=It?$t:He;ee.endEmitted?kt.nextTick(Rt):Xt.once("end",Rt),wt.on("unpipe",Vt);function Vt(Ue,We){ut("onunpipe"),Ue===Xt&&We&&We.hasUnpiped===!1&&(We.hasUnpiped=!0,Me())}function $t(){ut("onend"),wt.end()}var ue=Se(Xt);wt.on("drain",ue);var ge=!1;function Me(){ut("cleanup"),wt.removeListener("close",Ye),wt.removeListener("finish",Qe),wt.removeListener("drain",ue),wt.removeListener("error",Ze),wt.removeListener("unpipe",Vt),Xt.removeListener("end",$t),Xt.removeListener("end",He),Xt.removeListener("data",Be),ge=!0,ee.awaitDrain&&(!wt._writableState||wt._writableState.needDrain)&&ue()}var Ae=!1;Xt.on("data",Be);function Be(Ue){ut("ondata"),Ae=!1;var We=wt.write(Ue);We===!1&&!Ae&&((ee.pipesCount===1&&ee.pipes===wt||ee.pipesCount>1&&Kt(ee.pipes,wt)!==-1)&&!ge&&(ut("false write response, pause",Xt._readableState.awaitDrain),Xt._readableState.awaitDrain++,Ae=!0),Xt.pause())}function Ze(Ue){ut("onerror",Ue),He(),wt.removeListener("error",Ze),mt(wt,"error")===0&&wt.emit("error",Ue)}Ft(wt,"error",Ze);function Ye(){wt.removeListener("finish",Qe),He()}wt.once("close",Ye);function Qe(){ut("onfinish"),wt.removeListener("close",Ye),He()}wt.once("finish",Qe);function He(){ut("unpipe"),Xt.unpipe(wt)}return wt.emit("pipe",Xt),ee.flowing||(ut("pipe resume"),Xt.resume()),wt};function Se(wt){return function(){var Lt=wt._readableState;ut("pipeOnDrain",Lt.awaitDrain),Lt.awaitDrain&&Lt.awaitDrain--,Lt.awaitDrain===0&&mt(wt,"data")&&(Lt.flowing=!0,he(wt))}}jt.prototype.unpipe=function(wt){var Lt=this._readableState,Xt={hasUnpiped:!1};if(Lt.pipesCount===0)return this;if(Lt.pipesCount===1)return wt&&wt!==Lt.pipes?this:(wt||(wt=Lt.pipes),Lt.pipes=null,Lt.pipesCount=0,Lt.flowing=!1,wt&&wt.emit("unpipe",this,Xt),this);if(!wt){var ee=Lt.pipes,It=Lt.pipesCount;Lt.pipes=null,Lt.pipesCount=0,Lt.flowing=!1;for(var Rt=0;Rt<It;Rt++)ee[Rt].emit("unpipe",this,Xt);return this}var Vt=Kt(Lt.pipes,wt);return Vt===-1?this:(Lt.pipes.splice(Vt,1),Lt.pipesCount-=1,Lt.pipesCount===1&&(Lt.pipes=Lt.pipes[0]),wt.emit("unpipe",this,Xt),this)},jt.prototype.on=function(wt,Lt){var Xt=xt.prototype.on.call(this,wt,Lt);if(wt==="data")this._readableState.flowing!==!1&&this.resume();else if(wt==="readable"){var ee=this._readableState;!ee.endEmitted&&!ee.readableListening&&(ee.readableListening=ee.needReadable=!0,ee.emittedReadable=!1,ee.reading?ee.length&&Pe(this):kt.nextTick(be,this))}return Xt},jt.prototype.addListener=jt.prototype.on;function be(wt){ut("readable nexttick read 0"),wt.read(0)}jt.prototype.resume=function(){var wt=this._readableState;return wt.flowing||(ut("resume"),wt.flowing=!0,fe(this,wt)),this};function fe(wt,Lt){Lt.resumeScheduled||(Lt.resumeScheduled=!0,kt.nextTick(pe,wt,Lt))}function pe(wt,Lt){Lt.reading||(ut("resume read 0"),wt.read(0)),Lt.resumeScheduled=!1,Lt.awaitDrain=0,wt.emit("resume"),he(wt),Lt.flowing&&!Lt.reading&&wt.read(0)}jt.prototype.pause=function(){return ut("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ut("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function he(wt){var Lt=wt._readableState;for(ut("flow",Lt.flowing);Lt.flowing&&wt.read()!==null;);}jt.prototype.wrap=function(wt){var Lt=this,Xt=this._readableState,ee=!1;wt.on("end",function(){if(ut("wrapped end"),Xt.decoder&&!Xt.ended){var Vt=Xt.decoder.end();Vt&&Vt.length&&Lt.push(Vt)}Lt.push(null)}),wt.on("data",function(Vt){if(ut("wrapped data"),Xt.decoder&&(Vt=Xt.decoder.write(Vt)),!(Xt.objectMode&&Vt==null)&&!(!Xt.objectMode&&(!Vt||!Vt.length))){var $t=Lt.push(Vt);$t||(ee=!0,wt.pause())}});for(var It in wt)this[It]===void 0&&typeof wt[It]=="function"&&(this[It]=function(Vt){return function(){return wt[Vt].apply(wt,arguments)}}(It));for(var Rt=0;Rt<Dt.length;Rt++)wt.on(Dt[Rt],this.emit.bind(this,Dt[Rt]));return this._read=function(Vt){ut("wrapped _read",Vt),ee&&(ee=!1,wt.resume())},this},Object.defineProperty(jt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),jt._fromList=Ce;function Ce(wt,Lt){if(Lt.length===0)return null;var Xt;return Lt.objectMode?Xt=Lt.buffer.shift():!wt||wt>=Lt.length?(Lt.decoder?Xt=Lt.buffer.join(""):Lt.buffer.length===1?Xt=Lt.buffer.head.data:Xt=Lt.buffer.concat(Lt.length),Lt.buffer.clear()):Xt=de(wt,Lt.buffer,Lt.decoder),Xt}function de(wt,Lt,Xt){var ee;return wt<Lt.head.data.length?(ee=Lt.head.data.slice(0,wt),Lt.head.data=Lt.head.data.slice(wt)):wt===Lt.head.data.length?ee=Lt.shift():ee=Xt?ye(wt,Lt):Ne(wt,Lt),ee}function ye(wt,Lt){var Xt=Lt.head,ee=1,It=Xt.data;for(wt-=It.length;Xt=Xt.next;){var Rt=Xt.data,Vt=wt>Rt.length?Rt.length:wt;if(Vt===Rt.length?It+=Rt:It+=Rt.slice(0,wt),wt-=Vt,wt===0){Vt===Rt.length?(++ee,Xt.next?Lt.head=Xt.next:Lt.head=Lt.tail=null):(Lt.head=Xt,Xt.data=Rt.slice(Vt));break}++ee}return Lt.length-=ee,It}function Ne(wt,Lt){var Xt=ft.allocUnsafe(wt),ee=Lt.head,It=1;for(ee.data.copy(Xt),wt-=ee.data.length;ee=ee.next;){var Rt=ee.data,Vt=wt>Rt.length?Rt.length:wt;if(Rt.copy(Xt,Xt.length-wt,0,Vt),wt-=Vt,wt===0){Vt===Rt.length?(++It,ee.next?Lt.head=ee.next:Lt.head=Lt.tail=null):(Lt.head=ee,ee.data=Rt.slice(Vt));break}++It}return Lt.length-=It,Xt}function xe(wt){var Lt=wt._readableState;if(Lt.length>0)throw new Error('"endReadable()" called on non-empty stream');Lt.endEmitted||(Lt.ended=!0,kt.nextTick(re,Lt,wt))}function re(wt,Lt){!wt.endEmitted&&wt.length===0&&(wt.endEmitted=!0,Lt.readable=!1,Lt.emit("end"))}function Kt(wt,Lt){for(var Xt=0,ee=wt.length;Xt<ee;Xt++)if(wt[Xt]===Lt)return Xt;return-1}}).call(this)}).call(this,ot("_process"),typeof fn!="undefined"?fn: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(ot,_t,Bt){"use strict";_t.exports=bt;var vt=ot("./_stream_duplex"),gt=Object.create(ot("core-util-is"));gt.inherits=ot("inherits"),gt.inherits(bt,vt);function kt(mt,xt){var ft=this._transformState;ft.transforming=!1;var z=ft.writecb;if(!z)return this.emit("error",new Error("write callback called multiple times"));ft.writechunk=null,ft.writecb=null,xt!=null&&this.push(xt),z(mt);var tt=this._readableState;tt.reading=!1,(tt.needReadable||tt.length<tt.highWaterMark)&&this._read(tt.highWaterMark)}function bt(mt){if(!(this instanceof bt))return new bt(mt);vt.call(this,mt),this._transformState={afterTransform:kt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,mt&&(typeof mt.transform=="function"&&(this._transform=mt.transform),typeof mt.flush=="function"&&(this._flush=mt.flush)),this.on("prefinish",St)}function St(){var mt=this;typeof this._flush=="function"?this._flush(function(xt,ft){Tt(mt,xt,ft)}):Tt(this,null,null)}bt.prototype.push=function(mt,xt){return this._transformState.needTransform=!1,vt.prototype.push.call(this,mt,xt)},bt.prototype._transform=function(mt,xt,ft){throw new Error("_transform() is not implemented")},bt.prototype._write=function(mt,xt,ft){var z=this._transformState;if(z.writecb=ft,z.writechunk=mt,z.writeencoding=xt,!z.transforming){var tt=this._readableState;(z.needTransform||tt.needReadable||tt.length<tt.highWaterMark)&&this._read(tt.highWaterMark)}},bt.prototype._read=function(mt){var xt=this._transformState;xt.writechunk!==null&&xt.writecb&&!xt.transforming?(xt.transforming=!0,this._transform(xt.writechunk,xt.writeencoding,xt.afterTransform)):xt.needTransform=!0},bt.prototype._destroy=function(mt,xt){var ft=this;vt.prototype._destroy.call(this,mt,function(z){xt(z),ft.emit("close")})};function Tt(mt,xt,ft){if(xt)return mt.emit("error",xt);if(ft!=null&&mt.push(ft),mt._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(mt._transformState.transforming)throw new Error("Calling transform done when still transforming");return mt.push(null)}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(ot,_t,Bt){(function(vt,gt,kt){(function(){"use strict";var bt=ot("process-nextick-args");_t.exports=Ft;function St(pe,he,Ce){this.chunk=pe,this.encoding=he,this.callback=Ce,this.next=null}function Tt(pe){var he=this;this.next=null,this.entry=null,this.finish=function(){fe(he,pe)}}var mt=!vt.browser&&["v0.10","v0.9."].indexOf(vt.version.slice(0,5))>-1?kt:bt.nextTick,xt;Ft.WritableState=At;var ft=Object.create(ot("core-util-is"));ft.inherits=ot("inherits");var z={deprecate:ot("util-deprecate")},tt=ot("./internal/streams/stream"),at=ot("safe-buffer").Buffer,it=gt.Uint8Array||function(){};function lt(pe){return at.from(pe)}function ut(pe){return at.isBuffer(pe)||pe instanceof it}var dt=ot("./internal/streams/destroy");ft.inherits(Ft,tt);function Pt(){}function At(pe,he){xt=xt||ot("./_stream_duplex"),pe=pe||{};var Ce=he instanceof xt;this.objectMode=!!pe.objectMode,Ce&&(this.objectMode=this.objectMode||!!pe.writableObjectMode);var de=pe.highWaterMark,ye=pe.writableHighWaterMark,Ne=this.objectMode?16:16*1024;de||de===0?this.highWaterMark=de:Ce&&(ye||ye===0)?this.highWaterMark=ye:this.highWaterMark=Ne,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 xe=pe.decodeStrings===!1;this.decodeStrings=!xe,this.defaultEncoding=pe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(re){oe(he,re)},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 Tt(this)}At.prototype.getBuffer=function(){for(var he=this.bufferedRequest,Ce=[];he;)Ce.push(he),he=he.next;return Ce},function(){try{Object.defineProperty(At.prototype,"buffer",{get:z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(pe){}}();var Dt;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Dt=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ft,Symbol.hasInstance,{value:function(pe){return Dt.call(this,pe)?!0:this!==Ft?!1:pe&&pe._writableState instanceof At}})):Dt=function(pe){return pe instanceof this};function Ft(pe){if(xt=xt||ot("./_stream_duplex"),!Dt.call(Ft,this)&&!(this instanceof xt))return new Ft(pe);this._writableState=new At(pe,this),this.writable=!0,pe&&(typeof pe.write=="function"&&(this._write=pe.write),typeof pe.writev=="function"&&(this._writev=pe.writev),typeof pe.destroy=="function"&&(this._destroy=pe.destroy),typeof pe.final=="function"&&(this._final=pe.final)),tt.call(this)}Ft.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Nt(pe,he){var Ce=new Error("write after end");pe.emit("error",Ce),bt.nextTick(he,Ce)}function jt(pe,he,Ce,de){var ye=!0,Ne=!1;return Ce===null?Ne=new TypeError("May not write null values to stream"):typeof Ce!="string"&&Ce!==void 0&&!he.objectMode&&(Ne=new TypeError("Invalid non-string/buffer chunk")),Ne&&(pe.emit("error",Ne),bt.nextTick(de,Ne),ye=!1),ye}Ft.prototype.write=function(pe,he,Ce){var de=this._writableState,ye=!1,Ne=!de.objectMode&&ut(pe);return Ne&&!at.isBuffer(pe)&&(pe=lt(pe)),typeof he=="function"&&(Ce=he,he=null),Ne?he="buffer":he||(he=de.defaultEncoding),typeof Ce!="function"&&(Ce=Pt),de.ended?Nt(this,Ce):(Ne||jt(this,de,pe,Ce))&&(de.pendingcb++,ye=Wt(this,de,Ne,pe,he,Ce)),ye},Ft.prototype.cork=function(){var pe=this._writableState;pe.corked++},Ft.prototype.uncork=function(){var pe=this._writableState;pe.corked&&(pe.corked--,!pe.writing&&!pe.corked&&!pe.finished&&!pe.bufferProcessing&&pe.bufferedRequest&&Pe(this,pe))},Ft.prototype.setDefaultEncoding=function(he){if(typeof he=="string"&&(he=he.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((he+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+he);return this._writableState.defaultEncoding=he,this};function Gt(pe,he,Ce){return!pe.objectMode&&pe.decodeStrings!==!1&&typeof he=="string"&&(he=at.from(he,Ce)),he}Object.defineProperty(Ft.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Wt(pe,he,Ce,de,ye,Ne){if(!Ce){var xe=Gt(he,de,ye);de!==xe&&(Ce=!0,ye="buffer",de=xe)}var re=he.objectMode?1:de.length;he.length+=re;var Kt=he.length<he.highWaterMark;if(Kt||(he.needDrain=!0),he.writing||he.corked){var wt=he.lastBufferedRequest;he.lastBufferedRequest={chunk:de,encoding:ye,isBuf:Ce,callback:Ne,next:null},wt?wt.next=he.lastBufferedRequest:he.bufferedRequest=he.lastBufferedRequest,he.bufferedRequestCount+=1}else Jt(pe,he,!1,re,de,ye,Ne);return Kt}function Jt(pe,he,Ce,de,ye,Ne,xe){he.writelen=de,he.writecb=xe,he.writing=!0,he.sync=!0,Ce?pe._writev(ye,he.onwrite):pe._write(ye,Ne,he.onwrite),he.sync=!1}function Ut(pe,he,Ce,de,ye){--he.pendingcb,Ce?(bt.nextTick(ye,de),bt.nextTick(Se,pe,he),pe._writableState.errorEmitted=!0,pe.emit("error",de)):(ye(de),pe._writableState.errorEmitted=!0,pe.emit("error",de),Se(pe,he))}function Ht(pe){pe.writing=!1,pe.writecb=null,pe.length-=pe.writelen,pe.writelen=0}function oe(pe,he){var Ce=pe._writableState,de=Ce.sync,ye=Ce.writecb;if(Ht(Ce),he)Ut(pe,Ce,de,he,ye);else{var Ne=Yt(Ce);!Ne&&!Ce.corked&&!Ce.bufferProcessing&&Ce.bufferedRequest&&Pe(pe,Ce),de?mt(se,pe,Ce,Ne,ye):se(pe,Ce,Ne,ye)}}function se(pe,he,Ce,de){Ce||ce(pe,he),he.pendingcb--,de(),Se(pe,he)}function ce(pe,he){he.length===0&&he.needDrain&&(he.needDrain=!1,pe.emit("drain"))}function Pe(pe,he){he.bufferProcessing=!0;var Ce=he.bufferedRequest;if(pe._writev&&Ce&&Ce.next){var de=he.bufferedRequestCount,ye=new Array(de),Ne=he.corkedRequestsFree;Ne.entry=Ce;for(var xe=0,re=!0;Ce;)ye[xe]=Ce,Ce.isBuf||(re=!1),Ce=Ce.next,xe+=1;ye.allBuffers=re,Jt(pe,he,!0,he.length,ye,"",Ne.finish),he.pendingcb++,he.lastBufferedRequest=null,Ne.next?(he.corkedRequestsFree=Ne.next,Ne.next=null):he.corkedRequestsFree=new Tt(he),he.bufferedRequestCount=0}else{for(;Ce;){var Kt=Ce.chunk,wt=Ce.encoding,Lt=Ce.callback,Xt=he.objectMode?1:Kt.length;if(Jt(pe,he,!1,Xt,Kt,wt,Lt),Ce=Ce.next,he.bufferedRequestCount--,he.writing)break}Ce===null&&(he.lastBufferedRequest=null)}he.bufferedRequest=Ce,he.bufferProcessing=!1}Ft.prototype._write=function(pe,he,Ce){Ce(new Error("_write() is not implemented"))},Ft.prototype._writev=null,Ft.prototype.end=function(pe,he,Ce){var de=this._writableState;typeof pe=="function"?(Ce=pe,pe=null,he=null):typeof he=="function"&&(Ce=he,he=null),pe!=null&&this.write(pe,he),de.corked&&(de.corked=1,this.uncork()),!de.ending&&!de.finished&&be(this,de,Ce)};function Yt(pe){return pe.ending&&pe.length===0&&pe.bufferedRequest===null&&!pe.finished&&!pe.writing}function ne(pe,he){pe._final(function(Ce){he.pendingcb--,Ce&&pe.emit("error",Ce),he.prefinished=!0,pe.emit("prefinish"),Se(pe,he)})}function ve(pe,he){!he.prefinished&&!he.finalCalled&&(typeof pe._final=="function"?(he.pendingcb++,he.finalCalled=!0,bt.nextTick(ne,pe,he)):(he.prefinished=!0,pe.emit("prefinish")))}function Se(pe,he){var Ce=Yt(he);return Ce&&(ve(pe,he),he.pendingcb===0&&(he.finished=!0,pe.emit("finish"))),Ce}function be(pe,he,Ce){he.ending=!0,Se(pe,he),Ce&&(he.finished?bt.nextTick(Ce):pe.once("finish",Ce)),he.ended=!0,pe.writable=!1}function fe(pe,he,Ce){var de=pe.entry;for(pe.entry=null;de;){var ye=de.callback;he.pendingcb--,ye(Ce),de=de.next}he.corkedRequestsFree?he.corkedRequestsFree.next=pe:he.corkedRequestsFree=pe}Object.defineProperty(Ft.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(pe){this._writableState&&(this._writableState.destroyed=pe)}}),Ft.prototype.destroy=dt.destroy,Ft.prototype._undestroy=dt.undestroy,Ft.prototype._destroy=function(pe,he){this.end(),he(pe)}}).call(this)}).call(this,ot("_process"),typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ot("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(ot,_t,Bt){"use strict";function vt(St,Tt){if(!(St instanceof Tt))throw new TypeError("Cannot call a class as a function")}var gt=ot("safe-buffer").Buffer,kt=ot("util");function bt(St,Tt,mt){St.copy(Tt,mt)}_t.exports=function(){function St(){vt(this,St),this.head=null,this.tail=null,this.length=0}return St.prototype.push=function(mt){var xt={data:mt,next:null};this.length>0?this.tail.next=xt:this.head=xt,this.tail=xt,++this.length},St.prototype.unshift=function(mt){var xt={data:mt,next:this.head};this.length===0&&(this.tail=xt),this.head=xt,++this.length},St.prototype.shift=function(){if(this.length!==0){var mt=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,mt}},St.prototype.clear=function(){this.head=this.tail=null,this.length=0},St.prototype.join=function(mt){if(this.length===0)return"";for(var xt=this.head,ft=""+xt.data;xt=xt.next;)ft+=mt+xt.data;return ft},St.prototype.concat=function(mt){if(this.length===0)return gt.alloc(0);if(this.length===1)return this.head.data;for(var xt=gt.allocUnsafe(mt>>>0),ft=this.head,z=0;ft;)bt(ft.data,xt,z),z+=ft.data.length,ft=ft.next;return xt},St}(),kt&&kt.inspect&&kt.inspect.custom&&(_t.exports.prototype[kt.inspect.custom]=function(){var St=kt.inspect({length:this.length});return this.constructor.name+" "+St})},{"safe-buffer":396,util:89}],392:[function(ot,_t,Bt){"use strict";var vt=ot("process-nextick-args");function gt(St,Tt){var mt=this,xt=this._readableState&&this._readableState.destroyed,ft=this._writableState&&this._writableState.destroyed;return xt||ft?(Tt?Tt(St):St&&(!this._writableState||!this._writableState.errorEmitted)&&vt.nextTick(bt,this,St),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(St||null,function(z){!Tt&&z?(vt.nextTick(bt,mt,z),mt._writableState&&(mt._writableState.errorEmitted=!0)):Tt&&Tt(z)}),this)}function kt(){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 bt(St,Tt){St.emit("error",Tt)}_t.exports={destroy:gt,undestroy:kt}},{"process-nextick-args":380}],393:[function(ot,_t,Bt){_t.exports=ot("events").EventEmitter},{events:344}],394:[function(ot,_t,Bt){Bt=_t.exports=ot("./lib/_stream_readable.js"),Bt.Stream=Bt,Bt.Readable=Bt,Bt.Writable=ot("./lib/_stream_writable.js"),Bt.Duplex=ot("./lib/_stream_duplex.js"),Bt.Transform=ot("./lib/_stream_transform.js"),Bt.PassThrough=ot("./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(ot,_t,Bt){var vt=function(gt){"use strict";var kt=Object.prototype,bt=kt.hasOwnProperty,St,Tt=typeof Symbol=="function"?Symbol:{},mt=Tt.iterator||"@@iterator",xt=Tt.asyncIterator||"@@asyncIterator",ft=Tt.toStringTag||"@@toStringTag";function z(ve,Se,be){return Object.defineProperty(ve,Se,{value:be,enumerable:!0,configurable:!0,writable:!0}),ve[Se]}try{z({},"")}catch(ve){z=function(Se,be,fe){return Se[be]=fe}}function tt(ve,Se,be,fe){var pe=Se&&Se.prototype instanceof At?Se:At,he=Object.create(pe.prototype),Ce=new Pe(fe||[]);return he._invoke=Ht(ve,be,Ce),he}gt.wrap=tt;function at(ve,Se,be){try{return{type:"normal",arg:ve.call(Se,be)}}catch(fe){return{type:"throw",arg:fe}}}var it="suspendedStart",lt="suspendedYield",ut="executing",dt="completed",Pt={};function At(){}function Dt(){}function Ft(){}var Nt={};z(Nt,mt,function(){return this});var jt=Object.getPrototypeOf,Gt=jt&&jt(jt(Yt([])));Gt&&Gt!==kt&&bt.call(Gt,mt)&&(Nt=Gt);var Wt=Ft.prototype=At.prototype=Object.create(Nt);Dt.prototype=Ft,z(Wt,"constructor",Ft),z(Ft,"constructor",Dt),Dt.displayName=z(Ft,ft,"GeneratorFunction");function Jt(ve){["next","throw","return"].forEach(function(Se){z(ve,Se,function(be){return this._invoke(Se,be)})})}gt.isGeneratorFunction=function(ve){var Se=typeof ve=="function"&&ve.constructor;return Se?Se===Dt||(Se.displayName||Se.name)==="GeneratorFunction":!1},gt.mark=function(ve){return Object.setPrototypeOf?Object.setPrototypeOf(ve,Ft):(ve.__proto__=Ft,z(ve,ft,"GeneratorFunction")),ve.prototype=Object.create(Wt),ve},gt.awrap=function(ve){return{__await:ve}};function Ut(ve,Se){function be(he,Ce,de,ye){var Ne=at(ve[he],ve,Ce);if(Ne.type==="throw")ye(Ne.arg);else{var xe=Ne.arg,re=xe.value;return re&&typeof re=="object"&&bt.call(re,"__await")?Se.resolve(re.__await).then(function(Kt){be("next",Kt,de,ye)},function(Kt){be("throw",Kt,de,ye)}):Se.resolve(re).then(function(Kt){xe.value=Kt,de(xe)},function(Kt){return be("throw",Kt,de,ye)})}}var fe;function pe(he,Ce){function de(){return new Se(function(ye,Ne){be(he,Ce,ye,Ne)})}return fe=fe?fe.then(de,de):de()}this._invoke=pe}Jt(Ut.prototype),z(Ut.prototype,xt,function(){return this}),gt.AsyncIterator=Ut,gt.async=function(ve,Se,be,fe,pe){pe===void 0&&(pe=Promise);var he=new Ut(tt(ve,Se,be,fe),pe);return gt.isGeneratorFunction(Se)?he:he.next().then(function(Ce){return Ce.done?Ce.value:he.next()})};function Ht(ve,Se,be){var fe=it;return function(he,Ce){if(fe===ut)throw new Error("Generator is already running");if(fe===dt){if(he==="throw")throw Ce;return ne()}for(be.method=he,be.arg=Ce;;){var de=be.delegate;if(de){var ye=oe(de,be);if(ye){if(ye===Pt)continue;return ye}}if(be.method==="next")be.sent=be._sent=be.arg;else if(be.method==="throw"){if(fe===it)throw fe=dt,be.arg;be.dispatchException(be.arg)}else be.method==="return"&&be.abrupt("return",be.arg);fe=ut;var Ne=at(ve,Se,be);if(Ne.type==="normal"){if(fe=be.done?dt:lt,Ne.arg===Pt)continue;return{value:Ne.arg,done:be.done}}else Ne.type==="throw"&&(fe=dt,be.method="throw",be.arg=Ne.arg)}}}function oe(ve,Se){var be=ve.iterator[Se.method];if(be===St){if(Se.delegate=null,Se.method==="throw"){if(ve.iterator.return&&(Se.method="return",Se.arg=St,oe(ve,Se),Se.method==="throw"))return Pt;Se.method="throw",Se.arg=new TypeError("The iterator does not provide a 'throw' method")}return Pt}var fe=at(be,ve.iterator,Se.arg);if(fe.type==="throw")return Se.method="throw",Se.arg=fe.arg,Se.delegate=null,Pt;var pe=fe.arg;if(!pe)return Se.method="throw",Se.arg=new TypeError("iterator result is not an object"),Se.delegate=null,Pt;if(pe.done)Se[ve.resultName]=pe.value,Se.next=ve.nextLoc,Se.method!=="return"&&(Se.method="next",Se.arg=St);else return pe;return Se.delegate=null,Pt}Jt(Wt),z(Wt,ft,"Generator"),z(Wt,mt,function(){return this}),z(Wt,"toString",function(){return"[object Generator]"});function se(ve){var Se={tryLoc:ve[0]};1 in ve&&(Se.catchLoc=ve[1]),2 in ve&&(Se.finallyLoc=ve[2],Se.afterLoc=ve[3]),this.tryEntries.push(Se)}function ce(ve){var Se=ve.completion||{};Se.type="normal",delete Se.arg,ve.completion=Se}function Pe(ve){this.tryEntries=[{tryLoc:"root"}],ve.forEach(se,this),this.reset(!0)}gt.keys=function(ve){var Se=[];for(var be in ve)Se.push(be);return Se.reverse(),function fe(){for(;Se.length;){var pe=Se.pop();if(pe in ve)return fe.value=pe,fe.done=!1,fe}return fe.done=!0,fe}};function Yt(ve){if(ve){var Se=ve[mt];if(Se)return Se.call(ve);if(typeof ve.next=="function")return ve;if(!isNaN(ve.length)){var be=-1,fe=function pe(){for(;++be<ve.length;)if(bt.call(ve,be))return pe.value=ve[be],pe.done=!1,pe;return pe.value=St,pe.done=!0,pe};return fe.next=fe}}return{next:ne}}gt.values=Yt;function ne(){return{value:St,done:!0}}return Pe.prototype={constructor:Pe,reset:function(ve){if(this.prev=0,this.next=0,this.sent=this._sent=St,this.done=!1,this.delegate=null,this.method="next",this.arg=St,this.tryEntries.forEach(ce),!ve)for(var Se in this)Se.charAt(0)==="t"&&bt.call(this,Se)&&!isNaN(+Se.slice(1))&&(this[Se]=St)},stop:function(){this.done=!0;var ve=this.tryEntries[0],Se=ve.completion;if(Se.type==="throw")throw Se.arg;return this.rval},dispatchException:function(ve){if(this.done)throw ve;var Se=this;function be(ye,Ne){return he.type="throw",he.arg=ve,Se.next=ye,Ne&&(Se.method="next",Se.arg=St),!!Ne}for(var fe=this.tryEntries.length-1;fe>=0;--fe){var pe=this.tryEntries[fe],he=pe.completion;if(pe.tryLoc==="root")return be("end");if(pe.tryLoc<=this.prev){var Ce=bt.call(pe,"catchLoc"),de=bt.call(pe,"finallyLoc");if(Ce&&de){if(this.prev<pe.catchLoc)return be(pe.catchLoc,!0);if(this.prev<pe.finallyLoc)return be(pe.finallyLoc)}else if(Ce){if(this.prev<pe.catchLoc)return be(pe.catchLoc,!0)}else if(de){if(this.prev<pe.finallyLoc)return be(pe.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(ve,Se){for(var be=this.tryEntries.length-1;be>=0;--be){var fe=this.tryEntries[be];if(fe.tryLoc<=this.prev&&bt.call(fe,"finallyLoc")&&this.prev<fe.finallyLoc){var pe=fe;break}}pe&&(ve==="break"||ve==="continue")&&pe.tryLoc<=Se&&Se<=pe.finallyLoc&&(pe=null);var he=pe?pe.completion:{};return he.type=ve,he.arg=Se,pe?(this.method="next",this.next=pe.finallyLoc,Pt):this.complete(he)},complete:function(ve,Se){if(ve.type==="throw")throw ve.arg;return ve.type==="break"||ve.type==="continue"?this.next=ve.arg:ve.type==="return"?(this.rval=this.arg=ve.arg,this.method="return",this.next="end"):ve.type==="normal"&&Se&&(this.next=Se),Pt},finish:function(ve){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var be=this.tryEntries[Se];if(be.finallyLoc===ve)return this.complete(be.completion,be.afterLoc),ce(be),Pt}},catch:function(ve){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var be=this.tryEntries[Se];if(be.tryLoc===ve){var fe=be.completion;if(fe.type==="throw"){var pe=fe.arg;ce(be)}return pe}}throw new Error("illegal catch attempt")},delegateYield:function(ve,Se,be){return this.delegate={iterator:Yt(ve),resultName:Se,nextLoc:be},this.method==="next"&&(this.arg=St),Pt}},gt}(typeof _t=="object"?_t.exports:{});try{regeneratorRuntime=vt}catch(gt){typeof globalThis=="object"?globalThis.regeneratorRuntime=vt:Function("r","regeneratorRuntime = r")(vt)}},{}],396:[function(ot,_t,Bt){var vt=ot("buffer"),gt=vt.Buffer;function kt(St,Tt){for(var mt in St)Tt[mt]=St[mt]}gt.from&>.alloc&>.allocUnsafe&>.allocUnsafeSlow?_t.exports=vt:(kt(vt,Bt),Bt.Buffer=bt);function bt(St,Tt,mt){return gt(St,Tt,mt)}kt(gt,bt),bt.from=function(St,Tt,mt){if(typeof St=="number")throw new TypeError("Argument must not be a number");return gt(St,Tt,mt)},bt.alloc=function(St,Tt,mt){if(typeof St!="number")throw new TypeError("Argument must be a number");var xt=gt(St);return Tt!==void 0?typeof mt=="string"?xt.fill(Tt,mt):xt.fill(Tt):xt.fill(0),xt},bt.allocUnsafe=function(St){if(typeof St!="number")throw new TypeError("Argument must be a number");return gt(St)},bt.allocUnsafeSlow=function(St){if(typeof St!="number")throw new TypeError("Argument must be a number");return vt.SlowBuffer(St)}},{buffer:90}],397:[function(ot,_t,Bt){(function(vt){(function(){(function(gt){gt.parser=function(xe,re){return new bt(xe,re)},gt.SAXParser=bt,gt.SAXStream=tt,gt.createStream=z,gt.MAX_BUFFER_LENGTH=64*1024;var kt=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];gt.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function bt(xe,re){if(!(this instanceof bt))return new bt(xe,re);var Kt=this;Tt(Kt),Kt.q=Kt.c="",Kt.bufferCheckPosition=gt.MAX_BUFFER_LENGTH,Kt.opt=re||{},Kt.opt.lowercase=Kt.opt.lowercase||Kt.opt.lowercasetags,Kt.looseCase=Kt.opt.lowercase?"toLowerCase":"toUpperCase",Kt.tags=[],Kt.closed=Kt.closedRoot=Kt.sawRoot=!1,Kt.tag=Kt.error=null,Kt.strict=!!xe,Kt.noscript=!!(xe||Kt.opt.noscript),Kt.state=Ut.BEGIN,Kt.strictEntities=Kt.opt.strictEntities,Kt.ENTITIES=Kt.strictEntities?Object.create(gt.XML_ENTITIES):Object.create(gt.ENTITIES),Kt.attribList=[],Kt.opt.xmlns&&(Kt.ns=Object.create(dt)),Kt.trackPosition=Kt.opt.position!==!1,Kt.trackPosition&&(Kt.position=Kt.line=Kt.column=0),oe(Kt,"onready")}Object.create||(Object.create=function(xe){function re(){}re.prototype=xe;var Kt=new re;return Kt}),Object.keys||(Object.keys=function(xe){var re=[];for(var Kt in xe)xe.hasOwnProperty(Kt)&&re.push(Kt);return re});function St(xe){for(var re=Math.max(gt.MAX_BUFFER_LENGTH,10),Kt=0,wt=0,Lt=kt.length;wt<Lt;wt++){var Xt=xe[kt[wt]].length;if(Xt>re)switch(kt[wt]){case"textNode":ce(xe);break;case"cdata":se(xe,"oncdata",xe.cdata),xe.cdata="";break;case"script":se(xe,"onscript",xe.script),xe.script="";break;default:Yt(xe,"Max buffer length exceeded: "+kt[wt])}Kt=Math.max(Kt,Xt)}var ee=gt.MAX_BUFFER_LENGTH-Kt;xe.bufferCheckPosition=ee+xe.position}function Tt(xe){for(var re=0,Kt=kt.length;re<Kt;re++)xe[kt[re]]=""}function mt(xe){ce(xe),xe.cdata!==""&&(se(xe,"oncdata",xe.cdata),xe.cdata=""),xe.script!==""&&(se(xe,"onscript",xe.script),xe.script="")}bt.prototype={end:function(){ne(this)},write:Ne,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){mt(this)}};var xt;try{xt=ot("stream").Stream}catch(xe){xt=function(){}}var ft=gt.EVENTS.filter(function(xe){return xe!=="error"&&xe!=="end"});function z(xe,re){return new tt(xe,re)}function tt(xe,re){if(!(this instanceof tt))return new tt(xe,re);xt.apply(this),this._parser=new bt(xe,re),this.writable=!0,this.readable=!0;var Kt=this;this._parser.onend=function(){Kt.emit("end")},this._parser.onerror=function(wt){Kt.emit("error",wt),Kt._parser.error=null},this._decoder=null,ft.forEach(function(wt){Object.defineProperty(Kt,"on"+wt,{get:function(){return Kt._parser["on"+wt]},set:function(Lt){if(!Lt)return Kt.removeAllListeners(wt),Kt._parser["on"+wt]=Lt,Lt;Kt.on(wt,Lt)},enumerable:!0,configurable:!1})})}tt.prototype=Object.create(xt.prototype,{constructor:{value:tt}}),tt.prototype.write=function(xe){if(typeof vt=="function"&&typeof vt.isBuffer=="function"&&vt.isBuffer(xe)){if(!this._decoder){var re=ot("string_decoder").StringDecoder;this._decoder=new re("utf8")}xe=this._decoder.write(xe)}return this._parser.write(xe.toString()),this.emit("data",xe),!0},tt.prototype.end=function(xe){return xe&&xe.length&&this.write(xe),this._parser.end(),!0},tt.prototype.on=function(xe,re){var Kt=this;return!Kt._parser["on"+xe]&&ft.indexOf(xe)!==-1&&(Kt._parser["on"+xe]=function(){var wt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);wt.splice(0,0,xe),Kt.emit.apply(Kt,wt)}),xt.prototype.on.call(Kt,xe,re)};var at="[CDATA[",it="DOCTYPE",lt="http://www.w3.org/XML/1998/namespace",ut="http://www.w3.org/2000/xmlns/",dt={xml:lt,xmlns:ut},Pt=/[:_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]/,At=/[:_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-]/,Dt=/[#:_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]/,Ft=/[#:_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 Nt(xe){return xe===" "||xe===`
|
|
`||xe==="\r"||xe===" "}function jt(xe){return xe==='"'||xe==="'"}function Gt(xe){return xe===">"||Nt(xe)}function Wt(xe,re){return xe.test(re)}function Jt(xe,re){return!Wt(xe,re)}var Ut=0;gt.STATE={BEGIN:Ut++,BEGIN_WHITESPACE:Ut++,TEXT:Ut++,TEXT_ENTITY:Ut++,OPEN_WAKA:Ut++,SGML_DECL:Ut++,SGML_DECL_QUOTED:Ut++,DOCTYPE:Ut++,DOCTYPE_QUOTED:Ut++,DOCTYPE_DTD:Ut++,DOCTYPE_DTD_QUOTED:Ut++,COMMENT_STARTING:Ut++,COMMENT:Ut++,COMMENT_ENDING:Ut++,COMMENT_ENDED:Ut++,CDATA:Ut++,CDATA_ENDING:Ut++,CDATA_ENDING_2:Ut++,PROC_INST:Ut++,PROC_INST_BODY:Ut++,PROC_INST_ENDING:Ut++,OPEN_TAG:Ut++,OPEN_TAG_SLASH:Ut++,ATTRIB:Ut++,ATTRIB_NAME:Ut++,ATTRIB_NAME_SAW_WHITE:Ut++,ATTRIB_VALUE:Ut++,ATTRIB_VALUE_QUOTED:Ut++,ATTRIB_VALUE_CLOSED:Ut++,ATTRIB_VALUE_UNQUOTED:Ut++,ATTRIB_VALUE_ENTITY_Q:Ut++,ATTRIB_VALUE_ENTITY_U:Ut++,CLOSE_TAG:Ut++,CLOSE_TAG_SAW_WHITE:Ut++,SCRIPT:Ut++,SCRIPT_ENDING:Ut++},gt.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},gt.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(gt.ENTITIES).forEach(function(xe){var re=gt.ENTITIES[xe],Kt=typeof re=="number"?String.fromCharCode(re):re;gt.ENTITIES[xe]=Kt});for(var Ht in gt.STATE)gt.STATE[gt.STATE[Ht]]=Ht;Ut=gt.STATE;function oe(xe,re,Kt){xe[re]&&xe[re](Kt)}function se(xe,re,Kt){xe.textNode&&ce(xe),oe(xe,re,Kt)}function ce(xe){xe.textNode=Pe(xe.opt,xe.textNode),xe.textNode&&oe(xe,"ontext",xe.textNode),xe.textNode=""}function Pe(xe,re){return xe.trim&&(re=re.trim()),xe.normalize&&(re=re.replace(/\s+/g," ")),re}function Yt(xe,re){return ce(xe),xe.trackPosition&&(re+=`
|
|
Line: `+xe.line+`
|
|
Column: `+xe.column+`
|
|
Char: `+xe.c),re=new Error(re),xe.error=re,oe(xe,"onerror",re),xe}function ne(xe){return xe.sawRoot&&!xe.closedRoot&&ve(xe,"Unclosed root tag"),xe.state!==Ut.BEGIN&&xe.state!==Ut.BEGIN_WHITESPACE&&xe.state!==Ut.TEXT&&Yt(xe,"Unexpected end"),ce(xe),xe.c="",xe.closed=!0,oe(xe,"onend"),bt.call(xe,xe.strict,xe.opt),xe}function ve(xe,re){if(typeof xe!="object"||!(xe instanceof bt))throw new Error("bad call to strictFail");xe.strict&&Yt(xe,re)}function Se(xe){xe.strict||(xe.tagName=xe.tagName[xe.looseCase]());var re=xe.tags[xe.tags.length-1]||xe,Kt=xe.tag={name:xe.tagName,attributes:{}};xe.opt.xmlns&&(Kt.ns=re.ns),xe.attribList.length=0,se(xe,"onopentagstart",Kt)}function be(xe,re){var Kt=xe.indexOf(":"),wt=Kt<0?["",xe]:xe.split(":"),Lt=wt[0],Xt=wt[1];return re&&xe==="xmlns"&&(Lt="xmlns",Xt=""),{prefix:Lt,local:Xt}}function fe(xe){if(xe.strict||(xe.attribName=xe.attribName[xe.looseCase]()),xe.attribList.indexOf(xe.attribName)!==-1||xe.tag.attributes.hasOwnProperty(xe.attribName)){xe.attribName=xe.attribValue="";return}if(xe.opt.xmlns){var re=be(xe.attribName,!0),Kt=re.prefix,wt=re.local;if(Kt==="xmlns")if(wt==="xml"&&xe.attribValue!==lt)ve(xe,"xml: prefix must be bound to "+lt+`
|
|
Actual: `+xe.attribValue);else if(wt==="xmlns"&&xe.attribValue!==ut)ve(xe,"xmlns: prefix must be bound to "+ut+`
|
|
Actual: `+xe.attribValue);else{var Lt=xe.tag,Xt=xe.tags[xe.tags.length-1]||xe;Lt.ns===Xt.ns&&(Lt.ns=Object.create(Xt.ns)),Lt.ns[wt]=xe.attribValue}xe.attribList.push([xe.attribName,xe.attribValue])}else xe.tag.attributes[xe.attribName]=xe.attribValue,se(xe,"onattribute",{name:xe.attribName,value:xe.attribValue});xe.attribName=xe.attribValue=""}function pe(xe,re){if(xe.opt.xmlns){var Kt=xe.tag,wt=be(xe.tagName);Kt.prefix=wt.prefix,Kt.local=wt.local,Kt.uri=Kt.ns[wt.prefix]||"",Kt.prefix&&!Kt.uri&&(ve(xe,"Unbound namespace prefix: "+JSON.stringify(xe.tagName)),Kt.uri=wt.prefix);var Lt=xe.tags[xe.tags.length-1]||xe;Kt.ns&&Lt.ns!==Kt.ns&&Object.keys(Kt.ns).forEach(function(Be){se(xe,"onopennamespace",{prefix:Be,uri:Kt.ns[Be]})});for(var Xt=0,ee=xe.attribList.length;Xt<ee;Xt++){var It=xe.attribList[Xt],Rt=It[0],Vt=It[1],$t=be(Rt,!0),ue=$t.prefix,ge=$t.local,Me=ue===""?"":Kt.ns[ue]||"",Ae={name:Rt,value:Vt,prefix:ue,local:ge,uri:Me};ue&&ue!=="xmlns"&&!Me&&(ve(xe,"Unbound namespace prefix: "+JSON.stringify(ue)),Ae.uri=ue),xe.tag.attributes[Rt]=Ae,se(xe,"onattribute",Ae)}xe.attribList.length=0}xe.tag.isSelfClosing=!!re,xe.sawRoot=!0,xe.tags.push(xe.tag),se(xe,"onopentag",xe.tag),re||(!xe.noscript&&xe.tagName.toLowerCase()==="script"?xe.state=Ut.SCRIPT:xe.state=Ut.TEXT,xe.tag=null,xe.tagName=""),xe.attribName=xe.attribValue="",xe.attribList.length=0}function he(xe){if(!xe.tagName){ve(xe,"Weird empty close tag."),xe.textNode+="</>",xe.state=Ut.TEXT;return}if(xe.script){if(xe.tagName!=="script"){xe.script+="</"+xe.tagName+">",xe.tagName="",xe.state=Ut.SCRIPT;return}se(xe,"onscript",xe.script),xe.script=""}var re=xe.tags.length,Kt=xe.tagName;xe.strict||(Kt=Kt[xe.looseCase]());for(var wt=Kt;re--;){var Lt=xe.tags[re];if(Lt.name!==wt)ve(xe,"Unexpected close tag");else break}if(re<0){ve(xe,"Unmatched closing tag: "+xe.tagName),xe.textNode+="</"+xe.tagName+">",xe.state=Ut.TEXT;return}xe.tagName=Kt;for(var Xt=xe.tags.length;Xt-- >re;){var ee=xe.tag=xe.tags.pop();xe.tagName=xe.tag.name,se(xe,"onclosetag",xe.tagName);var It={};for(var Rt in ee.ns)It[Rt]=ee.ns[Rt];var Vt=xe.tags[xe.tags.length-1]||xe;xe.opt.xmlns&&ee.ns!==Vt.ns&&Object.keys(ee.ns).forEach(function($t){var ue=ee.ns[$t];se(xe,"onclosenamespace",{prefix:$t,uri:ue})})}re===0&&(xe.closedRoot=!0),xe.tagName=xe.attribValue=xe.attribName="",xe.attribList.length=0,xe.state=Ut.TEXT}function Ce(xe){var re=xe.entity,Kt=re.toLowerCase(),wt,Lt="";return xe.ENTITIES[re]?xe.ENTITIES[re]:xe.ENTITIES[Kt]?xe.ENTITIES[Kt]:(re=Kt,re.charAt(0)==="#"&&(re.charAt(1)==="x"?(re=re.slice(2),wt=parseInt(re,16),Lt=wt.toString(16)):(re=re.slice(1),wt=parseInt(re,10),Lt=wt.toString(10))),re=re.replace(/^0+/,""),isNaN(wt)||Lt.toLowerCase()!==re?(ve(xe,"Invalid character entity"),"&"+xe.entity+";"):String.fromCodePoint(wt))}function de(xe,re){re==="<"?(xe.state=Ut.OPEN_WAKA,xe.startTagPosition=xe.position):Nt(re)||(ve(xe,"Non-whitespace before first tag."),xe.textNode=re,xe.state=Ut.TEXT)}function ye(xe,re){var Kt="";return re<xe.length&&(Kt=xe.charAt(re)),Kt}function Ne(xe){var re=this;if(this.error)throw this.error;if(re.closed)return Yt(re,"Cannot write after close. Assign an onready handler.");if(xe===null)return ne(re);typeof xe=="object"&&(xe=xe.toString());for(var Kt=0,wt="";wt=ye(xe,Kt++),re.c=wt,!!wt;)switch(re.trackPosition&&(re.position++,wt===`
|
|
`?(re.line++,re.column=0):re.column++),re.state){case Ut.BEGIN:if(re.state=Ut.BEGIN_WHITESPACE,wt==="\uFEFF")continue;de(re,wt);continue;case Ut.BEGIN_WHITESPACE:de(re,wt);continue;case Ut.TEXT:if(re.sawRoot&&!re.closedRoot){for(var Lt=Kt-1;wt&&wt!=="<"&&wt!=="&";)wt=ye(xe,Kt++),wt&&re.trackPosition&&(re.position++,wt===`
|
|
`?(re.line++,re.column=0):re.column++);re.textNode+=xe.substring(Lt,Kt-1)}wt==="<"&&!(re.sawRoot&&re.closedRoot&&!re.strict)?(re.state=Ut.OPEN_WAKA,re.startTagPosition=re.position):(!Nt(wt)&&(!re.sawRoot||re.closedRoot)&&ve(re,"Text data outside of root node."),wt==="&"?re.state=Ut.TEXT_ENTITY:re.textNode+=wt);continue;case Ut.SCRIPT:wt==="<"?re.state=Ut.SCRIPT_ENDING:re.script+=wt;continue;case Ut.SCRIPT_ENDING:wt==="/"?re.state=Ut.CLOSE_TAG:(re.script+="<"+wt,re.state=Ut.SCRIPT);continue;case Ut.OPEN_WAKA:if(wt==="!")re.state=Ut.SGML_DECL,re.sgmlDecl="";else if(!Nt(wt))if(Wt(Pt,wt))re.state=Ut.OPEN_TAG,re.tagName=wt;else if(wt==="/")re.state=Ut.CLOSE_TAG,re.tagName="";else if(wt==="?")re.state=Ut.PROC_INST,re.procInstName=re.procInstBody="";else{if(ve(re,"Unencoded <"),re.startTagPosition+1<re.position){var Xt=re.position-re.startTagPosition;wt=new Array(Xt).join(" ")+wt}re.textNode+="<"+wt,re.state=Ut.TEXT}continue;case Ut.SGML_DECL:(re.sgmlDecl+wt).toUpperCase()===at?(se(re,"onopencdata"),re.state=Ut.CDATA,re.sgmlDecl="",re.cdata=""):re.sgmlDecl+wt==="--"?(re.state=Ut.COMMENT,re.comment="",re.sgmlDecl=""):(re.sgmlDecl+wt).toUpperCase()===it?(re.state=Ut.DOCTYPE,(re.doctype||re.sawRoot)&&ve(re,"Inappropriately located doctype declaration"),re.doctype="",re.sgmlDecl=""):wt===">"?(se(re,"onsgmldeclaration",re.sgmlDecl),re.sgmlDecl="",re.state=Ut.TEXT):(jt(wt)&&(re.state=Ut.SGML_DECL_QUOTED),re.sgmlDecl+=wt);continue;case Ut.SGML_DECL_QUOTED:wt===re.q&&(re.state=Ut.SGML_DECL,re.q=""),re.sgmlDecl+=wt;continue;case Ut.DOCTYPE:wt===">"?(re.state=Ut.TEXT,se(re,"ondoctype",re.doctype),re.doctype=!0):(re.doctype+=wt,wt==="["?re.state=Ut.DOCTYPE_DTD:jt(wt)&&(re.state=Ut.DOCTYPE_QUOTED,re.q=wt));continue;case Ut.DOCTYPE_QUOTED:re.doctype+=wt,wt===re.q&&(re.q="",re.state=Ut.DOCTYPE);continue;case Ut.DOCTYPE_DTD:re.doctype+=wt,wt==="]"?re.state=Ut.DOCTYPE:jt(wt)&&(re.state=Ut.DOCTYPE_DTD_QUOTED,re.q=wt);continue;case Ut.DOCTYPE_DTD_QUOTED:re.doctype+=wt,wt===re.q&&(re.state=Ut.DOCTYPE_DTD,re.q="");continue;case Ut.COMMENT:wt==="-"?re.state=Ut.COMMENT_ENDING:re.comment+=wt;continue;case Ut.COMMENT_ENDING:wt==="-"?(re.state=Ut.COMMENT_ENDED,re.comment=Pe(re.opt,re.comment),re.comment&&se(re,"oncomment",re.comment),re.comment=""):(re.comment+="-"+wt,re.state=Ut.COMMENT);continue;case Ut.COMMENT_ENDED:wt!==">"?(ve(re,"Malformed comment"),re.comment+="--"+wt,re.state=Ut.COMMENT):re.state=Ut.TEXT;continue;case Ut.CDATA:wt==="]"?re.state=Ut.CDATA_ENDING:re.cdata+=wt;continue;case Ut.CDATA_ENDING:wt==="]"?re.state=Ut.CDATA_ENDING_2:(re.cdata+="]"+wt,re.state=Ut.CDATA);continue;case Ut.CDATA_ENDING_2:wt===">"?(re.cdata&&se(re,"oncdata",re.cdata),se(re,"onclosecdata"),re.cdata="",re.state=Ut.TEXT):wt==="]"?re.cdata+="]":(re.cdata+="]]"+wt,re.state=Ut.CDATA);continue;case Ut.PROC_INST:wt==="?"?re.state=Ut.PROC_INST_ENDING:Nt(wt)?re.state=Ut.PROC_INST_BODY:re.procInstName+=wt;continue;case Ut.PROC_INST_BODY:if(!re.procInstBody&&Nt(wt))continue;wt==="?"?re.state=Ut.PROC_INST_ENDING:re.procInstBody+=wt;continue;case Ut.PROC_INST_ENDING:wt===">"?(se(re,"onprocessinginstruction",{name:re.procInstName,body:re.procInstBody}),re.procInstName=re.procInstBody="",re.state=Ut.TEXT):(re.procInstBody+="?"+wt,re.state=Ut.PROC_INST_BODY);continue;case Ut.OPEN_TAG:Wt(At,wt)?re.tagName+=wt:(Se(re),wt===">"?pe(re):wt==="/"?re.state=Ut.OPEN_TAG_SLASH:(Nt(wt)||ve(re,"Invalid character in tag name"),re.state=Ut.ATTRIB));continue;case Ut.OPEN_TAG_SLASH:wt===">"?(pe(re,!0),he(re)):(ve(re,"Forward-slash in opening tag not followed by >"),re.state=Ut.ATTRIB);continue;case Ut.ATTRIB:if(Nt(wt))continue;wt===">"?pe(re):wt==="/"?re.state=Ut.OPEN_TAG_SLASH:Wt(Pt,wt)?(re.attribName=wt,re.attribValue="",re.state=Ut.ATTRIB_NAME):ve(re,"Invalid attribute name");continue;case Ut.ATTRIB_NAME:wt==="="?re.state=Ut.ATTRIB_VALUE:wt===">"?(ve(re,"Attribute without value"),re.attribValue=re.attribName,fe(re),pe(re)):Nt(wt)?re.state=Ut.ATTRIB_NAME_SAW_WHITE:Wt(At,wt)?re.attribName+=wt:ve(re,"Invalid attribute name");continue;case Ut.ATTRIB_NAME_SAW_WHITE:if(wt==="=")re.state=Ut.ATTRIB_VALUE;else{if(Nt(wt))continue;ve(re,"Attribute without value"),re.tag.attributes[re.attribName]="",re.attribValue="",se(re,"onattribute",{name:re.attribName,value:""}),re.attribName="",wt===">"?pe(re):Wt(Pt,wt)?(re.attribName=wt,re.state=Ut.ATTRIB_NAME):(ve(re,"Invalid attribute name"),re.state=Ut.ATTRIB)}continue;case Ut.ATTRIB_VALUE:if(Nt(wt))continue;jt(wt)?(re.q=wt,re.state=Ut.ATTRIB_VALUE_QUOTED):(ve(re,"Unquoted attribute value"),re.state=Ut.ATTRIB_VALUE_UNQUOTED,re.attribValue=wt);continue;case Ut.ATTRIB_VALUE_QUOTED:if(wt!==re.q){wt==="&"?re.state=Ut.ATTRIB_VALUE_ENTITY_Q:re.attribValue+=wt;continue}fe(re),re.q="",re.state=Ut.ATTRIB_VALUE_CLOSED;continue;case Ut.ATTRIB_VALUE_CLOSED:Nt(wt)?re.state=Ut.ATTRIB:wt===">"?pe(re):wt==="/"?re.state=Ut.OPEN_TAG_SLASH:Wt(Pt,wt)?(ve(re,"No whitespace between attributes"),re.attribName=wt,re.attribValue="",re.state=Ut.ATTRIB_NAME):ve(re,"Invalid attribute name");continue;case Ut.ATTRIB_VALUE_UNQUOTED:if(!Gt(wt)){wt==="&"?re.state=Ut.ATTRIB_VALUE_ENTITY_U:re.attribValue+=wt;continue}fe(re),wt===">"?pe(re):re.state=Ut.ATTRIB;continue;case Ut.CLOSE_TAG:if(re.tagName)wt===">"?he(re):Wt(At,wt)?re.tagName+=wt:re.script?(re.script+="</"+re.tagName,re.tagName="",re.state=Ut.SCRIPT):(Nt(wt)||ve(re,"Invalid tagname in closing tag"),re.state=Ut.CLOSE_TAG_SAW_WHITE);else{if(Nt(wt))continue;Jt(Pt,wt)?re.script?(re.script+="</"+wt,re.state=Ut.SCRIPT):ve(re,"Invalid tagname in closing tag."):re.tagName=wt}continue;case Ut.CLOSE_TAG_SAW_WHITE:if(Nt(wt))continue;wt===">"?he(re):ve(re,"Invalid characters in closing tag");continue;case Ut.TEXT_ENTITY:case Ut.ATTRIB_VALUE_ENTITY_Q:case Ut.ATTRIB_VALUE_ENTITY_U:var ee,It;switch(re.state){case Ut.TEXT_ENTITY:ee=Ut.TEXT,It="textNode";break;case Ut.ATTRIB_VALUE_ENTITY_Q:ee=Ut.ATTRIB_VALUE_QUOTED,It="attribValue";break;case Ut.ATTRIB_VALUE_ENTITY_U:ee=Ut.ATTRIB_VALUE_UNQUOTED,It="attribValue";break}wt===";"?(re[It]+=Ce(re),re.entity="",re.state=ee):Wt(re.entity.length?Ft:Dt,wt)?re.entity+=wt:(ve(re,"Invalid character in entity name"),re[It]+="&"+re.entity+wt,re.entity="",re.state=ee);continue;default:throw new Error(re,"Unknown state: "+re.state)}return re.position>=re.bufferCheckPosition&&St(re),re}String.fromCodePoint||function(){var xe=String.fromCharCode,re=Math.floor,Kt=function(){var wt=16384,Lt=[],Xt,ee,It=-1,Rt=arguments.length;if(!Rt)return"";for(var Vt="";++It<Rt;){var $t=Number(arguments[It]);if(!isFinite($t)||$t<0||$t>1114111||re($t)!==$t)throw RangeError("Invalid code point: "+$t);$t<=65535?Lt.push($t):($t-=65536,Xt=($t>>10)+55296,ee=$t%1024+56320,Lt.push(Xt,ee)),(It+1===Rt||Lt.length>wt)&&(Vt+=xe.apply(null,Lt),Lt.length=0)}return Vt};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Kt,configurable:!0,writable:!0}):String.fromCodePoint=Kt}()})(typeof Bt=="undefined"?this.sax={}:Bt)}).call(this)}).call(this,ot("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(ot,_t,Bt){_t.exports=kt;var vt=ot("events").EventEmitter,gt=ot("inherits");gt(kt,vt),kt.Readable=ot("readable-stream/lib/_stream_readable.js"),kt.Writable=ot("readable-stream/lib/_stream_writable.js"),kt.Duplex=ot("readable-stream/lib/_stream_duplex.js"),kt.Transform=ot("readable-stream/lib/_stream_transform.js"),kt.PassThrough=ot("readable-stream/lib/_stream_passthrough.js"),kt.finished=ot("readable-stream/lib/internal/streams/end-of-stream.js"),kt.pipeline=ot("readable-stream/lib/internal/streams/pipeline.js"),kt.Stream=kt;function kt(){vt.call(this)}kt.prototype.pipe=function(bt,St){var Tt=this;function mt(lt){bt.writable&&bt.write(lt)===!1&&Tt.pause&&Tt.pause()}Tt.on("data",mt);function xt(){Tt.readable&&Tt.resume&&Tt.resume()}bt.on("drain",xt),!bt._isStdio&&(!St||St.end!==!1)&&(Tt.on("end",z),Tt.on("close",tt));var ft=!1;function z(){ft||(ft=!0,bt.end())}function tt(){ft||(ft=!0,typeof bt.destroy=="function"&&bt.destroy())}function at(lt){if(it(),vt.listenerCount(this,"error")===0)throw lt}Tt.on("error",at),bt.on("error",at);function it(){Tt.removeListener("data",mt),bt.removeListener("drain",xt),Tt.removeListener("end",z),Tt.removeListener("close",tt),Tt.removeListener("error",at),bt.removeListener("error",at),Tt.removeListener("end",it),Tt.removeListener("close",it),bt.removeListener("close",it)}return Tt.on("end",it),Tt.on("close",it),bt.on("close",it),bt.emit("pipe",Tt),bt}},{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(ot,_t,Bt){"use strict";function vt(xt,ft){xt.prototype=Object.create(ft.prototype),xt.prototype.constructor=xt,xt.__proto__=ft}var gt={};function kt(xt,ft,z){z||(z=Error);function tt(it,lt,ut){return typeof ft=="string"?ft:ft(it,lt,ut)}var at=function(it){vt(lt,it);function lt(ut,dt,Pt){return it.call(this,tt(ut,dt,Pt))||this}return lt}(z);at.prototype.name=z.name,at.prototype.code=xt,gt[xt]=at}function bt(xt,ft){if(Array.isArray(xt)){var z=xt.length;return xt=xt.map(function(tt){return String(tt)}),z>2?"one of ".concat(ft," ").concat(xt.slice(0,z-1).join(", "),", or ")+xt[z-1]:z===2?"one of ".concat(ft," ").concat(xt[0]," or ").concat(xt[1]):"of ".concat(ft," ").concat(xt[0])}else return"of ".concat(ft," ").concat(String(xt))}function St(xt,ft,z){return xt.substr(!z||z<0?0:+z,ft.length)===ft}function Tt(xt,ft,z){return(z===void 0||z>xt.length)&&(z=xt.length),xt.substring(z-ft.length,z)===ft}function mt(xt,ft,z){return typeof z!="number"&&(z=0),z+ft.length>xt.length?!1:xt.indexOf(ft,z)!==-1}kt("ERR_INVALID_OPT_VALUE",function(xt,ft){return'The value "'+ft+'" is invalid for option "'+xt+'"'},TypeError),kt("ERR_INVALID_ARG_TYPE",function(xt,ft,z){var tt;typeof ft=="string"&&St(ft,"not ")?(tt="must not be",ft=ft.replace(/^not /,"")):tt="must be";var at;if(Tt(xt," argument"))at="The ".concat(xt," ").concat(tt," ").concat(bt(ft,"type"));else{var it=mt(xt,".")?"property":"argument";at='The "'.concat(xt,'" ').concat(it," ").concat(tt," ").concat(bt(ft,"type"))}return at+=". Received type ".concat(typeof z),at},TypeError),kt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),kt("ERR_METHOD_NOT_IMPLEMENTED",function(xt){return"The "+xt+" method is not implemented"}),kt("ERR_STREAM_PREMATURE_CLOSE","Premature close"),kt("ERR_STREAM_DESTROYED",function(xt){return"Cannot call "+xt+" after a stream was destroyed"}),kt("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),kt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),kt("ERR_STREAM_WRITE_AFTER_END","write after end"),kt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),kt("ERR_UNKNOWN_ENCODING",function(xt){return"Unknown encoding: "+xt},TypeError),kt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),_t.exports.codes=gt},{}],400:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=Object.keys||function(tt){var at=[];for(var it in tt)at.push(it);return at};_t.exports=xt;var kt=ot("./_stream_readable"),bt=ot("./_stream_writable");ot("inherits")(xt,kt);for(var St=gt(bt.prototype),Tt=0;Tt<St.length;Tt++){var mt=St[Tt];xt.prototype[mt]||(xt.prototype[mt]=bt.prototype[mt])}function xt(tt){if(!(this instanceof xt))return new xt(tt);kt.call(this,tt),bt.call(this,tt),this.allowHalfOpen=!0,tt&&(tt.readable===!1&&(this.readable=!1),tt.writable===!1&&(this.writable=!1),tt.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",ft)))}Object.defineProperty(xt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(xt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(xt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ft(){this._writableState.ended||vt.nextTick(z,this)}function z(tt){tt.end()}Object.defineProperty(xt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(at){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=at,this._writableState.destroyed=at)}})}).call(this)}).call(this,ot("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(ot,_t,Bt){"use strict";_t.exports=gt;var vt=ot("./_stream_transform");ot("inherits")(gt,vt);function gt(kt){if(!(this instanceof gt))return new gt(kt);vt.call(this,kt)}gt.prototype._transform=function(kt,bt,St){St(null,kt)}},{"./_stream_transform":403,inherits:364}],402:[function(ot,_t,Bt){(function(vt,gt){(function(){"use strict";_t.exports=se;var kt;se.ReadableState=oe;var bt=ot("events").EventEmitter,St=function(Rt,Vt){return Rt.listeners(Vt).length},Tt=ot("./internal/streams/stream"),mt=ot("buffer").Buffer,xt=(typeof gt!="undefined"?gt:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function ft(It){return mt.from(It)}function z(It){return mt.isBuffer(It)||It instanceof xt}var tt=ot("util"),at;tt&&tt.debuglog?at=tt.debuglog("stream"):at=function(){};var it=ot("./internal/streams/buffer_list"),lt=ot("./internal/streams/destroy"),ut=ot("./internal/streams/state"),dt=ut.getHighWaterMark,Pt=ot("../errors").codes,At=Pt.ERR_INVALID_ARG_TYPE,Dt=Pt.ERR_STREAM_PUSH_AFTER_EOF,Ft=Pt.ERR_METHOD_NOT_IMPLEMENTED,Nt=Pt.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,jt,Gt,Wt;ot("inherits")(se,Tt);var Jt=lt.errorOrDestroy,Ut=["error","close","destroy","pause","resume"];function Ht(It,Rt,Vt){if(typeof It.prependListener=="function")return It.prependListener(Rt,Vt);!It._events||!It._events[Rt]?It.on(Rt,Vt):Array.isArray(It._events[Rt])?It._events[Rt].unshift(Vt):It._events[Rt]=[Vt,It._events[Rt]]}function oe(It,Rt,Vt){kt=kt||ot("./_stream_duplex"),It=It||{},typeof Vt!="boolean"&&(Vt=Rt instanceof kt),this.objectMode=!!It.objectMode,Vt&&(this.objectMode=this.objectMode||!!It.readableObjectMode),this.highWaterMark=dt(this,It,"readableHighWaterMark",Vt),this.buffer=new it,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=It.emitClose!==!1,this.autoDestroy=!!It.autoDestroy,this.destroyed=!1,this.defaultEncoding=It.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,It.encoding&&(jt||(jt=ot("string_decoder/").StringDecoder),this.decoder=new jt(It.encoding),this.encoding=It.encoding)}function se(It){if(kt=kt||ot("./_stream_duplex"),!(this instanceof se))return new se(It);var Rt=this instanceof kt;this._readableState=new oe(It,this,Rt),this.readable=!0,It&&(typeof It.read=="function"&&(this._read=It.read),typeof It.destroy=="function"&&(this._destroy=It.destroy)),Tt.call(this)}Object.defineProperty(se.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Rt){this._readableState&&(this._readableState.destroyed=Rt)}}),se.prototype.destroy=lt.destroy,se.prototype._undestroy=lt.undestroy,se.prototype._destroy=function(It,Rt){Rt(It)},se.prototype.push=function(It,Rt){var Vt=this._readableState,$t;return Vt.objectMode?$t=!0:typeof It=="string"&&(Rt=Rt||Vt.defaultEncoding,Rt!==Vt.encoding&&(It=mt.from(It,Rt),Rt=""),$t=!0),ce(this,It,Rt,!1,$t)},se.prototype.unshift=function(It){return ce(this,It,null,!0,!1)};function ce(It,Rt,Vt,$t,ue){at("readableAddChunk",Rt);var ge=It._readableState;if(Rt===null)ge.reading=!1,be(It,ge);else{var Me;if(ue||(Me=Yt(ge,Rt)),Me)Jt(It,Me);else if(ge.objectMode||Rt&&Rt.length>0)if(typeof Rt!="string"&&!ge.objectMode&&Object.getPrototypeOf(Rt)!==mt.prototype&&(Rt=ft(Rt)),$t)ge.endEmitted?Jt(It,new Nt):Pe(It,ge,Rt,!0);else if(ge.ended)Jt(It,new Dt);else{if(ge.destroyed)return!1;ge.reading=!1,ge.decoder&&!Vt?(Rt=ge.decoder.write(Rt),ge.objectMode||Rt.length!==0?Pe(It,ge,Rt,!1):he(It,ge)):Pe(It,ge,Rt,!1)}else $t||(ge.reading=!1,he(It,ge))}return!ge.ended&&(ge.length<ge.highWaterMark||ge.length===0)}function Pe(It,Rt,Vt,$t){Rt.flowing&&Rt.length===0&&!Rt.sync?(Rt.awaitDrain=0,It.emit("data",Vt)):(Rt.length+=Rt.objectMode?1:Vt.length,$t?Rt.buffer.unshift(Vt):Rt.buffer.push(Vt),Rt.needReadable&&fe(It)),he(It,Rt)}function Yt(It,Rt){var Vt;return!z(Rt)&&typeof Rt!="string"&&Rt!==void 0&&!It.objectMode&&(Vt=new At("chunk",["string","Buffer","Uint8Array"],Rt)),Vt}se.prototype.isPaused=function(){return this._readableState.flowing===!1},se.prototype.setEncoding=function(It){jt||(jt=ot("string_decoder/").StringDecoder);var Rt=new jt(It);this._readableState.decoder=Rt,this._readableState.encoding=this._readableState.decoder.encoding;for(var Vt=this._readableState.buffer.head,$t="";Vt!==null;)$t+=Rt.write(Vt.data),Vt=Vt.next;return this._readableState.buffer.clear(),$t!==""&&this._readableState.buffer.push($t),this._readableState.length=$t.length,this};var ne=1073741824;function ve(It){return It>=ne?It=ne:(It--,It|=It>>>1,It|=It>>>2,It|=It>>>4,It|=It>>>8,It|=It>>>16,It++),It}function Se(It,Rt){return It<=0||Rt.length===0&&Rt.ended?0:Rt.objectMode?1:It!==It?Rt.flowing&&Rt.length?Rt.buffer.head.data.length:Rt.length:(It>Rt.highWaterMark&&(Rt.highWaterMark=ve(It)),It<=Rt.length?It:Rt.ended?Rt.length:(Rt.needReadable=!0,0))}se.prototype.read=function(It){at("read",It),It=parseInt(It,10);var Rt=this._readableState,Vt=It;if(It!==0&&(Rt.emittedReadable=!1),It===0&&Rt.needReadable&&((Rt.highWaterMark!==0?Rt.length>=Rt.highWaterMark:Rt.length>0)||Rt.ended))return at("read: emitReadable",Rt.length,Rt.ended),Rt.length===0&&Rt.ended?Lt(this):fe(this),null;if(It=Se(It,Rt),It===0&&Rt.ended)return Rt.length===0&&Lt(this),null;var $t=Rt.needReadable;at("need readable",$t),(Rt.length===0||Rt.length-It<Rt.highWaterMark)&&($t=!0,at("length less than watermark",$t)),Rt.ended||Rt.reading?($t=!1,at("reading or ended",$t)):$t&&(at("do read"),Rt.reading=!0,Rt.sync=!0,Rt.length===0&&(Rt.needReadable=!0),this._read(Rt.highWaterMark),Rt.sync=!1,Rt.reading||(It=Se(Vt,Rt)));var ue;return It>0?ue=wt(It,Rt):ue=null,ue===null?(Rt.needReadable=Rt.length<=Rt.highWaterMark,It=0):(Rt.length-=It,Rt.awaitDrain=0),Rt.length===0&&(Rt.ended||(Rt.needReadable=!0),Vt!==It&&Rt.ended&&Lt(this)),ue!==null&&this.emit("data",ue),ue};function be(It,Rt){if(at("onEofChunk"),!Rt.ended){if(Rt.decoder){var Vt=Rt.decoder.end();Vt&&Vt.length&&(Rt.buffer.push(Vt),Rt.length+=Rt.objectMode?1:Vt.length)}Rt.ended=!0,Rt.sync?fe(It):(Rt.needReadable=!1,Rt.emittedReadable||(Rt.emittedReadable=!0,pe(It)))}}function fe(It){var Rt=It._readableState;at("emitReadable",Rt.needReadable,Rt.emittedReadable),Rt.needReadable=!1,Rt.emittedReadable||(at("emitReadable",Rt.flowing),Rt.emittedReadable=!0,vt.nextTick(pe,It))}function pe(It){var Rt=It._readableState;at("emitReadable_",Rt.destroyed,Rt.length,Rt.ended),!Rt.destroyed&&(Rt.length||Rt.ended)&&(It.emit("readable"),Rt.emittedReadable=!1),Rt.needReadable=!Rt.flowing&&!Rt.ended&&Rt.length<=Rt.highWaterMark,Kt(It)}function he(It,Rt){Rt.readingMore||(Rt.readingMore=!0,vt.nextTick(Ce,It,Rt))}function Ce(It,Rt){for(;!Rt.reading&&!Rt.ended&&(Rt.length<Rt.highWaterMark||Rt.flowing&&Rt.length===0);){var Vt=Rt.length;if(at("maybeReadMore read 0"),It.read(0),Vt===Rt.length)break}Rt.readingMore=!1}se.prototype._read=function(It){Jt(this,new Ft("_read()"))},se.prototype.pipe=function(It,Rt){var Vt=this,$t=this._readableState;switch($t.pipesCount){case 0:$t.pipes=It;break;case 1:$t.pipes=[$t.pipes,It];break;default:$t.pipes.push(It);break}$t.pipesCount+=1,at("pipe count=%d opts=%j",$t.pipesCount,Rt);var ue=(!Rt||Rt.end!==!1)&&It!==vt.stdout&&It!==vt.stderr,ge=ue?Ae:Ve;$t.endEmitted?vt.nextTick(ge):Vt.once("end",ge),It.on("unpipe",Me);function Me(rn,an){at("onunpipe"),rn===Vt&&an&&an.hasUnpiped===!1&&(an.hasUnpiped=!0,Ye())}function Ae(){at("onend"),It.end()}var Be=de(Vt);It.on("drain",Be);var Ze=!1;function Ye(){at("cleanup"),It.removeListener("close",Ue),It.removeListener("finish",We),It.removeListener("drain",Be),It.removeListener("error",He),It.removeListener("unpipe",Me),Vt.removeListener("end",Ae),Vt.removeListener("end",Ve),Vt.removeListener("data",Qe),Ze=!0,$t.awaitDrain&&(!It._writableState||It._writableState.needDrain)&&Be()}Vt.on("data",Qe);function Qe(rn){at("ondata");var an=It.write(rn);at("dest.write",an),an===!1&&(($t.pipesCount===1&&$t.pipes===It||$t.pipesCount>1&&ee($t.pipes,It)!==-1)&&!Ze&&(at("false write response, pause",$t.awaitDrain),$t.awaitDrain++),Vt.pause())}function He(rn){at("onerror",rn),Ve(),It.removeListener("error",He),St(It,"error")===0&&Jt(It,rn)}Ht(It,"error",He);function Ue(){It.removeListener("finish",We),Ve()}It.once("close",Ue);function We(){at("onfinish"),It.removeListener("close",Ue),Ve()}It.once("finish",We);function Ve(){at("unpipe"),Vt.unpipe(It)}return It.emit("pipe",Vt),$t.flowing||(at("pipe resume"),Vt.resume()),It};function de(It){return function(){var Vt=It._readableState;at("pipeOnDrain",Vt.awaitDrain),Vt.awaitDrain&&Vt.awaitDrain--,Vt.awaitDrain===0&&St(It,"data")&&(Vt.flowing=!0,Kt(It))}}se.prototype.unpipe=function(It){var Rt=this._readableState,Vt={hasUnpiped:!1};if(Rt.pipesCount===0)return this;if(Rt.pipesCount===1)return It&&It!==Rt.pipes?this:(It||(It=Rt.pipes),Rt.pipes=null,Rt.pipesCount=0,Rt.flowing=!1,It&&It.emit("unpipe",this,Vt),this);if(!It){var $t=Rt.pipes,ue=Rt.pipesCount;Rt.pipes=null,Rt.pipesCount=0,Rt.flowing=!1;for(var ge=0;ge<ue;ge++)$t[ge].emit("unpipe",this,{hasUnpiped:!1});return this}var Me=ee(Rt.pipes,It);return Me===-1?this:(Rt.pipes.splice(Me,1),Rt.pipesCount-=1,Rt.pipesCount===1&&(Rt.pipes=Rt.pipes[0]),It.emit("unpipe",this,Vt),this)},se.prototype.on=function(It,Rt){var Vt=Tt.prototype.on.call(this,It,Rt),$t=this._readableState;return It==="data"?($t.readableListening=this.listenerCount("readable")>0,$t.flowing!==!1&&this.resume()):It==="readable"&&!$t.endEmitted&&!$t.readableListening&&($t.readableListening=$t.needReadable=!0,$t.flowing=!1,$t.emittedReadable=!1,at("on readable",$t.length,$t.reading),$t.length?fe(this):$t.reading||vt.nextTick(Ne,this)),Vt},se.prototype.addListener=se.prototype.on,se.prototype.removeListener=function(It,Rt){var Vt=Tt.prototype.removeListener.call(this,It,Rt);return It==="readable"&&vt.nextTick(ye,this),Vt},se.prototype.removeAllListeners=function(It){var Rt=Tt.prototype.removeAllListeners.apply(this,arguments);return(It==="readable"||It===void 0)&&vt.nextTick(ye,this),Rt};function ye(It){var Rt=It._readableState;Rt.readableListening=It.listenerCount("readable")>0,Rt.resumeScheduled&&!Rt.paused?Rt.flowing=!0:It.listenerCount("data")>0&&It.resume()}function Ne(It){at("readable nexttick read 0"),It.read(0)}se.prototype.resume=function(){var It=this._readableState;return It.flowing||(at("resume"),It.flowing=!It.readableListening,xe(this,It)),It.paused=!1,this};function xe(It,Rt){Rt.resumeScheduled||(Rt.resumeScheduled=!0,vt.nextTick(re,It,Rt))}function re(It,Rt){at("resume",Rt.reading),Rt.reading||It.read(0),Rt.resumeScheduled=!1,It.emit("resume"),Kt(It),Rt.flowing&&!Rt.reading&&It.read(0)}se.prototype.pause=function(){return at("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(at("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Kt(It){var Rt=It._readableState;for(at("flow",Rt.flowing);Rt.flowing&&It.read()!==null;);}se.prototype.wrap=function(It){var Rt=this,Vt=this._readableState,$t=!1;It.on("end",function(){if(at("wrapped end"),Vt.decoder&&!Vt.ended){var Me=Vt.decoder.end();Me&&Me.length&&Rt.push(Me)}Rt.push(null)}),It.on("data",function(Me){if(at("wrapped data"),Vt.decoder&&(Me=Vt.decoder.write(Me)),!(Vt.objectMode&&Me==null)&&!(!Vt.objectMode&&(!Me||!Me.length))){var Ae=Rt.push(Me);Ae||($t=!0,It.pause())}});for(var ue in It)this[ue]===void 0&&typeof It[ue]=="function"&&(this[ue]=function(Ae){return function(){return It[Ae].apply(It,arguments)}}(ue));for(var ge=0;ge<Ut.length;ge++)It.on(Ut[ge],this.emit.bind(this,Ut[ge]));return this._read=function(Me){at("wrapped _read",Me),$t&&($t=!1,It.resume())},this},typeof Symbol=="function"&&(se.prototype[Symbol.asyncIterator]=function(){return Gt===void 0&&(Gt=ot("./internal/streams/async_iterator")),Gt(this)}),Object.defineProperty(se.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(se.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(se.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Rt){this._readableState&&(this._readableState.flowing=Rt)}}),se._fromList=wt,Object.defineProperty(se.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function wt(It,Rt){if(Rt.length===0)return null;var Vt;return Rt.objectMode?Vt=Rt.buffer.shift():!It||It>=Rt.length?(Rt.decoder?Vt=Rt.buffer.join(""):Rt.buffer.length===1?Vt=Rt.buffer.first():Vt=Rt.buffer.concat(Rt.length),Rt.buffer.clear()):Vt=Rt.buffer.consume(It,Rt.decoder),Vt}function Lt(It){var Rt=It._readableState;at("endReadable",Rt.endEmitted),Rt.endEmitted||(Rt.ended=!0,vt.nextTick(Xt,Rt,It))}function Xt(It,Rt){if(at("endReadableNT",It.endEmitted,It.length),!It.endEmitted&&It.length===0&&(It.endEmitted=!0,Rt.readable=!1,Rt.emit("end"),It.autoDestroy)){var Vt=Rt._writableState;(!Vt||Vt.autoDestroy&&Vt.finished)&&Rt.destroy()}}typeof Symbol=="function"&&(se.from=function(It,Rt){return Wt===void 0&&(Wt=ot("./internal/streams/from")),Wt(se,It,Rt)});function ee(It,Rt){for(var Vt=0,$t=It.length;Vt<$t;Vt++)if(It[Vt]===Rt)return Vt;return-1}}).call(this)}).call(this,ot("_process"),typeof fn!="undefined"?fn: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(ot,_t,Bt){"use strict";_t.exports=xt;var vt=ot("../errors").codes,gt=vt.ERR_METHOD_NOT_IMPLEMENTED,kt=vt.ERR_MULTIPLE_CALLBACK,bt=vt.ERR_TRANSFORM_ALREADY_TRANSFORMING,St=vt.ERR_TRANSFORM_WITH_LENGTH_0,Tt=ot("./_stream_duplex");ot("inherits")(xt,Tt);function mt(tt,at){var it=this._transformState;it.transforming=!1;var lt=it.writecb;if(lt===null)return this.emit("error",new kt);it.writechunk=null,it.writecb=null,at!=null&&this.push(at),lt(tt);var ut=this._readableState;ut.reading=!1,(ut.needReadable||ut.length<ut.highWaterMark)&&this._read(ut.highWaterMark)}function xt(tt){if(!(this instanceof xt))return new xt(tt);Tt.call(this,tt),this._transformState={afterTransform:mt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,tt&&(typeof tt.transform=="function"&&(this._transform=tt.transform),typeof tt.flush=="function"&&(this._flush=tt.flush)),this.on("prefinish",ft)}function ft(){var tt=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(at,it){z(tt,at,it)}):z(this,null,null)}xt.prototype.push=function(tt,at){return this._transformState.needTransform=!1,Tt.prototype.push.call(this,tt,at)},xt.prototype._transform=function(tt,at,it){it(new gt("_transform()"))},xt.prototype._write=function(tt,at,it){var lt=this._transformState;if(lt.writecb=it,lt.writechunk=tt,lt.writeencoding=at,!lt.transforming){var ut=this._readableState;(lt.needTransform||ut.needReadable||ut.length<ut.highWaterMark)&&this._read(ut.highWaterMark)}},xt.prototype._read=function(tt){var at=this._transformState;at.writechunk!==null&&!at.transforming?(at.transforming=!0,this._transform(at.writechunk,at.writeencoding,at.afterTransform)):at.needTransform=!0},xt.prototype._destroy=function(tt,at){Tt.prototype._destroy.call(this,tt,function(it){at(it)})};function z(tt,at,it){if(at)return tt.emit("error",at);if(it!=null&&tt.push(it),tt._writableState.length)throw new St;if(tt._transformState.transforming)throw new bt;return tt.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(ot,_t,Bt){(function(vt,gt){(function(){"use strict";_t.exports=oe;function kt(Kt,wt,Lt){this.chunk=Kt,this.encoding=wt,this.callback=Lt,this.next=null}function bt(Kt){var wt=this;this.next=null,this.entry=null,this.finish=function(){re(wt,Kt)}}var St;oe.WritableState=Ut;var Tt={deprecate:ot("util-deprecate")},mt=ot("./internal/streams/stream"),xt=ot("buffer").Buffer,ft=(typeof gt!="undefined"?gt:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function z(Kt){return xt.from(Kt)}function tt(Kt){return xt.isBuffer(Kt)||Kt instanceof ft}var at=ot("./internal/streams/destroy"),it=ot("./internal/streams/state"),lt=it.getHighWaterMark,ut=ot("../errors").codes,dt=ut.ERR_INVALID_ARG_TYPE,Pt=ut.ERR_METHOD_NOT_IMPLEMENTED,At=ut.ERR_MULTIPLE_CALLBACK,Dt=ut.ERR_STREAM_CANNOT_PIPE,Ft=ut.ERR_STREAM_DESTROYED,Nt=ut.ERR_STREAM_NULL_VALUES,jt=ut.ERR_STREAM_WRITE_AFTER_END,Gt=ut.ERR_UNKNOWN_ENCODING,Wt=at.errorOrDestroy;ot("inherits")(oe,mt);function Jt(){}function Ut(Kt,wt,Lt){St=St||ot("./_stream_duplex"),Kt=Kt||{},typeof Lt!="boolean"&&(Lt=wt instanceof St),this.objectMode=!!Kt.objectMode,Lt&&(this.objectMode=this.objectMode||!!Kt.writableObjectMode),this.highWaterMark=lt(this,Kt,"writableHighWaterMark",Lt),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Xt=Kt.decodeStrings===!1;this.decodeStrings=!Xt,this.defaultEncoding=Kt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ee){be(wt,ee)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Kt.emitClose!==!1,this.autoDestroy=!!Kt.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new bt(this)}Ut.prototype.getBuffer=function(){for(var wt=this.bufferedRequest,Lt=[];wt;)Lt.push(wt),wt=wt.next;return Lt},function(){try{Object.defineProperty(Ut.prototype,"buffer",{get:Tt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Kt){}}();var Ht;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ht=Function.prototype[Symbol.hasInstance],Object.defineProperty(oe,Symbol.hasInstance,{value:function(wt){return Ht.call(this,wt)?!0:this!==oe?!1:wt&&wt._writableState instanceof Ut}})):Ht=function(wt){return wt instanceof this};function oe(Kt){St=St||ot("./_stream_duplex");var wt=this instanceof St;if(!wt&&!Ht.call(oe,this))return new oe(Kt);this._writableState=new Ut(Kt,this,wt),this.writable=!0,Kt&&(typeof Kt.write=="function"&&(this._write=Kt.write),typeof Kt.writev=="function"&&(this._writev=Kt.writev),typeof Kt.destroy=="function"&&(this._destroy=Kt.destroy),typeof Kt.final=="function"&&(this._final=Kt.final)),mt.call(this)}oe.prototype.pipe=function(){Wt(this,new Dt)};function se(Kt,wt){var Lt=new jt;Wt(Kt,Lt),vt.nextTick(wt,Lt)}function ce(Kt,wt,Lt,Xt){var ee;return Lt===null?ee=new Nt:typeof Lt!="string"&&!wt.objectMode&&(ee=new dt("chunk",["string","Buffer"],Lt)),ee?(Wt(Kt,ee),vt.nextTick(Xt,ee),!1):!0}oe.prototype.write=function(Kt,wt,Lt){var Xt=this._writableState,ee=!1,It=!Xt.objectMode&&tt(Kt);return It&&!xt.isBuffer(Kt)&&(Kt=z(Kt)),typeof wt=="function"&&(Lt=wt,wt=null),It?wt="buffer":wt||(wt=Xt.defaultEncoding),typeof Lt!="function"&&(Lt=Jt),Xt.ending?se(this,Lt):(It||ce(this,Xt,Kt,Lt))&&(Xt.pendingcb++,ee=Yt(this,Xt,It,Kt,wt,Lt)),ee},oe.prototype.cork=function(){this._writableState.corked++},oe.prototype.uncork=function(){var Kt=this._writableState;Kt.corked&&(Kt.corked--,!Kt.writing&&!Kt.corked&&!Kt.bufferProcessing&&Kt.bufferedRequest&&he(this,Kt))},oe.prototype.setDefaultEncoding=function(wt){if(typeof wt=="string"&&(wt=wt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((wt+"").toLowerCase())>-1))throw new Gt(wt);return this._writableState.defaultEncoding=wt,this},Object.defineProperty(oe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Pe(Kt,wt,Lt){return!Kt.objectMode&&Kt.decodeStrings!==!1&&typeof wt=="string"&&(wt=xt.from(wt,Lt)),wt}Object.defineProperty(oe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Yt(Kt,wt,Lt,Xt,ee,It){if(!Lt){var Rt=Pe(wt,Xt,ee);Xt!==Rt&&(Lt=!0,ee="buffer",Xt=Rt)}var Vt=wt.objectMode?1:Xt.length;wt.length+=Vt;var $t=wt.length<wt.highWaterMark;if($t||(wt.needDrain=!0),wt.writing||wt.corked){var ue=wt.lastBufferedRequest;wt.lastBufferedRequest={chunk:Xt,encoding:ee,isBuf:Lt,callback:It,next:null},ue?ue.next=wt.lastBufferedRequest:wt.bufferedRequest=wt.lastBufferedRequest,wt.bufferedRequestCount+=1}else ne(Kt,wt,!1,Vt,Xt,ee,It);return $t}function ne(Kt,wt,Lt,Xt,ee,It,Rt){wt.writelen=Xt,wt.writecb=Rt,wt.writing=!0,wt.sync=!0,wt.destroyed?wt.onwrite(new Ft("write")):Lt?Kt._writev(ee,wt.onwrite):Kt._write(ee,It,wt.onwrite),wt.sync=!1}function ve(Kt,wt,Lt,Xt,ee){--wt.pendingcb,Lt?(vt.nextTick(ee,Xt),vt.nextTick(Ne,Kt,wt),Kt._writableState.errorEmitted=!0,Wt(Kt,Xt)):(ee(Xt),Kt._writableState.errorEmitted=!0,Wt(Kt,Xt),Ne(Kt,wt))}function Se(Kt){Kt.writing=!1,Kt.writecb=null,Kt.length-=Kt.writelen,Kt.writelen=0}function be(Kt,wt){var Lt=Kt._writableState,Xt=Lt.sync,ee=Lt.writecb;if(typeof ee!="function")throw new At;if(Se(Lt),wt)ve(Kt,Lt,Xt,wt,ee);else{var It=Ce(Lt)||Kt.destroyed;!It&&!Lt.corked&&!Lt.bufferProcessing&&Lt.bufferedRequest&&he(Kt,Lt),Xt?vt.nextTick(fe,Kt,Lt,It,ee):fe(Kt,Lt,It,ee)}}function fe(Kt,wt,Lt,Xt){Lt||pe(Kt,wt),wt.pendingcb--,Xt(),Ne(Kt,wt)}function pe(Kt,wt){wt.length===0&&wt.needDrain&&(wt.needDrain=!1,Kt.emit("drain"))}function he(Kt,wt){wt.bufferProcessing=!0;var Lt=wt.bufferedRequest;if(Kt._writev&&Lt&&Lt.next){var Xt=wt.bufferedRequestCount,ee=new Array(Xt),It=wt.corkedRequestsFree;It.entry=Lt;for(var Rt=0,Vt=!0;Lt;)ee[Rt]=Lt,Lt.isBuf||(Vt=!1),Lt=Lt.next,Rt+=1;ee.allBuffers=Vt,ne(Kt,wt,!0,wt.length,ee,"",It.finish),wt.pendingcb++,wt.lastBufferedRequest=null,It.next?(wt.corkedRequestsFree=It.next,It.next=null):wt.corkedRequestsFree=new bt(wt),wt.bufferedRequestCount=0}else{for(;Lt;){var $t=Lt.chunk,ue=Lt.encoding,ge=Lt.callback,Me=wt.objectMode?1:$t.length;if(ne(Kt,wt,!1,Me,$t,ue,ge),Lt=Lt.next,wt.bufferedRequestCount--,wt.writing)break}Lt===null&&(wt.lastBufferedRequest=null)}wt.bufferedRequest=Lt,wt.bufferProcessing=!1}oe.prototype._write=function(Kt,wt,Lt){Lt(new Pt("_write()"))},oe.prototype._writev=null,oe.prototype.end=function(Kt,wt,Lt){var Xt=this._writableState;return typeof Kt=="function"?(Lt=Kt,Kt=null,wt=null):typeof wt=="function"&&(Lt=wt,wt=null),Kt!=null&&this.write(Kt,wt),Xt.corked&&(Xt.corked=1,this.uncork()),Xt.ending||xe(this,Xt,Lt),this},Object.defineProperty(oe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ce(Kt){return Kt.ending&&Kt.length===0&&Kt.bufferedRequest===null&&!Kt.finished&&!Kt.writing}function de(Kt,wt){Kt._final(function(Lt){wt.pendingcb--,Lt&&Wt(Kt,Lt),wt.prefinished=!0,Kt.emit("prefinish"),Ne(Kt,wt)})}function ye(Kt,wt){!wt.prefinished&&!wt.finalCalled&&(typeof Kt._final=="function"&&!wt.destroyed?(wt.pendingcb++,wt.finalCalled=!0,vt.nextTick(de,Kt,wt)):(wt.prefinished=!0,Kt.emit("prefinish")))}function Ne(Kt,wt){var Lt=Ce(wt);if(Lt&&(ye(Kt,wt),wt.pendingcb===0&&(wt.finished=!0,Kt.emit("finish"),wt.autoDestroy))){var Xt=Kt._readableState;(!Xt||Xt.autoDestroy&&Xt.endEmitted)&&Kt.destroy()}return Lt}function xe(Kt,wt,Lt){wt.ending=!0,Ne(Kt,wt),Lt&&(wt.finished?vt.nextTick(Lt):Kt.once("finish",Lt)),wt.ended=!0,Kt.writable=!1}function re(Kt,wt,Lt){var Xt=Kt.entry;for(Kt.entry=null;Xt;){var ee=Xt.callback;wt.pendingcb--,ee(Lt),Xt=Xt.next}wt.corkedRequestsFree.next=Kt}Object.defineProperty(oe.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(wt){this._writableState&&(this._writableState.destroyed=wt)}}),oe.prototype.destroy=at.destroy,oe.prototype._undestroy=at.undestroy,oe.prototype._destroy=function(Kt,wt){wt(Kt)}}).call(this)}).call(this,ot("_process"),typeof fn!="undefined"?fn: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(ot,_t,Bt){(function(vt){(function(){"use strict";var gt;function kt(Nt,jt,Gt){return jt=bt(jt),jt in Nt?Object.defineProperty(Nt,jt,{value:Gt,enumerable:!0,configurable:!0,writable:!0}):Nt[jt]=Gt,Nt}function bt(Nt){var jt=St(Nt,"string");return typeof jt=="symbol"?jt:String(jt)}function St(Nt,jt){if(typeof Nt!="object"||Nt===null)return Nt;var Gt=Nt[Symbol.toPrimitive];if(Gt!==void 0){var Wt=Gt.call(Nt,jt||"default");if(typeof Wt!="object")return Wt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(jt==="string"?String:Number)(Nt)}var Tt=ot("./end-of-stream"),mt=Symbol("lastResolve"),xt=Symbol("lastReject"),ft=Symbol("error"),z=Symbol("ended"),tt=Symbol("lastPromise"),at=Symbol("handlePromise"),it=Symbol("stream");function lt(Nt,jt){return{value:Nt,done:jt}}function ut(Nt){var jt=Nt[mt];if(jt!==null){var Gt=Nt[it].read();Gt!==null&&(Nt[tt]=null,Nt[mt]=null,Nt[xt]=null,jt(lt(Gt,!1)))}}function dt(Nt){vt.nextTick(ut,Nt)}function Pt(Nt,jt){return function(Gt,Wt){Nt.then(function(){if(jt[z]){Gt(lt(void 0,!0));return}jt[at](Gt,Wt)},Wt)}}var At=Object.getPrototypeOf(function(){}),Dt=Object.setPrototypeOf((gt={get stream(){return this[it]},next:function(){var jt=this,Gt=this[ft];if(Gt!==null)return Promise.reject(Gt);if(this[z])return Promise.resolve(lt(void 0,!0));if(this[it].destroyed)return new Promise(function(Ht,oe){vt.nextTick(function(){jt[ft]?oe(jt[ft]):Ht(lt(void 0,!0))})});var Wt=this[tt],Jt;if(Wt)Jt=new Promise(Pt(Wt,this));else{var Ut=this[it].read();if(Ut!==null)return Promise.resolve(lt(Ut,!1));Jt=new Promise(this[at])}return this[tt]=Jt,Jt}},kt(gt,Symbol.asyncIterator,function(){return this}),kt(gt,"return",function(){var jt=this;return new Promise(function(Gt,Wt){jt[it].destroy(null,function(Jt){if(Jt){Wt(Jt);return}Gt(lt(void 0,!0))})})}),gt),At),Ft=function(jt){var Gt,Wt=Object.create(Dt,(Gt={},kt(Gt,it,{value:jt,writable:!0}),kt(Gt,mt,{value:null,writable:!0}),kt(Gt,xt,{value:null,writable:!0}),kt(Gt,ft,{value:null,writable:!0}),kt(Gt,z,{value:jt._readableState.endEmitted,writable:!0}),kt(Gt,at,{value:function(Ut,Ht){var oe=Wt[it].read();oe?(Wt[tt]=null,Wt[mt]=null,Wt[xt]=null,Ut(lt(oe,!1))):(Wt[mt]=Ut,Wt[xt]=Ht)},writable:!0}),Gt));return Wt[tt]=null,Tt(jt,function(Jt){if(Jt&&Jt.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Ut=Wt[xt];Ut!==null&&(Wt[tt]=null,Wt[mt]=null,Wt[xt]=null,Ut(Jt)),Wt[ft]=Jt;return}var Ht=Wt[mt];Ht!==null&&(Wt[tt]=null,Wt[mt]=null,Wt[xt]=null,Ht(lt(void 0,!0))),Wt[z]=!0}),jt.on("readable",dt.bind(null,Wt)),Wt};_t.exports=Ft}).call(this)}).call(this,ot("_process"))},{"./end-of-stream":408,_process:467}],406:[function(ot,_t,Bt){"use strict";function vt(ut,dt){var Pt=Object.keys(ut);if(Object.getOwnPropertySymbols){var At=Object.getOwnPropertySymbols(ut);dt&&(At=At.filter(function(Dt){return Object.getOwnPropertyDescriptor(ut,Dt).enumerable})),Pt.push.apply(Pt,At)}return Pt}function gt(ut){for(var dt=1;dt<arguments.length;dt++){var Pt=arguments[dt]!=null?arguments[dt]:{};dt%2?vt(Object(Pt),!0).forEach(function(At){kt(ut,At,Pt[At])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ut,Object.getOwnPropertyDescriptors(Pt)):vt(Object(Pt)).forEach(function(At){Object.defineProperty(ut,At,Object.getOwnPropertyDescriptor(Pt,At))})}return ut}function kt(ut,dt,Pt){return dt=mt(dt),dt in ut?Object.defineProperty(ut,dt,{value:Pt,enumerable:!0,configurable:!0,writable:!0}):ut[dt]=Pt,ut}function bt(ut,dt){if(!(ut instanceof dt))throw new TypeError("Cannot call a class as a function")}function St(ut,dt){for(var Pt=0;Pt<dt.length;Pt++){var At=dt[Pt];At.enumerable=At.enumerable||!1,At.configurable=!0,"value"in At&&(At.writable=!0),Object.defineProperty(ut,mt(At.key),At)}}function Tt(ut,dt,Pt){return dt&&St(ut.prototype,dt),Pt&&St(ut,Pt),Object.defineProperty(ut,"prototype",{writable:!1}),ut}function mt(ut){var dt=xt(ut,"string");return typeof dt=="symbol"?dt:String(dt)}function xt(ut,dt){if(typeof ut!="object"||ut===null)return ut;var Pt=ut[Symbol.toPrimitive];if(Pt!==void 0){var At=Pt.call(ut,dt||"default");if(typeof At!="object")return At;throw new TypeError("@@toPrimitive must return a primitive value.")}return(dt==="string"?String:Number)(ut)}var ft=ot("buffer"),z=ft.Buffer,tt=ot("util"),at=tt.inspect,it=at&&at.custom||"inspect";function lt(ut,dt,Pt){z.prototype.copy.call(ut,dt,Pt)}_t.exports=function(){function ut(){bt(this,ut),this.head=null,this.tail=null,this.length=0}return Tt(ut,[{key:"push",value:function(Pt){var At={data:Pt,next:null};this.length>0?this.tail.next=At:this.head=At,this.tail=At,++this.length}},{key:"unshift",value:function(Pt){var At={data:Pt,next:this.head};this.length===0&&(this.tail=At),this.head=At,++this.length}},{key:"shift",value:function(){if(this.length!==0){var Pt=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,Pt}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(Pt){if(this.length===0)return"";for(var At=this.head,Dt=""+At.data;At=At.next;)Dt+=Pt+At.data;return Dt}},{key:"concat",value:function(Pt){if(this.length===0)return z.alloc(0);for(var At=z.allocUnsafe(Pt>>>0),Dt=this.head,Ft=0;Dt;)lt(Dt.data,At,Ft),Ft+=Dt.data.length,Dt=Dt.next;return At}},{key:"consume",value:function(Pt,At){var Dt;return Pt<this.head.data.length?(Dt=this.head.data.slice(0,Pt),this.head.data=this.head.data.slice(Pt)):Pt===this.head.data.length?Dt=this.shift():Dt=At?this._getString(Pt):this._getBuffer(Pt),Dt}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(Pt){var At=this.head,Dt=1,Ft=At.data;for(Pt-=Ft.length;At=At.next;){var Nt=At.data,jt=Pt>Nt.length?Nt.length:Pt;if(jt===Nt.length?Ft+=Nt:Ft+=Nt.slice(0,Pt),Pt-=jt,Pt===0){jt===Nt.length?(++Dt,At.next?this.head=At.next:this.head=this.tail=null):(this.head=At,At.data=Nt.slice(jt));break}++Dt}return this.length-=Dt,Ft}},{key:"_getBuffer",value:function(Pt){var At=z.allocUnsafe(Pt),Dt=this.head,Ft=1;for(Dt.data.copy(At),Pt-=Dt.data.length;Dt=Dt.next;){var Nt=Dt.data,jt=Pt>Nt.length?Nt.length:Pt;if(Nt.copy(At,At.length-Pt,0,jt),Pt-=jt,Pt===0){jt===Nt.length?(++Ft,Dt.next?this.head=Dt.next:this.head=this.tail=null):(this.head=Dt,Dt.data=Nt.slice(jt));break}++Ft}return this.length-=Ft,At}},{key:it,value:function(Pt,At){return at(this,gt(gt({},At),{},{depth:0,customInspect:!1}))}}]),ut}()},{buffer:90,util:89}],407:[function(ot,_t,Bt){(function(vt){(function(){"use strict";function gt(xt,ft){var z=this,tt=this._readableState&&this._readableState.destroyed,at=this._writableState&&this._writableState.destroyed;return tt||at?(ft?ft(xt):xt&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,vt.nextTick(Tt,this,xt)):vt.nextTick(Tt,this,xt)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(xt||null,function(it){!ft&&it?z._writableState?z._writableState.errorEmitted?vt.nextTick(bt,z):(z._writableState.errorEmitted=!0,vt.nextTick(kt,z,it)):vt.nextTick(kt,z,it):ft?(vt.nextTick(bt,z),ft(it)):vt.nextTick(bt,z)}),this)}function kt(xt,ft){Tt(xt,ft),bt(xt)}function bt(xt){xt._writableState&&!xt._writableState.emitClose||xt._readableState&&!xt._readableState.emitClose||xt.emit("close")}function St(){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 Tt(xt,ft){xt.emit("error",ft)}function mt(xt,ft){var z=xt._readableState,tt=xt._writableState;z&&z.autoDestroy||tt&&tt.autoDestroy?xt.destroy(ft):xt.emit("error",ft)}_t.exports={destroy:gt,undestroy:St,errorOrDestroy:mt}}).call(this)}).call(this,ot("_process"))},{_process:467}],408:[function(ot,_t,Bt){"use strict";var vt=ot("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function gt(Tt){var mt=!1;return function(){if(!mt){mt=!0;for(var xt=arguments.length,ft=new Array(xt),z=0;z<xt;z++)ft[z]=arguments[z];Tt.apply(this,ft)}}}function kt(){}function bt(Tt){return Tt.setHeader&&typeof Tt.abort=="function"}function St(Tt,mt,xt){if(typeof mt=="function")return St(Tt,null,mt);mt||(mt={}),xt=gt(xt||kt);var ft=mt.readable||mt.readable!==!1&&Tt.readable,z=mt.writable||mt.writable!==!1&&Tt.writable,tt=function(){Tt.writable||it()},at=Tt._writableState&&Tt._writableState.finished,it=function(){z=!1,at=!0,ft||xt.call(Tt)},lt=Tt._readableState&&Tt._readableState.endEmitted,ut=function(){ft=!1,lt=!0,z||xt.call(Tt)},dt=function(Ft){xt.call(Tt,Ft)},Pt=function(){var Ft;if(ft&&!lt)return(!Tt._readableState||!Tt._readableState.ended)&&(Ft=new vt),xt.call(Tt,Ft);if(z&&!at)return(!Tt._writableState||!Tt._writableState.ended)&&(Ft=new vt),xt.call(Tt,Ft)},At=function(){Tt.req.on("finish",it)};return bt(Tt)?(Tt.on("complete",it),Tt.on("abort",Pt),Tt.req?At():Tt.on("request",At)):z&&!Tt._writableState&&(Tt.on("end",tt),Tt.on("close",tt)),Tt.on("end",ut),Tt.on("finish",it),mt.error!==!1&&Tt.on("error",dt),Tt.on("close",Pt),function(){Tt.removeListener("complete",it),Tt.removeListener("abort",Pt),Tt.removeListener("request",At),Tt.req&&Tt.req.removeListener("finish",it),Tt.removeListener("end",tt),Tt.removeListener("close",tt),Tt.removeListener("finish",it),Tt.removeListener("end",ut),Tt.removeListener("error",dt),Tt.removeListener("close",Pt)}}_t.exports=St},{"../../../errors":399}],409:[function(ot,_t,Bt){_t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(ot,_t,Bt){"use strict";var vt;function gt(it){var lt=!1;return function(){lt||(lt=!0,it.apply(void 0,arguments))}}var kt=ot("../../../errors").codes,bt=kt.ERR_MISSING_ARGS,St=kt.ERR_STREAM_DESTROYED;function Tt(it){if(it)throw it}function mt(it){return it.setHeader&&typeof it.abort=="function"}function xt(it,lt,ut,dt){dt=gt(dt);var Pt=!1;it.on("close",function(){Pt=!0}),vt===void 0&&(vt=ot("./end-of-stream")),vt(it,{readable:lt,writable:ut},function(Dt){if(Dt)return dt(Dt);Pt=!0,dt()});var At=!1;return function(Dt){if(!Pt&&!At){if(At=!0,mt(it))return it.abort();if(typeof it.destroy=="function")return it.destroy();dt(Dt||new St("pipe"))}}}function ft(it){it()}function z(it,lt){return it.pipe(lt)}function tt(it){return!it.length||typeof it[it.length-1]!="function"?Tt:it.pop()}function at(){for(var it=arguments.length,lt=new Array(it),ut=0;ut<it;ut++)lt[ut]=arguments[ut];var dt=tt(lt);if(Array.isArray(lt[0])&&(lt=lt[0]),lt.length<2)throw new bt("streams");var Pt,At=lt.map(function(Dt,Ft){var Nt=Ft<lt.length-1,jt=Ft>0;return xt(Dt,Nt,jt,function(Gt){Pt||(Pt=Gt),Gt&&At.forEach(ft),!Nt&&(At.forEach(ft),dt(Pt))})});return lt.reduce(z)}_t.exports=at},{"../../../errors":399,"./end-of-stream":408}],411:[function(ot,_t,Bt){"use strict";var vt=ot("../../../errors").codes.ERR_INVALID_OPT_VALUE;function gt(bt,St,Tt){return bt.highWaterMark!=null?bt.highWaterMark:St?bt[Tt]:null}function kt(bt,St,Tt,mt){var xt=gt(St,mt,Tt);if(xt!=null){if(!(isFinite(xt)&&Math.floor(xt)===xt)||xt<0){var ft=mt?Tt:"highWaterMark";throw new vt(ft,xt)}return Math.floor(xt)}return bt.objectMode?16:16*1024}_t.exports={getHighWaterMark:kt}},{"../../../errors":399}],412:[function(ot,_t,Bt){arguments[4][393][0].apply(Bt,arguments)},{dup:393,events:344}],413:[function(ot,_t,Bt){"use strict";var vt=ot("safe-buffer").Buffer,gt=vt.isEncoding||function(At){switch(At=""+At,At&&At.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 kt(At){if(!At)return"utf8";for(var Dt;;)switch(At){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 At;default:if(Dt)return;At=(""+At).toLowerCase(),Dt=!0}}function bt(At){var Dt=kt(At);if(typeof Dt!="string"&&(vt.isEncoding===gt||!gt(At)))throw new Error("Unknown encoding: "+At);return Dt||At}Bt.StringDecoder=St;function St(At){this.encoding=bt(At);var Dt;switch(this.encoding){case"utf16le":this.text=at,this.end=it,Dt=4;break;case"utf8":this.fillLast=ft,Dt=4;break;case"base64":this.text=lt,this.end=ut,Dt=3;break;default:this.write=dt,this.end=Pt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=vt.allocUnsafe(Dt)}St.prototype.write=function(At){if(At.length===0)return"";var Dt,Ft;if(this.lastNeed){if(Dt=this.fillLast(At),Dt===void 0)return"";Ft=this.lastNeed,this.lastNeed=0}else Ft=0;return Ft<At.length?Dt?Dt+this.text(At,Ft):this.text(At,Ft):Dt||""},St.prototype.end=tt,St.prototype.text=z,St.prototype.fillLast=function(At){if(this.lastNeed<=At.length)return At.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);At.copy(this.lastChar,this.lastTotal-this.lastNeed,0,At.length),this.lastNeed-=At.length};function Tt(At){return At<=127?0:At>>5===6?2:At>>4===14?3:At>>3===30?4:At>>6===2?-1:-2}function mt(At,Dt,Ft){var Nt=Dt.length-1;if(Nt<Ft)return 0;var jt=Tt(Dt[Nt]);return jt>=0?(jt>0&&(At.lastNeed=jt-1),jt):--Nt<Ft||jt===-2?0:(jt=Tt(Dt[Nt]),jt>=0?(jt>0&&(At.lastNeed=jt-2),jt):--Nt<Ft||jt===-2?0:(jt=Tt(Dt[Nt]),jt>=0?(jt>0&&(jt===2?jt=0:At.lastNeed=jt-3),jt):0))}function xt(At,Dt,Ft){if((Dt[0]&192)!==128)return At.lastNeed=0,"\uFFFD";if(At.lastNeed>1&&Dt.length>1){if((Dt[1]&192)!==128)return At.lastNeed=1,"\uFFFD";if(At.lastNeed>2&&Dt.length>2&&(Dt[2]&192)!==128)return At.lastNeed=2,"\uFFFD"}}function ft(At){var Dt=this.lastTotal-this.lastNeed,Ft=xt(this,At,Dt);if(Ft!==void 0)return Ft;if(this.lastNeed<=At.length)return At.copy(this.lastChar,Dt,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);At.copy(this.lastChar,Dt,0,At.length),this.lastNeed-=At.length}function z(At,Dt){var Ft=mt(this,At,Dt);if(!this.lastNeed)return At.toString("utf8",Dt);this.lastTotal=Ft;var Nt=At.length-(Ft-this.lastNeed);return At.copy(this.lastChar,0,Nt),At.toString("utf8",Dt,Nt)}function tt(At){var Dt=At&&At.length?this.write(At):"";return this.lastNeed?Dt+"\uFFFD":Dt}function at(At,Dt){if((At.length-Dt)%2===0){var Ft=At.toString("utf16le",Dt);if(Ft){var Nt=Ft.charCodeAt(Ft.length-1);if(Nt>=55296&&Nt<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=At[At.length-2],this.lastChar[1]=At[At.length-1],Ft.slice(0,-1)}return Ft}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=At[At.length-1],At.toString("utf16le",Dt,At.length-1)}function it(At){var Dt=At&&At.length?this.write(At):"";if(this.lastNeed){var Ft=this.lastTotal-this.lastNeed;return Dt+this.lastChar.toString("utf16le",0,Ft)}return Dt}function lt(At,Dt){var Ft=(At.length-Dt)%3;return Ft===0?At.toString("base64",Dt):(this.lastNeed=3-Ft,this.lastTotal=3,Ft===1?this.lastChar[0]=At[At.length-1]:(this.lastChar[0]=At[At.length-2],this.lastChar[1]=At[At.length-1]),At.toString("base64",Dt,At.length-Ft))}function ut(At){var Dt=At&&At.length?this.write(At):"";return this.lastNeed?Dt+this.lastChar.toString("base64",0,3-this.lastNeed):Dt}function dt(At){return At.toString(this.encoding)}function Pt(At){return At&&At.length?this.write(At):""}},{"safe-buffer":396}],414:[function(ot,_t,Bt){(function(vt,gt){(function(){var kt=ot("process/browser.js").nextTick,bt=Function.prototype.apply,St=Array.prototype.slice,Tt={},mt=0;Bt.setTimeout=function(){return new xt(bt.call(setTimeout,window,arguments),clearTimeout)},Bt.setInterval=function(){return new xt(bt.call(setInterval,window,arguments),clearInterval)},Bt.clearTimeout=Bt.clearInterval=function(ft){ft.close()};function xt(ft,z){this._id=ft,this._clearFn=z}xt.prototype.unref=xt.prototype.ref=function(){},xt.prototype.close=function(){this._clearFn.call(window,this._id)},Bt.enroll=function(ft,z){clearTimeout(ft._idleTimeoutId),ft._idleTimeout=z},Bt.unenroll=function(ft){clearTimeout(ft._idleTimeoutId),ft._idleTimeout=-1},Bt._unrefActive=Bt.active=function(ft){clearTimeout(ft._idleTimeoutId);var z=ft._idleTimeout;z>=0&&(ft._idleTimeoutId=setTimeout(function(){ft._onTimeout&&ft._onTimeout()},z))},Bt.setImmediate=typeof vt=="function"?vt:function(ft){var z=mt++,tt=arguments.length<2?!1:St.call(arguments,1);return Tt[z]=!0,kt(function(){Tt[z]&&(tt?ft.apply(null,tt):ft.call(null),Bt.clearImmediate(z))}),z},Bt.clearImmediate=typeof gt=="function"?gt:function(ft){delete Tt[ft]}}).call(this)}).call(this,ot("timers").setImmediate,ot("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(ot,_t,Bt){var vt=ot("buffer").Buffer;_t.exports=function(gt){if(gt instanceof Uint8Array){if(gt.byteOffset===0&>.byteLength===gt.buffer.byteLength)return gt.buffer;if(typeof gt.buffer.slice=="function")return gt.buffer.slice(gt.byteOffset,gt.byteOffset+gt.byteLength)}if(vt.isBuffer(gt)){for(var kt=new Uint8Array(gt.length),bt=gt.length,St=0;St<bt;St++)kt[St]=gt[St];return kt.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(ot,_t,Bt){(function(vt){(function(){_t.exports=gt;function gt(bt,St){if(kt("noDeprecation"))return bt;var Tt=!1;function mt(){if(!Tt){if(kt("throwDeprecation"))throw new Error(St);kt("traceDeprecation")?console.trace(St):console.warn(St),Tt=!0}return bt.apply(this,arguments)}return mt}function kt(bt){try{if(!vt.localStorage)return!1}catch(Tt){return!1}var St=vt.localStorage[bt];return St==null?!1:String(St).toLowerCase()==="true"}}).call(this)}).call(this,typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(ot,_t,Bt){arguments[4][84][0].apply(Bt,arguments)},{dup:84}],418:[function(ot,_t,Bt){"use strict";var vt=ot("is-arguments"),gt=ot("is-generator-function"),kt=ot("which-typed-array"),bt=ot("is-typed-array");function St(ue){return ue.call.bind(ue)}var Tt=typeof BigInt!="undefined",mt=typeof Symbol!="undefined",xt=St(Object.prototype.toString),ft=St(Number.prototype.valueOf),z=St(String.prototype.valueOf),tt=St(Boolean.prototype.valueOf);if(Tt)var at=St(BigInt.prototype.valueOf);if(mt)var it=St(Symbol.prototype.valueOf);function lt(ue,ge){if(typeof ue!="object")return!1;try{return ge(ue),!0}catch(Me){return!1}}Bt.isArgumentsObject=vt,Bt.isGeneratorFunction=gt,Bt.isTypedArray=bt;function ut(ue){return typeof Promise!="undefined"&&ue instanceof Promise||ue!==null&&typeof ue=="object"&&typeof ue.then=="function"&&typeof ue.catch=="function"}Bt.isPromise=ut;function dt(ue){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(ue):bt(ue)||he(ue)}Bt.isArrayBufferView=dt;function Pt(ue){return kt(ue)==="Uint8Array"}Bt.isUint8Array=Pt;function At(ue){return kt(ue)==="Uint8ClampedArray"}Bt.isUint8ClampedArray=At;function Dt(ue){return kt(ue)==="Uint16Array"}Bt.isUint16Array=Dt;function Ft(ue){return kt(ue)==="Uint32Array"}Bt.isUint32Array=Ft;function Nt(ue){return kt(ue)==="Int8Array"}Bt.isInt8Array=Nt;function jt(ue){return kt(ue)==="Int16Array"}Bt.isInt16Array=jt;function Gt(ue){return kt(ue)==="Int32Array"}Bt.isInt32Array=Gt;function Wt(ue){return kt(ue)==="Float32Array"}Bt.isFloat32Array=Wt;function Jt(ue){return kt(ue)==="Float64Array"}Bt.isFloat64Array=Jt;function Ut(ue){return kt(ue)==="BigInt64Array"}Bt.isBigInt64Array=Ut;function Ht(ue){return kt(ue)==="BigUint64Array"}Bt.isBigUint64Array=Ht;function oe(ue){return xt(ue)==="[object Map]"}oe.working=typeof Map!="undefined"&&oe(new Map);function se(ue){return typeof Map=="undefined"?!1:oe.working?oe(ue):ue instanceof Map}Bt.isMap=se;function ce(ue){return xt(ue)==="[object Set]"}ce.working=typeof Set!="undefined"&&ce(new Set);function Pe(ue){return typeof Set=="undefined"?!1:ce.working?ce(ue):ue instanceof Set}Bt.isSet=Pe;function Yt(ue){return xt(ue)==="[object WeakMap]"}Yt.working=typeof WeakMap!="undefined"&&Yt(new WeakMap);function ne(ue){return typeof WeakMap=="undefined"?!1:Yt.working?Yt(ue):ue instanceof WeakMap}Bt.isWeakMap=ne;function ve(ue){return xt(ue)==="[object WeakSet]"}ve.working=typeof WeakSet!="undefined"&&ve(new WeakSet);function Se(ue){return ve(ue)}Bt.isWeakSet=Se;function be(ue){return xt(ue)==="[object ArrayBuffer]"}be.working=typeof ArrayBuffer!="undefined"&&be(new ArrayBuffer);function fe(ue){return typeof ArrayBuffer=="undefined"?!1:be.working?be(ue):ue instanceof ArrayBuffer}Bt.isArrayBuffer=fe;function pe(ue){return xt(ue)==="[object DataView]"}pe.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&pe(new DataView(new ArrayBuffer(1),0,1));function he(ue){return typeof DataView=="undefined"?!1:pe.working?pe(ue):ue instanceof DataView}Bt.isDataView=he;var Ce=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function de(ue){return xt(ue)==="[object SharedArrayBuffer]"}function ye(ue){return typeof Ce=="undefined"?!1:(typeof de.working=="undefined"&&(de.working=de(new Ce)),de.working?de(ue):ue instanceof Ce)}Bt.isSharedArrayBuffer=ye;function Ne(ue){return xt(ue)==="[object AsyncFunction]"}Bt.isAsyncFunction=Ne;function xe(ue){return xt(ue)==="[object Map Iterator]"}Bt.isMapIterator=xe;function re(ue){return xt(ue)==="[object Set Iterator]"}Bt.isSetIterator=re;function Kt(ue){return xt(ue)==="[object Generator]"}Bt.isGeneratorObject=Kt;function wt(ue){return xt(ue)==="[object WebAssembly.Module]"}Bt.isWebAssemblyCompiledModule=wt;function Lt(ue){return lt(ue,ft)}Bt.isNumberObject=Lt;function Xt(ue){return lt(ue,z)}Bt.isStringObject=Xt;function ee(ue){return lt(ue,tt)}Bt.isBooleanObject=ee;function It(ue){return Tt&<(ue,at)}Bt.isBigIntObject=It;function Rt(ue){return mt&<(ue,it)}Bt.isSymbolObject=Rt;function Vt(ue){return Lt(ue)||Xt(ue)||ee(ue)||It(ue)||Rt(ue)}Bt.isBoxedPrimitive=Vt;function $t(ue){return typeof Uint8Array!="undefined"&&(fe(ue)||ye(ue))}Bt.isAnyArrayBuffer=$t,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ue){Object.defineProperty(Bt,ue,{enumerable:!1,value:function(){throw new Error(ue+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(ot,_t,Bt){(function(vt){(function(){var gt=Object.getOwnPropertyDescriptors||function(Ce){for(var de=Object.keys(Ce),ye={},Ne=0;Ne<de.length;Ne++)ye[de[Ne]]=Object.getOwnPropertyDescriptor(Ce,de[Ne]);return ye},kt=/%[sdj%]/g;Bt.format=function(he){if(!jt(he)){for(var Ce=[],de=0;de<arguments.length;de++)Ce.push(mt(arguments[de]));return Ce.join(" ")}for(var de=1,ye=arguments,Ne=ye.length,xe=String(he).replace(kt,function(Kt){if(Kt==="%%")return"%";if(de>=Ne)return Kt;switch(Kt){case"%s":return String(ye[de++]);case"%d":return Number(ye[de++]);case"%j":try{return JSON.stringify(ye[de++])}catch(wt){return"[Circular]"}default:return Kt}}),re=ye[de];de<Ne;re=ye[++de])Dt(re)||!Ut(re)?xe+=" "+re:xe+=" "+mt(re);return xe},Bt.deprecate=function(he,Ce){if(typeof vt!="undefined"&&vt.noDeprecation===!0)return he;if(typeof vt=="undefined")return function(){return Bt.deprecate(he,Ce).apply(this,arguments)};var de=!1;function ye(){if(!de){if(vt.throwDeprecation)throw new Error(Ce);vt.traceDeprecation?console.trace(Ce):console.error(Ce),de=!0}return he.apply(this,arguments)}return ye};var bt={},St=/^$/;if(vt.env.NODE_DEBUG){var Tt=vt.env.NODE_DEBUG;Tt=Tt.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),St=new RegExp("^"+Tt+"$","i")}Bt.debuglog=function(he){if(he=he.toUpperCase(),!bt[he])if(St.test(he)){var Ce=vt.pid;bt[he]=function(){var de=Bt.format.apply(Bt,arguments);console.error("%s %d: %s",he,Ce,de)}}else bt[he]=function(){};return bt[he]};function mt(he,Ce){var de={seen:[],stylize:ft};return arguments.length>=3&&(de.depth=arguments[2]),arguments.length>=4&&(de.colors=arguments[3]),At(Ce)?de.showHidden=Ce:Ce&&Bt._extend(de,Ce),Wt(de.showHidden)&&(de.showHidden=!1),Wt(de.depth)&&(de.depth=2),Wt(de.colors)&&(de.colors=!1),Wt(de.customInspect)&&(de.customInspect=!0),de.colors&&(de.stylize=xt),tt(de,he,de.depth)}Bt.inspect=mt,mt.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]},mt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function xt(he,Ce){var de=mt.styles[Ce];return de?"\x1B["+mt.colors[de][0]+"m"+he+"\x1B["+mt.colors[de][1]+"m":he}function ft(he,Ce){return he}function z(he){var Ce={};return he.forEach(function(de,ye){Ce[de]=!0}),Ce}function tt(he,Ce,de){if(he.customInspect&&Ce&&se(Ce.inspect)&&Ce.inspect!==Bt.inspect&&!(Ce.constructor&&Ce.constructor.prototype===Ce)){var ye=Ce.inspect(de,he);return jt(ye)||(ye=tt(he,ye,de)),ye}var Ne=at(he,Ce);if(Ne)return Ne;var xe=Object.keys(Ce),re=z(xe);if(he.showHidden&&(xe=Object.getOwnPropertyNames(Ce)),oe(Ce)&&(xe.indexOf("message")>=0||xe.indexOf("description")>=0))return it(Ce);if(xe.length===0){if(se(Ce)){var Kt=Ce.name?": "+Ce.name:"";return he.stylize("[Function"+Kt+"]","special")}if(Jt(Ce))return he.stylize(RegExp.prototype.toString.call(Ce),"regexp");if(Ht(Ce))return he.stylize(Date.prototype.toString.call(Ce),"date");if(oe(Ce))return it(Ce)}var wt="",Lt=!1,Xt=["{","}"];if(Pt(Ce)&&(Lt=!0,Xt=["[","]"]),se(Ce)){var ee=Ce.name?": "+Ce.name:"";wt=" [Function"+ee+"]"}if(Jt(Ce)&&(wt=" "+RegExp.prototype.toString.call(Ce)),Ht(Ce)&&(wt=" "+Date.prototype.toUTCString.call(Ce)),oe(Ce)&&(wt=" "+it(Ce)),xe.length===0&&(!Lt||Ce.length==0))return Xt[0]+wt+Xt[1];if(de<0)return Jt(Ce)?he.stylize(RegExp.prototype.toString.call(Ce),"regexp"):he.stylize("[Object]","special");he.seen.push(Ce);var It;return Lt?It=lt(he,Ce,de,re,xe):It=xe.map(function(Rt){return ut(he,Ce,de,re,Rt,Lt)}),he.seen.pop(),dt(It,wt,Xt)}function at(he,Ce){if(Wt(Ce))return he.stylize("undefined","undefined");if(jt(Ce)){var de="'"+JSON.stringify(Ce).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return he.stylize(de,"string")}if(Nt(Ce))return he.stylize(""+Ce,"number");if(At(Ce))return he.stylize(""+Ce,"boolean");if(Dt(Ce))return he.stylize("null","null")}function it(he){return"["+Error.prototype.toString.call(he)+"]"}function lt(he,Ce,de,ye,Ne){for(var xe=[],re=0,Kt=Ce.length;re<Kt;++re)Se(Ce,String(re))?xe.push(ut(he,Ce,de,ye,String(re),!0)):xe.push("");return Ne.forEach(function(wt){wt.match(/^\d+$/)||xe.push(ut(he,Ce,de,ye,wt,!0))}),xe}function ut(he,Ce,de,ye,Ne,xe){var re,Kt,wt;if(wt=Object.getOwnPropertyDescriptor(Ce,Ne)||{value:Ce[Ne]},wt.get?wt.set?Kt=he.stylize("[Getter/Setter]","special"):Kt=he.stylize("[Getter]","special"):wt.set&&(Kt=he.stylize("[Setter]","special")),Se(ye,Ne)||(re="["+Ne+"]"),Kt||(he.seen.indexOf(wt.value)<0?(Dt(de)?Kt=tt(he,wt.value,null):Kt=tt(he,wt.value,de-1),Kt.indexOf(`
|
|
`)>-1&&(xe?Kt=Kt.split(`
|
|
`).map(function(Lt){return" "+Lt}).join(`
|
|
`).slice(2):Kt=`
|
|
`+Kt.split(`
|
|
`).map(function(Lt){return" "+Lt}).join(`
|
|
`))):Kt=he.stylize("[Circular]","special")),Wt(re)){if(xe&&Ne.match(/^\d+$/))return Kt;re=JSON.stringify(""+Ne),re.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(re=re.slice(1,-1),re=he.stylize(re,"name")):(re=re.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),re=he.stylize(re,"string"))}return re+": "+Kt}function dt(he,Ce,de){var ye=0,Ne=he.reduce(function(xe,re){return ye++,re.indexOf(`
|
|
`)>=0&&ye++,xe+re.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Ne>60?de[0]+(Ce===""?"":Ce+`
|
|
`)+" "+he.join(`,
|
|
`)+" "+de[1]:de[0]+Ce+" "+he.join(", ")+" "+de[1]}Bt.types=ot("./support/types");function Pt(he){return Array.isArray(he)}Bt.isArray=Pt;function At(he){return typeof he=="boolean"}Bt.isBoolean=At;function Dt(he){return he===null}Bt.isNull=Dt;function Ft(he){return he==null}Bt.isNullOrUndefined=Ft;function Nt(he){return typeof he=="number"}Bt.isNumber=Nt;function jt(he){return typeof he=="string"}Bt.isString=jt;function Gt(he){return typeof he=="symbol"}Bt.isSymbol=Gt;function Wt(he){return he===void 0}Bt.isUndefined=Wt;function Jt(he){return Ut(he)&&Pe(he)==="[object RegExp]"}Bt.isRegExp=Jt,Bt.types.isRegExp=Jt;function Ut(he){return typeof he=="object"&&he!==null}Bt.isObject=Ut;function Ht(he){return Ut(he)&&Pe(he)==="[object Date]"}Bt.isDate=Ht,Bt.types.isDate=Ht;function oe(he){return Ut(he)&&(Pe(he)==="[object Error]"||he instanceof Error)}Bt.isError=oe,Bt.types.isNativeError=oe;function se(he){return typeof he=="function"}Bt.isFunction=se;function ce(he){return he===null||typeof he=="boolean"||typeof he=="number"||typeof he=="string"||typeof he=="symbol"||typeof he=="undefined"}Bt.isPrimitive=ce,Bt.isBuffer=ot("./support/isBuffer");function Pe(he){return Object.prototype.toString.call(he)}function Yt(he){return he<10?"0"+he.toString(10):he.toString(10)}var ne=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ve(){var he=new Date,Ce=[Yt(he.getHours()),Yt(he.getMinutes()),Yt(he.getSeconds())].join(":");return[he.getDate(),ne[he.getMonth()],Ce].join(" ")}Bt.log=function(){console.log("%s - %s",ve(),Bt.format.apply(Bt,arguments))},Bt.inherits=ot("inherits"),Bt._extend=function(he,Ce){if(!Ce||!Ut(Ce))return he;for(var de=Object.keys(Ce),ye=de.length;ye--;)he[de[ye]]=Ce[de[ye]];return he};function Se(he,Ce){return Object.prototype.hasOwnProperty.call(he,Ce)}var be=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;Bt.promisify=function(Ce){if(typeof Ce!="function")throw new TypeError('The "original" argument must be of type Function');if(be&&Ce[be]){var de=Ce[be];if(typeof de!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(de,be,{value:de,enumerable:!1,writable:!1,configurable:!0}),de}function de(){for(var ye,Ne,xe=new Promise(function(wt,Lt){ye=wt,Ne=Lt}),re=[],Kt=0;Kt<arguments.length;Kt++)re.push(arguments[Kt]);re.push(function(wt,Lt){wt?Ne(wt):ye(Lt)});try{Ce.apply(this,re)}catch(wt){Ne(wt)}return xe}return Object.setPrototypeOf(de,Object.getPrototypeOf(Ce)),be&&Object.defineProperty(de,be,{value:de,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(de,gt(Ce))},Bt.promisify.custom=be;function fe(he,Ce){if(!he){var de=new Error("Promise was rejected with a falsy value");de.reason=he,he=de}return Ce(he)}function pe(he){if(typeof he!="function")throw new TypeError('The "original" argument must be of type Function');function Ce(){for(var de=[],ye=0;ye<arguments.length;ye++)de.push(arguments[ye]);var Ne=de.pop();if(typeof Ne!="function")throw new TypeError("The last argument must be of type Function");var xe=this,re=function(){return Ne.apply(xe,arguments)};he.apply(this,de).then(function(Kt){vt.nextTick(re.bind(null,null,Kt))},function(Kt){vt.nextTick(fe.bind(null,Kt,re))})}return Object.setPrototypeOf(Ce,Object.getPrototypeOf(he)),Object.defineProperties(Ce,gt(he)),Ce}Bt.callbackify=pe}).call(this)}).call(this,ot("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=ot("for-each"),kt=ot("available-typed-arrays"),bt=ot("call-bind"),St=ot("call-bind/callBound"),Tt=ot("gopd"),mt=St("Object.prototype.toString"),xt=ot("has-tostringtag/shams")(),ft=typeof globalThis=="undefined"?vt:globalThis,z=kt(),tt=St("String.prototype.slice"),at=Object.getPrototypeOf,it=St("Array.prototype.indexOf",!0)||function(At,Dt){for(var Ft=0;Ft<At.length;Ft+=1)if(At[Ft]===Dt)return Ft;return-1},lt={__proto__:null};xt&&Tt&&at?gt(z,function(Pt){var At=new ft[Pt];if(Symbol.toStringTag in At){var Dt=at(At),Ft=Tt(Dt,Symbol.toStringTag);if(!Ft){var Nt=at(Dt);Ft=Tt(Nt,Symbol.toStringTag)}lt["$"+Pt]=bt(Ft.get)}}):gt(z,function(Pt){var At=new ft[Pt];lt["$"+Pt]=bt(At.slice)});var ut=function(At){var Dt=!1;return gt(lt,function(Ft,Nt){if(!Dt)try{"$"+Ft(At)===Nt&&(Dt=tt(Nt,1))}catch(jt){}}),Dt},dt=function(At){var Dt=!1;return gt(lt,function(Ft,Nt){if(!Dt)try{Ft(At),Dt=tt(Nt,1)}catch(jt){}}),Dt};_t.exports=function(At){if(!At||typeof At!="object")return!1;if(!xt){var Dt=tt(mt(At),8,-1);return it(z,Dt)>-1?Dt:Dt!=="Object"?!1:dt(At)}return Tt?ut(At):null}}).call(this)}).call(this,typeof fn!="undefined"?fn: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(ot,_t,Bt){(function(){"use strict";Bt.stripBOM=function(vt){return vt[0]==="\uFEFF"?vt.substring(1):vt}}).call(this)},{}],422:[function(ot,_t,Bt){(function(){"use strict";var vt,gt,kt,bt,St,Tt={}.hasOwnProperty;vt=ot("xmlbuilder"),gt=ot("./defaults").defaults,bt=function(mt){return typeof mt=="string"&&(mt.indexOf("&")>=0||mt.indexOf(">")>=0||mt.indexOf("<")>=0)},St=function(mt){return"<![CDATA["+kt(mt)+"]]>"},kt=function(mt){return mt.replace("]]>","]]]]><![CDATA[>")},Bt.Builder=function(){function mt(xt){var ft,z,tt;this.options={},z=gt["0.2"];for(ft in z)Tt.call(z,ft)&&(tt=z[ft],this.options[ft]=tt);for(ft in xt)Tt.call(xt,ft)&&(tt=xt[ft],this.options[ft]=tt)}return mt.prototype.buildObject=function(xt){var ft,z,tt,at,it;return ft=this.options.attrkey,z=this.options.charkey,Object.keys(xt).length===1&&this.options.rootName===gt["0.2"].rootName?(it=Object.keys(xt)[0],xt=xt[it]):it=this.options.rootName,tt=function(lt){return function(ut,dt){var Pt,At,Dt,Ft,Nt,jt;if(typeof dt!="object")lt.options.cdata&&bt(dt)?ut.raw(St(dt)):ut.txt(dt);else if(Array.isArray(dt)){for(Ft in dt)if(Tt.call(dt,Ft)){At=dt[Ft];for(Nt in At)Dt=At[Nt],ut=tt(ut.ele(Nt),Dt).up()}}else for(Nt in dt)if(Tt.call(dt,Nt))if(At=dt[Nt],Nt===ft){if(typeof At=="object")for(Pt in At)jt=At[Pt],ut=ut.att(Pt,jt)}else if(Nt===z)lt.options.cdata&&bt(At)?ut=ut.raw(St(At)):ut=ut.txt(At);else if(Array.isArray(At))for(Ft in At)Tt.call(At,Ft)&&(Dt=At[Ft],typeof Dt=="string"?lt.options.cdata&&bt(Dt)?ut=ut.ele(Nt).raw(St(Dt)).up():ut=ut.ele(Nt,Dt).up():ut=tt(ut.ele(Nt),Dt).up());else typeof At=="object"?ut=tt(ut.ele(Nt),At).up():typeof At=="string"&<.options.cdata&&bt(At)?ut=ut.ele(Nt).raw(St(At)).up():(At==null&&(At=""),ut=ut.ele(Nt,At.toString()).up());return ut}}(this),at=vt.create(it,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),tt(at,xt).end(this.options.renderOpts)},mt}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(ot,_t,Bt){(function(){Bt.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(ot,_t,Bt){(function(){"use strict";var vt,gt,kt,bt,St,Tt,mt,xt,ft,z=function(it,lt){return function(){return it.apply(lt,arguments)}},tt=function(it,lt){for(var ut in lt)at.call(lt,ut)&&(it[ut]=lt[ut]);function dt(){this.constructor=it}return dt.prototype=lt.prototype,it.prototype=new dt,it.__super__=lt.prototype,it},at={}.hasOwnProperty;xt=ot("sax"),bt=ot("events"),vt=ot("./bom"),mt=ot("./processors"),ft=ot("timers").setImmediate,gt=ot("./defaults").defaults,St=function(it){return typeof it=="object"&&it!=null&&Object.keys(it).length===0},Tt=function(it,lt,ut){var dt,Pt,At;for(dt=0,Pt=it.length;dt<Pt;dt++)At=it[dt],lt=At(lt,ut);return lt},kt=function(it,lt,ut){var dt;return dt=Object.create(null),dt.value=ut,dt.writable=!0,dt.enumerable=!0,dt.configurable=!0,Object.defineProperty(it,lt,dt)},Bt.Parser=function(it){tt(lt,it);function lt(ut){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 dt,Pt,At;if(!(this instanceof Bt.Parser))return new Bt.Parser(ut);this.options={},Pt=gt["0.2"];for(dt in Pt)at.call(Pt,dt)&&(At=Pt[dt],this.options[dt]=At);for(dt in ut)at.call(ut,dt)&&(At=ut[dt],this.options[dt]=At);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(mt.normalize)),this.reset()}return lt.prototype.processAsync=function(){var ut,dt;try{return this.remaining.length<=this.options.chunkSize?(ut=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(ut),this.saxParser.close()):(ut=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(ut),ft(this.processAsync))}catch(Pt){if(dt=Pt,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(dt)}},lt.prototype.assignOrPush=function(ut,dt,Pt){return dt in ut?(ut[dt]instanceof Array||kt(ut,dt,[ut[dt]]),ut[dt].push(Pt)):this.options.explicitArray?kt(ut,dt,[Pt]):kt(ut,dt,Pt)},lt.prototype.reset=function(){var ut,dt,Pt,At;return this.removeAllListeners(),this.saxParser=xt.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Dt){return function(Ft){if(Dt.saxParser.resume(),!Dt.saxParser.errThrown)return Dt.saxParser.errThrown=!0,Dt.emit("error",Ft)}}(this),this.saxParser.onend=function(Dt){return function(){if(!Dt.saxParser.ended)return Dt.saxParser.ended=!0,Dt.emit("end",Dt.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,At=[],ut=this.options.attrkey,dt=this.options.charkey,this.saxParser.onopentag=function(Dt){return function(Ft){var Nt,jt,Gt,Wt,Jt;if(Gt={},Gt[dt]="",!Dt.options.ignoreAttrs){Jt=Ft.attributes;for(Nt in Jt)at.call(Jt,Nt)&&(!(ut in Gt)&&!Dt.options.mergeAttrs&&(Gt[ut]={}),jt=Dt.options.attrValueProcessors?Tt(Dt.options.attrValueProcessors,Ft.attributes[Nt],Nt):Ft.attributes[Nt],Wt=Dt.options.attrNameProcessors?Tt(Dt.options.attrNameProcessors,Nt):Nt,Dt.options.mergeAttrs?Dt.assignOrPush(Gt,Wt,jt):kt(Gt[ut],Wt,jt))}return Gt["#name"]=Dt.options.tagNameProcessors?Tt(Dt.options.tagNameProcessors,Ft.name):Ft.name,Dt.options.xmlns&&(Gt[Dt.options.xmlnskey]={uri:Ft.uri,local:Ft.local}),At.push(Gt)}}(this),this.saxParser.onclosetag=function(Dt){return function(){var Ft,Nt,jt,Gt,Wt,Jt,Ut,Ht,oe,se;if(Jt=At.pop(),Wt=Jt["#name"],(!Dt.options.explicitChildren||!Dt.options.preserveChildrenOrder)&&delete Jt["#name"],Jt.cdata===!0&&(Ft=Jt.cdata,delete Jt.cdata),oe=At[At.length-1],Jt[dt].match(/^\s*$/)&&!Ft?(Nt=Jt[dt],delete Jt[dt]):(Dt.options.trim&&(Jt[dt]=Jt[dt].trim()),Dt.options.normalize&&(Jt[dt]=Jt[dt].replace(/\s{2,}/g," ").trim()),Jt[dt]=Dt.options.valueProcessors?Tt(Dt.options.valueProcessors,Jt[dt],Wt):Jt[dt],Object.keys(Jt).length===1&&dt in Jt&&!Dt.EXPLICIT_CHARKEY&&(Jt=Jt[dt])),St(Jt)&&(typeof Dt.options.emptyTag=="function"?Jt=Dt.options.emptyTag():Jt=Dt.options.emptyTag!==""?Dt.options.emptyTag:Nt),Dt.options.validator!=null&&(se="/"+function(){var ce,Pe,Yt;for(Yt=[],ce=0,Pe=At.length;ce<Pe;ce++)Gt=At[ce],Yt.push(Gt["#name"]);return Yt}().concat(Wt).join("/"),function(){var ce;try{return Jt=Dt.options.validator(se,oe&&oe[Wt],Jt)}catch(Pe){return ce=Pe,Dt.emit("error",ce)}}()),Dt.options.explicitChildren&&!Dt.options.mergeAttrs&&typeof Jt=="object"){if(!Dt.options.preserveChildrenOrder)Gt={},Dt.options.attrkey in Jt&&(Gt[Dt.options.attrkey]=Jt[Dt.options.attrkey],delete Jt[Dt.options.attrkey]),!Dt.options.charsAsChildren&&Dt.options.charkey in Jt&&(Gt[Dt.options.charkey]=Jt[Dt.options.charkey],delete Jt[Dt.options.charkey]),Object.getOwnPropertyNames(Jt).length>0&&(Gt[Dt.options.childkey]=Jt),Jt=Gt;else if(oe){oe[Dt.options.childkey]=oe[Dt.options.childkey]||[],Ut={};for(jt in Jt)at.call(Jt,jt)&&kt(Ut,jt,Jt[jt]);oe[Dt.options.childkey].push(Ut),delete Jt["#name"],Object.keys(Jt).length===1&&dt in Jt&&!Dt.EXPLICIT_CHARKEY&&(Jt=Jt[dt])}}return At.length>0?Dt.assignOrPush(oe,Wt,Jt):(Dt.options.explicitRoot&&(Ht=Jt,Jt={},kt(Jt,Wt,Ht)),Dt.resultObject=Jt,Dt.saxParser.ended=!0,Dt.emit("end",Dt.resultObject))}}(this),Pt=function(Dt){return function(Ft){var Nt,jt;if(jt=At[At.length-1],jt)return jt[dt]+=Ft,Dt.options.explicitChildren&&Dt.options.preserveChildrenOrder&&Dt.options.charsAsChildren&&(Dt.options.includeWhiteChars||Ft.replace(/\\n/g,"").trim()!=="")&&(jt[Dt.options.childkey]=jt[Dt.options.childkey]||[],Nt={"#name":"__text__"},Nt[dt]=Ft,Dt.options.normalize&&(Nt[dt]=Nt[dt].replace(/\s{2,}/g," ").trim()),jt[Dt.options.childkey].push(Nt)),jt}}(this),this.saxParser.ontext=Pt,this.saxParser.oncdata=function(Dt){return function(Ft){var Nt;if(Nt=Pt(Ft),Nt)return Nt.cdata=!0}}(this)},lt.prototype.parseString=function(ut,dt){var Pt;dt!=null&&typeof dt=="function"&&(this.on("end",function(At){return this.reset(),dt(null,At)}),this.on("error",function(At){return this.reset(),dt(At)}));try{return ut=ut.toString(),ut.trim()===""?(this.emit("end",null),!0):(ut=vt.stripBOM(ut),this.options.async?(this.remaining=ut,ft(this.processAsync),this.saxParser):this.saxParser.write(ut).close())}catch(At){if(Pt=At,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw Pt}else return this.emit("error",Pt),this.saxParser.errThrown=!0}},lt.prototype.parseStringPromise=function(ut){return new Promise(function(dt){return function(Pt,At){return dt.parseString(ut,function(Dt,Ft){return Dt?At(Dt):Pt(Ft)})}}(this))},lt}(bt),Bt.parseString=function(it,lt,ut){var dt,Pt,At;return ut!=null?(typeof ut=="function"&&(dt=ut),typeof lt=="object"&&(Pt=lt)):(typeof lt=="function"&&(dt=lt),Pt={}),At=new Bt.Parser(Pt),At.parseString(it,dt)},Bt.parseStringPromise=function(it,lt){var ut,dt;return typeof lt=="object"&&(ut=lt),dt=new Bt.Parser(ut),dt.parseStringPromise(it)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(ot,_t,Bt){(function(){"use strict";var vt;vt=new RegExp(/(?!xmlns)^.*:/),Bt.normalize=function(gt){return gt.toLowerCase()},Bt.firstCharLowerCase=function(gt){return gt.charAt(0).toLowerCase()+gt.slice(1)},Bt.stripPrefix=function(gt){return gt.replace(vt,"")},Bt.parseNumbers=function(gt){return isNaN(gt)||(gt=gt%1===0?parseInt(gt,10):parseFloat(gt)),gt},Bt.parseBooleans=function(gt){return/^(?:true|false)$/i.test(gt)&&(gt=gt.toLowerCase()==="true"),gt}}).call(this)},{}],426:[function(ot,_t,Bt){(function(){"use strict";var vt,gt,kt,bt,St=function(mt,xt){for(var ft in xt)Tt.call(xt,ft)&&(mt[ft]=xt[ft]);function z(){this.constructor=mt}return z.prototype=xt.prototype,mt.prototype=new z,mt.__super__=xt.prototype,mt},Tt={}.hasOwnProperty;gt=ot("./defaults"),vt=ot("./builder"),kt=ot("./parser"),bt=ot("./processors"),Bt.defaults=gt.defaults,Bt.processors=bt,Bt.ValidationError=function(mt){St(xt,mt);function xt(ft){this.message=ft}return xt}(Error),Bt.Builder=vt.Builder,Bt.Parser=kt.Parser,Bt.parseString=kt.parseString,Bt.parseStringPromise=kt.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(ot,_t,Bt){(function(){_t.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(ot,_t,Bt){(function(){_t.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(ot,_t,Bt){(function(){var vt,gt,kt,bt,St,Tt,mt,xt=[].slice,ft={}.hasOwnProperty;vt=function(){var z,tt,at,it,lt,ut;if(ut=arguments[0],lt=2<=arguments.length?xt.call(arguments,1):[],St(Object.assign))Object.assign.apply(null,arguments);else for(z=0,at=lt.length;z<at;z++)if(it=lt[z],it!=null)for(tt in it)ft.call(it,tt)&&(ut[tt]=it[tt]);return ut},St=function(z){return!!z&&Object.prototype.toString.call(z)==="[object Function]"},Tt=function(z){var tt;return!!z&&((tt=typeof z)=="function"||tt==="object")},kt=function(z){return St(Array.isArray)?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"},bt=function(z){var tt;if(kt(z))return!z.length;for(tt in z)if(ft.call(z,tt))return!1;return!0},mt=function(z){var tt,at;return Tt(z)&&(at=Object.getPrototypeOf(z))&&(tt=at.constructor)&&typeof tt=="function"&&tt instanceof tt&&Function.prototype.toString.call(tt)===Function.prototype.toString.call(Object)},gt=function(z){return St(z.valueOf)?z.valueOf():z},_t.exports.assign=vt,_t.exports.isFunction=St,_t.exports.isObject=Tt,_t.exports.isArray=kt,_t.exports.isEmpty=bt,_t.exports.isPlainObject=mt,_t.exports.getValue=gt}).call(this)},{}],430:[function(ot,_t,Bt){(function(){_t.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(ot,_t,Bt){(function(){var vt,gt,kt;vt=ot("./NodeType"),kt=ot("./XMLNode"),_t.exports=gt=function(){function bt(St,Tt,mt){if(this.parent=St,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),Tt==null)throw new Error("Missing attribute name. "+this.debugInfo(Tt));this.name=this.stringify.name(Tt),this.value=this.stringify.attValue(mt),this.type=vt.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(bt.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(bt.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(bt.prototype,"textContent",{get:function(){return this.value},set:function(St){return this.value=St||""}}),Object.defineProperty(bt.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(bt.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(bt.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(bt.prototype,"specified",{get:function(){return!0}}),bt.prototype.clone=function(){return Object.create(this)},bt.prototype.toString=function(St){return this.options.writer.attribute(this,this.options.writer.filterOptions(St))},bt.prototype.debugInfo=function(St){return St=St||this.name,St==null?"parent: <"+this.parent.name+">":"attribute: {"+St+"}, parent: <"+this.parent.name+">"},bt.prototype.isEqualNode=function(St){return!(St.namespaceURI!==this.namespaceURI||St.prefix!==this.prefix||St.localName!==this.localName||St.value!==this.value)},bt}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},St={}.hasOwnProperty;vt=ot("./NodeType"),kt=ot("./XMLCharacterData"),_t.exports=gt=function(Tt){bt(mt,Tt);function mt(xt,ft){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=vt.CData,this.value=this.stringify.cdata(ft)}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.cdata(this,this.options.writer.filterOptions(xt))},mt}(kt)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(ot,_t,Bt){(function(){var vt,gt,kt=function(St,Tt){for(var mt in Tt)bt.call(Tt,mt)&&(St[mt]=Tt[mt]);function xt(){this.constructor=St}return xt.prototype=Tt.prototype,St.prototype=new xt,St.__super__=Tt.prototype,St},bt={}.hasOwnProperty;gt=ot("./XMLNode"),_t.exports=vt=function(St){kt(Tt,St);function Tt(mt){Tt.__super__.constructor.call(this,mt),this.value=""}return Object.defineProperty(Tt.prototype,"data",{get:function(){return this.value},set:function(mt){return this.value=mt||""}}),Object.defineProperty(Tt.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(Tt.prototype,"textContent",{get:function(){return this.value},set:function(mt){return this.value=mt||""}}),Tt.prototype.clone=function(){return Object.create(this)},Tt.prototype.substringData=function(mt,xt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Tt.prototype.appendData=function(mt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Tt.prototype.insertData=function(mt,xt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Tt.prototype.deleteData=function(mt,xt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Tt.prototype.replaceData=function(mt,xt,ft){throw new Error("This DOM method is not implemented."+this.debugInfo())},Tt.prototype.isEqualNode=function(mt){return!(!Tt.__super__.isEqualNode.apply(this,arguments).isEqualNode(mt)||mt.data!==this.data)},Tt}(gt)}).call(this)},{"./XMLNode":450}],434:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},St={}.hasOwnProperty;vt=ot("./NodeType"),gt=ot("./XMLCharacterData"),_t.exports=kt=function(Tt){bt(mt,Tt);function mt(xt,ft){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=vt.Comment,this.value=this.stringify.comment(ft)}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.comment(this,this.options.writer.filterOptions(xt))},mt}(gt)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(ot,_t,Bt){(function(){var vt,gt,kt;gt=ot("./XMLDOMErrorHandler"),kt=ot("./XMLDOMStringList"),_t.exports=vt=function(){function bt(){var St;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new gt,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=St=Object.create(this.defaultParams)}return Object.defineProperty(bt.prototype,"parameterNames",{get:function(){return new kt(Object.keys(this.defaultParams))}}),bt.prototype.getParameter=function(St){return this.params.hasOwnProperty(St)?this.params[St]:null},bt.prototype.canSetParameter=function(St,Tt){return!0},bt.prototype.setParameter=function(St,Tt){return Tt!=null?this.params[St]=Tt:delete this.params[St]},bt}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(ot,_t,Bt){(function(){var vt;_t.exports=vt=function(){function gt(){}return gt.prototype.handleError=function(kt){throw new Error(kt)},gt}()}).call(this)},{}],437:[function(ot,_t,Bt){(function(){var vt;_t.exports=vt=function(){function gt(){}return gt.prototype.hasFeature=function(kt,bt){return!0},gt.prototype.createDocumentType=function(kt,bt,St){throw new Error("This DOM method is not implemented.")},gt.prototype.createDocument=function(kt,bt,St){throw new Error("This DOM method is not implemented.")},gt.prototype.createHTMLDocument=function(kt){throw new Error("This DOM method is not implemented.")},gt.prototype.getFeature=function(kt,bt){throw new Error("This DOM method is not implemented.")},gt}()}).call(this)},{}],438:[function(ot,_t,Bt){(function(){var vt;_t.exports=vt=function(){function gt(kt){this.arr=kt||[]}return Object.defineProperty(gt.prototype,"length",{get:function(){return this.arr.length}}),gt.prototype.item=function(kt){return this.arr[kt]||null},gt.prototype.contains=function(kt){return this.arr.indexOf(kt)!==-1},gt}()}).call(this)},{}],439:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},St={}.hasOwnProperty;kt=ot("./XMLNode"),vt=ot("./NodeType"),_t.exports=gt=function(Tt){bt(mt,Tt);function mt(xt,ft,z,tt,at,it){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(z==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(ft));if(!tt)throw new Error("Missing DTD attribute type. "+this.debugInfo(ft));if(!at)throw new Error("Missing DTD attribute default. "+this.debugInfo(ft));if(at.indexOf("#")!==0&&(at="#"+at),!at.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(ft));if(it&&!at.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(ft));this.elementName=this.stringify.name(ft),this.type=vt.AttributeDeclaration,this.attributeName=this.stringify.name(z),this.attributeType=this.stringify.dtdAttType(tt),it&&(this.defaultValue=this.stringify.dtdAttDefault(it)),this.defaultValueType=at}return mt.prototype.toString=function(xt){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(xt))},mt}(kt)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},St={}.hasOwnProperty;kt=ot("./XMLNode"),vt=ot("./NodeType"),_t.exports=gt=function(Tt){bt(mt,Tt);function mt(xt,ft,z){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing DTD element name. "+this.debugInfo());z||(z="(#PCDATA)"),Array.isArray(z)&&(z="("+z.join(",")+")"),this.name=this.stringify.name(ft),this.type=vt.ElementDeclaration,this.value=this.stringify.dtdElementValue(z)}return mt.prototype.toString=function(xt){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(xt))},mt}(kt)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt,St=function(mt,xt){for(var ft in xt)Tt.call(xt,ft)&&(mt[ft]=xt[ft]);function z(){this.constructor=mt}return z.prototype=xt.prototype,mt.prototype=new z,mt.__super__=xt.prototype,mt},Tt={}.hasOwnProperty;bt=ot("./Utility").isObject,kt=ot("./XMLNode"),vt=ot("./NodeType"),_t.exports=gt=function(mt){St(xt,mt);function xt(ft,z,tt,at){if(xt.__super__.constructor.call(this,ft),tt==null)throw new Error("Missing DTD entity name. "+this.debugInfo(tt));if(at==null)throw new Error("Missing DTD entity value. "+this.debugInfo(tt));if(this.pe=!!z,this.name=this.stringify.name(tt),this.type=vt.EntityDeclaration,!bt(at))this.value=this.stringify.dtdEntityValue(at),this.internal=!0;else{if(!at.pubID&&!at.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(tt));if(at.pubID&&!at.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(tt));if(this.internal=!1,at.pubID!=null&&(this.pubID=this.stringify.dtdPubID(at.pubID)),at.sysID!=null&&(this.sysID=this.stringify.dtdSysID(at.sysID)),at.nData!=null&&(this.nData=this.stringify.dtdNData(at.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(tt))}}return Object.defineProperty(xt.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(xt.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(xt.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(xt.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(xt.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(xt.prototype,"xmlVersion",{get:function(){return null}}),xt.prototype.toString=function(ft){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(ft))},xt}(kt)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},St={}.hasOwnProperty;kt=ot("./XMLNode"),vt=ot("./NodeType"),_t.exports=gt=function(Tt){bt(mt,Tt);function mt(xt,ft,z){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing DTD notation name. "+this.debugInfo(ft));if(!z.pubID&&!z.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(ft));this.name=this.stringify.name(ft),this.type=vt.NotationDeclaration,z.pubID!=null&&(this.pubID=this.stringify.dtdPubID(z.pubID)),z.sysID!=null&&(this.sysID=this.stringify.dtdSysID(z.sysID))}return Object.defineProperty(mt.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(mt.prototype,"systemId",{get:function(){return this.sysID}}),mt.prototype.toString=function(xt){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(xt))},mt}(kt)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt,St=function(mt,xt){for(var ft in xt)Tt.call(xt,ft)&&(mt[ft]=xt[ft]);function z(){this.constructor=mt}return z.prototype=xt.prototype,mt.prototype=new z,mt.__super__=xt.prototype,mt},Tt={}.hasOwnProperty;bt=ot("./Utility").isObject,kt=ot("./XMLNode"),vt=ot("./NodeType"),_t.exports=gt=function(mt){St(xt,mt);function xt(ft,z,tt,at){var it;xt.__super__.constructor.call(this,ft),bt(z)&&(it=z,z=it.version,tt=it.encoding,at=it.standalone),z||(z="1.0"),this.type=vt.Declaration,this.version=this.stringify.xmlVersion(z),tt!=null&&(this.encoding=this.stringify.xmlEncoding(tt)),at!=null&&(this.standalone=this.stringify.xmlStandalone(at))}return xt.prototype.toString=function(ft){return this.options.writer.declaration(this,this.options.writer.filterOptions(ft))},xt}(kt)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt,St,Tt,mt,xt,ft,z=function(at,it){for(var lt in it)tt.call(it,lt)&&(at[lt]=it[lt]);function ut(){this.constructor=at}return ut.prototype=it.prototype,at.prototype=new ut,at.__super__=it.prototype,at},tt={}.hasOwnProperty;ft=ot("./Utility").isObject,xt=ot("./XMLNode"),vt=ot("./NodeType"),gt=ot("./XMLDTDAttList"),bt=ot("./XMLDTDEntity"),kt=ot("./XMLDTDElement"),St=ot("./XMLDTDNotation"),mt=ot("./XMLNamedNodeMap"),_t.exports=Tt=function(at){z(it,at);function it(lt,ut,dt){var Pt,At,Dt,Ft,Nt,jt;if(it.__super__.constructor.call(this,lt),this.type=vt.DocType,lt.children){for(Ft=lt.children,At=0,Dt=Ft.length;At<Dt;At++)if(Pt=Ft[At],Pt.type===vt.Element){this.name=Pt.name;break}}this.documentObject=lt,ft(ut)&&(Nt=ut,ut=Nt.pubID,dt=Nt.sysID),dt==null&&(jt=[ut,dt],dt=jt[0],ut=jt[1]),ut!=null&&(this.pubID=this.stringify.dtdPubID(ut)),dt!=null&&(this.sysID=this.stringify.dtdSysID(dt))}return Object.defineProperty(it.prototype,"entities",{get:function(){var lt,ut,dt,Pt,At;for(Pt={},At=this.children,ut=0,dt=At.length;ut<dt;ut++)lt=At[ut],lt.type===vt.EntityDeclaration&&!lt.pe&&(Pt[lt.name]=lt);return new mt(Pt)}}),Object.defineProperty(it.prototype,"notations",{get:function(){var lt,ut,dt,Pt,At;for(Pt={},At=this.children,ut=0,dt=At.length;ut<dt;ut++)lt=At[ut],lt.type===vt.NotationDeclaration&&(Pt[lt.name]=lt);return new mt(Pt)}}),Object.defineProperty(it.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(it.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(it.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),it.prototype.element=function(lt,ut){var dt;return dt=new kt(this,lt,ut),this.children.push(dt),this},it.prototype.attList=function(lt,ut,dt,Pt,At){var Dt;return Dt=new gt(this,lt,ut,dt,Pt,At),this.children.push(Dt),this},it.prototype.entity=function(lt,ut){var dt;return dt=new bt(this,!1,lt,ut),this.children.push(dt),this},it.prototype.pEntity=function(lt,ut){var dt;return dt=new bt(this,!0,lt,ut),this.children.push(dt),this},it.prototype.notation=function(lt,ut){var dt;return dt=new St(this,lt,ut),this.children.push(dt),this},it.prototype.toString=function(lt){return this.options.writer.docType(this,this.options.writer.filterOptions(lt))},it.prototype.ele=function(lt,ut){return this.element(lt,ut)},it.prototype.att=function(lt,ut,dt,Pt,At){return this.attList(lt,ut,dt,Pt,At)},it.prototype.ent=function(lt,ut){return this.entity(lt,ut)},it.prototype.pent=function(lt,ut){return this.pEntity(lt,ut)},it.prototype.not=function(lt,ut){return this.notation(lt,ut)},it.prototype.up=function(){return this.root()||this.documentObject},it.prototype.isEqualNode=function(lt){return!(!it.__super__.isEqualNode.apply(this,arguments).isEqualNode(lt)||lt.name!==this.name||lt.publicId!==this.publicId||lt.systemId!==this.systemId)},it}(xt)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt,St,Tt,mt,xt,ft=function(tt,at){for(var it in at)z.call(at,it)&&(tt[it]=at[it]);function lt(){this.constructor=tt}return lt.prototype=at.prototype,tt.prototype=new lt,tt.__super__=at.prototype,tt},z={}.hasOwnProperty;xt=ot("./Utility").isPlainObject,kt=ot("./XMLDOMImplementation"),gt=ot("./XMLDOMConfiguration"),St=ot("./XMLNode"),vt=ot("./NodeType"),mt=ot("./XMLStringifier"),Tt=ot("./XMLStringWriter"),_t.exports=bt=function(tt){ft(at,tt);function at(it){at.__super__.constructor.call(this,null),this.name="#document",this.type=vt.Document,this.documentURI=null,this.domConfig=new gt,it||(it={}),it.writer||(it.writer=new Tt),this.options=it,this.stringify=new mt(it)}return Object.defineProperty(at.prototype,"implementation",{value:new kt}),Object.defineProperty(at.prototype,"doctype",{get:function(){var it,lt,ut,dt;for(dt=this.children,lt=0,ut=dt.length;lt<ut;lt++)if(it=dt[lt],it.type===vt.DocType)return it;return null}}),Object.defineProperty(at.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(at.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(at.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(at.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===vt.Declaration?this.children[0].encoding:null}}),Object.defineProperty(at.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===vt.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(at.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===vt.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(at.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(at.prototype,"origin",{get:function(){return null}}),Object.defineProperty(at.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(at.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(at.prototype,"contentType",{get:function(){return null}}),at.prototype.end=function(it){var lt;return lt={},it?xt(it)&&(lt=it,it=this.options.writer):it=this.options.writer,it.document(this,it.filterOptions(lt))},at.prototype.toString=function(it){return this.options.writer.document(this,this.options.writer.filterOptions(it))},at.prototype.createElement=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createTextNode=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createComment=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createCDATASection=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createProcessingInstruction=function(it,lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createAttribute=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createEntityReference=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.getElementsByTagName=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.importNode=function(it,lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createElementNS=function(it,lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createAttributeNS=function(it,lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.getElementsByTagNameNS=function(it,lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.getElementById=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.adoptNode=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.renameNode=function(it,lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.getElementsByClassName=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createEvent=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createNodeIterator=function(it,lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createTreeWalker=function(it,lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},at}(St)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt,St,Tt,mt,xt,ft,z,tt,at,it,lt,ut,dt,Pt,At,Dt,Ft,Nt,jt,Gt,Wt,Jt={}.hasOwnProperty;Wt=ot("./Utility"),jt=Wt.isObject,Nt=Wt.isFunction,Gt=Wt.isPlainObject,Ft=Wt.getValue,vt=ot("./NodeType"),at=ot("./XMLDocument"),lt=ot("./XMLElement"),bt=ot("./XMLCData"),St=ot("./XMLComment"),dt=ot("./XMLRaw"),Dt=ot("./XMLText"),ut=ot("./XMLProcessingInstruction"),z=ot("./XMLDeclaration"),tt=ot("./XMLDocType"),Tt=ot("./XMLDTDAttList"),xt=ot("./XMLDTDEntity"),mt=ot("./XMLDTDElement"),ft=ot("./XMLDTDNotation"),kt=ot("./XMLAttribute"),At=ot("./XMLStringifier"),Pt=ot("./XMLStringWriter"),gt=ot("./WriterState"),_t.exports=it=function(){function Ut(Ht,oe,se){var ce;this.name="?xml",this.type=vt.Document,Ht||(Ht={}),ce={},Ht.writer?Gt(Ht.writer)&&(ce=Ht.writer,Ht.writer=new Pt):Ht.writer=new Pt,this.options=Ht,this.writer=Ht.writer,this.writerOptions=this.writer.filterOptions(ce),this.stringify=new At(Ht),this.onDataCallback=oe||function(){},this.onEndCallback=se||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Ut.prototype.createChildNode=function(Ht){var oe,se,ce,Pe,Yt,ne,ve,Se;switch(Ht.type){case vt.CData:this.cdata(Ht.value);break;case vt.Comment:this.comment(Ht.value);break;case vt.Element:ce={},ve=Ht.attribs;for(se in ve)Jt.call(ve,se)&&(oe=ve[se],ce[se]=oe.value);this.node(Ht.name,ce);break;case vt.Dummy:this.dummy();break;case vt.Raw:this.raw(Ht.value);break;case vt.Text:this.text(Ht.value);break;case vt.ProcessingInstruction:this.instruction(Ht.target,Ht.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+Ht.constructor.name)}for(Se=Ht.children,Yt=0,ne=Se.length;Yt<ne;Yt++)Pe=Se[Yt],this.createChildNode(Pe),Pe.type===vt.Element&&this.up();return this},Ut.prototype.dummy=function(){return this},Ut.prototype.node=function(Ht,oe,se){var ce;if(Ht==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(Ht));return this.openCurrent(),Ht=Ft(Ht),oe==null&&(oe={}),oe=Ft(oe),jt(oe)||(ce=[oe,se],se=ce[0],oe=ce[1]),this.currentNode=new lt(this,Ht,oe),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,se!=null&&this.text(se),this},Ut.prototype.element=function(Ht,oe,se){var ce,Pe,Yt,ne,ve,Se;if(this.currentNode&&this.currentNode.type===vt.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Ht)||jt(Ht)||Nt(Ht))for(ne=this.options.noValidation,this.options.noValidation=!0,Se=new at(this.options).element("TEMP_ROOT"),Se.element(Ht),this.options.noValidation=ne,ve=Se.children,Pe=0,Yt=ve.length;Pe<Yt;Pe++)ce=ve[Pe],this.createChildNode(ce),ce.type===vt.Element&&this.up();else this.node(Ht,oe,se);return this},Ut.prototype.attribute=function(Ht,oe){var se,ce;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Ht));if(Ht!=null&&(Ht=Ft(Ht)),jt(Ht))for(se in Ht)Jt.call(Ht,se)&&(ce=Ht[se],this.attribute(se,ce));else Nt(oe)&&(oe=oe.apply()),this.options.keepNullAttributes&&oe==null?this.currentNode.attribs[Ht]=new kt(this,Ht,""):oe!=null&&(this.currentNode.attribs[Ht]=new kt(this,Ht,oe));return this},Ut.prototype.text=function(Ht){var oe;return this.openCurrent(),oe=new Dt(this,Ht),this.onData(this.writer.text(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.cdata=function(Ht){var oe;return this.openCurrent(),oe=new bt(this,Ht),this.onData(this.writer.cdata(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.comment=function(Ht){var oe;return this.openCurrent(),oe=new St(this,Ht),this.onData(this.writer.comment(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.raw=function(Ht){var oe;return this.openCurrent(),oe=new dt(this,Ht),this.onData(this.writer.raw(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.instruction=function(Ht,oe){var se,ce,Pe,Yt,ne;if(this.openCurrent(),Ht!=null&&(Ht=Ft(Ht)),oe!=null&&(oe=Ft(oe)),Array.isArray(Ht))for(se=0,Yt=Ht.length;se<Yt;se++)ce=Ht[se],this.instruction(ce);else if(jt(Ht))for(ce in Ht)Jt.call(Ht,ce)&&(Pe=Ht[ce],this.instruction(ce,Pe));else Nt(oe)&&(oe=oe.apply()),ne=new ut(this,Ht,oe),this.onData(this.writer.processingInstruction(ne,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},Ut.prototype.declaration=function(Ht,oe,se){var ce;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ce=new z(this,Ht,oe,se),this.onData(this.writer.declaration(ce,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.doctype=function(Ht,oe,se){if(this.openCurrent(),Ht==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 tt(this,oe,se),this.currentNode.rootNodeName=Ht,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Ut.prototype.dtdElement=function(Ht,oe){var se;return this.openCurrent(),se=new mt(this,Ht,oe),this.onData(this.writer.dtdElement(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.attList=function(Ht,oe,se,ce,Pe){var Yt;return this.openCurrent(),Yt=new Tt(this,Ht,oe,se,ce,Pe),this.onData(this.writer.dtdAttList(Yt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.entity=function(Ht,oe){var se;return this.openCurrent(),se=new xt(this,!1,Ht,oe),this.onData(this.writer.dtdEntity(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.pEntity=function(Ht,oe){var se;return this.openCurrent(),se=new xt(this,!0,Ht,oe),this.onData(this.writer.dtdEntity(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.notation=function(Ht,oe){var se;return this.openCurrent(),se=new ft(this,Ht,oe),this.onData(this.writer.dtdNotation(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.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},Ut.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Ut.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Ut.prototype.openNode=function(Ht){var oe,se,ce,Pe;if(!Ht.isOpen){if(!this.root&&this.currentLevel===0&&Ht.type===vt.Element&&(this.root=Ht),se="",Ht.type===vt.Element){this.writerOptions.state=gt.OpenTag,se=this.writer.indent(Ht,this.writerOptions,this.currentLevel)+"<"+Ht.name,Pe=Ht.attribs;for(ce in Pe)Jt.call(Pe,ce)&&(oe=Pe[ce],se+=this.writer.attribute(oe,this.writerOptions,this.currentLevel));se+=(Ht.children?">":"/>")+this.writer.endline(Ht,this.writerOptions,this.currentLevel),this.writerOptions.state=gt.InsideTag}else this.writerOptions.state=gt.OpenTag,se=this.writer.indent(Ht,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+Ht.rootNodeName,Ht.pubID&&Ht.sysID?se+=' PUBLIC "'+Ht.pubID+'" "'+Ht.sysID+'"':Ht.sysID&&(se+=' SYSTEM "'+Ht.sysID+'"'),Ht.children?(se+=" [",this.writerOptions.state=gt.InsideTag):(this.writerOptions.state=gt.CloseTag,se+=">"),se+=this.writer.endline(Ht,this.writerOptions,this.currentLevel);return this.onData(se,this.currentLevel),Ht.isOpen=!0}},Ut.prototype.closeNode=function(Ht){var oe;if(!Ht.isClosed)return oe="",this.writerOptions.state=gt.CloseTag,Ht.type===vt.Element?oe=this.writer.indent(Ht,this.writerOptions,this.currentLevel)+"</"+Ht.name+">"+this.writer.endline(Ht,this.writerOptions,this.currentLevel):oe=this.writer.indent(Ht,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(Ht,this.writerOptions,this.currentLevel),this.writerOptions.state=gt.None,this.onData(oe,this.currentLevel),Ht.isClosed=!0},Ut.prototype.onData=function(Ht,oe){return this.documentStarted=!0,this.onDataCallback(Ht,oe+1)},Ut.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Ut.prototype.debugInfo=function(Ht){return Ht==null?"":"node: <"+Ht+">"},Ut.prototype.ele=function(){return this.element.apply(this,arguments)},Ut.prototype.nod=function(Ht,oe,se){return this.node(Ht,oe,se)},Ut.prototype.txt=function(Ht){return this.text(Ht)},Ut.prototype.dat=function(Ht){return this.cdata(Ht)},Ut.prototype.com=function(Ht){return this.comment(Ht)},Ut.prototype.ins=function(Ht,oe){return this.instruction(Ht,oe)},Ut.prototype.dec=function(Ht,oe,se){return this.declaration(Ht,oe,se)},Ut.prototype.dtd=function(Ht,oe,se){return this.doctype(Ht,oe,se)},Ut.prototype.e=function(Ht,oe,se){return this.element(Ht,oe,se)},Ut.prototype.n=function(Ht,oe,se){return this.node(Ht,oe,se)},Ut.prototype.t=function(Ht){return this.text(Ht)},Ut.prototype.d=function(Ht){return this.cdata(Ht)},Ut.prototype.c=function(Ht){return this.comment(Ht)},Ut.prototype.r=function(Ht){return this.raw(Ht)},Ut.prototype.i=function(Ht,oe){return this.instruction(Ht,oe)},Ut.prototype.att=function(){return this.currentNode&&this.currentNode.type===vt.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ut.prototype.a=function(){return this.currentNode&&this.currentNode.type===vt.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ut.prototype.ent=function(Ht,oe){return this.entity(Ht,oe)},Ut.prototype.pent=function(Ht,oe){return this.pEntity(Ht,oe)},Ut.prototype.not=function(Ht,oe){return this.notation(Ht,oe)},Ut}()}).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(ot,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},St={}.hasOwnProperty;kt=ot("./XMLNode"),vt=ot("./NodeType"),_t.exports=gt=function(Tt){bt(mt,Tt);function mt(xt){mt.__super__.constructor.call(this,xt),this.type=vt.Dummy}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return""},mt}(kt)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt,St,Tt,mt,xt,ft,z=function(at,it){for(var lt in it)tt.call(it,lt)&&(at[lt]=it[lt]);function ut(){this.constructor=at}return ut.prototype=it.prototype,at.prototype=new ut,at.__super__=it.prototype,at},tt={}.hasOwnProperty;ft=ot("./Utility"),xt=ft.isObject,mt=ft.isFunction,Tt=ft.getValue,St=ot("./XMLNode"),vt=ot("./NodeType"),gt=ot("./XMLAttribute"),bt=ot("./XMLNamedNodeMap"),_t.exports=kt=function(at){z(it,at);function it(lt,ut,dt){var Pt,At,Dt,Ft;if(it.__super__.constructor.call(this,lt),ut==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(ut),this.type=vt.Element,this.attribs={},this.schemaTypeInfo=null,dt!=null&&this.attribute(dt),lt.type===vt.Document&&(this.isRoot=!0,this.documentObject=lt,lt.rootObject=this,lt.children)){for(Ft=lt.children,At=0,Dt=Ft.length;At<Dt;At++)if(Pt=Ft[At],Pt.type===vt.DocType){Pt.name=this.name;break}}}return Object.defineProperty(it.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(it.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(it.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(it.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(it.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(it.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(it.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(it.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new bt(this.attribs)),this.attributeMap}}),it.prototype.clone=function(){var lt,ut,dt,Pt;dt=Object.create(this),dt.isRoot&&(dt.documentObject=null),dt.attribs={},Pt=this.attribs;for(ut in Pt)tt.call(Pt,ut)&&(lt=Pt[ut],dt.attribs[ut]=lt.clone());return dt.children=[],this.children.forEach(function(At){var Dt;return Dt=At.clone(),Dt.parent=dt,dt.children.push(Dt)}),dt},it.prototype.attribute=function(lt,ut){var dt,Pt;if(lt!=null&&(lt=Tt(lt)),xt(lt))for(dt in lt)tt.call(lt,dt)&&(Pt=lt[dt],this.attribute(dt,Pt));else mt(ut)&&(ut=ut.apply()),this.options.keepNullAttributes&&ut==null?this.attribs[lt]=new gt(this,lt,""):ut!=null&&(this.attribs[lt]=new gt(this,lt,ut));return this},it.prototype.removeAttribute=function(lt){var ut,dt,Pt;if(lt==null)throw new Error("Missing attribute name. "+this.debugInfo());if(lt=Tt(lt),Array.isArray(lt))for(dt=0,Pt=lt.length;dt<Pt;dt++)ut=lt[dt],delete this.attribs[ut];else delete this.attribs[lt];return this},it.prototype.toString=function(lt){return this.options.writer.element(this,this.options.writer.filterOptions(lt))},it.prototype.att=function(lt,ut){return this.attribute(lt,ut)},it.prototype.a=function(lt,ut){return this.attribute(lt,ut)},it.prototype.getAttribute=function(lt){return this.attribs.hasOwnProperty(lt)?this.attribs[lt].value:null},it.prototype.setAttribute=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getAttributeNode=function(lt){return this.attribs.hasOwnProperty(lt)?this.attribs[lt]:null},it.prototype.setAttributeNode=function(lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.removeAttributeNode=function(lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getElementsByTagName=function(lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getAttributeNS=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.setAttributeNS=function(lt,ut,dt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.removeAttributeNS=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getAttributeNodeNS=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.setAttributeNodeNS=function(lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getElementsByTagNameNS=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.hasAttribute=function(lt){return this.attribs.hasOwnProperty(lt)},it.prototype.hasAttributeNS=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.setIdAttribute=function(lt,ut){return this.attribs.hasOwnProperty(lt)?this.attribs[lt].isId:ut},it.prototype.setIdAttributeNS=function(lt,ut,dt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.setIdAttributeNode=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getElementsByTagName=function(lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getElementsByTagNameNS=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getElementsByClassName=function(lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.isEqualNode=function(lt){var ut,dt,Pt;if(!it.__super__.isEqualNode.apply(this,arguments).isEqualNode(lt)||lt.namespaceURI!==this.namespaceURI||lt.prefix!==this.prefix||lt.localName!==this.localName||lt.attribs.length!==this.attribs.length)return!1;for(ut=dt=0,Pt=this.attribs.length-1;0<=Pt?dt<=Pt:dt>=Pt;ut=0<=Pt?++dt:--dt)if(!this.attribs[ut].isEqualNode(lt.attribs[ut]))return!1;return!0},it}(St)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(ot,_t,Bt){(function(){var vt;_t.exports=vt=function(){function gt(kt){this.nodes=kt}return Object.defineProperty(gt.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),gt.prototype.clone=function(){return this.nodes=null},gt.prototype.getNamedItem=function(kt){return this.nodes[kt]},gt.prototype.setNamedItem=function(kt){var bt;return bt=this.nodes[kt.nodeName],this.nodes[kt.nodeName]=kt,bt||null},gt.prototype.removeNamedItem=function(kt){var bt;return bt=this.nodes[kt],delete this.nodes[kt],bt||null},gt.prototype.item=function(kt){return this.nodes[Object.keys(this.nodes)[kt]]||null},gt.prototype.getNamedItemNS=function(kt,bt){throw new Error("This DOM method is not implemented.")},gt.prototype.setNamedItemNS=function(kt){throw new Error("This DOM method is not implemented.")},gt.prototype.removeNamedItemNS=function(kt,bt){throw new Error("This DOM method is not implemented.")},gt}()}).call(this)},{}],450:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt,St,Tt,mt,xt,ft,z,tt,at,it,lt,ut,dt,Pt,At,Dt,Ft={}.hasOwnProperty;Dt=ot("./Utility"),At=Dt.isObject,Pt=Dt.isFunction,dt=Dt.isEmpty,ut=Dt.getValue,xt=null,kt=null,bt=null,St=null,Tt=null,it=null,lt=null,at=null,mt=null,gt=null,tt=null,ft=null,vt=null,_t.exports=z=function(){function Nt(jt){this.parent=jt,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,xt||(xt=ot("./XMLElement"),kt=ot("./XMLCData"),bt=ot("./XMLComment"),St=ot("./XMLDeclaration"),Tt=ot("./XMLDocType"),it=ot("./XMLRaw"),lt=ot("./XMLText"),at=ot("./XMLProcessingInstruction"),mt=ot("./XMLDummy"),gt=ot("./NodeType"),tt=ot("./XMLNodeList"),ft=ot("./XMLNamedNodeMap"),vt=ot("./DocumentPosition"))}return Object.defineProperty(Nt.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(Nt.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Nt.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(Nt.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(Nt.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new tt(this.children)),this.childNodeList}}),Object.defineProperty(Nt.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(Nt.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(Nt.prototype,"previousSibling",{get:function(){var jt;return jt=this.parent.children.indexOf(this),this.parent.children[jt-1]||null}}),Object.defineProperty(Nt.prototype,"nextSibling",{get:function(){var jt;return jt=this.parent.children.indexOf(this),this.parent.children[jt+1]||null}}),Object.defineProperty(Nt.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(Nt.prototype,"textContent",{get:function(){var jt,Gt,Wt,Jt,Ut;if(this.nodeType===gt.Element||this.nodeType===gt.DocumentFragment){for(Ut="",Jt=this.children,Gt=0,Wt=Jt.length;Gt<Wt;Gt++)jt=Jt[Gt],jt.textContent&&(Ut+=jt.textContent);return Ut}else return null},set:function(jt){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Nt.prototype.setParent=function(jt){var Gt,Wt,Jt,Ut,Ht;for(this.parent=jt,jt&&(this.options=jt.options,this.stringify=jt.stringify),Ut=this.children,Ht=[],Wt=0,Jt=Ut.length;Wt<Jt;Wt++)Gt=Ut[Wt],Ht.push(Gt.setParent(this));return Ht},Nt.prototype.element=function(jt,Gt,Wt){var Jt,Ut,Ht,oe,se,ce,Pe,Yt,ne,ve,Se;if(ce=null,Gt===null&&Wt==null&&(ne=[{},null],Gt=ne[0],Wt=ne[1]),Gt==null&&(Gt={}),Gt=ut(Gt),At(Gt)||(ve=[Gt,Wt],Wt=ve[0],Gt=ve[1]),jt!=null&&(jt=ut(jt)),Array.isArray(jt))for(Ht=0,Pe=jt.length;Ht<Pe;Ht++)Ut=jt[Ht],ce=this.element(Ut);else if(Pt(jt))ce=this.element(jt.apply());else if(At(jt)){for(se in jt)if(Ft.call(jt,se))if(Se=jt[se],Pt(Se)&&(Se=Se.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&se.indexOf(this.stringify.convertAttKey)===0)ce=this.attribute(se.substr(this.stringify.convertAttKey.length),Se);else if(!this.options.separateArrayItems&&Array.isArray(Se)&&dt(Se))ce=this.dummy();else if(At(Se)&&dt(Se))ce=this.element(se);else if(!this.options.keepNullNodes&&Se==null)ce=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(Se))for(oe=0,Yt=Se.length;oe<Yt;oe++)Ut=Se[oe],Jt={},Jt[se]=Ut,ce=this.element(Jt);else At(Se)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&se.indexOf(this.stringify.convertTextKey)===0?ce=this.element(Se):(ce=this.element(se),ce.element(Se)):ce=this.element(se,Se)}else!this.options.keepNullNodes&&Wt===null?ce=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&jt.indexOf(this.stringify.convertTextKey)===0?ce=this.text(Wt):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&jt.indexOf(this.stringify.convertCDataKey)===0?ce=this.cdata(Wt):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&jt.indexOf(this.stringify.convertCommentKey)===0?ce=this.comment(Wt):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&jt.indexOf(this.stringify.convertRawKey)===0?ce=this.raw(Wt):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&jt.indexOf(this.stringify.convertPIKey)===0?ce=this.instruction(jt.substr(this.stringify.convertPIKey.length),Wt):ce=this.node(jt,Gt,Wt);if(ce==null)throw new Error("Could not create any elements with: "+jt+". "+this.debugInfo());return ce},Nt.prototype.insertBefore=function(jt,Gt,Wt){var Jt,Ut,Ht,oe,se;if(jt!=null&&jt.type)return Ht=jt,oe=Gt,Ht.setParent(this),oe?(Ut=children.indexOf(oe),se=children.splice(Ut),children.push(Ht),Array.prototype.push.apply(children,se)):children.push(Ht),Ht;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(jt));return Ut=this.parent.children.indexOf(this),se=this.parent.children.splice(Ut),Jt=this.parent.element(jt,Gt,Wt),Array.prototype.push.apply(this.parent.children,se),Jt},Nt.prototype.insertAfter=function(jt,Gt,Wt){var Jt,Ut,Ht;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(jt));return Ut=this.parent.children.indexOf(this),Ht=this.parent.children.splice(Ut+1),Jt=this.parent.element(jt,Gt,Wt),Array.prototype.push.apply(this.parent.children,Ht),Jt},Nt.prototype.remove=function(){var jt,Gt;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return jt=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[jt,jt-jt+1].concat(Gt=[])),this.parent},Nt.prototype.node=function(jt,Gt,Wt){var Jt,Ut;return jt!=null&&(jt=ut(jt)),Gt||(Gt={}),Gt=ut(Gt),At(Gt)||(Ut=[Gt,Wt],Wt=Ut[0],Gt=Ut[1]),Jt=new xt(this,jt,Gt),Wt!=null&&Jt.text(Wt),this.children.push(Jt),Jt},Nt.prototype.text=function(jt){var Gt;return At(jt)&&this.element(jt),Gt=new lt(this,jt),this.children.push(Gt),this},Nt.prototype.cdata=function(jt){var Gt;return Gt=new kt(this,jt),this.children.push(Gt),this},Nt.prototype.comment=function(jt){var Gt;return Gt=new bt(this,jt),this.children.push(Gt),this},Nt.prototype.commentBefore=function(jt){var Gt,Wt,Jt;return Wt=this.parent.children.indexOf(this),Jt=this.parent.children.splice(Wt),Gt=this.parent.comment(jt),Array.prototype.push.apply(this.parent.children,Jt),this},Nt.prototype.commentAfter=function(jt){var Gt,Wt,Jt;return Wt=this.parent.children.indexOf(this),Jt=this.parent.children.splice(Wt+1),Gt=this.parent.comment(jt),Array.prototype.push.apply(this.parent.children,Jt),this},Nt.prototype.raw=function(jt){var Gt;return Gt=new it(this,jt),this.children.push(Gt),this},Nt.prototype.dummy=function(){var jt;return jt=new mt(this),jt},Nt.prototype.instruction=function(jt,Gt){var Wt,Jt,Ut,Ht,oe;if(jt!=null&&(jt=ut(jt)),Gt!=null&&(Gt=ut(Gt)),Array.isArray(jt))for(Ht=0,oe=jt.length;Ht<oe;Ht++)Wt=jt[Ht],this.instruction(Wt);else if(At(jt))for(Wt in jt)Ft.call(jt,Wt)&&(Jt=jt[Wt],this.instruction(Wt,Jt));else Pt(Gt)&&(Gt=Gt.apply()),Ut=new at(this,jt,Gt),this.children.push(Ut);return this},Nt.prototype.instructionBefore=function(jt,Gt){var Wt,Jt,Ut;return Jt=this.parent.children.indexOf(this),Ut=this.parent.children.splice(Jt),Wt=this.parent.instruction(jt,Gt),Array.prototype.push.apply(this.parent.children,Ut),this},Nt.prototype.instructionAfter=function(jt,Gt){var Wt,Jt,Ut;return Jt=this.parent.children.indexOf(this),Ut=this.parent.children.splice(Jt+1),Wt=this.parent.instruction(jt,Gt),Array.prototype.push.apply(this.parent.children,Ut),this},Nt.prototype.declaration=function(jt,Gt,Wt){var Jt,Ut;return Jt=this.document(),Ut=new St(Jt,jt,Gt,Wt),Jt.children.length===0?Jt.children.unshift(Ut):Jt.children[0].type===gt.Declaration?Jt.children[0]=Ut:Jt.children.unshift(Ut),Jt.root()||Jt},Nt.prototype.dtd=function(jt,Gt){var Wt,Jt,Ut,Ht,oe,se,ce,Pe,Yt,ne;for(Jt=this.document(),Ut=new Tt(Jt,jt,Gt),Yt=Jt.children,Ht=oe=0,ce=Yt.length;oe<ce;Ht=++oe)if(Wt=Yt[Ht],Wt.type===gt.DocType)return Jt.children[Ht]=Ut,Ut;for(ne=Jt.children,Ht=se=0,Pe=ne.length;se<Pe;Ht=++se)if(Wt=ne[Ht],Wt.isRoot)return Jt.children.splice(Ht,0,Ut),Ut;return Jt.children.push(Ut),Ut},Nt.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},Nt.prototype.root=function(){var jt;for(jt=this;jt;){if(jt.type===gt.Document)return jt.rootObject;if(jt.isRoot)return jt;jt=jt.parent}},Nt.prototype.document=function(){var jt;for(jt=this;jt;){if(jt.type===gt.Document)return jt;jt=jt.parent}},Nt.prototype.end=function(jt){return this.document().end(jt)},Nt.prototype.prev=function(){var jt;if(jt=this.parent.children.indexOf(this),jt<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[jt-1]},Nt.prototype.next=function(){var jt;if(jt=this.parent.children.indexOf(this),jt===-1||jt===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[jt+1]},Nt.prototype.importDocument=function(jt){var Gt;return Gt=jt.root().clone(),Gt.parent=this,Gt.isRoot=!1,this.children.push(Gt),this},Nt.prototype.debugInfo=function(jt){var Gt,Wt;return jt=jt||this.name,jt==null&&!((Gt=this.parent)!=null&&Gt.name)?"":jt==null?"parent: <"+this.parent.name+">":(Wt=this.parent)!=null&&Wt.name?"node: <"+jt+">, parent: <"+this.parent.name+">":"node: <"+jt+">"},Nt.prototype.ele=function(jt,Gt,Wt){return this.element(jt,Gt,Wt)},Nt.prototype.nod=function(jt,Gt,Wt){return this.node(jt,Gt,Wt)},Nt.prototype.txt=function(jt){return this.text(jt)},Nt.prototype.dat=function(jt){return this.cdata(jt)},Nt.prototype.com=function(jt){return this.comment(jt)},Nt.prototype.ins=function(jt,Gt){return this.instruction(jt,Gt)},Nt.prototype.doc=function(){return this.document()},Nt.prototype.dec=function(jt,Gt,Wt){return this.declaration(jt,Gt,Wt)},Nt.prototype.e=function(jt,Gt,Wt){return this.element(jt,Gt,Wt)},Nt.prototype.n=function(jt,Gt,Wt){return this.node(jt,Gt,Wt)},Nt.prototype.t=function(jt){return this.text(jt)},Nt.prototype.d=function(jt){return this.cdata(jt)},Nt.prototype.c=function(jt){return this.comment(jt)},Nt.prototype.r=function(jt){return this.raw(jt)},Nt.prototype.i=function(jt,Gt){return this.instruction(jt,Gt)},Nt.prototype.u=function(){return this.up()},Nt.prototype.importXMLBuilder=function(jt){return this.importDocument(jt)},Nt.prototype.replaceChild=function(jt,Gt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Nt.prototype.removeChild=function(jt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Nt.prototype.appendChild=function(jt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Nt.prototype.hasChildNodes=function(){return this.children.length!==0},Nt.prototype.cloneNode=function(jt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Nt.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},Nt.prototype.isSupported=function(jt,Gt){return!0},Nt.prototype.hasAttributes=function(){return this.attribs.length!==0},Nt.prototype.compareDocumentPosition=function(jt){var Gt,Wt;return Gt=this,Gt===jt?0:this.document()!==jt.document()?(Wt=vt.Disconnected|vt.ImplementationSpecific,Math.random()<.5?Wt|=vt.Preceding:Wt|=vt.Following,Wt):Gt.isAncestor(jt)?vt.Contains|vt.Preceding:Gt.isDescendant(jt)?vt.Contains|vt.Following:Gt.isPreceding(jt)?vt.Preceding:vt.Following},Nt.prototype.isSameNode=function(jt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Nt.prototype.lookupPrefix=function(jt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Nt.prototype.isDefaultNamespace=function(jt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Nt.prototype.lookupNamespaceURI=function(jt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Nt.prototype.isEqualNode=function(jt){var Gt,Wt,Jt;if(jt.nodeType!==this.nodeType||jt.children.length!==this.children.length)return!1;for(Gt=Wt=0,Jt=this.children.length-1;0<=Jt?Wt<=Jt:Wt>=Jt;Gt=0<=Jt?++Wt:--Wt)if(!this.children[Gt].isEqualNode(jt.children[Gt]))return!1;return!0},Nt.prototype.getFeature=function(jt,Gt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Nt.prototype.setUserData=function(jt,Gt,Wt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Nt.prototype.getUserData=function(jt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Nt.prototype.contains=function(jt){return jt?jt===this||this.isDescendant(jt):!1},Nt.prototype.isDescendant=function(jt){var Gt,Wt,Jt,Ut,Ht;for(Ht=this.children,Jt=0,Ut=Ht.length;Jt<Ut;Jt++)if(Gt=Ht[Jt],jt===Gt||(Wt=Gt.isDescendant(jt),Wt))return!0;return!1},Nt.prototype.isAncestor=function(jt){return jt.isDescendant(this)},Nt.prototype.isPreceding=function(jt){var Gt,Wt;return Gt=this.treePosition(jt),Wt=this.treePosition(this),Gt===-1||Wt===-1?!1:Gt<Wt},Nt.prototype.isFollowing=function(jt){var Gt,Wt;return Gt=this.treePosition(jt),Wt=this.treePosition(this),Gt===-1||Wt===-1?!1:Gt>Wt},Nt.prototype.treePosition=function(jt){var Gt,Wt;return Wt=0,Gt=!1,this.foreachTreeNode(this.document(),function(Jt){if(Wt++,!Gt&&Jt===jt)return Gt=!0}),Gt?Wt:-1},Nt.prototype.foreachTreeNode=function(jt,Gt){var Wt,Jt,Ut,Ht,oe;for(jt||(jt=this.document()),Ht=jt.children,Jt=0,Ut=Ht.length;Jt<Ut;Jt++){if(Wt=Ht[Jt],oe=Gt(Wt))return oe;if(oe=this.foreachTreeNode(Wt,Gt),oe)return oe}},Nt}()}).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(ot,_t,Bt){(function(){var vt;_t.exports=vt=function(){function gt(kt){this.nodes=kt}return Object.defineProperty(gt.prototype,"length",{get:function(){return this.nodes.length||0}}),gt.prototype.clone=function(){return this.nodes=null},gt.prototype.item=function(kt){return this.nodes[kt]||null},gt}()}).call(this)},{}],452:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},St={}.hasOwnProperty;vt=ot("./NodeType"),gt=ot("./XMLCharacterData"),_t.exports=kt=function(Tt){bt(mt,Tt);function mt(xt,ft,z){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=vt.ProcessingInstruction,this.target=this.stringify.insTarget(ft),this.name=this.target,z&&(this.value=this.stringify.insValue(z))}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(xt))},mt.prototype.isEqualNode=function(xt){return!(!mt.__super__.isEqualNode.apply(this,arguments).isEqualNode(xt)||xt.target!==this.target)},mt}(gt)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},St={}.hasOwnProperty;vt=ot("./NodeType"),gt=ot("./XMLNode"),_t.exports=kt=function(Tt){bt(mt,Tt);function mt(xt,ft){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=vt.Raw,this.value=this.stringify.raw(ft)}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.raw(this,this.options.writer.filterOptions(xt))},mt}(gt)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt,St=function(mt,xt){for(var ft in xt)Tt.call(xt,ft)&&(mt[ft]=xt[ft]);function z(){this.constructor=mt}return z.prototype=xt.prototype,mt.prototype=new z,mt.__super__=xt.prototype,mt},Tt={}.hasOwnProperty;vt=ot("./NodeType"),bt=ot("./XMLWriterBase"),gt=ot("./WriterState"),_t.exports=kt=function(mt){St(xt,mt);function xt(ft,z){this.stream=ft,xt.__super__.constructor.call(this,z)}return xt.prototype.endline=function(ft,z,tt){return ft.isLastRootNode&&z.state===gt.CloseTag?"":xt.__super__.endline.call(this,ft,z,tt)},xt.prototype.document=function(ft,z){var tt,at,it,lt,ut,dt,Pt,At,Dt;for(Pt=ft.children,at=it=0,ut=Pt.length;it<ut;at=++it)tt=Pt[at],tt.isLastRootNode=at===ft.children.length-1;for(z=this.filterOptions(z),At=ft.children,Dt=[],lt=0,dt=At.length;lt<dt;lt++)tt=At[lt],Dt.push(this.writeChildNode(tt,z,0));return Dt},xt.prototype.attribute=function(ft,z,tt){return this.stream.write(xt.__super__.attribute.call(this,ft,z,tt))},xt.prototype.cdata=function(ft,z,tt){return this.stream.write(xt.__super__.cdata.call(this,ft,z,tt))},xt.prototype.comment=function(ft,z,tt){return this.stream.write(xt.__super__.comment.call(this,ft,z,tt))},xt.prototype.declaration=function(ft,z,tt){return this.stream.write(xt.__super__.declaration.call(this,ft,z,tt))},xt.prototype.docType=function(ft,z,tt){var at,it,lt,ut;if(tt||(tt=0),this.openNode(ft,z,tt),z.state=gt.OpenTag,this.stream.write(this.indent(ft,z,tt)),this.stream.write("<!DOCTYPE "+ft.root().name),ft.pubID&&ft.sysID?this.stream.write(' PUBLIC "'+ft.pubID+'" "'+ft.sysID+'"'):ft.sysID&&this.stream.write(' SYSTEM "'+ft.sysID+'"'),ft.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(ft,z,tt)),z.state=gt.InsideTag,ut=ft.children,it=0,lt=ut.length;it<lt;it++)at=ut[it],this.writeChildNode(at,z,tt+1);z.state=gt.CloseTag,this.stream.write("]")}return z.state=gt.CloseTag,this.stream.write(z.spaceBeforeSlash+">"),this.stream.write(this.endline(ft,z,tt)),z.state=gt.None,this.closeNode(ft,z,tt)},xt.prototype.element=function(ft,z,tt){var at,it,lt,ut,dt,Pt,At,Dt,Ft,Nt;tt||(tt=0),this.openNode(ft,z,tt),z.state=gt.OpenTag,this.stream.write(this.indent(ft,z,tt)+"<"+ft.name),Ft=ft.attribs;for(At in Ft)Tt.call(Ft,At)&&(at=Ft[At],this.attribute(at,z,tt));if(lt=ft.children.length,ut=lt===0?null:ft.children[0],lt===0||ft.children.every(function(jt){return(jt.type===vt.Text||jt.type===vt.Raw)&&jt.value===""}))z.allowEmpty?(this.stream.write(">"),z.state=gt.CloseTag,this.stream.write("</"+ft.name+">")):(z.state=gt.CloseTag,this.stream.write(z.spaceBeforeSlash+"/>"));else if(z.pretty&<===1&&(ut.type===vt.Text||ut.type===vt.Raw)&&ut.value!=null)this.stream.write(">"),z.state=gt.InsideTag,z.suppressPrettyCount++,Dt=!0,this.writeChildNode(ut,z,tt+1),z.suppressPrettyCount--,Dt=!1,z.state=gt.CloseTag,this.stream.write("</"+ft.name+">");else{for(this.stream.write(">"+this.endline(ft,z,tt)),z.state=gt.InsideTag,Nt=ft.children,dt=0,Pt=Nt.length;dt<Pt;dt++)it=Nt[dt],this.writeChildNode(it,z,tt+1);z.state=gt.CloseTag,this.stream.write(this.indent(ft,z,tt)+"</"+ft.name+">")}return this.stream.write(this.endline(ft,z,tt)),z.state=gt.None,this.closeNode(ft,z,tt)},xt.prototype.processingInstruction=function(ft,z,tt){return this.stream.write(xt.__super__.processingInstruction.call(this,ft,z,tt))},xt.prototype.raw=function(ft,z,tt){return this.stream.write(xt.__super__.raw.call(this,ft,z,tt))},xt.prototype.text=function(ft,z,tt){return this.stream.write(xt.__super__.text.call(this,ft,z,tt))},xt.prototype.dtdAttList=function(ft,z,tt){return this.stream.write(xt.__super__.dtdAttList.call(this,ft,z,tt))},xt.prototype.dtdElement=function(ft,z,tt){return this.stream.write(xt.__super__.dtdElement.call(this,ft,z,tt))},xt.prototype.dtdEntity=function(ft,z,tt){return this.stream.write(xt.__super__.dtdEntity.call(this,ft,z,tt))},xt.prototype.dtdNotation=function(ft,z,tt){return this.stream.write(xt.__super__.dtdNotation.call(this,ft,z,tt))},xt}(bt)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(ot,_t,Bt){(function(){var vt,gt,kt=function(St,Tt){for(var mt in Tt)bt.call(Tt,mt)&&(St[mt]=Tt[mt]);function xt(){this.constructor=St}return xt.prototype=Tt.prototype,St.prototype=new xt,St.__super__=Tt.prototype,St},bt={}.hasOwnProperty;gt=ot("./XMLWriterBase"),_t.exports=vt=function(St){kt(Tt,St);function Tt(mt){Tt.__super__.constructor.call(this,mt)}return Tt.prototype.document=function(mt,xt){var ft,z,tt,at,it;for(xt=this.filterOptions(xt),at="",it=mt.children,z=0,tt=it.length;z<tt;z++)ft=it[z],at+=this.writeChildNode(ft,xt,0);return xt.pretty&&at.slice(-xt.newline.length)===xt.newline&&(at=at.slice(0,-xt.newline.length)),at},Tt}(gt)}).call(this)},{"./XMLWriterBase":458}],456:[function(ot,_t,Bt){(function(){var vt,gt=function(bt,St){return function(){return bt.apply(St,arguments)}},kt={}.hasOwnProperty;_t.exports=vt=function(){function bt(St){this.assertLegalName=gt(this.assertLegalName,this),this.assertLegalChar=gt(this.assertLegalChar,this);var Tt,mt,xt;St||(St={}),this.options=St,this.options.version||(this.options.version="1.0"),mt=St.stringify||{};for(Tt in mt)kt.call(mt,Tt)&&(xt=mt[Tt],this[Tt]=xt)}return bt.prototype.name=function(St){return this.options.noValidation?St:this.assertLegalName(""+St||"")},bt.prototype.text=function(St){return this.options.noValidation?St:this.assertLegalChar(this.textEscape(""+St||""))},bt.prototype.cdata=function(St){return this.options.noValidation?St:(St=""+St||"",St=St.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(St))},bt.prototype.comment=function(St){if(this.options.noValidation)return St;if(St=""+St||"",St.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+St);return this.assertLegalChar(St)},bt.prototype.raw=function(St){return this.options.noValidation?St:""+St||""},bt.prototype.attValue=function(St){return this.options.noValidation?St:this.assertLegalChar(this.attEscape(St=""+St||""))},bt.prototype.insTarget=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.insValue=function(St){if(this.options.noValidation)return St;if(St=""+St||"",St.match(/\?>/))throw new Error("Invalid processing instruction value: "+St);return this.assertLegalChar(St)},bt.prototype.xmlVersion=function(St){if(this.options.noValidation)return St;if(St=""+St||"",!St.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+St);return St},bt.prototype.xmlEncoding=function(St){if(this.options.noValidation)return St;if(St=""+St||"",!St.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+St);return this.assertLegalChar(St)},bt.prototype.xmlStandalone=function(St){return this.options.noValidation?St:St?"yes":"no"},bt.prototype.dtdPubID=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.dtdSysID=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.dtdElementValue=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.dtdAttType=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.dtdAttDefault=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.dtdEntityValue=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.dtdNData=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.convertAttKey="@",bt.prototype.convertPIKey="?",bt.prototype.convertTextKey="#text",bt.prototype.convertCDataKey="#cdata",bt.prototype.convertCommentKey="#comment",bt.prototype.convertRawKey="#raw",bt.prototype.assertLegalChar=function(St){var Tt,mt;if(this.options.noValidation)return St;if(Tt="",this.options.version==="1.0"){if(Tt=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,mt=St.match(Tt))throw new Error("Invalid character in string: "+St+" at index "+mt.index)}else if(this.options.version==="1.1"&&(Tt=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,mt=St.match(Tt)))throw new Error("Invalid character in string: "+St+" at index "+mt.index);return St},bt.prototype.assertLegalName=function(St){var Tt;if(this.options.noValidation)return St;if(this.assertLegalChar(St),Tt=/^([: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])*$/,!St.match(Tt))throw new Error("Invalid character in name");return St},bt.prototype.textEscape=function(St){var Tt;return this.options.noValidation?St:(Tt=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,St.replace(Tt,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},bt.prototype.attEscape=function(St){var Tt;return this.options.noValidation?St:(Tt=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,St.replace(Tt,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},bt}()}).call(this)},{}],457:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},St={}.hasOwnProperty;vt=ot("./NodeType"),gt=ot("./XMLCharacterData"),_t.exports=kt=function(Tt){bt(mt,Tt);function mt(xt,ft){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=vt.Text,this.value=this.stringify.text(ft)}return Object.defineProperty(mt.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(mt.prototype,"wholeText",{get:function(){var xt,ft,z;for(z="",ft=this.previousSibling;ft;)z=ft.data+z,ft=ft.previousSibling;for(z+=this.data,xt=this.nextSibling;xt;)z=z+xt.data,xt=xt.nextSibling;return z}}),mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.text(this,this.options.writer.filterOptions(xt))},mt.prototype.splitText=function(xt){throw new Error("This DOM method is not implemented."+this.debugInfo())},mt.prototype.replaceWholeText=function(xt){throw new Error("This DOM method is not implemented."+this.debugInfo())},mt}(gt)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt,St,Tt,mt,xt,ft,z,tt,at,it,lt,ut,dt,Pt,At={}.hasOwnProperty;Pt=ot("./Utility").assign,vt=ot("./NodeType"),ft=ot("./XMLDeclaration"),z=ot("./XMLDocType"),kt=ot("./XMLCData"),bt=ot("./XMLComment"),at=ot("./XMLElement"),lt=ot("./XMLRaw"),ut=ot("./XMLText"),it=ot("./XMLProcessingInstruction"),tt=ot("./XMLDummy"),St=ot("./XMLDTDAttList"),Tt=ot("./XMLDTDElement"),mt=ot("./XMLDTDEntity"),xt=ot("./XMLDTDNotation"),gt=ot("./WriterState"),_t.exports=dt=function(){function Dt(Ft){var Nt,jt,Gt;Ft||(Ft={}),this.options=Ft,jt=Ft.writer||{};for(Nt in jt)At.call(jt,Nt)&&(Gt=jt[Nt],this["_"+Nt]=this[Nt],this[Nt]=Gt)}return Dt.prototype.filterOptions=function(Ft){var Nt,jt,Gt,Wt,Jt,Ut,Ht,oe;return Ft||(Ft={}),Ft=Pt({},this.options,Ft),Nt={writer:this},Nt.pretty=Ft.pretty||!1,Nt.allowEmpty=Ft.allowEmpty||!1,Nt.indent=(jt=Ft.indent)!=null?jt:" ",Nt.newline=(Gt=Ft.newline)!=null?Gt:`
|
|
`,Nt.offset=(Wt=Ft.offset)!=null?Wt:0,Nt.dontPrettyTextNodes=(Jt=(Ut=Ft.dontPrettyTextNodes)!=null?Ut:Ft.dontprettytextnodes)!=null?Jt:0,Nt.spaceBeforeSlash=(Ht=(oe=Ft.spaceBeforeSlash)!=null?oe:Ft.spacebeforeslash)!=null?Ht:"",Nt.spaceBeforeSlash===!0&&(Nt.spaceBeforeSlash=" "),Nt.suppressPrettyCount=0,Nt.user={},Nt.state=gt.None,Nt},Dt.prototype.indent=function(Ft,Nt,jt){var Gt;return!Nt.pretty||Nt.suppressPrettyCount?"":Nt.pretty&&(Gt=(jt||0)+Nt.offset+1,Gt>0)?new Array(Gt).join(Nt.indent):""},Dt.prototype.endline=function(Ft,Nt,jt){return!Nt.pretty||Nt.suppressPrettyCount?"":Nt.newline},Dt.prototype.attribute=function(Ft,Nt,jt){var Gt;return this.openAttribute(Ft,Nt,jt),Gt=" "+Ft.name+'="'+Ft.value+'"',this.closeAttribute(Ft,Nt,jt),Gt},Dt.prototype.cdata=function(Ft,Nt,jt){var Gt;return this.openNode(Ft,Nt,jt),Nt.state=gt.OpenTag,Gt=this.indent(Ft,Nt,jt)+"<![CDATA[",Nt.state=gt.InsideTag,Gt+=Ft.value,Nt.state=gt.CloseTag,Gt+="]]>"+this.endline(Ft,Nt,jt),Nt.state=gt.None,this.closeNode(Ft,Nt,jt),Gt},Dt.prototype.comment=function(Ft,Nt,jt){var Gt;return this.openNode(Ft,Nt,jt),Nt.state=gt.OpenTag,Gt=this.indent(Ft,Nt,jt)+"<!-- ",Nt.state=gt.InsideTag,Gt+=Ft.value,Nt.state=gt.CloseTag,Gt+=" -->"+this.endline(Ft,Nt,jt),Nt.state=gt.None,this.closeNode(Ft,Nt,jt),Gt},Dt.prototype.declaration=function(Ft,Nt,jt){var Gt;return this.openNode(Ft,Nt,jt),Nt.state=gt.OpenTag,Gt=this.indent(Ft,Nt,jt)+"<?xml",Nt.state=gt.InsideTag,Gt+=' version="'+Ft.version+'"',Ft.encoding!=null&&(Gt+=' encoding="'+Ft.encoding+'"'),Ft.standalone!=null&&(Gt+=' standalone="'+Ft.standalone+'"'),Nt.state=gt.CloseTag,Gt+=Nt.spaceBeforeSlash+"?>",Gt+=this.endline(Ft,Nt,jt),Nt.state=gt.None,this.closeNode(Ft,Nt,jt),Gt},Dt.prototype.docType=function(Ft,Nt,jt){var Gt,Wt,Jt,Ut,Ht;if(jt||(jt=0),this.openNode(Ft,Nt,jt),Nt.state=gt.OpenTag,Ut=this.indent(Ft,Nt,jt),Ut+="<!DOCTYPE "+Ft.root().name,Ft.pubID&&Ft.sysID?Ut+=' PUBLIC "'+Ft.pubID+'" "'+Ft.sysID+'"':Ft.sysID&&(Ut+=' SYSTEM "'+Ft.sysID+'"'),Ft.children.length>0){for(Ut+=" [",Ut+=this.endline(Ft,Nt,jt),Nt.state=gt.InsideTag,Ht=Ft.children,Wt=0,Jt=Ht.length;Wt<Jt;Wt++)Gt=Ht[Wt],Ut+=this.writeChildNode(Gt,Nt,jt+1);Nt.state=gt.CloseTag,Ut+="]"}return Nt.state=gt.CloseTag,Ut+=Nt.spaceBeforeSlash+">",Ut+=this.endline(Ft,Nt,jt),Nt.state=gt.None,this.closeNode(Ft,Nt,jt),Ut},Dt.prototype.element=function(Ft,Nt,jt){var Gt,Wt,Jt,Ut,Ht,oe,se,ce,Pe,Yt,ne,ve,Se,be;jt||(jt=0),Yt=!1,ne="",this.openNode(Ft,Nt,jt),Nt.state=gt.OpenTag,ne+=this.indent(Ft,Nt,jt)+"<"+Ft.name,ve=Ft.attribs;for(Pe in ve)At.call(ve,Pe)&&(Gt=ve[Pe],ne+=this.attribute(Gt,Nt,jt));if(Jt=Ft.children.length,Ut=Jt===0?null:Ft.children[0],Jt===0||Ft.children.every(function(fe){return(fe.type===vt.Text||fe.type===vt.Raw)&&fe.value===""}))Nt.allowEmpty?(ne+=">",Nt.state=gt.CloseTag,ne+="</"+Ft.name+">"+this.endline(Ft,Nt,jt)):(Nt.state=gt.CloseTag,ne+=Nt.spaceBeforeSlash+"/>"+this.endline(Ft,Nt,jt));else if(Nt.pretty&&Jt===1&&(Ut.type===vt.Text||Ut.type===vt.Raw)&&Ut.value!=null)ne+=">",Nt.state=gt.InsideTag,Nt.suppressPrettyCount++,Yt=!0,ne+=this.writeChildNode(Ut,Nt,jt+1),Nt.suppressPrettyCount--,Yt=!1,Nt.state=gt.CloseTag,ne+="</"+Ft.name+">"+this.endline(Ft,Nt,jt);else{if(Nt.dontPrettyTextNodes){for(Se=Ft.children,Ht=0,se=Se.length;Ht<se;Ht++)if(Wt=Se[Ht],(Wt.type===vt.Text||Wt.type===vt.Raw)&&Wt.value!=null){Nt.suppressPrettyCount++,Yt=!0;break}}for(ne+=">"+this.endline(Ft,Nt,jt),Nt.state=gt.InsideTag,be=Ft.children,oe=0,ce=be.length;oe<ce;oe++)Wt=be[oe],ne+=this.writeChildNode(Wt,Nt,jt+1);Nt.state=gt.CloseTag,ne+=this.indent(Ft,Nt,jt)+"</"+Ft.name+">",Yt&&Nt.suppressPrettyCount--,ne+=this.endline(Ft,Nt,jt),Nt.state=gt.None}return this.closeNode(Ft,Nt,jt),ne},Dt.prototype.writeChildNode=function(Ft,Nt,jt){switch(Ft.type){case vt.CData:return this.cdata(Ft,Nt,jt);case vt.Comment:return this.comment(Ft,Nt,jt);case vt.Element:return this.element(Ft,Nt,jt);case vt.Raw:return this.raw(Ft,Nt,jt);case vt.Text:return this.text(Ft,Nt,jt);case vt.ProcessingInstruction:return this.processingInstruction(Ft,Nt,jt);case vt.Dummy:return"";case vt.Declaration:return this.declaration(Ft,Nt,jt);case vt.DocType:return this.docType(Ft,Nt,jt);case vt.AttributeDeclaration:return this.dtdAttList(Ft,Nt,jt);case vt.ElementDeclaration:return this.dtdElement(Ft,Nt,jt);case vt.EntityDeclaration:return this.dtdEntity(Ft,Nt,jt);case vt.NotationDeclaration:return this.dtdNotation(Ft,Nt,jt);default:throw new Error("Unknown XML node type: "+Ft.constructor.name)}},Dt.prototype.processingInstruction=function(Ft,Nt,jt){var Gt;return this.openNode(Ft,Nt,jt),Nt.state=gt.OpenTag,Gt=this.indent(Ft,Nt,jt)+"<?",Nt.state=gt.InsideTag,Gt+=Ft.target,Ft.value&&(Gt+=" "+Ft.value),Nt.state=gt.CloseTag,Gt+=Nt.spaceBeforeSlash+"?>",Gt+=this.endline(Ft,Nt,jt),Nt.state=gt.None,this.closeNode(Ft,Nt,jt),Gt},Dt.prototype.raw=function(Ft,Nt,jt){var Gt;return this.openNode(Ft,Nt,jt),Nt.state=gt.OpenTag,Gt=this.indent(Ft,Nt,jt),Nt.state=gt.InsideTag,Gt+=Ft.value,Nt.state=gt.CloseTag,Gt+=this.endline(Ft,Nt,jt),Nt.state=gt.None,this.closeNode(Ft,Nt,jt),Gt},Dt.prototype.text=function(Ft,Nt,jt){var Gt;return this.openNode(Ft,Nt,jt),Nt.state=gt.OpenTag,Gt=this.indent(Ft,Nt,jt),Nt.state=gt.InsideTag,Gt+=Ft.value,Nt.state=gt.CloseTag,Gt+=this.endline(Ft,Nt,jt),Nt.state=gt.None,this.closeNode(Ft,Nt,jt),Gt},Dt.prototype.dtdAttList=function(Ft,Nt,jt){var Gt;return this.openNode(Ft,Nt,jt),Nt.state=gt.OpenTag,Gt=this.indent(Ft,Nt,jt)+"<!ATTLIST",Nt.state=gt.InsideTag,Gt+=" "+Ft.elementName+" "+Ft.attributeName+" "+Ft.attributeType,Ft.defaultValueType!=="#DEFAULT"&&(Gt+=" "+Ft.defaultValueType),Ft.defaultValue&&(Gt+=' "'+Ft.defaultValue+'"'),Nt.state=gt.CloseTag,Gt+=Nt.spaceBeforeSlash+">"+this.endline(Ft,Nt,jt),Nt.state=gt.None,this.closeNode(Ft,Nt,jt),Gt},Dt.prototype.dtdElement=function(Ft,Nt,jt){var Gt;return this.openNode(Ft,Nt,jt),Nt.state=gt.OpenTag,Gt=this.indent(Ft,Nt,jt)+"<!ELEMENT",Nt.state=gt.InsideTag,Gt+=" "+Ft.name+" "+Ft.value,Nt.state=gt.CloseTag,Gt+=Nt.spaceBeforeSlash+">"+this.endline(Ft,Nt,jt),Nt.state=gt.None,this.closeNode(Ft,Nt,jt),Gt},Dt.prototype.dtdEntity=function(Ft,Nt,jt){var Gt;return this.openNode(Ft,Nt,jt),Nt.state=gt.OpenTag,Gt=this.indent(Ft,Nt,jt)+"<!ENTITY",Nt.state=gt.InsideTag,Ft.pe&&(Gt+=" %"),Gt+=" "+Ft.name,Ft.value?Gt+=' "'+Ft.value+'"':(Ft.pubID&&Ft.sysID?Gt+=' PUBLIC "'+Ft.pubID+'" "'+Ft.sysID+'"':Ft.sysID&&(Gt+=' SYSTEM "'+Ft.sysID+'"'),Ft.nData&&(Gt+=" NDATA "+Ft.nData)),Nt.state=gt.CloseTag,Gt+=Nt.spaceBeforeSlash+">"+this.endline(Ft,Nt,jt),Nt.state=gt.None,this.closeNode(Ft,Nt,jt),Gt},Dt.prototype.dtdNotation=function(Ft,Nt,jt){var Gt;return this.openNode(Ft,Nt,jt),Nt.state=gt.OpenTag,Gt=this.indent(Ft,Nt,jt)+"<!NOTATION",Nt.state=gt.InsideTag,Gt+=" "+Ft.name,Ft.pubID&&Ft.sysID?Gt+=' PUBLIC "'+Ft.pubID+'" "'+Ft.sysID+'"':Ft.pubID?Gt+=' PUBLIC "'+Ft.pubID+'"':Ft.sysID&&(Gt+=' SYSTEM "'+Ft.sysID+'"'),Nt.state=gt.CloseTag,Gt+=Nt.spaceBeforeSlash+">"+this.endline(Ft,Nt,jt),Nt.state=gt.None,this.closeNode(Ft,Nt,jt),Gt},Dt.prototype.openNode=function(Ft,Nt,jt){},Dt.prototype.closeNode=function(Ft,Nt,jt){},Dt.prototype.openAttribute=function(Ft,Nt,jt){},Dt.prototype.closeAttribute=function(Ft,Nt,jt){},Dt}()}).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(ot,_t,Bt){(function(){var vt,gt,kt,bt,St,Tt,mt,xt,ft,z;z=ot("./Utility"),xt=z.assign,ft=z.isFunction,kt=ot("./XMLDOMImplementation"),bt=ot("./XMLDocument"),St=ot("./XMLDocumentCB"),mt=ot("./XMLStringWriter"),Tt=ot("./XMLStreamWriter"),vt=ot("./NodeType"),gt=ot("./WriterState"),_t.exports.create=function(tt,at,it,lt){var ut,dt;if(tt==null)throw new Error("Root element needs a name.");return lt=xt({},at,it,lt),ut=new bt(lt),dt=ut.element(tt),lt.headless||(ut.declaration(lt),(lt.pubID!=null||lt.sysID!=null)&&ut.dtd(lt)),dt},_t.exports.begin=function(tt,at,it){var lt;return ft(tt)&&(lt=[tt,at],at=lt[0],it=lt[1],tt={}),at?new St(tt,at,it):new bt(tt)},_t.exports.stringWriter=function(tt){return new mt(tt)},_t.exports.streamWriter=function(tt,at){return new Tt(tt,at)},_t.exports.implementation=new kt,_t.exports.nodeType=vt,_t.exports.writerState=gt}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(ot,_t,Bt){_t.exports=gt;var vt=Object.prototype.hasOwnProperty;function gt(){for(var kt={},bt=0;bt<arguments.length;bt++){var St=arguments[bt];for(var Tt in St)vt.call(St,Tt)&&(kt[Tt]=St[Tt])}return kt}},{}],461:[function(ot,_t,Bt){"use strict";ot("core-js/modules/es.array.fill.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/es.array.join.js"),ot("core-js/modules/es.array.slice.js");var vt=ot("buffer").Buffer,gt=ot("./sha"),kt=ot("./md5"),bt={sha1:gt,md5:kt},St=64,Tt=vt.alloc(St);Tt.fill(0);function mt(z,tt,at){vt.isBuffer(tt)||(tt=vt.from(tt)),vt.isBuffer(at)||(at=vt.from(at)),tt.length>St?tt=z(tt):tt.length<St&&(tt=vt.concat([tt,Tt],St));for(var it=vt.alloc(St),lt=vt.alloc(St),ut=0;ut<St;ut++)it[ut]=tt[ut]^54,lt[ut]=tt[ut]^92;var dt=z(vt.concat([it,at]));return z(vt.concat([lt,dt]))}function xt(z,tt){z=z||"sha1";var at=bt[z],it=[],lt=0;return at||ft("algorithm:",z,"is not yet supported"),{update:function(dt){return vt.isBuffer(dt)||(dt=vt.from(dt)),it.push(dt),lt+=dt.length,this},digest:function(dt){var Pt=vt.concat(it),At=tt?mt(at,tt,Pt):at(Pt);return it=null,dt?At.toString(dt):At}}}function ft(){var z=[].slice.call(arguments).join(" ");throw new Error([z,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
`))}Bt.createHash=function(z){return xt(z)},Bt.createHmac=function(z,tt){return xt(z,tt)},Bt.createCredentials=function(){ft("sorry,createCredentials is not implemented yet")},Bt.createCipher=function(){ft("sorry,createCipher is not implemented yet")},Bt.createCipheriv=function(){ft("sorry,createCipheriv is not implemented yet")},Bt.createDecipher=function(){ft("sorry,createDecipher is not implemented yet")},Bt.createDecipheriv=function(){ft("sorry,createDecipheriv is not implemented yet")},Bt.createSign=function(){ft("sorry,createSign is not implemented yet")},Bt.createVerify=function(){ft("sorry,createVerify is not implemented yet")},Bt.createDiffieHellman=function(){ft("sorry,createDiffieHellman is not implemented yet")},Bt.pbkdf2=function(){ft("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(ot,_t,Bt){"use strict";ot("core-js/modules/es.array.fill.js"),ot("core-js/modules/es.array.concat.js");var vt=ot("buffer").Buffer,gt=4,kt=vt.alloc(gt);kt.fill(0);var bt=8;function St(xt,ft){if(xt.length%gt!==0){var z=xt.length+(gt-xt.length%gt);xt=vt.concat([xt,kt],z)}for(var tt=[],at=ft?xt.readInt32BE:xt.readInt32LE,it=0;it<xt.length;it+=gt)tt.push(at.call(xt,it));return tt}function Tt(xt,ft,z){for(var tt=vt.alloc(ft),at=z?tt.writeInt32BE:tt.writeInt32LE,it=0;it<xt.length;it++)at.call(tt,xt[it],it*4,!0);return tt}function mt(xt,ft,z,tt){vt.isBuffer(xt)||(xt=vt.from(xt));var at=ft(St(xt,tt),xt.length*bt);return Tt(at,z,tt)}_t.exports={hash:mt}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(ot,_t,Bt){"use strict";var vt=ot("./helpers");function gt(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function kt(tt,at){tt[at>>5]|=128<<at%32,tt[(at+64>>>9<<4)+14]=at;for(var it=1732584193,lt=-271733879,ut=-1732584194,dt=271733878,Pt=0;Pt<tt.length;Pt+=16){var At=it,Dt=lt,Ft=ut,Nt=dt;it=St(it,lt,ut,dt,tt[Pt+0],7,-680876936),dt=St(dt,it,lt,ut,tt[Pt+1],12,-389564586),ut=St(ut,dt,it,lt,tt[Pt+2],17,606105819),lt=St(lt,ut,dt,it,tt[Pt+3],22,-1044525330),it=St(it,lt,ut,dt,tt[Pt+4],7,-176418897),dt=St(dt,it,lt,ut,tt[Pt+5],12,1200080426),ut=St(ut,dt,it,lt,tt[Pt+6],17,-1473231341),lt=St(lt,ut,dt,it,tt[Pt+7],22,-45705983),it=St(it,lt,ut,dt,tt[Pt+8],7,1770035416),dt=St(dt,it,lt,ut,tt[Pt+9],12,-1958414417),ut=St(ut,dt,it,lt,tt[Pt+10],17,-42063),lt=St(lt,ut,dt,it,tt[Pt+11],22,-1990404162),it=St(it,lt,ut,dt,tt[Pt+12],7,1804603682),dt=St(dt,it,lt,ut,tt[Pt+13],12,-40341101),ut=St(ut,dt,it,lt,tt[Pt+14],17,-1502002290),lt=St(lt,ut,dt,it,tt[Pt+15],22,1236535329),it=Tt(it,lt,ut,dt,tt[Pt+1],5,-165796510),dt=Tt(dt,it,lt,ut,tt[Pt+6],9,-1069501632),ut=Tt(ut,dt,it,lt,tt[Pt+11],14,643717713),lt=Tt(lt,ut,dt,it,tt[Pt+0],20,-373897302),it=Tt(it,lt,ut,dt,tt[Pt+5],5,-701558691),dt=Tt(dt,it,lt,ut,tt[Pt+10],9,38016083),ut=Tt(ut,dt,it,lt,tt[Pt+15],14,-660478335),lt=Tt(lt,ut,dt,it,tt[Pt+4],20,-405537848),it=Tt(it,lt,ut,dt,tt[Pt+9],5,568446438),dt=Tt(dt,it,lt,ut,tt[Pt+14],9,-1019803690),ut=Tt(ut,dt,it,lt,tt[Pt+3],14,-187363961),lt=Tt(lt,ut,dt,it,tt[Pt+8],20,1163531501),it=Tt(it,lt,ut,dt,tt[Pt+13],5,-1444681467),dt=Tt(dt,it,lt,ut,tt[Pt+2],9,-51403784),ut=Tt(ut,dt,it,lt,tt[Pt+7],14,1735328473),lt=Tt(lt,ut,dt,it,tt[Pt+12],20,-1926607734),it=mt(it,lt,ut,dt,tt[Pt+5],4,-378558),dt=mt(dt,it,lt,ut,tt[Pt+8],11,-2022574463),ut=mt(ut,dt,it,lt,tt[Pt+11],16,1839030562),lt=mt(lt,ut,dt,it,tt[Pt+14],23,-35309556),it=mt(it,lt,ut,dt,tt[Pt+1],4,-1530992060),dt=mt(dt,it,lt,ut,tt[Pt+4],11,1272893353),ut=mt(ut,dt,it,lt,tt[Pt+7],16,-155497632),lt=mt(lt,ut,dt,it,tt[Pt+10],23,-1094730640),it=mt(it,lt,ut,dt,tt[Pt+13],4,681279174),dt=mt(dt,it,lt,ut,tt[Pt+0],11,-358537222),ut=mt(ut,dt,it,lt,tt[Pt+3],16,-722521979),lt=mt(lt,ut,dt,it,tt[Pt+6],23,76029189),it=mt(it,lt,ut,dt,tt[Pt+9],4,-640364487),dt=mt(dt,it,lt,ut,tt[Pt+12],11,-421815835),ut=mt(ut,dt,it,lt,tt[Pt+15],16,530742520),lt=mt(lt,ut,dt,it,tt[Pt+2],23,-995338651),it=xt(it,lt,ut,dt,tt[Pt+0],6,-198630844),dt=xt(dt,it,lt,ut,tt[Pt+7],10,1126891415),ut=xt(ut,dt,it,lt,tt[Pt+14],15,-1416354905),lt=xt(lt,ut,dt,it,tt[Pt+5],21,-57434055),it=xt(it,lt,ut,dt,tt[Pt+12],6,1700485571),dt=xt(dt,it,lt,ut,tt[Pt+3],10,-1894986606),ut=xt(ut,dt,it,lt,tt[Pt+10],15,-1051523),lt=xt(lt,ut,dt,it,tt[Pt+1],21,-2054922799),it=xt(it,lt,ut,dt,tt[Pt+8],6,1873313359),dt=xt(dt,it,lt,ut,tt[Pt+15],10,-30611744),ut=xt(ut,dt,it,lt,tt[Pt+6],15,-1560198380),lt=xt(lt,ut,dt,it,tt[Pt+13],21,1309151649),it=xt(it,lt,ut,dt,tt[Pt+4],6,-145523070),dt=xt(dt,it,lt,ut,tt[Pt+11],10,-1120210379),ut=xt(ut,dt,it,lt,tt[Pt+2],15,718787259),lt=xt(lt,ut,dt,it,tt[Pt+9],21,-343485551),it=ft(it,At),lt=ft(lt,Dt),ut=ft(ut,Ft),dt=ft(dt,Nt)}return Array(it,lt,ut,dt)}function bt(tt,at,it,lt,ut,dt){return ft(z(ft(ft(at,tt),ft(lt,dt)),ut),it)}function St(tt,at,it,lt,ut,dt,Pt){return bt(at&it|~at<,tt,at,ut,dt,Pt)}function Tt(tt,at,it,lt,ut,dt,Pt){return bt(at<|it&~lt,tt,at,ut,dt,Pt)}function mt(tt,at,it,lt,ut,dt,Pt){return bt(at^it^lt,tt,at,ut,dt,Pt)}function xt(tt,at,it,lt,ut,dt,Pt){return bt(it^(at|~lt),tt,at,ut,dt,Pt)}function ft(tt,at){var it=(tt&65535)+(at&65535),lt=(tt>>16)+(at>>16)+(it>>16);return lt<<16|it&65535}function z(tt,at){return tt<<at|tt>>>32-at}_t.exports=function(at){return vt.hash(at,kt,16)}},{"./helpers":462}],464:[function(ot,_t,Bt){"use strict";var vt=ot("./helpers");function gt(mt,xt){mt[xt>>5]|=128<<24-xt%32,mt[(xt+64>>9<<4)+15]=xt;for(var ft=Array(80),z=1732584193,tt=-271733879,at=-1732584194,it=271733878,lt=-1009589776,ut=0;ut<mt.length;ut+=16){for(var dt=z,Pt=tt,At=at,Dt=it,Ft=lt,Nt=0;Nt<80;Nt++){Nt<16?ft[Nt]=mt[ut+Nt]:ft[Nt]=Tt(ft[Nt-3]^ft[Nt-8]^ft[Nt-14]^ft[Nt-16],1);var jt=St(St(Tt(z,5),kt(Nt,tt,at,it)),St(St(lt,ft[Nt]),bt(Nt)));lt=it,it=at,at=Tt(tt,30),tt=z,z=jt}z=St(z,dt),tt=St(tt,Pt),at=St(at,At),it=St(it,Dt),lt=St(lt,Ft)}return Array(z,tt,at,it,lt)}function kt(mt,xt,ft,z){return mt<20?xt&ft|~xt&z:mt<40?xt^ft^z:mt<60?xt&ft|xt&z|ft&z:xt^ft^z}function bt(mt){return mt<20?1518500249:mt<40?1859775393:mt<60?-1894007588:-899497514}function St(mt,xt){var ft=(mt&65535)+(xt&65535),z=(mt>>16)+(xt>>16)+(ft>>16);return z<<16|ft&65535}function Tt(mt,xt){return mt<<xt|mt>>>32-xt}_t.exports=function(xt){return vt.hash(xt,gt,20,!0)}},{"./helpers":462}],465:[function(ot,_t,Bt){"use strict";_t.exports=function(){return function(){}}},{}],466:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=ot("@babel/runtime/helpers/interopRequireDefault"),kt=gt(ot("@babel/runtime/helpers/typeof")),bt=ot("stream"),St=bt.Stream,Tt=ot("../lib/common/utils/isArray"),mt=Tt.isArray;_t.exports.string=function(z){return typeof z=="string"},_t.exports.array=mt,_t.exports.buffer=vt.isBuffer;function xt(ft){return ft instanceof St}_t.exports.writableStream=function(z){return xt(z)&&typeof z._write=="function"&&(0,kt.default)(z._writableState)==="object"}}).call(this)}).call(this,{isBuffer:ot("../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(ot,_t,Bt){"use strict";var vt=ot("immediate"),gt=_t.exports={};gt.nextTick=vt,gt.title="browser",gt.browser=!0,gt.env={},gt.argv=[],gt.version="",gt.versions={};function kt(){}gt.on=kt,gt.addListener=kt,gt.once=kt,gt.off=kt,gt.removeListener=kt,gt.removeAllListeners=kt,gt.emit=kt,gt.prependListener=kt,gt.prependOnceListener=kt,gt.listeners=function(bt){return[]},gt.binding=function(bt){throw new Error("process.binding is not supported")},gt.cwd=function(){return"/"},gt.chdir=function(bt){throw new Error("process.chdir is not supported")},gt.umask=function(){return 0}},{immediate:358}],468:[function(ot,_t,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.search.js");var gt=ot("./lib/request"),kt=ot("./lib/response"),bt=ot("xtend"),St=ot("builtin-status-codes"),Tt=ot("url"),mt=Bt;mt.request=function(xt,ft){typeof xt=="string"?xt=Tt.parse(xt):xt=bt(xt);var z=vt.location.protocol.search(/^https?:$/)===-1?"http:":"",tt=xt.protocol||z,at=xt.hostname||xt.host,it=xt.port,lt=xt.path||"/";at&&at.indexOf(":")!==-1&&(at="["+at+"]"),xt.url=(at?tt+"//"+at:"")+(it?":"+it:"")+lt,xt.method=(xt.method||"GET").toUpperCase(),xt.headers=xt.headers||{};var ut=new gt(xt);return ft&&ut.on("response",ft),ut},mt.get=function(ft,z){var tt=mt.request(ft,z);return tt.end(),tt},mt.ClientRequest=gt,mt.IncomingMessage=kt.IncomingMessage,mt.Agent=function(){},mt.Agent.defaultMaxSockets=4,mt.globalAgent=new mt.Agent,mt.STATUS_CODES=St,mt.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 fn!="undefined"?fn: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(ot,_t,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.array-buffer.constructor.js"),ot("core-js/modules/es.array-buffer.slice.js"),ot("core-js/modules/es.array.slice.js"),Bt.fetch=mt(vt.fetch)&&mt(vt.ReadableStream),Bt.writableStream=mt(vt.WritableStream),Bt.abortController=mt(vt.AbortController),Bt.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),Bt.blobConstructor=!0}catch(xt){}var gt;function kt(){if(gt!==void 0)return gt;if(vt.XMLHttpRequest){gt=new vt.XMLHttpRequest;try{gt.open("GET",vt.XDomainRequest?"/":"https://example.com")}catch(xt){gt=null}}else gt=null;return gt}function bt(xt){var ft=kt();if(!ft)return!1;try{return ft.responseType=xt,ft.responseType===xt}catch(z){}return!1}var St=typeof vt.ArrayBuffer!="undefined",Tt=St&&mt(vt.ArrayBuffer.prototype.slice);Bt.arraybuffer=Bt.fetch||St&&bt("arraybuffer"),Bt.msstream=!Bt.fetch&&Tt&&bt("ms-stream"),Bt.mozchunkedarraybuffer=!Bt.fetch&&St&&bt("moz-chunked-arraybuffer"),Bt.overrideMimeType=Bt.fetch||(kt()?mt(kt().overrideMimeType):!1),Bt.vbArray=mt(vt.VBArray);function mt(xt){return typeof xt=="function"}gt=null}).call(this)}).call(this,typeof fn!="undefined"?fn: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(ot,_t,Bt){(function(vt,gt,kt){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.split.js");var bt=ot("./capability"),St=ot("inherits"),Tt=ot("./response"),mt=ot("readable-stream"),xt=ot("to-arraybuffer"),ft=Tt.IncomingMessage,z=Tt.readyStates;function tt(ut,dt){return bt.fetch&&dt?"fetch":bt.mozchunkedarraybuffer?"moz-chunked-arraybuffer":bt.msstream?"ms-stream":bt.arraybuffer&&ut?"arraybuffer":bt.vbArray&&ut?"text:vbarray":"text"}var at=_t.exports=function(ut){var dt=this;mt.Writable.call(dt),dt._opts=ut,dt._body=[],dt._headers={},ut.auth&&dt.setHeader("Authorization","Basic "+new kt(ut.auth).toString("base64")),Object.keys(ut.headers).forEach(function(Dt){dt.setHeader(Dt,ut.headers[Dt])});var Pt,At=!0;if(ut.mode==="disable-fetch"||"requestTimeout"in ut&&!bt.abortController)At=!1,Pt=!0;else if(ut.mode==="prefer-streaming")Pt=!1;else if(ut.mode==="allow-wrong-content-type")Pt=!bt.overrideMimeType;else if(!ut.mode||ut.mode==="default"||ut.mode==="prefer-fast")Pt=!0;else throw new Error("Invalid value for opts.mode");dt._mode=tt(Pt,At),dt._fetchTimer=null,dt.on("finish",function(){dt._onFinish()})};St(at,mt.Writable),at.prototype.setHeader=function(ut,dt){var Pt=this,At=ut.toLowerCase();lt.indexOf(At)===-1&&(Pt._headers[At]={name:ut,value:dt})},at.prototype.getHeader=function(ut){var dt=this._headers[ut.toLowerCase()];return dt?dt.value:null},at.prototype.removeHeader=function(ut){var dt=this;delete dt._headers[ut.toLowerCase()]},at.prototype._onFinish=function(){var ut=this;if(!ut._destroyed){var dt=ut._opts,Pt=ut._headers,At=null;dt.method!=="GET"&&dt.method!=="HEAD"&&(bt.arraybuffer?At=xt(kt.concat(ut._body)):bt.blobConstructor?At=new gt.Blob(ut._body.map(function(Wt){return xt(Wt)}),{type:(Pt["content-type"]||{}).value||""}):At=kt.concat(ut._body).toString());var Dt=[];if(Object.keys(Pt).forEach(function(Wt){var Jt=Pt[Wt].name,Ut=Pt[Wt].value;Array.isArray(Ut)?Ut.forEach(function(Ht){Dt.push([Jt,Ht])}):Dt.push([Jt,Ut])}),ut._mode==="fetch"){var Ft=null,Nt=null;if(bt.abortController){var jt=new AbortController;Ft=jt.signal,ut._fetchAbortController=jt,"requestTimeout"in dt&&dt.requestTimeout!==0&&(ut._fetchTimer=gt.setTimeout(function(){ut.emit("requestTimeout"),ut._fetchAbortController&&ut._fetchAbortController.abort()},dt.requestTimeout))}gt.fetch(ut._opts.url,{method:ut._opts.method,headers:Dt,body:At||void 0,mode:"cors",credentials:dt.withCredentials?"include":"same-origin",signal:Ft}).then(function(Wt){ut._fetchResponse=Wt,ut._connect()},function(Wt){gt.clearTimeout(ut._fetchTimer),ut._destroyed||ut.emit("error",Wt)})}else{var Gt=ut._xhr=new gt.XMLHttpRequest;try{Gt.open(ut._opts.method,ut._opts.url,!0)}catch(Wt){vt.nextTick(function(){ut.emit("error",Wt)});return}"responseType"in Gt&&(Gt.responseType=ut._mode.split(":")[0]),"withCredentials"in Gt&&(Gt.withCredentials=!!dt.withCredentials),ut._mode==="text"&&"overrideMimeType"in Gt&&Gt.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in dt&&(Gt.timeout=dt.requestTimeout,Gt.ontimeout=function(){ut.emit("requestTimeout")}),Dt.forEach(function(Wt){Gt.setRequestHeader(Wt[0],Wt[1])}),ut._response=null,Gt.onreadystatechange=function(){switch(Gt.readyState){case z.LOADING:case z.DONE:ut._onXHRProgress();break}},ut._mode==="moz-chunked-arraybuffer"&&(Gt.onprogress=function(){ut._onXHRProgress()}),Gt.onerror=function(){ut._destroyed||ut.emit("error",new Error("XHR error"))};try{Gt.send(At)}catch(Wt){vt.nextTick(function(){ut.emit("error",Wt)});return}}}};function it(ut){try{var dt=ut.status;return dt!==null&&dt!==0}catch(Pt){return!1}}at.prototype._onXHRProgress=function(){var ut=this;!it(ut._xhr)||ut._destroyed||(ut._response||ut._connect(),ut._response._onXHRProgress())},at.prototype._connect=function(){var ut=this;ut._destroyed||(ut._response=new ft(ut._xhr,ut._fetchResponse,ut._mode,ut._fetchTimer),ut._response.on("error",function(dt){ut.emit("error",dt)}),ut.emit("response",ut._response))},at.prototype._write=function(ut,dt,Pt){var At=this;At._body.push(ut),Pt()},at.prototype.abort=at.prototype.destroy=function(){var ut=this;ut._destroyed=!0,gt.clearTimeout(ut._fetchTimer),ut._response&&(ut._response._destroyed=!0),ut._xhr?ut._xhr.abort():ut._fetchAbortController&&ut._fetchAbortController.abort()},at.prototype.end=function(ut,dt,Pt){var At=this;typeof ut=="function"&&(Pt=ut,ut=void 0),mt.Writable.prototype.end.call(At,ut,dt,Pt)},at.prototype.flushHeaders=function(){},at.prototype.setTimeout=function(){},at.prototype.setNoDelay=function(){},at.prototype.setSocketKeepAlive=function(){};var lt=["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,ot("_process"),typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ot("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(ot,_t,Bt){(function(vt,gt,kt){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.split.js"),ot("core-js/modules/es.string.match.js"),ot("core-js/modules/es.array.iterator.js"),ot("core-js/modules/es.array-buffer.slice.js"),ot("core-js/modules/es.typed-array.uint8-array.js"),ot("core-js/modules/es.typed-array.copy-within.js"),ot("core-js/modules/es.typed-array.every.js"),ot("core-js/modules/es.typed-array.fill.js"),ot("core-js/modules/es.typed-array.filter.js"),ot("core-js/modules/es.typed-array.find.js"),ot("core-js/modules/es.typed-array.find-index.js"),ot("core-js/modules/es.typed-array.for-each.js"),ot("core-js/modules/es.typed-array.includes.js"),ot("core-js/modules/es.typed-array.index-of.js"),ot("core-js/modules/es.typed-array.iterator.js"),ot("core-js/modules/es.typed-array.join.js"),ot("core-js/modules/es.typed-array.last-index-of.js"),ot("core-js/modules/es.typed-array.map.js"),ot("core-js/modules/es.typed-array.reduce.js"),ot("core-js/modules/es.typed-array.reduce-right.js"),ot("core-js/modules/es.typed-array.reverse.js"),ot("core-js/modules/es.typed-array.set.js"),ot("core-js/modules/es.typed-array.slice.js"),ot("core-js/modules/es.typed-array.some.js"),ot("core-js/modules/es.typed-array.sort.js"),ot("core-js/modules/es.typed-array.subarray.js"),ot("core-js/modules/es.typed-array.to-locale-string.js"),ot("core-js/modules/es.typed-array.to-string.js"),ot("core-js/modules/es.array.slice.js");var bt=ot("./capability"),St=ot("inherits"),Tt=ot("readable-stream"),mt=Bt.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},xt=Bt.IncomingMessage=function(ft,z,tt,at){var it=this;if(Tt.Readable.call(it),it._mode=tt,it.headers={},it.rawHeaders=[],it.trailers={},it.rawTrailers=[],it.on("end",function(){vt.nextTick(function(){it.emit("close")})}),tt==="fetch"){var lt=function Ft(){dt.read().then(function(Nt){if(!it._destroyed){if(Nt.done){gt.clearTimeout(at),it.push(null);return}it.push(new kt(Nt.value)),Ft()}}).catch(function(Nt){gt.clearTimeout(at),it._destroyed||it.emit("error",Nt)})};if(it._fetchResponse=z,it.url=z.url,it.statusCode=z.status,it.statusMessage=z.statusText,z.headers.forEach(function(Ft,Nt){it.headers[Nt.toLowerCase()]=Ft,it.rawHeaders.push(Nt,Ft)}),bt.writableStream){var ut=new WritableStream({write:function(Nt){return new Promise(function(jt,Gt){it._destroyed?Gt():it.push(new kt(Nt))?jt():it._resumeFetch=jt})},close:function(){gt.clearTimeout(at),it._destroyed||it.push(null)},abort:function(Nt){it._destroyed||it.emit("error",Nt)}});try{z.body.pipeTo(ut).catch(function(Ft){gt.clearTimeout(at),it._destroyed||it.emit("error",Ft)});return}catch(Ft){}}var dt=z.body.getReader();lt()}else{it._xhr=ft,it._pos=0,it.url=ft.responseURL,it.statusCode=ft.status,it.statusMessage=ft.statusText;var Pt=ft.getAllResponseHeaders().split(/\r?\n/);if(Pt.forEach(function(Ft){var Nt=Ft.match(/^([^:]+):\s*(.*)/);if(Nt){var jt=Nt[1].toLowerCase();jt==="set-cookie"?(it.headers[jt]===void 0&&(it.headers[jt]=[]),it.headers[jt].push(Nt[2])):it.headers[jt]!==void 0?it.headers[jt]+=", "+Nt[2]:it.headers[jt]=Nt[2],it.rawHeaders.push(Nt[1],Nt[2])}}),it._charset="x-user-defined",!bt.overrideMimeType){var At=it.rawHeaders["mime-type"];if(At){var Dt=At.match(/;\s*charset=([^;])(;|$)/);Dt&&(it._charset=Dt[1].toLowerCase())}it._charset||(it._charset="utf-8")}}};St(xt,Tt.Readable),xt.prototype._read=function(){var ft=this,z=ft._resumeFetch;z&&(ft._resumeFetch=null,z())},xt.prototype._onXHRProgress=function(){var ft=this,z=ft._xhr,tt=null;switch(ft._mode){case"text:vbarray":if(z.readyState!==mt.DONE)break;try{tt=new gt.VBArray(z.responseBody).toArray()}catch(dt){}if(tt!==null){ft.push(new kt(tt));break}case"text":try{tt=z.responseText}catch(dt){ft._mode="text:vbarray";break}if(tt.length>ft._pos){var at=tt.substr(ft._pos);if(ft._charset==="x-user-defined"){for(var it=new kt(at.length),lt=0;lt<at.length;lt++)it[lt]=at.charCodeAt(lt)&255;ft.push(it)}else ft.push(at,ft._charset);ft._pos=tt.length}break;case"arraybuffer":if(z.readyState!==mt.DONE||!z.response)break;tt=z.response,ft.push(new kt(new Uint8Array(tt)));break;case"moz-chunked-arraybuffer":if(tt=z.response,z.readyState!==mt.LOADING||!tt)break;ft.push(new kt(new Uint8Array(tt)));break;case"ms-stream":if(tt=z.response,z.readyState!==mt.LOADING)break;var ut=new gt.MSStreamReader;ut.onprogress=function(){ut.result.byteLength>ft._pos&&(ft.push(new kt(new Uint8Array(ut.result.slice(ft._pos)))),ft._pos=ut.result.byteLength)},ut.onload=function(){ft.push(null)},ut.readAsArrayBuffer(tt);break}ft._xhr.readyState===mt.DONE&&ft._mode!=="ms-stream"&&ft.push(null)}}).call(this)}).call(this,ot("_process"),typeof fn!="undefined"?fn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ot("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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/helpers/typeof"));ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.search.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.string.split.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.array.join.js"),ot("core-js/modules/es.string.trim.js"),ot("core-js/modules/es.string.match.js"),ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.splice.js");var kt=ot("punycode"),bt=ot("./util");Bt.parse=Nt,Bt.resolve=Gt,Bt.resolveObject=Wt,Bt.format=jt,Bt.Url=St;function St(){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 Tt=/^([a-z0-9.+-]+:)/i,mt=/:[0-9]*$/,xt=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ft=["<",">",'"',"`"," ","\r",`
|
|
`," "],z=["{","}","|","\\","^","`"].concat(ft),tt=["'"].concat(z),at=["%","/","?",";","#"].concat(tt),it=["/","?","#"],lt=255,ut=/^[+a-z0-9A-Z_-]{0,63}$/,dt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Pt={javascript:!0,"javascript:":!0},At={javascript:!0,"javascript:":!0},Dt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Ft=ot("querystring");function Nt(Jt,Ut,Ht){if(Jt&&bt.isObject(Jt)&&Jt instanceof St)return Jt;var oe=new St;return oe.parse(Jt,Ut,Ht),oe}St.prototype.parse=function(Jt,Ut,Ht){if(!bt.isString(Jt))throw new TypeError("Parameter 'url' must be a string, not "+(0,gt.default)(Jt));var oe=Jt.indexOf("?"),se=oe!==-1&&oe<Jt.indexOf("#")?"?":"#",ce=Jt.split(se),Pe=/\\/g;ce[0]=ce[0].replace(Pe,"/"),Jt=ce.join(se);var Yt=Jt;if(Yt=Yt.trim(),!Ht&&Jt.split("#").length===1){var ne=xt.exec(Yt);if(ne)return this.path=Yt,this.href=Yt,this.pathname=ne[1],ne[2]?(this.search=ne[2],Ut?this.query=Ft.parse(this.search.substr(1)):this.query=this.search.substr(1)):Ut&&(this.search="",this.query={}),this}var ve=Tt.exec(Yt);if(ve){ve=ve[0];var Se=ve.toLowerCase();this.protocol=Se,Yt=Yt.substr(ve.length)}if(Ht||ve||Yt.match(/^\/\/[^@\/]+@[^@\/]+/)){var be=Yt.substr(0,2)==="//";be&&!(ve&&At[ve])&&(Yt=Yt.substr(2),this.slashes=!0)}if(!At[ve]&&(be||ve&&!Dt[ve])){for(var fe=-1,pe=0;pe<it.length;pe++){var he=Yt.indexOf(it[pe]);he!==-1&&(fe===-1||he<fe)&&(fe=he)}var Ce,de;fe===-1?de=Yt.lastIndexOf("@"):de=Yt.lastIndexOf("@",fe),de!==-1&&(Ce=Yt.slice(0,de),Yt=Yt.slice(de+1),this.auth=decodeURIComponent(Ce)),fe=-1;for(var pe=0;pe<at.length;pe++){var he=Yt.indexOf(at[pe]);he!==-1&&(fe===-1||he<fe)&&(fe=he)}fe===-1&&(fe=Yt.length),this.host=Yt.slice(0,fe),Yt=Yt.slice(fe),this.parseHost(),this.hostname=this.hostname||"";var ye=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ye)for(var Ne=this.hostname.split("."),pe=0,xe=Ne.length;pe<xe;pe++){var re=Ne[pe];if(re&&!re.match(ut)){for(var Kt="",wt=0,Lt=re.length;wt<Lt;wt++)re.charCodeAt(wt)>127?Kt+="x":Kt+=re[wt];if(!Kt.match(ut)){var Xt=Ne.slice(0,pe),ee=Ne.slice(pe+1),It=re.match(dt);It&&(Xt.push(It[1]),ee.unshift(It[2])),ee.length&&(Yt="/"+ee.join(".")+Yt),this.hostname=Xt.join(".");break}}}this.hostname.length>lt?this.hostname="":this.hostname=this.hostname.toLowerCase(),ye||(this.hostname=kt.toASCII(this.hostname));var Rt=this.port?":"+this.port:"",Vt=this.hostname||"";this.host=Vt+Rt,this.href+=this.host,ye&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Yt[0]!=="/"&&(Yt="/"+Yt))}if(!Pt[Se])for(var pe=0,xe=tt.length;pe<xe;pe++){var $t=tt[pe];if(Yt.indexOf($t)!==-1){var ue=encodeURIComponent($t);ue===$t&&(ue=escape($t)),Yt=Yt.split($t).join(ue)}}var ge=Yt.indexOf("#");ge!==-1&&(this.hash=Yt.substr(ge),Yt=Yt.slice(0,ge));var Me=Yt.indexOf("?");if(Me!==-1?(this.search=Yt.substr(Me),this.query=Yt.substr(Me+1),Ut&&(this.query=Ft.parse(this.query)),Yt=Yt.slice(0,Me)):Ut&&(this.search="",this.query={}),Yt&&(this.pathname=Yt),Dt[Se]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Rt=this.pathname||"",Ae=this.search||"";this.path=Rt+Ae}return this.href=this.format(),this};function jt(Jt){return bt.isString(Jt)&&(Jt=Nt(Jt)),Jt instanceof St?Jt.format():St.prototype.format.call(Jt)}St.prototype.format=function(){var Jt=this.auth||"";Jt&&(Jt=encodeURIComponent(Jt),Jt=Jt.replace(/%3A/i,":"),Jt+="@");var Ut=this.protocol||"",Ht=this.pathname||"",oe=this.hash||"",se=!1,ce="";this.host?se=Jt+this.host:this.hostname&&(se=Jt+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(se+=":"+this.port)),this.query&&bt.isObject(this.query)&&Object.keys(this.query).length&&(ce=Ft.stringify(this.query));var Pe=this.search||ce&&"?"+ce||"";return Ut&&Ut.substr(-1)!==":"&&(Ut+=":"),this.slashes||(!Ut||Dt[Ut])&&se!==!1?(se="//"+(se||""),Ht&&Ht.charAt(0)!=="/"&&(Ht="/"+Ht)):se||(se=""),oe&&oe.charAt(0)!=="#"&&(oe="#"+oe),Pe&&Pe.charAt(0)!=="?"&&(Pe="?"+Pe),Ht=Ht.replace(/[?#]/g,function(Yt){return encodeURIComponent(Yt)}),Pe=Pe.replace("#","%23"),Ut+se+Ht+Pe+oe};function Gt(Jt,Ut){return Nt(Jt,!1,!0).resolve(Ut)}St.prototype.resolve=function(Jt){return this.resolveObject(Nt(Jt,!1,!0)).format()};function Wt(Jt,Ut){return Jt?Nt(Jt,!1,!0).resolveObject(Ut):Ut}St.prototype.resolveObject=function(Jt){if(bt.isString(Jt)){var Ut=new St;Ut.parse(Jt,!1,!0),Jt=Ut}for(var Ht=new St,oe=Object.keys(this),se=0;se<oe.length;se++){var ce=oe[se];Ht[ce]=this[ce]}if(Ht.hash=Jt.hash,Jt.href==="")return Ht.href=Ht.format(),Ht;if(Jt.slashes&&!Jt.protocol){for(var Pe=Object.keys(Jt),Yt=0;Yt<Pe.length;Yt++){var ne=Pe[Yt];ne!=="protocol"&&(Ht[ne]=Jt[ne])}return Dt[Ht.protocol]&&Ht.hostname&&!Ht.pathname&&(Ht.path=Ht.pathname="/"),Ht.href=Ht.format(),Ht}if(Jt.protocol&&Jt.protocol!==Ht.protocol){if(!Dt[Jt.protocol]){for(var ve=Object.keys(Jt),Se=0;Se<ve.length;Se++){var be=ve[Se];Ht[be]=Jt[be]}return Ht.href=Ht.format(),Ht}if(Ht.protocol=Jt.protocol,!Jt.host&&!At[Jt.protocol]){for(var xe=(Jt.pathname||"").split("/");xe.length&&!(Jt.host=xe.shift()););Jt.host||(Jt.host=""),Jt.hostname||(Jt.hostname=""),xe[0]!==""&&xe.unshift(""),xe.length<2&&xe.unshift(""),Ht.pathname=xe.join("/")}else Ht.pathname=Jt.pathname;if(Ht.search=Jt.search,Ht.query=Jt.query,Ht.host=Jt.host||"",Ht.auth=Jt.auth,Ht.hostname=Jt.hostname||Jt.host,Ht.port=Jt.port,Ht.pathname||Ht.search){var fe=Ht.pathname||"",pe=Ht.search||"";Ht.path=fe+pe}return Ht.slashes=Ht.slashes||Jt.slashes,Ht.href=Ht.format(),Ht}var he=Ht.pathname&&Ht.pathname.charAt(0)==="/",Ce=Jt.host||Jt.pathname&&Jt.pathname.charAt(0)==="/",de=Ce||he||Ht.host&&Jt.pathname,ye=de,Ne=Ht.pathname&&Ht.pathname.split("/")||[],xe=Jt.pathname&&Jt.pathname.split("/")||[],re=Ht.protocol&&!Dt[Ht.protocol];if(re&&(Ht.hostname="",Ht.port=null,Ht.host&&(Ne[0]===""?Ne[0]=Ht.host:Ne.unshift(Ht.host)),Ht.host="",Jt.protocol&&(Jt.hostname=null,Jt.port=null,Jt.host&&(xe[0]===""?xe[0]=Jt.host:xe.unshift(Jt.host)),Jt.host=null),de=de&&(xe[0]===""||Ne[0]==="")),Ce)Ht.host=Jt.host||Jt.host===""?Jt.host:Ht.host,Ht.hostname=Jt.hostname||Jt.hostname===""?Jt.hostname:Ht.hostname,Ht.search=Jt.search,Ht.query=Jt.query,Ne=xe;else if(xe.length)Ne||(Ne=[]),Ne.pop(),Ne=Ne.concat(xe),Ht.search=Jt.search,Ht.query=Jt.query;else if(!bt.isNullOrUndefined(Jt.search)){if(re){Ht.hostname=Ht.host=Ne.shift();var Kt=Ht.host&&Ht.host.indexOf("@")>0?Ht.host.split("@"):!1;Kt&&(Ht.auth=Kt.shift(),Ht.host=Ht.hostname=Kt.shift())}return Ht.search=Jt.search,Ht.query=Jt.query,(!bt.isNull(Ht.pathname)||!bt.isNull(Ht.search))&&(Ht.path=(Ht.pathname?Ht.pathname:"")+(Ht.search?Ht.search:"")),Ht.href=Ht.format(),Ht}if(!Ne.length)return Ht.pathname=null,Ht.search?Ht.path="/"+Ht.search:Ht.path=null,Ht.href=Ht.format(),Ht;for(var wt=Ne.slice(-1)[0],Lt=(Ht.host||Jt.host||Ne.length>1)&&(wt==="."||wt==="..")||wt==="",Xt=0,ee=Ne.length;ee>=0;ee--)wt=Ne[ee],wt==="."?Ne.splice(ee,1):wt===".."?(Ne.splice(ee,1),Xt++):Xt&&(Ne.splice(ee,1),Xt--);if(!de&&!ye)for(;Xt--;Xt)Ne.unshift("..");de&&Ne[0]!==""&&(!Ne[0]||Ne[0].charAt(0)!=="/")&&Ne.unshift(""),Lt&&Ne.join("/").substr(-1)!=="/"&&Ne.push("");var It=Ne[0]===""||Ne[0]&&Ne[0].charAt(0)==="/";if(re){Ht.hostname=Ht.host=It?"":Ne.length?Ne.shift():"";var Kt=Ht.host&&Ht.host.indexOf("@")>0?Ht.host.split("@"):!1;Kt&&(Ht.auth=Kt.shift(),Ht.host=Ht.hostname=Kt.shift())}return de=de||Ht.host&&Ne.length,de&&!It&&Ne.unshift(""),Ne.length?Ht.pathname=Ne.join("/"):(Ht.pathname=null,Ht.path=null),(!bt.isNull(Ht.pathname)||!bt.isNull(Ht.search))&&(Ht.path=(Ht.pathname?Ht.pathname:"")+(Ht.search?Ht.search:"")),Ht.auth=Jt.auth||Ht.auth,Ht.slashes=Ht.slashes||Jt.slashes,Ht.href=Ht.format(),Ht},St.prototype.parseHost=function(){var Jt=this.host,Ut=mt.exec(Jt);Ut&&(Ut=Ut[0],Ut!==":"&&(this.port=Ut.substr(1)),Jt=Jt.substr(0,Jt.length-Ut.length)),Jt&&(this.hostname=Jt)}},{"./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(ot,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/helpers/typeof"));_t.exports={isString:function(bt){return typeof bt=="string"},isObject:function(bt){return(0,gt.default)(bt)==="object"&&bt!==null},isNull:function(bt){return bt===null},isNullOrUndefined:function(bt){return bt==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(ot,_t,Bt){"use strict";ot("core-js/modules/es.number.constructor.js"),Bt.encodeURIComponent=function(vt){try{return encodeURIComponent(vt)}catch(gt){return vt}},Bt.escape=ot("escape-html"),Bt.timestamp=function(gt){if(gt){var kt=gt;return typeof kt=="string"&&(kt=Number(kt)),String(gt).length===10&&(kt*=1e3),new Date(kt)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(ot,_t,Bt){(function(vt,gt){(function(){"use strict";var kt=ot("@babel/runtime/helpers/interopRequireDefault"),bt=kt(ot("@babel/runtime/helpers/typeof"));ot("core-js/modules/es.string.trim.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.split.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.array.concat.js");var St=ot("util"),Tt=ot("url"),mt=ot("http"),xt=ot("https"),ft=ot("debug")("urllib"),z=ot("humanize-ms"),tt=0,at=Math.pow(2,31)-10,it=/^https?:\/\//i;function lt(At,Dt){return At===void 0?Dt:At}function ut(At){return At?At.split(";")[0].trim().toLowerCase():""}function dt(At,Dt){return function(Ft,Nt,jt){if(Ft)return Dt(Ft);At({data:Nt,status:jt.statusCode,headers:jt.headers,res:jt})}}Bt.TIMEOUTS=[z("300s"),z("300s")];var Pt=["json","text"];Bt.request=function(Dt,Ft,Nt){return arguments.length===2&&typeof Ft=="function"&&(Nt=Ft,Ft=null),typeof Nt=="function"?Bt.requestWithCallback(Dt,Ft,Nt):new Promise(function(jt,Gt){Bt.requestWithCallback(Dt,Ft,dt(jt,Gt))})},Bt.requestWithCallback=function(Dt,Ft,Nt){if(!Dt||typeof Dt!="string"&&(0,bt.default)(Dt)!=="object"){var jt=St.format("expect request url to be a string or a http request options, but got %j",Dt);throw new Error(jt)}arguments.length===2&&typeof Ft=="function"&&(Nt=Ft,Ft=null),Ft=Ft||{},tt>=at&&(tt=0);var Gt=++tt;Ft.requestUrls=Ft.requestUrls||[];var Wt={requestId:Gt,url:Dt,args:Ft,ctx:Ft.ctx};Ft.emitter&&Ft.emitter.emit("request",Wt),Ft.timeout=Ft.timeout||Bt.TIMEOUTS,Ft.maxRedirects=Ft.maxRedirects||10,Ft.streaming=Ft.streaming||Ft.customResponse;var Jt=Date.now(),Ut;typeof Dt=="string"?(it.test(Dt)||(Dt="https://"+Dt),Ut=Tt.parse(Dt)):Ut=Dt;var Ht=(Ft.type||Ft.method||Ut.method||"GET").toUpperCase(),oe=Ut.port||80,se=mt,ce=lt(Ft.agent,Bt.agent),Pe=Ft.fixJSONCtlChars;Ut.protocol==="https:"&&(se=xt,ce=lt(Ft.httpsAgent,Bt.httpsAgent),Ut.port||(oe=443));var Yt={host:Ut.hostname||Ut.host||"localhost",path:Ut.path||"/",method:Ht,port:oe,agent:ce,headers:Ft.headers||{},lookup:Ft.lookup};Array.isArray(Ft.timeout)?Yt.requestTimeout=Ft.timeout[Ft.timeout.length-1]:typeof Ft.timeout!="undefined"&&(Yt.requestTimeout=Ft.timeout);var ne=Ft.auth||Ut.auth;ne&&(Yt.auth=ne);var ve=Ft.content||Ft.data,Se=Ht==="GET"||Ht==="HEAD"||Ft.dataAsQueryString;if(!Ft.content&&ve&&!(typeof ve=="string"||gt.isBuffer(ve)))if(Se)ve=Ft.nestedQuerystring?qs.stringify(ve):querystring.stringify(ve);else{var be=Yt.headers["Content-Type"]||Yt.headers["content-type"];be||(Ft.contentType==="json"?be="application/json":be="application/x-www-form-urlencoded",Yt.headers["Content-Type"]=be),ut(be)==="application/json"?ve=JSON.stringify(ve):ve=Ft.nestedQuerystring?qs.stringify(ve):querystring.stringify(ve)}Se&&ve&&(Yt.path+=(Ut.query?"&":"?")+ve,ve=null);var fe=0;if(ve){var pe=ve.length;gt.isBuffer(ve)||(pe=gt.byteLength(ve)),fe=Yt.headers["Content-Length"]=pe}Ft.dataType==="json"&&(Yt.headers.Accept="application/json"),typeof Ft.beforeRequest=="function"&&Ft.beforeRequest(Yt);var he=null,Ce=null,de=null,ye=!1,Ne=!1,xe=0,re=-1,Kt=!1,wt="",Lt="",Xt=null;Ft.timing&&(Xt={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function ee(){he&&(clearTimeout(he),he=null)}function It(){Ce&&(clearTimeout(Ce),Ce=null)}function Rt(He,Ue,We){if(It(),!Nt){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Gt,vt.pid,Yt.method,Dt),He&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
stack: %s`,Date(),Gt,vt.pid,He.name,He.message,He.stack);return}var Ve=Nt;Nt=null;var rn={};We&&(re=We.statusCode,rn=We.headers);var an=Date.now()-Jt;Xt&&(Xt.contentDownload=an),ft("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",an,xe,re,Yt.method,Yt.host,Yt.path,Ne,Xt);var ln={status:re,statusCode:re,headers:rn,size:xe,aborted:Kt,rt:an,keepAliveSocket:Ne,data:Ue,requestUrls:Ft.requestUrls,timing:Xt,remoteAddress:wt,remotePort:Lt};if(He){var Sn="";ce&&typeof ce.getCurrentStatus=="function"&&(Sn=", agent status: "+JSON.stringify(ce.getCurrentStatus())),He.message+=", "+Yt.method+" "+Dt+" "+re+" (connected: "+ye+", keepalive socket: "+Ne+Sn+`)
|
|
headers: `+JSON.stringify(rn),He.data=Ue,He.path=Yt.path,He.status=re,He.headers=rn,He.res=ln}Ve(He,Ue,Ft.streaming?We:ln),Ft.emitter&&(Wt.url=Dt,Wt.socket=Ye&&Ye.connection,Wt.options=Yt,Wt.size=fe,Ft.emitter.emit("response",{requestId:Gt,error:He,ctx:Ft.ctx,req:Wt,res:ln}))}function Vt(He){var Ue=null;if(Ft.followRedirect&&statuses.redirect[He.statusCode]){Ft._followRedirectCount=(Ft._followRedirectCount||0)+1;var We=He.headers.location;if(!We)Ue=new Error("Got statusCode "+He.statusCode+" but cannot resolve next location from headers"),Ue.name="FollowRedirectError";else if(Ft._followRedirectCount>Ft.maxRedirects)Ue=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Dt),Ue.name="MaxRedirectError";else{var Ve=Ft.formatRedirectUrl?Ft.formatRedirectUrl(Dt,We):Tt.resolve(Dt,We);ft("Request#%d %s: `redirected` from %s to %s",Gt,Yt.path,Dt,Ve),It(),Ft.headers&&Ft.headers.Host&&it.test(We)&&(Ft.headers.Host=null);var rn=Nt;return Nt=null,Bt.requestWithCallback(Ve,Ft,rn),{redirect:!0,error:null}}}return{redirect:!1,error:Ue}}Ft.gzip&&!Yt.headers["Accept-Encoding"]&&!Yt.headers["accept-encoding"]&&(Yt.headers["Accept-Encoding"]="gzip");function $t(He,Ue,We){var Ve=He.headers["content-encoding"];return We(null,Ue,Ve)}var ue=Ft.writeStream;ft("Request#%d %s %s with headers %j, options.path: %s",Gt,Ht,Dt,Yt.headers,Yt.path),Ft.requestUrls.push(Dt);function ge(He){if(Xt&&(Xt.waiting=Date.now()-Jt),ft("Request#%d %s `req response` event emit: status %d, headers: %j",Gt,Dt,He.statusCode,He.headers),Ft.streaming){var Ue=Vt(He);if(Ue.redirect){He.resume();return}return Ue.error?(He.resume(),Rt(Ue.error,null,He)):Rt(null,null,He)}if(He.on("close",function(){ft("Request#%d %s: `res close` event emit, total size %d",Gt,Dt,xe)}),He.on("error",function(){ft("Request#%d %s: `res error` event emit, total size %d",Gt,Dt,xe)}),He.on("aborted",function(){Kt=!0,ft("Request#%d %s: `res aborted` event emit, total size %d",Gt,Dt,xe)}),ue){var We=Vt(He);if(We.redirect){He.resume();return}return We.error?(He.resume(),ue.end(),Rt(We.error,null,He)):(Ft.consumeWriteStream===!1?He.on("end",Rt.bind(null,null,null,He)):ue.on("close",function(){ft("Request#%d %s: writeStream close event emitted",Gt,Dt),Rt(de||null,null,He)}),He.pipe(ue))}var Ve=[];He.on("data",function(rn){ft("Request#%d %s: `res data` event emit, size %d",Gt,Dt,rn.length),xe+=rn.length,Ve.push(rn)}),He.on("end",function(){var rn=gt.concat(Ve,xe);if(ft("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Gt,Dt,xe,He._dumped),de)return Rt(de,rn,He);var an=Vt(He);if(an.error)return Rt(an.error,rn,He);an.redirect||$t(He,rn,function(ln,Sn,_n){if(ln)return Rt(ln,rn,He);if(!_n&&Pt.indexOf(Ft.dataType)>=0){try{Sn=decodeBodyByCharset(Sn,He)}catch(Yn){return ft("decodeBodyByCharset error: %s",Yn),Rt(null,Sn,He)}if(Ft.dataType==="json")if(xe===0)Sn=null;else{var Xn=parseJSON(Sn,Pe);Xn.error?ln=Xn.error:Sn=Xn.data}}Kt&&ft("Request#%d %s: Remote socket was terminated before `response.end()` was called",Gt,Dt),Rt(ln,Sn,He)})})}var Me,Ae;Array.isArray(Ft.timeout)?(Me=z(Ft.timeout[0]),Ae=z(Ft.timeout[1])):Me=Ae=z(Ft.timeout),ft("ConnectTimeout: %d, ResponseTimeout: %d",Me,Ae);function Be(){ft("Connect timer ticking, timeout: %d",Me),he=setTimeout(function(){he=null,re===-1&&(re=-2);var He="Connect timeout for "+Me+"ms",Ue="ConnectionTimeoutError";Ye.socket||(Ue="SocketAssignTimeoutError",He+=", working sockets is full"),de=new Error(He),de.name=Ue,de.requestId=Gt,ft("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Gt,Dt,de.name,He,ye),Qe()},Me)}function Ze(){ft("Response timer ticking, timeout: %d",Ae),Ce=setTimeout(function(){Ce=null;var He="Response timeout for "+Ae+"ms",Ue="ResponseTimeoutError";de=new Error(He),de.name=Ue,de.requestId=Gt,ft("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Gt,Dt,de.name,He,ye),Qe()},Ae)}var Ye;Yt.mode=Ft.mode?Ft.mode:"";try{Ye=se.request(Yt,ge)}catch(He){return Rt(He)}typeof window=="undefined"?Be():Ye.on("requestTimeout",function(){re===-1&&(re=-2);var He="Connect timeout for "+Me+"ms",Ue="ConnectionTimeoutError";de=new Error(He),de.name=Ue,de.requestId=Gt,Qe()});function Qe(){ft("Request#%d %s abort, connected: %s",Gt,Dt,ye),Ye.socket||(de.noSocket=!0,Rt(de)),Ye.abort()}return Xt&&Ye.on("finish",function(){Xt.requestSent=Date.now()-Jt}),Ye.once("socket",function(He){Xt&&(Xt.queuing=Date.now()-Jt);var Ue=He.readyState;if(Ue==="opening"){He.once("lookup",function(We,Ve,rn){ft("Request#%d %s lookup: %s, %s, %s",Gt,Dt,We,Ve,rn),Xt&&(Xt.dnslookup=Date.now()-Jt),Ve&&(wt=Ve)}),He.once("connect",function(){Xt&&(Xt.connected=Date.now()-Jt),ee(),Ze(),ft("Request#%d %s new socket connected",Gt,Dt),ye=!0,wt||(wt=He.remoteAddress),Lt=He.remotePort});return}ft("Request#%d %s reuse socket connected, readyState: %s",Gt,Dt,Ue),ye=!0,Ne=!0,wt||(wt=He.remoteAddress),Lt=He.remotePort,ee(),Ze()}),Ye.on("error",function(He){(He.name==="Error"||He.name==="TypeError")&&(He.name=ye?"ResponseError":"RequestError"),He.message+=' (req "error")',ft("Request#%d %s `req error` event emit, %s: %s",Gt,Dt,He.name,He.message),Rt(de||He)}),ue&&ue.once("error",function(He){He.message+=' (writeStream "error")',de=He,ft("Request#%d %s `writeStream error` event emit, %s: %s",Gt,Dt,He.name,He.message),Qe()}),Ft.stream?(Ft.stream.pipe(Ye),Ft.stream.once("error",function(He){He.message+=' (stream "error")',de=He,ft("Request#%d %s `readStream error` event emit, %s: %s",Gt,Dt,He.name,He.message),Qe()})):Ye.end(ve),Ye.requestId=Gt,Ye}}).call(this)}).call(this,ot("_process"),ot("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,debug:465,http:468,https:355,"humanize-ms":356,url:472,util:419}]},{},[1])(1)})})(window)},99498:function(dn,fn,le){(function(ae){ae(le(89780))})(function(ae){ae.defineOption("placeholder","",function(kt,bt,St){var Tt=St&&St!=ae.Init;if(bt&&!Tt)kt.on("blur",Bt),kt.on("change",vt),kt.on("swapDoc",vt),ae.on(kt.getInputField(),"compositionupdate",kt.state.placeholderCompose=function(){_t(kt)}),vt(kt);else if(!bt&&Tt){kt.off("blur",Bt),kt.off("change",vt),kt.off("swapDoc",vt),ae.off(kt.getInputField(),"compositionupdate",kt.state.placeholderCompose),Re(kt);var mt=kt.getWrapperElement();mt.className=mt.className.replace(" CodeMirror-empty","")}bt&&!kt.hasFocus()&&Bt(kt)});function Re(kt){kt.state.placeholder&&(kt.state.placeholder.parentNode.removeChild(kt.state.placeholder),kt.state.placeholder=null)}function ot(kt){Re(kt);var bt=kt.state.placeholder=document.createElement("pre");bt.style.cssText="height: 0; overflow: visible",bt.style.direction=kt.getOption("direction"),bt.className="CodeMirror-placeholder CodeMirror-line-like";var St=kt.getOption("placeholder");typeof St=="string"&&(St=document.createTextNode(St)),bt.appendChild(St),kt.display.lineSpace.insertBefore(bt,kt.display.lineSpace.firstChild)}function _t(kt){setTimeout(function(){var bt=!1,St=kt.getInputField();St.nodeName=="TEXTAREA"?bt=!St.value:kt.lineCount()==1&&(bt=!/[^\u200b]/.test(St.querySelector(".CodeMirror-line").textContent)),bt?ot(kt):Re(kt)},20)}function Bt(kt){gt(kt)&&ot(kt)}function vt(kt){var bt=kt.getWrapperElement(),St=gt(kt);bt.className=bt.className.replace(" CodeMirror-empty","")+(St?" CodeMirror-empty":""),St?ot(kt):Re(kt)}function gt(kt){return kt.lineCount()===1&&kt.getLine(0)===""}})},25717:function(dn,fn,le){(function(ae){ae(le(89780))})(function(ae){var Re={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ot=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(z,tt,at){at&&at!=ae.Init&&(z.removeKeyMap(Bt),z.state.closeBrackets=null),tt&&(vt(_t(tt,"pairs")),z.state.closeBrackets=tt,z.addKeyMap(Bt))});function _t(z,tt){return tt=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[tt]!=null?z[tt]:Re[tt]}var Bt={Backspace:bt,Enter:St};function vt(z){for(var tt=0;tt<z.length;tt++){var at=z.charAt(tt),it="'"+at+"'";Bt[it]||(Bt[it]=gt(at))}}vt(Re.pairs+"`");function gt(z){return function(tt){return mt(tt,z)}}function kt(z){var tt=z.state.closeBrackets;if(!tt||tt.override)return tt;var at=z.getModeAt(z.getCursor());return at.closeBrackets||tt}function bt(z){var tt=kt(z);if(!tt||z.getOption("disableInput"))return ae.Pass;for(var at=_t(tt,"pairs"),it=z.listSelections(),lt=0;lt<it.length;lt++){if(!it[lt].empty())return ae.Pass;var ut=xt(z,it[lt].head);if(!ut||at.indexOf(ut)%2!=0)return ae.Pass}for(var lt=it.length-1;lt>=0;lt--){var dt=it[lt].head;z.replaceRange("",ot(dt.line,dt.ch-1),ot(dt.line,dt.ch+1),"+delete")}}function St(z){var tt=kt(z),at=tt&&_t(tt,"explode");if(!at||z.getOption("disableInput"))return ae.Pass;for(var it=z.listSelections(),lt=0;lt<it.length;lt++){if(!it[lt].empty())return ae.Pass;var ut=xt(z,it[lt].head);if(!ut||at.indexOf(ut)%2!=0)return ae.Pass}z.operation(function(){var dt=z.lineSeparator()||`
|
|
`;z.replaceSelection(dt+dt,null),z.execCommand("goCharLeft"),it=z.listSelections();for(var Pt=0;Pt<it.length;Pt++){var At=it[Pt].head.line;z.indentLine(At,null,!0),z.indentLine(At+1,null,!0)}})}function Tt(z){var tt=ae.cmpPos(z.anchor,z.head)>0;return{anchor:new ot(z.anchor.line,z.anchor.ch+(tt?-1:1)),head:new ot(z.head.line,z.head.ch+(tt?1:-1))}}function mt(z,tt){var at=kt(z);if(!at||z.getOption("disableInput"))return ae.Pass;var it=_t(at,"pairs"),lt=it.indexOf(tt);if(lt==-1)return ae.Pass;for(var ut=_t(at,"closeBefore"),dt=_t(at,"triples"),Pt=it.charAt(lt+1)==tt,At=z.listSelections(),Dt=lt%2==0,Ft,Nt=0;Nt<At.length;Nt++){var jt=At[Nt],Gt=jt.head,Wt,Jt=z.getRange(Gt,ot(Gt.line,Gt.ch+1));if(Dt&&!jt.empty())Wt="surround";else if((Pt||!Dt)&&Jt==tt)Pt&&ft(z,Gt)?Wt="both":dt.indexOf(tt)>=0&&z.getRange(Gt,ot(Gt.line,Gt.ch+3))==tt+tt+tt?Wt="skipThree":Wt="skip";else if(Pt&&Gt.ch>1&&dt.indexOf(tt)>=0&&z.getRange(ot(Gt.line,Gt.ch-2),Gt)==tt+tt){if(Gt.ch>2&&/\bstring/.test(z.getTokenTypeAt(ot(Gt.line,Gt.ch-2))))return ae.Pass;Wt="addFour"}else if(Pt){var Ut=Gt.ch==0?" ":z.getRange(ot(Gt.line,Gt.ch-1),Gt);if(!ae.isWordChar(Jt)&&Ut!=tt&&!ae.isWordChar(Ut))Wt="both";else return ae.Pass}else if(Dt&&(Jt.length===0||/\s/.test(Jt)||ut.indexOf(Jt)>-1))Wt="both";else return ae.Pass;if(!Ft)Ft=Wt;else if(Ft!=Wt)return ae.Pass}var Ht=lt%2?it.charAt(lt-1):tt,oe=lt%2?tt:it.charAt(lt+1);z.operation(function(){if(Ft=="skip")z.execCommand("goCharRight");else if(Ft=="skipThree")for(var se=0;se<3;se++)z.execCommand("goCharRight");else if(Ft=="surround"){for(var ce=z.getSelections(),se=0;se<ce.length;se++)ce[se]=Ht+ce[se]+oe;z.replaceSelections(ce,"around"),ce=z.listSelections().slice();for(var se=0;se<ce.length;se++)ce[se]=Tt(ce[se]);z.setSelections(ce)}else Ft=="both"?(z.replaceSelection(Ht+oe,null),z.triggerElectric(Ht+oe),z.execCommand("goCharLeft")):Ft=="addFour"&&(z.replaceSelection(Ht+Ht+Ht+Ht,"before"),z.execCommand("goCharRight"))})}function xt(z,tt){var at=z.getRange(ot(tt.line,tt.ch-1),ot(tt.line,tt.ch+1));return at.length==2?at:null}function ft(z,tt){var at=z.getTokenAt(ot(tt.line,tt.ch+1));return/\bstring/.test(at.type)&&at.start==tt.ch&&(tt.ch==0||!/\bstring/.test(z.getTokenTypeAt(tt)))}})},6313:function(dn,fn,le){(function(ae){ae(le(89780),le(32855))})(function(ae){ae.defineOption("autoCloseTags",!1,function(bt,St,Tt){if(Tt!=ae.Init&&Tt&&bt.removeKeyMap("autoCloseTags"),!!St){var mt={name:"autoCloseTags"};(typeof St!="object"||St.whenClosing!==!1)&&(mt["'/'"]=function(xt){return vt(xt)}),(typeof St!="object"||St.whenOpening!==!1)&&(mt["'>'"]=function(xt){return _t(xt)}),bt.addKeyMap(mt)}});var Re=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ot=["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 _t(bt){if(bt.getOption("disableInput"))return ae.Pass;for(var St=bt.listSelections(),Tt=[],mt=bt.getOption("autoCloseTags"),xt=0;xt<St.length;xt++){if(!St[xt].empty())return ae.Pass;var ft=St[xt].head,z=bt.getTokenAt(ft),tt=ae.innerMode(bt.getMode(),z.state),at=tt.state,it=tt.mode.xmlCurrentTag&&tt.mode.xmlCurrentTag(at),lt=it&&it.name;if(!lt)return ae.Pass;var ut=tt.mode.configuration=="html",dt=typeof mt=="object"&&mt.dontCloseTags||ut&&Re,Pt=typeof mt=="object"&&mt.indentTags||ut&&ot;z.end>ft.ch&&(lt=lt.slice(0,lt.length-z.end+ft.ch));var At=lt.toLowerCase();if(!lt||z.type=="string"&&(z.end!=ft.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&it.close||z.string.indexOf("/")==ft.ch-z.start-1||dt&>(dt,At)>-1||kt(bt,tt.mode.xmlCurrentContext&&tt.mode.xmlCurrentContext(at)||[],lt,ft,!0))return ae.Pass;var Dt=typeof mt=="object"&&mt.emptyTags;if(Dt&>(Dt,lt)>-1){Tt[xt]={text:"/>",newPos:ae.Pos(ft.line,ft.ch+2)};continue}var Ft=Pt&>(Pt,At)>-1;Tt[xt]={indent:Ft,text:">"+(Ft?`
|
|
|
|
`:"")+"</"+lt+">",newPos:Ft?ae.Pos(ft.line+1,0):ae.Pos(ft.line,ft.ch+1)}}for(var Nt=typeof mt=="object"&&mt.dontIndentOnAutoClose,xt=St.length-1;xt>=0;xt--){var jt=Tt[xt];bt.replaceRange(jt.text,St[xt].head,St[xt].anchor,"+insert");var Gt=bt.listSelections().slice(0);Gt[xt]={head:jt.newPos,anchor:jt.newPos},bt.setSelections(Gt),!Nt&&jt.indent&&(bt.indentLine(jt.newPos.line,null,!0),bt.indentLine(jt.newPos.line+1,null,!0))}}function Bt(bt,St){for(var Tt=bt.listSelections(),mt=[],xt=St?"/":"</",ft=bt.getOption("autoCloseTags"),z=typeof ft=="object"&&ft.dontIndentOnSlash,tt=0;tt<Tt.length;tt++){if(!Tt[tt].empty())return ae.Pass;var at=Tt[tt].head,it=bt.getTokenAt(at),lt=ae.innerMode(bt.getMode(),it.state),ut=lt.state;if(St&&(it.type=="string"||it.string.charAt(0)!="<"||it.start!=at.ch-1))return ae.Pass;var dt,Pt=lt.mode.name!="xml"&&bt.getMode().name=="htmlmixed";if(Pt&<.mode.name=="javascript")dt=xt+"script";else if(Pt&<.mode.name=="css")dt=xt+"style";else{var At=lt.mode.xmlCurrentContext&<.mode.xmlCurrentContext(ut);if(!At||At.length&&kt(bt,At,At[At.length-1],at))return ae.Pass;dt=xt+At[At.length-1]}bt.getLine(at.line).charAt(it.end)!=">"&&(dt+=">"),mt[tt]=dt}if(bt.replaceSelections(mt),Tt=bt.listSelections(),!z)for(var tt=0;tt<Tt.length;tt++)(tt==Tt.length-1||Tt[tt].head.line<Tt[tt+1].head.line)&&bt.indentLine(Tt[tt].head.line)}function vt(bt){return bt.getOption("disableInput")?ae.Pass:Bt(bt,!0)}ae.commands.closeTag=function(bt){return Bt(bt)};function gt(bt,St){if(bt.indexOf)return bt.indexOf(St);for(var Tt=0,mt=bt.length;Tt<mt;++Tt)if(bt[Tt]==St)return Tt;return-1}function kt(bt,St,Tt,mt,xt){if(!ae.scanForClosingTag)return!1;var ft=Math.min(bt.lastLine()+1,mt.line+500),z=ae.scanForClosingTag(bt,mt,null,ft);if(!z||z.tag!=Tt)return!1;for(var tt=xt?1:0,at=St.length-1;at>=0&&St[at]==Tt;at--)++tt;mt=z.to;for(var at=1;at<tt;at++){var it=ae.scanForClosingTag(bt,mt,null,ft);if(!it||it.tag!=Tt)return!1;mt=it.to}return!0}})},32855:function(dn,fn,le){(function(ae){ae(le(89780))})(function(ae){"use strict";var Re=ae.Pos;function ot(at,it){return at.line-it.line||at.ch-it.ch}var _t="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",Bt=_t+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",vt=new RegExp("<(/?)(["+_t+"]["+Bt+"]*)","g");function gt(at,it,lt,ut){this.line=it,this.ch=lt,this.cm=at,this.text=at.getLine(it),this.min=ut?Math.max(ut.from,at.firstLine()):at.firstLine(),this.max=ut?Math.min(ut.to-1,at.lastLine()):at.lastLine()}function kt(at,it){var lt=at.cm.getTokenTypeAt(Re(at.line,it));return lt&&/\btag\b/.test(lt)}function bt(at){if(!(at.line>=at.max))return at.ch=0,at.text=at.cm.getLine(++at.line),!0}function St(at){if(!(at.line<=at.min))return at.text=at.cm.getLine(--at.line),at.ch=at.text.length,!0}function Tt(at){for(;;){var it=at.text.indexOf(">",at.ch);if(it==-1){if(bt(at))continue;return}if(!kt(at,it+1)){at.ch=it+1;continue}var lt=at.text.lastIndexOf("/",it),ut=lt>-1&&!/\S/.test(at.text.slice(lt+1,it));return at.ch=it+1,ut?"selfClose":"regular"}}function mt(at){for(;;){var it=at.ch?at.text.lastIndexOf("<",at.ch-1):-1;if(it==-1){if(St(at))continue;return}if(!kt(at,it+1)){at.ch=it;continue}vt.lastIndex=it,at.ch=it;var lt=vt.exec(at.text);if(lt&<.index==it)return lt}}function xt(at){for(;;){vt.lastIndex=at.ch;var it=vt.exec(at.text);if(!it){if(bt(at))continue;return}if(!kt(at,it.index+1)){at.ch=it.index+1;continue}return at.ch=it.index+it[0].length,it}}function ft(at){for(;;){var it=at.ch?at.text.lastIndexOf(">",at.ch-1):-1;if(it==-1){if(St(at))continue;return}if(!kt(at,it+1)){at.ch=it;continue}var lt=at.text.lastIndexOf("/",it),ut=lt>-1&&!/\S/.test(at.text.slice(lt+1,it));return at.ch=it+1,ut?"selfClose":"regular"}}function z(at,it){for(var lt=[];;){var ut=xt(at),dt,Pt=at.line,At=at.ch-(ut?ut[0].length:0);if(!ut||!(dt=Tt(at)))return;if(dt!="selfClose")if(ut[1]){for(var Dt=lt.length-1;Dt>=0;--Dt)if(lt[Dt]==ut[2]){lt.length=Dt;break}if(Dt<0&&(!it||it==ut[2]))return{tag:ut[2],from:Re(Pt,At),to:Re(at.line,at.ch)}}else lt.push(ut[2])}}function tt(at,it){for(var lt=[];;){var ut=ft(at);if(!ut)return;if(ut=="selfClose"){mt(at);continue}var dt=at.line,Pt=at.ch,At=mt(at);if(!At)return;if(At[1])lt.push(At[2]);else{for(var Dt=lt.length-1;Dt>=0;--Dt)if(lt[Dt]==At[2]){lt.length=Dt;break}if(Dt<0&&(!it||it==At[2]))return{tag:At[2],from:Re(at.line,at.ch),to:Re(dt,Pt)}}}}ae.registerHelper("fold","xml",function(at,it){for(var lt=new gt(at,it.line,0);;){var ut=xt(lt);if(!ut||lt.line!=it.line)return;var dt=Tt(lt);if(!dt)return;if(!ut[1]&&dt!="selfClose"){var Pt=Re(lt.line,lt.ch),At=z(lt,ut[2]);return At&&ot(At.from,Pt)>0?{from:Pt,to:At.from}:null}}}),ae.findMatchingTag=function(at,it,lt){var ut=new gt(at,it.line,it.ch,lt);if(!(ut.text.indexOf(">")==-1&&ut.text.indexOf("<")==-1)){var dt=Tt(ut),Pt=dt&&Re(ut.line,ut.ch),At=dt&&mt(ut);if(!(!dt||!At||ot(ut,it)>0)){var Dt={from:Re(ut.line,ut.ch),to:Pt,tag:At[2]};return dt=="selfClose"?{open:Dt,close:null,at:"open"}:At[1]?{open:tt(ut,At[2]),close:Dt,at:"close"}:(ut=new gt(at,Pt.line,Pt.ch,lt),{open:Dt,close:z(ut,At[2]),at:"open"})}}},ae.findEnclosingTag=function(at,it,lt,ut){for(var dt=new gt(at,it.line,it.ch,lt);;){var Pt=tt(dt,ut);if(!Pt)break;var At=new gt(at,it.line,it.ch,lt),Dt=z(At,Pt.tag);if(Dt)return{open:Pt,close:Dt}}},ae.scanForClosingTag=function(at,it,lt,ut){var dt=new gt(at,it.line,it.ch,ut?{from:0,to:ut}:null);return z(dt,lt)}})},89780:function(dn){(function(fn,le){dn.exports=le()})(this,function(){"use strict";var fn=navigator.userAgent,le=navigator.platform,ae=/gecko\/\d/i.test(fn),Re=/MSIE \d/.test(fn),ot=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(fn),_t=/Edge\/(\d+)/.exec(fn),Bt=Re||ot||_t,vt=Bt&&(Re?document.documentMode||6:+(_t||ot)[1]),gt=!_t&&/WebKit\//.test(fn),kt=gt&&/Qt\/\d+\.\d+/.test(fn),bt=!_t&&/Chrome\//.test(fn),St=/Opera\//.test(fn),Tt=/Apple Computer/.test(navigator.vendor),mt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(fn),xt=/PhantomJS/.test(fn),ft=!_t&&/AppleWebKit/.test(fn)&&/Mobile\/\w+/.test(fn),z=/Android/.test(fn),tt=ft||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(fn),at=ft||/Mac/.test(le),it=/\bCrOS\b/.test(fn),lt=/win/i.test(le),ut=St&&fn.match(/Version\/(\d*\.\d*)/);ut&&(ut=Number(ut[1])),ut&&ut>=15&&(St=!1,gt=!0);var dt=at&&(kt||St&&(ut==null||ut<12.11)),Pt=ae||Bt&&vt>=9;function At(rt){return new RegExp("(^|\\s)"+rt+"(?:$|\\s)\\s*")}var Dt=function(rt,ct){var Et=rt.className,Ct=At(ct).exec(Et);if(Ct){var Ot=Et.slice(Ct.index+Ct[0].length);rt.className=Et.slice(0,Ct.index)+(Ot?Ct[1]+Ot:"")}};function Ft(rt){for(var ct=rt.childNodes.length;ct>0;--ct)rt.removeChild(rt.firstChild);return rt}function Nt(rt,ct){return Ft(rt).appendChild(ct)}function jt(rt,ct,Et,Ct){var Ot=document.createElement(rt);if(Et&&(Ot.className=Et),Ct&&(Ot.style.cssText=Ct),typeof ct=="string")Ot.appendChild(document.createTextNode(ct));else if(ct)for(var te=0;te<ct.length;++te)Ot.appendChild(ct[te]);return Ot}function Gt(rt,ct,Et,Ct){var Ot=jt(rt,ct,Et,Ct);return Ot.setAttribute("role","presentation"),Ot}var Wt;document.createRange?Wt=function(rt,ct,Et,Ct){var Ot=document.createRange();return Ot.setEnd(Ct||rt,Et),Ot.setStart(rt,ct),Ot}:Wt=function(rt,ct,Et){var Ct=document.body.createTextRange();try{Ct.moveToElementText(rt.parentNode)}catch(Ot){return Ct}return Ct.collapse(!0),Ct.moveEnd("character",Et),Ct.moveStart("character",ct),Ct};function Jt(rt,ct){if(ct.nodeType==3&&(ct=ct.parentNode),rt.contains)return rt.contains(ct);do if(ct.nodeType==11&&(ct=ct.host),ct==rt)return!0;while(ct=ct.parentNode)}function Ut(){var rt;try{rt=document.activeElement}catch(ct){rt=document.body||null}for(;rt&&rt.shadowRoot&&rt.shadowRoot.activeElement;)rt=rt.shadowRoot.activeElement;return rt}function Ht(rt,ct){var Et=rt.className;At(ct).test(Et)||(rt.className+=(Et?" ":"")+ct)}function oe(rt,ct){for(var Et=rt.split(" "),Ct=0;Ct<Et.length;Ct++)Et[Ct]&&!At(Et[Ct]).test(ct)&&(ct+=" "+Et[Ct]);return ct}var se=function(rt){rt.select()};ft?se=function(rt){rt.selectionStart=0,rt.selectionEnd=rt.value.length}:Bt&&(se=function(rt){try{rt.select()}catch(ct){}});function ce(rt){var ct=Array.prototype.slice.call(arguments,1);return function(){return rt.apply(null,ct)}}function Pe(rt,ct,Et){ct||(ct={});for(var Ct in rt)rt.hasOwnProperty(Ct)&&(Et!==!1||!ct.hasOwnProperty(Ct))&&(ct[Ct]=rt[Ct]);return ct}function Yt(rt,ct,Et,Ct,Ot){ct==null&&(ct=rt.search(/[^\s\u00a0]/),ct==-1&&(ct=rt.length));for(var te=Ct||0,me=Ot||0;;){var Te=rt.indexOf(" ",te);if(Te<0||Te>=ct)return me+(ct-te);me+=Te-te,me+=Et-me%Et,te=Te+1}}var ne=function(){this.id=null,this.f=null,this.time=0,this.handler=ce(this.onTimeout,this)};ne.prototype.onTimeout=function(rt){rt.id=0,rt.time<=+new Date?rt.f():setTimeout(rt.handler,rt.time-+new Date)},ne.prototype.set=function(rt,ct){this.f=ct;var Et=+new Date+rt;(!this.id||Et<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,rt),this.time=Et)};function ve(rt,ct){for(var Et=0;Et<rt.length;++Et)if(rt[Et]==ct)return Et;return-1}var Se=50,be={toString:function(){return"CodeMirror.Pass"}},fe={scroll:!1},pe={origin:"*mouse"},he={origin:"+move"};function Ce(rt,ct,Et){for(var Ct=0,Ot=0;;){var te=rt.indexOf(" ",Ct);te==-1&&(te=rt.length);var me=te-Ct;if(te==rt.length||Ot+me>=ct)return Ct+Math.min(me,ct-Ot);if(Ot+=te-Ct,Ot+=Et-Ot%Et,Ct=te+1,Ot>=ct)return Ct}}var de=[""];function ye(rt){for(;de.length<=rt;)de.push(Ne(de)+" ");return de[rt]}function Ne(rt){return rt[rt.length-1]}function xe(rt,ct){for(var Et=[],Ct=0;Ct<rt.length;Ct++)Et[Ct]=ct(rt[Ct],Ct);return Et}function re(rt,ct,Et){for(var Ct=0,Ot=Et(ct);Ct<rt.length&&Et(rt[Ct])<=Ot;)Ct++;rt.splice(Ct,0,ct)}function Kt(){}function wt(rt,ct){var Et;return Object.create?Et=Object.create(rt):(Kt.prototype=rt,Et=new Kt),ct&&Pe(ct,Et),Et}var Lt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Xt(rt){return/\w/.test(rt)||rt>"\x80"&&(rt.toUpperCase()!=rt.toLowerCase()||Lt.test(rt))}function ee(rt,ct){return ct?ct.source.indexOf("\\w")>-1&&Xt(rt)?!0:ct.test(rt):Xt(rt)}function It(rt){for(var ct in rt)if(rt.hasOwnProperty(ct)&&rt[ct])return!1;return!0}var Rt=/[\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 Vt(rt){return rt.charCodeAt(0)>=768&&Rt.test(rt)}function $t(rt,ct,Et){for(;(Et<0?ct>0:ct<rt.length)&&Vt(rt.charAt(ct));)ct+=Et;return ct}function ue(rt,ct,Et){for(var Ct=ct>Et?-1:1;;){if(ct==Et)return ct;var Ot=(ct+Et)/2,te=Ct<0?Math.ceil(Ot):Math.floor(Ot);if(te==ct)return rt(te)?ct:Et;rt(te)?Et=te:ct=te+Ct}}function ge(rt,ct,Et,Ct){if(!rt)return Ct(ct,Et,"ltr",0);for(var Ot=!1,te=0;te<rt.length;++te){var me=rt[te];(me.from<Et&&me.to>ct||ct==Et&&me.to==ct)&&(Ct(Math.max(me.from,ct),Math.min(me.to,Et),me.level==1?"rtl":"ltr",te),Ot=!0)}Ot||Ct(ct,Et,"ltr")}var Me=null;function Ae(rt,ct,Et){var Ct;Me=null;for(var Ot=0;Ot<rt.length;++Ot){var te=rt[Ot];if(te.from<ct&&te.to>ct)return Ot;te.to==ct&&(te.from!=te.to&&Et=="before"?Ct=Ot:Me=Ot),te.from==ct&&(te.from!=te.to&&Et!="before"?Ct=Ot:Me=Ot)}return Ct!=null?Ct:Me}var Be=function(){var rt="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ct="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Et(Ie){return Ie<=247?rt.charAt(Ie):1424<=Ie&&Ie<=1524?"R":1536<=Ie&&Ie<=1785?ct.charAt(Ie-1536):1774<=Ie&&Ie<=2220?"r":8192<=Ie&&Ie<=8203?"w":Ie==8204?"b":"L"}var Ct=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Ot=/[stwN]/,te=/[LRr]/,me=/[Lb1n]/,Te=/[1n]/;function ke(Ie,nn,ze){this.level=Ie,this.from=nn,this.to=ze}return function(Ie,nn){var ze=nn=="ltr"?"L":"R";if(Ie.length==0||nn=="ltr"&&!Ct.test(Ie))return!1;for(var pn=Ie.length,cn=[],Vn=0;Vn<pn;++Vn)cn.push(Et(Ie.charCodeAt(Vn)));for(var qn=0,ar=ze;qn<pn;++qn){var Cr=cn[qn];Cr=="m"?cn[qn]=ar:ar=Cr}for(var Wr=0,Fr=ze;Wr<pn;++Wr){var Xr=cn[Wr];Xr=="1"&&Fr=="r"?cn[Wr]="n":te.test(Xr)&&(Fr=Xr,Xr=="r"&&(cn[Wr]="R"))}for(var ci=1,jr=cn[0];ci<pn-1;++ci){var Mi=cn[ci];Mi=="+"&&jr=="1"&&cn[ci+1]=="1"?cn[ci]="1":Mi==","&&jr==cn[ci+1]&&(jr=="1"||jr=="n")&&(cn[ci]=jr),jr=Mi}for(var Po=0;Po<pn;++Po){var ua=cn[Po];if(ua==",")cn[Po]="N";else if(ua=="%"){var Fo=void 0;for(Fo=Po+1;Fo<pn&&cn[Fo]=="%";++Fo);for(var ps=Po&&cn[Po-1]=="!"||Fo<pn&&cn[Fo]=="1"?"1":"N",Wa=Po;Wa<Fo;++Wa)cn[Wa]=ps;Po=Fo-1}}for(var qo=0,Ts=ze;qo<pn;++qo){var Fa=cn[qo];Ts=="L"&&Fa=="1"?cn[qo]="L":te.test(Fa)&&(Ts=Fa)}for(var ta=0;ta<pn;++ta)if(Ot.test(cn[ta])){var Ki=void 0;for(Ki=ta+1;Ki<pn&&Ot.test(cn[Ki]);++Ki);for(var Ro=(ta?cn[ta-1]:ze)=="L",Sa=(Ki<pn?cn[Ki]:ze)=="L",Da=Ro==Sa?Ro?"L":"R":ze,vl=ta;vl<Ki;++vl)cn[vl]=Da;ta=Ki-1}for(var Do=[],il,Go=0;Go<pn;)if(me.test(cn[Go])){var xf=Go;for(++Go;Go<pn&&me.test(cn[Go]);++Go);Do.push(new ke(0,xf,Go))}else{var Us=Go,Ls=Do.length,gs=nn=="rtl"?1:0;for(++Go;Go<pn&&cn[Go]!="L";++Go);for(var ho=Us;ho<Go;)if(Te.test(cn[ho])){Us<ho&&(Do.splice(Ls,0,new ke(1,Us,ho)),Ls+=gs);var xa=ho;for(++ho;ho<Go&&Te.test(cn[ho]);++ho);Do.splice(Ls,0,new ke(2,xa,ho)),Ls+=gs,Us=ho}else++ho;Us<Go&&Do.splice(Ls,0,new ke(1,Us,Go))}return nn=="ltr"&&(Do[0].level==1&&(il=Ie.match(/^\s+/))&&(Do[0].from=il[0].length,Do.unshift(new ke(0,0,il[0].length))),Ne(Do).level==1&&(il=Ie.match(/\s+$/))&&(Ne(Do).to-=il[0].length,Do.push(new ke(0,pn-il[0].length,pn)))),nn=="rtl"?Do.reverse():Do}}();function Ze(rt,ct){var Et=rt.order;return Et==null&&(Et=rt.order=Be(rt.text,ct)),Et}var Ye=[],Qe=function(rt,ct,Et){if(rt.addEventListener)rt.addEventListener(ct,Et,!1);else if(rt.attachEvent)rt.attachEvent("on"+ct,Et);else{var Ct=rt._handlers||(rt._handlers={});Ct[ct]=(Ct[ct]||Ye).concat(Et)}};function He(rt,ct){return rt._handlers&&rt._handlers[ct]||Ye}function Ue(rt,ct,Et){if(rt.removeEventListener)rt.removeEventListener(ct,Et,!1);else if(rt.detachEvent)rt.detachEvent("on"+ct,Et);else{var Ct=rt._handlers,Ot=Ct&&Ct[ct];if(Ot){var te=ve(Ot,Et);te>-1&&(Ct[ct]=Ot.slice(0,te).concat(Ot.slice(te+1)))}}}function We(rt,ct){var Et=He(rt,ct);if(Et.length)for(var Ct=Array.prototype.slice.call(arguments,2),Ot=0;Ot<Et.length;++Ot)Et[Ot].apply(null,Ct)}function Ve(rt,ct,Et){return typeof ct=="string"&&(ct={type:ct,preventDefault:function(){this.defaultPrevented=!0}}),We(rt,Et||ct.type,rt,ct),Xn(ct)||ct.codemirrorIgnore}function rn(rt){var ct=rt._handlers&&rt._handlers.cursorActivity;if(ct)for(var Et=rt.curOp.cursorActivityHandlers||(rt.curOp.cursorActivityHandlers=[]),Ct=0;Ct<ct.length;++Ct)ve(Et,ct[Ct])==-1&&Et.push(ct[Ct])}function an(rt,ct){return He(rt,ct).length>0}function ln(rt){rt.prototype.on=function(ct,Et){Qe(this,ct,Et)},rt.prototype.off=function(ct,Et){Ue(this,ct,Et)}}function Sn(rt){rt.preventDefault?rt.preventDefault():rt.returnValue=!1}function _n(rt){rt.stopPropagation?rt.stopPropagation():rt.cancelBubble=!0}function Xn(rt){return rt.defaultPrevented!=null?rt.defaultPrevented:rt.returnValue==!1}function Yn(rt){Sn(rt),_n(rt)}function Er(rt){return rt.target||rt.srcElement}function dr(rt){var ct=rt.which;return ct==null&&(rt.button&1?ct=1:rt.button&2?ct=3:rt.button&4&&(ct=2)),at&&rt.ctrlKey&&ct==1&&(ct=3),ct}var Mr=function(){if(Bt&&vt<9)return!1;var rt=jt("div");return"draggable"in rt||"dragDrop"in rt}(),Tr;function Or(rt){if(Tr==null){var ct=jt("span","\u200B");Nt(rt,jt("span",[ct,document.createTextNode("x")])),rt.firstChild.offsetHeight!=0&&(Tr=ct.offsetWidth<=1&&ct.offsetHeight>2&&!(Bt&&vt<8))}var Et=Tr?jt("span","\u200B"):jt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Et.setAttribute("cm-text",""),Et}var Sr;function hr(rt){if(Sr!=null)return Sr;var ct=Nt(rt,document.createTextNode("A\u062EA")),Et=Wt(ct,0,1).getBoundingClientRect(),Ct=Wt(ct,1,2).getBoundingClientRect();return Ft(rt),!Et||Et.left==Et.right?!1:Sr=Ct.right-Et.right<3}var zr=`
|
|
|
|
b`.split(/\n/).length!=3?function(rt){for(var ct=0,Et=[],Ct=rt.length;ct<=Ct;){var Ot=rt.indexOf(`
|
|
`,ct);Ot==-1&&(Ot=rt.length);var te=rt.slice(ct,rt.charAt(Ot-1)=="\r"?Ot-1:Ot),me=te.indexOf("\r");me!=-1?(Et.push(te.slice(0,me)),ct+=me+1):(Et.push(te),ct=Ot+1)}return Et}:function(rt){return rt.split(/\r\n?|\n/)},qt=window.getSelection?function(rt){try{return rt.selectionStart!=rt.selectionEnd}catch(ct){return!1}}:function(rt){var ct;try{ct=rt.ownerDocument.selection.createRange()}catch(Et){}return!ct||ct.parentElement()!=rt?!1:ct.compareEndPoints("StartToEnd",ct)!=0},jn=function(){var rt=jt("div");return"oncopy"in rt?!0:(rt.setAttribute("oncopy","return;"),typeof rt.oncopy=="function")}(),Jn=null;function zn(rt){if(Jn!=null)return Jn;var ct=Nt(rt,jt("span","x")),Et=ct.getBoundingClientRect(),Ct=Wt(ct,0,1).getBoundingClientRect();return Jn=Math.abs(Et.left-Ct.left)>1}var Wn={},Kn={};function ir(rt,ct){arguments.length>2&&(ct.dependencies=Array.prototype.slice.call(arguments,2)),Wn[rt]=ct}function Ar(rt,ct){Kn[rt]=ct}function sn(rt){if(typeof rt=="string"&&Kn.hasOwnProperty(rt))rt=Kn[rt];else if(rt&&typeof rt.name=="string"&&Kn.hasOwnProperty(rt.name)){var ct=Kn[rt.name];typeof ct=="string"&&(ct={name:ct}),rt=wt(ct,rt),rt.name=ct.name}else{if(typeof rt=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(rt))return sn("application/xml");if(typeof rt=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(rt))return sn("application/json")}return typeof rt=="string"?{name:rt}:rt||{name:"null"}}function qe(rt,ct){ct=sn(ct);var Et=Wn[ct.name];if(!Et)return qe(rt,"text/plain");var Ct=Et(rt,ct);if($e.hasOwnProperty(ct.name)){var Ot=$e[ct.name];for(var te in Ot)Ot.hasOwnProperty(te)&&(Ct.hasOwnProperty(te)&&(Ct["_"+te]=Ct[te]),Ct[te]=Ot[te])}if(Ct.name=ct.name,ct.helperType&&(Ct.helperType=ct.helperType),ct.modeProps)for(var me in ct.modeProps)Ct[me]=ct.modeProps[me];return Ct}var $e={};function un(rt,ct){var Et=$e.hasOwnProperty(rt)?$e[rt]:$e[rt]={};Pe(ct,Et)}function or(rt,ct){if(ct===!0)return ct;if(rt.copyState)return rt.copyState(ct);var Et={};for(var Ct in ct){var Ot=ct[Ct];Ot instanceof Array&&(Ot=Ot.concat([])),Et[Ct]=Ot}return Et}function Qn(rt,ct){for(var Et;rt.innerMode&&(Et=rt.innerMode(ct),!(!Et||Et.mode==rt));)ct=Et.state,rt=Et.mode;return Et||{mode:rt,state:ct}}function pr(rt,ct,Et){return rt.startState?rt.startState(ct,Et):!0}var xn=function(rt,ct,Et){this.pos=this.start=0,this.string=rt,this.tabSize=ct||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Et};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(rt){var ct=this.string.charAt(this.pos),Et;if(typeof rt=="string"?Et=ct==rt:Et=ct&&(rt.test?rt.test(ct):rt(ct)),Et)return++this.pos,ct},xn.prototype.eatWhile=function(rt){for(var ct=this.pos;this.eat(rt););return this.pos>ct},xn.prototype.eatSpace=function(){for(var rt=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>rt},xn.prototype.skipToEnd=function(){this.pos=this.string.length},xn.prototype.skipTo=function(rt){var ct=this.string.indexOf(rt,this.pos);if(ct>-1)return this.pos=ct,!0},xn.prototype.backUp=function(rt){this.pos-=rt},xn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Yt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Yt(this.string,this.lineStart,this.tabSize):0)},xn.prototype.indentation=function(){return Yt(this.string,null,this.tabSize)-(this.lineStart?Yt(this.string,this.lineStart,this.tabSize):0)},xn.prototype.match=function(rt,ct,Et){if(typeof rt=="string"){var Ct=function(me){return Et?me.toLowerCase():me},Ot=this.string.substr(this.pos,rt.length);if(Ct(Ot)==Ct(rt))return ct!==!1&&(this.pos+=rt.length),!0}else{var te=this.string.slice(this.pos).match(rt);return te&&te.index>0?null:(te&&ct!==!1&&(this.pos+=te[0].length),te)}},xn.prototype.current=function(){return this.string.slice(this.start,this.pos)},xn.prototype.hideFirstChars=function(rt,ct){this.lineStart+=rt;try{return ct()}finally{this.lineStart-=rt}},xn.prototype.lookAhead=function(rt){var ct=this.lineOracle;return ct&&ct.lookAhead(rt)},xn.prototype.baseToken=function(){var rt=this.lineOracle;return rt&&rt.baseToken(this.pos)};function Rn(rt,ct){if(ct-=rt.first,ct<0||ct>=rt.size)throw new Error("There is no line "+(ct+rt.first)+" in the document.");for(var Et=rt;!Et.lines;)for(var Ct=0;;++Ct){var Ot=Et.children[Ct],te=Ot.chunkSize();if(ct<te){Et=Ot;break}ct-=te}return Et.lines[ct]}function vr(rt,ct,Et){var Ct=[],Ot=ct.line;return rt.iter(ct.line,Et.line+1,function(te){var me=te.text;Ot==Et.line&&(me=me.slice(0,Et.ch)),Ot==ct.line&&(me=me.slice(ct.ch)),Ct.push(me),++Ot}),Ct}function Nr(rt,ct,Et){var Ct=[];return rt.iter(ct,Et,function(Ot){Ct.push(Ot.text)}),Ct}function Nn(rt,ct){var Et=ct-rt.height;if(Et)for(var Ct=rt;Ct;Ct=Ct.parent)Ct.height+=Et}function Oe(rt){if(rt.parent==null)return null;for(var ct=rt.parent,Et=ve(ct.lines,rt),Ct=ct.parent;Ct;ct=Ct,Ct=Ct.parent)for(var Ot=0;Ct.children[Ot]!=ct;++Ot)Et+=Ct.children[Ot].chunkSize();return Et+ct.first}function Ke(rt,ct){var Et=rt.first;t:do{for(var Ct=0;Ct<rt.children.length;++Ct){var Ot=rt.children[Ct],te=Ot.height;if(ct<te){rt=Ot;continue t}ct-=te,Et+=Ot.chunkSize()}return Et}while(!rt.lines);for(var me=0;me<rt.lines.length;++me){var Te=rt.lines[me],ke=Te.height;if(ct<ke)break;ct-=ke}return Et+me}function Ln(rt,ct){return ct>=rt.first&&ct<rt.first+rt.size}function An(rt,ct){return String(rt.lineNumberFormatter(ct+rt.firstLineNumber))}function en(rt,ct,Et){if(Et===void 0&&(Et=null),!(this instanceof en))return new en(rt,ct,Et);this.line=rt,this.ch=ct,this.sticky=Et}function Tn(rt,ct){return rt.line-ct.line||rt.ch-ct.ch}function kn(rt,ct){return rt.sticky==ct.sticky&&Tn(rt,ct)==0}function On(rt){return en(rt.line,rt.ch)}function er(rt,ct){return Tn(rt,ct)<0?ct:rt}function Fn(rt,ct){return Tn(rt,ct)<0?rt:ct}function Bn(rt,ct){return Math.max(rt.first,Math.min(ct,rt.first+rt.size-1))}function Un(rt,ct){if(ct.line<rt.first)return en(rt.first,0);var Et=rt.first+rt.size-1;return ct.line>Et?en(Et,Rn(rt,Et).text.length):cr(ct,Rn(rt,ct.line).text.length)}function cr(rt,ct){var Et=rt.ch;return Et==null||Et>ct?en(rt.line,ct):Et<0?en(rt.line,0):rt}function lr(rt,ct){for(var Et=[],Ct=0;Ct<ct.length;Ct++)Et[Ct]=Un(rt,ct[Ct]);return Et}var yn=function(rt,ct){this.state=rt,this.lookAhead=ct},In=function(rt,ct,Et,Ct){this.state=ct,this.doc=rt,this.line=Et,this.maxLookAhead=Ct||0,this.baseTokens=null,this.baseTokenPos=1};In.prototype.lookAhead=function(rt){var ct=this.doc.getLine(this.line+rt);return ct!=null&&rt>this.maxLookAhead&&(this.maxLookAhead=rt),ct},In.prototype.baseToken=function(rt){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=rt;)this.baseTokenPos+=2;var ct=this.baseTokens[this.baseTokenPos+1];return{type:ct&&ct.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-rt}},In.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},In.fromSaved=function(rt,ct,Et){return ct instanceof yn?new In(rt,or(rt.mode,ct.state),Et,ct.lookAhead):new In(rt,or(rt.mode,ct),Et)},In.prototype.save=function(rt){var ct=rt!==!1?or(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new yn(ct,this.maxLookAhead):ct};function Gr(rt,ct,Et,Ct){var Ot=[rt.state.modeGen],te={};Hr(rt,ct.text,rt.doc.mode,Et,function(Ie,nn){return Ot.push(Ie,nn)},te,Ct);for(var me=Et.state,Te=function(Ie){Et.baseTokens=Ot;var nn=rt.state.overlays[Ie],ze=1,pn=0;Et.state=!0,Hr(rt,ct.text,nn.mode,Et,function(cn,Vn){for(var qn=ze;pn<cn;){var ar=Ot[ze];ar>cn&&Ot.splice(ze,1,cn,Ot[ze+1],ar),ze+=2,pn=Math.min(cn,ar)}if(Vn)if(nn.opaque)Ot.splice(qn,ze-qn,cn,"overlay "+Vn),ze=qn+2;else for(;qn<ze;qn+=2){var Cr=Ot[qn+1];Ot[qn+1]=(Cr?Cr+" ":"")+"overlay "+Vn}},te),Et.state=me,Et.baseTokens=null,Et.baseTokenPos=1},ke=0;ke<rt.state.overlays.length;++ke)Te(ke);return{styles:Ot,classes:te.bgClass||te.textClass?te:null}}function Yr(rt,ct,Et){if(!ct.styles||ct.styles[0]!=rt.state.modeGen){var Ct=fi(rt,Oe(ct)),Ot=ct.text.length>rt.options.maxHighlightLength&&or(rt.doc.mode,Ct.state),te=Gr(rt,ct,Ct);Ot&&(Ct.state=Ot),ct.stateAfter=Ct.save(!Ot),ct.styles=te.styles,te.classes?ct.styleClasses=te.classes:ct.styleClasses&&(ct.styleClasses=null),Et===rt.doc.highlightFrontier&&(rt.doc.modeFrontier=Math.max(rt.doc.modeFrontier,++rt.doc.highlightFrontier))}return ct.styles}function fi(rt,ct,Et){var Ct=rt.doc,Ot=rt.display;if(!Ct.mode.startState)return new In(Ct,!0,ct);var te=Qr(rt,ct,Et),me=te>Ct.first&&Rn(Ct,te-1).stateAfter,Te=me?In.fromSaved(Ct,me,te):new In(Ct,pr(Ct.mode),te);return Ct.iter(te,ct,function(ke){tn(rt,ke.text,Te);var Ie=Te.line;ke.stateAfter=Ie==ct-1||Ie%5==0||Ie>=Ot.viewFrom&&Ie<Ot.viewTo?Te.save():null,Te.nextLine()}),Et&&(Ct.modeFrontier=Te.line),Te}function tn(rt,ct,Et,Ct){var Ot=rt.doc.mode,te=new xn(ct,rt.options.tabSize,Et);for(te.start=te.pos=Ct||0,ct==""&&tr(Ot,Et.state);!te.eol();)gr(Ot,te,Et.state),te.start=te.pos}function tr(rt,ct){if(rt.blankLine)return rt.blankLine(ct);if(rt.innerMode){var Et=Qn(rt,ct);if(Et.mode.blankLine)return Et.mode.blankLine(Et.state)}}function gr(rt,ct,Et,Ct){for(var Ot=0;Ot<10;Ot++){Ct&&(Ct[0]=Qn(rt,Et).mode);var te=rt.token(ct,Et);if(ct.pos>ct.start)return te}throw new Error("Mode "+rt.name+" failed to advance stream.")}var Hn=function(rt,ct,Et){this.start=rt.start,this.end=rt.pos,this.string=rt.current(),this.type=ct||null,this.state=Et};function Zr(rt,ct,Et,Ct){var Ot=rt.doc,te=Ot.mode,me;ct=Un(Ot,ct);var Te=Rn(Ot,ct.line),ke=fi(rt,ct.line,Et),Ie=new xn(Te.text,rt.options.tabSize,ke),nn;for(Ct&&(nn=[]);(Ct||Ie.pos<ct.ch)&&!Ie.eol();)Ie.start=Ie.pos,me=gr(te,Ie,ke.state),Ct&&nn.push(new Hn(Ie,me,or(Ot.mode,ke.state)));return Ct?nn:new Hn(Ie,me,ke.state)}function Ir(rt,ct){if(rt)for(;;){var Et=rt.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!Et)break;rt=rt.slice(0,Et.index)+rt.slice(Et.index+Et[0].length);var Ct=Et[1]?"bgClass":"textClass";ct[Ct]==null?ct[Ct]=Et[2]:new RegExp("(?:^|\\s)"+Et[2]+"(?:$|\\s)").test(ct[Ct])||(ct[Ct]+=" "+Et[2])}return rt}function Hr(rt,ct,Et,Ct,Ot,te,me){var Te=Et.flattenSpans;Te==null&&(Te=rt.options.flattenSpans);var ke=0,Ie=null,nn=new xn(ct,rt.options.tabSize,Ct),ze,pn=rt.options.addModeClass&&[null];for(ct==""&&Ir(tr(Et,Ct.state),te);!nn.eol();){if(nn.pos>rt.options.maxHighlightLength?(Te=!1,me&&tn(rt,ct,Ct,nn.pos),nn.pos=ct.length,ze=null):ze=Ir(gr(Et,nn,Ct.state,pn),te),pn){var cn=pn[0].name;cn&&(ze="m-"+(ze?cn+" "+ze:cn))}if(!Te||Ie!=ze){for(;ke<nn.start;)ke=Math.min(nn.start,ke+5e3),Ot(ke,Ie);Ie=ze}nn.start=nn.pos}for(;ke<nn.pos;){var Vn=Math.min(nn.pos,ke+5e3);Ot(Vn,Ie),ke=Vn}}function Qr(rt,ct,Et){for(var Ct,Ot,te=rt.doc,me=Et?-1:ct-(rt.doc.mode.innerMode?1e3:100),Te=ct;Te>me;--Te){if(Te<=te.first)return te.first;var ke=Rn(te,Te-1),Ie=ke.stateAfter;if(Ie&&(!Et||Te+(Ie instanceof yn?Ie.lookAhead:0)<=te.modeFrontier))return Te;var nn=Yt(ke.text,null,rt.options.tabSize);(Ot==null||Ct>nn)&&(Ot=Te-1,Ct=nn)}return Ot}function ei(rt,ct){if(rt.modeFrontier=Math.min(rt.modeFrontier,ct),!(rt.highlightFrontier<ct-10)){for(var Et=rt.first,Ct=ct-1;Ct>Et;Ct--){var Ot=Rn(rt,Ct).stateAfter;if(Ot&&(!(Ot instanceof yn)||Ct+Ot.lookAhead<ct)){Et=Ct+1;break}}rt.highlightFrontier=Math.min(rt.highlightFrontier,Et)}}var hi=!1,mn=!1;function vi(){hi=!0}function gn(){mn=!0}function oi(rt,ct,Et){this.marker=rt,this.from=ct,this.to=Et}function Gi(rt,ct){if(rt)for(var Et=0;Et<rt.length;++Et){var Ct=rt[Et];if(Ct.marker==ct)return Ct}}function mi(rt,ct){for(var Et,Ct=0;Ct<rt.length;++Ct)rt[Ct]!=ct&&(Et||(Et=[])).push(rt[Ct]);return Et}function Bi(rt,ct){rt.markedSpans=rt.markedSpans?rt.markedSpans.concat([ct]):[ct],ct.marker.attachLine(rt)}function ii(rt,ct,Et){var Ct;if(rt)for(var Ot=0;Ot<rt.length;++Ot){var te=rt[Ot],me=te.marker,Te=te.from==null||(me.inclusiveLeft?te.from<=ct:te.from<ct);if(Te||te.from==ct&&me.type=="bookmark"&&(!Et||!te.marker.insertLeft)){var ke=te.to==null||(me.inclusiveRight?te.to>=ct:te.to>ct);(Ct||(Ct=[])).push(new oi(me,te.from,ke?null:te.to))}}return Ct}function Rr(rt,ct,Et){var Ct;if(rt)for(var Ot=0;Ot<rt.length;++Ot){var te=rt[Ot],me=te.marker,Te=te.to==null||(me.inclusiveRight?te.to>=ct:te.to>ct);if(Te||te.from==ct&&me.type=="bookmark"&&(!Et||te.marker.insertLeft)){var ke=te.from==null||(me.inclusiveLeft?te.from<=ct:te.from<ct);(Ct||(Ct=[])).push(new oi(me,ke?null:te.from-ct,te.to==null?null:te.to-ct))}}return Ct}function wi(rt,ct){if(ct.full)return null;var Et=Ln(rt,ct.from.line)&&Rn(rt,ct.from.line).markedSpans,Ct=Ln(rt,ct.to.line)&&Rn(rt,ct.to.line).markedSpans;if(!Et&&!Ct)return null;var Ot=ct.from.ch,te=ct.to.ch,me=Tn(ct.from,ct.to)==0,Te=ii(Et,Ot,me),ke=Rr(Ct,te,me),Ie=ct.text.length==1,nn=Ne(ct.text).length+(Ie?Ot:0);if(Te)for(var ze=0;ze<Te.length;++ze){var pn=Te[ze];if(pn.to==null){var cn=Gi(ke,pn.marker);cn?Ie&&(pn.to=cn.to==null?null:cn.to+nn):pn.to=Ot}}if(ke)for(var Vn=0;Vn<ke.length;++Vn){var qn=ke[Vn];if(qn.to!=null&&(qn.to+=nn),qn.from==null){var ar=Gi(Te,qn.marker);ar||(qn.from=nn,Ie&&(Te||(Te=[])).push(qn))}else qn.from+=nn,Ie&&(Te||(Te=[])).push(qn)}Te&&(Te=Eo(Te)),ke&&ke!=Te&&(ke=Eo(ke));var Cr=[Te];if(!Ie){var Wr=ct.text.length-2,Fr;if(Wr>0&&Te)for(var Xr=0;Xr<Te.length;++Xr)Te[Xr].to==null&&(Fr||(Fr=[])).push(new oi(Te[Xr].marker,null,null));for(var ci=0;ci<Wr;++ci)Cr.push(Fr);Cr.push(ke)}return Cr}function Eo(rt){for(var ct=0;ct<rt.length;++ct){var Et=rt[ct];Et.from!=null&&Et.from==Et.to&&Et.marker.clearWhenEmpty!==!1&&rt.splice(ct--,1)}return rt.length?rt:null}function Oi(rt,ct,Et){var Ct=null;if(rt.iter(ct.line,Et.line+1,function(cn){if(cn.markedSpans)for(var Vn=0;Vn<cn.markedSpans.length;++Vn){var qn=cn.markedSpans[Vn].marker;qn.readOnly&&(!Ct||ve(Ct,qn)==-1)&&(Ct||(Ct=[])).push(qn)}}),!Ct)return null;for(var Ot=[{from:ct,to:Et}],te=0;te<Ct.length;++te)for(var me=Ct[te],Te=me.find(0),ke=0;ke<Ot.length;++ke){var Ie=Ot[ke];if(!(Tn(Ie.to,Te.from)<0||Tn(Ie.from,Te.to)>0)){var nn=[ke,1],ze=Tn(Ie.from,Te.from),pn=Tn(Ie.to,Te.to);(ze<0||!me.inclusiveLeft&&!ze)&&nn.push({from:Ie.from,to:Te.from}),(pn>0||!me.inclusiveRight&&!pn)&&nn.push({from:Te.to,to:Ie.to}),Ot.splice.apply(Ot,nn),ke+=nn.length-3}}return Ot}function $n(rt){var ct=rt.markedSpans;if(ct){for(var Et=0;Et<ct.length;++Et)ct[Et].marker.detachLine(rt);rt.markedSpans=null}}function Le(rt,ct){if(ct){for(var Et=0;Et<ct.length;++Et)ct[Et].marker.attachLine(rt);rt.markedSpans=ct}}function Ti(rt){return rt.inclusiveLeft?-1:0}function so(rt){return rt.inclusiveRight?1:0}function Ji(rt,ct){var Et=rt.lines.length-ct.lines.length;if(Et!=0)return Et;var Ct=rt.find(),Ot=ct.find(),te=Tn(Ct.from,Ot.from)||Ti(rt)-Ti(ct);if(te)return-te;var me=Tn(Ct.to,Ot.to)||so(rt)-so(ct);return me||ct.id-rt.id}function Zi(rt,ct){var Et=mn&&rt.markedSpans,Ct;if(Et)for(var Ot=void 0,te=0;te<Et.length;++te)Ot=Et[te],Ot.marker.collapsed&&(ct?Ot.from:Ot.to)==null&&(!Ct||Ji(Ct,Ot.marker)<0)&&(Ct=Ot.marker);return Ct}function pi(rt){return Zi(rt,!0)}function sr(rt){return Zi(rt,!1)}function wr(rt,ct){var Et=mn&&rt.markedSpans,Ct;if(Et)for(var Ot=0;Ot<Et.length;++Ot){var te=Et[Ot];te.marker.collapsed&&(te.from==null||te.from<ct)&&(te.to==null||te.to>ct)&&(!Ct||Ji(Ct,te.marker)<0)&&(Ct=te.marker)}return Ct}function Jr(rt,ct,Et,Ct,Ot){var te=Rn(rt,ct),me=mn&&te.markedSpans;if(me)for(var Te=0;Te<me.length;++Te){var ke=me[Te];if(ke.marker.collapsed){var Ie=ke.marker.find(0),nn=Tn(Ie.from,Et)||Ti(ke.marker)-Ti(Ot),ze=Tn(Ie.to,Ct)||so(ke.marker)-so(Ot);if(!(nn>=0&&ze<=0||nn<=0&&ze>=0)&&(nn<=0&&(ke.marker.inclusiveRight&&Ot.inclusiveLeft?Tn(Ie.to,Et)>=0:Tn(Ie.to,Et)>0)||nn>=0&&(ke.marker.inclusiveRight&&Ot.inclusiveLeft?Tn(Ie.from,Ct)<=0:Tn(Ie.from,Ct)<0)))return!0}}}function mr(rt){for(var ct;ct=pi(rt);)rt=ct.find(-1,!0).line;return rt}function Vr(rt){for(var ct;ct=sr(rt);)rt=ct.find(1,!0).line;return rt}function yr(rt){for(var ct,Et;ct=sr(rt);)rt=ct.find(1,!0).line,(Et||(Et=[])).push(rt);return Et}function ur(rt,ct){var Et=Rn(rt,ct),Ct=mr(Et);return Et==Ct?ct:Oe(Ct)}function kr(rt,ct){if(ct>rt.lastLine())return ct;var Et=Rn(rt,ct),Ct;if(!Cn(rt,Et))return ct;for(;Ct=sr(Et);)Et=Ct.find(1,!0).line;return Oe(Et)+1}function Cn(rt,ct){var Et=mn&&ct.markedSpans;if(Et){for(var Ct=void 0,Ot=0;Ot<Et.length;++Ot)if(Ct=Et[Ot],!!Ct.marker.collapsed){if(Ct.from==null)return!0;if(!Ct.marker.widgetNode&&Ct.from==0&&Ct.marker.inclusiveLeft&&di(rt,ct,Ct))return!0}}}function di(rt,ct,Et){if(Et.to==null){var Ct=Et.marker.find(1,!0);return di(rt,Ct.line,Gi(Ct.line.markedSpans,Et.marker))}if(Et.marker.inclusiveRight&&Et.to==ct.text.length)return!0;for(var Ot=void 0,te=0;te<ct.markedSpans.length;++te)if(Ot=ct.markedSpans[te],Ot.marker.collapsed&&!Ot.marker.widgetNode&&Ot.from==Et.to&&(Ot.to==null||Ot.to!=Et.from)&&(Ot.marker.inclusiveLeft||Et.marker.inclusiveRight)&&di(rt,ct,Ot))return!0}function Ci(rt){rt=mr(rt);for(var ct=0,Et=rt.parent,Ct=0;Ct<Et.lines.length;++Ct){var Ot=Et.lines[Ct];if(Ot==rt)break;ct+=Ot.height}for(var te=Et.parent;te;Et=te,te=Et.parent)for(var me=0;me<te.children.length;++me){var Te=te.children[me];if(Te==Et)break;ct+=Te.height}return ct}function io(rt){if(rt.height==0)return 0;for(var ct=rt.text.length,Et,Ct=rt;Et=pi(Ct);){var Ot=Et.find(0,!0);Ct=Ot.from.line,ct+=Ot.from.ch-Ot.to.ch}for(Ct=rt;Et=sr(Ct);){var te=Et.find(0,!0);ct-=Ct.text.length-te.from.ch,Ct=te.to.line,ct+=Ct.text.length-te.to.ch}return ct}function bi(rt){var ct=rt.display,Et=rt.doc;ct.maxLine=Rn(Et,Et.first),ct.maxLineLength=io(ct.maxLine),ct.maxLineChanged=!0,Et.iter(function(Ct){var Ot=io(Ct);Ot>ct.maxLineLength&&(ct.maxLineLength=Ot,ct.maxLine=Ct)})}var lo=function(rt,ct,Et){this.text=rt,Le(this,ct),this.height=Et?Et(this):1};lo.prototype.lineNo=function(){return Oe(this)},ln(lo);function xo(rt,ct,Et,Ct){rt.text=ct,rt.stateAfter&&(rt.stateAfter=null),rt.styles&&(rt.styles=null),rt.order!=null&&(rt.order=null),$n(rt),Le(rt,Et);var Ot=Ct?Ct(rt):1;Ot!=rt.height&&Nn(rt,Ot)}function Bo(rt){rt.parent=null,$n(rt)}var po={},na={};function Ao(rt,ct){if(!rt||/^\s*$/.test(rt))return null;var Et=ct.addModeClass?na:po;return Et[rt]||(Et[rt]=rt.replace(/\S+/g,"cm-$&"))}function on(rt,ct){var Et=Gt("span",null,null,gt?"padding-right: .1px":null),Ct={pre:Gt("pre",[Et],"CodeMirror-line"),content:Et,col:0,pos:0,cm:rt,trailingSpace:!1,splitSpaces:rt.getOption("lineWrapping")};ct.measure={};for(var Ot=0;Ot<=(ct.rest?ct.rest.length:0);Ot++){var te=Ot?ct.rest[Ot-1]:ct.line,me=void 0;Ct.pos=0,Ct.addToken=za,hr(rt.display.measure)&&(me=Ze(te,rt.doc.direction))&&(Ct.addToken=Hi(Ct.addToken,me)),Ct.map=[];var Te=ct!=rt.display.externalMeasured&&Oe(te);ls(te,Ct,Yr(rt,te,Te)),te.styleClasses&&(te.styleClasses.bgClass&&(Ct.bgClass=oe(te.styleClasses.bgClass,Ct.bgClass||"")),te.styleClasses.textClass&&(Ct.textClass=oe(te.styleClasses.textClass,Ct.textClass||""))),Ct.map.length==0&&Ct.map.push(0,0,Ct.content.appendChild(Or(rt.display.measure))),Ot==0?(ct.measure.map=Ct.map,ct.measure.cache={}):((ct.measure.maps||(ct.measure.maps=[])).push(Ct.map),(ct.measure.caches||(ct.measure.caches=[])).push({}))}if(gt){var ke=Ct.content.lastChild;(/\bcm-tab\b/.test(ke.className)||ke.querySelector&&ke.querySelector(".cm-tab"))&&(Ct.content.className="cm-tab-wrap-hack")}return We(rt,"renderLine",rt,ct.line,Ct.pre),Ct.pre.className&&(Ct.textClass=oe(Ct.pre.className,Ct.textClass||"")),Ct}function ra(rt){var ct=jt("span","\u2022","cm-invalidchar");return ct.title="\\u"+rt.charCodeAt(0).toString(16),ct.setAttribute("aria-label",ct.title),ct}function za(rt,ct,Et,Ct,Ot,te,me){if(ct){var Te=rt.splitSpaces?Ya(ct,rt.trailingSpace):ct,ke=rt.cm.state.specialChars,Ie=!1,nn;if(!ke.test(ct))rt.col+=ct.length,nn=document.createTextNode(Te),rt.map.push(rt.pos,rt.pos+ct.length,nn),Bt&&vt<9&&(Ie=!0),rt.pos+=ct.length;else{nn=document.createDocumentFragment();for(var ze=0;;){ke.lastIndex=ze;var pn=ke.exec(ct),cn=pn?pn.index-ze:ct.length-ze;if(cn){var Vn=document.createTextNode(Te.slice(ze,ze+cn));Bt&&vt<9?nn.appendChild(jt("span",[Vn])):nn.appendChild(Vn),rt.map.push(rt.pos,rt.pos+cn,Vn),rt.col+=cn,rt.pos+=cn}if(!pn)break;ze+=cn+1;var qn=void 0;if(pn[0]==" "){var ar=rt.cm.options.tabSize,Cr=ar-rt.col%ar;qn=nn.appendChild(jt("span",ye(Cr),"cm-tab")),qn.setAttribute("role","presentation"),qn.setAttribute("cm-text"," "),rt.col+=Cr}else pn[0]=="\r"||pn[0]==`
|
|
`?(qn=nn.appendChild(jt("span",pn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),qn.setAttribute("cm-text",pn[0]),rt.col+=1):(qn=rt.cm.options.specialCharPlaceholder(pn[0]),qn.setAttribute("cm-text",pn[0]),Bt&&vt<9?nn.appendChild(jt("span",[qn])):nn.appendChild(qn),rt.col+=1);rt.map.push(rt.pos,rt.pos+1,qn),rt.pos++}}if(rt.trailingSpace=Te.charCodeAt(ct.length-1)==32,Et||Ct||Ot||Ie||te||me){var Wr=Et||"";Ct&&(Wr+=Ct),Ot&&(Wr+=Ot);var Fr=jt("span",[nn],Wr,te);if(me)for(var Xr in me)me.hasOwnProperty(Xr)&&Xr!="style"&&Xr!="class"&&Fr.setAttribute(Xr,me[Xr]);return rt.content.appendChild(Fr)}rt.content.appendChild(nn)}}function Ya(rt,ct){if(rt.length>1&&!/ /.test(rt))return rt;for(var Et=ct,Ct="",Ot=0;Ot<rt.length;Ot++){var te=rt.charAt(Ot);te==" "&&Et&&(Ot==rt.length-1||rt.charCodeAt(Ot+1)==32)&&(te="\xA0"),Ct+=te,Et=te==" "}return Ct}function Hi(rt,ct){return function(Et,Ct,Ot,te,me,Te,ke){Ot=Ot?Ot+" cm-force-border":"cm-force-border";for(var Ie=Et.pos,nn=Ie+Ct.length;;){for(var ze=void 0,pn=0;pn<ct.length&&(ze=ct[pn],!(ze.to>Ie&&ze.from<=Ie));pn++);if(ze.to>=nn)return rt(Et,Ct,Ot,te,me,Te,ke);rt(Et,Ct.slice(0,ze.to-Ie),Ot,te,null,Te,ke),te=null,Ct=Ct.slice(ze.to-Ie),Ie=ze.to}}}function Js(rt,ct,Et,Ct){var Ot=!Ct&&Et.widgetNode;Ot&&rt.map.push(rt.pos,rt.pos+ct,Ot),!Ct&&rt.cm.display.input.needsContentAttribute&&(Ot||(Ot=rt.content.appendChild(document.createElement("span"))),Ot.setAttribute("cm-marker",Et.id)),Ot&&(rt.cm.display.input.setUneditable(Ot),rt.content.appendChild(Ot)),rt.pos+=ct,rt.trailingSpace=!1}function ls(rt,ct,Et){var Ct=rt.markedSpans,Ot=rt.text,te=0;if(!Ct){for(var me=1;me<Et.length;me+=2)ct.addToken(ct,Ot.slice(te,te=Et[me]),Ao(Et[me+1],ct.cm.options));return}for(var Te=Ot.length,ke=0,Ie=1,nn="",ze,pn,cn=0,Vn,qn,ar,Cr,Wr;;){if(cn==ke){Vn=qn=ar=pn="",Wr=null,Cr=null,cn=1/0;for(var Fr=[],Xr=void 0,ci=0;ci<Ct.length;++ci){var jr=Ct[ci],Mi=jr.marker;if(Mi.type=="bookmark"&&jr.from==ke&&Mi.widgetNode)Fr.push(Mi);else if(jr.from<=ke&&(jr.to==null||jr.to>ke||Mi.collapsed&&jr.to==ke&&jr.from==ke)){if(jr.to!=null&&jr.to!=ke&&cn>jr.to&&(cn=jr.to,qn=""),Mi.className&&(Vn+=" "+Mi.className),Mi.css&&(pn=(pn?pn+";":"")+Mi.css),Mi.startStyle&&jr.from==ke&&(ar+=" "+Mi.startStyle),Mi.endStyle&&jr.to==cn&&(Xr||(Xr=[])).push(Mi.endStyle,jr.to),Mi.title&&((Wr||(Wr={})).title=Mi.title),Mi.attributes)for(var Po in Mi.attributes)(Wr||(Wr={}))[Po]=Mi.attributes[Po];Mi.collapsed&&(!Cr||Ji(Cr.marker,Mi)<0)&&(Cr=jr)}else jr.from>ke&&cn>jr.from&&(cn=jr.from)}if(Xr)for(var ua=0;ua<Xr.length;ua+=2)Xr[ua+1]==cn&&(qn+=" "+Xr[ua]);if(!Cr||Cr.from==ke)for(var Fo=0;Fo<Fr.length;++Fo)Js(ct,0,Fr[Fo]);if(Cr&&(Cr.from||0)==ke){if(Js(ct,(Cr.to==null?Te+1:Cr.to)-ke,Cr.marker,Cr.from==null),Cr.to==null)return;Cr.to==ke&&(Cr=!1)}}if(ke>=Te)break;for(var ps=Math.min(Te,cn);;){if(nn){var Wa=ke+nn.length;if(!Cr){var qo=Wa>ps?nn.slice(0,ps-ke):nn;ct.addToken(ct,qo,ze?ze+Vn:Vn,ar,ke+qo.length==cn?qn:"",pn,Wr)}if(Wa>=ps){nn=nn.slice(ps-ke),ke=ps;break}ke=Wa,ar=""}nn=Ot.slice(te,te=Et[Ie++]),ze=Ao(Et[Ie++],ct.cm.options)}}}function Ml(rt,ct,Et){this.line=ct,this.rest=yr(ct),this.size=this.rest?Oe(Ne(this.rest))-Et+1:1,this.node=this.text=null,this.hidden=Cn(rt,ct)}function Ai(rt,ct,Et){for(var Ct=[],Ot,te=ct;te<Et;te=Ot){var me=new Ml(rt.doc,Rn(rt.doc,te),te);Ot=te+me.size,Ct.push(me)}return Ct}var No=null;function Ga(rt){No?No.ops.push(rt):rt.ownsGroup=No={ops:[rt],delayedCallbacks:[]}}function dl(rt){var ct=rt.delayedCallbacks,Et=0;do{for(;Et<ct.length;Et++)ct[Et].call(null);for(var Ct=0;Ct<rt.ops.length;Ct++){var Ot=rt.ops[Ct];if(Ot.cursorActivityHandlers)for(;Ot.cursorActivityCalled<Ot.cursorActivityHandlers.length;)Ot.cursorActivityHandlers[Ot.cursorActivityCalled++].call(null,Ot.cm)}}while(Et<ct.length)}function uu(rt,ct){var Et=rt.ownsGroup;if(Et)try{dl(Et)}finally{No=null,ct(Et)}}var xs=null;function Br(rt,ct){var Et=He(rt,ct);if(Et.length){var Ct=Array.prototype.slice.call(arguments,2),Ot;No?Ot=No.delayedCallbacks:xs?Ot=xs:(Ot=xs=[],setTimeout(Gl,0));for(var te=function(Te){Ot.push(function(){return Et[Te].apply(null,Ct)})},me=0;me<Et.length;++me)te(me)}}function Gl(){var rt=xs;xs=null;for(var ct=0;ct<rt.length;++ct)rt[ct]()}function hu(rt,ct,Et,Ct){for(var Ot=0;Ot<ct.changes.length;Ot++){var te=ct.changes[Ot];te=="text"?rr(rt,ct):te=="gutter"?ni(rt,ct,Et,Ct):te=="class"?Ur(rt,ct):te=="widget"&&ai(rt,ct,Ct)}ct.changes=null}function us(rt){return rt.node==rt.text&&(rt.node=jt("div",null,null,"position: relative"),rt.text.parentNode&&rt.text.parentNode.replaceChild(rt.node,rt.text),rt.node.appendChild(rt.text),Bt&&vt<8&&(rt.node.style.zIndex=2)),rt.node}function Xo(rt,ct){var Et=ct.bgClass?ct.bgClass+" "+(ct.line.bgClass||""):ct.line.bgClass;if(Et&&(Et+=" CodeMirror-linebackground"),ct.background)Et?ct.background.className=Et:(ct.background.parentNode.removeChild(ct.background),ct.background=null);else if(Et){var Ct=us(ct);ct.background=Ct.insertBefore(jt("div",null,Et),Ct.firstChild),rt.display.input.setUneditable(ct.background)}}function Nu(rt,ct){var Et=rt.display.externalMeasured;return Et&&Et.line==ct.line?(rt.display.externalMeasured=null,ct.measure=Et.measure,Et.built):on(rt,ct)}function rr(rt,ct){var Et=ct.text.className,Ct=Nu(rt,ct);ct.text==ct.node&&(ct.node=Ct.pre),ct.text.parentNode.replaceChild(Ct.pre,ct.text),ct.text=Ct.pre,Ct.bgClass!=ct.bgClass||Ct.textClass!=ct.textClass?(ct.bgClass=Ct.bgClass,ct.textClass=Ct.textClass,Ur(rt,ct)):Et&&(ct.text.className=Et)}function Ur(rt,ct){Xo(rt,ct),ct.line.wrapClass?us(ct).className=ct.line.wrapClass:ct.node!=ct.text&&(ct.node.className="");var Et=ct.textClass?ct.textClass+" "+(ct.line.textClass||""):ct.line.textClass;ct.text.className=Et||""}function ni(rt,ct,Et,Ct){if(ct.gutter&&(ct.node.removeChild(ct.gutter),ct.gutter=null),ct.gutterBackground&&(ct.node.removeChild(ct.gutterBackground),ct.gutterBackground=null),ct.line.gutterClass){var Ot=us(ct);ct.gutterBackground=jt("div",null,"CodeMirror-gutter-background "+ct.line.gutterClass,"left: "+(rt.options.fixedGutter?Ct.fixedPos:-Ct.gutterTotalWidth)+"px; width: "+Ct.gutterTotalWidth+"px"),rt.display.input.setUneditable(ct.gutterBackground),Ot.insertBefore(ct.gutterBackground,ct.text)}var te=ct.line.gutterMarkers;if(rt.options.lineNumbers||te){var me=us(ct),Te=ct.gutter=jt("div",null,"CodeMirror-gutter-wrapper","left: "+(rt.options.fixedGutter?Ct.fixedPos:-Ct.gutterTotalWidth)+"px");if(rt.display.input.setUneditable(Te),me.insertBefore(Te,ct.text),ct.line.gutterClass&&(Te.className+=" "+ct.line.gutterClass),rt.options.lineNumbers&&(!te||!te["CodeMirror-linenumbers"])&&(ct.lineNumber=Te.appendChild(jt("div",An(rt.options,Et),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Ct.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+rt.display.lineNumInnerWidth+"px"))),te)for(var ke=0;ke<rt.display.gutterSpecs.length;++ke){var Ie=rt.display.gutterSpecs[ke].className,nn=te.hasOwnProperty(Ie)&&te[Ie];nn&&Te.appendChild(jt("div",[nn],"CodeMirror-gutter-elt","left: "+Ct.gutterLeft[Ie]+"px; width: "+Ct.gutterWidth[Ie]+"px"))}}}function ai(rt,ct,Et){ct.alignable&&(ct.alignable=null);for(var Ct=At("CodeMirror-linewidget"),Ot=ct.node.firstChild,te=void 0;Ot;Ot=te)te=Ot.nextSibling,Ct.test(Ot.className)&&ct.node.removeChild(Ot);Vi(rt,ct,Et)}function gi(rt,ct,Et,Ct){var Ot=Nu(rt,ct);return ct.text=ct.node=Ot.pre,Ot.bgClass&&(ct.bgClass=Ot.bgClass),Ot.textClass&&(ct.textClass=Ot.textClass),Ur(rt,ct),ni(rt,ct,Et,Ct),Vi(rt,ct,Ct),ct.node}function Vi(rt,ct,Et){if(Dr(rt,ct.line,ct,Et,!0),ct.rest)for(var Ct=0;Ct<ct.rest.length;Ct++)Dr(rt,ct.rest[Ct],ct,Et,!1)}function Dr(rt,ct,Et,Ct,Ot){if(ct.widgets)for(var te=us(Et),me=0,Te=ct.widgets;me<Te.length;++me){var ke=Te[me],Ie=jt("div",[ke.node],"CodeMirror-linewidget"+(ke.className?" "+ke.className:""));ke.handleMouseEvents||Ie.setAttribute("cm-ignore-events","true"),ws(ke,Ie,Et,Ct),rt.display.input.setUneditable(Ie),Ot&&ke.above?te.insertBefore(Ie,Et.gutter||Et.text):te.appendChild(Ie),Br(ke,"redraw")}}function ws(rt,ct,Et,Ct){if(rt.noHScroll){(Et.alignable||(Et.alignable=[])).push(ct);var Ot=Ct.wrapperWidth;ct.style.left=Ct.fixedPos+"px",rt.coverGutter||(Ot-=Ct.gutterTotalWidth,ct.style.paddingLeft=Ct.gutterTotalWidth+"px"),ct.style.width=Ot+"px"}rt.coverGutter&&(ct.style.zIndex=5,ct.style.position="relative",rt.noHScroll||(ct.style.marginLeft=-Ct.gutterTotalWidth+"px"))}function ia(rt){if(rt.height!=null)return rt.height;var ct=rt.doc.cm;if(!ct)return 0;if(!Jt(document.body,rt.node)){var Et="position: relative;";rt.coverGutter&&(Et+="margin-left: -"+ct.display.gutters.offsetWidth+"px;"),rt.noHScroll&&(Et+="width: "+ct.display.wrapper.clientWidth+"px;"),Nt(ct.display.measure,jt("div",[rt.node],null,Et))}return rt.height=rt.node.parentNode.offsetHeight}function Uo(rt,ct){for(var Et=Er(ct);Et!=rt.wrapper;Et=Et.parentNode)if(!Et||Et.nodeType==1&&Et.getAttribute("cm-ignore-events")=="true"||Et.parentNode==rt.sizer&&Et!=rt.mover)return!0}function oo(rt){return rt.lineSpace.offsetTop}function Ja(rt){return rt.mover.offsetHeight-rt.lineSpace.offsetHeight}function bs(rt){if(rt.cachedPaddingH)return rt.cachedPaddingH;var ct=Nt(rt.measure,jt("pre","x","CodeMirror-line-like")),Et=window.getComputedStyle?window.getComputedStyle(ct):ct.currentStyle,Ct={left:parseInt(Et.paddingLeft),right:parseInt(Et.paddingRight)};return!isNaN(Ct.left)&&!isNaN(Ct.right)&&(rt.cachedPaddingH=Ct),Ct}function Aa(rt){return Se-rt.display.nativeBarWidth}function Ps(rt){return rt.display.scroller.clientWidth-Aa(rt)-rt.display.barWidth}function Tl(rt){return rt.display.scroller.clientHeight-Aa(rt)-rt.display.barHeight}function Qs(rt,ct,Et){var Ct=rt.options.lineWrapping,Ot=Ct&&Ps(rt);if(!ct.measure.heights||Ct&&ct.measure.width!=Ot){var te=ct.measure.heights=[];if(Ct){ct.measure.width=Ot;for(var me=ct.text.firstChild.getClientRects(),Te=0;Te<me.length-1;Te++){var ke=me[Te],Ie=me[Te+1];Math.abs(ke.bottom-Ie.bottom)>2&&te.push((ke.bottom+Ie.top)/2-Et.top)}}te.push(Et.bottom-Et.top)}}function ju(rt,ct,Et){if(rt.line==ct)return{map:rt.measure.map,cache:rt.measure.cache};for(var Ct=0;Ct<rt.rest.length;Ct++)if(rt.rest[Ct]==ct)return{map:rt.measure.maps[Ct],cache:rt.measure.caches[Ct]};for(var Ot=0;Ot<rt.rest.length;Ot++)if(Oe(rt.rest[Ot])>Et)return{map:rt.measure.maps[Ot],cache:rt.measure.caches[Ot],before:!0}}function Xc(rt,ct){ct=mr(ct);var Et=Oe(ct),Ct=rt.display.externalMeasured=new Ml(rt.doc,ct,Et);Ct.lineN=Et;var Ot=Ct.built=on(rt,Ct);return Ct.text=Ot.pre,Nt(rt.display.lineMeasure,Ot.pre),Ct}function sc(rt,ct,Et,Ct){return Is(rt,Ul(rt,ct),Et,Ct)}function pl(rt,ct){if(ct>=rt.display.viewFrom&&ct<rt.display.viewTo)return rt.display.view[Rs(rt,ct)];var Et=rt.display.externalMeasured;if(Et&&ct>=Et.lineN&&ct<Et.lineN+Et.size)return Et}function Ul(rt,ct){var Et=Oe(ct),Ct=pl(rt,Et);Ct&&!Ct.text?Ct=null:Ct&&Ct.changes&&(hu(rt,Ct,Et,cu(rt)),rt.curOp.forceUpdate=!0),Ct||(Ct=Xc(rt,ct));var Ot=ju(Ct,ct,Et);return{line:ct,view:Ct,rect:null,map:Ot.map,cache:Ot.cache,before:Ot.before,hasHeights:!1}}function Is(rt,ct,Et,Ct,Ot){ct.before&&(Et=-1);var te=Et+(Ct||""),me;return ct.cache.hasOwnProperty(te)?me=ct.cache[te]:(ct.rect||(ct.rect=ct.view.text.getBoundingClientRect()),ct.hasHeights||(Qs(rt,ct.view,ct.rect),ct.hasHeights=!0),me=jo(rt,ct,Et,Ct),me.bogus||(ct.cache[te]=me)),{left:me.left,right:me.right,top:Ot?me.rtop:me.top,bottom:Ot?me.rbottom:me.bottom}}var lc={left:0,right:0,top:0,bottom:0};function uc(rt,ct,Et){for(var Ct,Ot,te,me,Te,ke,Ie=0;Ie<rt.length;Ie+=3)if(Te=rt[Ie],ke=rt[Ie+1],ct<Te?(Ot=0,te=1,me="left"):ct<ke?(Ot=ct-Te,te=Ot+1):(Ie==rt.length-3||ct==ke&&rt[Ie+3]>ct)&&(te=ke-Te,Ot=te-1,ct>=ke&&(me="right")),Ot!=null){if(Ct=rt[Ie+2],Te==ke&&Et==(Ct.insertLeft?"left":"right")&&(me=Et),Et=="left"&&Ot==0)for(;Ie&&rt[Ie-2]==rt[Ie-3]&&rt[Ie-1].insertLeft;)Ct=rt[(Ie-=3)+2],me="left";if(Et=="right"&&Ot==ke-Te)for(;Ie<rt.length-3&&rt[Ie+3]==rt[Ie+4]&&!rt[Ie+5].insertLeft;)Ct=rt[(Ie+=3)+2],me="right";break}return{node:Ct,start:Ot,end:te,collapse:me,coverStart:Te,coverEnd:ke}}function Yc(rt,ct){var Et=lc;if(ct=="left")for(var Ct=0;Ct<rt.length&&(Et=rt[Ct]).left==Et.right;Ct++);else for(var Ot=rt.length-1;Ot>=0&&(Et=rt[Ot]).left==Et.right;Ot--);return Et}function jo(rt,ct,Et,Ct){var Ot=uc(ct.map,Et,Ct),te=Ot.node,me=Ot.start,Te=Ot.end,ke=Ot.collapse,Ie;if(te.nodeType==3){for(var nn=0;nn<4;nn++){for(;me&&Vt(ct.line.text.charAt(Ot.coverStart+me));)--me;for(;Ot.coverStart+Te<Ot.coverEnd&&Vt(ct.line.text.charAt(Ot.coverStart+Te));)++Te;if(Bt&&vt<9&&me==0&&Te==Ot.coverEnd-Ot.coverStart?Ie=te.parentNode.getBoundingClientRect():Ie=Yc(Wt(te,me,Te).getClientRects(),Ct),Ie.left||Ie.right||me==0)break;Te=me,me=me-1,ke="right"}Bt&&vt<11&&(Ie=Wf(rt.display.measure,Ie))}else{me>0&&(ke=Ct="right");var ze;rt.options.lineWrapping&&(ze=te.getClientRects()).length>1?Ie=ze[Ct=="right"?ze.length-1:0]:Ie=te.getBoundingClientRect()}if(Bt&&vt<9&&!me&&(!Ie||!Ie.left&&!Ie.right)){var pn=te.parentNode.getClientRects()[0];pn?Ie={left:pn.left,right:pn.left+gl(rt.display),top:pn.top,bottom:pn.bottom}:Ie=lc}for(var cn=Ie.top-ct.rect.top,Vn=Ie.bottom-ct.rect.top,qn=(cn+Vn)/2,ar=ct.view.measure.heights,Cr=0;Cr<ar.length-1&&!(qn<ar[Cr]);Cr++);var Wr=Cr?ar[Cr-1]:0,Fr=ar[Cr],Xr={left:(ke=="right"?Ie.right:Ie.left)-ct.rect.left,right:(ke=="left"?Ie.left:Ie.right)-ct.rect.left,top:Wr,bottom:Fr};return!Ie.left&&!Ie.right&&(Xr.bogus=!0),rt.options.singleCursorHeightPerLine||(Xr.rtop=cn,Xr.rbottom=Vn),Xr}function Wf(rt,ct){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!zn(rt))return ct;var Et=screen.logicalXDPI/screen.deviceXDPI,Ct=screen.logicalYDPI/screen.deviceYDPI;return{left:ct.left*Et,right:ct.right*Et,top:ct.top*Ct,bottom:ct.bottom*Ct}}function hc(rt){if(rt.measure&&(rt.measure.cache={},rt.measure.heights=null,rt.rest))for(var ct=0;ct<rt.rest.length;ct++)rt.measure.caches[ct]={}}function Ou(rt){rt.display.externalMeasure=null,Ft(rt.display.lineMeasure);for(var ct=0;ct<rt.display.view.length;ct++)hc(rt.display.view[ct])}function Fu(rt){Ou(rt),rt.display.cachedCharWidth=rt.display.cachedTextHeight=rt.display.cachedPaddingH=null,rt.options.lineWrapping||(rt.display.maxLineChanged=!0),rt.display.lineNumChars=null}function da(){return bt&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Na(){return bt&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Yo(rt){var ct=0;if(rt.widgets)for(var Et=0;Et<rt.widgets.length;++Et)rt.widgets[Et].above&&(ct+=ia(rt.widgets[Et]));return ct}function oa(rt,ct,Et,Ct,Ot){if(!Ot){var te=Yo(ct);Et.top+=te,Et.bottom+=te}if(Ct=="line")return Et;Ct||(Ct="local");var me=Ci(ct);if(Ct=="local"?me+=oo(rt.display):me-=rt.display.viewOffset,Ct=="page"||Ct=="window"){var Te=rt.display.lineSpace.getBoundingClientRect();me+=Te.top+(Ct=="window"?0:Na());var ke=Te.left+(Ct=="window"?0:da());Et.left+=ke,Et.right+=ke}return Et.top+=me,Et.bottom+=me,Et}function cc(rt,ct,Et){if(Et=="div")return ct;var Ct=ct.left,Ot=ct.top;if(Et=="page")Ct-=da(),Ot-=Na();else if(Et=="local"||!Et){var te=rt.display.sizer.getBoundingClientRect();Ct+=te.left,Ot+=te.top}var me=rt.display.lineSpace.getBoundingClientRect();return{left:Ct-me.left,top:Ot-me.top}}function Du(rt,ct,Et,Ct,Ot){return Ct||(Ct=Rn(rt.doc,ct.line)),oa(rt,Ct,sc(rt,Ct,ct.ch,Ot),Et)}function mo(rt,ct,Et,Ct,Ot,te){Ct=Ct||Rn(rt.doc,ct.line),Ot||(Ot=Ul(rt,Ct));function me(Vn,qn){var ar=Is(rt,Ot,Vn,qn?"right":"left",te);return qn?ar.left=ar.right:ar.right=ar.left,oa(rt,Ct,ar,Et)}var Te=Ze(Ct,rt.doc.direction),ke=ct.ch,Ie=ct.sticky;if(ke>=Ct.text.length?(ke=Ct.text.length,Ie="before"):ke<=0&&(ke=0,Ie="after"),!Te)return me(Ie=="before"?ke-1:ke,Ie=="before");function nn(Vn,qn,ar){var Cr=Te[qn],Wr=Cr.level==1;return me(ar?Vn-1:Vn,Wr!=ar)}var ze=Ae(Te,ke,Ie),pn=Me,cn=nn(ke,ze,Ie=="before");return pn!=null&&(cn.other=nn(ke,pn,Ie!="before")),cn}function Ui(rt,ct){var Et=0;ct=Un(rt.doc,ct),rt.options.lineWrapping||(Et=gl(rt.display)*ct.ch);var Ct=Rn(rt.doc,ct.line),Ot=Ci(Ct)+oo(rt.display);return{left:Et,right:Et,top:Ot,bottom:Ot+Ct.height}}function Ni(rt,ct,Et,Ct,Ot){var te=en(rt,ct,Et);return te.xRel=Ot,Ct&&(te.outside=Ct),te}function ja(rt,ct,Et){var Ct=rt.doc;if(Et+=rt.display.viewOffset,Et<0)return Ni(Ct.first,0,null,-1,-1);var Ot=Ke(Ct,Et),te=Ct.first+Ct.size-1;if(Ot>te)return Ni(Ct.first+Ct.size-1,Rn(Ct,te).text.length,null,1,1);ct<0&&(ct=0);for(var me=Rn(Ct,Ot);;){var Te=bn(rt,me,Ot,ct,Et),ke=wr(me,Te.ch+(Te.xRel>0||Te.outside>0?1:0));if(!ke)return Te;var Ie=ke.find(1);if(Ie.line==Ot)return Ie;me=Rn(Ct,Ot=Ie.line)}}function xr(rt,ct,Et,Ct){Ct-=Yo(ct);var Ot=ct.text.length,te=ue(function(me){return Is(rt,Et,me-1).bottom<=Ct},Ot,0);return Ot=ue(function(me){return Is(rt,Et,me).top>Ct},te,Ot),{begin:te,end:Ot}}function Jo(rt,ct,Et,Ct){Et||(Et=Ul(rt,ct));var Ot=oa(rt,ct,Is(rt,Et,Ct),"line").top;return xr(rt,ct,Et,Ot)}function Ge(rt,ct,Et,Ct){return rt.bottom<=Et?!1:rt.top>Et?!0:(Ct?rt.left:rt.right)>ct}function bn(rt,ct,Et,Ct,Ot){Ot-=Ci(ct);var te=Ul(rt,ct),me=Yo(ct),Te=0,ke=ct.text.length,Ie=!0,nn=Ze(ct,rt.doc.direction);if(nn){var ze=(rt.options.lineWrapping?Wl:$s)(rt,ct,Et,te,nn,Ct,Ot);Ie=ze.level!=1,Te=Ie?ze.from:ze.to-1,ke=Ie?ze.to:ze.from-1}var pn=null,cn=null,Vn=ue(function(ci){var jr=Is(rt,te,ci);return jr.top+=me,jr.bottom+=me,Ge(jr,Ct,Ot,!1)?(jr.top<=Ot&&jr.left<=Ct&&(pn=ci,cn=jr),!0):!1},Te,ke),qn,ar,Cr=!1;if(cn){var Wr=Ct-cn.left<cn.right-Ct,Fr=Wr==Ie;Vn=pn+(Fr?0:1),ar=Fr?"after":"before",qn=Wr?cn.left:cn.right}else{!Ie&&(Vn==ke||Vn==Te)&&Vn++,ar=Vn==0?"after":Vn==ct.text.length?"before":Is(rt,te,Vn-(Ie?1:0)).bottom+me<=Ot==Ie?"after":"before";var Xr=mo(rt,en(Et,Vn,ar),"line",ct,te);qn=Xr.left,Cr=Ot<Xr.top?-1:Ot>=Xr.bottom?1:0}return Vn=$t(ct.text,Vn,1),Ni(Et,Vn,ar,Cr,Ct-qn)}function $s(rt,ct,Et,Ct,Ot,te,me){var Te=ue(function(ze){var pn=Ot[ze],cn=pn.level!=1;return Ge(mo(rt,en(Et,cn?pn.to:pn.from,cn?"before":"after"),"line",ct,Ct),te,me,!0)},0,Ot.length-1),ke=Ot[Te];if(Te>0){var Ie=ke.level!=1,nn=mo(rt,en(Et,Ie?ke.from:ke.to,Ie?"after":"before"),"line",ct,Ct);Ge(nn,te,me,!0)&&nn.top>me&&(ke=Ot[Te-1])}return ke}function Wl(rt,ct,Et,Ct,Ot,te,me){var Te=xr(rt,ct,Ct,me),ke=Te.begin,Ie=Te.end;/\s/.test(ct.text.charAt(Ie-1))&&Ie--;for(var nn=null,ze=null,pn=0;pn<Ot.length;pn++){var cn=Ot[pn];if(!(cn.from>=Ie||cn.to<=ke)){var Vn=cn.level!=1,qn=Is(rt,Ct,Vn?Math.min(Ie,cn.to)-1:Math.max(ke,cn.from)).right,ar=qn<te?te-qn+1e9:qn-te;(!nn||ze>ar)&&(nn=cn,ze=ar)}}return nn||(nn=Ot[Ot.length-1]),nn.from<ke&&(nn={from:ke,to:nn.to,level:nn.level}),nn.to>Ie&&(nn={from:nn.from,to:Ie,level:nn.level}),nn}var hs;function Qa(rt){if(rt.cachedTextHeight!=null)return rt.cachedTextHeight;if(hs==null){hs=jt("pre",null,"CodeMirror-line-like");for(var ct=0;ct<49;++ct)hs.appendChild(document.createTextNode("x")),hs.appendChild(jt("br"));hs.appendChild(document.createTextNode("x"))}Nt(rt.measure,hs);var Et=hs.offsetHeight/50;return Et>3&&(rt.cachedTextHeight=Et),Ft(rt.measure),Et||1}function gl(rt){if(rt.cachedCharWidth!=null)return rt.cachedCharWidth;var ct=jt("span","xxxxxxxxxx"),Et=jt("pre",[ct],"CodeMirror-line-like");Nt(rt.measure,Et);var Ct=ct.getBoundingClientRect(),Ot=(Ct.right-Ct.left)/10;return Ot>2&&(rt.cachedCharWidth=Ot),Ot||10}function cu(rt){for(var ct=rt.display,Et={},Ct={},Ot=ct.gutters.clientLeft,te=ct.gutters.firstChild,me=0;te;te=te.nextSibling,++me){var Te=rt.display.gutterSpecs[me].className;Et[Te]=te.offsetLeft+te.clientLeft+Ot,Ct[Te]=te.clientWidth}return{fixedPos:Jc(ct),gutterTotalWidth:ct.gutters.offsetWidth,gutterLeft:Et,gutterWidth:Ct,wrapperWidth:ct.wrapper.clientWidth}}function Jc(rt){return rt.scroller.getBoundingClientRect().left-rt.sizer.getBoundingClientRect().left}function wo(rt){var ct=Qa(rt.display),Et=rt.options.lineWrapping,Ct=Et&&Math.max(5,rt.display.scroller.clientWidth/gl(rt.display)-3);return function(Ot){if(Cn(rt.doc,Ot))return 0;var te=0;if(Ot.widgets)for(var me=0;me<Ot.widgets.length;me++)Ot.widgets[me].height&&(te+=Ot.widgets[me].height);return Et?te+(Math.ceil(Ot.text.length/Ct)||1)*ct:te+ct}}function ti(rt){var ct=rt.doc,Et=wo(rt);ct.iter(function(Ct){var Ot=Et(Ct);Ot!=Ct.height&&Nn(Ct,Ot)})}function $a(rt,ct,Et,Ct){var Ot=rt.display;if(!Et&&Er(ct).getAttribute("cm-not-content")=="true")return null;var te,me,Te=Ot.lineSpace.getBoundingClientRect();try{te=ct.clientX-Te.left,me=ct.clientY-Te.top}catch(ze){return null}var ke=ja(rt,te,me),Ie;if(Ct&&ke.xRel>0&&(Ie=Rn(rt.doc,ke.line).text).length==ke.ch){var nn=Yt(Ie,Ie.length,rt.options.tabSize)-Ie.length;ke=en(ke.line,Math.max(0,Math.round((te-bs(rt.display).left)/gl(rt.display))-nn))}return ke}function Rs(rt,ct){if(ct>=rt.display.viewTo||(ct-=rt.display.viewFrom,ct<0))return null;for(var Et=rt.display.view,Ct=0;Ct<Et.length;Ct++)if(ct-=Et[Ct].size,ct<0)return Ct}function bo(rt,ct,Et,Ct){ct==null&&(ct=rt.doc.first),Et==null&&(Et=rt.doc.first+rt.doc.size),Ct||(Ct=0);var Ot=rt.display;if(Ct&&Et<Ot.viewTo&&(Ot.updateLineNumbers==null||Ot.updateLineNumbers>ct)&&(Ot.updateLineNumbers=ct),rt.curOp.viewChanged=!0,ct>=Ot.viewTo)mn&&ur(rt.doc,ct)<Ot.viewTo&&Wo(rt);else if(Et<=Ot.viewFrom)mn&&kr(rt.doc,Et+Ct)>Ot.viewFrom?Wo(rt):(Ot.viewFrom+=Ct,Ot.viewTo+=Ct);else if(ct<=Ot.viewFrom&&Et>=Ot.viewTo)Wo(rt);else if(ct<=Ot.viewFrom){var te=cs(rt,Et,Et+Ct,1);te?(Ot.view=Ot.view.slice(te.index),Ot.viewFrom=te.lineN,Ot.viewTo+=Ct):Wo(rt)}else if(Et>=Ot.viewTo){var me=cs(rt,ct,ct,-1);me?(Ot.view=Ot.view.slice(0,me.index),Ot.viewTo=me.lineN):Wo(rt)}else{var Te=cs(rt,ct,ct,-1),ke=cs(rt,Et,Et+Ct,1);Te&&ke?(Ot.view=Ot.view.slice(0,Te.index).concat(Ai(rt,Te.lineN,ke.lineN)).concat(Ot.view.slice(ke.index)),Ot.viewTo+=Ct):Wo(rt)}var Ie=Ot.externalMeasured;Ie&&(Et<Ie.lineN?Ie.lineN+=Ct:ct<Ie.lineN+Ie.size&&(Ot.externalMeasured=null))}function ki(rt,ct,Et){rt.curOp.viewChanged=!0;var Ct=rt.display,Ot=rt.display.externalMeasured;if(Ot&&ct>=Ot.lineN&&ct<Ot.lineN+Ot.size&&(Ct.externalMeasured=null),!(ct<Ct.viewFrom||ct>=Ct.viewTo)){var te=Ct.view[Rs(rt,ct)];if(te.node!=null){var me=te.changes||(te.changes=[]);ve(me,Et)==-1&&me.push(Et)}}}function Wo(rt){rt.display.viewFrom=rt.display.viewTo=rt.doc.first,rt.display.view=[],rt.display.viewOffset=0}function cs(rt,ct,Et,Ct){var Ot=Rs(rt,ct),te,me=rt.display.view;if(!mn||Et==rt.doc.first+rt.doc.size)return{index:Ot,lineN:Et};for(var Te=rt.display.viewFrom,ke=0;ke<Ot;ke++)Te+=me[ke].size;if(Te!=ct){if(Ct>0){if(Ot==me.length-1)return null;te=Te+me[Ot].size-ct,Ot++}else te=Te-ct;ct+=te,Et+=te}for(;ur(rt.doc,Et)!=Et;){if(Ot==(Ct<0?0:me.length-1))return null;Et+=Ct*me[Ot-(Ct<0?1:0)].size,Ot+=Ct}return{index:Ot,lineN:Et}}function ao(rt,ct,Et){var Ct=rt.display,Ot=Ct.view;Ot.length==0||ct>=Ct.viewTo||Et<=Ct.viewFrom?(Ct.view=Ai(rt,ct,Et),Ct.viewFrom=ct):(Ct.viewFrom>ct?Ct.view=Ai(rt,ct,Ct.viewFrom).concat(Ct.view):Ct.viewFrom<ct&&(Ct.view=Ct.view.slice(Rs(rt,ct))),Ct.viewFrom=ct,Ct.viewTo<Et?Ct.view=Ct.view.concat(Ai(rt,Ct.viewTo,Et)):Ct.viewTo>Et&&(Ct.view=Ct.view.slice(0,Rs(rt,Et)))),Ct.viewTo=Et}function Cs(rt){for(var ct=rt.display.view,Et=0,Ct=0;Ct<ct.length;Ct++){var Ot=ct[Ct];!Ot.hidden&&(!Ot.node||Ot.changes)&&++Et}return Et}function aa(rt){rt.display.input.showSelection(rt.display.input.prepareSelection())}function Bu(rt,ct){ct===void 0&&(ct=!0);for(var Et=rt.doc,Ct={},Ot=Ct.cursors=document.createDocumentFragment(),te=Ct.selection=document.createDocumentFragment(),me=0;me<Et.sel.ranges.length;me++)if(!(!ct&&me==Et.sel.primIndex)){var Te=Et.sel.ranges[me];if(!(Te.from().line>=rt.display.viewTo||Te.to().line<rt.display.viewFrom)){var ke=Te.empty();(ke||rt.options.showCursorWhenSelecting)&&Ii(rt,Te.head,Ot),ke||Di(rt,Te,te)}}return Ct}function Ii(rt,ct,Et){var Ct=mo(rt,ct,"div",null,null,!rt.options.singleCursorHeightPerLine),Ot=Et.appendChild(jt("div","\xA0","CodeMirror-cursor"));if(Ot.style.left=Ct.left+"px",Ot.style.top=Ct.top+"px",Ot.style.height=Math.max(0,Ct.bottom-Ct.top)*rt.options.cursorHeight+"px",Ct.other){var te=Et.appendChild(jt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));te.style.display="",te.style.left=Ct.other.left+"px",te.style.top=Ct.other.top+"px",te.style.height=(Ct.other.bottom-Ct.other.top)*.85+"px"}}function qa(rt,ct){return rt.top-ct.top||rt.left-ct.left}function Di(rt,ct,Et){var Ct=rt.display,Ot=rt.doc,te=document.createDocumentFragment(),me=bs(rt.display),Te=me.left,ke=Math.max(Ct.sizerWidth,Ps(rt)-Ct.sizer.offsetLeft)-me.right,Ie=Ot.direction=="ltr";function nn(Fr,Xr,ci,jr){Xr<0&&(Xr=0),Xr=Math.round(Xr),jr=Math.round(jr),te.appendChild(jt("div",null,"CodeMirror-selected","position: absolute; left: "+Fr+`px;
|
|
top: `+Xr+"px; width: "+(ci==null?ke-Fr:ci)+`px;
|
|
height: `+(jr-Xr)+"px"))}function ze(Fr,Xr,ci){var jr=Rn(Ot,Fr),Mi=jr.text.length,Po,ua;function Fo(qo,Ts){return Du(rt,en(Fr,qo),"div",jr,Ts)}function ps(qo,Ts,Fa){var ta=Jo(rt,jr,null,qo),Ki=Ts=="ltr"==(Fa=="after")?"left":"right",Ro=Fa=="after"?ta.begin:ta.end-(/\s/.test(jr.text.charAt(ta.end-1))?2:1);return Fo(Ro,Ki)[Ki]}var Wa=Ze(jr,Ot.direction);return ge(Wa,Xr||0,ci==null?Mi:ci,function(qo,Ts,Fa,ta){var Ki=Fa=="ltr",Ro=Fo(qo,Ki?"left":"right"),Sa=Fo(Ts-1,Ki?"right":"left"),Da=Xr==null&&qo==0,vl=ci==null&&Ts==Mi,Do=ta==0,il=!Wa||ta==Wa.length-1;if(Sa.top-Ro.top<=3){var Go=(Ie?Da:vl)&&Do,xf=(Ie?vl:Da)&&il,Us=Go?Te:(Ki?Ro:Sa).left,Ls=xf?ke:(Ki?Sa:Ro).right;nn(Us,Ro.top,Ls-Us,Ro.bottom)}else{var gs,ho,xa,Yl;Ki?(gs=Ie&&Da&&Do?Te:Ro.left,ho=Ie?ke:ps(qo,Fa,"before"),xa=Ie?Te:ps(Ts,Fa,"after"),Yl=Ie&&vl&&il?ke:Sa.right):(gs=Ie?ps(qo,Fa,"before"):Te,ho=!Ie&&Da&&Do?ke:Ro.right,xa=!Ie&&vl&&il?Te:Sa.left,Yl=Ie?ps(Ts,Fa,"after"):ke),nn(gs,Ro.top,ho-gs,Ro.bottom),Ro.bottom<Sa.top&&nn(Te,Ro.bottom,null,Sa.top),nn(xa,Sa.top,Yl-xa,Sa.bottom)}(!Po||qa(Ro,Po)<0)&&(Po=Ro),qa(Sa,Po)<0&&(Po=Sa),(!ua||qa(Ro,ua)<0)&&(ua=Ro),qa(Sa,ua)<0&&(ua=Sa)}),{start:Po,end:ua}}var pn=ct.from(),cn=ct.to();if(pn.line==cn.line)ze(pn.line,pn.ch,cn.ch);else{var Vn=Rn(Ot,pn.line),qn=Rn(Ot,cn.line),ar=mr(Vn)==mr(qn),Cr=ze(pn.line,pn.ch,ar?Vn.text.length+1:null).end,Wr=ze(cn.line,ar?0:null,cn.ch).start;ar&&(Cr.top<Wr.top-2?(nn(Cr.right,Cr.top,null,Cr.bottom),nn(Te,Wr.top,Wr.left,Wr.bottom)):nn(Cr.right,Cr.top,Wr.left-Cr.right,Cr.bottom)),Cr.bottom<Wr.top&&nn(Te,Cr.bottom,null,Wr.top)}Et.appendChild(te)}function $i(rt){if(rt.state.focused){var ct=rt.display;clearInterval(ct.blinker);var Et=!0;ct.cursorDiv.style.visibility="",rt.options.cursorBlinkRate>0?ct.blinker=setInterval(function(){rt.hasFocus()||wh(rt),ct.cursorDiv.style.visibility=(Et=!Et)?"":"hidden"},rt.options.cursorBlinkRate):rt.options.cursorBlinkRate<0&&(ct.cursorDiv.style.visibility="hidden")}}function vo(rt){rt.state.focused||(rt.display.input.focus(),Ri(rt))}function Mo(rt){rt.state.delayingBlurEvent=!0,setTimeout(function(){rt.state.delayingBlurEvent&&(rt.state.delayingBlurEvent=!1,wh(rt))},100)}function Ri(rt,ct){rt.state.delayingBlurEvent&&(rt.state.delayingBlurEvent=!1),rt.options.readOnly!="nocursor"&&(rt.state.focused||(We(rt,"focus",rt,ct),rt.state.focused=!0,Ht(rt.display.wrapper,"CodeMirror-focused"),!rt.curOp&&rt.display.selForContextMenu!=rt.doc.sel&&(rt.display.input.reset(),gt&&setTimeout(function(){return rt.display.input.reset(!0)},20)),rt.display.input.receivedFocus()),$i(rt))}function wh(rt,ct){rt.state.delayingBlurEvent||(rt.state.focused&&(We(rt,"blur",rt,ct),rt.state.focused=!1,Dt(rt.display.wrapper,"CodeMirror-focused")),clearInterval(rt.display.blinker),setTimeout(function(){rt.state.focused||(rt.display.shift=!1)},150))}function $r(rt){for(var ct=rt.display,Et=ct.lineDiv.offsetTop,Ct=0;Ct<ct.view.length;Ct++){var Ot=ct.view[Ct],te=rt.options.lineWrapping,me=void 0,Te=0;if(!Ot.hidden){if(Bt&&vt<8){var ke=Ot.node.offsetTop+Ot.node.offsetHeight;me=ke-Et,Et=ke}else{var Ie=Ot.node.getBoundingClientRect();me=Ie.bottom-Ie.top,!te&&Ot.text.firstChild&&(Te=Ot.text.firstChild.getBoundingClientRect().right-Ie.left-1)}var nn=Ot.line.height-me;if((nn>.005||nn<-.005)&&(Nn(Ot.line,me),Dg(Ot.line),Ot.rest))for(var ze=0;ze<Ot.rest.length;ze++)Dg(Ot.rest[ze]);if(Te>rt.display.sizerWidth){var pn=Math.ceil(Te/gl(rt.display));pn>rt.display.maxLineLength&&(rt.display.maxLineLength=pn,rt.display.maxLine=Ot.line,rt.display.maxLineChanged=!0)}}}}function Dg(rt){if(rt.widgets)for(var ct=0;ct<rt.widgets.length;++ct){var Et=rt.widgets[ct],Ct=Et.node.parentNode;Ct&&(Et.height=Ct.offsetHeight)}}function Fi(rt,ct,Et){var Ct=Et&&Et.top!=null?Math.max(0,Et.top):rt.scroller.scrollTop;Ct=Math.floor(Ct-oo(rt));var Ot=Et&&Et.bottom!=null?Et.bottom:Ct+rt.wrapper.clientHeight,te=Ke(ct,Ct),me=Ke(ct,Ot);if(Et&&Et.ensure){var Te=Et.ensure.from.line,ke=Et.ensure.to.line;Te<te?(te=Te,me=Ke(ct,Ci(Rn(ct,Te))+rt.wrapper.clientHeight)):Math.min(ke,ct.lastLine())>=me&&(te=Ke(ct,Ci(Rn(ct,ke))-rt.wrapper.clientHeight),me=ke)}return{from:te,to:Math.max(me,te+1)}}function Bg(rt,ct){if(!Ve(rt,"scrollCursorIntoView")){var Et=rt.display,Ct=Et.sizer.getBoundingClientRect(),Ot=null;if(ct.top+Ct.top<0?Ot=!0:ct.bottom+Ct.top>(window.innerHeight||document.documentElement.clientHeight)&&(Ot=!1),Ot!=null&&!xt){var te=jt("div","\u200B",null,`position: absolute;
|
|
top: `+(ct.top-Et.viewOffset-oo(rt.display))+`px;
|
|
height: `+(ct.bottom-ct.top+Aa(rt)+Et.barHeight)+`px;
|
|
left: `+ct.left+"px; width: "+Math.max(2,ct.right-ct.left)+"px;");rt.display.lineSpace.appendChild(te),te.scrollIntoView(Ot),rt.display.lineSpace.removeChild(te)}}}function fc(rt,ct,Et,Ct){Ct==null&&(Ct=0);var Ot;!rt.options.lineWrapping&&ct==Et&&(ct=ct.ch?en(ct.line,ct.sticky=="before"?ct.ch-1:ct.ch,"after"):ct,Et=ct.sticky=="before"?en(ct.line,ct.ch+1,"before"):ct);for(var te=0;te<5;te++){var me=!1,Te=mo(rt,ct),ke=!Et||Et==ct?Te:mo(rt,Et);Ot={left:Math.min(Te.left,ke.left),top:Math.min(Te.top,ke.top)-Ct,right:Math.max(Te.left,ke.left),bottom:Math.max(Te.bottom,ke.bottom)+Ct};var Ie=ep(rt,Ot),nn=rt.doc.scrollTop,ze=rt.doc.scrollLeft;if(Ie.scrollTop!=null&&(Ph(rt,Ie.scrollTop),Math.abs(rt.doc.scrollTop-nn)>1&&(me=!0)),Ie.scrollLeft!=null&&(du(rt,Ie.scrollLeft),Math.abs(rt.doc.scrollLeft-ze)>1&&(me=!0)),!me)break}return Ot}function Qc(rt,ct){var Et=ep(rt,ct);Et.scrollTop!=null&&Ph(rt,Et.scrollTop),Et.scrollLeft!=null&&du(rt,Et.scrollLeft)}function ep(rt,ct){var Et=rt.display,Ct=Qa(rt.display);ct.top<0&&(ct.top=0);var Ot=rt.curOp&&rt.curOp.scrollTop!=null?rt.curOp.scrollTop:Et.scroller.scrollTop,te=Tl(rt),me={};ct.bottom-ct.top>te&&(ct.bottom=ct.top+te);var Te=rt.doc.height+Ja(Et),ke=ct.top<Ct,Ie=ct.bottom>Te-Ct;if(ct.top<Ot)me.scrollTop=ke?0:ct.top;else if(ct.bottom>Ot+te){var nn=Math.min(ct.top,(Ie?Te:ct.bottom)-te);nn!=Ot&&(me.scrollTop=nn)}var ze=rt.options.fixedGutter?0:Et.gutters.offsetWidth,pn=rt.curOp&&rt.curOp.scrollLeft!=null?rt.curOp.scrollLeft:Et.scroller.scrollLeft-ze,cn=Ps(rt)-Et.gutters.offsetWidth,Vn=ct.right-ct.left>cn;return Vn&&(ct.right=ct.left+cn),ct.left<10?me.scrollLeft=0:ct.left<pn?me.scrollLeft=Math.max(0,ct.left+ze-(Vn?0:10)):ct.right>cn+pn-3&&(me.scrollLeft=ct.right+(Vn?0:10)-cn),me}function Hf(rt,ct){ct!=null&&(Hl(rt),rt.curOp.scrollTop=(rt.curOp.scrollTop==null?rt.doc.scrollTop:rt.curOp.scrollTop)+ct)}function fu(rt){Hl(rt);var ct=rt.getCursor();rt.curOp.scrollToPos={from:ct,to:ct,margin:rt.options.cursorScrollMargin}}function bh(rt,ct,Et){(ct!=null||Et!=null)&&Hl(rt),ct!=null&&(rt.curOp.scrollLeft=ct),Et!=null&&(rt.curOp.scrollTop=Et)}function _i(rt,ct){Hl(rt),rt.curOp.scrollToPos=ct}function Hl(rt){var ct=rt.curOp.scrollToPos;if(ct){rt.curOp.scrollToPos=null;var Et=Ui(rt,ct.from),Ct=Ui(rt,ct.to);Vf(rt,Et,Ct,ct.margin)}}function Vf(rt,ct,Et,Ct){var Ot=ep(rt,{left:Math.min(ct.left,Et.left),top:Math.min(ct.top,Et.top)-Ct,right:Math.max(ct.right,Et.right),bottom:Math.max(ct.bottom,Et.bottom)+Ct});bh(rt,Ot.scrollLeft,Ot.scrollTop)}function Ph(rt,ct){Math.abs(rt.doc.scrollTop-ct)<2||(ae||Uu(rt,{top:ct}),np(rt,ct,!0),ae&&Uu(rt),dc(rt,100))}function np(rt,ct,Et){ct=Math.max(0,Math.min(rt.display.scroller.scrollHeight-rt.display.scroller.clientHeight,ct)),!(rt.display.scroller.scrollTop==ct&&!Et)&&(rt.doc.scrollTop=ct,rt.display.scrollbars.setScrollTop(ct),rt.display.scroller.scrollTop!=ct&&(rt.display.scroller.scrollTop=ct))}function du(rt,ct,Et,Ct){ct=Math.max(0,Math.min(ct,rt.display.scroller.scrollWidth-rt.display.scroller.clientWidth)),!((Et?ct==rt.doc.scrollLeft:Math.abs(rt.doc.scrollLeft-ct)<2)&&!Ct)&&(rt.doc.scrollLeft=ct,Xf(rt),rt.display.scroller.scrollLeft!=ct&&(rt.display.scroller.scrollLeft=ct),rt.display.scrollbars.setScrollLeft(ct))}function tl(rt){var ct=rt.display,Et=ct.gutters.offsetWidth,Ct=Math.round(rt.doc.height+Ja(rt.display));return{clientHeight:ct.scroller.clientHeight,viewHeight:ct.wrapper.clientHeight,scrollWidth:ct.scroller.scrollWidth,clientWidth:ct.scroller.clientWidth,viewWidth:ct.wrapper.clientWidth,barLeft:rt.options.fixedGutter?Et:0,docHeight:Ct,scrollHeight:Ct+Aa(rt)+ct.barHeight,nativeBarWidth:ct.nativeBarWidth,gutterWidth:Et}}var Iu=function(rt,ct,Et){this.cm=Et;var Ct=this.vert=jt("div",[jt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Ot=this.horiz=jt("div",[jt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Ct.tabIndex=Ot.tabIndex=-1,rt(Ct),rt(Ot),Qe(Ct,"scroll",function(){Ct.clientHeight&&ct(Ct.scrollTop,"vertical")}),Qe(Ot,"scroll",function(){Ot.clientWidth&&ct(Ot.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Bt&&vt<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Iu.prototype.update=function(rt){var ct=rt.scrollWidth>rt.clientWidth+1,Et=rt.scrollHeight>rt.clientHeight+1,Ct=rt.nativeBarWidth;if(Et){this.vert.style.display="block",this.vert.style.bottom=ct?Ct+"px":"0";var Ot=rt.viewHeight-(ct?Ct:0);this.vert.firstChild.style.height=Math.max(0,rt.scrollHeight-rt.clientHeight+Ot)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ct){this.horiz.style.display="block",this.horiz.style.right=Et?Ct+"px":"0",this.horiz.style.left=rt.barLeft+"px";var te=rt.viewWidth-rt.barLeft-(Et?Ct:0);this.horiz.firstChild.style.width=Math.max(0,rt.scrollWidth-rt.clientWidth+te)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&rt.clientHeight>0&&(Ct==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Et?Ct:0,bottom:ct?Ct:0}},Iu.prototype.setScrollLeft=function(rt){this.horiz.scrollLeft!=rt&&(this.horiz.scrollLeft=rt),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Iu.prototype.setScrollTop=function(rt){this.vert.scrollTop!=rt&&(this.vert.scrollTop=rt),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Iu.prototype.zeroWidthHack=function(){var rt=at&&!mt?"12px":"18px";this.horiz.style.height=this.vert.style.width=rt,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ne,this.disableVert=new ne},Iu.prototype.enableZeroWidthBar=function(rt,ct,Et){rt.style.pointerEvents="auto";function Ct(){var Ot=rt.getBoundingClientRect(),te=Et=="vert"?document.elementFromPoint(Ot.right-1,(Ot.top+Ot.bottom)/2):document.elementFromPoint((Ot.right+Ot.left)/2,Ot.bottom-1);te!=rt?rt.style.pointerEvents="none":ct.set(1e3,Ct)}ct.set(1e3,Ct)},Iu.prototype.clear=function(){var rt=this.horiz.parentNode;rt.removeChild(this.horiz),rt.removeChild(this.vert)};var Ll=function(){};Ll.prototype.update=function(){return{bottom:0,right:0}},Ll.prototype.setScrollLeft=function(){},Ll.prototype.setScrollTop=function(){},Ll.prototype.clear=function(){};function Ru(rt,ct){ct||(ct=tl(rt));var Et=rt.display.barWidth,Ct=rt.display.barHeight;Kf(rt,ct);for(var Ot=0;Ot<4&&Et!=rt.display.barWidth||Ct!=rt.display.barHeight;Ot++)Et!=rt.display.barWidth&&rt.options.lineWrapping&&$r(rt),Kf(rt,tl(rt)),Et=rt.display.barWidth,Ct=rt.display.barHeight}function Kf(rt,ct){var Et=rt.display,Ct=Et.scrollbars.update(ct);Et.sizer.style.paddingRight=(Et.barWidth=Ct.right)+"px",Et.sizer.style.paddingBottom=(Et.barHeight=Ct.bottom)+"px",Et.heightForcer.style.borderBottom=Ct.bottom+"px solid transparent",Ct.right&&Ct.bottom?(Et.scrollbarFiller.style.display="block",Et.scrollbarFiller.style.height=Ct.bottom+"px",Et.scrollbarFiller.style.width=Ct.right+"px"):Et.scrollbarFiller.style.display="",Ct.bottom&&rt.options.coverGutterNextToScrollbar&&rt.options.fixedGutter?(Et.gutterFiller.style.display="block",Et.gutterFiller.style.height=Ct.bottom+"px",Et.gutterFiller.style.width=ct.gutterWidth+"px"):Et.gutterFiller.style.display=""}var rp={native:Iu,null:Ll};function ip(rt){rt.display.scrollbars&&(rt.display.scrollbars.clear(),rt.display.scrollbars.addClass&&Dt(rt.display.wrapper,rt.display.scrollbars.addClass)),rt.display.scrollbars=new rp[rt.options.scrollbarStyle](function(ct){rt.display.wrapper.insertBefore(ct,rt.display.scrollbarFiller),Qe(ct,"mousedown",function(){rt.state.focused&&setTimeout(function(){return rt.display.input.focus()},0)}),ct.setAttribute("cm-not-content","true")},function(ct,Et){Et=="horizontal"?du(rt,ct):Ph(rt,ct)},rt),rt.display.scrollbars.addClass&&Ht(rt.display.wrapper,rt.display.scrollbars.addClass)}var Ig=0;function _u(rt){rt.curOp={cm:rt,viewChanged:!1,startHeight:rt.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:++Ig},Ga(rt.curOp)}function zu(rt){var ct=rt.curOp;ct&&uu(ct,function(Et){for(var Ct=0;Ct<Et.ops.length;Ct++)Et.ops[Ct].cm.curOp=null;Qv(Et)})}function Qv(rt){for(var ct=rt.ops,Et=0;Et<ct.length;Et++)$v(ct[Et]);for(var Ct=0;Ct<ct.length;Ct++)qv(ct[Ct]);for(var Ot=0;Ot<ct.length;Ot++)Rg(ct[Ot]);for(var te=0;te<ct.length;te++)Io(ct[te]);for(var me=0;me<ct.length;me++)Gu(ct[me])}function $v(rt){var ct=rt.cm,Et=ct.display;_g(ct),rt.updateMaxLine&&bi(ct),rt.mustUpdate=rt.viewChanged||rt.forceUpdate||rt.scrollTop!=null||rt.scrollToPos&&(rt.scrollToPos.from.line<Et.viewFrom||rt.scrollToPos.to.line>=Et.viewTo)||Et.maxLineChanged&&ct.options.lineWrapping,rt.update=rt.mustUpdate&&new Ch(ct,rt.mustUpdate&&{top:rt.scrollTop,ensure:rt.scrollToPos},rt.forceUpdate)}function qv(rt){rt.updatedDisplay=rt.mustUpdate&&Zf(rt.cm,rt.update)}function Rg(rt){var ct=rt.cm,Et=ct.display;rt.updatedDisplay&&$r(ct),rt.barMeasure=tl(ct),Et.maxLineChanged&&!ct.options.lineWrapping&&(rt.adjustWidthTo=sc(ct,Et.maxLine,Et.maxLine.text.length).left+3,ct.display.sizerWidth=rt.adjustWidthTo,rt.barMeasure.scrollWidth=Math.max(Et.scroller.clientWidth,Et.sizer.offsetLeft+rt.adjustWidthTo+Aa(ct)+ct.display.barWidth),rt.maxScrollLeft=Math.max(0,Et.sizer.offsetLeft+rt.adjustWidthTo-Ps(ct))),(rt.updatedDisplay||rt.selectionChanged)&&(rt.preparedSelection=Et.input.prepareSelection())}function Io(rt){var ct=rt.cm;rt.adjustWidthTo!=null&&(ct.display.sizer.style.minWidth=rt.adjustWidthTo+"px",rt.maxScrollLeft<ct.doc.scrollLeft&&du(ct,Math.min(ct.display.scroller.scrollLeft,rt.maxScrollLeft),!0),ct.display.maxLineChanged=!1);var Et=rt.focus&&rt.focus==Ut();rt.preparedSelection&&ct.display.input.showSelection(rt.preparedSelection,Et),(rt.updatedDisplay||rt.startHeight!=ct.doc.height)&&Ru(ct,rt.barMeasure),rt.updatedDisplay&&Hu(ct,rt.barMeasure),rt.selectionChanged&&$i(ct),ct.state.focused&&rt.updateInput&&ct.display.input.reset(rt.typing),Et&&vo(rt.cm)}function Gu(rt){var ct=rt.cm,Et=ct.display,Ct=ct.doc;if(rt.updatedDisplay&&qi(ct,rt.update),Et.wheelStartX!=null&&(rt.scrollTop!=null||rt.scrollLeft!=null||rt.scrollToPos)&&(Et.wheelStartX=Et.wheelStartY=null),rt.scrollTop!=null&&np(ct,rt.scrollTop,rt.forceScroll),rt.scrollLeft!=null&&du(ct,rt.scrollLeft,!0,!0),rt.scrollToPos){var Ot=fc(ct,Un(Ct,rt.scrollToPos.from),Un(Ct,rt.scrollToPos.to),rt.scrollToPos.margin);Bg(ct,Ot)}var te=rt.maybeHiddenMarkers,me=rt.maybeUnhiddenMarkers;if(te)for(var Te=0;Te<te.length;++Te)te[Te].lines.length||We(te[Te],"hide");if(me)for(var ke=0;ke<me.length;++ke)me[ke].lines.length&&We(me[ke],"unhide");Et.wrapper.offsetHeight&&(Ct.scrollTop=ct.display.scroller.scrollTop),rt.changeObjs&&We(ct,"changes",ct,rt.changeObjs),rt.update&&rt.update.finish()}function Xi(rt,ct){if(rt.curOp)return ct();_u(rt);try{return ct()}finally{zu(rt)}}function sa(rt,ct){return function(){if(rt.curOp)return ct.apply(rt,arguments);_u(rt);try{return ct.apply(rt,arguments)}finally{zu(rt)}}}function pa(rt){return function(){if(this.curOp)return rt.apply(this,arguments);_u(this);try{return rt.apply(this,arguments)}finally{zu(this)}}}function ga(rt){return function(){var ct=this.cm;if(!ct||ct.curOp)return rt.apply(this,arguments);_u(ct);try{return rt.apply(this,arguments)}finally{zu(ct)}}}function dc(rt,ct){rt.doc.highlightFrontier<rt.display.viewTo&&rt.state.highlight.set(ct,ce(ma,rt))}function ma(rt){var ct=rt.doc;if(!(ct.highlightFrontier>=rt.display.viewTo)){var Et=+new Date+rt.options.workTime,Ct=fi(rt,ct.highlightFrontier),Ot=[];ct.iter(Ct.line,Math.min(ct.first+ct.size,rt.display.viewTo+500),function(te){if(Ct.line>=rt.display.viewFrom){var me=te.styles,Te=te.text.length>rt.options.maxHighlightLength?or(ct.mode,Ct.state):null,ke=Gr(rt,te,Ct,!0);Te&&(Ct.state=Te),te.styles=ke.styles;var Ie=te.styleClasses,nn=ke.classes;nn?te.styleClasses=nn:Ie&&(te.styleClasses=null);for(var ze=!me||me.length!=te.styles.length||Ie!=nn&&(!Ie||!nn||Ie.bgClass!=nn.bgClass||Ie.textClass!=nn.textClass),pn=0;!ze&&pn<me.length;++pn)ze=me[pn]!=te.styles[pn];ze&&Ot.push(Ct.line),te.stateAfter=Ct.save(),Ct.nextLine()}else te.text.length<=rt.options.maxHighlightLength&&tn(rt,te.text,Ct),te.stateAfter=Ct.line%5==0?Ct.save():null,Ct.nextLine();if(+new Date>Et)return dc(rt,rt.options.workDelay),!0}),ct.highlightFrontier=Ct.line,ct.modeFrontier=Math.max(ct.modeFrontier,Ct.line),Ot.length&&Xi(rt,function(){for(var te=0;te<Ot.length;te++)ki(rt,Ot[te],"text")})}}var Ch=function(rt,ct,Et){var Ct=rt.display;this.viewport=ct,this.visible=Fi(Ct,rt.doc,ct),this.editorIsHidden=!Ct.wrapper.offsetWidth,this.wrapperHeight=Ct.wrapper.clientHeight,this.wrapperWidth=Ct.wrapper.clientWidth,this.oldDisplayWidth=Ps(rt),this.force=Et,this.dims=cu(rt),this.events=[]};Ch.prototype.signal=function(rt,ct){an(rt,ct)&&this.events.push(arguments)},Ch.prototype.finish=function(){for(var rt=0;rt<this.events.length;rt++)We.apply(null,this.events[rt])};function _g(rt){var ct=rt.display;!ct.scrollbarsClipped&&ct.scroller.offsetWidth&&(ct.nativeBarWidth=ct.scroller.offsetWidth-ct.scroller.clientWidth,ct.heightForcer.style.height=Aa(rt)+"px",ct.sizer.style.marginBottom=-ct.nativeBarWidth+"px",ct.sizer.style.borderRightWidth=Aa(rt)+"px",ct.scrollbarsClipped=!0)}function zg(rt){if(rt.hasFocus())return null;var ct=Ut();if(!ct||!Jt(rt.display.lineDiv,ct))return null;var Et={activeElt:ct};if(window.getSelection){var Ct=window.getSelection();Ct.anchorNode&&Ct.extend&&Jt(rt.display.lineDiv,Ct.anchorNode)&&(Et.anchorNode=Ct.anchorNode,Et.anchorOffset=Ct.anchorOffset,Et.focusNode=Ct.focusNode,Et.focusOffset=Ct.focusOffset)}return Et}function fs(rt){if(!(!rt||!rt.activeElt||rt.activeElt==Ut())&&(rt.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(rt.activeElt.nodeName)&&rt.anchorNode&&Jt(document.body,rt.anchorNode)&&Jt(document.body,rt.focusNode))){var ct=window.getSelection(),Et=document.createRange();Et.setEnd(rt.anchorNode,rt.anchorOffset),Et.collapse(!1),ct.removeAllRanges(),ct.addRange(Et),ct.extend(rt.focusNode,rt.focusOffset)}}function Zf(rt,ct){var Et=rt.display,Ct=rt.doc;if(ct.editorIsHidden)return Wo(rt),!1;if(!ct.force&&ct.visible.from>=Et.viewFrom&&ct.visible.to<=Et.viewTo&&(Et.updateLineNumbers==null||Et.updateLineNumbers>=Et.viewTo)&&Et.renderedView==Et.view&&Cs(rt)==0)return!1;Qo(rt)&&(Wo(rt),ct.dims=cu(rt));var Ot=Ct.first+Ct.size,te=Math.max(ct.visible.from-rt.options.viewportMargin,Ct.first),me=Math.min(Ot,ct.visible.to+rt.options.viewportMargin);Et.viewFrom<te&&te-Et.viewFrom<20&&(te=Math.max(Ct.first,Et.viewFrom)),Et.viewTo>me&&Et.viewTo-me<20&&(me=Math.min(Ot,Et.viewTo)),mn&&(te=ur(rt.doc,te),me=kr(rt.doc,me));var Te=te!=Et.viewFrom||me!=Et.viewTo||Et.lastWrapHeight!=ct.wrapperHeight||Et.lastWrapWidth!=ct.wrapperWidth;ao(rt,te,me),Et.viewOffset=Ci(Rn(rt.doc,Et.viewFrom)),rt.display.mover.style.top=Et.viewOffset+"px";var ke=Cs(rt);if(!Te&&ke==0&&!ct.force&&Et.renderedView==Et.view&&(Et.updateLineNumbers==null||Et.updateLineNumbers>=Et.viewTo))return!1;var Ie=zg(rt);return ke>4&&(Et.lineDiv.style.display="none"),op(rt,Et.updateLineNumbers,ct.dims),ke>4&&(Et.lineDiv.style.display=""),Et.renderedView=Et.view,fs(Ie),Ft(Et.cursorDiv),Ft(Et.selectionDiv),Et.gutters.style.height=Et.sizer.style.minHeight=0,Te&&(Et.lastWrapHeight=ct.wrapperHeight,Et.lastWrapWidth=ct.wrapperWidth,dc(rt,400)),Et.updateLineNumbers=null,!0}function qi(rt,ct){for(var Et=ct.viewport,Ct=!0;;Ct=!1){if(!Ct||!rt.options.lineWrapping||ct.oldDisplayWidth==Ps(rt)){if(Et&&Et.top!=null&&(Et={top:Math.min(rt.doc.height+Ja(rt.display)-Tl(rt),Et.top)}),ct.visible=Fi(rt.display,rt.doc,Et),ct.visible.from>=rt.display.viewFrom&&ct.visible.to<=rt.display.viewTo)break}else Ct&&(ct.visible=Fi(rt.display,rt.doc,Et));if(!Zf(rt,ct))break;$r(rt);var Ot=tl(rt);aa(rt),Ru(rt,Ot),Hu(rt,Ot),ct.force=!1}ct.signal(rt,"update",rt),(rt.display.viewFrom!=rt.display.reportedViewFrom||rt.display.viewTo!=rt.display.reportedViewTo)&&(ct.signal(rt,"viewportChange",rt,rt.display.viewFrom,rt.display.viewTo),rt.display.reportedViewFrom=rt.display.viewFrom,rt.display.reportedViewTo=rt.display.viewTo)}function Uu(rt,ct){var Et=new Ch(rt,ct);if(Zf(rt,Et)){$r(rt),qi(rt,Et);var Ct=tl(rt);aa(rt),Ru(rt,Ct),Hu(rt,Ct),Et.finish()}}function op(rt,ct,Et){var Ct=rt.display,Ot=rt.options.lineNumbers,te=Ct.lineDiv,me=te.firstChild;function Te(Vn){var qn=Vn.nextSibling;return gt&&at&&rt.display.currentWheelTarget==Vn?Vn.style.display="none":Vn.parentNode.removeChild(Vn),qn}for(var ke=Ct.view,Ie=Ct.viewFrom,nn=0;nn<ke.length;nn++){var ze=ke[nn];if(!ze.hidden)if(!ze.node||ze.node.parentNode!=te){var pn=gi(rt,ze,Ie,Et);te.insertBefore(pn,me)}else{for(;me!=ze.node;)me=Te(me);var cn=Ot&&ct!=null&&ct<=Ie&&ze.lineNumber;ze.changes&&(ve(ze.changes,"gutter")>-1&&(cn=!1),hu(rt,ze,Ie,Et)),cn&&(Ft(ze.lineNumber),ze.lineNumber.appendChild(document.createTextNode(An(rt.options,Ie)))),me=ze.node.nextSibling}Ie+=ze.size}for(;me;)me=Te(me)}function Wu(rt){var ct=rt.gutters.offsetWidth;rt.sizer.style.marginLeft=ct+"px"}function Hu(rt,ct){rt.display.sizer.style.minHeight=ct.docHeight+"px",rt.display.heightForcer.style.top=ct.docHeight+"px",rt.display.gutters.style.height=ct.docHeight+rt.display.barHeight+Aa(rt)+"px"}function Xf(rt){var ct=rt.display,Et=ct.view;if(!(!ct.alignWidgets&&(!ct.gutters.firstChild||!rt.options.fixedGutter))){for(var Ct=Jc(ct)-ct.scroller.scrollLeft+rt.doc.scrollLeft,Ot=ct.gutters.offsetWidth,te=Ct+"px",me=0;me<Et.length;me++)if(!Et[me].hidden){rt.options.fixedGutter&&(Et[me].gutter&&(Et[me].gutter.style.left=te),Et[me].gutterBackground&&(Et[me].gutterBackground.style.left=te));var Te=Et[me].alignable;if(Te)for(var ke=0;ke<Te.length;ke++)Te[ke].style.left=te}rt.options.fixedGutter&&(ct.gutters.style.left=Ct+Ot+"px")}}function Qo(rt){if(!rt.options.lineNumbers)return!1;var ct=rt.doc,Et=An(rt.options,ct.first+ct.size-1),Ct=rt.display;if(Et.length!=Ct.lineNumChars){var Ot=Ct.measure.appendChild(jt("div",[jt("div",Et)],"CodeMirror-linenumber CodeMirror-gutter-elt")),te=Ot.firstChild.offsetWidth,me=Ot.offsetWidth-te;return Ct.lineGutter.style.width="",Ct.lineNumInnerWidth=Math.max(te,Ct.lineGutter.offsetWidth-me)+1,Ct.lineNumWidth=Ct.lineNumInnerWidth+me,Ct.lineNumChars=Ct.lineNumInnerWidth?Et.length:-1,Ct.lineGutter.style.width=Ct.lineNumWidth+"px",Wu(rt.display),!0}return!1}function va(rt,ct){for(var Et=[],Ct=!1,Ot=0;Ot<rt.length;Ot++){var te=rt[Ot],me=null;if(typeof te!="string"&&(me=te.style,te=te.className),te=="CodeMirror-linenumbers")if(ct)Ct=!0;else continue;Et.push({className:te,style:me})}return ct&&!Ct&&Et.push({className:"CodeMirror-linenumbers",style:null}),Et}function kh(rt){var ct=rt.gutters,Et=rt.gutterSpecs;Ft(ct),rt.lineGutter=null;for(var Ct=0;Ct<Et.length;++Ct){var Ot=Et[Ct],te=Ot.className,me=Ot.style,Te=ct.appendChild(jt("div",null,"CodeMirror-gutter "+te));me&&(Te.style.cssText=me),te=="CodeMirror-linenumbers"&&(rt.lineGutter=Te,Te.style.width=(rt.lineNumWidth||1)+"px")}ct.style.display=Et.length?"":"none",Wu(rt)}function _s(rt){kh(rt.display),bo(rt),Xf(rt)}function Vu(rt,ct,Et,Ct){var Ot=this;this.input=Et,Ot.scrollbarFiller=jt("div",null,"CodeMirror-scrollbar-filler"),Ot.scrollbarFiller.setAttribute("cm-not-content","true"),Ot.gutterFiller=jt("div",null,"CodeMirror-gutter-filler"),Ot.gutterFiller.setAttribute("cm-not-content","true"),Ot.lineDiv=Gt("div",null,"CodeMirror-code"),Ot.selectionDiv=jt("div",null,null,"position: relative; z-index: 1"),Ot.cursorDiv=jt("div",null,"CodeMirror-cursors"),Ot.measure=jt("div",null,"CodeMirror-measure"),Ot.lineMeasure=jt("div",null,"CodeMirror-measure"),Ot.lineSpace=Gt("div",[Ot.measure,Ot.lineMeasure,Ot.selectionDiv,Ot.cursorDiv,Ot.lineDiv],null,"position: relative; outline: none");var te=Gt("div",[Ot.lineSpace],"CodeMirror-lines");Ot.mover=jt("div",[te],null,"position: relative"),Ot.sizer=jt("div",[Ot.mover],"CodeMirror-sizer"),Ot.sizerWidth=null,Ot.heightForcer=jt("div",null,null,"position: absolute; height: "+Se+"px; width: 1px;"),Ot.gutters=jt("div",null,"CodeMirror-gutters"),Ot.lineGutter=null,Ot.scroller=jt("div",[Ot.sizer,Ot.heightForcer,Ot.gutters],"CodeMirror-scroll"),Ot.scroller.setAttribute("tabIndex","-1"),Ot.wrapper=jt("div",[Ot.scrollbarFiller,Ot.gutterFiller,Ot.scroller],"CodeMirror"),Bt&&vt<8&&(Ot.gutters.style.zIndex=-1,Ot.scroller.style.paddingRight=0),!gt&&!(ae&&tt)&&(Ot.scroller.draggable=!0),rt&&(rt.appendChild?rt.appendChild(Ot.wrapper):rt(Ot.wrapper)),Ot.viewFrom=Ot.viewTo=ct.first,Ot.reportedViewFrom=Ot.reportedViewTo=ct.first,Ot.view=[],Ot.renderedView=null,Ot.externalMeasured=null,Ot.viewOffset=0,Ot.lastWrapHeight=Ot.lastWrapWidth=0,Ot.updateLineNumbers=null,Ot.nativeBarWidth=Ot.barHeight=Ot.barWidth=0,Ot.scrollbarsClipped=!1,Ot.lineNumWidth=Ot.lineNumInnerWidth=Ot.lineNumChars=null,Ot.alignWidgets=!1,Ot.cachedCharWidth=Ot.cachedTextHeight=Ot.cachedPaddingH=null,Ot.maxLine=null,Ot.maxLineLength=0,Ot.maxLineChanged=!1,Ot.wheelDX=Ot.wheelDY=Ot.wheelStartX=Ot.wheelStartY=null,Ot.shift=!1,Ot.selForContextMenu=null,Ot.activeTouch=null,Ot.gutterSpecs=va(Ct.gutters,Ct.lineNumbers),kh(Ot),Et.init(Ot)}var ks=0,Ho=null;Bt?Ho=-.53:ae?Ho=15:bt?Ho=-.7:Tt&&(Ho=-1/3);function Al(rt){var ct=rt.wheelDeltaX,Et=rt.wheelDeltaY;return ct==null&&rt.detail&&rt.axis==rt.HORIZONTAL_AXIS&&(ct=rt.detail),Et==null&&rt.detail&&rt.axis==rt.VERTICAL_AXIS?Et=rt.detail:Et==null&&(Et=rt.wheelDelta),{x:ct,y:Et}}function zs(rt){var ct=Al(rt);return ct.x*=Ho,ct.y*=Ho,ct}function ya(rt,ct){var Et=Al(ct),Ct=Et.x,Ot=Et.y,te=rt.display,me=te.scroller,Te=me.scrollWidth>me.clientWidth,ke=me.scrollHeight>me.clientHeight;if(Ct&&Te||Ot&&ke){if(Ot&&at&>){t:for(var Ie=ct.target,nn=te.view;Ie!=me;Ie=Ie.parentNode)for(var ze=0;ze<nn.length;ze++)if(nn[ze].node==Ie){rt.display.currentWheelTarget=Ie;break t}}if(Ct&&!ae&&!St&&Ho!=null){Ot&&ke&&Ph(rt,Math.max(0,me.scrollTop+Ot*Ho)),du(rt,Math.max(0,me.scrollLeft+Ct*Ho)),(!Ot||Ot&&ke)&&Sn(ct),te.wheelStartX=null;return}if(Ot&&Ho!=null){var pn=Ot*Ho,cn=rt.doc.scrollTop,Vn=cn+te.wrapper.clientHeight;pn<0?cn=Math.max(0,cn+pn-50):Vn=Math.min(rt.doc.height,Vn+pn+50),Uu(rt,{top:cn,bottom:Vn})}ks<20&&(te.wheelStartX==null?(te.wheelStartX=me.scrollLeft,te.wheelStartY=me.scrollTop,te.wheelDX=Ct,te.wheelDY=Ot,setTimeout(function(){if(te.wheelStartX!=null){var qn=me.scrollLeft-te.wheelStartX,ar=me.scrollTop-te.wheelStartY,Cr=ar&&te.wheelDY&&ar/te.wheelDY||qn&&te.wheelDX&&qn/te.wheelDX;te.wheelStartX=te.wheelStartY=null,Cr&&(Ho=(Ho*ks+Cr)/(ks+1),++ks)}},200)):(te.wheelDX+=Ct,te.wheelDY+=Ot))}}var el=function(rt,ct){this.ranges=rt,this.primIndex=ct};el.prototype.primary=function(){return this.ranges[this.primIndex]},el.prototype.equals=function(rt){if(rt==this)return!0;if(rt.primIndex!=this.primIndex||rt.ranges.length!=this.ranges.length)return!1;for(var ct=0;ct<this.ranges.length;ct++){var Et=this.ranges[ct],Ct=rt.ranges[ct];if(!kn(Et.anchor,Ct.anchor)||!kn(Et.head,Ct.head))return!1}return!0},el.prototype.deepCopy=function(){for(var rt=[],ct=0;ct<this.ranges.length;ct++)rt[ct]=new to(On(this.ranges[ct].anchor),On(this.ranges[ct].head));return new el(rt,this.primIndex)},el.prototype.somethingSelected=function(){for(var rt=0;rt<this.ranges.length;rt++)if(!this.ranges[rt].empty())return!0;return!1},el.prototype.contains=function(rt,ct){ct||(ct=rt);for(var Et=0;Et<this.ranges.length;Et++){var Ct=this.ranges[Et];if(Tn(ct,Ct.from())>=0&&Tn(rt,Ct.to())<=0)return Et}return-1};var to=function(rt,ct){this.anchor=rt,this.head=ct};to.prototype.from=function(){return Fn(this.anchor,this.head)},to.prototype.to=function(){return er(this.anchor,this.head)},to.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ml(rt,ct,Et){var Ct=rt&&rt.options.selectionsMayTouch,Ot=ct[Et];ct.sort(function(pn,cn){return Tn(pn.from(),cn.from())}),Et=ve(ct,Ot);for(var te=1;te<ct.length;te++){var me=ct[te],Te=ct[te-1],ke=Tn(Te.to(),me.from());if(Ct&&!me.empty()?ke>0:ke>=0){var Ie=Fn(Te.from(),me.from()),nn=er(Te.to(),me.to()),ze=Te.empty()?me.from()==me.head:Te.from()==Te.head;te<=Et&&--Et,ct.splice(--te,2,new to(ze?nn:Ie,ze?Ie:nn))}}return new el(ct,Et)}function pu(rt,ct){return new el([new to(rt,ct||rt)],0)}function Ku(rt){return rt.text?en(rt.from.line+rt.text.length-1,Ne(rt.text).length+(rt.text.length==1?rt.from.ch:0)):rt.to}function Eh(rt,ct){if(Tn(rt,ct.from)<0)return rt;if(Tn(rt,ct.to)<=0)return Ku(ct);var Et=rt.line+ct.text.length-(ct.to.line-ct.from.line)-1,Ct=rt.ch;return rt.line==ct.to.line&&(Ct+=Ku(ct).ch-ct.to.ch),en(Et,Ct)}function $c(rt,ct){for(var Et=[],Ct=0;Ct<rt.sel.ranges.length;Ct++){var Ot=rt.sel.ranges[Ct];Et.push(new to(Eh(Ot.anchor,ct),Eh(Ot.head,ct)))}return ml(rt.cm,Et,rt.sel.primIndex)}function pc(rt,ct,Et){return rt.line==ct.line?en(Et.line,rt.ch-ct.ch+Et.ch):en(Et.line+(rt.line-ct.line),rt.ch)}function qc(rt,ct,Et){for(var Ct=[],Ot=en(rt.first,0),te=Ot,me=0;me<ct.length;me++){var Te=ct[me],ke=pc(Te.from,Ot,te),Ie=pc(Ku(Te),Ot,te);if(Ot=Te.to,te=Ie,Et=="around"){var nn=rt.sel.ranges[me],ze=Tn(nn.head,nn.anchor)<0;Ct[me]=new to(ze?Ie:ke,ze?ke:Ie)}else Ct[me]=new to(ke,ke)}return new el(Ct,rt.sel.primIndex)}function Ei(rt){rt.doc.mode=qe(rt.options,rt.doc.modeOption),tf(rt)}function tf(rt){rt.doc.iter(function(ct){ct.stateAfter&&(ct.stateAfter=null),ct.styles&&(ct.styles=null)}),rt.doc.modeFrontier=rt.doc.highlightFrontier=rt.doc.first,dc(rt,100),rt.state.modeGen++,rt.curOp&&bo(rt)}function ap(rt,ct){return ct.from.ch==0&&ct.to.ch==0&&Ne(ct.text)==""&&(!rt.cm||rt.cm.options.wholeLineUpdateBefore)}function Yf(rt,ct,Et,Ct){function Ot(Wr){return Et?Et[Wr]:null}function te(Wr,Fr,Xr){xo(Wr,Fr,Xr,Ct),Br(Wr,"change",Wr,ct)}function me(Wr,Fr){for(var Xr=[],ci=Wr;ci<Fr;++ci)Xr.push(new lo(Ie[ci],Ot(ci),Ct));return Xr}var Te=ct.from,ke=ct.to,Ie=ct.text,nn=Rn(rt,Te.line),ze=Rn(rt,ke.line),pn=Ne(Ie),cn=Ot(Ie.length-1),Vn=ke.line-Te.line;if(ct.full)rt.insert(0,me(0,Ie.length)),rt.remove(Ie.length,rt.size-Ie.length);else if(ap(rt,ct)){var qn=me(0,Ie.length-1);te(ze,ze.text,cn),Vn&&rt.remove(Te.line,Vn),qn.length&&rt.insert(Te.line,qn)}else if(nn==ze)if(Ie.length==1)te(nn,nn.text.slice(0,Te.ch)+pn+nn.text.slice(ke.ch),cn);else{var ar=me(1,Ie.length-1);ar.push(new lo(pn+nn.text.slice(ke.ch),cn,Ct)),te(nn,nn.text.slice(0,Te.ch)+Ie[0],Ot(0)),rt.insert(Te.line+1,ar)}else if(Ie.length==1)te(nn,nn.text.slice(0,Te.ch)+Ie[0]+ze.text.slice(ke.ch),Ot(0)),rt.remove(Te.line+1,Vn);else{te(nn,nn.text.slice(0,Te.ch)+Ie[0],Ot(0)),te(ze,pn+ze.text.slice(ke.ch),cn);var Cr=me(1,Ie.length-1);Vn>1&&rt.remove(Te.line+1,Vn-1),rt.insert(Te.line+1,Cr)}Br(rt,"change",rt,ct)}function Nl(rt,ct,Et){function Ct(Ot,te,me){if(Ot.linked)for(var Te=0;Te<Ot.linked.length;++Te){var ke=Ot.linked[Te];if(ke.doc!=te){var Ie=me&&ke.sharedHist;Et&&!Ie||(ct(ke.doc,Ie),Ct(ke.doc,Ot,Ie))}}}Ct(rt,null,!0)}function Jf(rt,ct){if(ct.cm)throw new Error("This document is already in use.");rt.doc=ct,ct.cm=rt,ti(rt),Ei(rt),ef(rt),rt.options.lineWrapping||bi(rt),rt.options.mode=ct.modeOption,bo(rt)}function ef(rt){(rt.doc.direction=="rtl"?Ht:Dt)(rt.display.lineDiv,"CodeMirror-rtl")}function t0(rt){Xi(rt,function(){ef(rt),bo(rt)})}function gc(rt){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=rt||1}function Qf(rt,ct){var Et={from:On(ct.from),to:Ku(ct),text:vr(rt,ct.from,ct.to)};return Zu(rt,Et,ct.from.line,ct.to.line+1),Nl(rt,function(Ct){return Zu(Ct,Et,ct.from.line,ct.to.line+1)},!0),Et}function mc(rt){for(;rt.length;){var ct=Ne(rt);if(ct.ranges)rt.pop();else break}}function nf(rt,ct){if(ct)return mc(rt.done),Ne(rt.done);if(rt.done.length&&!Ne(rt.done).ranges)return Ne(rt.done);if(rt.done.length>1&&!rt.done[rt.done.length-2].ranges)return rt.done.pop(),Ne(rt.done)}function rf(rt,ct,Et,Ct){var Ot=rt.history;Ot.undone.length=0;var te=+new Date,me,Te;if((Ot.lastOp==Ct||Ot.lastOrigin==ct.origin&&ct.origin&&(ct.origin.charAt(0)=="+"&&Ot.lastModTime>te-(rt.cm?rt.cm.options.historyEventDelay:500)||ct.origin.charAt(0)=="*"))&&(me=nf(Ot,Ot.lastOp==Ct)))Te=Ne(me.changes),Tn(ct.from,ct.to)==0&&Tn(ct.from,Te.to)==0?Te.to=Ku(ct):me.changes.push(Qf(rt,ct));else{var ke=Ne(Ot.done);for((!ke||!ke.ranges)&&vc(rt.sel,Ot.done),me={changes:[Qf(rt,ct)],generation:Ot.generation},Ot.done.push(me);Ot.done.length>Ot.undoDepth;)Ot.done.shift(),Ot.done[0].ranges||Ot.done.shift()}Ot.done.push(Et),Ot.generation=++Ot.maxGeneration,Ot.lastModTime=Ot.lastSelTime=te,Ot.lastOp=Ot.lastSelOp=Ct,Ot.lastOrigin=Ot.lastSelOrigin=ct.origin,Te||We(rt,"historyAdded")}function sp(rt,ct,Et,Ct){var Ot=ct.charAt(0);return Ot=="*"||Ot=="+"&&Et.ranges.length==Ct.ranges.length&&Et.somethingSelected()==Ct.somethingSelected()&&new Date-rt.history.lastSelTime<=(rt.cm?rt.cm.options.historyEventDelay:500)}function of(rt,ct,Et,Ct){var Ot=rt.history,te=Ct&&Ct.origin;Et==Ot.lastSelOp||te&&Ot.lastSelOrigin==te&&(Ot.lastModTime==Ot.lastSelTime&&Ot.lastOrigin==te||sp(rt,te,Ne(Ot.done),ct))?Ot.done[Ot.done.length-1]=ct:vc(ct,Ot.done),Ot.lastSelTime=+new Date,Ot.lastSelOrigin=te,Ot.lastSelOp=Et,Ct&&Ct.clearRedo!==!1&&mc(Ot.undone)}function vc(rt,ct){var Et=Ne(ct);Et&&Et.ranges&&Et.equals(rt)||ct.push(rt)}function Zu(rt,ct,Et,Ct){var Ot=ct["spans_"+rt.id],te=0;rt.iter(Math.max(rt.first,Et),Math.min(rt.first+rt.size,Ct),function(me){me.markedSpans&&((Ot||(Ot=ct["spans_"+rt.id]={}))[te]=me.markedSpans),++te})}function ts(rt){if(!rt)return null;for(var ct,Et=0;Et<rt.length;++Et)rt[Et].marker.explicitlyCleared?ct||(ct=rt.slice(0,Et)):ct&&ct.push(rt[Et]);return ct?ct.length?ct:null:rt}function Vl(rt,ct){var Et=ct["spans_"+rt.id];if(!Et)return null;for(var Ct=[],Ot=0;Ot<ct.text.length;++Ot)Ct.push(ts(Et[Ot]));return Ct}function $f(rt,ct){var Et=Vl(rt,ct),Ct=wi(rt,ct);if(!Et)return Ct;if(!Ct)return Et;for(var Ot=0;Ot<Et.length;++Ot){var te=Et[Ot],me=Ct[Ot];if(te&&me)t:for(var Te=0;Te<me.length;++Te){for(var ke=me[Te],Ie=0;Ie<te.length;++Ie)if(te[Ie].marker==ke.marker)continue t;te.push(ke)}else me&&(Et[Ot]=me)}return Et}function gu(rt,ct,Et){for(var Ct=[],Ot=0;Ot<rt.length;++Ot){var te=rt[Ot];if(te.ranges){Ct.push(Et?el.prototype.deepCopy.call(te):te);continue}var me=te.changes,Te=[];Ct.push({changes:Te});for(var ke=0;ke<me.length;++ke){var Ie=me[ke],nn=void 0;if(Te.push({from:Ie.from,to:Ie.to,text:Ie.text}),ct)for(var ze in Ie)(nn=ze.match(/^spans_(\d+)$/))&&ve(ct,Number(nn[1]))>-1&&(Ne(Te)[ze]=Ie[ze],delete Ie[ze])}}return Ct}function qf(rt,ct,Et,Ct){if(Ct){var Ot=rt.anchor;if(Et){var te=Tn(ct,Ot)<0;te!=Tn(Et,Ot)<0?(Ot=ct,ct=Et):te!=Tn(ct,Et)<0&&(ct=Et)}return new to(Ot,ct)}else return new to(Et||ct,ct)}function td(rt,ct,Et,Ct,Ot){Ot==null&&(Ot=rt.cm&&(rt.cm.display.shift||rt.extend)),Ua(rt,new el([qf(rt.sel.primary(),ct,Et,Ot)],0),Ct)}function Gg(rt,ct,Et){for(var Ct=[],Ot=rt.cm&&(rt.cm.display.shift||rt.extend),te=0;te<rt.sel.ranges.length;te++)Ct[te]=qf(rt.sel.ranges[te],ct[te],null,Ot);var me=ml(rt.cm,Ct,rt.sel.primIndex);Ua(rt,me,Et)}function Xu(rt,ct,Et,Ct){var Ot=rt.sel.ranges.slice(0);Ot[ct]=Et,Ua(rt,ml(rt.cm,Ot,rt.sel.primIndex),Ct)}function Mh(rt,ct,Et,Ct){Ua(rt,pu(ct,Et),Ct)}function Ug(rt,ct,Et){var Ct={ranges:ct.ranges,update:function(Ot){this.ranges=[];for(var te=0;te<Ot.length;te++)this.ranges[te]=new to(Un(rt,Ot[te].anchor),Un(rt,Ot[te].head))},origin:Et&&Et.origin};return We(rt,"beforeSelectionChange",rt,Ct),rt.cm&&We(rt.cm,"beforeSelectionChange",rt.cm,Ct),Ct.ranges!=ct.ranges?ml(rt.cm,Ct.ranges,Ct.ranges.length-1):ct}function ed(rt,ct,Et){var Ct=rt.history.done,Ot=Ne(Ct);Ot&&Ot.ranges?(Ct[Ct.length-1]=ct,Th(rt,ct,Et)):Ua(rt,ct,Et)}function Ua(rt,ct,Et){Th(rt,ct,Et),of(rt,rt.sel,rt.cm?rt.cm.curOp.id:NaN,Et)}function Th(rt,ct,Et){(an(rt,"beforeSelectionChange")||rt.cm&&an(rt.cm,"beforeSelectionChange"))&&(ct=Ug(rt,ct,Et));var Ct=Et&&Et.bias||(Tn(ct.primary().head,rt.sel.primary().head)<0?-1:1);lp(rt,sf(rt,ct,Ct,!0)),!(Et&&Et.scroll===!1)&&rt.cm&&fu(rt.cm)}function lp(rt,ct){ct.equals(rt.sel)||(rt.sel=ct,rt.cm&&(rt.cm.curOp.updateInput=1,rt.cm.curOp.selectionChanged=!0,rn(rt.cm)),Br(rt,"cursorActivity",rt))}function af(rt){lp(rt,sf(rt,rt.sel,null,!1))}function sf(rt,ct,Et,Ct){for(var Ot,te=0;te<ct.ranges.length;te++){var me=ct.ranges[te],Te=ct.ranges.length==rt.sel.ranges.length&&rt.sel.ranges[te],ke=lf(rt,me.anchor,Te&&Te.anchor,Et,Ct),Ie=lf(rt,me.head,Te&&Te.head,Et,Ct);(Ot||ke!=me.anchor||Ie!=me.head)&&(Ot||(Ot=ct.ranges.slice(0,te)),Ot[te]=new to(ke,Ie))}return Ot?ml(rt.cm,Ot,ct.primIndex):ct}function mu(rt,ct,Et,Ct,Ot){var te=Rn(rt,ct.line);if(te.markedSpans)for(var me=0;me<te.markedSpans.length;++me){var Te=te.markedSpans[me],ke=Te.marker,Ie="selectLeft"in ke?!ke.selectLeft:ke.inclusiveLeft,nn="selectRight"in ke?!ke.selectRight:ke.inclusiveRight;if((Te.from==null||(Ie?Te.from<=ct.ch:Te.from<ct.ch))&&(Te.to==null||(nn?Te.to>=ct.ch:Te.to>ct.ch))){if(Ot&&(We(ke,"beforeCursorEnter"),ke.explicitlyCleared))if(te.markedSpans){--me;continue}else break;if(!ke.atomic)continue;if(Et){var ze=ke.find(Ct<0?1:-1),pn=void 0;if((Ct<0?nn:Ie)&&(ze=up(rt,ze,-Ct,ze&&ze.line==ct.line?te:null)),ze&&ze.line==ct.line&&(pn=Tn(ze,Et))&&(Ct<0?pn<0:pn>0))return mu(rt,ze,ct,Ct,Ot)}var cn=ke.find(Ct<0?-1:1);return(Ct<0?Ie:nn)&&(cn=up(rt,cn,Ct,cn.line==ct.line?te:null)),cn?mu(rt,cn,ct,Ct,Ot):null}}return ct}function lf(rt,ct,Et,Ct,Ot){var te=Ct||1,me=mu(rt,ct,Et,te,Ot)||!Ot&&mu(rt,ct,Et,te,!0)||mu(rt,ct,Et,-te,Ot)||!Ot&&mu(rt,ct,Et,-te,!0);return me||(rt.cantEdit=!0,en(rt.first,0))}function up(rt,ct,Et,Ct){return Et<0&&ct.ch==0?ct.line>rt.first?Un(rt,en(ct.line-1)):null:Et>0&&ct.ch==(Ct||Rn(rt,ct.line)).text.length?ct.line<rt.first+rt.size-1?en(ct.line+1,0):null:new en(ct.line,ct.ch+Et)}function Vo(rt){rt.setSelection(en(rt.firstLine(),0),en(rt.lastLine()),fe)}function uf(rt,ct,Et){var Ct={canceled:!1,from:ct.from,to:ct.to,text:ct.text,origin:ct.origin,cancel:function(){return Ct.canceled=!0}};return Et&&(Ct.update=function(Ot,te,me,Te){Ot&&(Ct.from=Un(rt,Ot)),te&&(Ct.to=Un(rt,te)),me&&(Ct.text=me),Te!==void 0&&(Ct.origin=Te)}),We(rt,"beforeChange",rt,Ct),rt.cm&&We(rt.cm,"beforeChange",rt.cm,Ct),Ct.canceled?(rt.cm&&(rt.cm.curOp.updateInput=2),null):{from:Ct.from,to:Ct.to,text:Ct.text,origin:Ct.origin}}function Yu(rt,ct,Et){if(rt.cm){if(!rt.cm.curOp)return sa(rt.cm,Yu)(rt,ct,Et);if(rt.cm.state.suppressEdits)return}if(!((an(rt,"beforeChange")||rt.cm&&an(rt.cm,"beforeChange"))&&(ct=uf(rt,ct,!0),!ct))){var Ct=hi&&!Et&&Oi(rt,ct.from,ct.to);if(Ct)for(var Ot=Ct.length-1;Ot>=0;--Ot)Lh(rt,{from:Ct[Ot].from,to:Ct[Ot].to,text:Ot?[""]:ct.text,origin:ct.origin});else Lh(rt,ct)}}function Lh(rt,ct){if(!(ct.text.length==1&&ct.text[0]==""&&Tn(ct.from,ct.to)==0)){var Et=$c(rt,ct);rf(rt,ct,Et,rt.cm?rt.cm.curOp.id:NaN),yc(rt,ct,Et,wi(rt,ct));var Ct=[];Nl(rt,function(Ot,te){!te&&ve(Ct,Ot.history)==-1&&(cp(Ot.history,ct),Ct.push(Ot.history)),yc(Ot,ct,null,wi(Ot,ct))})}}function hf(rt,ct,Et){var Ct=rt.cm&&rt.cm.state.suppressEdits;if(!(Ct&&!Et)){for(var Ot=rt.history,te,me=rt.sel,Te=ct=="undo"?Ot.done:Ot.undone,ke=ct=="undo"?Ot.undone:Ot.done,Ie=0;Ie<Te.length&&(te=Te[Ie],!(Et?te.ranges&&!te.equals(rt.sel):!te.ranges));Ie++);if(Ie!=Te.length){for(Ot.lastOrigin=Ot.lastSelOrigin=null;;)if(te=Te.pop(),te.ranges){if(vc(te,ke),Et&&!te.equals(rt.sel)){Ua(rt,te,{clearRedo:!1});return}me=te}else if(Ct){Te.push(te);return}else break;var nn=[];vc(me,ke),ke.push({changes:nn,generation:Ot.generation}),Ot.generation=te.generation||++Ot.maxGeneration;for(var ze=an(rt,"beforeChange")||rt.cm&&an(rt.cm,"beforeChange"),pn=function(qn){var ar=te.changes[qn];if(ar.origin=ct,ze&&!uf(rt,ar,!1))return Te.length=0,{};nn.push(Qf(rt,ar));var Cr=qn?$c(rt,ar):Ne(Te);yc(rt,ar,Cr,$f(rt,ar)),!qn&&rt.cm&&rt.cm.scrollIntoView({from:ar.from,to:Ku(ar)});var Wr=[];Nl(rt,function(Fr,Xr){!Xr&&ve(Wr,Fr.history)==-1&&(cp(Fr.history,ar),Wr.push(Fr.history)),yc(Fr,ar,null,$f(Fr,ar))})},cn=te.changes.length-1;cn>=0;--cn){var Vn=pn(cn);if(Vn)return Vn.v}}}}function hp(rt,ct){if(ct!=0&&(rt.first+=ct,rt.sel=new el(xe(rt.sel.ranges,function(Ot){return new to(en(Ot.anchor.line+ct,Ot.anchor.ch),en(Ot.head.line+ct,Ot.head.ch))}),rt.sel.primIndex),rt.cm)){bo(rt.cm,rt.first,rt.first-ct,ct);for(var Et=rt.cm.display,Ct=Et.viewFrom;Ct<Et.viewTo;Ct++)ki(rt.cm,Ct,"gutter")}}function yc(rt,ct,Et,Ct){if(rt.cm&&!rt.cm.curOp)return sa(rt.cm,yc)(rt,ct,Et,Ct);if(ct.to.line<rt.first){hp(rt,ct.text.length-1-(ct.to.line-ct.from.line));return}if(!(ct.from.line>rt.lastLine())){if(ct.from.line<rt.first){var Ot=ct.text.length-1-(rt.first-ct.from.line);hp(rt,Ot),ct={from:en(rt.first,0),to:en(ct.to.line+Ot,ct.to.ch),text:[Ne(ct.text)],origin:ct.origin}}var te=rt.lastLine();ct.to.line>te&&(ct={from:ct.from,to:en(te,Rn(rt,te).text.length),text:[ct.text[0]],origin:ct.origin}),ct.removed=vr(rt,ct.from,ct.to),Et||(Et=$c(rt,ct)),rt.cm?Wg(rt.cm,ct,Ct):Yf(rt,ct,Ct),Th(rt,Et,fe),rt.cantEdit&&lf(rt,en(rt.firstLine(),0))&&(rt.cantEdit=!1)}}function Wg(rt,ct,Et){var Ct=rt.doc,Ot=rt.display,te=ct.from,me=ct.to,Te=!1,ke=te.line;rt.options.lineWrapping||(ke=Oe(mr(Rn(Ct,te.line))),Ct.iter(ke,me.line+1,function(cn){if(cn==Ot.maxLine)return Te=!0,!0})),Ct.sel.contains(ct.from,ct.to)>-1&&rn(rt),Yf(Ct,ct,Et,wo(rt)),rt.options.lineWrapping||(Ct.iter(ke,te.line+ct.text.length,function(cn){var Vn=io(cn);Vn>Ot.maxLineLength&&(Ot.maxLine=cn,Ot.maxLineLength=Vn,Ot.maxLineChanged=!0,Te=!1)}),Te&&(rt.curOp.updateMaxLine=!0)),ei(Ct,te.line),dc(rt,400);var Ie=ct.text.length-(me.line-te.line)-1;ct.full?bo(rt):te.line==me.line&&ct.text.length==1&&!ap(rt.doc,ct)?ki(rt,te.line,"text"):bo(rt,te.line,me.line+1,Ie);var nn=an(rt,"changes"),ze=an(rt,"change");if(ze||nn){var pn={from:te,to:me,text:ct.text,removed:ct.removed,origin:ct.origin};ze&&Br(rt,"change",rt,pn),nn&&(rt.curOp.changeObjs||(rt.curOp.changeObjs=[])).push(pn)}rt.display.selForContextMenu=null}function Ah(rt,ct,Et,Ct,Ot){var te;Ct||(Ct=Et),Tn(Ct,Et)<0&&(te=[Ct,Et],Et=te[0],Ct=te[1]),typeof ct=="string"&&(ct=rt.splitLines(ct)),Yu(rt,{from:Et,to:Ct,text:ct,origin:Ot})}function nl(rt,ct,Et,Ct){Et<rt.line?rt.line+=Ct:ct<rt.line&&(rt.line=ct,rt.ch=0)}function Hg(rt,ct,Et,Ct){for(var Ot=0;Ot<rt.length;++Ot){var te=rt[Ot],me=!0;if(te.ranges){te.copied||(te=rt[Ot]=te.deepCopy(),te.copied=!0);for(var Te=0;Te<te.ranges.length;Te++)nl(te.ranges[Te].anchor,ct,Et,Ct),nl(te.ranges[Te].head,ct,Et,Ct);continue}for(var ke=0;ke<te.changes.length;++ke){var Ie=te.changes[ke];if(Et<Ie.from.line)Ie.from=en(Ie.from.line+Ct,Ie.from.ch),Ie.to=en(Ie.to.line+Ct,Ie.to.ch);else if(ct<=Ie.to.line){me=!1;break}}me||(rt.splice(0,Ot+1),Ot=0)}}function cp(rt,ct){var Et=ct.from.line,Ct=ct.to.line,Ot=ct.text.length-(Ct-Et)-1;Hg(rt.done,Et,Ct,Ot),Hg(rt.undone,Et,Ct,Ot)}function Nh(rt,ct,Et,Ct){var Ot=ct,te=ct;return typeof ct=="number"?te=Rn(rt,Bn(rt,ct)):Ot=Oe(ct),Ot==null?null:(Ct(te,Ot)&&rt.cm&&ki(rt.cm,Ot,Et),te)}function Sc(rt){this.lines=rt,this.parent=null;for(var ct=0,Et=0;Et<rt.length;++Et)rt[Et].parent=this,ct+=rt[Et].height;this.height=ct}Sc.prototype={chunkSize:function(){return this.lines.length},removeInner:function(rt,ct){for(var Et=rt,Ct=rt+ct;Et<Ct;++Et){var Ot=this.lines[Et];this.height-=Ot.height,Bo(Ot),Br(Ot,"delete")}this.lines.splice(rt,ct)},collapse:function(rt){rt.push.apply(rt,this.lines)},insertInner:function(rt,ct,Et){this.height+=Et,this.lines=this.lines.slice(0,rt).concat(ct).concat(this.lines.slice(rt));for(var Ct=0;Ct<ct.length;++Ct)ct[Ct].parent=this},iterN:function(rt,ct,Et){for(var Ct=rt+ct;rt<Ct;++rt)if(Et(this.lines[rt]))return!0}};function Oo(rt){this.children=rt;for(var ct=0,Et=0,Ct=0;Ct<rt.length;++Ct){var Ot=rt[Ct];ct+=Ot.chunkSize(),Et+=Ot.height,Ot.parent=this}this.size=ct,this.height=Et,this.parent=null}Oo.prototype={chunkSize:function(){return this.size},removeInner:function(rt,ct){this.size-=ct;for(var Et=0;Et<this.children.length;++Et){var Ct=this.children[Et],Ot=Ct.chunkSize();if(rt<Ot){var te=Math.min(ct,Ot-rt),me=Ct.height;if(Ct.removeInner(rt,te),this.height-=me-Ct.height,Ot==te&&(this.children.splice(Et--,1),Ct.parent=null),(ct-=te)==0)break;rt=0}else rt-=Ot}if(this.size-ct<25&&(this.children.length>1||!(this.children[0]instanceof Sc))){var Te=[];this.collapse(Te),this.children=[new Sc(Te)],this.children[0].parent=this}},collapse:function(rt){for(var ct=0;ct<this.children.length;++ct)this.children[ct].collapse(rt)},insertInner:function(rt,ct,Et){this.size+=ct.length,this.height+=Et;for(var Ct=0;Ct<this.children.length;++Ct){var Ot=this.children[Ct],te=Ot.chunkSize();if(rt<=te){if(Ot.insertInner(rt,ct,Et),Ot.lines&&Ot.lines.length>50){for(var me=Ot.lines.length%25+25,Te=me;Te<Ot.lines.length;){var ke=new Sc(Ot.lines.slice(Te,Te+=25));Ot.height-=ke.height,this.children.splice(++Ct,0,ke),ke.parent=this}Ot.lines=Ot.lines.slice(0,me),this.maybeSpill()}break}rt-=te}},maybeSpill:function(){if(!(this.children.length<=10)){var rt=this;do{var ct=rt.children.splice(rt.children.length-5,5),Et=new Oo(ct);if(rt.parent){rt.size-=Et.size,rt.height-=Et.height;var Ot=ve(rt.parent.children,rt);rt.parent.children.splice(Ot+1,0,Et)}else{var Ct=new Oo(rt.children);Ct.parent=rt,rt.children=[Ct,Et],rt=Ct}Et.parent=rt.parent}while(rt.children.length>10);rt.parent.maybeSpill()}},iterN:function(rt,ct,Et){for(var Ct=0;Ct<this.children.length;++Ct){var Ot=this.children[Ct],te=Ot.chunkSize();if(rt<te){var me=Math.min(ct,te-rt);if(Ot.iterN(rt,me,Et))return!0;if((ct-=me)==0)break;rt=0}else rt-=te}}};var vu=function(rt,ct,Et){if(Et)for(var Ct in Et)Et.hasOwnProperty(Ct)&&(this[Ct]=Et[Ct]);this.doc=rt,this.node=ct};vu.prototype.clear=function(){var rt=this.doc.cm,ct=this.line.widgets,Et=this.line,Ct=Oe(Et);if(!(Ct==null||!ct)){for(var Ot=0;Ot<ct.length;++Ot)ct[Ot]==this&&ct.splice(Ot--,1);ct.length||(Et.widgets=null);var te=ia(this);Nn(Et,Math.max(0,Et.height-te)),rt&&(Xi(rt,function(){Vg(rt,Et,-te),ki(rt,Ct,"widget")}),Br(rt,"lineWidgetCleared",rt,this,Ct))}},vu.prototype.changed=function(){var rt=this,ct=this.height,Et=this.doc.cm,Ct=this.line;this.height=null;var Ot=ia(this)-ct;Ot&&(Cn(this.doc,Ct)||Nn(Ct,Ct.height+Ot),Et&&Xi(Et,function(){Et.curOp.forceUpdate=!0,Vg(Et,Ct,Ot),Br(Et,"lineWidgetChanged",Et,rt,Oe(Ct))}))},ln(vu);function Vg(rt,ct,Et){Ci(ct)<(rt.curOp&&rt.curOp.scrollTop||rt.doc.scrollTop)&&Hf(rt,Et)}function nd(rt,ct,Et,Ct){var Ot=new vu(rt,Et,Ct),te=rt.cm;return te&&Ot.noHScroll&&(te.display.alignWidgets=!0),Nh(rt,ct,"widget",function(me){var Te=me.widgets||(me.widgets=[]);if(Ot.insertAt==null?Te.push(Ot):Te.splice(Math.min(Te.length-1,Math.max(0,Ot.insertAt)),0,Ot),Ot.line=me,te&&!Cn(rt,me)){var ke=Ci(me)<rt.scrollTop;Nn(me,me.height+ia(Ot)),ke&&Hf(te,Ot.height),te.curOp.forceUpdate=!0}return!0}),te&&Br(te,"lineWidgetAdded",te,Ot,typeof ct=="number"?ct:Oe(ct)),Ot}var Kg=0,Je=function(rt,ct){this.lines=[],this.type=ct,this.doc=rt,this.id=++Kg};Je.prototype.clear=function(){if(!this.explicitlyCleared){var rt=this.doc.cm,ct=rt&&!rt.curOp;if(ct&&_u(rt),an(this,"clear")){var Et=this.find();Et&&Br(this,"clear",Et.from,Et.to)}for(var Ct=null,Ot=null,te=0;te<this.lines.length;++te){var me=this.lines[te],Te=Gi(me.markedSpans,this);rt&&!this.collapsed?ki(rt,Oe(me),"text"):rt&&(Te.to!=null&&(Ot=Oe(me)),Te.from!=null&&(Ct=Oe(me))),me.markedSpans=mi(me.markedSpans,Te),Te.from==null&&this.collapsed&&!Cn(this.doc,me)&&rt&&Nn(me,Qa(rt.display))}if(rt&&this.collapsed&&!rt.options.lineWrapping)for(var ke=0;ke<this.lines.length;++ke){var Ie=mr(this.lines[ke]),nn=io(Ie);nn>rt.display.maxLineLength&&(rt.display.maxLine=Ie,rt.display.maxLineLength=nn,rt.display.maxLineChanged=!0)}Ct!=null&&rt&&this.collapsed&&bo(rt,Ct,Ot+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,rt&&af(rt.doc)),rt&&Br(rt,"markerCleared",rt,this,Ct,Ot),ct&&zu(rt),this.parent&&this.parent.clear()}},Je.prototype.find=function(rt,ct){rt==null&&this.type=="bookmark"&&(rt=1);for(var Et,Ct,Ot=0;Ot<this.lines.length;++Ot){var te=this.lines[Ot],me=Gi(te.markedSpans,this);if(me.from!=null&&(Et=en(ct?te:Oe(te),me.from),rt==-1))return Et;if(me.to!=null&&(Ct=en(ct?te:Oe(te),me.to),rt==1))return Ct}return Et&&{from:Et,to:Ct}},Je.prototype.changed=function(){var rt=this,ct=this.find(-1,!0),Et=this,Ct=this.doc.cm;!ct||!Ct||Xi(Ct,function(){var Ot=ct.line,te=Oe(ct.line),me=pl(Ct,te);if(me&&(hc(me),Ct.curOp.selectionChanged=Ct.curOp.forceUpdate=!0),Ct.curOp.updateMaxLine=!0,!Cn(Et.doc,Ot)&&Et.height!=null){var Te=Et.height;Et.height=null;var ke=ia(Et)-Te;ke&&Nn(Ot,Ot.height+ke)}Br(Ct,"markerChanged",Ct,rt)})},Je.prototype.attachLine=function(rt){if(!this.lines.length&&this.doc.cm){var ct=this.doc.cm.curOp;(!ct.maybeHiddenMarkers||ve(ct.maybeHiddenMarkers,this)==-1)&&(ct.maybeUnhiddenMarkers||(ct.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(rt)},Je.prototype.detachLine=function(rt){if(this.lines.splice(ve(this.lines,rt),1),!this.lines.length&&this.doc.cm){var ct=this.doc.cm.curOp;(ct.maybeHiddenMarkers||(ct.maybeHiddenMarkers=[])).push(this)}},ln(Je);function jh(rt,ct,Et,Ct,Ot){if(Ct&&Ct.shared)return Zg(rt,ct,Et,Ct,Ot);if(rt.cm&&!rt.cm.curOp)return sa(rt.cm,jh)(rt,ct,Et,Ct,Ot);var te=new Je(rt,Ot),me=Tn(ct,Et);if(Ct&&Pe(Ct,te,!1),me>0||me==0&&te.clearWhenEmpty!==!1)return te;if(te.replacedWith&&(te.collapsed=!0,te.widgetNode=Gt("span",[te.replacedWith],"CodeMirror-widget"),Ct.handleMouseEvents||te.widgetNode.setAttribute("cm-ignore-events","true"),Ct.insertLeft&&(te.widgetNode.insertLeft=!0)),te.collapsed){if(Jr(rt,ct.line,ct,Et,te)||ct.line!=Et.line&&Jr(rt,Et.line,ct,Et,te))throw new Error("Inserting collapsed marker partially overlapping an existing one");gn()}te.addToHistory&&rf(rt,{from:ct,to:Et,origin:"markText"},rt.sel,NaN);var Te=ct.line,ke=rt.cm,Ie;if(rt.iter(Te,Et.line+1,function(ze){ke&&te.collapsed&&!ke.options.lineWrapping&&mr(ze)==ke.display.maxLine&&(Ie=!0),te.collapsed&&Te!=ct.line&&Nn(ze,0),Bi(ze,new oi(te,Te==ct.line?ct.ch:null,Te==Et.line?Et.ch:null)),++Te}),te.collapsed&&rt.iter(ct.line,Et.line+1,function(ze){Cn(rt,ze)&&Nn(ze,0)}),te.clearOnEnter&&Qe(te,"beforeCursorEnter",function(){return te.clear()}),te.readOnly&&(vi(),(rt.history.done.length||rt.history.undone.length)&&rt.clearHistory()),te.collapsed&&(te.id=++Kg,te.atomic=!0),ke){if(Ie&&(ke.curOp.updateMaxLine=!0),te.collapsed)bo(ke,ct.line,Et.line+1);else if(te.className||te.startStyle||te.endStyle||te.css||te.attributes||te.title)for(var nn=ct.line;nn<=Et.line;nn++)ki(ke,nn,"text");te.atomic&&af(ke.doc),Br(ke,"markerAdded",ke,te)}return te}var Kl=function(rt,ct){this.markers=rt,this.primary=ct;for(var Et=0;Et<rt.length;++Et)rt[Et].parent=this};Kl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var rt=0;rt<this.markers.length;++rt)this.markers[rt].clear();Br(this,"clear")}},Kl.prototype.find=function(rt,ct){return this.primary.find(rt,ct)},ln(Kl);function Zg(rt,ct,Et,Ct,Ot){Ct=Pe(Ct),Ct.shared=!1;var te=[jh(rt,ct,Et,Ct,Ot)],me=te[0],Te=Ct.widgetNode;return Nl(rt,function(ke){Te&&(Ct.widgetNode=Te.cloneNode(!0)),te.push(jh(ke,Un(ke,ct),Un(ke,Et),Ct,Ot));for(var Ie=0;Ie<ke.linked.length;++Ie)if(ke.linked[Ie].isParent)return;me=Ne(te)}),new Kl(te,me)}function fp(rt){return rt.findMarks(en(rt.first,0),rt.clipPos(en(rt.lastLine())),function(ct){return ct.parent})}function Xg(rt,ct){for(var Et=0;Et<ct.length;Et++){var Ct=ct[Et],Ot=Ct.find(),te=rt.clipPos(Ot.from),me=rt.clipPos(Ot.to);if(Tn(te,me)){var Te=jh(rt,te,me,Ct.primary,Ct.primary.type);Ct.markers.push(Te),Te.parent=Ct}}}function dp(rt){for(var ct=function(Ct){var Ot=rt[Ct],te=[Ot.primary.doc];Nl(Ot.primary.doc,function(ke){return te.push(ke)});for(var me=0;me<Ot.markers.length;me++){var Te=Ot.markers[me];ve(te,Te.doc)==-1&&(Te.parent=null,Ot.markers.splice(me--,1))}},Et=0;Et<rt.length;Et++)ct(Et)}var e0=0,Oa=function(rt,ct,Et,Ct,Ot){if(!(this instanceof Oa))return new Oa(rt,ct,Et,Ct,Ot);Et==null&&(Et=0),Oo.call(this,[new Sc([new lo("",null)])]),this.first=Et,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Et;var te=en(Et,0);this.sel=pu(te),this.history=new gc(null),this.id=++e0,this.modeOption=ct,this.lineSep=Ct,this.direction=Ot=="rtl"?"rtl":"ltr",this.extend=!1,typeof rt=="string"&&(rt=this.splitLines(rt)),Yf(this,{from:te,to:te,text:rt}),Ua(this,pu(te),fe)};Oa.prototype=wt(Oo.prototype,{constructor:Oa,iter:function(rt,ct,Et){Et?this.iterN(rt-this.first,ct-rt,Et):this.iterN(this.first,this.first+this.size,rt)},insert:function(rt,ct){for(var Et=0,Ct=0;Ct<ct.length;++Ct)Et+=ct[Ct].height;this.insertInner(rt-this.first,ct,Et)},remove:function(rt,ct){this.removeInner(rt-this.first,ct)},getValue:function(rt){var ct=Nr(this,this.first,this.first+this.size);return rt===!1?ct:ct.join(rt||this.lineSeparator())},setValue:ga(function(rt){var ct=en(this.first,0),Et=this.first+this.size-1;Yu(this,{from:ct,to:en(Et,Rn(this,Et).text.length),text:this.splitLines(rt),origin:"setValue",full:!0},!0),this.cm&&bh(this.cm,0,0),Ua(this,pu(ct),fe)}),replaceRange:function(rt,ct,Et,Ct){ct=Un(this,ct),Et=Et?Un(this,Et):ct,Ah(this,rt,ct,Et,Ct)},getRange:function(rt,ct,Et){var Ct=vr(this,Un(this,rt),Un(this,ct));return Et===!1?Ct:Ct.join(Et||this.lineSeparator())},getLine:function(rt){var ct=this.getLineHandle(rt);return ct&&ct.text},getLineHandle:function(rt){if(Ln(this,rt))return Rn(this,rt)},getLineNumber:function(rt){return Oe(rt)},getLineHandleVisualStart:function(rt){return typeof rt=="number"&&(rt=Rn(this,rt)),mr(rt)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(rt){return Un(this,rt)},getCursor:function(rt){var ct=this.sel.primary(),Et;return rt==null||rt=="head"?Et=ct.head:rt=="anchor"?Et=ct.anchor:rt=="end"||rt=="to"||rt===!1?Et=ct.to():Et=ct.from(),Et},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ga(function(rt,ct,Et){Mh(this,Un(this,typeof rt=="number"?en(rt,ct||0):rt),null,Et)}),setSelection:ga(function(rt,ct,Et){Mh(this,Un(this,rt),Un(this,ct||rt),Et)}),extendSelection:ga(function(rt,ct,Et){td(this,Un(this,rt),ct&&Un(this,ct),Et)}),extendSelections:ga(function(rt,ct){Gg(this,lr(this,rt),ct)}),extendSelectionsBy:ga(function(rt,ct){var Et=xe(this.sel.ranges,rt);Gg(this,lr(this,Et),ct)}),setSelections:ga(function(rt,ct,Et){if(rt.length){for(var Ct=[],Ot=0;Ot<rt.length;Ot++)Ct[Ot]=new to(Un(this,rt[Ot].anchor),Un(this,rt[Ot].head));ct==null&&(ct=Math.min(rt.length-1,this.sel.primIndex)),Ua(this,ml(this.cm,Ct,ct),Et)}}),addSelection:ga(function(rt,ct,Et){var Ct=this.sel.ranges.slice(0);Ct.push(new to(Un(this,rt),Un(this,ct||rt))),Ua(this,ml(this.cm,Ct,Ct.length-1),Et)}),getSelection:function(rt){for(var ct=this.sel.ranges,Et,Ct=0;Ct<ct.length;Ct++){var Ot=vr(this,ct[Ct].from(),ct[Ct].to());Et=Et?Et.concat(Ot):Ot}return rt===!1?Et:Et.join(rt||this.lineSeparator())},getSelections:function(rt){for(var ct=[],Et=this.sel.ranges,Ct=0;Ct<Et.length;Ct++){var Ot=vr(this,Et[Ct].from(),Et[Ct].to());rt!==!1&&(Ot=Ot.join(rt||this.lineSeparator())),ct[Ct]=Ot}return ct},replaceSelection:function(rt,ct,Et){for(var Ct=[],Ot=0;Ot<this.sel.ranges.length;Ot++)Ct[Ot]=rt;this.replaceSelections(Ct,ct,Et||"+input")},replaceSelections:ga(function(rt,ct,Et){for(var Ct=[],Ot=this.sel,te=0;te<Ot.ranges.length;te++){var me=Ot.ranges[te];Ct[te]={from:me.from(),to:me.to(),text:this.splitLines(rt[te]),origin:Et}}for(var Te=ct&&ct!="end"&&qc(this,Ct,ct),ke=Ct.length-1;ke>=0;ke--)Yu(this,Ct[ke]);Te?ed(this,Te):this.cm&&fu(this.cm)}),undo:ga(function(){hf(this,"undo")}),redo:ga(function(){hf(this,"redo")}),undoSelection:ga(function(){hf(this,"undo",!0)}),redoSelection:ga(function(){hf(this,"redo",!0)}),setExtending:function(rt){this.extend=rt},getExtending:function(){return this.extend},historySize:function(){for(var rt=this.history,ct=0,Et=0,Ct=0;Ct<rt.done.length;Ct++)rt.done[Ct].ranges||++ct;for(var Ot=0;Ot<rt.undone.length;Ot++)rt.undone[Ot].ranges||++Et;return{undo:ct,redo:Et}},clearHistory:function(){var rt=this;this.history=new gc(this.history.maxGeneration),Nl(this,function(ct){return ct.history=rt.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(rt){return rt&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(rt){return this.history.generation==(rt||this.cleanGeneration)},getHistory:function(){return{done:gu(this.history.done),undone:gu(this.history.undone)}},setHistory:function(rt){var ct=this.history=new gc(this.history.maxGeneration);ct.done=gu(rt.done.slice(0),null,!0),ct.undone=gu(rt.undone.slice(0),null,!0)},setGutterMarker:ga(function(rt,ct,Et){return Nh(this,rt,"gutter",function(Ct){var Ot=Ct.gutterMarkers||(Ct.gutterMarkers={});return Ot[ct]=Et,!Et&&It(Ot)&&(Ct.gutterMarkers=null),!0})}),clearGutter:ga(function(rt){var ct=this;this.iter(function(Et){Et.gutterMarkers&&Et.gutterMarkers[rt]&&Nh(ct,Et,"gutter",function(){return Et.gutterMarkers[rt]=null,It(Et.gutterMarkers)&&(Et.gutterMarkers=null),!0})})}),lineInfo:function(rt){var ct;if(typeof rt=="number"){if(!Ln(this,rt)||(ct=rt,rt=Rn(this,rt),!rt))return null}else if(ct=Oe(rt),ct==null)return null;return{line:ct,handle:rt,text:rt.text,gutterMarkers:rt.gutterMarkers,textClass:rt.textClass,bgClass:rt.bgClass,wrapClass:rt.wrapClass,widgets:rt.widgets}},addLineClass:ga(function(rt,ct,Et){return Nh(this,rt,ct=="gutter"?"gutter":"class",function(Ct){var Ot=ct=="text"?"textClass":ct=="background"?"bgClass":ct=="gutter"?"gutterClass":"wrapClass";if(!Ct[Ot])Ct[Ot]=Et;else{if(At(Et).test(Ct[Ot]))return!1;Ct[Ot]+=" "+Et}return!0})}),removeLineClass:ga(function(rt,ct,Et){return Nh(this,rt,ct=="gutter"?"gutter":"class",function(Ct){var Ot=ct=="text"?"textClass":ct=="background"?"bgClass":ct=="gutter"?"gutterClass":"wrapClass",te=Ct[Ot];if(te)if(Et==null)Ct[Ot]=null;else{var me=te.match(At(Et));if(!me)return!1;var Te=me.index+me[0].length;Ct[Ot]=te.slice(0,me.index)+(!me.index||Te==te.length?"":" ")+te.slice(Te)||null}else return!1;return!0})}),addLineWidget:ga(function(rt,ct,Et){return nd(this,rt,ct,Et)}),removeLineWidget:function(rt){rt.clear()},markText:function(rt,ct,Et){return jh(this,Un(this,rt),Un(this,ct),Et,Et&&Et.type||"range")},setBookmark:function(rt,ct){var Et={replacedWith:ct&&(ct.nodeType==null?ct.widget:ct),insertLeft:ct&&ct.insertLeft,clearWhenEmpty:!1,shared:ct&&ct.shared,handleMouseEvents:ct&&ct.handleMouseEvents};return rt=Un(this,rt),jh(this,rt,rt,Et,"bookmark")},findMarksAt:function(rt){rt=Un(this,rt);var ct=[],Et=Rn(this,rt.line).markedSpans;if(Et)for(var Ct=0;Ct<Et.length;++Ct){var Ot=Et[Ct];(Ot.from==null||Ot.from<=rt.ch)&&(Ot.to==null||Ot.to>=rt.ch)&&ct.push(Ot.marker.parent||Ot.marker)}return ct},findMarks:function(rt,ct,Et){rt=Un(this,rt),ct=Un(this,ct);var Ct=[],Ot=rt.line;return this.iter(rt.line,ct.line+1,function(te){var me=te.markedSpans;if(me)for(var Te=0;Te<me.length;Te++){var ke=me[Te];!(ke.to!=null&&Ot==rt.line&&rt.ch>=ke.to||ke.from==null&&Ot!=rt.line||ke.from!=null&&Ot==ct.line&&ke.from>=ct.ch)&&(!Et||Et(ke.marker))&&Ct.push(ke.marker.parent||ke.marker)}++Ot}),Ct},getAllMarks:function(){var rt=[];return this.iter(function(ct){var Et=ct.markedSpans;if(Et)for(var Ct=0;Ct<Et.length;++Ct)Et[Ct].from!=null&&rt.push(Et[Ct].marker)}),rt},posFromIndex:function(rt){var ct,Et=this.first,Ct=this.lineSeparator().length;return this.iter(function(Ot){var te=Ot.text.length+Ct;if(te>rt)return ct=rt,!0;rt-=te,++Et}),Un(this,en(Et,ct))},indexFromPos:function(rt){rt=Un(this,rt);var ct=rt.ch;if(rt.line<this.first||rt.ch<0)return 0;var Et=this.lineSeparator().length;return this.iter(this.first,rt.line,function(Ct){ct+=Ct.text.length+Et}),ct},copy:function(rt){var ct=new Oa(Nr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ct.scrollTop=this.scrollTop,ct.scrollLeft=this.scrollLeft,ct.sel=this.sel,ct.extend=!1,rt&&(ct.history.undoDepth=this.history.undoDepth,ct.setHistory(this.getHistory())),ct},linkedDoc:function(rt){rt||(rt={});var ct=this.first,Et=this.first+this.size;rt.from!=null&&rt.from>ct&&(ct=rt.from),rt.to!=null&&rt.to<Et&&(Et=rt.to);var Ct=new Oa(Nr(this,ct,Et),rt.mode||this.modeOption,ct,this.lineSep,this.direction);return rt.sharedHist&&(Ct.history=this.history),(this.linked||(this.linked=[])).push({doc:Ct,sharedHist:rt.sharedHist}),Ct.linked=[{doc:this,isParent:!0,sharedHist:rt.sharedHist}],Xg(Ct,fp(this)),Ct},unlinkDoc:function(rt){if(rt instanceof Wi&&(rt=rt.doc),this.linked)for(var ct=0;ct<this.linked.length;++ct){var Et=this.linked[ct];if(Et.doc==rt){this.linked.splice(ct,1),rt.unlinkDoc(this),dp(fp(this));break}}if(rt.history==this.history){var Ct=[rt.id];Nl(rt,function(Ot){return Ct.push(Ot.id)},!0),rt.history=new gc(null),rt.history.done=gu(this.history.done,Ct),rt.history.undone=gu(this.history.undone,Ct)}},iterLinkedDocs:function(rt){Nl(this,rt)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(rt){return this.lineSep?rt.split(this.lineSep):zr(rt)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:ga(function(rt){rt!="rtl"&&(rt="ltr"),rt!=this.direction&&(this.direction=rt,this.iter(function(ct){return ct.order=null}),this.cm&&t0(this.cm))})}),Oa.prototype.eachLine=Oa.prototype.iter;var cf=0;function pp(rt){var ct=this;if(Qg(ct),!(Ve(ct,rt)||Uo(ct.display,rt))){Sn(rt),Bt&&(cf=+new Date);var Et=$a(ct,rt,!0),Ct=rt.dataTransfer.files;if(!(!Et||ct.isReadOnly()))if(Ct&&Ct.length&&window.FileReader&&window.File)for(var Ot=Ct.length,te=Array(Ot),me=0,Te=function(){++me==Ot&&sa(ct,function(){Et=Un(ct.doc,Et);var cn={from:Et,to:Et,text:ct.doc.splitLines(te.filter(function(Vn){return Vn!=null}).join(ct.doc.lineSeparator())),origin:"paste"};Yu(ct.doc,cn),ed(ct.doc,pu(Un(ct.doc,Et),Un(ct.doc,Ku(cn))))})()},ke=function(cn,Vn){if(ct.options.allowDropFileTypes&&ve(ct.options.allowDropFileTypes,cn.type)==-1){Te();return}var qn=new FileReader;qn.onerror=function(){return Te()},qn.onload=function(){var ar=qn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ar)){Te();return}te[Vn]=ar,Te()},qn.readAsText(cn)},Ie=0;Ie<Ct.length;Ie++)ke(Ct[Ie],Ie);else{if(ct.state.draggingText&&ct.doc.sel.contains(Et)>-1){ct.state.draggingText(rt),setTimeout(function(){return ct.display.input.focus()},20);return}try{var nn=rt.dataTransfer.getData("Text");if(nn){var ze;if(ct.state.draggingText&&!ct.state.draggingText.copy&&(ze=ct.listSelections()),Th(ct.doc,pu(Et,Et)),ze)for(var pn=0;pn<ze.length;++pn)Ah(ct.doc,"",ze[pn].anchor,ze[pn].head,"drag");ct.replaceSelection(nn,"around","paste"),ct.display.input.focus()}}catch(cn){}}}}function Yg(rt,ct){if(Bt&&(!rt.state.draggingText||+new Date-cf<100)){Yn(ct);return}if(!(Ve(rt,ct)||Uo(rt.display,ct))&&(ct.dataTransfer.setData("Text",rt.getSelection()),ct.dataTransfer.effectAllowed="copyMove",ct.dataTransfer.setDragImage&&!Tt)){var Et=jt("img",null,null,"position: fixed; left: 0; top: 0;");Et.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",St&&(Et.width=Et.height=1,rt.display.wrapper.appendChild(Et),Et._top=Et.offsetTop),ct.dataTransfer.setDragImage(Et,0,0),St&&Et.parentNode.removeChild(Et)}}function Jg(rt,ct){var Et=$a(rt,ct);if(Et){var Ct=document.createDocumentFragment();Ii(rt,Et,Ct),rt.display.dragCursor||(rt.display.dragCursor=jt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),rt.display.lineSpace.insertBefore(rt.display.dragCursor,rt.display.cursorDiv)),Nt(rt.display.dragCursor,Ct)}}function Qg(rt){rt.display.dragCursor&&(rt.display.lineSpace.removeChild(rt.display.dragCursor),rt.display.dragCursor=null)}function $g(rt){if(document.getElementsByClassName){for(var ct=document.getElementsByClassName("CodeMirror"),Et=[],Ct=0;Ct<ct.length;Ct++){var Ot=ct[Ct].CodeMirror;Ot&&Et.push(Ot)}Et.length&&Et[0].operation(function(){for(var te=0;te<Et.length;te++)rt(Et[te])})}}var gp=!1;function Gs(){gp||(xc(),gp=!0)}function xc(){var rt;Qe(window,"resize",function(){rt==null&&(rt=setTimeout(function(){rt=null,$g(mp)},100))}),Qe(window,"blur",function(){return $g(wh)})}function mp(rt){var ct=rt.display;ct.cachedCharWidth=ct.cachedTextHeight=ct.cachedPaddingH=null,ct.scrollbarsClipped=!1,rt.setSize()}for(var Zl={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"},ff=0;ff<10;ff++)Zl[ff+48]=Zl[ff+96]=String(ff);for(var rd=65;rd<=90;rd++)Zl[rd]=String.fromCharCode(rd);for(var df=1;df<=12;df++)Zl[df+111]=Zl[df+63235]="F"+df;var Es={};Es.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"},Es.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"},Es.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"},Es.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"]},Es.default=at?Es.macDefault:Es.pcDefault;function vp(rt){var ct=rt.split(/-(?!$)/);rt=ct[ct.length-1];for(var Et,Ct,Ot,te,me=0;me<ct.length-1;me++){var Te=ct[me];if(/^(cmd|meta|m)$/i.test(Te))te=!0;else if(/^a(lt)?$/i.test(Te))Et=!0;else if(/^(c|ctrl|control)$/i.test(Te))Ct=!0;else if(/^s(hift)?$/i.test(Te))Ot=!0;else throw new Error("Unrecognized modifier name: "+Te)}return Et&&(rt="Alt-"+rt),Ct&&(rt="Ctrl-"+rt),te&&(rt="Cmd-"+rt),Ot&&(rt="Shift-"+rt),rt}function yp(rt){var ct={};for(var Et in rt)if(rt.hasOwnProperty(Et)){var Ct=rt[Et];if(/^(name|fallthrough|(de|at)tach)$/.test(Et))continue;if(Ct=="..."){delete rt[Et];continue}for(var Ot=xe(Et.split(" "),vp),te=0;te<Ot.length;te++){var me=void 0,Te=void 0;te==Ot.length-1?(Te=Ot.join(" "),me=Ct):(Te=Ot.slice(0,te+1).join(" "),me="...");var ke=ct[Te];if(!ke)ct[Te]=me;else if(ke!=me)throw new Error("Inconsistent bindings for "+Te)}delete rt[Et]}for(var Ie in ct)rt[Ie]=ct[Ie];return rt}function rl(rt,ct,Et,Ct){ct=Oh(ct);var Ot=ct.call?ct.call(rt,Ct):ct[rt];if(Ot===!1)return"nothing";if(Ot==="...")return"multi";if(Ot!=null&&Et(Ot))return"handled";if(ct.fallthrough){if(Object.prototype.toString.call(ct.fallthrough)!="[object Array]")return rl(rt,ct.fallthrough,Et,Ct);for(var te=0;te<ct.fallthrough.length;te++){var me=rl(rt,ct.fallthrough[te],Et,Ct);if(me)return me}}}function wc(rt){var ct=typeof rt=="string"?rt:Zl[rt.keyCode];return ct=="Ctrl"||ct=="Alt"||ct=="Shift"||ct=="Mod"}function Sp(rt,ct,Et){var Ct=rt;return ct.altKey&&Ct!="Alt"&&(rt="Alt-"+rt),(dt?ct.metaKey:ct.ctrlKey)&&Ct!="Ctrl"&&(rt="Ctrl-"+rt),(dt?ct.ctrlKey:ct.metaKey)&&Ct!="Mod"&&(rt="Cmd-"+rt),!Et&&ct.shiftKey&&Ct!="Shift"&&(rt="Shift-"+rt),rt}function qg(rt,ct){if(St&&rt.keyCode==34&&rt.char)return!1;var Et=Zl[rt.keyCode];return Et==null||rt.altGraphKey?!1:(rt.keyCode==3&&rt.code&&(Et=rt.code),Sp(Et,rt,ct))}function Oh(rt){return typeof rt=="string"?Es[rt]:rt}function Ms(rt,ct){for(var Et=rt.doc.sel.ranges,Ct=[],Ot=0;Ot<Et.length;Ot++){for(var te=ct(Et[Ot]);Ct.length&&Tn(te.from,Ne(Ct).to)<=0;){var me=Ct.pop();if(Tn(me.from,te.from)<0){te.from=me.from;break}}Ct.push(te)}Xi(rt,function(){for(var Te=Ct.length-1;Te>=0;Te--)Ah(rt.doc,"",Ct[Te].from,Ct[Te].to,"+delete");fu(rt)})}function xp(rt,ct,Et){var Ct=$t(rt.text,ct+Et,Et);return Ct<0||Ct>rt.text.length?null:Ct}function Ko(rt,ct,Et){var Ct=xp(rt,ct.ch,Et);return Ct==null?null:new en(ct.line,Ct,Et<0?"after":"before")}function pf(rt,ct,Et,Ct,Ot){if(rt){ct.doc.direction=="rtl"&&(Ot=-Ot);var te=Ze(Et,ct.doc.direction);if(te){var me=Ot<0?Ne(te):te[0],Te=Ot<0==(me.level==1),ke=Te?"after":"before",Ie;if(me.level>0||ct.doc.direction=="rtl"){var nn=Ul(ct,Et);Ie=Ot<0?Et.text.length-1:0;var ze=Is(ct,nn,Ie).top;Ie=ue(function(pn){return Is(ct,nn,pn).top==ze},Ot<0==(me.level==1)?me.from:me.to-1,Ie),ke=="before"&&(Ie=xp(Et,Ie,1))}else Ie=Ot<0?me.to:me.from;return new en(Ct,Ie,ke)}}return new en(Ct,Ot<0?Et.text.length:0,Ot<0?"before":"after")}function id(rt,ct,Et,Ct){var Ot=Ze(ct,rt.doc.direction);if(!Ot)return Ko(ct,Et,Ct);Et.ch>=ct.text.length?(Et.ch=ct.text.length,Et.sticky="before"):Et.ch<=0&&(Et.ch=0,Et.sticky="after");var te=Ae(Ot,Et.ch,Et.sticky),me=Ot[te];if(rt.doc.direction=="ltr"&&me.level%2==0&&(Ct>0?me.to>Et.ch:me.from<Et.ch))return Ko(ct,Et,Ct);var Te=function(Cr,Wr){return xp(ct,Cr instanceof en?Cr.ch:Cr,Wr)},ke,Ie=function(Cr){return rt.options.lineWrapping?(ke=ke||Ul(rt,ct),Jo(rt,ct,ke,Cr)):{begin:0,end:ct.text.length}},nn=Ie(Et.sticky=="before"?Te(Et,-1):Et.ch);if(rt.doc.direction=="rtl"||me.level==1){var ze=me.level==1==Ct<0,pn=Te(Et,ze?1:-1);if(pn!=null&&(ze?pn<=me.to&&pn<=nn.end:pn>=me.from&&pn>=nn.begin)){var cn=ze?"before":"after";return new en(Et.line,pn,cn)}}var Vn=function(Cr,Wr,Fr){for(var Xr=function(Po,ua){return ua?new en(Et.line,Te(Po,1),"before"):new en(Et.line,Po,"after")};Cr>=0&&Cr<Ot.length;Cr+=Wr){var ci=Ot[Cr],jr=Wr>0==(ci.level!=1),Mi=jr?Fr.begin:Te(Fr.end,-1);if(ci.from<=Mi&&Mi<ci.to||(Mi=jr?ci.from:Te(ci.to,-1),Fr.begin<=Mi&&Mi<Fr.end))return Xr(Mi,jr)}},qn=Vn(te+Ct,Ct,nn);if(qn)return qn;var ar=Ct>0?nn.end:Te(nn.begin,-1);return ar!=null&&!(Ct>0&&ar==ct.text.length)&&(qn=Vn(Ct>0?0:Ot.length-1,Ct,Ie(ar)),qn)?qn:null}var Ju={selectAll:Vo,singleSelection:function(rt){return rt.setSelection(rt.getCursor("anchor"),rt.getCursor("head"),fe)},killLine:function(rt){return Ms(rt,function(ct){if(ct.empty()){var Et=Rn(rt.doc,ct.head.line).text.length;return ct.head.ch==Et&&ct.head.line<rt.lastLine()?{from:ct.head,to:en(ct.head.line+1,0)}:{from:ct.head,to:en(ct.head.line,Et)}}else return{from:ct.from(),to:ct.to()}})},deleteLine:function(rt){return Ms(rt,function(ct){return{from:en(ct.from().line,0),to:Un(rt.doc,en(ct.to().line+1,0))}})},delLineLeft:function(rt){return Ms(rt,function(ct){return{from:en(ct.from().line,0),to:ct.from()}})},delWrappedLineLeft:function(rt){return Ms(rt,function(ct){var Et=rt.charCoords(ct.head,"div").top+5,Ct=rt.coordsChar({left:0,top:Et},"div");return{from:Ct,to:ct.from()}})},delWrappedLineRight:function(rt){return Ms(rt,function(ct){var Et=rt.charCoords(ct.head,"div").top+5,Ct=rt.coordsChar({left:rt.display.lineDiv.offsetWidth+100,top:Et},"div");return{from:ct.from(),to:Ct}})},undo:function(rt){return rt.undo()},redo:function(rt){return rt.redo()},undoSelection:function(rt){return rt.undoSelection()},redoSelection:function(rt){return rt.redoSelection()},goDocStart:function(rt){return rt.extendSelection(en(rt.firstLine(),0))},goDocEnd:function(rt){return rt.extendSelection(en(rt.lastLine()))},goLineStart:function(rt){return rt.extendSelectionsBy(function(ct){return bc(rt,ct.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(rt){return rt.extendSelectionsBy(function(ct){return wp(rt,ct.head)},{origin:"+move",bias:1})},goLineEnd:function(rt){return rt.extendSelectionsBy(function(ct){return Pc(rt,ct.head.line)},{origin:"+move",bias:-1})},goLineRight:function(rt){return rt.extendSelectionsBy(function(ct){var Et=rt.cursorCoords(ct.head,"div").top+5;return rt.coordsChar({left:rt.display.lineDiv.offsetWidth+100,top:Et},"div")},he)},goLineLeft:function(rt){return rt.extendSelectionsBy(function(ct){var Et=rt.cursorCoords(ct.head,"div").top+5;return rt.coordsChar({left:0,top:Et},"div")},he)},goLineLeftSmart:function(rt){return rt.extendSelectionsBy(function(ct){var Et=rt.cursorCoords(ct.head,"div").top+5,Ct=rt.coordsChar({left:0,top:Et},"div");return Ct.ch<rt.getLine(Ct.line).search(/\S/)?wp(rt,ct.head):Ct},he)},goLineUp:function(rt){return rt.moveV(-1,"line")},goLineDown:function(rt){return rt.moveV(1,"line")},goPageUp:function(rt){return rt.moveV(-1,"page")},goPageDown:function(rt){return rt.moveV(1,"page")},goCharLeft:function(rt){return rt.moveH(-1,"char")},goCharRight:function(rt){return rt.moveH(1,"char")},goColumnLeft:function(rt){return rt.moveH(-1,"column")},goColumnRight:function(rt){return rt.moveH(1,"column")},goWordLeft:function(rt){return rt.moveH(-1,"word")},goGroupRight:function(rt){return rt.moveH(1,"group")},goGroupLeft:function(rt){return rt.moveH(-1,"group")},goWordRight:function(rt){return rt.moveH(1,"word")},delCharBefore:function(rt){return rt.deleteH(-1,"codepoint")},delCharAfter:function(rt){return rt.deleteH(1,"char")},delWordBefore:function(rt){return rt.deleteH(-1,"word")},delWordAfter:function(rt){return rt.deleteH(1,"word")},delGroupBefore:function(rt){return rt.deleteH(-1,"group")},delGroupAfter:function(rt){return rt.deleteH(1,"group")},indentAuto:function(rt){return rt.indentSelection("smart")},indentMore:function(rt){return rt.indentSelection("add")},indentLess:function(rt){return rt.indentSelection("subtract")},insertTab:function(rt){return rt.replaceSelection(" ")},insertSoftTab:function(rt){for(var ct=[],Et=rt.listSelections(),Ct=rt.options.tabSize,Ot=0;Ot<Et.length;Ot++){var te=Et[Ot].from(),me=Yt(rt.getLine(te.line),te.ch,Ct);ct.push(ye(Ct-me%Ct))}rt.replaceSelections(ct)},defaultTab:function(rt){rt.somethingSelected()?rt.indentSelection("add"):rt.execCommand("insertTab")},transposeChars:function(rt){return Xi(rt,function(){for(var ct=rt.listSelections(),Et=[],Ct=0;Ct<ct.length;Ct++)if(ct[Ct].empty()){var Ot=ct[Ct].head,te=Rn(rt.doc,Ot.line).text;if(te){if(Ot.ch==te.length&&(Ot=new en(Ot.line,Ot.ch-1)),Ot.ch>0)Ot=new en(Ot.line,Ot.ch+1),rt.replaceRange(te.charAt(Ot.ch-1)+te.charAt(Ot.ch-2),en(Ot.line,Ot.ch-2),Ot,"+transpose");else if(Ot.line>rt.doc.first){var me=Rn(rt.doc,Ot.line-1).text;me&&(Ot=new en(Ot.line,1),rt.replaceRange(te.charAt(0)+rt.doc.lineSeparator()+me.charAt(me.length-1),en(Ot.line-1,me.length-1),Ot,"+transpose"))}}Et.push(new to(Ot,Ot))}rt.setSelections(Et)})},newlineAndIndent:function(rt){return Xi(rt,function(){for(var ct=rt.listSelections(),Et=ct.length-1;Et>=0;Et--)rt.replaceRange(rt.doc.lineSeparator(),ct[Et].anchor,ct[Et].head,"+input");ct=rt.listSelections();for(var Ct=0;Ct<ct.length;Ct++)rt.indentLine(ct[Ct].from().line,null,!0);fu(rt)})},openLine:function(rt){return rt.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(rt){return rt.toggleOverwrite()}};function bc(rt,ct){var Et=Rn(rt.doc,ct),Ct=mr(Et);return Ct!=Et&&(ct=Oe(Ct)),pf(!0,rt,Ct,ct,1)}function Pc(rt,ct){var Et=Rn(rt.doc,ct),Ct=Vr(Et);return Ct!=Et&&(ct=Oe(Ct)),pf(!0,rt,Et,ct,-1)}function wp(rt,ct){var Et=bc(rt,ct.line),Ct=Rn(rt.doc,Et.line),Ot=Ze(Ct,rt.doc.direction);if(!Ot||Ot[0].level==0){var te=Math.max(Et.ch,Ct.text.search(/\S/)),me=ct.line==Et.line&&ct.ch<=te&&ct.ch;return en(Et.line,me?0:te,Et.sticky)}return Et}function Cc(rt,ct,Et){if(typeof ct=="string"&&(ct=Ju[ct],!ct))return!1;rt.display.input.ensurePolled();var Ct=rt.display.shift,Ot=!1;try{rt.isReadOnly()&&(rt.state.suppressEdits=!0),Et&&(rt.display.shift=!1),Ot=ct(rt)!=be}finally{rt.display.shift=Ct,rt.state.suppressEdits=!1}return Ot}function bp(rt,ct,Et){for(var Ct=0;Ct<rt.state.keyMaps.length;Ct++){var Ot=rl(ct,rt.state.keyMaps[Ct],Et,rt);if(Ot)return Ot}return rt.options.extraKeys&&rl(ct,rt.options.extraKeys,Et,rt)||rl(ct,rt.options.keyMap,Et,rt)}var Xl=new ne;function Fh(rt,ct,Et,Ct){var Ot=rt.state.keySeq;if(Ot){if(wc(ct))return"handled";if(/\'$/.test(ct)?rt.state.keySeq=null:Xl.set(50,function(){rt.state.keySeq==Ot&&(rt.state.keySeq=null,rt.display.input.reset())}),od(rt,Ot+" "+ct,Et,Ct))return!0}return od(rt,ct,Et,Ct)}function od(rt,ct,Et,Ct){var Ot=bp(rt,ct,Ct);return Ot=="multi"&&(rt.state.keySeq=ct),Ot=="handled"&&Br(rt,"keyHandled",rt,ct,Et),(Ot=="handled"||Ot=="multi")&&(Sn(Et),$i(rt)),!!Ot}function ad(rt,ct){var Et=qg(ct,!0);return Et?ct.shiftKey&&!rt.state.keySeq?Fh(rt,"Shift-"+Et,ct,function(Ct){return Cc(rt,Ct,!0)})||Fh(rt,Et,ct,function(Ct){if(typeof Ct=="string"?/^go[A-Z]/.test(Ct):Ct.motion)return Cc(rt,Ct)}):Fh(rt,Et,ct,function(Ct){return Cc(rt,Ct)}):!1}function sd(rt,ct,Et){return Fh(rt,"'"+Et+"'",ct,function(Ct){return Cc(rt,Ct,!0)})}var Dh=null;function Pp(rt){var ct=this;if(!(rt.target&&rt.target!=ct.display.input.getField())&&(ct.curOp.focus=Ut(),!Ve(ct,rt))){Bt&&vt<11&&rt.keyCode==27&&(rt.returnValue=!1);var Et=rt.keyCode;ct.display.shift=Et==16||rt.shiftKey;var Ct=ad(ct,rt);St&&(Dh=Ct?Et:null,!Ct&&Et==88&&!jn&&(at?rt.metaKey:rt.ctrlKey)&&ct.replaceSelection("",null,"cut")),ae&&!at&&!Ct&&Et==46&&rt.shiftKey&&!rt.ctrlKey&&document.execCommand&&document.execCommand("cut"),Et==18&&!/\bCodeMirror-crosshair\b/.test(ct.display.lineDiv.className)&&Cp(ct)}}function Cp(rt){var ct=rt.display.lineDiv;Ht(ct,"CodeMirror-crosshair");function Et(Ct){(Ct.keyCode==18||!Ct.altKey)&&(Dt(ct,"CodeMirror-crosshair"),Ue(document,"keyup",Et),Ue(document,"mouseover",Et))}Qe(document,"keyup",Et),Qe(document,"mouseover",Et)}function kp(rt){rt.keyCode==16&&(this.doc.sel.shift=!1),Ve(this,rt)}function jl(rt){var ct=this;if(!(rt.target&&rt.target!=ct.display.input.getField())&&!(Uo(ct.display,rt)||Ve(ct,rt)||rt.ctrlKey&&!rt.altKey||at&&rt.metaKey)){var Et=rt.keyCode,Ct=rt.charCode;if(St&&Et==Dh){Dh=null,Sn(rt);return}if(!(St&&(!rt.which||rt.which<10)&&ad(ct,rt))){var Ot=String.fromCharCode(Ct==null?Et:Ct);Ot!="\b"&&(sd(ct,rt,Ot)||ct.display.input.onKeyPress(rt))}}}var tm=400,Ep=function(rt,ct,Et){this.time=rt,this.pos=ct,this.button=Et};Ep.prototype.compare=function(rt,ct,Et){return this.time+tm>rt&&Tn(ct,this.pos)==0&&Et==this.button};var kc,Bh;function Mp(rt,ct){var Et=+new Date;return Bh&&Bh.compare(Et,rt,ct)?(kc=Bh=null,"triple"):kc&&kc.compare(Et,rt,ct)?(Bh=new Ep(Et,rt,ct),kc=null,"double"):(kc=new Ep(Et,rt,ct),Bh=null,"single")}function Ol(rt){var ct=this,Et=ct.display;if(!(Ve(ct,rt)||Et.activeTouch&&Et.input.supportsTouch())){if(Et.input.ensurePolled(),Et.shift=rt.shiftKey,Uo(Et,rt)){gt||(Et.scroller.draggable=!1,setTimeout(function(){return Et.scroller.draggable=!0},100));return}if(!hd(ct,rt)){var Ct=$a(ct,rt),Ot=dr(rt),te=Ct?Mp(Ct,Ot):"single";window.focus(),Ot==1&&ct.state.selectingText&&ct.state.selectingText(rt),!(Ct&&Tp(ct,Ot,Ct,te,rt))&&(Ot==1?Ct?em(ct,Ct,te,rt):Er(rt)==Et.scroller&&Sn(rt):Ot==2?(Ct&&td(ct.doc,Ct),setTimeout(function(){return Et.input.focus()},20)):Ot==3&&(Pt?ct.display.input.onContextMenu(rt):Mo(ct)))}}}function Tp(rt,ct,Et,Ct,Ot){var te="Click";return Ct=="double"?te="Double"+te:Ct=="triple"&&(te="Triple"+te),te=(ct==1?"Left":ct==2?"Middle":"Right")+te,Fh(rt,Sp(te,Ot),Ot,function(me){if(typeof me=="string"&&(me=Ju[me]),!me)return!1;var Te=!1;try{rt.isReadOnly()&&(rt.state.suppressEdits=!0),Te=me(rt,Et)!=be}finally{rt.state.suppressEdits=!1}return Te})}function ld(rt,ct,Et){var Ct=rt.getOption("configureMouse"),Ot=Ct?Ct(rt,ct,Et):{};if(Ot.unit==null){var te=it?Et.shiftKey&&Et.metaKey:Et.altKey;Ot.unit=te?"rectangle":ct=="single"?"char":ct=="double"?"word":"line"}return(Ot.extend==null||rt.doc.extend)&&(Ot.extend=rt.doc.extend||Et.shiftKey),Ot.addNew==null&&(Ot.addNew=at?Et.metaKey:Et.ctrlKey),Ot.moveOnDrag==null&&(Ot.moveOnDrag=!(at?Et.altKey:Et.ctrlKey)),Ot}function em(rt,ct,Et,Ct){Bt?setTimeout(ce(vo,rt),0):rt.curOp.focus=Ut();var Ot=ld(rt,Et,Ct),te=rt.doc.sel,me;rt.options.dragDrop&&Mr&&!rt.isReadOnly()&&Et=="single"&&(me=te.contains(ct))>-1&&(Tn((me=te.ranges[me]).from(),ct)<0||ct.xRel>0)&&(Tn(me.to(),ct)>0||ct.xRel<0)?Lp(rt,Ct,ct,Ot):n0(rt,Ct,ct,Ot)}function Lp(rt,ct,Et,Ct){var Ot=rt.display,te=!1,me=sa(rt,function(Ie){gt&&(Ot.scroller.draggable=!1),rt.state.draggingText=!1,Ue(Ot.wrapper.ownerDocument,"mouseup",me),Ue(Ot.wrapper.ownerDocument,"mousemove",Te),Ue(Ot.scroller,"dragstart",ke),Ue(Ot.scroller,"drop",me),te||(Sn(Ie),Ct.addNew||td(rt.doc,Et,null,null,Ct.extend),gt&&!Tt||Bt&&vt==9?setTimeout(function(){Ot.wrapper.ownerDocument.body.focus({preventScroll:!0}),Ot.input.focus()},20):Ot.input.focus())}),Te=function(Ie){te=te||Math.abs(ct.clientX-Ie.clientX)+Math.abs(ct.clientY-Ie.clientY)>=10},ke=function(){return te=!0};gt&&(Ot.scroller.draggable=!0),rt.state.draggingText=me,me.copy=!Ct.moveOnDrag,Ot.scroller.dragDrop&&Ot.scroller.dragDrop(),Qe(Ot.wrapper.ownerDocument,"mouseup",me),Qe(Ot.wrapper.ownerDocument,"mousemove",Te),Qe(Ot.scroller,"dragstart",ke),Qe(Ot.scroller,"drop",me),Mo(rt),setTimeout(function(){return Ot.input.focus()},20)}function Ap(rt,ct,Et){if(Et=="char")return new to(ct,ct);if(Et=="word")return rt.findWordAt(ct);if(Et=="line")return new to(en(ct.line,0),Un(rt.doc,en(ct.line+1,0)));var Ct=Et(rt,ct);return new to(Ct.from,Ct.to)}function n0(rt,ct,Et,Ct){var Ot=rt.display,te=rt.doc;Sn(ct);var me,Te,ke=te.sel,Ie=ke.ranges;if(Ct.addNew&&!Ct.extend?(Te=te.sel.contains(Et),Te>-1?me=Ie[Te]:me=new to(Et,Et)):(me=te.sel.primary(),Te=te.sel.primIndex),Ct.unit=="rectangle")Ct.addNew||(me=new to(Et,Et)),Et=$a(rt,ct,!0,!0),Te=-1;else{var nn=Ap(rt,Et,Ct.unit);Ct.extend?me=qf(me,nn.anchor,nn.head,Ct.extend):me=nn}Ct.addNew?Te==-1?(Te=Ie.length,Ua(te,ml(rt,Ie.concat([me]),Te),{scroll:!1,origin:"*mouse"})):Ie.length>1&&Ie[Te].empty()&&Ct.unit=="char"&&!Ct.extend?(Ua(te,ml(rt,Ie.slice(0,Te).concat(Ie.slice(Te+1)),0),{scroll:!1,origin:"*mouse"}),ke=te.sel):Xu(te,Te,me,pe):(Te=0,Ua(te,new el([me],0),pe),ke=te.sel);var ze=Et;function pn(Fr){if(Tn(ze,Fr)!=0)if(ze=Fr,Ct.unit=="rectangle"){for(var Xr=[],ci=rt.options.tabSize,jr=Yt(Rn(te,Et.line).text,Et.ch,ci),Mi=Yt(Rn(te,Fr.line).text,Fr.ch,ci),Po=Math.min(jr,Mi),ua=Math.max(jr,Mi),Fo=Math.min(Et.line,Fr.line),ps=Math.min(rt.lastLine(),Math.max(Et.line,Fr.line));Fo<=ps;Fo++){var Wa=Rn(te,Fo).text,qo=Ce(Wa,Po,ci);Po==ua?Xr.push(new to(en(Fo,qo),en(Fo,qo))):Wa.length>qo&&Xr.push(new to(en(Fo,qo),en(Fo,Ce(Wa,ua,ci))))}Xr.length||Xr.push(new to(Et,Et)),Ua(te,ml(rt,ke.ranges.slice(0,Te).concat(Xr),Te),{origin:"*mouse",scroll:!1}),rt.scrollIntoView(Fr)}else{var Ts=me,Fa=Ap(rt,Fr,Ct.unit),ta=Ts.anchor,Ki;Tn(Fa.anchor,ta)>0?(Ki=Fa.head,ta=Fn(Ts.from(),Fa.anchor)):(Ki=Fa.anchor,ta=er(Ts.to(),Fa.head));var Ro=ke.ranges.slice(0);Ro[Te]=nm(rt,new to(Un(te,ta),Ki)),Ua(te,ml(rt,Ro,Te),pe)}}var cn=Ot.wrapper.getBoundingClientRect(),Vn=0;function qn(Fr){var Xr=++Vn,ci=$a(rt,Fr,!0,Ct.unit=="rectangle");if(ci)if(Tn(ci,ze)!=0){rt.curOp.focus=Ut(),pn(ci);var jr=Fi(Ot,te);(ci.line>=jr.to||ci.line<jr.from)&&setTimeout(sa(rt,function(){Vn==Xr&&qn(Fr)}),150)}else{var Mi=Fr.clientY<cn.top?-20:Fr.clientY>cn.bottom?20:0;Mi&&setTimeout(sa(rt,function(){Vn==Xr&&(Ot.scroller.scrollTop+=Mi,qn(Fr))}),50)}}function ar(Fr){rt.state.selectingText=!1,Vn=1/0,Fr&&(Sn(Fr),Ot.input.focus()),Ue(Ot.wrapper.ownerDocument,"mousemove",Cr),Ue(Ot.wrapper.ownerDocument,"mouseup",Wr),te.history.lastSelOrigin=null}var Cr=sa(rt,function(Fr){Fr.buttons===0||!dr(Fr)?ar(Fr):qn(Fr)}),Wr=sa(rt,ar);rt.state.selectingText=Wr,Qe(Ot.wrapper.ownerDocument,"mousemove",Cr),Qe(Ot.wrapper.ownerDocument,"mouseup",Wr)}function nm(rt,ct){var Et=ct.anchor,Ct=ct.head,Ot=Rn(rt.doc,Et.line);if(Tn(Et,Ct)==0&&Et.sticky==Ct.sticky)return ct;var te=Ze(Ot);if(!te)return ct;var me=Ae(te,Et.ch,Et.sticky),Te=te[me];if(Te.from!=Et.ch&&Te.to!=Et.ch)return ct;var ke=me+(Te.from==Et.ch==(Te.level!=1)?0:1);if(ke==0||ke==te.length)return ct;var Ie;if(Ct.line!=Et.line)Ie=(Ct.line-Et.line)*(rt.doc.direction=="ltr"?1:-1)>0;else{var nn=Ae(te,Ct.ch,Ct.sticky),ze=nn-me||(Ct.ch-Et.ch)*(Te.level==1?-1:1);nn==ke-1||nn==ke?Ie=ze<0:Ie=ze>0}var pn=te[ke+(Ie?-1:0)],cn=Ie==(pn.level==1),Vn=cn?pn.from:pn.to,qn=cn?"after":"before";return Et.ch==Vn&&Et.sticky==qn?ct:new to(new en(Et.line,Vn,qn),Ct)}function ud(rt,ct,Et,Ct){var Ot,te;if(ct.touches)Ot=ct.touches[0].clientX,te=ct.touches[0].clientY;else try{Ot=ct.clientX,te=ct.clientY}catch(pn){return!1}if(Ot>=Math.floor(rt.display.gutters.getBoundingClientRect().right))return!1;Ct&&Sn(ct);var me=rt.display,Te=me.lineDiv.getBoundingClientRect();if(te>Te.bottom||!an(rt,Et))return Xn(ct);te-=Te.top-me.viewOffset;for(var ke=0;ke<rt.display.gutterSpecs.length;++ke){var Ie=me.gutters.childNodes[ke];if(Ie&&Ie.getBoundingClientRect().right>=Ot){var nn=Ke(rt.doc,te),ze=rt.display.gutterSpecs[ke];return We(rt,Et,rt,nn,ze.className,ct),Xn(ct)}}}function hd(rt,ct){return ud(rt,ct,"gutterClick",!0)}function cd(rt,ct){Uo(rt.display,ct)||rm(rt,ct)||Ve(rt,ct,"contextmenu")||Pt||rt.display.input.onContextMenu(ct)}function rm(rt,ct){return an(rt,"gutterContextMenu")?ud(rt,ct,"gutterContextMenu",!1):!1}function fd(rt){rt.display.wrapper.className=rt.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+rt.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Fu(rt)}var Qu={toString:function(){return"CodeMirror.Init"}},Np={},gf={};function im(rt){var ct=rt.optionHandlers;function Et(Ct,Ot,te,me){rt.defaults[Ct]=Ot,te&&(ct[Ct]=me?function(Te,ke,Ie){Ie!=Qu&&te(Te,ke,Ie)}:te)}rt.defineOption=Et,rt.Init=Qu,Et("value","",function(Ct,Ot){return Ct.setValue(Ot)},!0),Et("mode",null,function(Ct,Ot){Ct.doc.modeOption=Ot,Ei(Ct)},!0),Et("indentUnit",2,Ei,!0),Et("indentWithTabs",!1),Et("smartIndent",!0),Et("tabSize",4,function(Ct){tf(Ct),Fu(Ct),bo(Ct)},!0),Et("lineSeparator",null,function(Ct,Ot){if(Ct.doc.lineSep=Ot,!!Ot){var te=[],me=Ct.doc.first;Ct.doc.iter(function(ke){for(var Ie=0;;){var nn=ke.text.indexOf(Ot,Ie);if(nn==-1)break;Ie=nn+Ot.length,te.push(en(me,nn))}me++});for(var Te=te.length-1;Te>=0;Te--)Ah(Ct.doc,Ot,te[Te],en(te[Te].line,te[Te].ch+Ot.length))}}),Et("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Ct,Ot,te){Ct.state.specialChars=new RegExp(Ot.source+(Ot.test(" ")?"":"| "),"g"),te!=Qu&&Ct.refresh()}),Et("specialCharPlaceholder",ra,function(Ct){return Ct.refresh()},!0),Et("electricChars",!0),Et("inputStyle",tt?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Et("spellcheck",!1,function(Ct,Ot){return Ct.getInputField().spellcheck=Ot},!0),Et("autocorrect",!1,function(Ct,Ot){return Ct.getInputField().autocorrect=Ot},!0),Et("autocapitalize",!1,function(Ct,Ot){return Ct.getInputField().autocapitalize=Ot},!0),Et("rtlMoveVisually",!lt),Et("wholeLineUpdateBefore",!0),Et("theme","default",function(Ct){fd(Ct),_s(Ct)},!0),Et("keyMap","default",function(Ct,Ot,te){var me=Oh(Ot),Te=te!=Qu&&Oh(te);Te&&Te.detach&&Te.detach(Ct,me),me.attach&&me.attach(Ct,Te||null)}),Et("extraKeys",null),Et("configureMouse",null),Et("lineWrapping",!1,om,!0),Et("gutters",[],function(Ct,Ot){Ct.display.gutterSpecs=va(Ot,Ct.options.lineNumbers),_s(Ct)},!0),Et("fixedGutter",!0,function(Ct,Ot){Ct.display.gutters.style.left=Ot?Jc(Ct.display)+"px":"0",Ct.refresh()},!0),Et("coverGutterNextToScrollbar",!1,function(Ct){return Ru(Ct)},!0),Et("scrollbarStyle","native",function(Ct){ip(Ct),Ru(Ct),Ct.display.scrollbars.setScrollTop(Ct.doc.scrollTop),Ct.display.scrollbars.setScrollLeft(Ct.doc.scrollLeft)},!0),Et("lineNumbers",!1,function(Ct,Ot){Ct.display.gutterSpecs=va(Ct.options.gutters,Ot),_s(Ct)},!0),Et("firstLineNumber",1,_s,!0),Et("lineNumberFormatter",function(Ct){return Ct},_s,!0),Et("showCursorWhenSelecting",!1,aa,!0),Et("resetSelectionOnContextMenu",!0),Et("lineWiseCopyCut",!0),Et("pasteLinesPerSelection",!0),Et("selectionsMayTouch",!1),Et("readOnly",!1,function(Ct,Ot){Ot=="nocursor"&&(wh(Ct),Ct.display.input.blur()),Ct.display.input.readOnlyChanged(Ot)}),Et("screenReaderLabel",null,function(Ct,Ot){Ot=Ot===""?null:Ot,Ct.display.input.screenReaderLabelChanged(Ot)}),Et("disableInput",!1,function(Ct,Ot){Ot||Ct.display.input.reset()},!0),Et("dragDrop",!0,dd),Et("allowDropFileTypes",null),Et("cursorBlinkRate",530),Et("cursorScrollMargin",0),Et("cursorHeight",1,aa,!0),Et("singleCursorHeightPerLine",!0,aa,!0),Et("workTime",100),Et("workDelay",100),Et("flattenSpans",!0,tf,!0),Et("addModeClass",!1,tf,!0),Et("pollInterval",100),Et("undoDepth",200,function(Ct,Ot){return Ct.doc.history.undoDepth=Ot}),Et("historyEventDelay",1250),Et("viewportMargin",10,function(Ct){return Ct.refresh()},!0),Et("maxHighlightLength",1e4,tf,!0),Et("moveInputWithCursor",!0,function(Ct,Ot){Ot||Ct.display.input.resetPosition()}),Et("tabindex",null,function(Ct,Ot){return Ct.display.input.getField().tabIndex=Ot||""}),Et("autofocus",null),Et("direction","ltr",function(Ct,Ot){return Ct.doc.setDirection(Ot)},!0),Et("phrases",null)}function dd(rt,ct,Et){var Ct=Et&&Et!=Qu;if(!ct!=!Ct){var Ot=rt.display.dragFunctions,te=ct?Qe:Ue;te(rt.display.scroller,"dragstart",Ot.start),te(rt.display.scroller,"dragenter",Ot.enter),te(rt.display.scroller,"dragover",Ot.over),te(rt.display.scroller,"dragleave",Ot.leave),te(rt.display.scroller,"drop",Ot.drop)}}function om(rt){rt.options.lineWrapping?(Ht(rt.display.wrapper,"CodeMirror-wrap"),rt.display.sizer.style.minWidth="",rt.display.sizerWidth=null):(Dt(rt.display.wrapper,"CodeMirror-wrap"),bi(rt)),ti(rt),bo(rt),Fu(rt),setTimeout(function(){return Ru(rt)},100)}function Wi(rt,ct){var Et=this;if(!(this instanceof Wi))return new Wi(rt,ct);this.options=ct=ct?Pe(ct):{},Pe(Np,ct,!1);var Ct=ct.value;typeof Ct=="string"?Ct=new Oa(Ct,ct.mode,null,ct.lineSeparator,ct.direction):ct.mode&&(Ct.modeOption=ct.mode),this.doc=Ct;var Ot=new Wi.inputStyles[ct.inputStyle](this),te=this.display=new Vu(rt,Ct,Ot,ct);te.wrapper.CodeMirror=this,fd(this),ct.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ip(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 ne,keySeq:null,specialChars:null},ct.autofocus&&!tt&&te.input.focus(),Bt&&vt<11&&setTimeout(function(){return Et.display.input.reset(!0)},20),Ec(this),Gs(),_u(this),this.curOp.forceUpdate=!0,Jf(this,Ct),ct.autofocus&&!tt||this.hasFocus()?setTimeout(function(){Et.hasFocus()&&!Et.state.focused&&Ri(Et)},20):wh(this);for(var me in gf)gf.hasOwnProperty(me)&&gf[me](this,ct[me],Qu);Qo(this),ct.finishInit&&ct.finishInit(this);for(var Te=0;Te<Ih.length;++Te)Ih[Te](this);zu(this),gt&&ct.lineWrapping&&getComputedStyle(te.lineDiv).textRendering=="optimizelegibility"&&(te.lineDiv.style.textRendering="auto")}Wi.defaults=Np,Wi.optionHandlers=gf;function Ec(rt){var ct=rt.display;Qe(ct.scroller,"mousedown",sa(rt,Ol)),Bt&&vt<11?Qe(ct.scroller,"dblclick",sa(rt,function(ke){if(!Ve(rt,ke)){var Ie=$a(rt,ke);if(!(!Ie||hd(rt,ke)||Uo(rt.display,ke))){Sn(ke);var nn=rt.findWordAt(Ie);td(rt.doc,nn.anchor,nn.head)}}})):Qe(ct.scroller,"dblclick",function(ke){return Ve(rt,ke)||Sn(ke)}),Qe(ct.scroller,"contextmenu",function(ke){return cd(rt,ke)}),Qe(ct.input.getField(),"contextmenu",function(ke){ct.scroller.contains(ke.target)||cd(rt,ke)});var Et,Ct={end:0};function Ot(){ct.activeTouch&&(Et=setTimeout(function(){return ct.activeTouch=null},1e3),Ct=ct.activeTouch,Ct.end=+new Date)}function te(ke){if(ke.touches.length!=1)return!1;var Ie=ke.touches[0];return Ie.radiusX<=1&&Ie.radiusY<=1}function me(ke,Ie){if(Ie.left==null)return!0;var nn=Ie.left-ke.left,ze=Ie.top-ke.top;return nn*nn+ze*ze>20*20}Qe(ct.scroller,"touchstart",function(ke){if(!Ve(rt,ke)&&!te(ke)&&!hd(rt,ke)){ct.input.ensurePolled(),clearTimeout(Et);var Ie=+new Date;ct.activeTouch={start:Ie,moved:!1,prev:Ie-Ct.end<=300?Ct:null},ke.touches.length==1&&(ct.activeTouch.left=ke.touches[0].pageX,ct.activeTouch.top=ke.touches[0].pageY)}}),Qe(ct.scroller,"touchmove",function(){ct.activeTouch&&(ct.activeTouch.moved=!0)}),Qe(ct.scroller,"touchend",function(ke){var Ie=ct.activeTouch;if(Ie&&!Uo(ct,ke)&&Ie.left!=null&&!Ie.moved&&new Date-Ie.start<300){var nn=rt.coordsChar(ct.activeTouch,"page"),ze;!Ie.prev||me(Ie,Ie.prev)?ze=new to(nn,nn):!Ie.prev.prev||me(Ie,Ie.prev.prev)?ze=rt.findWordAt(nn):ze=new to(en(nn.line,0),Un(rt.doc,en(nn.line+1,0))),rt.setSelection(ze.anchor,ze.head),rt.focus(),Sn(ke)}Ot()}),Qe(ct.scroller,"touchcancel",Ot),Qe(ct.scroller,"scroll",function(){ct.scroller.clientHeight&&(Ph(rt,ct.scroller.scrollTop),du(rt,ct.scroller.scrollLeft,!0),We(rt,"scroll",rt))}),Qe(ct.scroller,"mousewheel",function(ke){return ya(rt,ke)}),Qe(ct.scroller,"DOMMouseScroll",function(ke){return ya(rt,ke)}),Qe(ct.wrapper,"scroll",function(){return ct.wrapper.scrollTop=ct.wrapper.scrollLeft=0}),ct.dragFunctions={enter:function(ke){Ve(rt,ke)||Yn(ke)},over:function(ke){Ve(rt,ke)||(Jg(rt,ke),Yn(ke))},start:function(ke){return Yg(rt,ke)},drop:sa(rt,pp),leave:function(ke){Ve(rt,ke)||Qg(rt)}};var Te=ct.input.getField();Qe(Te,"keyup",function(ke){return kp.call(rt,ke)}),Qe(Te,"keydown",sa(rt,Pp)),Qe(Te,"keypress",sa(rt,jl)),Qe(Te,"focus",function(ke){return Ri(rt,ke)}),Qe(Te,"blur",function(ke){return wh(rt,ke)})}var Ih=[];Wi.defineInitHook=function(rt){return Ih.push(rt)};function la(rt,ct,Et,Ct){var Ot=rt.doc,te;Et==null&&(Et="add"),Et=="smart"&&(Ot.mode.indent?te=fi(rt,ct).state:Et="prev");var me=rt.options.tabSize,Te=Rn(Ot,ct),ke=Yt(Te.text,null,me);Te.stateAfter&&(Te.stateAfter=null);var Ie=Te.text.match(/^\s*/)[0],nn;if(!Ct&&!/\S/.test(Te.text))nn=0,Et="not";else if(Et=="smart"&&(nn=Ot.mode.indent(te,Te.text.slice(Ie.length),Te.text),nn==be||nn>150)){if(!Ct)return;Et="prev"}Et=="prev"?ct>Ot.first?nn=Yt(Rn(Ot,ct-1).text,null,me):nn=0:Et=="add"?nn=ke+rt.options.indentUnit:Et=="subtract"?nn=ke-rt.options.indentUnit:typeof Et=="number"&&(nn=ke+Et),nn=Math.max(0,nn);var ze="",pn=0;if(rt.options.indentWithTabs)for(var cn=Math.floor(nn/me);cn;--cn)pn+=me,ze+=" ";if(pn<nn&&(ze+=ye(nn-pn)),ze!=Ie)return Ah(Ot,ze,en(ct,0),en(ct,Ie.length),"+input"),Te.stateAfter=null,!0;for(var Vn=0;Vn<Ot.sel.ranges.length;Vn++){var qn=Ot.sel.ranges[Vn];if(qn.head.line==ct&&qn.head.ch<Ie.length){var ar=en(ct,Ie.length);Xu(Ot,Vn,new to(ar,ar));break}}}var ds=null;function Rh(rt){ds=rt}function mf(rt,ct,Et,Ct,Ot){var te=rt.doc;rt.display.shift=!1,Ct||(Ct=te.sel);var me=+new Date-200,Te=Ot=="paste"||rt.state.pasteIncoming>me,ke=zr(ct),Ie=null;if(Te&&Ct.ranges.length>1)if(ds&&ds.text.join(`
|
|
`)==ct){if(Ct.ranges.length%ds.text.length==0){Ie=[];for(var nn=0;nn<ds.text.length;nn++)Ie.push(te.splitLines(ds.text[nn]))}}else ke.length==Ct.ranges.length&&rt.options.pasteLinesPerSelection&&(Ie=xe(ke,function(Cr){return[Cr]}));for(var ze=rt.curOp.updateInput,pn=Ct.ranges.length-1;pn>=0;pn--){var cn=Ct.ranges[pn],Vn=cn.from(),qn=cn.to();cn.empty()&&(Et&&Et>0?Vn=en(Vn.line,Vn.ch-Et):rt.state.overwrite&&!Te?qn=en(qn.line,Math.min(Rn(te,qn.line).text.length,qn.ch+Ne(ke).length)):Te&&ds&&ds.lineWise&&ds.text.join(`
|
|
`)==ke.join(`
|
|
`)&&(Vn=qn=en(Vn.line,0)));var ar={from:Vn,to:qn,text:Ie?Ie[pn%Ie.length]:ke,origin:Ot||(Te?"paste":rt.state.cutIncoming>me?"cut":"+input")};Yu(rt.doc,ar),Br(rt,"inputRead",rt,ar)}ct&&!Te&&Op(rt,ct),fu(rt),rt.curOp.updateInput<2&&(rt.curOp.updateInput=ze),rt.curOp.typing=!0,rt.state.pasteIncoming=rt.state.cutIncoming=-1}function jp(rt,ct){var Et=rt.clipboardData&&rt.clipboardData.getData("Text");if(Et)return rt.preventDefault(),!ct.isReadOnly()&&!ct.options.disableInput&&Xi(ct,function(){return mf(ct,Et,0,null,"paste")}),!0}function Op(rt,ct){if(!(!rt.options.electricChars||!rt.options.smartIndent))for(var Et=rt.doc.sel,Ct=Et.ranges.length-1;Ct>=0;Ct--){var Ot=Et.ranges[Ct];if(!(Ot.head.ch>100||Ct&&Et.ranges[Ct-1].head.line==Ot.head.line)){var te=rt.getModeAt(Ot.head),me=!1;if(te.electricChars){for(var Te=0;Te<te.electricChars.length;Te++)if(ct.indexOf(te.electricChars.charAt(Te))>-1){me=la(rt,Ot.head.line,"smart");break}}else te.electricInput&&te.electricInput.test(Rn(rt.doc,Ot.head.line).text.slice(0,Ot.head.ch))&&(me=la(rt,Ot.head.line,"smart"));me&&Br(rt,"electricInput",rt,Ot.head.line)}}}function Fp(rt){for(var ct=[],Et=[],Ct=0;Ct<rt.doc.sel.ranges.length;Ct++){var Ot=rt.doc.sel.ranges[Ct].head.line,te={anchor:en(Ot,0),head:en(Ot+1,0)};Et.push(te),ct.push(rt.getRange(te.anchor,te.head))}return{text:ct,ranges:Et}}function Dp(rt,ct,Et,Ct){rt.setAttribute("autocorrect",Et?"":"off"),rt.setAttribute("autocapitalize",Ct?"":"off"),rt.setAttribute("spellcheck",!!ct)}function Bp(){var rt=jt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ct=jt("div",[rt],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return gt?rt.style.width="1000px":rt.setAttribute("wrap","off"),ft&&(rt.style.border="1px solid black"),Dp(rt),ct}function $u(rt){var ct=rt.optionHandlers,Et=rt.helpers={};rt.prototype={constructor:rt,focus:function(){window.focus(),this.display.input.focus()},setOption:function(Ct,Ot){var te=this.options,me=te[Ct];te[Ct]==Ot&&Ct!="mode"||(te[Ct]=Ot,ct.hasOwnProperty(Ct)&&sa(this,ct[Ct])(this,Ot,me),We(this,"optionChange",this,Ct))},getOption:function(Ct){return this.options[Ct]},getDoc:function(){return this.doc},addKeyMap:function(Ct,Ot){this.state.keyMaps[Ot?"push":"unshift"](Oh(Ct))},removeKeyMap:function(Ct){for(var Ot=this.state.keyMaps,te=0;te<Ot.length;++te)if(Ot[te]==Ct||Ot[te].name==Ct)return Ot.splice(te,1),!0},addOverlay:pa(function(Ct,Ot){var te=Ct.token?Ct:rt.getMode(this.options,Ct);if(te.startState)throw new Error("Overlays may not be stateful.");re(this.state.overlays,{mode:te,modeSpec:Ct,opaque:Ot&&Ot.opaque,priority:Ot&&Ot.priority||0},function(me){return me.priority}),this.state.modeGen++,bo(this)}),removeOverlay:pa(function(Ct){for(var Ot=this.state.overlays,te=0;te<Ot.length;++te){var me=Ot[te].modeSpec;if(me==Ct||typeof Ct=="string"&&me.name==Ct){Ot.splice(te,1),this.state.modeGen++,bo(this);return}}}),indentLine:pa(function(Ct,Ot,te){typeof Ot!="string"&&typeof Ot!="number"&&(Ot==null?Ot=this.options.smartIndent?"smart":"prev":Ot=Ot?"add":"subtract"),Ln(this.doc,Ct)&&la(this,Ct,Ot,te)}),indentSelection:pa(function(Ct){for(var Ot=this.doc.sel.ranges,te=-1,me=0;me<Ot.length;me++){var Te=Ot[me];if(Te.empty())Te.head.line>te&&(la(this,Te.head.line,Ct,!0),te=Te.head.line,me==this.doc.sel.primIndex&&fu(this));else{var ke=Te.from(),Ie=Te.to(),nn=Math.max(te,ke.line);te=Math.min(this.lastLine(),Ie.line-(Ie.ch?0:1))+1;for(var ze=nn;ze<te;++ze)la(this,ze,Ct);var pn=this.doc.sel.ranges;ke.ch==0&&Ot.length==pn.length&&pn[me].from().ch>0&&Xu(this.doc,me,new to(ke,pn[me].to()),fe)}}}),getTokenAt:function(Ct,Ot){return Zr(this,Ct,Ot)},getLineTokens:function(Ct,Ot){return Zr(this,en(Ct),Ot,!0)},getTokenTypeAt:function(Ct){Ct=Un(this.doc,Ct);var Ot=Yr(this,Rn(this.doc,Ct.line)),te=0,me=(Ot.length-1)/2,Te=Ct.ch,ke;if(Te==0)ke=Ot[2];else for(;;){var Ie=te+me>>1;if((Ie?Ot[Ie*2-1]:0)>=Te)me=Ie;else if(Ot[Ie*2+1]<Te)te=Ie+1;else{ke=Ot[Ie*2+2];break}}var nn=ke?ke.indexOf("overlay "):-1;return nn<0?ke:nn==0?null:ke.slice(0,nn-1)},getModeAt:function(Ct){var Ot=this.doc.mode;return Ot.innerMode?rt.innerMode(Ot,this.getTokenAt(Ct).state).mode:Ot},getHelper:function(Ct,Ot){return this.getHelpers(Ct,Ot)[0]},getHelpers:function(Ct,Ot){var te=[];if(!Et.hasOwnProperty(Ot))return te;var me=Et[Ot],Te=this.getModeAt(Ct);if(typeof Te[Ot]=="string")me[Te[Ot]]&&te.push(me[Te[Ot]]);else if(Te[Ot])for(var ke=0;ke<Te[Ot].length;ke++){var Ie=me[Te[Ot][ke]];Ie&&te.push(Ie)}else Te.helperType&&me[Te.helperType]?te.push(me[Te.helperType]):me[Te.name]&&te.push(me[Te.name]);for(var nn=0;nn<me._global.length;nn++){var ze=me._global[nn];ze.pred(Te,this)&&ve(te,ze.val)==-1&&te.push(ze.val)}return te},getStateAfter:function(Ct,Ot){var te=this.doc;return Ct=Bn(te,Ct==null?te.first+te.size-1:Ct),fi(this,Ct+1,Ot).state},cursorCoords:function(Ct,Ot){var te,me=this.doc.sel.primary();return Ct==null?te=me.head:typeof Ct=="object"?te=Un(this.doc,Ct):te=Ct?me.from():me.to(),mo(this,te,Ot||"page")},charCoords:function(Ct,Ot){return Du(this,Un(this.doc,Ct),Ot||"page")},coordsChar:function(Ct,Ot){return Ct=cc(this,Ct,Ot||"page"),ja(this,Ct.left,Ct.top)},lineAtHeight:function(Ct,Ot){return Ct=cc(this,{top:Ct,left:0},Ot||"page").top,Ke(this.doc,Ct+this.display.viewOffset)},heightAtLine:function(Ct,Ot,te){var me=!1,Te;if(typeof Ct=="number"){var ke=this.doc.first+this.doc.size-1;Ct<this.doc.first?Ct=this.doc.first:Ct>ke&&(Ct=ke,me=!0),Te=Rn(this.doc,Ct)}else Te=Ct;return oa(this,Te,{top:0,left:0},Ot||"page",te||me).top+(me?this.doc.height-Ci(Te):0)},defaultTextHeight:function(){return Qa(this.display)},defaultCharWidth:function(){return gl(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(Ct,Ot,te,me,Te){var ke=this.display;Ct=mo(this,Un(this.doc,Ct));var Ie=Ct.bottom,nn=Ct.left;if(Ot.style.position="absolute",Ot.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Ot),ke.sizer.appendChild(Ot),me=="over")Ie=Ct.top;else if(me=="above"||me=="near"){var ze=Math.max(ke.wrapper.clientHeight,this.doc.height),pn=Math.max(ke.sizer.clientWidth,ke.lineSpace.clientWidth);(me=="above"||Ct.bottom+Ot.offsetHeight>ze)&&Ct.top>Ot.offsetHeight?Ie=Ct.top-Ot.offsetHeight:Ct.bottom+Ot.offsetHeight<=ze&&(Ie=Ct.bottom),nn+Ot.offsetWidth>pn&&(nn=pn-Ot.offsetWidth)}Ot.style.top=Ie+"px",Ot.style.left=Ot.style.right="",Te=="right"?(nn=ke.sizer.clientWidth-Ot.offsetWidth,Ot.style.right="0px"):(Te=="left"?nn=0:Te=="middle"&&(nn=(ke.sizer.clientWidth-Ot.offsetWidth)/2),Ot.style.left=nn+"px"),te&&Qc(this,{left:nn,top:Ie,right:nn+Ot.offsetWidth,bottom:Ie+Ot.offsetHeight})},triggerOnKeyDown:pa(Pp),triggerOnKeyPress:pa(jl),triggerOnKeyUp:kp,triggerOnMouseDown:pa(Ol),execCommand:function(Ct){if(Ju.hasOwnProperty(Ct))return Ju[Ct].call(null,this)},triggerElectric:pa(function(Ct){Op(this,Ct)}),findPosH:function(Ct,Ot,te,me){var Te=1;Ot<0&&(Te=-1,Ot=-Ot);for(var ke=Un(this.doc,Ct),Ie=0;Ie<Ot&&(ke=vf(this.doc,ke,Te,te,me),!ke.hitSide);++Ie);return ke},moveH:pa(function(Ct,Ot){var te=this;this.extendSelectionsBy(function(me){return te.display.shift||te.doc.extend||me.empty()?vf(te.doc,me.head,Ct,Ot,te.options.rtlMoveVisually):Ct<0?me.from():me.to()},he)}),deleteH:pa(function(Ct,Ot){var te=this.doc.sel,me=this.doc;te.somethingSelected()?me.replaceSelection("",null,"+delete"):Ms(this,function(Te){var ke=vf(me,Te.head,Ct,Ot,!1);return Ct<0?{from:ke,to:Te.head}:{from:Te.head,to:ke}})}),findPosV:function(Ct,Ot,te,me){var Te=1,ke=me;Ot<0&&(Te=-1,Ot=-Ot);for(var Ie=Un(this.doc,Ct),nn=0;nn<Ot;++nn){var ze=mo(this,Ie,"div");if(ke==null?ke=ze.left:ze.left=ke,Ie=qu(this,ze,Te,te),Ie.hitSide)break}return Ie},moveV:pa(function(Ct,Ot){var te=this,me=this.doc,Te=[],ke=!this.display.shift&&!me.extend&&me.sel.somethingSelected();if(me.extendSelectionsBy(function(nn){if(ke)return Ct<0?nn.from():nn.to();var ze=mo(te,nn.head,"div");nn.goalColumn!=null&&(ze.left=nn.goalColumn),Te.push(ze.left);var pn=qu(te,ze,Ct,Ot);return Ot=="page"&&nn==me.sel.primary()&&Hf(te,Du(te,pn,"div").top-ze.top),pn},he),Te.length)for(var Ie=0;Ie<me.sel.ranges.length;Ie++)me.sel.ranges[Ie].goalColumn=Te[Ie]}),findWordAt:function(Ct){var Ot=this.doc,te=Rn(Ot,Ct.line).text,me=Ct.ch,Te=Ct.ch;if(te){var ke=this.getHelper(Ct,"wordChars");(Ct.sticky=="before"||Te==te.length)&&me?--me:++Te;for(var Ie=te.charAt(me),nn=ee(Ie,ke)?function(ze){return ee(ze,ke)}:/\s/.test(Ie)?function(ze){return/\s/.test(ze)}:function(ze){return!/\s/.test(ze)&&!ee(ze)};me>0&&nn(te.charAt(me-1));)--me;for(;Te<te.length&&nn(te.charAt(Te));)++Te}return new to(en(Ct.line,me),en(Ct.line,Te))},toggleOverwrite:function(Ct){Ct!=null&&Ct==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ht(this.display.cursorDiv,"CodeMirror-overwrite"):Dt(this.display.cursorDiv,"CodeMirror-overwrite"),We(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ut()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:pa(function(Ct,Ot){bh(this,Ct,Ot)}),getScrollInfo:function(){var Ct=this.display.scroller;return{left:Ct.scrollLeft,top:Ct.scrollTop,height:Ct.scrollHeight-Aa(this)-this.display.barHeight,width:Ct.scrollWidth-Aa(this)-this.display.barWidth,clientHeight:Tl(this),clientWidth:Ps(this)}},scrollIntoView:pa(function(Ct,Ot){Ct==null?(Ct={from:this.doc.sel.primary().head,to:null},Ot==null&&(Ot=this.options.cursorScrollMargin)):typeof Ct=="number"?Ct={from:en(Ct,0),to:null}:Ct.from==null&&(Ct={from:Ct,to:null}),Ct.to||(Ct.to=Ct.from),Ct.margin=Ot||0,Ct.from.line!=null?_i(this,Ct):Vf(this,Ct.from,Ct.to,Ct.margin)}),setSize:pa(function(Ct,Ot){var te=this,me=function(ke){return typeof ke=="number"||/^\d+$/.test(String(ke))?ke+"px":ke};Ct!=null&&(this.display.wrapper.style.width=me(Ct)),Ot!=null&&(this.display.wrapper.style.height=me(Ot)),this.options.lineWrapping&&Ou(this);var Te=this.display.viewFrom;this.doc.iter(Te,this.display.viewTo,function(ke){if(ke.widgets){for(var Ie=0;Ie<ke.widgets.length;Ie++)if(ke.widgets[Ie].noHScroll){ki(te,Te,"widget");break}}++Te}),this.curOp.forceUpdate=!0,We(this,"refresh",this)}),operation:function(Ct){return Xi(this,Ct)},startOperation:function(){return _u(this)},endOperation:function(){return zu(this)},refresh:pa(function(){var Ct=this.display.cachedTextHeight;bo(this),this.curOp.forceUpdate=!0,Fu(this),bh(this,this.doc.scrollLeft,this.doc.scrollTop),Wu(this.display),(Ct==null||Math.abs(Ct-Qa(this.display))>.5||this.options.lineWrapping)&&ti(this),We(this,"refresh",this)}),swapDoc:pa(function(Ct){var Ot=this.doc;return Ot.cm=null,this.state.selectingText&&this.state.selectingText(),Jf(this,Ct),Fu(this),this.display.input.reset(),bh(this,Ct.scrollLeft,Ct.scrollTop),this.curOp.forceScroll=!0,Br(this,"swapDoc",this,Ot),Ot}),phrase:function(Ct){var Ot=this.options.phrases;return Ot&&Object.prototype.hasOwnProperty.call(Ot,Ct)?Ot[Ct]:Ct},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}},ln(rt),rt.registerHelper=function(Ct,Ot,te){Et.hasOwnProperty(Ct)||(Et[Ct]=rt[Ct]={_global:[]}),Et[Ct][Ot]=te},rt.registerGlobalHelper=function(Ct,Ot,te,me){rt.registerHelper(Ct,Ot,me),Et[Ct]._global.push({pred:te,val:me})}}function vf(rt,ct,Et,Ct,Ot){var te=ct,me=Et,Te=Rn(rt,ct.line),ke=Ot&&rt.direction=="rtl"?-Et:Et;function Ie(){var Wr=ct.line+ke;return Wr<rt.first||Wr>=rt.first+rt.size?!1:(ct=new en(Wr,ct.ch,ct.sticky),Te=Rn(rt,Wr))}function nn(Wr){var Fr;if(Ct=="codepoint"){var Xr=Te.text.charCodeAt(ct.ch+(Ct>0?0:-1));isNaN(Xr)?Fr=null:Fr=new en(ct.line,Math.max(0,Math.min(Te.text.length,ct.ch+Et*(Xr>=55296&&Xr<56320?2:1))),-Et)}else Ot?Fr=id(rt.cm,Te,ct,Et):Fr=Ko(Te,ct,Et);if(Fr==null)if(!Wr&&Ie())ct=pf(Ot,rt.cm,Te,ct.line,ke);else return!1;else ct=Fr;return!0}if(Ct=="char"||Ct=="codepoint")nn();else if(Ct=="column")nn(!0);else if(Ct=="word"||Ct=="group")for(var ze=null,pn=Ct=="group",cn=rt.cm&&rt.cm.getHelper(ct,"wordChars"),Vn=!0;!(Et<0&&!nn(!Vn));Vn=!1){var qn=Te.text.charAt(ct.ch)||`
|
|
`,ar=ee(qn,cn)?"w":pn&&qn==`
|
|
`?"n":!pn||/\s/.test(qn)?null:"p";if(pn&&!Vn&&!ar&&(ar="s"),ze&&ze!=ar){Et<0&&(Et=1,nn(),ct.sticky="after");break}if(ar&&(ze=ar),Et>0&&!nn(!Vn))break}var Cr=lf(rt,ct,te,me,!0);return kn(te,Cr)&&(Cr.hitSide=!0),Cr}function qu(rt,ct,Et,Ct){var Ot=rt.doc,te=ct.left,me;if(Ct=="page"){var Te=Math.min(rt.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ke=Math.max(Te-.5*Qa(rt.display),3);me=(Et>0?ct.bottom:ct.top)+Et*ke}else Ct=="line"&&(me=Et>0?ct.bottom+3:ct.top-3);for(var Ie;Ie=ja(rt,te,me),!!Ie.outside;){if(Et<0?me<=0:me>=Ot.height){Ie.hitSide=!0;break}me+=Et*5}return Ie}var uo=function(rt){this.cm=rt,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ne,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};uo.prototype.init=function(rt){var ct=this,Et=this,Ct=Et.cm,Ot=Et.div=rt.lineDiv;Dp(Ot,Ct.options.spellcheck,Ct.options.autocorrect,Ct.options.autocapitalize);function te(Te){for(var ke=Te.target;ke;ke=ke.parentNode){if(ke==Ot)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ke.className))break}return!1}Qe(Ot,"paste",function(Te){!te(Te)||Ve(Ct,Te)||jp(Te,Ct)||vt<=11&&setTimeout(sa(Ct,function(){return ct.updateFromDOM()}),20)}),Qe(Ot,"compositionstart",function(Te){ct.composing={data:Te.data,done:!1}}),Qe(Ot,"compositionupdate",function(Te){ct.composing||(ct.composing={data:Te.data,done:!1})}),Qe(Ot,"compositionend",function(Te){ct.composing&&(Te.data!=ct.composing.data&&ct.readFromDOMSoon(),ct.composing.done=!0)}),Qe(Ot,"touchstart",function(){return Et.forceCompositionEnd()}),Qe(Ot,"input",function(){ct.composing||ct.readFromDOMSoon()});function me(Te){if(!(!te(Te)||Ve(Ct,Te))){if(Ct.somethingSelected())Rh({lineWise:!1,text:Ct.getSelections()}),Te.type=="cut"&&Ct.replaceSelection("",null,"cut");else if(Ct.options.lineWiseCopyCut){var ke=Fp(Ct);Rh({lineWise:!0,text:ke.text}),Te.type=="cut"&&Ct.operation(function(){Ct.setSelections(ke.ranges,0,fe),Ct.replaceSelection("",null,"cut")})}else return;if(Te.clipboardData){Te.clipboardData.clearData();var Ie=ds.text.join(`
|
|
`);if(Te.clipboardData.setData("Text",Ie),Te.clipboardData.getData("Text")==Ie){Te.preventDefault();return}}var nn=Bp(),ze=nn.firstChild;Ct.display.lineSpace.insertBefore(nn,Ct.display.lineSpace.firstChild),ze.value=ds.text.join(`
|
|
`);var pn=document.activeElement;se(ze),setTimeout(function(){Ct.display.lineSpace.removeChild(nn),pn.focus(),pn==Ot&&Et.showPrimarySelection()},50)}}Qe(Ot,"copy",me),Qe(Ot,"cut",me)},uo.prototype.screenReaderLabelChanged=function(rt){rt?this.div.setAttribute("aria-label",rt):this.div.removeAttribute("aria-label")},uo.prototype.prepareSelection=function(){var rt=Bu(this.cm,!1);return rt.focus=document.activeElement==this.div,rt},uo.prototype.showSelection=function(rt,ct){!rt||!this.cm.display.view.length||((rt.focus||ct)&&this.showPrimarySelection(),this.showMultipleSelections(rt))},uo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},uo.prototype.showPrimarySelection=function(){var rt=this.getSelection(),ct=this.cm,Et=ct.doc.sel.primary(),Ct=Et.from(),Ot=Et.to();if(ct.display.viewTo==ct.display.viewFrom||Ct.line>=ct.display.viewTo||Ot.line<ct.display.viewFrom){rt.removeAllRanges();return}var te=yf(ct,rt.anchorNode,rt.anchorOffset),me=yf(ct,rt.focusNode,rt.focusOffset);if(!(te&&!te.bad&&me&&!me.bad&&Tn(Fn(te,me),Ct)==0&&Tn(er(te,me),Ot)==0)){var Te=ct.display.view,ke=Ct.line>=ct.display.viewFrom&&pd(ct,Ct)||{node:Te[0].measure.map[2],offset:0},Ie=Ot.line<ct.display.viewTo&&pd(ct,Ot);if(!Ie){var nn=Te[Te.length-1].measure,ze=nn.maps?nn.maps[nn.maps.length-1]:nn.map;Ie={node:ze[ze.length-1],offset:ze[ze.length-2]-ze[ze.length-3]}}if(!ke||!Ie){rt.removeAllRanges();return}var pn=rt.rangeCount&&rt.getRangeAt(0),cn;try{cn=Wt(ke.node,ke.offset,Ie.offset,Ie.node)}catch(Vn){}cn&&(!ae&&ct.state.focused?(rt.collapse(ke.node,ke.offset),cn.collapsed||(rt.removeAllRanges(),rt.addRange(cn))):(rt.removeAllRanges(),rt.addRange(cn)),pn&&rt.anchorNode==null?rt.addRange(pn):ae&&this.startGracePeriod()),this.rememberSelection()}},uo.prototype.startGracePeriod=function(){var rt=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){rt.gracePeriod=!1,rt.selectionChanged()&&rt.cm.operation(function(){return rt.cm.curOp.selectionChanged=!0})},20)},uo.prototype.showMultipleSelections=function(rt){Nt(this.cm.display.cursorDiv,rt.cursors),Nt(this.cm.display.selectionDiv,rt.selection)},uo.prototype.rememberSelection=function(){var rt=this.getSelection();this.lastAnchorNode=rt.anchorNode,this.lastAnchorOffset=rt.anchorOffset,this.lastFocusNode=rt.focusNode,this.lastFocusOffset=rt.focusOffset},uo.prototype.selectionInEditor=function(){var rt=this.getSelection();if(!rt.rangeCount)return!1;var ct=rt.getRangeAt(0).commonAncestorContainer;return Jt(this.div,ct)},uo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},uo.prototype.blur=function(){this.div.blur()},uo.prototype.getField=function(){return this.div},uo.prototype.supportsTouch=function(){return!0},uo.prototype.receivedFocus=function(){var rt=this;this.selectionInEditor()?this.pollSelection():Xi(this.cm,function(){return rt.cm.curOp.selectionChanged=!0});function ct(){rt.cm.state.focused&&(rt.pollSelection(),rt.polling.set(rt.cm.options.pollInterval,ct))}this.polling.set(this.cm.options.pollInterval,ct)},uo.prototype.selectionChanged=function(){var rt=this.getSelection();return rt.anchorNode!=this.lastAnchorNode||rt.anchorOffset!=this.lastAnchorOffset||rt.focusNode!=this.lastFocusNode||rt.focusOffset!=this.lastFocusOffset},uo.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var rt=this.getSelection(),ct=this.cm;if(z&&bt&&this.cm.display.gutterSpecs.length&&Ip(rt.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Et=yf(ct,rt.anchorNode,rt.anchorOffset),Ct=yf(ct,rt.focusNode,rt.focusOffset);Et&&Ct&&Xi(ct,function(){Ua(ct.doc,pu(Et,Ct),fe),(Et.bad||Ct.bad)&&(ct.curOp.selectionChanged=!0)})}}},uo.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var rt=this.cm,ct=rt.display,Et=rt.doc.sel.primary(),Ct=Et.from(),Ot=Et.to();if(Ct.ch==0&&Ct.line>rt.firstLine()&&(Ct=en(Ct.line-1,Rn(rt.doc,Ct.line-1).length)),Ot.ch==Rn(rt.doc,Ot.line).text.length&&Ot.line<rt.lastLine()&&(Ot=en(Ot.line+1,0)),Ct.line<ct.viewFrom||Ot.line>ct.viewTo-1)return!1;var te,me,Te;Ct.line==ct.viewFrom||(te=Rs(rt,Ct.line))==0?(me=Oe(ct.view[0].line),Te=ct.view[0].node):(me=Oe(ct.view[te].line),Te=ct.view[te-1].node.nextSibling);var ke=Rs(rt,Ot.line),Ie,nn;if(ke==ct.view.length-1?(Ie=ct.viewTo-1,nn=ct.lineDiv.lastChild):(Ie=Oe(ct.view[ke+1].line)-1,nn=ct.view[ke+1].node.previousSibling),!Te)return!1;for(var ze=rt.doc.splitLines(Tc(rt,Te,nn,me,Ie)),pn=vr(rt.doc,en(me,0),en(Ie,Rn(rt.doc,Ie).text.length));ze.length>1&&pn.length>1;)if(Ne(ze)==Ne(pn))ze.pop(),pn.pop(),Ie--;else if(ze[0]==pn[0])ze.shift(),pn.shift(),me++;else break;for(var cn=0,Vn=0,qn=ze[0],ar=pn[0],Cr=Math.min(qn.length,ar.length);cn<Cr&&qn.charCodeAt(cn)==ar.charCodeAt(cn);)++cn;for(var Wr=Ne(ze),Fr=Ne(pn),Xr=Math.min(Wr.length-(ze.length==1?cn:0),Fr.length-(pn.length==1?cn:0));Vn<Xr&&Wr.charCodeAt(Wr.length-Vn-1)==Fr.charCodeAt(Fr.length-Vn-1);)++Vn;if(ze.length==1&&pn.length==1&&me==Ct.line)for(;cn&&cn>Ct.ch&&Wr.charCodeAt(Wr.length-Vn-1)==Fr.charCodeAt(Fr.length-Vn-1);)cn--,Vn++;ze[ze.length-1]=Wr.slice(0,Wr.length-Vn).replace(/^\u200b+/,""),ze[0]=ze[0].slice(cn).replace(/\u200b+$/,"");var ci=en(me,cn),jr=en(Ie,pn.length?Ne(pn).length-Vn:0);if(ze.length>1||ze[0]||Tn(ci,jr))return Ah(rt.doc,ze,ci,jr,"+input"),!0},uo.prototype.ensurePolled=function(){this.forceCompositionEnd()},uo.prototype.reset=function(){this.forceCompositionEnd()},uo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},uo.prototype.readFromDOMSoon=function(){var rt=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(rt.readDOMTimeout=null,rt.composing)if(rt.composing.done)rt.composing=null;else return;rt.updateFromDOM()},80))},uo.prototype.updateFromDOM=function(){var rt=this;(this.cm.isReadOnly()||!this.pollContent())&&Xi(this.cm,function(){return bo(rt.cm)})},uo.prototype.setUneditable=function(rt){rt.contentEditable="false"},uo.prototype.onKeyPress=function(rt){rt.charCode==0||this.composing||(rt.preventDefault(),this.cm.isReadOnly()||sa(this.cm,mf)(this.cm,String.fromCharCode(rt.charCode==null?rt.keyCode:rt.charCode),0))},uo.prototype.readOnlyChanged=function(rt){this.div.contentEditable=String(rt!="nocursor")},uo.prototype.onContextMenu=function(){},uo.prototype.resetPosition=function(){},uo.prototype.needsContentAttribute=!0;function pd(rt,ct){var Et=pl(rt,ct.line);if(!Et||Et.hidden)return null;var Ct=Rn(rt.doc,ct.line),Ot=ju(Et,Ct,ct.line),te=Ze(Ct,rt.doc.direction),me="left";if(te){var Te=Ae(te,ct.ch);me=Te%2?"right":"left"}var ke=uc(Ot.map,ct.ch,me);return ke.offset=ke.collapse=="right"?ke.end:ke.start,ke}function Ip(rt){for(var ct=rt;ct;ct=ct.parentNode)if(/CodeMirror-gutter-wrapper/.test(ct.className))return!0;return!1}function Mc(rt,ct){return ct&&(rt.bad=!0),rt}function Tc(rt,ct,Et,Ct,Ot){var te="",me=!1,Te=rt.doc.lineSeparator(),ke=!1;function Ie(cn){return function(Vn){return Vn.id==cn}}function nn(){me&&(te+=Te,ke&&(te+=Te),me=ke=!1)}function ze(cn){cn&&(nn(),te+=cn)}function pn(cn){if(cn.nodeType==1){var Vn=cn.getAttribute("cm-text");if(Vn){ze(Vn);return}var qn=cn.getAttribute("cm-marker"),ar;if(qn){var Cr=rt.findMarks(en(Ct,0),en(Ot+1,0),Ie(+qn));Cr.length&&(ar=Cr[0].find(0))&&ze(vr(rt.doc,ar.from,ar.to).join(Te));return}if(cn.getAttribute("contenteditable")=="false")return;var Wr=/^(pre|div|p|li|table|br)$/i.test(cn.nodeName);if(!/^br$/i.test(cn.nodeName)&&cn.textContent.length==0)return;Wr&&nn();for(var Fr=0;Fr<cn.childNodes.length;Fr++)pn(cn.childNodes[Fr]);/^(pre|p)$/i.test(cn.nodeName)&&(ke=!0),Wr&&(me=!0)}else cn.nodeType==3&&ze(cn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;pn(ct),ct!=Et;)ct=ct.nextSibling,ke=!1;return te}function yf(rt,ct,Et){var Ct;if(ct==rt.display.lineDiv){if(Ct=rt.display.lineDiv.childNodes[Et],!Ct)return Mc(rt.clipPos(en(rt.display.viewTo-1)),!0);ct=null,Et=0}else for(Ct=ct;;Ct=Ct.parentNode){if(!Ct||Ct==rt.display.lineDiv)return null;if(Ct.parentNode&&Ct.parentNode==rt.display.lineDiv)break}for(var Ot=0;Ot<rt.display.view.length;Ot++){var te=rt.display.view[Ot];if(te.node==Ct)return am(te,ct,Et)}}function am(rt,ct,Et){var Ct=rt.text.firstChild,Ot=!1;if(!ct||!Jt(Ct,ct))return Mc(en(Oe(rt.line),0),!0);if(ct==Ct&&(Ot=!0,ct=Ct.childNodes[Et],Et=0,!ct)){var te=rt.rest?Ne(rt.rest):rt.line;return Mc(en(Oe(te),te.text.length),Ot)}var me=ct.nodeType==3?ct:null,Te=ct;for(!me&&ct.childNodes.length==1&&ct.firstChild.nodeType==3&&(me=ct.firstChild,Et&&(Et=me.nodeValue.length));Te.parentNode!=Ct;)Te=Te.parentNode;var ke=rt.measure,Ie=ke.maps;function nn(ar,Cr,Wr){for(var Fr=-1;Fr<(Ie?Ie.length:0);Fr++)for(var Xr=Fr<0?ke.map:Ie[Fr],ci=0;ci<Xr.length;ci+=3){var jr=Xr[ci+2];if(jr==ar||jr==Cr){var Mi=Oe(Fr<0?rt.line:rt.rest[Fr]),Po=Xr[ci]+Wr;return(Wr<0||jr!=ar)&&(Po=Xr[ci+(Wr?1:0)]),en(Mi,Po)}}}var ze=nn(me,Te,Et);if(ze)return Mc(ze,Ot);for(var pn=Te.nextSibling,cn=me?me.nodeValue.length-Et:0;pn;pn=pn.nextSibling){if(ze=nn(pn,pn.firstChild,0),ze)return Mc(en(ze.line,ze.ch-cn),Ot);cn+=pn.textContent.length}for(var Vn=Te.previousSibling,qn=Et;Vn;Vn=Vn.previousSibling){if(ze=nn(Vn,Vn.firstChild,-1),ze)return Mc(en(ze.line,ze.ch+qn),Ot);qn+=Vn.textContent.length}}var $o=function(rt){this.cm=rt,this.prevInput="",this.pollingFast=!1,this.polling=new ne,this.hasSelection=!1,this.composing=null};$o.prototype.init=function(rt){var ct=this,Et=this,Ct=this.cm;this.createField(rt);var Ot=this.textarea;rt.wrapper.insertBefore(this.wrapper,rt.wrapper.firstChild),ft&&(Ot.style.width="0px"),Qe(Ot,"input",function(){Bt&&vt>=9&&ct.hasSelection&&(ct.hasSelection=null),Et.poll()}),Qe(Ot,"paste",function(me){Ve(Ct,me)||jp(me,Ct)||(Ct.state.pasteIncoming=+new Date,Et.fastPoll())});function te(me){if(!Ve(Ct,me)){if(Ct.somethingSelected())Rh({lineWise:!1,text:Ct.getSelections()});else if(Ct.options.lineWiseCopyCut){var Te=Fp(Ct);Rh({lineWise:!0,text:Te.text}),me.type=="cut"?Ct.setSelections(Te.ranges,null,fe):(Et.prevInput="",Ot.value=Te.text.join(`
|
|
`),se(Ot))}else return;me.type=="cut"&&(Ct.state.cutIncoming=+new Date)}}Qe(Ot,"cut",te),Qe(Ot,"copy",te),Qe(rt.scroller,"paste",function(me){if(!(Uo(rt,me)||Ve(Ct,me))){if(!Ot.dispatchEvent){Ct.state.pasteIncoming=+new Date,Et.focus();return}var Te=new Event("paste");Te.clipboardData=me.clipboardData,Ot.dispatchEvent(Te)}}),Qe(rt.lineSpace,"selectstart",function(me){Uo(rt,me)||Sn(me)}),Qe(Ot,"compositionstart",function(){var me=Ct.getCursor("from");Et.composing&&Et.composing.range.clear(),Et.composing={start:me,range:Ct.markText(me,Ct.getCursor("to"),{className:"CodeMirror-composing"})}}),Qe(Ot,"compositionend",function(){Et.composing&&(Et.poll(),Et.composing.range.clear(),Et.composing=null)})},$o.prototype.createField=function(rt){this.wrapper=Bp(),this.textarea=this.wrapper.firstChild},$o.prototype.screenReaderLabelChanged=function(rt){rt?this.textarea.setAttribute("aria-label",rt):this.textarea.removeAttribute("aria-label")},$o.prototype.prepareSelection=function(){var rt=this.cm,ct=rt.display,Et=rt.doc,Ct=Bu(rt);if(rt.options.moveInputWithCursor){var Ot=mo(rt,Et.sel.primary().head,"div"),te=ct.wrapper.getBoundingClientRect(),me=ct.lineDiv.getBoundingClientRect();Ct.teTop=Math.max(0,Math.min(ct.wrapper.clientHeight-10,Ot.top+me.top-te.top)),Ct.teLeft=Math.max(0,Math.min(ct.wrapper.clientWidth-10,Ot.left+me.left-te.left))}return Ct},$o.prototype.showSelection=function(rt){var ct=this.cm,Et=ct.display;Nt(Et.cursorDiv,rt.cursors),Nt(Et.selectionDiv,rt.selection),rt.teTop!=null&&(this.wrapper.style.top=rt.teTop+"px",this.wrapper.style.left=rt.teLeft+"px")},$o.prototype.reset=function(rt){if(!(this.contextMenuPending||this.composing)){var ct=this.cm;if(ct.somethingSelected()){this.prevInput="";var Et=ct.getSelection();this.textarea.value=Et,ct.state.focused&&se(this.textarea),Bt&&vt>=9&&(this.hasSelection=Et)}else rt||(this.prevInput=this.textarea.value="",Bt&&vt>=9&&(this.hasSelection=null))}},$o.prototype.getField=function(){return this.textarea},$o.prototype.supportsTouch=function(){return!1},$o.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!tt||Ut()!=this.textarea))try{this.textarea.focus()}catch(rt){}},$o.prototype.blur=function(){this.textarea.blur()},$o.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$o.prototype.receivedFocus=function(){this.slowPoll()},$o.prototype.slowPoll=function(){var rt=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){rt.poll(),rt.cm.state.focused&&rt.slowPoll()})},$o.prototype.fastPoll=function(){var rt=!1,ct=this;ct.pollingFast=!0;function Et(){var Ct=ct.poll();!Ct&&!rt?(rt=!0,ct.polling.set(60,Et)):(ct.pollingFast=!1,ct.slowPoll())}ct.polling.set(20,Et)},$o.prototype.poll=function(){var rt=this,ct=this.cm,Et=this.textarea,Ct=this.prevInput;if(this.contextMenuPending||!ct.state.focused||qt(Et)&&!Ct&&!this.composing||ct.isReadOnly()||ct.options.disableInput||ct.state.keySeq)return!1;var Ot=Et.value;if(Ot==Ct&&!ct.somethingSelected())return!1;if(Bt&&vt>=9&&this.hasSelection===Ot||at&&/[\uf700-\uf7ff]/.test(Ot))return ct.display.input.reset(),!1;if(ct.doc.sel==ct.display.selForContextMenu){var te=Ot.charCodeAt(0);if(te==8203&&!Ct&&(Ct="\u200B"),te==8666)return this.reset(),this.cm.execCommand("undo")}for(var me=0,Te=Math.min(Ct.length,Ot.length);me<Te&&Ct.charCodeAt(me)==Ot.charCodeAt(me);)++me;return Xi(ct,function(){mf(ct,Ot.slice(me),Ct.length-me,null,rt.composing?"*compose":null),Ot.length>1e3||Ot.indexOf(`
|
|
`)>-1?Et.value=rt.prevInput="":rt.prevInput=Ot,rt.composing&&(rt.composing.range.clear(),rt.composing.range=ct.markText(rt.composing.start,ct.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$o.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$o.prototype.onKeyPress=function(){Bt&&vt>=9&&(this.hasSelection=null),this.fastPoll()},$o.prototype.onContextMenu=function(rt){var ct=this,Et=ct.cm,Ct=Et.display,Ot=ct.textarea;ct.contextMenuPending&&ct.contextMenuPending();var te=$a(Et,rt),me=Ct.scroller.scrollTop;if(!te||St)return;var Te=Et.options.resetSelectionOnContextMenu;Te&&Et.doc.sel.contains(te)==-1&&sa(Et,Ua)(Et.doc,pu(te),fe);var ke=Ot.style.cssText,Ie=ct.wrapper.style.cssText,nn=ct.wrapper.offsetParent.getBoundingClientRect();ct.wrapper.style.cssText="position: static",Ot.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(rt.clientY-nn.top-5)+"px; left: "+(rt.clientX-nn.left-5)+`px;
|
|
z-index: 1000; background: `+(Bt?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ze;gt&&(ze=window.scrollY),Ct.input.focus(),gt&&window.scrollTo(null,ze),Ct.input.reset(),Et.somethingSelected()||(Ot.value=ct.prevInput=" "),ct.contextMenuPending=cn,Ct.selForContextMenu=Et.doc.sel,clearTimeout(Ct.detectingSelectAll);function pn(){if(Ot.selectionStart!=null){var qn=Et.somethingSelected(),ar="\u200B"+(qn?Ot.value:"");Ot.value="\u21DA",Ot.value=ar,ct.prevInput=qn?"":"\u200B",Ot.selectionStart=1,Ot.selectionEnd=ar.length,Ct.selForContextMenu=Et.doc.sel}}function cn(){if(ct.contextMenuPending==cn&&(ct.contextMenuPending=!1,ct.wrapper.style.cssText=Ie,Ot.style.cssText=ke,Bt&&vt<9&&Ct.scrollbars.setScrollTop(Ct.scroller.scrollTop=me),Ot.selectionStart!=null)){(!Bt||Bt&&vt<9)&&pn();var qn=0,ar=function(){Ct.selForContextMenu==Et.doc.sel&&Ot.selectionStart==0&&Ot.selectionEnd>0&&ct.prevInput=="\u200B"?sa(Et,Vo)(Et):qn++<10?Ct.detectingSelectAll=setTimeout(ar,500):(Ct.selForContextMenu=null,Ct.input.reset())};Ct.detectingSelectAll=setTimeout(ar,200)}}if(Bt&&vt>=9&&pn(),Pt){Yn(rt);var Vn=function(){Ue(window,"mouseup",Vn),setTimeout(cn,20)};Qe(window,"mouseup",Vn)}else setTimeout(cn,50)},$o.prototype.readOnlyChanged=function(rt){rt||this.reset(),this.textarea.disabled=rt=="nocursor",this.textarea.readOnly=!!rt},$o.prototype.setUneditable=function(){},$o.prototype.needsContentAttribute=!1;function sm(rt,ct){if(ct=ct?Pe(ct):{},ct.value=rt.value,!ct.tabindex&&rt.tabIndex&&(ct.tabindex=rt.tabIndex),!ct.placeholder&&rt.placeholder&&(ct.placeholder=rt.placeholder),ct.autofocus==null){var Et=Ut();ct.autofocus=Et==rt||rt.getAttribute("autofocus")!=null&&Et==document.body}function Ct(){rt.value=Te.getValue()}var Ot;if(rt.form&&(Qe(rt.form,"submit",Ct),!ct.leaveSubmitMethodAlone)){var te=rt.form;Ot=te.submit;try{var me=te.submit=function(){Ct(),te.submit=Ot,te.submit(),te.submit=me}}catch(ke){}}ct.finishInit=function(ke){ke.save=Ct,ke.getTextArea=function(){return rt},ke.toTextArea=function(){ke.toTextArea=isNaN,Ct(),rt.parentNode.removeChild(ke.getWrapperElement()),rt.style.display="",rt.form&&(Ue(rt.form,"submit",Ct),!ct.leaveSubmitMethodAlone&&typeof rt.form.submit=="function"&&(rt.form.submit=Ot))}},rt.style.display="none";var Te=Wi(function(ke){return rt.parentNode.insertBefore(ke,rt.nextSibling)},ct);return Te}function Lc(rt){rt.off=Ue,rt.on=Qe,rt.wheelEventPixels=zs,rt.Doc=Oa,rt.splitLines=zr,rt.countColumn=Yt,rt.findColumn=Ce,rt.isWordChar=Xt,rt.Pass=be,rt.signal=We,rt.Line=lo,rt.changeEnd=Ku,rt.scrollbarModel=rp,rt.Pos=en,rt.cmpPos=Tn,rt.modes=Wn,rt.mimeModes=Kn,rt.resolveMode=sn,rt.getMode=qe,rt.modeExtensions=$e,rt.extendMode=un,rt.copyState=or,rt.startState=pr,rt.innerMode=Qn,rt.commands=Ju,rt.keyMap=Es,rt.keyName=qg,rt.isModifierKey=wc,rt.lookupKey=rl,rt.normalizeKeyMap=yp,rt.StringStream=xn,rt.SharedTextMarker=Kl,rt.TextMarker=Je,rt.LineWidget=vu,rt.e_preventDefault=Sn,rt.e_stopPropagation=_n,rt.e_stop=Yn,rt.addClass=Ht,rt.contains=Jt,rt.rmClass=Dt,rt.keyNames=Zl}im(Wi),$u(Wi);var yu="iter insert remove copy getEditor constructor".split(" ");for(var Sf in Oa.prototype)Oa.prototype.hasOwnProperty(Sf)&&ve(yu,Sf)<0&&(Wi.prototype[Sf]=function(rt){return function(){return rt.apply(this.doc,arguments)}}(Oa.prototype[Sf]));return ln(Oa),Wi.inputStyles={textarea:$o,contenteditable:uo},Wi.defineMode=function(rt){!Wi.defaults.mode&&rt!="null"&&(Wi.defaults.mode=rt),ir.apply(this,arguments)},Wi.defineMIME=Ar,Wi.defineMode("null",function(){return{token:function(rt){return rt.skipToEnd()}}}),Wi.defineMIME("text/plain","null"),Wi.defineExtension=function(rt,ct){Wi.prototype[rt]=ct},Wi.defineDocExtension=function(rt,ct){Oa.prototype[rt]=ct},Wi.fromTextArea=sm,Lc(Wi),Wi.version="5.58.2",Wi})},25419:function(dn,fn,le){(function(ae){ae(le(89780),le(15525),le(98101))})(function(ae){"use strict";ae.defineMode("markdown",function(Re,ot){var _t=ae.getMode(Re,"text/html"),Bt=_t.name=="null";function vt(Yt){if(ae.findModeByName){var ne=ae.findModeByName(Yt);ne&&(Yt=ne.mime||ne.mimes[0])}var ve=ae.getMode(Re,Yt);return ve.name=="null"?null:ve}ot.highlightFormatting===void 0&&(ot.highlightFormatting=!1),ot.maxBlockquoteDepth===void 0&&(ot.maxBlockquoteDepth=0),ot.taskLists===void 0&&(ot.taskLists=!1),ot.strikethrough===void 0&&(ot.strikethrough=!1),ot.emoji===void 0&&(ot.emoji=!1),ot.fencedCodeBlockHighlighting===void 0&&(ot.fencedCodeBlockHighlighting=!0),ot.fencedCodeBlockDefaultMode===void 0&&(ot.fencedCodeBlockDefaultMode="text/plain"),ot.xml===void 0&&(ot.xml=!0),ot.tokenTypeOverrides===void 0&&(ot.tokenTypeOverrides={});var gt={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 kt in gt)gt.hasOwnProperty(kt)&&ot.tokenTypeOverrides[kt]&&(gt[kt]=ot.tokenTypeOverrides[kt]);var bt=/^([*\-_])(?:\s*\1){2,}\s*$/,St=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Tt=/^\[(x| )\](?=\s)/i,mt=ot.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,xt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ft=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,tt=/^\s*\[[^\]]+?\]:.*$/,at=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,it=" ";function lt(Yt,ne,ve){return ne.f=ne.inline=ve,ve(Yt,ne)}function ut(Yt,ne,ve){return ne.f=ne.block=ve,ve(Yt,ne)}function dt(Yt){return!Yt||!/\S/.test(Yt.string)}function Pt(Yt){if(Yt.linkTitle=!1,Yt.linkHref=!1,Yt.linkText=!1,Yt.em=!1,Yt.strong=!1,Yt.strikethrough=!1,Yt.quote=0,Yt.indentedCode=!1,Yt.f==Dt){var ne=Bt;if(!ne){var ve=ae.innerMode(_t,Yt.htmlState);ne=ve.mode.name=="xml"&&ve.state.tagStart===null&&!ve.state.context&&ve.state.tokenize.isInText}ne&&(Yt.f=Gt,Yt.block=At,Yt.htmlState=null)}return Yt.trailingSpace=0,Yt.trailingSpaceNewLine=!1,Yt.prevLine=Yt.thisLine,Yt.thisLine={stream:null},null}function At(Yt,ne){var ve=Yt.column()===ne.indentation,Se=dt(ne.prevLine.stream),be=ne.indentedCode,fe=ne.prevLine.hr,pe=ne.list!==!1,he=(ne.listStack[ne.listStack.length-1]||0)+3;ne.indentedCode=!1;var Ce=ne.indentation;if(ne.indentationDiff===null&&(ne.indentationDiff=ne.indentation,pe)){for(ne.list=null;Ce<ne.listStack[ne.listStack.length-1];)ne.listStack.pop(),ne.listStack.length?ne.indentation=ne.listStack[ne.listStack.length-1]:ne.list=!1;ne.list!==!1&&(ne.indentationDiff=Ce-ne.listStack[ne.listStack.length-1])}var de=!Se&&!fe&&!ne.prevLine.header&&(!pe||!be)&&!ne.prevLine.fencedCodeEnd,ye=(ne.list===!1||fe||Se)&&ne.indentation<=he&&Yt.match(bt),Ne=null;if(ne.indentationDiff>=4&&(be||ne.prevLine.fencedCodeEnd||ne.prevLine.header||Se))return Yt.skipToEnd(),ne.indentedCode=!0,gt.code;if(Yt.eatSpace())return null;if(ve&&ne.indentation<=he&&(Ne=Yt.match(mt))&&Ne[1].length<=6)return ne.quote=0,ne.header=Ne[1].length,ne.thisLine.header=!0,ot.highlightFormatting&&(ne.formatting="header"),ne.f=ne.inline,Nt(ne);if(ne.indentation<=he&&Yt.eat(">"))return ne.quote=ve?1:ne.quote+1,ot.highlightFormatting&&(ne.formatting="quote"),Yt.eatSpace(),Nt(ne);if(!ye&&!ne.setext&&ve&&ne.indentation<=he&&(Ne=Yt.match(St))){var xe=Ne[1]?"ol":"ul";return ne.indentation=Ce+Yt.current().length,ne.list=!0,ne.quote=0,ne.listStack.push(ne.indentation),ne.em=!1,ne.strong=!1,ne.code=!1,ne.strikethrough=!1,ot.taskLists&&Yt.match(Tt,!1)&&(ne.taskList=!0),ne.f=ne.inline,ot.highlightFormatting&&(ne.formatting=["list","list-"+xe]),Nt(ne)}else{if(ve&&ne.indentation<=he&&(Ne=Yt.match(z,!0)))return ne.quote=0,ne.fencedEndRE=new RegExp(Ne[1]+"+ *$"),ne.localMode=ot.fencedCodeBlockHighlighting&&vt(Ne[2]||ot.fencedCodeBlockDefaultMode),ne.localMode&&(ne.localState=ae.startState(ne.localMode)),ne.f=ne.block=Ft,ot.highlightFormatting&&(ne.formatting="code-block"),ne.code=-1,Nt(ne);if(ne.setext||(!de||!pe)&&!ne.quote&&ne.list===!1&&!ne.code&&!ye&&!tt.test(Yt.string)&&(Ne=Yt.lookAhead(1))&&(Ne=Ne.match(xt)))return ne.setext?(ne.header=ne.setext,ne.setext=0,Yt.skipToEnd(),ot.highlightFormatting&&(ne.formatting="header")):(ne.header=Ne[0].charAt(0)=="="?1:2,ne.setext=ne.header),ne.thisLine.header=!0,ne.f=ne.inline,Nt(ne);if(ye)return Yt.skipToEnd(),ne.hr=!0,ne.thisLine.hr=!0,gt.hr;if(Yt.peek()==="[")return lt(Yt,ne,oe)}return lt(Yt,ne,ne.inline)}function Dt(Yt,ne){var ve=_t.token(Yt,ne.htmlState);if(!Bt){var Se=ae.innerMode(_t,ne.htmlState);(Se.mode.name=="xml"&&Se.state.tagStart===null&&!Se.state.context&&Se.state.tokenize.isInText||ne.md_inside&&Yt.current().indexOf(">")>-1)&&(ne.f=Gt,ne.block=At,ne.htmlState=null)}return ve}function Ft(Yt,ne){var ve=ne.listStack[ne.listStack.length-1]||0,Se=ne.indentation<ve,be=ve+3;if(ne.fencedEndRE&&ne.indentation<=be&&(Se||Yt.match(ne.fencedEndRE))){ot.highlightFormatting&&(ne.formatting="code-block");var fe;return Se||(fe=Nt(ne)),ne.localMode=ne.localState=null,ne.block=At,ne.f=Gt,ne.fencedEndRE=null,ne.code=0,ne.thisLine.fencedCodeEnd=!0,Se?ut(Yt,ne,ne.block):fe}else return ne.localMode?ne.localMode.token(Yt,ne.localState):(Yt.skipToEnd(),gt.code)}function Nt(Yt){var ne=[];if(Yt.formatting){ne.push(gt.formatting),typeof Yt.formatting=="string"&&(Yt.formatting=[Yt.formatting]);for(var ve=0;ve<Yt.formatting.length;ve++)ne.push(gt.formatting+"-"+Yt.formatting[ve]),Yt.formatting[ve]==="header"&&ne.push(gt.formatting+"-"+Yt.formatting[ve]+"-"+Yt.header),Yt.formatting[ve]==="quote"&&(!ot.maxBlockquoteDepth||ot.maxBlockquoteDepth>=Yt.quote?ne.push(gt.formatting+"-"+Yt.formatting[ve]+"-"+Yt.quote):ne.push("error"))}if(Yt.taskOpen)return ne.push("meta"),ne.length?ne.join(" "):null;if(Yt.taskClosed)return ne.push("property"),ne.length?ne.join(" "):null;if(Yt.linkHref?ne.push(gt.linkHref,"url"):(Yt.strong&&ne.push(gt.strong),Yt.em&&ne.push(gt.em),Yt.strikethrough&&ne.push(gt.strikethrough),Yt.emoji&&ne.push(gt.emoji),Yt.linkText&&ne.push(gt.linkText),Yt.code&&ne.push(gt.code),Yt.image&&ne.push(gt.image),Yt.imageAltText&&ne.push(gt.imageAltText,"link"),Yt.imageMarker&&ne.push(gt.imageMarker)),Yt.header&&ne.push(gt.header,gt.header+"-"+Yt.header),Yt.quote&&(ne.push(gt.quote),!ot.maxBlockquoteDepth||ot.maxBlockquoteDepth>=Yt.quote?ne.push(gt.quote+"-"+Yt.quote):ne.push(gt.quote+"-"+ot.maxBlockquoteDepth)),Yt.list!==!1){var Se=(Yt.listStack.length-1)%3;Se?Se===1?ne.push(gt.list2):ne.push(gt.list3):ne.push(gt.list1)}return Yt.trailingSpaceNewLine?ne.push("trailing-space-new-line"):Yt.trailingSpace&&ne.push("trailing-space-"+(Yt.trailingSpace%2?"a":"b")),ne.length?ne.join(" "):null}function jt(Yt,ne){if(Yt.match(ft,!0))return Nt(ne)}function Gt(Yt,ne){var ve=ne.text(Yt,ne);if(typeof ve!="undefined")return ve;if(ne.list)return ne.list=null,Nt(ne);if(ne.taskList){var Se=Yt.match(Tt,!0)[1]===" ";return Se?ne.taskOpen=!0:ne.taskClosed=!0,ot.highlightFormatting&&(ne.formatting="task"),ne.taskList=!1,Nt(ne)}if(ne.taskOpen=!1,ne.taskClosed=!1,ne.header&&Yt.match(/^#+$/,!0))return ot.highlightFormatting&&(ne.formatting="header"),Nt(ne);var be=Yt.next();if(ne.linkTitle){ne.linkTitle=!1;var fe=be;be==="("&&(fe=")"),fe=(fe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var pe="^\\s*(?:[^"+fe+"\\\\]+|\\\\\\\\|\\\\.)"+fe;if(Yt.match(new RegExp(pe),!0))return gt.linkHref}if(be==="`"){var he=ne.formatting;ot.highlightFormatting&&(ne.formatting="code"),Yt.eatWhile("`");var Ce=Yt.current().length;if(ne.code==0&&(!ne.quote||Ce==1))return ne.code=Ce,Nt(ne);if(Ce==ne.code){var de=Nt(ne);return ne.code=0,de}else return ne.formatting=he,Nt(ne)}else if(ne.code)return Nt(ne);if(be==="\\"&&(Yt.next(),ot.highlightFormatting)){var ye=Nt(ne),Ne=gt.formatting+"-escape";return ye?ye+" "+Ne:Ne}if(be==="!"&&Yt.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ne.imageMarker=!0,ne.image=!0,ot.highlightFormatting&&(ne.formatting="image"),Nt(ne);if(be==="["&&ne.imageMarker&&Yt.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ne.imageMarker=!1,ne.imageAltText=!0,ot.highlightFormatting&&(ne.formatting="image"),Nt(ne);if(be==="]"&&ne.imageAltText){ot.highlightFormatting&&(ne.formatting="image");var ye=Nt(ne);return ne.imageAltText=!1,ne.image=!1,ne.inline=ne.f=Jt,ye}if(be==="["&&!ne.image)return ne.linkText&&Yt.match(/^.*?\]/)||(ne.linkText=!0,ot.highlightFormatting&&(ne.formatting="link")),Nt(ne);if(be==="]"&&ne.linkText){ot.highlightFormatting&&(ne.formatting="link");var ye=Nt(ne);return ne.linkText=!1,ne.inline=ne.f=Yt.match(/\(.*?\)| ?\[.*?\]/,!1)?Jt:Gt,ye}if(be==="<"&&Yt.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ne.f=ne.inline=Wt,ot.highlightFormatting&&(ne.formatting="link");var ye=Nt(ne);return ye?ye+=" ":ye="",ye+gt.linkInline}if(be==="<"&&Yt.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ne.f=ne.inline=Wt,ot.highlightFormatting&&(ne.formatting="link");var ye=Nt(ne);return ye?ye+=" ":ye="",ye+gt.linkEmail}if(ot.xml&&be==="<"&&Yt.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var xe=Yt.string.indexOf(">",Yt.pos);if(xe!=-1){var re=Yt.string.substring(Yt.start,xe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(re)&&(ne.md_inside=!0)}return Yt.backUp(1),ne.htmlState=ae.startState(_t),ut(Yt,ne,Dt)}if(ot.xml&&be==="<"&&Yt.match(/^\/\w*?>/))return ne.md_inside=!1,"tag";if(be==="*"||be==="_"){for(var Kt=1,wt=Yt.pos==1?" ":Yt.string.charAt(Yt.pos-2);Kt<3&&Yt.eat(be);)Kt++;var Lt=Yt.peek()||" ",Xt=!/\s/.test(Lt)&&(!at.test(Lt)||/\s/.test(wt)||at.test(wt)),ee=!/\s/.test(wt)&&(!at.test(wt)||/\s/.test(Lt)||at.test(Lt)),It=null,Rt=null;if(Kt%2&&(!ne.em&&Xt&&(be==="*"||!ee||at.test(wt))?It=!0:ne.em==be&&ee&&(be==="*"||!Xt||at.test(Lt))&&(It=!1)),Kt>1&&(!ne.strong&&Xt&&(be==="*"||!ee||at.test(wt))?Rt=!0:ne.strong==be&&ee&&(be==="*"||!Xt||at.test(Lt))&&(Rt=!1)),Rt!=null||It!=null){ot.highlightFormatting&&(ne.formatting=It==null?"strong":Rt==null?"em":"strong em"),It===!0&&(ne.em=be),Rt===!0&&(ne.strong=be);var de=Nt(ne);return It===!1&&(ne.em=!1),Rt===!1&&(ne.strong=!1),de}}else if(be===" "&&(Yt.eat("*")||Yt.eat("_"))){if(Yt.peek()===" ")return Nt(ne);Yt.backUp(1)}if(ot.strikethrough){if(be==="~"&&Yt.eatWhile(be)){if(ne.strikethrough){ot.highlightFormatting&&(ne.formatting="strikethrough");var de=Nt(ne);return ne.strikethrough=!1,de}else if(Yt.match(/^[^\s]/,!1))return ne.strikethrough=!0,ot.highlightFormatting&&(ne.formatting="strikethrough"),Nt(ne)}else if(be===" "&&Yt.match(/^~~/,!0)){if(Yt.peek()===" ")return Nt(ne);Yt.backUp(2)}}if(ot.emoji&&be===":"&&Yt.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ne.emoji=!0,ot.highlightFormatting&&(ne.formatting="emoji");var Vt=Nt(ne);return ne.emoji=!1,Vt}return be===" "&&(Yt.match(/^ +$/,!1)?ne.trailingSpace++:ne.trailingSpace&&(ne.trailingSpaceNewLine=!0)),Nt(ne)}function Wt(Yt,ne){var ve=Yt.next();if(ve===">"){ne.f=ne.inline=Gt,ot.highlightFormatting&&(ne.formatting="link");var Se=Nt(ne);return Se?Se+=" ":Se="",Se+gt.linkInline}return Yt.match(/^[^>]+/,!0),gt.linkInline}function Jt(Yt,ne){if(Yt.eatSpace())return null;var ve=Yt.next();return ve==="("||ve==="["?(ne.f=ne.inline=Ht(ve==="("?")":"]"),ot.highlightFormatting&&(ne.formatting="link-string"),ne.linkHref=!0,Nt(ne)):"error"}var Ut={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ht(Yt){return function(ne,ve){var Se=ne.next();if(Se===Yt){ve.f=ve.inline=Gt,ot.highlightFormatting&&(ve.formatting="link-string");var be=Nt(ve);return ve.linkHref=!1,be}return ne.match(Ut[Yt]),ve.linkHref=!0,Nt(ve)}}function oe(Yt,ne){return Yt.match(/^([^\]\\]|\\.)*\]:/,!1)?(ne.f=se,Yt.next(),ot.highlightFormatting&&(ne.formatting="link"),ne.linkText=!0,Nt(ne)):lt(Yt,ne,Gt)}function se(Yt,ne){if(Yt.match(/^\]:/,!0)){ne.f=ne.inline=ce,ot.highlightFormatting&&(ne.formatting="link");var ve=Nt(ne);return ne.linkText=!1,ve}return Yt.match(/^([^\]\\]|\\.)+/,!0),gt.linkText}function ce(Yt,ne){return Yt.eatSpace()?null:(Yt.match(/^[^\s]+/,!0),Yt.peek()===void 0?ne.linkTitle=!0:Yt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ne.f=ne.inline=Gt,gt.linkHref+" url")}var Pe={startState:function(){return{f:At,prevLine:{stream:null},thisLine:{stream:null},block:At,htmlState:null,indentation:0,inline:Gt,text:jt,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(Yt){return{f:Yt.f,prevLine:Yt.prevLine,thisLine:Yt.thisLine,block:Yt.block,htmlState:Yt.htmlState&&ae.copyState(_t,Yt.htmlState),indentation:Yt.indentation,localMode:Yt.localMode,localState:Yt.localMode?ae.copyState(Yt.localMode,Yt.localState):null,inline:Yt.inline,text:Yt.text,formatting:!1,linkText:Yt.linkText,linkTitle:Yt.linkTitle,linkHref:Yt.linkHref,code:Yt.code,em:Yt.em,strong:Yt.strong,strikethrough:Yt.strikethrough,emoji:Yt.emoji,header:Yt.header,setext:Yt.setext,hr:Yt.hr,taskList:Yt.taskList,list:Yt.list,listStack:Yt.listStack.slice(0),quote:Yt.quote,indentedCode:Yt.indentedCode,trailingSpace:Yt.trailingSpace,trailingSpaceNewLine:Yt.trailingSpaceNewLine,md_inside:Yt.md_inside,fencedEndRE:Yt.fencedEndRE}},token:function(Yt,ne){if(ne.formatting=!1,Yt!=ne.thisLine.stream){if(ne.header=0,ne.hr=!1,Yt.match(/^\s*$/,!0))return Pt(ne),null;if(ne.prevLine=ne.thisLine,ne.thisLine={stream:Yt},ne.taskList=!1,ne.trailingSpace=0,ne.trailingSpaceNewLine=!1,!ne.localState&&(ne.f=ne.block,ne.f!=Dt)){var ve=Yt.match(/^\s*/,!0)[0].replace(/\t/g,it).length;if(ne.indentation=ve,ne.indentationDiff=null,ve>0)return null}}return ne.f(Yt,ne)},innerMode:function(Yt){return Yt.block==Dt?{state:Yt.htmlState,mode:_t}:Yt.localState?{state:Yt.localState,mode:Yt.localMode}:{state:Yt,mode:Pe}},indent:function(Yt,ne,ve){return Yt.block==Dt&&_t.indent?_t.indent(Yt.htmlState,ne,ve):Yt.localState&&Yt.localMode.indent?Yt.localMode.indent(Yt.localState,ne,ve):ae.Pass},blankLine:Pt,getType:Nt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Pe},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},98101:function(dn,fn,le){(function(ae){ae(le(89780))})(function(ae){"use strict";ae.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 Re=0;Re<ae.modeInfo.length;Re++){var ot=ae.modeInfo[Re];ot.mimes&&(ot.mime=ot.mimes[0])}ae.findModeByMIME=function(_t){_t=_t.toLowerCase();for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.mime==_t)return vt;if(vt.mimes){for(var gt=0;gt<vt.mimes.length;gt++)if(vt.mimes[gt]==_t)return vt}}if(/\+xml$/.test(_t))return ae.findModeByMIME("application/xml");if(/\+json$/.test(_t))return ae.findModeByMIME("application/json")},ae.findModeByExtension=function(_t){_t=_t.toLowerCase();for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.ext){for(var gt=0;gt<vt.ext.length;gt++)if(vt.ext[gt]==_t)return vt}}},ae.findModeByFileName=function(_t){for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.file&&vt.file.test(_t))return vt}var gt=_t.lastIndexOf("."),kt=gt>-1&&_t.substring(gt+1,_t.length);if(kt)return ae.findModeByExtension(kt)},ae.findModeByName=function(_t){_t=_t.toLowerCase();for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.name.toLowerCase()==_t)return vt;if(vt.alias){for(var gt=0;gt<vt.alias.length;gt++)if(vt.alias[gt].toLowerCase()==_t)return vt}}}})},67549:function(dn,fn,le){(function(ae){ae(le(89780))})(function(ae){"use strict";ae.defineMode("stex",function(Re,ot){"use strict";function _t(ft,z){ft.cmdState.push(z)}function Bt(ft){return ft.cmdState.length>0?ft.cmdState[ft.cmdState.length-1]:null}function vt(ft){var z=ft.cmdState.pop();z&&z.closeBracket()}function gt(ft){for(var z=ft.cmdState,tt=z.length-1;tt>=0;tt--){var at=z[tt];if(at.name!="DEFAULT")return at}return{styleIdentifier:function(){return null}}}function kt(ft,z,tt){return function(){this.name=ft,this.bracketNo=0,this.style=z,this.styles=tt,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var bt={};bt.importmodule=kt("importmodule","tag",["string","builtin"]),bt.documentclass=kt("documentclass","tag",["","atom"]),bt.usepackage=kt("usepackage","tag",["atom"]),bt.begin=kt("begin","tag",["atom"]),bt.end=kt("end","tag",["atom"]),bt.label=kt("label","tag",["atom"]),bt.ref=kt("ref","tag",["atom"]),bt.eqref=kt("eqref","tag",["atom"]),bt.cite=kt("cite","tag",["atom"]),bt.bibitem=kt("bibitem","tag",["atom"]),bt.Bibitem=kt("Bibitem","tag",["atom"]),bt.RBibitem=kt("RBibitem","tag",["atom"]),bt.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function St(ft,z){ft.f=z}function Tt(ft,z){var tt;if(ft.match(/^\\[a-zA-Z@]+/)){var at=ft.current().slice(1);return tt=bt.hasOwnProperty(at)?bt[at]:bt.DEFAULT,tt=new tt,_t(z,tt),St(z,xt),tt.style}if(ft.match(/^\\[$&%#{}_]/)||ft.match(/^\\[,;!\/\\]/))return"tag";if(ft.match("\\["))return St(z,function(lt,ut){return mt(lt,ut,"\\]")}),"keyword";if(ft.match("\\("))return St(z,function(lt,ut){return mt(lt,ut,"\\)")}),"keyword";if(ft.match("$$"))return St(z,function(lt,ut){return mt(lt,ut,"$$")}),"keyword";if(ft.match("$"))return St(z,function(lt,ut){return mt(lt,ut,"$")}),"keyword";var it=ft.next();if(it=="%")return ft.skipToEnd(),"comment";if(it=="}"||it=="]"){if(tt=Bt(z),tt)tt.closeBracket(it),St(z,xt);else return"error";return"bracket"}else return it=="{"||it=="["?(tt=bt.DEFAULT,tt=new tt,_t(z,tt),"bracket"):/\d/.test(it)?(ft.eatWhile(/[\w.%]/),"atom"):(ft.eatWhile(/[\w\-_]/),tt=gt(z),tt.name=="begin"&&(tt.argument=ft.current()),tt.styleIdentifier())}function mt(ft,z,tt){if(ft.eatSpace())return null;if(tt&&ft.match(tt))return St(z,Tt),"keyword";if(ft.match(/^\\[a-zA-Z@]+/))return"tag";if(ft.match(/^[a-zA-Z]+/))return"variable-2";if(ft.match(/^\\[$&%#{}_]/)||ft.match(/^\\[,;!\/]/)||ft.match(/^[\^_&]/))return"tag";if(ft.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ft.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var at=ft.next();return at=="{"||at=="}"||at=="["||at=="]"||at=="("||at==")"?"bracket":at=="%"?(ft.skipToEnd(),"comment"):"error"}function xt(ft,z){var tt=ft.peek(),at;return tt=="{"||tt=="["?(at=Bt(z),at.openBracket(tt),ft.eat(tt),St(z,Tt),"bracket"):/[ \t\r]/.test(tt)?(ft.eat(tt),null):(St(z,Tt),vt(z),Tt(ft,z))}return{startState:function(){var ft=ot.inMathMode?function(z,tt){return mt(z,tt)}:Tt;return{cmdState:[],f:ft}},copyState:function(ft){return{cmdState:ft.cmdState.slice(),f:ft.f}},token:function(ft,z){return z.f(ft,z)},blankLine:function(ft){ft.f=Tt,ft.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},15525:function(dn,fn,le){(function(ae){ae(le(89780))})(function(ae){"use strict";var Re={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},ot={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ae.defineMode("xml",function(_t,Bt){var vt=_t.indentUnit,gt={},kt=Bt.htmlMode?Re:ot;for(var bt in kt)gt[bt]=kt[bt];for(var bt in Bt)gt[bt]=Bt[bt];var St,Tt;function mt(Wt,Jt){function Ut(se){return Jt.tokenize=se,se(Wt,Jt)}var Ht=Wt.next();if(Ht=="<")return Wt.eat("!")?Wt.eat("[")?Wt.match("CDATA[")?Ut(z("atom","]]>")):null:Wt.match("--")?Ut(z("comment","-->")):Wt.match("DOCTYPE",!0,!0)?(Wt.eatWhile(/[\w\._\-]/),Ut(tt(1))):null:Wt.eat("?")?(Wt.eatWhile(/[\w\._\-]/),Jt.tokenize=z("meta","?>"),"meta"):(St=Wt.eat("/")?"closeTag":"openTag",Jt.tokenize=xt,"tag bracket");if(Ht=="&"){var oe;return Wt.eat("#")?Wt.eat("x")?oe=Wt.eatWhile(/[a-fA-F\d]/)&&Wt.eat(";"):oe=Wt.eatWhile(/[\d]/)&&Wt.eat(";"):oe=Wt.eatWhile(/[\w\.\-:]/)&&Wt.eat(";"),oe?"atom":"error"}else return Wt.eatWhile(/[^&<]/),null}mt.isInText=!0;function xt(Wt,Jt){var Ut=Wt.next();if(Ut==">"||Ut=="/"&&Wt.eat(">"))return Jt.tokenize=mt,St=Ut==">"?"endTag":"selfcloseTag","tag bracket";if(Ut=="=")return St="equals",null;if(Ut=="<"){Jt.tokenize=mt,Jt.state=ut,Jt.tagName=Jt.tagStart=null;var Ht=Jt.tokenize(Wt,Jt);return Ht?Ht+" tag error":"tag error"}else return/[\'\"]/.test(Ut)?(Jt.tokenize=ft(Ut),Jt.stringStartCol=Wt.column(),Jt.tokenize(Wt,Jt)):(Wt.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ft(Wt){var Jt=function(Ut,Ht){for(;!Ut.eol();)if(Ut.next()==Wt){Ht.tokenize=xt;break}return"string"};return Jt.isInAttribute=!0,Jt}function z(Wt,Jt){return function(Ut,Ht){for(;!Ut.eol();){if(Ut.match(Jt)){Ht.tokenize=mt;break}Ut.next()}return Wt}}function tt(Wt){return function(Jt,Ut){for(var Ht;(Ht=Jt.next())!=null;){if(Ht=="<")return Ut.tokenize=tt(Wt+1),Ut.tokenize(Jt,Ut);if(Ht==">")if(Wt==1){Ut.tokenize=mt;break}else return Ut.tokenize=tt(Wt-1),Ut.tokenize(Jt,Ut)}return"meta"}}function at(Wt,Jt,Ut){this.prev=Wt.context,this.tagName=Jt,this.indent=Wt.indented,this.startOfLine=Ut,(gt.doNotIndent.hasOwnProperty(Jt)||Wt.context&&Wt.context.noIndent)&&(this.noIndent=!0)}function it(Wt){Wt.context&&(Wt.context=Wt.context.prev)}function lt(Wt,Jt){for(var Ut;;){if(!Wt.context||(Ut=Wt.context.tagName,!gt.contextGrabbers.hasOwnProperty(Ut)||!gt.contextGrabbers[Ut].hasOwnProperty(Jt)))return;it(Wt)}}function ut(Wt,Jt,Ut){return Wt=="openTag"?(Ut.tagStart=Jt.column(),dt):Wt=="closeTag"?Pt:ut}function dt(Wt,Jt,Ut){return Wt=="word"?(Ut.tagName=Jt.current(),Tt="tag",Ft):gt.allowMissingTagName&&Wt=="endTag"?(Tt="tag bracket",Ft(Wt,Jt,Ut)):(Tt="error",dt)}function Pt(Wt,Jt,Ut){if(Wt=="word"){var Ht=Jt.current();return Ut.context&&Ut.context.tagName!=Ht&>.implicitlyClosed.hasOwnProperty(Ut.context.tagName)&&it(Ut),Ut.context&&Ut.context.tagName==Ht||gt.matchClosing===!1?(Tt="tag",At):(Tt="tag error",Dt)}else return gt.allowMissingTagName&&Wt=="endTag"?(Tt="tag bracket",At(Wt,Jt,Ut)):(Tt="error",Dt)}function At(Wt,Jt,Ut){return Wt!="endTag"?(Tt="error",At):(it(Ut),ut)}function Dt(Wt,Jt,Ut){return Tt="error",At(Wt,Jt,Ut)}function Ft(Wt,Jt,Ut){if(Wt=="word")return Tt="attribute",Nt;if(Wt=="endTag"||Wt=="selfcloseTag"){var Ht=Ut.tagName,oe=Ut.tagStart;return Ut.tagName=Ut.tagStart=null,Wt=="selfcloseTag"||gt.autoSelfClosers.hasOwnProperty(Ht)?lt(Ut,Ht):(lt(Ut,Ht),Ut.context=new at(Ut,Ht,oe==Ut.indented)),ut}return Tt="error",Ft}function Nt(Wt,Jt,Ut){return Wt=="equals"?jt:(gt.allowMissing||(Tt="error"),Ft(Wt,Jt,Ut))}function jt(Wt,Jt,Ut){return Wt=="string"?Gt:Wt=="word"&>.allowUnquoted?(Tt="string",Ft):(Tt="error",Ft(Wt,Jt,Ut))}function Gt(Wt,Jt,Ut){return Wt=="string"?Gt:Ft(Wt,Jt,Ut)}return{startState:function(Wt){var Jt={tokenize:mt,state:ut,indented:Wt||0,tagName:null,tagStart:null,context:null};return Wt!=null&&(Jt.baseIndent=Wt),Jt},token:function(Wt,Jt){if(!Jt.tagName&&Wt.sol()&&(Jt.indented=Wt.indentation()),Wt.eatSpace())return null;St=null;var Ut=Jt.tokenize(Wt,Jt);return(Ut||St)&&Ut!="comment"&&(Tt=null,Jt.state=Jt.state(St||Ut,Wt,Jt),Tt&&(Ut=Tt=="error"?Ut+" error":Tt)),Ut},indent:function(Wt,Jt,Ut){var Ht=Wt.context;if(Wt.tokenize.isInAttribute)return Wt.tagStart==Wt.indented?Wt.stringStartCol+1:Wt.indented+vt;if(Ht&&Ht.noIndent)return ae.Pass;if(Wt.tokenize!=xt&&Wt.tokenize!=mt)return Ut?Ut.match(/^(\s*)/)[0].length:0;if(Wt.tagName)return gt.multilineTagIndentPastTag!==!1?Wt.tagStart+Wt.tagName.length+2:Wt.tagStart+vt*(gt.multilineTagIndentFactor||1);if(gt.alignCDATA&&/<!\[CDATA\[/.test(Jt))return 0;var oe=Jt&&/^<(\/)?([\w_:\.-]*)/.exec(Jt);if(oe&&oe[1])for(;Ht;)if(Ht.tagName==oe[2]){Ht=Ht.prev;break}else if(gt.implicitlyClosed.hasOwnProperty(Ht.tagName))Ht=Ht.prev;else break;else if(oe)for(;Ht;){var se=gt.contextGrabbers[Ht.tagName];if(se&&se.hasOwnProperty(oe[2]))Ht=Ht.prev;else break}for(;Ht&&Ht.prev&&!Ht.startOfLine;)Ht=Ht.prev;return Ht?Ht.indent+vt:Wt.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:gt.htmlMode?"html":"xml",helperType:gt.htmlMode?"html":"xml",skipAttribute:function(Wt){Wt.state==jt&&(Wt.state=Ft)},xmlCurrentTag:function(Wt){return Wt.tagName?{name:Wt.tagName,close:Wt.type=="closeTag"}:null},xmlCurrentContext:function(Wt){for(var Jt=[],Ut=Wt.context;Ut;Ut=Ut.prev)Ut.tagName&&Jt.push(Ut.tagName);return Jt.reverse()}}}),ae.defineMIME("text/xml","xml"),ae.defineMIME("application/xml","xml"),ae.mimeModes.hasOwnProperty("text/html")||ae.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(dn,fn,le){"use strict";le.d(fn,{$u:function(){return bt},BD:function(){return Kt},E9:function(){return kt},FF:function(){return Tr},FJ:function(){return ut},Hn:function(){return lt},KX:function(){return Pt},NB:function(){return ge},S0:function(){return Ne},UL:function(){return St},Vk:function(){return it},Vm:function(){return Ae},YI:function(){return xe},ZA:function(){return ot},Zt:function(){return Tt},al:function(){return It},bn:function(){return ee},bx:function(){return wt},g2:function(){return re},h1:function(){return jt},hD:function(){return ln},l4:function(){return vt},rU:function(){return Me},s_:function(){return Lt},uz:function(){return ue},z6:function(){return mt}}),dn=le.hmd(dn),function(){var qt;function jn(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Jn(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:jn(a)}}function zn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Wn=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Kn;if(typeof Object.setPrototypeOf=="function")Kn=Object.setPrototypeOf;else{var ir;t:{var Ar={a:!0},sn={};try{sn.__proto__=Ar,ir=sn.a;break t}catch(a){}ir=!1}Kn=ir?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var qe=Kn;function $e(a,y){if(a.prototype=Wn(y.prototype),a.prototype.constructor=a,qe)qe(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 un=typeof le.g!="undefined"&&le.g!=null?le.g:self,or=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},Qn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function pr(a,y){if(y){var x=un;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&&Qn(x,a,{writable:!0,value:y})}}pr("Object.assign",function(a){return a||or}),pr("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 le.g=="object"&&le.g.global===le.g&&le.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 Rn(){}function vr(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&xn.clearTimeout(x),x=Nr(function(){x=-1,a.apply(b,E)},y)}}function Nr(a,y){return xn.setTimeout(a,y)}function Nn(a){return xn.document.createElement(a)}function Oe(a){throw Error(a)}function Ke(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Oe(a)}function Ln(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),Oe(x+" is not in the range "+y+": "+a)}function An(a){xn.console&&xn.console.log(a)}function en(a){return typeof a=="object"&&a!==null}function Tn(a){return Array.isArray(a)||xn.NodeList&&a instanceof xn.NodeList||xn.HTMLCollection&&a instanceof xn.HTMLCollection}function kn(a){return Array.prototype.slice.call(a)}function On(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Oe("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function er(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Oe("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Fn(){var a=fi.pop();return a===void 0?[]:a}function Bn(a){a.length=0,fi.push(a)}function Un(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(en(a)&&a.constructor)return Un(a.constructor);return typeof a}function cr(a){var y=a;return en(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 lr(a,y){if(a.hasOwnProperty(y))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(y))return!0;var x=a.CA;if(x&&x[y])return!0;a=Object.getPrototypeOf(a)}return!1}function yn(a,y,x){Object.defineProperty(Fi.prototype,a,{get:y,set:x})}function In(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 et="",nt=0;nt<a.length;nt++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,et+=String.fromCharCode(a.charCodeAt(nt)^y[(y[x]+y[b])%256]);return et.indexOf("GoJS 2.1 evaluation")>-1||et.indexOf("\xA9 1998-2021 Northwoods Software")>-1||et.indexOf("Not for distribution or production use")>-1||et.indexOf("gojs.net")>-1?"":et}var Gr=xn.navigator!==void 0&&0<xn.navigator.userAgent.indexOf("Trident/7"),Yr=xn.navigator!==void 0&&xn.navigator.platform!==void 0&&xn.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,fi=[];Object.freeze([]),Rn.className="Util",Rn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Rn.adym="gojs.net",Rn.vfo="28e645fdb266",Rn.className="Util";function tn(a,y,x){oi(this),this.j=a,this.xa=y,this.o=x}tn.prototype.toString=function(){return"EnumValue."+this.xa};function tr(a,y){return y==null||y===""?null:a[y]}un.Object.defineProperties(tn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),tn.className="EnumValue";function gr(){this.ew=[]}gr.prototype.toString=function(){return this.ew.join("")},gr.prototype.add=function(a){a!==""&&this.ew.push(a)},gr.className="StringBuilder";function Hn(){}Hn.className="PropertyCollection";var Zr={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 et=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);et.get!==void 0&&et.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(nt,st){return function(){throw Error("Property "+nt.Zl[st.Tj]+" of "+nt.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Ir(){}Ir.prototype.reset=function(){},Ir.prototype.next=function(){return!1},Ir.prototype.Ad=function(){return!1},Ir.prototype.first=function(){return null},Ir.prototype.any=function(){return!1},Ir.prototype.all=function(){return!0},Ir.prototype.each=function(){return this},Ir.prototype.map=function(){return this},Ir.prototype.filter=function(){return this},Ir.prototype.de=function(){},Ir.prototype.toString=function(){return"EmptyIterator"},un.Object.defineProperties(Ir.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Ir.prototype.first=Ir.prototype.first,Ir.prototype.hasNext=Ir.prototype.Ad,Ir.prototype.next=Ir.prototype.next,Ir.prototype.reset=Ir.prototype.reset;var Hr=null;Ir.className="EmptyIterator",Hr=new Ir;function Qr(a){this.key=-1,this.value=a}Qr.prototype.reset=function(){this.key=-1},Qr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Qr.prototype.Ad=function(){return this.next()},Qr.prototype.first=function(){return this.key=0,this.value},Qr.prototype.any=function(a){return this.key=-1,a(this.value)},Qr.prototype.all=function(a){return this.key=-1,a(this.value)},Qr.prototype.each=function(a){return this.key=-1,a(this.value),this},Qr.prototype.map=function(a){return new Qr(a(this.value))},Qr.prototype.filter=function(a){return a(this.value)?new Qr(this.value):Hr},Qr.prototype.de=function(){this.value=null},Qr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},un.Object.defineProperties(Qr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Qr.prototype.first=Qr.prototype.first,Qr.prototype.hasNext=Qr.prototype.Ad,Qr.prototype.next=Qr.prototype.next,Qr.prototype.reset=Qr.prototype.reset,Qr.className="SingletonIterator";function ei(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}ei.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},ei.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},ei.prototype.Ad=function(){return this.next()},ei.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},ei.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 et=y[E];if((b===null||b(et))&&a(et))return!0}return!1},ei.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 et=y[E];if((b===null||b(et))&&!a(et))return!1}return!0},ei.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 et=y[E];(b===null||b(et))&&a(et)}return this},ei.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,et=0;et<b;et++){var nt=y[et];(E===null||E(nt))&&x.push(a(nt))}return a=new mn,a.s=x,a.xb(),a.iterator},ei.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,et=0;et<b;et++){var nt=y[et];(E===null||E(nt))&&a(nt)&&x.push(nt)}return a=new mn,a.s=x,a.xb(),a.iterator},ei.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},ei.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},un.Object.defineProperties(ei.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}}}),ei.prototype.first=ei.prototype.first,ei.prototype.hasNext=ei.prototype.Ad,ei.prototype.next=ei.prototype.next,ei.prototype.reset=ei.prototype.reset,ei.className="ListIterator";function hi(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}hi.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},hi.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)},hi.prototype.Ad=function(){return this.next()},hi.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},hi.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},hi.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},hi.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},hi.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 mn,a.s=x,a.xb(),a.iterator},hi.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 mn,a.s=x,a.xb(),a.iterator},hi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},hi.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},un.Object.defineProperties(hi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),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="ListIteratorBackwards";function mn(a){oi(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Oe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}qt=mn.prototype,qt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return this._isFrozen=!1,this},qt.toString=function(){return"List()#"+mi(this)},qt.add=function(a){return a===null?this:(this._isFrozen&&Ke(this,a),this.s.push(a),this.xb(),this)},qt.push=function(a){this.add(a)},qt.addAll=function(a){if(a===null)return this;this._isFrozen&&Ke(this);var y=this.s;if(Tn(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},qt.clear=function(){this._isFrozen&&Ke(this),this.s.length=0,this.xb()},qt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},qt.has=function(a){return this.contains(a)},qt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},qt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Ln(a,"0 <= i < length",mn,"elt:i"),y[a]},qt.get=function(a){return this.M(a)},qt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Ln(a,"0 <= i < length",mn,"setElt:i"),this._isFrozen&&Ke(this,a),x[a]=y},qt.set=function(a,y){this.cd(a,y)},qt.first=function(){var a=this.s;return a.length===0?null:a[0]},qt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},qt.pop=function(){this._isFrozen&&Ke(this);var a=this.s;return 0<a.length?a.pop():null},mn.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},mn.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},mn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},mn.prototype.map=function(a){for(var y=new mn,x=[],b=this.s,E=b.length,et=0;et<E;et++)x.push(a(b[et]));return y.s=x,y.xb(),y},mn.prototype.filter=function(a){for(var y=new mn,x=[],b=this.s,E=b.length,et=0;et<E;et++){var nt=b[et];a(nt)&&x.push(nt)}return y.s=x,y.xb(),y},qt=mn.prototype,qt.Gb=function(a,y){0>a&&Ln(a,">= 0",mn,"insertAt:i"),this._isFrozen&&Ke(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},qt.remove=function(a){if(a===null)return!1;this._isFrozen&&Ke(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)},qt.delete=function(a){return this.remove(a)},qt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Ln(a,"0 <= i < length",mn,"removeAt:i"),this._isFrozen&&Ke(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},qt.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&&Ke(this);for(var E=a,et=y+1;et<b;)x[E++]=x[et++];return x.length=b-(y-a+1),this.xb(),this},mn.prototype.copy=function(){var a=new mn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},qt=mn.prototype,qt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},qt.Iv=function(){for(var a=new gn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},qt.sort=function(a){return this._isFrozen&&Ke(this),this.s.sort(a),this.xb(),this},qt.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&Ke(this);var et=x-y;if(1>=et)return this;if((0>y||y>=E-1)&&Ln(y,"0 <= from < length",mn,"sortRange:from"),et===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},qt.reverse=function(){return this._isFrozen&&Ke(this),this.s.reverse(),this.xb(),this},un.Object.defineProperties(mn.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 Hr;var a=this.Sa;return a!==null?(a.reset(),a):new ei(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Hr;var a=this.Hg;return a!==null?(a.reset(),a):new hi(this)}}}),mn.prototype.reverse=mn.prototype.reverse,mn.prototype.sortRange=mn.prototype.zi,mn.prototype.sort=mn.prototype.sort,mn.prototype.toSet=mn.prototype.Iv,mn.prototype.toArray=mn.prototype.Fa,mn.prototype.removeRange=mn.prototype.removeRange,mn.prototype.removeAt=mn.prototype.mb,mn.prototype.delete=mn.prototype.delete,mn.prototype.remove=mn.prototype.remove,mn.prototype.insertAt=mn.prototype.Gb,mn.prototype.pop=mn.prototype.pop,mn.prototype.last=mn.prototype.jc,mn.prototype.first=mn.prototype.first,mn.prototype.set=mn.prototype.set,mn.prototype.setElt=mn.prototype.cd,mn.prototype.get=mn.prototype.get,mn.prototype.elt=mn.prototype.M,mn.prototype.indexOf=mn.prototype.indexOf,mn.prototype.has=mn.prototype.has,mn.prototype.contains=mn.prototype.contains,mn.prototype.clear=mn.prototype.clear,mn.prototype.addAll=mn.prototype.addAll,mn.prototype.push=mn.prototype.push,mn.prototype.add=mn.prototype.add,mn.prototype.thaw=mn.prototype.ka,mn.prototype.freeze=mn.prototype.freeze,mn.className="List";function vi(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}vi.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},vi.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)},vi.prototype.Ad=function(){return this.next()},vi.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},vi.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},vi.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},vi.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},vi.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new mn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},vi.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new mn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},vi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},vi.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},un.Object.defineProperties(vi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),vi.prototype.first=vi.prototype.first,vi.prototype.hasNext=vi.prototype.Ad,vi.prototype.next=vi.prototype.next,vi.prototype.reset=vi.prototype.reset,vi.className="SetIterator";function gn(a){oi(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Oe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}qt=gn.prototype,qt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return this._isFrozen=!1,this},qt.toString=function(){return"Set()#"+mi(this)},qt.add=function(a){if(a===null)return this;this._isFrozen&&Ke(this,a);var y=a;return en(a)&&(y=Gi(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Eo(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},qt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Ke(this),Tn(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},qt.contains=function(a){if(a===null)return!1;var y=a;return en(a)&&(y=mi(a),y===void 0)?!1:this.Tb[y]!==void 0},qt.has=function(a){return this.contains(a)},qt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},qt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},qt.first=function(){var a=this.ea;return a===null?null:a.value},gn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},gn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},gn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},gn.prototype.map=function(a){for(var y=new gn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},gn.prototype.filter=function(a){for(var y=new gn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},qt=gn.prototype,qt.remove=function(a){if(a===null)return!1;this._isFrozen&&Ke(this,a);var y=a;if(en(a)&&(y=mi(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},qt.delete=function(a){return this.remove(a)},qt.hp=function(a){if(a===null)return this;if(this._isFrozen&&Ke(this),Tn(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},qt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Ke(this);var y=new gn;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},qt.clear=function(){this._isFrozen&&Ke(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},gn.prototype.copy=function(){var a=new gn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},gn.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},gn.prototype.Hv=function(){var a=new mn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function oi(a){a.__gohashid=Bi++}function Gi(a){var y=a.__gohashid;return y===void 0&&(y=Bi++,a.__gohashid=y),y}function mi(a){return a.__gohashid}un.Object.defineProperties(gn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Hr;var a=this.Sa;return a!==null?(a.reset(),a):new vi(this)}}}),gn.prototype.toList=gn.prototype.Hv,gn.prototype.toArray=gn.prototype.Fa,gn.prototype.clear=gn.prototype.clear,gn.prototype.retainAll=gn.prototype.pA,gn.prototype.removeAll=gn.prototype.hp,gn.prototype.delete=gn.prototype.delete,gn.prototype.remove=gn.prototype.remove,gn.prototype.first=gn.prototype.first,gn.prototype.containsAny=gn.prototype.Ty,gn.prototype.containsAll=gn.prototype.Sy,gn.prototype.has=gn.prototype.has,gn.prototype.contains=gn.prototype.contains,gn.prototype.addAll=gn.prototype.addAll,gn.prototype.add=gn.prototype.add,gn.prototype.thaw=gn.prototype.ka,gn.prototype.freeze=gn.prototype.freeze;var Bi=1;gn.className="Set",gn.uniqueHash=oi,gn.hashIdUnique=Gi,gn.hashId=mi;function ii(a){this.ma=a,this.qa=a.Ja,this.sa=null}ii.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},ii.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=this.key=a=y.key,!0):(this.de(),!1)},ii.prototype.Ad=function(){return this.next()},ii.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},ii.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},ii.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},ii.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},ii.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new mn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},ii.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new mn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},ii.prototype.de=function(){this.value=this.key=null,this.qa=-1},ii.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},un.Object.defineProperties(ii.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ii.prototype.first=ii.prototype.first,ii.prototype.hasNext=ii.prototype.Ad,ii.prototype.next=ii.prototype.next,ii.prototype.reset=ii.prototype.reset,ii.className="MapKeySetIterator";function Rr(a){gn.call(this),oi(this),this._isFrozen=!0,this.ma=a}$e(Rr,gn),qt=Rr.prototype,qt.freeze=function(){return this},qt.ka=function(){return this},qt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},qt.add=function(){Oe("This Set is read-only: "+this.toString())},qt.contains=function(a){return this.ma.contains(a)},qt.has=function(a){return this.contains(a)},qt.remove=function(){Oe("This Set is read-only: "+this.toString())},qt.delete=function(a){return this.remove(a)},qt.clear=function(){Oe("This Set is read-only: "+this.toString())},qt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Rr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Rr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Rr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Rr.prototype.map=function(a){for(var y=new gn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Rr.prototype.filter=function(a){for(var y=new gn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Rr.prototype.copy=function(){return new Rr(this.ma)},Rr.prototype.Iv=function(){var a=new gn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Rr.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},Rr.prototype.Hv=function(){var a=new mn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},un.Object.defineProperties(Rr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Hr:new ii(this.ma)}}}),Rr.prototype.toList=Rr.prototype.Hv,Rr.prototype.toArray=Rr.prototype.Fa,Rr.prototype.toSet=Rr.prototype.Iv,Rr.prototype.first=Rr.prototype.first,Rr.prototype.clear=Rr.prototype.clear,Rr.prototype.delete=Rr.prototype.delete,Rr.prototype.remove=Rr.prototype.remove,Rr.prototype.has=Rr.prototype.has,Rr.prototype.contains=Rr.prototype.contains,Rr.prototype.add=Rr.prototype.add,Rr.prototype.thaw=Rr.prototype.ka,Rr.prototype.freeze=Rr.prototype.freeze,Rr.className="MapKeySet";function wi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}wi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},wi.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},wi.prototype.Ad=function(){return this.next()},wi.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},wi.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},wi.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},wi.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},wi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new mn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},wi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new mn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},wi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},wi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},un.Object.defineProperties(wi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),wi.prototype.first=wi.prototype.first,wi.prototype.hasNext=wi.prototype.Ad,wi.prototype.next=wi.prototype.next,wi.prototype.reset=wi.prototype.reset,wi.className="MapValueSetIterator";function Eo(a,y){this.key=a,this.value=y,this.ll=this.va=null}Eo.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Eo.className="KeyValuePair";function Oi(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Oi.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Oi.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.key=y.key,this.value=y.value,!0):(this.de(),!1)},Oi.prototype.Ad=function(){return this.next()},Oi.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.key=a.key,this.value=a.value,a):null},Oi.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},Oi.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},Oi.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},Oi.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new mn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Oi.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new mn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Oi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Oi.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},un.Object.defineProperties(Oi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Oi.prototype.first=Oi.prototype.first,Oi.prototype.hasNext=Oi.prototype.Ad,Oi.prototype.next=Oi.prototype.next,Oi.prototype.reset=Oi.prototype.reset,Oi.className="MapIterator";function $n(a){oi(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Oe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}qt=$n.prototype,qt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return this._isFrozen=!1,this},qt.toString=function(){return"Map()#"+mi(this)},qt.add=function(a,y){this._isFrozen&&Ke(this,a);var x=a;en(a)&&(x=Gi(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new Eo(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},qt.set=function(a,y){return this.add(a,y)},qt.addAll=function(a){if(a===null)return this;if(Tn(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 $n)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},qt.first=function(){return this.ea},$n.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},$n.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},$n.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},$n.prototype.map=function(a){for(var y=new $n,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},$n.prototype.filter=function(a){for(var y=new $n,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},qt=$n.prototype,qt.contains=function(a){var y=a;return en(a)&&(y=mi(a),y===void 0)?!1:this.Tb[y]!==void 0},qt.has=function(a){return this.contains(a)},qt.I=function(a){var y=a;return en(a)&&(y=mi(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},qt.get=function(a){return this.I(a)},qt.remove=function(a){if(a===null)return!1;this._isFrozen&&Ke(this,a);var y=a;if(en(a)&&(y=mi(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},qt.delete=function(a){return this.remove(a)},qt.clear=function(){this._isFrozen&&Ke(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()},$n.prototype.copy=function(){var a=new $n,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},$n.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 Eo(E.key,E.value),x++}return y},$n.prototype.Lf=function(){return new Rr(this)},un.Object.defineProperties($n.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Hr;var a=this.Sa;return a!==null?(a.reset(),a):new Oi(this)}},iteratorKeys:{get:function(){return 0>=this.count?Hr:new ii(this)}},iteratorValues:{get:function(){if(0>=this.count)return Hr;var a=this.jf;return a!==null?(a.reset(),a):new wi(this)}}}),$n.prototype.toKeySet=$n.prototype.Lf,$n.prototype.toArray=$n.prototype.Fa,$n.prototype.clear=$n.prototype.clear,$n.prototype.delete=$n.prototype.delete,$n.prototype.remove=$n.prototype.remove,$n.prototype.get=$n.prototype.get,$n.prototype.getValue=$n.prototype.I,$n.prototype.has=$n.prototype.has,$n.prototype.contains=$n.prototype.contains,$n.prototype.first=$n.prototype.first,$n.prototype.addAll=$n.prototype.addAll,$n.prototype.set=$n.prototype.set,$n.prototype.add=$n.prototype.add,$n.prototype.thaw=$n.prototype.ka,$n.prototype.freeze=$n.prototype.freeze,$n.className="Map";function Le(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Oe("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Ti,so,Ji,Zi,pi;Le.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Le.prototype.h=function(a,y){return this.x=a,this.y=y,this},Le.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Le.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Le.prototype.copy=function(){var a=new Le;return a.x=this.x,a.y=this.y,a},qt=Le.prototype,qt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function sr(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 Le(x,E)}return new Le}function wr(a){return a.x.toString()+" "+a.y.toString()}qt.toString=function(){return"Point("+this.x+","+this.y+")"},qt.D=function(a){return a instanceof Le?this.x===a.x&&this.y===a.y:!1},qt.hi=function(a,y){return this.x===a&&this.y===y},qt.Xa=function(a){return Ge.B(this.x,a.x)&&Ge.B(this.y,a.y)},qt.add=function(a){return this.x+=a.x,this.y+=a.y,this},qt.re=function(a){return this.x-=a.x,this.y-=a.y,this},qt.offset=function(a,y){return this.x+=a,this.y+=y,this},Le.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},qt=Le.prototype,qt.scale=function(a,y){return this.x*=a,this.y*=y,this},qt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},qt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},qt.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},qt.ab=function(a){return Jr(a.x-this.x,a.y-this.y)},qt.direction=function(a,y){return Jr(a-this.x,y-this.y)};function Jr(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}qt.Ry=function(a,y){return Ge.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},qt.fA=function(a,y,x,b){return Ge.qh(a,y,x,b,this.x,this.y,this),this},qt.gA=function(a,y){return Ge.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},qt.uA=function(a,y,x,b){return Ge.No(this.x,this.y,a,y,x,b,this),this},qt.vA=function(a,y){return Ge.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},qt.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},qt.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},qt.transform=function(a){return a.Ga(this),this};function mr(a,y){return y.Cd(a),a}function Vr(a,y,x,b,E,et){var nt=E-x,st=et-b,ht=nt*nt+st*st;x-=a,b-=y;var pt=-x*nt-b*st;return 0>=pt||pt>=ht?(nt=E-a,st=et-y,Math.min(x*x+b*b,nt*nt+st*st)):(a=nt*b-st*x,a*a/ht)}function yr(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function ur(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)}qt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Le.alloc=function(){var a=kr.pop();return a===void 0?new Le:a},Le.allocAt=function(a,y){var x=kr.pop();return x===void 0?new Le(a,y):(x.x=a,x.y=y,x)},Le.free=function(a){kr.push(a)},Le.prototype.isReal=Le.prototype.w,Le.prototype.setSpot=Le.prototype.yi,Le.prototype.setRectSpot=Le.prototype.xi,Le.prototype.snapToGridPoint=Le.prototype.vA,Le.prototype.snapToGrid=Le.prototype.uA,Le.prototype.projectOntoLineSegmentPoint=Le.prototype.gA,Le.prototype.projectOntoLineSegment=Le.prototype.fA,Le.intersectingLineSegments=function(a,y,x,b,E,et,nt,st){return Ge.Rl(a,y,x,b,E,et,nt,st)},Le.prototype.compareWithLineSegmentPoint=Le.prototype.Ry,Le.compareWithLineSegment=function(a,y,x,b,E,et){return Ge.Fl(a,y,x,b,E,et)},Le.prototype.direction=Le.prototype.direction,Le.prototype.directionPoint=Le.prototype.ab,Le.prototype.normalize=Le.prototype.normalize,Le.prototype.distanceSquared=Le.prototype.zd,Le.prototype.distanceSquaredPoint=Le.prototype.Bf,Le.prototype.scale=Le.prototype.scale,Le.prototype.rotate=Le.prototype.rotate,Le.prototype.offset=Le.prototype.offset,Le.prototype.subtract=Le.prototype.re,Le.prototype.add=Le.prototype.add,Le.prototype.equalsApprox=Le.prototype.Xa,Le.prototype.equalTo=Le.prototype.hi,Le.prototype.equals=Le.prototype.D,Le.prototype.set=Le.prototype.set,Le.prototype.setTo=Le.prototype.sg;var kr=[];Le.className="Point",Le.parse=sr,Le.stringify=wr,Le.distanceLineSegmentSquared=Vr,Le.distanceSquared=yr,Le.direction=ur,Le.Origin=Ti=new Le(0,0).ja(),Le.InfiniteTopLeft=so=new Le(-1/0,-1/0).ja(),Le.InfiniteBottomRight=Ji=new Le(1/0,1/0).ja(),Le.SixPoint=Zi=new Le(6,6).ja(),Le.NoPoint=pi=new Le(NaN,NaN).ja(),Le.parse=sr,Le.stringify=wr,Le.distanceLineSegmentSquared=Vr,Le.distanceSquared=yr,Le.direction=ur;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):Oe("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var di,Ci,io,bi,lo,xo,Bo;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},qt=Cn.prototype,qt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function po(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 na(a){return a.width.toString()+" "+a.height.toString()}qt.toString=function(){return"Size("+this.width+","+this.height+")"},qt.D=function(a){return a instanceof Cn?this.width===a.width&&this.height===a.height:!1},qt.hi=function(a,y){return this.width===a&&this.height===y},qt.Xa=function(a){return Ge.B(this.width,a.width)&&Ge.B(this.height,a.height)},qt.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},qt.w=function(){return isFinite(this.width)&&isFinite(this.height)},Cn.alloc=function(){var a=Ao.pop();return a===void 0?new Cn:a},Cn.free=function(a){Ao.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 Ao=[];Cn.className="Size",Cn.parse=po,Cn.stringify=na,Cn.ZeroSize=di=new Cn(0,0).ja(),Cn.OneSize=Ci=new Cn(1,1).ja(),Cn.SixSize=io=new Cn(6,6).ja(),Cn.EightSize=bi=new Cn(8,8).ja(),Cn.TenSize=lo=new Cn(10,10).ja(),Cn.InfiniteSize=xo=new Cn(1/0,1/0).ja(),Cn.NoSize=Bo=new Cn(NaN,NaN).ja(),Cn.parse=po,Cn.stringify=na;function on(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 Le?(x=a.x,a=a.y,y instanceof Le?(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):Oe("Incorrect second argument supplied to Rect constructor "+y)):Oe("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}qt=on.prototype,qt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},qt.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function ra(a,y,x){a.width=y,a.height=x}qt.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},qt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},qt.dd=function(a){return this.x=a.x,this.y=a.y,this},qt.tA=function(a){return this.width=a.width,this.height=a.height,this},on.prototype.copy=function(){var a=new on;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},qt=on.prototype,qt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function za(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 et=0;a[y]==="";)y++;(b=a[y++])&&(et=parseFloat(b));for(var nt=0;a[y]==="";)y++;return(b=a[y++])&&(nt=parseFloat(b)),new on(x,E,et,nt)}return new on}function Ya(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}qt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},qt.D=function(a){return a instanceof on?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},qt.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},qt.Xa=function(a){return Ge.B(this.x,a.x)&&Ge.B(this.y,a.y)&&Ge.B(this.width,a.width)&&Ge.B(this.height,a.height)};function Hi(a,y){return Ge.$(a.x,y.x)&&Ge.$(a.y,y.y)&&Ge.$(a.width,y.width)&&Ge.$(a.height,y.height)}qt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},qt.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},qt.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},qt.offset=function(a,y){return this.x+=a,this.y+=y,this},qt.Bc=function(a,y){return Js(this,y,a,y,a)},qt.Co=function(a){return Js(this,a.top,a.right,a.bottom,a.left)},qt.Fv=function(a){return Js(this,-a.top,-a.right,-a.bottom,-a.left)},qt.Hz=function(a,y,x,b){return Js(this,a,y,x,b)};function Js(a,y,x,b,E){var et=a.width;return x+E<=-et?(a.x+=et/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}qt.Ex=function(a){return ls(this,a.x,a.y,a.width,a.height)},qt.Uu=function(a,y,x,b){return ls(this,a,y,x,b)};function ls(a,y,x,b,E){var et=Math.max(a.x,y),nt=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=et,a.y=nt,a.width=Math.max(0,y-et),a.height=Math.max(0,x-nt),a}qt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},qt.Vu=function(a,y,x,b){var E=this.width,et=this.x;return E!==1/0&&x!==1/0&&(E+=et,x+=a,isNaN(x)||isNaN(E)||et>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 Ml(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))}qt.Ye=function(a){return Ai(this,a.x,a.y,0,0)},qt.ed=function(a){return Ai(this,a.x,a.y,a.width,a.height)},qt.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),Ai(this,a,y,x,b)};function Ai(a,y,x,b,E){var et=Math.min(a.x,y),nt=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=et,a.y=nt,a.width=y-et,a.height=x-nt,a}qt.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 No(a,y,x,b,E,et,nt,st){return nt===void 0&&(nt=0),st===void 0&&(st=0),a<=E&&E+nt<=a+x&&y<=et&&et+st<=y+b}function Ga(a,y,x,b,E,et,nt,st){return a>nt+E||E>x+a?!1:!(y>st+et||et>b+y)}qt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},qt.Mz=function(){return this.width===0&&this.height===0},on.alloc=function(){var a=xs.pop();return a===void 0?new on:a},on.allocAt=function(a,y,x,b){var E=xs.pop();return E===void 0?new on(a,y,x,b):E.h(a,y,x,b)},on.free=function(a){xs.push(a)},un.Object.defineProperties(on.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 Le(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 Le(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}}}),on.prototype.isEmpty=on.prototype.Mz,on.prototype.isReal=on.prototype.w,on.intersectsLineSegment=function(a,y,x,b,E,et,nt,st){return Ge.Fx(a,y,x,b,E,et,nt,st)},on.prototype.setSpot=on.prototype.yi,on.prototype.union=on.prototype.Kv,on.prototype.unionRect=on.prototype.ed,on.prototype.unionPoint=on.prototype.Ye,on.prototype.intersects=on.prototype.Vu,on.prototype.intersectsRect=on.prototype.Yc,on.prototype.intersect=on.prototype.Uu,on.prototype.intersectRect=on.prototype.Ex,on.prototype.grow=on.prototype.Hz,on.prototype.subtractMargin=on.prototype.Fv,on.prototype.addMargin=on.prototype.Co,on.prototype.inflate=on.prototype.Bc,on.prototype.offset=on.prototype.offset,on.prototype.contains=on.prototype.contains,on.prototype.containsRect=on.prototype.Re,on.prototype.containsPoint=on.prototype.ca,on.prototype.equalsApprox=on.prototype.Xa,on.prototype.equalTo=on.prototype.hi,on.prototype.equals=on.prototype.D,on.prototype.setSize=on.prototype.tA,on.prototype.setPoint=on.prototype.dd,on.prototype.set=on.prototype.set,on.prototype.setTo=on.prototype.sg;var dl=null,uu=null,xs=[];on.className="Rect",on.parse=za,on.stringify=Ya,on.contains=No,on.intersects=Ga,on.ZeroRect=dl=new on(0,0,0,0).ja(),on.NoRect=uu=new on(NaN,NaN,NaN,NaN).ja(),on.parse=za,on.stringify=Ya,on.contains=No,on.intersects=Ga;function Br(a,y,x,b){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):Oe("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Br.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Br.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Br.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Br.prototype.copy=function(){var a=new Br;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},qt=Br.prototype,qt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Gl(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 Br;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Br(x);for(var et=NaN;a[y]==="";)y++;if((b=a[y++])&&(et=parseFloat(b)),isNaN(et))return new Br(x,E);for(var nt=NaN;a[y]==="";)y++;return(b=a[y++])&&(nt=parseFloat(b)),isNaN(nt)?new Br(x,E):new Br(x,E,et,nt)}return new Br}function hu(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}qt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},qt.D=function(a){return a instanceof Br?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},qt.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},qt.Xa=function(a){return Ge.B(this.top,a.top)&&Ge.B(this.right,a.right)&&Ge.B(this.bottom,a.bottom)&&Ge.B(this.left,a.left)},qt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Br.alloc=function(){var a=Nu.pop();return a===void 0?new Br:a},Br.free=function(a){Nu.push(a)},Br.prototype.isReal=Br.prototype.w,Br.prototype.equalsApprox=Br.prototype.Xa,Br.prototype.equalTo=Br.prototype.hi,Br.prototype.equals=Br.prototype.D,Br.prototype.set=Br.prototype.set,Br.prototype.setTo=Br.prototype.sg;var us=null,Xo=null,Nu=[];Br.className="Margin",Br.parse=Gl,Br.stringify=hu,Br.ZeroMargin=us=new Br(0,0,0,0).ja(),Br.TwoMargin=Xo=new Br(2,2,2,2).ja(),Br.parse=Gl,Br.stringify=hu;function rr(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 Ur,ni,ai,gi,Vi,Dr,ws,ia,Uo,oo,Ja,bs,Aa,Ps,Tl,Qs,ju,Xc,sc,pl,Ul,Is,lc,uc,Yc,jo,Wf,hc,Ou,Fu,da,Na,Yo,oa,cc,Du;rr.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},rr.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},rr.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},rr.prototype.copy=function(){var a=new rr;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},qt=rr.prototype,qt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function mo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Ui(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Ur;if(a==="TopLeft")return ni;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return ai;if(a==="TopRight")return gi;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Vi;if(a==="Center")return Dr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return ws;if(a==="BottomLeft")return ia;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Uo;if(a==="BottomRight")return oo;if(a==="TopSide")return Ja;if(a==="LeftSide")return bs;if(a==="RightSide")return Aa;if(a==="BottomSide")return Ps;if(a==="TopBottomSides")return Tl;if(a==="LeftRightSides")return Qs;if(a==="TopLeftSides")return ju;if(a==="TopRightSides")return Xc;if(a==="BottomLeftSides")return sc;if(a==="BottomRightSides")return pl;if(a==="NotTopSide")return Ul;if(a==="NotLeftSide")return Is;if(a==="NotRightSide")return lc;if(a==="NotBottomSide")return uc;if(a==="AllSides")return Yc;if(a==="Default")return jo;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 et=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(et=parseFloat(b));for(var nt=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(nt=parseFloat(b)),new rr(x,E,et,nt)}return new rr}function Ni(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}qt.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(Ur)?"None":this.D(ni)?"TopLeft":this.D(ai)?"Top":this.D(gi)?"TopRight":this.D(Vi)?"Left":this.D(Dr)?"Center":this.D(ws)?"Right":this.D(ia)?"BottomLeft":this.D(Uo)?"Bottom":this.D(oo)?"BottomRight":this.D(Ja)?"TopSide":this.D(bs)?"LeftSide":this.D(Aa)?"RightSide":this.D(Ps)?"BottomSide":this.D(Tl)?"TopBottomSides":this.D(Qs)?"LeftRightSides":this.D(ju)?"TopLeftSides":this.D(Xc)?"TopRightSides":this.D(sc)?"BottomLeftSides":this.D(pl)?"BottomRightSides":this.D(Ul)?"NotTopSide":this.D(Is)?"NotLeftSide":this.D(lc)?"NotRightSide":this.D(uc)?"NotBottomSide":this.D(Yc)?"AllSides":this.D(jo)?"Default":"None"},qt.D=function(a){return a instanceof rr?(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},qt.gv=function(){return new rr(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},qt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Wf))a=bs;else if(a.D(hc))a=Aa;else if(a.D(Ou))a=Ja;else if(a.D(Fu))a=Ps;else return!1;return a=a.offsetY,(this.offsetY&a)===a},qt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},qt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},qt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},qt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},qt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},rr.alloc=function(){var a=ja.pop();return a===void 0?new rr:a},rr.free=function(a){ja.push(a)},rr.prototype.isDefault=rr.prototype.Xb,rr.prototype.isNone=rr.prototype.ys,rr.prototype.isSide=rr.prototype.$c,rr.prototype.isNoSpot=rr.prototype.Mc,rr.prototype.isSpot=rr.prototype.sb,rr.prototype.includesSide=rr.prototype.Hf,rr.prototype.opposite=rr.prototype.gv,rr.prototype.equals=rr.prototype.D,rr.prototype.set=rr.prototype.set,rr.prototype.setTo=rr.prototype.sg;var ja=[];rr.className="Spot",rr.parse=Ui,rr.stringify=Ni,rr.None=Ur=mo(new rr(0,0,0,0),0).ja(),rr.Default=jo=mo(new rr(0,0,-1,0),-1).ja(),rr.TopLeft=ni=new rr(0,0,0,0).ja(),rr.TopCenter=ai=new rr(.5,0,0,0).ja(),rr.TopRight=gi=new rr(1,0,0,0).ja(),rr.LeftCenter=Vi=new rr(0,.5,0,0).ja(),rr.Center=Dr=new rr(.5,.5,0,0).ja(),rr.RightCenter=ws=new rr(1,.5,0,0).ja(),rr.BottomLeft=ia=new rr(0,1,0,0).ja(),rr.BottomCenter=Uo=new rr(.5,1,0,0).ja(),rr.BottomRight=oo=new rr(1,1,0,0).ja(),rr.MiddleTop=da=ai,rr.MiddleLeft=Na=Vi,rr.MiddleRight=Yo=ws,rr.MiddleBottom=oa=Uo,rr.Top=Ou=ai,rr.Left=Wf=Vi,rr.Right=hc=ws,rr.Bottom=Fu=Uo,rr.TopSide=Ja=mo(new rr(0,0,1,1),1).ja(),rr.LeftSide=bs=mo(new rr(0,0,1,2),1).ja(),rr.RightSide=Aa=mo(new rr(0,0,1,4),1).ja(),rr.BottomSide=Ps=mo(new rr(0,0,1,8),1).ja(),rr.TopBottomSides=Tl=mo(new rr(0,0,1,9),1).ja(),rr.LeftRightSides=Qs=mo(new rr(0,0,1,6),1).ja(),rr.TopLeftSides=ju=mo(new rr(0,0,1,3),1).ja(),rr.TopRightSides=Xc=mo(new rr(0,0,1,5),1).ja(),rr.BottomLeftSides=sc=mo(new rr(0,0,1,10),1).ja(),rr.BottomRightSides=pl=mo(new rr(0,0,1,12),1).ja(),rr.NotTopSide=Ul=mo(new rr(0,0,1,14),1).ja(),rr.NotLeftSide=Is=mo(new rr(0,0,1,13),1).ja(),rr.NotRightSide=lc=mo(new rr(0,0,1,11),1).ja(),rr.NotBottomSide=uc=mo(new rr(0,0,1,7),1).ja(),rr.AllSides=Yc=mo(new rr(0,0,1,15),1).ja(),cc=new rr(.156,.156).ja(),Du=new rr(.844,.844).ja(),rr.parse=Ui,rr.stringify=Ni;function xr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}xr.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},xr.prototype.setTransform=function(a,y,x,b,E,et){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=et,this},xr.prototype.copy=function(){var a=new xr;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},xr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},xr.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},xr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},xr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},xr.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},xr.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,et=a.m11*y,nt=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*et,E=this.m12*E+this.m22*et,this.dx=this.m11*nt+this.m21*a+this.dx,this.dy=this.m12*nt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},xr.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),et=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=et,this},xr.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,et=this.m11*-b+this.m21*a,nt=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=et,this.m22=nt,this.translate(-y,-x),this},qt=xr.prototype,qt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},qt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},qt.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)},qt.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))},qt.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))},qt.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,et=this.m11,nt=this.m12,st=this.m21,ht=this.m22,pt=this.dx,yt=this.dy,Mt=y*et+x*st+pt,zt=y*nt+x*ht+yt,Zt=b*et+x*st+pt,Qt=b*nt+x*ht+yt;return x=y*et+E*st+pt,y=y*nt+E*ht+yt,et=b*et+E*st+pt,b=b*nt+E*ht+yt,E=Math.min(Mt,Zt),Mt=Math.max(Mt,Zt),Zt=Math.min(zt,Qt),zt=Math.max(zt,Qt),E=Math.min(E,x),Mt=Math.max(Mt,x),Zt=Math.min(Zt,y),zt=Math.max(zt,y),E=Math.min(E,et),Mt=Math.max(Mt,et),Zt=Math.min(Zt,b),zt=Math.max(zt,b),a.h(E,Zt,Mt-E,zt-Zt),a},xr.alloc=function(){var a=Jo.pop();return a===void 0?new xr:a},xr.free=function(a){Jo.push(a)},xr.prototype.transformRect=xr.prototype.pp,xr.prototype.transformPoint=xr.prototype.Ga,xr.prototype.scale=xr.prototype.scale,xr.prototype.translate=xr.prototype.translate,xr.prototype.rotate=xr.prototype.rotate,xr.prototype.invert=xr.prototype.Vj,xr.prototype.multiplyInverted=xr.prototype.bv,xr.prototype.multiply=xr.prototype.multiply,xr.prototype.reset=xr.prototype.reset,xr.prototype.isIdentity=xr.prototype.ws,xr.prototype.equals=xr.prototype.D,xr.prototype.setTransform=xr.prototype.setTransform,xr.prototype.set=xr.prototype.set;var Jo=[];xr.className="Transform",xr.xF="54a702f3e53909c447824c6706603faf4c";var Ge={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Ge.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Ge.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,et,nt){if(0>=E&&(E=1e-6),a<x)var st=a,ht=x;else st=x,ht=a;if(y<b)var pt=y,yt=b;else pt=b,yt=y;if(a===x)return pt<=nt&&nt<=yt&&a-E<=et&&et<=a+E;if(y===b)return st<=et&&et<=ht&&y-E<=nt&&nt<=y+E;if(ht+=E,st-=E,st<=et&&et<=ht&&(yt+=E,pt-=E,pt<=nt&&nt<=yt))if(ht-st>yt-pt)if(a-x>E||x-a>E){if(et=(b-y)/(x-a)*(et-a)+y,et-E<=nt&&nt<=et+E)return!0}else return!0;else if(y-b>E||b-y>E){if(nt=(x-a)/(b-y)*(nt-y)+a,nt-E<=et&&et<=nt+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,et,nt,st,ht,pt,yt,Mt){if(Ge.Yb(a,y,nt,st,Mt,x,b)&&Ge.Yb(a,y,nt,st,Mt,E,et))return Ge.Yb(a,y,nt,st,Mt,pt,yt);var zt=(a+x)/2,Zt=(y+b)/2,Qt=(x+E)/2,ie=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(zt+Qt)/2,x=(Zt+ie)/2,Qt=(Qt+E)/2,ie=(ie+et)/2;var Ee=(b+Qt)/2,we=(x+ie)/2;return Ge.cs(a,y,zt,Zt,b,x,Ee,we,ht,pt,yt,Mt)||Ge.cs(Ee,we,Qt,ie,E,et,nt,st,ht,pt,yt,Mt)},ax:function(a,y,x,b,E,et,nt,st,ht){var pt=(x+E)/2,yt=(b+et)/2;return ht.h((((a+x)/2+pt)/2+(pt+(E+nt)/2)/2)/2,(((y+b)/2+yt)/2+(yt+(et+st)/2)/2)/2),ht},My:function(a,y,x,b,E,et,nt,st){var ht=(x+E)/2,pt=(b+et)/2;return ur(((a+x)/2+ht)/2,((y+b)/2+pt)/2,(ht+(E+nt)/2)/2,(pt+(et+st)/2)/2)},Dl:function(a,y,x,b,E,et,nt,st,ht,pt){if(Ge.Yb(a,y,nt,st,ht,x,b)&&Ge.Yb(a,y,nt,st,ht,E,et))Ai(pt,a,y,0,0),Ai(pt,nt,st,0,0);else{var yt=(a+x)/2,Mt=(y+b)/2,zt=(x+E)/2,Zt=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(yt+zt)/2,x=(Mt+Zt)/2,zt=(zt+E)/2,Zt=(Zt+et)/2;var Qt=(b+zt)/2,ie=(x+Zt)/2;Ge.Dl(a,y,yt,Mt,b,x,Qt,ie,ht,pt),Ge.Dl(Qt,ie,zt,Zt,E,et,nt,st,ht,pt)}return pt},Qe:function(a,y,x,b,E,et,nt,st,ht,pt){if(Ge.Yb(a,y,nt,st,ht,x,b)&&Ge.Yb(a,y,nt,st,ht,E,et))pt.length===0&&(pt.push(a),pt.push(y)),pt.push(nt),pt.push(st);else{var yt=(a+x)/2,Mt=(y+b)/2,zt=(x+E)/2,Zt=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(yt+zt)/2,x=(Mt+Zt)/2,zt=(zt+E)/2,Zt=(Zt+et)/2;var Qt=(b+zt)/2,ie=(x+Zt)/2;Ge.Qe(a,y,yt,Mt,b,x,Qt,ie,ht,pt),Ge.Qe(Qt,ie,zt,Zt,E,et,nt,st,ht,pt)}return pt},jv:function(a,y,x,b,E,et,nt,st,ht,pt){if(Ge.Yb(a,y,E,et,pt,x,b))return Ge.Yb(a,y,E,et,pt,st,ht);var yt=(a+x)/2,Mt=(y+b)/2;x=(x+E)/2,b=(b+et)/2;var zt=(yt+x)/2,Zt=(Mt+b)/2;return Ge.jv(a,y,yt,Mt,zt,Zt,nt,st,ht,pt)||Ge.jv(zt,Zt,x,b,E,et,nt,st,ht,pt)},OA:function(a,y,x,b,E,et,nt){return nt.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+et)/2)/2),nt},iv:function(a,y,x,b,E,et,nt,st){if(Ge.Yb(a,y,E,et,nt,x,b))Ai(st,a,y,0,0),Ai(st,E,et,0,0);else{var ht=(a+x)/2,pt=(y+b)/2;x=(x+E)/2,b=(b+et)/2;var yt=(ht+x)/2,Mt=(pt+b)/2;Ge.iv(a,y,ht,pt,yt,Mt,nt,st),Ge.iv(yt,Mt,x,b,E,et,nt,st)}return st},ep:function(a,y,x,b,E,et,nt,st){if(Ge.Yb(a,y,E,et,nt,x,b))st.length===0&&(st.push(a),st.push(y)),st.push(E),st.push(et);else{var ht=(a+x)/2,pt=(y+b)/2;x=(x+E)/2,b=(b+et)/2;var yt=(ht+x)/2,Mt=(pt+b)/2;Ge.ep(a,y,ht,pt,yt,Mt,nt,st),Ge.ep(yt,Mt,x,b,E,et,nt,st)}return st},Eo:function(a,y,x,b,E,et,nt,st,ht,pt,yt,Mt,zt,Zt){if(Ge.Yb(a,y,nt,st,zt,x,b)&&Ge.Yb(a,y,nt,st,zt,E,et))return!Ge.Rl(a,y,nt,st,ht,pt,yt,Mt)||(zt=(a-nt)*(pt-Mt)-(y-st)*(ht-yt),zt===0)?!1:(Zt.h(((a*st-y*nt)*(ht-yt)-(a-nt)*(ht*Mt-pt*yt))/zt,((a*st-y*nt)*(pt-Mt)-(y-st)*(ht*Mt-pt*yt))/zt),!0);var Qt=(a+x)/2,ie=(y+b)/2,Ee=(x+E)/2,we=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(Qt+Ee)/2,x=(ie+we)/2,Ee=(Ee+E)/2,we=(we+et)/2;var je=(b+Ee)/2,Fe=(x+we)/2,De=1/0,_e=!1,Xe=0,En=0;return Ge.Eo(a,y,Qt,ie,b,x,je,Fe,ht,pt,yt,Mt,zt,Zt)&&(a=(Zt.x-ht)*(Zt.x-ht)+(Zt.y-pt)*(Zt.y-pt),a<De&&(De=a,_e=!0,Xe=Zt.x,En=Zt.y)),Ge.Eo(je,Fe,Ee,we,E,et,nt,st,ht,pt,yt,Mt,zt,Zt)&&(Zt.x-ht)*(Zt.x-ht)+(Zt.y-pt)*(Zt.y-pt)<De&&(_e=!0,Xe=Zt.x,En=Zt.y),_e&&(Zt.x=Xe,Zt.y=En),_e},Fo:function(a,y,x,b,E,et,nt,st,ht,pt,yt,Mt,zt){var Zt=0;if(Ge.Yb(a,y,nt,st,zt,x,b)&&Ge.Yb(a,y,nt,st,zt,E,et)){if(zt=(a-nt)*(pt-Mt)-(y-st)*(ht-yt),zt===0)return Zt;var Qt=((a*st-y*nt)*(ht-yt)-(a-nt)*(ht*Mt-pt*yt))/zt,ie=((a*st-y*nt)*(pt-Mt)-(y-st)*(ht*Mt-pt*yt))/zt;if(Qt>=yt)return Zt;if((ht>yt?ht-yt:yt-ht)<(pt>Mt?pt-Mt:Mt-pt)){if(y<st?(ht=y,a=st):(ht=st,a=y),ie<ht||ie>a)return Zt}else if(a<nt?(ht=a,a=nt):ht=nt,Qt<ht||Qt>a)return Zt;0<zt?Zt++:0>zt&&Zt--}else{Qt=(a+x)/2,ie=(y+b)/2;var Ee=(x+E)/2,we=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(Qt+Ee)/2,x=(ie+we)/2,Ee=(Ee+E)/2,we=(we+et)/2;var je=(b+Ee)/2,Fe=(x+we)/2;Zt+=Ge.Fo(a,y,Qt,ie,b,x,je,Fe,ht,pt,yt,Mt,zt),Zt+=Ge.Fo(je,Fe,Ee,we,E,et,nt,st,ht,pt,yt,Mt,zt)}return Zt},qh:function(a,y,x,b,E,et,nt){return Ge.$(a,x)?(y<b?(x=y,y=b):x=b,et<x?(nt.h(a,x),!1):et>y?(nt.h(a,y),!1):(nt.h(a,et),!0)):Ge.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(nt.h(b,y),!1):E>a?(nt.h(a,y),!1):(nt.h(E,y),!0)):(E=((a-E)*(a-x)+(y-et)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(nt.h(a,y),!1):1.000005<E?(nt.h(x,b),!1):(nt.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,et,nt,st,ht){return Ge.B(a,x)&&Ge.B(y,b)?(ht.h(a,y),!1):Ge.$(E,nt)?Ge.$(a,x)?(Ge.qh(a,y,x,b,E,et,ht),!1):Ge.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,ht):(st=(st-et)/(nt-E),Ge.$(a,x)?(x=st*(a-E)+et,y<b?(E=y,y=b):E=b,x<E?(ht.h(a,E),!1):x>y?(ht.h(a,y),!1):(ht.h(a,x),!0)):(nt=(b-y)/(x-a),Ge.$(st,nt)?(Ge.qh(a,y,x,b,E,et,ht),!1):(E=(nt*a-st*E+et-y)/(nt-st),Ge.$(nt,0)?(a<x?(b=a,a=x):b=x,E<b?(ht.h(b,y),!1):E>a?(ht.h(a,y),!1):(ht.h(E,y),!0)):Ge.qh(a,y,x,b,E,nt*(E-a)+y,ht))))},MA:function(a,y,x,b,E){return Ge.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,et,nt,st,ht,pt){function yt(Ee,we){var je=(Ee-a)*(Ee-a)+(we-y)*(we-y);je<Mt&&(Mt=je,ht.h(Ee,we))}var Mt=1/0;yt(ht.x,ht.y);var zt=0,Zt=0,Qt=0,ie=0;if(E<nt?(zt=E,Zt=nt):(zt=nt,Zt=E),et<st?(Qt=E,ie=nt):(Qt=nt,ie=E),zt=(Zt-zt)/2+pt,pt=(ie-Qt)/2+pt,E=(E+nt)/2,et=(et+st)/2,zt===0||pt===0)return ht;if(.5>(x>a?x-a:a-x)){if(zt=1-(x-E)*(x-E)/(zt*zt),0>zt)return ht;zt=Math.sqrt(zt),b=-pt*zt+et,yt(x,pt*zt+et),yt(x,b)}else{if(x=(b-y)/(x-a),b=1/(zt*zt)+x*x/(pt*pt),st=2*x*(y-x*a)/(pt*pt)-2*x*et/(pt*pt)-2*E/(zt*zt),zt=st*st-4*b*(2*x*a*et/(pt*pt)-2*y*et/(pt*pt)+et*et/(pt*pt)+E*E/(zt*zt)-1+(y-x*a)*(y-x*a)/(pt*pt)),0>zt)return ht;zt=Math.sqrt(zt),pt=(-st+zt)/(2*b),yt(pt,x*pt-x*a+y),zt=(-st-zt)/(2*b),yt(zt,x*zt-x*a+y)}return ht},Ff:function(a,y,x,b,E,et,nt,st,ht){var pt=1e21,yt=a,Mt=y;if(Ge.Ve(a,y,a,b,E,et,nt,st,ht)){var zt=(ht.x-E)*(ht.x-E)+(ht.y-et)*(ht.y-et);zt<pt&&(pt=zt,yt=ht.x,Mt=ht.y)}return Ge.Ve(x,y,x,b,E,et,nt,st,ht)&&(zt=(ht.x-E)*(ht.x-E)+(ht.y-et)*(ht.y-et),zt<pt&&(pt=zt,yt=ht.x,Mt=ht.y)),Ge.Ve(a,y,x,y,E,et,nt,st,ht)&&(y=(ht.x-E)*(ht.x-E)+(ht.y-et)*(ht.y-et),y<pt&&(pt=y,yt=ht.x,Mt=ht.y)),Ge.Ve(a,b,x,b,E,et,nt,st,ht)&&(a=(ht.x-E)*(ht.x-E)+(ht.y-et)*(ht.y-et),a<pt&&(pt=a,yt=ht.x,Mt=ht.y)),ht.h(yt,Mt),1e21>pt},us:function(a,y,x){return Ge.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,et,nt,st){var ht=a+x,pt=y+b;return E===nt?(et<st?(nt=et,et=st):nt=st,a<=E&&E<=ht&&nt<=pt&&et>=y):et===st?(E<nt?(st=E,E=nt):st=nt,y<=et&&et<=pt&&st<=ht&&E>=a):!!(No(a,y,x,b,E,et)||No(a,y,x,b,nt,st)||Ge.Rl(a,y,ht,y,E,et,nt,st)||Ge.Rl(ht,y,ht,pt,E,et,nt,st)||Ge.Rl(ht,pt,a,pt,E,et,nt,st)||Ge.Rl(a,pt,a,y,E,et,nt,st))},Rl:function(a,y,x,b,E,et,nt,st){return a===x&&y===b&&E===nt&&et===st?a===E&&y===et:0>=Ge.Fl(a,y,x,b,E,et)*Ge.Fl(a,y,x,b,nt,st)&&0>=Ge.Fl(E,et,nt,st,a,y)*Ge.Fl(E,et,nt,st,x,b)},Fl:function(a,y,x,b,E,et){return x-=a,b-=y,a=E-a,y=et-y,et=a*b-y*x,et===0&&(et=a*x+y*b,0<et&&(et=(a-x)*x+(y-b)*b,0>et&&(et=0))),et},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,et){var nt=Math.PI;et||(b*=nt/180,E*=nt/180);var st=b>E?-1:1;et=[];var ht=nt/2,pt=b;if(b=Math.min(2*nt,Math.abs(E-b)),1e-5>b)return ht=pt+st*Math.min(b,ht),st=a+x*Math.cos(pt),pt=y+x*Math.sin(pt),a+=x*Math.cos(ht),y+=x*Math.sin(ht),x=(st+a)/2,ht=(pt+y)/2,et.push([st,pt,x,ht,x,ht,a,y]),et;for(;1e-5<b;)E=pt+st*Math.min(b,ht),et.push(Ge.Vy(x,pt,E,a,y)),b-=Math.abs(E-pt),pt=E;return et},Vy:function(a,y,x,b,E){var et=(x-y)/2,nt=a*Math.cos(et),st=a*Math.sin(et),ht=-st,pt=nt*nt+ht*ht,yt=pt+nt*nt+ht*st;return pt=4/3*(Math.sqrt(2*pt*yt)-yt)/(nt*st-ht*nt),st=nt-pt*ht,nt=ht+pt*nt,ht=-nt,pt=et+y,et=Math.cos(pt),pt=Math.sin(pt),[b+a*Math.cos(y),E+a*Math.sin(y),b+st*et-nt*pt,E+st*pt+nt*et,b+st*et-ht*pt,E+st*pt+ht*et,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,et,nt){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/et)*et+b;var st=x;return x+E-a<E/2&&(st=x+E),a=b,b+et-y<et/2&&(a=b+et),nt.h(st,a),nt},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,et=0>b;if(a<y)var nt=1,st=0;else nt=0,st=1;var ht=nt===0?a:y,pt=nt===0?x:b;return(nt===0?E:et)&&(pt=-pt),nt=st,x=nt===0?x:b,(nt===0?E:et)&&(x=-x),Ge.az(ht,nt===0?a:y,pt,x,0,0)},az:function(a,y,x,b,E,et){if(0<b)if(0<x){E=a*a,et=y*y,a*=x;var nt=y*b,st=-et+nt,ht=-et+Math.sqrt(a*a+nt*nt);y=st;for(var pt=0;9999999999>pt&&(y=.5*(st+ht),!(y===st||y===ht));++pt){var yt=a/(y+E),Mt=nt/(y+et);if(yt=yt*yt+Mt*Mt-1,0<yt)st=y;else if(0>yt)ht=y;else break}x=E*x/(y+E)-x,b=et*b/(y+et)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,et=a*x,et<b?(b=et/b,et=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+et*et)):x=Math.abs(x-a);return x},Ze:new Hn,um:new Hn,Mf:new Hn,Nf:0,vm:100};Ge.za=Ge.AA;function bn(a){oi(this),this.l=2,a===void 0&&(a=bn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===bn.o?this.ee=new mn:(bn.V===null&&(bn.V=new mn().freeze()),this.ee=bn.V),this.aq=this.ee.Ja,this.Ip=new on().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=ni,this.gg=oo,this.Rk=this.Sk=NaN,this.Uf=pn}bn.prototype.copy=function(){var a=new bn;if(a.l=this.l&-2,a.na=this.na,a.od=this.od,a.pd=this.pd,a.Dc=this.Dc,a.Ec=this.Ec,this.na===bn.o){for(var y=this.ee.s,x=a.ee,b=0;b<y.length;b++)x.add(y[b].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},bn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},bn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==bn.o)return this;var a=this.figures;a.freeze(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].freeze();return this},bn.prototype.ka=function(){if(Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==bn.o)return this;var a=this.figures;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},bn.prototype.Xa=function(a){if(!(a instanceof bn))return!1;if(this.type!==a.type)return this.type===bn.j&&a.type===bn.o?$s(this,a):a.type===bn.j&&this.type===bn.o?$s(a,this):!1;if(this.type===bn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0}return Ge.B(this.startX,a.startX)&&Ge.B(this.startY,a.startY)&&Ge.B(this.endX,a.endX)&&Ge.B(this.endY,a.endY)};function $s(a,y){return a.type!==bn.j||y.type!==bn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Ge.B(a.startX,y.startX)&&Ge.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===ki&&Ge.B(a.endX,y.endX)&&Ge.B(a.endY,y.endY))))}bn.ia=function(a){return a.toString()},bn.prototype.qb=function(a){a.classType===bn&&(this.type=a)},bn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case bn.j:return 0>a?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case bn.u:var y=new on(this.startX,this.startY,0,0);return y.Kv(this.endX,this.endY,0,0),0>a?"M"+y.x.toString()+" "+y.y.toString()+"H"+y.right.toString()+"V"+y.bottom.toString()+"H"+y.left.toString()+"z":"M"+y.x.toFixed(a)+" "+y.y.toFixed(a)+"H"+y.right.toFixed(a)+"V"+y.bottom.toFixed(a)+"H"+y.left.toFixed(a)+"z";case bn.F:if(y=new on(this.startX,this.startY,0,0),y.Kv(this.endX,this.endY,0,0),0>a)return a=y.left.toString()+" "+(y.y+y.height/2).toString(),"M"+a+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+(y.right.toString()+" "+(y.y+y.height/2).toString())+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+a;var x=y.left.toFixed(a)+" "+(y.y+y.height/2).toFixed(a);return"M"+x+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+(y.right.toFixed(a)+" "+(y.y+y.height/2).toFixed(a))+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+x;case bn.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var et=x[E];0<E&&(y+=" x "),et.isFilled&&(y+="F "),y+=et.toString(a)}return y;default:return this.type.toString()}},bn.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",b=0;b<y;b++){var E=a[b];x=E.match(/[Ff]/)!==null?b===0?x+E:x+("X"+(E[0]===" "?"":" ")+E):x+((b===0?"":"X ")+"F"+(E[0]===" "?"":" ")+E)}return x},bn.parse=function(a,y){function x(){return ie>=De-1?!0:pt[ie+1].match(_e)!==null}function b(){return ie++,pt[ie]}function E(br){var fr=parseFloat(b()),ri=parseFloat(b());Ee===Ee.toLowerCase()&&(fr=Fe.x+fr,ri=Fe.y+ri),br.h(fr,ri)}function et(){return E(Fe),Fe}function nt(){return E(je),je}function st(){var br=we.toLowerCase();return br!=="c"&&br!=="s"&&br!=="q"&&br!=="t"?Fe:new Le(2*Fe.x-je.x,2*Fe.y-je.y)}y===void 0&&(y=!1);var ht=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ht,"$1 $2"),a=a.replace(ht,"$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 pt=a.split(" ");for(a=0;a<pt.length;a++){var yt=pt[a];if(yt.match(/(\.[0-9]*)(\.)/gm)!==null){ht=Fn();for(var Mt="",zt=!1,Zt=0;Zt<yt.length;Zt++){var Qt=yt[Zt];Qt!=="."||zt?Qt==="."?(ht.push(Mt),Mt="."):Mt+=Qt:(zt=!0,Mt+=Qt)}for(ht.push(Mt),pt.splice(a,1),yt=0;yt<ht.length;yt++)pt.splice(a+yt,0,ht[yt]);a+=ht.length-1,Bn(ht)}}var ie=-1,Ee="",we="";ht=new Le(0,0);var je=new Le(0,0),Fe=new Le(0,0),De=pt.length;a=N1(null),zt=Mt=yt=!1,Zt=!0,Qt=null;for(var _e=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(ie>=De-1);)if(we=Ee,Ee=b(),Ee!=="")switch(Ee.toUpperCase()){case"X":Zt=!0,Mt=yt=!1;break;case"M":for(Qt=et(),a.mc===null||Zt===!0?(Td(a,Qt.x,Qt.y,yt,!Mt,zt),Zt=!1):a.moveTo(Qt.x,Qt.y),ht.assign(Fe);!x();)Qt=et(),a.lineTo(Qt.x,Qt.y);break;case"L":for(;!x();)Qt=et(),a.lineTo(Qt.x,Qt.y);break;case"H":for(;!x();)Fe=new Le((Ee===Ee.toLowerCase()?Fe.x:0)+parseFloat(b()),Fe.y),a.lineTo(Fe.x,Fe.y);break;case"V":for(;!x();)Fe=new Le(Fe.x,(Ee===Ee.toLowerCase()?Fe.y:0)+parseFloat(b())),a.lineTo(Fe.x,Fe.y);break;case"C":for(;!x();){Qt=new Le,E(Qt);var Xe=nt(),En=et();rh(a,Qt.x,Qt.y,Xe.x,Xe.y,En.x,En.y)}break;case"S":for(;!x();)Qt=st(),Xe=nt(),En=et(),rh(a,Qt.x,Qt.y,Xe.x,Xe.y,En.x,En.y);break;case"Q":for(;!x();)Qt=nt(),Xe=et(),Im(a,Qt.x,Qt.y,Xe.x,Xe.y);break;case"T":for(;!x();)je=Qt=st(),Xe=et(),Im(a,Qt.x,Qt.y,Xe.x,Xe.y);break;case"B":for(;!x();){Qt=parseFloat(b()),Xe=parseFloat(b()),En=parseFloat(b());var Gn=parseFloat(b()),Dn=parseFloat(b()),wn=Dn,hn=!1;x()||(wn=parseFloat(b()),x()||(hn=parseFloat(b())!==0)),Ee===Ee.toLowerCase()&&(En+=Fe.x,Gn+=Fe.y),a.arcTo(Qt,Xe,En,Gn,Dn,wn,hn)}break;case"A":for(;!x();)Qt=Math.abs(parseFloat(b())),Xe=Math.abs(parseFloat(b())),En=parseFloat(b()),Dn=Gn=!1,hn=wn=0,wn=b(),wn.length===1?(Gn=!!parseFloat(wn),Dn=!!parseFloat(b()),wn=parseFloat(b())):wn.length===2?(Gn=!!parseFloat(wn[0]),Dn=!!parseFloat(wn[1]),wn=parseFloat(b())):(Gn=!!parseFloat(wn[0]),Dn=!!parseFloat(wn[1]),wn=parseFloat(wn.slice(2))),hn=parseFloat(b()),Ee===Ee.toLowerCase()&&(wn=Fe.x+wn,hn=Fe.y+hn),Fe.h(wn,hn),Px(a,Qt,Xe,En,Gn,Dn,wn,hn);break;case"Z":bx(a),Fe.assign(ht);break;case"F":for(Qt="",Xe=1;pt[ie+Xe];)if(pt[ie+Xe]==="0")zt=!0,Xe++;else if(pt[ie+Xe].match(/[Uu]/)!==null)Xe++;else if(pt[ie+Xe].match(_e)===null)Xe++;else{Qt=pt[ie+Xe];break}Qt.match(/[Mm]/)?yt=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Qt="",Xe=1;pt[ie+Xe];)if(pt[ie+Xe].match(/[Ff]/)!==null)Xe++;else if(pt[ie+Xe].match(_e)===null)Xe++;else{Qt=pt[ie+Xe];break}Qt.match(/[Mm]/)?Mt=!0:a.mc.isShadowed=!1}if(ht=a.os,Rm=a,y)for(y=ht.figures.iterator;y.next();)y.value.isFilled=!0;return ht},bn.Ha=function(a,y){for(var x=a.length,b=Le.alloc(),E=0;E<x;E++){var et=a[E];b.x=et[0],b.y=et[1],y.Ga(b),et[0]=b.x,et[1]=b.y,b.x=et[2],b.y=et[3],y.Ga(b),et[2]=b.x,et[3]=b.y,b.x=et[4],b.y=et[5],y.Ga(b),et[4]=b.x,et[5]=b.y,b.x=et[6],b.y=et[7],y.Ga(b),et[6]=b.x,et[7]=b.y}Le.free(b)},bn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===bn.o){if(this.aq!==this.figures.Ja)return!0;for(var a=this.figures.s,y=a.length,x=0;x<y;x++)if(a[x].Zu())return!0}return!1},bn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===bn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var b=a[x];b._isInvalidBounds=!1;var E=b.segments;b.sr=E.Ja,b=E.s,E=b.length;for(var et=0;et<E;et++){var nt=b[et];nt._isInvalidBounds=!1,nt.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),Wl(this,a,!1),Ai(a,0,0,0,0),a.freeze()},bn.prototype.ix=function(){var a=new on;return Wl(this,a,!0),a};function Wl(a,y,x){switch(a.type){case bn.j:case bn.u:case bn.F:x?y.h(a.od,a.pd,0,0):Ai(y,a.od,a.pd,0,0),Ai(y,a.Dc,a.Ec,0,0);break;case bn.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var et=a[E];x&&E===0?y.h(et.startX,et.startY,0,0):Ai(y,et.startX,et.startY,0,0);for(var nt=et.segments.s,st=nt.length,ht=et.startX,pt=et.startY,yt=0;yt<st;yt++){var Mt=nt[yt];switch(Mt.type){case ki:case bo:ht=Mt.endX,pt=Mt.endY,Ai(y,ht,pt,0,0);break;case Wo:Ge.Dl(ht,pt,Mt.point1X,Mt.point1Y,Mt.point2X,Mt.point2Y,Mt.endX,Mt.endY,.5,y),ht=Mt.endX,pt=Mt.endY;break;case cs:Ge.iv(ht,pt,Mt.point1X,Mt.point1Y,Mt.endX,Mt.endY,.5,y),ht=Mt.endX,pt=Mt.endY;break;case ao:case Cs:var zt=Mt.type===ao?$a(Mt,et):Rs(Mt,et,ht,pt),Zt=zt.length;if(Zt===0){ht=Mt.type===ao?Mt.centerX:Mt.endX,pt=Mt.type===ao?Mt.centerY:Mt.endY,Ai(y,ht,pt,0,0);break}Mt=null;for(var Qt=0;Qt<Zt;Qt++)Mt=zt[Qt],Ge.Dl(Mt[0],Mt[1],Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,y);Mt!==null&&(ht=Mt[6],pt=Mt[7]);break;default:Oe("Unknown Segment type: "+Mt.type)}}}break;default:Oe("Unknown Geometry type: "+a.type)}}bn.prototype.normalize=function(){this._isFrozen&&Ke(this);var a=this.ix();return this.offset(-a.x,-a.y),new Le(-a.x,-a.y)},bn.prototype.offset=function(a,y){return this._isFrozen&&Ke(this),this.transform(1,0,0,1,a,y),this},bn.prototype.scale=function(a,y){return this._isFrozen&&Ke(this),this.transform(a,0,0,y,0,0),this},bn.prototype.rotate=function(a,y,x){this._isFrozen&&Ke(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=xr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),xr.free(b),this},qt=bn.prototype,qt.transform=function(a,y,x,b,E,et){switch(this.type){case bn.j:case bn.u:case bn.F:var nt=this.od,st=this.pd;this.od=nt*a+st*x+E,this.pd=nt*y+st*b+et,nt=this.Dc,st=this.Ec,this.Dc=nt*a+st*x+E,this.Ec=nt*y+st*b+et;break;case bn.o:for(var ht=this.figures.s,pt=ht.length,yt=0;yt<pt;yt++){var Mt=ht[yt];nt=Mt.startX,st=Mt.startY,Mt.startX=nt*a+st*x+E,Mt.startY=nt*y+st*b+et,Mt=Mt.segments.s;for(var zt=Mt.length,Zt=0;Zt<zt;Zt++){var Qt=Mt[Zt];switch(Qt.type){case ki:case bo:nt=Qt.endX,st=Qt.endY,Qt.endX=nt*a+st*x+E,Qt.endY=nt*y+st*b+et;break;case Wo:nt=Qt.point1X,st=Qt.point1Y,Qt.point1X=nt*a+st*x+E,Qt.point1Y=nt*y+st*b+et,nt=Qt.point2X,st=Qt.point2Y,Qt.point2X=nt*a+st*x+E,Qt.point2Y=nt*y+st*b+et,nt=Qt.endX,st=Qt.endY,Qt.endX=nt*a+st*x+E,Qt.endY=nt*y+st*b+et;break;case cs:nt=Qt.point1X,st=Qt.point1Y,Qt.point1X=nt*a+st*x+E,Qt.point1Y=nt*y+st*b+et,nt=Qt.endX,st=Qt.endY,Qt.endX=nt*a+st*x+E,Qt.endY=nt*y+st*b+et;break;case ao:nt=Qt.centerX,st=Qt.centerY,Qt.centerX=nt*a+st*x+E,Qt.centerY=nt*y+st*b+et,y!==0&&(nt=180*Math.atan2(y,a)/Math.PI,0>nt&&(nt+=360),Qt.startAngle+=nt),0>a&&(Qt.startAngle=180-Qt.startAngle,Qt.sweepAngle=-Qt.sweepAngle),0>b&&(Qt.startAngle=-Qt.startAngle,Qt.sweepAngle=-Qt.sweepAngle),Qt.radiusX*=Math.sqrt(a*a+x*x),Qt.radiusY!==void 0&&(Qt.radiusY*=Math.sqrt(y*y+b*b));break;case Cs:if(nt=Qt.endX,st=Qt.endY,Qt.endX=nt*a+st*x+E,Qt.endY=nt*y+st*b+et,Qt.radiusX===0||Qt.radiusY===0)break;y!==0&&(nt=180*Math.atan2(y,a)/Math.PI,0>nt&&(nt+=360),Qt.xAxisRotation+=nt),0>a&&(Qt.xAxisRotation=180-Qt.xAxisRotation,Qt.isClockwiseArc=!Qt.isClockwiseArc),0>b&&(Qt.xAxisRotation=-Qt.xAxisRotation,Qt.isClockwiseArc=!Qt.isClockwiseArc),Qt.radiusX*=Math.sqrt(a*a+x*x),Qt.radiusY*=Math.sqrt(y*y+b*b);break;default:Oe("Unknown Segment type: "+Qt.type)}}}}return this._isInvalidBounds=!0,this},qt.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,et=this.Ec;switch(this.type){case bn.j:return Ge.Yb(x,b,E,et,y,a.x,a.y);case bn.u:var nt=on.allocAt(Math.min(x,E)-y,Math.min(b,et)-y,Math.abs(E-x)+2*y,Math.abs(et-b)+2*y);return a=nt.ca(a),on.free(nt),a;case bn.F:nt=Math.min(x,E)-y;var st=Math.min(b,et)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(et-b)+2*y)/2,0>=x||0>=y?!1:(nt=a.x-(nt+x),st=a.y-(st+y),1>=nt*nt/(x*x)+st*st/(y*y));case bn.o:return hs(this,a,y,!0,!1);default:return!1}};function hs(a,y,x,b,E){var et=y.x;y=y.y;for(var nt=a.bounds.x-20,st=0,ht,pt,yt,Mt,zt=a.figures.s,Zt=zt.length,Qt=0;Qt<Zt;Qt++){var ie=zt[Qt],Ee=!ie.isEvenOdd;if(ie.isFilled){if(b&&ie.ca(et,y,x))return!0;var we=ie.segments;ht=ie.startX,pt=ie.startY;for(var je=ht,Fe=pt,De=we.s,_e=0;_e<=we.length;_e++){var Xe=void 0;if(_e!==we.length){Xe=De[_e];var En=Xe.type;a=Xe.endX,Mt=Xe.endY}else En=ki,a=je,Mt=Fe;switch(En){case bo:if(je=Qa(et,y,nt,y,ht,pt,je,Fe),isNaN(je))return!0;st+=je,je=a,Fe=Mt;break;case ki:if(ht=Qa(et,y,nt,y,ht,pt,a,Mt),isNaN(ht))return!0;st+=ht;break;case Wo:yt=Ge.Fo(ht,pt,Xe.point1X,Xe.point1Y,Xe.point2X,Xe.point2Y,a,Mt,nt,y,et,y,.5),st+=yt;break;case cs:yt=Ge.Fo(ht,pt,(ht+2*Xe.point1X)/3,(pt+2*Xe.point1Y)/3,(2*Xe.point1X+a)/3,(2*Xe.point1Y+Mt)/3,a,Mt,nt,y,et,y,.5),st+=yt;break;case ao:case Cs:En=Xe.type===ao?$a(Xe,ie):Rs(Xe,ie,ht,pt);var Gn=En.length;if(Gn===0){if(ht=Qa(et,y,nt,y,ht,pt,Xe.type===ao?Xe.centerX:Xe.endX,Xe.type===ao?Xe.centerY:Xe.endY),isNaN(ht))return!0;st+=ht;break}Xe=null;for(var Dn=0;Dn<Gn;Dn++){if(Xe=En[Dn],Dn===0){if(yt=Qa(et,y,nt,y,ht,pt,Xe[0],Xe[1]),isNaN(yt))return!0;st+=yt}yt=Ge.Fo(Xe[0],Xe[1],Xe[2],Xe[3],Xe[4],Xe[5],Xe[6],Xe[7],nt,y,et,y,.5),st+=yt}Xe!==null&&(a=Xe[6],Mt=Xe[7]);break;default:Oe("Unknown Segment type: "+Xe.type)}ht=a,pt=Mt}if(Ee){if(st!==0)return!0}else if(st%2!==0)return!0;st=0}else if(ie.ca(et,y,E?x:x+2))return!0}return!1}function Qa(a,y,x,b,E,et,nt,st){if(Ge.Yb(E,et,nt,st,.05,a,y))return NaN;var ht=(a-x)*(et-st);if(ht===0)return 0;var pt=((a*b-y*x)*(E-nt)-(a-x)*(E*st-et*nt))/ht;if(y=(a*b-y*x)*(et-st)/ht,pt>=a)return 0;if((E>nt?E-nt:nt-E)<(et>st?et-st:st-et)){if(et<st){if(y<et||y>st)return 0}else if(y<st||y>et)return 0}else if(E<nt){if(pt<E||pt>nt)return 0}else if(pt<nt||pt>E)return 0;return 0<ht?1:-1}function gl(a,y,x,b){a=a.figures.s;for(var E=a.length,et=0;et<E;et++)if(a[et].ca(y,x,b))return!0;return!1}qt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Le),this.type===bn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,et=this.flattenedTotalLength*a,nt=0,st=0;st<E;st++){var ht=b[st],pt=ht.length;for(a=0;a<pt;a++){var yt=ht[a];if(nt+yt>=et)return b=et-nt,b=yt===0?0:b/yt,x=x[st],st=x[2*a],E=x[2*a+1],y.h(st+(x[2*a+2]-st)*b,E+(x[2*a+3]-E)*b),y;nt+=yt}}return y},qt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===bn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,b=y.length,E=this.flattenedTotalLength*a,et=0,nt=0;nt<b;nt++){var st=x[nt],ht=st.length;for(a=0;a<ht;a++){var pt=st[a];if(et+pt>=E)return E=y[nt],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;et+=pt}}return NaN},qt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===bn.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,et=this.flattenedTotalLength*a,nt=0,st=0;st<E;st++){var ht=b[st],pt=ht.length;for(a=0;a<pt;a++){var yt=ht[a];if(nt+yt>=et)return b=et-nt,b=yt===0?0:b/yt,yt=x[st],x=yt[2*a],st=yt[2*a+1],E=yt[2*a+2],a=yt[2*a+3],y[0]=x+(E-x)*b,y[1]=st+(a-st)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-st)?0:1>Math.abs(E-x)?0<=a-st?90:270:1>Math.abs(a-st)?0<=E-x?0:180:180*Math.atan2(a-st,E-x)/Math.PI,y;nt+=yt}}return y},qt.xx=function(a){if(this.type===bn.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var et=a.x;if(a=a.y,y===b){if(x<E){var nt=x;b=E}else nt=E,b=x;return a<=nt?nt===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-nt)}if(x===E)return y<b?nt=y:(nt=b,b=y),et<=nt?nt===y?0:1:et>=b?b===y?0:1:Math.abs(et-y)/(b-nt);nt=(b-y)*(b-y)+(E-x)*(E-x);var st=Le.alloc();return Ge.qh(y,x,b,E,et,a,st),a=st.x,et=st.y,Le.free(st),Math.sqrt(((a-y)*(a-y)+(et-x)*(et-x))/nt)}}else if(this.type===bn.u){nt=this.startX,st=this.startY;var ht=this.endX;if(E=this.endY,nt!==ht||st!==E){y=ht-nt,x=E-st,et=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,nt),ht),a=Math.min(Math.max(a,st),E),nt=Math.abs(b-nt),ht=Math.abs(b-ht),st=Math.abs(a-st),E=Math.abs(a-E);var pt=Math.min(nt,ht,st,E);if(pt===st)return b/et;if(pt===ht)return(y+a)/et;if(pt===E)return(2*y+x-b)/et;if(pt===nt)return(2*y+2*x-a)/et}}else{y=this.flattenedSegments,x=this.flattenedLengths,et=this.flattenedTotalLength,b=Le.alloc(),E=1/0,st=nt=0,ht=y.length;for(var yt=pt=0,Mt=0;Mt<ht;Mt++)for(var zt=y[Mt],Zt=x[Mt],Qt=zt.length,ie=0;ie<Qt;ie+=2){var Ee=zt[ie],we=zt[ie+1];if(ie!==0){Ge.qh(pt,yt,Ee,we,a.x,a.y,b);var je=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);je<E&&(E=je,nt=st,nt+=Math.sqrt((b.x-pt)*(b.x-pt)+(b.y-yt)*(b.y-yt))),st+=Zt[(ie-2)/2]}pt=Ee,yt=we}return Le.free(b),a=nt/et,0>a?0:1<a?1:a}return 0};function cu(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===bn.j)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.endY),y.push(b),E.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(E);else if(a.type===bn.u)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.startY),b.push(a.endX),b.push(a.endY),b.push(a.startX),b.push(a.endY),b.push(a.startX),b.push(a.startY),y.push(b),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),x.push(E);else if(a.type===bn.F){var et=new wo;et.startX=a.endX,et.startY=(a.startY+a.endY)/2;var nt=new ti(ao);if(nt.startAngle=0,nt.sweepAngle=360,nt.centerX=(a.startX+a.endX)/2,nt.centerY=(a.startY+a.endY)/2,nt.radiusX=Math.abs(a.startX-a.endX)/2,nt.radiusY=Math.abs(a.startY-a.endY)/2,et.add(nt),a=$a(nt,et),E=a.length,E===0)b.push(nt.centerX),b.push(nt.centerY);else{nt=et.startX,et=et.startY;for(var st=0;st<E;st++){var ht=a[st];Ge.Qe(nt,et,ht[2],ht[3],ht[4],ht[5],ht[6],ht[7],.5,b),nt=ht[6],et=ht[7]}}y.push(b),x.push(Jc(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),nt=E.startX,et=E.startY,st=nt,ht=et;for(var pt=E.segments.s,yt=pt.length,Mt=0;Mt<yt;Mt++){var zt=pt[Mt];switch(zt.type){case bo:4<=b.length&&(y.push(b),x.push(Jc(b))),b=[],b.push(zt.endX),b.push(zt.endY),nt=zt.endX,et=zt.endY,st=nt,ht=et;break;case ki:b.push(zt.endX),b.push(zt.endY),nt=zt.endX,et=zt.endY;break;case Wo:Ge.Qe(nt,et,zt.point1X,zt.point1Y,zt.point2X,zt.point2Y,zt.endX,zt.endY,.5,b),nt=zt.endX,et=zt.endY;break;case cs:Ge.ep(nt,et,zt.point1X,zt.point1Y,zt.endX,zt.endY,.5,b),nt=zt.endX,et=zt.endY;break;case ao:var Zt=$a(zt,E),Qt=Zt.length;if(Qt===0){b.push(zt.centerX),b.push(zt.centerY),nt=zt.centerX,et=zt.centerY;break}for(var ie=0;ie<Qt;ie++){var Ee=Zt[ie];Ge.Qe(nt,et,Ee[2],Ee[3],Ee[4],Ee[5],Ee[6],Ee[7],.5,b),nt=Ee[6],et=Ee[7]}break;case Cs:if(Zt=Rs(zt,E,nt,et),Qt=Zt.length,ie=zt.endX,Ee=zt.endY,Qt===0){b.push(ie),b.push(Ee),nt=ie,et=Ee;break}for(ie=0;ie<Qt;ie++)Ee=Zt[ie],Ge.Qe(nt,et,Ee[2],Ee[3],Ee[4],Ee[5],Ee[6],Ee[7],.5,b),nt=Ee[6],et=Ee[7];break;default:Oe("Segment not of valid type: "+zt.type)}zt.isClosed&&(b.push(st),b.push(ht))}4<=b.length&&(y.push(b),x.push(Jc(b)))}}}function Jc(a){for(var y=[],x=0,b=0,E=a.length,et=0;et<E;et+=2){var nt=a[et],st=a[et+1];et!==0&&y.push(Math.sqrt(yr(x,b,nt,st))),x=nt,b=st}return y}qt.add=function(a){return this.ee.add(a),this},qt.pm=function(a,y,x,b,E,et,nt,st){return this._isFrozen&&Ke(this),this.fg=new rr(a,y,E,et).freeze(),this.gg=new rr(x,b,nt,st).freeze(),this},un.Object.defineProperties(bn.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},flattenedSegments:{get:function(){return cu(this),this.tk}},flattenedLengths:{get:function(){return cu(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===bn.j){a=Math.abs(this.endX-this.startX);var y=Math.abs(this.endY-this.startY);a=Math.sqrt(a*a+y*y)}else if(this.type===bn.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,b=a=0;b<x;b++)for(var E=y[b],et=E.length,nt=0;nt<et;nt++)a+=E[nt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&Ke(this,a),this.na=a,a===bn.o?this.ee=new mn:(bn.V===null&&(bn.V=new mn().freeze()),this.ee=bn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Ke(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Ke(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Ke(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Ke(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Ke(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Ke(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Ke(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Ke(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),bn.prototype.setSpots=bn.prototype.pm,bn.prototype.add=bn.prototype.add,bn.prototype.getFractionForPoint=bn.prototype.xx,bn.prototype.getPointAndAngleAlongPath=bn.prototype.Qu,bn.prototype.getAngleAlongPath=bn.prototype.wx,bn.prototype.getPointAlongPath=bn.prototype.Pu,bn.prototype.containsPoint=bn.prototype.ca,bn.prototype.transform=bn.prototype.transform,bn.prototype.rotate=bn.prototype.rotate,bn.prototype.scale=bn.prototype.scale,bn.prototype.offset=bn.prototype.offset,bn.prototype.normalize=bn.prototype.normalize,bn.prototype.computeBoundsWithoutOrigin=bn.prototype.ix,bn.prototype.equalsApprox=bn.prototype.Xa,bn.className="Geometry",bn.j=new tn(bn,"Line",0),bn.u=new tn(bn,"Rectangle",1),bn.F=new tn(bn,"Ellipse",2),bn.o=new tn(bn,"Path",3),bn.V=null,bn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",bn.className="Geometry",bn.stringify=bn.ia,bn.fillPath=bn.nb,bn.parse=bn.parse,bn.Line=bn.j,bn.Rectangle=bn.u,bn.Ellipse=bn.F,bn.Path=bn.o;function wo(a,y,x,b,E){oi(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 mn,this.sr=this.pl.Ja,this.fw=null}wo.prototype.copy=function(){var a=new wo;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 et=y[E].copy();b.add(et)}return a.sr=this.sr,a.fw=this.fw,a},qt=wo.prototype,qt.Xa=function(a){if(!(a instanceof wo&&Ge.B(this.startX,a.startX)&&Ge.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},qt.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},qt.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},qt.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},qt.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},qt.add=function(a){return this.pl.add(a),this},qt.ca=function(a,y,x){for(var b=this.startX,E=this.startY,et=b,nt=E,st=this.segments.s,ht=st.length,pt=0;pt<ht;pt++){var yt=st[pt];switch(yt.type){case bo:et=yt.endX,nt=yt.endY,b=yt.endX,E=yt.endY;break;case ki:if(Ge.Yb(b,E,yt.endX,yt.endY,x,a,y))return!0;b=yt.endX,E=yt.endY;break;case Wo:if(Ge.cs(b,E,yt.point1X,yt.point1Y,yt.point2X,yt.point2Y,yt.endX,yt.endY,.5,a,y,x))return!0;b=yt.endX,E=yt.endY;break;case cs:if(Ge.jv(b,E,yt.point1X,yt.point1Y,yt.endX,yt.endY,.5,a,y,x))return!0;b=yt.endX,E=yt.endY;break;case ao:case Cs:var Mt=yt.type===ao?$a(yt,this):Rs(yt,this,b,E),zt=Mt.length,Zt=yt.type===ao?yt.centerX:yt.endX,Qt=yt.type===ao?yt.centerY:yt.endY;if(zt===0){if(Ge.Yb(b,E,Zt,Qt,x,a,y))return!0;b=Zt,E=Qt;break}for(Zt=null,Qt=0;Qt<zt;Qt++)if(Zt=Mt[Qt],Qt===0&&Ge.Yb(b,E,Zt[0],Zt[1],x,a,y)||Ge.cs(Zt[0],Zt[1],Zt[2],Zt[3],Zt[4],Zt[5],Zt[6],Zt[7],.5,a,y,x))return!0;Zt!==null&&(b=Zt[6],E=Zt[7]);break;default:Oe("Unknown Segment type: "+yt.type)}if(yt.isClosed&&(b!==et||E!==nt)&&Ge.Yb(b,E,et,nt,x,a,y))return!0}return!1},un.Object.defineProperties(wo.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&&Ke(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Ke(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Ke(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Ke(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Ke(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Ke(this,a),this.pl=a,this._isInvalidBounds=!0}}}),wo.prototype.add=wo.prototype.add,wo.prototype.equalsApprox=wo.prototype.Xa,wo.className="PathFigure";function ti(a,y,x,b,E,et,nt,st){oi(this),a===void 0&&(a=ki),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),et===void 0&&(et=0),nt===void 0&&(nt=0),a===Cs?(a=et%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof nt=="boolean"?nt&&(this.isLargeArc=!0):typeof nt=="number"&&nt&&(this.isLargeArc=!0),st&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===ao&&(et=Math.max(et,0)),this.Wh=et,typeof nt=="number"?(a===ao&&(nt=Math.max(nt,0)),this.Pg=nt):this.Pg=0),this.ae=null}ti.prototype.copy=function(){var a=new ti;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},qt=ti.prototype,qt.Xa=function(a){if(!(a instanceof ti)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case bo:case ki:return Ge.B(this.endX,a.endX)&&Ge.B(this.endY,a.endY);case Wo:return Ge.B(this.endX,a.endX)&&Ge.B(this.endY,a.endY)&&Ge.B(this.point1X,a.point1X)&&Ge.B(this.point1Y,a.point1Y)&&Ge.B(this.point2X,a.point2X)&&Ge.B(this.point2Y,a.point2Y);case cs:return Ge.B(this.endX,a.endX)&&Ge.B(this.endY,a.endY)&&Ge.B(this.point1X,a.point1X)&&Ge.B(this.point1Y,a.point1Y);case ao:return Ge.B(this.startAngle,a.startAngle)&&Ge.B(this.sweepAngle,a.sweepAngle)&&Ge.B(this.centerX,a.centerX)&&Ge.B(this.centerY,a.centerY)&&Ge.B(this.radiusX,a.radiusX)&&Ge.B(this.radiusY,a.radiusY);case Cs:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Ge.B(this.xAxisRotation,a.xAxisRotation)&&Ge.B(this.endX,a.endX)&&Ge.B(this.endY,a.endY)&&Ge.B(this.radiusX,a.radiusX)&&Ge.B(this.radiusY,a.radiusY);default:return!1}},qt.qb=function(a){a.classType===ti&&(this.type=a)},qt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case bo:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ki:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Wo: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 cs: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 ao: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":"")},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return this._isFrozen=!1,this},qt.close=function(){return this.isClosed=!0,this};function $a(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,et=Ge.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var nt=xr.alloc();nt.reset(),x<b?nt.scale(1,b/x):nt.scale(x/b,1),bn.Ha(et,nt),xr.free(nt)}for(x=et.length,b=0;b<x;b++)nt=et[b],nt[0]+=y,nt[1]+=E,nt[2]+=y,nt[3]+=E,nt[4]+=y,nt[5]+=E,nt[6]+=y,nt[7]+=E;return a.ae=et,a.ae}function Rs(a,y,x,b){function E(ie,Ee,we,je){return(ie*je<Ee*we?-1:1)*Math.acos((ie*we+Ee*je)/(Math.sqrt(ie*ie+Ee*Ee)*Math.sqrt(we*we+je*je)))}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 et=a.Pg;y===0&&(y=1e-4),et===0&&(et=1e-4);var nt=Math.PI/180*a.Ne,st=a.isLargeArc,ht=a.isClockwiseArc,pt=a.Dc,yt=a.Ec,Mt=Math.cos(nt),zt=Math.sin(nt),Zt=Mt*(x-pt)/2+zt*(b-yt)/2;nt=-zt*(x-pt)/2+Mt*(b-yt)/2;var Qt=Zt*Zt/(y*y)+nt*nt/(et*et);return 1<Qt&&(y*=Math.sqrt(Qt),et*=Math.sqrt(Qt)),Qt=(st===ht?-1:1)*Math.sqrt((y*y*et*et-y*y*nt*nt-et*et*Zt*Zt)/(y*y*nt*nt+et*et*Zt*Zt)),isNaN(Qt)&&(Qt=0),st=Qt*y*nt/et,Qt=Qt*-et*Zt/y,isNaN(st)&&(st=0),isNaN(Qt)&&(Qt=0),x=(x+pt)/2+Mt*st-zt*Qt,b=(b+yt)/2+zt*st+Mt*Qt,yt=E(1,0,(Zt-st)/y,(nt-Qt)/et),Mt=(Zt-st)/y,pt=(nt-Qt)/et,Zt=(-Zt-st)/y,st=(-nt-Qt)/et,nt=E(Mt,pt,Zt,st),Zt=(Mt*Zt+pt*st)/(Math.sqrt(Mt*Mt+pt*pt)*Math.sqrt(Zt*Zt+st*st)),-1>=Zt?nt=Math.PI:1<=Zt&&(nt=0),!ht&&0<nt&&(nt-=2*Math.PI),ht&&0>nt&&(nt+=2*Math.PI),ht=y>et?1:y/et,Zt=y>et?et/y:1,y=Ge.jx(0,0,y>et?y:et,yt,yt+nt,!0),et=xr.alloc(),et.reset(),et.translate(x,b),et.rotate(a.Ne,0,0),et.scale(ht,Zt),bn.Ha(y,et),xr.free(et),a.ae=y,a.ae}un.Object.defineProperties(ti.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&&Ke(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Ke(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Ke(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Ke(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Ke(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Ke(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Ke(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Ke(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Ke(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Ln(a,">= zero",ti,"radiusX"),this._isFrozen&&Ke(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Ln(a,">= zero",ti,"radiusY"),this._isFrozen&&Ke(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Ke(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&&Ke(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&&Ke(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&&Ke(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&&Ke(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),ti.prototype.equalsApprox=ti.prototype.Xa;var bo=new tn(ti,"Move",0),ki=new tn(ti,"Line",1),Wo=new tn(ti,"Bezier",2),cs=new tn(ti,"QuadraticBezier",3),ao=new tn(ti,"Arc",4),Cs=new tn(ti,"SvgArc",4);ti.className="PathSegment",ti.Move=bo,ti.Line=ki,ti.Bezier=Wo,ti.QuadraticBezier=cs,ti.Arc=ao,ti.SvgArc=Cs;function aa(){this.H=null,this.xu=new Le(0,0).freeze(),this.mt=new Le(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}aa.prototype.copy=function(){var a=new aa;return this.clone(a)},aa.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},aa.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},aa.prototype.So=function(a,y){var x=this.diagram;return x===null||Sp(x,a,y),y},aa.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Sp(x,a,y),y.assign(x.Ps(y))),y},un.Object.defineProperties(aa.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}}}),aa.prototype.getMultiTouchDocumentPoint=aa.prototype.Bz,aa.prototype.getMultiTouchViewPoint=aa.prototype.So,aa.className="InputEvent";function Bu(){this.H=null,this.xa="",this.ar=this.Lr=null}Bu.prototype.copy=function(){var a=new Bu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Bu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},un.Object.defineProperties(Bu.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}}}),Bu.className="DiagramEvent";function Ii(){this.Fm=Di,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Ii.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Ii.prototype.copy=function(){var a=new Ii;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=en(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=en(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=en(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=en(y)&&typeof y.J=="function"?y.J():y,a},Ii.prototype.qb=function(a){a.classType===Ii&&(this.change=a)},Ii.prototype.toString=function(){var a="";return a=this.change===qa?a+"* ":this.change===Di?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===qa?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=cr(this.object)),this.oldValue!==null&&(a+=" old: "+cr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+cr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Ii.prototype.I=function(a){return a?this.oldValue:this.newValue},Ii.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Ii.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Ii.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Ii.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Ii.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},un.Object.defineProperties(Ii.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===qa&&(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}}}),Ii.prototype.redo=Ii.prototype.redo,Ii.prototype.canRedo=Ii.prototype.canRedo,Ii.prototype.undo=Ii.prototype.undo,Ii.prototype.canUndo=Ii.prototype.canUndo,Ii.prototype.getParam=Ii.prototype.Dz,Ii.prototype.getValue=Ii.prototype.I,Ii.prototype.clear=Ii.prototype.clear;var qa=new tn(Ii,"Transaction",-1),Di=new tn(Ii,"Property",0),$i=new tn(Ii,"Insert",1),vo=new tn(Ii,"Remove",2);Ii.className="ChangedEvent",Ii.Transaction=qa,Ii.Property=Di,Ii.Insert=$i,Ii.Remove=vo;function Mo(){this.o=new mn().freeze(),this.xa="",this.j=!1}Mo.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},Mo.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()},Mo.prototype.canUndo=function(){return this.isComplete},Mo.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()}},Mo.prototype.canRedo=function(){return this.isComplete},Mo.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()}},Mo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new $n,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===Di&&b.object){var E=y.get(b.object);E||(E=new $n,y.set(b.object,E));var et=E.get(b.propertyName);et===null?E.set(b.propertyName,-1):(0<et&&a.cd(et,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()}},un.Object.defineProperties(Mo.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}}}),Mo.prototype.optimize=Mo.prototype.ak,Mo.prototype.redo=Mo.prototype.redo,Mo.prototype.canRedo=Mo.prototype.canRedo,Mo.prototype.undo=Mo.prototype.undo,Mo.prototype.canUndo=Mo.prototype.canUndo,Mo.prototype.clear=Mo.prototype.clear,Mo.className="Transaction";function Ri(){this.Pt=new gn,this.Jd=!1,this.u=new mn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new mn().freeze(),this.hl=new mn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Ri.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},Ri.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},Ri.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},qt=Ri.prototype,qt.Xw=function(a){this.Pt.add(a)},qt.Rx=function(a){this.Pt.remove(a)},qt.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},qt.eb=function(a){return a===void 0&&(a=""),wh(this,!0,a)},qt.Kf=function(){return wh(this,!1,"")};function wh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&An("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 et=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var nt=a.Ie.count;0<nt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(nt-1),a.Ie.freeze()),nt=a.hl.count,0<nt&&(et=a.hl.M(nt-1),a.hl.mb(nt-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&&(et=y.M(0),et!==null&&et.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=et,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}qt.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()}},Ri.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Ri.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){An("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Ri.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Ri.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){An("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Ri.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Ii;for(b.change=qa,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},Ri.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Mo);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||An("Change not within a transaction: "+x.toString()))}},Ri.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},un.Object.defineProperties(Ri.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}}}),Ri.prototype.handleChanged=Ri.prototype.Tu,Ri.prototype.redo=Ri.prototype.redo,Ri.prototype.undo=Ri.prototype.undo,Ri.prototype.canUndo=Ri.prototype.canUndo,Ri.prototype.discardHistoryAfterIndex=Ri.prototype.lx,Ri.prototype.rollbackTransaction=Ri.prototype.Kf,Ri.prototype.commitTransaction=Ri.prototype.eb,Ri.prototype.startTransaction=Ri.prototype.Ea,Ri.prototype.removeModel=Ri.prototype.Rx,Ri.prototype.addModel=Ri.prototype.Xw,Ri.prototype.clear=Ri.prototype.clear,Ri.className="UndoManager";function $r(){oi(this),this.H=Kl,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new aa,this.Zr=-1}$r.prototype.toString=function(){return this.name!==""?this.name+" Tool":Un(this.constructor)},$r.prototype.updateAdornments=function(){},$r.prototype.canStart=function(){return this.isEnabled},$r.prototype.doStart=function(){},$r.prototype.doActivate=function(){this.isActive=!0},$r.prototype.doDeactivate=function(){this.isActive=!1},$r.prototype.doStop=function(){},$r.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},$r.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},$r.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},$r.prototype.doMouseMove=function(){},$r.prototype.doMouseUp=function(){this.stopTool()},$r.prototype.doMouseWheel=function(){},$r.prototype.canStartMultiTouch=function(){return!0},$r.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Le.allocAt(NaN,NaN)),b=y.So(1,Le.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,et=b.y-x.y;a.Jw=Math.sqrt(E*E+et*et),y.bubbles=!1}Le.free(x),Le.free(b)},$r.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Le.allocAt(NaN,NaN)),b=y.So(1,Le.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,et=b.y-x.y;et=Math.sqrt(E*E+et*et)/a.Jw,E=new Le((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),et*=a.Bw;var nt=a.commandHandler;if(et!==a.scale&&nt.canResetZoom(et)){var st=a.zoomPoint;a.zoomPoint=E,nt.resetZoom(et),a.zoomPoint=st}y.bubbles=!1}Le.free(x),Le.free(b)},$r.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},$r.prototype.doKeyUp=function(){},$r.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},$r.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},$r.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Yr?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||(Yr?y.meta:y.control)||y.shift||a.clearSelection()}},$r.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,Dg(a,b,x),b.handled};function Dg(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)}}}$r.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 et=a.Ck,nt=et;for(a.Ck=b,this.doCurrentObjectChanged(et,b),y.handled=!1;et!==null;){var st=et.mouseLeave;if(st!==null&&(b===et||b!==null&&b.rg(et)||(st(y,et,b),E=!0,y.handled)))break;et=et.panel}for(et=nt,y.handled=!1;b!==null&&(nt=b.mouseEnter,!(nt!==null&&(et===b||et!==null&&et.rg(b)||(nt(y,b,et),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(et=b,nt="";et!==null&&(nt=et.cursor,nt==="");)et=et.panel;for(a.currentCursor=nt,y.handled=!1,et=b;et!==null&&(b=et.mouseOver,!(b!==null&&(b(y,et),E=!0,y.handled)));)et=et.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},$r.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},$r.prototype.doCurrentObjectChanged=function(){},$r.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===Qc&&!y.shift||E===fc&&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===Qc&&y.shift||E===fc&&!y.control){b=a.position.copy();var et=y.event;E=et.deltaMode;var nt=et.deltaX;et=et.deltaY;var st="pixel";if(nt===0&&et===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(st,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(st,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:st="pixel";break;case 1:st="line";break;case 2:st="page"}nt!==0&&a.allowHorizontalScroll&&(nt*=a.scrollHorizontalLineChange/16,a.scroll(st,0<nt?"right":"left",Math.abs(nt))),et!==0&&a.allowVerticalScroll&&(et*=a.scrollVerticalLineChange/16,a.scroll(st,0<et?"down":"up",Math.abs(et)))}this.doWheelChange(a,b,y)}}},$r.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},$r.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Nr(function(){x.doWaitAfter(b)},a)},$r.prototype.cancelWaitAfter=function(){this.Zr!==-1&&xn.clearTimeout(this.Zr),this.Zr=-1},$r.prototype.doWaitAfter=function(){},$r.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof qr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},$r.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},un.Object.defineProperties($r.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Je&&(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}}}),$r.prototype.startTransaction=$r.prototype.Ea,$r.className="Tool";function Fi(){$r.call(this),this.name="ToolManager",this.hb=new mn,this.ob=new mn,this.Hb=new mn,this.F=this.V=850,this.o=new Cn(2,2).ja(),this.Ha=5e3,this.ia=fc,this.u=Hf,this.Mp=this.j=null,this.zj=-1}$e(Fi,$r),Fi.prototype.initializeStandardTools=function(){},Fi.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof qr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Fi.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===fu&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===bh){y.bubbles=!0;return}if(this.gestureBehavior===fu)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===fc?this.mouseWheelBehavior=Qc:this.mouseWheelBehavior===Qc&&(this.mouseWheelBehavior=fc)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Fi.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===bh){y.bubbles=!0;return}if(this.gestureBehavior===fu)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}}Bg(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Bg(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Fi.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof qr&&(y===a||y.rg(a))||this.hideToolTip()},Fi.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()))},Fi.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)},Fi.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 qr)||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()},Fi.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof qr){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 Al&&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=Nr(function(){E.hideToolTip()},a)}},Fi.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}},Fi.prototype.hideToolTip=function(){this.zj!==-1&&(xn.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof qr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Al&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Fi.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()},Fi.prototype.doMouseWheel=function(){this.standardMouseWheel()},Fi.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Fi.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Fi.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},Fi.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},Fi.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)},un.Object.defineProperties(Fi.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 qr?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}}}),Fi.prototype.replaceStandardTool=Fi.prototype.gb;var fc=new tn(Fi,"WheelScroll",0),Qc=new tn(Fi,"WheelZoom",1),ep=new tn(Fi,"WheelNone",2),Hf=new tn(Fi,"GestureZoom",3),fu=new tn(Fi,"GestureCancel",4),bh=new tn(Fi,"GestureNone",5);Fi.className="ToolManager",Fi.WheelScroll=fc,Fi.WheelZoom=Qc,Fi.WheelNone=ep,Fi.GestureZoom=Hf,Fi.GestureCancel=fu,Fi.GestureNone=bh;function _i(){$r.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 Le(NaN,NaN),this.Fr=new Le,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new gn().freeze(),this.ia=new ct,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Hl;$e(_i,$r),_i.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},_i.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},_i.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,(Yr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},_i.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),Io=null,this.isActive=!0,this.tl.set(a.position),Vf(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&&Oa(a),sd(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Io=this,Gu=this.diagram,this.doSimulatedDragOut()))};function Vf(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 fs,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}_i.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},_i.prototype.Pd=function(a){return a===void 0?new yu(Ti):this.isGridSnapEnabled?new yu(new Le(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new yu(a.copy())},_i.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Ph(this),Dh(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Hl.count){for(var y=Hl,x=y.length,b=0;b<x;b++){var E=y.M(b);Iu(E),tl(E),Ph(E),E.diagram.ug()}y.clear()}Iu(this),this.tl.h(NaN,NaN),Gu!==null&&(Gu.currentCursor=""),Io=Gu=null,tl(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),cf(a,!0)},_i.prototype.stopTransaction=function(){var a=this.diagram,y=$r.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Ph(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,rp(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function np(){var a=Io;tl(a),Ru(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}_i.prototype.doCancel=function(){tl(this),Ru(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},_i.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},_i.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function du(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")):Ru(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 $n,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var et=y.I(E);et!==null&&(et.location=E.location,et.Va(),x.add(et,a.Pd(et.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof Pn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,Vf(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,ah(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function tl(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 Le(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Iu(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 Ll(a,y,x){var b=a.diagram,E=a.startPoint,et=Le.alloc();et.assign(b.lastInput.documentPoint),a.moveParts(y,et.re(E),x),Le.free(et),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Oa(b),b.hk())}_i.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Fh(b,a,y,this.dragOptions,x)};function Ru(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()),ah(b,-E.x,-E.y)}y.bd()}}function Kf(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),_u(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var et=x.skipsUndoManager,nt=!1;try{if(x.skipsUndoManager=!0,nt=rp(a,E,b),!a.isActive&&Io===null)return;var st=b!==null?b.part:null;if(st===null||x.handlesDragDropForTopLevelParts&&st.isTopLevel&&!(st instanceof Pr)){var ht=x.mouseDragOver;ht!==null&&(ht(E),nt=!0)}if(!a.isActive&&Io===null||(a.doDragOver(y,b),!a.isActive&&Io===null))return}finally{x.skipsUndoManager=et,nt&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}_i.prototype.findDragOverObject=function(a){var y=this;return Zl(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof qr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},_i.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 rp(a,y,x){var b=!1,E=a.Cg.length,et=0<E?a.Cg[0]:null;if(x===et)return!1;y.handled=!1;for(var nt=0;nt<E;nt++){var st=a.Cg[nt],ht=st.mouseDragLeave;if(ht!==null&&(ht(y,st,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&Io===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=ip(E);for(E=a.Cg.length,x=0;x<E&&(nt=a.Cg[x],st=nt.mouseDragEnter,st===null||(st(y,nt,et),b=!0,!y.handled));x++);return b}function ip(a){var y=a.panel;return y!==null?y:a instanceof nr&&!(a instanceof Pr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Ig(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(pt){return b.findValidLinkablePort(pt,x)});a=Le.alloc();var et=1/0,nt=null;for(E=E.iterator;E.next();){var st=E.value;if(st.part!==null){var ht=st.ga(Dr,a);ht=y.Bf(ht),ht<et&&(nt=st,et=ht)}}return Le.free(a),nt}function _u(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 et=null,nt=null;x.fromNode===null&&(et=Ig(a,x.i(0),!1),et!==null&&(nt=et.part));var st=null,ht=null;x.toNode===null&&(st=Ig(a,x.i(x.pointsCount-1),!0),st!==null&&(ht=st.part)),E.isValidLink(nt,et,ht,st)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=nt,et!==null&&(x.fromPortId=et.portId),x.toNode=ht,st!==null&&(x.toPortId=st.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):Zf(E,nt,et,ht,st):Zf(E,null,null,null,null)}}}}_i.prototype.doDragOver=function(){};function zu(a,y){var x=a.diagram;a.dragsLink&&_u(a,!0),Ph(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var et=b;et!==null;){var nt=et.mouseDrop;if(nt!==null&&(nt(E,et),E.handled))break;Qv(a,E,et),et=ip(et)}}else et=x.mouseDrop,et!==null&&et(E);if(a.isActive||Io!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)et=E.key,et instanceof Mn&&et.linksConnected.each(function(st){st.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||Io!==null){for(a=on.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Mn&&$v(x,b,a);on.free(a)}}}function Qv(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Pr||(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()}_i.prototype.doDropOnto=function(){},_i.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()?(du(this,!1),sd(a,this.copiedParts),Ll(this,this.copiedParts,!1),Dh(a,this.copiedParts)):this.mayMove()?(tl(this),Ll(this,this.draggedParts,!0)):this.mayDragOut()?(du(this,!1),Ll(this,this.copiedParts,!1)):tl(this),Kf(this,a.lastInput.documentPoint))}},_i.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?(tl(this),du(this,!0),sd(a,this.copiedParts),Ll(this,this.copiedParts,!1),Dh(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,tl(this),this.mayMove()&&(Ll(this,this.draggedParts,!0),Kf(this,a.lastInput.documentPoint))),this.Ym=!0,zu(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&qv(this),a.Ya(),Dh(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},_i.prototype.simulatedMouseMove=function(a,y,x){if(Io===null)return!1;var b=Io.diagram;x instanceof Je||(x=null);var E=Gu;return x!==E&&(E!==null&&E!==b&&(E.ug(),Io.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),Gu=x,x!==null&&x!==b&&(np(),E=x.toolManager.findTool("Dragging"),E!==null&&(Hl.contains(E)||Hl.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)},_i.prototype.simulatedMouseUp=function(a,y,x){if(Io===null)return!1;var b=Gu,E=Io.diagram;if(x===null)return Io.doCancel(),!0;if(x!==b){var et=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&et!==null)return b.ug(),Io.isDragOutStarted=!1,et.doSimulatedDragLeave(),!1;Gu=x,b=x.toolManager.findTool("Dragging"),b!==null&&(np(),Hl.contains(b)||Hl.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 Le),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=Io,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 Mn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}_i.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Yr?!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())},_i.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())},_i.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())},_i.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},_i.prototype.Az=function(){return Io},_i.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Io;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},_i.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ms(a),a.animationManager.Cc(),a=Io,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},_i.prototype.doSimulatedDragLeave=function(){var a=Io;a!==null&&a.doSimulatedDragOut(),this.doCancel()},_i.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Io;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Rg(this,y.draggedParts.Lf(),!1,a.firstInput),Ll(this,this.copiedParts,!1),Kf(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},_i.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Io;if(y!==null){var x=y.diagram;if(y.Ym=!0,tl(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Rg(this,y.draggedParts.Lf(),!0,a.lastInput),Ll(this,this.copiedParts,!1);var b=new gn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),zu(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",b,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function Rg(a,y,x,b){if(a.copiedParts===null){var E=a.diagram;if(!E.isReadOnly&&!E.isModelReadOnly){E.skipsUndoManager=!x,E.partManager.addsToTemporaryLayer=!x,a.startPoint=b.documentPoint,x=E.Kj(y,E,!0);var et=on.alloc();E=b=1/0;for(var nt=-1/0,st=-1/0,ht=y.iterator;ht.next();){var pt=ht.value;if(pt.isVisible()){var yt=pt.location;pt=yt.x,yt=yt.y,isNaN(pt)||isNaN(yt)||(pt<b&&(b=pt),yt<E&&(E=yt),pt>nt&&(nt=pt),yt>st&&(st=yt))}}for(b===1/0?et.h(0,0,0,0):et.h(b,E,nt-b,st-E),b=et.x+et.width/2,E=et.y+et.height/2,on.free(et),et=a.Fr,nt=new $n,st=Le.alloc(),ht=y.iterator;ht.next();)pt=ht.value,pt instanceof Pn&&pt.canCopy()&&(yt=x.I(pt),yt!==null&&(yt.points=pt.points,ah(yt,et.x-b,et.y-E),yt.suspendsRouting=!0,nt.add(yt,a.Pd())));for(y=y.iterator;y.next();)pt=y.value,pt.Zc()&&pt.canCopy()&&(ht=x.I(pt),ht!==null&&(pt=pt.location,st.h(et.x-(b-pt.x),et.y-(E-pt.y)),ht.location=st,ht.Va(),nt.add(ht,a.Pd(st))));Le.free(st),a.copiedParts=nt,Vf(a,nt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,ah(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}_i.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},_i.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new Le},un.Object.defineProperties(_i.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}}}),_i.prototype.getDraggingSource=_i.prototype.Az;var Io=null,Gu=null;_i.className="DraggingTool",Hl=new mn,yn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Fi.prototype.doCancel=function(){Io!==null&&Io.doCancel(),$r.prototype.doCancel.call(this)};function Xi(){$r.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Pn,y=new Lr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Lr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Mn,y=new Lr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Ci,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Mn,y=new Lr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Ci,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 $n,this.Of=this.gj=this.Pf=null}$e(Xi,$r),Xi.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Xi.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var et=y.Df(),nt=Cn.alloc();nt.width=y.naturalBounds.width*et,nt.height=y.naturalBounds.height*et,b.desiredSize=nt,Cn.free(nt),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Dr,et=Le.alloc(),x.location=y.ga(Dr,et),Le.free(et),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},Xi.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Ci,y.fromSpot=Ur,y.toSpot=Ur),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Xi.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Xi.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Mn){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)}},Xi.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Mn))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Mn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},Xi.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,et=y.og(x,b,function(Mt){return E.findValidLinkablePort(Mt,a)},null,!0);for(b=1/0,y=null,et=et.iterator;et.next();){var nt=et.value,st=nt.part;if(st instanceof Mn){var ht=nt.ga(Dr,Le.alloc()),pt=x.x-ht.x,yt=x.y-ht.y;Le.free(ht),ht=pt*pt+yt*yt,ht<b&&(pt=this.validPortsCache.I(nt),pt!==null?pt&&(y=nt,b=ht):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,st,nt)||!a&&this.isValidLink(st,nt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(nt,!0),y=nt,b=ht):this.validPortsCache.add(nt,!1))}}return y!==null&&(x=y.part,x instanceof Mn&&(x.layer===null||x.layer.allowLink))?y:null},Xi.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},Xi.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},Xi.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Xi.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Mn))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Mn))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},Xi.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)},Xi.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 gn;return b.add(a),sa(this,x,y,b)};function sa(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),sa(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),sa(a,y.labeledLink,x,b))))}Xi.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!==mf){if(b===Dp){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!pa(this,a,y,x,!0)}if(b===Bp){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!pa(this,a,y,x,!0)}if(b===jp)return a===y?a=!0:(b=new gn,b.add(y),a=ga(this,b,a,y,x)),!a;if(b===Op)return!pa(this,a,y,x,!1);if(b===Fp)return a===y?a=!0:(b=new gn,b.add(y),a=dc(this,b,a,y,x)),!a}return!0};function pa(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var et=y.linksConnected;et.next();){var nt=et.value;if(nt!==b&&(!E||nt.isTreeLink)&&nt.toNode===y&&(nt=nt.fromNode,nt!==y&&pa(a,nt,x,b,E)))return!0}return!1}function ga(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 et=x.linksConnected;et.next();){var nt=et.value;if(nt!==E&&nt.toNode===x&&(nt=nt.fromNode,nt!==x&&ga(a,y,nt,b,E)))return!0}return!1}function dc(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 et=x.linksConnected;et.next();){var nt=et.value;if(nt!==E){var st=nt.fromNode;if(nt=nt.toNode,st=st===x?nt:st,st!==x&&dc(a,y,st,b,E))return!0}}return!1}un.Object.defineProperties(Xi.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}}}),Xi.className="LinkingBaseTool";function ma(){Xi.call(this),this.name="Linking",this.V={},this.F=null,this.K=Ch,this.Xd=null}$e(ma,Xi),ma.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},ma.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 Mn)))return null;var x=this.direction;if(x===Ch||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===Ch||x===zg)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},ma.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 Mn&&(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 Mn&&(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)},ma.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()},ma.prototype.doStop=function(){Xi.prototype.doStop.call(this),this.startObject=null},ma.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,et=null;try{var nt=this.targetPort=this.findTargetPort(this.isForwards);if(nt!==null){var st=nt.part;st instanceof Mn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=st,E=nt):(y=st,x=nt,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?(et=this.insertLink(y,x,b,E),et!==null?(nt===null&&(this.isForwards?et.defaultToPoint=a.lastInput.documentPoint:et.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),et.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",et)):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(),et&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},ma.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)},ma.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},ma.prototype.doNoLink=function(){},un.Object.defineProperties(ma.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 Ch=new tn(ma,"Either",0),_g=new tn(ma,"ForwardsOnly",0),zg=new tn(ma,"BackwardsOnly",0);ma.className="LinkingTool",ma.Either=Ch,ma.ForwardsOnly=_g,ma.BackwardsOnly=zg;function fs(){Xi.call(this),this.name="Relinking";var a=new Lr;a.figure="Diamond",a.desiredSize=bi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Lr,a.figure="Diamond",a.desiredSize=bi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new on}$e(fs,Xi),fs.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)}},fs.prototype.makeAdornment=function(a,y){var x=new qr;return x.type=vn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},fs.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},fs.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 qr&&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=di),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=di),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},fs.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Nd||x===sh)&&(x=Pa),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}},fs.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()},fs.prototype.doStop=function(){Xi.prototype.doStop.call(this),this.handle=null},fs.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,et=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var nt=this.targetPort.part;nt instanceof Mn&&(this.isForwards?(b=nt,E=this.targetPort):(y=nt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:et=null;et!==null?(this.reconnectLink(et,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?et.defaultToPoint=a.lastInput.documentPoint:et.defaultFromPoint=a.lastInput.documentPoint,et.bb()),this.transactionResult=this.name,a.R("LinkRelinked",et,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},fs.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},fs.prototype.doNoRelink=function(){};function Zf(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)}un.Object.defineProperties(fs.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 qr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),fs.className="RelinkingTool",yn("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),yn("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function qi(){$r.call(this),this.name="LinkReshaping";var a=new Lr;a.figure="Rectangle",a.desiredSize=io,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Lr,a.figure="Diamond",a.desiredSize=bi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Le,this.Yq=new mn}$e(qi,$r),qi.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:op},qi.prototype.om=function(a,y){a.reshapingBehavior=y},qi.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)}},qi.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new qr,E.type=vn.Link,x=y.firstPickIndex;var et=y.lastPickIndex,nt=b?1:0;if(y.resegmentable&&y.computeCurve()!==vs)for(var st=x+nt;st<et-nt;st++){var ht=this.makeResegmentHandle(a,st);ht!==null&&(ht.segmentIndex=st,ht.segmentFraction=.5,ht.fromMaxLinks=999,E.add(ht))}for(nt=x+1;nt<et;nt++)if(st=this.makeHandle(a,nt),st!==null){if(st.segmentIndex=nt,nt!==x)if(nt===x+1&&b){ht=y.i(x);var pt=y.i(x+1);Ge.B(ht.x,pt.x)&&Ge.B(ht.y,pt.y)&&(pt=y.i(x-1)),Ge.B(ht.x,pt.x)?(this.om(st,Hu),st.cursor="n-resize"):Ge.B(ht.y,pt.y)&&(this.om(st,Wu),st.cursor="w-resize")}else nt===et-1&&b?(ht=y.i(et-1),pt=y.i(et),Ge.B(ht.x,pt.x)&&Ge.B(ht.y,pt.y)&&(ht=y.i(et+1)),Ge.B(ht.x,pt.x)?(this.om(st,Hu),st.cursor="n-resize"):Ge.B(ht.y,pt.y)&&(this.om(st,Wu),st.cursor="w-resize")):nt!==et&&(this.om(st,Xf),st.cursor="move");E.add(st)}E.adornedObject=a}return E},qi.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},qi.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},qi.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},qi.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}}},qi.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},qi.prototype.stopTransaction=function(){var a=this.diagram,y=$r.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},qi.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},qi.prototype.getResegmentingPoint=function(){return this.handle.ga(Dr)},qi.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},qi.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),et=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var nt=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(Uu(this,nt,b,E,et,!0)||Uu(this,nt,b,E,et,!1))){var st=y.points.copy();Uu(this,nt,b,E,et,!0)?(st.cd(x-2,new Le(nt.x,(et.y+nt.y)/2)),st.cd(x+1,new Le(et.x,(et.y+nt.y)/2))):(st.cd(x-2,new Le((et.x+nt.x)/2,nt.y)),st.cd(x+1,new Le((et.x+nt.x)/2,et.y))),st.mb(x),st.mb(x-1),y.points=st,y.Wb()}else nt=y.i(x+2),Math.abs(E.x-et.x)<this.resegmentingDistance&&Math.abs(E.y-et.y)<this.resegmentingDistance&&(Uu(this,b,E,et,nt,!0)||Uu(this,b,E,et,nt,!1))&&(st=y.points.copy(),Uu(this,b,E,et,nt,!0)?(st.cd(x-1,new Le(b.x,(b.y+nt.y)/2)),st.cd(x+2,new Le(nt.x,(b.y+nt.y)/2))):(st.cd(x-1,new Le((b.x+nt.x)/2,b.y)),st.cd(x+2,new Le((b.x+nt.x)/2,nt.y))),st.mb(x+1),st.mb(x),y.points=st,y.Wb())}}else nt=Le.alloc(),Ge.qh(b.x,b.y,et.x,et.y,E.x,E.y,nt)&&nt.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),Le.free(nt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Uu(a,y,x,b,E,et){return et?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}qi.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===Hu?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===Wu&&(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===Hu?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===Wu&&(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),et=y.i(b-1),nt=y.i(b+1);Ge.B(et.x,E.x)&&Ge.B(E.y,nt.y)?(Ge.B(et.x,y.i(b-2).x)&&!Ge.B(et.y,y.i(b-2).y)?(y.m(b,a.x,et.y),x++,b++):y.L(b-1,a.x,et.y),Ge.B(nt.y,y.i(b+2).y)&&!Ge.B(nt.x,y.i(b+2).x)?y.m(b+1,nt.x,a.y):y.L(b+1,nt.x,a.y)):Ge.B(et.y,E.y)&&Ge.B(E.x,nt.x)?(Ge.B(et.y,y.i(b-2).y)&&!Ge.B(et.x,y.i(b-2).x)?(y.m(b,et.x,a.y),x++,b++):y.L(b-1,et.x,a.y),Ge.B(nt.x,y.i(b+2).x)&&!Ge.B(nt.y,y.i(b+2).y)?y.m(b+1,a.x,nt.y):y.L(b+1,a.x,nt.y)):Ge.B(et.x,E.x)&&Ge.B(E.x,nt.x)?(Ge.B(et.x,y.i(b-2).x)&&!Ge.B(et.y,y.i(b-2).y)?(y.m(b,a.x,et.y),x++,b++):y.L(b-1,a.x,et.y),Ge.B(nt.x,y.i(b+2).x)&&!Ge.B(nt.y,y.i(b+2).y)?y.m(b+1,a.x,nt.y):y.L(b+1,a.x,nt.y)):Ge.B(et.y,E.y)&&Ge.B(E.y,nt.y)&&(Ge.B(et.y,y.i(b-2).y)&&!Ge.B(et.x,y.i(b-2).x)?(y.m(b,et.x,a.y),x++,b++):y.L(b-1,et.x,a.y),Ge.B(nt.y,y.i(b+2).y)&&!Ge.B(nt.x,y.i(b+2).x)?y.m(b+1,nt.x,a.y):y.L(b+1,nt.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&&(et=b.findVisibleNode(),et!==null&&et!==b&&(b=et,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(et=E.ga(Dr,Le.alloc()),b=y.getLinkPointFromPoint(b,E,et,a,!0,Le.alloc()),y.L(0,b.x,b.y),Le.free(et),Le.free(b)),b=y.toNode,E=y.toPort,b!==null&&(et=b.findVisibleNode(),et!==null&&et!==b&&(b=et,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(Dr,Le.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,Le.alloc()),y.L(y.pointsCount-1,a.x,a.y),Le.free(x),Le.free(a));y.zf()},qi.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Xf:return a;case Hu:return new Le(y.i(x).x,a.y);case Wu:return new Le(a.x,y.i(x).y);default:case op:return y.i(x)}},un.Object.defineProperties(qi.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 qr))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}}}),qi.prototype.setReshapingBehavior=qi.prototype.om,qi.prototype.getReshapingBehavior=qi.prototype.Ru;var op=new tn(qi,"None",0),Wu=new tn(qi,"Horizontal",1),Hu=new tn(qi,"Vertical",2),Xf=new tn(qi,"All",3);qi.className="LinkReshapingTool",qi.None=op,qi.Horizontal=Wu,qi.Vertical=Hu,qi.All=Xf,yn("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Qo(){$r.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 Lr;a.alignmentFocus=Dr,a.figure="Rectangle",a.desiredSize=io,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Le,this.Dw=new Cn,this.Tn=new Le,this.rt=new Cn(0,0),this.qt=new Cn(1/0,1/0),this.pt=new Cn(1,1)}$e(Qo,$r),Qo.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(),Gh(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Qo.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new qr,y.type=vn.Spot,y.locationSpot=Dr;var x=new ba;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,ni)),y.add(this.makeHandle(a,gi)),y.add(this.makeHandle(a,oo)),y.add(this.makeHandle(a,ia)),y.add(this.makeHandle(a,da)),y.add(this.makeHandle(a,Yo)),y.add(this.makeHandle(a,oa)),y.add(this.makeHandle(a,Na))}else if(Hs(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Qo.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Qo.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))t:{var x=a.alignment;if(x.Mc()&&(x=Dr),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof vn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Qo.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},Qo.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))},Qo.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Qo.prototype.stopTransaction=function(){var a=this.diagram,y=$r.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Qo.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Qo.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,Le.alloc()),et=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,et),this.resize(y),a.bd(),Le.free(E)}},Qo.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,Le.alloc()),et=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,et),this.resize(y),Le.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Qo.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 Pr){var b=new mn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new ct;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()}},Qo.prototype.computeResize=function(a,y,x,b,E,et){y.Mc()&&(y=Dr);var nt=this.adornedObject.naturalBounds,st=nt.x,ht=nt.y,pt=nt.x+nt.width,yt=nt.y+nt.height,Mt=1;if(!et){Mt=nt.width;var zt=nt.height;0>=Mt&&(Mt=1),0>=zt&&(zt=1),Mt=zt/Mt}return zt=Le.alloc(),Ge.No(a.x,a.y,st,ht,E.width,E.height,zt),a=nt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(zt.x,pt-b.width),a.x=Math.min(a.x,pt-x.width),a.width=Math.max(pt-a.x,x.width),a.y=Math.max(zt.y,yt-b.height),a.y=Math.min(a.y,yt-x.height),a.height=Math.max(yt-a.y,x.height),et||(1<=a.height/a.width?(a.height=Math.max(Math.min(Mt*a.width,b.height),x.height),a.width=a.height/Mt):(a.width=Math.max(Math.min(a.height/Mt,b.width),x.width),a.height=Mt*a.width),a.x=pt-a.width,a.y=yt-a.height)):1<=y.y?(a.x=Math.max(zt.x,pt-b.width),a.x=Math.min(a.x,pt-x.width),a.width=Math.max(pt-a.x,x.width),a.height=Math.max(Math.min(zt.y-ht,b.height),x.height),et||(1<=a.height/a.width?(a.height=Math.max(Math.min(Mt*a.width,b.height),x.height),a.width=a.height/Mt):(a.width=Math.max(Math.min(a.height/Mt,b.width),x.width),a.height=Mt*a.width),a.x=pt-a.width)):(a.x=Math.max(zt.x,pt-b.width),a.x=Math.min(a.x,pt-x.width),a.width=pt-a.x,et||(a.height=Math.max(Math.min(Mt*a.width,b.height),x.height),a.width=a.height/Mt,a.y=ht+.5*(yt-ht-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(zt.x-st,b.width),x.width),a.y=Math.max(zt.y,yt-b.height),a.y=Math.min(a.y,yt-x.height),a.height=Math.max(yt-a.y,x.height),et||(1<=a.height/a.width?(a.height=Math.max(Math.min(Mt*a.width,b.height),x.height),a.width=a.height/Mt):(a.width=Math.max(Math.min(a.height/Mt,b.width),x.width),a.height=Mt*a.width),a.y=yt-a.height)):1<=y.y?(a.width=Math.max(Math.min(zt.x-st,b.width),x.width),a.height=Math.max(Math.min(zt.y-ht,b.height),x.height),et||(1<=a.height/a.width?(a.height=Math.max(Math.min(Mt*a.width,b.height),x.height),a.width=a.height/Mt):(a.width=Math.max(Math.min(a.height/Mt,b.width),x.width),a.height=Mt*a.width))):(a.width=Math.max(Math.min(zt.x-st,b.width),x.width),et||(a.height=Math.max(Math.min(Mt*a.width,b.height),x.height),a.width=a.height/Mt,a.y=ht+.5*(yt-ht-a.height))):0>=y.y?(a.y=Math.max(zt.y,yt-b.height),a.y=Math.min(a.y,yt-x.height),a.height=yt-a.y,et||(a.width=Math.max(Math.min(a.height/Mt,b.width),x.width),a.height=Mt*a.width,a.x=st+.5*(pt-st-a.width))):1<=y.y&&(a.height=Math.max(Math.min(zt.y-ht,b.height),x.height),et||(a.width=Math.max(Math.min(a.height/Mt,b.width),x.width),a.height=Mt*a.width,a.x=st+.5*(pt-st-a.width))),Le.free(zt),a},Qo.prototype.computeReshape=function(){var a=cn;return this.adornedObject instanceof Lr&&(a=k0(this.adornedObject)),!(a===Vn||this.diagram.lastInput.shift)},Qo.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},Qo.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},Qo.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},un.Object.defineProperties(Qo.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 qr))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 qr)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}}}),Qo.className="ResizingTool",yn("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function va(){$r.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Le,this.ue=null;var a=new Lr;a.figure="Ellipse",a.desiredSize=bi,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Le(NaN,NaN),this.u=0,this.F=50}$e(va,$r),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 qr,y.type=vn.Position,y.locationSpot=Dr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Hs(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(Dr)},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 Le(NaN,NaN),this.isActive=a.isMouseCaptured=!1},va.prototype.stopTransaction=function(){var a=this.diagram,y=$r.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},un.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 qr))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 qr)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",yn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function kh(){$r.call(this),this.name="ClickSelecting"}$e(kh,$r),kh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},kh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},kh.className="ClickSelectingTool";function _s(){$r.call(this),this.name="Action",this.pk=null}$e(_s,$r),_s.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},_s.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()},_s.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))}},_s.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()},_s.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())},_s.prototype.doStop=function(){this.pk=null},_s.className="ActionTool";function Vu(){$r.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Le(0,0)}$e(Vu,$r),Vu.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)},Vu.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Vu.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 nr)x.Zc()&&(Hs(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);en(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var et=Le.allocAt(a.x,a.y);this.isGridSnapEnabled&&ad(this.diagram,b,a,et),b.location=et,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),Le.free(et)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},un.Object.defineProperties(Vu.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}}}),Vu.className="ClickCreatingTool";function ks(){$r.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new nr;a.layerName="Tool",a.selectable=!1;var y=new Lr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}$e(ks,$r),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 on(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),Yr?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 mn,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)}},un.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 Ho(){$r.call(this),this.name="Panning",this.Xt=new Le,this.xy=new Le,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()}}$e(Ho,$r),Ho.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())},Ho.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},Ho.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Ho.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Ho.prototype.doMouseMove=function(){this.move()},Ho.prototype.doMouseUp=function(){this.move(),this.stopTool()},Ho.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)}},un.Object.defineProperties(Ho.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Ho.className="PanningTool",yn("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),yn("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),yn("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),yn("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),yn("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Al(){this.F=this.u=this.j=this.o=null}un.Object.defineProperties(Al.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}}}),Al.className="HTMLInfo";function zs(a,y,x){this.text=a,this.hx=y,this.visible=x}zs.className="ContextMenuButtonInfo";function ya(){$r.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Le,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}$e(ya,$r);function el(a){var y=new Al;y.show=function(E,et,nt){nt.showDefaultContextMenu()},y.hide=function(E,et){et.hideDefaultContextMenu()},Eh=y,a.tu=function(){a.stopTool()},y=Nn("div");var x=Nn("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=Nn("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)),qc=y,pc=x,$c=!0}function to(a){return a.preventDefault(),!1}ya.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)},ya.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},ya.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},ya.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof Je||(a instanceof ze?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},ya.prototype.doActivate=function(){},ya.prototype.doMouseDown=function(){if($r.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof qr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&ml(this)},ya.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof qr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}ml(this)};function ml(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Al||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(pu(a,!0),a.isActive||a.stopTool())}ya.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function pu(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=Eh,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof ze?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof qr&&!a.currentContextMenu.visible&&a.stopTool()}}ya.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},ya.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof qr){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 Al&&a.show(y,x,this);this.currentContextMenu=a},ya.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}},ya.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof qr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Al&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Ku(a){var y=new mn;return y.add(new zs("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new zs("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new zs("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new zs("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new zs("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new zs("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new zs("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new zs("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new zs("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new zs("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new zs("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new zs("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new zs("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}ya.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Ku(this)),qc.innerHTML="",pc.addEventListener("pointerdown",this.tu,!1);var y=this,x=Nn("ul");x.className="goCXul",qc.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,et=E.visible;if(typeof E.hx=="function"&&(typeof et!="function"||et(a))){et=Nn("li"),et.className="goCXli";var nt=Nn("a");nt.className="goCXa",nt.href="#",nt.ky=E.hx,nt.addEventListener("pointerdown",function(st){return this.ky(a),y.stopTool(),st.preventDefault(),!1},!1),nt.textContent=E.text,et.appendChild(nt),x.appendChild(et)}}qc.style.display="block",pc.style.display="block"},ya.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Eh){qc.style.display="none",pc.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(pc,"pointerdown",this.tu,!1),this.currentContextMenu=null}},un.Object.defineProperties(ya.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof qr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return $c===!1&&Eh===null&&Wi&&el(this),Eh},set:function(a){a===null&&($c=!0),Eh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Eh=null,$c=!1,pc=null,qc=null;ya.className="ContextMenuTool",yn("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Ei(){$r.call(this),this.name="TextEditing",this.Zh=new Si,this.ia=null,this.V=gc,this.vj=null,this.qa=mc,this.u=1,this.F=!0,this.o=null,this.j=new Al,this.kt=null,tf(this,this.j)}$e(Ei,$r);function tf(a,y){if(Wi){var x=Nn("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(ef)):E==="Tab"?(a.acceptText(Jf),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==mc){var b=a.kt;a.qa===nf&&(a.qa=rf),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==mc){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,et){if(b instanceof Si&&et instanceof Ei)if(et.state===of)x.style.border="3px solid red",x.focus();else{var nt=b.ga(Dr),st=E.position,ht=E.scale,pt=b.Df()*ht;pt<et.minimumEditorScale&&(pt=et.minimumEditorScale);var yt=b.naturalBounds.width*pt+6,Mt=b.naturalBounds.height*pt+2,zt=(nt.x-st.x)*ht;nt=(nt.y-st.y)*ht,st=b.verticalAlignment,ht=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*pt,Mt=st.y*Mt-st.y*ht+st.offsetY-(.5*Mt-.5*ht)-ht/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*pt+"%",x.style.lineHeight="normal",x.style.width=yt+"px",x.style.left=(zt-yt/2|0)-1+"px",x.style.top=(nt+Mt|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=pt,x.className="goTXarea",E.div.appendChild(x),x.focus(),et.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}Ei.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Zu&&Zu!==this&&(Zu.acceptText(Nl),Zu&&Zu!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Si&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===gc&&!y.isSelected||this.starting===Qf&&2>a.lastInput.clickCount)):!1},Ei.prototype.doStart=function(){Zu=this,this.textBlock!==null&&this.doActivate()},Ei.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 Si&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=nf;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new on(this.textBlock.ga(ni),this.textBlock.ga(oo));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Ei.prototype.doCancel=function(){this.stopTool()},Ei.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Ei.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Nl)},Ei.prototype.acceptText=function(a){switch(a){case Nl:this.qa===vc?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===nf||this.qa===of||this.qa===rf)&&(this.qa=sp,ap(this));break;case Yf:case ef:case Jf:(ef!==a||this.textBlock.isMultiline!==!0)&&(this.qa===nf||this.qa===of||this.qa===rf)&&(this.qa=sp,ap(this))}};function ap(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,et="";b.valueFunction!==null&&(et=b.valueFunction()),a.isValidText(y,E,et)?(a.Ea(a.name),a.qa=vc,a.transactionResult=a.name,y.text=et,a.doSuccess(E,et),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=of,a.doError(E,et))}}Ei.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)},Ei.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Ei.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=mc,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Ei.prototype.doStop=function(){Zu=null},Ei.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)))},Ei.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},un.Object.defineProperties(Ei.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)}}}),Ei.prototype.measureTemporaryTextBlock=Ei.prototype.Lx;var Yf=new tn(Ei,"LostFocus",0),Nl=new tn(Ei,"MouseDown",1),Jf=new tn(Ei,"Tab",2),ef=new tn(Ei,"Enter",3),t0=new tn(Ei,"SingleClick",0),gc=new tn(Ei,"SingleClickSelected",1),Qf=new tn(Ei,"DoubleClick",2),mc=new tn(Ei,"StateNone",0),nf=new tn(Ei,"StateActive",1),rf=new tn(Ei,"StateEditing",2),sp=new tn(Ei,"StateValidating",3),of=new tn(Ei,"StateInvalid",4),vc=new tn(Ei,"StateValidated",5),Zu=null;Ei.className="TextEditingTool",Ei.LostFocus=Yf,Ei.MouseDown=Nl,Ei.Tab=Jf,Ei.Enter=ef,Ei.SingleClick=t0,Ei.SingleClickSelected=gc,Ei.DoubleClick=Qf,Ei.StateNone=mc,Ei.StateActive=nf,Ei.StateEditing=rf,Ei.StateValidating=sp,Ei.StateInvalid=of,Ei.StateValidated=vc,yn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function ts(a){sf||(lp(),sf=!0),this.H=Kl,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=mu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new gn,this.ce=new Vo,this.ce.Yd=this,this.Ei=new gn,this.pu=new gn,this.Sr=new gn,this.pr=new gn,a&&Object.assign(this,a)}ts.prototype.Xe=function(a){this.H=a},ts.prototype.canStart=function(){return!0};function Vl(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Ko(a.H),a.zb=!0)}function $f(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===mu?(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===up&&y.vc.clear(),a.Qw=!!(a.Pk===lf&&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(),uf(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==la&&b!==null&&(delete b.start.scale,delete b.end.scale),xn.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Oa(x),pp(x),a.zb=!1,y.start(),y.bc&&(Xu(a),x.Ya(),hp(y,0),Ms(x,!0),Mh(a),x.R("AnimationStarting",a)))}))}}function gu(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function qf(a,y,x,b){a.isTicking||gu(a)||y instanceof Pn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}qt=ts.prototype,qt.fv=function(a){return this.ce.fv(a)},qt.Xu=function(a){return this.ce.Xu(a)};function td(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 et=E.pu.iterator;et.next();){var nt=et.value;if(nt.bc!==!1){t:if(0<nt.yl.count)var st=!0;else{for(st=nt.vc.iterator;st.next();){var ht=st.key;if(ht instanceof ze&&ht.diagram!==null||ht instanceof Je){st=!0;break t}}st=!1}st?hf(nt,!1):nt.Xk=!0}}E.pu.clear(),E.bc!==!1&&(Xu(E),Ms(E.H),Mh(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 Xu(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 Mh(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}qt.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(),uf(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),uf(y,this.H)},qt.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))},qt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Ua(this,a))},qt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Yu(this.ce,y,"position",y.position,y.position),Ua(this,a))};function Ug(a,y,x){!a.zb||y.D(x)||gu(a)||(a.H.pi||(y=x.copy()),Yu(a.ce,a.H,"position",y,x))}function ed(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Ua(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Th(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var et=a[0],nt=a[1],st=a[2];a=a[3];var ht=y[0],pt=y[1],yt=y[2];return y=y[3],st===0||st===100?(et=ht,nt=pt):(yt===0||yt===100)&&(ht=et,pt=nt),180<Math.abs(ht-et)&&(ht>et?et+=360:ht+=360),et=E(x,et,ht-et,b)%360,nt=E(x,nt,pt-nt,b),st=E(x,st,yt-st,b),x=E(x,a,y-a,b),"hsla("+et+", "+nt+"%, "+st+"%, "+x+")"}function lp(){function a(x,b,E,et,nt,st){x.position=new Le(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st))}var y=new $n;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,et,nt,st){nt<st?x.mm(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st),!1):x.position=new Le(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st))}),y.add("location",function(x,b,E,et,nt,st){nt<st?x.mm(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st),!0):x.location=new Le(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st))}),y.add("position:placeholder",function(x,b,E,et,nt,st){nt<st?x.mm(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st),!1):x.position=new Le(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st))}),y.add("position:nodeCollapse",function(x,b,E,et,nt,st){var ht=x.actualBounds,pt=E.actualBounds;E=pt.x+pt.width/2-ht.width/2,ht=pt.y+pt.height/2-ht.height/2,nt<st?x.mm(et(nt,b.x,E-b.x,st),et(nt,b.y,ht-b.y,st),!1):x.position=new Le(et(nt,b.x,E-b.x,st),et(nt,b.y,ht-b.y,st))}),y.add("desiredSize",function(x,b,E,et,nt,st){x.desiredSize=new on(et(nt,b.width,E.width-b.width,st),et(nt,b.height,E.height-b.height,st))}),y.add("width",function(x,b,E,et,nt,st){x.width=et(nt,b,E-b,st)}),y.add("height",function(x,b,E,et,nt,st){x.height=et(nt,b,E-b,st)}),y.add("fill",function(x,b,E,et,nt,st){x.fill=Th(b,E,nt,st,et)}),y.add("stroke",function(x,b,E,et,nt,st){x.stroke=Th(b,E,nt,st,et)}),y.add("strokeWidth",function(x,b,E,et,nt,st){x.strokeWidth=et(nt,b,E-b,st)}),y.add("strokeDashOffset",function(x,b,E,et,nt,st){x.strokeDashOffset=et(nt,b,E-b,st)}),y.add("background",function(x,b,E,et,nt,st){x.background=Th(b,E,nt,st,et)}),y.add("areaBackground",function(x,b,E,et,nt,st){x.areaBackground=Th(b,E,nt,st,et)}),y.add("opacity",function(x,b,E,et,nt,st){x.opacity=et(nt,b,E-b,st)}),y.add("scale",function(x,b,E,et,nt,st){x.scale=et(nt,b,E-b,st)}),y.add("angle",function(x,b,E,et,nt,st){x.angle=et(nt,b,E-b,st)}),af=y}un.Object.defineProperties(ts.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&&Ln(a,">= 1",ts,"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}}}),ts.prototype.stopAnimation=ts.prototype.Cc;var af=null,sf=!1,mu=new tn(ts,"Default",1),lf=new tn(ts,"AnimateLocations",2),up=new tn(ts,"None",3);ts.className="AnimationManager",ts.defineAnimationEffect=function(a,y){sf||(lp(),sf=!0),af.add(a,y)},ts.Default=mu,ts.AnimateLocations=lf,ts.None=up;function Vo(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=yc,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Ti,this.vc=new $n,this.Tt=new $n,this.yl=new gn,this.Ut=new gn,this.dw=$u,a&&Object.assign(this,a)}Vo.prototype.suspend=function(){this.Xk=!0},Vo.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,hf(this,!0),Xu(this.Yd),Ms(this.H),Mh(this.Yd),this.H.redraw()};function uf(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}qt=Vo.prototype,qt.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 Je?a=x:x instanceof ze&&(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===mu&&this===y.defaultAnimation&&(this.Lp=Wg,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=vf),Xu(y),this.yl.each(function(b){b.data=null,a.add(b)}),Mh(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,td(y,this),this)},qt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},qt.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof Je?this.H=a:a instanceof ze&&a.diagram!==null&&(this.H=a.diagram)),a instanceof nr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return Yu(this,a,y,x,b,E),this};function Yu(a,y,x,b,E,et){var nt=a.vc;if(y instanceof Je&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(xu(b),s0(),b=[ms.j,ms.u,ms.o,ms.F],xu(E),s0(),E=[ms.j,ms.u,ms.o,ms.F]),nt.contains(y)){var st=nt.I(y),ht=st.start,pt=st.end;ht[x]===void 0&&(ht[x]=Lh(b)),pt[x]=Lh(E)}else ht={},pt={},ht[x]=Lh(b),pt[x]=Lh(E),st=ht.position,y instanceof ze&&st instanceof Le&&!st.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&st.assign(pt.position),st=new Ah(ht,pt,et),nt.add(y,st);nt=ht[x],nt instanceof Le&&!nt.w()&&nt.assign(a.o),et&&x.indexOf("position:")===0&&y instanceof nr?st.Ku.location=Lh(y.location):et&&(st.Ku[x]=Lh(b))}function Lh(a){return a instanceof Le||a instanceof Cn?a.copy():a}qt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},qt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function hf(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),Xu(x),hp(a,E),Ms(a.H,!0),Mh(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 hp(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var et=b.key;if(!(et instanceof ze&&et.diagram===null)){var nt=b.value,st=E?nt.end:nt.start;nt=E?nt.start:nt.end;var ht=af,pt;for(pt in nt)pt==="position"&&(nt["position:placeholder"]||nt["position:nodeCollapse"])||ht.get(pt)===null||ht.get(pt)(et,st[pt],nt[pt],a.Lp,y,x,a)}}}qt.stop=function(){return this.bc?(this.Ml(!0),this):this},qt.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,Xu(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 et=af;b.next();){var nt=b.key,st=b.value,ht=E?st.end:st.start,pt=E?st.start:st.end,yt=st.Ku,Mt;for(Mt in pt)if(et.get(Mt)!==null){var zt=Mt;!st.Hu||zt!=="position:nodeCollapse"&&zt!=="position:placeholder"||(zt="position"),et.get(zt)(nt,ht[Mt],yt[Mt]!==void 0?yt[Mt]:st.Hu?ht[Mt]:pt[Mt],this.Lp,this.Gd,this.Gd,this)}st.Hu&&yt.location!==void 0&&nt instanceof nr&&(nt.location=yt.location),st.nv&&nt instanceof nr&&nt.Zb(!1)}if(y.As.clear(),cf(y,!1),y.Ya(),y.N(),Ms(y,!0),x.defaultAnimation===this){for(Mt=x.pr.iterator;Mt.next();)E=Mt.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Ms(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Mh(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),uf(this,null),x.Ml(this),y.$b())}},qt.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Pr&&(b=y.placeholder),b!==null?(x=b.ga(ni),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Le(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Pr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Mn&&this.Cj(b,y)},qt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Pr&&(x=y.placeholder),x!==null){var b=x.ga(ni);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof Pr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Mn&&this.Aj(b,y)}},qt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},un.Object.defineProperties(Vo.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Ln(a,">= 1",Vo,"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:Oe("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}}}),Vo.prototype.getTemporaryState=Vo.prototype.Ez,Vo.prototype.stop=Vo.prototype.stop,Vo.prototype.add=Vo.prototype.add,Vo.prototype.addTemporaryPart=Vo.prototype.Iy;function yc(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Wg(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}Vo.className="Animation",Vo.EaseLinear=function(a,y,x,b){return x*a/b+y},Vo.EaseInOutQuad=yc,Vo.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},Vo.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},Vo.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},Vo.EaseOutExpo=Wg;function Ah(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Ah.className="AnimationState";function nl(a,y,x){this.xd=null,this.rf=a,this.so=x||cp,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Nh))}nl.prototype.copy=function(){var a=new nl(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 Hg(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))}un.Object.defineProperties(nl.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 cp=new tn(nl,"Default",1),Nh=new tn(nl,"Immediate",2),Sc=new tn(nl,"Bundled",3);nl.className="AnimationTrigger",nl.Default=cp,nl.Immediate=Nh,nl.Bundled=Sc;function Oo(a){oi(this),this.H=null,this.Pa=new mn,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)}qt=Oo.prototype,qt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,ta(x)}a.clear(),this.Zq.length=0},qt.Xe=function(a){this.H=a},qt.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,et=0,nt=0,st=this.Pa.iterator;st.next();){var ht=st.value;ht instanceof Pr?E++:ht instanceof Mn?b++:ht instanceof Pn?et++:ht instanceof qr?nt++:x++}if(st="",0<x&&(st+=x+" Parts "),0<b&&(st+=b+" Nodes "),0<E&&(st+=E+" Groups "),0<et&&(st+=et+" Links "),0<nt&&(st+=nt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,st+=`
|
|
`+x.toString(),b=x.data,b!==null&&mi(b)&&(st+=" #"+mi(b)),x instanceof Mn?st+=" "+cr(b):x instanceof Pn&&(st+=" "+cr(x.fromNode)+" "+cr(x.toNode));return y+" "+this.Pa.count+": "+st},qt.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=Le.alloc(),et=this.Pa.s,nt=et.length;nt--;){var st=et[nt];if((b!==!0||Gh(st)!==!1)&&st.isVisible()&&(E.assign(a),mr(E,st.oe),st=st.ic(E,y,x),st!==null&&(y!==null&&(st=y(st)),st!==null&&(x===null||x(st)))))return Le.free(E),st}return Le.free(E),null},qt.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof mn||b instanceof gn||(b=new gn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var et=Le.alloc(),nt=this.Pa.s,st=nt.length;st--;){var ht=nt[st];if((E!==!0||Gh(ht)!==!1)&&ht.isVisible()){et.assign(a),mr(et,ht.oe);var pt=ht;ht.ji(et,y,x,b)&&(y!==null&&(pt=y(pt)),pt===null||x!==null&&!x(pt)||b.add(pt))}}return Le.free(et),b},qt.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 mn||E instanceof gn||(E=new gn),this.Uh===!1)return E;var et=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(et=!0);for(var nt=this.Pa.s,st=nt.length;st--;){var ht=nt[st];if((et!==!0||Gh(ht)!==!1)&&ht.isVisible()){var pt=ht;ht.Cf(a,y,x,b,E)&&(y!==null&&(pt=y(pt)),pt===null||x!==null&&!x(pt)||E.add(pt))}}return E},qt.Nu=function(a,y,x,b,E,et,nt){if(this.Uh===!1)return E;for(var st=this.Pa.s,ht=st.length;ht--;){var pt=st[ht];if((nt!==!0||Gh(pt)!==!1)&&et(pt)&&pt.isVisible()){var yt=pt;pt.Cf(a,y,x,b,E)&&(y!==null&&(yt=y(yt)),yt===null||x!==null&&!x(yt)||E.add(yt))}}return E},qt.og=function(a,y,x,b,E,et){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof mn||E instanceof gn)&&(et=E),E=!0),et instanceof mn||et instanceof gn||(et=new gn),this.Uh===!1)return et;var nt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(nt=!0);for(var st=Le.alloc(),ht=Le.alloc(),pt=this.Pa.s,yt=pt.length;yt--;){var Mt=pt[yt];if((nt!==!0||Gh(Mt)!==!1)&&Mt.isVisible()){st.assign(a),mr(st,Mt.oe),ht.h(a.x+y,a.y),mr(ht,Mt.oe);var zt=Mt;Mt.og(st,ht,x,b,E,et)&&(x!==null&&(zt=x(zt)),zt===null||b!==null&&!b(zt)||et.add(zt))}}return Le.free(st),Le.free(ht),et},qt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Fn();for(var E=Fn(),et=0;et<b;et++){var nt=x[et];if(nt.vw=et,nt instanceof Pn){if(nt.fd===!1)continue}else if(nt instanceof qr&&nt.adornedPart!==null)continue;var st=nt.actualBounds;nt.isVisible()&&Ml(st,y)?(nt.Fd(!0),a.push(nt)):(nt.Fd(!1),nt.adornments!==null&&0<nt.adornments.count&&E.push(nt))}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]);Bn(a),Bn(E)}}};function vu(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}qt.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=vu(this,a);var et=this.Zq;et.length=0;for(var nt=y.scale,st=on.alloc(),ht=0;ht<b;ht++)this.Oj(a,x[ht],y,et,nt,st,!0);if(on.free(st),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Vg(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var et=E.length;if(et!==0){var nt=vu(a,y),st=a.Zq;st.length=0;for(var ht=x.scale,pt=on.alloc(),yt=0;yt<et;yt++){var Mt=E[yt];b.contains(Mt)&&a.Oj(y,Mt,x,st,ht,pt,!1)}on.free(pt),y.globalAlpha=nt}}}qt.Oj=function(a,y,x,b,E,et,nt){if(nt&&!Gh(y))a.Hs(y);else{if(b!==null&&y instanceof Pn&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(nt=!1,b=y.containingGroup;b!==null;)nt?b.tb!==null&&et.Ex(b.tb):b.tb!==null&&(nt=!0,et.assign(b.tb)),b=b.containingGroup;var st=y.actualBounds;if(b=!1,nt&&y.isVisible()){if(!et.Yc(st)){a.Hs(y);return}b=!et.Re(st)}b&&(a.save(),a instanceof es?a.bk=et.copy():(a.beginPath(),a.rect(et.x,et.y,et.width,et.height),a.clip())),st.width*E>x.Oq||st.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,et=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(Ki(y,a,y.areaBackground,!0,!0,et,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(Ki(y,a,"rgba(0,0,0,0.3)",!0,!1,et,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),Ki(y,a,y.background,!0,!1,et,E),a.fillRect(0,0,et.width/2,et.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))}},qt.g=function(a,y,x,b,E){var et=this.diagram;et!==null&&et.cb(Di,a,this,y,x,b,E)},qt.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&ta(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)),nd(this,a,y),a},qt.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,ta(y),a};function nd(a,y,x){if(y=Kg(a,y,x),x instanceof Pr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,et=E.length,nt=0;nt<et;nt++){var st=E[nt];if(st===x&&(y=nt,0<=b)||0>b&&st.containingGroup===x&&(b=nt,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&nd(a,-1,y)}x.svg!==null&&x.svg.remove()}function Kg(a,y,x){var b=x.zOrder;if(isNaN(b))return y;a=a.Pa;var E=a.count;if(1>=E)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var et=y-1,nt=NaN;0<=et&&(nt=a.M(et).zOrder,!!isNaN(nt));)et--;for(var st=y+1,ht=NaN;st<E&&(ht=a.M(st).zOrder,!!isNaN(ht));)st++;if(!isNaN(nt)&&nt>b)for(;;){if(et===-1||nt<=b){if(et++,et===y)break;return a.mb(y),a.Gb(et,x),et}for(nt=NaN;0<=--et&&(nt=a.M(et).zOrder,isNaN(nt)););}else if(!isNaN(ht)&&ht<b)for(;;){if(st===E||ht>=b){if(st--,st===y)break;return a.mb(y),a.Gb(st,x),st}for(ht=NaN;++st<E&&(ht=a.M(st).zOrder,isNaN(ht)););}return y}un.Object.defineProperties(Oo.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===""&&Oe("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Oe("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)&&Ln(a,"0 <= value <= 1",Oo,"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))}}}),Oo.prototype.findObjectsNear=Oo.prototype.og,Oo.prototype.findObjectsIn=Oo.prototype.Cf,Oo.prototype.findObjectsAt=Oo.prototype.ji,Oo.prototype.findObjectAt=Oo.prototype.ic,Oo.className="Layer";function Je(a,y){if(am||($o(),am=!0),oi(this),Kl=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Wi){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,dd.add("Model",li);var E=this;return this.Hb=function(et){var nt=E.partManager;if(et.model===nt.diagram.model&&nt.diagram.aa){nt.diagram.aa=!1;try{var st=et.change;et.modelChange===""&&st===Di&&nt.updateDataBindings(et.object,et.propertyName)}finally{nt.diagram.aa=!0}}},this.Oc=function(et){E.partManager.doModelChanged(et)},this.hu=this.ku=null,Zg(this),this.model=cy(),this.Wg=!0,Yg(this),this.layout=new ji,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?dp(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var jh,Kl;function Zg(a){a.Yd=new ts,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new mn,a.pj=new $n,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Le(NaN,NaN).freeze(),a.du=new Le(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Le(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new xr,a.zu=new Le(NaN,NaN).freeze(),a.ut=new on(NaN,NaN,NaN,NaN).freeze(),a.rj=new Br(0,0,0,0).freeze(),a.sj=$u,a.nu=!1,a.Zt=null,a.fu=null,a.yh=la,a.zk=jo,a.Fg=la,a.pq=jo,a.yt=ni,a.Bt=ni,a.Fc=!0,a.pn=!1,a.De=new gn,a.Eh=new $n,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Br(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new aa,a.bq.diagram=a,a.Qg=new aa,a.Qg.diagram=a,a.cj=new aa,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,n0(a),a.ai=new gn,a.Ht=!0,a.uu=qu,a.pw=!1,a.wu=mf,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 $n,a.Xn=new mn,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 Br(5).freeze(),a.Hw=new gn().freeze(),a.Nt=999999999,a.nw=new gn().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 gn,a.ow=new gn,a.Xh=null,a.aw=new Cn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Le,bounds:new on,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 on(NaN,NaN,NaN,NaN).freeze(),a.wo=new Cn(NaN,NaN).freeze(),a.Sp=new on(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new $n;var y=new Mn,x=new Si;x.bind(new eo("text","",cr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Mn,x=new Si,x.stroke="brown",x.bind(new eo("text","",cr)),y.add(x),a.Lg.add("Comment",y),y=new Mn,y.selectable=!1,y.avoidable=!1,x=new Lr,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 $n,y=new Pr,y.selectionObjectName="GROUPPANEL",y.type=vn.Vertical,x=new Si,x.font="bold 12pt sans-serif",x.bind(new eo("text","",cr)),y.add(x),x=new vn(vn.Auto),x.name="GROUPPANEL";var b=new Lr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new ba,b.padding=new Br(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new $n,y=new Pn,x=new Lr,x.isPanelMain=!0,y.add(x),x=new Lr,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 Lr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new qr,y.type=vn.Auto,x=new Lr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new ba,x.margin=new Br(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new qr,y.type=vn.Link,x=new Lr,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 li,a.toolManager=new Fi,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ct,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Xg(),a.eq=null,a.fq=pi,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 Le,a.zy=500,a.wp=new Le,a.wq=!1}Je.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Ec=null,Ih="",fp(this,!1),this.Xn.clear(),Ed(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function fp(a,y){a.animationManager.Cc(!0),a.Hw=new gn().freeze(),a.nw=new gn().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 et=[],nt=a.Wa.length;if(y){for(y=0;y<nt;y++)for(var st=a.Wa.s[y].parts;st.next();){var ht=st.value;ht!==E&&ht.data===null&&et.push(ht)}for(y=0;y<et.length;y++)a.remove(et[y])}for(y=0;y<nt;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(),Ed(),a.Og.clear(),fi=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),et}function Xg(){return null}Je.prototype.reset=function(){this.clear(),this.vb=!0,Zg(this),Ol(this),this.Wg=!0,Yg(this),this.layout=new ji,this.Wg=!1,this.model=cy(),this.model.undoManager=new Ri,this.vb=this.rn=!1,this.N()},Je.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=xn.document.body);var y=Nn("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},Je.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=xn.document.body);var y=0;if(Wi){var x=om;y=jh,x===null&&(x=om=Nn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=jh=Nn("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||Yr||(y=11)}this.Db=y,this.Gw=!0},Je.prototype.qb=function(a){a.classType===Je&&(this.autoScale=a)},Je.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 dp(a,y){if(Wi){if(y!=null||Oe("Diagram setup requires an argument DIV."),a.Ka!==null&&Oe("Diagram has already completed setup."),typeof y=="string"?a.Ka=xn.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Oe("No DIV or DIV id supplied: "+y),a.Ka===null&&Oe("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Oe("Invalid div id; div already has a Diagram associated with it."),!a.ol&&xn.ResizeObserver){var x=vr(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 Ws(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),wp(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new Ws(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,Wi){E=Nn("div");var et=Nn("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",et.style.position="absolute",et.style.width="1px",et.style.height="1px",a.Ka.appendChild(E),E.appendChild(et),E.onscroll=Qg,E.addEventListener("pointerdown",$g),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=et}a.hk=vr(function(){a.Yh=null,a.N()},300),a.Ov=vr(function(){pp(a)},250),a.preventDefault=function(nt){return nt.preventDefault(),!1},a.$j=function(nt){if(a.isEnabled){var st=Es(a,nt,!0);st.bubbles=!0;var ht=0,pt=0;st.delta=0,nt.deltaX!==void 0?(nt.deltaX!==0&&(ht=0<nt.deltaX?1:-1),nt.deltaY!==0&&(pt=0<nt.deltaY?1:-1),st.delta=Math.abs(nt.deltaX)>Math.abs(nt.deltaY)?-ht:-pt):nt.wheelDeltaX!==void 0?(nt.wheelDeltaX!==0&&(ht=0<nt.wheelDeltaX?-1:1),nt.wheelDeltaY!==0&&(pt=0<nt.wheelDeltaY?-1:1),st.delta=Math.abs(nt.wheelDeltaX)>Math.abs(nt.wheelDeltaY)?-ht:-pt):nt.wheelDelta!==void 0&&nt.wheelDelta!==0&&(st.delta=0<nt.wheelDelta?1:-1),a.doMouseWheel(),rl(st,nt)}},a.aA=function(nt){a.isEnabled&&(a.Vk=!1,Es(a,nt,!0),nt=a.currentTool,nt.cancelWaitAfter(),nt.standardMouseOver())},a.ui=function(nt){if(a.isEnabled){a.Vk=!0;var st=a.Yt;st[nt.pointerId]===void 0&&(st[nt.pointerId]=nt),st=a.oj;var ht=!1;if(st[0]===null||st[0].pointerId!==nt.pointerId&&st[0].pointerType===nt.pointerType)if(st[1]!==null&&st[1].pointerId===nt.pointerId)st[1]=nt,ht=!0;else if(st[0]===null)st[0]=nt;else if(st[1]===null)st[1]=nt,ht=!0;else{nt.preventDefault();return}else st[0]=nt;(st=nt.pointerType==="touch"||nt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var pt=ht;ht=yp(a,nt,!0,!1,!0,pt),wc(a,nt,ht),ht.targetDiagram=vp(nt,nt.target),ht.targetObject=null,pt||ht.clone(a.bq),pt=a.uw,st=st?25:10,nt.timeStamp-a.tw<a.zy&&!(Math.abs(pt.x-nt.screenX)>st||Math.abs(pt.y-nt.screenY)>st)?a.yq++:a.yq=1,ht.clickCount=a.yq,a.tw=nt.timeStamp,a.uw.sg(nt.screenX,nt.screenY),a.doMouseDown(),nt.button===1?nt.preventDefault():rl(ht,nt)}},a.dk=function(nt){if(a.isEnabled){a.Vk=!0;var st=a.oj;if(st[0]===null||st[0].pointerId!==nt.pointerId&&st[0].pointerType===nt.pointerType){if(st[1]!==null&&st[1].pointerId===nt.pointerId){st[1]=nt;return}if(st[0]===null)st[0]=nt;else return}else st[0]=nt;if(st[0].pointerId===nt.pointerId){st=yp(a,nt,!1,!1,!1,st[1]!==null);var ht=xn.document.elementFromPoint(nt.clientX,nt.clientY)||null;ht!==null&&ht.shadowRoot!==void 0&&ht.shadowRoot!==null&&(ht=ht.shadowRoot.elementFromPoint(nt.clientX,nt.clientY));var pt=a,yt=nt;ht&&ht.H&&(yt=nt,pt=ht.H),st.targetDiagram=pt,wc(a,yt,st),st.targetObject=null,a.doMouseMove(),rl(st,nt)}}},a.fk=function(nt){if(a.isEnabled){a.Vk=!0;var st=nt.pointerType==="touch"||nt.pointerType==="pen",ht=a.Yt;if(st&&a.qu)delete ht[nt.pointerId],nt.preventDefault();else if(ht=a.oj,ht[0]===null||ht[0].pointerId!==nt.pointerId&&ht[0].pointerType===nt.pointerType)ht[1]!==null&&ht[1].pointerId===nt.pointerId&&(ht[1]=null);else{ht[0]=null,ht=yp(a,nt,!1,!0,!0,!1);var pt=xn.document.elementFromPoint(nt.clientX,nt.clientY)||null;pt!==null&&pt.shadowRoot!==void 0&&pt.shadowRoot!==null&&(pt=pt.shadowRoot.elementFromPoint(nt.clientX,nt.clientY)),pt!==null&&pt.H instanceof Je&&pt.H!==a&&wc(pt.H,nt,ht),pt===null&&(pt=nt.target),wc(a,nt,ht),ht.clickCount=a.yq,ht.targetDiagram=vp(nt,pt),ht.targetObject=null,a.doMouseUp(),rl(ht,nt),st&&(a.wq=!1)}}},a.ek=function(nt){if(a.isEnabled){a.Vk=!1;var st=a.Yt;st[nt.pointerId]&&delete st[nt.pointerId],st=a.oj,st[0]!==null&&st[0].pointerId===nt.pointerId&&(st[0]=null),st[1]!==null&&st[1].pointerId===nt.pointerId&&(st[1]=null),nt.pointerType!=="touch"&&nt.pointerType!=="pen"&&(nt=a.currentTool,nt.cancelWaitAfter(),nt.standardMouseOver())}},a.ck=function(nt){var st=a.oj;st[0]!==null&&st[0].pointerId===nt.pointerId?(st[0]=null,a.wq=!1):st[1]!==null&&st[1].pointerId===nt.pointerId&&(st[1]=null)},a.Vp=b.Z["d"+Sf[1]+Sf[2]+"wI"+Tc.slice(1,5)]["b"+Ox.slice(1,y)](b.Z,yf,y,y),b.Vc(!0),e0(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Je.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Je.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function e0(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 Oa(a){30<a.Sq&&(a.Yh=1)}function cf(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Zr&&Zr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Je.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:xn.devicePixelRatio||1},Je.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Je.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Je.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Je.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Je.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Je.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Je.prototype.doFocus=function(){this.focus()},Je.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)}},Je.prototype.Oy=function(){this.H.R("GainedFocus")},Je.prototype.Ny=function(){this.H.R("LostFocus")};function pp(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===la&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Yg(a){var y=new Oo;y.name="Background",a.Al(y),y=new Oo,y.name="",a.Al(y),y=new Oo,y.name="Foreground",a.Al(y),y=new Oo,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Oo,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Oo,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 vn(vn.Grid);y.name="GRID";var x=new Lr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Lr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Lr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Lr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Lr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Lr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new nr,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):Cc(this.H)}function $g(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Cc(this.H)}Je.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,et=this.rj,nt=b.x-et.left,st=b.y-et.top,ht=b.width+et.left+et.right,pt=b.height+et.top+et.bottom,yt=b.right+et.right;et=b.bottom+et.bottom;var Mt=E.x;b=E.y;var zt=E.width,Zt=E.height,Qt=E.right,ie=E.bottom;E=this.scale;var Ee=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Ee=Ee+a.scrollWidth-a.clientWidth;break;case"reverse":Ee=a.scrollWidth-Ee-a.clientWidth}var we=Ee;zt<ht||Zt<pt?(Ee=Le.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==we&&(Ee.x=we/E+nt,this.ju=we),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Ee.y=a.scrollTop/E+st,this.lu=a.scrollTop),this.position=Ee,Le.free(Ee),this.Ee=this.qr=!1):(Ee=Le.alloc(),a.uy&&this.allowHorizontalScroll&&(nt<Mt&&(this.position=Ee.h(we+nt,this.position.y)),yt>Qt&&(this.position=Ee.h(-(y.scrollWidth-this.Aa)+we-this.Aa/E+yt,this.position.y))),a.vy&&this.allowVerticalScroll&&(st<b&&(this.position=Ee.h(this.position.x,a.scrollTop+st)),et>ie&&(this.position=Ee.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+et))),Le.free(Ee),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,yt=b.right,Qt=E.right,et=b.bottom,ie=E.bottom,nt=b.x,Mt=E.x,st=b.y,b=E.y,zt>=ht&&nt>=Mt&&yt<=Qt&&(x.style.width="1px"),Zt>=pt&&st>=b&&et<=ie&&(x.style.height="1px"))}},Je.prototype.computeBounds=function(a){return a===void 0&&(a=new on),Ko(this),gp(this,a)};function gp(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,et=0;et<E;et++){var nt=b[et];if(nt.visible&&nt.isInDocumentBounds){nt=nt.Pa.s;for(var st=nt.length,ht=0;ht<st;ht++){var pt=nt[ht];pt.isInDocumentBounds&&pt.isVisible()&&(pt=pt.actualBounds,pt.w()&&(x?(x=!1,y.assign(pt)):y.ed(pt)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Je.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Tn(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 on(NaN,NaN,0,0):x};function Gs(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=Le.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=on.allocAt(0,0,b.width,b.height);var E=Le.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,on.free(b),Le.free(E),Le.free(x)}x=a.yh,y&&a.Fg!==la&&(x=a.Fg);var et=x!==la?xc(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/et;var nt=a.ya/et,st=a.zk,ht=a.pq;y&&!st.sb()&&(ht.sb()||ht.Xb())&&(st=ht.Xb()?Dr:ht),mp(a,a.documentBounds,E,nt,st,y),y=a.scale,a.scale=et,a.vb=!1,et=a.viewportBounds,Ge.B(et.x,x)&&Ge.B(et.y,b)&&Ge.B(et.width,E)&&Ge.B(et.height,nt)||a.onViewportBoundsChanged(new on(x,b,E,nt),et,y,!1)}}function xc(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 et=a.Aa+(a.gf?a.Db:0),nt=a.ya+(a.Be?a.Db:0),st=et/E,ht=nt/b;return y===ds?(y=Math.min(ht,st),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Rh?(y=ht>st?(nt-a.Db)/b:(et-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Je.prototype.zoomToFit=function(){var a=this.sj;this.sj=$u,this.scale=xc(this,ds),a!==$u&&(Gs(this,!1),mp(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},qt=Je.prototype,qt.BA=function(a,y){y===void 0&&(y=ds);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===ds||y===Rh)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 et=this.ya;E=y===Rh?et/b>E/x?(et-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(et/b,E/x)}this.scale=E,this.position=new Le(a.x,a.y)}},qt.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new Le(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))},qt.zz=function(a){if(a instanceof ze){this.eq=a;var y=Le.alloc();this.fq=this.op(a.ga(ni,y)),Le.free(y)}else this.eq=null,this.fq=pi};function mp(a,y,x,b,E,et){var nt=Le.allocAt(a.pa.x,a.pa.y),st=nt.x,ht=nt.y;if(a.eq!==null){var pt=Le.alloc();pt=a.eq.ga(ni,pt),st=pt.x-a.fq.x/a.scale,ht=pt.y-a.fq.y/a.scale,E=Ur,Le.free(pt)}(et||a.scrollMode===$u)&&(E.sb()&&(x>y.width&&(st=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(ht=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,et=x-y.width,x<y.width+E.left+E.right?(st=Math.min(st+x/2,y.right+Math.max(et,E.right)-x/2),st=Math.max(st,y.left-Math.max(et,E.left)+x/2),st-=x/2):st>y.left?st=y.left:st<y.right-x&&(st=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(ht=Math.min(ht+b/2,y.bottom+Math.max(x,E.bottom)-b/2),ht=Math.max(ht,y.top-Math.max(x,E.top)+b/2),ht-=b/2):ht>y.top?ht=y.top:ht<y.bottom-b&&(ht=y.bottom-b)),nt.x=isFinite(st)?st:-a.yb.left,nt.y=isFinite(ht)?ht:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,nt),nt.x=y.x,nt.y=y.y),Ug(a.Yd,a.pa,nt),a.pa.h(nt.x,nt.y),Ol(a),Le.free(nt)}qt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Zl(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof nr)return a}else if(a=Zl(this,a,function(x){return x.part}),a instanceof nr)return a;return null},qt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Ko(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 Zl(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),Ko(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}qt.lz=function(a,y,x){return y===void 0&&(y=!0),ff(this,a,function(b){return b.part},y?function(b){return b instanceof nr&&b.canSelect()}:null,x)};function ff(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof mn||E instanceof gn||(E=new gn),Ko(a),a=a.Wa.iteratorBackwards;a.next();){var et=a.value;et.visible&&!et.isTemporary&&et.ji(y,x,b,E)}return E}qt.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof mn||b instanceof gn||(b=new gn),Ko(this);for(var E=this.Wa.iteratorBackwards;E.next();){var et=E.value;et.visible&&et.ji(a,y,x,b)}return b},qt.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),rd(this,a,function(E){return E instanceof nr&&(!x||E.canSelect())},y,b)},qt.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof mn||E instanceof gn||(E=new gn),Ko(this);for(var et=this.Wa.iteratorBackwards;et.next();){var nt=et.value;nt.visible&&nt.Cf(a,y,x,b,E)}return E},qt.Nu=function(a,y,x,b,E,et){var nt=new gn;Ko(this);for(var st=this.Wa.iteratorBackwards;st.next();){var ht=st.value;ht.visible&&ht.Nu(a,y,x,b,nt,E,et)}return nt};function rd(a,y,x,b,E){var et=null;for(et===void 0&&(et=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof mn||E instanceof gn||(E=new gn),Ko(a),a=a.Wa.iteratorBackwards;a.next();){var nt=a.value;nt.visible&&!nt.isTemporary&&nt.Cf(y,et,x,b,E)}return E}qt.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),df(this,a,y,function(et){return et instanceof nr&&(!b||et.canSelect())},x,E)},qt.og=function(a,y,x,b,E,et){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof mn||E instanceof gn)&&(et=E),E=!0),et instanceof mn||et instanceof gn||(et=new gn),Ko(this);for(var nt=this.Wa.iteratorBackwards;nt.next();){var st=nt.value;st.visible&&st.og(a,y,x,b,E,et)}return et};function df(a,y,x,b,E,et){var nt=null;for(nt===void 0&&(nt=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof mn||E instanceof gn)&&(et=E),E=!0),et instanceof mn||et instanceof gn||(et=new gn),Ko(a),a=a.Wa.iteratorBackwards;a.next();){var st=a.value;st.visible&&!st.isTemporary&&st.og(y,x,nt,b,E,et)}return et}Je.prototype.acceptEvent=function(a){return Es(this,a,a instanceof MouseEvent)};function Es(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?wc(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),Yr&&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=vp(y,y.target),b.targetObject=null,b}function vp(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 yp(a,y,x,b,E,et){var nt=a.Qg;return a.Qg=a.cj,a.cj=nt,nt.diagram=a,nt.clickCount=1,a=nt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),nt.modifiers=a,nt.event=y,nt.timestamp=y.timeStamp,nt.button=y.button,nt.buttons=y.buttons,Yr&&y.button===0&&y.ctrlKey&&(nt.button=2),nt.down=x,nt.up=b,nt.handled=!1,nt.bubbles=E,nt.isMultiTouch=et,nt}function rl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Je.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Es(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(),rl(x,a)},Je.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Es(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(),rl(x,a)},Je.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Es(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),rl(x,a)},Je.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Es(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),rl(x,a)},Je.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Le(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?mr(new Le(y,a),this.Ab):new Le(y,a)};function wc(a,y,x){var b=a.ta,E=a.Aa,et=a.ya,nt=0,st=0;b!==null&&(b=b.getBoundingClientRect(),nt=y.clientX-E/b.width*b.left,st=y.clientY-et/b.height*b.top),x.viewPoint.h(nt,st),a.Ab!==null?(y=Le.allocAt(nt,st),a.Ab.Cd(y),x.documentPoint.assign(y),Le.free(y)):x.documentPoint.h(nt,st)}function Sp(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))}}Je.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function qg(a){a.ld||Ko(a),a.Va()}Je.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},qt=Je.prototype,qt.Pz=function(){return this.kg},qt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Ms(this),this.hf=!1,this.du=new Le(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Nr(function(){b.ld=!1,Vl(y,"Model"),a(b)},1)},qt.$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()})}},qt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ms(this))};function Oh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Cc(a)||(y&&Ko(a),x&&Gs(a,!1))}function Ms(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,et=E.length,nt=0;nt<et;nt++){var st=E[nt];ho(st,!1),st.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(ht){ht.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||pp(a),Oh(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(jl(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Ko(a),et=!1,(!a.hf||a.xh)&&(a.hf?Lp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Lp(a,!1)),et=!0),a.Jk=!1,Ko(a),a.ou||qg(a),Oh(a,!0,!1),nt=!1,et?(x=on.alloc(),x.assign(a.viewportBounds),a.hf||(nt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,xp(a)),a.R("LayoutCompleted"),Oh(a,!0,!1),on.free(x)):x.Ok&&x.Qw&&(a.Fg!==la?a.scale=xc(a,a.Fg):a.yh!==la?a.scale=xc(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Gs(a,!0)),et&&nt&&a.eb("Initial Layout"),Ko(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function xp(a){if(a.Fg!==la)a.scale=xc(a,a.Fg);else if(a.yh!==la)a.scale=xc(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Gs(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),jl(a)}function Ko(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 gn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Pr&&b.U&65536&&(b.U=b.U^65536)})}}qt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Pr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Pr&&x.isVisible()&&pf(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 qr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function pf(a,y){for(var x=Fn(),b=Fn(),E=y.memberParts;E.next();){var et=E.value;et.isVisible()&&(et instanceof Pr?(gs(et)||xa(et)||zh(et))&&pf(a,et):et instanceof Pn?et.fromNode===y||et.toNode===y?b.push(et):x.push(et):(et.measure(1/0,1/0),et.arrange()))}for(a=x.length,E=0;E<a;E++)et=x[E],et.measure(1/0,1/0),et.arrange();for(Bn(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();Bn(b)}qt.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},qt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Oe("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Pc(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,et=Math.round(y.x*E)/E,nt=Math.round(y.y*E)/E,st=this.Ab;for(st.reset(),E!==1&&st.scale(E),y.x===0&&y.y===0||st.translate(-et,-nt),a.ti=null,Yy(a,st.m11,st.m12,st.m21,st.m22,st.dx,st.dy),this.pb!==1&&(a.globalAlpha=this.pb),Ju(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?Lc(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(xr.prototype.Cd=xr.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(et=this.animationManager,!et.zb&&(!et.isAnimating||et.isTicking)&&(x=new Date,Pc(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&&!et.isAnimating)break t;et=this.Ab,et.reset(),nt=this.Mb,st=this.pa;var ht=this.Ca,pt=Math.round(st.x*ht)/ht,yt=Math.round(st.y*ht)/ht;for(ht!==1&&et.scale(ht),st.x===0&&st.y===0||et.translate(-pt,-yt),a.setTransform(nt,0,0,nt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Ju(this,a),st=0;st<E;st++)a.setTransform(nt,0,0,nt,0,0),a.transform(et.m11,et.m12,et.m21,et.m22,et.dx,et.dy),a.yc(),y[st].gc(a,this);if(y=!1,this.Yf?Lc(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(xr.prototype.Cd=xr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=Zr&&Zr.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 id(a,y,x,b,E,et,nt,st,ht,pt){if(a.Ka!==null){a.ta===null&&Oe("No canvas specified"),nt===void 0&&(nt=null),st===void 0&&(st=null),ht===void 0&&(ht=!1),pt===void 0&&(pt=!1),Pc(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var yt=a.Ca;a.Ca=E;var Mt=a.Wa.s,zt=Mt.length;try{var Zt=new on(et.x,et.y,b.width/E,b.height/E),Qt=Zt.copy();Qt.Co(x),jl(a,Qt),Ko(a),a.Fd(Mt,zt,a,Zt),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),st!==null&&st!==""&&(y.fillStyle=st,y.ox(0,0,b.width,b.height));var ie=a.Mb;y.scale(ie,ie);var Ee=xr.alloc();Ee.reset(),Ee.translate(x.left,x.top),Ee.scale(E),et.x===0&&et.y===0||Ee.translate(-et.x,-et.y),y.setTransform(Ee.m11,Ee.m12,Ee.m21,Ee.m22,Ee.dx,Ee.dy),y.yc(),y instanceof es&&Yy(y,Ee.m11,Ee.m12,Ee.m21,Ee.m22,Ee.dx,Ee.dy),xr.free(Ee),Ju(a,y),y.globalAlpha=a.pb;var we=a.Qj("Grid");if(nt){var je=new gn,Fe=nt.iterator;for(Fe.reset();Fe.next();){var De=Fe.value;De instanceof nr&&(pt||De.layer!==we)&&(De.Gj(),je.add(De))}for(pt=0;pt<zt;pt++)Vg(Mt[pt],y,a,je,ht);je.each(function(Xe){return Xe.Gj()})}else for(je=0;je<zt;je++){var _e=Mt[je];_e===we?pt&&_e.gc(y,a,!0):_e.gc(y,a,ht)}a.$i=!1,a.Yf&&Lc(a.Yf,a)&&a.Vp()}finally{a.Ca=yt,a.ib.Vc(!0),a.vd=!0,a.Fd(Mt,zt,a,a.viewportBounds),jl(a),a.ib instanceof es&&(a.ib.Nj.PA(),a.redraw())}}}qt.Gf=function(a){return this.Rg[a]},qt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},qt.Tx=function(){this.Rg=new Hn,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Yr||Gr),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Ju(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}qt.Ql=function(a){return this.on[a]},qt.sA=function(a,y){this.on[a]=y},qt.Sx=function(){this.on=new Hn,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},qt.set=function(a){return Object.assign(this,a),this},qt.Du=function(a){return this.nm(a)},qt.nm=function(a){return bc(this,a),this};function bc(a,y){var x=a instanceof vn,b=a instanceof Je,E;for(E in y){E===""&&Oe("Setting properties requires non-empty property names");var et=a,nt=E;if(x||b){var st=E.indexOf(".");if(0<st){var ht=E.substring(0,st);x?et=a.fb(ht):(et=a[ht],et==null&&(et=a.toolManager[ht])),en(et)?nt=E.substr(st+1):Oe("Unable to find object named: "+ht+" in "+a.toString()+" when trying to set property: "+E)}}if(nt[0]!=="_"&&!lr(et,nt))if(b&&nt==="ModelChanged"){a.Yw(y[nt]);continue}else if(b&&nt==="Changed"){a.Pe(y[nt]);continue}else if(b&&lr(a.toolManager,nt))et=a.toolManager;else if(b&&nm(a,nt)){a.Bj(nt,y[nt]);continue}else if(a instanceof Zn&&nt==="Changed"){a.Pe(y[nt]);continue}else Oe('Trying to set undefined property "'+nt+'" on object: '+et.toString());et[nt]=y[E],nt[0]==="_"&&et instanceof ze&&et.Vw(nt)}}qt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new $n,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},qt.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")},Je.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!==vf&&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),et=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,et-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=on.alloc(),Tp(this,this.computeBounds(b)),on.free(b)),b=this.ta,b===null||b instanceof Fl)))){var nt=this.Mb;E=this.Aa*nt;var st=this.ya*nt,ht=this.scale*nt;et=Math.round(Math.round(y.x*ht)-Math.round(a.x*ht)),y=Math.round(Math.round(y.y*ht)-Math.round(a.y*ht)),ht=this.jw,a=this.oy,ht.width!==E&&(ht.width=E),ht.height!==st&&(ht.height=st),a.clearRect(0,0,E,st),ht=190*nt;var pt=70*nt,yt=Math.max(et,0),Mt=Math.max(y,0),zt=Math.floor(E-yt),Zt=Math.floor(st-Mt);a.drawImage(b.Oa,yt,Mt,zt,Zt,0,0,zt,Zt),Lc(this.Yf,this)&&a.clearRect(0,0,ht,pt),b=Fn(),a=Fn(),Zt=Math.abs(et),zt=Math.abs(y);var Qt=yt===0?0:E-Zt;yt=Le.allocAt(Qt,0),Zt=Le.allocAt(Zt+Qt,st),a.push(new on(Math.min(yt.x,Zt.x),Math.min(yt.y,Zt.y),Math.abs(yt.x-Zt.x),Math.abs(yt.y-Zt.y)));var ie=this.Ab;if(ie.reset(),ie.scale(nt,nt),this.Ca!==1&&ie.scale(this.Ca),nt=this.pa,(nt.x!==0||nt.y!==0)&&isFinite(nt.x)&&isFinite(nt.y)&&ie.translate(-nt.x,-nt.y),mr(yt,ie),mr(Zt,ie),b.push(new on(Math.min(yt.x,Zt.x),Math.min(yt.y,Zt.y),Math.abs(yt.x-Zt.x),Math.abs(yt.y-Zt.y))),Qt=Mt===0?0:st-zt,yt.h(0,Qt),Zt.h(E,zt+Qt),a.push(new on(Math.min(yt.x,Zt.x),Math.min(yt.y,Zt.y),Math.abs(yt.x-Zt.x),Math.abs(yt.y-Zt.y))),mr(yt,ie),mr(Zt,ie),b.push(new on(Math.min(yt.x,Zt.x),Math.min(yt.y,Zt.y),Math.abs(yt.x-Zt.x),Math.abs(yt.y-Zt.y))),Lc(this.Yf,this)&&(E=0<et?0:-et,st=0<y?0:-y,yt.h(E,st),Zt.h(ht+E,pt+st),a.push(new on(Math.min(yt.x,Zt.x),Math.min(yt.y,Zt.y),Math.abs(yt.x-Zt.x),Math.abs(yt.y-Zt.y))),mr(yt,ie),mr(Zt,ie),b.push(new on(Math.min(yt.x,Zt.x),Math.min(yt.y,Zt.y),Math.abs(yt.x-Zt.x),Math.abs(yt.y-Zt.y)))),Le.free(yt),Le.free(Zt),Oh(this,!1,!0),this.Ka===null&&Oe("No div specified"),this.ta===null&&Oe("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(Pc(this),st=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*st,this.ya*st),E.drawImage(this.jw.Oa,0<et?0:Math.round(-et),0<y?0:Math.round(-y)),et=this.pa,nt=this.Ca,ht=Math.round(et.x*nt)/nt,pt=Math.round(et.y*nt)/nt,y=this.Ab,y.reset(),nt!==1&&y.scale(nt),et.x===0&&et.y===0||y.translate(-ht,-pt),E.save(),E.beginPath(),et=a.length,nt=0;nt<et;nt++)ht=a[nt],ht.width!==0&&ht.height!==0&&E.rect(Math.floor(ht.x),Math.floor(ht.y),Math.ceil(ht.width),Math.ceil(ht.height));for(E.clip(),E.setTransform(st,0,0,st,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,et=y.length,this.Fd(y,et,this,this.viewportBounds),Ju(this,E),E.globalAlpha=this.pb,st=0;st<et;st++)if(nt=y[st],ht=b,nt.visible&&nt.pb!==0){pt=vu(nt,E),Mt=nt.Zq,Mt.length=0,yt=this.scale,zt=on.alloc(),Zt=nt.Pa.s,ie=Zt.length,Qt=ht.length;for(var Ee=0;Ee<ie;Ee++){var we=Zt[Ee],je=Bc(we,we.actualBounds);t:{for(var Fe=2/yt,De=4/yt,_e=0;_e<Qt;_e++){var Xe=ht[_e];if(Xe.width!==0&&Xe.height!==0&&je.Vu(Xe.x-Fe,Xe.y-Fe,Xe.width+De,Xe.height+De)){je=!0;break t}}je=!1}je&&nt.Oj(E,we,this,Mt,yt,zt,!0)}on.free(zt),E.globalAlpha=pt}E.restore(),E.Vc(!0),this.Yf&&Lc(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Bn(b),Bn(a),this.ld=!1}}else this.bd();x&&(Oa(this),this.bd(),cf(this,!0))}else x?(Oa(this),this.bd(),cf(this,!0)):this.bd()}};function Pc(a){a.pn!==!1&&(a.pn=!1,wp(a,a.Aa,a.ya))}function wp(a,y,x){Ol(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Cc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,et=!1,nt=a.gf?a.Db:0,st=a.Be?a.Db:0,ht=E.clientWidth||x+nt,pt=E.clientHeight||b+st,yt=a.viewportBounds;E=yt.x;var Mt=yt.y,zt=yt.width,Zt=yt.height;if((ht!==x+nt||pt!==b+st)&&(a.gf=!1,a.Be=!1,st=nt=0,a.Aa=ht,a.ya=pt,et=a.pn=!0,Ol(a)),!a.hf||!a.viewportBounds.w())return!0;var Qt=a.ku,ie=a.hu;if(a.Ee=!1,!(et||a.gf||a.Be||a.mn||a.nn))return!0;var Ee=a.documentBounds,we=0,je=0,Fe=0,De=0,_e=yt.width,Xe=yt.height,En=a.rj;a.contentAlignment.sb()?(Ee.width>_e&&(we=En.left,je=En.right),Ee.height>Xe&&(Fe=En.top,De=En.bottom)):(we=En.left,je=En.right,Fe=En.top,De=En.bottom);var Gn=Ee.width+we+je,Dn=Ee.height+Fe+De;En=a.scale;var wn=Gn>ht/En,hn=Dn>pt/En;if(!(et||a.gf||a.Be||wn||hn))return!0;we=Ee.x-we,ht=yt.x,je=Ee.right+je,pt=yt.right+nt,Fe=Ee.y-Fe;var br=yt.y;Ee=Ee.bottom+De,yt=yt.bottom+st;var fr="1px";if(De="1px",a.scrollMode===$u&&(wn||hn)&&(wn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(wn=1,we+1<ht&&(wn=Math.max((ht-we)*En+a.Aa,wn)),je>pt+1&&(wn=Math.max((je-pt)*En+a.Aa,wn)),_e+nt+1<Gn&&(wn=Math.max((Gn-_e)*En+a.Aa,wn)),fr=wn.toString()+"px"),hn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(wn=1,Fe+1<br&&(wn=Math.max((br-Fe)*En+a.ya,wn)),Ee>yt+1&&(wn=Math.max((Ee-yt)*En+a.ya,wn)),Xe+st+1<Dn&&(wn=Math.max((Dn-Xe)*En+a.ya,wn)),De=wn.toString()+"px")),wn=fr!=="1px",hn=De!=="1px",wn&&hn||!wn&&!hn||(hn&&(pt-=a.Db),wn&&(yt-=a.Db),Gn<_e+nt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(nt=1,we+1<ht&&(nt=Math.max((ht-we)*En+a.Aa,nt)),je>pt+1&&(nt=Math.max((je-pt)*En+a.Aa,nt)),_e+1<Gn&&(nt=Math.max((Gn-_e)*En+a.Aa,nt)),fr=nt.toString()+"px"),wn=fr!=="1px",nt=a.ya,wn!==a.Be&&(nt=wn?a.ya-a.Db:a.ya+a.Db),Dn<Xe+st||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(st=1,Fe+1<br&&(st=Math.max((br-Fe)*En+nt,st)),Ee>yt+1&&(st=Math.max((Ee-yt)*En+nt,st)),Xe+1<Dn&&(st=Math.max((Dn-Xe)*En+nt,st)),De=st.toString()+"px"),hn=De!=="1px"),a.qr&&wn===a.Be&&hn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(wn!==a.Be&&(fr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),et=!0),a.Be=wn,ie.style.width=fr,hn!==a.gf&&(De==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),et=!0,a.tn&&(st=Le.alloc(),hn?(y.style.left=a.Db+"px",a.position=st.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=st.h(a.pa.x-a.Db/a.scale,a.pa.y)),Le.free(st))),et&&Ol(a),a.gf=hn,ie.style.height=De,a.gu=!0,et&&(a.pn=!0),y=Qt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(_e+1<Gn?y=(a.position.x-we)*En:we+1<ht?y=Qt.scrollWidth-Qt.clientWidth:je>pt+1&&(y=a.position.x*En)),a.tn)switch(a.bu){case"negative":y=-(Qt.scrollWidth-y-Qt.clientWidth);break;case"reverse":y=Qt.scrollWidth-y-Qt.clientWidth}return Qt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Xe+1<Dn?Qt.scrollTop=(a.position.y-Fe)*En:Fe+1<br?Qt.scrollTop=Qt.scrollHeight-Qt.clientHeight:Ee>yt+1&&(Qt.scrollTop=a.position.y*En)),ht=a.Aa,pt=a.ya,Qt.style.width=ht+(a.gf?a.Db:0)+"px",Qt.style.height=pt+(a.Be?a.Db:0)+"px",x!==ht||b!==pt||a.animationManager.zb?(x=on.allocAt(E,Mt,zt,Zt),a.onViewportBoundsChanged(x,a.viewportBounds,En,et),on.free(x),!1):!0}qt=Je.prototype,qt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Oe("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+y.toString()),y=this.Qj(a.layerName),y===null&&(y=this.Qj("")),y===null&&Oe('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb($i,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},qt.oi=function(a){this.partManager.oi(a);var y=this;Oc(a,function(x){kc(y,x)}),(a instanceof qr||a instanceof Pr&&a.placeholder!==null)&&a.v(),a.data!==null&&Oc(a,function(x){ly(y.partManager,x)}),xa(a)!==!0&&zh(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(Bc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Bc(a,a.actualBounds)),this.$b()},qt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Oc(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(Bc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Bc(a,a.actualBounds)),this.$b()},qt.remove=function(a){bp(this,a,!0)};function bp(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(vo,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}qt.Is=function(a,y){if(y===void 0&&(y=!1),Tn(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 gn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},qt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Je.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=od(this)),this.toolManager!==null){var E=new $n;if(a!==null)if(Tn(a))for(var et=0;et<a.length;et++)Xl(this,E,a[et],x,b);else for(a=a.iterator;a.next();)Xl(this,E,a.value,x,b);else{for(a=this.parts;a.next();)Xl(this,E,a.value,x,b);for(a=this.nodes;a.next();)Xl(this,E,a.value,x,b);for(a=this.links;a.next();)Xl(this,E,a.value,x,b)}Fh(this,E,y,b,x)}};function Xl(a,y,x,b,E,et){if(!y.contains(x)&&(et===void 0&&(et=!1),!b||et||x.canMove()||x.canCopy()))if(E===void 0&&(E=od(a)),x instanceof Mn){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Pr&&(x.placeholder!==null||E.dragsMembers))for(et=x.memberParts;et.next();)Xl(a,y,et.value,b,E,E.groupsAlwaysMove);for(et=x.linksConnected;et.next();){var nt=et.value;if(!y.contains(nt)){var st=nt.fromNode,ht=nt.toNode;st!==null&&y.contains(st)&&ht!==null&&y.contains(ht)&&Xl(a,y,nt,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)Xl(a,y,x.value,b,E)}else if(x instanceof Pn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Xl(a,y,x.value,b,E);else x instanceof qr||y.add(x,a.Pd(E,x,x.location))}function Fh(a,y,x,b,E){if(y!==null&&y.count!==0){var et=Le.alloc(),nt=Le.alloc();nt.assign(x),isNaN(nt.x)&&(nt.x=0),isNaN(nt.y)&&(nt.y=0),(x=a.Mr)||sd(a,y);for(var st=Fn(),ht=Fn(),pt=y.iterator,yt=Le.alloc();pt.next();){var Mt=pt.key,zt=pt.value;if(Mt.Zc()){var Zt=Pp(a,Mt,y);Zt!==null?st.push(new rt(Mt,zt,Zt)):(!E||Mt.canMove())&&(Zt=zt.point,et.assign(Zt),a.computeMove(Mt,et.add(nt),b,yt),Mt.location=yt,zt.shifted===void 0&&(zt.shifted=new Le),zt.shifted.assign(yt.re(Zt)))}else pt.key instanceof Pn&&ht.push(pt.sa)}for(Le.free(yt),E=st.length,pt=0;pt<E;pt++)Mt=st[pt],et.assign(Mt.info.point),Mt.Su.shifted===void 0&&(Mt.Su.shifted=new Le),Mt.node.location=et.add(Mt.Su.shifted);for(E=Le.alloc(),pt=Le.alloc(),Mt=ht.length,zt=0;zt<Mt;zt++){var Qt=ht[zt];if(Zt=Qt.key,Zt instanceof Pn)if(Zt.suspendsRouting){Zt.Tg=null,yt=Zt.fromNode;var ie=Zt.toNode;if(a.draggedLink!==null&&b.dragsLink)if(ie=Qt.value.point,Zt.dragComputation===null)y.add(Zt,a.Pd(b,Zt,nt)),ah(Zt,nt.x-ie.x,nt.y-ie.y);else{Qt=Le.allocAt(0,0),(yt=Zt.i(0))&&yt.w()&&Qt.assign(yt);var Ee=yt=Le.alloc().assign(Qt).add(nt);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Ee=Le.alloc(),ad(a,Zt,yt,Ee,b)),yt.assign(Zt.dragComputation(Zt,yt,Ee)).re(Qt),y.add(Zt,a.Pd(b,Zt,yt)),ah(Zt,yt.x-ie.x,yt.y-ie.y),Le.free(Qt),Le.free(yt),Ee!==yt&&Le.free(Ee)}else yt!==null&&(E.assign(yt.location),Ee=y.I(yt),Ee!==null&&E.re(Ee.point)),ie!==null&&(pt.assign(ie.location),Ee=y.I(ie),Ee!==null&&pt.re(Ee.point)),yt!==null&&ie!==null?E.Xa(pt)?(yt=Qt.value.point,ie=et,ie.assign(E),ie.re(yt),y.add(Zt,a.Pd(b,Zt,E)),ah(Zt,ie.x,ie.y)):(Zt.suspendsRouting=!1,Zt.bb()):(Qt=Qt.value.point,yt=yt!==null?E:ie!==null?pt:nt,y.add(Zt,a.Pd(b,Zt,yt)),ah(Zt,yt.x-Qt.x,yt.y-Qt.y))}else(Zt.fromNode===null||Zt.toNode===null)&&(yt=Qt.value.point,y.add(Zt,a.Pd(b,Zt,nt)),ah(Zt,nt.x-yt.x,nt.y-yt.y))}Le.free(et),Le.free(nt),Le.free(E),Le.free(pt),Bn(st),Bn(ht),x||(Ko(a),Dh(a,y))}}Je.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new Le),b.assign(y),a===null)return b;var E=y,et=x.isGridSnapEnabled;et&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=Le.alloc(),ad(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var nt=a.minLocation,st=nt.x;isNaN(st)&&(st=et?Math.round(1e3*a.location.x)/1e3:a.location.x),nt=nt.y,isNaN(nt)&&(nt=et?Math.round(1e3*a.location.y)/1e3:a.location.y);var ht=a.maxLocation,pt=ht.x;return isNaN(pt)&&(pt=et?Math.round(1e3*a.location.x)/1e3:a.location.x),ht=ht.y,isNaN(ht)&&(ht=et?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(st,Math.min(x.x,pt)),Math.max(nt,Math.min(x.y,ht))),E!==y&&Le.free(E),b};function od(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function ad(a,y,x,b,E){if(E===void 0&&(E=od(a)),b.assign(x),y!==null){var et=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var nt=E.gridSnapOrigin,st=nt.x;if(nt=nt.y,E=E.gridSnapCellSpot,et!==null){var ht=et.gridCellSize;isNaN(a)&&(a=ht.width),isNaN(y)&&(y=ht.height),et=et.gridOrigin,isNaN(st)&&(st=et.x),isNaN(nt)&&(nt=et.y)}et=Le.allocAt(0,0),et.yi(0,0,a,y,E),Ge.No(x.x,x.y,st+et.x,nt+et.y,a,y,b),Le.free(et)}}function sd(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Pn&&(y.suspendsRouting=!0)}function Dh(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 Pp(a,y,x){return y=y.containingGroup,y!==null&&(a=Pp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}qt=Je.prototype,qt.Pd=function(a,y,x){if(x===void 0)return new yu(Ti);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new yu(new Le(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new yu(x.copy())};function Cp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Oe("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Oe("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Oe("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Oe("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&&Oe("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}qt.Al=function(a){Cp(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($i,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},qt.Ww=function(a,y){Cp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(vo,"layers",this,a,null,b,null));var E=x.count,et;for(et=0;et<E;et++)if(x.M(et)===y){x.Gb(et,a);break}return this.cc!==null&&this.cb($i,"layers",this,null,a,null,et),this.N(),0>b&&this.Ya(),this},qt.Cy=function(a,y){Cp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(vo,"layers",this,a,null,b,null));var E=x.count,et;for(et=0;et<E;et++)if(x.M(et)===y){x.Gb(et+1,a);break}return this.cc!==null&&this.cb($i,"layers",this,null,a,null,et+1),this.N(),0>b&&this.Ya(),this},qt.kA=function(a){if(a.diagram!==this&&Oe("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(vo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},qt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},qt.Yw=function(a){return this.pf===null&&(this.pf=new mn),this.pf.add(a),this.model.Pe(a),this},qt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},qt.Pe=function(a){return this.zg===null&&(this.zg=new mn),this.zg.add(a),this},qt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},qt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==qa&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},qt.cb=function(a,y,x,b,E,et,nt){et===void 0&&(et=null),nt===void 0&&(nt=null);var st=new Ii;st.diagram=this,st.change=a,st.propertyName=y,st.object=x,st.oldValue=b,st.oldParam=et,st.newValue=E,st.newParam=nt,this.ds(st)},qt.g=function(a,y,x,b,E){this.cb(Di,a,this,y,x,b,E)},Je.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===Di){var E=a.object;if(Li(E,a.propertyName,a.I(y)),E instanceof ze){var et=E.part;et!==null&&et.Wb()}this.isModified=!0}else if(b===$i){var nt=a.object,st=a.newParam,ht=a.newValue;if(nt instanceof vn)if(typeof st=="number"&&ht instanceof ze){y?nt.pc(st):nt.Gb(st,ht);var pt=nt.part;pt!==null&&pt.Wb()}else typeof st=="number"&&ht instanceof co&&(ht.isRow?c1(nt,st,y?void 0:ht):f1(nt,st,y?void 0:ht));else if(nt instanceof Oo){var yt=a.oldParam===!0;typeof st=="number"&&ht instanceof nr&&(y?(ht.isSelected=!1,ht.isHighlighted=!1,ht.Wb(),nt.pc(yt?st:-1,ht,yt)):nt.oi(st,ht,yt))}else nt instanceof Je?typeof st=="number"&&ht instanceof Oo&&(y?this.Wa.mb(st):(ht.Xe(this),this.Wa.Gb(st,ht))):Oe("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===vo){var Mt=a.object,zt=a.oldParam,Zt=a.oldValue;if(Mt instanceof vn)typeof zt=="number"&&Zt instanceof ze?y?Mt.Gb(zt,Zt):Mt.pc(zt):typeof zt=="number"&&Zt instanceof co&&(Zt.isRow?c1(Mt,zt,y?Zt:void 0):f1(Mt,zt,y?Zt:void 0));else if(Mt instanceof Oo){var Qt=a.newParam===!0;typeof zt=="number"&&Zt instanceof nr&&(y?0>Mt.Pa.indexOf(Zt)&&Mt.oi(zt,Zt,Qt):(Zt.isSelected=!1,Zt.isHighlighted=!1,Zt.Wb(),Mt.pc(Qt?zt:-1,Zt,Qt)))}else Mt instanceof Je?typeof zt=="number"&&Zt instanceof Oo&&(y?(Zt.Xe(this),this.Wa.Gb(zt,Zt)):this.Wa.mb(zt)):Oe("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==qa&&Oe("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Je.prototype.Ea=function(a){return this.undoManager.Ea(a)},Je.prototype.eb=function(a){return this.undoManager.eb(a)},Je.prototype.Kf=function(){return this.undoManager.Kf()},Je.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}},Je.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Je.prototype.rp=function(){this.partManager.rp()};function kp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Ol(a),a.N(),a.Ee=!0,b.zb&&(gu(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Ol(a);else{a.vb=!0;var E=a.viewportBounds.copy(),et=a.Aa,nt=a.ya,st=a.zoomPoint.x,ht=a.zoomPoint.y,pt=a.contentAlignment;isNaN(st)&&(pt.$c()?pt.Hf(bs)?st=0:pt.Hf(Aa)&&(st=et-1):st=pt.sb()?pt.x*(et-1):et/2),isNaN(ht)&&(pt.$c()?pt.Hf(Ja)?ht=0:pt.Hf(Ps)&&(ht=nt-1):ht=pt.sb()?pt.y*(nt-1):nt/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),et=Le.allocAt(a.pa.x+st/y-st/x,a.pa.y+ht/y-ht/x),a.position=et,Le.free(et),a.Ca=x,Ol(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),Gs(a,!1),b.zb&&(gu(b)||b.ce.add(b.H,"scale",y,a.Ca))}}Je.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!==la||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Fi&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Bg(E,this)),this.vb||this.invalidateViewport(a,y),jl(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(et){et.isAvoiding&&et.actualBounds.Yc(y)&&et.bb()})}};function jl(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=Cn.alloc(),E=1,et=1,nt=x.O.s,st=nt.length,ht=0;ht<st;ht++){var pt=nt[ht],yt=Math.abs(pt.interval);2>yt||(m0(pt.figure)?et=et*yt/Ge.vx(et,yt):E=E*yt/Ge.vx(E,yt))}if(nt=x.gridCellSize,b.h(et*nt.width,E*nt.height),y!==void 0)E=y.width,et=y.height,a=y.x,nt=y.y;else{if(y=on.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){on.free(y);return}E=y.width,et=y.height,a=y.x,nt=y.y,on.free(y)}x.width=E+2*b.width,x.height=et+2*b.height,y=Le.alloc(),Ge.No(a,nt,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Cn.free(b),x.part.location=y,Le.free(y)}}Je.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)}},Je.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))},Je.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Tn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof nr||Oe("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 nr||Oe("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Je.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()}},qt=Je.prototype,qt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},qt.Jz=function(a){a=new gn().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 nr||Oe("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},qt.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,et=Le.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=et.h(x.x,E.y):y==="left"?this.position=et.h(E.x,x.y):y==="down"?this.position=et.h(x.x,E.bottom-x.height):y==="right"&&(this.position=et.h(E.right-x.width,x.y)),Le.free(et);return}Oe("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=et.h(x.x,x.y-E):y==="down"?this.position=et.h(x.x,x.y+E):y==="left"?this.position=et.h(x.x-E,x.y):y==="right"?this.position=et.h(x.x+E,x.y):Oe("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Le.free(et)},qt.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)},qt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},qt.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)},qt.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,et=b+a.height,nt=y.m11,st=y.m12,ht=y.m21,pt=y.m22,yt=y.dx,Mt=y.dy,zt=x*nt+b*ht+yt;y=x*st+b*pt+Mt;var Zt=E*nt+b*ht+yt;return a=E*st+b*pt+Mt,b=x*nt+et*ht+yt,x=x*st+et*pt+Mt,nt=E*nt+et*ht+yt,E=E*st+et*pt+Mt,et=Math.min(zt,Zt),zt=Math.max(zt,Zt),Zt=Math.min(y,a),y=Math.max(y,a),et=Math.min(et,b),zt=Math.max(zt,b),Zt=Math.min(Zt,x),y=Math.max(y,x),et=Math.min(et,nt),zt=Math.max(zt,nt),Zt=Math.min(Zt,E),y=Math.max(y,E),new on(et,Zt,zt-et,y-Zt)},qt.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),mr(a.copy(),this.Ab)};function tm(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Ep(a){return a=dd.get(a),a!==null?new a:new li}Je.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===qa&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(ht){return ht.diagram=E}),a.mouseMoveTools.each(function(ht){return ht.diagram=E}),a.mouseUpTools.each(function(ht){return ht.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===qa){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Ko(this));var et=this.animationManager;b==="RolledBackTransaction"&&et.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||$f(et),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 nt=a.isTransactionFinished;if(nt&&(tm(this),this.As.clear(),Gg(this.animationManager)),!this.Rt&&nt&&this.lastInput.targetDiagram){this.Rt=!0;var st=this;Nr(function(){st.currentTool.standardMouseOver(),st.Rt=!1},10)}}}finally{this.aa=!0}}}};function kc(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)Bh(a,y[b])}function Bh(a,y){if(y instanceof Ia){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof gn&&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 Mp(a,y){if(y instanceof Ia){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 et=0;et<E.length;et++)if(E[et]===y){E.splice(et,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 gn&&x.Bg.remove(a),Ed(b));break}}}}}Je.prototype.Wd=function(){this.partManager.Wd()},Je.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Je.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Je.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Je.prototype.Vb=function(a){return this.partManager.Vb(a)},Je.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},qt=Je.prototype,qt.Lc=function(a){return this.partManager.Lc(a)},qt.ii=function(a){return this.partManager.ii(a)},qt.Kc=function(a){return this.partManager.Kc(a)},qt.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:zn(Jn(y)))},qt.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:zn(Jn(y)))};function Ol(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 Tp(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Gs(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}qt.Va=function(){if(this.Zi){var a=on.alloc();Tp(this,this.computeBounds(a)),on.free(a)}},qt.rz=function(){for(var a=new gn,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},qt.qz=function(){return this.ai.iterator},qt.Uz=function(a){Ko(this),a&&ld(this,!0),this.ld?Lp(this,!1):(this.Jk=!0,Ms(this))};function ld(a,y){for(var x=a.ai.iterator;x.next();)em(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function em(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)em(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Lp(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,et=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!et.defaultAnimation.isAnimating&&!et.zb&&(y||Vl(et,"Layout")),a.xh=!1;for(var nt=a.ai.iterator;nt.next();)Ap(a,nt.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),Ko(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||$f(et),a.aa=x}}}function Ap(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Ap(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),pf(a,y),E.isValidLayout=!0):a.xh=!0)}}qt.yz=function(){for(var a=new mn,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 et=E.toLowerCase(),nt=new mn;x.add(E,nt),x.add(et,nt),b.add(E,E),b.add(et,E)}var x=new $n,b=new $n;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 ud(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Oe("Unknown DiagramEvent name: "+y)}qt.Bj=function(a,y){return a=ud(this,a),a!==null&&a.add(y),this},qt.am=function(a,y){a=ud(this,a),a!==null&&a.remove(y)},qt.R=function(a,y,x){var b=ud(this,a),E=new Bu;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 hd(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}qt.Yj=function(a,y){return cd(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Je.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?gp(this,a):a.assign(this.documentBounds)};function cd(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new og(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=on.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var et=a.nodes;et.next();){var nt=et.value,st=nt.layer;st!==null&&st.visible&&!st.isTemporary&&fd(a,nt,b,y)}on.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=on.alloc(),et=x.memberParts;et.next();)nt=et.value,nt instanceof Mn&&fd(a,nt,b,y);on.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 fd(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,et=y.y;if(jd(a,E,et))for(x=(et-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((et+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(et=a.ac[E],et.fill)et.fill(lh,x,y+1);else for(var nt=x;nt<=y;nt++)et[nt]=lh}else if(y instanceof Pr)for(y=y.memberParts;y.next();)E=y.value,E instanceof Mn&&fd(a,E,x,b)}}function Qu(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Je.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Np(this)};function Np(a){a.vk===-1&&(a.vk=Nr(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=on.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Tp(a,y),on.free(y),a.Fc=!0,a.bd(),Np(a))}},a.vp))}Je.prototype.ug=function(){this.vk!==-1&&(xn.clearTimeout(this.vk),this.vk=-1)},Je.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=on.allocAt(0,0,b.width*E,b.height*E);var et=Le.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var nt=Math.max(this.scrollHorizontalLineChange,1);nt|=0,et.x-=nt,a.x<b.x+x.left/2&&(et.x-=nt),a.x<b.x+x.left/4&&(et.x-=4*nt)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(nt=Math.max(this.scrollHorizontalLineChange,1),nt|=0,et.x+=nt,a.x>b.x+b.width-x.right/2&&(et.x+=nt),a.x>b.x+b.width-x.right/4&&(et.x+=4*nt));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(nt=Math.max(this.scrollVerticalLineChange,1),nt|=0,et.y-=nt,a.y<b.y+x.top/2&&(et.y-=nt),a.y<b.y+x.top/4&&(et.y-=4*nt)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(nt=Math.max(this.scrollVerticalLineChange,1),nt|=0,et.y+=nt,a.y>b.y+b.height-x.bottom/2&&(et.y+=nt),a.y>b.y+b.height-x.bottom/4&&(et.y+=4*nt)),et.Xa(Ti)||(y=new Le(y.x+et.x/E,y.y+et.y/E)),on.free(b),Le.free(et),y},qt=Je.prototype,qt.Cs=function(){return null},qt.av=function(){return null},qt.bs=function(a,y){this.pj.add(a,y)},qt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Pr&&(y.$p=null)})};function gf(a,y,x){function b(){var yt=+new Date;for(et=!0,nt.reset();nt.next();)if(!nt.value[0].al){et=!1;break}et||yt-pt>ht?y(x,E,st):xn.requestAnimationFrame(b)}for(var E=x.callback,et=!0,nt=a.Og.iterator;nt.next();)if(!nt.value[0].al){et=!1;break}if(typeof E!="function"||et)return y(x,E,a);var st=a,ht=x.callbackTimeout||300,pt=+new Date;return xn.requestAnimationFrame(function(){b()}),null}qt.Wz=function(a){return Wi?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},qt.Jx=function(a){return a===void 0&&(a={}),gf(this,this.Xz,a)},qt.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 Tc+"data":E=b.getImageData(0,0,x.width,x.height);break;case Tc:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&Oe('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function im(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Oe("properties argument must be an Object.");var E=y.size||null,et=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(et="NaN");var nt=y.maxSize;y.maxSize===void 0&&(nt=x==="SVG"?new Cn(1/0,1/0):new Cn(2e3,2e3));var st=y.position||null,ht=y.parts||null,pt=y.padding===void 0?1:y.padding,yt=y.background||null,Mt=y.omitTemporary;Mt===void 0&&(Mt=!0);var zt=y.document||document,Zt=y.elementFinished||null,Qt=y.showTemporary;Qt===void 0&&(Qt=!Mt),y=y.showGrid,y===void 0&&(y=Qt),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof pt=="number"?pt=new Br(pt):pt instanceof Br||Oe("MakeImage padding must be a Margin or a number."),pt.left=Math.max(pt.left,0),pt.right=Math.max(pt.right,0),pt.top=Math.max(pt.top,0),pt.bottom=Math.max(pt.bottom,0),a.ib.Vc(!0),Mt=new Ws(null,zt,void 0,!0);var ie=Mt.context;if(!(E||et||ht||st))return Mt.width=a.Aa+Math.ceil(pt.left+pt.right),Mt.height=a.ya+Math.ceil(pt.top+pt.bottom),x==="SVG"?b===null?null:(b.resize(Mt.width,Mt.height,Mt.width,Mt.height),b.ownerDocument=zt,b.hs=Zt,id(a,b.context,pt,new Cn(Mt.width,Mt.height),a.Ca,a.pa,ht,yt,Qt,y),b.context):(a.Xm=!1,id(a,ie,pt,new Cn(Mt.width,Mt.height),a.Ca,a.pa,ht,yt,Qt,y),a.Xm=!0,Mt.context);var Ee=a.Pp,we=a.documentBounds.copy();if(we.Fv(a.yb),Qt)for(var je=a.Wa.s,Fe=je.length,De=0;De<Fe;De++){var _e=je[De];if(_e.visible&&_e.isTemporary){_e=_e.Pa.s;for(var Xe=_e.length,En=0;En<Xe;En++){var Gn=_e[En];Gn.isInDocumentBounds&&Gn.isVisible()&&(Gn=Gn.actualBounds,Gn.w()&&we.ed(Gn))}}}if(je=new Le(we.x,we.y),ht!==null){for(Fe=new on(0,0,0,0),De=!0,_e=ht.iterator,_e.reset();_e.next();)Xe=_e.value,Xe instanceof nr&&(En=Xe.layer,En!==null&&!En.visible||En!==null&&!Qt&&En.isTemporary||!Xe.isVisible()||(Xe=Xe.actualBounds,Xe.w()&&(De?(De=!1,Fe.assign(Xe)):Fe.ed(Xe))));we.width=Fe.width,we.height=Fe.height,je.x=Fe.x,je.y=Fe.y}return st!==null&&st.w()&&(je=st,et||(et=Ee)),Fe=st=0,pt!==null&&(st=pt.left+pt.right,Fe=pt.top+pt.bottom),De=_e=0,E!==null&&(_e=E.width,De=E.height,isFinite(_e)&&(_e=Math.max(0,_e-st)),isFinite(De)&&(De=Math.max(0,De-Fe))),E!==null&&et!==null?(et==="NaN"&&(et=Ee),E.w()?(E=_e,we=De):isNaN(De)?(E=_e,we=we.height*et):(E=we.width*et,we=De)):E!==null?E.w()?(et=Math.min(_e/we.width,De/we.height),E=_e,we=De):isNaN(De)?(et=_e/we.width,E=_e,we=we.height*et):(et=De/we.height,E=we.width*et,we=De):et!==null?et==="NaN"&&nt.w()?(et=Math.min((nt.width-st)/we.width,(nt.height-Fe)/we.height),et>Ee?(et=Ee,E=we.width,we=we.height):(E=nt.width,we=nt.height)):(E=we.width*et,we=we.height*et):(et=Ee,E=we.width,we=we.height),pt!==null?(E+=st,we+=Fe):pt=new Br(0),nt!==null&&(Ee=nt.width,nt=nt.height,isNaN(Ee)&&(Ee=2e3),isNaN(nt)&&(nt=2e3),isFinite(Ee)&&(E=Math.min(E,Ee)),isFinite(nt)&&(we=Math.min(we,nt))),Mt.width=Math.ceil(E),Mt.height=Math.ceil(we),x==="SVG"?b===null?null:(b.resize(Mt.width,Mt.height,Mt.width,Mt.height),b.ownerDocument=zt,b.hs=Zt,id(a,b.context,pt,new Cn(Math.ceil(E),Math.ceil(we)),et,je,ht,yt,Qt,y),b.context):(a.Xm=!1,id(a,ie,pt,new Cn(Math.ceil(E),Math.ceil(we)),et,je,ht,yt,Qt,y),a.Xm=!0,Mt.context)}un.Object.defineProperties(Je.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Ot||(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 Fl(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 Fl(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),Kl===this&&(Kl=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),dp(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)&&Ln(a,"0 <= value <= 1",Je,"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),Gs(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),Gs(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),Gs(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),Gs(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Ln(a,">= 0",Je,"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&&Ln(a,">= 0",Je,"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 Ln(a,">= 0",Je,"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||tm(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&Oe("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=fp(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Vl(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(et){return y.ik(et)}),y.ik(this.Oc)),this.cc=a,this.partManager=Ep(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(et){return a.Pe(et)}),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=Le.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()?Ol(this):(this.vb=!0,a=this.scale,mp(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)}Le.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!==vn.Grid&&Oe("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),jl(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),Ol(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||Oe("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 Br(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===$u&&Gs(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,Gs(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,kp(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&&kp(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!==la&&Gs(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()||Oe("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()||Oe("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)):Ln(a,"> 0",Je,"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)):Ln(a,"> 0",Je,"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),Gs(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 Br(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&Oe("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Yp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==qu&&a!==uo&&a!==pd&&Oe("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new 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 Br(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),un.Object.defineProperties(Je,{licenseKey:{get:function(){return Ip.jc()},set:function(a){Ip.add(a.replace(/\s/g,""))}},version:{get:function(){return Mc}}}),Je.prototype.makeImageData=Je.prototype.Jx,Je.prototype.makeImage=Je.prototype.Wz,Je.prototype.cacheGroupExternalLinks=Je.prototype.Fu,Je.prototype.addRenderer=Je.prototype.bs,Je.prototype.makeSVG=Je.prototype.av,Je.prototype.makeSvg=Je.prototype.Cs,Je.prototype.stopAutoScroll=Je.prototype.ug,Je.prototype.doAutoScroll=Je.prototype.gs,Je.prototype.isUnoccupied=Je.prototype.Yj,Je.prototype.raiseDiagramEvent=Je.prototype.R,Je.prototype.removeDiagramListener=Je.prototype.am,Je.prototype.addDiagramListener=Je.prototype.Bj,Je.prototype.findTreeRoots=Je.prototype.yz,Je.prototype.layoutDiagram=Je.prototype.Uz,Je.prototype.findTopLevelGroups=Je.prototype.qz,Je.prototype.findTopLevelNodesAndLinks=Je.prototype.rz,Je.prototype.ensureBounds=Je.prototype.Va,Je.prototype.findLinksByExample=Je.prototype.ls,Je.prototype.findNodesByExample=Je.prototype.ms,Je.prototype.findLinkForData=Je.prototype.Kc,Je.prototype.findNodeForData=Je.prototype.ii,Je.prototype.findPartForData=Je.prototype.Lc,Je.prototype.findLinkForKey=Je.prototype.findLinkForKey,Je.prototype.findNodeForKey=Je.prototype.Vb,Je.prototype.findPartForKey=Je.prototype.findPartForKey,Je.prototype.rebuildParts=Je.prototype.Wd,Je.prototype.transformViewToDoc=Je.prototype.Ps,Je.prototype.transformRectDocToView=Je.prototype.zA,Je.prototype.transformDocToView=Je.prototype.op,Je.prototype.centerRect=Je.prototype.es,Je.prototype.scrollToRect=Je.prototype.tv,Je.prototype.scroll=Je.prototype.scroll,Je.prototype.highlightCollection=Je.prototype.Jz,Je.prototype.highlight=Je.prototype.Iz,Je.prototype.selectCollection=Je.prototype.rA,Je.prototype.select=Je.prototype.select,Je.prototype.updateAllRelationshipsFromData=Je.prototype.rp,Je.prototype.updateAllTargetBindings=Je.prototype.updateAllTargetBindings,Je.prototype.commit=Je.prototype.commit,Je.prototype.rollbackTransaction=Je.prototype.Kf,Je.prototype.commitTransaction=Je.prototype.eb,Je.prototype.startTransaction=Je.prototype.Ea,Je.prototype.raiseChanged=Je.prototype.g,Je.prototype.raiseChangedEvent=Je.prototype.cb,Je.prototype.removeChangedListener=Je.prototype.ik,Je.prototype.addChangedListener=Je.prototype.Pe,Je.prototype.removeModelChangedListener=Je.prototype.mA,Je.prototype.addModelChangedListener=Je.prototype.Yw,Je.prototype.findLayer=Je.prototype.Qj,Je.prototype.removeLayer=Je.prototype.kA,Je.prototype.addLayerAfter=Je.prototype.Cy,Je.prototype.addLayerBefore=Je.prototype.Ww,Je.prototype.addLayer=Je.prototype.Al,Je.prototype.moveParts=Je.prototype.moveParts,Je.prototype.copyParts=Je.prototype.Kj,Je.prototype.removeParts=Je.prototype.Is,Je.prototype.remove=Je.prototype.remove,Je.prototype.add=Je.prototype.add,Je.prototype.clearDelayedGeometries=Je.prototype.bx,Je.prototype.setProperties=Je.prototype.nm,Je.prototype.attach=Je.prototype.Du,Je.prototype.set=Je.prototype.set,Je.prototype.resetInputOptions=Je.prototype.Sx,Je.prototype.setInputOption=Je.prototype.sA,Je.prototype.getInputOption=Je.prototype.Ql,Je.prototype.resetRenderingHints=Je.prototype.Tx,Je.prototype.setRenderingHint=Je.prototype.Xx,Je.prototype.getRenderingHint=Je.prototype.Gf,Je.prototype.maybeUpdate=Je.prototype.bd,Je.prototype.requestUpdate=Je.prototype.$b,Je.prototype.delayInitialization=Je.prototype.Xy,Je.prototype.isUpdateRequested=Je.prototype.Pz,Je.prototype.invalidateDocumentBounds=Je.prototype.Ya,Je.prototype.findObjectsNear=Je.prototype.og,Je.prototype.findPartsNear=Je.prototype.mz,Je.prototype.findObjectsIn=Je.prototype.Cf,Je.prototype.findPartsIn=Je.prototype.ux,Je.prototype.findObjectsAt=Je.prototype.ji,Je.prototype.findPartsAt=Je.prototype.lz,Je.prototype.findObjectAt=Je.prototype.ic,Je.prototype.findPartAt=Je.prototype.Ol,Je.prototype.focusObject=Je.prototype.zz,Je.prototype.alignDocument=Je.prototype.Jy,Je.prototype.zoomToRect=Je.prototype.BA,Je.prototype.zoomToFit=Je.prototype.zoomToFit,Je.prototype.diagramScroll=Je.prototype.kx,Je.prototype.focus=Je.prototype.focus;var dd=new $n,om=null,Wi=xn.document!==void 0,Ec=null,Ih="",la=new tn(Je,"None",0),ds=new tn(Je,"Uniform",1),Rh=new tn(Je,"UniformToFill",2),mf=new tn(Je,"CycleAll",10),jp=new tn(Je,"CycleNotDirected",11),Op=new tn(Je,"CycleNotDirectedFast",12),Fp=new tn(Je,"CycleNotUndirected",13),Dp=new tn(Je,"CycleDestinationTree",14),Bp=new tn(Je,"CycleSourceTree",15),$u=new tn(Je,"DocumentScroll",1),vf=new tn(Je,"InfiniteScroll",2),qu=new tn(Je,"TreeParentCollapsed",21),uo=new tn(Je,"AllParentsCollapsed",22),pd=new tn(Je,"AnyParentsCollapsed",23),Ip=new mn,Mc="2.3.10",Tc="image",yf=null,am=!1;function $o(){if(Wi){var a=xn.document.createElement("canvas"),y=a.getContext("2d"),x=In("7ca11abfd022028846");y[x]=In("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",Rn.Dx+"4ae6247590da4bb21c324ba3a84e385776",xr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Ge.za],E=1;5>E;E++)y[In("7ca11abfd7330390")](In(b[E-1]),10,15*E);for(y[x]=In("39f046ebb36e4b"),x=1;5>x;x++)y[In("7ca11abfd7330390")](In(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(xr.prototype.Cd=xr.prototype.Eu),yf=a}}Je.className="Diagram",Je.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=xn.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Je?y.H:null},Je.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},Je.useDOM=function(a){Wi=a?xn.document!==void 0:!1},Je.isUsingDOM=function(){return Wi},Je.None=la,Je.Uniform=ds,Je.UniformToFill=Rh,Je.CycleAll=mf,Je.CycleNotDirected=jp,Je.CycleNotDirectedFast=Op,Je.CycleNotUndirected=Fp,Je.CycleDestinationTree=Dp,Je.CycleSourceTree=Bp,Je.DocumentScroll=$u,Je.InfiniteScroll=vf,Je.TreeParentCollapsed=qu,Je.AllParentsCollapsed=uo,Je.AnyParentsCollapsed=pd;function sm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Lc(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)t:{y="f";var x=xn[In("76a715b2f73f148a")][In("72ba13b5")]||"";if(a.Rc=!0,Wi){var b=Je[In("76a115b6ed251eaf4692")];if(b)for(var E=Ip.iterator;E.next()&&(b=E.value,b=In(b).split(In("39e9")),!(6>b.length));){var et=In(b[1]).split(".");if(b[4]!=="7da71ca0")break;var nt=In(Rn[In("6cae19")]).split(".");if(et[0]>nt[0]||et[0]===nt[0]&&et[1]>=nt[1]){var st=xn[In("74a900bae4370f8b51")][In("6fbb13a1c2311e8a57")].toLowerCase();if(nt=st[In("73a612b6fb191d")](In("3aad1ab6e022098b4dc4")),et=In(b[2]),-1<nt&&(st=st[In("73a612b6fb191d")](et.toLowerCase()+"/"),a.Rc=!(-1<st&&st<nt),!a.Rc))break;for(nt=x[In("76ad18b4f73e")],st=x[In("73a612b6fb191d")](In("35e7"))+2;st<nt;st++)y+=x[st];if(nt=y[In("73a612b6fb191d")](et),0>nt&&et!==In("7da71ca0ad381e90")&&(nt=y[In("73a612b6fb191d")](In("76a715b2ef3e149757"))),0>nt&&(nt=y[In("73a612b6fb191d")](In("76a715b2ef3e149757"))),0>nt&&(nt=y[In("73a612b6fb191d")](In("2bfa41fdb3784bca12"))),0>nt&&(nt=x[In("73a612b6fb191d")](In("7baa19a6f76c1988428554"))),a.Rc=!(0<=nt&&nt<y[In("73a612b6fb191d")](In("35"))||y[In("73a612b6fb191d")](In("35"))===-1),!a.Rc||x[In("73a612b6fb191d")](In("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[In("73a612b6fb191d")](et)),!a.Rc)||(nt=xn[In("76a715b2f73f148a")][In("69ad17a1e03e")],st=nt[In("73a612b6fb191d")](In("7fb002b6ed25128b4da25b2e")),-1<st&&(a.Rc=!(nt[In("73a612b6fb191d")](et)>st),!a.Rc)))break;if(et[0]==="#"){nt=xn.document.createElement("div");for(var ht=b[0].replace(/[A-Za-z]/g,"");4>ht.length;)ht+="9";if(st=ht,ht=ht.substr(ht.length-4),b="",b+=["gsh","gsf"][parseInt(ht.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(ht.substr(0,1),10)%4],nt[In("79a417a0f0181a8946")]=b,xn.document[In("78a712aa")]){xn.document[In("78a712aa")][In("7bb806b6ed32388c4a875b")](nt),ht=xn.getComputedStyle(nt).getPropertyValue(In("78a704b7e62456904c9b12701b6532a8"));var pt=xn.getComputedStyle(nt).getPropertyValue(In("75b817b0ea2202"));if(xn.document[In("78a712aa")][In("68ad1bbcf533388c4a875b")](nt),ht){if(nt=xn[In("77a902b0eb1b1e804a8a")],pt==="0."+parseInt(st,10)%100||ht.indexOf(parseInt(et[1]+et[2],16))!==-1&&ht.indexOf(parseInt(et[3]+et[4],16))!==-1){a.Rc=!1;break}else if(nt&&nt(In("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,et=0;et<document.styleSheets.length;et++){nt=document.styleSheets[et].rules||document.styleSheets[et].cssRules;for(var yt in nt)if(b===nt[yt].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(yt=x[In("76ad18b4f73e")],E=x[In("73a612b6fb191d")](In("35e7"))+2;E<yt;E++)y+=x[E];x=y[In("73a612b6fb191d")](In("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[In("73a612b6fb191d")](In("35")))}}}return 0<a.Rc&&a!==a.wy}sm.className="DiagramHelper";function yu(a){this.j=a===void 0?new Le:a,this.o=new Le}un.Object.defineProperties(yu.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 Sf="DraggingInfo";yu.className="DraggingInfo";function rt(a,y,x){this.node=a,this.info=y,this.Su=x}rt.className="DraggingNodeInfoPair";function ct(){this.reset()}ct.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Cn(NaN,NaN).freeze(),this.gridSnapCellSpot=ni,this.gridSnapOrigin=new Le(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ct.className="DraggingOptions";function Et(a,y){if(typeof a=="string"||xn.Element&&a instanceof Element)var x=Je.call(this,a)||this;else x=Je.call(this)||this,y=a;return Ct(x),y&&x.nm(y),x}$e(Et,Je);function Ct(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=ai,a.layout=new _o}Et.prototype.reset=function(){Je.prototype.reset.call(this),Ct(this)},Et.className="Palette";function Ot(a,y){if(typeof a=="string"||xn.Element&&a instanceof Element)var x=Je.call(this,a)||this;else x=Je.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 nr;var E=new Lr;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 Br(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Te,x.toolManager.mouseMoveTools),x.click=function(){var et=b.observed;if(et!==null){var nt=et.viewportBounds,st=b.lastInput.documentPoint;et.position=new Le(st.x-nt.width/2,st.y-nt.height/2)}},x.Pf=function(){b.Ya(),me(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&&me(b)},x.autoScale=ds,x.vb=!1,y&&Object.assign(x,y),x}$e(Ot,Je),Ot.prototype.computePixelRatio=function(){return 1},Ot.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(Pc(this),this.ql===null){var x=new Ws(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),te(this)}finally{this.ta=a,this.ib=y}}}Je.prototype.redraw.call(this)},Ot.prototype.gc=function(){if(this.Ka===null&&Oe("No div specified"),this.ta===null&&Oe("No canvas specified"),!(this.ta instanceof Fl)&&(B0(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Pc(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?te(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 te(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=on.alloc().assign(a.viewportBounds).ed(y.viewportBounds),jl(y,E),on.free(E),Ko(y));var et=a.Ab;et.reset(),a.scale!==1&&et.scale(a.scale),a.position.x===0&&a.position.y===0||et.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(et.m11,et.m12,et.m21,et.m22,et.dx,et.dy),E.yc(),y=y.Wa.s,et=y.length;for(var nt=0;nt<et;nt++){var st=y[nt],ht=a;if(st.visible&&st.opacity!==0){var pt=st.diagram.grid.part;if(!x&&st.isTemporary)b&&pt.layer===st&&(st=vu(st,E),pt.gc(E,ht),E.globalAlpha=st);else{for(var yt=vu(st,E),Mt=ht.scale,zt=on.alloc(),Zt=st.Pa.s,Qt=Zt.length,ie=0;ie<Qt;ie++){var Ee=Zt[ie];(b||Ee!==pt)&&st.Oj(E,Ee,ht,null,Mt,zt,!1)}on.free(zt),E.globalAlpha=yt}}}}}function me(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 Lr&&(b.strokeWidth=a),y.location=new Le(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Ot.prototype.computeBounds=function(){var a=this.observed;if(a===null)return dl;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Ot.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Ot.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),me(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))},un.Object.defineProperties(Ot.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Ot&&Oe("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),me(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),me(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)}}}),Ot.className="Overview";function Te(){_i.call(this),this.j=null}$e(Te,_i),Te.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 Le(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Le(a.x-this.j.x,a.y-this.j.y)),!0)},Te.prototype.doActivate=function(){this.j=null,_i.prototype.doActivate.call(this)},Te.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Te.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 Le(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new Le(a.x-this.j.x,a.y-this.j.y)}}},Te.className="OverviewDraggingTool";function ke(){oi(this),this.H=Kl,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=dl,this.hb=!0,this.cg=null,this.ob=200}ke.prototype.toString=function(){return"CommandHandler"},ke.prototype.Xe=function(a){this.H=a},ke.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Yr?y.meta:y.control,b=y.shift,E=y.alt,et=y.key;!x||et!=="C"&&et!=="Insert"?x&&et==="X"||b&&et==="Del"?this.canCutSelection()&&this.cutSelection():x&&et==="V"||b&&et==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&et==="Y"||E&&b&&et==="Backspace"?this.canRedo()&&this.redo():x&&et==="Z"||E&&et==="Backspace"?this.canUndo()&&this.undo():et==="Del"||et==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&et==="A"?this.canSelectAll()&&this.selectAll():et==="Esc"?this.canStopCommand()&&this.stopCommand():et==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):et==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):et==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):et==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):et==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):et==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):et==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):et==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):et===" "?this.canScrollToPart()&&this.scrollToPart():et==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():et==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&et==="0"?this.canResetZoom()&&this.resetZoom():b&&et==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&et==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&et==="G"?this.canUngroupSelection()&&this.ungroupSelection():et==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():et==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},ke.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},ke.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Fi&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},ke.prototype.canStopCommand=function(){return!0},ke.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=""}},ke.prototype.canSelectAll=function(){return this.diagram.allowSelect},ke.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 gn,x=a.selection.iterator;x.next();)Uh(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=""}},ke.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},ke.prototype.copySelection=function(){var a=this.diagram,y=new gn;for(a=a.selection.iterator;a.next();)Uh(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},ke.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},ke.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},ke.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},ke.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Ec=null,Ih="";else{x=y.model;var b=!1,E=!1,et=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),et=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new mn,x.addAll(et),Ec=x,Ih=y.model.dataFormat}}y.R("ClipboardChanged",x)},ke.prototype.pasteFromClipboard=function(){var a=new gn,y=Ec;if(y===null)return a;var x=this.diagram;if(Ih!==x.model.dataFormat)return a;var b=x.model,E=!1,et=!1,nt=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(et=b.Ij,b.Ij=this.copiesGroupKey),nt=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=et),y=nt.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},ke.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 et=this.computeEffectiveCollection(y.selection,y.Wm);Fh(y,et,new Le(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=""}},ke.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Ec===null||Ec.count===0||Ih!==a.model.dataFormat)},ke.prototype.undo=function(){this.diagram.undoManager.undo()},ke.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},ke.prototype.redo=function(){this.diagram.undoManager.redo()},ke.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},ke.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===la&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},ke.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==la?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},ke.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===la&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},ke.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==la?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},ke.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},ke.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},ke.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;Vl(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=dl):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),$f(y)},ke.prototype.canZoomToFit=function(){return this.diagram.allowZoom},ke.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(ht){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;Vl(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Ie(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var et=function(){y.Ea();for(var ht=E.pop();0<E.length&&ht instanceof Mn&&ht.isTreeExpanded&&(!(ht instanceof Pr)||ht.isSubGraphExpanded);)ht=E.pop();0<E.length?(ht instanceof nr&&y.tv(ht.actualBounds),ht instanceof Mn&&!ht.isTreeExpanded&&(ht.isTreeExpanded=!0),ht instanceof Pr&&!ht.isSubGraphExpanded&&(ht.isSubGraphExpanded=!0)):(ht instanceof nr&&y.es(ht.actualBounds),y.am("LayoutCompleted",nt)),y.eb("Scroll To Part")},nt=function(){Nr(et,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",nt),et()}}else{var st=y.position.copy();y.es(a.actualBounds),st.Xa(y.position)&&x.Cc()}}};function Ie(a,y,x){if(y.isVisible())return x;if(y instanceof qr)Ie(a,y.adornedPart,x);else if(y instanceof Pn){var b=y.fromNode;b!==null&&Ie(a,b,x),y=y.toNode,y!==null&&Ie(a,y,x)}else y instanceof Mn&&(b=y.labeledLink,b!==null&&Ie(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Ie(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Ie(a,y,x));return x}ke.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof nr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},ke.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Vl(y.animationManager,"Collapse Tree");var x=new mn;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 Mn&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},ke.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Mn&&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 Mn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},ke.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Vl(y.animationManager,"Expand Tree");var x=new mn;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 Mn&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},ke.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Mn)||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 Mn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},ke.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 mn,et=a.selection.iterator;et.next();){var nt=et.value;nt.Zc()&&nt.canGroup()&&E.add(nt)}for(var st=new mn,ht=E.iterator;ht.next();){var pt=ht.value;et=!1;for(var yt=E.iterator;yt.next();)if(pt.Td(yt.value)){et=!0;break}et||st.add(pt)}if(0<st.count){var Mt=st.first().containingGroup;if(Mt!==null)for(;Mt!==null;){E=!1;for(var zt=st.iterator;zt.next();)if(!zt.value.Td(Mt)){E=!0;break}if(E)Mt=Mt.containingGroup;else break}if(x instanceof Pr)Hs(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Zt=y.copyNodeData(x);en(Zt)&&(y.xf(Zt),b=a.ii(Zt))}if(b!==null){Mt!==null&&this.isValidMember(Mt,b)&&(b.containingGroup=Mt);for(var Qt=st.iterator;Qt.next();){var ie=Qt.value;this.isValidMember(b,ie)&&(ie.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},ke.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=Fn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Pn||y.push(x)}a=new gn,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],et=!0,nt=0;nt<x;nt++)if(E.Td(y[nt])){et=!1;break}et&&a.add(E)}return Bn(y),a}ke.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},ke.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 mn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var et=E.value;et instanceof Pr&&et.canUngroup()&&b.add(et)}var nt=new mn;if(0<b.count){y.clearSelection(!0);for(var st=b.iterator;st.next();){var ht=st.value;ht.expandSubGraph();var pt=ht.containingGroup,yt=pt!==null&&pt.data!==null?x.wa(pt.data):void 0;nt.addAll(ht.memberParts);for(var Mt=nt.iterator;Mt.next();){var zt=Mt.value;if(zt.isSelected=!0,!(zt instanceof Pn)){var Zt=zt.data;Zt!==null?x.mp(Zt,yt):zt.containingGroup=pt}}y.remove(ht)}}y.R("SelectionUngrouped",b,nt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},ke.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 Pr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Pr&&y.canUngroup())return!0;return!1},ke.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},ke.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Vl(y.animationManager,"Collapse SubGraph");var x=new mn;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 Pr&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},ke.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Pr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Pr&&y.isSubGraphExpanded)return!0;return!1},ke.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Vl(y.animationManager,"Expand SubGraph");var x=new mn;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 Pr&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},ke.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Pr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Pr&&!y.isSubGraphExpanded)return!0;return!1},ke.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(et){return et instanceof Si&&et.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},ke.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 Si))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 Si&&x.editable}),a!==null))return!0;return!1},ke.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 ze?E=a.ga(Dr):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new Le(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,pu(x,!1,a)}},ke.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)},ke.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 $n,a===null)return b;for(var et=a.iterator;et.next();)Xl(x,b,et.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(et=a.iterator;et.next();)a=et.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},un.Object.defineProperties(ke.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||Oe("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}}}),ke.className="CommandHandler",Xg=function(){return new ke};function ze(){oi(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Le(NaN,NaN).freeze(),this.jd=Bo,this.Ab=new xr,this.wh=new xr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=us,this.uc=new on(NaN,NaN,NaN,NaN).freeze(),this.Ib=new on(NaN,NaN,NaN,NaN).freeze(),this.dc=new on(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=jo,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 pn,cn,Vn,qn,ar,Cr,Wr,Fr,Xr,ci;ze.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=kn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},ze.prototype.Vw=function(a){var y=this.Dh;if(Tn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},ze.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},ze.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},ze.prototype.copy=function(){return this.clone()},qt=ze.prototype,qt.qb=function(a){a.classType===Pn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Oe("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===ze&&(this.stretch=a)},qt.toString=function(){return Un(this.constructor)+"#"+mi(this)},qt.th=function(){this.A!==null&&(this.A.nc=!0)};function jr(a){a.A===null?a.A=new wf:a.A.nc&&(a.A=a.A.copy())}qt.Xc=function(){if(this.ba===null){var a=new Rp;a.Xi=Ur,a.yj=Ur,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},qt.cb=function(a,y,x,b,E,et,nt){var st=this.part;if(st!==null&&(st.gk(a,y,x,b,E,et,nt),x===this&&a===Di&&Go(this)&&Mi(this,st,y),et=this.diagram,this.animationTriggers===null||et===null||!et.pi||et.undoManager.isUndoingRedoing||et.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&et.animationManager.isEnabled&&!et.animationManager.isTicking&&(this.jo===null&&(this.jo=new $n),nt=et.undoManager.transactionLevel===0,a.startCondition===Nh?nt=!0:a.startCondition===Sc&&(nt=!1),nt?(et=new Vo,Hg(a,et),nt=this.jo.get(a),nt!==null&&nt.stop(),this.jo.add(a,et),et.vu=this,et.Nw=a,et.add(this,y,b,E),et.start()):(Vl(et.animationManager,"Trigger"),et.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof vn&&x===st&&(st.l&16777216)!==0&&st.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)st=x[E],st instanceof vn&&Oc(st,function(ht){ht.data!==null&&ht.l&16777216&&ht.La(y)})};function Mi(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var et=E.value,nt=null;if(et.sourceName!==null){if(nt=MS(et,b,a),nt===null)continue;et.sp(a,nt,x,null)}else if(et.isToModel){var st=y.diagram;st===null||st.skipsModelSourceBindings||et.sp(a,st.model.modelData,x,b)}else{if(st=b.data,st===null)continue;var ht=y.diagram;ht===null||ht.skipsModelSourceBindings||et.sp(a,st,x,b)}nt===a&&(st=b.ks(et.Ai),st!==null&&et.Mv(st,nt,x))}}qt.ks=function(a){return this.bindingId===a?this:null},qt.g=function(a,y,x){this.cb(Di,a,this,y,x)},qt.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 xr);var et=this.Lb;et.reset(),this.no(et,a,y,x,b),et.pp(E)}};function Po(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}qt.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?Vr(a.x,a.y,0,0,0,b.height)<=y||Vr(a.x,a.y,0,b.height,b.width,b.height)<=y||Vr(a.x,a.y,b.width,b.height,b.width,0)<=y||Vr(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},qt.se=function(){return!0},qt.ca=function(a){var y=Le.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Le.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),et=b.Ql("extraTouchArea"),nt=et/2,st=this.naturalBounds;b=this.Df()*b.scale;var ht=1/b;if(st.width*b<E&&st.height*b<E)return a=No(x.x-nt*ht,x.y-nt*ht,x.width+et*ht,x.height+et*ht,y.x,y.y),Le.free(y),a}return E=!1,(this instanceof qr||this instanceof Lr?No(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)),Le.free(y),E},qt.gh=function(a){var y=this.naturalBounds;return No(0,0,y.width,y.height,a.x,a.y)},qt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=on.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=Le.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)))),Le.free(E),on.free(y),b},qt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=Le.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)))),Le.free(E),b},qt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=Le.allocAt(0,0),E=Le.allocAt(0,x.height),et=Le.allocAt(x.width,x.height),nt=Le.allocAt(x.width,0),st=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(et))||a.ca(y.Ga(nt)))st=!0;else{x=on.allocAt(0,0,x.width,x.height);var ht=Le.allocAt(a.x,a.y);x.ca(y.Cd(ht))?st=!0:(ht.h(a.x,a.bottom),x.ca(y.Cd(ht))?st=!0:(ht.h(a.right,a.bottom),x.ca(y.Cd(ht))?st=!0:(ht.h(a.right,a.y),x.ca(y.Cd(ht))&&(st=!0)))),Le.free(ht),on.free(x),!st&&(Ge.us(a,b,E)||Ge.us(a,E,et)||Ge.us(a,et,nt)||Ge.us(a,nt,b))&&(st=!0)}return Le.free(b),Le.free(E),Le.free(et),Le.free(nt),st},qt.ga=function(a,y){if(y===void 0&&(y=new Le),a instanceof rr){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},qt.mi=function(a){a===void 0&&(a=new on);var y=this.naturalBounds,x=this.oe,b=Le.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),Ai(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),Ai(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),Ai(a,b.x,b.y,0,0),Le.free(b),a},qt.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},qt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},qt.qs=function(a,y){return y===void 0&&(y=new Le),y.assign(a),this.oe.Cd(y),y},qt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},qt.Sj=function(a,y,x,b,E){var et=this.transform,nt=1/(et.m11*et.m22-et.m12*et.m21),st=et.m22*nt,ht=-et.m12*nt,pt=-et.m21*nt,yt=et.m11*nt,Mt=nt*(et.m21*et.dy-et.m22*et.dx),zt=nt*(et.m12*et.dx-et.m11*et.dy);return this.areaBackground!==null?(et=this.actualBounds,Ge.Ff(et.left,et.top,et.right,et.bottom,a,y,x,b,E)):(nt=a*st+y*pt+Mt,a=a*ht+y*yt+zt,y=x*st+b*pt+Mt,x=x*ht+b*yt+zt,E.h(0,0),b=this.naturalBounds,x=Ge.Ff(0,0,b.width,b.height,nt,a,y,x,E),E.transform(et),x)},ze.prototype.measure=function(a,y,x,b){if(gs(this)!==!1){var E=this.Kg,et=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-et,0),y=Math.max(y-E,0),x=Math.max((x||0)-et,0),b=Math.max((b||0)-E,0),et=this.angle,E=this.desiredSize;var nt=this.kq();et===90||et===270?(a=isFinite(E.height)?E.height+nt:a,y=isFinite(E.width)?E.width+nt:y):(a=isFinite(E.width)?E.width+nt:a,y=isFinite(E.height)?E.height+nt:y),E=x||0,nt=b||0;var st=this instanceof vn;switch(Da(this,!0)){case cn:nt=E=0,st&&(y=a=1/0);break;case pn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(nt=y);break;case qn:isFinite(a)&&a>x&&(E=a),nt=0,st&&(y=1/0);break;case ar:isFinite(y)&&y>b&&(nt=y),E=0,st&&(a=1/0)}st=this.maxSize;var ht=this.minSize;E>st.width&&ht.width<st.width&&(E=st.width),nt>st.height&&ht.height<st.height&&(nt=st.height),x=Math.max(E,ht.width),b=Math.max(nt,ht.height),st.width<x&&(x=Math.min(ht.width,x)),st.height<b&&(b=Math.min(ht.height,b)),a=Math.min(st.width,a),y=Math.min(st.height,y),a=Math.max(x,a),y=Math.max(b,y),(et===90||et===270)&&(et=a,a=y,y=et,et=x,x=b,b=et),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||Oe("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),ho(this,!1)}},ze.prototype.Wl=function(){},ze.prototype.Dd=function(){return!1},ze.prototype.arrange=function(a,y,x,b,E){this.Uk();var et=on.alloc();et.assign(this.Ib),this.Ib.ka(),xa(this)===!1?this.Ib.h(a,y,x,b):this.eh(a,y,x,b),this.Ib.freeze(),E===void 0?this.tb=null:this.tb=E,x=!1,E!==void 0?x=!0:(E=this.panel,E!==null&&nh(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 Si&&(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()||Oe("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(et,this.Ib),Yl(this,!1),on.free(et)},qt=ze.prototype,qt.eh=function(){};function ua(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var et=a.uc;x=a.Kg,y=x.right+x.left;var nt=x.top+x.bottom;switch(x=et.width+y,et=et.height+nt,b+=y,E+=nt,y=Da(a,!0),x===b&&et===E&&(y=cn),y){case cn:(x>b||et>E)&&(ho(a,!0),a.measure(x>b?b:x,et>E?E:et,0,0));break;case pn:ho(a,!0),a.measure(b,E,0,0);break;case qn:ho(a,!0),a.measure(b,et,0,0);break;case ar:ho(a,!0),a.measure(x,E,0,0)}}}qt.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(),Hi(a,y)||(x.oh(),this.Pn(x)))},qt.Pn=function(a){this.portId!==null&&(_0(a,!0),a instanceof Mn&&H1(a,this))},qt.gc=function(a,y){if(!Ts(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 et=this instanceof vn&&nh(this),nt=this.Ib;if(et){var st=this.Ib,ht=this.dc,pt=this.areaBackground,yt=this.Ma;pt===null&&yt===null||a.yc(),pt!==null&&(Ki(this,a,pt,!0,!0,ht,st),pt instanceof si&&pt.type===Ns?(a.beginPath(),a.rect(st.x,st.y,st.width,st.height),a.ng(pt)):a.fillRect(st.x,st.y,st.width,st.height)),yt!==null&&(Ki(this,a,yt,!0,!1,ht,st),yt instanceof si&&yt.type===Ns?(a.beginPath(),a.rect(st.x,st.y,st.width,st.height),a.ng(yt)):a.fillRect(st.x,st.y,st.width,st.height)),this.hh(a,y)}if(!et&&(et||nt.width!==0&&nt.height!==0&&!isNaN(nt.x)&&!isNaN(nt.y))){et=this.transform,st=this.panel,this.l&4096&&Ro(this),pt=this.part,ht=!1;var Mt=0;pt&&y.Gf("drawShadows")&&(ht=pt.isShadowed)&&(yt=pt.shadowOffset,Mt=Math.max(yt.y,yt.x)*y.scale*y.Mb),yt=this.Dd();var zt;if(!(zt=y.$i||!yt)){var Zt=this.naturalBounds;zt=this.wh;var Qt=zt.m11,ie=zt.m21,Ee=zt.dx,we=zt.m12,je=zt.m22,Fe=zt.dy,De,_e=De=0;zt=De*Qt+_e*ie+Ee;var Xe=De*we+_e*je+Fe;De=Zt.width+Mt,_e=0;var En=De*Qt+_e*ie+Ee;De=De*we+_e*je+Fe,_e=Math.min(zt,En);var Gn=Math.min(Xe,De),Dn=Math.max(zt+0,En)-_e,wn=Math.max(Xe+0,De)-Gn;zt=_e,Xe=Gn,De=Zt.width+Mt,_e=Zt.height+Mt,En=De*Qt+_e*ie+Ee,De=De*we+_e*je+Fe,_e=Math.min(zt,En),Gn=Math.min(Xe,De),Dn=Math.max(zt+Dn,En)-_e,wn=Math.max(Xe+wn,De)-Gn,zt=_e,Xe=Gn,De=0,_e=Zt.height+Mt,En=De*Qt+_e*ie+Ee,De=De*we+_e*je+Fe,_e=Math.min(zt,En),Gn=Math.min(Xe,De),Dn=Math.max(zt+Dn,En)-_e,wn=Math.max(Xe+wn,De)-Gn,zt=_e,Xe=Gn,Mt=y.viewportBounds,Zt=Mt.x,Qt=Mt.y,zt=!(zt>Mt.width+Zt||Zt>Dn+zt||Xe>Mt.height+Qt||Qt>wn+Xe)}if(zt){if(zt=(this.l&256)!==0,a.clipInsteadOfFill&&(zt=!1),this instanceof Si&&(a.font=this.font),zt){if(Xe=st.se()?st.naturalBounds:st.actualBounds,Dn=Math.max(nt.x,Xe.x),wn=Math.max(nt.y,Xe.y),Mt=Math.min(nt.right,Xe.right)-Dn,Zt=Math.min(nt.bottom,Xe.bottom)-wn,Qt=this.tb,Qt!==null&&(Dn=Qt.x,wn=Qt.y,Mt=Qt.width,Zt=Qt.height),Dn>nt.width+nt.x||nt.x>Xe.width+Xe.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(Dn,wn,Mt,Zt),a.clip()}if(yt){if(!pt.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}ht&&(Xe=pt.shadowOffset,a.Ev(Xe.x*y.scale*this.scale*y.Mb,Xe.y*y.scale*this.scale*y.Mb,pt.shadowBlur),Su(a),a.shadowColor=pt.shadowColor)}ht&&this.shadowVisible===!0?Su(a):ht&&this.shadowVisible===!1&&Jl(a),pt=this.naturalBounds,this.areaBackground!==null&&(a.yc(),ps(this,a,pt,nt)),a.transform(et.m11,et.m12,et.m21,et.m22,et.dx,et.dy),ht&&Fo(this,st)&&this.shadowVisible===null&&Jl(a),this.Ma!==null&&(a.yc(),Wa(this,a,pt,nt)),ht&&(this.Ma!==null||this.areaBackground!==null||Fo(this,st))?(il(this,!0),this.shadowVisible===null&&Jl(a)):il(this,!1),this.hh(a,y),ht&&this.l&512&&Su(a),yt&&ht&&Jl(a),zt&&(a.restore(),a.Vc(this instanceof vn)),et.ws()||(y=1/(et.m11*et.m22-et.m12*et.m21),a.transform(et.m22*y,-et.m12*y,-et.m21*y,et.m11*y,y*(et.m21*et.dy-et.m22*et.dx),y*(et.m12*et.dx-et.m11*et.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function Fo(a,y){return y===null?!1:(nh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===vn.Auto||y.type===vn.Spot)&&y.Pb()!==a)}qt.Dv=function(){};function ps(a,y,x,b){Ki(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof si&&a.areaBackground.type===Ns?(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 Wa(a,y,x,b){var E=a.kq(),et=x.x,nt=x.y,st=x.width+E,ht=x.height+E;Ki(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof si&&a.Ma.type===Ns?(y.beginPath(),y.rect(et-E/2,nt-E/2,st,ht),y.ng(a.Ma)):y.fillRect(et-E/2,nt-E/2,st,ht)}function qo(a,y,x){for(var b=y.O.s,E=b.length,et=-1,nt=0;nt<E;nt++)if(b[nt]===a){et=nt;break}if(a=et,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===vn.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 Ts(a,y,x){if(!(y instanceof es))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&&qo(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var et=a.shadowOffset;y.Ev(et.x*x.scale*a.scale*x.Mb,et.y*x.scale*a.scale*x.Mb,a.shadowBlur),Su(y),y.shadowColor=a.shadowColor}a instanceof Si&&(y.font=a.font),y.yd=null;var nt=a.transform;et=a instanceof vn;var st=a instanceof vn?nh(a):!1;a.l&4096&&Ro(a);var ht=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,et&&st?(_p(y,1,0,0,1,0,0),a.svg=y.ad):et?(_p(y,nt.m11,nt.m12,nt.m21,nt.m22,nt.dx,nt.dy),a.svg=y.ad):_p(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var pt=nt.copy().Vj();y.rb.ha=[pt.m11,pt.m12,pt.m21,pt.m22,pt.dx,pt.dy],ps(a,y,E,ht),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return et||(y.rb.ha=[nt.m11,nt.m12,nt.m21,nt.m22,nt.dx,nt.dy]),a.background!==null&&(et?(st&&(y.rb.ha=[nt.m11,nt.m12,nt.m21,nt.m22,nt.dx,nt.dy]),Wa(a,y,E,ht),st&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[nt.m11,nt.m12,nt.m21,nt.m22,nt.dx,nt.dy],Wa(a,y,E,ht)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),nt=y.yd,E=a.part,st=!1,E&&x.Gf("drawShadows")&&(st=E.isShadowed),y.clipInsteadOfFill&&(st=!1),a.Dd()&&st&&Su(y),st&&a.shadowVisible===!0?Su(y):st&&a.shadowVisible===!1&&Jl(y),E=a.panel,st&&Fo(a,E)&&a.shadowVisible===null&&Jl(y),y.Il&&(pt=x.computePixelRatio(),pt="drop-shadow("+y.shadowOffsetX/pt+"px "+y.shadowOffsetY/pt+"px "+y.shadowBlur/pt/2+"px "+y.shadowColor+")",a.background!==null&&nt.Ma.setAttributeNS(null,"filter",pt),a.areaBackground!==null&&nt.gd.setAttributeNS(null,"filter",pt)),st&&(a.Ma!==null||a.areaBackground!==null||Fo(a,E))?(il(a,!0),a.shadowVisible===null&&Jl(y)):il(a,!1),E=st,a.hh(y,x),et&&y.nh.pop(),y.o&&y.nh.pop(),nt=y.Gv.hs,st=et?a.svg:y.yd,pt=a.svg,!et&&pt!==null&&st!==pt&&pt.parentNode===a.panel.svg?(a.svg.replaceWith(st),a.svg=st,st!==null&&a.$o(y,b,ht,st),Fa(y,pt),!0):(a.svg=st,nt!==null&&st===null&&(um(y),y.nh.pop()),st===null||(a.$o(y,b,ht,st),y.Il&&(x=x.computePixelRatio(),a.Dv(st,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&Su(y),a.Dd()&&Jl(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&st.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&st.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(st):y.Nj.prepend(st),y.ti=st):b!==null&&qo(a,b,st),nt!==null&&nt(a,st)),!0)}qt.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var et=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,et.x),E=Math.max(x.y,et.y);var nt=Math.min(x.right,et.right)-y;x=Math.min(x.bottom,et.bottom)-E,et=this.tb,et!==null&&(y=et.x,E=et.y,nt=et.width,x=et.height),et=b.getAttribute("clip-path");var st=null;et!==null&&(st=a.svg.getElementById(et.split("#")[1].slice(0,-1))),st===null?(et="CLIP"+Bi++,st=a.Ud("clipPath",{id:et}),y=a.Ud("rect",{x:y,y:E,width:nt,height:x}),this instanceof vn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),st.appendChild(y),a.svg.appendChild(st),b.setAttributeNS(null,"clip-path","url(#"+et+")")):(a=st.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",nt.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),Fa(a,b)};function Fa(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function ta(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Jn(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()}}qt.hh=function(){},qt.lv=function(){this.Uc=!0},qt.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 vn?nh(this):!1;if(!(this instanceof vn&&E))if(this instanceof Ia){var et=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],et!==null&&Jy(a,et[0],et[1],et[2],et[3],et[4],et[5],et[6],et[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Qy(a)):y.setAttributeNS(null,"transform",Qy(a))}else if(!x||this instanceof vn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof Lr){et=y.getElementsByTagName("path");for(var nt=0;nt<et.length;nt++)et[nt].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 et=this.Dd()?this.opacity*a.globalAlpha:this.opacity,et===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",et.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(et=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(nt=b.copy().Vj(),a.rb.ha=[nt.m11,nt.m12,nt.m21,nt.m22,nt.dx,nt.dy],ps(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(nt=y.gd.getAttribute("filter"),nt!==null&&a.ad.setAttribute("filter",nt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),et&&hm(a,et)),(this.background!==null||y.Ma!==void 0)&&(et=y.Ma,this.background===null?(hm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof vn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),Wa(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),et&&hm(a,et)),this.$o(a,this.panel,this.actualBounds,y),!0},qt.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 Ki(a,y,x,b,E,et,nt){if(x!==null){var st=1,ht=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===eh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var pt=a.kq();if(st=et.width,ht=et.height,E?(st=nt.width,ht=nt.height):b||(st+=pt,ht+=pt),(et=y instanceof jc)&&x.xe&&(x.type===wd||x.yk===st&&x.ft===ht))var yt=x.xe;else{var Mt=0,zt=0,Zt=0,Qt=0,ie=0,Ee=0;if(Ee=ie=0,E?(ie=nt.x,Ee=nt.y):b||(ie-=pt/2,Ee-=pt/2),Mt=x.start.x*st+x.start.offsetX,zt=x.start.y*ht+x.start.offsetY,Zt=x.end.x*st+x.end.offsetX,Qt=x.end.y*ht+x.end.offsetY,Mt+=ie,Zt+=ie,zt+=Ee,Qt+=Ee,x.type===wu)yt=y.createLinearGradient(Mt,zt,Zt,Qt);else if(x.type===Ns)Ee=isNaN(x.endRadius)?Math.max(st,ht)/2:x.endRadius,isNaN(x.startRadius)?(ie=0,Ee=Math.max(st,ht)/2):ie=x.startRadius,yt=y.createRadialGradient(Mt,zt,ie,Zt,Qt,Ee);else if(x.type===wd)try{yt=y.createPattern(x.pattern,"repeat")}catch(je){yt=null}if(x.type!==wd&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)yt.addColorStop(E.key,E.value);if(et&&(x.xe=yt,yt!==null&&(x.yk=st,x.ft=ht),yt===null&&x.type===wd&&x.yk!==-1)){x.yk=-1;var we=a.diagram;we!==null&&x.yk===-1&&Nr(function(){we.redraw()},600)}}b?y.fillStyle=yt:y.strokeStyle=yt}}}qt.rg=function(a){if(a instanceof vn)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},qt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},qt.If=function(){for(var a=this instanceof vn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Ro(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Us(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)}Us(a,!1),Ls(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Ls(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,Ls(a,!1)))}qt.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var et=Le.alloc();et.yi(y,x,b,E,Dr),a.rotate(this.Kb,et.x,et.y),Le.free(et)}},qt.v=function(a){if(!gs(this)){a===void 0&&(a=!1),ho(this,!0),Yl(this,!0);var y=this.panel;y===null||a||y.v()}},qt.Uj=function(){gs(this)||(ho(this,!0),Yl(this,!0))};function Sa(a){if(!xa(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Mn&&a.Bd(),y.$b())),Yl(a,!0)}}qt.Uk=function(){!(this.l&2048)&&(Us(this,!0),Ls(this,!0))},qt.Wu=function(){Ls(this,!0)},qt.N=function(){var a=this.part;a!==null&&a.N()};function Da(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===vn.Table?vl(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===vn.Auto&&b.Pb()===a?Do(a,pn,y):x===Cr?b!==null?b.type===vn.Spot&&b.Pb()===a?Do(a,pn,y):(x=b.defaultStretch,x===Cr?Do(a,cn,y):Do(a,x,y)):Do(a,cn,y):Do(a,x,y)}function vl(a,y,x,b){var E=a.stretch;if(E!==Cr)return Do(a,E,b);var et=E=null;switch(y.stretch){case ar:et=!0;break;case pn:et=!0}switch(x.stretch){case qn:E=!0;break;case pn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===qn||y===pn),et===null&&(et=y===ar||y===pn),E===!0&&et===!0?Do(a,pn,b):E===!0?Do(a,qn,b):et===!0?Do(a,ar,b):Do(a,cn,b)}function Do(a,y,x){if(x)return y;if(y===cn||(x=a.desiredSize,x.w()))return cn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===qn)return cn;if(y===pn)return ar}else{if(y===ar)return cn;if(y===pn)return qn}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===ar)return cn;if(y===pn)return qn}else{if(y===qn)return cn;if(y===pn)return ar}return y}function il(a,y){a.l=y?a.l|512:a.l&-513}function Go(a){return(a.l&1024)!==0}function xf(a,y){a.l=y?a.l|1024:a.l&-1025}function Us(a,y){a.l=y?a.l|2048:a.l&-2049}function Ls(a,y){a.l=y?a.l|4096:a.l&-4097}function gs(a){return(a.l&8192)!==0}function ho(a,y){a.l=y?a.l|8192:a.l&-8193}function xa(a){return(a.l&16384)!==0}function Yl(a,y){a.l=y?a.l|16384:a.l&-16385}qt.Gj=function(){this.svg=null},qt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},qt.Av=function(){},qt.zv=function(a){return this.pa=a,Sa(this),!0},qt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},qt.kq=function(){return 0};function Ac(a){var y=a.part;if(y instanceof Mn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||H1(y,a)}}function Xy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof vn?a instanceof Mn?a.Bd():a.qm(a,function(x){Ac(x)}):Ac(a))}qt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new eo(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&d1(a)&&Oe("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new mn),this.localBindings.add(E),this},qt.set=function(a){return Object.assign(this,a),this},qt.Du=function(a){return r0(this,a),this},qt.apply=function(a){return a(this),this},qt.nm=function(a){return bc(this,a),this},qt.pz=function(){return this.ih()},qt.ih=function(){for(var a=this instanceof vn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},qt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new $n),this.animationTriggers.add(a.propertyName,a),this};function As(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 et=gd.I(a);typeof et=="function"?(x=kn(arguments),b=et(x),en(b)||Oe('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=xn.go[a]}if(b===null&&(E!=null&&E.constructor||Oe("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 Je&&1<x.length){et=b;var nt=x[1];(typeof nt=="string"||nt instanceof HTMLDivElement)&&(dp(et,nt),E++)}for(;E<x.length;E++)et=x[E],et===void 0?Oe("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):r0(b,et);return b}function r0(a,y){if(typeof y=="string")if(a instanceof Si)a.text=y;else if(a instanceof Lr)a.figure=y;else if(a instanceof Ia)a.source=y;else if(a instanceof vn)y=ol.I(y),y!==null&&(a.type=y);else if(a instanceof si){var x=tr(si,y);x!==null?a.type=x:Oe("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof bn?(y=tr(bn,y),y!==null&&(a.type=y)):a instanceof ti&&(y=tr(ti,y),y!==null&&(a.type=y));else if(y instanceof ze)a instanceof vn||Oe("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof co){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 co?Em(b,y):Oe("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof tn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof yo)a.type=y;else if(y instanceof eo)a instanceof ze||a instanceof co?a.bind(y):Oe("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof nl)a instanceof ze?a.Jv(y):Oe("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof wo)a instanceof bn&&a.type===bn.o?a.figures.add(y):Oe("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof ti)a instanceof wo?a.segments.add(y):Oe("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof ji)a instanceof Je||a instanceof Pr?a.layout=y:Oe("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 si){x=new Hn;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 co){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Oe("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+E),a.isRow=!0,a.index=E):y.column!==void 0&&(E=y.column,(E==null||E===1/0||isNaN(E)||0>E)&&Oe("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new Hn;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);bc(a,E)}else bc(a,y);else Oe('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function th(a,y){gd.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}un.Object.defineProperties(ze.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new wf),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 wf),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 wf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(jr(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&&(jr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Pa},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new _h),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Pa&&(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 _h),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 _h),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Ti},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new _h),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Cr},set:function(a){var y=this.stretch;y!==a&&(jr(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&&(jr(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)&&Ln(a,"0 <= value <= 1",ze,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Bc(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(Bc(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&&Pf(a,"GraphObject.areaBackground"),a instanceof si&&a.freeze(),jr(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&&Pf(a,"GraphObject.background"),a instanceof si&&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 nr)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 Le(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&&Oe("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,Xy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,b=this.jd,E=b.width,et=b.height;(E===y||isNaN(E)&&isNaN(y))&&(et===x||isNaN(et)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Lr&&this.qc(),this.g("desiredSize",b,a),Go(this)&&(a=this.part,a!==null&&(Mi(this,a,"width"),Mi(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 Lr&&this.qc(),this.g("desiredSize",y,a),Go(this)&&(a=this.part,a!==null&&Mi(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 Lr&&this.qc(),this.g("desiredSize",y,a),Go(this)&&(a=this.part,a!==null&&Mi(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:di},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(),jr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:xo},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(),jr(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 Br(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&&Ro(this),this.Ab}},oe:{get:function(){return this.l&4096&&Ro(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(jr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:cn},set:function(a){this.reshapingBehavior!==a&&(jr(this),this.A.Pf=a)}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(a.Mc()&&!a.Xb()&&Oe("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Sa(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&&Ln(a,">= 0",ze,"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&&Ln(a,">= 1",ze,"columnSpan"),jr(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&&Ln(a,">= 0",ze,"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&&Ln(a,">= 1",ze,"rowSpan"),jr(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&&(jr(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 Mn||Oe("Cannot set portID on a Link: "+a),y!==null&&x!==null&&W0(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:Ur},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Ac(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Ln(a,">= 0",ze,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Ac(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),Ac(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&&Ln(a,">= 0",ze,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Ur},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Ac(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Ln(a,">= 0",ze,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Ac(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),Ac(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&&Ln(a,">= 0",ze,"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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(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&&(jr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),ze.prototype.trigger=ze.prototype.Jv,ze.prototype.findBindingPanel=ze.prototype.ih,ze.prototype.findTemplateBinder=ze.prototype.pz,ze.prototype.setProperties=ze.prototype.nm,ze.prototype.apply=ze.prototype.apply,ze.prototype.attach=ze.prototype.Du,ze.prototype.set=ze.prototype.set,ze.prototype.isEnabledObject=ze.prototype.If,ze.prototype.isVisibleObject=ze.prototype.Ed,ze.prototype.isContainedBy=ze.prototype.rg,ze.prototype.getNearestIntersectionPoint=ze.prototype.rs,ze.prototype.getLocalPoint=ze.prototype.qs,ze.prototype.getDocumentScale=ze.prototype.Df,ze.prototype.getDocumentAngle=ze.prototype.li,ze.prototype.getDocumentBounds=ze.prototype.mi,ze.prototype.getDocumentPoint=ze.prototype.ga,ze.prototype.intersectsRect=ze.prototype.Yc,ze.prototype.containedInRect=ze.prototype.fh,ze.prototype.containsRect=ze.prototype.Re,ze.prototype.containsPoint=ze.prototype.ca,ze.prototype.raiseChanged=ze.prototype.g,ze.prototype.raiseChangedEvent=ze.prototype.cb,ze.prototype.addCopyProperty=ze.prototype.Vw;var gd=null;ze.className="GraphObject",gd=new $n,th("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=As(vn,vn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof vn){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"},As(Lr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new rr(0,0,2.76142374915397,2.761423749153969),spot2:new rr(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 vn&&(x=b.fb("ButtonBorder"),x instanceof Lr)){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 vn&&(x=b.fb("ButtonBorder"),x instanceof Lr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof vn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Lr){x=x.diagram;var et=x.skipsUndoManager;x.skipsUndoManager=!0;var nt=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=nt,nt=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=nt,x.skipsUndoManager=et}}},y.actionUp=function(x,b){if(b.If()&&b instanceof vn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Lr){var et=x.diagram,nt=et.skipsUndoManager;et.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),et.skipsUndoManager=nt}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof vn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof Lr){var et=x.diagram,nt=et.skipsUndoManager;et.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),et.skipsUndoManager=nt}}},y.actionMove=function(x,b){if(b.If()&&b instanceof vn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof Lr))){var et=E.skipsUndoManager;E.skipsUndoManager=!0;var nt=b._buttonFillPressed;x.fill!==nt&&(x.fill=nt),nt=b._buttonStrokePressed,x.stroke!==nt&&(x.stroke=nt),E.skipsUndoManager=et}}},y}),th("TreeExpanderButton",function(){var a=As("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},As(Lr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:bi},new eo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new eo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof qr&&(x=x.adornedPart),x instanceof Mn){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}),th("SubGraphExpanderButton",function(){var a=As("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},As(Lr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:bi},new eo("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 qr&&(x=x.adornedPart),x instanceof Pr){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}),th("ToolTip",function(){return As(qr,vn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Le(0,3),shadowBlur:5},As(Lr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new rr(0,0,4,6),spot2:new rr(1,1,-4,-4)}))}),th("ContextMenu",function(){return As(qr,vn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Le(0,3),shadowBlur:5},new eo("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),th("ContextMenuButton",function(){var a=As("Button");a.stretch=qn;var y=a.fb("ButtonBorder");return y instanceof Lr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new rr(0,0,2,3),y.spot2=new rr(1,1,-2,-2)),a}),th("PanelExpanderButton",function(a){var y=lm(a,"COLLAPSIBLE"),x=As("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},As(Lr,{name:"ButtonIcon",strokeWidth:2},new eo("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Lr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var et=E.diagram;if(et!==null&&!et.isReadOnly){var nt=E.ih();nt===null&&(nt=E.part),nt!==null&&(E=nt.fb(y),E!==null&&(b.handled=!0,et.Ea("Collapse/Expand Panel"),E.visible=!E.visible,et.eb("Collapse/Expand Panel")))}},x}),th("CheckBoxButton",function(a){var y=lm(a);return a=As("Button",{desiredSize:new Cn(14,14)},As(Lr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:pn,geometryStretch:Vn,visible:!1},y!==""?new eo("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof vn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var et=b.fb("ButtonIcon");E.Ea("checkbox"),et.visible=!et.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),th("CheckBox",function(a){a=lm(a),a=As("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Br(0,1,0,0)});var y=As(vn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Br(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}),ze.None=cn=new tn(ze,"None",0),ze.Default=Cr=new tn(ze,"Default",0),ze.Vertical=ar=new tn(ze,"Vertical",4),ze.Horizontal=qn=new tn(ze,"Horizontal",5),ze.Fill=pn=new tn(ze,"Fill",3),ze.Uniform=Vn=new tn(ze,"Uniform",1),ze.UniformToFill=Wr=new tn(ze,"UniformToFill",2),ze.FlipVertical=Fr=new tn(ze,"FlipVertical",1),ze.FlipHorizontal=Xr=new tn(ze,"FlipHorizontal",2),ze.FlipBoth=ci=new tn(ze,"FlipBoth",3),ze.make=As,ze.getBuilders=function(){var a=new $n,y;for(y in gd)if(y!==y.toLowerCase()){var x=gd.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},ze.defineBuilder=th,ze.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=gd.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof ze))return y&&b.set(y),b;Oe('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},ze.takeBuilderArgument=lm;function wf(){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=di,this.o=xo,this.hg=Cr,this.ob=this.Bi=1,this.Pf=cn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}wf.prototype.copy=function(){var a=new wf;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 _h(){this.u=-1/0,this.o=0,this.F=Ti,this.rr=Pa,this.j=this.V="None"}_h.prototype.copy=function(){var a=new _h;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},_h.className="LinkElementSettings";function Rp(){this.yj=this.Xi=jo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Rp.prototype.copy=function(){var a=new Rp;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},Rp.className="LinkSettings";function Nc(){this.ha=[1,0,0,1,0,0]}Nc.prototype.copy=function(){var a=new Nc;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},Nc.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},Nc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Nc.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,et=this.ha[0]*-b+this.ha[2]*a,nt=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]=et,this.ha[3]=nt,this.translate(-y,-x)}},Nc.className="STransform";function bf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}bf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},bf.className="SGradient";function Fl(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 es(this,x)}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",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},Fl.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),en(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},Fl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Fl.prototype.focus=function(){this.Oa.focus()},Fl.prototype.mx=function(){this.ownerDocument=null},un.Object.defineProperties(Fl.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}}}),Fl.className="SVGSurface";function es(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 Nc,this.j=um(this),this.Nj=um(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Bi++,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,et,nt){a.Nj===void 0?_p(a,y,x,b,E,et,nt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+et+", "+nt+")")}qt=es.prototype,qt.arc=function(a,y,x,b,E,et,nt,st){var ht=2*Math.PI,pt=ht-1e-6,yt=x*Math.cos(b),Mt=x*Math.sin(b),zt=a+yt,Zt=y+Mt,Qt=et?0:1;b=et?b-E:E-b,(1e-6<Math.abs(nt-zt)||1e-6<Math.abs(st-Zt))&&this.path.push(["L",zt,+Zt]),0>b&&(b=b%ht+ht),b>pt?(this.path.push(["A",x,x,0,1,Qt,a-yt,y-Mt]),this.path.push(["A",x,x,0,1,Qt,zt,Zt])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),Qt,a+x*Math.cos(E),y+x*Math.sin(E)])},qt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},qt.Se=function(a){this.addPath(this.path,this.rb,a||0)},qt.bezierCurveTo=function(a,y,x,b,E,et){this.path.push(["C",a,y,x,b,E,et])},qt.clearRect=function(){},qt.clip=function(){this.Yl.clipPath=!0},qt.closePath=function(){this.path.push(["z"])},qt.createLinearGradient=function(a,y,x,b){var E=new bf("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},qt.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"+Bi++,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(Tc,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},qt.createRadialGradient=function(a,y,x,b,E,et){var nt=new bf("radial");return nt.x1=a,nt.y1=y,nt.r1=x,nt.x2=b,nt.y2=E,nt.r2=et,nt};function Jy(a,y,x,b,E,et,nt,st,ht){b=st/b,E=ht/E,et===0&&nt===0||a.rb.translate(et,nt),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}qt.drawImage=function(a,y,x,b,E,et,nt,st,ht){var pt="";a instanceof HTMLCanvasElement&&(pt=a.toDataURL()),a instanceof HTMLImageElement&&(pt=a.getAttribute("src"));var yt=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(et=y,nt=x,st=b=yt,ht=E=a),b=b||0,E=E||0,st=st||0,ht=ht||0,Jy(this,y,x,b,E,et||0,nt||0,st,ht),et={x:0,y:0,width:yt||b,height:a||E,href:pt},Ge.$(b,st)&&Ge.$(E,ht)?pt.toLowerCase().indexOf(".svg")===-1&&pt.toLowerCase().indexOf("data:image/svg")===-1&&(et.preserveAspectRatio="xMidYMid slice"):et.preserveAspectRatio="none",(y!==0||x!==0||b!==yt||E!==a)&&(b+=y,E+=x,et["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),md(this,Tc,et,this.rb),this.addElement(Tc,et)},qt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),i0(this,this.Yl)},qt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},qt.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},md(this,"fill",a,this.rb),this.addElement("rect",a)},qt.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},md(this,"fill",a,this.rb),i0(this,a),this.svg.prepend(this.Ud("rect",a))},qt.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},md(this,"fill",y,this.rb),this.addElement("text",y,a[0])},qt.lineTo=function(a,y){this.path.push(["L",a,y])},qt.moveTo=function(a,y){this.path.push(["M",a,y])},qt.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},qt.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"])},qt.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},qt.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())},qt.setTransform=function(a,y,x,b,E,et){a===1&&y===0&&x===0&&b===1&&E===0&&et===0||_p(this,a,y,x,b,E,et)};function Qy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}qt.scale=function(a,y){this.rb.scale(a,y)},qt.translate=function(a,y){this.rb.translate(a,y)},qt.transform=function(){},qt.yc=function(){},qt.stroke=function(){qy(this,this.Yl)},qt.jk=function(){this.clipInsteadOfFill||this.stroke()},qt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},qt.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 md(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 bf?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 bf?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 bf)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"+Bi++,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 et=[],nt=0;nt<y;nt++){var st=E[nt],ht=st.color;st={offset:st.offset,"stop-color":ht},/^rgba\(/.test(ht)&&(ht=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ht),st["stop-color"]="rgb("+ht[1]+","+ht[2]+","+ht[3]+")",st["stop-opacity"]=ht[4]),et.push(st)}for(et.sort(function(pt,yt){return pt.offset>yt.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",et[E]));return a.svg.appendChild(x),"url(#"+b+")"}qt.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var et=kn(a[E]),nt=[et.shift()];if(nt[0]==="A")nt.push(et.shift()+","+et.shift(),et.shift(),et.shift()+","+et.shift(),et.shift()+","+et.shift());else for(;et.length;)nt.push(et.shift()+","+et.shift());b.push(nt.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,md(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var st in a)st!=="transform"&&y.setAttributeNS(null,st,a[st]);else{st=y.getElementsByTagName("path");for(var ht in a)ht!=="transform"&&st[x].setAttributeNS(null,ht,a[ht])}else this.addElement("path",a)};function _p(a,y,x,b,E,et,nt){var st=new Nc;st.ha=[y,x,b,E,et,nt],y={},md(a,"g",y,st),st=a.addElement("g",y),a.nh.push(st)}function um(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}qt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Jl(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Su(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}qt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},qt.fs=function(){this.Ct=!1},qt.Vc=function(){},qt.Wx=function(){},es.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},es.prototype.getImageData=function(){return null},es.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()))}es.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},es.className="SVGContext",Je.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Fl(this,xn.document));var y=new Fl(this,xn.document,!0);a===void 0&&(a=new Hn);var x=this;return gf(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)},Je.prototype.makeSvg=Je.prototype.Cs,Je.prototype.av=function(a){return this.Cs(a)},Je.prototype.makeSVG=Je.prototype.av;function Ws(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 jc(y,x,b),y.H=a}Ws.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},Ws.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Ws.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Ws.prototype.focus=function(){this.Oa.focus()},Ws.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},un.Object.defineProperties(Ws.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}}}),Ws.className="CanvasSurface";function jc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Oe("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 xr,this.isTemporary=!!x}qt=jc.prototype,qt.Wx=function(a){this.Z.imageSmoothingEnabled=a},qt.arc=function(a,y,x,b,E,et){this.Z.arc(a,y,x,b,E,et)},qt.beginPath=function(){this.Z.beginPath()},qt.Se=function(){},qt.bezierCurveTo=function(a,y,x,b,E,et){this.Z.bezierCurveTo(a,y,x,b,E,et)},qt.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},qt.clip=function(){this.Z.clip()},qt.closePath=function(){this.Z.closePath()},qt.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},qt.createPattern=function(a,y){return this.Z.createPattern(a,y)},qt.createRadialGradient=function(a,y,x,b,E,et){return this.Z.createRadialGradient(a,y,x,b,E,et)},qt.drawImage=function(a,y,x,b,E,et,nt,st,ht){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,et,nt,st,ht)},qt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},qt.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},qt.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},qt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},qt.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},qt.lineTo=function(a,y){this.Z.lineTo(a,y)},qt.measureText=function(a){return this.Z.measureText(a)},qt.moveTo=function(a,y){this.Z.moveTo(a,y)},qt.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},qt.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},qt.restore=function(){this.Z.restore()},qt.save=function(){this.yc(),this.Z.save()},jc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},qt=jc.prototype,qt.setTransform=function(a,y,x,b,E,et){this.El.setTransform(a,y,x,b,E,et)},qt.scale=function(a,y){this.El.scale(a,y)},qt.translate=function(a,y){this.El.translate(a,y)},qt.stroke=function(){this.Z.stroke()},qt.transform=function(a,y,x,b,E,et){if(a!==1||y!==0||x!==0||b!==1||E!==0||et!==0){var nt=this.El,st=nt.m11*a+nt.m21*y;a=nt.m12*a+nt.m22*y,y=nt.m11*x+nt.m21*b,x=nt.m12*x+nt.m22*b,nt.dx=nt.m11*E+nt.m21*et+nt.dx,nt.dy=nt.m12*E+nt.m22*et+nt.dy,nt.m11=st,nt.m12=a,nt.m21=y,nt.m22=x}},qt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},qt.ng=function(a,y){if(a instanceof si&&a.type===Ns){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)},qt.jk=function(){this.Hm||this.stroke()},qt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},qt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},qt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},qt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},qt.Hs=function(){},un.Object.defineProperties(jc.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([]);jc.className="CanvasSurfaceContext";function zp(){this.F=this.o=this.u=this.j=0}zp.className="ColorNumbers";function si(a,y){xd||(c0(),xd=!0),oi(this),this._isFrozen=!1,a===void 0?(this.na=eh,this.xk="black"):typeof a=="string"?(this.na=eh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===wu?(this.Qd=ai,this.Lk=Uo):this.Lk=a===Ns?this.Qd=Dr:this.Qd=Ur,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}si.prototype.copy=function(){var a=new si;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},qt=si.prototype,qt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},qt.ka=function(){return Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},qt.qb=function(a){a.classType===si&&(this.type=a)},qt.toString=function(){var a="Brush(";if(this.type===eh)a+=this.color;else if(a=this.type===wu?a+"Linear ":this.type===Ns?a+"Radial ":this.type===wd?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+")"},qt.addColorStop=function(a,y){return this._isFrozen&&Ke(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Ln(a,"0 <= loc <= 1",si,"addColorStop:loc"),this.we===null&&(this.we=new $n),this.we.add(a,y),this.na===eh&&(this.type=wu),this.xe=null,this},qt.Vz=function(a,y){if(this._isFrozen&&Ke(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?bd:y,this.type===eh)xu(this.color),this.color=yd(a,y);else if((this.type===wu||this.type===Ns)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)xu(x.value),this.addColorStop(x.key,yd(a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?bd:x,xu(a),yd(y,x)}qt.Wy=function(a,y){if(this._isFrozen&&Ke(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?bd:y,this.type===eh)xu(this.color),this.color=yd(-a,y);else if((this.type===wu||this.type===Ns)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)xu(x.value),this.addColorStop(x.key,yd(-a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?bd:x,xu(a),yd(-y,x)}function a0(a,y,x){xu(a),a=Pi.j;var b=Pi.u,E=Pi.o,et=Pi.F;return xu(y),x===void 0&&(x=.5),"rgba("+Math.round((Pi.j-a)*x+a)+", "+Math.round((Pi.u-b)*x+b)+", "+Math.round((Pi.o-E)*x+E)+", "+Math.round((Pi.F-et)*x+et)+")"}qt.Gx=function(){if(this.type===eh)return vd(this.color);if((this.type===wu||this.type===Ns)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Ns)return vd(a.first().value);if(a.get(.5)!==null)return vd(a.get(.5));if(a.count===2)return a=a.Fa(),vd(a0(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,et=1;y.next();){var nt=y.key,st=Math.abs(.5-y.key);E>et&&st<E?(x=nt,E=st):et>=E&&st<et&&(b=nt,et=st)}return x>b&&(et=x,x=b,b=et,et=E),E=b-x,vd(a0(a.get(x),a.get(b),1-et/E))}return!1};function vd(a){return a?a instanceof si?a.Gx():(xu(a),128>(299*Pi.j+587*Pi.u+114*Pi.o)/1e3):!1}function yd(a,y){switch(y){case bd:y=100*l0(Pi.j);var x=100*l0(Pi.u),b=100*l0(Pi.o);return wa.j=.4124564*y+.3575761*x+.1804375*b,wa.u=.2126729*y+.7151522*x+.072175*b,wa.o=.0193339*y+.119192*x+.9503041*b,wa.F=Pi.F,y=h0(wa.j/Sd[0]),x=h0(wa.u/Sd[1]),b=h0(wa.o/Sd[2]),Ql.j=116*x-16,Ql.u=500*(y-x),Ql.o=200*(x-b),Ql.F=wa.F,Ql.j=Math.min(100,Math.max(0,Ql.j+100*a)),a=(Ql.j+16)/116,y=a-Ql.o/200,wa.j=Sd[0]*n1(Ql.u/500+a),wa.u=Sd[1]*(Ql.j>cm*f0?Math.pow(a,3):Ql.j/cm),wa.o=Sd[2]*n1(y),wa.F=Ql.F,a=-.969266*wa.j+1.8760108*wa.u+.041556*wa.o,y=.0556434*wa.j+-.2040259*wa.u+1.0572252*wa.o,Pi.j=255*u0((3.2404542*wa.j+-1.5371385*wa.u+-.4985314*wa.o)/100),Pi.u=255*u0(a/100),Pi.o=255*u0(y/100),Pi.F=wa.F,Pi.j=Math.round(Pi.j),255<Pi.j?Pi.j=255:0>Pi.j&&(Pi.j=0),Pi.u=Math.round(Pi.u),255<Pi.u?Pi.u=255:0>Pi.u&&(Pi.u=0),Pi.o=Math.round(Pi.o),255<Pi.o?Pi.o=255:0>Pi.o&&(Pi.o=0),"rgba("+Pi.j+", "+Pi.u+", "+Pi.o+", "+Pi.F+")";case r1:return s0(),ms.o=Math.min(100,Math.max(0,ms.o+100*a)),"hsla("+ms.j+", "+ms.u+"%, "+ms.o+"%, "+ms.F+")";default:Oe("Unknown color space: "+y)}}function xu(a){xd||(c0(),xd=!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,Pi.j=a[0],Pi.u=a[1],Pi.o=a[2],Pi.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Pi.j=0,Pi.u=0,Pi.o=0,Pi.F=1)}}function s0(){var a=Pi.j/255,y=Pi.u/255,x=Pi.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),et=b-E;if(E=(b+E)/2,et===0)var nt=a=0;else{switch(b){case a:nt=(y-x)/et%6;break;case y:nt=(x-a)/et+2;break;case x:nt=(a-y)/et+4}nt*=60,0>nt&&(nt+=360),a=et/(1-Math.abs(2*E-1))}ms.j=Math.round(nt),ms.u=Math.round(100*a),ms.o=Math.round(100*E),ms.F=Pi.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 Pf(a,y){typeof a!="string"&&(a instanceof si||Oe("Value for "+y+" must be a color string or a Brush, not "+a))}function c0(){d0=Wi?new Ws(null,void 0,{willReadFrequently:!0}).context:null}un.Object.defineProperties(si.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Ke(this,a),this.na=a,this.start.Mc()&&(a===wu?this.start=ai:a===Ns&&(this.start=Dr)),this.end.Mc()&&(a===wu?this.end=Uo:a===Ns&&(this.end=Dr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Ke(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Ke(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Ke(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Ke(this,a),0>a&&Ln(a,">= zero",si,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Ke(this,a),0>a&&Ln(a,">= zero",si,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Ke(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Ke(this,a),this.cr=a,this.xe=null}}}),si.prototype.isDark=si.prototype.Gx,si.prototype.darkenBy=si.prototype.Wy,si.prototype.lightenBy=si.prototype.Vz,si.prototype.addColorStop=si.prototype.addColorStop;var f0=216/24389,cm=24389/27,Sd=[95.047,100,108.883],d0=null,Pi=new zp,ms=new zp,wa=new zp,Ql=new zp,xd=!1;si.className="Brush";var eh;si.Solid=eh=new tn(si,"Solid",0);var wu;si.Linear=wu=new tn(si,"Linear",1);var Ns;si.Radial=Ns=new tn(si,"Radial",2);var wd;si.Pattern=wd=new tn(si,"Pattern",4);var bd;si.Lab=bd=new tn(si,"Lab",5);var r1;si.HSL=r1=new tn(si,"HSL",6),si.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},si.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;xd||(c0(),xd=!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)},si.lighten=function(a){return t1(a)},si.lightenBy=t1,si.darken=function(a){return e1(a)},si.darkenBy=e1,si.mix=a0,si.isDark=vd;function yo(){this.xa="Base"}yo.prototype.measure=function(){},yo.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},yo.prototype.arrange=function(){},yo.prototype.Ly=function(a,y,x,b,E,et){a.arrange(y,x,b,E,et)},yo.prototype.iA=function(a){a.Uj()},yo.prototype.gc=function(){},un.Object.defineProperties(yo.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return vn}}}),yo.prototype.remeasureObject=yo.prototype.iA,yo.prototype.arrangeElement=yo.prototype.Ly,yo.prototype.measureElement=yo.prototype.Yz,yo.className="PanelLayout";function fm(){this.xa="Base"}$e(fm,yo),fm.prototype.measure=function(a,y,x,b,E,et,nt){var st=b.length;a=bu(a);for(var ht=0;ht<st;ht++){var pt=b[ht];if(pt.visible||pt===a){var yt=pt.margin,Mt=yt.right+yt.left;yt=yt.top+yt.bottom,pt.measure(y,x,et,nt);var zt=pt.measuredBounds;Mt=Math.max(zt.width+Mt,0),yt=Math.max(zt.height+yt,0),zt=pt.position.x;var Zt=pt.position.y;isFinite(zt)||(zt=0),isFinite(Zt)||(Zt=0),pt instanceof Lr&&pt.isGeometryPositioned&&(pt=pt.strokeWidth/2,zt-=pt,Zt-=pt),Ai(E,zt,Zt,Mt,yt)}}},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 et=y[E],nt=et.measuredBounds,st=et.margin,ht=et.position.x,pt=et.position.y;if(ht=isNaN(ht)?-a:ht-a,pt=isNaN(pt)?-x:pt-x,et instanceof Lr&&et.isGeometryPositioned){var yt=et.strokeWidth/2;ht-=yt,pt-=yt}et.visible&&et.arrange(ht+st.left,pt+st.top,nt.width,nt.height)}};function dm(){this.xa="Base"}$e(dm,yo),dm.prototype.measure=function(a,y,x,b,E,et,nt){var st=b.length;y=Fn(),et=bu(a);for(var ht=0;ht<st;ht++){var pt=b[ht];if(pt.visible||pt===et){var yt=Da(pt,!1);if(yt!==cn&&yt!==qn)y.push(pt);else{pt.measure(1/0,x,0,nt),yt=pt.margin,pt=pt.measuredBounds;var Mt=Math.max(pt.height+yt.top+yt.bottom,0);E.width+=Math.max(pt.width+yt.right+yt.left,0),E.height=Math.max(E.height,Mt)}}}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++)ht=y[a],(ht.visible||ht===et)&&(yt=ht.margin,st=yt.right+yt.left,yt=yt.top+yt.bottom,ht.measure(1/0,x,0,nt),ht=ht.measuredBounds,yt=Math.max(ht.height+yt,0),E.width+=Math.max(ht.width+st,0),E.height=Math.max(E.height,yt));Bn(y)},dm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,et=E.top,nt=a.isOpposite,st=nt?x.width:E.left,ht=0;ht<b;ht++){var pt=et,yt=y[ht];if(yt.visible){var Mt=yt.measuredBounds,zt=yt.margin,Zt=zt.top+zt.bottom,Qt=et+E.bottom,ie=Mt.height,Ee=Da(yt,!1);(isNaN(yt.desiredSize.height)&&Ee===pn||Ee===ar)&&(ie=Math.max(x.height-Zt-Qt,0)),Zt=ie+Zt+Qt,Qt=yt.alignment,Qt.Xb()&&(Qt=a.defaultAlignment),Qt.sb()||(Qt=Dr),nt&&(st-=Mt.width+zt.left+zt.right),yt.arrange(st+Qt.offsetX+zt.left,pt+Qt.offsetY+zt.top+(x.height*Qt.y-Zt*Qt.y),Mt.width,ie),nt||(st+=Mt.width+zt.left+zt.right)}}};function pm(){this.xa="Base"}$e(pm,yo),pm.prototype.measure=function(a,y,x,b,E,et){var nt=b.length;x=Fn();for(var st=bu(a),ht=0;ht<nt;ht++){var pt=b[ht];if(pt.visible||pt===st){var yt=Da(pt,!1);if(yt!==cn&&yt!==ar)x.push(pt);else{var Mt=pt.margin;yt=Mt.right+Mt.left,Mt=Mt.top+Mt.bottom,pt.measure(y,1/0,et,0),pt=pt.measuredBounds,ra(E,Math.max(E.width,Math.max(pt.width+yt,0)),E.height+Math.max(pt.height+Mt,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++)ht=x[a],(ht.visible||ht===st)&&(pt=ht.margin,nt=pt.right+pt.left,pt=pt.top+pt.bottom,ht.measure(y,1/0,et,0),ht=ht.measuredBounds,pt=Math.max(ht.height+pt,0),E.width=Math.max(E.width,Math.max(ht.width+nt,0)),E.height+=pt);Bn(x)}},pm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,et=E.left,nt=a.isOpposite,st=nt?x.height:E.top,ht=0;ht<b;ht++){var pt=et,yt=y[ht];if(yt.visible){var Mt=yt.measuredBounds,zt=yt.margin,Zt=zt.left+zt.right,Qt=et+E.right,ie=Mt.width,Ee=Da(yt,!1);(isNaN(yt.desiredSize.width)&&Ee===pn||Ee===qn)&&(ie=Math.max(x.width-Zt-Qt,0)),Zt=ie+Zt+Qt,Qt=yt.alignment,Qt.Xb()&&(Qt=a.defaultAlignment),Qt.sb()||(Qt=Dr),nt&&(st-=Mt.height+zt.bottom+zt.top),yt.arrange(pt+Qt.offsetX+zt.left+(x.width*Qt.x-Zt*Qt.x),st+Qt.offsetY+zt.top,ie,Mt.height),nt||(st+=Mt.height+zt.bottom+zt.top)}}};function gm(){this.xa="Base"}$e(gm,yo),gm.prototype.measure=function(a,y,x,b,E,et,nt){var st=b.length,ht=a.Pb(),pt=ht.margin,yt=pt.right+pt.left,Mt=pt.top+pt.bottom;ht.measure(y,x,et,nt);var zt=ht.measuredBounds;et=zt.width,nt=zt.height;var Zt=Math.max(et+yt,0),Qt=Math.max(nt+Mt,0),ie=a.isClipping,Ee=on.allocAt(-pt.left,-pt.top,Zt,Qt),we=on.allocAt(0,0,et,nt);p0(ht,we,!0),et=we.width,nt=we.height;for(var je=!0,Fe=bu(a),De=0;De<st;De++){var _e=b[De];zt=y;var Xe=x;if(_e!==ht&&(_e.visible||_e===Fe)){pt=_e.margin;var En=pt.left,Gn=pt.top;switch(Zt=pt.right+pt.left,Qt=pt.top+pt.bottom,pt=Da(_e,!1),pt){case pn:zt=et,Xe=nt,Gn=En=Qt=Zt=0;break;case qn:zt=et,En=Zt=0;break;case ar:Xe=nt,Gn=Qt=0}_e.measure(zt,Xe,0,0),zt=_e.measuredBounds,Zt=Math.max(zt.width+Zt,0),Qt=Math.max(zt.height+Qt,0),pt=_e.alignment,pt.Xb()&&(pt=a.defaultAlignment),pt.sb()||(pt=Dr);var Dn=_e.alignmentFocus;if(Dn.Xb()&&(Dn=Dr),Xe=null,_e instanceof vn&&_e.$e!==""&&(Xe=_e.fb(_e.$e),Xe===_e&&(Xe=null)),En=we.x-En,Gn=we.y-Gn,Xe!==null){for(_e.arrange(0,0,zt.width,zt.height),zt=Xe.actualBounds,zt=Le.allocAt(zt.x+(Dn.x*zt.width-Dn.offsetX),zt.y+(Dn.y*zt.height-Dn.offsetY)),Xe=Xe.panel;Xe!==_e;)Xe.transform.Ga(zt),Xe=Xe.panel;En+=pt.x*et+pt.offsetX-zt.x,Gn+=pt.y*nt+pt.offsetY-zt.y,Le.free(zt)}else En+=pt.x*et+pt.offsetX-(Dn.x*zt.width+Dn.offsetX),Gn+=pt.y*nt+pt.offsetY-(Dn.y*zt.height+Dn.offsetY);je?(je=!1,E.h(En,Gn,Zt,Qt)):Ai(E,En,Gn,Zt,Qt)}}switch(je?E.assign(Ee):ie?E.Uu(we.x,we.y,we.width,we.height):Ai(E,Ee.x,Ee.y,Ee.width,Ee.height),on.free(Ee),on.free(we),pt=ht.stretch,pt===Cr&&(pt=Da(ht,!1)),pt){case cn:return;case pn:if(!isFinite(y)&&!isFinite(x))return;break;case qn:if(!isFinite(y))return;break;case ar:if(!isFinite(x))return}for(zt=ht.measuredBounds,et=zt.width,nt=zt.height,Zt=Math.max(et+yt,0),Qt=Math.max(nt+Mt,0),pt=ht.margin,we=on.allocAt(-pt.left,-pt.top,Zt,Qt),p0(ht,we,!0),et=we.width,nt=we.height,y=0;y<st;y++)x=b[y],x===ht||!x.visible&&x!==Fe||(pt=x.margin,Zt=pt.right+pt.left,Qt=pt.top+pt.bottom,zt=x.measuredBounds,Zt=Math.max(zt.width+Zt,0),Qt=Math.max(zt.height+Qt,0),yt=x.alignment,yt.Xb()&&(yt=a.defaultAlignment),yt.sb()||(yt=Dr),x=x.alignmentFocus,x.Xb()&&(x=Dr),je?(je=!1,E.h(yt.x*et+yt.offsetX-(x.x*zt.width+x.offsetX)-pt.left,yt.y*nt+yt.offsetY-(x.y*zt.height+x.offsetY)-pt.top,Zt,Qt)):Ai(E,yt.x*et+yt.offsetX-(x.x*zt.width+x.offsetX)-pt.left,yt.y*nt+yt.offsetY-(x.y*zt.height+x.offsetY)-pt.top,Zt,Qt));je?E.assign(Ee):ie?E.Uu(we.x,we.y,we.width,we.height):Ai(E,Ee.x,Ee.y,Ee.width,Ee.height),on.free(we)},gm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),et=E.measuredBounds,nt=et.width,st=et.height,ht=a.padding;et=ht.left,ht=ht.top;var pt=et-x.x,yt=ht-x.y;for(E.arrange(pt,yt,nt,st),nt=on.allocAt(0,0,nt,st),p0(E,nt,!1),st=0;st<b;st++){var Mt=y[st];if(Mt!==E){pt=Mt.measuredBounds;var zt=pt.width,Zt=pt.height;yt=Mt.alignment,yt.Xb()&&(yt=a.defaultAlignment),yt.sb()||(yt=Dr);var Qt=Mt.alignmentFocus;if(Qt.Xb()&&(Qt=Dr),pt=null,Mt instanceof vn&&Mt.$e!==""&&(pt=Mt.fb(Mt.$e),pt===Mt&&(pt=null)),pt!==null){var ie=pt.actualBounds;for(Qt=Le.allocAt(ie.x+(Qt.x*ie.width-Qt.offsetX),ie.y+(Qt.y*ie.height-Qt.offsetY)),pt=pt.panel;pt!==Mt;)pt.transform.Ga(Qt),pt=pt.panel;pt=yt.x*nt.width+yt.offsetX-Qt.x,yt=yt.y*nt.height+yt.offsetY-Qt.y,Le.free(Qt)}else pt=yt.x*nt.width+yt.offsetX-(Qt.x*zt+Qt.offsetX),yt=yt.y*nt.height+yt.offsetY-(Qt.y*Zt+Qt.offsetY);pt+=nt.x-x.x,yt+=nt.y-x.y,Mt.visible&&Mt.arrange(et+pt,ht+yt,zt,Zt)}}on.free(nt)};function p0(a,y,x){var b=null;if(a instanceof vn&&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"}$e(mm,yo),mm.prototype.measure=function(a,y,x,b,E,et,nt){var st=b.length,ht=a.Pb(),pt=ht.margin,yt=y,Mt=x,zt=pt.right+pt.left,Zt=pt.top+pt.bottom;ht.measure(y,x,et,nt),pt=ht.measuredBounds;var Qt=0,ie=null;ht instanceof Lr&&(ie=ht,Qt=ie.strokeWidth*ie.scale);var Ee=Math.max(pt.width+zt,0);pt=Math.max(pt.height+Zt,0);var we=y0(ht),je=we.x*Ee+we.offsetX;we=we.y*pt+we.offsetY;var Fe=S0(ht),De=Fe.x*Ee+Fe.offsetX;for(Fe=Fe.y*pt+Fe.offsetY,isFinite(y)&&(yt=Math.max(Math.abs(je-De)-Qt,0)),isFinite(x)&&(Mt=Math.max(Math.abs(we-Fe)-Qt,0)),Qt=Cn.alloc(),Qt.h(0,0),a=bu(a),Fe=0;Fe<st;Fe++)we=b[Fe],we===ht||!we.visible&&we!==a||(pt=we.margin,Ee=pt.right+pt.left,je=pt.top+pt.bottom,we.measure(yt,Mt,0,0),pt=we.measuredBounds,Ee=Math.max(pt.width+Ee,0),pt=Math.max(pt.height+je,0),Qt.h(Math.max(Ee,Qt.width),Math.max(pt,Qt.height)));if(st===1)E.width=Ee,E.height=pt,Cn.free(Qt);else{switch(we=y0(ht),Fe=S0(ht),st=b=0,Fe.x!==we.x&&Fe.y!==we.y&&(b=Qt.width/Math.abs(Fe.x-we.x),st=Qt.height/Math.abs(Fe.y-we.y)),Cn.free(Qt),Qt=0,ie!==null&&(Qt=ie.strokeWidth*ie.scale,k0(ie)===Vn&&(b=st=Math.max(b,st))),b+=Math.abs(we.offsetX)+Math.abs(Fe.offsetX)+Qt,st+=Math.abs(we.offsetY)+Math.abs(Fe.offsetY)+Qt,ie=ht.stretch,ie===Cr&&(ie=Da(ht,!1)),ie){case cn:nt=et=0;break;case pn:isFinite(y)&&(b=y),isFinite(x)&&(st=x);break;case qn:isFinite(y)&&(b=y),nt=0;break;case ar:et=0,isFinite(x)&&(st=x)}ht.Uj(),ht.measure(b,st,et,nt),E.width=ht.measuredBounds.width+zt,E.height=ht.measuredBounds.height+Zt}},mm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,et=on.alloc();et.h(0,0,1,1);var nt=b.margin,st=nt.left;nt=nt.top;var ht=a.padding,pt=ht.left;ht=ht.top,b.arrange(pt+st,ht+nt,E.width,E.height);var yt=y0(b),Mt=S0(b),zt=yt.y*E.height+yt.offsetY,Zt=Mt.x*E.width+Mt.offsetX;for(Mt=Mt.y*E.height+Mt.offsetY,et.x=yt.x*E.width+yt.offsetX,et.y=zt,Ai(et,Zt,Mt,0,0),et.x+=st+pt,et.y+=nt+ht,E=0;E<x;E++)st=y[E],st!==b&&(pt=st.measuredBounds,nt=st.margin,ht=Math.max(pt.width+nt.right+nt.left,0),yt=Math.max(pt.height+nt.top+nt.bottom,0),zt=st.alignment,zt.Xb()&&(zt=a.defaultAlignment),zt.sb()||(zt=Dr),ht=et.width*zt.x+zt.offsetX-ht*zt.x+nt.left+et.x,nt=et.height*zt.y+zt.offsetY-yt*zt.y+nt.top+et.y,st.visible&&(No(et.x,et.y,et.width,et.height,ht,nt,pt.width,pt.height)?st.arrange(ht,nt,pt.width,pt.height):st.arrange(ht,nt,pt.width,pt.height,new on(et.x,et.y,et.width,et.height))));on.free(et)};function vm(){this.xa="Base",this.name="Table"}$e(vm,yo),vm.prototype.measure=function(a,y,x,b,E){for(var et=b.length,nt=Fn(),st=Fn(),ht=0;ht<et;ht++){var pt=b[ht],yt=pt instanceof vn?pt:null;if(yt!==null&&nh(yt)&&pt.visible){st.push(yt);for(var Mt=yt.O.s,zt=Mt.length,Zt=0;Zt<zt;Zt++){var Qt=Mt[Zt];yt.type===vn.TableRow?Qt.row=pt.row:yt.type===vn.TableColumn&&(Qt.column=pt.column),nt.push(Qt)}}else nt.push(pt)}et=nt.length,et===0&&(a.Fb(0),a.Eb(0));for(var ie=[],Ee=0;Ee<et;Ee++){var we=nt[Ee];we.visible&&(ho(we,!0),Yl(we,!0),ie[we.row]||(ie[we.row]=[]),ie[we.row][we.column]||(ie[we.row][we.column]=[]),ie[we.row][we.column].push(we))}Bn(nt);var je=Fn(),Fe=Fn(),De=Fn(),_e={count:0},Xe={count:0},En=y,Gn=x,Dn=a.rowDefs,wn=a.colDefs,hn=null;et=Dn.length;for(var br=0;br<et;br++)hn=Dn[br],hn!==void 0&&(hn.actual=0);et=wn.length;for(var fr=0;fr<et;fr++)hn=wn[fr],hn!==void 0&&(hn.actual=0);for(var ri=ie.length,yi=0,Co=0;Co<ri;Co++)ie[Co]&&(yi=Math.max(yi,ie[Co].length));var Lo=Math.min(a.topIndex,ri-1),ha=Math.min(a.leftIndex,yi-1),ko=0;ri=ie.length;for(var fh=bu(a),no=0;no<ri;no++)if(ie[no]){yi=ie[no].length;var bl=a.Fb(no);bl.actual=0;for(var ca=bl.oc=0;ca<yi;ca++)if(ie[no][ca]){var dh=a.Eb(ca);je[ca]===void 0&&(dh.actual=0,dh.oc=0,je[ca]=!0);for(var Ss=ie[no][ca],Zs=Ss.length,is=0;is<Zs;is++){var Va=Ss[is];if(Va.visible||Va===fh){var qh=1<Va.rowSpan||1<Va.columnSpan;qh&&(no<Lo||ca<ha||Fe.push(Va));var Pl=Va.margin,Vd=Pl.right+Pl.left,os=Pl.top+Pl.bottom,fa=vl(Va,bl,dh,!1),Mg=Va.desiredSize,Df=!isNaN(Mg.height),Il=!isNaN(Mg.width)&&Df;if(qh||fa===cn||Il||no<Lo||ca<ha||(_e[ca]!==void 0||fa!==pn&&fa!==qn||(_e[ca]=-1,_e.count++),Xe[no]!==void 0||fa!==pn&&fa!==ar||(Xe[no]=-1,Xe.count++),De.push(Va)),Va.measure(1/0,1/0,0,0),!(no<Lo||ca<ha)){var Ka=Va.measuredBounds,Gc=Math.max(Ka.width+Vd,0),as=Math.max(Ka.height+os,0);if(Va.rowSpan===1&&(fa===cn||fa===qn)){hn=a.Fb(no);var tc=hn.Wc();ko=Math.max(as-hn.actual,0),ko+tc>Gn&&(ko=Math.max(Gn-tc,0));var zv=hn.oa===0;hn.oc=hn.oc+ko,hn.actual=hn.oa+ko,Gn=Math.max(Gn-(ko+(zv?tc:0)),0)}if(Va.columnSpan===1&&(fa===cn||fa===ar)){hn=a.Eb(ca);var Tg=hn.Wc();ko=Math.max(Gc-hn.actual,0),ko+Tg>En&&(ko=Math.max(En-Tg,0));var Gy=hn.oa===0;hn.oc=hn.oc+ko,hn.actual=hn.oa+ko,En=Math.max(En-(ko+(Gy?Tg:0)),0)}qh&&Va.Uj()}}}}}Bn(je);var au=0,ku=0;et=a.columnCount;for(var Bf=0;Bf<et;Bf++){var ec=wn[Bf];ec!==void 0&&(au+=isNaN(ec.Hc)?ec.oc:ec.Hc,ec.oc!==0&&(au+=ec.Wc()))}et=a.rowCount;for(var Kd=0;Kd<et;Kd++){var nc=Dn[Kd];nc!==void 0&&(ku+=isNaN(nc.Hc)?nc.oc:nc.Hc,nc.oc!==0&&(ku+=nc.Wc()))}En=Math.max(y-au,0);var su=Gn=Math.max(x-ku,0),ph=En;et=De.length;for(var Za=0;Za<et;Za++){var Rl=De[Za],Gv=a.Fb(Rl.row),Eu=a.Eb(Rl.column),Zd=Rl.measuredBounds,Cl=Rl.margin,Uc=Cl.right+Cl.left,_l=Cl.top+Cl.bottom;_e[Rl.column]=Eu.oc===0&&_e[Rl.column]!==void 0?Math.max(Zd.width+Uc,_e[Rl.column]):null,Xe[Rl.row]=Gv.oc===0&&Xe[Rl.row]!==void 0?Math.max(Zd.height+_l,Xe[Rl.row]):null}var If=0,Xd=0,cl;for(cl in Xe)cl!=="count"&&(If+=Xe[cl]);for(cl in _e)cl!=="count"&&(Xd+=_e[cl]);for(var zo=Cn.alloc(),Lg=0;Lg<et;Lg++){var Ta=De[Lg];if(Ta.visible||Ta===fh){var ro=a.Fb(Ta.row),La=a.Eb(Ta.column),Mu=0;isFinite(La.width)?Mu=La.width:(isFinite(En)&&_e[Ta.column]!==null?Xd===0?Mu=La.actual+En:Mu=_e[Ta.column]/Xd*ph:_e[Ta.column]!==null?Mu=En:Mu=La.actual||En,Mu=Math.max(0,Mu-La.Wc()));var gh=0;switch(isFinite(ro.height)?gh=ro.height:(isFinite(Gn)&&Xe[Ta.row]!==null?If===0?gh=ro.actual+Gn:gh=Xe[Ta.row]/If*su:Xe[Ta.row]!==null?gh=Gn:gh=ro.actual||Gn,gh=Math.max(0,gh-ro.Wc())),zo.h(Math.max(La.minimum,Math.min(Mu,La.maximum)),Math.max(ro.minimum,Math.min(gh,ro.maximum))),fa=vl(Ta,ro,La,!1),fa){case qn:zo.height=Math.max(zo.height,ro.actual+Gn);break;case ar:zo.width=Math.max(zo.width,La.actual+En)}var Wc=Ta.margin,Uy=Wc.right+Wc.left,Uv=Wc.top+Wc.bottom;Ta.Uj(),Ta.measure(zo.width,zo.height,La.minimum,ro.minimum);var Yd=Ta.measuredBounds,Hc=Math.max(Yd.width+Uy,0),Rf=Math.max(Yd.height+Uv,0);isFinite(En)&&(Hc=Math.min(Hc,zo.width)),isFinite(Gn)&&(Rf=Math.min(Rf,zo.height));var Xa=0;Xa=ro.actual,ro.actual=Math.max(ro.actual,Rf),ro.oc=Math.max(ro.oc,Rf),ko=ro.actual-Xa,Gn=Math.max(Gn-ko,0),Xe[Ta.row]===null&&(su=Math.max(su-ko,0)),Xa=La.actual,La.actual=Math.max(La.actual,Hc),La.oc=Math.max(La.oc,Hc),ko=La.actual-Xa,En=Math.max(En-ko,0),_e[Ta.column]===null&&(ph=Math.max(ph-ko,0))}}Bn(De);var Tu=Cn.alloc(),kl=Fn(),Bs=Fn();if(et=Fe.length,et!==0){for(var rc=0;rc<ri;rc++)if(ie[rc]){yi=ie[rc].length;var Jd=a.Fb(rc);kl[rc]=Jd.actual;for(var ic=0;ic<yi;ic++)if(ie[rc][ic]){var Wv=a.Eb(ic);Bs[ic]=Wv.actual}}}for(var Qd=0;Qd<et;Qd++){var Yi=Fe[Qd];if(Yi.visible||Yi===fh){var fl=a.Fb(Yi.row),Xs=a.Eb(Yi.column);switch(zo.h(Math.max(Xs.minimum,Math.min(y,Xs.maximum)),Math.max(fl.minimum,Math.min(x,fl.maximum))),fa=vl(Yi,fl,Xs,!1),fa){case pn:Bs[Xs.index]!==0&&(zo.width=Math.min(zo.width,Bs[Xs.index])),kl[fl.index]!==0&&(zo.height=Math.min(zo.height,kl[fl.index]));break;case qn:Bs[Xs.index]!==0&&(zo.width=Math.min(zo.width,Bs[Xs.index]));break;case ar:kl[fl.index]!==0&&(zo.height=Math.min(zo.height,kl[fl.index]))}isFinite(Xs.width)&&(zo.width=Xs.width),isFinite(fl.height)&&(zo.height=fl.height),Tu.h(0,0);for(var Hv=Xs.minimum,ss=fl.minimum,mh=1;mh<Yi.rowSpan&&!(Yi.row+mh>=a.rowCount);mh++)hn=a.Fb(Yi.row+mh),ko=0,ko=fa===pn||fa===ar?Math.max(hn.minimum,kl[Yi.row+mh]===0?hn.maximum:Math.min(kl[Yi.row+mh],hn.maximum)):Math.max(hn.minimum,isNaN(hn.Hc)?hn.maximum:Math.min(hn.Hc,hn.maximum)),Tu.height+=ko,ss+=hn.minimum;for(var Ys=1;Ys<Yi.columnSpan&&!(Yi.column+Ys>=a.columnCount);Ys++)hn=a.Eb(Yi.column+Ys),ko=0,ko=fa===pn||fa===qn?Math.max(hn.minimum,Bs[Yi.column+Ys]===0?hn.maximum:Math.min(Bs[Yi.column+Ys],hn.maximum)):Math.max(hn.minimum,isNaN(hn.Hc)?hn.maximum:Math.min(hn.Hc,hn.maximum)),Tu.width+=ko,Hv+=hn.minimum;zo.width+=Tu.width,zo.height+=Tu.height;var $d=Yi.margin,oc=$d.right+$d.left,Ag=$d.top+$d.bottom;Yi.measure(zo.width,zo.height,Hv,ss);for(var qd=Yi.measuredBounds,zl=Math.max(qd.width+oc,0),Vc=Math.max(qd.height+Ag,0),ac=0,tp=0;tp<Yi.rowSpan&&!(Yi.row+tp>=a.rowCount);tp++)hn=a.Fb(Yi.row+tp),ac+=hn.total||0;if(ac<Vc){var vh=Vc-ac,lu=Vc-ac;if(Yi.spanAllocation!==null)for(var yh=Yi.spanAllocation,Lu=0;Lu<Yi.rowSpan&&!(0>=vh)&&!(Yi.row+Lu>=a.rowCount);Lu++){hn=a.Fb(Yi.row+Lu);var Sh=hn.oa||0,Kc=yh(Yi,hn,lu);hn.actual=Math.min(hn.maximum,Sh+Kc),hn.oa!==Sh&&(vh-=hn.oa-Sh)}for(;0<vh;){var El=hn.oa||0;if(isNaN(hn.height)&&hn.maximum>El&&(hn.actual=Math.min(hn.maximum,El+vh),hn.oa!==El&&(vh-=hn.oa-El)),hn.index===0)break;hn=a.Fb(hn.index-1)}}for(var _f=0,xh=0;xh<Yi.columnSpan&&!(Yi.column+xh>=a.columnCount);xh++)hn=a.Eb(Yi.column+xh),_f+=hn.total||0;if(_f<zl){var zf=zl-_f,Wy=zl-_f;if(Yi.spanAllocation!==null)for(var Au=Yi.spanAllocation,Zc=0;Zc<Yi.columnSpan&&!(0>=zf)&&!(Yi.column+Zc>=a.columnCount);Zc++){hn=a.Eb(Yi.column+Zc);var Ng=hn.oa||0,Hy=Au(Yi,hn,Wy);hn.actual=Math.min(hn.maximum,Ng+Hy),hn.oa!==Ng&&(zf-=hn.oa-Ng)}for(;0<zf;){var Vv=hn.oa||0;if(isNaN(hn.width)&&hn.maximum>Vv&&(hn.actual=Math.min(hn.maximum,Vv+zf),hn.oa!==Vv&&(zf-=hn.oa-Vv)),hn.index===0)break;hn=a.Eb(hn.index-1)}}}}Bn(Fe),Cn.free(Tu),Cn.free(zo),kl!==void 0&&Bn(kl),Bs!==void 0&&Bn(Bs);var Gf=0,Uf=0,Kv=a.desiredSize,gx=a.maxSize;fa=Da(a,!0);var jg=ku=au=0,Og=0;et=a.columnCount;for(var Zv=0;Zv<et;Zv++)wn[Zv]!==void 0&&(hn=a.Eb(Zv),isFinite(hn.width)?(jg+=hn.width,jg+=hn.Wc()):Mm(hn)===Hp?(jg+=hn.oa,jg+=hn.Wc()):hn.oa!==0&&(au+=hn.oa,au+=hn.Wc()));isFinite(Kv.width)?Gf=Math.min(Kv.width,gx.width):Gf=fa!==cn&&isFinite(y)?y:au,Gf=Math.max(Gf,a.minSize.width),Gf=Math.max(Gf-jg,0);for(var $x=au===0?1:Math.max(Gf/au,1),Xv=0;Xv<et;Xv++)wn[Xv]!==void 0&&(hn=a.Eb(Xv),isFinite(hn.width)||Mm(hn)===Hp||(hn.actual=hn.oa*$x),hn.position=E.width,hn.oa!==0&&(E.width+=hn.oa,E.width+=hn.Wc()));et=a.rowCount;for(var Yv=0;Yv<et;Yv++)Dn[Yv]!==void 0&&(hn=a.Fb(Yv),isFinite(hn.height)?(Og+=hn.height,Og+=hn.Wc()):Mm(hn)===Hp?(Og+=hn.oa,Og+=hn.Wc()):hn.oa!==0&&(ku+=hn.oa,ku+=hn.Wc()));isFinite(Kv.height)?Uf=Math.min(Kv.height,gx.height):Uf=fa!==cn&&isFinite(x)?x:ku,Uf=Math.max(Uf,a.minSize.height),Uf=Math.max(Uf-Og,0);for(var qx=ku===0?1:Math.max(Uf/ku,1),Jv=0;Jv<et;Jv++)Dn[Jv]!==void 0&&(hn=a.Fb(Jv),isFinite(hn.height)||Mm(hn)===Hp||(hn.actual=hn.oa*qx),hn.position=E.height,hn.oa!==0&&(E.height+=hn.oa,E.height+=hn.Wc()));et=st.length;for(var Vy=0;Vy<et;Vy++){var Fg=st[Vy],Ky=0,Zy=0;Fg.type===vn.TableRow?(Ky=E.width,hn=a.Fb(Fg.row),Zy=hn.actual):(hn=a.Eb(Fg.column),Ky=hn.actual,Zy=E.height),Fg.measuredBounds.h(0,0,Ky,Zy),ho(Fg,!1)}Bn(st),a.inRowsCols=ie},vm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,et=E.left;E=E.top;var nt=a.inRowsCols;if(nt!==null){for(var st,ht,pt=nt.length,yt=0,Mt=0;Mt<pt;Mt++)nt[Mt]&&(yt=Math.max(yt,nt[Mt].length));ht=a.rowDefs,st=a.colDefs;var zt=Mt=0,Zt=Math.min(a.topIndex,pt-1);if(0<ht.length){for(;Zt!==pt&&(ht[Zt]===void 0||ht[Zt].oa===0);)Zt++;Zt=Math.max(Math.min(Zt,pt-1),0),Mt=-ht[Zt].position}var Qt=Math.min(a.leftIndex,yt-1);if(0<st.length){for(;Qt!==yt&&(st[Qt]===void 0||st[Qt].oa===0);)Qt++;Qt=Math.max(Math.min(Qt,yt-1),0),zt=-st[Qt].position}for(var ie=0,Ee=0;ie!==pt&&ht[ie]===void 0;)ie++;for(;Ee!==pt&&st[Ee]===void 0;)Ee++;yt=a.part,a.Fb(ie),a.Eb(Ee);for(var we=0;we<y.length;we++){var je=y[we];if(je instanceof vn&&je.visible&&nh(je)){if(je.type===vn.TableRow){st=a.Fb(je.row);var Fe=a.Eb(Ee)}else st=a.Fb(ie),Fe=a.Eb(je.column);ht=st.position+Mt+E,st.oa!==0&&(ht+=st.Io(Math.max(ie,Zt))),st=Fe.position+zt+et,Fe.oa!==0&&(st+=Fe.Io(Math.max(Ee,Qt))),Fe=je.measuredBounds,je.Uk(),je.actualBounds.ka();var De=je.actualBounds,_e=on.allocAt(De.x,De.y,De.width,De.height);De.x=je.type===vn.TableRow?et:st,De.y=je.type===vn.TableColumn?E:ht,De.width=Fe.width,De.height=Fe.height,je.actualBounds.freeze(),Yl(je,!1),Hi(_e,De)||yt===null||(yt.oh(),je.Pn(yt)),on.free(_e)}}for(we=Cn.alloc(),je=0;je<pt;je++)if(nt[je]){for(yt=nt[je].length,Fe=a.Fb(je),ht=Fe.position+Mt+E,Fe.oa!==0&&(ht+=Fe.Io(Math.max(ie,Zt))),De=0;De<yt;De++)if(nt[je][De]){_e=a.Eb(De),st=_e.position+zt+et,_e.oa!==0&&(st+=_e.Io(Math.max(Ee,Qt)));for(var Xe=nt[je][De],En=Xe.length,Gn=0;Gn<En;Gn++){var Dn=Xe[Gn],wn=Dn.measuredBounds;we.h(0,0);for(var hn=1;hn<Dn.rowSpan&&!(je+hn>=a.rowCount);hn++){var br=a.Fb(je+hn);br.oa!==0&&(we.height+=br.total)}for(hn=1;hn<Dn.columnSpan&&!(De+hn>=a.columnCount);hn++)br=a.Eb(De+hn),br.oa!==0&&(we.width+=br.total);var fr=_e.oa+we.width,ri=Fe.oa+we.height;hn=st,br=ht;var yi=fr,Co=ri,Lo=st,ha=ht,ko=fr,fh=ri;st+fr>x.width&&(ko=Math.max(x.width-st,0)),ht+ri>x.height&&(fh=Math.max(x.height-ht,0));var no=Dn.alignment;if(no.Xb()){no=a.defaultAlignment,no.sb()||(no=Dr);var bl=no.x,ca=no.y,dh=no.offsetX;no=no.offsetY;var Ss=_e.alignment,Zs=Fe.alignment;Ss.sb()&&(bl=Ss.x,dh=Ss.offsetX),Zs.sb()&&(ca=Zs.y,no=Zs.offsetY)}else bl=no.x,ca=no.y,dh=no.offsetX,no=no.offsetY;(isNaN(bl)||isNaN(ca))&&(ca=bl=.5,no=dh=0),Ss=wn.width,Zs=wn.height;var is=Dn.margin,Va=is.left+is.right,qh=is.top+is.bottom,Pl=vl(Dn,Fe,_e,!1);!isNaN(Dn.desiredSize.width)||Pl!==pn&&Pl!==qn||(Ss=Math.max(fr-Va,0)),!isNaN(Dn.desiredSize.height)||Pl!==pn&&Pl!==ar||(Zs=Math.max(ri-qh,0)),fr=Dn.maxSize,ri=Dn.minSize,Ss=Math.min(fr.width,Ss),Zs=Math.min(fr.height,Zs),Ss=Math.max(ri.width,Ss),Zs=Math.max(ri.height,Zs),fr=Zs+qh,hn+=yi*bl-(Ss+Va)*bl+dh+is.left,br+=Co*ca-fr*ca+no+is.top,Dn.visible&&(No(Lo,ha,ko,fh,hn,br,wn.width,wn.height)?Dn.arrange(hn,br,Ss,Zs):Dn.arrange(hn,br,Ss,Zs,new on(Lo,ha,ko,fh)))}}}for(Cn.free(we),a=0;a<b;a++)x=y[a],et=x instanceof vn?x:null,et!==null&&nh(et)&&(et=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,et.width,et.height),x.naturalBounds.freeze())}};function ym(){this.xa="Base"}$e(ym,yo),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}$e(Sm,yo),Sm.prototype.measure=function(){},Sm.prototype.arrange=function(){};function xm(){this.xa="Base"}$e(xm,yo),xm.prototype.measure=function(a,y,x,b,E,et,nt){1<b.length&&Oe("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,et,nt);var st=b.measuredBounds,ht=b.margin,pt=ht.right+ht.left;if(ht=ht.top+ht.bottom,isFinite(y)||isFinite(x)){var yt=b.scale,Mt=st.width;st=st.height;var zt=Math.max(y-pt,0),Zt=Math.max(x-ht,0),Qt=1;a.viewboxStretch===Vn?Mt!==0&&st!==0&&(Qt=Math.min(zt/Mt,Zt/st)):Mt!==0&&st!==0&&(Qt=Math.max(zt/Mt,Zt/st)),Qt===0&&(Qt=1e-4),b.Ca*=Qt,yt!==b.scale&&(ho(b,!0),b.measure(1/0,1/0,et,nt))}st=b.measuredBounds,E.width=isFinite(y)?y:Math.max(st.width+pt,0),E.height=isFinite(x)?x:Math.max(st.height+ht,0)},xm.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,et=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var nt=y.alignment;nt.Xb()&&(nt=a.defaultAlignment),nt.sb()||(nt=Dr),y.arrange(x.width*nt.x-et*nt.x+nt.offsetX,x.height*nt.y-E*nt.y+nt.offsetY,b.width,b.height)};function Gp(){this.xa="Base"}$e(Gp,yo),Gp.prototype.measure=function(){},Gp.prototype.arrange=function(){},Gp.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 et=a.naturalBounds,nt=a.actualBounds,st=et.width,ht=et.height,pt=Math.ceil(st/E),yt=Math.ceil(ht/b),Mt=a.gridOrigin,zt=Mt.x;Mt=Mt.y,y.save(),y.beginPath(),y.rect(0,0,st,ht),y.clip(),y.Se();for(var Zt=[],Qt=a.O.s,ie=Qt.length,Ee=0;Ee<ie;Ee++){var we=Qt[Ee],je=[];if(Zt.push(je),we.visible){var Fe=we.interval;if(!(0>Fe)){we=m0(we.figure);for(var De=0;De<ie;De++)if(De!==Ee){var _e=Qt[De];_e.visible&&m0(_e.figure)===we&&(_e=_e.interval,_e>Fe&&je.push(_e))}}}}for(Qt=a.O.s,ie=Qt.length,Ee=0;Ee<ie;Ee++){var Xe=Qt[Ee];if(Xe.visible&&(je=Xe.interval||1,we=Math.abs(je),!(2>E*we*x))){if(Fe=Xe.segmentIndex,(!isFinite(Fe)||isNaN(Fe))&&(Fe=0),0>Fe&&(Fe=we-Math.min(-Fe,we)),Fe=Math.round(Fe%we),we=Xe.opacity,De=1,we!==1){if(we===0)continue;De=y.globalAlpha,y.globalAlpha=De*we}_e=Zt[Ee];var En=!1,Gn=Xe.strokeDashArray;if(Gn!==null&&(En=!0,y.js(Gn,Xe.strokeDashOffset)),Xe.figure==="LineV"&&Xe.stroke!==null&&0<Xe.strokeWidth){for(y.lineWidth=Xe.strokeWidth,Ki(a,y,Xe.stroke,!1,!1,et,nt),y.beginPath(),Gn=Xe=Math.floor((zt-E)/E);Gn<=Xe+pt;Gn++){var Dn=Gn*E+zt;0<=Dn&&Dn<=st&&wm(Gn,je,Fe,_e)&&(y.moveTo(Dn,0),y.lineTo(Dn,ht))}y.stroke(),y.Se()}else if(Xe.figure==="LineH"&&Xe.stroke!==null&&0<Xe.strokeWidth){for(y.lineWidth=Xe.strokeWidth,Ki(a,y,Xe.stroke,!1,!1,et,nt),y.beginPath(),Gn=Xe=Math.floor((Mt-b)/b);Gn<=Xe+yt;Gn++)Dn=Gn*b+Mt,0<=Dn&&Dn<=ht&&wm(Gn,je,Fe,_e)&&(y.moveTo(0,Dn),y.lineTo(st,Dn));y.stroke(),y.Se()}else if(Xe.figure==="BarV"&&Xe.fill!==null)for(Ki(a,y,Xe.fill,!0,!1,et,nt),Xe=Xe.width,isNaN(Xe)&&(Xe=E),Dn=Gn=Math.floor((zt-E)/E);Dn<=Gn+pt;Dn++){var wn=Dn*E+zt;0<=wn+Xe&&wn<=st&&wm(Dn,je,Fe,_e)&&y.fillRect(wn,0,Xe,ht)}else if(Xe.figure==="BarH"&&Xe.fill!==null)for(Ki(a,y,Xe.fill,!0,!1,et,nt),Xe=Xe.height,isNaN(Xe)&&(Xe=b),Dn=Gn=Math.floor((Mt-b)/b);Dn<=Gn+yt;Dn++)wn=Dn*b+Mt,0<=wn+Xe&&wn<=ht&&wm(Dn,je,Fe,_e)&&y.fillRect(0,wn,st,Xe);En&&y.fs(),we!==1&&(y.globalAlpha=De)}}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"}$e(bm,yo),bm.prototype.measure=function(a,y,x,b,E){var et=b.length;if(a instanceof qr||a instanceof Pn){var nt=null,st=null;if(a instanceof Pn&&(nt=a),a instanceof qr&&(st=a,nt=st.adornedPart,a.j===null&&(a.j=[])),nt instanceof Pn){var ht=nt;if(et===0)ra(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var pt=a instanceof qr?null:nt.path;y=nt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var yt=ht.points,Mt=nt.pointsCount;st!==null?st.Ul(!1):nt!==null&&nt.Ul(!1),st=y.width;var zt=y.height,Zt=a.j;if(Zt.length=0,pt!==null){i1(a,st,zt,pt);var Qt=pt.measuredBounds;x.ed(Qt),Zt.push(Qt)}Qt=xr.alloc();for(var ie=Le.alloc(),Ee=Le.alloc(),we=0;we<et;we++){var je=b[we];if(je!==pt)if(je.isPanelMain&&je instanceof Lr){i1(a,st,zt,je);var Fe=je.measuredBounds;x.ed(Fe),Zt.push(Fe)}else if(2>Mt)je.measure(1/0,1/0,0,0),Fe=je.measuredBounds,x.ed(Fe),Zt.push(Fe);else{var De=je.segmentIndex,_e=je.segmentFraction,Xe=je.alignmentFocus;Xe.Mc()&&(Xe=Dr);var En=je.segmentOrientation,Gn=je.segmentOffset;if(isNaN(De)){var Dn=ht.ua;Fe=Fn(),Dn.Qu(_e,Fe);var wn=Le.allocAt(Fe[0],Fe[1]);if(wn.add(ht.i(0)),Dn.type===bn.j?wn.offset(-Dn.startX,-Dn.startY):(Dn=Dn.figures.first(),Dn!==null&&wn.offset(-Dn.startX,-Dn.startY)),Dn=Fe[2],En!==Pa){var hn=ht.computeAngle(je,En,Dn);je.Kb=hn}hn=wn.x-y.x;var br=wn.y-y.y;Le.free(wn),Bn(Fe)}else if(De<-Mt||De>=Mt)Fe=Le.alloc(),ht.vg(),ht.computeMidPoint(Fe),Dn=ht.midAngle,En!==Pa&&(hn=ht.computeAngle(je,En,Dn),je.Kb=hn),hn=Fe.x-y.x,br=Fe.y-y.y,Le.free(Fe);else{if(hn=0,0<=De?(br=yt.M(De),Fe=De<Mt-1?yt.M(De+1):br):(hn=Mt+De,br=yt.M(hn),Fe=0<hn?yt.M(hn-1):br),br.Xa(Fe)){0<=De?(Dn=0<De?yt.M(De-1):br,hn=De<Mt-2?yt.M(De+2):Fe):(Dn=hn<Mt-1?yt.M(hn+1):br,hn=1<hn?yt.M(hn-2):Fe),wn=Dn.Bf(br);var fr=Fe.Bf(hn);Dn=wn>fr+10?0<=De?Dn.ab(br):br.ab(Dn):fr>wn+10?0<=De?Fe.ab(hn):hn.ab(Fe):0<=De?Dn.ab(hn):hn.ab(Dn)}else Dn=0<=De?br.ab(Fe):Fe.ab(br);En!==Pa&&(hn=ht.computeAngle(je,En,Dn),je.Kb=hn),hn=br.x+(Fe.x-br.x)*_e-y.x,br=br.y+(Fe.y-br.y)*_e-y.y}je.measure(1/0,1/0,0,0),Fe=je.measuredBounds,wn=je.naturalBounds;var ri=0;je instanceof Lr&&(ri=je.strokeWidth),fr=wn.width+ri;var yi=wn.height+ri;Qt.reset(),Qt.translate(-Fe.x,-Fe.y),Qt.scale(je.scale,je.scale),Qt.rotate(En===Pa?je.angle:Dn,fr/2,yi/2),En!==tg&&En!==ng||Qt.rotate(90,fr/2,yi/2),En!==eg&&En!==rg||Qt.rotate(-90,fr/2,yi/2),En===$m&&(45<Dn&&135>Dn||225<Dn&&315>Dn)&&Qt.rotate(-Dn,fr/2,yi/2),wn=new on(0,0,fr,yi),ie.xi(wn,Xe),Qt.Ga(ie),Xe=-ie.x+ri/2*je.scale,je=-ie.y+ri/2*je.scale,Ee.assign(Gn),ri=isNaN(Gn.x);var Co=isNaN(Gn.y);if(ri||Co){fr=fr/2+3,yi=yi/2+3;var Lo=45<=Dn&&135>=Dn,ha=225<=Dn&&315>=Dn;En===Pa&&(Lo||ha)?(Ee.x=Co?fr:Gn.y,Ee.y=ri?yi:Gn.x,Lo?0<=De||isNaN(De)&&.5>_e||!ri||(Ee.y=-yi):ha&&((0<=De||isNaN(De)&&.5>_e)&&ri&&(Ee.y=-yi),Co&&(Ee.x=-fr))):(ri&&(Ee.x=0<=De||isNaN(De)&&.5>_e?fr:-fr),Co&&(Ee.y=-yi),Ee.rotate(Dn))}else Ee.rotate(Dn);hn+=Ee.x,br+=Ee.y,wn.set(Fe),wn.h(hn+Xe,br+je,Fe.width,Fe.height),Zt.push(wn),x.ed(wn)}}if(nt!==null)for(b=nt.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),ra(E,x.width||0,x.height||0),xr.free(Qt),Le.free(ie),Le.free(Ee)}}}},bm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof qr||a instanceof Pn){var b=a,E=null;a instanceof qr&&(E=a,b=E.adornedPart);var et=a instanceof qr?null:b.path,nt=a.j;if(nt.length!==0){var st=0;if(et!==null&&st<nt.length){var ht=nt[st];st++,et.arrange(ht.x-a.jg.x,ht.y-a.jg.y,ht.width,ht.height)}for(ht=0;ht<x;ht++){var pt=y[ht];if(pt!==et&&st<nt.length){var yt=nt[st];st++,pt.arrange(yt.x-a.jg.x,yt.y-a.jg.y,yt.width,yt.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof Pn)for(et=a.labelNodes;et.next();){var Mt=a;nt=et.value,st=nt.segmentIndex,ht=nt.segmentFraction;var zt=nt.alignmentFocus;if(pt=nt.segmentOrientation,yt=nt.segmentOffset,isNaN(st)){var Zt=Mt.ua,Qt=Fn();Zt.Qu(ht,Qt);var ie=Le.allocAt(Qt[0],Qt[1]);ie.add(Mt.i(0)),Zt.type===bn.j||(Zt=Zt.figures.first()),ie.offset(-Zt.startX,-Zt.startY),Zt=Qt[2],pt!==Pa&&(Mt=Mt.computeAngle(nt,pt,Zt),nt.angle=Mt),Mt=ie.x;var Ee=ie.y;Le.free(ie),Bn(Qt)}else if(st<-x||st>=x)Qt=Le.alloc(),Zt=Mt,Ee=Qt,Zt.vg(),Zt.computeMidPoint(Ee),Zt=Mt.midAngle,pt!==Pa&&(Mt=Mt.computeAngle(nt,pt,Zt),nt.angle=Mt),Mt=Qt.x,Ee=Qt.y,Le.free(Qt);else{if(ie=0,0<=st?(Qt=y.s[st],Ee=st<x-1?y.s[st+1]:Qt):(ie=x+st,Qt=y.s[ie],Ee=0<ie?y.s[ie-1]:Qt),Qt.Xa(Ee)){0<=st?(Zt=0<st?y.s[st-1]:Qt,ie=st<x-2?y.s[st+2]:Ee):(Zt=ie<x-1?y.s[ie+1]:Qt,ie=1<ie?y.s[ie-2]:Ee);var we=Zt.Bf(Qt),je=Ee.Bf(ie);Zt=we>je+10?0<=st?Zt.ab(Qt):Qt.ab(Zt):je>we+10?0<=st?Ee.ab(ie):ie.ab(Ee):0<=st?Zt.ab(ie):ie.ab(Zt)}else Zt=0<=st?Qt.ab(Ee):Ee.ab(Qt);pt!==Pa&&(Mt=Mt.computeAngle(nt,pt,Zt),nt.angle=Mt),Mt=Qt.x+(Ee.x-Qt.x)*ht,Ee=Qt.y+(Ee.y-Qt.y)*ht}if(zt.ys())nt.location=new Le(Mt,Ee);else{zt.Mc()&&(zt=Dr),Qt=xr.alloc(),Qt.reset(),Qt.scale(nt.scale,nt.scale),Qt.rotate(nt.angle,0,0);var Fe=nt.naturalBounds;ie=on.allocAt(0,0,Fe.width,Fe.height),we=Le.alloc(),we.xi(ie,zt),Qt.Ga(we),zt=-we.x,je=-we.y;var De=Fe.width,_e=Fe.height;Fe=Le.alloc(),Fe.assign(yt);var Xe=isNaN(yt.x),En=isNaN(yt.y);if(Xe||En){De=De/2+3,_e=_e/2+3;var Gn=45<=Zt&&135>=Zt,Dn=225<=Zt&&315>=Zt;pt===Pa&&(Gn||Dn)?(Fe.x=En?De:yt.y,Fe.y=Xe?_e:yt.x,Gn?0<=st||isNaN(st)&&.5>ht||!Xe||(Fe.y=-_e):Dn&&((0<=st||isNaN(st)&&.5>ht)&&Xe&&(Fe.y=-_e),En&&(Fe.x=-De))):(Xe&&(Fe.x=0<=st||isNaN(st)&&.5>ht?De:-De),En&&(Fe.y=-_e),Fe.rotate(Zt))}else Fe.rotate(Zt);Mt+=Fe.x,Ee+=Fe.y,Qt.pp(ie),zt+=ie.x,je+=ie.y,st=Le.allocAt(Mt+zt,Ee+je),nt.move(st),Le.free(st),Le.free(Fe),Le.free(we),on.free(ie),xr.free(Qt)}}E!==null?E.Ul(!1):b.Ul(!1),b=O1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),Le.free(b)}};function i1(a,y,x,b){if(gs(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof qr&&a.type===vn.Link&&a.adornedObject instanceof Lr&&(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 qr&&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),ho(b,!1)}}function Up(){this.xa="Base"}$e(Up,yo),Up.prototype.measure=function(a,y,x,b,E,et,nt){var st=a.Pb();a.graduatedBounds=[];var ht=st.margin,pt=ht.right+ht.left,yt=ht.top+ht.bottom;st.measure(y,x,et,nt);var Mt=st.measuredBounds,zt=new on(-ht.left,-ht.top,Math.max(Mt.width+pt,0),Math.max(Mt.height+yt,0));a.graduatedBounds.push(zt),E.assign(zt);for(var Zt=st.geometry,Qt=st.strokeWidth,ie=Zt.flattenedSegments,Ee=Zt.flattenedLengths,we=Zt.flattenedTotalLength,je=ie.length,Fe=0,De=0,_e=Fn(),Xe=0;Xe<je;Xe++){var En=ie[Xe],Gn=[];De=Fe=0;for(var Dn=En.length,wn=0;wn<Dn;wn+=2){var hn=En[wn],br=En[wn+1];if(wn!==0){var fr=180*Math.atan2(br-De,hn-Fe)/Math.PI;0>fr&&(fr+=360),Gn.push(fr)}Fe=hn,De=br}_e.push(Gn)}if(a.graduatedIntervals===null){for(var ri=[],yi=a.O.s,Co=yi.length,Lo=0;Lo<Co;Lo++){var ha=yi[Lo],ko=[];if(ri.push(ko),ha.visible){var fh=ha.interval;if(!(0>fh)){for(var no=0;no<Co;no++)if(no!==Lo){var bl=yi[no];if(bl.visible&&ha.constructor===bl.constructor){var ca=bl.interval;ca>fh&&ko.push(ca)}}}}}a.graduatedIntervals=ri}var dh=a.graduatedIntervals,Ss=a.O.s,Zs=Ss.length,is=0,Va=0,qh=we;a.graduatedMarks=[];for(var Pl,Vd=0;Vd<Zs;Vd++){var os=Ss[Vd];if(Pl=[],os.visible&&os!==st){var fa=Math.abs(os.interval),Mg=a.graduatedTickUnit;if(!(2>Mg*fa*we/a.graduatedRange&&os.graduatedSkip===null)){var Df=Ee[0][0],Il=0,Ka=0;Va=we*os.graduatedStart-1e-4,qh=we*os.graduatedEnd+1e-4;var Gc=Mg*fa,as=a.graduatedTickBase;if(as<a.graduatedMin){var tc=(a.graduatedMin-as)/Gc;tc=tc%1===0?tc:Math.floor(tc+1),as+=tc*Gc}else as>a.graduatedMin+Gc&&(as-=Math.floor((as-a.graduatedMin)/Gc)*Gc);for(var zv=dh[Vd],Tg=as,Gy=1e-6*a.graduatedMax,au=1;as<=a.graduatedMax+Gy;au++){t:{for(var ku=zv.length,Bf=0;Bf<ku;Bf++){var ec=(as-a.graduatedTickBase)%(zv[Bf]*a.graduatedTickUnit),Kd=1e-6*a.graduatedTickUnit;if(ec<Kd&&ec>-Kd){var nc=!1;break t}}nc=!0}if(nc&&(as>a.graduatedMax&&(as=a.graduatedMax),os.graduatedSkip===null||os instanceof Si&&!os.graduatedSkip(as,os)||os instanceof Lr&&!os.graduatedSkip(as,os))&&(is=(as-a.graduatedMin)*we/a.graduatedRange,is>we&&(is=we),Va<=is&&is<=qh)){for(var su=_e[Il][Ka],ph=Ee[Il][Ka];Il<Ee.length;){for(;is>Df&&Ka<Ee[Il].length-1;)Ka++,su=_e[Il][Ka],ph=Ee[Il][Ka],Df+=ph;if(is<=Df)break;Il++,Ka=0,su=_e[Il][Ka],ph=Ee[Il][Ka],Df+=ph}var Za=ie[Il],Rl=Za[2*Ka],Gv=Za[2*Ka+1],Eu=(is-(Df-ph))/ph,Zd=new Le(Rl+(Za[2*Ka+2]-Rl)*Eu+Qt/2-Zt.bounds.x,Gv+(Za[2*Ka+3]-Gv)*Eu+Qt/2-Zt.bounds.y);Zd.scale(st.scale,st.scale);t:{var Cl=su,Uc=_e[Il];if(!(.5005>Eu&&.4995<Eu)){var _l=Cl;if(.5>Eu?0<Ka?_l=Uc[Ka-1]:Ge.$(Za[0],Za[Za.length-2])&&Ge.$(Za[1],Za[Za.length-1])&&(_l=Uc[Uc.length-1]):.5<Eu&&(Ka+1<Uc.length?_l=Uc[Ka+1]:Ge.$(Za[0],Za[Za.length-2])&&Ge.$(Za[1],Za[Za.length-1])&&(_l=Uc[0])),Cl!==_l){var If=Math.abs(Cl-_l);if(180<If&&(Cl<_l?Cl+=360:_l+=360,If=Math.abs(Cl-_l)),5e-4>Eu||.9995<Eu){su=(Cl+_l)/2%360;break t}if(10>If){var Xd=1-Math.abs(.5-Eu);su=(Cl*Xd+_l*(1-Xd))%360;break t}}}su=Cl}if(os instanceof Si){var cl="";os.graduatedFunction!==null?(cl=os.graduatedFunction(as,os),cl=cl!=null?cl.toString():""):cl=(+as.toFixed(2)).toString(),cl!==""&&Pl.push({$l:Zd,angle:su,text:cl})}else Pl.push({$l:Zd,angle:su})}as=Tg+au*Gc}}}a.graduatedMarks.push(Pl)}Bn(_e);var zo=a.graduatedMarks;if(zo!==null)for(var Lg=b.length,Ta=0;Ta<Lg;Ta++){var ro=b[Ta],La=zo[Ta];if(ro.visible&&ro!==st&&La.length!==0){if(ro instanceof Lr){var Mu=a,gh=E,Wc=ro.alignmentFocus;Wc.Mc()&&(Wc=ai);var Uy=ro.angle;ro.Kb=0,ro.measure(1/0,1/0,0,0),ro.Kb=Uy;var Uv=ro.measuredBounds,Yd=Uv.width,Hc=Uv.height,Rf=on.allocAt(0,0,Yd,Hc),Xa=Le.alloc();Xa.xi(Rf,Wc),on.free(Rf);for(var Tu=-Xa.x,kl=-Xa.y,Bs=new on,rc=La.length,Jd=0;Jd<rc;Jd++)for(var ic=La[Jd],Wv=ic.$l.x,Qd=ic.$l.y,Yi=ic.angle,fl=0;4>fl;fl++){switch(fl){case 0:Xa.h(Tu,kl);break;case 1:Xa.h(Tu+Yd,kl);break;case 2:Xa.h(Tu,kl+Hc);break;case 3:Xa.h(Tu+Yd,kl+Hc)}Xa.rotate(Yi+ro.angle),Xa.offset(Wv,Qd),Jd===0&&fl===0?Bs.h(Xa.x,Xa.y,0,0):Bs.Ye(Xa),Xa.offset(-Wv,-Qd),Xa.rotate(-Yi-ro.angle)}Le.free(Xa),Mu.graduatedBounds!==null&&Mu.graduatedBounds.push(Bs),Ai(gh,Bs.x,Bs.y,Bs.width,Bs.height)}else if(ro instanceof Si){var Xs=a,Hv=E;Xs.temporaryTextBlock===null&&(Xs.temporaryTextBlock=new Si);var ss=Xs.temporaryTextBlock;S1(ss,ro);var mh=ro.alignmentFocus;mh.Mc()&&(mh=ai);for(var Ys=ro.segmentOrientation,$d=ro.segmentOffset,oc=new on,Ag=0,qd=0,zl=0,Vc=0,ac=0,tp=La.length,vh=0;vh<tp;vh++){var lu=La[vh];Ag=lu.$l.x,qd=lu.$l.y,zl=lu.angle,ac=Vc=ro.angle,Ys!==Pa&&(ac=Ys===qp||Ys===Qm?zl+ro.angle:zl,Vc=Pn.computeAngle(Ys,ac)),ss.Kb=Vc,ss.text=lu.text||"",ss.measure(1/0,1/0,0,0);var yh=ss.measuredBounds,Lu=ss.naturalBounds,Sh=Lu.width,Kc=Lu.height,El=xr.alloc();El.reset(),El.translate(-yh.x,-yh.y),El.scale(ss.scale,ss.scale),El.rotate(ac,Sh/2,Kc/2),Ys!==tg&&Ys!==ng||El.rotate(90,Sh/2,Kc/2),Ys!==eg&&Ys!==rg||El.rotate(-90,Sh/2,Kc/2),Ys===$m&&(45<zl&&135>zl||225<zl&&315>zl)&&El.rotate(-zl,Sh/2,Kc/2);var _f=on.allocAt(0,0,Sh,Kc),xh=Le.alloc();xh.xi(_f,mh),El.Ga(xh);var zf=-xh.x,Wy=-xh.y,Au=Le.alloc();Au.assign($d),isNaN(Au.x)&&(Au.x=Sh/2+3),isNaN(Au.y)&&(Au.y=-(Kc/2+3)),Au.rotate(zl),Ag+=Au.x+zf,qd+=Au.y+Wy;var Zc=new on(Ag,qd,yh.width,yh.height),Ng=new on(yh.x,yh.y,yh.width,yh.height),Hy=new on(Lu.x,Lu.y,Lu.width,Lu.height);lu.Sz=Vc,lu.lineCount=ss.lineCount,lu.lines=[ss.Cb,ss.Ih,ss.df,ss.Le,ss.Qc,ss.Qb,ss.ze],lu.actualBounds=Zc,lu.measuredBounds=Ng,lu.naturalBounds=Hy,vh===0?oc.assign(Zc):oc.ed(Zc),Le.free(Au),Le.free(xh),on.free(_f),xr.free(El)}Xs.graduatedBounds!==null&&Xs.graduatedBounds.push(oc),Ai(Hv,oc.x,oc.y,oc.width,oc.height)}ho(ro,!1)}}},Up.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var et=a.graduatedBounds,nt=0,st=et[nt];nt++,b!==null&&b.arrange(st.x-x.x,st.y-x.y,st.width,st.height);for(var ht=y.length,pt=0;pt<ht;pt++){var yt=y[pt];st=E[pt],yt.visible&&yt!==b&&st.length!==0&&(st=et[nt],nt++,yt.arrange(st.x-x.x,st.y-x.y,st.width,st.height))}a.graduatedBounds=null}}},Up.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,et=E.width,nt=E.height;E=y instanceof es,y.save(),y.beginPath(),y.rect(-1,-1,et+1,nt+1),y.clip(),y.Se(),et=a.Pb(),et.gc(y,x),nt=a.Df()*x.scale,0>=nt&&(nt=1);for(var st=et.actualBounds,ht=a.O.s,pt=a.graduatedMarks,yt=ht.length,Mt=0;Mt<yt;Mt++){var zt=ht[Mt],Zt=pt[Mt],Qt=Zt.length;if(zt.visible&&zt!==et&&Zt.length!==0){if(zt instanceof Lr){if(!(2>a.graduatedTickUnit*zt.interval*et.geometry.flattenedTotalLength/a.graduatedRange*nt&&zt.graduatedSkip===null)){var ie=zt.measuredBounds,Ee=zt.strokeWidth*zt.scale,we=zt.alignmentFocus;we.Mc()&&(we=ai);for(var je=0;je<Qt;je++){var Fe=Zt[je].$l,De=Zt[je].angle,_e=we,Xe=zt.Ab;Xe.reset(),Xe.translate(Fe.x+st.x,Fe.y+st.y),Xe.rotate(De+zt.angle,0,0),Xe.translate(-ie.width*_e.x+_e.offsetX+Ee/2,-ie.height*_e.y+_e.offsetY+Ee/2),Xe.scale(zt.scale,zt.scale),Us(zt,!1),zt.wh.set(zt.Ab),zt.Kk=zt.scale,Ls(zt,!1),zt.gc(y,x),E&&(a.svg.appendChild(zt.svg),zt.svg=null),zt.Ab.reset()}}}else if(zt instanceof Si)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Si),ie=a.temporaryTextBlock,S1(ie,zt),Ee=0;Ee<Qt;Ee++)we=Zt[Ee],we.actualBounds&&we.measuredBounds&&we.naturalBounds&&(ie.ec=we.text||"",ie.Kb=we.Sz||0,ie.Gc=we.lineCount||0,je=we.lines,je!==void 0&&(ie.Cb=je[0],ie.Ih=je[1],ie.df=je[2],ie.Le=je[3],ie.Qc=je[4],ie.Qb=je[5],ie.ze=je[6]),we.naturalBounds&&(ie.dc=we.naturalBounds),we.actualBounds&&(je=we.actualBounds,ie.arrange(je.x,je.y,je.width,je.height)),je=we.actualBounds,ie.arrange(je.x,je.y,je.width,je.height),Fe=we.measuredBounds,we=we.naturalBounds,De=ie.Ab,De.reset(),De.translate(je.x+st.x,je.y+st.y),De.translate(-Fe.x,-Fe.y),ie.no(De,we.x,we.y,we.width,we.height),Us(ie,!1),ie.wh.set(ie.Ab),ie.Kk=ie.scale,Ls(ie,!1),ie.Ng=zt.part,ie.Me=zt.panel,ie.gc(y,x),ie.Me=null,ie.Ng=null,E&&(a.svg.appendChild(ie.svg),ie.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function vn(a,y){if(ze.call(this),this.na=null,a===void 0)this.na=vn.Position;else if(typeof a=="string"){var x=ol.I(a);x!==null&&(this.na=x)}else a instanceof yo?this.na=a:a&&(this.na=vn.Position,y=a);this.na===null&&Oe("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===vn.Grid?1048576:0),this.O=new mn,this.yb=us,this.Tm=jo,this.Uf=Cr,this.$g=null,this.$e="",this.jg=new on(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Vn,this.jn=lo,this.kn=Ti,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}$e(vn,ze),vn.prototype.cloneProtected=function(a){ze.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},vn.prototype.Af=function(a){ze.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},vn.prototype.copy=function(){var a=ze.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 et=a.O,nt=et.count;if(et.Gb(nt,E),et=a.part,et!==null){et.Rh=null,E.portId!==null&&et instanceof Mn&&(et.Te=!0);var st=a.diagram;st!==null&&st.undoManager.isUndoingRedoing||et.cb($i,"elements",a,null,E,null,nt)}}return a}return null},qt=vn.prototype,qt.toString=function(){return"Panel("+this.type.name+")#"+mi(this)},qt.Pn=function(a){ze.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},qt.hh=function(a,y){if(this.na===vn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===vn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===vn.Table)if(a.yc(),a instanceof es){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===vn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,et=E.length,nt=0;nt<et;nt++){var st=E[nt];x&&st===b&&(a.clipInsteadOfFill=!0),st.gc(a,y),x&&st===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,et=a.actualBounds,nt=a.naturalBounds,st=!0,ht=0;ht<E;ht++){var pt=b[ht];if(pt!==void 0&&pt.actual!==0)if(st)st=!1;else{if(x){if(pt.position>nt.height)continue}else if(pt.position>nt.width)continue;var yt=pt.separatorStrokeWidth;isNaN(yt)&&(yt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Mt=pt.separatorStroke;if(Mt===null&&(Mt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),yt!==0&&Mt!==null){Ki(a,y,Mt,!1,!1,nt,et),Mt=!1;var zt=pt.separatorDashArray;zt===null&&(zt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),zt!==null&&(Mt=!0,y.js(zt,0)),y.beginPath(),zt=pt.position+yt,x?zt>nt.height&&(yt-=zt-nt.height):zt>nt.width&&(yt-=zt-nt.width),pt=pt.position+yt/2,y.lineWidth=yt,yt=a.yb,x?(pt+=yt.top,zt=nt.width-yt.right,y.moveTo(yt.left,pt),y.lineTo(zt,pt)):(pt+=yt.left,zt=nt.height-yt.bottom,y.moveTo(pt,yt.top),y.lineTo(pt,zt)),y.stroke(),y.Se(),Mt&&y.fs()}}}}function Pm(a,y,x,b,E){for(var et=b.length,nt=a.actualBounds,st=a.naturalBounds,ht=a1(a,!0),pt=a1(a,!1),yt=0;yt<et;yt++){var Mt=b[yt];if(Mt!==void 0&&Mt.background!==null&&Mt.coversSeparators!==E&&Mt.actual!==0){var zt=x?nt.height:nt.width;if(!(Mt.position>zt)){var Zt=Mt.Wc(),Qt=Mt.separatorStrokeWidth;isNaN(Qt)&&(Qt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ie=Mt.separatorStroke;ie===null&&(ie=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(ie===null||Mt.index===(x?ht:pt))&&(Qt=0),Zt-=Qt,Qt=Mt.position+Qt,Zt+=Mt.actual,Qt+Zt>zt&&(Zt=zt-Qt),0>=Zt||(zt=a.yb,Ki(a,y,Mt.background,!0,!1,st,nt),x?y.fillRect(zt.left,Qt+zt.top,nt.width-(zt.left+zt.right),Zt):y.fillRect(Qt+zt.left,zt.top,Zt,nt.height-(zt.top+zt.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"}qt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},qt.kk=function(a,y,x){if(!ze.prototype.kk.call(this,a,y,x))return!1;if(this.type===vn.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===vn.Grid||this.na===vn.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},qt.nk=function(){return!0},qt.$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,et=0,nt=0;nt<y.length;nt++)if(y[nt].Ed()){var st=y[nt].actualBounds;E=nt===0?st.x:Math.min(st.x,E),et=nt===0?st.y:Math.min(st.y,et)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-et)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else ze.prototype.$o.call(this,a,y,x,b)},qt.Sj=function(a,y,x,b,E){var et=this.se(),nt=this.transform,st=1/(nt.m11*nt.m22-nt.m12*nt.m21),ht=nt.m22*st,pt=-nt.m12*st,yt=-nt.m21*st,Mt=nt.m11*st,zt=st*(nt.m21*nt.dy-nt.m22*nt.dx),Zt=st*(nt.m12*nt.dx-nt.m11*nt.dy);if(this.areaBackground!==null)return nt=this.actualBounds,Ge.Ff(nt.left,nt.top,nt.right,nt.bottom,a,y,x,b,E);if(this.background!==null)return et=a*ht+y*yt+zt,st=a*pt+y*Mt+Zt,a=x*ht+b*yt+zt,ht=x*pt+b*Mt+Zt,E.h(0,0),x=this.naturalBounds,et=Ge.Ff(0,0,x.width,x.height,et,st,a,ht,E),E.transform(nt),et;et||(ht=1,yt=pt=0,Mt=1,Zt=zt=0),st=a*ht+y*yt+zt,a=a*pt+y*Mt+Zt,ht=x*ht+b*yt+zt,x=x*pt+b*Mt+Zt,E.h(ht,x),b=(ht-st)*(ht-st)+(x-a)*(x-a),pt=!1,Mt=this.O.s,Zt=Mt.length,yt=Le.alloc(),zt=null,y=1/0;var Qt=null,ie=this.isClipping&&this.na===vn.Spot;ie&&(Qt=Le.alloc(),zt=this.Pb(),(pt=zt.Sj(st,a,ht,x,Qt))&&(y=(st-Qt.x)*(st-Qt.x)+(a-Qt.y)*(a-Qt.y)));for(var Ee=0;Ee<Zt;Ee++){var we=Mt[Ee];we.visible&&we!==zt&&we.Sj(st,a,ht,x,yt)&&(pt=!0,we=(st-yt.x)*(st-yt.x)+(a-yt.y)*(a-yt.y),we<b&&(b=we,E.set(yt)))}return ie&&(y>b&&E.set(Qt),Le.free(Qt)),Le.free(yt),et&&E.transform(nt),pt},qt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();ze.prototype.Gj.call(this)},qt.v=function(a){if(!gs(this)){ze.prototype.v.call(this,a),a=null,(this.na===vn.Auto||this.na===vn.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 et=Da(E,!1);(E instanceof ba||E instanceof vn||E instanceof Si||et!==cn)&&E.v(!0)}}}},qt.Uj=function(){if(!gs(this)){ho(this,!0),Yl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},qt.Uk=function(){if(!(this.l&2048)){Us(this,!0),Ls(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},qt.Wu=function(){Ls(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},qt.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var et=this.desiredSize,nt=this.minSize;x===void 0&&(x=nt.width,b=nt.height),x=Math.max(x,nt.width),b=Math.max(b,nt.height);var st=this.maxSize;isNaN(et.width)||(a=Math.min(et.width,st.width)),isNaN(et.height)||(y=Math.min(et.height,st.height)),a=Math.max(x,a),y=Math.max(b,y);var ht=this.yb;a=Math.max(a-ht.left-ht.right,0),y=Math.max(y-ht.top-ht.bottom,0);var pt=this.O.s;pt.length!==0&&this.na.measure(this,a,y,pt,E,x,b),a=E.width+ht.left+ht.right,ht=E.height+ht.top+ht.bottom,isFinite(et.width)&&(a=et.width),isFinite(et.height)&&(ht=et.height),a=Math.min(st.width,a),ht=Math.min(st.height,ht),a=Math.max(nt.width,a),ht=Math.max(nt.height,ht),a=Math.max(x,a),ht=Math.max(b,ht),ra(E,a,ht),ra(this.naturalBounds,a,ht),this.Ge(0,0,a,ht)},qt.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 bu(a){return a.part!==null?a.part.locationObject:null}qt.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=Da(this,!0);var et=this.measuredBounds;y=et.width,et=et.height;var nt=this.Kg,st=nt.left+nt.right;switch(nt=nt.top+nt.bottom,y===x&&et===b&&(a=cn),a){case cn:(y>x||et>b)&&(this.v(),this.measure(y>x?x:y,et>b?b:et,0,0));break;case pn:this.v(!0),this.measure(x+st,b+nt,0,0);break;case qn:this.v(!0),this.measure(x+st,et+nt,0,0);break;case ar:this.v(!0),this.measure(y+st,b+nt,0,0)}}this.na.arrange(this,E,this.jg)}},qt.gh=function(a){var y=this.naturalBounds,x=bu(this);if(No(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=Le.allocAt(0,0);b--;){var et=y[b];if((et.visible||et===x)&&(mr(E.set(a),et.transform),et.ca(E)))return Le.free(E),!0}return Le.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},qt.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},qt.qm=function(a,y){if(y(this,a),a instanceof vn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Oc(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 et=y[E];et instanceof vn&&s1(a,et,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof vn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}qt.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof vn){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var et=u1(a,y[E],x);if(et!==null)return et}}return null}qt.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Wp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof vn){var et=E.fb(a);if(et!==null)return et}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 vn?x=Math.max(x,h1(E)):E instanceof Lr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}qt.se=function(){return!(this.type===vn.TableRow||this.type===vn.TableColumn)};function nh(a){return a.type===vn.TableRow||a.type===vn.TableColumn}qt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),xa(this)))return null;var b=this.naturalBounds,E=1/this.Df(),et=this.se(),nt=et?a:mr(Le.allocAt(a.x,a.y),this.transform),st=this.diagram,ht=10,pt=5;if(st!==null&&(ht=st.Ql("extraTouchArea"),pt=ht/2),No(-(pt*E),-(pt*E),b.width+ht*E,b.height+ht*E,nt.x,nt.y)){if(!this.isAtomic){E=this.O.s;var yt=E.length;if(st=Le.alloc(),pt=(ht=this.isClipping&&this.na===vn.Spot)?this.Pb():null,ht&&(pt.se()?mr(st.set(a),pt.transform):st.set(a),!pt.ca(st)))return Le.free(st),et||Le.free(nt),null;for(var Mt=bu(this);yt--;){var zt=E[yt];if((zt.visible||zt===Mt)&&(zt.se()?mr(st.set(a),zt.transform):st.set(a),!ht||zt!==pt)){var Zt=null;if(zt instanceof vn?Zt=zt.ic(st,y,x):zt.pickable===!0&&zt.ca(st)&&(Zt=zt),Zt!==null&&(y!==null&&(Zt=y(Zt)),Zt!==null&&(x===null||x(Zt))))return Le.free(st),et||Le.free(nt),Zt}}Le.free(st)}return this.background===null&&this.areaBackground===null?(et||Le.free(nt),null):(a=No(0,0,b.width,b.height,nt.x,nt.y)?this:null,et||Le.free(nt),a)}return et||Le.free(nt),null},qt.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,et=this.se(),nt=et?a:mr(Le.allocAt(a.x,a.y),this.transform);if(E=No(0,0,E.width,E.height,nt.x,nt.y),nh(this)||E){if(!this.isAtomic){for(var st=this.O.s,ht=st.length,pt=Le.alloc(),yt=bu(this);ht--;){var Mt=st[ht];if(Mt.visible||Mt===yt){Mt.se()?mr(pt.set(a),Mt.transform):pt.set(a);var zt=Mt;Mt=Mt instanceof vn?Mt:null,(Mt!==null?Mt.ji(pt,y,x,b):zt.ca(pt))&&zt.pickable!==!1&&(y!==null&&(zt=y(zt)),zt===null||x!==null&&!x(zt)||b.add(zt))}}Le.free(pt)}return et||Le.free(nt),E&&(this.background!==null||this.areaBackground!==null)}return et||Le.free(nt),!1},qt.Cf=function(a,y,x,b,E,et){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var nt=et;if(et===void 0&&(nt=xr.alloc(),nt.reset()),nt.multiply(this.transform),this.fh(a,nt))return v0(this,y,x,E),et===void 0&&xr.free(nt),!0;if(this.Yc(a,nt)){if(!this.isAtomic)for(var st=bu(this),ht=this.O.s,pt=ht.length;pt--;){var yt=ht[pt];if(yt.visible||yt===st){var Mt=yt.actualBounds,zt=this.naturalBounds;Mt.x>zt.width||Mt.y>zt.height||0>Mt.x+Mt.width||0>Mt.y+Mt.height||(Mt=yt,yt=yt instanceof vn?yt:null,zt=xr.alloc(),zt.set(nt),(yt!==null?yt.Cf(a,y,x,b,E,zt):Po(Mt,a,b,zt))&&(y!==null&&(Mt=y(Mt)),Mt===null||x!==null&&!x(Mt)||E.add(Mt)),xr.free(zt))}}return et===void 0&&xr.free(nt),b}return et===void 0&&xr.free(nt),!1};function v0(a,y,x,b){for(var E=a.O.s,et=E.length;et--;){var nt=E[et];if(nt.visible){var st=nt.actualBounds,ht=a.naturalBounds;st.x>ht.width||st.y>ht.height||0>st.x+st.width||0>st.y+st.height||(nt instanceof vn&&v0(nt,y,x,b),y!==null&&(nt=y(nt)),nt===null||x!==null&&!x(nt)||b.add(nt))}}}qt.og=function(a,y,x,b,E,et){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var nt=this.naturalBounds,st=this.se(),ht=st?a:mr(Le.allocAt(a.x,a.y),this.transform),pt=st?y:mr(Le.allocAt(y.x,y.y),this.transform),yt=ht.Bf(pt),Mt=0<ht.x&&ht.x<nt.width&&0<ht.y&&ht.y<nt.height||Vr(ht.x,ht.y,0,0,0,nt.height)<=yt||Vr(ht.x,ht.y,0,nt.height,nt.width,nt.height)<=yt||Vr(ht.x,ht.y,nt.width,nt.height,nt.width,0)<=yt||Vr(ht.x,ht.y,nt.width,0,0,0)<=yt;if(nt=ht.zd(0,0)<=yt&&ht.zd(0,nt.height)<=yt&&ht.zd(nt.width,0)<=yt&&ht.zd(nt.width,nt.height)<=yt,st||(Le.free(ht),Le.free(pt)),Mt){if(!this.isAtomic){ht=Le.alloc(),pt=Le.alloc(),yt=bu(this);for(var zt=this.O.s,Zt=zt.length;Zt--;){var Qt=zt[Zt];if(Qt.visible||Qt===yt){var ie=Qt.actualBounds,Ee=this.naturalBounds;(!st||!(ie.x>Ee.width||ie.y>Ee.height||0>ie.x+ie.width||0>ie.y+ie.height))&&(Qt.se()?(ie=Qt.transform,mr(ht.set(a),ie),mr(pt.set(y),ie)):(ht.set(a),pt.set(y)),ie=Qt,Qt=Qt instanceof vn?Qt:null,(Qt!==null?Qt.og(ht,pt,x,b,E,et):ie.tx(ht,pt,E))&&(x!==null&&(ie=x(ie)),ie===null||b!==null&&!b(ie)||et.add(ie)))}}Le.free(ht),Le.free(pt)}return E?Mt:nt}return!1};function y0(a){var y=null;return a instanceof Lr&&(y=a.spot1,y===jo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=ni),y}function S0(a){var y=null;return a instanceof Lr&&(y=a.spot2,y===jo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=oo),y}qt.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},qt.M=function(a){return this.O.M(a)},qt.Gb=function(a,y){y instanceof nr&&Oe("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Oe("Cannot make a Panel contain itself: "+this.toString()),Oe("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Oe("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!==vn.Grid||y instanceof Lr||Oe("Can only add Shapes to a Grid Panel, not: "+y),this.na!==vn.Graduated||y instanceof Lr||y instanceof Si||Oe("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 $n),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var et=-1,nt=this.O.s,st=nt.length,ht=0;ht<st;ht++)if(nt[ht]===y){et=ht;break}if(et!==-1){if(et===a||et+1>=E.count&&a>=E.count)return;E.mb(et),b=et}else Oe("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>E.count)&&(a=E.count),E.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),gs(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof vn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||km(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Mn&&(x.Te=!0),x.Te&&x instanceof Mn&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(vo,"elements",this,y,null,b,null),x.cb($i,"elements",this,null,y,null,a)))};function x0(a,y){a.l=y?a.l|16777216:a.l&-16777217}qt.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)},qt.mb=function(a){0<=a&&this.pc(a,!0)},qt.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),ho(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var et=this.part;et!==null&&(et.Rh=null,et.ag=NaN,et.Wb(),et instanceof Mn&&(b instanceof vn?b.qm(b,function(nt,st){W0(et,st,y)}):W0(et,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||et.cb(vo,"elements",this,b,null,a,null))},qt.Fb=function(a){0>a&&Ln(a,">= 0",vn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new co;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb($i,"rowdefs",this,null,x,null,a)}return y[a]},qt.oA=function(a){if(0>a&&Ln(a,">= 0",vn,"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(vo,"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 co?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}qt.Eb=function(a){0>a&&Ln(a,">= 0",vn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new co;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb($i,"coldefs",this,null,x,null,a)}return y[a]},qt.jA=function(a){if(0>a&&Ln(a,">= 0",vn,"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(vo,"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 co?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}qt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Em(y,a),this},qt.Hy=function(a,y){return(a=this.Fb(a))&&Em(a,new co(y)),this},qt.By=function(a,y){return(a=this.Eb(a))&&Em(a,new co(y)),this},qt.nz=function(a){if(0>a||this.type!==vn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var et=x[E];if(et!==void 0&&(y+=et.total,a<y))break}return E},qt.fz=function(a){if(0>a||this.type!==vn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var et=x[E];if(et!==void 0&&(y+=et.total,a<y))break}return E},qt.Fz=function(a,y){if(y===void 0&&(y=new Le(NaN,NaN)),this.type!==vn.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)},qt.Gz=function(a){if(this.type!==vn.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 Hs(a){var y=a.allBindings;if(y===null)a.data!==null&&Oe("Template cannot have .data be non-null: "+a),a.allBindings=y=new mn;else if(y._isFrozen)return;var x=new mn;x0(a,!1),a.qm(a,function(pt,yt){yt.th();var Mt=yt.localBindings;if(Mt!==null)for(xf(yt,!1),Mt=Mt.iterator;Mt.next();){var zt=Mt.value;zt.mode===cg&&xf(yt,!0);var Zt=zt.sourceName;Zt!==null&&(Zt==="/"&&x0(pt,!0),Zt=MS(zt,pt,yt),Zt!==null&&(x.add(Zt),Zt.srcBindings===null&&(Zt.srcBindings=new mn),Zt.srcBindings.add(zt))),y.add(zt)}if(yt instanceof vn&&yt.type===vn.Table){if(0<yt.rowCount){for(pt=yt.rowDefs,Mt=pt.length,zt=0;zt<Mt;zt++)if(Zt=pt[zt],Zt!==void 0&&Zt.be!==null)for(var Qt=Zt.be.iterator;Qt.next();){var ie=Qt.value;ie.xd=Zt,ie.to=2,ie.wl=Zt.index,y.add(ie)}}if(0<yt.columnCount){for(yt=yt.colDefs,pt=yt.length,Mt=0;Mt<pt;Mt++)if(zt=yt[Mt],zt!==void 0&&zt.be!==null)for(Zt=zt.be.iterator;Zt.next();)Qt=Zt.value,Qt.xd=zt,Qt.to=1,Qt.wl=zt.index,y.add(Qt)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){xf(E,!0);for(var et=E.srcBindings.iterator;et.next();){var nt=et.value;E.localBindings===null&&(E.localBindings=new mn),E.localBindings.add(nt)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,et=E.xd,et!==null){E.xd=null;var st=E.targetProperty,ht=st.indexOf(".");0<ht&&et instanceof vn&&(nt=st.substring(0,ht),st=st.substr(ht+1),ht=et.fb(nt),ht!==null?(et=ht,E.targetProperty=st):An('Warning: unable to find GraphObject named "'+nt+'" for Binding: '+E.toString())),et instanceof co?(nt=mi(et.panel),E.Ai=nt===void 0?-1:nt,et.panel.bindingId=E.Ai):et instanceof ze?(nt=mi(et),E.Ai=nt===void 0?-1:nt,et.bindingId=E.Ai):Oe("Unknown type of binding target: "+et)}y.freeze(),a instanceof nr&&a.Zc()&&a.Va()}qt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof vn&&(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&&Hs(y),y},qt.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 et=this,nt=x.Ai;if(nt!==-1){if(et=this.ks(nt),et===null)continue}else x.xd!==null&&(et=x.xd);if(E==="/"?b=et.part:E==="."?b=et:E===".."&&(b=et.panel),E=x.to,E!==0){if(!(et instanceof vn))continue;E===1?et=et.Eb(x.wl):E===2&&(et=et.Fb(x.wl))}et!==void 0&&x.Mv(et,b)}}},qt.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,et=null;E<x&&(et=a[E],!(et instanceof vn&&et.data!==null));)E++,et=a[E];if(x-E!==b)return!0;if(et===null)return 0<b;for(var nt=0;E<x&&nt<b;){if(et=a[E],!(et instanceof vn)||et.data!==y[nt])return!0;E++,nt++}return!1}function Wp(a){if(a.type===vn.Spot||a.type===vn.Auto)return Math.min(a.O.length,1);if(a.type===vn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof Lr&&b.isPanelMain))break}return x}return a.type===vn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof vn&&nh(a))?1:0}qt.mv=function(){for(var a=Wp(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=Wp(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 et=y[E],nt=b<a.O.length?a.O.M(b):null;if(nt instanceof vn){if(nt.data!==et){var st=b0(a,nt.data),ht=b0(a,et),pt=ht!==st;pt||(st=P0(a,st),pt=P0(a,ht)!==st),pt?(a.pc(b,!1),Cm(a,et,E,!1)):nt.data=et}}else Cm(a,et,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,w0(a,x,0),gs(a)||a.v(),a.graduatedIntervals=null,a.If()||km(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Mn&&(y.Te=!0),y.Te&&y instanceof Mn&&(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(Hs(E),E=E.copy(),E.l&16777216){var et=a.ih();et!==null&&x0(et,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new $n),a.ge.add(y,E)),et=x+Wp(a),a.Gb(et,E),b&&(E.ub=y,w0(a,et,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 vn){var E=y,et=x;b.type===vn.TableRow?b.row=E:b.type===vn.TableColumn&&(b.column=E),b.itemIndex=et}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=Qi(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Oe("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,An('No item template Panel found for category "'+y+'" on '+a),An(" Using default item template."),a=new vn,y=new Si,y.bind(new eo("text","",cr)),a.add(y),m1=a),b=m1)),b}function km(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof vn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var et=y[E];x&&et instanceof vn&&!et.isEnabled||km(a,et,x)}}}function Dl(a,y){y.name=a,ol.add(a,y)}un.Object.defineProperties(vn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===vn.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&&Ln(a,">= 0",vn,"padding"),a=new Br(a)):(0>a.left&&Ln(a.left,">= 0",vn,"padding:value.left"),0>a.right&&Ln(a.right,">= 0",vn,"padding:value.right"),0>a.top&&Ln(a.top,">= 0",vn,"padding:value.top"),0>a.bottom&&Ln(a.bottom,">= 0",vn,"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:us},set:function(a){typeof a=="number"&&(a=new Br(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new js),this.T.Qp=a,this.v(),this.g("defaultSeparatorPadding",y,a))}},defaultRowSeparatorStroke:{get:function(){return this.T!==null?this.T.ia:null},set:function(a){var y=this.defaultRowSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof si)&&(a instanceof si&&a.freeze(),this.T===null&&(this.T=new js),this.T.ia=a,this.N(),this.g("defaultRowSeparatorStroke",y,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.Ha:1},set:function(a){var y=this.defaultRowSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new js),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var et=a[E];typeof et=="number"&&0<=et&&isFinite(et)||Oe("defaultRowSeparatorDashArray value "+et+" at index "+E+" must be a positive number or zero."),b+=et}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new js),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof si)&&(a instanceof si&&a.freeze(),this.T===null&&(this.T=new js),this.T.u=a,this.N(),this.g("defaultColumnSeparatorStroke",y,a))}},defaultColumnSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.F:1},set:function(a){var y=this.defaultColumnSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new js),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var et=a[E];typeof et=="number"&&0<=et&&isFinite(et)||Oe("defaultColumnSeparatorDashArray value "+et+" at index "+E+" must be a positive number or zero."),b+=et}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new js),this.T.o=a,this.N(),this.g("defaultColumnSeparatorDashArray",y,a)}}},inRowsCols:{get:function(){return this.T!==null?this.T.nb:null},set:function(a){this.T===null&&(this.T=new js),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||Oe("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&jl(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()||Oe("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&jl(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 Pu),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Go(this)&&(a=this.part,a!==null&&Mi(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 Pu),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Go(this)&&(a=this.part,a!==null&&Mi(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 Pu),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 Pu),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 Pu,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 Pu,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 Pu,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 Pu,this.ra.Zh=a)}},panelLayoutState:{get:function(){return this.F},set:function(a){this.F=a}},Te:{get:function(){return(this.l&8388608)!==0},set:function(a){(this.l&8388608)!==0!==a&&(this.l^=8388608)}},rowDefs:{get:function(){return this.T===null&&(this.T=new js),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new js),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Tm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new js),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Tm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new js),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&Oe("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new js),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&Oe("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new js),this.T.hb=a,this.v(),this.g("leftIndex",y,a))}},data:{get:function(){return this.ub},set:function(a){var y=this.ub;if(y!==a){var x=this instanceof nr&&!(this instanceof qr);Hs(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 nr&&(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 wf),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 $n}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof nr||a.isPanelMain)&&Oe("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(a){var y=this.itemTemplateMap;if(y!==a){for(var x=a.iterator;x.next(););jr(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&&(jr(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 Pr&&(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&&km(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))}}}),un.Object.defineProperties(vn,{Position:{get:function(){return ol.I("Position")}},Horizontal:{get:function(){return ol.I("Horizontal")}},Vertical:{get:function(){return ol.I("Vertical")}},Spot:{get:function(){return ol.I("Spot")}},Auto:{get:function(){return ol.I("Auto")}},Table:{get:function(){return ol.I("Table")}},Viewbox:{get:function(){return ol.I("Viewbox")}},TableRow:{get:function(){return ol.I("TableRow")}},TableColumn:{get:function(){return ol.I("TableColumn")}},Link:{get:function(){return ol.I("Link")}},Grid:{get:function(){return ol.I("Grid")}},Graduated:{get:function(){return ol.I("Graduated")}}}),vn.prototype.rebuildItemElements=vn.prototype.mv,vn.prototype.findItemPanelForData=vn.prototype.sx,vn.prototype.updateTargetBindings=vn.prototype.La,vn.prototype.copyTemplate=vn.prototype.Uy,vn.prototype.graduatedValueForPoint=vn.prototype.Gz,vn.prototype.graduatedPointForValue=vn.prototype.Fz,vn.prototype.findColumnForLocalX=vn.prototype.fz,vn.prototype.findRowForLocalY=vn.prototype.nz,vn.prototype.addColumnDefinition=vn.prototype.By,vn.prototype.addRowDefinition=vn.prototype.Hy,vn.prototype.addRowColumnDefinition=vn.prototype.Gy,vn.prototype.removeColumnDefinition=vn.prototype.jA,vn.prototype.getColumnDefinition=vn.prototype.Eb,vn.prototype.removeRowDefinition=vn.prototype.oA,vn.prototype.getRowDefinition=vn.prototype.Fb,vn.prototype.removeAt=vn.prototype.mb,vn.prototype.remove=vn.prototype.remove,vn.prototype.insertAt=vn.prototype.Gb,vn.prototype.elt=vn.prototype.M,vn.prototype.add=vn.prototype.add,vn.prototype.findObject=vn.prototype.fb,vn.prototype.findInVisualTree=vn.prototype.Nl,vn.prototype.walkVisualTreeFrom=vn.prototype.qm,vn.prototype.findMainElement=vn.prototype.Pb;var g1=!1,m1=null,ol=new $n;vn.className="Panel",vn.definePanelLayout=Dl,Dl("Position",new fm),Dl("Vertical",new pm),Dl("Auto",new mm),Dl("Link",new bm);function Pu(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Pu.prototype.copy=function(){var a=new Pu;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},Pu.className="GradPanelSettings";function js(){this.Pc=[],this.Oc=[],this.j=this.ob=Tm,this.hb=this.Hb=0,this.Qp=us,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}js.prototype.copy=function(a){for(var y=new js,x=this.Pc,b=x.length,E=y.Pc,et=0;et<b;et++)if(x[et]!==void 0){var nt=x[et].copy();nt.wi(a),E[et]=nt}for(x=this.Oc,b=x.length,E=y.Oc,et=0;et<b;et++)x[et]!==void 0&&(nt=x[et].copy(),nt.wi(a),E[et]=nt);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},js.className="TablePanelSettings";function co(a){oi(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=jo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=C0,this.hg=Cr,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))}co.prototype.copy=function(){var a=new co;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=kn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Em(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=kn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}qt=co.prototype,qt.qb=function(a){a.classType===co&&(this.sizing=a)},qt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+mi(this)},qt.wi=function(a){this.Me=a},qt.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)},qt.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===vn.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,et=0;et<E;et++){var nt=b?y.rowDefs[et]:y.colDefs[et];if(nt!==void 0&&nt.oa!==0){x=nt.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)},qt.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(Di,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 Mm(a){if(a.sizing===C0){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}qt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new eo(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&Oe("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new mn),this.be.add(E),this},un.Object.defineProperties(co.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&&Ln(a,">= 0",co,"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&&Ln(a,">= 0",co,"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))&&Ln(a,">= 0",co,"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&&Ln(a,">= 0",co,"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 Br(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&&Pf(a,"RowColumnDefinition.separatorStroke"),a instanceof si&&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 et=a[E];typeof et=="number"&&0<=et&&isFinite(et)||Oe("separatorDashArray value "+et+" at index "+E+" must be a positive number or zero."),b+=et}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&&Pf(a,"RowColumnDefinition.background"),a instanceof si&&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}}}),co.prototype.computeEffectiveSpacing=co.prototype.Wc,co.prototype.computeEffectiveSpacingTop=co.prototype.Io;var C0=new tn(co,"Default",0),Hp=new tn(co,"None",1),Tm=new tn(co,"ProportionalExtra",2);co.className="RowColumnDefinition",co.Default=C0,co.None=Hp,co.ProportionalExtra=Tm;function Lr(a,y){ze.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)}$e(Lr,ze),Lr.prototype.cloneProtected=function(a){ze.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=kn(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 Fc(a){a.Na===null?a.Na=new M0:a.Na.nc&&(a.Na=a.Na.copy())}qt=Lr.prototype,qt.th=function(){ze.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},qt.qb=function(a){a===cn||a===Vn||a===Wr||a===Cr?this.geometryStretch=a:ze.prototype.qb.call(this,a)},qt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+mi(this)};function Pd(a,y,x,b){var E=x.length;if(!(4>E)){var et=b.measuredBounds,nt=Math.max(1,et.width);et=et.height;for(var st=x[0],ht=x[1],pt,yt,Mt,zt,Zt,Qt,ie=0,Ee=Fn(),we=2;we<E;we+=2)pt=x[we],yt=x[we+1],Mt=pt-st,st=yt-ht,Mt===0&&(Mt=.001),zt=st/Mt,Zt=Math.atan2(st,Mt),Qt=Math.sqrt(Mt*Mt+st*st),Ee.push([Mt,Zt,zt,Qt]),ie+=Qt,st=pt,ht=yt;st=x[0],ht=x[1],Mt=b.measuredBounds.width,b instanceof Lr&&(Mt-=b.strokeWidth),1>Mt&&(Mt=1),E=x=Mt,pt=nt/2,yt=pt!==0,we=0,Qt=Ee[we],Mt=Qt[0],Zt=Qt[1],zt=Qt[2],Qt=Qt[3];for(var je=0;.1<=ie;){if(je===0&&(yt?(E=x,E-=pt,ie-=pt,yt=!1):E=x,E===0&&(E=1)),E>ie){Bn(Ee);return}E>Qt?(je=E-Qt,E=Qt):je=0;var Fe=Math.sqrt(E*E/(1+zt*zt));if(0>Mt&&(Fe=-Fe),st+=Fe,ht+=zt*Fe,a.translate(st,ht),a.rotate(Zt),a.translate(-(nt/2),-(et/2)),je===0&&b.hh(a,y),a.translate(nt/2,et/2),a.rotate(-Zt),a.translate(-st,-ht),ie-=E,Qt-=E,je!==0){if(we++,we===Ee.length){Bn(Ee);return}Qt=Ee[we],Mt=Qt[0],Zt=Qt[1],zt=Qt[2],Qt=Qt[3],E=je}}Bn(Ee)}}qt.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 et=this.actualBounds,nt=this.naturalBounds;b!==null&&Ki(this,a,b,!0,!1,nt,et);var st=this.part,ht=this.ig;if(x===null||ht!==0||st===null||!this.isPanelMain&&st.Pb()!==this||(ht=st.type===vn.Link&&st instanceof qr&&st.category==="Selection"&&st.adornedObject instanceof Lr&&st.adornedPart.Pb()===st.adornedObject?st.adornedObject.strokeWidth:0),ht===0&&(x=null),x!==null&&ht!==0&&(Ki(this,a,x,!1,!1,nt,et),a.lineWidth=ht,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),et=!1,st&&y.Gf("drawShadows")&&(et=st.isShadowed),a.Il===!1&&(et=!1),st=!0,x===null||b!==null&&b!=="transparent"||(st=!1),nt=!1,ht=this.strokeDashArray,ht!==null&&(nt=!0,a.js(ht,this.strokeDashOffset)),E.type===bn.j)a.beginPath(),a.moveTo(E.startX,E.startY),a.lineTo(E.endX,E.endY),x!==null&&a.jk(),a.Se();else if(E.type===bn.u){var pt=E.startX;ht=E.startY;var yt=E.endX,Mt=E.endY;E=Math.min(pt,yt);var zt=Math.min(ht,Mt);pt=Math.abs(yt-pt),ht=Math.abs(Mt-ht),a.beginPath(),a.rect(E,zt,pt,ht),b!==null&&a.ng(b),x!==null&&(st&&et&&Jl(a),a.jk(),st&&et&&Su(a)),a.Se()}else if(E.type===bn.F)pt=E.startX,ht=E.startY,yt=E.endX,Mt=E.endY,E=Math.abs(yt-pt)/2,zt=Math.abs(Mt-ht)/2,pt=Math.min(pt,yt)+E,ht=Math.min(ht,Mt)+zt,a.beginPath(),a.moveTo(pt,ht-zt),a.bezierCurveTo(pt+Ge.wg*E,ht-zt,pt+E,ht-Ge.wg*zt,pt+E,ht),a.bezierCurveTo(pt+E,ht+Ge.wg*zt,pt+Ge.wg*E,ht+zt,pt,ht+zt),a.bezierCurveTo(pt-Ge.wg*E,ht+zt,pt-E,ht+Ge.wg*zt,pt-E,ht),a.bezierCurveTo(pt-E,ht-Ge.wg*zt,pt-Ge.wg*E,ht-zt,pt,ht-zt),a.closePath(),b!==null&&a.ng(b),x!==null&&(st&&et&&Jl(a),a.jk(),st&&et&&Su(a)),a.Se();else if(E.type===bn.o)for(E=E.figures,ht=E.length,zt=0;zt<ht;zt++){pt=E.s[zt],a.beginPath(),a.moveTo(pt.startX,pt.startY),yt=pt.segments.s,Mt=yt.length;for(var Zt=null,Qt=0;Qt<Mt;Qt++){var ie=yt[Qt];switch(ie.type){case bo:a.moveTo(ie.endX,ie.endY);break;case ki:a.lineTo(ie.endX,ie.endY);break;case Wo:a.bezierCurveTo(ie.point1X,ie.point1Y,ie.point2X,ie.point2Y,ie.endX,ie.endY);break;case cs:a.quadraticCurveTo(ie.point1X,ie.point1Y,ie.endX,ie.endY);break;case ao:if(ie.radiusX===ie.radiusY){var Ee=Math.PI/180;a.arc(ie.point1X,ie.point1Y,ie.radiusX,ie.startAngle*Ee,(ie.startAngle+ie.sweepAngle)*Ee,0>ie.sweepAngle,Zt!==null?Zt.endX:pt.startX,Zt!==null?Zt.endY:pt.startY)}else if(Zt=$a(ie,pt),Ee=Zt.length,Ee===0)a.lineTo(ie.centerX,ie.centerY);else for(var we=0;we<Ee;we++){var je=Zt[we];we===0&&a.lineTo(je[0],je[1]),a.bezierCurveTo(je[2],je[3],je[4],je[5],je[6],je[7])}break;case Cs:if(we=Ee=0,Zt!==null&&Zt.type===ao){if(Zt=$a(Zt,pt),je=Zt.length,je===0){a.lineTo(ie.endX,ie.endY);break}Zt=Zt[je-1]||null,Zt!==null&&(Ee=Zt[6],we=Zt[7])}else Ee=Zt!==null?Zt.endX:pt.startX,we=Zt!==null?Zt.endY:pt.startY;if(Zt=Rs(ie,pt,Ee,we),Ee=Zt.length,Ee===0){a.lineTo(ie.endX,ie.endY);break}for(we=0;we<Ee;we++)je=Zt[we],a.bezierCurveTo(je[2],je[3],je[4],je[5],je[6],je[7]);break;default:Oe("Segment not of valid type: "+ie.type)}ie.isClosed&&a.closePath(),Zt=ie}yt=pt.isFilled,et?pt.isShadowed?(yt===!0&&b!=="transparent"&&b!==null&&a.ng(b,pt.isEvenOdd),x!==null&&(yt&&st&&Jl(a),a.jk(),yt&&st&&Su(a))):(Jl(a),yt&&b!=="transparent"&&b!==null&&a.ng(b,pt.isEvenOdd),x!==null&&a.jk(),Su(a)):(yt&&b!==null&&a.ng(b,pt.isEvenOdd),x!==null&&a.jk()),a.Se(zt)}if(nt&&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),et=this.geometry,a.save(),a.beginPath(),b=Fn(),et.type===bn.j)b.push(et.startX),b.push(et.startY),b.push(et.endX),b.push(et.endY),Pd(a,y,b,x);else if(et.type===bn.o)for(et=et.figures.iterator;et.next();){for(st=et.value,b.length=0,b.push(st.startX),b.push(st.startY),nt=st.startX,E=st.startY,ht=nt,zt=E,pt=st.segments.s,yt=pt.length,Mt=0;Mt<yt;Mt++){switch(Qt=pt[Mt],Qt.type){case bo:Pd(a,y,b,x),b.length=0,b.push(Qt.endX),b.push(Qt.endY),nt=Qt.endX,E=Qt.endY,ht=nt,zt=E;break;case ki:b.push(Qt.endX),b.push(Qt.endY),nt=Qt.endX,E=Qt.endY;break;case Wo:Ge.Qe(nt,E,Qt.point1X,Qt.point1Y,Qt.point2X,Qt.point2Y,Qt.endX,Qt.endY,.5,b),nt=Qt.endX,E=Qt.endY;break;case cs:Ge.ep(nt,E,Qt.point1X,Qt.point1Y,Qt.endX,Qt.endY,.5,b),nt=Qt.endX,E=Qt.endY;break;case ao:if(ie=$a(Qt,st),Zt=ie.length,Zt===0){b.push(Qt.centerX),b.push(Qt.centerY),nt=Qt.centerX,E=Qt.centerY;break}for(Ee=0;Ee<Zt;Ee++)we=ie[Ee],Ge.Qe(nt,E,we[2],we[3],we[4],we[5],we[6],we[7],.5,b),nt=we[6],E=we[7];break;case Cs:if(ie=Rs(Qt,st,nt,E),Zt=ie.length,Zt===0){b.push(Qt.endX),b.push(Qt.endY),nt=Qt.endX,E=Qt.endY;break}for(Ee=0;Ee<Zt;Ee++)we=ie[Ee],Ge.Qe(nt,E,we[2],we[3],we[4],we[5],we[6],we[7],.5,b),nt=we[6],E=we[7];break;default:Oe("Segment not of valid type: "+Qt.type)}Qt.isClosed&&(b.push(ht),b.push(zt),Pd(a,y,b,x))}Pd(a,y,b,x)}else if(et.type===bn.u)b.push(et.startX),b.push(et.startY),b.push(et.endX),b.push(et.startY),b.push(et.endX),b.push(et.endY),b.push(et.startX),b.push(et.endY),b.push(et.startX),b.push(et.startY),Pd(a,y,b,x);else if(et.type===bn.F){if(E=new wo,E.startX=et.endX,E.startY=(et.startY+et.endY)/2,nt=new ti(ao),nt.startAngle=0,nt.sweepAngle=360,nt.centerX=(et.startX+et.endX)/2,nt.centerY=(et.startY+et.endY)/2,nt.radiusX=Math.abs(et.startX-et.endX)/2,nt.radiusY=Math.abs(et.startY-et.endY)/2,E.add(nt),et=$a(nt,E),st=et.length,st===0)b.push(nt.centerX),b.push(nt.centerY);else for(nt=E.startX,E=E.startY,ht=0;ht<st;ht++)zt=et[ht],Ge.Qe(nt,E,zt[2],zt[3],zt[4],zt[5],zt[6],zt[7],.5,b),nt=zt[6],E=zt[7];Pd(a,y,b,x)}Bn(b),a.restore(),a.Vc(!1)}}}},qt.kk=function(a,y,x){return!ze.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)},qt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:ze.prototype.nk.call(this,a)},qt.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)}},qt.ga=function(a,y){if(y===void 0&&(y=new Le),a instanceof rr){a.Mc()&&Oe("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},qt.mi=function(a){a===void 0&&(a=new on);var y=this.naturalBounds,x=this.oe;y=on.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=Le.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),Ai(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),Ai(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),Ai(a,b.x,b.y,0,0),on.free(y),Le.free(b),a},qt.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var b=x.bounds,E=this.strokeWidth/2;x.type!==bn.j||y||(E+=2);var et=on.alloc();if(et.assign(b),et.Bc(E+2,E+2),!et.ca(a))return on.free(et),!1;if(b=E+1e-4,x.type===bn.j)return this.stroke===null||(b=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>b)?!1:(on.free(et),Ge.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===bn.u){y=x.startX;var nt=x.startY,st=x.endX;if(x=x.endY,et.x=Math.min(y,st),et.y=Math.min(nt,x),et.width=Math.abs(st-y),et.height=Math.abs(x-nt),this.fill===null){if(et.Bc(-b,-b),et.ca(a))return on.free(et),!1;et.Bc(b,b)}return this.stroke!==null&&et.Bc(E,E),a=et.ca(a),on.free(et),a}if(x.type===bn.F){nt=x.startX,E=x.startY,st=x.endX;var ht=x.endY;if(x=Math.min(nt,st),y=Math.min(E,ht),nt=Math.abs(st-nt)/2,E=Math.abs(ht-E)/2,x=a.x-(x+nt),y=a.y-(y+E),this.fill===null){if(nt-=b,E-=b,0>=nt||0>=E||1>=x*x/(nt*nt)+y*y/(E*E))return on.free(et),!1;nt+=b,E+=b}return this.stroke!==null&&(nt+=b,E+=b),on.free(et),0>=nt||0>=E?!1:1>=x*x/(nt*nt)+y*y/(E*E)}if(x.type===bn.o)return on.free(et),this.fill===null?gl(x,a.x,a.y,E):hs(x,a,E,1<this.strokeWidth,y);Oe("Unknown Geometry type: "+x.type)},qt.Wl=function(a,y,x,b){var E=this.desiredSize,et=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var nt=this.geometry.bounds;else{var st=this.figure,ht=E0[st];if(ht===void 0){var pt=Ge.Ze[st];typeof pt=="string"&&(pt=Ge.Ze[pt]),typeof pt=="function"?(ht=pt(null,100,100),E0[st]=ht):Oe("Unsupported Figure: "+st)}nt=ht.bounds}st=nt.width,ht=nt.height,pt=nt.width;var yt=nt.height;switch(Da(this,!0)){case cn:b=x=0;break;case pn:pt=Math.max(a-et,0),yt=Math.max(y-et,0);break;case qn:pt=Math.max(a-et,0),b=0;break;case ar:x=0,yt=Math.max(y-et,0)}isFinite(E.width)&&(pt=E.width),isFinite(E.height)&&(yt=E.height);var Mt=this.maxSize,zt=this.minSize;switch(x=Math.max(x-et,zt.width),b=Math.max(b-et,zt.height),pt=Math.min(Mt.width,pt),yt=Math.min(Mt.height,yt),pt=isFinite(pt)?Math.max(x,pt):Math.max(st,x),yt=isFinite(yt)?Math.max(b,yt):Math.max(ht,b),x=k0(this),x){case cn:break;case pn:st=pt,ht=yt;break;case Vn:x=Math.min(pt/st,yt/ht),isFinite(x)||(x=1),st*=x,ht*=x;break;default:Oe(x+" is not a valid geometryStretch.")}this.Rd!==null?(st===0&&(st=.001),ht===0&&(ht=.001),x=this.Rd!==null?this.Rd:this.ua,nt=x.bounds,b=st/nt.width,nt=ht/nt.height,isFinite(b)||(b=1),isFinite(nt)||(nt=1),this.ua=b===1&&nt===1?x:x.copy().scale(b,nt)):this.ua!==null&&Ge.$(this.ua.Sk,a-et)&&Ge.$(this.ua.Rk,y-et)||(this.ua=Lr.makeGeometry(this,st,ht)),nt=this.ua.bounds,a===1/0||y===1/0?this.Ge(nt.x-et/2,nt.y-et/2,a===0&&st===0?0:nt.width+et,y===0&&ht===0?0:nt.height+et):this.Ge(-(et/2),-(et/2),pt+et,yt+et),E.w()?(pt=E.width,yt=E.height,pt=Math.min(Mt.width,pt),yt=Math.min(Mt.height,yt),pt=Math.max(zt.width,pt),yt=Math.max(zt.height,yt),this.dc.h(0,0,pt,yt)):this.dc.assign(nt)};function k0(a){var y=a.geometryStretch;return a.Rd!==null?y===Cr?pn:y:y===Cr?E0[a.figure].defaultStretch:y}qt.eh=function(a,y,x,b){ua(this,a,y,x,b)},qt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},qt.Sj=function(a,y,x,b,E){var et=this.transform,nt=1/(et.m11*et.m22-et.m12*et.m21),st=et.m22*nt,ht=-et.m12*nt,pt=-et.m21*nt,yt=et.m11*nt,Mt=nt*(et.m21*et.dy-et.m22*et.dx),zt=nt*(et.m12*et.dx-et.m11*et.dy);et=a*st+y*pt+Mt,nt=a*ht+y*yt+zt,st=x*st+b*pt+Mt,ht=x*ht+b*yt+zt,Mt=this.ig/2,pt=this.ua,pt===null&&(this.measure(1/0,1/0),pt=this.ua);var Zt=pt.bounds;if(yt=!1,pt.type===bn.j)if(1.5>=this.strokeWidth)yt=Ge.Ve(pt.startX,pt.startY,pt.endX,pt.endY,et,nt,st,ht,E);else{if(pt.startX===pt.endX?(b=Mt,yt=0):(y=(pt.endY-pt.startY)/(pt.endX-pt.startX),yt=Mt/Math.sqrt(1+y*y),b=yt*y),y=Fn(),a=new Le,Ge.Ve(pt.startX+b,pt.startY+yt,pt.endX+b,pt.endY+yt,et,nt,st,ht,a)&&y.push(a),a=new Le,Ge.Ve(pt.startX-b,pt.startY-yt,pt.endX-b,pt.endY-yt,et,nt,st,ht,a)&&y.push(a),a=new Le,Ge.Ve(pt.startX+b,pt.startY+yt,pt.startX-b,pt.startY-yt,et,nt,st,ht,a)&&y.push(a),a=new Le,Ge.Ve(pt.endX+b,pt.endY+yt,pt.endX-b,pt.endY-yt,et,nt,st,ht,a)&&y.push(a),st=y.length,st===0)return Bn(y),!1;for(yt=!0,ht=1/0,b=0;b<st;b++)a=y[b],x=(a.x-et)*(a.x-et)+(a.y-nt)*(a.y-nt),x<ht&&(ht=x,E.x=a.x,E.y=a.y);Bn(y)}else if(pt.type===bn.u)yt=Ge.Ff(Zt.x-Mt,Zt.y-Mt,Zt.x+Zt.width+Mt,Zt.y+Zt.height+Mt,et,nt,st,ht,E);else if(pt.type===bn.F){y=on.allocAt(Zt.x,Zt.y,Zt.width,Zt.height).Bc(Mt,Mt);t:if(y.width===0)yt=Ge.Ve(y.x,y.y,y.x,y.y+y.height,et,nt,st,ht,E);else if(y.height===0)yt=Ge.Ve(y.x,y.y,y.x+y.width,y.y,et,nt,st,ht,E);else{if(a=y.width/2,pt=y.height/2,b=y.x+a,yt=y.y+pt,x=9999,et!==st&&(x=(nt-ht)/(et-st)),9999>Math.abs(x)){if(ht=nt-yt-x*(et-b),0>a*a*x*x+pt*pt-ht*ht){E.x=NaN,E.y=NaN,yt=!1;break t}Mt=Math.sqrt(a*a*x*x+pt*pt-ht*ht),st=(-(a*a*x*ht)+a*pt*Mt)/(pt*pt+a*a*x*x)+b,a=(-(a*a*x*ht)-a*pt*Mt)/(pt*pt+a*a*x*x)+b,pt=x*(st-b)+ht+yt,ht=x*(a-b)+ht+yt,Math.abs((et-st)*(et-st))+Math.abs((nt-pt)*(nt-pt))<Math.abs((et-a)*(et-a))+Math.abs((nt-ht)*(nt-ht))?(E.x=st,E.y=pt):(E.x=a,E.y=ht)}else{if(st=pt*pt,ht=et-b,st-=st/(a*a)*ht*ht,0>st){E.x=NaN,E.y=NaN,yt=!1;break t}ht=Math.sqrt(st),st=yt+ht,ht=yt-ht,Math.abs(st-nt)<Math.abs(ht-nt)?(E.x=et,E.y=st):(E.x=et,E.y=ht)}yt=!0}on.free(y)}else if(pt.type===bn.o){zt=Le.alloc();var Qt=st-et,ie=ht-nt,Ee=Qt*Qt+ie*ie,we=et,je=nt;if(0<Ee&&Zt.contains(we,je)&&(zt.x=we,zt.y=je,this.ca(zt)))for(Qt!==0&&.5>Math.abs(Qt)?(ie*=.5/Qt,Qt=.5):ie!==0&&.5>Math.abs(ie)&&(Qt*=.5/ie,ie=.5),we-=Qt,je-=ie;Zt.contains(we,je);)we-=Qt,je-=ie;for(E.x=st,E.y=ht,ie=0;ie<pt.figures.count;ie++){var Fe=pt.figures.s[ie],De=Fe.isFilled?we:et,_e=Fe.isFilled?je:nt,Xe=Fe.segments;Zt=Fe.startX,Qt=Fe.startY;for(var En=Zt,Gn=Qt,Dn=0;Dn<Xe.count;Dn++){var wn=Xe.s[Dn],hn=wn.type,br=wn.endX,fr=wn.endY,ri=!1;switch(hn){case bo:En=br,Gn=fr;break;case ki:ri=Am(Zt,Qt,br,fr,De,_e,st,ht,zt);break;case Wo:ri=Ge.Eo(Zt,Qt,wn.point1X,wn.point1Y,wn.point2X,wn.point2Y,br,fr,De,_e,st,ht,.6,zt);break;case cs:ri=Ge.Eo(Zt,Qt,Zt+2/3*(wn.point1X-Zt),Qt+2/3*(wn.point1Y-Qt),br+2/3*(wn.point1X-br),fr+2/3*(wn.point1Y-fr),br,fr,De,_e,st,ht,.6,zt);break;case ao:case Cs:hn=wn.type===ao?$a(wn,Fe):Rs(wn,Fe,Zt,Qt);var yi=hn.length;if(yi===0){ri=Am(Zt,Qt,wn.type===ao?wn.centerX:wn.endX,wn.type===ao?wn.centerY:wn.endY,De,_e,st,ht,zt);break}for(fr=null,br=0;br<yi;br++){if(fr=hn[br],br===0&&Am(Zt,Qt,fr[0],fr[1],De,_e,st,ht,zt)){var Co=Lm(De,_e,zt,Ee,E);Co<Ee&&(Ee=Co,yt=!0)}Ge.Eo(fr[0],fr[1],fr[2],fr[3],fr[4],fr[5],fr[6],fr[7],De,_e,st,ht,.6,zt)&&(Co=Lm(De,_e,zt,Ee,E),Co<Ee&&(Ee=Co,yt=!0))}br=fr[6],fr=fr[7];break;default:Oe("Unknown Segment type: "+hn)}Zt=br,Qt=fr,ri&&(ri=Lm(De,_e,zt,Ee,E),ri<Ee&&(Ee=ri,yt=!0)),wn.isClosed&&(br=En,fr=Gn,Am(Zt,Qt,br,fr,De,_e,st,ht,zt)&&(wn=Lm(De,_e,zt,Ee,E),wn<Ee&&(Ee=wn,yt=!0)))}}et=x-a,nt=b-y,st=Math.sqrt(et*et+nt*nt),st!==0&&(et/=st,nt/=st),E.x-=et*Mt,E.y-=nt*Mt,Le.free(zt)}else Oe("Unknown Geometry type: "+pt.type);return yt?(this.transform.Ga(E),!0):!1};function Lm(a,y,x,b,E){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<b?(E.x=x.x,E.y=x.y,y):b}function Am(a,y,x,b,E,et,nt,st,ht){if(Ge.$(a,x)&&Ge.$(y,b)||Ge.$(E,nt)&&Ge.$(et,st))return!1;var pt=!1,yt=(E-nt)*(y-b)-(et-st)*(a-x);return yt===0?!1:(ht.x=((E*st-et*nt)*(a-x)-(E-nt)*(a*b-y*x))/yt,ht.y=((E*st-et*nt)*(y-b)-(et-st)*(a*b-y*x))/yt,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(ht.y>a||Ge.$(ht.y,a))&&(ht.y<y||Ge.$(ht.y,y))&&(pt=!0)):(y=a<x?a:x,a=a<x?x:a,(ht.x>y||Ge.$(ht.x,y))&&(ht.x<a||Ge.$(ht.x,a))&&(pt=!0)),pt)}qt.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,et=Le.alloc();return et.h(x.x-b,x.y-b),a.ca(y.Ga(et))&&(et.h(x.x-b,x.bottom+b),a.ca(y.Ga(et))&&(et.h(x.right+b,x.bottom+b),a.ca(y.Ga(et))&&(et.h(x.right+b,x.y-b),a.ca(y.Ga(et))&&(E=!0)))),Le.free(et),E},qt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=xr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,et=a.top;a=a.bottom;var nt=Le.alloc();if(nt.h(b,et),x.Ga(nt),this.gh(nt,!0)||(nt.h(E,et),x.Ga(nt),this.gh(nt,!0))||(nt.h(b,a),x.Ga(nt),this.gh(nt,!0))||(nt.h(E,a),x.Ga(nt),this.gh(nt,!0)))return Le.free(nt),!0;var st=Le.alloc(),ht=Le.alloc();return x.set(y),x.bv(this.transform),x.Vj(),st.x=E,st.y=et,st.transform(x),nt.x=b,nt.y=et,nt.transform(x),y=!1,Dc(this,nt,st,ht)?y=!0:(nt.x=E,nt.y=a,nt.transform(x),Dc(this,nt,st,ht)?y=!0:(st.x=b,st.y=a,st.transform(x),Dc(this,nt,st,ht)?y=!0:(nt.x=b,nt.y=et,nt.transform(x),Dc(this,nt,st,ht)&&(y=!0)))),Le.free(nt),xr.free(x),Le.free(st),Le.free(ht),y};function Dc(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,et=x.y;return x=b.x,b=b.y,a===E?(y<et?(a=y,y=et):a=et,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}qt.tx=function(a,y,x){function b(Ee,we){for(var je=Ee.length,Fe=0;Fe<je;Fe+=2)if(we.zd(Ee[Fe],Ee[Fe+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),et=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 nt=y.bounds,st=nt.x,ht=nt.y,pt=nt.x+nt.width;if(nt=nt.y+nt.height,yr(a.x,a.y,st,ht)<=E&&yr(a.x,a.y,pt,ht)<=E&&yr(a.x,a.y,st,nt)<=E&&yr(a.x,a.y,pt,nt)<=E)return!0}if(st=y.startX,ht=y.startY,pt=y.endX,nt=y.endY,y.type===bn.j){if(x=(st-pt)*(a.x-pt)+(ht-nt)*(a.y-nt),Vr(a.x,a.y,st,ht,pt,nt)<=(0<=(pt-st)*(a.x-st)+(nt-ht)*(a.y-ht)&&0<=x?E:et))return!0}else{if(y.type===bn.u)return y=!1,x&&(y=Vr(a.x,a.y,st,ht,st,nt)<=E||Vr(a.x,a.y,st,ht,pt,ht)<=E||Vr(a.x,a.y,pt,ht,pt,nt)<=E||Vr(a.x,a.y,st,nt,pt,nt)<=E),y;if(y.type===bn.F){y=a.x-(st+pt)/2,et=a.y-(ht+nt)/2;var yt=Math.abs(pt-st)/2,Mt=Math.abs(nt-ht)/2;if(yt===0||Mt===0)return Vr(a.x,a.y,st,ht,pt,nt)<=E;if(x){if(a=Ge.$y(yt,Mt,y,et),a*a<=E)return!0}else return!(yr(y,et,-yt,0)>=E||yr(y,et,0,-Mt)>=E||yr(y,et,0,Mt)>=E||yr(y,et,yt,0)>=E)}else if(y.type===bn.o){if(pt=y.bounds,et=pt.x,st=pt.y,ht=pt.x+pt.width,pt=pt.y+pt.height,a.x>ht&&a.x<et&&a.y>pt&&a.y<st&&Vr(a.x,a.y,et,st,et,pt)>E&&Vr(a.x,a.y,et,st,ht,st)>E&&Vr(a.x,a.y,ht,pt,et,pt)>E&&Vr(a.x,a.y,ht,pt,ht,st)>E)return!1;if(et=Math.sqrt(E),x){if(this.fill===null?gl(y,a.x,a.y,et):hs(y,a,et,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(et=x.s[y],nt=et.startX,yt=et.startY,a.zd(nt,yt)>E)return!1;for(st=et.segments.s,ht=st.length,pt=0;pt<ht;pt++)switch(Mt=st[pt],Mt.type){case bo:case ki:if(nt=Mt.endX,yt=Mt.endY,a.zd(nt,yt)>E)return!1;break;case Wo:var zt=Fn();if(Ge.Qe(nt,yt,Mt.point1X,Mt.point1Y,Mt.point2X,Mt.point2Y,Mt.endX,Mt.endY,.8,zt),nt=b(zt,a),Bn(zt),nt||(nt=Mt.endX,yt=Mt.endY,a.zd(nt,yt)>E))return!1;break;case cs:if(zt=Fn(),Ge.ep(nt,yt,Mt.point1X,Mt.point1Y,Mt.endX,Mt.endY,.8,zt),nt=b(zt,a),Bn(zt),nt||(nt=Mt.endX,yt=Mt.endY,a.zd(nt,yt)>E))return!1;break;case ao:case Cs:zt=Mt.type===ao?$a(Mt,et):Rs(Mt,et,nt,yt);var Zt=zt.length;if(Zt===0){if(nt=Mt.type===ao?Mt.centerX:Mt.endX,yt=Mt.type===ao?Mt.centerY:Mt.endY,a.zd(nt,yt)>E)return!1;break}Mt=null;for(var Qt=Fn(),ie=0;ie<Zt;ie++)if(Mt=zt[ie],Qt.length=0,Ge.Qe(Mt[0],Mt[1],Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.8,Qt),b(Qt,a))return Bn(Qt),!1;Bn(Qt),Mt!==null&&(nt=Mt[6],yt=Mt[7]);break;default:Oe("Unknown Segment type: "+Mt.type)}}return!0}}}return!1},qt.qc=function(){this.ua=null},qt.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=qp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Yo):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new rr(1-Yo.x,Yo.y)))}Lr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=$l[a.toArrow];else a.fromArrow!=="None"?b=$l[a.fromArrow]:(b=Ge.Ze[a.figure],typeof b=="string"&&(b=Ge.Ze[b]),b===void 0&&Oe("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Ge.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=$l[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=$l[x],y===void 0){var b=null,E;for(E in Ge.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=bn.parse(Ge.um[b],!1),$l[b]=a,x!==b&&($l[x]=b),b}}return typeof y=="string"?y:y instanceof bn?a:null}un.Object.defineProperties(Lr.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),Go(this)&&(a=this.part,a!==null&&Mi(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=bn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Le.allocAt(-y.x,-y.y),Le.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&&Pf(a,"Shape.fill"),a instanceof si&&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&&Pf(a,"Shape.stroke"),a instanceof si&&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 Ln(a,"value >= 0",Lr,"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"?Ln(a,'"butt", "round", or "square"',Lr,"strokeCap"):(Fc(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"?Ln(a,'"miter", "bevel", or "round"',Lr,"strokeJoin"):(Fc(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){Fc(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 et=a[E];0<=et&&isFinite(et)||Oe("strokeDashArray:value "+et+" at index "+E+" must be a positive number or zero."),b+=et}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&&(Fc(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=Ge.Ze[a];typeof x=="function"?x=a:(x=Ge.Ze[a.toLowerCase()])||Oe("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?Oe("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new _h),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?Oe("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new _h),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:jo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Fc(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:jo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Fc(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&&(Fc(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Cr},set:function(a){var y=this.geometryStretch;y!==a&&(Fc(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 ql),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&jl(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 ql),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 ql),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 ql),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Lr.prototype.intersectsRect=Lr.prototype.Yc,Lr.prototype.containedInRect=Lr.prototype.fh,Lr.prototype.getNearestIntersectionPoint=Lr.prototype.rs,Lr.prototype.getDocumentBounds=Lr.prototype.mi,Lr.prototype.getDocumentPoint=Lr.prototype.ga;var $l=new Hn,E0=new Hn;Lr.className="Shape",Lr.getFigureGenerators=function(){var a=new $n,y;for(y in Ge.Ze)y!==y.toLowerCase()&&a.add(y,Ge.Ze[y]);return a.freeze(),a},Lr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Ge.Ze;b[a]=y,b[x]=a},Lr.getArrowheadGeometries=function(){var a=new $n;for(b in Ge.um)if($l[b]===void 0){var y=bn.parse(Ge.um[b],!1);$l[b]=y,y=b.toLowerCase(),y!==b&&($l[y]=b)}for(var x in $l)if(x!==x.toLowerCase()){var b=$l[x];b instanceof bn&&a.add(x,b)}return a.freeze(),a},Lr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=bn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Oe("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=$l;b[a]=x,b[y]=a};function M0(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Cr,this.gg=this.fg=jo}M0.prototype.copy=function(){var a=new M0;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 Si(a,y){return ze.call(this),Dm||(Ba=Wi?new Ws(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}$e(Si,ze),Si.prototype.cloneProtected=function(a){ze.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 Bl(a){a.da===null?a.da=new F0:a.da.nc&&(a.da=a.da.copy())}qt=Si.prototype,qt.th=function(){ze.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}qt.qb=function(a){a.classType===Si?this.wrap=a:ze.prototype.qb.call(this,a)},qt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},qt.v=function(){ze.prototype.v.call(this)},qt.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,et=x.height,nt=Kp(this),st=a.textAlign=this.textAlign,ht=y.tn;st==="start"?st=ht?"right":"left":st==="end"&&(st=ht?"left":"right"),ht=this.isUnderline;var pt=this.isStrikethrough;Ki(this,a,this.xc,!0,!1,x,b),(ht||pt)&&Ki(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var yt=this.oe,Mt=yt.dx-(nt*yt.m21+yt.dx);yt=yt.dy-(nt*yt.m22+yt.dy);var zt=y.scale;switch(8>(Mt*Mt+yt*yt)*zt*zt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof es&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Mt=this.spacingBelow,this.flip){case Xr:a.translate(E,0),a.scale(-1,1);break;case Fr:a.translate(0,et),a.scale(1,-1);break;case ci:a.translate(E,et),a.scale(-1,-1)}if(a.yc(),yt=this.Gc,zt=(y+nt+Mt)*yt,et>zt&&(b=this.verticalAlignment,b=b.y*et-b.y*zt+b.offsetY),yt===1&&this.ze!==null)Mt=this.Cb,Mt>E&&(Mt=E),this.Oj(this.ze,a,0,b+y,E,nt,Mt,x,st,ht,pt);else if(this.Qc!==null&&this.Qb!==null)for(zt=0;zt<yt;zt++){var Zt=this.Qc[zt];Zt>E&&(Zt=E),b+=y,this.Oj(this.Qb[zt],a,0,b,E,nt,Zt,x,st,ht,pt),b+=nt+Mt}switch(this.flip){case Xr:a.scale(-1,1),a.translate(-E,0);break;case Fr:a.scale(1,-1),a.translate(0,-et);break;case ci:a.scale(-1,-1),a.translate(-E,-et)}}},qt.Oj=function(a,y,x,b,E,et,nt,st,ht,pt,yt){var Mt=0;if(st)ht==="left"?Mt=0:ht==="right"?Mt=E-nt:ht==="center"&&(Mt=(E-nt)/2),y.fillRect(x+Mt,b+.25*et,nt,1);else{if(ht==="left"?Mt=0:ht==="right"?Mt=E:ht==="center"&&(Mt=E/2),E=Nm!==null?Nm(this,et):.75*et,y.fillText(a,x+Mt,b+E),a=et/20|0,a===0&&(a=1),ht==="right"?Mt-=nt:ht==="center"&&(Mt-=nt/2),pt){st=jm!==null?jm(this,et):.8*et,ht=x+Mt,pt=b+st,E=x+Mt+nt,st=b+st;var zt=a;y.beginPath(),y.lineWidth=zt,y.moveTo(ht,pt),y.lineTo(E,st),y.stroke(),y.Se(),y instanceof es&&y.ad.classList.add("gojs-td")}yt&&(yt=b+et-et/2.2|0,a%2!==0&&(yt+=.5),b=x+Mt,et=yt,x=x+Mt+nt,nt=yt,Mt=a,y.beginPath(),y.lineWidth=Mt,y.moveTo(b,et),y.lineTo(x,nt),y.stroke(),y.Se(),y instanceof es&&y.ad.classList.add("gojs-td"))}},qt.kk=function(a,y,x){if(!ze.prototype.kk.call(this,a,y,x))return!1;if(Ki(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},qt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:ze.prototype.nk.call(this,a)},qt.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)}},qt.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var et=this.Ae;Ba!==null&&E1!==et&&(E1=Ba.font=et),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var nt;if(isNaN(this.desiredSize.width)){if(et=this.ec.replace(/\r\n/g,`
|
|
`).replace(/\r/g,`
|
|
`),et.length===0)et=8;else if(this.isMultiline){for(var st=nt=0,ht=!1;!ht;){var pt=et.indexOf(`
|
|
`,st);pt===-1&&(pt=et.length,ht=!0),st=et.substr(st,pt-st),this.formatting===Zp&&(st=st.trim()),nt=Math.max(nt,al(st)),st=pt+1}et=nt}else nt=et.indexOf(`
|
|
`,0),0<=nt&&(et=et.substr(0,nt)),et=al(et);et=Math.min(et,a/this.scale)}else et=this.desiredSize.width;if(this.panel!==null&&(et=Math.min(et,this.panel.maxSize.width)),nt=w1(this,et),isNaN(this.desiredSize.height)?nt=Math.min(nt,y/this.scale):nt=this.desiredSize.height,ht=nt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Om&&(y=this.Ae,y=this.overflow===Om?x1(y):0,pt=this.spacingAbove+this.spacingBelow,pt=Math.max(0,Kp(this)+pt),ht=Math.min(this.maxLines-1,Math.max(Math.floor(ht/pt+.01)-1,0)),!(ht+1>=this.Qb.length))){for(this.l|=16777216,pt=this.Qb[ht],y=Math.max(1,a-y);al(pt)>y&&1<pt.length;)pt=pt.substr(0,pt.length-1);pt+=Xp,y=al(pt),this.Qb[ht]=pt,this.Qb=this.Qb.slice(0,ht+1),this.Qc[ht]=y,this.Qc=this.Qc.slice(0,ht+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))&&(et=isNaN(a)?this.Cb:Math.min(a,this.Cb)),et=Math.max(x,et),nt=Math.max(b,nt),ra(this.dc,et,nt),this.Ge(0,0,et,nt),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},qt.eh=function(a,y,x,b){ua(this,a,y,x,b)};function Vp(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 T0(a,y,x,b){var E=a.formatting===Zp;E&&(y=y.trim());var et=0,nt=a.Ae,st=a.spacingAbove+a.spacingBelow;st=Math.max(0,Kp(a)+st);var ht=a.overflow===Om?x1(nt):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,st);else if(nt=y,a.wrap===L0){a.Le=1;var pt=al(y);if(ht===0||pt<=x)a.Cb=Math.max(a.Cb,pt),Vp(a,y,a.Cb),b!==null&&b.h(pt,st);else{for(et=Cd(a,nt),nt=nt.substr(et.length),y=Cd(a,nt),pt=al(et+y);0<y.length&&pt<=x;)et+=y,nt=nt.substr(y.length),y=Cd(a,nt),pt=et+y,E&&(pt=pt.trim()),pt=al(pt);for(E&&(y=y.trim()),et+=y,x=Math.max(1,x-ht);al(et)>x&&1<et.length;)et=et.substr(0,et.length-1);a.l|=16777216,et+=Xp;var yt=al(et);a.Cb=yt,Vp(a,et,yt),b!==null&&b.h(yt,st)}}else{for(ht=0,nt.length===0&&(ht=1,Vp(a,nt,0));0<nt.length;){for(y=Cd(a,nt),nt=nt.substr(y.length);al(y)>x;){var Mt=1;for(pt=al(y.substr(0,Mt)),yt=0;pt<=x;)Mt++,yt=pt,pt=al(y.substr(0,Mt));if(Mt===1){var zt=pt;et=Math.max(et,pt)}else zt=yt,et=Math.max(et,yt);if(Mt--,1>Mt&&(Mt=1),Vp(a,y.substr(0,Mt),zt),ht++,y=y.substr(Mt),a.Gc+ht>a.maxLines)break}for(yt=Cd(a,nt),pt=al(y+yt);0<yt.length&&pt<=x;)y+=yt,nt=nt.substr(yt.length),yt=Cd(a,nt),pt=y+yt,E&&(pt=pt.trim()),pt=al(pt);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),yt.length===0?(Mt=pt,et=Math.max(et,pt)):(Mt=yt=al(y),et=Math.max(et,yt)),Vp(a,y,Mt),ht++,a.Gc+ht>a.maxLines))break}a.Le=Math.min(a.maxLines,ht),a.Cb=Math.max(a.Cb,et),b!==null&&b.h(a.Cb,st*a.Le)}}function Cd(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 al(a){return Ba===null?8*a.length:Ba.measureText(a).width}function Kp(a){if(a.df!==null)return a.df;var y=a.Ae;if(Ba===null){var x=16;return a.df=x}return j0[y]!==void 0&&5e3>k1?x=j0[y]:(x=1.3*Ba.measureText("M").width,j0[y]=x,k1++),a.df=x}function x1(a){if(Ba===null)return 6;if(Fm[a]!==void 0&&5e3>O0)var y=Fm[a];else y=Ba.measureText(Xp).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,Kp(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 et=a.Gc=0,nt,st=!1;!st;){if(nt=x.indexOf(`
|
|
`,et),nt===-1&&(nt=x.length,st=!0),et<=nt){if(et=x.substr(et,nt-et),a.wrap!==L0){a.Le=0;var ht=Cn.alloc();T0(a,et,y,ht),E+=ht.height,Cn.free(ht),a.Gc+=a.Le}else T0(a,et,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(st=!0)}et=nt+1}return a.Lq=E}un.Object.defineProperties(Si.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"||(Bl(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:cn},set:function(a){var y=this.flip;y!==a&&(Bl(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Ou},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Bl(this),this.da.Yr=a,Sa(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Cn.alloc();T0(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),ra(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:A0},set:function(a){var y=this.wrap;y!==a&&(Bl(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:N0},set:function(a){var y=this.overflow;y!==a&&(Bl(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&&Pf(a,"TextBlock.stroke"),a instanceof si&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Kp(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&&(Bl(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&&(Bl(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 ql),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 ql),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 ql),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 ql),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 ql),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&&(Bl(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&&(Bl(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&&(Bl(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&&(Bl(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Zp},set:function(a){var y=this.formatting;y!==a&&(Bl(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&&Ln(a,"> 0",Si,"maxLines"),Bl(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 Nm=null,jm=null,L0=new tn(Si,"None",0),b1=new tn(Si,"WrapFit",1),A0=new tn(Si,"WrapDesiredSize",2),P1=new tn(Si,"WrapBreakAll",3),N0=new tn(Si,"OverflowClip",0),Om=new tn(Si,"OverflowEllipsis",1),Zp=new tn(Si,"FormatTrim",0),C1=new tn(Si,"FormatNone",0),xx=/[ \u200b\u00ad]/,j0=new Hn,k1=0,Fm=new Hn,O0=0,Xp="...",E1="",Ba=null,Dm=!1;Si.className="TextBlock";function F0(){this.nc=!1,this.Hd=null,this.Xf=cn,this.gq=Zp,this.Jq=1/0,this.$q=N0,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Ou,this.$r=A0}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},Si.getEllipsis=function(){return Xp},Si.setEllipsis=function(a){Xp=a,Fm=new Hn,O0=0},Si.getBaseline=function(){return Nm},Si.setBaseline=function(a){Nm=a},Si.getUnderline=function(){return jm},Si.setUnderline=function(a){jm=a},Si.isValidFont=function(a){if(Dm||(Ba=Wi?new Ws(null).context:null,Dm=!0),Ba===null)return!0;var y=Ba.font;if(a===y||a==="10px sans-serif")return!0;Ba.font="10px sans-serif",Ba.font=a;var x=Ba.font;if(x!=="10px sans-serif")return Ba.font=y,!0;Ba.font="19px serif";var b=Ba.font;return Ba.font=a,x=Ba.font,Ba.font=y,x!==b},Si.FormatNone=C1,Si.FormatTrim=Zp,Si.None=L0,Si.OverflowClip=N0,Si.OverflowEllipsis=Om,Si.WrapBreakAll=P1,Si.WrapDesiredSize=A0,Si.WrapFit=b1;function ql(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}ql.prototype.copy=function(){var a=new ql;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},ql.className="GradElementSettings";function Ia(a,y){ze.call(this),this.Eg=null,this.qo="",this.Xg=uu,this.Nk=pn,this.Zg=this.Hd=null,this.Mk=Dr,this.Xf=cn,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 kd;$e(Ia,ze),Ia.prototype.cloneProtected=function(a){ze.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},Ia.prototype.qb=function(a){a===cn||a===Vn||a===Wr?this.imageStretch=a:ze.prototype.qb.call(this,a)},Ia.prototype.toString=function(){return"Picture("+this.source+")#"+mi(this)};function Ed(a){a===void 0&&(a=""),a!==""?kd[a]&&(delete kd[a],Bm--):(kd=new Hn,Bm=0)}function M1(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 et=y.getAttribute("src")||"",nt=E.Og.I(et);if(nt!==null)for(var st=nt.length,ht=0;ht<st;ht++)et=nt[ht],E.Xn.add(et),et.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),et.Zg!==null&&et.Zg(et,x))}y.Bg.clear()}a.desiredSize.w()||(ho(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,et=y.getAttribute("src")||"",nt=E.Og.I(et);if(nt!==null){E=nt.length,et=Fn();for(var st=0;st<E;st++)et.push(nt[st]);if(y.hn)for(st=0;st<E;st++)nt=et[st],nt.Hd!==null&&nt.Hd(nt,x);Bn(et)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}Ia.prototype.hA=function(){if(this.source!==""){Ed(this.source);var a=this.source;this.source="",this.source=a}},Ia.prototype.redraw=function(){this.N(),this.Uc=!0},Ia.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 jc)){var E=a instanceof es;b=this.naturalBounds;var et=0,nt=0,st=this.qn,ht=st?+x.width:x.naturalWidth;if(st=st?+x.height:x.naturalHeight,ht===void 0&&x.videoWidth&&(ht=x.videoWidth),st===void 0&&x.videoHeight&&(st=x.videoHeight),ht=ht||b.width,st=st||b.height,ht!==0&&st!==0){var pt=ht,yt=st;this.sourceRect.w()&&(et=this.Xg.x,nt=this.Xg.y,ht=this.Xg.width,st=this.Xg.height);var Mt=ht,zt=st,Zt=this.Nk,Qt=this.Mk;switch(Zt){case cn:if(this.sourceRect.w())break;Mt>=b.width&&(et=et+Qt.offsetX+(Mt*Qt.x-b.width*Qt.x)),zt>=b.height&&(nt=nt+Qt.offsetY+(zt*Qt.y-b.height*Qt.y)),ht=Math.min(b.width,Mt),st=Math.min(b.height,zt);break;case pn:Mt=b.width,zt=b.height;break;case Vn:case Wr:Zt===Vn?(Zt=Math.min(b.height/zt,b.width/Mt),Mt*=Zt,zt*=Zt):Zt===Wr&&(Zt=Math.max(b.height/zt,b.width/Mt),Mt*=Zt,zt*=Zt,Mt>=b.width&&(et=(et+Qt.offsetX+(Mt*Qt.x-b.width*Qt.x)/Mt)*ht),zt>=b.height&&(nt=(nt+Qt.offsetY+(zt*Qt.y-b.height*Qt.y)/zt)*st),ht*=1/(Mt/b.width),st*=1/(zt/b.height),Mt=b.width,zt=b.height)}Zt=this.Df()*y.scale;var ie=Mt*Zt*zt*Zt,Ee=ht*st/ie,we=x.__goCache;Zt=null;var je=wx;if(!E){if(x.sq&&we!==void 0&&4<ie&&Ee>je*je)for(we.gi===null&&(L1(we,4,pt,yt,x),L1(we,16,pt,yt,x)),E=we.gi,pt=E.length,yt=0;yt<pt&&E[yt].ratio*E[yt].ratio<Ee;yt++)Zt=E[yt];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new Ws(null).context;try{E.drawImage(this.Eg,0,0)}catch(Fe){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Fe){this.vl=!0}}if(this.vl)return}}switch(E=Mt<b.width?Qt.offsetX+(b.width*Qt.x-Mt*Qt.x):0,Qt=zt<b.height?Qt.offsetY+(b.height*Qt.y-zt*Qt.y):0,this.flip){case Xr:a.translate(Math.min(b.width,Mt),0),a.scale(-1,1);break;case Fr:a.translate(0,Math.min(b.height,zt)),a.scale(1,-1);break;case ci:a.translate(Math.min(b.width,Mt),Math.min(b.height,zt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&we!==void 0&&Zt!==null&&Zt.ratio!==1){a.save(),y=Zt.ratio;try{a.drawImage(Zt.source,et/y,nt/y,Math.min(Zt.source.width,ht/y),Math.min(Zt.source.height,st/y),E,Qt,Math.min(b.width,Mt),Math.min(b.height,zt)),a instanceof es&&(this.bt=[et/y,nt/y,Math.min(Zt.source.width,ht/y),Math.min(Zt.source.height,st/y),E,Qt,Math.min(b.width,Mt),Math.min(b.height,zt)])}catch(Fe){this.en=!1}a.restore()}else try{a.drawImage(x,et,nt,ht,st,E,Qt,Math.min(b.width,Mt),Math.min(b.height,zt)),a instanceof es&&(this.bt=[et,nt,ht,st,E,Qt,Math.min(b.width,Mt),Math.min(b.height,zt)])}catch(Fe){this.en=!1}switch(this.flip){case Xr:a.scale(-1,1),a.translate(-Math.min(b.width,Mt),0);break;case Fr:a.scale(1,-1),a.translate(0,-Math.min(b.height,zt));break;case ci:a.scale(-1,-1),a.translate(-Math.min(b.width,Mt),-Math.min(b.height,zt))}}}}},Ia.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,et=Da(this,!0),nt=this.Eg,st=this.qn,ht=0,pt=0;(st||!this.al&&nt&&nt.complete)&&(this.al=!0),nt===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(ht=st?+nt.width:nt.naturalWidth,pt=st?+nt.height:nt.naturalHeight),isFinite(E.width)||et===pn||et===qn?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:nt!==null&&(a=ht)),x=0):nt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ht),isFinite(E.height)||et===pn||et===ar?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:nt!==null&&(y=pt)),b=0):nt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:pt),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,et=this.minSize,x=Math.max(x||0,et.width),b=Math.max(b||0,et.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),nt===null||nt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),ra(this.dc,a,y),this.Ge(0,0,a,y)},Ia.prototype.eh=function(a,y,x,b){ua(this,a,y,x,b)},un.Object.defineProperties(Ia.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||Oe("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Mp(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new gn),b!==null&&x&&Bh(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()||(ho(this,!1),this.v())):x&&M1(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=kd;if(Wi){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Bm&&(Ed(),x=kd),b=Nn("img"),b.hn=!0,M1(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 T1),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}}}),Ia.prototype.redraw=Ia.prototype.redraw,Ia.prototype.reloadSource=Ia.prototype.hA;var Bm=0,wx=4;Ia.className="Picture",kd=new Hn,Ia.clearCache=Ed;function T1(){this.gi=null}function L1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var et=new Ws(null),nt=et.context,st=1/y;et.width=x/y,et.height=b/y,et.width!==0&&et.height!==0&&(y=new A1(et.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),nt.setTransform(st*x,0,0,st*x,0,0),nt.yc(),nt.drawImage(E,0,0),a.gi.push(y))}T1.className="PictureCacheArray";function A1(a,y){this.source=a,this.ratio=y}A1.className="PictureCacheInstance";function Md(){this.os=new bn,this.mc=null}Md.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new bn,this.mc=null};function Td(a,y,x,b,E,et){a.mc=new wo,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=et||!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()}Md.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new ti(bo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},Md.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new ti(ki);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function rh(a,y,x,b,E,et,nt){var st;st===void 0&&(st=!1);var ht=new ti(Wo);ht.point1X=y,ht.point1Y=x,ht.point2X=b,ht.point2Y=E,ht.endX=et,ht.endY=nt,st&&ht.close(),a.mc.segments.add(ht)}function Im(a,y,x,b,E){var et;et===void 0&&(et=!1);var nt=new ti(cs);nt.point1X=y,nt.point1Y=x,nt.endX=b,nt.endY=E,et&&nt.close(),a.mc.segments.add(nt)}Md.prototype.arcTo=function(a,y,x,b,E,et,nt){et===void 0&&(et=0),nt===void 0&&(nt=!1);var st=new ti(ao);st.startAngle=a,st.sweepAngle=y,st.centerX=x,st.centerY=b,st.radiusX=E,st.radiusY=et!==0?et:E,nt&&st.close(),this.mc.segments.add(st)};function Px(a,y,x,b,E,et,nt,st){var ht;ht===void 0&&(ht=!1),y=new ti(Cs,nt,st,y,x,b,E,et),ht&&y.close(),a.mc.segments.add(y)}function N1(a){var y=Rm;return y!==null?(Rm=null,y.reset(a),y):(y=new Md,y.reset(a),y)}var Rm=null;Md.className="StreamGeometryContext";function ea(a,y){var x=a.toLowerCase(),b=Ge.Ze;b[a]=y,b[x]=a}ea("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Ge.Mf[a];return b!==void 0||(b=new bn(bn.u),b.endX=y,b.endY=x,Ge.Nf<Ge.vm&&(Ge.Mf[a]=b,Ge.Nf++)),b}),ea("Square",function(a,y,x){a="s"+y+","+x;var b=Ge.Mf[a];return b!==void 0||(b=new bn(bn.u),b.endX=y,b.endY=x,b.defaultStretch=Vn,Ge.Nf<Ge.vm&&(Ge.Mf[a]=b,Ge.Nf++)),b}),ea("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=Ge.Mf[b];if(E!==void 0)return E;var et=a*Ge.wg;return E=new bn().add(new wo(a,0,!0).add(new ti(ki,y-a,0)).add(new ti(Wo,y,a,y-et,0,y,et)).add(new ti(ki,y,x-a)).add(new ti(Wo,y-a,x,y,x-et,y-et,x)).add(new ti(ki,a,x)).add(new ti(Wo,0,x-a,et,x,0,x-et)).add(new ti(ki,0,a)).add(new ti(Wo,a,0,0,et,et,0).close())),1<et&&(E.spot1=new rr(0,0,et,et),E.spot2=new rr(1,1,-et,-et)),Ge.Nf<Ge.vm&&(Ge.Mf[b]=E,Ge.Nf++),E}),ea("Border","RoundedRectangle"),ea("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Ge.Mf[a];return b!==void 0||(b=new bn(bn.F),b.endX=y,b.endY=x,b.spot1=cc,b.spot2=Du,Ge.Nf<Ge.vm&&(Ge.Mf[a]=b,Ge.Nf++)),b}),ea("Circle",function(a,y,x){a="c"+y+","+x;var b=Ge.Mf[a];return b!==void 0||(b=new bn(bn.F),b.endX=y,b.endY=x,b.spot1=cc,b.spot2=Du,b.defaultStretch=Vn,Ge.Nf<Ge.vm&&(Ge.Mf[a]=b,Ge.Nf++)),b}),ea("TriangleRight",function(a,y,x){return new bn().add(new wo(0,0).add(new ti(ki,y,.5*x)).add(new ti(ki,0,x).close())).pm(0,.25,.5,.75)}),ea("TriangleDown",function(a,y,x){return new bn().add(new wo(0,0).add(new ti(ki,y,0)).add(new ti(ki,.5*y,x).close())).pm(.25,0,.75,.5)}),ea("TriangleLeft",function(a,y,x){return new bn().add(new wo(y,x).add(new ti(ki,0,.5*x)).add(new ti(ki,y,0).close())).pm(.5,.25,1,.75)}),ea("TriangleUp",function(a,y,x){return new bn().add(new wo(y,x).add(new ti(ki,0,x)).add(new ti(ki,.5*y,0).close())).pm(.25,.5,.75,1)}),ea("Triangle","TriangleUp"),ea("Diamond",function(a,y,x){return new bn().add(new wo(.5*y,0).add(new ti(ki,0,.5*x)).add(new ti(ki,.5*y,x)).add(new ti(ki,y,.5*x).close())).pm(.25,.25,.75,.75)}),ea("LineH",function(a,y,x){return a=new bn(bn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),ea("LineV",function(a,y,x){return a=new bn(bn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),ea("None","Rectangle"),ea("BarH","Rectangle"),ea("BarV","Rectangle"),ea("MinusLine","LineH"),ea("PlusLine",function(a,y,x){return new bn().add(new wo(0,x/2,!1).add(new ti(ki,y,x/2)).add(new ti(bo,y/2,0)).add(new ti(ki,y/2,x)))}),ea("XLine",function(a,y,x){return new bn().add(new wo(0,x,!1).add(new ti(ki,y,0)).add(new ti(bo,0,0)).add(new ti(ki,y,x)))}),ea("LineRight",function(a,y,x){return new bn().add(new wo(.25*y,0,!1).add(new ti(ki,.75*y,.5*x)).add(new ti(ki,.25*y,x)))}),ea("LineDown",function(a,y,x){return new bn().add(new wo(0,.25*x,!1).add(new ti(ki,.5*y,.75*x)).add(new ti(ki,y,.25*x)))}),ea("LineLeft",function(a,y,x){return new bn().add(new wo(.75*y,0,!1).add(new ti(ki,.25*y,.5*x)).add(new ti(ki,.75*y,x)))}),ea("LineUp",function(a,y,x){return new bn().add(new wo(0,.75*x,!1).add(new ti(ki,.5*y,.25*x)).add(new ti(ki,y,.75*x)))}),Ge.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=Bo,this.ir=null,this.jr="",this.lr=jo,this.Gq="",this.Hq=ni,this.Pq=so,this.Kq=Ji,this.Up=null,this.Cq=127,this.zr=Zi,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 nr(a,y){a===void 0||a instanceof yo||typeof a=="string"?vn.call(this,a):(vn.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 Le(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new on,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}$e(nr,vn),nr.prototype.cloneProtected=function(a){vn.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},qt=nr.prototype,qt.Af=function(a){vn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},qt.toString=function(){var a=Un(this.constructor)+"#"+mi(this);return this.data!==null&&(a+="("+cr(this.data)+")"),a};function Ra(a){a.P===null?a.P=new D0:a.P.nc&&(a.P=a.P.copy())}qt.th=function(){vn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},qt.gk=function(a,y,x,b,E,et,nt){var st=this.diagram;st!==null&&(a===$i&&y==="elements"?E instanceof vn?Oc(E,function(ht){ly(st.partManager,ht),kc(st,ht)}):Bh(st,E):a===vo&&y==="elements"&&(E instanceof vn?Oc(E,function(ht){uy(st.partManager,ht,st)}):Mp(st,E)),st.cb(a,y,x,b,E,et,nt))},qt.La=function(a){if(vn.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 vn&&Oc(E,function(et){et.data!==null&&et.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},nr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},nr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},nr.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 $n),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)))}}},nr.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)}},nr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Fn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Bn(y)}},nr.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}t:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof Pr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof qr))break t;Hs(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=vn.Link),x.adornedObject=y)}if(x!==null){x.type===vn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},nr.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(zh(a)===!1){R0(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function j1(a){if(a.G|=2097152,zh(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=on.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),on.free(b),R0(a,!1)}}nr.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new xr);var et=this.Lb;et.reset(),this.no(et,a,y,x,b),this.Lb=et,et.ws()||et.pp(E)},nr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var et=Dr;this.locationSpot.sb()&&(et=this.locationSpot);var nt=Le.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,nt.yi(x.x,x.y,x.width,x.height,et),y.Lb!==null&&y.Lb.Ga(nt),nt.offset(-y.measuredBounds.x,-y.measuredBounds.y),et=y.panel;et!==null&&et!==this;)et.Lb!==null&&et.Lb.Ga(nt),nt.offset(-et.measuredBounds.x,-et.measuredBounds.y),et=et.panel;else nt.yi(y,x,b,E,et);a.rotate(this.Kb,nt.x,nt.y),Le.free(nt)}},nr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},nr.prototype.moveTo=function(a,y,x){a=Le.allocAt(a,y),this.move(a,x),Le.free(a)},nr.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())},nr.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())},nr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new $n),y.I(a)!==null)return y.I(a);var x=vn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function ih(a,y,x,b){b===void 0&&(b=new Le),x=x.Mc()?Dr: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}nr.prototype.mi=function(a){return a===void 0&&(a=new on),a.assign(this.actualBounds)},nr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=Le.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof Lr?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 Bc(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 et=y.width;y=y.height;var nt=a.shadowBlur;return a=a.shadowOffset,et+=nt,y+=nt,b-=nt/2,E-=nt/2,0<a.x?et+=a.x:(b+=a.x,et-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,et+2,y+2),x}nr.prototype.arrange=function(){if(xa(this)===!1)j1(this);else{Yl(this,!1);var a=this.Ib,y=on.alloc();y.assign(a);var x=Gh(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()||Ge.B(y.width,a.width)&&Ge.B(y.height,a.height)||0<=this.vw&&this.C(16),on.free(y),R0(this,!1)}},qt=nr.prototype,qt.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=on.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),on.free(E)}!(this.G&65536)&&a.D(y)||R1(this,b,x),x.N(),!a.w()&&!y.w()||Hi(a,y)||(this instanceof Mn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},qt.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 Le(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),zh(this)===!1&&xa(this)===!1&&(_m(this),j1(this)),!0};function F1(a,y,x,b,E){y===null||a instanceof qr||(y=y.animationManager,y.zb&&qf(y,a,new Le(b,E),x))}qt.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;zh(this)||xa(this)?E.h(NaN,NaN):E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}else{if(E.x===a&&E.y===y)return;b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}_m(this)},qt.Av=function(){this.G&=-2097153,_m(this)};function D1(a,y,x){var b=O1(a),E=a.diagram,et=x.w(),nt=y.w();et&&nt?a.G&2097152?B1(a,y,x,E,b):I1(a,y,x,E,b):et?B1(a,y,x,E,b):nt&&I1(a,y,x,E,b),a.G|=2097152,Le.free(b),a.Uk()}function B1(a,y,x,b,E){var et=y.x,nt=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 qr||qf(x,a,new Le(et,nt),y),b||y.x===et&&y.y===nt||a.g("position",new Le(et,nt),y.copy()))}function I1(a,y,x,b,E){var et=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(et)||b===null||a.g("location",et,x.copy())}function R1(a,y,x){_0(a,!1),a instanceof Mn&&Qu(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?Gh(a)?(Ml(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}qt.si=function(){return!0},qt.Zc=function(){return!0},qt.ph=function(){return!1},qt.Dd=function(){return!0};function I0(a,y,x,b){y.constructor===a.constructor||G1||(G1=!0,An('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),An(" Old class: "+Un(a.constructor)+", new class: "+Un(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var et=a.isSelected,nt=a.isHighlighted,st=!0,ht=!0,pt=!1;a instanceof Mn&&(st=a.isTreeLeaf,ht=a.isTreeExpanded,pt=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=et?a.G|4096:a.G&-4097,a.G=nt?a.G|524288:a.G&-524289,a instanceof Mn&&(a.U=st?a.U|4:a.U&-5,a.U=ht?a.U|1:a.U&-2,a.U=pt?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)}nr.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},nr.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},nr.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},nr.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},nr.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},nr.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},nr.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},nr.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},nr.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 zh(a){return(a.G&32768)!==0}function R0(a,y){a.G=y?a.G|32768:a.G&-32769}function _0(a,y){a.G=y?a.G|65536:a.G&-65537}function Gh(a){return(a.G&131072)!==0}qt=nr.prototype,qt.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}qt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},qt.N=function(){var a=this.diagram;a!==null&&!xa(this)&&!zh(this)&&this.isVisible()&&this.Ib.w()&&a.N(Bc(this,this.Ib))},qt.v=function(){vn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Mn&&this.labeledLink!==null&&Sa(this.labeledLink),a.$b(!0))},qt.Vo=function(a){a||(a=this.Ah,a!==null&&V0(a,this))},qt.Wo=function(a){a||(a=this.Ah,a!==null&&K0(a,this))},qt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},qt.oz=function(){return z0(this,this)};function z0(a,y){var x=y.containingGroup;return x!==null?1+z0(a,x):y instanceof Mn&&(y=y.labeledLink,y!==null)?z0(a,y):0}qt.sz=function(){return _1(this,this)};function _1(a,y){var x=y.containingGroup;return x!==null||y instanceof Mn&&(x=y.labeledLink,x!==null)?_1(a,x):y}qt.Td=function(a){return a instanceof Pr?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 Mn&&(y=y.labeledLink,y!==null)?G0(a,y,x):!1:!0}qt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Pr&&zm(y,!0),y instanceof Mn){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 Mn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Pr&&zm(y,!1),y instanceof Mn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},nr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Mn&&this.isLinkLabel)},nr.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 Mn&&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 Uh(a,y,x,b,E,et){if(et===void 0&&(et=null),!(a.contains(y)||et!==null&&!et(y)||y instanceof qr)){if(a.add(y),y instanceof Mn){if(x&&y instanceof Pr)for(var nt=y.memberParts;nt.next();)Uh(a,nt.value,x,b,E,et);if(E!==!1)for(nt=y.linksConnected;nt.next();){var st=nt.value;if(!a.contains(st)){var ht=st.fromNode,pt=st.toNode;ht=ht===null||a.contains(ht),pt=pt===null||a.contains(pt),(E?ht&&pt:ht||pt)&&Uh(a,st,x,b,E,et)}}if(1<b)for(y=y.Ou();y.next();)Uh(a,y.value,x,b-1,E,et)}else if(y instanceof Pn)for(y=y.labelNodes;y.next();)Uh(a,y.value,x,b,E,et)}}un.Object.defineProperties(nr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Hr: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(vo,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb($i,"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&&(Ra(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&&nd(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 qr?this.type!==vn.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:so},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Ra(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Ji},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Ra(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&&(Ra(this),this.P.Gq=a,this.nf=null,this.v(),this.g("locationObjectName",y,a))}},locationSpot:{get:function(){return this.P!==null?this.P.Hq:ni},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Ra(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,b=this.ke;if(!(b.x===y||isNaN(b.x)&&isNaN(y))||!(b.y===x||isNaN(b.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,xa(this)===!1&&(_m(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var et=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),F1(this,E,x,et.x,et.y),this.g("position",et,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 qr)){var et=x.model.undoManager;et.isEnabled&&!et.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof qr?this instanceof qr&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(et=x.model,et.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Hs(x),x=x.copy(),x!==null&&I0(this,x,y,a))):(et!==null&&et.jm(b,a),x=fS(x.partManager,b,a),x!==null&&(Hs(x),x=x.copy(),x===null||x instanceof Pn||(b=this.location.copy(),I0(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){I0(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(Ra(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&&(Ra(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&&(Ra(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&&(Ra(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&&(Ra(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&&(Ra(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:Bo},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Ra(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&&(Ra(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&&(Ra(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:jo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Ra(this),this.P.lr=a,this.g("rotationSpot",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;y!==a&&(this.ec=a,this.g("text",y,a))}},containingGroup:{get:function(){return this.Ah},set:function(a){if(this.Zc()){var y=this.Ah;if(y!==a){a===null||this!==a&&!a.Td(this)||(this===a&&Oe("Cannot make a Group a member of itself: "+this.toString()),Oe("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?K0(y,this):this instanceof Pr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?V0(a,this):this instanceof Pr&&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 et=E.wa(a!==null?a.data:null);E.mp(b,et)}}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 Pr){for(x=new gn,Uh(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Mn)for(b=b.linksConnected;b.next();)Ld(b.value)}if(this instanceof Mn){for(x=this.linksConnected;x.next();)Ld(x.value);x=this.labeledLink,x!==null&&Ld(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&nd(y,-1,a))}}else Oe("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(a){var y=this.containingGroupChanged;y!==a&&(Ra(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Mn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Ra(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&&(Ra(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Zi},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Ra(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&&(Ra(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&&(Ra(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),nr.prototype.invalidateLayout=nr.prototype.C,nr.prototype.findCommonContainingGroup=nr.prototype.px,nr.prototype.isMemberOf=nr.prototype.Td,nr.prototype.findTopLevelPart=nr.prototype.sz,nr.prototype.findSubGraphLevel=nr.prototype.oz,nr.prototype.ensureBounds=nr.prototype.Va,nr.prototype.getDocumentBounds=nr.prototype.mi,nr.prototype.findObject=nr.prototype.fb,nr.prototype.moveTo=nr.prototype.moveTo,nr.prototype.invalidateAdornments=nr.prototype.Wb,nr.prototype.clearAdornments=nr.prototype.Ej,nr.prototype.removeAdornment=nr.prototype.Jf,nr.prototype.addAdornment=nr.prototype.bh,nr.prototype.findAdornment=nr.prototype.Pj,nr.prototype.updateTargetBindings=nr.prototype.La;var G1=!1;nr.className="Part",nr.LayoutNone=0,nr.LayoutAdded=1,nr.LayoutRemoved=2,nr.LayoutShown=4,nr.LayoutHidden=8,nr.LayoutNodeSized=16,nr.LayoutGroupLayout=32,nr.LayoutNodeReplaced=64,nr.LayoutStandard=127,nr.LayoutAll=16777215;function qr(a,y){a===void 0||a instanceof yo||typeof a=="string"?nr.call(this,a):(nr.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)}$e(qr,nr),qr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},qr.prototype.updateRelationshipsFromData=function(){},qr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Pn&&y instanceof Lr){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 Lr&&(E.ua=a)}}},qr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!xa(a))},qr.prototype.Zc=function(){return!1},qr.prototype.gk=function(a,y,x,b,E,et,nt){if(a===$i&&y==="elements"){if(E instanceof ba)this.$a===null&&(this.$a=E);else if(E instanceof vn){var st=E.Nl(function(ht){return ht instanceof ba});st instanceof ba&&this.$a===null&&(this.$a=st)}}else a===vo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof vn&&this.$a.rg(b)&&(this.$a=null));nr.prototype.gk.call(this,a,y,x,b,E,et,nt)},qr.prototype.updateAdornments=function(){},qr.prototype.Lj=function(){},un.Object.defineProperties(qr.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}}}),qr.className="Adornment";function U0(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Xo,this.er=Wm,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 Mn(a,y){a===void 0||a instanceof yo||typeof a=="string"?nr.call(this,a):(nr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new mn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}$e(Mn,nr),Mn.prototype.cloneProtected=function(a){nr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},qt=Mn.prototype,qt.Af=function(a){nr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function oh(a){a.Ba===null?a.Ba=new U0:a.Ba.nc&&(a.Ba=a.Ba.copy())}qt.th=function(){nr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new gn),a.af.add(y))}function W1(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var et=E.value;if(et.Ds===a&&et.cv===y&&et.Ox===x&&et.Px===b||et.Ds===y&&et.cv===a&&et.Ox===b&&et.Px===x)return et}return null}qt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},qt.gk=function(a,y,x,b,E,et,nt){a===$i&&y==="elements"?this.wc=null:a===vo&&y==="elements"&&(this.wc=null),nr.prototype.gk.call(this,a,y,x,b,E,et,nt)},qt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(ns(x.fromPort),ns(x.toPort),x.bb())}};function H1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(ns(x.fromPort),ns(x.toPort),x.bb())}}function ns(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||ns(y.port)}}qt.si=function(){return!0},Mn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Mn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Mn.prototype.isVisible=function(){if(!nr.prototype.isVisible.call(this))return!1;var a=!0,y=qu,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===qu){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===uo){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===pd&&(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},Mn.prototype.Zb=function(a){nr.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)}},Mn.prototype.qx=function(){var a=new gn,y=new gn;return V1(this,this,a,y),y.iterator};function V1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,et=a.diagram;et!==null&&(E=et.isTreePathToChildren),y.linksConnected.each(function(nt){nt.isTreeLink?(E?nt.fromNode===y:nt.toNode===y)&&V1(a,E?nt.toNode:nt.fromNode,x,b):b.add(nt)})}}Mn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new ei(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},qt=Mn.prototype,qt.Mo=function(a){a===void 0&&(a=null);var y=new ei(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},qt.Sd=function(a){a===void 0&&(a=null);var y=new ei(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},qt.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 gn,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 gn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Qr(x):Hr},qt.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 gn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Qr(x):Hr},qt.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 gn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Qr(x):Hr},qt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new ei(this.jb),E=this;return b.predicate=function(et){return!((et.fromNode!==E||et.toNode!==a||y!==null&&et.fromPortId!==y||x!==null&&et.toPortId!==x)&&(et.fromNode!==a||et.toNode!==E||x!==null&&et.fromPortId!==x||y!==null&&et.toPortId!==y))},b},qt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new ei(this.jb),E=this;return b.predicate=function(et){return!(et.fromNode!==E||et.toNode!==a||y!==null&&et.fromPortId!==y||x!==null&&et.toPortId!==x)},b};function Gm(a,y,x){ns(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 et=!0,nt=a.diagram;nt!==null&&(et=nt.aa,nt.aa=!0),E(a,y,x),nt!==null&&(nt.aa=et)}}!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,et=b?x:y,E.ci||(E.ci=et),!et.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===et&&(et.isTreeLeaf=!1):y===et&&(et.isTreeLeaf=!1))))}function Um(a,y,x){ns(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var et=a.linkDisconnected;if(E=a.diagram,et!==null){var nt=!0;E!==null&&(nt=E.aa,E.aa=!0),et(a,y,x),E!==null&&(E.aa=nt)}}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)):Yp(y)))}function Yp(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}}}Mn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},qt=Mn.prototype,qt.Vo=function(a){nr.prototype.Vo.call(this,a),a||(Yp(this),a=this.Yk,a!==null&&tS(a,this))},qt.Wo=function(a){nr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},qt.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,nr.prototype.Lj.call(this)},qt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;K1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function K1(a){a.wc===null?a.wc=new $n: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 W0(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=Fn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Bn(x)}}}qt.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},qt.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}},qt.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},qt.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},qt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Mn)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},qt.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 gn;return a(this,y),y},qt.uz=function(){return X1(this,this)};function X1(a,y){return y=y.pg(),y===null?0:1+X1(a,y)}qt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new ei(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},qt.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 mn,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 mn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Qr(x):Hr},qt.wz=function(a){a===void 0&&(a=1/0);var y=new gn;return Uh(y,this,!1,a,!0),y},Mn.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 gn;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===qu),y.Ue=!1}};function Y1(a,y,x,b,E,et,nt){if(1<b)for(var st=x?a.Mo():a.Sd();st.next();){var ht=st.value;ht.isTreeLink&&(ht=ht.To(a),ht===null||ht===a||y.contains(ht)||(y.add(ht),Y1(ht,y,x,b-1,E,et,nt)))}else J1(a,y,x,E,et,nt)}function J1(a,y,x,b,E,et){for(var nt=E===a?!0:a.isTreeExpanded,st=x?a.Mo():a.Sd(),ht={};st.next();){var pt=st.value;if(pt.isTreeLink&&(pt=pt.To(a),pt!==null&&pt!==a)){var yt=y.contains(pt);if(yt||y.add(pt),nt){var Mt=x?pt.Oo():pt.Po();ht.uv=a,Mt.all(function(zt){return function(Zt){return Zt===zt.uv||!Zt.isTreeExpanded}}(ht))&&b.Aj(pt,E),pt.oh(),pt.Zb(!1)}pt.isTreeExpanded&&(pt.wasTreeExpanded=pt.isTreeExpanded,yt||J1(pt,y,x,b,E,et))}ht={uv:ht.uv}}a.isTreeExpanded=!1}Mn.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 gn;x.add(this),Q1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===qu),y.Ue=!1}};function Q1(a,y,x,b,E,et,nt){for(var st=et===a?!1:a.isTreeExpanded,ht=x?a.Mo():a.Sd(),pt={};ht.next();){var yt=ht.value;if(yt.isTreeLink&&(st||yt.fd||yt.bb(),yt=yt.To(a),yt!==null&&yt!==a&&!y.contains(yt))){if(y.add(yt),!st){yt.Zb(!0),yt.oh();var Mt=x?yt.Oo():yt.Po();pt.vv=a,Mt.all(function(zt){return function(Zt){return Zt===zt.vv||!Zt.isTreeExpanded}}(pt))&&E.Cj(yt,et)}(2<b||yt.wasTreeExpanded)&&(yt.wasTreeExpanded=!1,Q1(yt,y,x,b-1,E,et,nt))}pt={vv:pt.vv}}a.isTreeExpanded=!0}un.Object.defineProperties(Mn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Wm},set:function(a){var y=this.portSpreading;y!==a&&(oh(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&&Qu(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Xo},set:function(a){typeof a=="number"&&(a=new Br(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),oh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Qu(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&&(oh(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&&(oh(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&&(oh(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,et=x.model;if(E!==null&&et.ri()){var nt=et.wa(b);nt!==void 0&&et.Qx(E,nt)}}this.containingGroup=null}this.Yk=a,a!==null&&(tS(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),Sa(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&K1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(oh(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))}}}),Mn.prototype.expandTree=Mn.prototype.expandTree,Mn.prototype.collapseTree=Mn.prototype.collapseTree,Mn.prototype.findTreeParts=Mn.prototype.wz,Mn.prototype.findTreeChildrenNodes=Mn.prototype.Ou,Mn.prototype.findTreeChildrenLinks=Mn.prototype.Qo,Mn.prototype.findTreeLevel=Mn.prototype.uz,Mn.prototype.findTreeParentChain=Mn.prototype.vz,Mn.prototype.findTreeParentNode=Mn.prototype.pg,Mn.prototype.findTreeParentLink=Mn.prototype.kh,Mn.prototype.findCommonTreeParent=Mn.prototype.gz,Mn.prototype.findTreeRoot=Mn.prototype.xz,Mn.prototype.isInTreeOf=Mn.prototype.Nz,Mn.prototype.findPort=Mn.prototype.ns,Mn.prototype.findLinksTo=Mn.prototype.kz,Mn.prototype.findLinksBetween=Mn.prototype.jz,Mn.prototype.findNodesInto=Mn.prototype.Oo,Mn.prototype.findNodesOutOf=Mn.prototype.Po,Mn.prototype.findNodesConnected=Mn.prototype.Mu,Mn.prototype.findLinksInto=Mn.prototype.Sd,Mn.prototype.findLinksOutOf=Mn.prototype.Mo,Mn.prototype.findExternalTreeLinksConnected=Mn.prototype.qx,Mn.prototype.invalidateConnectedLinks=Mn.prototype.Bd,Mn.prototype.invalidateLinkBundle=Mn.prototype.Lz;var kx=new tn(Mn,"SpreadingNone",10),Wm=new tn(Mn,"SpreadingEvenly",11),H0=new tn(Mn,"SpreadingPacked",12);Mn.className="Node",Mn.SpreadingNone=kx,Mn.SpreadingEvenly=Wm,Mn.SpreadingPacked=H0;function Pr(a,y){a===void 0||a instanceof yo||typeof a=="string"?Mn.call(this,a):(Mn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new gn,this.$a=null,this.Sc=new ji,this.Sc.group=this,this.gl=new gn,this.tb=this.$p=null,y&&Object.assign(this,y)}$e(Pr,Mn),Pr.prototype.cloneProtected=function(a){Mn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof ba});y instanceof ba?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())},qt=Pr.prototype,qt.Af=function(a){Mn.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 Mn)x.Bd(y);else if(x instanceof Pn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},qt.gk=function(a,y,x,b,E,et,nt){if(a===$i&&y==="elements"){if(E instanceof ba)this.$a===null?this.$a=E:this.$a!==E&&Oe("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof vn){var st=E.Nl(function(ht){return ht instanceof ba});st instanceof ba&&(this.$a===null?this.$a=st:this.$a!==st&&Oe("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===vo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof vn&&this.$a.rg(b)&&(this.$a=null));Mn.prototype.gk.call(this,a,y,x,b,E,et,nt)},qt.Xl=function(a,y){Mn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==vn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof vn&&(a=a.Pb()),this.tb===null&&(this.tb=new on),a.mi(this.tb),a instanceof Lr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},qt.eh=function(a,y,x,b){this.nf=this.$a,Mn.prototype.eh.call(this,a,y,x,b)},qt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Pn||y.Va()}),Mn.prototype.Va.call(this)},qt.si=function(){if(!Mn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Mn){if(y.isVisible()&&xa(y))return!1}else if(y instanceof Pn&&y.isVisible()&&xa(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function V0(a,y){if(a.Gn.add(y)){y instanceof Pr&&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 K0(a,y){if(a.Gn.remove(y)){y instanceof Pr&&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())}qt.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)}Mn.prototype.Lj.call(this)},Pr.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},Pr.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},Pr.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))},qt=Pr.prototype,qt.Bd=function(a){var y=(this.U&65536)!==0;if(Mn.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()?(ns(x.fromPort),ns(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(ns(x.fromPort),ns(x.toPort),x.bb()))}}},qt.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 gn,b=y.iterator;b.next();){var E=b.value;if(E instanceof Mn)for(E=E.linksConnected;E.next();){var et=E.value;y.contains(et)||x.add(et)}}return a&&(this.$p=x),x.iterator},qt.iz=function(){var a=this.Rj();a.add(this);for(var y=new gn,x=a.iterator;x.next();){var b=x.value;if(b instanceof Mn)for(b=b.linksConnected;b.next();){var E=b.value,et=E.fromNode;et===null||a.contains(et)&&et!==this||y.add(et),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},qt.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new gn;return a(this,y),y},qt.Rj=function(){var a=new gn;return Uh(a,this,!0,0,!0),a.remove(this),a},qt.Zb=function(a){Mn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Pr.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 et=E.value;if(et.Zb(!1),et instanceof Pr&&et.isSubGraphExpanded&&(et.wasSubGraphExpanded=et.isSubGraphExpanded,$1(et,y,x,b)),et instanceof Mn)et.Bd(y),x.Aj(et,b);else if(et instanceof Pn)for(et=et.labelNodes;et.next();)et.value.Bd(y)}a.isSubGraphExpanded=!1}Pr.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 et=E.value;if(et.Zb(!0),et instanceof Pr&&et.wasSubGraphExpanded&&(et.wasSubGraphExpanded=!1,q1(et,y,x,b)),et instanceof Mn)et.Bd(y),x.Cj(et,b);else if(et instanceof Pn)for(et=et.labelNodes;et.next();)et.value.Bd(y)}a.isSubGraphExpanded=!0}Pr.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,et=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===et||isNaN(x)&&isNaN(et))){for(b=E-(isNaN(b)?0:b),x=et-(isNaN(x)?0:x),et=Le.alloc(),Mn.prototype.move.call(this,a,y),a=new gn,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 Mn&&E.isLinkLabel)){var nt=E.position,st=E.location;nt.w()?(et.x=nt.x+b,et.y=nt.y+x,E.position=et):st.w()&&(et.x=st.x+b,et.y=st.y+x,E.location=et)}for(y.reset();y.next();)E=y.value,E instanceof Pn&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(nt=E.position,et.x=nt.x+b,et.y=nt.y+x,et.w()?E.move(et):E.bb(),X0(E)&&E.bb());Le.free(et)}},un.Object.defineProperties(Pr.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&&Oe("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&&(oh(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&&(oh(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&&(oh(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&&(oh(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)}}}),Pr.prototype.expandSubGraph=Pr.prototype.expandSubGraph,Pr.prototype.collapseSubGraph=Pr.prototype.collapseSubGraph,Pr.prototype.findSubGraphParts=Pr.prototype.Rj,Pr.prototype.findContainingGroupChain=Pr.prototype.hz,Pr.prototype.findExternalNodesConnected=Pr.prototype.iz,Pr.prototype.findExternalLinksConnected=Pr.prototype.Lu,Pr.prototype.ensureBounds=Pr.prototype.Va,Pr.className="Group";function ba(a){ze.call(this),this.yb=us,this.ko=new on(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}$e(ba,ze),ba.prototype.cloneProtected=function(a){ze.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},ba.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return No(0,0,y.width,y.height,a.x,a.y)},ba.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Pr||a instanceof qr)||Oe("Placeholder is not inside a Group or Adornment."),a instanceof Pr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(ra(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=Le.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Le.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,et=a.adornedObject;a.angle=et.li();var nt=0;et instanceof Lr&&(nt=et.strokeWidth);var st=et.Df(),ht=et.naturalBounds,pt=(ht.width+nt)*st;nt=(ht.height+nt)*st,a.type!==vn.Link&&(st=et.ga(a.category==="Selection"?ni:a.locationSpot,Le.alloc()),a.location=st,Le.free(st)),isNaN(pt)||isNaN(nt)?(a=et.ga(ni,Le.alloc()),pt=on.allocAt(a.x,a.y,0,0),pt.Ye(et.ga(oo,a)),pt.Ye(et.ga(gi,a)),pt.Ye(et.ga(ia,a)),ra(y,pt.width+b||0,pt.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),Le.free(a),on.free(pt)):(ra(y,pt+b||0,nt+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},ba.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},ba.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Pr&&!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=on.alloc(),E=this.computeMemberBounds(x);var et=this.yb;return y instanceof Pr&&!y.isSubGraphExpanded?a.h(E.x-et.left,E.y-et.top,0,0):a.h(E.x-et.left,E.y-et.top,Math.max(E.width+et.left+et.right,0),Math.max(E.height+et.top+et.bottom,0)),on.free(x),b&&y instanceof Pr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},ba.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Pr))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,et=-1/0,nt=y.memberParts;nt.next();){var st=nt.value;if(st.isVisible()){if(st instanceof Pn&&(!y.computesBoundsIncludingLinks||gs(st)||st.fromNode===y||st.toNode===y))continue;st=st.actualBounds,st.left<x&&(x=st.left),st.top<b&&(b=st.top),st.right>E&&(E=st.right),st.bottom>et&&(et=st.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,et-b):(y=y.location,a.h(y.x,y.y,0,0)),a},un.Object.defineProperties(ba.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Br(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),ba.className="Placeholder";function Pn(a){nr.call(this,vn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Pa,this.Om=0,this.Qm=Pa,this.Rm=NaN,this.qj=Q0,this.po=.5,this.wd=null,this.Nb=new mn().freeze(),this.Tg=this.Mg=null,this.ml=new on,this.ua=new bn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Le,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}$e(Pn,nr),Pn.prototype.cloneProtected=function(a){nr.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())},qt=Pn.prototype,qt.Af=function(a){nr.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&&ns(y),a=a.toPort,a!==null&&ns(a)},qt.qb=function(a){a.classType===Pn?(a.value&2)===2?this.routing=a:a===vs||a===sh||a===Nd?this.curve=a:a===$p||a===Ym||a===Jm?this.adjusting=a:a!==Q0&&a!==Pa&&Oe("Unknown Link enum value for a Link property: "+a):nr.prototype.qb.call(this,a)},qt.Xc=function(){this.ba===null&&(this.ba=new Rp)},qt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),xa(a)||zh(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),xa(a)||zh(a)))},qt.zv=function(){return!1},qt.Av=function(){},qt.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 Pa:a=0;break;case qp:a=y;break;case tg:a=y+90;break;case eg:a=y-90;break;case $0:a=y+180;break;case Qm:a=Ge.bp(y),90<a&&270>a&&(a-=180);break;case ng:a=Ge.bp(y+90),90<a&&270>a&&(a-=180);break;case rg:a=Ge.bp(y-90),90<a&&270>a&&(a-=180);break;case $m:if(a=Ge.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Ge.bp(a)};function Ld(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&K0(x,a),a.Ah=y,y!==null&&V0(y,a);var E=a.containingGroupChanged;if(E!==null){var et=!0,nt=a.diagram;nt!==null&&(et=nt.aa,nt.aa=!0),E(a,x,y),nt!==null&&(nt.aa=et)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}qt=Pn.prototype,qt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&nr.prototype.oh.call(this)},qt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},qt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function tS(a,y){a.wd===null&&(a.wd=new gn),a.wd.add(y),a.v()}qt.Vo=function(a){if(nr.prototype.Vo.call(this,a),Ic(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)}Jp(this)}},qt.Wo=function(a){if(nr.prototype.Wo.call(this,a),Ic(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)}Qp(this)}},qt.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?nr.prototype.move.call(this,a,!1):(a=Le.allocAt(x.x+b,x.y+E),nr.prototype.move.call(this,a,!1),Le.free(a)),ah(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(pi),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()===vs))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()===vs){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Ge.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 et=this.i(x+2);x=this.i(x+3),Ge.ax(b.x,b.y,E.x,E.y,et.x,et.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var nt=this.flattenedLengths;for(x=this.flattenedTotalLength,E=et=b=0;b<x/2&&et<y&&(E=nt[et],!(b+E>x/2));)b+=E,et++;return y=this.i(et),et=this.i(et+1),1>Math.abs(y.x-et.x)?y.y>et.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-et.y)?y.x>et.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*(et.x-y.x),y.y+x*(et.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()===vs))return this.ua.wx(.5);if(this.computeCurve()===vs&&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),Ge.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 et;E<b/2&&x<a&&(et=y[x],!(E+et>b/2));)E+=et,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)},qt=Pn.prototype,qt.i=function(a){return this.Nb.s[a]},qt.dd=function(a,y){this.Nb.cd(a,y)},qt.L=function(a,y,x){this.Nb.cd(a,new Le(y,x))},qt.Kz=function(a,y){this.Nb.Gb(a,y)},qt.m=function(a,y,x){this.Nb.Gb(a,new Le(y,x))},qt.ne=function(a){this.Nb.add(a)},qt.yf=function(a,y){this.Nb.add(new Le(a,y))},qt.pv=function(a){this.Nb.mb(a)},qt.Fj=function(){this.Nb.clear()};function ah(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 mn,et=a.Nb.iterator;et.next();){var nt=et.value;E.add(new Le(nt.x+y,nt.y+x).freeze())}E.freeze(),et=a.Nb,a.Nb=E,nt=a.diagram,isNaN(y)||isNaN(x)||nt!==null&&nt.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),Sa(a)),b?Hm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),nt!==null&&nt.animationManager.zb&&ed(nt.animationManager,a,E),a.g("points",et,E)}}qt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},qt.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,et=E.length,nt=0;nt<et;nt++){var st=E[nt];x=Math.min(st.x,x),b=Math.min(st.y,b)}st=nt=1/0;for(var ht=y.s,pt=ht.length,yt=0;yt<pt;yt++){var Mt=ht[yt];nt=Math.min(Mt.x,nt),st=Math.min(Mt.y,st),Mt.freeze()}if(y.freeze(),pt===et){for(et=0;et<pt;et++)if(yt=E[et],Mt=ht[et],yt.x-x!==Mt.x-nt||yt.y-b!==Mt.y-st){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ed(x.animationManager,this,y),Hm(this),this.g("points",a,y)}},qt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Hm(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))}qt.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())}},qt.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?(Ef||(Ef=new Mn,Ef.desiredSize=di,Ef.Va()),this.defaultFromPoint&&(Ef.location=this.defaultFromPoint,Ef.Va(),y=a=Ef)):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?(Mf||(Mf=new Mn,Mf.desiredSize=di,Mf.Va()),this.defaultToPoint&&(Mf.location=this.defaultToPoint,Mf.Va(),E=b=Mf)):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 et=this.pointsCount,nt=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var st=Ad(nt),ht=Ad(x),pt=y===E&&y!==null,yt=this.isOrthogonal,Mt=this.curve===vs;this.Wf=pt&&!yt?Mt=!0:!1;var zt=this.computeAdjusting()===Pa||pt;if(!yt&&!pt&&st&&ht){if(st=!1,!zt&&3<=et&&(zt=this.getLinkPoint(a,y,nt,!0,!1,b,E),ht=this.getLinkPoint(b,E,x,!1,!1,a,y),st=this.adjustPoints(0,zt,et-1,ht))&&(zt=this.getLinkPoint(a,y,nt,!0,!1,b,E),ht=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,zt,et-1,ht)),!st)if(this.Fj(),Mt){et=this.getLinkPoint(a,y,nt,!0,!1,b,E),zt=this.getLinkPoint(b,E,x,!1,!1,a,y),st=zt.x-et.x,ht=zt.y-et.y,pt=this.computeCurviness(),Mt=yt=0;var Zt=et.x+st/3,Qt=et.y+ht/3,ie=Zt,Ee=Qt;Ge.B(ht,0)?Ee=0<st?Ee-pt:Ee+pt:(yt=-st/ht,Mt=Math.sqrt(pt*pt/(yt*yt+1)),0>pt&&(Mt=-Mt),ie=(0>ht?-1:1)*Mt+Zt,Ee=yt*(ie-Zt)+Qt),Zt=et.x+2*st/3,Qt=et.y+2*ht/3;var we=Zt,je=Qt;Ge.B(ht,0)?je=0<st?je-pt:je+pt:(we=(0>ht?-1:1)*Mt+Zt,je=yt*(we-Zt)+Qt),this.Fj(),this.ne(et),this.yf(ie,Ee),this.yf(we,je),this.ne(zt),this.dd(0,this.getLinkPoint(a,y,nt,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else et=b,zt=E,b=this.getLinkPoint(a,y,nt,!0,!1,et,zt),E=this.getLinkPoint(et,zt,x,!1,!1,a,y),this.hasCurviness()?(zt=E.x-b.x,x=E.y-b.y,nt=this.computeCurviness(),a=b.x+zt/2,y=b.y+x/2,et=a,st=y,Ge.B(x,0)?st=0<zt?st-nt:st+nt:(zt=-zt/x,et=Math.sqrt(nt*nt/(zt*zt+1)),0>nt&&(et=-et),et=(0>x?-1:1)*et+a,st=zt*(et-a)+y),this.ne(b),this.yf(et,st),this.ne(E)):(this.ne(b),this.ne(E),st=on.alloc(),y.mi(st),ht=st.ca(E),zt.mi(st),pt=st.ca(b),(ht||pt)&&(nt=y.ga(Km(nt),new Le),this.dd(0,this.getLinkPointFromPoint(a,y,nt,E,!0,nt)),x=zt.ga(Km(x),new Le),this.dd(1,this.getLinkPointFromPoint(et,zt,x,b,!1,x))),on.free(st))}else{Mt=this.isAvoiding,zt&&(yt&&Mt||pt)&&this.Fj();var Fe=pt?this.computeCurviness():0;Mt=this.getLinkPoint(a,y,nt,!0,yt,b,E),Zt=ie=Qt=0,(yt||!st||pt)&&(Ee=this.computeEndSegmentLength(a,y,nt,!0),Zt=this.getLinkDirection(a,y,Mt,nt,!0,yt,b,E),pt&&(st||nt.D(x)||!yt&&nt.x+x.x===1&&nt.y+x.y===1)&&(Zt-=yt?90:30,0>Fe&&(Zt-=180)),0>Zt?Zt+=360:360<=Zt&&(Zt-=360),pt&&(Ee+=Math.abs(Fe)*(yt?1:2)),Zt===0?Qt=Ee:Zt===90?ie=Ee:Zt===180?Qt=-Ee:Zt===270?ie=-Ee:(Qt=Ee*Math.cos(Zt*Math.PI/180),ie=Ee*Math.sin(Zt*Math.PI/180)),nt.Mc()&&pt&&(Ee=y.ga(Dr,Le.alloc()),we=Le.allocAt(Ee.x+1e3*Qt,Ee.y+1e3*ie),this.getLinkPointFromPoint(a,y,Ee,we,!0,Mt),Le.free(Ee),Le.free(we))),Ee=this.getLinkPoint(b,E,x,!1,yt,a,y);var De=je=we=0;if(yt||!ht||pt){var _e=this.computeEndSegmentLength(b,E,x,!1);De=this.getLinkDirection(b,E,Ee,x,!1,yt,a,y),pt&&(ht||nt.D(x)||!yt&&nt.x+x.x===1&&nt.y+x.y===1)&&(De+=yt?0:30,0>Fe&&(De+=180)),0>De?De+=360:360<=De&&(De-=360),pt&&(_e+=Math.abs(Fe)*(yt?1:2)),De===0?we=_e:De===90?je=_e:De===180?we=-_e:De===270?je=-_e:(we=_e*Math.cos(De*Math.PI/180),je=_e*Math.sin(De*Math.PI/180)),x.Mc()&&pt&&(x=E.ga(Dr,Le.alloc()),nt=Le.allocAt(x.x+1e3*we,x.y+1e3*je),this.getLinkPointFromPoint(b,E,x,nt,!1,Ee),Le.free(x),Le.free(nt))}x=Mt,(yt||!st||pt)&&(x=new Le(Mt.x+Qt,Mt.y+ie)),nt=Ee,(yt||!ht||pt)&&(nt=new Le(Ee.x+we,Ee.y+je)),!zt&&!yt&&st&&3<et&&this.adjustPoints(0,Mt,et-2,nt)?this.dd(et-1,Ee):!zt&&!yt&&ht&&3<et&&this.adjustPoints(1,x,et-1,Ee)?this.dd(0,Mt):!zt&&(yt?6<=et:4<et)&&this.adjustPoints(1,x,et-2,nt)?(this.dd(0,Mt),this.dd(et-1,Ee)):(this.Fj(),this.ne(Mt),(yt||!st||pt)&&this.ne(x),yt&&this.addOrthoPoints(x,Zt,nt,De,a,b),(yt||!ht||pt)&&this.ne(nt),this.ne(Ee))}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,et){if(et===void 0&&(et=new Le),a===null||y===null)return et.assign(x),et;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 nt=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),nt=a.m22*E;var st=-a.m12*E,ht=-a.m21*E,pt=a.m11*E,yt=E*(a.m21*a.dy-a.m22*a.dx),Mt=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*nt+b.y*ht+yt,b=b.x*st+b.y*pt+Mt,nt=x.x*nt+x.y*ht+yt,x=x.x*st+x.y*pt+Mt}return y.Sj(E,b,nt,x,et),a!==null&&et.transform(a),et};function Vm(a,y){var x=y.Zn;return x===null&&(x=new Tf,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}Pn.prototype.getLinkPoint=function(a,y,x,b,E,et,nt,st){if(st===void 0&&(st=new Le),x.sb()&&!Ad(x))return y.ga(x,st),st;if(x.$c()){var ht=Vm(this,y);if(ht!==null){if(st.assign(ht.Zo),E&&this.routing===nS){var pt=Vm(this,nt);if(pt!==null&&ht.Gl<pt.Gl){ht=Le.alloc(),pt=Le.alloc();var yt=new on(y.ga(ni,ht),y.ga(oo,pt)),Mt=this.computeSpot(!b,nt);a=this.getLinkPoint(et,nt,Mt,!b,E,a,y,pt),(x.Hf(bs)||x.Hf(Aa))&&a.y>=yt.y&&a.y<=yt.y+yt.height?st.y=a.y:(x.Hf(Ja)||x.Hf(Ps))&&a.x>=yt.x&&a.x<=yt.x+yt.width&&(st.x=a.x),Le.free(ht),Le.free(pt)}}return st}}return x=y.ga(Km(x),Le.alloc()),this.pointsCount>(E?6:2)?(nt=b?this.i(1):this.i(this.pointsCount-2),E&&(nt=Z0(x,nt.copy()))):(ht=this.computeSpot(!b,nt),et=Le.alloc(),nt=nt.ga(Km(ht),et),E&&(nt=Z0(x,nt)),Le.free(et)),this.getLinkPointFromPoint(a,y,x,nt,b,st),Le.free(x),st},Pn.prototype.getLinkDirection=function(a,y,x,b,E,et,nt,st){t:if(b.sb())var ht=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()&&(ht=Vm(this,y),ht!==null))switch(ht.Nc){case 1:ht=270;break t;case 2:ht=180;break t;default:case 4:ht=0;break t;case 8:ht=90;break t}ht=y.ga(Dr,Le.alloc()),this.pointsCount>(et?6:2)?(st=E?this.i(1):this.i(this.pointsCount-2),st=et?Z0(ht,st.copy()):x):(x=Le.alloc(),st=st.ga(Dr,x),Le.free(x)),x=Math.abs(st.x-ht.x)>Math.abs(st.y-ht.y)?st.x>=ht.x?0:180:st.y>=ht.y?90:270,Le.free(ht),ht=x}return b.Mc()&&nt.Td(a)&&(ht+=180,360<=ht&&(ht-=360)),Ad(b)||(a=y.li(),a===0)||(45<=a&&135>a?ht+=90:135<=a&&225>a?ht+=180:225<=a&&315>a&&(ht+=270),360<=ht&&(ht-=360)),ht},Pn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Vm(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Pn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Dr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===jo?Ur:y)):(a=y||this.toPort,a===null?a=Dr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===jo?Ur:y)),a};function Ad(a){return a===Ur||a.x===.5&&a.y===.5}function Km(a){return a.x===.5&&a.y===.5?a:Dr}Pn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Pa&&4<this.pointsCount?this.computeMidPoint(new Le):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(Dr))},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,et){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var nt=et;if(et===void 0&&(nt=xr.alloc(),nt.reset()),nt.multiply(this.transform),this.fh(a,nt))return v0(this,y,x,E),et===void 0&&xr.free(nt),!0;if(this.Yc(a,nt)){var st=!1;if(!this.isAtomic)for(var ht=this.O.s,pt=ht.length;pt--;){var yt=ht[pt];if(yt.visible||yt===this.locationObject){var Mt=yt.actualBounds,zt=this.naturalBounds;if(!(Mt.x>zt.width||Mt.y>zt.height||0>Mt.x+Mt.width||0>Mt.y+Mt.height)){if(Mt=xr.alloc(),Mt.set(nt),yt instanceof vn)st=yt.Cf(a,y,x,b,E,Mt);else if(this.path===yt){if(yt instanceof Lr)if(st=a,zt=b,yt.pickable===!1)st=!1;else if(Mt.multiply(yt.transform),zt)t:{var Zt=st,Qt=Mt;if(yt.fh(Zt,Qt))st=!0;else{if(Qt===void 0&&(Qt=yt.transform,Zt.Re(yt.actualBounds))){st=!0;break t}st=Zt.left,zt=Zt.right;var ie=Zt.top;Zt=Zt.bottom;var Ee=Le.alloc(),we=Le.alloc(),je=Le.alloc(),Fe=xr.alloc();Fe.set(Qt),Fe.bv(yt.transform),Fe.Vj(),we.x=zt,we.y=ie,we.transform(Fe),Ee.x=st,Ee.y=ie,Ee.transform(Fe),Qt=!1,Dc(yt,Ee,we,je)?Qt=!0:(Ee.x=zt,Ee.y=Zt,Ee.transform(Fe),Dc(yt,Ee,we,je)?Qt=!0:(we.x=st,we.y=Zt,we.transform(Fe),Dc(yt,Ee,we,je)?Qt=!0:(Ee.x=st,Ee.y=ie,Ee.transform(Fe),Dc(yt,Ee,we,je)&&(Qt=!0)))),xr.free(Fe),Le.free(Ee),Le.free(we),Le.free(je),st=Qt}}else st=yt.fh(st,Mt)}else st=Po(yt,a,b,Mt);st&&(zt=yt,y!==null&&(zt=y(yt)),zt&&(x===null||x(zt))&&E.add(zt)),xr.free(Mt)}}}return et===void 0&&xr.free(nt),st||this.background!==null||this.areaBackground!==null}return et===void 0&&xr.free(nt),!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?vs:this.curve},Pn.prototype.computeCorner=function(){if(this.curve===vs)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,et=b.margin,nt=isNaN(E.width)?30:E.width*b.scale+et.left+et.right;E=isNaN(E.height)?14:E.height*b.scale+et.top+et.bottom,b=b.segmentOrientation,b===qp||b===Qm||b===$0?a=Math.max(a,E):b===eg||b===rg||b===tg||b===ng?a=Math.max(a,nt):(y=y.ga(Dr).ab(x.ga(Dr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*nt)+Math.abs(Math.cos(y)*E)+1)),this.curve===vs&&(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()===Pa&&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=Fn(),b=0,E=y.links,et=0;et<E.length;et++){var nt=E[et].computeSpacing();x.push(nt),b+=nt}for(b=-b/2,et=0;et<E.length;et++){if(E[et]===this){a=b+x[et]/2;break}b+=x[et]}y.Ds===this.fromNode&&(a=-a),Bn(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=$p)}switch(E){case Ym:var et=this.i(a),nt=this.i(x);if(!et.Xa(y)||!nt.Xa(b)){E=et.x,et=et.y;var st=nt.x-E,ht=nt.y-et,pt=Math.sqrt(st*st+ht*ht);if(!Ge.$(pt,0)){if(Ge.$(st,0))var yt=0>ht?-Math.PI/2:Math.PI/2;else yt=Math.atan(ht/Math.abs(st)),0>st&&(yt=Math.PI-yt);nt=y.x;var Mt=y.y;st=b.x-nt;var zt=b.y-Mt;for(ht=Math.sqrt(st*st+zt*zt),Ge.$(st,0)?zt=0>zt?-Math.PI/2:Math.PI/2:(zt=Math.atan(zt/Math.abs(st)),0>st&&(zt=Math.PI-zt)),pt=ht/pt,yt=zt-yt,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),st=y.x-E,ht=y.y-et,y=Math.sqrt(st*st+ht*ht),Ge.$(y,0)||(Ge.$(st,0)?ht=0>ht?-Math.PI/2:Math.PI/2:(ht=Math.atan(ht/Math.abs(st)),0>st&&(ht=Math.PI-ht)),st=ht+yt,y*=pt,this.L(a,nt+y*Math.cos(st),Mt+y*Math.sin(st)));this.dd(x,b)}}return!0;case Jm:if(et=this.i(a),Mt=this.i(x),!et.Xa(y)||!Mt.Xa(b)){E=et.x,et=et.y,nt=Mt.x,Mt=Mt.y,pt=(nt-E)*(nt-E)+(Mt-et)*(Mt-et),st=y.x,yt=y.y,ht=b.x,zt=b.y;var Zt=1;if(ht-st!==0){var Qt=(zt-yt)/(ht-st);Zt=Math.sqrt(1+1/(Qt*Qt))}else Qt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var ie=y.x,Ee=y.y,we=.5;pt!==0&&(we=((E-ie)*(E-nt)+(et-Ee)*(et-Mt))/pt);var je=E+we*(nt-E),Fe=et+we*(Mt-et);y=Math.sqrt((ie-je)*(ie-je)+(Ee-Fe)*(Ee-Fe)),Ee<Qt*(ie-je)+Fe&&(y=-y),0<Qt&&(y=-y),ie=st+we*(ht-st),we=yt+we*(zt-yt),Qt!==0?(y=ie+y/Zt,this.L(a,y,we-(y-ie)/Qt)):this.L(a,ie,we+y)}this.dd(x,b)}return!0;case $p:t:{if(this.isOrthogonal&&(E=this.i(a),et=this.i(a+1),nt=this.i(a+2),st=et.x,yt=et.y,Mt=st,pt=yt,Ge.B(E.y,et.y)?Ge.B(et.x,nt.x)?yt=y.y:Ge.B(et.y,nt.y)&&(st=y.x):Ge.B(E.x,et.x)&&(Ge.B(et.y,nt.y)?st=y.x:Ge.B(et.x,nt.x)&&(yt=y.y)),this.L(a+1,st,yt),E=this.i(x),et=this.i(x-1),nt=this.i(x-2),st=et.x,yt=et.y,ht=st,zt=yt,Ge.B(E.y,et.y)?Ge.B(et.x,nt.x)?yt=b.y:Ge.B(et.y,nt.y)&&(st=b.x):Ge.B(E.x,et.x)&&(Ge.B(et.y,nt.y)?st=b.x:Ge.B(et.x,nt.x)&&(yt=b.y)),this.L(x-1,st,yt),X0(this))){this.L(a+1,Mt,pt),this.L(x-1,ht,zt),x=!1;break t}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Pn.prototype.addOrthoPoints=function(a,y,x,b,E,et){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var nt=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 st=E.actualBounds.copy(),ht=et.actualBounds.copy();if(st.w()&&ht.w()){st.Bc(ig,ig),ht.Bc(ig,ig),st.Ye(a),ht.Ye(x);var pt=Le.alloc(),yt=Le.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&ht.right>a.x||b===90&&x.y>a.y&&ht.right>a.x?(pt.h(x.x,a.y),yt.h(x.x,(a.y+x.y)/2),b===180?(pt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),yt.x=pt.x,yt.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(pt.x=a.x<ht.left?this.computeMidOrthoPosition(a.x,a.y,ht.left,x.y,!1):a.x<ht.right&&(b===270&&a.y<ht.top||b===90&&a.y>ht.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ht.right,yt.x=pt.x,yt.y=x.y):b===0&&a.x<ht.left&&a.y>ht.top&&a.y<ht.bottom&&(pt.x=a.x,pt.y=a.y<x.y?Math.min(x.y,ht.top):Math.max(x.y,ht.bottom),yt.y=pt.y)):(pt.h(a.x,x.y),yt.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<st.top||b===270&&x.y>st.bottom)&&(b===180&&(ht.ca(a)||st.ca(x))?pt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?pt.y=this.computeMidOrthoPosition(a.x,st.top,x.x,Math.max(x.y,ht.bottom),!0):x.y>a.y&&(b===180||b===270)&&(pt.y=this.computeMidOrthoPosition(a.x,st.bottom,x.x,Math.min(x.y,ht.top),!0)),yt.x=x.x,yt.y=pt.y),pt.y>st.top&&pt.y<st.bottom&&(x.x>=st.left&&x.x<=a.x||a.x<=ht.right&&a.x>=x.x?(b===90||b===270)&&(pt.h(Math.max((a.x+x.x)/2,a.x),a.y),yt.h(pt.x,x.y)):(pt.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?st.top:Math.min(st.top,ht.top)):Math.max(x.y,b===0?st.bottom:Math.max(st.bottom,ht.bottom)),yt.x=x.x,yt.y=pt.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&ht.left<a.x||b===90&&x.y>a.y&&ht.left<a.x?(pt.h(x.x,a.y),yt.h(x.x,(a.y+x.y)/2),b===0?(pt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),yt.x=pt.x,yt.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(pt.x=a.x>ht.right?this.computeMidOrthoPosition(a.x,a.y,ht.right,x.y,!1):a.x>ht.left&&(b===270&&a.y<ht.top||b===90&&a.y>ht.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ht.left,yt.x=pt.x,yt.y=x.y):b===180&&a.x>ht.right&&a.y>ht.top&&a.y<ht.bottom&&(pt.x=a.x,pt.y=a.y<x.y?Math.min(x.y,ht.top):Math.max(x.y,ht.bottom),yt.y=pt.y)):(pt.h(a.x,x.y),yt.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<st.top||b===270&&x.y>st.bottom)&&(b===0&&(ht.ca(a)||st.ca(x))?pt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?pt.y=this.computeMidOrthoPosition(a.x,st.top,x.x,Math.max(x.y,ht.bottom),!0):x.y>a.y&&(b===0||b===270)&&(pt.y=this.computeMidOrthoPosition(a.x,st.bottom,x.x,Math.min(x.y,ht.top),!0)),yt.x=x.x,yt.y=pt.y),pt.y>st.top&&pt.y<st.bottom&&(x.x<=st.right&&x.x>=a.x||a.x>=ht.left&&a.x<=x.x?(b===90||b===270)&&(pt.h(Math.min((a.x+x.x)/2,a.x),a.y),yt.h(pt.x,x.y)):(pt.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?st.top:Math.min(st.top,ht.top)):Math.max(x.y,b===180?st.bottom:Math.max(st.bottom,ht.bottom)),yt.x=x.x,yt.y=pt.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&ht.bottom>a.y||b===0&&x.x>a.x&&ht.bottom>a.y?(pt.h(a.x,x.y),yt.h((a.x+x.x)/2,x.y),b===270?(pt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),yt.x=x.x,yt.y=pt.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(pt.y=a.y<ht.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ht.top,!0):a.y<ht.bottom&&(b===180&&a.x<ht.left||b===0&&a.x>ht.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ht.bottom,yt.x=x.x,yt.y=pt.y):b===90&&a.y<ht.top&&a.x>ht.left&&a.x<ht.right&&(pt.x=a.x<x.x?Math.min(x.x,ht.left):Math.max(x.x,ht.right),pt.y=a.y,yt.x=pt.x)):(pt.h(x.x,a.y),yt.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<st.left||b===180&&x.x>st.right)&&(b===270&&(ht.ca(a)||st.ca(x))?pt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?pt.x=this.computeMidOrthoPosition(st.left,a.y,Math.max(x.x,ht.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(pt.x=this.computeMidOrthoPosition(st.right,a.y,Math.min(x.x,ht.left),x.y,!1)),yt.x=pt.x,yt.y=x.y),pt.x>st.left&&pt.x<st.right&&(x.y>=st.top&&x.y<=a.y||a.y<=ht.bottom&&a.y>=x.y?(b===0||b===180)&&(pt.h(a.x,Math.max((a.y+x.y)/2,a.y)),yt.h(x.x,pt.y)):(pt.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?st.left:Math.min(st.left,ht.left)):Math.max(x.x,b===90?st.right:Math.max(st.right,ht.right)),yt.x=pt.x,yt.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&ht.top<a.y||b===0&&x.x>a.x&&ht.top<a.y?(pt.h(a.x,x.y),yt.h((a.x+x.x)/2,x.y),b===90?(pt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),yt.x=x.x,yt.y=pt.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(pt.y=a.y>ht.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ht.bottom,!0):a.y>ht.top&&(b===180&&a.x<ht.left||b===0&&a.x>ht.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ht.top,yt.x=x.x,yt.y=pt.y):b===270&&a.y>ht.bottom&&a.x>ht.left&&a.x<ht.right&&(pt.x=a.x<x.x?Math.min(x.x,ht.left):Math.max(x.x,ht.right),pt.y=a.y,yt.x=pt.x)):(pt.h(x.x,a.y),yt.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<st.left||b===180&&x.x>st.right)&&(b===90&&(ht.ca(a)||st.ca(x))?pt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?pt.x=this.computeMidOrthoPosition(st.left,a.y,Math.max(x.x,ht.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(pt.x=this.computeMidOrthoPosition(st.right,a.y,Math.min(x.x,ht.left),x.y,!1)),yt.x=pt.x,yt.y=x.y),pt.x>st.left&&pt.x<st.right&&(x.y<=st.bottom&&x.y>=a.y||a.y>=ht.top&&a.y<=x.y?(b===0||b===180)&&(pt.h(a.x,Math.min((a.y+x.y)/2,a.y)),yt.h(x.x,pt.y)):(pt.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?st.left:Math.min(st.left,ht.left)):Math.max(x.x,b===270?st.right:Math.max(st.right,ht.right)),yt.x=pt.x,yt.y=x.y)));var Mt=x;if(this.isAvoiding){var zt=this.diagram;if(zt===null||E===et||this.layer.isTemporary||!hd(zt)||st.ca(Mt)&&!et.Td(E)||ht.ca(a)&&!E.Td(et))y=!1;else{var Zt=cd(zt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Zt.Yj(Math.min(a.x,pt.x),Math.min(a.y,pt.y),Math.abs(a.x-pt.x),Math.abs(a.y-pt.y))&&Zt.Yj(Math.min(pt.x,yt.x),Math.min(pt.y,yt.y),Math.abs(pt.x-yt.x),Math.abs(pt.y-yt.y))&&Zt.Yj(Math.min(yt.x,Mt.x),Math.min(yt.y,Mt.y),Math.abs(yt.x-Mt.x),Math.abs(yt.y-Mt.y)))y=!1;else{E=a,et=Mt;var Qt=x=null;if(zt.isVirtualized){zt=Zt.bounds.copy(),zt.Bc(-Zt.Ho,-Zt.Go);var ie=Le.alloc();jd(Zt,a.x,a.y)||(Ge.Ff(zt.x,zt.y,zt.x+zt.width,zt.y+zt.height,a.x,a.y,pt.x,pt.y,ie)?(x=a=ie.copy(),y=ie.ab(pt)):Ge.Ff(zt.x,zt.y,zt.x+zt.width,zt.y+zt.height,pt.x,pt.y,yt.x,yt.y,ie)?(x=a=ie.copy(),y=ie.ab(yt)):Ge.Ff(zt.x,zt.y,zt.x+zt.width,zt.y+zt.height,yt.x,yt.y,Mt.x,Mt.y,ie)&&(x=a=ie.copy(),y=ie.ab(Mt))),jd(Zt,Mt.x,Mt.y)||(Ge.Ff(zt.x,zt.y,zt.x+zt.width,zt.y+zt.height,Mt.x,Mt.y,yt.x,yt.y,ie)?(Qt=Mt=ie.copy(),b=yt.ab(ie)):Ge.Ff(zt.x,zt.y,zt.x+zt.width,zt.y+zt.height,yt.x,yt.y,pt.x,pt.y,ie)?(Qt=Mt=ie.copy(),b=pt.ab(ie)):Ge.Ff(zt.x,zt.y,zt.x+zt.width,zt.y+zt.height,pt.x,pt.y,a.x,a.y,ie)&&(Qt=Mt=ie.copy(),b=a.ab(ie))),Le.free(ie)}st=st.copy().ed(ht),st.Bc(Zt.Ho*Zt.Os,Zt.Go*Zt.Os),aS(Zt,a,y,Mt,b,st,!0),ht=tu(Zt,Mt.x,Mt.y),!Zt.abort&&ht>=Od&&(oS(Zt),st.Bc(Zt.Ho*Zt.Hx,Zt.Go*Zt.Ix),aS(Zt,a,y,Mt,b,st,!1),ht=tu(Zt,Mt.x,Mt.y)),!Zt.abort&&ht<Od&&tu(Zt,Mt.x,Mt.y)!==lh?(Y0(this,Zt,Mt.x,Mt.y,b,!0,nt),st=this.i(2),4>this.pointsCount?(y===0||y===180?(st.x=a.x,st.y=Mt.y):(st.x=Mt.x,st.y=a.y),this.L(2,st.x,st.y),this.m(3,st.x,st.y)):(nt=this.i(3),y===0||y===180?Ge.B(st.x,nt.x)?(st=y===0?Math.max(st.x,a.x):Math.min(st.x,a.x),this.L(2,st,a.y),this.L(3,st,nt.y)):Ge.B(st.y,nt.y)?(Math.abs(a.y-st.y)<=Zt.Go/2&&(this.L(2,st.x,a.y),this.L(3,nt.x,a.y)),this.m(2,st.x,a.y)):this.L(2,a.x,st.y):(y===90||y===270)&&(Ge.B(st.y,nt.y)?(st=y===90?Math.max(st.y,a.y):Math.min(st.y,a.y),this.L(2,a.x,st),this.L(3,nt.x,st)):Ge.B(st.x,nt.x)?(Math.abs(a.x-st.x)<=Zt.Ho/2&&(this.L(2,a.x,st.y),this.L(3,a.x,nt.y)),this.m(2,a.x,st.y)):this.L(2,st.x,a.y))),x!==null&&(a=this.i(1),nt=this.i(2),a.x!==nt.x&&a.y!==nt.y?y===0||y===180?this.m(2,a.x,nt.y):this.m(2,nt.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),Qt!==null&&(b===0||b===180?this.yf(et.x,Qt.y):this.yf(Qt.x,et.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(pt.copy()),this.ne(yt.copy())),Le.free(pt),Le.free(yt)}},Pn.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var et=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(et=this.computeCurviness()),E?(y+b)/2+et:(a+x)/2+et};function X0(a){if(a.diagram===null||!a.isAvoiding||!hd(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=cd(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],et=y[b+1];if(!a.Yj(Math.min(E.x,et.x),Math.min(E.y,et.y),Math.abs(E.x-et.x),Math.abs(E.y-et.y)))return!0}return!1}function Y0(a,y,x,b,E,et,nt){var st=y.Ho,ht=y.Go,pt=tu(y,x,b),yt=x,Mt=b;for(E===0?yt+=st:E===90?Mt+=ht:E===180?yt-=st:Mt-=ht,E!==nt&&pt>Rc&&tu(y,yt,Mt)!==pt-1&&(tu(y,x-st,b)===pt-1?(E=180,yt=x-st,Mt=b):tu(y,x+st,b)===pt-1?(E=0,yt=x+st,Mt=b):tu(y,x,b-ht)===pt-1?(E=270,yt=x,Mt=b-ht):tu(y,x,b+ht)===pt-1&&(E=90,yt=x,Mt=b+ht));pt>Rc&&tu(y,yt,Mt)===pt-1;)x=yt,b=Mt,E===0?yt+=st:E===90?Mt+=ht:E===180?yt-=st:Mt-=ht,--pt;et?pt>Rc&&(E===180||E===0?x=Math.floor(x/st)*st+st/2:(E===90||E===270)&&(b=Math.floor(b/ht)*ht+ht/2)):(x=Math.floor(x/st)*st+st/2,b=Math.floor(b/ht)*ht+ht/2),pt>Rc&&(et=E,nt=x,yt=b,E===0?(et=90,yt+=ht):E===90?(et=180,nt-=st):E===180?(et=270,yt-=ht):E===270&&(et=0,nt+=st),tu(y,nt,yt)===pt-1?Y0(a,y,nt,yt,et,!1,et):(nt=x,yt=b,E===0?(et=270,yt-=ht):E===90?(et=0,nt+=st):E===180?(et=90,yt+=ht):E===270&&(et=180,nt-=st),tu(y,nt,yt)===pt-1&&Y0(a,y,nt,yt,et,!1,et))),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=Vr(y,a,x.x,x.y,b.x,b.y),et=0,nt=1;nt<this.pointsCount-1;nt++){x=this.i(nt+1);var st=Vr(y,a,b.x,b.y,x.x,x.y);b=x,st<E&&(et=nt,E=st)}return et},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 Lr&&(E.ua=this.ua)}}},Pn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Ic(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(),et=E.copy();b=this.Nb.s;var nt=this.computeCurve();if(nt===vs&&3<=y&&!Ge.$(this.smoothness,0))if(y===3){var st=this.i(1);b=Math.min(E.x,st.x);var ht=Math.min(E.y,st.y);st=this.i(2),b=Math.min(b,st.x),ht=Math.min(ht,st.y)}else{if(this.isOrthogonal)for(ht=0;ht<y;ht++)st=b[ht],et.x=Math.min(st.x,et.x),et.y=Math.min(st.y,et.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),ht=this.i(b),et.x=Math.min(ht.x,et.x),et.y=Math.min(ht.y,et.y);b=et.x,ht=et.y}else{for(ht=0;ht<y;ht++)st=b[ht],et.x=Math.min(st.x,et.x),et.y=Math.min(st.y,et.y);b=et.x,ht=et.y}if(b-=this.su.x,ht-=this.su.y,E.x-=b,E.y-=ht,y!==2||Ic(this)){if(a.type=bn.o,st=N1(a),this.computeShortLength(!0)!==0&&(E=Cf(this,E,!0,et)),Td(st,E.x,E.y,!1),nt===vs&&3<=y&&!Ge.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-ht,E=this.i(2).copy(),E.x-=b,E.y-=ht,this.computeShortLength(!1)!==0&&(E=Cf(this,E,!1,et)),rh(st,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=Le.allocAt(b,ht),x=Le.alloc(),x.assign(this.i(1)),et=Le.allocAt(b,ht),E=Le.allocAt(b,ht),nt=this.i(0);for(var pt,yt=this.smoothness/3,Mt=1;Mt<this.pointsCount-1;Mt++){pt=this.i(Mt);var zt=nt,Zt=pt,Qt=this.i(J0(this,pt,Mt,!1));if((!Ge.$(zt.x,Zt.x)||!Ge.$(Zt.x,Qt.x))&&(!Ge.$(zt.y,Zt.y)||!Ge.$(Zt.y,Qt.y))){var ie=yt;isNaN(ie)&&(ie=this.smoothness/3);var Ee=zt.x;zt=zt.y;var we=Zt.x;Zt=Zt.y;var je=Qt.x;Qt=Qt.y;var Fe=ie*Zm(Ee,zt,we,Zt);ie*=Zm(we,Zt,je,Qt),Ge.$(zt,Zt)&&Ge.$(we,je)&&(we>Ee?Qt>Zt?(et.x=we-Fe,et.y=Zt-Fe,E.x=we+ie,E.y=Zt+ie):(et.x=we-Fe,et.y=Zt+Fe,E.x=we+ie,E.y=Zt-ie):Qt>Zt?(et.x=we+Fe,et.y=Zt-Fe,E.x=we-ie,E.y=Zt+ie):(et.x=we+Fe,et.y=Zt+Fe,E.x=we-ie,E.y=Zt-ie)),Ge.$(Ee,we)&&Ge.$(Zt,Qt)&&(Zt>zt?(je>we?(et.x=we-Fe,et.y=Zt-Fe,E.x=we+ie):(et.x=we+Fe,et.y=Zt-Fe,E.x=we-ie),E.y=Zt+ie):(je>we?(et.x=we-Fe,et.y=Zt+Fe,E.x=we+ie):(et.x=we+Fe,et.y=Zt+Fe,E.x=we-ie),E.y=Zt-ie)),(Ge.$(Ee,we)&&Ge.$(we,je)||Ge.$(zt,Zt)&&Ge.$(Zt,Qt))&&(Ee=.5*(Ee+je),zt=.5*(zt+Qt),et.x=Ee,et.y=zt,E.x=Ee,E.y=zt),(Mt===1||Mt===2&&Ge.$(nt.x,this.i(0).x)&&Ge.$(nt.y,this.i(0).y))&&(x.x=.5*(nt.x+pt.x),x.y=.5*(nt.y+pt.y)),rh(st,x.x-b,x.y-ht,et.x-b,et.y-ht,pt.x-b,pt.y-ht),y.set(et),x.set(E),nt=pt}}pt=nt.x,nt=nt.y,yt=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(yt=Cf(this,yt.copy(),!1,Ti)),pt=.5*(pt+yt.x),nt=.5*(nt+yt.y),rh(st,E.x-b,E.y-ht,pt-b,nt-ht,yt.x-b,yt.y-ht),Le.free(y),Le.free(x),Le.free(et),Le.free(E)}else for(x=3;x<y;x+=3)et=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),nt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(nt=Cf(this,nt.copy(),!1,Ti)),rh(st,et.x-b,et.y-ht,E.x-b,E.y-ht,nt.x-b,nt.y-ht);else{for(et=Le.alloc(),et.assign(this.i(0)),E=Le.alloc(),E.assign(et),nt=this.computeCorner(),Mt=1,pt=0;Mt<y;){if(Mt=J0(this,et,Mt,1<Mt),yt=this.i(Mt),Mt>=y-1){if(!et.D(yt))this.computeShortLength(!1)!==0&&(yt=Cf(this,yt.copy(),!1,Ti)),kf(this,st,-b,-ht,et,yt,x);else if(pt===0)for(Mt=1;Mt<y;)E.assign(et),yt=this.i(Mt++),kf(this,st,-b,-ht,et,yt,x),et.assign(yt);break}if(pt=J0(this,yt,Mt+1,Mt<y-3),Mt=-b,Ee=-ht,zt=yt,we=this.i(pt),ie=x,Ge.B(et.y,zt.y)&&Ge.B(zt.x,we.x))if(Qt=Math.min(nt,Math.abs(zt.x-E.x)/2),Qt=Fe=Math.min(Qt,Math.abs(we.y-zt.y)/2),Ge.B(Qt,0))kf(this,st,Mt,Ee,et,zt,ie),et.assign(zt);else{var De=zt.x,_e=zt.y;Zt=De,je=_e,zt.x>et.x?De=zt.x-Qt:De=zt.x+Qt,we.y>zt.y?je=zt.y+Fe:je=zt.y-Fe,we=Le.allocAt(De,_e),kf(this,st,Mt,Ee,et,we,ie),Le.free(we),Im(st,zt.x+Mt,zt.y+Ee,Zt+Mt,je+Ee),et.h(Zt,je)}else Ge.B(et.x,zt.x)&&Ge.B(zt.y,we.y)?(Qt=Math.min(nt,Math.abs(zt.y-E.y)/2),Qt=Fe=Math.min(Qt,Math.abs(we.x-zt.x)/2),Ge.B(Fe,0)?(kf(this,st,Mt,Ee,et,zt,ie),et.assign(zt)):(De=zt.x,_e=zt.y,Zt=De,je=_e,zt.y>et.y?_e=zt.y-Qt:_e=zt.y+Qt,we.x>zt.x?Zt=zt.x+Fe:Zt=zt.x-Fe,we=Le.allocAt(De,_e),kf(this,st,Mt,Ee,et,we,ie),Le.free(we),Im(st,zt.x+Mt,zt.y+Ee,Zt+Mt,je+Ee),et.h(Zt,je))):(kf(this,st,Mt,Ee,et,zt,ie),et.assign(zt));E.assign(yt),Mt=pt}Le.free(et)}Rm=st}else st=this.i(1).copy(),st.x-=b,st.y-=ht,this.computeShortLength(!0)!==0&&(E=Cf(this,E,!0,et)),this.computeShortLength(!1)!==0&&(st=Cf(this,st,!1,et)),a.type=bn.j,a.startX=E.x,a.startY=E.y,a.endX=st.x,a.endY=st.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),Ge.$(a,0)?y:Ge.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Cf(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var et=a.i(1);if(x=et.x-b.x,et=et.y-b.y,b=Zm(y.x,y.y,x,et),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(et-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(et=a.i(E-2),x=et.x-b.x,et=et.y-b.y,b=Zm(y.x,y.y,x,et),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-et)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function J0(a,y,x,b){for(var E=a.pointsCount,et=y;Ge.$(y.x,et.x)&&Ge.$(y.y,et.y);){if(x>=E)return E-1;et=a.i(x++)}if(!Ge.$(y.x,et.x)&&!Ge.$(y.y,et.y))return x-1;for(var nt=et;Ge.$(y.x,et.x)&&Ge.$(et.x,nt.x)&&(!b||(y.y>=et.y?et.y>=nt.y:et.y<=nt.y))||Ge.$(y.y,et.y)&&Ge.$(et.y,nt.y)&&(!b||(y.x>=et.x?et.x>=nt.x:et.x<=nt.x));){if(x>=E)return E-1;nt=a.i(x++)}return x-2}Pn.prototype.computeJumpLength=function(){return 10};function kf(a,y,x,b,E,et,nt){if(!nt&&Ic(a)){nt=a.computeJumpLength();var st=nt/2,ht=[],pt=0;if(a.isVisible()&&(pt=Ex(a,E,et,ht)),0<pt){if(Ge.B(E.y,et.y))if(E.x<et.x)for(var yt=0;yt<pt;){var Mt=Math.max(E.x,Math.min(ht[yt++]-st,et.x-nt));y.lineTo(Mt+x,et.y+b);for(var zt=Mt+x,Zt=Math.min(Mt+nt,et.x);yt<pt&&(Mt=ht[yt],Mt<Zt+nt);)yt++,Zt=Math.min(Mt+st,et.x);Mt=et.y-nt+b,Zt+=x;var Qt=et.y+b;a.curve===sh?Td(y,Zt,Qt,!1):rh(y,zt,Mt,Zt,Mt,Zt,Qt)}else for(--pt;0<=pt;){for(yt=Math.min(E.x,Math.max(ht[pt--]+st,et.x+nt)),y.lineTo(yt+x,et.y+b),zt=yt+x,Mt=Math.max(yt-nt,et.x);0<=pt&&(yt=ht[pt],yt>Mt-nt);)pt--,Mt=Math.max(yt-st,et.x);yt=et.y-nt+b,Mt+=x,Zt=et.y+b,a.curve===sh?Td(y,Mt,Zt,!1):rh(y,zt,yt,Mt,yt,Mt,Zt)}else if(Ge.B(E.x,et.x))if(E.y<et.y)for(yt=0;yt<pt;){for(Mt=Math.max(E.y,Math.min(ht[yt++]-st,et.y-nt)),y.lineTo(et.x+x,Mt+b),zt=Mt+b,Mt=Math.min(Mt+nt,et.y);yt<pt&&(Zt=ht[yt],Zt<Mt+nt);)yt++,Mt=Math.min(Zt+st,et.y);Zt=et.x-nt+x,Qt=et.x+x,Mt+=b,a.curve===sh?Td(y,Qt,Mt,!1):rh(y,Zt,zt,Zt,Mt,Qt,Mt)}else for(--pt;0<=pt;){for(yt=Math.min(E.y,Math.max(ht[pt--]+st,et.y+nt)),y.lineTo(et.x+x,yt+b),zt=yt+b,yt=Math.max(yt-nt,et.y);0<=pt&&(Mt=ht[pt],Mt>yt-nt);)pt--,yt=Math.max(Mt-st,et.y);Mt=et.x-nt+x,Zt=et.x+x,yt+=b,a.curve===sh?Td(y,Zt,yt,!1):rh(y,Mt,zt,Mt,yt,Zt,yt)}}}y.lineTo(et.x+x,et.y+b)}function Ex(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var et=E.value;if(et!==null&&et.visible){et=et.Pa.s;for(var nt=et.length,st=0;st<nt;st++){var ht=et[st];if(ht instanceof Pn){if(ht===a)return 0<b.length&&b.sort(function(yt,Mt){return yt-Mt}),b.length;if(ht.isVisible()&&Ic(ht)){var pt=ht.routeBounds;pt.w()&&a.routeBounds.Yc(pt)&&!a.usesSamePort(ht)&&(pt=ht.path,pt!==null&&pt.Ed()&&Mx(y,x,b,ht))}}}}}return 0<b.length&&b.sort(function(yt,Mt){return yt-Mt}),b.length}function Mx(a,y,x,b){for(var E=Ge.B(a.y,y.y),et=b.pointsCount,nt=b.i(0),st=Le.alloc(),ht=1;ht<et;ht++){var pt=b.i(ht);if(ht<et-1){var yt=b.i(ht+1);if(nt.y===pt.y&&pt.y===yt.y){if(pt.x>nt.x&&yt.x>=pt.x||pt.x<nt.x&&yt.x<=pt.x)continue}else if(nt.x===pt.x&&pt.x===yt.x&&(pt.y>nt.y&&yt.y>=pt.y||pt.y<nt.y&&yt.y<=pt.y))continue}t:{yt=a.x;var Mt=a.y,zt=y.x,Zt=y.y,Qt=nt.x;nt=nt.y;var ie=pt.x,Ee=pt.y;if(Ge.B(yt,zt)){if(!Ge.B(Mt,Zt)&&Ge.B(nt,Ee)&&Math.min(Mt,Zt)<nt&&Math.max(Mt,Zt)>nt&&Math.min(Qt,ie)<yt&&Math.max(Qt,ie)>yt&&!Ge.B(Qt,ie)){st.x=yt,st.y=nt,yt=!0;break t}}else if(Ge.B(Mt,Zt)&&Ge.B(Qt,ie)&&Math.min(yt,zt)<Qt&&Math.max(yt,zt)>Qt&&Math.min(nt,Ee)<Mt&&Math.max(nt,Ee)>Mt&&!Ge.B(nt,Ee)){st.x=Qt,st.y=Mt,yt=!0;break t}st.x=0,st.y=0,yt=!1}yt&&(E?x.push(st.x):x.push(st.y)),nt=pt}Le.free(st)}function Ic(a){return a=a.curve,a===Nd||a===sh}function Xm(a,y){(y||Ic(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 et=!1;E=E.Pa.s;for(var nt=E.length,st=0;st<nt;st++){var ht=E[st];ht instanceof Pn&&(ht===this?et=!0:et&&eS(this,ht,a))}}else if(b)for(et=E.Pa.s,E=et.length,nt=0;nt<E;nt++)st=et[nt],st instanceof Pn&&eS(this,st,a)}}}}};function eS(a,y,x){if(y!==null&&y.lk&&y.fd&&Ic(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(!nr.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(nr.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?$p:this.qk};function Jp(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,et=a=null,nt=y.jb.s,st=nt.length,ht=0;ht<st;ht++){var pt=nt[ht];(pt.ef===y&&pt.ff===b&&pt.uf===x&&pt.vf===E||pt.ef===x&&pt.ff===E&&pt.uf===y&&pt.vf===b)&&(et===null?et=pt:(a===null&&(a=[],a.push(et)),a.push(pt)))}if(a!==null){for(et=W1(y,x,b,E),et===null&&(et=new qm(y,b,x,E),U1(y,et),U1(x,et)),et.links=a,y=0;y<a.length;y++)a[y].Sf=et;et.Sl()}}}}function Qp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(er(y.links,a),y.Sl()))}Pn.prototype.ph=function(){return!0},un.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),Qp(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,et=this.fromPortChanged;if(et!==null){var nt=!0;b!==null&&(nt=b.aa,b.aa=!0),et(this,x,E),b!==null&&(b.aa=nt)}a!==null&&(this.uf!==a&&Gm(a,this,E),Jp(this),this.C(1)),this.g("fromNode",y,a),Ld(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&ns(x),Qp(this),this.ff=a;var b=this.fromPort;b!==null&&ns(b);var E=this.diagram;if(E!==null){var et=this.data,nt=E.model;et!==null&&nt.ri()&&nt.xv(et,a)}x!==b&&(this.Wf=null,this.bb(),et=this.fromPortChanged,et!==null&&(nt=!0,E!==null&&(nt=E.aa,E.aa=!0),et(this,x,b),E!==null&&(E.aa=nt))),Jp(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),Qp(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,et=this.toPortChanged;if(et!==null){var nt=!0;b!==null&&(nt=b.aa,b.aa=!0),et(this,x,E),b!==null&&(b.aa=nt)}a!==null&&(this.ef!==a&&Gm(a,this,E),Jp(this),this.C(1)),this.g("toNode",y,a),Ld(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&ns(x),Qp(this),this.vf=a;var b=this.toPort;b!==null&&ns(b);var E=this.diagram;if(E!==null){var et=this.data,nt=E.model;et!==null&&nt.ri()&&nt.Cv(et,a)}x!==b&&(this.Wf=null,this.bb(),et=this.toPortChanged,et!==null&&(nt=!0,E!==null&&(nt=E.aa,E.aa=!0),et(this,x,b),E!==null&&(E.aa=nt))),Jp(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:jo},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&&ns(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&&Ln(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:jo},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&&ns(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&&Ln(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?Hr: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&&Yp(this.fromNode),this.toNode!==null&&Yp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Lr?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()===vs&&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 et=this.i(2);y=Math.min(et.x,y),x=Math.min(et.y,x),Ge.Dl(E.x,E.y,b.x,b.y,b.x,b.y,et.x,et.y,.5,a)}else for(et=3;et<b;et+=3){var nt=this.i(et-2);et+3>=b&&(et=b-1);var st=this.i(et-1),ht=this.i(et);Ge.Dl(E.x,E.y,nt.x,nt.y,st.x,st.y,ht.x,ht.y,.5,a),y=Math.min(ht.x,y),x=Math.min(ht.y,x),E=ht}else for(E=this.i(0),et=this.i(1),y=Math.min(E.x,et.x),x=Math.min(E.y,et.y),a.h(E.x,E.y,0,0),a.Ye(et),E=2;E<b;E++)et=this.i(E),y=Math.min(et.x,y),x=Math.min(et.y,x),a.Ye(et);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Le)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Hm(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);Ge.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Ge.$(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 mn,b=0;b<a.length/2;b++)E=new Le(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var et=a[E];if(!en(et)||typeof et.x!="number"||isNaN(et.x)||typeof et.y!="number"||isNaN(et.y)){b=!1;break}}if(b)for(x=new mn,b=0;b<a.length;b++)E=a[b],x.add(new Le(E.x,E.y).freeze())}}else if(a instanceof mn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Oe("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Hm(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ed(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||!Ad(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Ad(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===sh||y===Nd||a===sh||a===Nd),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 Ef=null,Mf=null,Q0=new tn(Pn,"Normal",1),Tx=new tn(Pn,"Orthogonal",2),Lx=new tn(Pn,"AvoidsNodes",6),nS=new tn(Pn,"AvoidsNodesStraight",7),Pa=new tn(Pn,"None",0),vs=new tn(Pn,"Bezier",9),sh=new tn(Pn,"JumpGap",10),Nd=new tn(Pn,"JumpOver",11),$p=new tn(Pn,"End",17),Ym=new tn(Pn,"Scale",18),Jm=new tn(Pn,"Stretch",19),qp=new tn(Pn,"OrientAlong",21),tg=new tn(Pn,"OrientPlus90",22),eg=new tn(Pn,"OrientMinus90",23),$0=new tn(Pn,"OrientOpposite",24),Qm=new tn(Pn,"OrientUpright",25),ng=new tn(Pn,"OrientPlus90Upright",26),rg=new tn(Pn,"OrientMinus90Upright",27),$m=new tn(Pn,"OrientUpright45",28),rS=16,iS=14,ig=8;Pn.className="Link",Pn.Normal=Q0,Pn.Orthogonal=Tx,Pn.AvoidsNodes=Lx,Pn.AvoidsNodesStraight=nS,Pn.None=Pa,Pn.Bezier=vs,Pn.JumpGap=sh,Pn.JumpOver=Nd,Pn.End=$p,Pn.Scale=Ym,Pn.Stretch=Jm,Pn.OrientAlong=qp,Pn.OrientPlus90=tg,Pn.OrientMinus90=eg,Pn.OrientOpposite=$0,Pn.OrientUpright=Qm,Pn.OrientPlus90Upright=ng,Pn.OrientMinus90Upright=rg,Pn.OrientUpright45=$m,Pn.EndSegmentStep=8,Pn.CurvinessStart=rS,Pn.SpacingMin=iS,Pn.OrthoShortCut=ig;function qm(a,y,x,b){oi(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 og(a){oi(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}og.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 jd(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function tu(a,y,x){return jd(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]>=Rc&&(x[b]=q0)}og.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 et=y;et<=x;et++)if(E[et]===lh)return!1}return!0};function eu(a,y,x,b,E,et,nt,st,ht){if(!(y<et||y>nt||x<st||x>ht)){var pt=y|0,yt=x|0,Mt=a.ac[pt][yt];if(Mt>=Rc&&Mt<Od)for(E?yt+=b:pt+=b,Mt+=1;et<=pt&&pt<=nt&&st<=yt&&yt<=ht&&!(Mt>=a.ac[pt][yt]);)a.ac[pt][yt]=Mt,Mt+=1,E?yt+=b:pt+=b;if(pt=E?yt:pt,E)if(0<b)for(x+=b;x<pt;x+=b)eu(a,y,x,1,!E,et,nt,st,ht),eu(a,y,x,-1,!E,et,nt,st,ht);else for(x+=b;x>pt;x+=b)eu(a,y,x,1,!E,et,nt,st,ht),eu(a,y,x,-1,!E,et,nt,st,ht);else if(0<b)for(y+=b;y<pt;y+=b)eu(a,y,x,1,!E,et,nt,st,ht),eu(a,y,x,-1,!E,et,nt,st,ht);else for(y+=b;y>pt;y+=b)eu(a,y,x,1,!E,et,nt,st,ht),eu(a,y,x,-1,!E,et,nt,st,ht)}}function tv(a,y,x,b,E,et,nt,st,ht){y|=0,x|=0;var pt=lh,yt=Rc;for(a.ac[y][x]=yt;pt===lh&&y>et&&y<nt&&x>st&&x<ht;)yt+=1,a.ac[y][x]=yt,E?x+=b:y+=b,pt=a.ac[y][x]}function ev(a,y,x,b,E,et,nt,st,ht){y|=0,x|=0;var pt=lh,yt=Od;for(a.ac[y][x]=yt;pt===lh&&y>et&&y<nt&&x>st&&x<ht;)a.ac[y][x]=yt,E?x+=b:y+=b,pt=a.ac[y][x]}function aS(a,y,x,b,E,et,nt){if(a.ac!==null){a.abort=!1;var st=y.x,ht=y.y;if(jd(a,st,ht)){st-=a.Nd,st/=a.rc,ht-=a.Od,ht/=a.sc;var pt=b.x,yt=b.y;if(jd(a,pt,yt))if(pt-=a.Nd,pt/=a.rc,yt-=a.Od,yt/=a.sc,1>=Math.abs(st-pt)&&1>=Math.abs(ht-yt))a.abort=!0;else{var Mt=et.x;b=et.y,y=et.x+et.width;var zt=et.y+et.height;Mt-=a.Nd,Mt/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,zt-=a.Od,zt/=a.sc,et=Math.max(0,Math.min(a.di,Mt|0)),y=Math.min(a.di,Math.max(0,y|0)),Mt=Math.max(0,Math.min(a.ei,b|0)),zt=Math.min(a.ei,Math.max(0,zt|0)),b=a.ac,st|=0,ht|=0,pt|=0,yt|=0;var Zt=x===0||x===90?1:-1;if(x=x===90||x===270,b[st][ht]===lh?(tv(a,st,ht,Zt,x,et,y,Mt,zt),tv(a,st,ht,1,!x,et,y,Mt,zt),tv(a,st,ht,-1,!x,et,y,Mt,zt)):tv(a,st,ht,Zt,x,st,ht,st,ht),b[pt][yt]===lh?(ev(a,pt,yt,E===0||E===90?1:-1,E===90||E===270,et,y,Mt,zt),ev(a,pt,yt,1,!(E===90||E===270),et,y,Mt,zt),ev(a,pt,yt,-1,!(E===90||E===270),et,y,Mt,zt)):ev(a,pt,yt,Zt,x,pt,yt,pt,yt),x=Fn(),nt&&sS(a,pt,yt,E,st,ht,x))for((x[0]!==pt||x[1]!==yt)&&(x.unshift(yt),x.unshift(pt)),(x[x.length-2]!==st||x[x.length-1]!==ht)&&(x.push(st),x.push(ht)),a=Rc,E=x[x.length-2],nt=x[x.length-1],b[E][nt]=a++,et=x.length-4;0<=et;et-=2)for(E=x[et+2],nt=x[et+3],y=x[et],pt=x[et+1];y>E?E++:y<E?E--:pt>nt?nt++:pt<nt&&nt--,b[E][nt]=a++,E!==y||nt!==pt;);else eu(a,st,ht,1,!1,et,y,Mt,zt),eu(a,st,ht,-1,!1,et,y,Mt,zt),eu(a,st,ht,1,!0,et,y,Mt,zt),eu(a,st,ht,-1,!0,et,y,Mt,zt);Bn(x)}}}}function sS(a,y,x,b,E,et,nt){for(var st=a.ac,ht=y,pt=x;;){if(ht===E&&pt===et)return!0;var yt=ht,Mt=pt;if(b===0)if(yt<E)yt++;else break;else if(b===90)if(Mt<et)Mt++;else break;else if(b===180)if(yt>E)yt--;else break;else if(Mt>et)Mt--;else break;var zt=st[yt][Mt];if(zt===0||zt===ty)break;ht=yt,pt=Mt}for(;;){if(yt=b,Mt=ht,zt=pt,b===0?zt<et?(yt=90,zt++):zt>et&&(yt=270,zt--):b===90?Mt<E?(yt=0,Mt++):Mt>E&&(yt=180,Mt--):b===180?zt<et?(yt=90,zt++):zt>et&&(yt=270,zt--):Mt<E?(yt=0,Mt++):Mt>E&&(yt=180,Mt--),Mt=st[Mt][zt],yt!==b&&Mt!==0&&Mt!==ty){if(nt.push(ht),nt.push(pt),sS(a,ht,pt,yt,E,et,nt))return!0;nt.pop(),nt.pop()}if(st[ht][pt]=ty,b===0){if(ht===y)return!1;ht--}else if(b===90){if(pt===x)return!1;pt--}else if(b===180){if(ht===y)return!1;ht++}else{if(pt===x)return!1;pt++}}}un.Object.defineProperties(og.prototype,{bounds:{get:function(){return new on(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 lh=0,Rc=1,Od=999999,q0=Od+1,ty=Od+2;og.className="PositionArray";function Tf(){oi(this),this.port=this.node=null,this.pe=[],this.ap=!1}Tf.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 Ax(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}Tf.prototype.Sl=function(){this.pe.length=0};function lS(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,et=E instanceof Pr?E:null;if(et===null||et.isSubGraphExpanded)var nt=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!et.actualBounds.w()){a.ap=x;break t}b=et,nt=b.Lu()}et=a.pe.length=0;var st=a.port.ga(ni,Le.alloc()),ht=a.port.ga(oo,Le.alloc());for(E=on.allocAt(st.x,st.y,0,0),E.Ye(ht),Le.free(st),Le.free(ht),st=Le.allocAt(E.x+E.width/2,E.y+E.height/2),ht=a.port.li(),nt=nt.iterator;nt.next();){var pt=nt.value;if(pt.isVisible()&&pt.fromPort!==pt.toPort){var yt=pt.fromPort===a.port||pt.fromNode!==null&&pt.fromNode.Td(b),Mt=pt.computeSpot(yt,a.port);if(Mt.$c()&&(yt=yt?pt.toPort:pt.fromPort,yt!==null)){var zt=yt.part;if(zt!==null){var Zt=zt.findVisibleNode();Zt!==null&&Zt!==zt&&(zt=Zt,yt=zt.port),yt=pt.computeOtherPoint(zt,yt),zt=st.ab(yt),zt-=ht,0>zt?zt+=360:360<=zt&&(zt-=360),Mt=Ax(E,Mt,zt,pt.isOrthogonal),Mt===0?(Mt=4,180<zt&&(zt-=360)):Mt===90?(Mt=8,270<zt&&(zt-=360)):Mt===180?Mt=2:(Mt=1,90>zt&&(zt+=360)),Zt=a.pe[et],Zt===void 0?(Zt=new ey(pt,zt,Mt),a.pe[et]=Zt):(Zt.link=pt,Zt.angle=zt,Zt.Nc=Mt),Zt.hv.set(yt),et++}}}}for(Le.free(st),a.pe.sort(Tf.prototype.j),ht=a.pe.length,b=-1,et=st=0;et<ht;et++)nt=a.pe[et],nt!==void 0&&(nt.Nc!==b&&(b=nt.Nc,st=0),nt.Uo=st,st++);for(b=-1,st=0,et=ht-1;0<=et;et--)ht=a.pe[et],ht!==void 0&&(ht.Nc!==b&&(b=ht.Nc,st=ht.Uo+1),ht.Gl=st);if(et=a.pe,Mt=a.port,b=a.node.portSpreading,st=Le.alloc(),ht=Le.alloc(),nt=Le.alloc(),pt=Le.alloc(),Mt.ga(ni,st),Mt.ga(gi,ht),Mt.ga(oo,nt),Mt.ga(ia,pt),Zt=zt=yt=Mt=0,b===H0)for(var Qt=0;Qt<et.length;Qt++){var ie=et[Qt];if(ie!==null){var Ee=ie.link.computeThickness();switch(ie.Nc){case 8:zt+=Ee;break;case 2:Zt+=Ee;break;case 1:Mt+=Ee;break;default:case 4:yt+=Ee}}}var we=Qt=0,je=1,Fe=ie=0;for(Ee=0;Ee<et.length;Ee++){var De=et[Ee];if(De!==null){if(Qt!==De.Nc){switch(Qt=De.Nc,Qt){case 8:var _e=nt;we=pt;break;case 2:_e=pt,we=st;break;case 1:_e=st,we=ht;break;default:case 4:_e=ht,we=nt}switch(ie=we.x-_e.x,Fe=we.y-_e.y,Qt){case 8:zt>Math.abs(ie)?(je=Math.abs(ie)/zt,zt=Math.abs(ie)):je=1;break;case 2:Zt>Math.abs(Fe)?(je=Math.abs(Fe)/Zt,Zt=Math.abs(Fe)):je=1;break;case 1:Mt>Math.abs(ie)?(je=Math.abs(ie)/Mt,Mt=Math.abs(ie)):je=1;break;default:case 4:yt>Math.abs(Fe)?(je=Math.abs(Fe)/yt,yt=Math.abs(Fe)):je=1}we=0}var Xe=De.Zo;if(b===H0){switch(De=De.link.computeThickness(),De*=je,Xe.set(_e),Qt){case 8:Xe.x=_e.x+ie/2+zt/2-we-De/2;break;case 2:Xe.y=_e.y+Fe/2+Zt/2-we-De/2;break;case 1:Xe.x=_e.x+ie/2-Mt/2+we+De/2;break;default:case 4:Xe.y=_e.y+Fe/2-yt/2+we+De/2}we+=De}else{var En=.5;b===Wm&&(En=(De.Uo+1)/(De.Gl+1)),Xe.x=_e.x+ie*En,Xe.y=_e.y+Fe*En}}}for(Le.free(st),Le.free(ht),Le.free(nt),Le.free(pt),_e=a.pe,et=0;et<_e.length;et++)b=_e[et],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,on.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}Tf.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},Tf.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Ur,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 et=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<et.y:y.x<et.x)?x+8*b:(a?y.y===et.y:y.x===et.x)?x:x+8*(E-1-b)},Tf.className="Knot";function ey(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Le,this.Gl=this.Uo=0,this.Zo=new Le,this.Ju=0}ey.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()},ey.className="LinkInfo";function ji(a){oi(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Le(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}ji.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},ji.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ji.prototype.qb=function(){},ji.prototype.toString=function(){var a=Un(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},ji.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())}}},ji.prototype.createNetwork=function(){return new xi(this)},ji.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Je?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Pr?y.lg(a.memberParts):y.lg(a.iterator),y},ji.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")}},ji.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()}},ji.prototype.doLayout=function(a){var y=new gn;a instanceof Je?(Wh(this,y,a.nodes,!0,this.rh,!0,!1,!0),Wh(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Pr?Wh(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},ji.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,et=0,nt=0;for(a=a.iterator;a.next();){var st=a.value;ag(st);var ht=st.measuredBounds,pt=ht.width;ht=ht.height,st.moveTo(b,E),st instanceof Pr&&(st.rh=!1),b+=Math.max(pt,50)+20,nt=Math.max(nt,Math.max(ht,50)),et>=y-1?(et=0,b=x,E+=nt+20,nt=0):et++}},ji.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,et=0,nt=this.network.vertexes.iterator;nt.next();){var st=nt.value.node;if(!(st===null||st instanceof Pn)&&(ag(st),this.rh(st))){var ht=st.measuredBounds,pt=ht.width;ht=ht.height,st.moveTo(x,b),st instanceof Pr&&(st.rh=!1),x+=Math.max(pt,50)+20,et=Math.max(et,Math.max(ht,50)),E>=a-1?(E=0,x=y,b+=et+20,et=0):E++}}},ji.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Pr&&a.rh)};function Wh(a,y,x,b,E,et,nt,st){for(x=x.iterator;x.next();){var ht=x.value;b&&!ht.isTopLevel||E!==null&&!E(ht)||!ht.canLayout()||(et&&ht instanceof Mn?ht.isLinkLabel||(ht instanceof Pr&&ht.layout===null?Wh(a,y,ht.memberParts,!1,E,et,nt,st):(ag(ht),y.add(ht))):nt&&ht instanceof Pn?y.add(ht):!st||!ht.Zc()||ht instanceof Mn||(ag(ht),y.add(ht)))}}function ag(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}ji.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new on),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},ji.prototype.ex=function(a){var y=new gn;return a instanceof Je?(Wh(this,y,a.nodes,!0,null,!0,!0,!0),Wh(this,y,a.links,!0,null,!0,!0,!0),Wh(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Pr?Wh(this,y,a.memberParts,!1,null,!0,!0,!0):Wh(this,y,a.iterator,!1,null,!0,!0,!0),y},ji.prototype.initialOrigin=function(a){var y=this.group;if(y!==null){var x=y.position.copy();return(isNaN(x.x)||isNaN(x.y))&&x.set(a),y=y.placeholder,y!==null&&(x=y.ga(ni),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},un.Object.defineProperties(ji.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())}}}),ji.prototype.collectParts=ji.prototype.ex,ji.prototype.getLayoutBounds=ji.prototype.ni,ji.prototype.invalidateLayout=ji.prototype.C,ji.className="Layout";function xi(a){oi(this),this.Sc=a,this.wf=new gn,this.ye=new gn,this.Es=new $n,this.zs=new $n}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 gn,this.ye=new gn,this.Es=new $n,this.zs=new $n},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 So(this)},xi.prototype.createEdge=function(){return new rs(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(nt){if(nt instanceof Mn)return!nt.isLinkLabel;if(nt instanceof Pn){var st=nt.fromNode;return st===null||st.isLinkLabel?!1:(nt=nt.toNode,!(nt===null||nt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof Mn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Pr&&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 et=b.fromNode;E=b.toNode,et!==null&&E!==null&&et!==E&&(et=this.findGroupVertex(et),E=this.findGroupVertex(E),et!==null&&E!==null&&this.Zj(et,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},qt=xi.prototype,qt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},qt.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},qt.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}qt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},qt.ki=function(a){return a===null?null:this.Es.I(a)},qt.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}}qt.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},qt.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))}qt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},qt.Lo=function(a){return a===null?null:this.zs.I(a)},qt.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},qt.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))}},qt.Ko=function(){for(var a=Fn(),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]);Bn(a)},xi.prototype.deleteArtificialVertexes=function(){for(var a=Fn(),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=Fn(),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]);Bn(a),Bn(y)};function Nx(a){for(var y=Fn(),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]);Bn(y)}xi.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Nx(this),this.Ko()),a=new mn;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,et){return E===null||et===null||E===et?0:et.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 gn,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},un.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 So(a){oi(this),this.ob=a,this.j=new on(0,0,10,10).freeze(),this.o=new Le(5,5).freeze(),this.Sh=this.ub=null,this.tg=new mn,this.mg=new mn}So.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new mn,this.mg=new mn},So.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+mi(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 et=b.value;x?x=!1:E+=",",E+=et.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},So.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;en(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 Pr)){x=on.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(Dr);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),on.free(x);return}on.free(x)}a.moveTo(y.x,y.y)}},So.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},So.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},So.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},So.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}un.Object.defineProperties(So.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=on.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,et=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,et,b),on.free(x),!(a instanceof Pr)&&(a=a.locationObject.ga(Dr),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(et/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 gn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new gn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new gn,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 mn,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}}}),So.prototype.deleteDestinationEdge=So.prototype.Jl,So.prototype.addDestinationEdge=So.prototype.zl,So.prototype.deleteSourceEdge=So.prototype.Kl,So.prototype.addSourceEdge=So.prototype.Cl,So.className="LayoutVertex",So.standardComparer=oy,So.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 rs(a){oi(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}rs.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},rs.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+mi(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},rs.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},rs.prototype.commit=function(){},rs.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},un.Object.defineProperties(rs.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)}}}),rs.prototype.getOtherVertex=rs.prototype.Ax,rs.className="LayoutEdge";function _o(a){ji.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=sg,this.Rb=rv,this.nd=lg,this.hd=hS,a&&Object.assign(this,a)}$e(_o,ji),_o.prototype.cloneProtected=function(a){ji.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},_o.prototype.qb=function(a){a.classType===_o?a===lg||a===ov||a===ay||a===iv?this.sorting=a:a===rv||a===yl?this.arrangement=a:a===sg||a===nv?this.alignment=a:Oe("Unknown enum value: "+a):ji.prototype.qb.call(this,a)},_o.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 Pr)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 lg:E.sort(this.comparer);break;case ov:E.sort(this.comparer),E.reverse()}var et=this.wrappingColumn;isNaN(et)&&(et=0);var nt=this.wrappingWidth;switch(isNaN(nt)&&a!==null?(y=a.padding,nt=Math.max(a.viewportBounds.width-y.left-y.right,0)):nt=Math.max(this.wrappingWidth,0),0>=et&&0>=nt&&(et=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 st=y,ht=x,pt=on.alloc(),yt=Math.max(this.cellSize.width,1);if(!isFinite(yt))for(var Mt=yt=0;Mt<E.length;Mt++){var zt=this.ni(E[Mt],pt);yt=Math.max(yt,zt.width)}if(yt=Math.max(yt+st,1),Mt=Math.max(this.cellSize.height,1),!isFinite(Mt))for(zt=Mt=0;zt<E.length;zt++){var Zt=this.ni(E[zt],pt);Mt=Math.max(Mt,Zt.height)}Mt=Math.max(Mt+ht,1),zt=this.arrangement;for(var Qt=Zt=this.arrangementOrigin.x,ie=this.arrangementOrigin.y,Ee=0,we=0,je=0;je<E.length;je++){var Fe=E[je],De=this.ni(Fe,pt),_e=Math.ceil((De.width+st)/yt)*yt,Xe=Math.ceil((De.height+ht)/Mt)*Mt;switch(zt){case yl:var En=Math.abs(Qt-De.width);break;default:En=Qt+De.width}switch((0<et&&Ee>et-1||0<nt&&0<Ee&&En-Zt>nt)&&(b.push(new on(0,ie,nt+st,we)),Ee=0,Qt=Zt,ie+=we,we=0),we=Math.max(we,Xe),zt){case yl:De=-De.width;break;default:De=0}switch(Fe.moveTo(Qt+De,ie),zt){case yl:Qt-=_e;break;default:Qt+=_e}Ee++}b.push(new on(0,ie,nt+st,we)),on.free(pt);break;case sg:for(ht=nt,yt=et,Mt=y,zt=x,nt=on.alloc(),Zt=Math.max(this.cellSize.width,1),et=ie=pt=0,st=Le.alloc(),Qt=0;Qt<E.length;Qt++)we=E[Qt],Ee=this.ni(we,nt),we=ih(we,we.locationObject,we.locationSpot,st),pt=Math.max(pt,we.x),ie=Math.max(ie,Ee.width-we.x),et=Math.max(et,we.y);switch(Qt=this.arrangement,Qt){case yl:pt+=Mt;break;default:ie+=Mt}Zt=isFinite(Zt)?Math.max(Zt+Mt,1):Math.max(pt+ie,1);var Gn=we=this.arrangementOrigin.x;for(je=this.arrangementOrigin.y,ie=0,ht>=pt&&(ht-=pt),pt=Fe=0,_e=Math.max(this.cellSize.height,1),De=et=0,Xe=!0,Ee=Le.alloc(),En=0;En<E.length;En++){var Dn=E[En],wn=this.ni(Dn,nt),hn=ih(Dn,Dn.locationObject,Dn.locationSpot,st);if(0<ie)switch(Qt){case yl:Gn=(Gn-we-(wn.width-hn.x))/Zt,Gn=Ge.$(Math.round(Gn),Gn)?Math.round(Gn):Math.floor(Gn),Gn=Gn*Zt+we;break;default:Gn=(Gn-we+hn.x)/Zt,Gn=Ge.$(Math.round(Gn),Gn)?Math.round(Gn):Math.ceil(Gn),Gn=Gn*Zt+we}else switch(Qt){case yl:Fe=Gn+hn.x+wn.width;break;default:Fe=Gn-hn.x}switch(Qt){case yl:var br=-(Gn+hn.x)+Fe;break;default:br=Gn+wn.width-hn.x-Fe}if(0<yt&&ie>yt-1||0<ht&&0<ie&&br>ht){for(b.push(new on(0,Xe?je-et:je,ht+Mt,De+et+zt)),Gn=0;Gn<ie&&En!==ie;Gn++){br=E[En-ie+Gn];var fr=ih(br,br.locationObject,br.locationSpot,Ee);br.moveTo(br.position.x,br.position.y+et-fr.y)}De+=zt,je=Xe?je+De:je+(De+et),ie=De=et=0,Gn=we,Xe=!1}switch(Gn===we&&(pt=Qt===yl?Math.max(pt,wn.width-hn.x):Math.min(pt,-hn.x)),et=Math.max(et,hn.y),De=Math.max(De,wn.height-hn.y),isFinite(_e)&&(De=Math.max(De,Math.max(wn.height,_e)-hn.y)),Xe?Dn.moveTo(Gn-hn.x,je-hn.y):Dn.moveTo(Gn-hn.x,je),Qt){case yl:Gn-=hn.x+Mt;break;default:Gn+=wn.width-hn.x+Mt}ie++}if(b.push(new on(0,je,ht+Mt,(Xe?De:De+et)+zt)),E.length!==ie)for(ht=0;ht<ie;ht++)yt=E[E.length-ie+ht],Mt=ih(yt,yt.locationObject,yt.locationSpot,st),yt.moveTo(yt.position.x,yt.position.y+et-Mt.y);if(Le.free(st),Le.free(Ee),Qt===yl)for(E=0;E<b.length;E++)et=b[E],et.width+=pt,et.x-=pt;else for(E=0;E<b.length;E++)et=b[E],et.x>pt&&(et.width+=et.x-pt,et.x=pt);on.free(nt)}for(st=et=nt=E=0;st<b.length;st++)ht=b[st],E=Math.min(E,ht.x),nt=Math.min(nt,ht.y),et=Math.max(et,ht.x+ht.width);this.arrangement===yl?this.commitLayers(b,new Le(E+y/2-(et+E),nt-x/2)):this.commitLayers(b,new Le(E-y/2,nt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},_o.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}un.Object.defineProperties(_o.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!==sg&&a!==nv||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==rv&&a!==yl||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ay&&a!==iv&&a!==lg&&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 tn(_o,"Position",0),sg=new tn(_o,"Location",1),rv=new tn(_o,"LeftToRight",2),yl=new tn(_o,"RightToLeft",3),ay=new tn(_o,"Forward",4),iv=new tn(_o,"Reverse",5),lg=new tn(_o,"Ascending",6),ov=new tn(_o,"Descending",7);_o.className="GridLayout",_o.standardComparer=hS,_o.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},_o.Position=nv,_o.Location=sg,_o.LeftToRight=rv,_o.RightToLeft=yl,_o.Forward=ay,_o.Reverse=iv,_o.Ascending=lg,_o.Descending=ov;function li(){this.On=new gn,this.Dn=new gn,this.Pa=new gn,this.cf=new $n,this.bf=new $n,this.aj=new $n,this.H=null,this.tp=!1}qt=li.prototype,qt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},qt.Xe=function(a){this.H=a},qt.oi=function(a){if(a instanceof Mn){if(this.On.add(a),a instanceof Pr){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 qr||this.Pa.add(a);y=a.data,y===null||a instanceof qr||(a instanceof Pn?this.bf.add(y,a):this.cf.add(y,a))},qt.pc=function(a){if(a.Ej(),a instanceof Mn){if(this.On.remove(a),a instanceof Pr){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 qr||this.Pa.remove(a);y=a.data,y===null||a instanceof qr||(a instanceof Pn?this.bf.remove(y):this.cf.remove(y))},qt.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 Pr)&&Oe('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 Pr||Oe('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||Oe('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Fn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Fn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Fn(),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]);Bn(y),Bn(x),Bn(a)}},li.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},li.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&&ld(this.diagram,!1)};function cS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=fS(a,y,b);if(E!==null&&(Hs(E),E=E.copy(),E!==null)){var et=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=et,b=E;break t}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}li.prototype.insertLink=function(){return null},li.prototype.resolveReferencesForData=function(){},li.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,An('No Group template found for category "'+x+'"'),An(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,An('No Node template found for category "'+x+'"'),An(" Using default node template")),y=a.ny))),y}li.prototype.getLinkCategoryForData=function(){return""},li.prototype.setLinkCategoryForData=function(){},li.prototype.setFromNodeForLink=function(){},li.prototype.setToNodeForLink=function(){},li.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,An('No Link template found for category "'+a+'"'),An(" Using default link template")),x=y.my)),x},li.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},li.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},li.prototype.ip=function(a){a=this.Lc(a),a!==null&&(bp(this.diagram,a,!1),this.unresolveReferencesForPart(a))},li.prototype.unresolveReferencesForPart=function(){},li.prototype.removeDataForLink=function(){},li.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},li.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Mn?a:null)},li.prototype.findLinkForKey=function(){return null},qt=li.prototype,qt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},qt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Mn?a:null)},qt.Kc=function(a){return a===null?null:this.bf.I(a)},qt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new gn;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var et=0;et<arguments.length;et++){var nt=arguments[et];if(en(nt)&&sy(this,E,nt)){y.add(b);break}}}return y.iterator},qt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new gn;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var et=0;et<arguments.length;et++){var nt=arguments[et];if(en(nt)&&sy(this,E,nt)){y.add(b);break}}}return y.iterator};function sy(a,y,x){for(var b in x){var E=y[b],et=x[b];if(Tn(et)){if(!Tn(E)||E.length<et.length)return!1;for(var nt=0;nt<E.length;nt++){var st=et[nt];if(st!==void 0&&!dS(a,E[nt],st))return!1}}else if(!dS(a,E,et))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(en(y)&&en(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}li.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===Di){if(b==="nodeCategory"){var E=this.Lc(a.object),et=a.newValue;E!==null&&typeof et=="string"&&(E.category=et)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===$i){var nt=a.newValue;b==="nodeDataArray"&&en(nt)&&cS(this,nt),y.isModified=!0}else if(x===vo){var st=a.oldValue;b==="nodeDataArray"&&en(st)&&this.ip(st),y.isModified=!0}else x===qa&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===Di){var ht=a.propertyName,pt=a.object;pt===y.model?(ht==="nodeKeyProperty"||ht==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(pt,ht),y.isModified=!0}else if(x===$i||x===vo){var yt=a.change===$i,Mt=yt?a.newParam:a.oldParam,zt=yt?a.newValue:a.oldValue,Zt=this.aj.I(a.object);if(Array.isArray(Zt))for(a=0;a<Zt.length;a++){var Qt=Zt[a];if(yt)Cm(Qt,zt,Mt,!0);else if(!(0>Mt)){var ie=Mt+Wp(Qt);Qt.pc(ie,!0),w0(Qt,ie,Mt)}}y.isModified=!0}}finally{y.aa=!0}}}}},li.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)},li.prototype.rp=function(){for(var a=this.H.model,y=new gn,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(nt){nt.data===null||y.contains(nt.data)||E.push(nt.data)}),this.parts.each(function(nt){nt.data===null||y.contains(nt.data)||E.push(nt.data)}),E.forEach(function(nt){kS(a,nt,!1)}),b=0;b<x.length;b++){var et=x[b];this.Lc(et)===null&&CS(a,et,!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()},li.prototype.refreshDataBoundLinks=function(){},li.prototype.updateRelationshipsFromData=function(){},li.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,et=0;et<E.length;et++){var nt=E[et].sx(a);nt!==null&&(x===null&&(x=Fn()),x.push(nt))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Bn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(Tn(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){Oc(y,function(nt){nt=nt.O.s;for(var st=nt.length,ht=0;ht<st;ht++)Mp(x,nt[ht])});var b=y.Hh;if(Tn(b)){var E=a.aj.I(b);if(E!==null){for(var et=0;et<E.length;et++)if(E[et]===y){E.splice(et,1),E.length===0&&a.aj.remove(b);break}}}}li.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new $n;if(Tn(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 gn;for(var et=new $n,nt=b.iterator;nt.next();){var st=nt.value;if(st instanceof Pn)a||st.fromNode!==null&&st.toNode!==null||E.add(st);else if(st instanceof Mn&&st.data!==null&&x.Tl()){var ht=st;st=nt.key;var pt=st.pg();pt!==null&&(pt=b.I(pt),pt!==null?(x.qe(ht.data,x.wa(pt.data)),ht=y.Kc(ht.data),st=st.kh(),st!==null&&ht!==null&&et.add(st,ht)):x.qe(ht.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<et.count)for(x=et.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var yt=new $n;b.each(function(Mt){Mt.key.data!==null&&yt.add(Mt.key.data,Mt.value.data)}),x(yt,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 et=a.copyPartData(y,x);if(!(et instanceof nr))return null;if(et.isSelected=!1,et.isHighlighted=!1,b.add(y,et),y instanceof Mn){for(var nt=y.linksConnected;nt.next();){var st=nt.value;if(st.fromNode===y){var ht=b.I(st);ht!==null&&(ht.fromNode=et)}st.toNode===y&&(st=b.I(st),st!==null&&(st.toNode=et))}if(y instanceof Pr&&et instanceof Pr)for(y=y.memberParts;y.next();)nt=av(a,y.value,x,b,E),nt instanceof Pn||nt===null||(nt.containingGroup=et)}else if(y instanceof Pn&&et instanceof Pn)for(nt=y.fromNode,nt!==null&&(nt=b.I(nt),nt!==null&&(et.fromNode=nt)),nt=y.toNode,nt!==null&&(nt=b.I(nt),nt!==null&&(et.toNode=nt)),y=y.labelNodes;y.next();)nt=av(a,y.value,x,b,E),nt!==null&&nt instanceof Mn&&(nt.labeledLink=et);return et}li.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),en(b)&&(E.xf(b),x=y.Lc(b)))}else Hs(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)),en(E)&&(x.data=E)));return x},un.Object.defineProperties(li.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}}}),li.prototype.updateAllRelationshipsFromData=li.prototype.rp,li.prototype.findLinksByExample=li.prototype.ls,li.prototype.findNodesByExample=li.prototype.ms,li.prototype.findLinkForData=li.prototype.Kc,li.prototype.findNodeForData=li.prototype.ii,li.prototype.findPartForData=li.prototype.Lc,li.prototype.findNodeForKey=li.prototype.Vb,li.prototype.removeModeledPart=li.prototype.ip,li.prototype.removeModeledParts=li.prototype.Gs,li.prototype.rebuildParts=li.prototype.Wd;var pS=!1,gS=!1,mS=!1;li.className="PartManager";function To(a){li.apply(this,arguments)}$e(To,li),To.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},To.prototype.addModeledParts=function(a){for(li.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Ld(a.value);ld(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),ld(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){Hs(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 et=hv(x,y,!0);et!==""&&(E.fromPortId=et),et=ys(x,y,!0),et!==void 0&&(et=a.Vb(et),et instanceof Mn&&(E.fromNode=et)),et=hv(x,y,!1),et!==""&&(E.toPortId=et),et=ys(x,y,!1),et!==void 0&&(et=a.Vb(et),et instanceof Mn&&(E.toNode=et)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(nt){nt=a.Vb(nt),nt!==null&&(nt.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}To.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)})}To.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},To.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},To.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},To.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},To.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},To.prototype.findPartForKey=function(a){var y=li.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},To.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},To.prototype.doModelChanged=function(a){var y=this;if(li.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===Di){if(E==="linkFromKey"){var et=this.Kc(a.object);if(et!==null){var nt=this.Vb(a.newValue);et.fromNode=nt}}else if(E==="linkToKey"){var st=this.Kc(a.object);if(st!==null){var ht=this.Vb(a.newValue);st.toNode=ht}}else if(E==="linkFromPortId"){var pt=this.Kc(a.object);if(pt!==null){var yt=a.newValue;typeof yt=="string"&&(pt.fromPortId=yt)}}else if(E==="linkToPortId"){var Mt=this.Kc(a.object);if(Mt!==null){var zt=a.newValue;typeof zt=="string"&&(Mt.toPortId=zt)}}else if(E==="nodeGroupKey"){var Zt=this.Lc(a.object);if(Zt!==null){var Qt=a.newValue;if(Qt!==void 0){var ie=this.Vb(Qt);ie instanceof Pr?Zt.containingGroup=ie:Zt.containingGroup=null}else Zt.containingGroup=null}}else if(E==="linkLabelKeys"){var Ee=this.Kc(a.object);if(Ee!==null){var we=a.oldValue,je=a.newValue;Array.isArray(we)&&we.forEach(function(hn){0<=je.indexOf(hn)||(hn=y.Vb(hn),hn!==null&&(hn.labeledLink=null))}),Array.isArray(je)&&je.forEach(function(hn){hn=y.Vb(hn),hn!==null&&(hn.labeledLink=Ee)})}}else if(E==="linkCategory"){var Fe=this.Kc(a.object),De=a.newValue;Fe!==null&&typeof De=="string"&&(Fe.category=De)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===$i){var _e=a.newValue;if(E==="linkDataArray"&&typeof _e=="object"&&_e!==null)yS(this,_e);else if(E==="linkLabelKeys"&&Vh(_e)){var Xe=this.Kc(a.object),En=this.Vb(_e);Xe!==null&&En!==null&&(En.labeledLink=Xe)}x.isModified=!0}else if(b===vo){var Gn=a.oldValue;if(E==="linkDataArray"&&typeof Gn=="object"&&Gn!==null)this.ip(Gn);else if(E==="linkLabelKeys"&&Vh(Gn)){var Dn=this.Vb(Gn);Dn!==null&&(Dn.labeledLink=null)}x.isModified=!0}}else if(b===Di){var wn=a.propertyName;a.object!==x.model||wn!=="linkFromKeyProperty"&&wn!=="linkToKeyProperty"&&wn!=="linkFromPortIdProperty"&&wn!=="linkToPortIdProperty"&&wn!=="linkLabelKeysProperty"&&wn!=="nodeIsGroupProperty"&&wn!=="nodeGroupKeyProperty"&&wn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},To.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new gn,b=y.linkDataArray;b.forEach(function(et){x.add(et)});var E=[];this.links.each(function(et){et.data===null||x.contains(et.data)||E.push(et.data)}),E.forEach(function(et){NS(y,et,!1)}),b.forEach(function(et){a.Kc(et)===null&&AS(y,et,!1)})},To.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=ys(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=ys(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 et=a.labelNodes.first();if(b.wa(et.data)===E)return}E=new gn().addAll(y);var nt=new gn;a.labelNodes.each(function(st){st.data!==null&&(st=b.wa(st.data),st!==void 0&&nt.add(st))}),y=nt.copy(),y.hp(E),E=E.copy(),E.hp(nt),(0<y.count||0<E.count)&&(y.each(function(st){st=x.Vb(st),st!==null&&st.labeledLink===a&&(st.labeledLink=null)}),E.each(function(st){st=x.Vb(st),st!==null&&st.labeledLink!==a&&(st.labeledLink=a)}))}}else!(a instanceof qr)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Pr)&&(a.containingGroup=y)}}},To.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=ug(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var et={};b.next();){var nt=b.value;y.lb(nt)?E instanceof Pr&&y.lh(nt)===x&&(nt=this.Lc(nt),nt!==null&&(nt.containingGroup=E)):(et.link=this.Kc(nt),et.link!==null&&E instanceof Mn&&(ys(y,nt,!0)===x&&(et.link.fromNode=E),ys(y,nt,!1)===x&&(et.link.toNode=E),nt=y.Ef(nt),Array.isArray(nt)&&nt.some(function(st){return function(ht){return ht===x?(E.labeledLink=st.link,!0):!1}}(et)))),et={link:et.link}}xl(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Pr&&(E.containingGroup=a))}},To.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Mn){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Sl(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Sl(y,x,b.data)),a instanceof Pr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Sl(y,x,b)}}},To.prototype.copyPartData=function(a,y){var x=li.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},To.prototype.insertLink=function(a,y,x,b){var E=this.diagram,et=E.model,nt=E.toolManager.findTool("Linking"),st="";if(a!==null&&(y===null&&(y=a),st=y.portId,st===null&&(st="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=nt.archetypeLinkData,b instanceof Pn){if(Hs(b),et=b.copy(),et!==null)return et.fromNode=a,et.fromPortId=st,et.toNode=x,et.toPortId=y,E.add(et),a=nt.archetypeLabelNodeData,a instanceof Mn&&(Hs(a),a=a.copy(),a!==null&&(a.labeledLink=et,E.add(a))),et}else if(b!==null&&(b=et.Jo(b),typeof b=="object"&&b!==null))return a!==null&&Dd(et,b,et.wa(a.data),!0),Bd(et,b,st,!0),x!==null&&Dd(et,b,et.wa(x.data),!1),Bd(et,b,y,!1),et.fi(b),a=nt.archetypeLabelNodeData,a===null||a instanceof Mn||(a=et.copyNodeData(a),typeof a=="object"&&a!==null&&(et.xf(a),a=et.wa(a),a!==void 0&&et.Bu(b,a))),E.Kc(b);return null},To.prototype.findLinkForKey=To.prototype.findLinkForKey,To.prototype.findPartForKey=To.prototype.findPartForKey,To.prototype.removeAllModeledParts=To.prototype.removeAllModeledParts,To.prototype.addModeledParts=To.prototype.addModeledParts,To.prototype.addAllModeledParts=To.prototype.addAllModeledParts,To.className="GraphLinksPartManager";function Os(){li.apply(this,arguments),this.Sg=null}$e(Os,li);function sv(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,et=x;if(a.diagram.isTreePathToChildren||(E=x,et=y),(b===null||!pa(b,E,et,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(Hs(b),b=b.copy(),b!==null))){var nt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=et,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=nt}}}Os.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Os.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Os.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}},Os.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))},Os.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Os.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Os.prototype.doModelChanged=function(a){if(li.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===Di){if(b==="nodeParentKey"){var E=a.object,et=this.Vb(a.newValue),nt=this.ii(E);if(this.Sg!==null)et!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(nt!==null){var st=nt.kh();st!==null?et===null?y.remove(st):y.isTreePathToChildren?st.fromNode=et:st.toNode=et:sv(this,et,nt)}}else if(b==="parentLinkCategory"){var ht=this.ii(a.object),pt=a.newValue;if(ht!==null&&typeof pt=="string"){var yt=ht.kh();yt!==null&&(yt.category=pt)}}y.isModified=!0}}else if(x===Di){var Mt=a.propertyName;a.object===y.model&&Mt==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Os.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Mn&&(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&&bp(x,b,!1)))}}},Os.prototype.updateDataBindings=function(a,y){li.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Os.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=ug(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var et=b.value;y.lb(et)&&E instanceof Mn&&y.mh(et)===x&&sv(this,E,this.ii(et))}xl(y,x)}a=y.mh(a),a!==void 0&&E instanceof Mn&&(a=this.Vb(a),sv(this,a,E))}},Os.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Mn){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 et=E.pc(-1,b,!1);0<=et&&this.diagram.cb(vo,"parts",E,b,null,et,null),et=b.layerChanged,et!==null&&et(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)&&Sl(y,x,E)}},Os.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},Os.prototype.findLinkForKey=Os.prototype.findLinkForKey,Os.className="TreePartManager";function Zn(a,y){this.kl=new gn,this.il=new gn,this.Wv=`,
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
"removedNodeKeys": `,this.vh=null,oi(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new $n,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 $n,this.Lt=new mn,this.Wg=!1,this.o=null,this.undoManager=new Ri,a!==void 0&&(Tn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Zn.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},Zn.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Zn.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Zn.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)+":"+cr(E)}}return y},Zn.prototype.xA=function(a){a.change!==qa&&Oe("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Mo?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Zn.prototype.Qv=function(a,y){var x=this,b=!1,E=new gn,et=new gn,nt=new gn,st=this.vh;a.changes.each(function(Mt){Mt.model===x&&(Mt.modelChange==="nodeDataArray"?Mt.change===$i?E.add(Mt.newValue):Mt.change===vo&&nt.add(Mt.oldValue):x.lb(Mt.object)?et.add(Mt.object):Mt.change!==Di||x.modelData!==Mt.object&&Mt.propertyName!=="modelData"?Mt.object!==null&&(st&&st.contains(Mt.object)?st.get(Mt.object).each(function(zt){x.lb(zt)&&et.add(zt)}):Mt.object instanceof Zn||x.ri()&&x.Jc(Mt.object)||bS(x,Mt.object).each(function(zt){et.add(zt)})):b=!0)});var ht=this.il;ht.clear(),E.each(function(Mt){ht.add(x.wa(Mt)),y||et.add(Mt)});var pt=this.kl;pt.clear(),nt.each(function(Mt){pt.add(x.wa(Mt)),y&&et.add(Mt)}),a=x.cloneDeep(et.Fa());var yt=null;return b&&(yt===null&&(yt={}),yt.modelData=this.cloneDeep(this.modelData)),0<ht.count&&(yt===null&&(yt={}),y?yt.removedNodeKeys=ht.Fa():yt.insertedNodeKeys=ht.Fa()),0<a.length&&(yt===null&&(yt={}),yt.modifiedNodeData=a),0<pt.count&&(yt===null&&(yt={}),y?yt.insertedNodeKeys=pt.Fa():yt.removedNodeKeys=pt.Fa()),pt.clear(),ht.clear(),yt},Zn.prototype.cloneDeep=function(a){return Fd(this,a,!0)};function Fd(a,y,x,b,E,et){function nt(Mt,zt){st?(Mt.__gohashid===void 0&&et.push(Mt),b.set(Mt,zt)):(Mt=Bi++,b.set(Mt,zt),E.set(Mt,y))}if(!en(y))return y;et||(et=[]);var st=Object.isExtensible(y);if(b||(b=new $n),st){var ht=b.get(y);if(ht)return ht}else for(E||(E=new $n),ht=E.iterator;ht.next();){var pt=ht.key;if(ht.value===y&&(pt=b.get(pt)))return pt}if(Array.isArray(y)){ht=[],nt(y,ht);for(var yt=0;yt<y.length;yt++)ht.push(Fd(a,y[yt],!1,b,E,et))}else if(y instanceof Le||y instanceof Cn||y instanceof on||y instanceof Br||y instanceof rr)ht=y.copy(),nt(y,ht);else{if(y instanceof si||y instanceof bn||y instanceof tn)return y;if(y instanceof mn)ht=new mn().addAll(Fd(a,y.Fa(),!1,b,E,et)),nt(y,ht);else if(y instanceof gn)ht=new gn().addAll(Fd(a,y.Fa(),!1,b,E,et)),nt(y,ht);else if(y instanceof $n)ht=new $n().addAll(Fd(a,y.Fa(),!1,b,E,et)),nt(y,ht);else if(y instanceof Date)ht=new Date(y.getTime()),nt(y,ht);else if(y instanceof RegExp)ht=new RegExp(y),nt(y,ht),ht.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ht=y.copy(),nt(y,ht);else for(yt in ht={},nt(y,ht),y)yt!=="__gohashid"&&(ht[yt]=Fd(a,y[yt],!1,b,E,et))}return x&&et.forEach(function(Mt){delete Mt.__gohashid}),ht}qt=Zn.prototype,qt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},qt.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},qt.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,en(y)&&(a.dm(y),a.modelData=y)}qt.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": `+Hh(this,this.nodeDataArray,!0)},qt.kv=function(a){xS(this,a),a=a.nodeDataArray,Tn(a)&&(this.dm(a),this.nodeDataArray=a)};function wS(a,y){function x(E,et){if((et=et.part)&&(et=et.data,E!==et)){var nt=b.get(E);nt===null?(nt=new gn,nt.add(et),b.add(E,nt)):nt.add(et)}}var b=a.vh;b===null&&(b=new $n,y.changes.each(function(E){if(E.diagram!==null){var et=E.change;et===Di?(E=E.object.panel)&&(et=E.data)&&x(et,E):(et===$i||et===vo)&&(E=E.object,(et=E.itemArray)&&x(et,E))}}),a.vh=b)}function bS(a,y){for(var x=new gn,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 et=0;et<x.length;et++){var nt=x[et];if(nt===y)return E.add(b),!0;if(lv(a,y,nt,b,E))return!0}else if(en(x)&&Object.getPrototypeOf(x)===Object.prototype)for(et in x){if(nt=x[et],nt===y)return E.add(b),!0;if(lv(a,y,nt,b,E))return!0}return!1}qt.Pv=function(a,y){var x=this,b=!1,E=new gn,et=new gn,nt=new gn,st=this.vh;a.changes.each(function(yt){yt.model===x&&(yt.modelChange==="nodeDataArray"?yt.change===$i?E.add(yt.newValue):yt.change===vo&&nt.add(yt.oldValue):x.lb(yt.object)?et.add(yt.object):yt.change!==Di||x.modelData!==yt.object&&yt.propertyName!=="modelData"?yt.object!==null&&(st&&st.contains(yt.object)?st.get(yt.object).each(function(Mt){x.lb(Mt)&&et.add(Mt)}):yt.object instanceof Zn||x.ri()&&x.Jc(yt.object)||bS(x,yt.object).each(function(Mt){et.add(Mt)})):b=!0)});var ht=this.il;ht.clear(),E.each(function(yt){ht.add(x.wa(yt)),y||et.add(yt)});var pt=this.kl;return pt.clear(),nt.each(function(yt){pt.add(x.wa(yt)),y&&et.add(yt)}),a="",b&&(a+=`,
|
|
"modelData": `+hy(this,this.modelData)),0<ht.count&&(a+=(y?this.Yv:this.Wv)+Hh(this,ht.Fa(),!0)),0<et.count&&(a+=this.jy+Hh(this,et.Fa(),!0)),0<pt.count&&(a+=(y?this.Wv:this.Yv)+Hh(this,pt.Fa(),!0)),pt.clear(),ht.clear(),a},qt.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)&&Oe("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new $n;if(Array.isArray(x))for(var E=0;E<x.length;E++){var et=x[E],nt=this.wa(et);nt!=null&&b.set(nt,et)}if(Array.isArray(y))for(E=y.length,et=0;et<E;et++){nt=y[et];var st=this.hc(nt);st===null&&(st=(st=b.get(nt))?st:this.copyNodeData({}),this.km(st,nt),this.xf(st))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],et=this.wa(E),et=this.hc(et),et!==null){for(var ht in E)ht==="__gohashid"||ht===this.nodeKeyProperty||this.Wj()&&ht===this.nodeIsGroupProperty||this.setDataProperty(et,ht,E[ht]);this.lm(E,et)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,ht=0;ht<x;ht++)y=this.hc(a[ht]),y!==null&&this.cm(y)},qt.$x=function(a,y){a.change!==qa&&Oe("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Mo?(y===void 0&&(y=hg(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 }'},qt.yA=function(a,y){return this.$x(a,y)},qt.np=function(a){return a===void 0&&(a=hg(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},qt.toJSON=function(a){return this.np(a)},qt.Zw=function(a){var y=null;if(typeof a=="string")try{y=xn.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Oe("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Oe("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},qt.Ky=function(a){return this.Zw(a)},Zn.constructGraphLinksModel=function(){return new Zn},qt=Zn.prototype,qt.dm=function(a){if(Tn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(en(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Oe("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(en(a)){for(y in a)if(x=a[y],en(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 mn,b=0;b<x.length/2;b++)E.add(new Le(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return jx(a)}return a},qt.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()):Tn(a)?Hh(this,a):en(a)?hy(this,a):typeof a=="function"?"null":a.toString()};function Hh(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new gr;E.add("["),x&&1<b&&E.add(`
|
|
`);for(var et=0;et<b;et++){var nt=y[et];nt!==void 0&&(0<et&&(E.add(","),x&&E.add(`
|
|
`)),E.add(a.sm(nt)))}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 Ca(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof Le)y={class:"go.Point",x:Ca(x.x),y:Ca(x.y)};else if(x instanceof Cn)y={class:"go.Size",width:Ca(x.width),height:Ca(x.height)};else if(x instanceof on)y={class:"go.Rect",x:Ca(x.x),y:Ca(x.y),width:Ca(x.width),height:Ca(x.height)};else if(x instanceof Br)y={class:"go.Margin",top:Ca(x.top),right:Ca(x.right),bottom:Ca(x.bottom),left:Ca(x.left)};else if(x instanceof rr)x.sb()?y={class:"go.Spot",x:Ca(x.x),y:Ca(x.y),offsetX:Ca(x.offsetX),offsetY:Ca(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof si){if(y={class:"go.Brush",type:x.type.name},x.type===eh?y.color=x.color:(x.type===wu||x.type===Ns)&&(y.start=x.start,y.end=x.end,x.type===Ns&&(x.startRadius!==0&&(y.startRadius=Ca(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Ca(x.endRadius)))),x.colorStops!==null){var b={};for(x=x.colorStops.iterator;x.next();)b[x.key]=x.value;y.colorStops=b}}else x instanceof bn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Ca(x.startX)),x.startY!==0&&(y.startY=Ca(x.startY)),x.endX!==0&&(y.endX=Ca(x.endX)),x.endY!==0&&(y.endY=Ca(x.endY)),x.spot1.D(ni)||(y.spot1=x.spot1),x.spot2.D(oo)||(y.spot2=x.spot2),x.type===bn.o&&(y.path=bn.ia(x))):x instanceof tn&&(y={class:"go.EnumValue",classType:hg(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var et=Qi(y,E);if(!PS(E,et))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&et instanceof mn){var nt="[";for(et=et.iterator;et.next();){var st=et.value;1<nt.length&&(nt+=","),nt+=a.sm(st.x),nt+=",",nt+=a.sm(st.y)}nt+="]",b+=nt}else b+=a.sm(et)}return b+"}"}function ka(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 Le(ka(a.x),ka(a.y));else if(y==="Size")x=new Cn(ka(a.width),ka(a.height));else if(y==="Rect")x=new on(ka(a.x),ka(a.y),ka(a.width),ka(a.height));else if(y==="Margin")x=new Br(ka(a.top),ka(a.right),ka(a.bottom),ka(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Ui(a.enum):x=new rr(ka(a.x),ka(a.y),ka(a.offsetX),ka(a.offsetY));else if(y==="Brush"){if(x=new si,x.type=tr(si,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof rr&&(x.start=a.start),a.end instanceof rr&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=ka(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=ka(a.endRadius)),a=a.colorStops,en(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=bn.parse(a.path):x=new bn,x.type=tr(bn,a.type),typeof a.startX=="number"&&(x.startX=ka(a.startX)),typeof a.startY=="number"&&(x.startY=ka(a.startY)),typeof a.endX=="number"&&(x.endX=ka(a.endX)),typeof a.endY=="number"&&(x.endY=ka(a.endY)),a.spot1 instanceof rr&&(x.spot1=a.spot1),a.spot2 instanceof rr&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=tr(b,a.name)));return x}qt.Pe=function(a){return this.Lt.add(a),this},qt.ik=function(a){this.Lt.remove(a)},qt.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)},qt.cb=function(a,y,x,b,E,et,nt){fo(this,"",a,y,x,b,E,et,nt)},qt.g=function(a,y,x,b,E){fo(this,"",Di,a,this,y,x,b,E)},qt.Fs=function(a,y,x,b,E,et){fo(this,"",Di,y,a,x,b,E,et)};function fo(a,y,x,b,E,et,nt,st,ht){st===void 0&&(st=null),ht===void 0&&(ht=null);var pt=new Ii;pt.model=a,pt.change=x,pt.modelChange=y,pt.propertyName=b,pt.object=E,pt.oldValue=et,pt.oldParam=st,pt.newValue=nt,pt.newParam=ht,a.ds(pt)}Zn.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Di){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)),Li(x,b,E)}else a.change===$i?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,en(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&er(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&On(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!Tn(b)&&a.propertyName&&(b=Qi(a.object,a.propertyName)),Tn(b)&&typeof x=="number"&&(a=a.newValue,y?er(b,x):On(b,x,a))):Oe("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===vo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,en(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&On(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&er(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!Tn(b)&&a.propertyName&&(b=Qi(a.object,a.propertyName)),Tn(b)&&typeof x=="number"&&(a=a.oldValue,y?On(b,x,a):er(b,x))):Oe("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==qa&&Oe("unknown ChangedEvent: "+a.toString())},Zn.prototype.Ea=function(a){return this.undoManager.Ea(a)},Zn.prototype.eb=function(a){return this.undoManager.eb(a)},Zn.prototype.Kf=function(){return this.undoManager.Kf()},Zn.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}},qt=Zn.prototype,qt.La=function(a,y){y===void 0&&(y=""),fo(this,"SourceChanged",qa,y,a,null,null)},qt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Qi(a,y),y!==void 0)){if(Vh(y))return y;Oe("Key value for node data "+a+" is not a number or a string: "+y)}}},qt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Qi(a,x);b!==y&&this.hc(y)===null&&(Li(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),fo(this,"nodeKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else Li(a,x,y)}};function Vh(a){return typeof a=="number"||typeof a=="string"}qt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},qt.hc=function(a){return a===null&&Oe("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Vh(a)?this.kb.I(a):null},qt.$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))){Li(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;Li(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Li(a,y,x)}}}}},qt.xf=function(a){a!==null&&(Gi(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&&Oe("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,On(a.Tc,b,y)),fo(a,"nodeDataArray",$i,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}qt.Fy=function(a){if(Tn(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)},qt.cm=function(a){a!==null&&kS(this,a,!0)};function kS(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){t: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 t}b=-1}if(0>b)return;er(a.Tc,b)}fo(a,"nodeDataArray",vo,"nodeDataArray",a,y,null,b,null),a.qp(y)}qt.nA=function(a){if(Tn(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)},qt.$z=function(a){if(a!==this.nodeDataArray&&Tn(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 et=a[E],nt=this.wa(et);if(nt!==void 0){x.add(nt);var st=this.hc(nt);st!==et&&(st!==null?(this.Do(st,et),this.lm(et,st)):(et=this.cloneDeep(et),this.km(et,nt),this.xf(et)))}else nt=this.cloneDeep(et),this.xf(nt),x.add(this.wa(nt))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},qt.jp=function(a,y){y!==void 0&&(a=ug(this,a),a instanceof gn&&this.Vf.add(y,a))},qt.Lv=function(){},qt.fm=function(){},qt.em=function(){},qt.qp=function(){};function Sl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new gn,a.Vf.add(y,b)),b.add(x)}}function xl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof gn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function ug(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof gn?a:null)}qt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Zn.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):uv(this,a,!0),en(a)&&oi(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 oi(b),b}if(x&&en(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 et=Qi(y,b),nt=hg(a,et);nt==="GraphObject"||nt==="Diagram"||nt==="Layer"||nt==="RowColumnDefinition"||nt==="AnimationManager"||nt==="Tool"||nt==="CommandHandler"||nt==="Layout"||nt==="InputEvent"||nt==="DiagramEvent"||et instanceof Zn||et instanceof Ri||et instanceof Mo||et instanceof Ii||(et=uv(a,et,!1)),Li(x,b,et)}return oi(x),x}return y instanceof Le||y instanceof Cn||y instanceof on||y instanceof rr||y instanceof Br?y.copy():y}Zn.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!ES&&a instanceof ze&&(ES=!0,An('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),An(" Is that really your intent?"));var b=Qi(a,y);b!==x&&(Li(a,y,x),this.Fs(a,y,b,x))},qt=Zn.prototype,qt.set=function(a,y,x){this.setDataProperty(a,y,x)},qt.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])}},qt.Ay=function(a,y){this.ts(a,-1,y)},qt.ts=function(a,y,x){0>y&&(y=a.length),On(a,y,x),fo(this,"",$i,"",a,null,x,null,y)},qt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Oe("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];er(a,y),fo(this,"",vo,"",a,x,null,y,null)},qt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Qi(a,y),y===void 0))return"";if(typeof y=="string")return y;Oe("getCategoryForNodeData found a non-string category for "+a+": "+y)},qt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Qi(a,x);b===void 0&&(b=""),b!==y&&(Li(a,x,y),fo(this,"nodeCategory",Di,x,a,b,y))}else Li(a,x,y)}},qt.lm=function(a,y){this.jm(y,this.Ro(a))},qt.Tl=function(){return!1},qt.Wj=function(){return!1},qt.ri=function(){return!1},qt.xs=function(){return!1},qt.Xj=function(){return!1};function cy(){return new Zn}function hg(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 hg(a,y.constructor);return typeof y}function fy(a){return sl[a]?sl[a]:xn.go!==void 0&&xn.go[a]?xn.go[a]:null}function Qi(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 Li(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){}}un.Object.defineProperties(Zn.prototype,{name:{get:function(){return this.xa},set:function(a){var y=this.xa;y!==a&&(this.xa=a,this.g("name",y,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var y=this.Sm;y!==a&&(this.Sm=a,this.g("dataFormat",y,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},modelData:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.g("modelData",y,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&(y!==null&&y.Rx(this),this.o=a,a!==null&&a.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var y=this.Th;y!==a&&(a===""&&Oe("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Oe("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];en(E)||Oe("Model.nodeDataArray must only contain Objects, not: "+E),Gi(E)}for(this.Tc=a,b=new mn,E=0;E<x;E++){var et=a[E],nt=this.wa(et);nt===void 0||this.kb.I(nt)!==null?b.add(et):this.kb.add(nt,et)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),et=this.wa(E),et!==void 0&&this.kb.add(et,E);for(fo(this,"nodeDataArray",Di,"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"}}}),Zn.prototype.setCategoryForNodeData=Zn.prototype.jm,Zn.prototype.getCategoryForNodeData=Zn.prototype.Ro,Zn.prototype.removeArrayItem=Zn.prototype.ov,Zn.prototype.insertArrayItem=Zn.prototype.ts,Zn.prototype.addArrayItem=Zn.prototype.Ay,Zn.prototype.assignAllDataProperties=Zn.prototype.Do,Zn.prototype.set=Zn.prototype.set,Zn.prototype.clearUnresolvedReferences=Zn.prototype.Qy,Zn.prototype.mergeNodeDataArray=Zn.prototype.$z,Zn.prototype.removeNodeDataCollection=Zn.prototype.nA,Zn.prototype.removeNodeData=Zn.prototype.cm,Zn.prototype.addNodeDataCollection=Zn.prototype.Fy,Zn.prototype.addNodeData=Zn.prototype.xf,Zn.prototype.makeNodeDataKeyUnique=Zn.prototype.$u,Zn.prototype.findNodeDataForKey=Zn.prototype.hc,Zn.prototype.containsNodeData=Zn.prototype.lb,Zn.prototype.setKeyForNodeData=Zn.prototype.km,Zn.prototype.getKeyForNodeData=Zn.prototype.wa,Zn.prototype.updateTargetBindings=Zn.prototype.La,Zn.prototype.commit=Zn.prototype.commit,Zn.prototype.rollbackTransaction=Zn.prototype.Kf,Zn.prototype.commitTransaction=Zn.prototype.eb,Zn.prototype.startTransaction=Zn.prototype.Ea,Zn.prototype.raiseDataChanged=Zn.prototype.Fs,Zn.prototype.raiseChanged=Zn.prototype.g,Zn.prototype.raiseChangedEvent=Zn.prototype.cb,Zn.prototype.removeChangedListener=Zn.prototype.ik,Zn.prototype.addChangedListener=Zn.prototype.Pe,Zn.prototype.writeJsonValue=Zn.prototype.sm,Zn.prototype.replaceJsonObjects=Zn.prototype.dm,Zn.prototype.applyIncrementalJSON=Zn.prototype.Ky,Zn.prototype.applyIncrementalJson=Zn.prototype.Zw,Zn.prototype.toJSON=Zn.prototype.toJSON,Zn.prototype.toJson=Zn.prototype.np,Zn.prototype.toIncrementalJSON=Zn.prototype.yA,Zn.prototype.toIncrementalJson=Zn.prototype.$x,Zn.prototype.toIncrementalData=Zn.prototype.xA,Zn.prototype.clear=Zn.prototype.clear;var ES=!1,sl={};Zn.className="Model",Zn.fromJSON=Zn.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=xn.JSON.parse(a)}catch(et){}else typeof a=="object"?x=a:Oe("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(et){}a===null||a instanceof Zn?y=a:Oe("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Zn.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Zn.safePropertyValue=Qi,Zn.safePropertySet=Li,sl.Brush=si,sl.ChangedEvent=Ii,sl.Geometry=bn,sl.Margin=Br,sl.Panel=vn,sl.Point=Le,sl.Rect=on,sl.Size=Cn,sl.Spot=rr,sl.Transaction=Mo,sl.UndoManager=Ri;function eo(a,y,x,b){oi(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=TS,this.wk=null):(this.el=cg,this.wk=b),this.st=new gn}eo.prototype.copy=function(){var a=new eo;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},qt=eo.prototype,qt.qb=function(a){a.classType===eo&&(this.mode=a)},qt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return this._isFrozen=!1,this},qt.Kx=function(a){return a===void 0&&(a=null),this.mode=cg,this.backConverter=a,this},qt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},qt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function MS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}qt.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==="")An("Binding error: target property is the empty string: "+this.toString());else{var et=y;if(b!==""&&(et=Qi(y,b)),et!==void 0)if(E===null)x!==""&&Li(a,x,et);else try{if(x!==""){var nt=E(et,a);Li(a,x,nt)}else E(et,a)}catch(st){}}}},qt.sp=function(a,y,x,b){if(this.el===cg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var et=this.wk,nt=a;if(E!==""&&(nt=Qi(a,E)),nt!==void 0&&!this.st.contains(a))try{this.st.add(a);var st=b!==null?b.diagram:null,ht=st!==null?st.model:null;if(et===null){if(x!=="")ht!==null?ht.setDataProperty(y,x,nt):Li(y,x,nt);else if(ht!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var pt=b.itemIndex,yt=b.panel.itemArray;ht.ov(yt,pt),ht.ts(yt,pt,nt)}}else try{if(x!==""){var Mt=et(nt,y,ht);ht!==null?ht.setDataProperty(y,x,Mt):Li(y,x,Mt)}else{var zt=et(nt,y,ht);if(zt!==void 0&&ht!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Zt=b.itemIndex,Qt=b.panel.itemArray;ht.ov(Qt,Zt),ht.ts(Qt,Zt,zt)}}}catch(ie){}}finally{this.st.remove(a)}}}},un.Object.defineProperties(eo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Ke(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Ke(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Ke(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Ke(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Ke(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Ke(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Ke(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Ke(this),this.el=a}}}),eo.prototype.updateSource=eo.prototype.sp,eo.prototype.updateTarget=eo.prototype.Mv,eo.prototype.ofModel=eo.prototype.dA,eo.prototype.ofObject=eo.prototype.cp,eo.prototype.makeTwoWay=eo.prototype.Kx;var Ox="Binding",TS=new tn(eo,"OneWay",1),cg=new tn(eo,"TwoWay",2);eo.className="Binding",eo.parseEnum=function(a,y){return function(x){return x=tr(a,x),x===null?y:x}},eo.toString=cr,eo.OneWay=TS,eo.TwoWay=cg;function Kr(a,y,x){Zn.call(this),this.Vv=`,
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
"removedLinkKeys": `,this.md=[],this.$f=new gn,this.wb=new $n,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&&(Tn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}$e(Kr,Zn),Kr.constructGraphLinksModel=Zn.constructGraphLinksModel,Kr.prototype.cloneProtected=function(a){Zn.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},qt=Kr.prototype,qt.clear=function(){Zn.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},qt.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)+":"+cr(E)}for(y+=`
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+ys(this,E,!0)+"-->"+ys(this,E,!1)}return y},qt.Qv=function(a,y){this.linkKeyProperty===""&&Oe("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Zn.prototype.Qv.call(this,a,y),b=this,E=new gn,et=new gn,nt=new gn,st=this.vh;a.changes.each(function(yt){yt.model===b&&(yt.modelChange==="linkDataArray"?yt.change===$i?E.add(yt.newValue):yt.change===vo&&nt.add(yt.oldValue):b.Jc(yt.object)?et.add(yt.object):yt.object!==null&&(yt.object!==null&&st&&st.contains(yt.object)?st.get(yt.object).each(function(Mt){b.Jc(Mt)&&et.add(Mt)}):yt.object instanceof Zn||b.lb(yt.object)||LS(b,yt.object).each(function(Mt){et.add(Mt)})))});var ht=this.il;ht.clear(),E.each(function(yt){ht.add(b.Ac(yt)),y||et.add(yt)});var pt=this.kl;return pt.clear(),nt.each(function(yt){pt.add(b.Ac(yt)),y&&et.add(yt)}),a=b.cloneDeep(et.Fa()),0<ht.count&&(x===null&&(x={}),y?x.removedLinkKeys=ht.Fa():x.insertedLinkKeys=ht.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<pt.count&&(x===null&&(x={}),y?x.insertedLinkKeys=pt.Fa():x.removedLinkKeys=pt.Fa()),pt.clear(),ht.clear(),x},qt.rm=function(){var a=Zn.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},qt.gp=function(a){Zn.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)},qt.Rv=function(){var a=Zn.prototype.Rv.call(this),y=`,
|
|
"linkDataArray": `+Hh(this,this.linkDataArray,!0);return a+y},qt.kv=function(a){Zn.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function LS(a,y){for(var x=new gn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];lv(a,y,E,E,x)}return x}qt.Pv=function(a,y){this.linkKeyProperty===""&&Oe("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Zn.prototype.Pv.call(this,a,y),b=this,E=new gn,et=new gn,nt=new gn,st=this.vh;a.changes.each(function(yt){yt.model===b&&(yt.modelChange==="linkDataArray"?yt.change===$i?E.add(yt.newValue):yt.change===vo&&nt.add(yt.oldValue):b.Jc(yt.object)?et.add(yt.object):yt.object!==null&&(yt.object!==null&&st&&st.contains(yt.object)?st.get(yt.object).each(function(Mt){b.Jc(Mt)&&et.add(Mt)}):yt.object instanceof Zn||b.lb(yt.object)||LS(b,yt.object).each(function(Mt){et.add(Mt)})))});var ht=this.il;ht.clear(),E.each(function(yt){ht.add(b.Ac(yt)),y||et.add(yt)});var pt=this.kl;return pt.clear(),nt.each(function(yt){pt.add(b.Ac(yt)),y&&et.add(yt)}),a=x,0<ht.count&&(a+=(y?this.Xv:this.Vv)+Hh(this,ht.Fa(),!0)),0<et.count&&(a+=this.iy+Hh(this,et.Fa(),!0)),0<pt.count&&(a+=(y?this.Vv:this.Xv)+Hh(this,pt.Fa(),!0)),pt.clear(),ht.clear(),a},qt.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)&&Oe("applyIncrementalJson cannot change Model properties"),Zn.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],et=this.jh(E);et===null&&(et=this.Jo({}),this.Ks(et,E),this.fi(et))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],et=this.Ac(E),et=this.jh(et),et!==null){for(var nt in E)nt!=="__gohashid"&&nt!==this.linkKeyProperty&&this.setDataProperty(et,nt,E[nt]);jS(this,E,et)}}if(a=a.removedLinkKeys,Array.isArray(a))for(nt=a.length,y=0;y<nt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},Kr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Di){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),Li(x,b,E);return}}else if(a.change===$i){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,en(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===vo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,en(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}}Zn.prototype.changeState.call(this,a,y)}},qt=Kr.prototype,qt.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),Li(x,this.nodeKeyProperty,a),this.xf(x))}return a}},qt.yx=function(a){return ys(this,a,!0)},qt.wv=function(a,y){Dd(this,a,y,!0)},qt.Bx=function(a){return ys(this,a,!1)},qt.Bv=function(a,y){Dd(this,a,y,!1)};function ys(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Qi(y,a),a!==void 0))){if(Vh(a))return a;Oe((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Dd(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 et=Qi(y,E);et!==x&&(xl(a,et,y),Li(y,E,x),a.hc(x)===null&&Sl(a,x,y),fo(a,b?"linkFromKey":"linkToKey",Di,E,y,et,x),typeof E=="string"&&a.La(y,E))}else Li(y,E,x)}}qt.zx=function(a){return hv(this,a,!0)},qt.xv=function(a,y){Bd(this,a,y,!0)},qt.Cx=function(a){return hv(this,a,!1)},qt.Cv=function(a,y){Bd(this,a,y,!1)};function hv(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Qi(y,a),y===void 0?"":y)}function Bd(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var et=Qi(y,E);et===void 0&&(et=""),et!==x&&(Li(y,E,x),fo(a,b?"linkFromPortId":"linkToPortId",Di,E,y,et,x),typeof E=="string"&&a.La(y,E))}else Li(y,E,x)}}qt.Ef=function(a){if(a===null)return cv;var y=this.je;return y===""?cv:(a=Qi(a,y),a===void 0?cv:a)},qt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Qi(a,x);if(b===void 0&&(b=cv),b!==y){if(Array.isArray(b))for(var E=b.length,et=0;et<E;et++)xl(this,b[et],a);for(Li(a,x,y),E=y.length,et=0;et<E;et++){var nt=y[et];this.hc(nt)===null&&Sl(this,nt,a)}fo(this,"linkLabelKeys",Di,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else Li(a,x,y)}},qt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Qi(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&&Sl(this,y,a),fo(this,"linkLabelKeys",$i,x,a,null,y,null,E)))}else Oe(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},qt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Qi(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(xl(this,y,a),fo(this,"linkLabelKeys",vo,x,a,y,null,E,null)))}else b!==void 0&&Oe(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},qt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Qi(a,y),y!==void 0)){if(Vh(y))return y;Oe("Key value for link data "+a+" is not a number or a string: "+y)}}},qt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Qi(a,x);b!==y&&this.jh(y)===null&&(Li(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),fo(this,"linkKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},qt.jh=function(a){return a===null&&Oe("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Vh(a)?this.wb.I(a):null},qt.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))){Li(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;Li(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Li(a,y,x)}}}}},qt.Jc=function(a){return a===null?!1:this.$f.contains(a)},qt.fi=function(a){a!==null&&(Gi(a),this.Jc(a)||AS(this,a,!0))};function AS(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&Oe("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),fo(a,"linkDataArray",$i,"linkDataArray",a,null,y,null,b),dy(a,y)}qt.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)},qt.bm=function(a){a!==null&&NS(this,a,!0)};function NS(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(fo(a,"linkDataArray",vo,"linkDataArray",a,y,null,b,null),x=ys(a,y,!0),xl(a,x,y),x=ys(a,y,!1),xl(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,et=0;et<E;et++)x=b[et],xl(a,x,y)}qt.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)},qt.Zz=function(a){if(this.linkKeyProperty===""&&Oe("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Tn(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 et=a[E],nt=this.Ac(et);if(nt!==void 0){x.add(nt);var st=this.jh(nt);st!==et&&(st!==null?(this.Do(st,et),jS(this,et,st)):(et=this.cloneDeep(et),this.Ks(et,nt),this.fi(et)))}else nt=this.cloneDeep(et),this.fi(nt),x.add(this.Ac(nt))}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=ys(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Sl(a,x,y),x=ys(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Sl(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,et=0;et<E;et++)x=b[et],a.hc(x)===null&&Sl(a,x,y)}qt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):uv(this,a,!0),en(a)&&(oi(a),this.lf!==""&&Li(a,this.lf,void 0),this.mf!==""&&Li(a,this.mf,void 0),this.je!==""&&Li(a,this.je,[])),a},qt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Qi(a,y)},qt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Qi(a,y),y!==void 0)){if(Vh(y))return y;Oe("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},qt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Qi(a,x);b!==y&&(xl(this,b,a),Li(a,x,y),this.hc(y)===null&&Sl(this,y,a),fo(this,"nodeGroupKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},Kr.prototype.copyNodeData=function(a){return a===null?null:(a=Zn.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Qi(a,this.Je)===void 0||Li(a,this.Je,void 0),a)},Kr.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){Dd(this,a,x,!0);return}if(y===this.linkToKeyProperty){Dd(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Bd(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Bd(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=Qi(a,y);b!==x&&(Li(a,y,x),this.Fs(a,y,b,x))},qt=Kr.prototype,qt.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&&Qi(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},qt.jp=function(a,y){Zn.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,et=y;if(ys(this,b,!0)===E){var nt=this.lf;Li(b,nt,et),fo(this,"linkFromKey",Di,nt,b,E,et),typeof nt=="string"&&this.La(b,nt)}if(ys(this,b,!1)===E&&(nt=this.mf,Li(b,nt,et),fo(this,"linkToKey",Di,nt,b,E,et),typeof nt=="string"&&this.La(b,nt)),nt=this.Ef(b),Array.isArray(nt))for(var st=nt.length,ht=this.je,pt=0;pt<st;pt++)nt[pt]===E&&(nt[pt]=et,fo(this,"linkLabelKeys",$i,ht,b,E,et,pt,pt))}},qt.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;Li(a,b,x),fo(this,"nodeGroupKey",Di,b,a,y,x),typeof b=="string"&&this.La(a,b)}},qt.Lv=function(){Zn.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},qt.fm=function(a){Zn.prototype.fm.call(this,a),a=this.wa(a);var y=ug(this,a);if(y!==null){var x=Fn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;fo(this,"nodeGroupKey",Di,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(ys(this,b,!0)===a&&(E=this.lf,fo(this,"linkFromKey",Di,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),ys(this,b,!1)===a&&(E=this.mf,fo(this,"linkToKey",Di,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var et=E.length,nt=this.je,st=0;st<et;st++)E[st]===a&&(fo(this,"linkLabelKeys",$i,nt,b,a,a,st,st),x.push(b))}for(y=0;y<x.length;y++)xl(this,a,x[y]);Bn(x)}},qt.em=function(a){Zn.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Sl(this,y,a)},qt.qp=function(a){Zn.prototype.qp.call(this,a);var y=this.lh(a);xl(this,y,a)},qt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Qi(a,y),y===void 0))return"";if(typeof y=="string")return y;Oe("getCategoryForLinkData found a non-string category for "+a+": "+y)},Kr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Kr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Qi(a,x);b===void 0&&(b=""),b!==y&&(Li(a,x,y),fo(this,"linkCategory",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},Kr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},qt=Kr.prototype,qt.lm=function(a,y){Zn.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))}qt.Wj=function(){return!0},qt.ri=function(){return!0},qt.xs=function(){return!0},qt.Xj=function(){return!0},un.Object.defineProperties(Kr.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];en(E)||Oe("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),Gi(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new mn,E=0;E<x;E++){var et=a[E],nt=this.Ac(et);nt===void 0||this.wb.I(nt)!==null?b.add(et):this.wb.add(nt,et)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),et=this.Ac(E),et!==void 0&&this.wb.add(et,E)}for(b=new gn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,fo(this,"linkDataArray",Di,"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],et=this.Ac(E);et===void 0&&(this.Bs(E),et=this.Ac(E)),et!==void 0&&this.wb.add(et,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"}}}),Kr.prototype.setCategoryForLinkData=Kr.prototype.lp,Kr.prototype.getCategoryForLinkData=Kr.prototype.ps,Kr.prototype.assignAllDataProperties=Kr.prototype.Do,Kr.prototype.setGroupKeyForNodeData=Kr.prototype.mp,Kr.prototype.getGroupKeyForNodeData=Kr.prototype.lh,Kr.prototype.isGroupForNodeData=Kr.prototype.Yu,Kr.prototype.copyLinkData=Kr.prototype.Jo,Kr.prototype.mergeLinkDataArray=Kr.prototype.Zz,Kr.prototype.removeLinkDataCollection=Kr.prototype.lA,Kr.prototype.removeLinkData=Kr.prototype.bm,Kr.prototype.addLinkDataCollection=Kr.prototype.Ey,Kr.prototype.addLinkData=Kr.prototype.fi,Kr.prototype.containsLinkData=Kr.prototype.Jc,Kr.prototype.makeLinkDataKeyUnique=Kr.prototype.Bs,Kr.prototype.findLinkDataForKey=Kr.prototype.jh,Kr.prototype.setKeyForLinkData=Kr.prototype.Ks,Kr.prototype.getKeyForLinkData=Kr.prototype.Ac,Kr.prototype.removeLabelKeyForLinkData=Kr.prototype.Qx,Kr.prototype.addLabelKeyForLinkData=Kr.prototype.Bu,Kr.prototype.setLabelKeysForLinkData=Kr.prototype.Ls,Kr.prototype.getLabelKeysForLinkData=Kr.prototype.Ef,Kr.prototype.setToPortIdForLinkData=Kr.prototype.Cv,Kr.prototype.getToPortIdForLinkData=Kr.prototype.Cx,Kr.prototype.setFromPortIdForLinkData=Kr.prototype.xv,Kr.prototype.getFromPortIdForLinkData=Kr.prototype.zx,Kr.prototype.setToKeyForLinkData=Kr.prototype.Bv,Kr.prototype.getToKeyForLinkData=Kr.prototype.Bx,Kr.prototype.setFromKeyForLinkData=Kr.prototype.wv,Kr.prototype.getFromKeyForLinkData=Kr.prototype.yx,Kr.prototype.clear=Kr.prototype.clear;var cv=Object.freeze([]);Kr.className="GraphLinksModel",sl.GraphLinksModel=Kr,Zn.constructGraphLinksModel=Zn.constructGraphLinksModel=function(){return new Kr},Zn.initDiagramModel=cy=function(){return new Kr};function Ea(a,y){Zn.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Tn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}$e(Ea,Zn),Ea.constructGraphLinksModel=Zn.constructGraphLinksModel,Ea.prototype.cloneProtected=function(a){Zn.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},qt=Ea.prototype,qt.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)+":"+cr(E)}}return y},qt.rm=function(){var a=Zn.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},qt.gp=function(a){Zn.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},qt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Oe("applyIncrementalJson cannot change Model properties"),Zn.prototype.fp.call(this,a)},qt.Vl=function(a){return a},qt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Qi(a,y),y!==void 0)){if(Vh(y))return y;Oe("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},qt.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=Qi(a,x);b!==y&&(xl(this,b,a),Li(a,x,y),this.hc(y)===null&&Sl(this,y,a),fo(this,"nodeParentKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},qt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Qi(a,y),y===void 0)?"":typeof y=="string"?y:(Oe("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Ea.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Ea.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Qi(a,x);b===void 0&&(b=""),b!==y&&(Li(a,x,y),fo(this,"parentLinkCategory",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},Ea.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Ea.prototype.copyNodeData=function(a){return a===null?null:(a=Zn.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Qi(a,this.Ke)===void 0||Li(a,this.Ke,void 0),a)},Ea.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=Qi(a,y);b!==x&&(Li(a,y,x),this.Fs(a,y,b,x))},qt=Ea.prototype,qt.jp=function(a,y){Zn.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},qt.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;Li(a,b,x),fo(this,"nodeParentKey",Di,b,a,y,x),typeof b=="string"&&this.La(a,b)}},qt.fm=function(a){Zn.prototype.fm.call(this,a),a=this.wa(a);var y=ug(this,a);if(y!==null){var x=Fn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;fo(this,"nodeParentKey",Di,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)xl(this,a,x[y]);Bn(x)}},qt.em=function(a){Zn.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Sl(this,y,a)},qt.qp=function(a){Zn.prototype.qp.call(this,a);var y=this.mh(a);xl(this,y,a)},qt.lm=function(a,y){Zn.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},qt.Tl=function(){return!0},qt.xs=function(){return!0},un.Object.defineProperties(Ea.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"}}}),Ea.prototype.setParentLinkCategoryForNodeData=Ea.prototype.Ms,Ea.prototype.getParentLinkCategoryForNodeData=Ea.prototype.ss,Ea.prototype.setParentKeyForNodeData=Ea.prototype.qe,Ea.prototype.getParentKeyForNodeData=Ea.prototype.mh,Ea.className="TreeModel",sl.TreeModel=Ea;function zi(a){ji.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=ll,this.Ti=0,this.Zv=new Le,this.Jp=this.me=0,this.Xr=new gg,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=ll,this.K=Ma,this.nd=Rd,this.hd=oy,this.tf=6,this.Nn=yv,a&&Object.assign(this,a)}$e(zi,ji),zi.prototype.cloneProtected=function(a){ji.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},zi.prototype.qb=function(a){a.classType===zi?a===mv||a===vv||a===pv||a===gv||a===Rd?this.sorting=a:a===_c||a===Id||a===Ma||a===Zh?this.direction=a:a===uh||a===Kh||a===ll||a===ul?this.arrangement=a:(a===Lf||a===yv)&&(this.nodeDiameterFormula=a):ji.prototype.qb.call(this,a)},zi.prototype.createNetwork=function(){return new _d(this)},zi.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 mn;y.addAll(a.iterator),a=new mn;var x=new mn,b=this.sort(y),E,et,nt=this.Jp,st=this.arrangement,ht=this.nodeDiameterFormula,pt=this.radius;(!isFinite(pt)||0>=pt)&&(pt=NaN);var yt=this.aspectRatio;(!isFinite(yt)||0>=yt)&&(yt=1);var Mt=this.startAngle;isFinite(Mt)||(Mt=0);var zt=this.sweepAngle;if((!isFinite(zt)||360<zt||1>zt)&&(zt=360),y=this.spacing,isFinite(y)||(y=NaN),st===ul&&ht===Lf?st=ll:st===ul&&ht!==Lf&&(st=this.arrangement),(this.direction===_c||this.direction===Id)&&this.sorting!==Rd){for(ht=0;!(ht>=b.length)&&(a.add(b.M(ht)),!(ht+1>=b.length));ht+=2)x.add(b.M(ht+1));this.direction===_c?(this.arrangement===ul&&a.reverse(),b=new mn,b.addAll(a),b.addAll(x)):(this.arrangement===ul&&x.reverse(),b=new mn,b.addAll(x),b.addAll(a))}ht=b.length;for(var Zt=et=E=0;Zt<b.length;Zt++){var Qt=Mt+zt*et*(this.direction===Ma?1:-1)/ht,ie=b.M(Zt).diameter;isNaN(ie)&&(ie=Xh(b.M(Zt),Qt)),360>zt&&(Zt===0||Zt===b.length-1)&&(ie/=2),E+=ie,et++}if(isNaN(pt)||st===ul){if(isNaN(y)&&(y=6),st!==ll&&st!==ul){for(et=-1/0,nt=0;nt<ht;nt++)Zt=b.M(nt),E=b.M(nt===ht-1?0:nt+1),isNaN(Zt.diameter)&&Xh(Zt,0),isNaN(E.diameter)&&Xh(E,0),et=Math.max(et,(Zt.diameter+E.diameter)/2);nt=et+y,st===uh?pt=(et+y)/(2*Math.PI/ht):pt=fv(this,nt*(360<=zt?ht:ht-1),yt,Mt*Math.PI/180,zt*Math.PI/180)}else pt=fv(this,E+(360<=zt?ht:ht-1)*(st!==ul?y:1.6*y),yt,Mt*Math.PI/180,zt*Math.PI/180);et=pt*yt}else if(et=pt*yt,Zt=py(this,pt,et,Mt*Math.PI/180,zt*Math.PI/180),isNaN(y))(st===ll||st===ul)&&(y=(Zt-E)/(360<=zt?ht:ht-1));else if(st===ll||st===ul)Zt=(Zt-E)/(360<=zt?ht:ht-1),Zt<y?(pt=fv(this,E+y*(360<=zt?ht:ht-1),yt,Mt*Math.PI/180,zt*Math.PI/180),et=pt*yt):y=Zt;else{for(nt=-1/0,E=0;E<ht;E++)Qt=b.M(E),ie=b.M(E===ht-1?0:E+1),isNaN(Qt.diameter)&&Xh(Qt,0),isNaN(ie.diameter)&&Xh(ie,0),nt=Math.max(nt,(Qt.diameter+ie.diameter)/2);nt+=y,E=fv(this,nt*(360<=zt?ht:ht-1),yt,Mt*Math.PI/180,zt*Math.PI/180),E>pt?(pt=E,et=pt*yt):nt=Zt/(360<=zt?ht:ht-1)}if(this.kw=st,this.lc=pt,this.Zm=yt,this.lw=Mt,this.Wp=zt,this.Ti=y,this.me=et,this.Jp=nt,y=b,b=this.kw,st=this.lc,pt=this.lw,yt=this.Wp,Mt=this.Ti,zt=this.me,ht=this.Jp,this.direction!==_c&&this.direction!==Id||b!==ul)if(this.direction===_c||this.direction===Id){switch(nt=0,b){case Kh:nt=180*dv(this,st,zt,pt,ht)/Math.PI;break;case ll:ht=y=0,nt=a.first(),nt!==null&&(y=Xh(nt,Math.PI/2)),nt=x.first(),nt!==null&&(ht=Xh(nt,Math.PI/2)),nt=180*dv(this,st,zt,pt,Mt+(y+ht)/2)/Math.PI;break;case uh:nt=yt/y.length}if(this.direction===_c){switch(b){case Kh:pg(this,a,pt,Zh);break;case ll:dg(this,a,pt,Zh);break;case uh:fg(this,a,yt/2,pt,Zh)}switch(b){case Kh:pg(this,x,pt+nt,Ma);break;case ll:dg(this,x,pt+nt,Ma);break;case uh:fg(this,x,yt/2,pt+nt,Ma)}}else{switch(b){case Kh:pg(this,x,pt,Zh);break;case ll:dg(this,x,pt,Zh);break;case uh:fg(this,x,yt/2,pt,Zh)}switch(b){case Kh:pg(this,a,pt+nt,Ma);break;case ll:dg(this,a,pt+nt,Ma);break;case uh:fg(this,a,yt/2,pt+nt,Ma)}}}else switch(b){case Kh:pg(this,y,pt,this.direction);break;case ll:dg(this,y,pt,this.direction);break;case uh:fg(this,y,yt,pt,this.direction);break;case ul:OS(this,y,yt,pt,this.direction)}else OS(this,y,yt,pt-yt/2,Ma)}this.updateParts(),this.network=null,this.isValidLayout=!0};function fg(a,y,x,b,E){var et=a.Wp,nt=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var st=y.length,ht=0;ht<st;ht++){var pt=b+(E===Ma?ht*x/(360<=et?st:st-1):-(ht*x)/st),yt=y.M(ht),Mt=nt*Math.tan(pt)/a;Mt=Math.sqrt((nt*nt+a*a*Mt*Mt)/(1+Mt*Mt)),yt.centerX=Mt*Math.cos(pt),yt.centerY=Mt*Math.sin(pt),yt.actualAngle=180*pt/Math.PI}}function dg(a,y,x,b){var E=a.lc,et=a.me,nt=a.Ti;x=x*Math.PI/180;for(var st=y.length,ht=0;ht<st;ht++){var pt=y.M(ht),yt=y.M(ht===st-1?0:ht+1),Mt=et*Math.sin(x);pt.centerX=E*Math.cos(x),pt.centerY=Mt,pt.actualAngle=180*x/Math.PI,isNaN(pt.diameter)&&Xh(pt,0),isNaN(yt.diameter)&&Xh(yt,0),pt=dv(a,E,et,b===Ma?x:-x,(pt.diameter+yt.diameter)/2+nt),x+=b===Ma?pt:-pt}}function pg(a,y,x,b){var E=a.lc,et=a.me,nt=a.Jp;x=x*Math.PI/180;for(var st=y.length,ht=0;ht<st;ht++){var pt=y.M(ht);pt.centerX=E*Math.cos(x),pt.centerY=et*Math.sin(x),pt.actualAngle=180*x/Math.PI,pt=dv(a,E,et,b===Ma?x:-x,nt),x+=b===Ma?pt:-pt}}function OS(a,y,x,b,E){var et=a.Wp;if(a.mj=0,a.Xr=new gg,360>x){for(et=b+(E===Ma?et:-et);0>et;)et+=360;et%=360,180<et&&(et-=360),et*=Math.PI/180,a.gt=et,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 et=a.lc,nt=a.Ti,st=a.Zm,ht=et*Math.cos(b*Math.PI/180),pt=a.me*Math.sin(b*Math.PI/180),yt=y.Fa();if(yt.length===3)yt[0].centerX=et,yt[0].centerY=0,yt[1].centerX=yt[0].centerX-yt[0].width/2-yt[1].width/2-nt,yt[1].y=yt[0].y,yt[2].centerX=(yt[0].centerX+yt[1].centerX)/2,yt[2].y=yt[0].y-yt[2].height-nt;else if(yt.length===4)yt[0].centerX=et,yt[0].centerY=0,yt[2].centerX=-yt[0].centerX,yt[2].centerY=yt[0].centerY,yt[1].centerX=0,yt[1].y=Math.min(yt[0].y,yt[2].y)-yt[1].height-nt,yt[3].centerX=0,yt[3].y=Math.max(yt[0].y+yt[0].height+nt,yt[2].y+yt[2].height+nt);else{et=Le.alloc();for(var Mt=0;Mt<yt.length&&(yt[Mt].centerX=ht,yt[Mt].centerY=pt,!(Mt>=yt.length-1));Mt++)BS(a,ht,pt,yt,Mt,E,et)||IS(a,ht,pt,yt,Mt,E,et),ht=et.x,pt=et.y;if(Le.free(et),a.mj++,!(23<a.mj)){ht=yt[0].centerX,pt=yt[0].centerY,et=yt[yt.length-1].centerX,Mt=yt[yt.length-1].centerY;var zt=Math.abs(ht-et)-((yt[0].width+yt[yt.length-1].width)/2+nt),Zt=Math.abs(pt-Mt)-((yt[0].height+yt[yt.length-1].height)/2+nt);nt=0,1>Math.abs(Zt)?Math.abs(ht-et)<(yt[0].width+yt[yt.length-1].width)/2&&(nt=0):nt=0<Zt?Zt:1>Math.abs(zt)?0:zt,ht=Math.abs(et)>Math.abs(Mt)?0<et!=pt>Mt:0<Mt!=ht<et,(ht=E===Ma?ht:!ht)&&(nt=-Math.abs(nt),nt=Math.min(nt,-yt[yt.length-1].width),nt=Math.min(nt,-yt[yt.length-1].height)),a.Xr.compare(nt,yt),1<Math.abs(nt)&&(a.lc=8>a.mj?a.lc-nt/(2*Math.PI):5>yt.length&&10<nt?a.lc/2:a.lc-(0<nt?1.7:-2.3),a.me=a.lc*st,FS(a,y,x,b,E))}}}function DS(a,y,x,b,E){for(var et=a.lc,nt=a.me,st=a.Zm,ht=et*Math.cos(b*Math.PI/180),pt=nt*Math.sin(b*Math.PI/180),yt=Le.alloc(),Mt=y.Fa(),zt=0;zt<Mt.length&&(Mt[zt].centerX=ht,Mt[zt].centerY=pt,!(zt>=Mt.length-1));zt++)BS(a,ht,pt,Mt,zt,E,yt)||IS(a,ht,pt,Mt,zt,E,yt),ht=yt.x,pt=yt.y;if(Le.free(yt),a.mj++,!(23<a.mj)){if(ht=Math.atan2(pt,ht),ht=E===Ma?a.gt-ht:ht-a.gt,ht=Math.abs(ht)<Math.abs(ht-2*Math.PI)?ht:ht-2*Math.PI,et=ht*(et+nt)/2,nt=a.Xr,Math.abs(et)<Math.abs(nt.Pl))for(nt.Pl=et,nt.mk=[],nt.tm=[],ht=0;ht<Mt.length;ht++)nt.mk[ht]=Mt[ht].bounds.x,nt.tm[ht]=Mt[ht].bounds.y;1<Math.abs(et)&&(a.lc=8>a.mj?a.lc-et/(2*Math.PI):a.lc-(0<et?1.7:-2.3),a.me=a.lc*st,DS(a,y,x,b,E))}}function BS(a,y,x,b,E,et,nt){var st=a.lc,ht=a.me,pt=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var yt=!1;if(0<=x!=(et===Ma)){if(et=y+a,et>st){if(et=y-a,et<-st)return nt.x=et,nt.y=pt,!1;yt=!0}}else if(et=y-a,et<-st){if(et=y+a,et>st)return nt.x=et,nt.y=pt,!1;yt=!0}return pt=Math.sqrt(1-Math.min(1,et*et/(st*st)))*ht,0>x!==yt&&(pt=-pt),Math.abs(x-pt)>(b[E].height+b[E+1].height)/2?(nt.x=et,nt.y=pt,!1):(nt.x=et,nt.y=pt,!0)}function IS(a,y,x,b,E,et,nt){var st=a.lc,ht=a.me,pt=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(et===Ma)){if(et=x-a,et<-ht){if(et=x+a,et>ht){nt.x=pt,nt.y=et;return}b=!0}}else if(et=x+a,et>ht){if(et=x-a,et<-ht){nt.x=pt,nt.y=et;return}b=!0}pt=Math.sqrt(1-Math.min(1,et*et/(ht*ht)))*st,0>y!==b&&(pt=-pt),nt.x=pt,nt.y=et}zi.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},zi.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 Le(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))},zi.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var et=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 nt=0,st=b!==void 0&&E!==void 0?E/(et+1):Math.PI/(2*(et+1)),ht=0,pt=0;pt<=et;pt++){b!==void 0&&E!==void 0?ht=b+pt*E/et:ht=pt*Math.PI/(2*et);var yt=Math.sin(ht);nt+=Math.sqrt(1-a*a*yt*yt)*st}return b!==void 0&&E!==void 0?(y>x?y:x)*nt:4*(y>x?y:x)*nt}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 et=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,nt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var st=0;;st++){var ht=Math.sin(b+st*a);if(nt+=(y>x?y:x)*Math.sqrt(1-et*et*ht*ht)*a,nt>=E)return st*a}}zi.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 Rd:return this.ak(Fx(a));default:Oe("Invalid sorting type.")}return a};function Fx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new mn;for(var b=0;b<a.length;b++){var E=-1,et=-1;if(b===0)for(var nt=0;nt<a.length;nt++){var st=a.M(nt).edgesCount;st>E&&(E=st,et=nt)}else for(nt=0;nt<a.length;nt++)st=y[nt],st>E&&(E=st,et=nt);for(x.add(a.M(et)),y[et]=-1,et=a.M(et),nt=et.sourceEdges;nt.next();)E=a.indexOf(nt.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(et=et.destinationEdges;et.next();)E=a.indexOf(et.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}zi.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,et=b.destinationEdges;et.next();)E=a.indexOf(et.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(et=[],x=0;x<y.length;x++)et[x]=0;x=[];var nt=[],st=[];b=[],E=new mn;for(var ht=0,pt=0;pt<y.length;pt++){var yt=y[pt].length;if(yt===1)b.push(pt);else if(yt===0)E.add(a.M(pt));else{if(ht===0)x.push(pt);else{for(var Mt=yt=1/0,zt=-1,Zt=[],Qt=0;Qt<x.length;Qt++)0>y[x[Qt]].indexOf(x[Qt===x.length-1?0:Qt+1])&&Zt.push(Qt===x.length-1?0:Qt+1);if(Zt.length===0)for(Qt=0;Qt<x.length;Qt++)Zt.push(Qt);for(Qt=0;Qt<Zt.length;Qt++){for(var ie=Zt[Qt],Ee=y[pt],we=0,je=0;je<nt.length;je++){var Fe=et[nt[je]],De=et[st[je]];if(Fe<De){var _e=Fe;Fe=De}else _e=De;if(_e<ie&&ie<=Fe)for(De=0;De<Ee.length;De++){var Xe=Ee[De];0>x.indexOf(Xe)||_e<et[Xe]&&et[Xe]<Fe||_e===et[Xe]||Fe===et[Xe]||we++}else for(De=0;De<Ee.length;De++)Xe=Ee[De],0>x.indexOf(Xe)||_e<et[Xe]&&et[Xe]<Fe&&_e!==et[Xe]&&Fe!==et[Xe]&&we++}for(Ee=we,je=we=0;je<y[pt].length;je++)_e=x.indexOf(y[pt][je]),0<=_e&&(_e=Math.abs(ie-(_e>=ie?_e+1:_e)),we+=_e<x.length+1-_e?_e:x.length+1-_e);for(je=0;je<nt.length;je++)_e=et[nt[je]],Fe=et[st[je]],_e>=ie&&_e++,Fe>=ie&&Fe++,_e>Fe&&(De=Fe,Fe=_e,_e=De),Fe-_e<(x.length+2)/2==(_e<ie&&ie<=Fe)&&we++;(Ee<yt||Ee===yt&&we<Mt)&&(yt=Ee,Mt=we,zt=ie)}for(x.splice(zt,0,pt),yt=0;yt<x.length;yt++)et[x[yt]]=yt;for(yt=0;yt<y[pt].length;yt++)Mt=y[pt][yt],0<=x.indexOf(Mt)&&(nt.push(pt),st.push(Mt))}ht++}}for(nt=x.length;;){for(et=!0,st=0;st<b.length;st++)if(ht=b[st],pt=y[ht][0],yt=x.indexOf(pt),0<=yt){for(zt=Mt=0;zt<y[pt].length;zt++)Zt=x.indexOf(y[pt][zt]),0>Zt||Zt===yt||(Qt=Zt>yt?Zt-yt:yt-Zt,Mt+=Zt<yt!=Qt>nt-Qt?1:-1);x.splice(0>Mt?yt:yt+1,0,ht),b.splice(st,1),st--}else et=!1;if(et)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},un.Object.defineProperties(zi.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!==ul&&a!==ll&&a!==Kh&&a!==uh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Ma&&a!==Zh&&a!==_c&&a!==Id||(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!==Rd||(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!==Lf||(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 ll=new tn(zi,"ConstantSpacing",0),Kh=new tn(zi,"ConstantDistance",1),uh=new tn(zi,"ConstantAngle",2),ul=new tn(zi,"Packed",3),Ma=new tn(zi,"Clockwise",4),Zh=new tn(zi,"Counterclockwise",5),_c=new tn(zi,"BidirectionalLeft",6),Id=new tn(zi,"BidirectionalRight",7),pv=new tn(zi,"Forwards",8),gv=new tn(zi,"Reverse",9),mv=new tn(zi,"Ascending",10),vv=new tn(zi,"Descending",11),Rd=new tn(zi,"Optimized",12),yv=new tn(zi,"Pythagorean",13),Lf=new tn(zi,"Circular",14);zi.className="CircularLayout",zi.ConstantSpacing=ll,zi.ConstantDistance=Kh,zi.ConstantAngle=uh,zi.Packed=ul,zi.Clockwise=Ma,zi.Counterclockwise=Zh,zi.BidirectionalLeft=_c,zi.BidirectionalRight=Id,zi.Forwards=pv,zi.Reverse=gv,zi.Ascending=mv,zi.Descending=vv,zi.Optimized=Rd,zi.Pythagorean=yv,zi.Circular=Lf;function gg(){this.Pl=-1/0,this.tm=this.mk=null}gg.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},gg.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]}},gg.className="VertexArrangement";function _d(a){xi.call(this,a)}$e(_d,xi),_d.prototype.createVertex=function(){return new mg(this)},_d.prototype.createEdge=function(){return new Sv(this)},_d.className="CircularNetwork";function mg(a){So.call(this,a),this.u=this.Si=NaN}$e(mg,So);function Xh(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===ul)if(x.nodeDiameterFormula===Lf)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===Lf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}un.Object.defineProperties(mg.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)}}}),mg.className="CircularVertex";function Sv(a){rs.call(this,a)}$e(Sv,rs),Sv.className="CircularEdge";function Zo(a){ji.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)}$e(Zo,ji),Zo.prototype.cloneProtected=function(a){ji.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},Zo.prototype.createNetwork=function(){return new Af(this)},Zo.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 et=E.value;et.Vd=et.vertexes.count,et.sh=1,et.Hj=null,et.We=null}RS(this,0,a)}this.network=y;var nt=b=x.iterator;b=this.arrangementSpacing;var st=nt.count,ht=!0;et=E=0;for(var pt=Fn(),yt=0;yt<st+y.vertexes.count+2;yt++)pt[yt]=null;st=0,nt.reset();for(var Mt=on.alloc();nt.next();)if(yt=nt.value,this.computeBounds(yt,Mt),ht)ht=!1,E=Mt.x+Mt.width/2,et=Mt.y+Mt.height/2,pt[0]=new Le(Mt.x+Mt.width+b.width,Mt.y),pt[1]=new Le(Mt.x,Mt.y+Mt.height+b.height),st=2;else{var zt=_S(pt,st,E,et,Mt.width,Mt.height,b),Zt=pt[zt],Qt=new Le(Zt.x+Mt.width+b.width,Zt.y),ie=new Le(Zt.x,Zt.y+Mt.height+b.height);for(zt+1<st&&pt.splice(zt+1,0,null),pt[zt]=Qt,pt[zt+1]=ie,st++,zt=Zt.x-Mt.x,Zt=Zt.y-Mt.y,yt=yt.vertexes.iterator;yt.next();)Qt=yt.value,Qt.centerX+=zt,Qt.centerY+=Zt}for(on.free(Mt),yt=y.vertexes.iterator;yt.next();)nt=yt.value,zt=nt.bounds,2>st?(E=zt.x+zt.width/2,et=zt.y+zt.height/2,pt[0]=new Le(zt.x+zt.width+b.width,zt.y),pt[1]=new Le(zt.x,zt.y+zt.height+b.height),st=2):(ht=_S(pt,st,E,et,zt.width,zt.height,b),Mt=pt[ht],Zt=new Le(Mt.x+zt.width+b.width,Mt.y),zt=new Le(Mt.x,Mt.y+zt.height+b.height),ht+1<st&&pt.splice(ht+1,0,null),pt[ht]=Zt,pt[ht+1]=zt,st++,nt.centerX=Mt.x+nt.width/2,nt.centerY=Mt.y+nt.height/2);for(Bn(pt),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},Zo.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},Zo.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var b=a.value;x?(x=!1,y.set(b.bounds)):y.ed(b.bounds)}return y};function RS(a,y,x){if(Dx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Bx(a,y),et=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=et,RS(a,y+1,x),GS(a,et),Ix(a,E),y=E.vertexes.Fa(),y.sort(function(nt,st){return nt===null||st===null||nt===st?0:st.Vd-nt.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=b}}function Dx(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Bx(a,y){for(var x=a.network,b=new Af(a),E=0;E<a.ah.length;E++){var et=a.ah[E];if(1<et.Vd){b.dh(et);var nt=new US;nt.Rs=et.Vd,nt.Ss=et.width,nt.Qs=et.height,nt.Sv=et.focus.x,nt.Tv=et.focus.y,et.We===null&&(et.We=new mn),et.We.add(nt),et.sv=et.We.count-1}else break}for(et=x.edges.iterator;et.next();){var st=et.value;E=st.fromVertex,nt=st.toVertex,E.network===b&&nt.network===b?b.Bo(st):E.network===b?(st=E.Hj,st===null&&(st=new mn,E.Hj=st),st.add(nt),E.Vd--,E.sh+=nt.sh):nt.network===b&&(st=nt.Hj,st===null&&(st=new mn,nt.Hj=st),st.add(E),nt.Vd--,nt.sh+=E.sh)}for(E=b.edges.iterator;E.next();)et=E.value,et.length*=Math.max(1,Ge.sqrt((et.fromVertex.sh+et.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var ht=E.Hj;if(ht!==null&&0<ht.count&&(nt=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=nt))){for(var pt=st=0,yt=ht.count-nt;yt<ht.count;yt++){var Mt=ht.M(yt),zt=null;for(et=Mt.edges.iterator;et.next();){var Zt=et.value;if(Zt.Ax(Mt)===E){zt=Zt;break}}zt!==null&&(pt+=zt.length,st+=Mt.width*Mt.height)}et=E.centerX,ht=E.centerY,yt=E.width,Mt=E.height,zt=E.focus,Zt=yt*Mt,1>Zt&&(Zt=1),st=Ge.sqrt((st+Zt+pt*pt*4/(nt*nt))/Zt),nt=(st-1)*yt/2,st=(st-1)*Mt/2,E.bounds=new on(et-zt.x-nt,ht-zt.y-st,yt+2*nt,Mt+2*st),E.focus=new Le(zt.x+nt,zt.y+st)}}return a.network=b,x}function Ix(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var et=E.Sv,nt=E.Tv;b.bounds=new on(b.centerX-et,b.centerY-nt,E.Ss,E.Qs),b.focus=new Le(et,nt),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,et=y.width,nt=y.height;y.We!==null&&0<y.We.count&&(nt=y.We.M(0),et=nt.Ss,nt=nt.Qs),et=Ge.sqrt(et*et+nt*nt)/2;for(var st=!1,ht=nt=0,pt=0,yt=y.vertexes.iterator;yt.next();){var Mt=yt.value;1>=Mt.Vd?ht++:(st=!0,pt++,nt+=Math.atan2(y.centerY-Mt.centerY,y.centerX-Mt.centerX))}if(ht!==0){for(0<pt&&(nt/=pt),pt=y=0,y=st?2*Math.PI/(ht+1):2*Math.PI/ht,ht%2===0&&(pt=y/2),1<x.count&&x.sort(function(Zt,Qt){return Zt===null||Qt===null||Zt===Qt?0:Qt.width*Qt.height-Zt.width*Zt.height}),st=ht%2===0?0:1,x=x.iterator;x.next();)if(ht=x.value,!(1<ht.Vd||a.isFixed(ht))){for(yt=null,Mt=ht.edges.iterator;Mt.next();){yt=Mt.value;break}Mt=ht.width;var zt=ht.height;Mt=Ge.sqrt(Mt*Mt+zt*zt)/2,yt=et+yt.length+Mt,Mt=nt+(y*(st/2>>1)+pt)*(st%2===0?1:-1),ht.centerX=b+yt*Math.cos(Mt),ht.centerY=E+yt*Math.sin(Mt),st++}}}}function _S(a,y,x,b,E,et,nt){var st=9e19,ht=-1,pt=0;t:for(;pt<y;pt++){var yt=a[pt],Mt=yt.x-x,zt=yt.y-b;if(Mt=Mt*Mt+zt*zt,Mt<st){for(zt=pt-1;0<=zt;zt--)if(a[zt].y>yt.y&&a[zt].x-yt.x<E+nt.width)continue t;for(zt=pt+1;zt<y;zt++)if(a[zt].x>yt.x&&a[zt].y-yt.y<et+nt.height)continue t;ht=pt,st=Mt}}return ht}Zo.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Zo.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 et=E.value;if(et.toVertex===a){x=et;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(et=E.value,et.fromVertex===a){x=et;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 et=y.bounds,nt=et.x;y=et.y;var st=et.width;return et=et.height,b+E<nt?a>y+et?(x=b+E-nt,a=a-y-et,Ge.sqrt(x*x+a*a)):a+x<y?(b=b+E-nt,a=a+x-y,Ge.sqrt(b*b+a*a)):nt-(b+E):b>nt+st?a>y+et?(x=b-nt-st,a=a-y-et,Ge.sqrt(x*x+a*a)):a+x<y?(b=b-nt-st,a=a+x-y,Ge.sqrt(b*b+a*a)):b-(nt+st):a>y+et?a-(y+et):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,et=x=x.centerY,nt=1;nt<y.length;nt++){var st=y[nt];st.forceX=0,st.forceY=0;var ht=st.centerX;st=st.centerY,b=Math.min(b,ht),E=Math.max(E,ht),x=Math.min(x,st),et=Math.max(et,st)}(E=E-b>et-x)?y.sort(function(ie,Ee){return ie===null||Ee===null||ie===Ee?0:ie.centerX-Ee.centerX}):y.sort(function(ie,Ee){return ie===null||Ee===null||ie===Ee?0:ie.centerY-Ee.centerY}),x=a.Zf;var pt=b=st=0;for(et=0;et<y.length;et++){nt=y[et],b=nt.bounds,st=nt.focus,ht=b.x+st.x;var yt=b.y+st.y;b=nt.charge*a.electricalFieldX(ht,yt),pt=nt.charge*a.electricalFieldY(ht,yt),b+=nt.mass*a.gravitationalFieldX(ht,yt),pt+=nt.mass*a.gravitationalFieldY(ht,yt),nt.forceX+=b,nt.forceY+=pt;for(var Mt=et+1;Mt<y.length;Mt++){var zt=y[Mt];if(zt!==nt){b=zt.bounds,st=zt.focus,pt=b.x+st.x;var Zt=b.y+st.y;if(ht-pt>x||pt-ht>x){if(E)break}else if(yt-Zt>x||Zt-yt>x){if(!E)break}else{var Qt=zS(nt,zt);1>Qt?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new xv),Qt=b.random(),st=b.random(),ht>pt?(b=Math.abs(zt.bounds.right-nt.bounds.x),b=(1+b)*Qt):ht<pt?(b=Math.abs(zt.bounds.x-nt.bounds.right),b=-(1+b)*Qt):(b=Math.max(zt.width,nt.width),b=(1+b)*Qt-b/2),yt>Zt?(pt=Math.abs(zt.bounds.bottom-nt.bounds.y),pt=(1+pt)*st):ht<pt?(pt=Math.abs(zt.bounds.y-nt.bounds.bottom),pt=-(1+pt)*st):(pt=Math.max(zt.height,nt.height),pt=(1+pt)*st-pt/2)):(st=-(nt.charge*zt.charge)/(Qt*Qt),b=(pt-ht)/Qt*st,pt=(Zt-yt)/Qt*st),nt.forceX+=b,nt.forceY+=pt,zt.forceX-=b,zt.forceY-=pt}}}}for(E=a.network.edges.iterator;E.next();)st=E.value,x=st.fromVertex,et=st.toVertex,nt=x.bounds,ht=x.focus,b=nt.x+ht.x,nt=nt.y+ht.y,yt=et.bounds,Mt=et.focus,ht=yt.x+Mt.x,yt=yt.y+Mt.y,Mt=zS(x,et),1>Mt?(Mt=a.randomNumberGenerator,Mt===null&&(a.randomNumberGenerator=Mt=new xv),st=Mt.random(),Mt=Mt.random(),b=(b>ht?1:-1)*(1+(et.width>x.width?et.width:x.width))*st,pt=(nt>yt?1:-1)*(1+(et.height>x.height?et.height:x.height))*Mt):(st=st.stiffness*(Mt-st.length),b=(ht-b)/Mt*st,pt=(yt-nt)/Mt*st),x.forceX+=b,x.forceY+=pt,et.forceX-=b,et.forceY-=pt;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}Zo.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},Zo.prototype.moveFixedVertex=function(){},Zo.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Zo.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=jo,y.toSpot=jo)}},Zo.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=on.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,on.free(x)}x=on.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()}on.free(x)},Zo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Zo.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Zo.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Zo.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Zo.prototype.electricalFieldX=function(){return 0},Zo.prototype.electricalFieldY=function(){return 0},Zo.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Zo.prototype.gravitationalFieldX=function(){return 0},Zo.prototype.gravitationalFieldY=function(){return 0},Zo.prototype.isFixed=function(a){return a.isFixed},un.Object.defineProperties(Zo.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"&&Oe('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())}}}),Zo.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Af(a){xi.call(this,a)}$e(Af,xi),Af.prototype.createVertex=function(){return new vg(this)},Af.prototype.createEdge=function(){return new yg(this)},Af.className="ForceDirectedNetwork";function vg(a){So.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}$e(vg,So),un.Object.defineProperties(vg.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)}}}),vg.className="ForceDirectedVertex";function yg(a){rs.call(this,a),this.j=this.o=NaN}$e(yg,rs),un.Object.defineProperties(yg.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)}}}),yg.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 ui(a){ji.call(this),this.kc=this.ie=25,this.K=0,this.Dk=kv,this.Zk=Ev,this.Qk=Mv,this.bj=4,this.rk=Tv,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 Le,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}$e(ui,ji),ui.prototype.cloneProtected=function(a){ji.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},ui.prototype.qb=function(a){a.classType===ui?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:Oe("Unknown enum value: "+a):ji.prototype.qb.call(this,a)},ui.prototype.createNetwork=function(){return new Gd(this)},ui.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!==xg&&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===xg&&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,et=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||et.node===null&&et.data===null)&&E.layer===et.layer)){var nt=0,st=0,ht=0,pt=0;if(b.link!==null){if(st=b.link,st===null)continue;var yt=E.node;if(nt=et.node,yt===null||nt===null)continue;var Mt=st.fromNode;ht=st.toNode;for(var zt=st.fromPort;zt!==null&&!zt.Ed();)zt=zt.panel;for(st=st.toPort;st!==null&&!st.Ed();)st=st.panel;if(b.rev){pt=Mt;var Zt=zt;Mt=ht,zt=st,ht=pt,st=Zt}var Qt=E.focus;pt=et.focus;var ie=b.rev?et.bounds:E.bounds;Zt=Le.alloc(),yt!==Mt?ie.w()&&Mt.isVisible()?Mt.actualBounds.w()?(ih(Mt,zt,Dr,Zt),Zt.x+=Mt.actualBounds.x-ie.x,Zt.y+=Mt.actualBounds.y-ie.y):(ih(Mt,zt,Dr,Zt),Zt.w()||Zt.assign(Qt)):Zt.assign(Qt):ie.w()?(ih(Mt,zt,Dr,Zt),Zt.w()||Zt.assign(Qt)):Zt.assign(Qt),Mt=b.rev?E.bounds:et.bounds,yt=Le.alloc(),nt!==ht?Mt.w()&&ht.isVisible()?ht.actualBounds.w()?(ih(ht,st,Dr,yt),yt.x+=ht.actualBounds.x-Mt.x,yt.y+=ht.actualBounds.y-Mt.y):(ih(ht,st,Dr,yt),yt.w()||yt.assign(pt)):yt.assign(pt):Mt.w()?(ih(ht,st,Dr,yt),yt.w()||yt.assign(pt)):yt.assign(pt),this.K===90||this.K===270?(nt=Math.round((Zt.x-Qt.x)/this.kc),ht=Zt.x,st=Math.round((yt.x-pt.x)/this.kc),pt=yt.x):(nt=Math.round((Zt.y-Qt.y)/this.kc),ht=Zt.y,st=Math.round((yt.y-pt.y)/this.kc),pt=yt.y),Le.free(Zt),Le.free(yt),b.portFromColOffset=nt,b.portFromPos=ht,b.portToColOffset=st,b.portToPos=pt}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Zt=E.layer,yt=et.layer,Mt=0,ie=b.link,ie!==null){var Ee=ie.fromPort,we=ie.toPort;if(Ee!==null&&we!==null){var je=ie.fromNode;if(zt=ie.toNode,je!==null&&zt!==null){var Fe=Cv(this,!0),De=Cv(this,!1),_e=this.setsPortSpots?Fe:ie.computeSpot(!0,Ee);Qt=this.setsPortSpots?De:ie.computeSpot(!1,we);var Xe=ie.isOrthogonal;_e.$c()&&_e.Hf(De)&&Qt.$c()&&Qt.Hf(Fe)?Mt=0:(Fe=ie.getLinkPoint(je,Ee,_e,!0,Xe,zt,we,Le.alloc()),De=ie.getLinkDirection(je,Ee,Fe,_e,!0,Xe,zt,we),Le.free(Fe),_e.ys()||De!==QS(this,b,!0)?this.setsPortSpots&&je!==null&&je.ports.count===1&&b.rev&&(Mt+=1):Mt+=1,_e=ie.getLinkPoint(zt,we,Qt,!1,Xe,je,Ee,Le.alloc()),ie=ie.getLinkDirection(zt,we,_e,Qt,!1,Xe,je,Ee),Le.free(_e),Qt.ys()||ie!==QS(this,b,!1)?this.setsPortSpots&&zt!==null&&zt.ports.count===1&&b.rev&&(Mt+=2):Mt+=2)}}}if(zt=Mt,Mt=zt===1||zt===3,(zt=zt===2||zt===3)&&(Qt=a.createVertex(),Qt.node=null,Qt.Dj=1,Qt.layer=Zt,Qt.near=E,a.dh(Qt),E=a.Zj(E,Qt,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=nt,E.portToColOffset=0,E.portFromPos=ht,E.portToPos=0,E=Qt),ie=1,Mt&&ie--,Zt-yt>ie&&0<Zt){for(b.valid=!1,Qt=a.createVertex(),Qt.node=null,Qt.Dj=2,Qt.layer=Zt-1,a.dh(Qt),E=a.Zj(E,Qt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=zt?0:nt,E.portToColOffset=0,E.portFromPos=zt?0:ht,E.portToPos=0,E=Qt,Zt--;Zt-yt>ie&&0<Zt;)Qt=a.createVertex(),Qt.node=null,Qt.Dj=3,Qt.layer=Zt-1,a.dh(Qt),E=a.Zj(E,Qt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=Qt,Zt--;E=a.Zj(Qt,et,b.link),E.valid=!Mt,Mt&&(Qt.near=et),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=st,E.portFromPos=0,E.portToPos=pt}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=Yh(this,a),x=0,b=this.tc[a],et=0;et<b;et++)E=y[et],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),Jh(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},ui.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}ui.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},ui.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 _a(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 Fs(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 WS(a,y,x){var b=Yh(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var et=a.Jn,nt=0;nt<E;nt++){var st=0,ht=b[nt],pt=ht.near;if(pt!==null&&pt.layer===ht.layer)if(ht=pt.index,ht>nt)for(var yt=nt+1;yt<ht;yt++){var Mt=b[yt];Mt.near===pt&&Mt.Dj===pt.Dj||st++}else for(yt=nt-1;yt>ht;yt--)Mt=b[yt],Mt.near===pt&&Mt.Dj===pt.Dj||st++;var zt;if(0<=x)for(ht=b[nt].sourceEdgesArrayAccess,pt=0;pt<ht.length;pt++){var Zt=ht[pt];if(Zt.valid&&Zt.fromVertex.layer!==y)for(Mt=Zt.fromVertex.index,yt=Zt.portToPos,Zt=Zt.portFromPos,zt=pt+1;zt<ht.length;zt++){var Qt=ht[zt];if(Qt.valid&&Qt.fromVertex.layer!==y){var ie=Qt.fromVertex.index,Ee=Qt.portToPos;Qt=Qt.portFromPos,yt<Ee&&(Mt>ie||Mt===ie&&Zt>Qt)&&st++,Ee<yt&&(ie>Mt||ie===Mt&&Qt>Zt)&&st++}}}if(0>=x){for(ht=b[nt].destinationEdgesArrayAccess,pt=0;pt<ht.length;pt++)if(Zt=ht[pt],Zt.valid&&Zt.toVertex.layer!==y)for(Mt=Zt.toVertex.index,yt=Zt.portToPos,Zt=Zt.portFromPos,zt=pt+1;zt<ht.length;zt++)Qt=ht[zt],Qt.valid&&Qt.toVertex.layer!==y&&(ie=Qt.toVertex.index,Ee=Qt.portToPos,Qt=Qt.portFromPos,Zt<Qt&&(Mt>ie||Mt===ie&&yt>Ee)&&st++,Qt<Zt&&(ie>Mt||ie===Mt&&Ee>yt)&&st++)}for(et[nt*E+nt]=st,ht=nt+1;ht<E;ht++){var we=0,je=0;if(0<=x){st=b[nt].sourceEdgesArrayAccess;var Fe=b[ht].sourceEdgesArrayAccess;for(pt=0;pt<st.length;pt++)if(Zt=st[pt],Zt.valid&&Zt.fromVertex.layer!==y)for(Mt=Zt.fromVertex.index,Zt=Zt.portFromPos,zt=0;zt<Fe.length;zt++)Qt=Fe[zt],Qt.valid&&Qt.fromVertex.layer!==y&&(ie=Qt.fromVertex.index,Qt=Qt.portFromPos,(Mt<ie||Mt===ie&&Zt<Qt)&&je++,(ie<Mt||ie===Mt&&Qt<Zt)&&we++)}if(0>=x){for(st=b[nt].destinationEdgesArrayAccess,Fe=b[ht].destinationEdgesArrayAccess,pt=0;pt<st.length;pt++)if(Zt=st[pt],Zt.valid&&Zt.toVertex.layer!==y)for(Mt=Zt.toVertex.index,yt=Zt.portToPos,zt=0;zt<Fe.length;zt++)Qt=Fe[zt],Qt.valid&&Qt.toVertex.layer!==y&&(ie=Qt.toVertex.index,Ee=Qt.portToPos,(Mt<ie||Mt===ie&&yt<Ee)&&je++,(ie<Mt||ie===Mt&&Ee<yt)&&we++)}et[nt*E+ht]=we,et[ht*E+nt]=je}}return Jh(a,y,b),et}ui.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=WS(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var et=E;et<b;et++)a+=x[E*b+et];return a};function wv(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,et=Yh(b,E),nt=b.tc[E],st=0,ht=0;ht<nt;ht++){var pt=et[ht].destinationEdgesArrayAccess;if(pt!==null)for(var yt=0;yt<pt.length;yt++){var Mt=pt[yt];if(Mt.valid&&Mt.toVertex.layer!==E){var zt=Mt.fromVertex.column+Mt.portFromColOffset,Zt=Mt.toVertex.column+Mt.portToColOffset;st+=(Math.abs(zt-Zt)+1)*gy(Mt)}}}Jh(b,E,et),y+=st}return y}ui.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=Yh(a,y),E=a.tc[y],et=[],nt=0;nt<E;nt++){var st=b[nt],ht=null;0>=x&&(ht=st.sourceEdgesArrayAccess);var pt=null;0<=x&&(pt=st.destinationEdgesArrayAccess);var yt=0,Mt=0,zt=st.near;if(zt!==null&&zt.layer===st.layer&&(yt+=zt.column-1,Mt++),ht!==null)for(zt=0;zt<ht.length;zt++){st=ht[zt];var Zt=st.fromVertex;st.valid&&!st.rev&&Zt.layer!==y&&(yt+=Zt.column,Mt++)}if(pt!==null)for(ht=0;ht<pt.length;ht++)st=pt[ht],zt=st.toVertex,st.valid&&!st.rev&&zt.layer!==y&&(yt+=zt.column,Mt++);et[nt]=Mt===0?-1:yt/Mt}return Jh(a,y,b),et}function HS(a,y,x){for(var b=Yh(a,y),E=a.tc[y],et=[],nt=0;nt<E;nt++){var st=b[nt],ht=null;0>=x&&(ht=st.sourceEdgesArrayAccess);var pt=null;0<=x&&(pt=st.destinationEdgesArrayAccess);var yt=0,Mt=[],zt=st.near;if(zt!==null&&zt.layer===st.layer&&(Mt[yt]=zt.column-1,yt++),st=void 0,ht!==null)for(zt=0;zt<ht.length;zt++){st=ht[zt];var Zt=st.fromVertex;st.valid&&!st.rev&&Zt.layer!==y&&(Mt[yt]=Zt.column+st.portFromColOffset,yt++)}if(pt!==null)for(ht=0;ht<pt.length;ht++)st=pt[ht],zt=st.toVertex,st.valid&&!st.rev&&zt.layer!==y&&(Mt[yt]=zt.column+st.portToColOffset,yt++);yt===0?et[nt]=-1:(Mt.sort(function(Qt,ie){return Qt-ie}),pt=yt>>1,et[nt]=yt&1?Mt[pt]:Mt[pt-1]+Mt[pt]>>1)}return Jh(a,y,b),et}function Sg(a,y,x,b,E,et){if(y.component===b){if(y.component=x,E)for(var nt=y.destinationEdges;nt.next();){var st=nt.value,ht=st.toVertex,pt=y.layer-ht.layer;st=a.linkMinLength(st),pt===st&&Sg(a,ht,x,b,E,et)}if(et)for(nt=y.sourceEdges;nt.next();)st=nt.value,ht=st.fromVertex,pt=ht.layer-y.layer,st=a.linkMinLength(st),pt===st&&Sg(a,ht,x,b,E,et)}}function vy(a,y,x,b,E,et){if(y.component===b){if(y.component=x,E)for(var nt=y.destinationEdges;nt.next();)vy(a,nt.value.toVertex,x,b,E,et);if(et)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,et)}}ui.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case xy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;zx(a)!==null;){for(E=VS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=VS(a);for(E=KS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=KS(a);E=null;for(var et=0,nt=this.network.vertexes.iterator;nt.next();){var st=nt.value;if(st.valid){for(var ht=0,pt=st.destinationEdges;pt.next();)pt.value.toVertex.valid&&ht++;pt=0;for(var yt=st.sourceEdges;yt.next();)yt.value.fromVertex.valid&&pt++;(E===null||et<ht-pt)&&(E=st,et=ht-pt)}}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 kv: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,et=E.finish,E.Ll<y.Ll&&x<et&&(this.network.gm(b),b.rev=!0));break;case xg: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(et=0;et<E.length;et++)E[et].layer-=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function VS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function KS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.sourceEdges;b.next();)if(b.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function yy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var b=x.value,E=b.toVertex;E.Ll===-1&&(b.forest=!0,yy(a,E))}y.finish=a.Kn,a.Kn++}ui.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 Ev: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,et=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,XS(a,et)+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,et=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,et)+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,et=0;et<E;et++){var nt=b[et],st=nt.fromVertex,ht=nt.toVertex;nt=a.linkMinLength(nt),st.layer-ht.layer>nt&&Sg(a,st,0,-1,!0,!1)}for(Sg(a,y,1,-1,!0,!0);y.component!==0;){for(et=0,b=1/0,st=0,ht=null,nt=a.network.vertexes.iterator;nt.next();){var pt=nt.value;if(pt.component===1){var yt=0,Mt=!1,zt=pt.sourceEdgesArrayAccess;E=zt.length;for(var Zt=0;Zt<E;Zt++){var Qt=zt[Zt],ie=Qt.fromVertex;yt+=1,ie.component!==1&&(et+=1,ie=ie.layer-pt.layer,Qt=a.linkMinLength(Qt),b=Math.min(b,ie-Qt))}for(zt=pt.destinationEdgesArrayAccess,E=zt.length,Zt=0;Zt<E;Zt++)Qt=zt[Zt].toVertex,--yt,Qt.component!==1?--et:Mt=!0;(ht===null||yt<st)&&!Mt&&(ht=pt,st=yt)}}if(0<et){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else ht.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Sg(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,et=0,st=null,ht=a.network.vertexes.iterator;ht.next();)if(nt=ht.value,nt.component===1){for(pt=0,yt=!1,zt=nt.sourceEdgesArrayAccess,Mt=zt.length,Zt=0;Zt<Mt;Zt++)Qt=zt[Zt].fromVertex,pt+=1,Qt.component!==1?b+=1:yt=!0;for(zt=nt.destinationEdgesArrayAccess,Mt=zt.length,Zt=0;Zt<Mt;Zt++)Qt=zt[Zt],ie=Qt.toVertex,--pt,ie.component!==1&&(--b,ie=nt.layer-ie.layer,Qt=a.linkMinLength(Qt),E=Math.min(E,ie-Qt));(st===null||pt>et)&&!yt&&(st=nt,et=pt)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else st.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}ui.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 Mv: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],et=y[b+1];E.portFromColOffset>et.portFromColOffset&&(x=!0,y[b]=et,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],et=y[x+1];E.portToColOffset>et.portToColOffset&&(b=!0,y[x]=et,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))}ui.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=_a(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)bv(this,b,1),Vs(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=_a(this)),b=this.Ia;0<=b;b--)bv(this,b,-1),Vs(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=_a(this))}for(Fs(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)bv(this,b,0),Vs(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=_a(this)),b=this.Ia;0<=b;b--)bv(this,b,0),Vs(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=_a(this))}Fs(this,y);var et,nt,st;switch(this.rk){case ky:break;case Ey:for(st=a+1;(b=this.countCrossings())<st;)for(st=b,x=this.Ia;0<=x;x--)for(nt=0;nt<=x;nt++){for(et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Vs(this,b,-1)||et;for(E=this.countCrossings(),E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Vs(this,b,1)||et;for(E=this.countCrossings(),E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Vs(this,b,1)||et;for(E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Vs(this,b,-1)||et;for(E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Vs(this,b,0)||et;for(E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Vs(this,b,0)||et;E>=a?Fs(this,y):(a=E,y=_a(this))}break;default:case Tv:for(x=this.Ia,nt=0,st=a+1;(b=this.countCrossings())<st;){for(st=b,et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Vs(this,b,-1)||et;for(E=this.countCrossings(),E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Vs(this,b,1)||et;for(E=this.countCrossings(),E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Vs(this,b,1)||et;for(E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Vs(this,b,-1)||et;for(E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Vs(this,b,0)||et;for(E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Vs(this,b,0)||et;E>=a?Fs(this,y):(a=E,y=_a(this))}}Fs(this,y)};function bv(a,y,x){var b=Yh(a,y),E=a.tc[y],et=HS(a,y,x),nt=my(a,y,x);for(x=0;x<E;x++)nt[x]===-1&&(nt[x]=b[x].column),et[x]===-1&&(et[x]=b[x].column);for(var st=!0,ht;st;)for(st=!1,x=0;x<E-1;x++)(et[x+1]<et[x]||et[x+1]===et[x]&&nt[x+1]<nt[x])&&(st=!0,ht=et[x],et[x]=et[x+1],et[x+1]=ht,ht=nt[x],nt[x]=nt[x+1],nt[x+1]=ht,ht=b[x],b[x]=b[x+1],b[x+1]=ht);for(x=et=0;x<E;x++)ht=b[x],ht.index=x,et+=a.nodeMinColumnSpace(ht,!0),ht.column=et,et+=1,et+=a.nodeMinColumnSpace(ht,!1);Jh(a,y,b)}function Vs(a,y,x){var b=Yh(a,y),E=a.tc[y];x=WS(a,y,x);var et,nt=[];for(et=0;et<E;et++)nt[et]=-1;var st=[];for(et=0;et<E;et++)st[et]=-1;for(var ht=!1,pt=!0;pt;)for(pt=!1,et=0;et<E-1;et++){var yt=x[b[et].index*E+b[et+1].index],Mt=x[b[et+1].index*E+b[et].index],zt=0,Zt=0,Qt=b[et].column,ie=b[et+1].column,Ee=a.nodeMinColumnSpace(b[et],!0),we=a.nodeMinColumnSpace(b[et],!1),je=a.nodeMinColumnSpace(b[et+1],!0),Fe=a.nodeMinColumnSpace(b[et+1],!1);Ee=Qt-Ee+je,we=ie-we+Fe;var De=b[et].sourceEdges.iterator;for(De.reset();De.next();)if(je=De.value,Fe=je.fromVertex,je.valid&&Fe.layer===y){for(je=0;b[je]!==Fe;)je++;je<et&&(zt+=2*(et-je),Zt+=2*(et+1-je)),je===et+1&&(zt+=1),je>et+1&&(zt+=4*(je-et),Zt+=4*(je-(et+1)))}for(De=b[et].destinationEdges.iterator,De.reset();De.next();)if(je=De.value,Fe=je.toVertex,je.valid&&Fe.layer===y){for(je=0;b[je]!==Fe;)je++;je===et+1&&(Zt+=1)}for(De=b[et+1].sourceEdges.iterator,De.reset();De.next();)if(je=De.value,Fe=je.fromVertex,je.valid&&Fe.layer===y){for(je=0;b[je]!==Fe;)je++;je<et&&(zt+=2*(et+1-je),Zt+=2*(et-je)),je===et&&(Zt+=1),je>et+1&&(zt+=4*(je-(et+1)),Zt+=4*(je-et))}for(De=b[et+1].destinationEdges.iterator,De.reset();De.next();)if(je=De.value,Fe=je.toVertex,je.valid&&Fe.layer===y){for(je=0;b[je]!==Fe;)je++;je===et&&(zt+=1)}je=Fe=0,De=nt[b[et].index];var _e=st[b[et].index],Xe=nt[b[et+1].index],En=st[b[et+1].index];De!==-1&&(Fe+=Math.abs(De-Qt),je+=Math.abs(De-we)),_e!==-1&&(Fe+=Math.abs(_e-Qt),je+=Math.abs(_e-we)),Xe!==-1&&(Fe+=Math.abs(Xe-ie),je+=Math.abs(Xe-Ee)),En!==-1&&(Fe+=Math.abs(En-ie),je+=Math.abs(En-Ee)),(Zt<zt-.5||Zt===zt&&Mt<yt-.5||Zt===zt&&Mt===yt&&je<Fe-.5)&&(pt=ht=!0,b[et].column=we,b[et+1].column=Ee,yt=b[et],b[et]=b[et+1],b[et+1]=yt)}for(et=0;et<E;et++)b[et].index=et;return Jh(a,y,b),ht}ui.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 et=E.value;y=et.layer,b=et.column,et=this.nodeMinColumnSpace(et,!1),x[y]=Math.max(x[y],b+et)}for(E.reset();E.next();)et=E.value,y=et.layer,b=et.column,et.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&&(tx(this,-1),tx(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 Hx(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=Yh(a,y),et=a.tc[y],nt=my(a,y,-1);if(0<x)for(b=0;b<et;b++)nt[b]=-1;var st=my(a,y,1);if(0>x)for(b=0;b<et;b++)st[b]=-1;for(var ht=!1,pt=!0;pt;)for(pt=!1,b=0;b<et;b++){var yt=E[b].column,Mt=a.nodeMinColumnSpace(E[b],!0),zt=a.nodeMinColumnSpace(E[b],!1),Zt=0;0>b-1||yt-E[b-1].column-1>Mt+a.nodeMinColumnSpace(E[b-1],!1)?Zt=yt-1:Zt=yt,Mt=b+1>=et||E[b+1].column-yt-1>zt+a.nodeMinColumnSpace(E[b+1],!0)?yt+1:yt;var Qt=zt=0,ie=0;if(0>=x)for(var Ee=E[b].sourceEdges.iterator;Ee.next();){var we=Ee.value,je=we.fromVertex;if(we.valid&&je.layer!==y){var Fe=gy(we),De=we.portFromColOffset;we=we.portToColOffset,je=je.column,zt+=(Math.abs(yt+we-(je+De))+1)*Fe,Qt+=(Math.abs(Zt+we-(je+De))+1)*Fe,ie+=(Math.abs(Mt+we-(je+De))+1)*Fe}}if(0<=x)for(Ee=E[b].destinationEdges.iterator;Ee.next();)we=Ee.value,je=we.toVertex,we.valid&&je.layer!==y&&(Fe=gy(we),De=we.portFromColOffset,we=we.portToColOffset,je=je.column,zt+=(Math.abs(yt+De-(je+we))+1)*Fe,Qt+=(Math.abs(Zt+De-(je+we))+1)*Fe,ie+=(Math.abs(Mt+De-(je+we))+1)*Fe);we=De=Fe=0,Ee=nt[E[b].index],je=st[E[b].index],Ee!==-1&&(Fe+=Math.abs(Ee-yt),De+=Math.abs(Ee-Zt),we+=Math.abs(Ee-Mt)),je!==-1&&(Fe+=Math.abs(je-yt),De+=Math.abs(je-Zt),we+=Math.abs(je-Mt)),Qt<zt||Qt===zt&&De<Fe?(pt=ht=!0,E[b].column=Zt):(ie<zt||ie===zt&&we<Fe)&&(pt=ht=!0,E[b].column=Mt)}return Jh(a,y,E),a.normalize(),ht}function Sy(a,y,x){var b=Yh(a,y),E=a.tc[y],et=HS(a,y,x),nt=[];for(x=0;x<E;x++)nt[x]=et[x];for(et=!0;et;)for(et=!1,x=0;x<E;x++){var st=b[x].column,ht=a.nodeMinColumnSpace(b[x],!0),pt=a.nodeMinColumnSpace(b[x],!1),yt=0;if(nt[x]===-1)if(x===0&&x===E-1)yt=st;else if(x===0){var Mt=b[x+1].column;Mt-st===pt+a.nodeMinColumnSpace(b[x+1],!0)?yt=st-1:yt=st}else x===E-1?(Mt=b[x-1].column,yt=st-Mt===ht+a.nodeMinColumnSpace(b[x-1],!1)?st+1:st):(Mt=b[x-1].column,ht=Mt+a.nodeMinColumnSpace(b[x-1],!1)+ht+1,Mt=b[x+1].column,pt=Mt-a.nodeMinColumnSpace(b[x+1],!0)-pt-1,yt=(ht+pt)/2|0);else x===0&&x===E-1?yt=nt[x]:x===0?(Mt=b[x+1].column,pt=Mt-a.nodeMinColumnSpace(b[x+1],!0)-pt-1,yt=Math.min(nt[x],pt)):x===E-1?(Mt=b[x-1].column,ht=Mt+a.nodeMinColumnSpace(b[x-1],!1)+ht+1,yt=Math.max(nt[x],ht)):(Mt=b[x-1].column,ht=Mt+a.nodeMinColumnSpace(b[x-1],!1)+ht+1,Mt=b[x+1].column,pt=Mt-a.nodeMinColumnSpace(b[x+1],!0)-pt-1,ht<nt[x]&&nt[x]<pt?yt=nt[x]:ht>=nt[x]?yt=ht:pt<=nt[x]&&(yt=pt));yt!==st&&(et=!0,b[x].column=yt)}Jh(a,y,b),a.normalize()}function Ux(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,et=a.nodeMinColumnSpace(E,!0),nt=a.nodeMinColumnSpace(E,!1);if(E.column-et<=y&&E.column+nt>=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 Wx(a,y){var x=y+1,b,E=[],et=[];for(b=0;b<=a.Ia;b++)E[b]=!1,et[b]=!1;for(var nt=a.network.vertexes.iterator;nt.next();){b=nt.value;var st=b.column-a.nodeMinColumnSpace(b,!0),ht=b.column+a.nodeMinColumnSpace(b,!1);st<=y&&ht>=y&&(E[b.layer]=!0),st<=x&&ht>=x&&(et[b.layer]=!0)}for(st=!0,x=!1,b=0;b<=a.Ia;b++)st=st&&!(E[b]&&et[b]);if(st)for(nt.reset();nt.next();)a=nt.value,a.column>y&&(--a.column,x=!0);return x}function tx(a,y){for(var x=0;x<=a.Ra;x++)for(;Ux(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Wx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=_a(a),et=wv(a);for(b=et+1;et<b;){b=et,ex(a,x,1);var nt=wv(a);nt>et?Fs(a,E):nt<et&&(et=nt,E=_a(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=_a(a),et=wv(a),b=et+1;et<b;)b=et,ex(a,x,-1),nt=wv(a),nt>et?Fs(a,E):nt<et&&(et=nt,E=_a(a));a.normalize()}function ex(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 et;for(y=[],et=0;et<a.le*a.le;et++)y[et]=!1;for(E=[],et=0;et<(a.Ia+1)*(a.Ra+1);et++)E[et]=-1;for(b.reset();b.next();){et=b.value;for(var nt=et.layer,st=Math.max(0,et.column-a.nodeMinColumnSpace(et,!0)),ht=Math.min(a.Ra,et.column+a.nodeMinColumnSpace(et,!1));st<=ht;st++)E[nt*(a.Ra+1)+st]=et.component}for(et=0;et<=a.Ia;et++){if(0<x)for(nt=0;nt<a.Ra;nt++)E[et*(a.Ra+1)+nt]!==-1&&E[et*(a.Ra+1)+nt+1]!==-1&&E[et*(a.Ra+1)+nt]!==E[et*(a.Ra+1)+nt+1]&&(y[E[et*(a.Ra+1)+nt]*a.le+E[et*(a.Ra+1)+nt+1]]=!0);if(0>x)for(nt=a.Ra;0<nt;nt--)E[et*(a.Ra+1)+nt]!==-1&&E[et*(a.Ra+1)+nt-1]!==-1&&E[et*(a.Ra+1)+nt]!==E[et*(a.Ra+1)+nt-1]&&(y[E[et*(a.Ra+1)+nt]*a.le+E[et*(a.Ra+1)+nt-1]]=!0)}for(E=[],et=0;et<a.le;et++)E[et]=!0;for(nt=[],nt.push(0);nt.length!==0;)if(ht=nt[nt.length-1],nt.pop(),E[ht])for(E[ht]=!1,et=0;et<a.le;et++)y[ht*a.le+et]&&nt.splice(0,0,et);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 Hx(a){for(var y=Fn(),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 gn,Vx(y,x);var et=null,nt=null,st=null,ht=null,pt=(a.ve&1)!==0,yt=(a.ve&2)!==0,Mt=(a.ve&4)!==0,zt=(a.ve&8)!==0;for(pt&&(a.verticalAlignment(y,x,!0),et=Pv(a,y,!0,!1)),y.reverse(),Mt&&(a.verticalAlignment(y,x,!1),st=Pv(a,y,!1,!1)),b=Jn(y),E=b.next();!E.done;E=b.next())E.value.reverse();zt&&(a.verticalAlignment(y,x,!1),ht=Pv(a,y,!1,!0)),y.reverse(),yt&&(a.verticalAlignment(y,x,!0),nt=Pv(a,y,!0,!0)),Bn(y),a.u(et,nt,st,ht),a.network.vertexes.each(function(Zt){var Qt=Fn();pt&&Qt.push(et.get(Zt)),yt&&Qt.push(nt.get(Zt)),Mt&&Qt.push(st.get(Zt)),zt&&Qt.push(ht.get(Zt)),Qt.sort(function(Ee,we){return Ee-we});var ie=Qt.length;ie=(Qt[Math.floor((ie-1)/2)]+Qt[Math.ceil((ie-1)/2)])/2,Bn(Qt),Zt.zc=ie})}function Vx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,et=0,nt=a[b],st=a[b+1],ht=0;et<st.length;ht++){var pt=st[ht];t:{if(pt.node===null){var yt=My(pt);if(0<yt.length){yt=yt[0].node===null;break t}}yt=!1}var Mt=yt;if(ht===st.length-1||Mt){for(yt=nt.length-1,Mt&&(yt=My(pt)[0].index);et<=ht;){if(pt=st[et],!pt.bo){Mt=[];for(var zt=Jn(pt.sourceEdgesArrayAccess),Zt=zt.next();!Zt.done;Zt=zt.next())Zt=Zt.value,Zt.valid&&Mt.push(Zt);pt.bo=Mt}for(pt=Jn(pt.bo),Mt=pt.next();!Mt.done;Mt=pt.next())Mt=Mt.value,zt=Mt.fromVertex.index,(zt<E||zt>yt)&&y.add(Mt);et++}E=yt}}}ui.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Jn(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Jn(b.value);for(var et=b.next();!et.done;et=b.next()){et=et.value;var nt=x?My(et):Yx(et),st=nt.length;if(0<st){nt.sort(function(Mt,zt){return Mt.vi-zt.vi});var ht=(st-1)/2;for(st=Math.floor(ht),ht=Math.ceil(ht);st<=ht;st++)if(et.align===et){var pt=nt[st],yt=void 0;yt=x?Lv(pt,et):Lv(et,pt),!y.contains(yt)&&E<pt.vi&&(pt.align=et,et.root=pt.root,et.align=pt.root,E=pt.vi)}}}}};function Kx(a){for(var y=0;y<a.length;y++)for(var x=a[y],b=0;b<x.length;b++){var E=x[b];E.root=E,E.align=E,E.Tz=y,E.vi=b}}function Pv(a,y,x,b){for(var E=a.K===90||a.K===270,et=Jn(y),nt=et.next();!nt.done;nt=et.next()){var st=Jn(nt.value);for(nt=st.next();!nt.done;nt=st.next())nt=nt.value,nt.sd=nt,nt.shift=1/0,nt.zc=NaN,nt.qg=0}for(nt=a.K===90||a.K===270,et=Jn(y),st=et.next();!st.done;st=et.next()){st=Jn(st.value);for(var ht=st.next();!ht.done;ht=st.next())if(ht=ht.value,ht.root===ht){for(var pt=0,yt=ht;yt.align!==ht;){var Mt=yt.align,zt=nt?yt.width:yt.height,Zt=nt?Mt.width:Mt.height;if(x){var Qt=Lv(yt,Mt),ie=Qt.portFromPos,Ee=Qt.portToPos;Qt.link!==null&&(yt.node&&yt.node!==Qt.link.fromNode&&(ie=nt?yt.focusX:yt.focusY),Mt.node&&Mt.node!==Qt.link.toNode&&(Ee=nt?Mt.focusX:Mt.focusY))}else Qt=Lv(Mt,yt),ie=Qt.portToPos,Ee=Qt.portFromPos,Qt.link!==null&&(yt.node&&yt.node!==Qt.link.toNode&&(ie=nt?yt.focusX:yt.focusY),Mt.node&&Mt.node!==Qt.link.fromNode&&(Ee=nt?Mt.focusX:Mt.focusY));zt=b?yt.qg+(zt-ie)-(Zt-Ee):yt.qg+ie-Ee,Mt.qg=zt,pt=Math.min(pt,zt),yt=yt.align}yt=ht;do yt.qg=yt.qg-pt,yt=yt.align;while(yt!==ht)}}for(x=Jn(y),nt=x.next();!nt.done;nt=x.next())for(et=Jn(nt.value),nt=et.next();!nt.done;nt=et.next())nt=nt.value,nt.root===nt&&nx(a,nt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(nt=y[x][0],nt.sd===nt)){nt.sd.shift===1/0&&(nt.sd.shift=0),nt=x,st=0;do{for(et=y[nt][st];et.align!==et.root;)et=et.align,nt++,0<et.vi&&(st=rx(et,y),st.sd.shift=Math.min(st.sd.shift,et.sd.shift+et.zc+et.qg-(st.zc+st.qg+(E?st.width:st.height)+a.columnSpacing)));st=et.vi+1}while(nt<y.length&&st<y[nt].length&&et.sd===y[nt][st].sd)}for(a=new $n,y=Jn(y),nt=y.next();!nt.done;nt=y.next())for(x=Jn(nt.value),nt=x.next();!nt.done;nt=x.next())nt=nt.value,nt.zc=nt.zc+nt.sd.shift+nt.qg,et=E?nt.width:nt.height,a.add(nt,b?-nt.zc-et:nt.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),et=E.root;nx(a,et,x),y.sd===y&&(y.sd=et.sd);var nt=a.K===90||a.K===270?E.width:E.height;y.sd===et.sd&&(y.zc=Math.max(y.zc,et.zc+E.qg+nt-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&&Oe("Could not determine previous vertex in layer"),y[x][a-1]}ui.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Fn(),E=Fn(),et=1/0,nt=0;4>nt;nt++)if(y[nt]){var st=Zx(this,y[nt],b,E,nt);st<et&&(x=nt,et=st)}for(et={},nt=0;4>nt;et={delta:et.delta},nt++)y[nt]&&(et.delta=nt===0||nt===2?b[x]-b[nt]:E[x]-E[nt],et.delta!==0&&y[nt].each(function(ht){return function(pt){pt.value+=ht.delta}}(et)));Bn(b),Bn(E)};function Zx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var et=1/0,nt=-1/0;return y.each(function(st){var ht=st.key;st=st.value,ht=a.K===90||a.K===270?ht.width:ht.height,st<et&&(et=st),st+ht>nt&&(nt=st+ht)}),x[E]=et,b[E]=nt,nt-et}ui.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?da:oa:a.K===90?y?oa:da:a.K===180?y?Na:Yo:y?Yo:Na}ui.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 et=1/0,nt=E=1/0,st=-1/0;a.next();){var ht=a.value,pt=ht.layer,yt=ht.column|0;b?(nt=y.x+this.kc*yt,pt=this.Kd[pt]):(nt=this.Kd[pt],pt=y.y+this.kc*yt),ht.centerX=nt,ht.centerY=pt,x&&isFinite(ht.zc)&&(b?ht.node?ht.x=y.x+ht.zc:ht.centerX=y.x+ht.zc:ht.node?ht.y=y.y+ht.zc:ht.centerY=y.y+ht.zc),et=Math.min(ht.x,et),E=Math.min(ht.y,E),b?(nt=et,st=Math.max(st,ht.bounds.right)):(nt=E,st=Math.max(st,ht.bounds.bottom))}for(this.xw=st-nt,et=y.x-et,y=y.y-E,this.Rf=new Le(x&&b?0:et,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=et,x.y+=y,x.commit()},ui.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 on(0,0,x,Math.abs(this.Ta[0]))):y.push(new on(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new on(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new on(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new on(0,0,Math.abs(this.Ta[0]),x)):y.push(new on(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new on(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new on(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},ui.prototype.commitLayers=function(){},ui.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,et=b.toNode,nt=b.fromPort,st=b.toPort;if(E!==null){var ht=E.findVisibleNode();ht!==null&&ht!==E&&(E=ht,nt=ht.port)}et!==null&&(ht=et.findVisibleNode(),ht!==null&&ht!==et&&(et=ht,st=ht.port));var pt=y.computeSpot(!0,nt);ht=y.computeSpot(!1,st);var yt=x.fromVertex,Mt=x.toVertex;if(x.valid)y.curve===vs&&y.pointsCount===4&&(yt.column===Mt.column&&this.alignOption===0?(x=y.getLinkPoint(E,nt,pt,!0,!1,et,st),st=y.getLinkPoint(et,st,ht,!1,!1,E,nt),x.w()||x.set(E.actualBounds.center),st.w()||st.set(et.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+st.x)/3,(2*x.y+st.y)/3),y.yf((x.x+2*st.x)/3,(x.y+2*st.y)/3),y.yf(st.x,st.y)):(x=b=!1,nt!==null&&pt===Ur&&(b=!0),st!==null&&ht===Ur&&(x=!0),(b||x)&&(ht=null,b&&(ht=y.getLinkPointFromPoint(E,nt,nt.ga(Dr),y.i(3),!0),ht.w()||ht.set(E.actualBounds.center),y.L(0,ht.x,ht.y)),E=null,x&&(E=y.getLinkPointFromPoint(et,st,st.ga(Dr),y.i(0),!1),E.w()||E.set(et.actualBounds.center),y.L(3,E.x,E.y)),ht&&(et=y.i(2),y.L(1,(2*ht.x+et.x)/3,(2*ht.y+et.y)/3)),E&&(et=y.i(1),y.L(2,(2*E.x+et.x)/3,(2*E.y+et.y)/3))))),y.zf();else if(yt.layer===Mt.layer)y.zf();else{var zt=!1,Zt=!1,Qt=this.ie,ie=y.firstPickIndex+1;if(y.isOrthogonal){Zt=!0;var Ee=y.pointsCount;4<Ee&&y.points.removeRange(2,Ee-3)}else if(y.curve===vs)zt=!0,Ee=y.pointsCount,4<Ee&&y.points.removeRange(2,Ee-3),Ee===4&&(ie=2);else{Ee=y.pointsCount;var we=pt===Ur,je=ht===Ur;2<Ee&&we&&je?y.points.removeRange(1,Ee-2):3<Ee&&we&&!je?y.points.removeRange(1,Ee-3):3<Ee&&!we&&je?y.points.removeRange(2,Ee-2):4<Ee&&!we&&!je&&y.points.removeRange(2,Ee-3)}if(x.rev){for(;Mt!==null&&yt!==Mt;){var Fe=Ee=null;for(we=Mt.sourceEdges.iterator;we.next()&&(je=we.value,je.link!==x.link||(Ee=je.fromVertex,Fe=je.toVertex,Ee.node!==null)););if(Ee===null)break;if(Ee!==yt){we=y.i(ie-1).x,je=y.i(ie-1).y;var De=Ee.centerX,_e=Ee.centerY;if(Zt)this.K===180||this.K===0?ie===y.firstPickIndex+1?(y.m(ie++,we,je),y.m(ie++,we,_e)):(Fe!==null?Fe.centerY:je)!==_e&&(Fe=this.Ta[Ee.layer-1]+this.Rf.x,y.m(ie++,Fe,je),y.m(ie++,Fe,_e)):ie===y.firstPickIndex+1?(y.m(ie++,we,je),y.m(ie++,De,je)):(Fe!==null?Fe.centerX:we)!==De&&(Fe=this.Ta[Ee.layer-1]+this.Rf.y,y.m(ie++,we,Fe),y.m(ie++,De,Fe));else if(ie===y.firstPickIndex+1){Fe=Math.max(10,this.he[Mt.layer]);var Xe=Math.max(10,this.Ld[Mt.layer]);if(zt)this.K===180?De<=Mt.bounds.x?(Mt=Mt.bounds.x,y.m(ie++,Mt-Fe,_e),y.m(ie++,Mt,_e),y.m(ie++,Mt+Xe,_e)):(y.m(ie++,De-Fe,_e),y.m(ie++,De,_e),y.m(ie++,De+Xe,_e)):this.K===90?_e>=Mt.bounds.bottom?(Mt=Mt.bounds.y+Mt.bounds.height,y.m(ie++,De,Mt+Xe),y.m(ie++,De,Mt),y.m(ie++,De,Mt-Fe)):(y.m(ie++,De,_e+Xe),y.m(ie++,De,_e),y.m(ie++,De,_e-Fe)):this.K===270?_e<=Mt.bounds.y?(Mt=Mt.bounds.y,y.m(ie++,De,Mt-Fe),y.m(ie++,De,Mt),y.m(ie++,De,Mt+Xe)):(y.m(ie++,De,_e-Fe),y.m(ie++,De,_e),y.m(ie++,De,_e+Xe)):this.K===0&&(De>=Mt.bounds.right?(Mt=Mt.bounds.x+Mt.bounds.width,y.m(ie++,Mt+Xe,_e),y.m(ie++,Mt,_e),y.m(ie++,Mt-Fe,_e)):(y.m(ie++,De+Xe,_e),y.m(ie++,De,_e),y.m(ie++,De-Fe,_e)));else{y.m(ie++,we,je);var En=0;this.K===180||this.K===0?((this.K===180?De>=Mt.bounds.right:De<=Mt.bounds.x)&&(En=(this.K===0?-Fe:Xe)/2),y.m(ie++,we+En,_e)):((this.K===270?_e>=Mt.bounds.bottom:_e<=Mt.bounds.y)&&(En=(this.K===90?-Fe:Xe)/2),y.m(ie++,De,je+En)),y.m(ie++,De,_e)}}else Fe=Math.max(10,this.he[Ee.layer]),Xe=Math.max(10,this.Ld[Ee.layer]),zt?this.K===180?(y.m(ie++,De-Fe-Qt,_e),y.m(ie++,Math.min(De-Fe+Qt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.max(De+Xe-Qt/2,De),_e),y.m(ie++,De+Xe+Qt,_e)):this.K===90?(y.m(ie++,De,_e+Xe+Qt),y.m(ie++,De,Math.max(_e+Xe-Qt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.min(_e-Fe+Qt/2,_e)),y.m(ie++,De,_e-Fe-Qt)):this.K===270?(y.m(ie++,De,_e-Fe-Qt),y.m(ie++,De,Math.min(_e-Fe+Qt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.max(_e+Xe-Qt/2,_e)),y.m(ie++,De,_e+Xe+Qt)):(y.m(ie++,De+Xe+Qt,_e),y.m(ie++,Math.max(De+Xe-Qt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.min(De-Fe+Qt/2,De),_e),y.m(ie++,De-Fe-Qt,_e)):y.m(ie++,De,_e)}Mt=Ee}(st===null||pt!==Ur||Zt)&&(we=y.i(ie-1).x,je=y.i(ie-1).y,De=y.i(ie).x,_e=y.i(ie).y,Zt?(Qt=this.Ld[yt.layer],this.K===180||this.K===0?(Zt=je,Zt>=yt.bounds.y&&Zt<=yt.bounds.bottom&&(this.K===180?De>=yt.bounds.x:De<=yt.bounds.right)&&(Mt=yt.centerX+(this.K===180?-Qt:Qt),Zt<yt.bounds.y+yt.bounds.height/2?Zt=yt.bounds.y-this.kc/2:Zt=yt.bounds.bottom+this.kc/2,y.m(ie++,Mt,je),y.m(ie++,Mt,Zt)),y.m(ie++,De,Zt)):(Zt=we,Zt>=yt.bounds.x&&Zt<=yt.bounds.right&&(this.K===270?_e>=yt.bounds.y:_e<=yt.bounds.bottom)&&(Mt=yt.centerY+(this.K===270?-Qt:Qt),Zt<yt.bounds.x+yt.bounds.width/2?Zt=yt.bounds.x-this.kc/2:Zt=yt.bounds.right+this.kc/2,y.m(ie++,we,Mt),y.m(ie++,Zt,Mt)),y.m(ie++,Zt,_e)),y.m(ie++,De,_e)):zt?(Fe=Math.max(10,this.he[yt.layer]),Xe=Math.max(10,this.Ld[yt.layer]),this.K===180&&De>=yt.bounds.x?(Mt=yt.bounds.x+yt.bounds.width,y.L(ie-2,Mt,je),y.L(ie-1,Mt+Xe,je)):this.K===90&&_e<=yt.bounds.bottom?(Mt=yt.bounds.y,y.L(ie-2,we,Mt),y.L(ie-1,we,Mt-Fe)):this.K===270&&_e>=yt.bounds.y?(Mt=yt.bounds.y+yt.bounds.height,y.L(ie-2,we,Mt),y.L(ie-1,we,Mt+Xe)):this.K===0&&De<=yt.bounds.right&&(Mt=yt.bounds.x,y.L(ie-2,Mt,je),y.L(ie-1,Mt-Fe,je))):(Fe=Math.max(10,this.he[yt.layer]),Xe=Math.max(10,this.Ld[yt.layer]),Zt=0,this.K===180||this.K===0?((this.K===180?De<=yt.bounds.x:De>=yt.bounds.right)&&(Zt=(this.K===0?Xe:-Fe)/2),y.m(ie++,De+Zt,je)):((this.K===270?_e<=yt.bounds.y:_e>=yt.bounds.bottom)&&(Zt=(this.K===90?Xe:-Fe)/2),y.m(ie++,we,_e+Zt)),y.m(ie++,De,_e)))}else{for(;yt!==null&&yt!==Mt;){for(Fe=Ee=null,yt=yt.destinationEdges.iterator;yt.next()&&(we=yt.value,we.link!==x.link||(Ee=we.toVertex,Fe=we.fromVertex,Fe.node!==null&&(Fe=null),Ee.node!==null)););if(Ee===null)break;Ee!==Mt&&(we=y.i(ie-1).x,je=y.i(ie-1).y,De=Ee.centerX,_e=Ee.centerY,Zt?this.K===180||this.K===0?(Fe!==null?Fe.centerY:je)!==_e&&(Fe=this.Ta[Ee.layer]+this.Rf.x,ie===y.firstPickIndex+1&&(Fe=this.K===0?Math.max(Fe,we):Math.min(Fe,we)),y.m(ie++,Fe,je),y.m(ie++,Fe,_e)):(Fe!==null?Fe.centerX:we)!==De&&(Fe=this.Ta[Ee.layer]+this.Rf.y,ie===y.firstPickIndex+1&&(Fe=this.K===90?Math.max(Fe,je):Math.min(Fe,je)),y.m(ie++,we,Fe),y.m(ie++,De,Fe)):(Fe=Math.max(10,this.he[Ee.layer]),Xe=Math.max(10,this.Ld[Ee.layer]),zt?this.K===180?(y.m(ie++,De+Xe+Qt,_e),y.m(ie++,Math.max(De+Xe-Qt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.min(De-Fe+Qt/2,De),_e),y.m(ie++,De-Fe-Qt,_e)):this.K===90?(y.m(ie++,De,_e-Fe-Qt),y.m(ie++,De,Math.min(_e-Fe+Qt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.max(_e+Xe-Qt/2,_e)),y.m(ie++,De,_e+Xe+Qt)):this.K===270?(y.m(ie++,De,_e+Xe+Qt),y.m(ie++,De,Math.max(_e+Xe-Qt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.min(_e-Fe+Qt/2,_e)),y.m(ie++,De,_e-Fe-Qt)):(y.m(ie++,De-Fe-Qt,_e),y.m(ie++,Math.min(De-Fe+Qt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.max(De+Xe-Qt/2,De),_e),y.m(ie++,De+Xe+Qt,_e)):this.K===180?(y.m(ie++,De+Xe,_e),y.m(ie++,De-Fe,_e)):this.K===90?(y.m(ie++,De,_e-Fe),y.m(ie++,De,_e+Xe)):this.K===270?(y.m(ie++,De,_e+Xe),y.m(ie++,De,_e-Fe)):(y.m(ie++,De-Fe,_e),y.m(ie++,De+Xe,_e)))),yt=Ee}Zt&&(we=y.i(ie-1).x,je=y.i(ie-1).y,De=y.i(ie).x,_e=y.i(ie).y,this.K===180||this.K===0?je!==_e&&(Fe=this.K===0?Math.min(Math.max((De+we)/2,this.Ta[Mt.layer]+this.Rf.x),De):Math.max(Math.min((De+we)/2,this.Ta[Mt.layer]+this.Rf.x),De),y.m(ie++,Fe,je),y.m(ie++,Fe,_e)):we!==De&&(Fe=this.K===90?Math.min(Math.max((_e+je)/2,this.Ta[Mt.layer]+this.Rf.y),_e):Math.max(Math.min((_e+je)/2,this.Ta[Mt.layer]+this.Rf.y),_e),y.m(ie++,we,Fe),y.m(ie++,De,Fe)))}b!==null&&zt&&4<=y.pointsCount&&(nt!==null&&(nt=pt===Ur?y.getLinkPointFromPoint(E,nt,nt.ga(Dr),y.i(3),!0):y.i(0),pt===Ur&&(pt=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(nt.x+pt.x)/2,pt.y),y.L(2,b.x,(pt.y+b.y)/2)):(y.L(1,pt.x,(nt.y+pt.y)/2),y.L(2,(pt.x+b.x)/2,b.y))),nt.w()||nt.set(E.actualBounds.center),y.L(0,nt.x,nt.y)),st!==null&&(E=ht===Ur?y.getLinkPointFromPoint(et,st,st.ga(Dr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ht===Ur&&(st=y.i(y.pointsCount-3),ht=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+st.x)/2,st.y),y.L(y.pointsCount-2,ht.x,(st.y+ht.y)/2)):(y.L(y.pointsCount-2,st.x,(E.y+st.y)/2),y.L(y.pointsCount-3,(st.x+ht.x)/2,ht.y))),E.w()||E.set(et.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},ui.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new mn,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 et=b.i(E),nt=b.i(E+1);if(this.B(et.y,nt.y)&&!this.B(et.x,nt.x)){var st=new Qh;st.layer=Math.floor(et.y/2);var ht=b.i(0),pt=b.i(b.pointsCount-1);if(st.first=ht.x*ht.x+ht.y,st.jc=pt.x*pt.x+pt.y,st.rd=Math.min(et.x,nt.x),st.Ic=Math.max(et.x,nt.x),st.index=E,st.link=b,E+2<b.pointsCount){ht=b.i(E-1),pt=b.i(E+2);var yt=0;ht.y<et.y?yt=pt.y<et.y?3:et.x<nt.x?2:1:ht.y>et.y&&(yt=pt.y>et.y?0:nt.x<et.x?2:1),st.j=yt}x.push(st)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(et=x[a].layer,b=a+1;b<x.length&&x[b].layer===et;)b++;if(1<b-a)for(et=a;et<b;){for(nt=x[et].Ic,E=a+1;E<b&&x[E].rd<nt;)nt=Math.max(nt,x[E].Ic),E++;if(nt=E-et,1<nt){for(this.zi(x,this.Js,et,et+nt),yt=1,st=x[et].jc,ht=et;ht<E;ht++)pt=x[ht],pt.jc!==st&&(yt++,st=pt.jc);this.zi(x,this.Ux,et,et+nt);var Mt=1;for(st=x[et].first,ht=et;ht<E;ht++)pt=x[ht],pt.first!==st&&(Mt++,st=pt.first);for(ht=!0,pt=Mt,yt<Mt?(ht=!1,pt=yt,st=x[et].jc,this.zi(x,this.Js,et,et+nt)):st=x[et].first,yt=0,Mt=et;Mt<E;Mt++){var zt=x[Mt];(ht?zt.first:zt.jc)!==st&&(yt++,st=ht?zt.first:zt.jc);var Zt=zt.link;et=Zt.i(zt.index),nt=Zt.i(zt.index+1);var Qt=this.linkSpacing*(yt-(pt-1)/2);y++,Zt.uh(),Zt.L(zt.index,et.x,et.y+Qt),Zt.L(zt.index+1,nt.x,nt.y+Qt),Zt.zf()}}et=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++)et=b.i(E),nt=b.i(E+1),this.B(et.x,nt.x)&&!this.B(et.y,nt.y)&&(st=new Qh,st.layer=Math.floor(et.x/2),ht=b.i(0),pt=b.i(b.pointsCount-1),st.first=ht.x+ht.y*ht.y,st.jc=pt.x+pt.y*pt.y,st.rd=Math.min(et.y,nt.y),st.Ic=Math.max(et.y,nt.y),st.index=E,st.link=b,E+2<b.pointsCount&&(ht=b.i(E-1),pt=b.i(E+2),yt=0,ht.x<et.x?yt=pt.x<et.x?3:et.y<nt.y?2:1:ht.x>et.x&&(yt=pt.x>et.x?0:nt.y<et.y?2:1),st.j=yt),x.push(st));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(et=x[a].layer,b=a+1;b<x.length&&x[b].layer===et;)b++;if(1<b-a)for(et=a;et<b;){for(nt=x[et].Ic,E=a+1;E<b&&x[E].rd<nt;)nt=Math.max(nt,x[E].Ic),E++;if(nt=E-et,1<nt){for(this.zi(x,this.Js,et,et+nt),yt=1,st=x[et].jc,ht=et;ht<E;ht++)pt=x[ht],pt.jc!==st&&(yt++,st=pt.jc);for(this.zi(x,this.Ux,et,et+nt),Mt=1,st=x[et].first,ht=et;ht<E;ht++)pt=x[ht],pt.first!==st&&(Mt++,st=pt.first);for(ht=!0,pt=Mt,yt<Mt?(ht=!1,pt=yt,st=x[et].jc,this.zi(x,this.Js,et,et+nt)):st=x[et].first,yt=0,Mt=et;Mt<E;Mt++)zt=x[Mt],(ht?zt.first:zt.jc)!==st&&(yt++,st=ht?zt.first:zt.jc),Zt=zt.link,et=Zt.i(zt.index),nt=Zt.i(zt.index+1),Qt=this.linkSpacing*(yt-(pt-1)/2),y++,Zt.uh(),Zt.L(zt.index,et.x+Qt,et.y),Zt.L(zt.index+1,nt.x+Qt,nt.y),Zt.zf()}et=E}a=b}}}},qt=ui.prototype,qt.Vx=function(a,y){return a instanceof Qh&&y instanceof Qh&&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},qt.Ux=function(a,y){return a instanceof Qh&&y instanceof Qh&&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},qt.Js=function(a,y){return a instanceof Qh&&y instanceof Qh&&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},qt.B=function(a,y){return a-=y,-1<a&&1>a},qt.zi=function(a,y,x,b){var E=a.length,et=b-x;if(!(1>=et))if((0>x||x>=E-1)&&Oe("not in range 0 <= from < length: "+x),et===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 Yh(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 Jh(a,y,x){a.He[a.tc[y]]=x}un.Object.defineProperties(ui.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()):Oe("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==kv&&a!==xg||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==Ev&&a!==wy&&a!==by||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==Mv&&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!==ky&&a!==Tv&&a!==Ey||(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 kv=new tn(ui,"CycleDepthFirst",0),xy=new tn(ui,"CycleGreedy",1),xg=new tn(ui,"CycleFromLayers",2),Ev=new tn(ui,"LayerOptimalLinkLength",0),wy=new tn(ui,"LayerLongestPathSink",1),by=new tn(ui,"LayerLongestPathSource",2),Mv=new tn(ui,"InitDepthFirstOut",0),Py=new tn(ui,"InitDepthFirstIn",1),Cy=new tn(ui,"InitNaive",2),ky=new tn(ui,"AggressiveNone",0),Tv=new tn(ui,"AggressiveLess",1),Ey=new tn(ui,"AggressiveMore",2),Xx=8;ui.className="LayeredDigraphLayout",ui.CycleDepthFirst=kv,ui.CycleGreedy=xy,ui.CycleFromLayers=xg,ui.LayerOptimalLinkLength=Ev,ui.LayerLongestPathSink=wy,ui.LayerLongestPathSource=by,ui.InitDepthFirstOut=Mv,ui.InitDepthFirstIn=Py,ui.InitNaive=Cy,ui.AggressiveNone=ky,ui.AggressiveLess=Tv,ui.AggressiveMore=Ey,ui.PackNone=0,ui.PackExpand=1,ui.PackStraighten=2,ui.PackMedian=4,ui.PackAll=15,ui.AlignNone=0,ui.AlignUpperLeft=1,ui.AlignUpperRight=2,ui.AlignLowerLeft=4,ui.AlignLowerRight=8,ui.AlignAll=15;function Qh(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Qh.className="SegInfo";function Gd(a){xi.call(this,a)}$e(Gd,xi),Gd.prototype.createVertex=function(){return new Ds(this)},Gd.prototype.createEdge=function(){return new wg(this)},Gd.className="LayeredDigraphNetwork";function Ds(a){So.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}$e(Ds,So);function ix(a,y){return a.index-y.index}function Lv(a,y){if(!a.$n){for(var x=[],b=Jn(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Jn(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Oe("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=Jn(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=Jn(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}Ds.prototype.Cl=function(a){So.prototype.Cl.call(this,a),this.bo=this.co=null},Ds.prototype.Kl=function(a){So.prototype.Kl.call(this,a),this.bo=this.co=null},Ds.prototype.zl=function(a){So.prototype.zl.call(this,a),this.$n=this.ao=null},Ds.prototype.Jl=function(a){So.prototype.Jl.call(this,a),this.$n=this.ao=null},un.Object.defineProperties(Ds.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)}}}),Ds.prototype.deleteDestinationEdge=Ds.prototype.Jl,Ds.prototype.addDestinationEdge=Ds.prototype.zl,Ds.prototype.deleteSourceEdge=Ds.prototype.Kl,Ds.prototype.addSourceEdge=Ds.prototype.Cl,Ds.className="LayeredDigraphVertex";function wg(a){rs.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}$e(wg,rs),un.Object.defineProperties(wg.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)}}}),wg.className="LayeredDigraphEdge";function _r(a){ji.call(this),this.Ub=new gn,this.Wn=Ov,this.ud=nu,this.vo=Dv,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=Bv,this.$d=new Cn(10,10).freeze();var y=new Ff(this);this.W=new Ks(y),this.Y=new Ks(y),this.ru=[],a&&Object.assign(this,a)}$e(_r,ji),_r.prototype.cloneProtected=function(a){ji.prototype.cloneProtected.call(this,a),a.Wn=this.Wn,a.vo=this.vo,a.Bq=this.Bq,a.td=this.td,a.Rb=this.Rb,a.$d.assign(this.$d),a.W.copyInheritedPropertiesFrom(this.W),a.Y.copyInheritedPropertiesFrom(this.Y)},_r.prototype.qb=function(a){a.classType===_r?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:Oe("Unknown enum value: "+a):ji.prototype.qb.call(this,a)},_r.prototype.createNetwork=function(){return new Ff(this)},_r.prototype.makeNetwork=function(a){function y(b){if(b instanceof Mn)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 Je?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Pr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},_r.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==Iv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Je&&(y=a),this.path===Ov&&y!==null?this.ud=y.isTreePathToChildren?nu:jf:this.ud=this.path===Ov?nu: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 gn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Mn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Ks&&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,Ty(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,Ty(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ks&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ks&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ks&&ux(this,y);if(this.Cu(),this.layerStyle===Rv){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var b=x.parent;b===null&&(b=x),b=b.angle===0||b.angle===180;var E=a[x.level];E===void 0&&(E=0),a[x.level]=Math.max(E,b?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,b=x.parent,b===null&&(b=x),b.angle===0||b.angle===180?(b.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(b.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===_y)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,b=-1,E=0;E<y.children.length;E++){var et=y.children[E];b=Math.max(b,x?et.width:et.height)}if(0<=b)for(E=0;E<y.children.length;E++)et=y.children[E],x?(y.angle===180&&(et.focusX+=b-et.width),et.width=b):(y.angle===270&&(et.focusY+=b-et.height),et.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ks&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new gn,this.isValidLayout=!0};function Jx(a){var y=new gn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}_r.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case nu:x.sourceEdges.count===0&&this.Ub.add(x);break;case jf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Oe("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 nu:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case jf:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:Oe("Unhandled path value "+a.ud.toString())}}return b}function Ty(a,y){if(y!==null){switch(a.ud){case nu:if(0<y.destinationEdges.count){for(var x=new mn,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 jf:if(0<y.sourceEdges.count){for(x=new mn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Oe("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var et=x[E];et.initialized=!0,et.level=y.level+1,et.parent=y,a.Ub.remove(et)}for(y=0;y<b;y++)Ty(a,x[y])}}function ax(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}_r.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,b=0,E=0;E<x.length;E++)x[E]===y&&b++;if(0<b){b=Array(x.length-b);for(var et=E=0;et<x.length;et++)x[et]!==y&&(b[E++]=x[et]);a.children=b}}};function sx(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===ou&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,et=y.children,nt=et.length,st=0;st<nt;st++){var ht=et[st];sx(a,ht),x+=ht.descendantCount+1,b=Math.max(b,ht.maxChildrenCount),E=Math.max(E,ht.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,et=0;et<E;et++)if(0<b[et].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}_r.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Qx(this,a)),a.parent!==null&&a.parent.alignment===ou){for(var y=a.angle,x=a.parent.children,b=0;b<x.length&&a!==x[b];)b++;b%2===0?b!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function lx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)lx(a,y[b])}}_r.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==ou&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}_r.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Ud:break;case Pg:a.children.reverse();break;case Cg:a.children.sort(a.comparer);break;case kg:a.children.sort(a.comparer),a.children.reverse();break;default:Oe("Unhandled sorting value "+a.sorting.toString())}},_r.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},_r.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=$h(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var et=0,nt=0,st=0,ht=a.commentSpacing;if(a.node!==null)for(var pt=a.node.Mu();pt.next();){var yt=pt.value;yt.category==="Comment"&&yt.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(yt),yt.Va(),yt=yt.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(et=Math.max(et,yt.width),nt+=yt.height+Math.abs(st)):(et+=yt.width+Math.abs(st),nt=Math.max(nt,yt.height)),st=ht)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(et+=Math.abs(a.commentMargin),nt=Math.max(0,nt-a.height)):(nt+=Math.abs(a.commentMargin),et=Math.max(0,et-a.width)),E=on.allocAt(0,0,a.bounds.width+et,a.bounds.height+nt),a.bounds=E,on.free(E))};function $h(a){return a===hh||a===ou||a===ch||a===Cu}function bg(a){return a===hh||a===ou}function Ly(a){var y=a.parent;if(y!==null){var x=y.alignment;if($h(x)){if(bg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===ch)return!0}}return!1}_r.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,et=!1;x!==null&&(E=x.angle,et=x.alignment,et=$h(et)),b=b===90||b===270,x=E===90||E===270;for(var nt=a.childrenCount===0,st=Ly(a),ht=0,pt=a.comments,yt=pt.length,Mt=Le.alloc(),zt=0;zt<yt;zt++){var Zt=pt[zt],Qt=Zt.measuredBounds;if(b&&!nt||!et&&!x&&nt||et&&x&&nt){if(135<E&&!et||x&&st)if(0<=a.commentMargin)for(Mt.h(a.bounds.x-a.commentMargin-Qt.width,a.bounds.y+ht),Zt.move(Mt),Zt=Zt.Sd();Zt.next();){var ie=Zt.value;ie.fromSpot=Na,ie.toSpot=Yo}else for(Mt.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ht),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=Yo,ie.toSpot=Na;else if(0<=a.commentMargin)for(Mt.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ht),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=Yo,ie.toSpot=Na;else for(Mt.h(a.bounds.x+a.commentMargin-Qt.width,a.bounds.y+ht),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=Na,ie.toSpot=Yo;ht=0<=a.commentSpacing?ht+(Qt.height+a.commentSpacing):ht+(a.commentSpacing-Qt.height)}else{if(135<E&&!et||!x&&st)if(0<=a.commentMargin)for(Mt.h(a.bounds.x+ht,a.bounds.y-a.commentMargin-Qt.height),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=da,ie.toSpot=oa;else for(Mt.h(a.bounds.x+ht,a.bounds.y+2*a.focus.y-a.commentMargin),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=oa,ie.toSpot=da;else if(0<=a.commentMargin)for(Mt.h(a.bounds.x+ht,a.bounds.y+2*a.focus.y+a.commentMargin),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=oa,ie.toSpot=da;else for(Mt.h(a.bounds.x+ht,a.bounds.y+a.commentMargin-Qt.height),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=da,ie.toSpot=oa;ht=0<=a.commentSpacing?ht+(Qt.width+a.commentSpacing):ht+(a.commentSpacing-Qt.width)}}if(Le.free(Mt),y=ht-a.commentSpacing-(b?y.height:y.width),this.ud===nu)for(a=a.destinationEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.toEndSegmentLength=0<y?y:NaN)}},_r.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case Fv:hx(this,a);break;case Eg:if(a.alignment===ou)hx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=$h(x)),b=Ly(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!b?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&b?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var E=hl(a);y=E===90||E===270;var et=0,nt=a.children,st=nt.length;for(x=0;x<st;x++)b=nt[x],et=Math.max(et,y?b.Da.width:b.Da.height);var ht=a.alignment;b=ht===ru;var pt=ht===iu,yt=$h(ht),Mt=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var zt=a.nodeSpacing,Zt=this.computeNodeIndent(a),Qt=a.rowSpacing,ie=0;(b||pt||a.hm||a.im&&a.maxGenerationCount===1)&&(ie=Math.max(0,a.rowIndent)),b=a.width;var Ee=a.height,we=0,je=0,Fe=0,De=null,_e=null,Xe=0,En=0,Gn=0,Dn=0,wn=0,hn=0,br=0,fr=0;if(yt&&!bg(ht)&&135<E&&nt.reverse(),bg(ht))if(1<st)for(var ri=0;ri<st;ri++)ri%2===0&&ri!==st-1&&(fr=Math.max(fr,y?nt[ri].Da.width:nt[ri].Da.height));else st===1&&(fr=y?nt[0].Da.width:nt[0].Da.height);if(yt){switch(ht){case hh:je=135>E?cx(this,a,nt,fr,we,je):fx(this,a,nt,fr,we,je),fr=je.x,we=je.width,je=je.height;break;case ch:for(De=0;De<st;De++)_e=nt[De],Mt=_e.Da,Fe=hn===0?0:Qt,y?(_e.S.h(et-Mt.width,Dn+Fe),we=Math.max(we,Mt.width),je=Math.max(je,Dn+Fe+Mt.height),Dn+=Fe+Mt.height):(_e.S.h(Gn+Fe,et-Mt.height),we=Math.max(we,Gn+Fe+Mt.width),je=Math.max(je,Mt.height),Gn+=Fe+Mt.width),hn++;break;case Cu:for(De=0;De<st;De++)_e=nt[De],et=_e.Da,Mt=hn===0?0:Qt,y?(_e.S.h(zt/2+a.focus.x,Dn+Mt),we=Math.max(we,et.width),je=Math.max(je,Dn+Mt+et.height),Dn+=Mt+et.height):(_e.S.h(Gn+Mt,zt/2+a.focus.y),we=Math.max(we,Gn+Mt+et.width),je=Math.max(je,et.height),Gn+=Mt+et.width),hn++}De=Ha(this,2),_e=Ha(this,2),y?(De[0].h(0,0),De[1].h(0,je),_e[0].h(we,0)):(De[0].h(0,0),De[1].h(we,0),_e[0].h(0,je)),_e[1].h(we,je)}else for(ri=0;ri<st;ri++){var yi=nt[ri],Co=yi.Da;if(y){0<Mt&&0<hn&&Gn+zt+Co.width>Mt&&(Gn<et&&zc(a,ht,et-Gn,0,br,ri-1),wn++,hn=0,br=ri,Fe=je,Gn=0,Dn=135<E?-je-Qt:je+Qt),Nv(this,yi,0,Dn);var Lo=0;if(hn===0)De=yi.Yo,_e=yi.kp,Xe=Co.width,En=Co.height,(De===null||_e===null||E!==hl(yi))&&(De=Ha(this,2),_e=Ha(this,2),De[0].h(0,0),De[1].h(0,En),_e[0].h(Xe,0),_e[1].h(Xe,En));else{var ha=Fn();En=dx(this,a,yi,De,_e,Xe,En,ha),Lo=En.x,De=ha[0],_e=ha[1],Xe=En.width,En=En.height,Bn(ha),Gn<Co.width&&0>Lo&&(Nf(a,-Lo,0,br,ri-1),jv(De,-Lo,0),jv(_e,-Lo,0),Lo=0)}yi.S.h(Lo,Dn),we=Math.max(we,Xe),je=Math.max(je,Fe+(wn===0?0:Qt)+Co.height),Gn=Xe}else 0<Mt&&0<hn&&Dn+zt+Co.height>Mt&&(Dn<et&&zc(a,ht,0,et-Dn,br,ri-1),wn++,hn=0,br=ri,Fe=we,Dn=0,Gn=135<E?-we-Qt:we+Qt),Nv(this,yi,Gn,0),Lo=0,hn===0?(De=yi.Yo,_e=yi.kp,Xe=Co.width,En=Co.height,(De===null||_e===null||E!==hl(yi))&&(De=Ha(this,2),_e=Ha(this,2),De[0].h(0,0),De[1].h(Xe,0),_e[0].h(0,En),_e[1].h(Xe,En))):(ha=Fn(),En=dx(this,a,yi,De,_e,Xe,En,ha),Lo=En.x,De=ha[0],_e=ha[1],Xe=En.width,En=En.height,Bn(ha),Dn<Co.height&&0>Lo&&(Nf(a,0,-Lo,br,ri-1),jv(De,0,-Lo),jv(_e,0,-Lo),Lo=0)),yi.S.h(Gn,Lo),je=Math.max(je,En),we=Math.max(we,Fe+(wn===0?0:Qt)+Co.width),Dn=En;hn++}switch(0<wn&&(y?(je+=Math.max(0,x),Gn<we&&zc(a,ht,we-Gn,0,br,st-1),0<ie&&(pt||Nf(a,ie,0,0,st-1),we+=ie)):(we+=Math.max(0,x),Dn<je&&zc(a,ht,0,je-Dn,br,st-1),0<ie&&(pt||Nf(a,0,ie,0,st-1),je+=ie))),ie=pt=0,ht){case Wd:y?pt+=we/2-a.focus.x-Zt/2:ie+=je/2-a.focus.y-Zt/2;break;case Of:0<wn?y?pt+=we/2-a.focus.x-Zt/2:ie+=je/2-a.focus.y-Zt/2:y?(fr=nt[0].S.x+nt[0].la.x,pt+=fr+(nt[st-1].S.x+nt[st-1].la.x+2*nt[st-1].focus.x-fr)/2-a.focus.x-Zt/2):(fr=nt[0].S.y+nt[0].la.y,ie+=fr+(nt[st-1].S.y+nt[st-1].la.y+2*nt[st-1].focus.y-fr)/2-a.focus.y-Zt/2);break;case ru:y?(pt-=Zt,we+=Zt):(ie-=Zt,je+=Zt);break;case iu:y?(pt+=we-a.width+Zt,we+=Zt):(ie+=je-a.height+Zt,je+=Zt);break;case hh:y?1<st?pt+=fr+zt/2-a.focus.x:pt+=nt[0].focus.x-a.focus.x+nt[0].la.x:1<st?ie+=fr+zt/2-a.focus.y:ie+=nt[0].focus.y-a.focus.y+nt[0].la.y;break;case ch:y?pt+=we+zt/2-a.focus.x:ie+=je+zt/2-a.focus.y;break;case Cu:break;default:je=this.customAlignment(a,pt,ie,we,je),pt=je[0],ie=je[1],we=je[2],je=je[3]}for(Zt=0;Zt<st;Zt++)fr=nt[Zt],y?fr.S.h(fr.S.x+fr.la.x-pt,fr.S.y+(135<E?(yt?-je:-fr.Da.height)+fr.la.y-x:Ee+x+fr.la.y)):fr.S.h(fr.S.x+(135<E?(yt?-we:-fr.Da.width)+fr.la.x-x:b+x+fr.la.x),fr.S.y+fr.la.y-ie);if(st=nt=0,yt?y?(we=Ay(a,we,pt),0>pt&&(pt=0),135<E&&(ie+=je+x),je+=Ee+x,ht===Cu&&(nt+=zt/2+a.focus.x),st+=Ee+x):(135<E&&(pt+=we+x),we+=b+x,je=Ny(a,je,ie),0>ie&&(ie=0),ht===Cu&&(st+=zt/2+a.focus.y),nt+=b+x):y?(a.comments===null?b>we&&(we=jy(ht,b-we,0),nt=we.x,st=we.y,we=b,pt=0):we=Ay(a,we,pt),0>pt&&(nt-=pt,pt=0),135<E&&(ie+=je+x),je=Math.max(Math.max(je,Ee),je+Ee+x),st+=Ee+x):(135<E&&(pt+=we+x),we=Math.max(Math.max(we,b),we+b+x),a.comments===null?Ee>je&&(je=jy(ht,0,Ee-je),nt=je.x,st=je.y,je=Ee,ie=0):je=Ny(a,je,ie),0>ie&&(st-=ie,ie=0),nt+=b+x),0<wn)E=Ha(this,4),wn=Ha(this,4),y?(E[2].h(0,Ee+x),E[3].h(E[2].x,je),wn[2].h(we,E[2].y),wn[3].h(wn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(we,E[2].y),wn[2].h(E[2].x,je),wn[3].h(E[3].x,wn[2].y));else{for(E=Ha(this,De.length+2),wn=Ha(this,_e.length+2),ht=0;ht<De.length;ht++)yt=De[ht],E[ht+2].h(yt.x+nt,yt.y+st);for(ht=0;ht<_e.length;ht++)yt=_e[ht],wn[ht+2].h(yt.x+nt,yt.y+st)}y?(E[0].h(pt,0),E[1].h(E[0].x,Ee),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])),wn[0].h(pt+b,0),wn[1].h(wn[0].x,Ee),wn[2].y<wn[1].y&&(wn[2].x<wn[0].x?wn[2].assign(wn[1]):wn[1].assign(wn[2])),wn[3].y<wn[2].y&&(wn[3].x<wn[0].x?wn[3].assign(wn[2]):wn[2].assign(wn[3])),E[2].y-=x/2,wn[2].y-=x/2):(E[0].h(0,ie),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])),wn[0].h(0,ie+Ee),wn[1].h(b,wn[0].y),wn[2].x<wn[1].x&&(wn[2].y<wn[0].y?wn[2].assign(wn[1]):wn[1].assign(wn[2])),wn[3].x<wn[2].x&&(wn[3].y<wn[0].y?wn[3].assign(wn[2]):wn[2].assign(wn[3])),E[2].x-=x/2,wn[2].x-=x/2),wl(this,De),wl(this,_e),a.Yo=E,a.kp=wn,a.la.h(pt,ie),a.Da.h(we,je)}break;default:Oe("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=$h(x));var E=Ly(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(b!==180&&b!==270||x)&&!E?y.la.h(0,0):b===180&&!x||(b===90||b===270)&&E?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{b=hl(y),x=b===90||b===270;var et=0;E=y.children;for(var nt=E.length,st=0;st<nt;st++){var ht=E[st];et=Math.max(et,x?ht.Da.width:ht.Da.height)}var pt=y.alignment,yt=pt===ru,Mt=pt===iu;st=$h(pt);var zt=Math.max(0,y.breadthLimit);ht=a.computeLayerSpacing(y);var Zt=y.nodeSpacing,Qt=a.computeNodeIndent(y),ie=yt||Mt?0:Qt/2,Ee=y.rowSpacing,we=0;(yt||Mt||y.hm||y.im&&y.maxGenerationCount===1)&&(we=Math.max(0,y.rowIndent)),yt=y.width;var je=y.height,Fe=0,De=0,_e=0,Xe=0,En=0,Gn=0,Dn=0,wn=0,hn=0,br=0;if(st&&!bg(pt)&&135<b&&E.reverse(),bg(pt))if(1<nt)for(var fr=0;fr<nt;fr++){var ri=E[fr],yi=ri.Da;fr%2===0&&fr!==nt-1?hn=Math.max(hn,(x?yi.width:yi.height)+a.computeBusNodeSpacing(ri)-Zt):fr%2!==0&&(br=Math.max(br,(x?yi.width:yi.height)+a.computeBusNodeSpacing(ri)-Zt))}else nt===1&&(hn=x?E[0].Da.width:E[0].Da.height);if(st)switch(pt){case hh:case ou:De=135>b?cx(a,y,E,hn,Fe,De):fx(a,y,E,hn,Fe,De),hn=De.x,Fe=De.width,De=De.height;break;case ch:for(zt=0;zt<nt;zt++)ie=E[zt],_e=ie.Da,br=Dn===0?0:Ee,x?(ie.S.h(et-_e.width,En+br),Fe=Math.max(Fe,_e.width),De=Math.max(De,En+br+_e.height),En+=br+_e.height):(ie.S.h(Xe+br,et-_e.height),Fe=Math.max(Fe,Xe+br+_e.width),De=Math.max(De,_e.height),Xe+=br+_e.width),Dn++;break;case Cu:for(et=0;et<nt;et++)zt=E[et],ie=zt.Da,_e=Dn===0?0:Ee,x?(zt.S.h(Zt/2+y.focus.x,En+_e),Fe=Math.max(Fe,ie.width),De=Math.max(De,En+_e+ie.height),En+=_e+ie.height):(zt.S.h(Xe+_e,Zt/2+y.focus.y),Fe=Math.max(Fe,Xe+_e+ie.width),De=Math.max(De,ie.height),Xe+=_e+ie.width),Dn++}else for(br=0;br<nt;br++)fr=E[br],ri=fr.Da,x?(0<zt&&0<Dn&&Xe+Zt+ri.width>zt&&(Xe<et&&zc(y,pt,et-Xe,0,wn,br-1),Gn++,Dn=0,wn=br,_e=De,Xe=0,En=135<b?-De-Ee:De+Ee),yi=Dn===0?ie:Zt,Nv(a,fr,0,En),fr.S.h(Xe+yi,En),Fe=Math.max(Fe,Xe+yi+ri.width),De=Math.max(De,_e+(Gn===0?0:Ee)+ri.height),Xe+=yi+ri.width):(0<zt&&0<Dn&&En+Zt+ri.height>zt&&(En<et&&zc(y,pt,0,et-En,wn,br-1),Gn++,Dn=0,wn=br,_e=Fe,En=0,Xe=135<b?-Fe-Ee:Fe+Ee),yi=Dn===0?ie:Zt,Nv(a,fr,Xe,0),fr.S.h(Xe,En+yi),De=Math.max(De,En+yi+ri.height),Fe=Math.max(Fe,_e+(Gn===0?0:Ee)+ri.width),En+=yi+ri.height),Dn++;switch(0<Gn&&(x?(De+=Math.max(0,ht),Xe<Fe&&zc(y,pt,Fe-Xe,0,wn,nt-1),0<we&&(Mt||Nf(y,we,0,0,nt-1),Fe+=we)):(Fe+=Math.max(0,ht),En<De&&zc(y,pt,0,De-En,wn,nt-1),0<we&&(Mt||Nf(y,0,we,0,nt-1),De+=we))),we=Mt=0,pt){case Wd:x?Mt+=Fe/2-y.focus.x-Qt/2:we+=De/2-y.focus.y-Qt/2;break;case Of:0<Gn?x?Mt+=Fe/2-y.focus.x-Qt/2:we+=De/2-y.focus.y-Qt/2:x?(a=E[0].S.x+E[0].la.x,Mt+=a+(E[nt-1].S.x+E[nt-1].la.x+2*E[nt-1].focus.x-a)/2-y.focus.x-Qt/2):(a=E[0].S.y+E[0].la.y,we+=a+(E[nt-1].S.y+E[nt-1].la.y+2*E[nt-1].focus.y-a)/2-y.focus.y-Qt/2);break;case ru:x?(Mt-=Qt,Fe+=Qt):(we-=Qt,De+=Qt);break;case iu:x?(Mt+=Fe-y.width+Qt,Fe+=Qt):(we+=De-y.height+Qt,De+=Qt);break;case hh:case ou:x?1<nt?Mt+=hn+Zt/2-y.focus.x:Mt+=E[0].focus.x-y.focus.x+E[0].la.x:1<nt?we+=hn+Zt/2-y.focus.y:we+=E[0].focus.y-y.focus.y+E[0].la.y;break;case ch:x?Mt+=Fe+Zt/2-y.focus.x:we+=De+Zt/2-y.focus.y;break;case Cu:break;default:a=a.customAlignment(y,Mt,we,Fe,De),Mt=a[0],we=a[1],Fe=a[2],De=a[3]}for(a=0;a<nt;a++)Qt=E[a],x?Qt.S.h(Qt.S.x+Qt.la.x-Mt,Qt.S.y+(135<b?(st?-De:-Qt.Da.height)+Qt.la.y-ht:je+ht+Qt.la.y)):Qt.S.h(Qt.S.x+(135<b?(st?-Fe:-Qt.Da.width)+Qt.la.x-ht:yt+ht+Qt.la.x),Qt.S.y+Qt.la.y-we);x?(Fe=Ay(y,Fe,Mt),0>Mt&&(Mt=0),135<b&&(we+=De+ht),De=Math.max(Math.max(De,je),De+je+ht)):(135<b&&(Mt+=Fe+ht),Fe=Math.max(Math.max(Fe,yt),Fe+yt+ht),De=Ny(y,De,we),0>we&&(we=0)),y.la.h(Mt,we),y.Da.h(Fe,De)}}_r.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function cx(a,y,x,b,E,et){var nt=x.length;if(nt===0)return new on(b,0,E,et);if(nt===1)return y=x[0],E=y.Da.width,et=y.Da.height,new on(b,0,E,et);for(var st=y.nodeSpacing,ht=y.rowSpacing,pt=hl(y)===90,yt=0,Mt=0,zt=0,Zt=0;Zt<nt;Zt++)if(!(Zt%2!==0||1<nt&&Zt===nt-1)){var Qt=x[Zt],ie=Qt.Da,Ee=yt===0?0:ht;if(pt){var we=a.computeBusNodeSpacing(Qt)-st;Qt.S.h(b-(ie.width+we),zt+Ee),E=Math.max(E,ie.width+we),et=Math.max(et,zt+Ee+ie.height),zt+=Ee+ie.height}else we=a.computeBusNodeSpacing(Qt)-st,Qt.S.h(Mt+Ee,b-(ie.height+we)),et=Math.max(et,ie.height+we),E=Math.max(E,Mt+Ee+ie.width),Mt+=Ee+ie.width;yt++}for(yt=0,Qt=Mt,Zt=zt,pt?(Mt=b+st,zt=0):(Mt=0,zt=b+st),ie=0;ie<nt;ie++)if(ie%2!==0){Ee=x[ie],we=Ee.Da;var je=yt===0?0:ht;if(pt){var Fe=a.computeBusNodeSpacing(Ee)-st;Ee.S.h(Mt+Fe,zt+je),E=Math.max(E,Mt+we.width+Fe),et=Math.max(et,zt+je+we.height),zt+=je+we.height}else Fe=a.computeBusNodeSpacing(Ee)-st,Ee.S.h(Mt+je,zt+Fe),E=Math.max(E,Mt+je+we.width),et=Math.max(et,zt+we.height+Fe),Mt+=je+we.width;yt++}return 1<nt&&nt%2===1&&(x=x[nt-1],nt=x.Da,a=a.computeBusLastRowSpacing(x,pt?Math.max(Math.abs(Zt),Math.abs(zt)):Math.max(Math.abs(Qt),Math.abs(Mt))),pt?(x.S.h(b+st/2-x.focus.x-x.la.x,et+a),pt=b+st/2-x.focus.x-x.la.x,E=Math.max(E,pt+nt.width),0>pt&&(E-=pt),et=Math.max(et,Math.max(Zt,zt)+a+nt.height),0>x.S.x&&(b=Av(y,x.S.x,!1,b,st))):(x.S.h(E+a,b+st/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(Qt,Mt)+a+nt.width),zt=b+st/2-x.focus.y-x.la.y,et=Math.max(et,zt+nt.height),0>zt&&(et-=zt),0>x.S.y&&(b=Av(y,x.S.y,!0,b,st)))),new on(b,0,E,et)}function fx(a,y,x,b,E,et){var nt=x.length;if(nt===0)return new on(b,0,E,et);if(nt===1)return x=x[0],E=x.Da.width,et=x.Da.height,new on(b,0,E,et);for(var st=y.nodeSpacing,ht=y.rowSpacing,pt=hl(y)===270,yt=0,Mt=0,zt=0,Zt=0;Zt<nt;Zt++)if(!(Zt%2!==0||1<nt&&Zt===nt-1)){var Qt=x[Zt],ie=Qt.Da,Ee=yt===0?0:ht;if(pt){var we=a.computeBusNodeSpacing(Qt)-st;zt-=Ee+ie.height,Qt.S.h(b-(ie.width+we),zt),E=Math.max(E,ie.width+we),et=Math.max(et,Math.abs(zt))}else we=a.computeBusNodeSpacing(Qt)-st,Mt-=Ee+ie.width,Qt.S.h(Mt,b-(ie.height+we)),et=Math.max(et,ie.height+we),E=Math.max(E,Math.abs(Mt));yt++}for(yt=0,Qt=Mt,Zt=zt,pt?(Mt=b+st,zt=0):(Mt=0,zt=b+st),ie=0;ie<nt;ie++)if(ie%2!==0){Ee=x[ie],we=Ee.Da;var je=yt===0?0:ht;if(pt){var Fe=a.computeBusNodeSpacing(Ee)-st;zt-=je+we.height,Ee.S.h(Mt+Fe,zt),E=Math.max(E,Mt+we.width+Fe),et=Math.max(et,Math.abs(zt))}else Fe=a.computeBusNodeSpacing(Ee)-st,Mt-=je+we.width,Ee.S.h(Mt,zt+Fe),et=Math.max(et,zt+we.height+Fe),E=Math.max(E,Math.abs(Mt));yt++}for(1<nt&&nt%2===1&&(ht=x[nt-1],yt=ht.Da,a=a.computeBusLastRowSpacing(ht,pt?Math.max(Math.abs(Zt),Math.abs(zt)):Math.max(Math.abs(Qt),Math.abs(Mt))),pt?(ht.S.h(b+st/2-ht.focus.x-ht.la.x,-et-yt.height-a),Mt=b+st/2-ht.focus.x-ht.la.x,E=Math.max(E,Mt+yt.width),0>Mt&&(E-=Mt),et=Math.max(et,Math.abs(Math.min(Zt,zt))+a+yt.height),0>ht.S.x&&(b=Av(y,ht.S.x,!1,b,st))):(ht.S.h(-E-yt.width-a,b+st/2-ht.focus.y-ht.la.y),E=Math.max(E,Math.abs(Math.min(Qt,Mt))+a+yt.width),zt=b+st/2-ht.focus.y-ht.la.y,et=Math.max(et,zt+yt.height),0>zt&&(et-=zt),0>ht.S.y&&(b=Av(y,ht.S.y,!0,b,st)))),y=0;y<nt;y++)st=x[y],pt?st.S.h(st.S.x,st.S.y+et):st.S.h(st.S.x+E,st.S.y);return new on(b,0,E,et)}_r.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},_r.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function Av(a,y,x,b,E){a=a.children;for(var et=a.length,nt=0;nt<et;nt++)x?a[nt].S.h(a[nt].S.x,a[nt].S.y-y):a[nt].S.h(a[nt].S.x-y,a[nt].S.y);return y=a[et-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function Ay(a,y,x){switch(a.alignment){case Of:case Wd:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case ru:return a.width>y?a.width:y;case iu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case hh:case ou:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case ch:return a.width-a.focus.x+a.nodeSpacing/2+y;case Cu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a.alignment){case Of:case Wd:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case ru:return a.height>y?a.height:y;case iu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case hh:case ou:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case ch:return a.height-a.focus.y+a.nodeSpacing/2+y;case Cu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function jy(a,y,x){switch(a){case Wd:y/=2,x/=2;break;case Of:y/=2,x/=2;break;case ru:x=y=0;break;case iu:break;default:Oe("Unhandled alignment value "+a.toString())}return new Le(y,x)}function zc(a,y,x,b,E,et){y=jy(y,x,b),Nf(a,y.x,y.y,E,et)}function Nf(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var et=a[b].S;et.x+=y,et.y+=x}}function Nv(a,y,x,b){var E=y.parent;switch(a.ud){case nu:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case jf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:Oe("Unhandled path value "+a.ud.toString())}}function 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,et,nt,st){var ht=hl(y),pt=ht===90||ht===270,yt=y.nodeSpacing;y=b;var Mt=E;b=et;var zt=nt,Zt=x.Yo,Qt=x.kp;nt=x.Da;var ie=pt?Math.max(zt,nt.height):Math.max(b,nt.width);if((Zt===null||ht!==hl(x))&&(Zt=Ha(a,2),Qt=Ha(a,2),pt?(Zt[0].h(0,0),Zt[1].h(0,nt.height),Qt[0].h(nt.width,0),Qt[1].h(Qt[0].x,Zt[1].y)):(Zt[0].h(0,0),Zt[1].h(nt.width,0),Qt[0].h(0,nt.height),Qt[1].h(Zt[1].x,Qt[0].y))),pt){if(zt=9999999,!(Mt===null||2>Mt.length||Zt===null||2>Zt.length))for(E=x=0;x<Mt.length&&E<Zt.length;){et=Mt[x];var Ee=Zt[E];ht=Ee.x,pt=Ee.y,ht+=b;var we=et;x+1<Mt.length&&(we=Mt[x+1]);var je=Ee;Ee=je.x,je=je.y,E+1<Zt.length&&(je=Zt[E+1],Ee=je.x,je=je.y,Ee+=b);var Fe=zt;et.y===pt?Fe=ht-et.x:et.y>pt&&et.y<je?Fe=ht+(et.y-pt)/(je-pt)*(Ee-ht)-et.x:pt>et.y&&pt<we.y&&(Fe=ht-(et.x+(pt-et.y)/(we.y-et.y)*(we.x-et.x))),Fe<zt&&(zt=Fe),we.y<=et.y?x++:je<=pt?E++:(we.y<=je&&x++,je<=we.y&&E++)}if(zt=b-zt,zt+=yt,x=Zt,E=zt,y===null||2>y.length||x===null||2>x.length)b=null;else{for(yt=Ha(a,y.length+x.length),b=et=ht=0;et<x.length&&x[et].y<y[0].y;)pt=x[et++],yt[b++].h(pt.x+E,pt.y);for(;ht<y.length;)pt=y[ht++],yt[b++].h(pt.x,pt.y);for(ht=y[y.length-1].y;et<x.length&&x[et].y<=ht;)et++;for(;et<x.length&&x[et].y>ht;)pt=x[et++],yt[b++].h(pt.x+E,pt.y);for(x=Ha(a,b),ht=0;ht<b;ht++)x[ht].assign(yt[ht]);wl(a,yt),b=x}if(et=Qt,ht=zt,Mt===null||2>Mt.length||et===null||2>et.length)E=null;else{for(yt=Ha(a,Mt.length+et.length),E=pt=x=0;x<Mt.length&&Mt[x].y<et[0].y;)we=Mt[x++],yt[E++].h(we.x,we.y);for(;pt<et.length;)we=et[pt++],yt[E++].h(we.x+ht,we.y);for(et=et[et.length-1].y;x<Mt.length&&Mt[x].y<=et;)x++;for(;x<Mt.length&&Mt[x].y>et;)ht=Mt[x++],yt[E++].h(ht.x,ht.y);for(et=Ha(a,E),x=0;x<E;x++)et[x].assign(yt[x]);wl(a,yt),E=et}return et=Math.max(0,zt)+nt.width,nt=ie,wl(a,y),wl(a,Zt),wl(a,Mt),wl(a,Qt),st[0]=b,st[1]=E,new on(zt,0,et,nt)}if(b=9999999,!(Mt===null||2>Mt.length||Zt===null||2>Zt.length))for(E=x=0;x<Mt.length&&E<Zt.length;)et=Mt[x],Ee=Zt[E],ht=Ee.x,pt=Ee.y,pt+=zt,we=et,x+1<Mt.length&&(we=Mt[x+1]),je=Ee,Ee=je.x,je=je.y,E+1<Zt.length&&(je=Zt[E+1],Ee=je.x,je=je.y,je+=zt),Fe=b,et.x===ht?Fe=pt-et.y:et.x>ht&&et.x<Ee?Fe=pt+(et.x-ht)/(Ee-ht)*(je-pt)-et.y:ht>et.x&&ht<we.x&&(Fe=pt-(et.y+(ht-et.x)/(we.x-et.x)*(we.y-et.y))),Fe<b&&(b=Fe),we.x<=et.x?x++:Ee<=ht?E++:(we.x<=Ee&&x++,Ee<=we.x&&E++);if(zt-=b,zt+=yt,x=Zt,E=zt,y===null||2>y.length||x===null||2>x.length)b=null;else{for(yt=Ha(a,y.length+x.length),b=et=ht=0;et<x.length&&x[et].x<y[0].x;)pt=x[et++],yt[b++].h(pt.x,pt.y+E);for(;ht<y.length;)pt=y[ht++],yt[b++].h(pt.x,pt.y);for(ht=y[y.length-1].x;et<x.length&&x[et].x<=ht;)et++;for(;et<x.length&&x[et].x>ht;)pt=x[et++],yt[b++].h(pt.x,pt.y+E);for(x=Ha(a,b),ht=0;ht<b;ht++)x[ht].assign(yt[ht]);wl(a,yt),b=x}if(et=Qt,ht=zt,Mt===null||2>Mt.length||et===null||2>et.length)E=null;else{for(yt=Ha(a,Mt.length+et.length),E=pt=x=0;x<Mt.length&&Mt[x].x<et[0].x;)we=Mt[x++],yt[E++].h(we.x,we.y);for(;pt<et.length;)we=et[pt++],yt[E++].h(we.x,we.y+ht);for(et=et[et.length-1].x;x<Mt.length&&Mt[x].x<=et;)x++;for(;x<Mt.length&&Mt[x].x>et;)ht=Mt[x++],yt[E++].h(ht.x,ht.y);for(et=Ha(a,E),x=0;x<E;x++)et[x].assign(yt[x]);wl(a,yt),E=et}return et=ie,nt=Math.max(0,zt)+nt.height,wl(a,y),wl(a,Zt),wl(a,Mt),wl(a,Qt),st[0]=b,st[1]=E,new on(zt,0,et,nt)}function Ha(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 Le;return a}function wl(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}_r.prototype.arrangeTrees=function(){if(this.Rb===Iv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Ks){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 Ks&&a.push(x);switch(this.sorting){case Ud:break;case Pg:a.reverse();break;case Cg:a.sort(this.comparer);break;case kg:a.sort(this.comparer),a.reverse();break;default:Oe("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,b=0;b<a.length;b++){var E=a[b];switch(Oy(this,E,y+E.la.x,x+E.la.y),this.Rb){case Bv:x+=E.Da.height+this.$d.height;break;case Iy:y+=E.Da.width+this.$d.width;break;default:Oe("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,et=0;et<E;et++){var nt=y[et];Oy(a,nt,x+nt.S.x,b+nt.S.y)}}}_r.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},_r.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},_r.prototype.Gu=function(){if(this.layerStyle===Rv){for(var a=this.$v,y=[],x=null,b=this.network.vertexes.iterator;b.next();){var E=b.value;x===null?x=E.bounds.copy():x.ed(E.bounds);var et=y[E.level];et===void 0?et=this.computeLayerSpacing(E):et=Math.max(et,this.computeLayerSpacing(E)),y[E.level]=et}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 Le(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new Le(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,et=0,this.angle===180||this.angle===270)for(var nt=0;nt<a.length;nt++)et+=a[nt]+y[nt];for(nt=0;nt<a.length;nt++){var st=a[nt]+y[nt];this.angle===270?(et-=st,E.push(new on(0,et,x,st))):this.angle===90?(E.push(new on(0,et,x,st)),et+=st):this.angle===180?(et-=st,E.push(new on(et,0,st,x))):(E.push(new on(et,0,st,x)),et+=st)}this.commitLayers(E,b)}},_r.prototype.commitLayers=function(){},_r.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},_r.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Ks&&px(this,y)}};function px(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)px(a,y[b])}}_r.prototype.setPortSpots=function(a){var y=a.alignment;if($h(y)){var x=this.ud===nu,b=hl(a);switch(b){case 0:var E=Yo;break;case 90:E=oa;break;case 180:E=Na;break;default:E=da}var et=a.children,nt=et.length;switch(y){case hh:case ou:for(y=0;y<nt;y++){var st=et[y];if(st=(x?st.sourceEdges:st.destinationEdges).first(),st!==null&&(st=st.link,st!==null)){var ht=b===90||b===270?Na:da;if(nt===1||y===nt-1&&nt%2===1)switch(b){case 0:ht=Na;break;case 90:ht=da;break;case 180:ht=Yo;break;default:ht=oa}else y%2===0&&(ht=b===90||b===270?Yo:oa);x?(a.setsPortSpot&&(st.fromSpot=E),a.setsChildPortSpot&&(st.toSpot=ht)):(a.setsPortSpot&&(st.fromSpot=ht),a.setsChildPortSpot&&(st.toSpot=E))}}break;case ch:for(b=b===90||b===270?Yo:oa,et=x?a.destinationEdges:a.sourceEdges;et.next();)nt=et.value.link,nt!==null&&(x?(a.setsPortSpot&&(nt.fromSpot=E),a.setsChildPortSpot&&(nt.toSpot=b)):(a.setsPortSpot&&(nt.fromSpot=b),a.setsChildPortSpot&&(nt.toSpot=E)));break;case Cu:for(b=b===90||b===270?Na:da,et=x?a.destinationEdges:a.sourceEdges;et.next();)nt=et.value.link,nt!==null&&(x?(a.setsPortSpot&&(nt.fromSpot=E),a.setsChildPortSpot&&(nt.toSpot=b)):(a.setsPortSpot&&(nt.fromSpot=b),a.setsChildPortSpot&&(nt.toSpot=E)))}}else if(x=hl(a),this.ud===nu){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=Yo;break;case 90:b.fromSpot=oa;break;case 180:b.fromSpot=Na;break;default:b.fromSpot=da}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Na;break;case 90:b.toSpot=da;break;case 180:b.toSpot=Yo;break;default:b.toSpot=oa}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=Yo;break;case 90:b.toSpot=oa;break;case 180:b.toSpot=Na;break;default:b.toSpot=da}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Na;break;case 90:b.fromSpot=da;break;case 180:b.fromSpot=Yo;break;default:b.fromSpot=oa}else b.fromSpot=a.childPortSpot}};function hl(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}_r.prototype.computeLayerSpacing=function(a){var y=hl(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var b=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*b:a.width*b}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},_r.prototype.computeNodeIndent=function(a){var y=hl(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)},un.Object.defineProperties(_r.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==Dv&&a!==Dy&&a!==Fy&&a!==By||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==_y&&a!==Rv||(this.Bq=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==Bv&&a!==Iy&&a!==Iv||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Ud&&a!==Pg&&a!==Cg&&!kg||(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()):Oe("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!==Eg||(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!==Ud&&a!==Pg&&a!==Cg&&!kg||(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!==Eg||(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 tn(_r,"PathDefault",-1),nu=new tn(_r,"PathDestination",0),jf=new tn(_r,"PathSource",1),Ud=new tn(_r,"SortingForwards",10),Pg=new tn(_r,"SortingReverse",11),Cg=new tn(_r,"SortingAscending",12),kg=new tn(_r,"SortingDescending",13),Wd=new tn(_r,"AlignmentCenterSubtrees",20),Of=new tn(_r,"AlignmentCenterChildren",21),ru=new tn(_r,"AlignmentStart",22),iu=new tn(_r,"AlignmentEnd",23),hh=new tn(_r,"AlignmentBus",24),ou=new tn(_r,"AlignmentBusBranching",25),ch=new tn(_r,"AlignmentTopLeftBus",26),Cu=new tn(_r,"AlignmentBottomRightBus",27),Fv=new tn(_r,"CompactionNone",30),Eg=new tn(_r,"CompactionBlock",31),Dv=new tn(_r,"StyleLayered",40),Fy=new tn(_r,"StyleLastParents",41),Dy=new tn(_r,"StyleAlternating",42),By=new tn(_r,"StyleRootOnly",43),Bv=new tn(_r,"ArrangementVertical",50),Iy=new tn(_r,"ArrangementHorizontal",51),Iv=new tn(_r,"ArrangementFixedRoots",52),Ry=new tn(_r,"LayerIndividual",60),_y=new tn(_r,"LayerSiblings",61),Rv=new tn(_r,"LayerUniform",62);_r.className="TreeLayout",_r.PathDefault=Ov,_r.PathDestination=nu,_r.PathSource=jf,_r.SortingForwards=Ud,_r.SortingReverse=Pg,_r.SortingAscending=Cg,_r.SortingDescending=kg,_r.AlignmentCenterSubtrees=Wd,_r.AlignmentCenterChildren=Of,_r.AlignmentStart=ru,_r.AlignmentEnd=iu,_r.AlignmentBus=hh,_r.AlignmentBusBranching=ou,_r.AlignmentTopLeftBus=ch,_r.AlignmentBottomRightBus=Cu,_r.CompactionNone=Fv,_r.CompactionBlock=Eg,_r.StyleLayered=Dv,_r.StyleLastParents=Fy,_r.StyleAlternating=Dy,_r.StyleRootOnly=By,_r.ArrangementVertical=Bv,_r.ArrangementHorizontal=Iy,_r.ArrangementFixedRoots=Iv,_r.LayerIndividual=Ry,_r.LayerSiblings=_y,_r.LayerUniform=Rv;function Ff(a){xi.call(this,a)}$e(Ff,xi),Ff.prototype.createVertex=function(){return new Ks(this)},Ff.prototype.createEdge=function(){return new Hd(this)},Ff.className="TreeNetwork";function Ks(a){So.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 Le(0,0),this.Da=new Cn(0,0),this.la=new Le(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Ud,this.hd=oy,this.Kb=0,this.Jb=Of,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Eg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=jo,this.wr=!0,this.Dp=jo}$e(Ks,So),Ks.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)},un.Object.defineProperties(Ks.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)}}}),Ks.className="TreeVertex";function Hd(a){rs.call(this,a),this.$t=new Le(0,0)}$e(Hd,rs),Hd.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 nu:x=this.fromVertex,b=this.toVertex;break;case jf:x=this.toVertex,b=this.fromVertex;break;default:Oe("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 et=hl(x),nt=y.computeLayerSpacing(x),st=x.rowSpacing;a.vg();var ht=a.curve===vs,pt=a.isOrthogonal,yt;if(a.uh(),pt||ht){for(yt=2;4<a.pointsCount;)a.pv(2);var Mt=a.i(1),zt=a.i(2)}else{for(yt=1;3<a.pointsCount;)a.pv(1);Mt=a.i(0),zt=a.i(a.pointsCount-1)}var Zt=a.i(a.pointsCount-1);et===0?(x.alignment===iu?(et=b.bottom+E.y,E.y===0&&Mt.y>Zt.y+x.rowIndent&&(et=Math.min(et,Math.max(Mt.y,et-y.computeNodeIndent(x))))):x.alignment===ru?(et=b.top+E.y,E.y===0&&Mt.y<Zt.y-x.rowIndent&&(et=Math.max(et,Math.min(Mt.y,et+y.computeNodeIndent(x))))):et=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,ht?(a.m(yt,Mt.x,et),yt++,a.m(yt,b.right+nt,et),yt++,a.m(yt,b.right+nt+(E.x-st)/3,et),yt++,a.m(yt,b.right+nt+2*(E.x-st)/3,et),yt++,a.m(yt,b.right+nt+(E.x-st),et),yt++,a.m(yt,zt.x,et)):(pt&&(a.m(yt,b.right+nt/2,Mt.y),yt++),a.m(yt,b.right+nt/2,et),yt++,a.m(yt,b.right+nt+E.x-(pt?st/2:st),et),yt++,pt&&a.m(yt,a.i(yt-1).x,zt.y))):et===90?(x.alignment===iu?(et=b.right+E.x,E.x===0&&Mt.x>Zt.x+x.rowIndent&&(et=Math.min(et,Math.max(Mt.x,et-y.computeNodeIndent(x))))):x.alignment===ru?(et=b.left+E.x,E.x===0&&Mt.x<Zt.x-x.rowIndent&&(et=Math.max(et,Math.min(Mt.x,et+y.computeNodeIndent(x))))):et=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,ht?(a.m(yt,et,Mt.y),yt++,a.m(yt,et,b.bottom+nt),yt++,a.m(yt,et,b.bottom+nt+(E.y-st)/3),yt++,a.m(yt,et,b.bottom+nt+2*(E.y-st)/3),yt++,a.m(yt,et,b.bottom+nt+(E.y-st)),yt++,a.m(yt,et,zt.y)):(pt&&(a.m(yt,Mt.x,b.bottom+nt/2),yt++),a.m(yt,et,b.bottom+nt/2),yt++,a.m(yt,et,b.bottom+nt+E.y-(pt?st/2:st)),yt++,pt&&a.m(yt,zt.x,a.i(yt-1).y))):et===180?(x.alignment===iu?(et=b.bottom+E.y,E.y===0&&Mt.y>Zt.y+x.rowIndent&&(et=Math.min(et,Math.max(Mt.y,et-y.computeNodeIndent(x))))):x.alignment===ru?(et=b.top+E.y,E.y===0&&Mt.y<Zt.y-x.rowIndent&&(et=Math.max(et,Math.min(Mt.y,et+y.computeNodeIndent(x))))):et=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,ht?(a.m(yt,Mt.x,et),yt++,a.m(yt,b.left-nt,et),yt++,a.m(yt,b.left-nt+(E.x+st)/3,et),yt++,a.m(yt,b.left-nt+2*(E.x+st)/3,et),yt++,a.m(yt,b.left-nt+(E.x+st),et),yt++,a.m(yt,zt.x,et)):(pt&&(a.m(yt,b.left-nt/2,Mt.y),yt++),a.m(yt,b.left-nt/2,et),yt++,a.m(yt,b.left-nt+E.x+(pt?st/2:st),et),yt++,pt&&a.m(yt,a.i(yt-1).x,zt.y))):et===270?(x.alignment===iu?(et=b.right+E.x,E.x===0&&Mt.x>Zt.x+x.rowIndent&&(et=Math.min(et,Math.max(Mt.x,et-y.computeNodeIndent(x))))):x.alignment===ru?(et=b.left+E.x,E.x===0&&Mt.x<Zt.x-x.rowIndent&&(et=Math.max(et,Math.min(Mt.x,et+y.computeNodeIndent(x))))):et=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,ht?(a.m(yt,et,Mt.y),yt++,a.m(yt,et,b.top-nt),yt++,a.m(yt,et,b.top-nt+(E.y+st)/3),yt++,a.m(yt,et,b.top-nt+2*(E.y+st)/3),yt++,a.m(yt,et,b.top-nt+(E.y+st)),yt++,a.m(yt,et,zt.y)):(pt&&(a.m(yt,Mt.x,b.top-nt/2),yt++),a.m(yt,et,b.top-nt/2),yt++,a.m(yt,et,b.top-nt+E.y+(pt?st/2:st)),yt++,pt&&a.m(yt,zt.x,a.i(yt-1).y))):Oe("Invalid angle "+et),a.zf()}else E=b,a=this.link,b=this.network.layout,y=hl(x),y!==hl(E)&&(nt=b.computeLayerSpacing(x),st=x.bounds,x=E.bounds,y===0&&x.left-st.right<nt+1||y===90&&x.top-st.bottom<nt+1||y===180&&st.left-x.right<nt+1||y===270&&st.top-x.bottom<nt+1||(a.vg(),x=a.curve===vs,E=a.isOrthogonal,b=$h(this.fromVertex.alignment),a.uh(),y===0?(y=st.right+nt/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=st.bottom+nt/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=st.left-nt/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=st.top-nt/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()))}}},un.Object.defineProperties(Hd.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)}}}),Hd.className="TreeEdge",Fi.prototype.initializeStandardTools=function(){this.gb("Action",new _s,this.mouseDownTools),this.gb("Relinking",new fs,this.mouseDownTools),this.gb("LinkReshaping",new qi,this.mouseDownTools),this.gb("Rotating",new va,this.mouseDownTools),this.gb("Resizing",new Qo,this.mouseDownTools),this.gb("Linking",new ma,this.mouseMoveTools),this.gb("Dragging",new _i,this.mouseMoveTools),this.gb("DragSelecting",new ks,this.mouseMoveTools),this.gb("Panning",new Ho,this.mouseMoveTools),this.gb("ContextMenu",new ya,this.mouseUpTools),this.gb("TextEditing",new Ei,this.mouseUpTools),this.gb("ClickCreating",new Vu,this.mouseUpTools),this.gb("ClickSelecting",new kh,this.mouseUpTools)},Dl("Horizontal",new dm),Dl("Spot",new gm),Dl("Table",new vm),Dl("Viewbox",new xm),Dl("TableRow",new ym),Dl("TableColumn",new Sm),Dl("Graduated",new Up),Dl("Grid",new Gp),dd.add("GraphLinksModel",To),dd.add("TreeModel",Os);var _v=xn.go,zy={get licenseKey(){return Je.licenseKey},set licenseKey(a){Je.licenseKey=a},get version(){return Je.version},Group:Pr,EnumValue:tn,List:mn,Set:gn,Map:$n,Point:Le,Size:Cn,Rect:on,Margin:Br,Spot:rr,Geometry:bn,PathFigure:wo,PathSegment:ti,InputEvent:aa,DiagramEvent:Bu,ChangedEvent:Ii,Model:Zn,GraphLinksModel:Kr,TreeModel:Ea,Binding:eo,Transaction:Mo,UndoManager:Ri,CommandHandler:ke,Tool:$r,DraggingTool:_i,DraggingInfo:yu,DraggingOptions:ct,LinkingBaseTool:Xi,LinkingTool:ma,RelinkingTool:fs,LinkReshapingTool:qi,ResizingTool:Qo,RotatingTool:va,ClickSelectingTool:kh,ActionTool:_s,ClickCreatingTool:Vu,HTMLInfo:Al,ContextMenuTool:ya,DragSelectingTool:ks,PanningTool:Ho,TextEditingTool:Ei,ToolManager:Fi,Animation:Vo,AnimationManager:ts,AnimationTrigger:nl,Layer:Oo,Diagram:Je,Palette:Et,Overview:Ot,Brush:si,GraphObject:ze,Panel:vn,RowColumnDefinition:co,Shape:Lr,TextBlock:Si,Picture:Ia,Part:nr,Adornment:qr,Node:Mn,Link:Pn,Placeholder:ba,Layout:ji,LayoutNetwork:xi,LayoutVertex:So,LayoutEdge:rs,GridLayout:_o,PanelLayout:yo,CircularLayout:zi,CircularNetwork:_d,CircularVertex:mg,CircularEdge:Sv,ForceDirectedLayout:Zo,ForceDirectedNetwork:Af,ForceDirectedVertex:vg,ForceDirectedEdge:yg,LayeredDigraphLayout:ui,LayeredDigraphNetwork:Gd,LayeredDigraphVertex:Ds,LayeredDigraphEdge:wg,TreeLayout:_r,TreeNetwork:Ff,TreeVertex:Ks,TreeEdge:Hd};typeof _v=="object"&&_v.version&&An("WARNING: a `go` object on the root object is already defined. "+("Debug"in _v?"debug ":"")+"version: "+_v.version+", replaced with version: "+zy.version),Je.prototype.go=zy,xn.go=zy,typeof dn.exports=="object"&&(dn.exports=typeof le.g!="undefined"?le.g.go:self.go)}();var ae=typeof le.g!="undefined"?le.g.go:self.go;const Re=typeof le.g!="undefined"?le.g.go:self.go,ot=Re.Group,_t=Re.EnumValue,Bt=Re.List,vt=Re.Set,gt=Re.Map,kt=Re.Point,bt=Re.Size,St=Re.Rect,Tt=Re.Margin,mt=Re.Spot,xt=Re.Geometry,ft=Re.PathFigure,z=Re.PathSegment,tt=Re.InputEvent,at=Re.DiagramEvent,it=Re.ChangedEvent,lt=Re.Model,ut=Re.GraphLinksModel,dt=Re.TreeModel,Pt=Re.Binding,At=Re.Transaction,Dt=Re.UndoManager,Ft=Re.CommandHandler,Nt=Re.Tool,jt=Re.DraggingTool,Gt=Re.DraggingInfo,Wt=Re.LinkingBaseTool,Jt=Re.LinkingTool,Ut=Re.RelinkingTool,Ht=Re.LinkReshapingTool,oe=Re.ResizingTool,se=Re.RotatingTool,ce=Re.ClickSelectingTool,Pe=Re.ActionTool,Yt=Re.ClickCreatingTool,ne=Re.HTMLInfo,ve=Re.ContextMenuTool,Se=Re.DragSelectingTool,be=Re.PanningTool,fe=Re.TextEditingTool,pe=Re.ToolManager,he=Re.Animation,Ce=Re.AnimationManager,de=Re.AnimationTrigger,ye=Re.Layer,Ne=Re.Diagram,xe=Re.Palette,re=Re.Overview,Kt=Re.Brush,wt=Re.GraphObject,Lt=Re.Panel,Xt=Re.RowColumnDefinition,ee=Re.Shape,It=Re.TextBlock,Rt=Re.TextBlockMetrics,Vt=Re.Picture,$t=Re.Part,ue=Re.Adornment,ge=Re.Node,Me=Re.Link,Ae=Re.Placeholder,Be=Re.Layout,Ze=Re.LayoutNetwork,Ye=Re.LayoutVertex,Qe=Re.LayoutEdge,He=Re.GridLayout,Ue=Re.PanelLayout,We=Re.CircularLayout,Ve=Re.CircularNetwork,rn=Re.CircularVertex,an=Re.CircularEdge,ln=Re.ForceDirectedLayout,Sn=Re.ForceDirectedNetwork,_n=Re.ForceDirectedVertex,Xn=Re.ForceDirectedEdge,Yn=Re.LayeredDigraphLayout,Er=Re.LayeredDigraphNetwork,dr=Re.LayeredDigraphVertex,Mr=Re.LayeredDigraphEdge,Tr=Re.TreeLayout,Or=Re.TreeNetwork,Sr=Re.TreeVertex,hr=Re.TreeEdge,zr=Re.version},24334:function(dn,fn,le){var ae,Re;(function(ot,_t){dn.exports=_t(ot)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof le.g!="undefined"?le.g:this,function(ot){"use strict";ot=ot||{};var _t=ot.Base64,Bt="2.6.4",vt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gt=function(Ut){for(var Ht={},oe=0,se=Ut.length;oe<se;oe++)Ht[Ut.charAt(oe)]=oe;return Ht}(vt),kt=String.fromCharCode,bt=function(Ut){if(Ut.length<2){var Ht=Ut.charCodeAt(0);return Ht<128?Ut:Ht<2048?kt(192|Ht>>>6)+kt(128|Ht&63):kt(224|Ht>>>12&15)+kt(128|Ht>>>6&63)+kt(128|Ht&63)}else{var Ht=65536+(Ut.charCodeAt(0)-55296)*1024+(Ut.charCodeAt(1)-56320);return kt(240|Ht>>>18&7)+kt(128|Ht>>>12&63)+kt(128|Ht>>>6&63)+kt(128|Ht&63)}},St=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Tt=function(Ut){return Ut.replace(St,bt)},mt=function(Ut){var Ht=[0,2,1][Ut.length%3],oe=Ut.charCodeAt(0)<<16|(Ut.length>1?Ut.charCodeAt(1):0)<<8|(Ut.length>2?Ut.charCodeAt(2):0),se=[vt.charAt(oe>>>18),vt.charAt(oe>>>12&63),Ht>=2?"=":vt.charAt(oe>>>6&63),Ht>=1?"=":vt.charAt(oe&63)];return se.join("")},xt=ot.btoa&&typeof ot.btoa=="function"?function(Ut){return ot.btoa(Ut)}:function(Ut){if(Ut.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Ut.replace(/[\s\S]{1,3}/g,mt)},ft=function(Ut){return xt(Tt(String(Ut)))},z=function(Ut){return Ut.replace(/[+\/]/g,function(Ht){return Ht=="+"?"-":"_"}).replace(/=/g,"")},tt=function(Ut,Ht){return Ht?z(ft(Ut)):ft(Ut)},at=function(Ut){return tt(Ut,!0)},it;ot.Uint8Array&&(it=function(Ut,Ht){for(var oe="",se=0,ce=Ut.length;se<ce;se+=3){var Pe=Ut[se],Yt=Ut[se+1],ne=Ut[se+2],ve=Pe<<16|Yt<<8|ne;oe+=vt.charAt(ve>>>18)+vt.charAt(ve>>>12&63)+(typeof Yt!="undefined"?vt.charAt(ve>>>6&63):"=")+(typeof ne!="undefined"?vt.charAt(ve&63):"=")}return Ht?z(oe):oe});var lt=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ut=function(Ut){switch(Ut.length){case 4:var Ht=(7&Ut.charCodeAt(0))<<18|(63&Ut.charCodeAt(1))<<12|(63&Ut.charCodeAt(2))<<6|63&Ut.charCodeAt(3),oe=Ht-65536;return kt((oe>>>10)+55296)+kt((oe&1023)+56320);case 3:return kt((15&Ut.charCodeAt(0))<<12|(63&Ut.charCodeAt(1))<<6|63&Ut.charCodeAt(2));default:return kt((31&Ut.charCodeAt(0))<<6|63&Ut.charCodeAt(1))}},dt=function(Ut){return Ut.replace(lt,ut)},Pt=function(Ut){var Ht=Ut.length,oe=Ht%4,se=(Ht>0?gt[Ut.charAt(0)]<<18:0)|(Ht>1?gt[Ut.charAt(1)]<<12:0)|(Ht>2?gt[Ut.charAt(2)]<<6:0)|(Ht>3?gt[Ut.charAt(3)]:0),ce=[kt(se>>>16),kt(se>>>8&255),kt(se&255)];return ce.length-=[0,0,2,1][oe],ce.join("")},At=ot.atob&&typeof ot.atob=="function"?function(Ut){return ot.atob(Ut)}:function(Ut){return Ut.replace(/\S{1,4}/g,Pt)},Dt=function(Ut){return At(String(Ut).replace(/[^A-Za-z0-9\+\/]/g,""))},Ft=function(Ut){return dt(At(Ut))},Nt=function(Ut){return String(Ut).replace(/[-_]/g,function(Ht){return Ht=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},jt=function(Ut){return Ft(Nt(Ut))},Gt;ot.Uint8Array&&(Gt=function(Ut){return Uint8Array.from(Dt(Nt(Ut)),function(Ht){return Ht.charCodeAt(0)})});var Wt=function(){var Ut=ot.Base64;return ot.Base64=_t,Ut};if(ot.Base64={VERSION:Bt,atob:Dt,btoa:xt,fromBase64:jt,toBase64:tt,utob:Tt,encode:tt,encodeURI:at,btou:dt,decode:jt,noConflict:Wt,fromUint8Array:it,toUint8Array:Gt},typeof Object.defineProperty=="function"){var Jt=function(Ut){return{value:Ut,enumerable:!1,writable:!0,configurable:!0}};ot.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Jt(function(){return jt(this)})),Object.defineProperty(String.prototype,"toBase64",Jt(function(Ut){return tt(this,Ut)})),Object.defineProperty(String.prototype,"toBase64URI",Jt(function(){return tt(this,!0)}))}}return ot.Meteor&&(Base64=ot.Base64),dn.exports?dn.exports.Base64=ot.Base64:(ae=[],Re=function(){return ot.Base64}.apply(fn,ae),Re!==void 0&&(dn.exports=Re)),{Base64:ot.Base64}})},2859:function(dn,fn,le){"use strict";le.d(fn,{hP:function(){return re}});var ae=function(Kt,wt){return(ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Lt,Xt){Lt.__proto__=Xt}||function(Lt,Xt){for(var ee in Xt)Object.prototype.hasOwnProperty.call(Xt,ee)&&(Lt[ee]=Xt[ee])})(Kt,wt)};function Re(Kt,wt){function Lt(){this.constructor=Kt}ae(Kt,wt),Kt.prototype=wt===null?Object.create(wt):(Lt.prototype=wt.prototype,new Lt)}function ot(Kt,wt,Lt,Xt){return new(Lt||(Lt=Promise))(function(ee,It){function Rt(ue){try{$t(Xt.next(ue))}catch(ge){It(ge)}}function Vt(ue){try{$t(Xt.throw(ue))}catch(ge){It(ge)}}function $t(ue){var ge;ue.done?ee(ue.value):(ge=ue.value,ge instanceof Lt?ge:new Lt(function(Me){Me(ge)})).then(Rt,Vt)}$t((Xt=Xt.apply(Kt,wt||[])).next())})}function _t(Kt,wt){var Lt,Xt,ee,It,Rt={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return It={next:Vt(0),throw:Vt(1),return:Vt(2)},typeof Symbol=="function"&&(It[Symbol.iterator]=function(){return this}),It;function Vt($t){return function(ue){return function(ge){if(Lt)throw new TypeError("Generator is already executing.");for(;Rt;)try{if(Lt=1,Xt&&(ee=2&ge[0]?Xt.return:ge[0]?Xt.throw||((ee=Xt.return)&&ee.call(Xt),0):Xt.next)&&!(ee=ee.call(Xt,ge[1])).done)return ee;switch(Xt=0,ee&&(ge=[2&ge[0],ee.value]),ge[0]){case 0:case 1:ee=ge;break;case 4:return Rt.label++,{value:ge[1],done:!1};case 5:Rt.label++,Xt=ge[1],ge=[0];continue;case 7:ge=Rt.ops.pop(),Rt.trys.pop();continue;default:if(ee=Rt.trys,!((ee=ee.length>0&&ee[ee.length-1])||ge[0]!==6&&ge[0]!==2)){Rt=0;continue}if(ge[0]===3&&(!ee||ge[1]>ee[0]&&ge[1]<ee[3])){Rt.label=ge[1];break}if(ge[0]===6&&Rt.label<ee[1]){Rt.label=ee[1],ee=ge;break}if(ee&&Rt.label<ee[2]){Rt.label=ee[2],Rt.ops.push(ge);break}ee[2]&&Rt.ops.pop(),Rt.trys.pop();continue}ge=wt.call(Kt,Rt)}catch(Me){ge=[6,Me],Xt=0}finally{Lt=ee=0}if(5&ge[0])throw ge[1];return{value:ge[0]?ge[1]:void 0,done:!0}}([$t,ue])}}}function Bt(){for(var Kt=0,wt=0,Lt=arguments.length;wt<Lt;wt++)Kt+=arguments[wt].length;var Xt=Array(Kt),ee=0;for(wt=0;wt<Lt;wt++)for(var It=arguments[wt],Rt=0,Vt=It.length;Rt<Vt;Rt++,ee++)Xt[ee]=It[Rt];return Xt}var vt=function(){function Kt(){}return Kt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Kt.setAttributes=function(wt,Lt){for(var Xt=0,ee=Lt;Xt<ee.length;Xt++){var It=ee[Xt],Rt=It[0],Vt=It[1];wt.setAttribute(Rt,Vt)}},Kt.createRect=function(wt,Lt,Xt){var ee=document.createElementNS("http://www.w3.org/2000/svg","rect");return ee.setAttribute("width",wt.toString()),ee.setAttribute("height",Lt.toString()),Xt&&Kt.setAttributes(ee,Xt),ee},Kt.createLine=function(wt,Lt,Xt,ee,It){var Rt=document.createElementNS("http://www.w3.org/2000/svg","line");return Rt.setAttribute("x1",wt.toString()),Rt.setAttribute("y1",Lt.toString()),Rt.setAttribute("x2",Xt.toString()),Rt.setAttribute("y2",ee.toString()),It&&Kt.setAttributes(Rt,It),Rt},Kt.createPolygon=function(wt,Lt){var Xt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Xt.setAttribute("points",wt),Lt&&Kt.setAttributes(Xt,Lt),Xt},Kt.createCircle=function(wt,Lt){var Xt=document.createElementNS("http://www.w3.org/2000/svg","circle");return Xt.setAttribute("cx",(wt/2).toString()),Xt.setAttribute("cy",(wt/2).toString()),Xt.setAttribute("r",wt.toString()),Lt&&Kt.setAttributes(Xt,Lt),Xt},Kt.createEllipse=function(wt,Lt,Xt){var ee=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ee.setAttribute("cx",(wt/2).toString()),ee.setAttribute("cy",(Lt/2).toString()),ee.setAttribute("rx",(wt/2).toString()),ee.setAttribute("ry",(Lt/2).toString()),Xt&&Kt.setAttributes(ee,Xt),ee},Kt.createGroup=function(wt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","g");return wt&&Kt.setAttributes(Lt,wt),Lt},Kt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Kt.createMarker=function(wt,Lt,Xt,ee,It,Rt,Vt){var $t=document.createElementNS("http://www.w3.org/2000/svg","marker");return Kt.setAttributes($t,[["id",wt],["orient",Lt],["markerWidth",Xt.toString()],["markerHeight",ee.toString()],["refX",It.toString()],["refY",Rt.toString()]]),$t.appendChild(Vt),$t},Kt.createText=function(wt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","text");return Lt.setAttribute("x","0"),Lt.setAttribute("y","0"),wt&&Kt.setAttributes(Lt,wt),Lt},Kt.createTSpan=function(wt,Lt){var Xt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Xt.textContent=wt,Lt&&Kt.setAttributes(Xt,Lt),Xt},Kt.createImage=function(wt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","image");return wt&&Kt.setAttributes(Lt,wt),Lt},Kt.createPoint=function(wt,Lt){var Xt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Xt.x=wt,Xt.y=Lt,Xt},Kt.createPath=function(wt,Lt){var Xt=document.createElementNS("http://www.w3.org/2000/svg","path");return Xt.setAttribute("d",wt),Lt&&Kt.setAttributes(Xt,Lt),Xt},Kt}(),gt=function(){function Kt(){}return Kt.addKey=function(wt){Kt.key=wt},Object.defineProperty(Kt,"isLicensed",{get:function(){return!!Kt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Kt.key)},enumerable:!1,configurable:!0}),Kt}(),kt=function(){function Kt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Kt.prototype.rasterize=function(wt,Lt,Xt){var ee=this;return new Promise(function(It){var Rt=Xt!==void 0?Xt:document.createElement("canvas");wt===null&&(ee.markersOnly=!0,ee.naturalSize=!1);var Vt=document.createElementNS("http://www.w3.org/2000/svg","svg");Vt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Vt.setAttribute("width",Lt.width.baseVal.valueAsString),Vt.setAttribute("height",Lt.height.baseVal.valueAsString),Vt.setAttribute("viewBox","0 0 "+Lt.viewBox.baseVal.width.toString()+" "+Lt.viewBox.baseVal.height.toString()),Vt.innerHTML=Lt.innerHTML,ee.naturalSize===!0?(Vt.width.baseVal.value=wt.naturalWidth,Vt.height.baseVal.value=wt.naturalHeight):ee.width!==void 0&&ee.height!==void 0&&(Vt.width.baseVal.value=ee.width,Vt.height.baseVal.value=ee.height),Rt.width=Vt.width.baseVal.value,Rt.height=Vt.height.baseVal.value;var $t=Vt.outerHTML,ue=Rt.getContext("2d");ee.markersOnly!==!0&&ue.drawImage(wt,0,0,Rt.width,Rt.height);var ge=window.URL,Me=new Image(Rt.width,Rt.height);Me.setAttribute("crossOrigin","anonymous");var Ae=new Blob([$t],{type:"image/svg+xml"}),Be=ge.createObjectURL(Ae);Me.onload=function(){ue.drawImage(Me,0,0),ge.revokeObjectURL(Be);var Ze=Rt.toDataURL(ee.imageType,ee.imageQuality);It(Ze)},Me.src=Be})},Kt}(),bt=function(){},St=function(){function Kt(wt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+wt+"_"}return Object.defineProperty(Kt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.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(Kt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Kt.prototype.addClass=function(wt){return this.styleSheet===void 0&&this.addStyleSheet(),wt.name=""+this.classNamePrefix+wt.localName,this.classes.push(wt),this.styleSheet.sheet.insertRule("."+wt.name+" {"+wt.style+"}",this.styleSheet.sheet.cssRules.length),wt},Kt.prototype.addRule=function(wt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(wt),this.styleSheet.sheet.insertRule(wt.selector+" {"+wt.style+"}",this.styleSheet.sheet.cssRules.length)},Kt.prototype.addStyleSheet=function(){var wt;this.styleSheet=document.createElement("style"),((wt=this.styleSheetRoot)!==null&&wt!==void 0?wt:document.head).appendChild(this.styleSheet),this.addRule(new Tt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Tt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Tt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new mt("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new mt("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},Kt.prototype.removeStyleSheet=function(){var wt;this.styleSheet&&(((wt=this.styleSheetRoot)!==null&&wt!==void 0?wt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Kt}(),Tt=function(Kt,wt){this.selector=Kt,this.style=wt},mt=function(Kt,wt){this.localName=Kt,this.style=wt},xt=function(){function Kt(wt,Lt,Xt,ee,It){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=wt,this.displayMode=Lt,this.markerItems=Xt,this.uiStyleSettings=ee,this.styles=It,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Kt.prototype.show=function(wt){var Lt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=wt,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Xt=document.createElement("div");Xt.className=this.toolbarBlockStyleClass.name,Xt.style.whiteSpace="nowrap",this.uiContainer.appendChild(Xt),this.addActionButton(Xt,'<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(Xt,'<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(Xt,'<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(Xt,'<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(Xt,'<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(Xt,'<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(Xt,'<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(Xt,'<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(It){var Rt=document.createElement("div");Rt.className=""+Lt.toolbarButtonStyleClass.name,Rt.setAttribute("data-type-name",It.typeName),Rt.innerHTML=It.icon,Rt.addEventListener("click",function(){Lt.markerToolbarButtonClicked(Rt,It)}),Lt.buttons.push(Rt),Lt.markerButtons.push(Rt)}),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 ee=document.createElement("div");ee.className=this.toolbarBlockStyleClass.name,ee.style.whiteSpace="nowrap",ee.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ee),this.addActionButton(ee,'<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(ee,'<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()},Kt.prototype.addButtonClickListener=function(wt){this.buttonClickListeners.push(wt)},Kt.prototype.removeButtonClickListener=function(wt){this.buttonClickListeners.indexOf(wt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(wt),1)},Kt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Kt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var wt=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Lt=0;Lt<this.markerButtons.length;Lt++)Lt<wt||Lt===wt&&this.markerButtons.length-1===wt?this.markerButtonBlock.appendChild(this.markerButtons[Lt]):(Lt===wt&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Lt]))}},Kt.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")},Kt.prototype.resetButtonStyles=function(){var wt=this;this.buttons.forEach(function(Lt){Lt.className=Lt.className.replace(wt.uiStyleSettings.toolbarButtonStyleColorsClassName?wt.uiStyleSettings.toolbarButtonStyleColorsClassName:wt.toolbarButtonStyleColorsClass.name,"").trim(),Lt.className=Lt.className.replace(wt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?wt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:wt.toolbarActiveButtonStyleColorsClass.name,"").trim(),Lt.className+=" "+(wt.uiStyleSettings.toolbarButtonStyleColorsClassName?wt.uiStyleSettings.toolbarButtonStyleColorsClassName:wt.toolbarButtonStyleColorsClass.name)})},Kt.prototype.addActionButton=function(wt,Lt,Xt){var ee=this,It=document.createElement("div");switch(It.className=""+this.toolbarButtonStyleClass.name,It.innerHTML=Lt,It.setAttribute("data-action",Xt),It.addEventListener("click",function(){ee.actionToolbarButtonClicked(It,Xt)}),Xt){case"select":It.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":It.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":It.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":It.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":It.style.fill=this.uiStyleSettings.closeButtonColor}wt.appendChild(It),this.buttons.push(It)},Kt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new mt("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 mt("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new mt("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new mt("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 mt("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var wt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new mt("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*wt)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*wt)+`px;
|
|
padding: `+wt+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new mt("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new mt("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Tt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Tt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},Kt.prototype.markerToolbarButtonClicked=function(wt,Lt){this.setActiveButton(wt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Xt){return Xt("marker",Lt)}),this.markerButtonOverflowBlock.style.display="none"},Kt.prototype.actionToolbarButtonClicked=function(wt,Lt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Xt){return Xt("action",Lt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Kt.prototype.setActiveButton=function(wt){this.resetButtonStyles(),wt.className=wt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),wt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Kt.prototype.setActiveMarkerButton=function(wt){var Lt=this.markerButtons.find(function(Xt){return Xt.getAttribute("data-type-name")===wt});Lt&&this.setActiveButton(Lt)},Kt.prototype.setCurrentMarker=function(wt){var Lt=this;this.currentMarker=wt,this.buttons.filter(function(Xt){return/delete|notes/.test(Xt.getAttribute("data-action"))}).forEach(function(Xt){Lt.currentMarker===void 0?(Xt.style.fillOpacity="0.4",Xt.style.pointerEvents="none"):(Xt.style.fillOpacity="1",Xt.style.pointerEvents="all")})},Kt}(),ft=function(){function Kt(wt,Lt,Xt,ee){this.panels=[],this.panelButtons=[],this.markerjsContainer=wt,this.displayMode=Lt,this.uiStyleSettings=Xt,this.styles=ee,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Kt.prototype.addStyles=function(){var wt;this.toolboxStyleClass=this.styles.addClass(new mt("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 mt("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var Lt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new mt("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new mt("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new mt("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 mt("toolbox-panel-row_colors",`
|
|
background-color: `+((wt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&wt!==void 0?wt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new mt("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Lt)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Lt)+`px;
|
|
padding: `+Lt+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new mt("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new mt("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new Tt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Tt("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},Kt.prototype.show=function(wt){var Lt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=wt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Lt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Lt!==void 0?Lt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Kt.prototype.setPanelButtons=function(wt){var Lt,Xt,ee=this;this.panels=wt,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Lt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Lt!==void 0?Lt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Xt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Xt!==void 0?Xt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(It){var Rt;It.uiStyleSettings=ee.uiStyleSettings;var Vt=document.createElement("div");Vt.className=ee.toolboxButtonStyleClass.name+" "+((Rt=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Rt!==void 0?Rt:ee.toolboxButtonStyleColorsClass.name),Vt.innerHTML=It.icon,Vt.title=It.title,Vt.addEventListener("click",function(){ee.panelButtonClick(It)}),ee.panelButtons.push(Vt),ee.buttonRow.appendChild(Vt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Kt.prototype.panelButtonClick=function(wt){var Lt=this,Xt=-1;if(wt!==this.activePanel){Xt=this.panels.indexOf(wt),this.panelRow.innerHTML="";var ee=wt.getUi();ee.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ee),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=wt}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Lt.displayMode==="inline"?Lt.panelRow.style.display="none":Lt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(It,Rt){var Vt,$t;It.className=Lt.toolboxButtonStyleClass.name+" "+(Rt===Xt?""+((Vt=Lt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Vt!==void 0?Vt:Lt.toolboxActiveButtonStyleColorsClass.name):""+(($t=Lt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&$t!==void 0?$t:Lt.toolboxButtonStyleColorsClass.name))})},Kt}(),z=function(Kt,wt){this.title=Kt,this.icon=wt},tt=function(Kt){function wt(Lt,Xt,ee,It){var Rt=Kt.call(this,Lt,It||'<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 Rt.colors=[],Rt.addTransparent=!1,Rt.colorBoxes=[],Rt.colors=Xt,Rt.currentColor=ee,Rt.setCurrentColor=Rt.setCurrentColor.bind(Rt),Rt.getColorBox=Rt.getColorBox.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Xt=document.createElement("div");return Xt.style.overflow="hidden",Xt.style.whiteSpace="nowrap",this.colors.forEach(function(ee){var It=Lt.getColorBox(ee);Xt.appendChild(It),Lt.colorBoxes.push(It)}),Xt},wt.prototype.getColorBox=function(Lt){var Xt=this,ee=this.uiStyleSettings.toolbarHeight/4,It=this.uiStyleSettings.toolbarHeight-ee,Rt=document.createElement("div");Rt.style.display="inline-block",Rt.style.boxSizing="content-box",Rt.style.width=It-2+"px",Rt.style.height=It-2+"px",Rt.style.padding="1px",Rt.style.marginRight="2px",Rt.style.marginBottom="2px",Rt.style.borderWidth="2px",Rt.style.borderStyle="solid",Rt.style.borderRadius=(It+2)/2+"px",Rt.style.borderColor=Lt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Rt.addEventListener("click",function(){Xt.setCurrentColor(Lt,Rt)});var Vt=document.createElement("div");return Vt.style.display="inline-block",Vt.style.width=It-2+"px",Vt.style.height=It-2+"px",Vt.style.backgroundColor=Lt,Vt.style.borderRadius=It/2+"px",Lt==="transparent"&&(Vt.style.fill=this.uiStyleSettings.toolboxAccentColor,Vt.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>`),Rt.appendChild(Vt),Rt},wt.prototype.setCurrentColor=function(Lt,Xt){var ee=this;this.currentColor=Lt,this.colorBoxes.forEach(function(It){It.style.borderColor=It===Xt?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Lt)},wt}(z),at=function(){function Kt(wt,Lt,Xt){this._state="new",this._isSelected=!1,this._container=wt,this._overlayContainer=Lt,this.globalSettings=Xt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Kt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Kt.prototype.ownsTarget=function(wt){return!1},Object.defineProperty(Kt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Kt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Kt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Kt.prototype.pointerDown=function(wt,Lt){},Kt.prototype.dblClick=function(wt,Lt){},Kt.prototype.manipulate=function(wt){},Kt.prototype.pointerUp=function(wt){this.stateChanged()},Kt.prototype.dispose=function(){},Kt.prototype.addMarkerVisualToContainer=function(wt){this.container.childNodes.length>0?this.container.insertBefore(wt,this.container.childNodes[0]):this.container.appendChild(wt)},Kt.prototype.getState=function(){return{typeName:Kt.typeName,state:this.state,notes:this.notes}},Kt.prototype.restoreState=function(wt){this._state=wt.state,this.notes=wt.notes},Kt.prototype.scale=function(wt,Lt){},Kt.prototype.colorChanged=function(wt){this.onColorChanged&&this.onColorChanged(wt),this.stateChanged()},Kt.prototype.fillColorChanged=function(wt){this.onFillColorChanged&&this.onFillColorChanged(wt),this.stateChanged()},Kt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var wt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),wt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(wt)&&this.onStateChanged(this)}},Kt.typeName="MarkerBase",Kt}(),it=function(){function Kt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Kt.prototype.findGripByVisual=function(wt){return this.topLeft.ownsTarget(wt)?this.topLeft:this.topCenter.ownsTarget(wt)?this.topCenter:this.topRight.ownsTarget(wt)?this.topRight:this.centerLeft.ownsTarget(wt)?this.centerLeft:this.centerRight.ownsTarget(wt)?this.centerRight:this.bottomLeft.ownsTarget(wt)?this.bottomLeft:this.bottomCenter.ownsTarget(wt)?this.bottomCenter:this.bottomRight.ownsTarget(wt)?this.bottomRight:void 0},Kt}(),lt=function(){function Kt(){this.GRIP_SIZE=10,this.visual=vt.createGroup(),this.visual.appendChild(vt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(vt.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Kt.prototype.ownsTarget=function(wt){return wt===this.visual||wt===this.visual.childNodes[0]||wt===this.visual.childNodes[1]},Kt}(),ut=function(){function Kt(){}return Kt.toITransformMatrix=function(wt){return{a:wt.a,b:wt.b,c:wt.c,d:wt.d,e:wt.e,f:wt.f}},Kt.toSVGMatrix=function(wt,Lt){return wt.a=Lt.a,wt.b=Lt.b,wt.c=Lt.c,wt.d=Lt.d,wt.e=Lt.e,wt.f=Lt.f,wt},Kt}(),dt=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.left=0,It.top=0,It.width=0,It.height=0,It.defaultSize={x:50,y:20},It.offsetX=0,It.offsetY=0,It.rotationAngle=0,It.CB_DISTANCE=10,It._suppressMarkerCreateEvent=!1,It.container.transform.baseVal.appendItem(vt.createTransform()),It.setupControlBox(),It}return Re(wt,Kt),Object.defineProperty(wt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"visual",{get:function(){return this._visual},set:function(Lt){this._visual=Lt;var Xt=vt.createTransform();this._visual.transform.baseVal.appendItem(Xt)},enumerable:!1,configurable:!0}),wt.prototype.ownsTarget=function(Lt){return!!Kt.prototype.ownsTarget.call(this,Lt)||!!(this.controlGrips.findGripByVisual(Lt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Lt))},wt.prototype.pointerDown=function(Lt,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),this.state==="new"&&(this.left=Lt.x,this.top=Lt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ee=this.unrotatePoint(Lt);if(this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.offsetX=ee.x-this.left,this.offsetY=ee.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Xt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Xt)){this.activeGrip=this.rotatorGrip;var It=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=It.x-this.width/2,this.top=It.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Rt=this.container.transform.baseVal.getItem(0);Rt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Rt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},wt.prototype.pointerUp=function(Lt){var Xt=this.state;Kt.prototype.pointerUp.call(this,Lt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Lt),this._state="select",Xt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},wt.prototype.moveVisual=function(Lt){this.visual.style.transform="translate("+Lt.x+"px, "+Lt.y+"px)"},wt.prototype.manipulate=function(Lt){var Xt=this.unrotatePoint(Lt);this.state==="creating"?this.resize(Lt):this.state==="move"?(this.left=this.manipulationStartLeft+(Xt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Xt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Xt):this.state==="rotate"&&this.rotate(Lt)},wt.prototype.resize=function(Lt){var Xt=this.manipulationStartLeft,ee=this.manipulationStartWidth,It=this.manipulationStartTop,Rt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Xt=this.manipulationStartLeft+Lt.x-this.manipulationStartX,ee=this.manipulationStartWidth+this.manipulationStartLeft-Xt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ee=this.manipulationStartWidth+Lt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:It=this.manipulationStartTop+Lt.y-this.manipulationStartY,Rt=this.manipulationStartHeight+this.manipulationStartTop-It;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Rt=this.manipulationStartHeight+Lt.y-this.manipulationStartY}ee>=0?(this.left=Xt,this.width=ee):(this.left=Xt+ee,this.width=-ee),Rt>=0?(this.top=It,this.height=Rt):(this.top=It+Rt,this.height=-Rt),this.setSize()},wt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},wt.prototype.rotate=function(Lt){if(Math.abs(Lt.x-this.centerX)>.1){var Xt=Math.sign(Lt.x-this.centerX);this.rotationAngle=180*Math.atan((Lt.y-this.centerY)/(Lt.x-this.centerX))/Math.PI+90*Xt,this.applyRotation()}},wt.prototype.applyRotation=function(){var Lt=this.container.transform.baseVal.getItem(0);Lt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Lt,0)},wt.prototype.rotatePoint=function(Lt){if(this.rotationAngle===0)return Lt;var Xt=this.container.getCTM(),ee=vt.createPoint(Lt.x,Lt.y);return{x:(ee=ee.matrixTransform(Xt)).x,y:ee.y}},wt.prototype.unrotatePoint=function(Lt){if(this.rotationAngle===0)return Lt;var Xt=this.container.getCTM();Xt=Xt.inverse();var ee=vt.createPoint(Lt.x,Lt.y);return{x:(ee=ee.matrixTransform(Xt)).x,y:ee.y}},wt.prototype.select=function(){Kt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},wt.prototype.deselect=function(){Kt.prototype.deselect.call(this),this.controlBox.style.display="none"},wt.prototype.setupControlBox=function(){this.controlBox=vt.createGroup();var Lt=vt.createTransform();Lt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Lt),this.container.appendChild(this.controlBox),this.controlRect=vt.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=vt.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 it,this.addControlGrips(),this.controlBox.style.display="none"},wt.prototype.adjustControlBox=function(){var Lt=this.controlBox.transform.baseVal.getItem(0);Lt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Lt,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},wt.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},wt.prototype.createGrip=function(){var Lt=new lt;return Lt.visual.transform.baseVal.appendItem(vt.createTransform()),this.controlBox.appendChild(Lt.visual),Lt},wt.prototype.positionGrips=function(){var Lt=this.controlGrips.topLeft.GRIP_SIZE,Xt=-Lt/2,ee=Xt,It=(this.width+this.CB_DISTANCE)/2-Lt/2,Rt=(this.height+this.CB_DISTANCE)/2-Lt/2,Vt=this.height+this.CB_DISTANCE-Lt/2,$t=this.width+this.CB_DISTANCE-Lt/2;this.positionGrip(this.controlGrips.topLeft.visual,Xt,ee),this.positionGrip(this.controlGrips.topCenter.visual,It,ee),this.positionGrip(this.controlGrips.topRight.visual,$t,ee),this.positionGrip(this.controlGrips.centerLeft.visual,Xt,Rt),this.positionGrip(this.controlGrips.centerRight.visual,$t,Rt),this.positionGrip(this.controlGrips.bottomLeft.visual,Xt,Vt),this.positionGrip(this.controlGrips.bottomCenter.visual,It,Vt),this.positionGrip(this.controlGrips.bottomRight.visual,$t,Vt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,It,ee-3*this.CB_DISTANCE)},wt.prototype.positionGrip=function(Lt,Xt,ee){var It=Lt.transform.baseVal.getItem(0);It.setTranslate(Xt,ee),Lt.transform.baseVal.replaceItem(It,0)},wt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},wt.prototype.showControlBox=function(){this.controlBox.style.display=""},wt.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ut.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ut.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Kt.prototype.getState.call(this))},wt.prototype.restoreState=function(Lt){Kt.prototype.restoreState.call(this,Lt);var Xt=Lt;this.left=Xt.left,this.top=Xt.top,this.width=Xt.width,this.height=Xt.height,this.rotationAngle=Xt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ut.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Xt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ut.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Xt.containerTransformMatrix))},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt);var ee=this.rotatePoint({x:this.left,y:this.top}),It=this.unrotatePoint({x:ee.x*Lt,y:ee.y*Xt});this.left=It.x,this.top=It.y,this.width=this.width*Lt,this.height=this.height*Xt,this.adjustControlBox()},wt}(at),Pt=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.fillColor="transparent",It.strokeColor="transparent",It.strokeWidth=0,It.strokeDasharray="",It.opacity=1,It.setStrokeColor=It.setStrokeColor.bind(It),It.setFillColor=It.setFillColor.bind(It),It.setStrokeWidth=It.setStrokeWidth.bind(It),It.setStrokeDasharray=It.setStrokeDasharray.bind(It),It.createVisual=It.createVisual.bind(It),It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.visual)},wt.prototype.createVisual=function(){this.visual=vt.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},wt.prototype.pointerDown=function(Lt,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),this.state==="new"&&(this.createVisual(),this.moveVisual(Lt),this._state="creating")},wt.prototype.manipulate=function(Lt){Kt.prototype.manipulate.call(this,Lt)},wt.prototype.resize=function(Lt){Kt.prototype.resize.call(this,Lt),this.setSize()},wt.prototype.setSize=function(){Kt.prototype.setSize.call(this),vt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},wt.prototype.pointerUp=function(Lt){Kt.prototype.pointerUp.call(this,Lt),this.setSize()},wt.prototype.setStrokeColor=function(Lt){this.strokeColor=Lt,this.visual&&vt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Lt),this.stateChanged()},wt.prototype.setFillColor=function(Lt){this.fillColor=Lt,this.visual&&vt.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},wt.prototype.setStrokeWidth=function(Lt){this.strokeWidth=Lt,this.visual&&vt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},wt.prototype.setStrokeDasharray=function(Lt){this.strokeDasharray=Lt,this.visual&&vt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},wt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Kt.prototype.getState.call(this))},wt.prototype.restoreState=function(Lt){var Xt=Lt;this.fillColor=Xt.fillColor,this.strokeColor=Xt.strokeColor,this.strokeWidth=Xt.strokeWidth,this.strokeDasharray=Xt.strokeDasharray,this.opacity=Xt.opacity,this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.setSize()},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt),this.setSize()},wt.title="Rectangle marker",wt}(dt),At=function(Kt){function wt(Lt,Xt,ee,It){var Rt=Kt.call(this,Lt,It||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Rt.widths=[],Rt.widthBoxes=[],Rt.widths=Xt,Rt.currentWidth=ee,Rt.setCurrentWidth=Rt.setCurrentWidth.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Xt=document.createElement("div");return Xt.style.display="flex",Xt.style.overflow="hidden",Xt.style.flexGrow="2",this.widths.forEach(function(ee){var It=document.createElement("div");It.style.display="flex",It.style.flexGrow="2",It.style.alignItems="center",It.style.justifyContent="space-between",It.style.padding="5px",It.style.borderWidth="2px",It.style.borderStyle="solid",It.style.borderColor=ee===Lt.currentWidth?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentWidth(ee,It)}),Xt.appendChild(It);var Rt=document.createElement("div");Rt.innerText=ee.toString(),Rt.style.marginRight="5px",It.appendChild(Rt);var Vt=document.createElement("div");Vt.style.minHeight="20px",Vt.style.flexGrow="2",Vt.style.display="flex",Vt.style.alignItems="center";var $t=document.createElement("hr");$t.style.minWidth="20px",$t.style.border="0px",$t.style.borderTop=ee+"px solid "+Lt.uiStyleSettings.toolboxColor,$t.style.flexGrow="2",Vt.appendChild($t),It.appendChild(Vt),Lt.widthBoxes.push(It)}),Xt},wt.prototype.setCurrentWidth=function(Lt,Xt){var ee=this;this.currentWidth=Lt,this.widthBoxes.forEach(function(It){It.style.borderColor=It===Xt?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},wt}(z),Dt=function(Kt){function wt(Lt,Xt,ee,It){var Rt=Kt.call(this,Lt,It||'<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 Rt.styles=[],Rt.styleBoxes=[],Rt.styles=Xt,Rt.currentStyle=ee,Rt.setCurrentStyle=Rt.setCurrentStyle.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Xt=document.createElement("div");return Xt.style.display="flex",Xt.style.overflow="hidden",Xt.style.flexGrow="2",this.styles.forEach(function(ee){var It=document.createElement("div");It.style.display="flex",It.style.alignItems="center",It.style.justifyContent="space-between",It.style.padding="5px",It.style.borderWidth="2px",It.style.borderStyle="solid",It.style.overflow="hidden",It.style.maxWidth=100/Lt.styles.length-5+"%",It.style.borderColor=ee===Lt.currentStyle?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentStyle(ee,It)}),Xt.appendChild(It);var Rt=document.createElement("div");Rt.style.minHeight="20px",Rt.style.flexGrow="2",Rt.style.overflow="hidden";var Vt=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Lt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ee!==""?'stroke-dasharray="'+ee+'"':"")+` />
|
|
</svg>`;Rt.innerHTML=Vt,It.appendChild(Rt),Lt.styleBoxes.push(It)}),Xt},wt.prototype.setCurrentStyle=function(Lt,Xt){var ee=this;this.currentStyle=Lt,this.styleBoxes.forEach(function(It){It.style.borderColor=It===Xt?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},wt}(z),Ft=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.strokeColor=ee.defaultColor,It.strokeWidth=ee.defaultStrokeWidth,It.strokeDasharray=ee.defaultStrokeDasharray,It.strokePanel=new tt("Line color",ee.defaultColorSet,ee.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.strokeWidthPanel=new At("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It}return Re(wt,Kt),Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Kt.prototype.getState.call(this);return Lt.typeName=wt.typeName,Lt},wt.typeName="FrameMarker",wt.title="Frame marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',wt}(Pt),Nt=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},jt=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.x1=0,It.y1=0,It.x2=0,It.y2=0,It.defaultLength=50,It.manipulationStartX=0,It.manipulationStartY=0,It.manipulationStartX1=0,It.manipulationStartY1=0,It.manipulationStartX2=0,It.manipulationStartY2=0,It.setupControlBox(),It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!!Kt.prototype.ownsTarget.call(this,Lt)||!(!this.grip1.ownsTarget(Lt)&&!this.grip2.ownsTarget(Lt))},wt.prototype.pointerDown=function(Lt,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),this.manipulationStartX=Lt.x,this.manipulationStartY=Lt.y,this.state==="new"&&(this.x1=Lt.x,this.y1=Lt.y,this.x2=Lt.x,this.y2=Lt.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(Xt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Xt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},wt.prototype.pointerUp=function(Lt){var Xt=this.state;Kt.prototype.pointerUp.call(this,Lt),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(Lt),this._state="select",Xt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},wt.prototype.adjustVisual=function(){},wt.prototype.manipulate=function(Lt){this.state==="creating"?this.resize(Lt):this.state==="move"?(this.x1=this.manipulationStartX1+Lt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Lt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Lt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Lt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Lt)},wt.prototype.resize=function(Lt){switch(this.activeGrip){case this.grip1:this.x1=Lt.x,this.y1=Lt.y;break;case this.grip2:case void 0:this.x2=Lt.x,this.y2=Lt.y}this.adjustVisual(),this.adjustControlBox()},wt.prototype.select=function(){Kt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},wt.prototype.deselect=function(){Kt.prototype.deselect.call(this),this.controlBox.style.display="none"},wt.prototype.setupControlBox=function(){this.controlBox=vt.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},wt.prototype.adjustControlBox=function(){this.positionGrips()},wt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},wt.prototype.createGrip=function(){var Lt=new lt;return Lt.visual.transform.baseVal.appendItem(vt.createTransform()),this.controlBox.appendChild(Lt.visual),Lt},wt.prototype.positionGrips=function(){var Lt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Lt/2,this.y1-Lt/2),this.positionGrip(this.grip2.visual,this.x2-Lt/2,this.y2-Lt/2)},wt.prototype.positionGrip=function(Lt,Xt,ee){var It=Lt.transform.baseVal.getItem(0);It.setTranslate(Xt,ee),Lt.transform.baseVal.replaceItem(It,0)},wt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Kt.prototype.getState.call(this))},wt.prototype.restoreState=function(Lt){Kt.prototype.restoreState.call(this,Lt);var Xt=Lt;this.x1=Xt.x1,this.y1=Xt.y1,this.x2=Xt.x2,this.y2=Xt.y2},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt),this.x1=this.x1*Lt,this.y1=this.y1*Xt,this.x2=this.x2*Lt,this.y2=this.y2*Xt,this.adjustVisual(),this.adjustControlBox()},wt}(at),Gt=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.strokeColor="transparent",It.strokeWidth=0,It.strokeDasharray="",It.setStrokeColor=It.setStrokeColor.bind(It),It.setStrokeWidth=It.setStrokeWidth.bind(It),It.setStrokeDasharray=It.setStrokeDasharray.bind(It),It.strokeColor=ee.defaultColor,It.strokeWidth=ee.defaultStrokeWidth,It.strokeDasharray=ee.defaultStrokeDasharray,It.strokePanel=new tt("Line color",ee.defaultColorSet,ee.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.strokeWidthPanel=new At("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.visual&&Lt!==this.selectorLine&&Lt!==this.visibleLine)},wt.prototype.createVisual=function(){this.visual=vt.createGroup(),this.selectorLine=vt.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=vt.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},wt.prototype.pointerDown=function(Lt,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},wt.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),vt.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),vt.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),vt.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},wt.prototype.setStrokeColor=function(Lt){this.strokeColor=Lt,this.adjustVisual(),this.colorChanged(Lt)},wt.prototype.setStrokeWidth=function(Lt){this.strokeWidth=Lt,this.adjustVisual()},wt.prototype.setStrokeDasharray=function(Lt){this.strokeDasharray=Lt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){Kt.prototype.restoreState.call(this,Lt);var Xt=Lt;this.strokeColor=Xt.strokeColor,this.strokeWidth=Xt.strokeWidth,this.strokeDasharray=Xt.strokeDasharray,this.createVisual(),this.adjustVisual()},wt.typeName="LineMarker",wt.title="Line marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',wt}(jt),Wt=function(Kt){function wt(Lt,Xt,ee,It){var Rt=Kt.call(this,Lt,It||'<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 Rt.fonts=[],Rt.fontBoxes=[],Rt.fonts=Xt,Rt.currentFont=ee,Rt.setCurrentFont=Rt.setCurrentFont.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Xt=document.createElement("div");return Xt.style.overflow="hidden",Xt.style.flexGrow="2",this.fonts.forEach(function(ee){var It=document.createElement("div");It.style.display="inline-block",It.style.alignItems="center",It.style.justifyContent="space-between",It.style.padding="5px",It.style.borderWidth="2px",It.style.borderStyle="solid",It.style.overflow="hidden",It.style.maxWidth=100/Lt.fonts.length-5+"%",It.style.borderColor=ee===Lt.currentFont?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentFont(ee,It)}),Xt.appendChild(It);var Rt=document.createElement("div");Rt.style.display="flex",Rt.style.minHeight="20px",Rt.style.flexGrow="2",Rt.style.fontFamily=ee,Rt.style.overflow="hidden";var Vt=document.createElement("div");Vt.style.whiteSpace="nowrap",Vt.style.overflow="hidden",Vt.style.textOverflow="ellipsis",Vt.innerHTML="The quick brown fox jumps over the lazy dog",Rt.appendChild(Vt),It.appendChild(Rt),Lt.fontBoxes.push(It)}),Xt},wt.prototype.setCurrentFont=function(Lt,Xt){var ee=this;this.currentFont=Lt,this.fontBoxes.forEach(function(It){It.style.borderColor=It===Xt?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},wt}(z),Jt=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.color="transparent",It.padding=5,It.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",It.text=It.DEFAULT_TEXT,It.isMoved=!1,It.color=ee.defaultColor,It.fontFamily=ee.defaultFontFamily,It.defaultSize={x:100,y:30},It.setColor=It.setColor.bind(It),It.setFont=It.setFont.bind(It),It.renderText=It.renderText.bind(It),It.sizeText=It.sizeText.bind(It),It.textEditDivClicked=It.textEditDivClicked.bind(It),It.showTextEditor=It.showTextEditor.bind(It),It.setSize=It.setSize.bind(It),It.positionTextEditor=It.positionTextEditor.bind(It),It.colorPanel=new tt("Color",ee.defaultColorSet,ee.defaultColor),It.colorPanel.onColorChanged=It.setColor,It.fontFamilyPanel=new Wt("Font",ee.defaultFontFamilies,ee.defaultFontFamily),It.fontFamilyPanel.onFontChanged=It.setFont,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){if(Kt.prototype.ownsTarget.call(this,Lt)||Lt===this.visual||Lt===this.textElement||Lt===this.bgRectangle)return!0;var Xt=!1;return this.textElement.childNodes.forEach(function(ee){ee===Lt&&(Xt=!0)}),Xt},wt.prototype.createVisual=function(){this.visual=vt.createGroup(),this.bgRectangle=vt.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=vt.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(vt.createTransform()),this.textElement.transform.baseVal.appendItem(vt.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},wt.prototype.pointerDown=function(Lt,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),this.isMoved=!1,this.pointerDownPoint=Lt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Lt),this._state="creating")},wt.prototype.renderText=function(){var Lt=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(Xt){Lt.textElement.appendChild(vt.createTSpan(Xt.trim()===""?" ":Xt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},wt.prototype.getTextScale=function(){var Lt=this.textElement.getBBox(),Xt=1;if(Lt.width>0&&Lt.height>0){var ee=(1*this.width-this.width*this.padding*2/100)/Lt.width,It=(1*this.height-this.height*this.padding*2/100)/Lt.height;Xt=Math.min(ee,It)}return Xt},wt.prototype.getTextPosition=function(Lt){var Xt=this.textElement.getBBox(),ee=0,It=0;return Xt.width>0&&Xt.height>0&&(ee=(this.width-Xt.width*Lt)/2,It=this.height/2-Xt.height*Lt/2),{x:ee,y:It}},wt.prototype.sizeText=function(){var Lt=this.textElement.getBBox(),Xt=this.getTextScale(),ee=this.getTextPosition(Xt);ee.y-=Lt.y*Xt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ee.x+"px, "+ee.y+"px) scale("+Xt+", "+Xt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ee.x,ee.y),this.textElement.transform.baseVal.getItem(1).setScale(Xt,Xt))},wt.prototype.manipulate=function(Lt){Kt.prototype.manipulate.call(this,Lt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Lt.x-this.pointerDownPoint.x)>5||Math.abs(Lt.y-this.pointerDownPoint.y)>5)},wt.prototype.resize=function(Lt){Kt.prototype.resize.call(this,Lt),this.isMoved=!0,this.setSize(),this.sizeText()},wt.prototype.setSize=function(){Kt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(vt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),vt.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},wt.prototype.pointerUp=function(Lt){var Xt=this.state;Xt==="creating"&&(this._suppressMarkerCreateEvent=!0),Kt.prototype.pointerUp.call(this,Lt),this.setSize(),(Xt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},wt.prototype.showTextEditor=function(){var Lt=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(Xt){Xt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Xt=Number.parseFloat(Lt.textEditor.style.fontSize);Lt.textEditor.clientWidth>=Number.parseInt(Lt.textEditor.style.maxWidth)&&Xt>.9;)Xt-=.1,Lt.textEditor.style.fontSize=Math.max(Xt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Xt){Xt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Xt){if(Xt.clipboardData){var ee=Xt.clipboardData.getData("text"),It=window.getSelection();if(!It.rangeCount)return!1;It.deleteFromDocument(),It.getRangeAt(0).insertNode(document.createTextNode(ee)),Xt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Lt.textEditDivClicked(Lt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},wt.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Lt=this.getTextScale(),Xt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ee=this.textElement.getBBox(),It={x:ee.width*Lt,y:ee.height*Lt};Xt.x-=It.x/2,Xt.y-=It.y/2,this.textEditor.style.top=Xt.y+"px",this.textEditor.style.left=Xt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Xt.x+"px",this.textEditor.style.fontSize=Math.max(16*Lt,12)+"px",this.textElement.style.display="none"}},wt.prototype.textEditDivClicked=function(Lt){this.text=Lt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},wt.prototype.select=function(){Kt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},wt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Kt.prototype.deselect.call(this)},wt.prototype.dblClick=function(Lt,Xt){Kt.prototype.dblClick.call(this,Lt,Xt),this.showTextEditor()},wt.prototype.setColor=function(Lt){this.textElement&&vt.setAttributes(this.textElement,[["fill",Lt]]),this.color=Lt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Lt)},wt.prototype.setFont=function(Lt){this.textElement&&vt.setAttributes(this.textElement,[["font-family",Lt]]),this.fontFamily=Lt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},wt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},wt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){var Xt=Lt;this.color=Xt.color,this.fontFamily=Xt.fontFamily,this.padding=Xt.padding,this.text=Xt.text,this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.setSize()},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt),this.setSize(),this.sizeText(),this.positionTextEditor()},wt.typeName="TextMarker",wt.title="Text marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',wt}(dt),Ut=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.color="transparent",It.lineWidth=3,It.drawing=!1,It.pixelRatio=1,It.color=ee.defaultColor,It.lineWidth=ee.defaultStrokeWidth,It.pixelRatio=ee.freehandPixelRatio,It.setColor=It.setColor.bind(It),It.addCanvas=It.addCanvas.bind(It),It.finishCreation=It.finishCreation.bind(It),It.setLineWidth=It.setLineWidth.bind(It),It.colorPanel=new tt("Color",ee.defaultColorSet,ee.defaultColor),It.colorPanel.onColorChanged=It.setColor,It.lineWidthPanel=new At("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),It.lineWidthPanel.onWidthChanged=It.setLineWidth,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.visual&&Lt!==this.drawingImage)},wt.prototype.createVisual=function(){this.visual=vt.createGroup(),this.drawingImage=vt.createImage(),this.visual.appendChild(this.drawingImage);var Lt=vt.createTransform();this.visual.transform.baseVal.appendItem(Lt),this.addMarkerVisualToContainer(this.visual)},wt.prototype.pointerDown=function(Lt,Xt){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(Lt.x,Lt.y),this.drawing=!0):Kt.prototype.pointerDown.call(this,Lt,Xt)},wt.prototype.manipulate=function(Lt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Lt.x,Lt.y),this.canvasContext.stroke()):Kt.prototype.manipulate.call(this,Lt)},wt.prototype.resize=function(Lt){Kt.prototype.resize.call(this,Lt),vt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),vt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},wt.prototype.pointerUp=function(Lt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Kt.prototype.pointerUp.call(this,Lt)},wt.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},wt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Kt.prototype.select.call(this)},wt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Kt.prototype.deselect.call(this)},wt.prototype.finishCreation=function(){for(var Lt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Xt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ee=Xt[0],It=Xt[1],Rt=Xt[2],Vt=Xt[3],$t=!1,ue=0;ue<this.canvasElement.height;ue++)for(var ge=0;ge<this.canvasElement.width;ge++)Lt.data[ue*this.canvasElement.width*4+4*ge+3]>0&&($t=!0,ue<It&&(It=ue),ge<ee&&(ee=ge),ue>Vt&&(Vt=ue),ge>Rt&&(Rt=ge));if($t){this.left=ee/this.pixelRatio,this.top=It/this.pixelRatio,this.width=(Rt-ee)/this.pixelRatio,this.height=(Vt-It)/this.pixelRatio;var Me=document.createElement("canvas");Me.width=Rt-ee,Me.height=Vt-It,Me.getContext("2d").putImageData(this.canvasContext.getImageData(ee,It,Rt-ee,Vt-It),0,0),this.drawingImgUrl=Me.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},wt.prototype.setDrawingImage=function(){vt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),vt.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},wt.prototype.setColor=function(Lt){this.color=Lt,this.colorChanged(Lt)},wt.prototype.setLineWidth=function(Lt){this.lineWidth=Lt},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Object.assign({drawingImgUrl:this.drawingImgUrl},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.drawingImgUrl=Lt.drawingImgUrl,this.setDrawingImage()},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt),this.setDrawingImage()},wt.typeName="FreehandMarker",wt.title="Freehand marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',wt}(dt),Ht=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,ee||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return It.typeBoxes=[],It.currentType=Xt,It.setCurrentType=It.setCurrentType.bind(It),It}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Xt=document.createElement("div");Xt.style.display="flex",Xt.style.overflow="hidden",Xt.style.flexGrow="2";for(var ee=function(Vt){var $t="both";switch(Vt){case 0:$t="both";break;case 1:$t="start";break;case 2:$t="end";break;case 3:$t="none"}var ue=document.createElement("div");if(ue.style.display="flex",ue.style.flexGrow="2",ue.style.alignItems="center",ue.style.justifyContent="space-between",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.borderColor=$t===It.currentType?It.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){Lt.setCurrentType($t,ue)}),Xt.appendChild(ue),$t==="both"||$t==="start"){var ge=document.createElement("div");ge.style.display="flex",ge.style.alignItems="center",ge.style.minHeight="20px",ge.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(It.uiStyleSettings!==void 0?It.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,ge.style.marginLeft="5px",ue.appendChild(ge)}var Me=document.createElement("div");Me.style.display="flex",Me.style.alignItems="center",Me.style.minHeight="20px",Me.style.flexGrow="2";var Ae=document.createElement("hr");if(Ae.style.minWidth="20px",Ae.style.border="0px",Ae.style.borderTop="3px solid "+(It.uiStyleSettings!==void 0?It.uiStyleSettings.toolboxColor:"#eeeeee"),Ae.style.flexGrow="2",Me.appendChild(Ae),ue.appendChild(Me),$t==="both"||$t==="end"){var Be=document.createElement("div");Be.style.display="flex",Be.style.alignItems="center",Be.style.minHeight="20px",Be.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="`+(It.uiStyleSettings!==void 0?It.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Be.style.marginRight="5px",ue.appendChild(Be)}It.typeBoxes.push(ue)},It=this,Rt=0;Rt<4;Rt++)ee(Rt);return Xt},wt.prototype.setCurrentType=function(Lt,Xt){var ee=this;this.currentType=Lt,this.typeBoxes.forEach(function(It){It.style.borderColor=It===Xt?ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},wt}(z),oe=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.arrowType="end",It.arrowBaseHeight=10,It.arrowBaseWidth=10,It.getArrowPoints=It.getArrowPoints.bind(It),It.setArrowType=It.setArrowType.bind(It),It.arrowTypePanel=new Ht("Arrow type","end"),It.arrowTypePanel.onArrowTypeChanged=It.setArrowType,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.arrow1&&Lt!==this.arrow2)},wt.prototype.getArrowPoints=function(Lt,Xt){var ee=this.arrowBaseWidth+2*this.strokeWidth,It=this.arrowBaseHeight+2*this.strokeWidth;return Lt-ee/2+","+(Xt+It/2)+" "+Lt+","+(Xt-It/2)+" "+(Lt+ee/2)+","+(Xt+It/2)},wt.prototype.createTips=function(){this.arrow1=vt.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(vt.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=vt.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(vt.createTransform()),this.visual.appendChild(this.arrow2)},wt.prototype.pointerDown=function(Lt,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),this.state==="creating"&&this.createTips()},wt.prototype.adjustVisual=function(){if(Kt.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",vt.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),vt.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Lt=0;Math.abs(this.x1-this.x2)>.1&&(Lt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Xt=this.arrow1.transform.baseVal.getItem(0);Xt.setRotate(Lt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Xt,0);var ee=this.arrow2.transform.baseVal.getItem(0);ee.setRotate(Lt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ee,0)}},wt.prototype.setArrowType=function(Lt){this.arrowType=Lt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Object.assign({arrowType:this.arrowType},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){Kt.prototype.restoreState.call(this,Lt);var Xt=Lt;this.arrowType=Xt.arrowType,this.createTips(),this.adjustVisual()},wt.typeName="ArrowMarker",wt.title="Arrow marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',wt}(Gt),se=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.fillColor=ee.defaultFillColor,It.strokeWidth=0,It.fillPanel=new tt("Color",ee.defaultColorSet,ee.defaultFillColor),It.fillPanel.onColorChanged=It.setFillColor,It}return Re(wt,Kt),Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Kt.prototype.getState.call(this);return Lt.typeName=wt.typeName,Lt},wt.typeName="CoverMarker",wt.title="Cover marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',wt}(Pt),ce=function(Kt){function wt(Lt,Xt,ee,It){var Rt=Kt.call(this,Lt,It||'<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 Rt.opacities=[],Rt.opacityBoxes=[],Rt.opacities=Xt,Rt.currentOpacity=ee,Rt.setCurrentOpacity=Rt.setCurrentOpacity.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Xt=document.createElement("div");return Xt.style.display="flex",Xt.style.overflow="hidden",Xt.style.flexGrow="2",Xt.style.justifyContent="space-between",this.opacities.forEach(function(ee){var It=document.createElement("div");It.style.display="flex",It.style.alignItems="center",It.style.justifyContent="center",It.style.padding="5px",It.style.borderWidth="2px",It.style.borderStyle="solid",It.style.borderColor=ee===Lt.currentOpacity?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentOpacity(ee,It)}),Xt.appendChild(It);var Rt=document.createElement("div");Rt.innerText=100*ee+"%",It.appendChild(Rt),Lt.opacityBoxes.push(It)}),Xt},wt.prototype.setCurrentOpacity=function(Lt,Xt){var ee=this;this.currentOpacity=Lt,this.opacityBoxes.forEach(function(It){It.style.borderColor=It===Xt?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},wt}(z),Pe=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.setOpacity=It.setOpacity.bind(It),It.fillColor=ee.defaultHighlightColor,It.strokeWidth=0,It.opacity=ee.defaultHighlightOpacity,It.fillPanel=new tt("Color",ee.defaultColorSet,It.fillColor),It.fillPanel.onColorChanged=It.setFillColor,It.opacityPanel=new ce("Opacity",ee.defaultOpacitySteps,It.opacity),It.opacityPanel.onOpacityChanged=It.setOpacity,It}return Re(wt,Kt),wt.prototype.setOpacity=function(Lt){this.opacity=Lt,this.visual&&vt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Kt.prototype.getState.call(this);return Lt.typeName=wt.typeName,Lt},wt.typeName="HighlightMarker",wt.title="Highlight marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',wt}(se),Yt='<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>',ne='<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>',ve=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.bgColor="transparent",It.tipPosition={x:0,y:0},It.tipBase1Position={x:0,y:0},It.tipBase2Position={x:0,y:0},It.tipMoving=!1,It.color=ee.defaultStrokeColor,It.bgColor=ee.defaultFillColor,It.fontFamily=ee.defaultFontFamily,It.defaultSize={x:100,y:30},It.setBgColor=It.setBgColor.bind(It),It.getTipPoints=It.getTipPoints.bind(It),It.positionTip=It.positionTip.bind(It),It.setTipPoints=It.setTipPoints.bind(It),It.colorPanel=new tt("Text color",ee.defaultColorSet,It.color,Yt),It.colorPanel.onColorChanged=It.setColor,It.bgColorPanel=new tt("Fill color",ee.defaultColorSet,It.bgColor,ne),It.bgColorPanel.onColorChanged=It.setBgColor,It.fontFamilyPanel=new Wt("Font",ee.defaultFontFamilies,ee.defaultFontFamily),It.fontFamilyPanel.onFontChanged=It.setFont,It.tipGrip=new lt,It.tipGrip.visual.transform.baseVal.appendItem(vt.createTransform()),It.controlBox.appendChild(It.tipGrip.visual),It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return Kt.prototype.ownsTarget.call(this,Lt)||this.tipGrip.ownsTarget(Lt)||this.tip===Lt},wt.prototype.createTip=function(){vt.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=vt.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},wt.prototype.pointerDown=function(Lt,Xt){this.state==="new"&&Kt.prototype.pointerDown.call(this,Lt,Xt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Xt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Kt.prototype.pointerDown.call(this,Lt,Xt)},wt.prototype.pointerUp=function(Lt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Kt.prototype.pointerUp.call(this,Lt);else{var Xt=this.state==="creating";Kt.prototype.pointerUp.call(this,Lt),this.setTipPoints(Xt),this.positionTip()}},wt.prototype.manipulate=function(Lt){if(this.tipMoving){var Xt=this.unrotatePoint(Lt);this.tipPosition={x:Xt.x-this.manipulationStartLeft,y:Xt.y-this.manipulationStartTop},this.positionTip()}else Kt.prototype.manipulate.call(this,Lt)},wt.prototype.setBgColor=function(Lt){this.bgRectangle&&this.tip&&(vt.setAttributes(this.bgRectangle,[["fill",Lt]]),vt.setAttributes(this.tip,[["fill",Lt]])),this.bgColor=Lt,this.fillColorChanged(Lt)},wt.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},wt.prototype.setTipPoints=function(Lt){Lt===void 0&&(Lt=!1);var Xt=Math.min(this.height/2,15),ee=this.height/5;Lt&&(this.tipPosition={x:Xt+ee/2,y:this.height+20});var It=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?It<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ee=this.width/5,Xt=Math.min(this.width/2,15),this.tipBase1Position={x:Xt,y:0},this.tipBase2Position={x:Xt+ee,y:0}):(this.tipBase1Position={x:0,y:Xt},this.tipBase2Position={x:0,y:Xt+ee}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?It<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ee=this.width/5,Xt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Xt-ee,y:0},this.tipBase2Position={x:this.width-Xt,y:0}):(this.tipBase1Position={x:this.width,y:Xt},this.tipBase2Position={x:this.width,y:Xt+ee}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?It<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ee=this.width/5,Xt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Xt-ee,y:this.height},this.tipBase2Position={x:this.width-Xt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Xt-ee},this.tipBase2Position={x:this.width,y:this.height-Xt}):It<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ee=this.width/5,Xt=Math.min(this.width/2,15),this.tipBase1Position={x:Xt,y:this.height},this.tipBase2Position={x:Xt+ee,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Xt},this.tipBase2Position={x:0,y:this.height-Xt-ee})},wt.prototype.resize=function(Lt){Kt.prototype.resize.call(this,Lt),this.positionTip()},wt.prototype.positionTip=function(){vt.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Lt=this.tipGrip.visual.transform.baseVal.getItem(0);Lt.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Lt,0)},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),wt.prototype.select=function(){this.positionTip(),Kt.prototype.select.call(this)},wt.prototype.getState=function(){var Lt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){var Xt=Lt;this.bgColor=Xt.bgColor,this.tipPosition=Xt.tipPosition,Kt.prototype.restoreState.call(this,Lt),this.createTip(),this.setTipPoints()},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt),this.tipPosition={x:this.tipPosition.x*Lt,y:this.tipPosition.y*Xt},this.positionTip()},wt.typeName="CalloutMarker",wt.title="Callout marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',wt}(Jt),Se=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.fillColor="transparent",It.strokeColor="transparent",It.strokeWidth=0,It.strokeDasharray="",It.opacity=1,It.strokeColor=ee.defaultColor,It.strokeWidth=ee.defaultStrokeWidth,It.strokeDasharray=ee.defaultStrokeDasharray,It.fillColor=ee.defaultFillColor,It.setStrokeColor=It.setStrokeColor.bind(It),It.setFillColor=It.setFillColor.bind(It),It.setStrokeWidth=It.setStrokeWidth.bind(It),It.setStrokeDasharray=It.setStrokeDasharray.bind(It),It.setOpacity=It.setOpacity.bind(It),It.createVisual=It.createVisual.bind(It),It.strokePanel=new tt("Line color",Bt(ee.defaultColorSet,["transparent"]),ee.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.fillPanel=new tt("Fill color",Bt(ee.defaultColorSet,["transparent"]),It.fillColor,ne),It.fillPanel.onColorChanged=It.setFillColor,It.strokeWidthPanel=new At("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It.opacityPanel=new ce("Opacity",ee.defaultOpacitySteps,It.opacity),It.opacityPanel.onOpacityChanged=It.setOpacity,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.visual)},wt.prototype.createVisual=function(){this.visual=vt.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},wt.prototype.pointerDown=function(Lt,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),this.state==="new"&&(this.createVisual(),this.moveVisual(Lt),this._state="creating")},wt.prototype.manipulate=function(Lt){Kt.prototype.manipulate.call(this,Lt)},wt.prototype.resize=function(Lt){Kt.prototype.resize.call(this,Lt),this.setSize()},wt.prototype.setSize=function(){Kt.prototype.setSize.call(this),vt.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},wt.prototype.pointerUp=function(Lt){Kt.prototype.pointerUp.call(this,Lt),this.setSize()},wt.prototype.setStrokeColor=function(Lt){this.strokeColor=Lt,this.visual&&vt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Lt),this.stateChanged()},wt.prototype.setFillColor=function(Lt){this.fillColor=Lt,this.visual&&vt.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Lt),this.stateChanged()},wt.prototype.setStrokeWidth=function(Lt){this.strokeWidth=Lt,this.visual&&vt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},wt.prototype.setStrokeDasharray=function(Lt){this.strokeDasharray=Lt,this.visual&&vt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},wt.prototype.setOpacity=function(Lt){this.opacity=Lt,this.visual&&vt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){var Xt=Lt;this.fillColor=Xt.fillColor,this.strokeColor=Xt.strokeColor,this.strokeWidth=Xt.strokeWidth,this.strokeDasharray=Xt.strokeDasharray,this.opacity=Xt.opacity,this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.setSize()},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt),this.setSize()},wt.typeName="EllipseMarker",wt.title="Ellipse marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',wt}(dt),be=function(Kt){function wt(Lt,Xt,ee){return Kt.call(this,Lt,Xt,ee)||this}return Re(wt,Kt),Object.defineProperty(wt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.tip1&&Lt!==this.tip2)},wt.prototype.createTips=function(){this.tip1=vt.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(vt.createTransform()),this.visual.appendChild(this.tip1),this.tip2=vt.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(vt.createTransform()),this.visual.appendChild(this.tip2)},wt.prototype.pointerDown=function(Lt,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),this.state==="creating"&&this.createTips()},wt.prototype.adjustVisual=function(){if(Kt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(vt.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()]]),vt.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 Lt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Xt=this.tip1.transform.baseVal.getItem(0);Xt.setRotate(Lt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Xt,0);var ee=this.tip2.transform.baseVal.getItem(0);ee.setRotate(Lt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ee,0)}},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Kt.prototype.getState.call(this);return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){Kt.prototype.restoreState.call(this,Lt),this.createTips(),this.adjustVisual()},wt.typeName="MeasurementMarker",wt.title="Measurement marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',wt}(Gt),fe=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.strokePanel.colors=ee.defaultColorSet,It.fillColor="transparent",It}return Re(wt,Kt),Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Kt.prototype.getState.call(this);return Lt.typeName=wt.typeName,Lt},wt.typeName="EllipseFrameMarker",wt.title="Ellipse frame marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',wt}(Se),pe=function(){function Kt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Kt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Kt.prototype.addUndoStep=function(wt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(wt)||(this.undoStack.push(wt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(wt)&&this.redoStack.splice(0,this.redoStack.length))},Kt.prototype.replaceLastUndoStep=function(wt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=wt)},Kt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Kt.prototype.undo=function(){if(this.undoStack.length>1){var wt=this.undoStack.pop();return wt!==void 0&&this.redoStack.push(wt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Kt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Kt}(),he=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.strokeColor="transparent",It.strokeWidth=0,It.strokeDasharray="",It.curveX=0,It.curveY=0,It.manipulationStartCurveX=0,It.manipulationStartCurveY=0,It.setStrokeColor=It.setStrokeColor.bind(It),It.setStrokeWidth=It.setStrokeWidth.bind(It),It.setStrokeDasharray=It.setStrokeDasharray.bind(It),It.positionGrips=It.positionGrips.bind(It),It.addControlGrips=It.addControlGrips.bind(It),It.adjustVisual=It.adjustVisual.bind(It),It.setupControlBox=It.setupControlBox.bind(It),It.resize=It.resize.bind(It),It.strokeColor=ee.defaultColor,It.strokeWidth=ee.defaultStrokeWidth,It.strokeDasharray=ee.defaultStrokeDasharray,It.strokePanel=new tt("Line color",ee.defaultColorSet,ee.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.strokeWidthPanel=new At("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.visual&&Lt!==this.selectorCurve&&Lt!==this.visibleCurve&&!this.curveGrip.ownsTarget(Lt))},wt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},wt.prototype.createVisual=function(){this.visual=vt.createGroup(),this.selectorCurve=vt.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=vt.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},wt.prototype.pointerDown=function(Lt,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Lt.x,this.curveY=Lt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Xt)&&(this.activeGrip=this.curveGrip,this._state="resize")},wt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),vt.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),vt.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),vt.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},wt.prototype.setupControlBox=function(){Kt.prototype.setupControlBox.call(this),this.curveControlLine1=vt.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=vt.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},wt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Kt.prototype.addControlGrips.call(this)},wt.prototype.positionGrips=function(){Kt.prototype.positionGrips.call(this);var Lt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Lt/2,this.curveY-Lt/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},wt.prototype.manipulate=function(Lt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Lt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Lt.y-this.manipulationStartY),Kt.prototype.manipulate.call(this,Lt)},wt.prototype.resize=function(Lt){this.activeGrip===this.curveGrip&&(this.curveX=Lt.x,this.curveY=Lt.y),Kt.prototype.resize.call(this,Lt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},wt.prototype.setStrokeColor=function(Lt){this.strokeColor=Lt,this.adjustVisual(),this.colorChanged(Lt)},wt.prototype.setStrokeWidth=function(Lt){this.strokeWidth=Lt,this.adjustVisual()},wt.prototype.setStrokeDasharray=function(Lt){this.strokeDasharray=Lt,this.adjustVisual()},wt.prototype.scale=function(Lt,Xt){this.curveX=this.curveX*Lt,this.curveY=this.curveY*Xt,Kt.prototype.scale.call(this,Lt,Xt)},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){Kt.prototype.restoreState.call(this,Lt);var Xt=Lt;this.strokeColor=Xt.strokeColor,this.strokeWidth=Xt.strokeWidth,this.strokeDasharray=Xt.strokeDasharray,this.curveX=Xt.curveX,this.curveY=Xt.curveY,this.createVisual(),this.adjustVisual()},wt.typeName="CurveMarker",wt.title="Curve marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',wt}(jt),Ce=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,Xt,ee)||this;return It.fillColor="transparent",It.strokeColor="transparent",It.strokeWidth=0,It.strokeDasharray="",It.textColor="transparent",It.fontSize="1rem",It.isMoved=!1,It.captionText="Caption",It.PADDING=5,It.captionBoxWidth=0,It.captionBoxHeight=0,It.strokeColor=ee.defaultColor,It.strokeWidth=ee.defaultStrokeWidth,It.strokeDasharray=ee.defaultStrokeDasharray,It.fillColor=ee.defaultFillColor,It.textColor=ee.defaultStrokeColor,It.fontFamily=ee.defaultFontFamily,It.fontSize=ee.defaultCaptionFontSize,It.captionText=ee.defaultCaptionText,It.setStrokeColor=It.setStrokeColor.bind(It),It.setFillColor=It.setFillColor.bind(It),It.setStrokeWidth=It.setStrokeWidth.bind(It),It.setStrokeDasharray=It.setStrokeDasharray.bind(It),It.createVisual=It.createVisual.bind(It),It.sizeCaption=It.sizeCaption.bind(It),It.setCaptionText=It.setCaptionText.bind(It),It.showTextEditor=It.showTextEditor.bind(It),It.positionTextEditor=It.positionTextEditor.bind(It),It.finishTextEditing=It.finishTextEditing.bind(It),It.setFont=It.setFont.bind(It),It.setTextColor=It.setTextColor.bind(It),It.strokePanel=new tt("Line color",Bt(ee.defaultColorSet,["transparent"]),It.strokeColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.fillPanel=new tt("Fill color",Bt(ee.defaultColorSet,["transparent"]),It.fillColor,ne),It.fillPanel.onColorChanged=It.setFillColor,It.strokeWidthPanel=new At("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It.fontFamilyPanel=new Wt("Font",ee.defaultFontFamilies,ee.defaultFontFamily),It.fontFamilyPanel.onFontChanged=It.setFont,It.textColorPanel=new tt("Text color",ee.defaultColorSet,It.textColor,Yt),It.textColorPanel.onColorChanged=It.setTextColor,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.visual&&Lt!==this.frame&&Lt!==this.captionBg&&Lt!==this.captionElement)},wt.prototype.createVisual=function(){this.visual=vt.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=vt.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=vt.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=vt.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},wt.prototype.setCaptionText=function(Lt){this.captionText=Lt,this.captionElement.textContent=this.captionText,this.sizeCaption()},wt.prototype.pointerDown=function(Lt,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),this.isMoved=!1,this.pointerDownPoint=Lt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Lt),this._state="creating")},wt.prototype.manipulate=function(Lt){Kt.prototype.manipulate.call(this,Lt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Lt.x-this.pointerDownPoint.x)>5||Math.abs(Lt.y-this.pointerDownPoint.y)>5)},wt.prototype.resize=function(Lt){Kt.prototype.resize.call(this,Lt),this.setSize()},wt.prototype.sizeCaption=function(){var Lt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Lt.width+2*this.PADDING,this.captionBoxHeight=Lt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),vt.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')"]]),vt.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},wt.prototype.showTextEditor=function(){var Lt=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(Xt){Xt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Xt){Xt.key==="Enter"&&Lt.finishTextEditing(Lt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Xt){Xt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Lt.finishTextEditing(Lt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Lt.finishTextEditing(Lt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},wt.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},wt.prototype.finishTextEditing=function(Lt){this.setCaptionText(Lt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},wt.prototype.setFont=function(Lt){this.captionElement&&vt.setAttributes(this.captionElement,[["font-family",Lt]]),this.fontFamily=Lt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},wt.prototype.setTextColor=function(Lt){this.captionElement&&vt.setAttributes(this.captionElement,[["fill",Lt]]),this.textColor=Lt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},wt.prototype.setSize=function(){Kt.prototype.setSize.call(this),vt.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},wt.prototype.pointerUp=function(Lt){Kt.prototype.pointerUp.call(this,Lt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},wt.prototype.dblClick=function(Lt,Xt){Kt.prototype.dblClick.call(this,Lt,Xt),this.showTextEditor()},wt.prototype.setStrokeColor=function(Lt){this.strokeColor=Lt,this.frame&&vt.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Lt),this.stateChanged()},wt.prototype.setFillColor=function(Lt){this.fillColor=Lt,this.captionBg&&vt.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Lt),this.stateChanged()},wt.prototype.setStrokeWidth=function(Lt){this.strokeWidth=Lt,this.frame&&vt.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},wt.prototype.setStrokeDasharray=function(Lt){this.strokeDasharray=Lt,this.frame&&vt.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=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},Kt.prototype.getState.call(this));return Lt.typeName=this.typeName,Lt},wt.prototype.restoreState=function(Lt){var Xt=Lt;this.fillColor=Xt.fillColor,this.strokeColor=Xt.strokeColor,this.strokeWidth=Xt.strokeWidth,this.strokeDasharray=Xt.strokeDasharray,this.textColor=Xt.textColor,this.fontFamily=Xt.fontFamily,this.captionText=Xt.captionText,this.fontSize=Xt.fontSize,this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.setSize()},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt),this.setSize()},wt.typeName="CaptionFrameMarker",wt.title="Caption frame marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',wt}(dt),de=function(){function Kt(wt,Lt){Lt===void 0&&(Lt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=wt,this.cancelable=Lt}return Object.defineProperty(Kt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Kt.prototype.preventDefault=function(){this._defaultPrevented=!0},Kt}(),ye=function(Kt){function wt(Lt,Xt,ee){var It=Kt.call(this,Lt,!1)||this;return It.dataUrl=Xt,It.state=ee,It}return Re(wt,Kt),wt}(de),Ne=function(Kt){function wt(Lt,Xt,ee){ee===void 0&&(ee=!1);var It=Kt.call(this,Lt,ee)||this;return It.marker=Xt,It}return Re(wt,Kt),wt}(de),xe=function(){function Kt(){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 Kt.prototype.addEventListener=function(wt,Lt){this[wt].push(Lt)},Kt.prototype.removeEventListener=function(wt,Lt){var Xt=this[wt].indexOf(Lt);Xt>-1&&this[wt].splice(Xt,1)},Kt}(),re=function(){function Kt(wt){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Nt,this._isOpen=!1,this.undoRedoManager=new pe,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 xe,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Kt.instanceCounter++,this.styles=new St(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=wt,this.targetRoot=document.body,this.width=wt.clientWidth,this.height=wt.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Kt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ft,Ut,oe,Jt,fe,Se,Pe,ve,be,se,Gt,he,Ce]},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ft,Ut,oe,Jt,Se,Pe,ve]},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ft,Ut,oe,Jt,Pe]},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(wt){var Lt=this;this._availableMarkerTypes.splice(0),wt.forEach(function(Xt){if(typeof Xt=="string"){var ee=Lt.ALL_MARKER_TYPES.find(function(It){return It.typeName===Xt});ee!==void 0&&Lt._availableMarkerTypes.push(ee)}else Lt._availableMarkerTypes.push(Xt)})},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(wt){this._zoomLevel=wt,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Kt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),gt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Kt.prototype.show=function(){var wt=this;this.styles.styleSheetRoot===void 0&&bt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=bt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Lt){return Lt(new de(wt))})},Kt.prototype.render=function(){return ot(this,void 0,void 0,function(){var wt;return _t(this,function(Lt){switch(Lt.label){case 0:return this.setCurrentMarker(),(wt=new kt).naturalSize=this.renderAtNaturalSize,wt.imageType=this.renderImageType,wt.imageQuality=this.renderImageQuality,wt.markersOnly=this.renderMarkersOnly,wt.width=this.renderWidth,wt.height=this.renderHeight,[4,wt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Lt.sent(),[4,wt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Lt.sent()]}})})},Kt.prototype.close=function(wt){var Lt=this;if(wt===void 0&&(wt=!1),this.isOpen){var Xt=!1;wt||this.eventListeners.beforeclose.forEach(function(ee){var It=new de(Lt,!0);ee(It),It.defaultPrevented&&(Xt=!0)}),Xt||(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(ee){return ee(new de(Lt))}),this.detachEvents(),this._isOpen=!1)}},Kt.prototype.addMarkersToToolbar=function(){for(var wt,Lt=[],Xt=0;Xt<arguments.length;Xt++)Lt[Xt]=arguments[Xt];(wt=this._availableMarkerTypes).push.apply(wt,Lt)},Kt.prototype.addRenderEventListener=function(wt){this.addEventListener("render",function(Lt){wt(Lt.dataUrl,Lt.state)})},Kt.prototype.removeRenderEventListener=function(wt){},Kt.prototype.addCloseEventListener=function(wt){this.addEventListener("close",function(){wt()})},Kt.prototype.removeCloseEventListener=function(wt){},Kt.prototype.setupResizeObserver=function(){var wt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){wt.resize(wt.target.clientWidth,wt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return wt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Kt.prototype.onPopupTargetResize=function(){var wt=1*this.target.clientWidth/this.target.clientHeight,Lt=this.editorCanvas.clientWidth/wt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*wt:this.editorCanvas.clientWidth,Xt=Lt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/wt;this.resize(Lt,Xt)},Kt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Kt.prototype.resize=function(wt,Lt){this._isResizing=!0;var Xt=wt/this.imageWidth,ee=Lt/this.imageHeight;this.imageWidth=Math.round(wt),this.imageHeight=Math.round(Lt),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(Xt,ee),this._isResizing=!1},Kt.prototype.scaleMarkers=function(wt,Lt){var Xt,ee=this;this._currentMarker&&this._currentMarker instanceof Jt?this._currentMarker.scale(wt,Lt):(Xt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(It){It!==ee._currentMarker&&It.scale(wt,Lt)}),Xt!==void 0&&this.setCurrentMarker(Xt)},Kt.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"},Kt.prototype.setTopLeft=function(){var wt=this.editingTarget.getBoundingClientRect(),Lt=this.editorCanvas.getBoundingClientRect();this.left=wt.left-Lt.left,this.top=wt.top-Lt.top},Kt.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)},Kt.prototype.addDefs=function(){for(var wt,Lt=[],Xt=0;Xt<arguments.length;Xt++)Lt[Xt]=arguments[Xt];this.defs=vt.createDefs(),this.addDefsToImage(),(wt=this.defs).append.apply(wt,Lt)},Kt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Kt.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)},Kt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Kt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Kt.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)},Kt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Kt.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)},Kt.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var wt=document.createElement("a");wt.href="https://markerjs.com/",wt.target="_blank",wt.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',wt.title="Powered by marker.js",wt.style.display="grid",wt.style.alignItems="center",wt.style.justifyItems="center",wt.style.padding="3px",wt.style.width="20px",wt.style.height="20px",this.logoUI.appendChild(wt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Kt.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")},Kt.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"},Kt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Kt.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var wt=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=wt+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new xt(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 ft(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Kt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Kt.prototype.removeMarker=function(wt){this.markerImage.removeChild(wt.container),this.markers.indexOf(wt)>-1&&this.markers.splice(this.markers.indexOf(wt),1),wt.dispose()},Kt.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())},Kt.prototype.toolbarButtonClicked=function(wt,Lt){if(wt==="marker"&&Lt!==void 0)this.createNewMarker(Lt);else if(wt==="action")switch(Lt){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()}},Kt.prototype.deleteSelectedMarker=function(){var wt=this;if(this._currentMarker!==void 0){var Lt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ee){var It=new Ne(wt,wt._currentMarker,!0);ee(It),It.defaultPrevented&&(Lt=!0)}),!Lt){var Xt=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(ee){return ee(new Ne(wt,Xt))})}}},Kt.prototype.clear=function(){var wt=this,Lt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Rt){var Vt=new Ne(wt,void 0,!0);Rt(Vt),Vt.defaultPrevented&&(Lt=!0)}),!Lt)){this.setCurrentMarker();for(var Xt=function(Rt){var Vt=ee.markers[Rt];ee.setCurrentMarker(ee.markers[Rt]),ee._currentMarker.dispose(),ee.markerImage.removeChild(ee._currentMarker.container),ee.markers.splice(ee.markers.indexOf(ee._currentMarker),1),ee.eventListeners.markerdelete.forEach(function($t){return $t(new Ne(wt,Vt))})},ee=this,It=this.markers.length-1;It>=0;It--)Xt(It);this.addUndoStep()}},Object.defineProperty(Kt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Kt.prototype.showNotesEditor=function(){var wt;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(wt=this._currentMarker.notes)!==null&&wt!==void 0?wt:"",this.overlayContainer.appendChild(this.notesArea))},Kt.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)},Kt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Kt.prototype.addUndoStep=function(){var wt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Lt=this.getState(),Xt=this.undoRedoManager.getLastUndoStep();if(!Xt||Xt.width===Lt.width&&Xt.height===Lt.height){var ee=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Lt),ee<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(It){return It(new de(wt))})}else this.undoRedoManager.replaceLastUndoStep(Lt),this.eventListeners.statechange.forEach(function(It){return It(new de(wt))})}},Kt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Kt.prototype.undoStep=function(){var wt=this,Lt=this.undoRedoManager.undo();Lt!==void 0&&(this.restoreState(Lt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Xt){return Xt(new de(wt))}))},Kt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Kt.prototype.redoStep=function(){var wt=this,Lt=this.undoRedoManager.redo();Lt!==void 0&&(this.restoreState(Lt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Xt){return Xt(new de(wt))}))},Kt.prototype.stepZoom=function(){var wt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=wt<this.zoomSteps.length-1?this.zoomSteps[wt+1]:this.zoomSteps[0]},Kt.prototype.panTo=function(wt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-wt.x,top:this.prevPanPoint.y-wt.y}),this.prevPanPoint=wt},Kt.prototype.startRenderAndClose=function(){return ot(this,void 0,void 0,function(){var wt,Lt,Xt=this;return _t(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return wt=ee.sent(),Lt=this.getState(),this.eventListeners.render.forEach(function(It){return It(new ye(Xt,wt,Lt))}),this.close(!0),[2]}})})},Kt.prototype.getState=function(wt){wt===!0&&this.setCurrentMarker();var Lt={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Xt){return Lt.markers.push(Xt.getState())}),Lt},Kt.prototype.restoreState=function(wt){var Lt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);wt.markers.forEach(function(Xt){var ee=Lt._availableMarkerTypes.find(function(Rt){return Rt.typeName===Xt.typeName});if(ee!==void 0){var It=Lt.addNewMarker(ee);It.restoreState(Xt),Lt.markers.push(It)}}),wt.width&&wt.height&&(wt.width!==this.imageWidth||wt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/wt.width,this.imageHeight/wt.height),this.eventListeners.restorestate.forEach(function(Xt){return Xt(new de(Lt))})},Kt.prototype.addNewMarker=function(wt){var Lt=vt.createGroup();return this.markerImage.appendChild(Lt),new wt(Lt,this.overlayContainer,this.settings)},Kt.prototype.createNewMarker=function(wt){var Lt,Xt=this;(Lt=typeof wt=="string"?this._availableMarkerTypes.find(function(ee){return ee.typeName===wt}):wt)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Lt),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(Lt.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ee){return ee(new Ne(Xt,Xt._currentMarker))}))},Kt.prototype.markerCreated=function(wt){var Lt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(wt),this.setCurrentMarker(wt),wt instanceof Ut&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ut):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Xt){return Xt(new Ne(Lt,Lt._currentMarker))})},Kt.prototype.colorChanged=function(wt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=wt,this.settings.defaultStrokeColor=wt)},Kt.prototype.fillColorChanged=function(wt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=wt)},Kt.prototype.markerStateChanged=function(wt){var Lt=this;this.eventListeners.markerchange.forEach(function(Xt){return Xt(new Ne(Lt,wt))})},Kt.prototype.setCurrentMarker=function(wt){var Lt=this;this._currentMarker!==wt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Xt){return Xt(new Ne(Lt,Lt._currentMarker))})),this._currentMarker=wt,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(Xt){return Xt(new Ne(Lt,Lt._currentMarker))}))},Kt.prototype.onPointerDown=function(wt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||wt.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Lt=this.markers.find(function(Xt){return Xt.ownsTarget(wt.target)});Lt!==void 0?(this.setCurrentMarker(Lt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(wt.clientX,wt.clientY),wt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:wt.clientX,y:wt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(wt.clientX,wt.clientY))},Kt.prototype.onDblClick=function(wt){if(this._isFocused||this.focus(),this.mode==="select"){var Lt=this.markers.find(function(Xt){return Xt.ownsTarget(wt.target)});Lt!==void 0&&Lt!==this._currentMarker&&this.setCurrentMarker(Lt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(wt.clientX,wt.clientY),wt.target):this.setCurrentMarker()}},Kt.prototype.onPointerMove=function(wt){this.touchPoints!==1&&wt.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||wt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(wt.clientX,wt.clientY)):this.zoomLevel>1&&this.panTo({x:wt.clientX,y:wt.clientY}))},Kt.prototype.onPointerUp=function(wt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(wt.clientX,wt.clientY)),this.isDragging=!1,this.addUndoStep()},Kt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Kt.prototype.onKeyUp=function(wt){this._currentMarker===void 0||this.notesArea!==void 0||wt.key!=="Delete"&&wt.key!=="Backspace"||this.deleteSelectedMarker()},Kt.prototype.clientToLocalCoordinates=function(wt,Lt){var Xt=this.markerImage.getBoundingClientRect();return{x:(wt-Xt.left)/this.zoomLevel,y:(Lt-Xt.top)/this.zoomLevel}},Kt.prototype.onWindowResize=function(){this.positionUI()},Kt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var wt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=wt+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Kt.prototype.addLicenseKey=function(wt){gt.addKey(wt)},Kt.prototype.addEventListener=function(wt,Lt){this.eventListeners.addEventListener(wt,Lt)},Kt.prototype.removeEventListener=function(wt,Lt){this.eventListeners.removeEventListener(wt,Lt)},Kt.prototype.renderState=function(wt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(wt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Kt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Kt.prototype.focus=function(){var wt=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Lt){return Lt(new de(wt))}))},Kt.prototype.blur=function(){var wt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Lt){return Lt(new de(wt))}))},Kt.instanceCounter=0,Kt}()},63727:function(dn,fn,le){"use strict";le.d(fn,{s:function(){return ge},default:function(){return He}});var ae=le(14809),Re=le(20439),ot=le(95190),_t=le(50298),Bt=le(62646),vt=le(37463),gt=le(6551),kt=le(6089),bt=le(18929),St=le(59301),Tt=St.createContext({}),mt=Tt,xt=le(93664),ft=le(4635),z="__rc_cascader_search_mark__",tt=function(We,Ve,rn){var an=rn.label,ln=an===void 0?"":an;return Ve.some(function(Sn){return String(Sn[ln]).toLowerCase().includes(We.toLowerCase())})},at=function(We,Ve,rn,an){return Ve.map(function(ln){return ln[an.label]}).join(" / ")},it=function(We,Ve,rn,an,ln,Sn){var _n=ln.filter,Xn=_n===void 0?tt:_n,Yn=ln.render,Er=Yn===void 0?at:Yn,dr=ln.limit,Mr=dr===void 0?50:dr,Tr=ln.sort;return St.useMemo(function(){var Or=[];if(!We)return[];function Sr(hr,zr){var qt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;hr.forEach(function(jn){if(!(!Tr&&Mr!==!1&&Mr>0&&Or.length>=Mr)){var Jn=[].concat((0,ot.Z)(zr),[jn]),zn=jn[rn.children],Wn=qt||jn.disabled;if((!zn||zn.length===0||Sn)&&Xn(We,Jn,{label:rn.label})){var Kn;Or.push((0,Re.Z)((0,Re.Z)({},jn),{},(Kn={disabled:Wn},(0,ft.Z)(Kn,rn.label,Er(We,Jn,an,rn)),(0,ft.Z)(Kn,z,Jn),(0,ft.Z)(Kn,rn.children,void 0),Kn)))}zn&&Sr(jn[rn.children],Jn,Wn)}})}return Sr(Ve,[]),Tr&&Or.sort(function(hr,zr){return Tr(hr[z],zr[z],We,rn)}),Mr!==!1&&Mr>0?Or.slice(0,Mr):Or},[We,Ve,rn,an,Er,Sn,Xn,Tr,Mr])},lt=it,ut="__RC_CASCADER_SPLIT__",dt="SHOW_PARENT",Pt="SHOW_CHILD";function At(Ue){return Ue.join(ut)}function Dt(Ue){return Ue.map(At)}function Ft(Ue){return Ue.split(ut)}function Nt(Ue){var We=Ue||{},Ve=We.label,rn=We.value,an=We.children,ln=rn||"value";return{label:Ve||"label",value:ln,key:ln,children:an||"children"}}function jt(Ue,We){var Ve,rn;return(Ve=Ue.isLeaf)!==null&&Ve!==void 0?Ve:!((rn=Ue[We.children])!==null&&rn!==void 0&&rn.length)}function Gt(Ue){var We=Ue.parentElement;if(We){var Ve=Ue.offsetTop-We.offsetTop;Ve-We.scrollTop<0?We.scrollTo({top:Ve}):Ve+Ue.offsetHeight-We.scrollTop>We.offsetHeight&&We.scrollTo({top:Ve+Ue.offsetHeight-We.offsetHeight})}}function Wt(Ue,We){return Ue.map(function(Ve){var rn;return(rn=Ve[z])===null||rn===void 0?void 0:rn.map(function(an){return an[We.value]})})}function Jt(Ue){return Array.isArray(Ue)&&Array.isArray(Ue[0])}function Ut(Ue){return Ue?Jt(Ue)?Ue:(Ue.length===0?[]:[Ue]).map(function(We){return Array.isArray(We)?We:[We]}):[]}function Ht(Ue,We,Ve){var rn=new Set(Ue),an=We();return Ue.filter(function(ln){var Sn=an[ln],_n=Sn?Sn.parent:null,Xn=Sn?Sn.children:null;return Sn&&Sn.node.disabled?!0:Ve===Pt?!(Xn&&Xn.some(function(Yn){return Yn.key&&rn.has(Yn.key)})):!(_n&&!_n.node.disabled&&rn.has(_n.key))})}function oe(Ue,We,Ve){for(var rn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,an=We,ln=[],Sn=function(){var Yn,Er,dr,Mr=Ue[_n],Tr=(Yn=an)===null||Yn===void 0?void 0:Yn.findIndex(function(Sr){var hr=Sr[Ve.value];return rn?String(hr)===String(Mr):hr===Mr}),Or=Tr!==-1?(Er=an)===null||Er===void 0?void 0:Er[Tr]:null;ln.push({value:(dr=Or==null?void 0:Or[Ve.value])!==null&&dr!==void 0?dr:Mr,index:Tr,option:Or}),an=Or==null?void 0:Or[Ve.children]},_n=0;_n<Ue.length;_n+=1)Sn();return ln}var se=function(Ue,We,Ve,rn,an){return St.useMemo(function(){var ln=an||function(Sn){var _n=rn?Sn.slice(-1):Sn,Xn=" / ";return _n.every(function(Yn){return["string","number"].includes((0,xt.Z)(Yn))})?_n.join(Xn):_n.reduce(function(Yn,Er,dr){var Mr=St.isValidElement(Er)?St.cloneElement(Er,{key:dr}):Er;return dr===0?[Mr]:[].concat((0,ot.Z)(Yn),[Xn,Mr])},[])};return Ue.map(function(Sn){var _n,Xn=oe(Sn,We,Ve),Yn=ln(Xn.map(function(dr){var Mr,Tr=dr.option,Or=dr.value;return(Mr=Tr==null?void 0:Tr[Ve.label])!==null&&Mr!==void 0?Mr:Or}),Xn.map(function(dr){var Mr=dr.option;return Mr})),Er=At(Sn);return{label:Yn,value:Er,key:Er,valueCells:Sn,disabled:(_n=Xn[Xn.length-1])===null||_n===void 0||(_n=_n.option)===null||_n===void 0?void 0:_n.disabled}})},[Ue,We,Ve,an,rn])};function ce(Ue,We){return St.useCallback(function(Ve){var rn=[],an=[];return Ve.forEach(function(ln){var Sn=oe(ln,Ue,We);Sn.every(function(_n){return _n.option})?an.push(ln):rn.push(ln)}),[an,rn]},[Ue,We])}var Pe=le(34061),Yt=function(Ue,We){var Ve=St.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}}),rn=St.useCallback(function(){return Ve.current.options!==Ue&&(Ve.current.options=Ue,Ve.current.info=(0,Pe.I8)(Ue,{fieldNames:We,initWrapper:function(ln){return(0,Re.Z)((0,Re.Z)({},ln),{},{pathKeyEntities:{}})},processEntity:function(ln,Sn){var _n=ln.nodes.map(function(Xn){return Xn[We.value]}).join(ut);Sn.pathKeyEntities[_n]=ln,ln.key=_n}})),Ve.current.info.pathKeyEntities},[We,Ue]);return rn};function ne(Ue,We){var Ve=St.useMemo(function(){return We||[]},[We]),rn=Yt(Ve,Ue),an=St.useCallback(function(ln){var Sn=rn();return ln.map(function(_n){var Xn=Sn[_n].nodes;return Xn.map(function(Yn){return Yn[Ue.value]})})},[rn,Ue]);return[Ve,rn,an]}var ve=le(48736);function Se(Ue){return St.useMemo(function(){if(!Ue)return[!1,{}];var We={matchInputWidth:!0,limit:50};return Ue&&(0,xt.Z)(Ue)==="object"&&(We=(0,Re.Z)((0,Re.Z)({},We),Ue)),We.limit<=0&&(We.limit=!1),[!0,We]},[Ue])}var be=le(34643);function fe(Ue,We,Ve,rn,an,ln,Sn,_n){return function(Xn){if(!Ue)We(Xn);else{var Yn=At(Xn),Er=Dt(Ve),dr=Dt(rn),Mr=Er.includes(Yn),Tr=an.some(function(Wn){return At(Wn)===Yn}),Or=Ve,Sr=an;if(Tr&&!Mr)Sr=an.filter(function(Wn){return At(Wn)!==Yn});else{var hr=Mr?Er.filter(function(Wn){return Wn!==Yn}):[].concat((0,ot.Z)(Er),[Yn]),zr=ln(),qt;if(Mr){var jn=(0,be.S)(hr,{checked:!1,halfCheckedKeys:dr},zr);qt=jn.checkedKeys}else{var Jn=(0,be.S)(hr,!0,zr);qt=Jn.checkedKeys}var zn=Ht(qt,ln,_n);Or=Sn(zn)}We([].concat((0,ot.Z)(Sr),(0,ot.Z)(Or)))}}}function pe(Ue,We,Ve,rn,an){return St.useMemo(function(){var ln=an(We),Sn=(0,_t.Z)(ln,2),_n=Sn[0],Xn=Sn[1];if(!Ue||!We.length)return[_n,[],Xn];var Yn=Dt(_n),Er=Ve(),dr=(0,be.S)(Yn,!0,Er),Mr=dr.checkedKeys,Tr=dr.halfCheckedKeys;return[rn(Mr),rn(Tr),Xn]},[Ue,We,Ve,rn,an])}var he=le(92310),Ce=le.n(he),de=St.memo(function(Ue){var We=Ue.children;return We},function(Ue,We){return!We.open}),ye=de;function Ne(Ue){var We,Ve=Ue.prefixCls,rn=Ue.checked,an=Ue.halfChecked,ln=Ue.disabled,Sn=Ue.onClick,_n=Ue.disableCheckbox,Xn=St.useContext(mt),Yn=Xn.checkable,Er=typeof Yn!="boolean"?Yn:null;return St.createElement("span",{className:Ce()("".concat(Ve),(We={},(0,ft.Z)(We,"".concat(Ve,"-checked"),rn),(0,ft.Z)(We,"".concat(Ve,"-indeterminate"),!rn&&an),(0,ft.Z)(We,"".concat(Ve,"-disabled"),ln||_n),We)),onClick:Sn},Er)}var xe="__cascader_fix_label__";function re(Ue){var We=Ue.prefixCls,Ve=Ue.multiple,rn=Ue.options,an=Ue.activeValue,ln=Ue.prevValuePath,Sn=Ue.onToggleOpen,_n=Ue.onSelect,Xn=Ue.onActive,Yn=Ue.checkedSet,Er=Ue.halfCheckedSet,dr=Ue.loadingKeys,Mr=Ue.isSelectable,Tr=Ue.disabled,Or="".concat(We,"-menu"),Sr="".concat(We,"-menu-item"),hr=St.useContext(mt),zr=hr.fieldNames,qt=hr.changeOnSelect,jn=hr.expandTrigger,Jn=hr.expandIcon,zn=hr.loadingIcon,Wn=hr.dropdownMenuColumnStyle,Kn=hr.optionRender,ir=jn==="hover",Ar=function($e){return Tr||$e},sn=St.useMemo(function(){return rn.map(function(qe){var $e,un=qe.disabled,or=qe.disableCheckbox,Qn=qe[z],pr=($e=qe[xe])!==null&&$e!==void 0?$e:qe[zr.label],xn=qe[zr.value],Rn=jt(qe,zr),vr=Qn?Qn.map(function(Ln){return Ln[zr.value]}):[].concat((0,ot.Z)(ln),[xn]),Nr=At(vr),Nn=dr.includes(Nr),Oe=Yn.has(Nr),Ke=Er.has(Nr);return{disabled:un,label:pr,value:xn,isLeaf:Rn,isLoading:Nn,checked:Oe,halfChecked:Ke,option:qe,disableCheckbox:or,fullPath:vr,fullPathKey:Nr}})},[rn,Yn,zr,Er,dr,ln]);return St.createElement("ul",{className:Or,role:"menu"},sn.map(function(qe){var $e,un=qe.disabled,or=qe.label,Qn=qe.value,pr=qe.isLeaf,xn=qe.isLoading,Rn=qe.checked,vr=qe.halfChecked,Nr=qe.option,Nn=qe.fullPath,Oe=qe.fullPathKey,Ke=qe.disableCheckbox,Ln=function(){if(!Ar(un)){var kn=(0,ot.Z)(Nn);ir&&pr&&kn.pop(),Xn(kn)}},An=function(){Mr(Nr)&&!Ar(un)&&_n(Nn,pr)},en;return typeof Nr.title=="string"?en=Nr.title:typeof or=="string"&&(en=or),St.createElement("li",{key:Oe,className:Ce()(Sr,($e={},(0,ft.Z)($e,"".concat(Sr,"-expand"),!pr),(0,ft.Z)($e,"".concat(Sr,"-active"),an===Qn||an===Oe),(0,ft.Z)($e,"".concat(Sr,"-disabled"),Ar(un)),(0,ft.Z)($e,"".concat(Sr,"-loading"),xn),$e)),style:Wn,role:"menuitemcheckbox",title:en,"aria-checked":Rn,"data-path-key":Oe,onClick:function(){Ln(),!Ke&&(!Ve||pr)&&An()},onDoubleClick:function(){qt&&Sn(!1)},onMouseEnter:function(){ir&&Ln()},onMouseDown:function(kn){kn.preventDefault()}},Ve&&St.createElement(Ne,{prefixCls:"".concat(We,"-checkbox"),checked:Rn,halfChecked:vr,disabled:Ar(un)||Ke,disableCheckbox:Ke,onClick:function(kn){Ke||(kn.stopPropagation(),An())}}),St.createElement("div",{className:"".concat(Sr,"-content")},Kn?Kn(Nr):or),!xn&&Jn&&!pr&&St.createElement("div",{className:"".concat(Sr,"-expand-icon")},Jn),xn&&zn&&St.createElement("div",{className:"".concat(Sr,"-loading-icon")},zn))}))}var Kt=function(We,Ve){var rn=St.useContext(mt),an=rn.values,ln=an[0],Sn=St.useState([]),_n=(0,_t.Z)(Sn,2),Xn=_n[0],Yn=_n[1];return St.useEffect(function(){We||Yn(ln||[])},[Ve,ln]),[Xn,Yn]},wt=Kt,Lt=le(10228),Xt=function(Ue,We,Ve,rn,an,ln,Sn){var _n=Sn.direction,Xn=Sn.searchValue,Yn=Sn.toggleOpen,Er=Sn.open,dr=_n==="rtl",Mr=St.useMemo(function(){for(var Wn=-1,Kn=We,ir=[],Ar=[],sn=rn.length,qe=Wt(We,Ve),$e=function(xn){var Rn=Kn.findIndex(function(vr,Nr){return(qe[Nr]?At(qe[Nr]):vr[Ve.value])===rn[xn]});if(Rn===-1)return 1;Wn=Rn,ir.push(Wn),Ar.push(rn[xn]),Kn=Kn[Wn][Ve.children]},un=0;un<sn&&Kn&&!$e(un);un+=1);for(var or=We,Qn=0;Qn<ir.length-1;Qn+=1)or=or[ir[Qn]][Ve.children];return[Ar,Wn,or,qe]},[rn,Ve,We]),Tr=(0,_t.Z)(Mr,4),Or=Tr[0],Sr=Tr[1],hr=Tr[2],zr=Tr[3],qt=function(Kn){an(Kn)},jn=function(Kn){var ir=hr.length,Ar=Sr;Ar===-1&&Kn<0&&(Ar=ir);for(var sn=0;sn<ir;sn+=1){Ar=(Ar+Kn+ir)%ir;var qe=hr[Ar];if(qe&&!qe.disabled){var $e=Or.slice(0,-1).concat(zr[Ar]?At(zr[Ar]):qe[Ve.value]);qt($e);return}}},Jn=function(){if(Or.length>1){var Kn=Or.slice(0,-1);qt(Kn)}else Yn(!1)},zn=function(){var Kn,ir=((Kn=hr[Sr])===null||Kn===void 0?void 0:Kn[Ve.children])||[],Ar=ir.find(function(qe){return!qe.disabled});if(Ar){var sn=[].concat((0,ot.Z)(Or),[Ar[Ve.value]]);qt(sn)}};St.useImperativeHandle(Ue,function(){return{onKeyDown:function(Kn){var ir=Kn.which;switch(ir){case Lt.Z.UP:case Lt.Z.DOWN:{var Ar=0;ir===Lt.Z.UP?Ar=-1:ir===Lt.Z.DOWN&&(Ar=1),Ar!==0&&jn(Ar);break}case Lt.Z.LEFT:{if(Xn)break;dr?zn():Jn();break}case Lt.Z.RIGHT:{if(Xn)break;dr?Jn():zn();break}case Lt.Z.BACKSPACE:{Xn||Jn();break}case Lt.Z.ENTER:{if(Or.length){var sn=hr[Sr],qe=(sn==null?void 0:sn[z])||[];qe.length?ln(qe.map(function($e){return $e[Ve.value]}),qe[qe.length-1]):ln(Or,hr[Sr])}break}case Lt.Z.ESC:Yn(!1),Er&&Kn.stopPropagation()}},onKeyUp:function(){}}})},ee=St.forwardRef(function(Ue,We){var Ve,rn,an,ln=Ue.prefixCls,Sn=Ue.multiple,_n=Ue.searchValue,Xn=Ue.toggleOpen,Yn=Ue.notFoundContent,Er=Ue.direction,dr=Ue.open,Mr=Ue.disabled,Tr=St.useRef(null),Or=Er==="rtl",Sr=St.useContext(mt),hr=Sr.options,zr=Sr.values,qt=Sr.halfValues,jn=Sr.fieldNames,Jn=Sr.changeOnSelect,zn=Sr.onSelect,Wn=Sr.searchOptions,Kn=Sr.dropdownPrefixCls,ir=Sr.loadData,Ar=Sr.expandTrigger,sn=Kn||ln,qe=St.useState([]),$e=(0,_t.Z)(qe,2),un=$e[0],or=$e[1],Qn=function(cr){if(!(!ir||_n)){var lr=oe(cr,hr,jn),yn=lr.map(function(Yr){var fi=Yr.option;return fi}),In=yn[yn.length-1];if(In&&!jt(In,jn)){var Gr=At(cr);or(function(Yr){return[].concat((0,ot.Z)(Yr),[Gr])}),ir(yn)}}};St.useEffect(function(){un.length&&un.forEach(function(Un){var cr=Ft(Un),lr=oe(cr,hr,jn,!0).map(function(In){var Gr=In.option;return Gr}),yn=lr[lr.length-1];(!yn||yn[jn.children]||jt(yn,jn))&&or(function(In){return In.filter(function(Gr){return Gr!==Un})})})},[hr,un,jn]);var pr=St.useMemo(function(){return new Set(Dt(zr))},[zr]),xn=St.useMemo(function(){return new Set(Dt(qt))},[qt]),Rn=wt(Sn,dr),vr=(0,_t.Z)(Rn,2),Nr=vr[0],Nn=vr[1],Oe=function(cr){Nn(cr),Qn(cr)},Ke=function(cr){if(Mr)return!1;var lr=cr.disabled,yn=jt(cr,jn);return!lr&&(yn||Jn||Sn)},Ln=function(cr,lr){var yn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;zn(cr),!Sn&&(lr||Jn&&(Ar==="hover"||yn))&&Xn(!1)},An=St.useMemo(function(){return _n?Wn:hr},[_n,Wn,hr]),en=St.useMemo(function(){for(var Un=[{options:An}],cr=An,lr=Wt(cr,jn),yn=function(){var Yr=Nr[In],fi=cr.find(function(tr,gr){return(lr[gr]?At(lr[gr]):tr[jn.value])===Yr}),tn=fi==null?void 0:fi[jn.children];if(!(tn!=null&&tn.length))return 1;cr=tn,Un.push({options:tn})},In=0;In<Nr.length&&!yn();In+=1);return Un},[An,Nr,jn]),Tn=function(cr,lr){Ke(lr)&&Ln(cr,jt(lr,jn),!0)};Xt(We,An,jn,Nr,Oe,Tn,{direction:Er,searchValue:_n,toggleOpen:Xn,open:dr}),St.useEffect(function(){if(!_n)for(var Un=0;Un<Nr.length;Un+=1){var cr,lr=Nr.slice(0,Un+1),yn=At(lr),In=(cr=Tr.current)===null||cr===void 0?void 0:cr.querySelector('li[data-path-key="'.concat(yn.replace(/\\{0,2}"/g,'\\"'),'"]'));In&&Gt(In)}},[Nr,_n]);var kn=!((Ve=en[0])!==null&&Ve!==void 0&&(Ve=Ve.options)!==null&&Ve!==void 0&&Ve.length),On=[(rn={},(0,ft.Z)(rn,jn.value,"__EMPTY__"),(0,ft.Z)(rn,xe,Yn),(0,ft.Z)(rn,"disabled",!0),rn)],er=(0,Re.Z)((0,Re.Z)({},Ue),{},{multiple:!kn&&Sn,onSelect:Ln,onActive:Oe,onToggleOpen:Xn,checkedSet:pr,halfCheckedSet:xn,loadingKeys:un,isSelectable:Ke}),Fn=kn?[{options:On}]:en,Bn=Fn.map(function(Un,cr){var lr=Nr.slice(0,cr),yn=Nr[cr];return St.createElement(re,(0,ae.Z)({key:cr},er,{prefixCls:sn,options:Un.options,prevValuePath:lr,activeValue:yn}))});return St.createElement(ye,{open:dr},St.createElement("div",{className:Ce()("".concat(sn,"-menus"),(an={},(0,ft.Z)(an,"".concat(sn,"-menu-empty"),kn),(0,ft.Z)(an,"".concat(sn,"-rtl"),Or),an)),ref:Tr},Bn))}),It=ee,Rt=St.forwardRef(function(Ue,We){var Ve=(0,vt.lk)();return St.createElement(It,(0,ae.Z)({},Ue,Ve,{ref:We}))}),Vt=Rt,$t=le(70425);function ue(){}function ge(Ue){var We,Ve=Ue,rn=Ve.prefixCls,an=rn===void 0?"rc-cascader":rn,ln=Ve.style,Sn=Ve.className,_n=Ve.options,Xn=Ve.checkable,Yn=Ve.defaultValue,Er=Ve.value,dr=Ve.fieldNames,Mr=Ve.changeOnSelect,Tr=Ve.onChange,Or=Ve.showCheckedStrategy,Sr=Ve.loadData,hr=Ve.expandTrigger,zr=Ve.expandIcon,qt=zr===void 0?">":zr,jn=Ve.loadingIcon,Jn=Ve.direction,zn=Ve.notFoundContent,Wn=zn===void 0?"Not Found":zn,Kn=Ve.disabled,ir=!!Xn,Ar=(0,$t.C8)(Yn,{value:Er,postState:Ut}),sn=(0,_t.Z)(Ar,2),qe=sn[0],$e=sn[1],un=St.useMemo(function(){return Nt(dr)},[JSON.stringify(dr)]),or=ne(un,_n),Qn=(0,_t.Z)(or,3),pr=Qn[0],xn=Qn[1],Rn=Qn[2],vr=ce(pr,un),Nr=pe(ir,qe,xn,Rn,vr),Nn=(0,_t.Z)(Nr,3),Oe=Nn[0],Ke=Nn[1],Ln=Nn[2],An=(0,$t.zX)(function(Fn){if($e(Fn),Tr){var Bn=Ut(Fn),Un=Bn.map(function(yn){return oe(yn,pr,un).map(function(In){return In.option})}),cr=ir?Bn:Bn[0],lr=ir?Un:Un[0];Tr(cr,lr)}}),en=fe(ir,An,Oe,Ke,Ln,xn,Rn,Or),Tn=(0,$t.zX)(function(Fn){en(Fn)}),kn=St.useMemo(function(){return{options:pr,fieldNames:un,values:Oe,halfValues:Ke,changeOnSelect:Mr,onSelect:Tn,checkable:Xn,searchOptions:[],dropdownPrefixCls:void 0,loadData:Sr,expandTrigger:hr,expandIcon:qt,loadingIcon:jn,dropdownMenuColumnStyle:void 0}},[pr,un,Oe,Ke,Mr,Tn,Xn,Sr,hr,qt,jn]),On="".concat(an,"-panel"),er=!pr.length;return St.createElement(mt.Provider,{value:kn},St.createElement("div",{className:Ce()(On,(We={},(0,ft.Z)(We,"".concat(On,"-rtl"),Jn==="rtl"),(0,ft.Z)(We,"".concat(On,"-empty"),er),We),Sn),style:ln},er?Wn:St.createElement(It,{prefixCls:an,searchValue:"",multiple:ir,toggleOpen:ue,open:!0,direction:Jn,disabled:Kn})))}function Me(Ue){var We=Ue.onPopupVisibleChange,Ve=Ue.popupVisible,rn=Ue.popupClassName,an=Ue.popupPlacement;warning(!We,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(Ve===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(rn===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(an===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Ae(Ue,We){if(Ue){var Ve=function rn(an){for(var ln=0;ln<an.length;ln++){var Sn=an[ln];if(Sn[We==null?void 0:We.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Sn[We==null?void 0:We.children])&&rn(Sn[We==null?void 0:We.children]))return!0}};Ve(Ue)}}var Be=null,Ze=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","dropdownStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy","optionRender"],Ye=St.forwardRef(function(Ue,We){var Ve=Ue.id,rn=Ue.prefixCls,an=rn===void 0?"rc-cascader":rn,ln=Ue.fieldNames,Sn=Ue.defaultValue,_n=Ue.value,Xn=Ue.changeOnSelect,Yn=Ue.onChange,Er=Ue.displayRender,dr=Ue.checkable,Mr=Ue.autoClearSearchValue,Tr=Mr===void 0?!0:Mr,Or=Ue.searchValue,Sr=Ue.onSearch,hr=Ue.showSearch,zr=Ue.expandTrigger,qt=Ue.options,jn=Ue.dropdownPrefixCls,Jn=Ue.loadData,zn=Ue.popupVisible,Wn=Ue.open,Kn=Ue.popupClassName,ir=Ue.dropdownClassName,Ar=Ue.dropdownMenuColumnStyle,sn=Ue.dropdownStyle,qe=Ue.popupPlacement,$e=Ue.placement,un=Ue.onDropdownVisibleChange,or=Ue.onPopupVisibleChange,Qn=Ue.expandIcon,pr=Qn===void 0?">":Qn,xn=Ue.loadingIcon,Rn=Ue.children,vr=Ue.dropdownMatchSelectWidth,Nr=vr===void 0?!1:vr,Nn=Ue.showCheckedStrategy,Oe=Nn===void 0?dt:Nn,Ke=Ue.optionRender,Ln=(0,Bt.Z)(Ue,Ze),An=(0,gt.ZP)(Ve),en=!!dr,Tn=(0,bt.Z)(Sn,{value:_n,postState:Ut}),kn=(0,_t.Z)(Tn,2),On=kn[0],er=kn[1],Fn=St.useMemo(function(){return Nt(ln)},[JSON.stringify(ln)]),Bn=ne(Fn,qt),Un=(0,_t.Z)(Bn,3),cr=Un[0],lr=Un[1],yn=Un[2],In=(0,bt.Z)("",{value:Or,postState:function(Ji){return Ji||""}}),Gr=(0,_t.Z)(In,2),Yr=Gr[0],fi=Gr[1],tn=function(Ji,Zi){fi(Ji),Zi.source!=="blur"&&Sr&&Sr(Ji)},tr=Se(hr),gr=(0,_t.Z)(tr,2),Hn=gr[0],Zr=gr[1],Ir=lt(Yr,cr,Fn,jn||an,Zr,Xn||en),Hr=ce(cr,Fn),Qr=pe(en,On,lr,yn,Hr),ei=(0,_t.Z)(Qr,3),hi=ei[0],mn=ei[1],vi=ei[2],gn=St.useMemo(function(){var so=Dt(hi),Ji=Ht(so,lr,Oe);return[].concat((0,ot.Z)(vi),(0,ot.Z)(yn(Ji)))},[hi,lr,yn,vi,Oe]),oi=se(gn,cr,Fn,en,Er),Gi=(0,kt.Z)(function(so){if(er(so),Yn){var Ji=Ut(so),Zi=Ji.map(function(wr){return oe(wr,cr,Fn).map(function(Jr){return Jr.option})}),pi=en?Ji:Ji[0],sr=en?Zi:Zi[0];Yn(pi,sr)}}),mi=fe(en,Gi,hi,mn,vi,lr,yn,Oe),Bi=(0,kt.Z)(function(so){(!en||Tr)&&fi(""),mi(so)}),ii=function(Ji,Zi){if(Zi.type==="clear"){Gi([]);return}var pi=Zi.values[0],sr=pi.valueCells;Bi(sr)},Rr=Wn!==void 0?Wn:zn,wi=ir||Kn,Eo=$e||qe,Oi=function(Ji){un==null||un(Ji),or==null||or(Ji)},$n=St.useMemo(function(){return{options:cr,fieldNames:Fn,values:hi,halfValues:mn,changeOnSelect:Xn,onSelect:Bi,checkable:dr,searchOptions:Ir,dropdownPrefixCls:jn,loadData:Jn,expandTrigger:zr,expandIcon:pr,loadingIcon:xn,dropdownMenuColumnStyle:Ar,optionRender:Ke}},[cr,Fn,hi,mn,Xn,Bi,dr,Ir,jn,Jn,zr,pr,xn,Ar,Ke]),Le=!(Yr?Ir:cr).length,Ti=Yr&&Zr.matchInputWidth||Le?{}:{minWidth:"auto"};return St.createElement(mt.Provider,{value:$n},St.createElement(vt.Ac,(0,ae.Z)({},Ln,{ref:We,id:An,prefixCls:an,autoClearSearchValue:Tr,dropdownMatchSelectWidth:Nr,dropdownStyle:(0,Re.Z)((0,Re.Z)({},Ti),sn),displayValues:oi,onDisplayValuesChange:ii,mode:en?"multiple":void 0,searchValue:Yr,onSearch:tn,showSearch:Hn,OptionList:Vt,emptyOptions:Le,open:Rr,dropdownClassName:wi,placement:Eo,onDropdownVisibleChange:Oi,getRawInputElement:function(){return Rn}})))});Ye.SHOW_PARENT=dt,Ye.SHOW_CHILD=Pt,Ye.Panel=ge;var Qe=Ye,He=Qe},98535:function(dn,fn,le){"use strict";le.r(fn),le.d(fn,{Panel:function(){return Ut},default:function(){return Jt}});var ae=le(14809),Re=le(95190),ot=le(50298),_t=le(93664),Bt=le(92310),vt=le.n(Bt),gt=le(18929),kt=le(48736),bt=le(59301),St=le(62646),Tt=le(11592),mt=le(20439),xt=le(4635),ft=le(77900),z=le(10228),tt=bt.forwardRef(function(Ht,oe){var se=Ht.prefixCls,ce=Ht.forceRender,Pe=Ht.className,Yt=Ht.style,ne=Ht.children,ve=Ht.isActive,Se=Ht.role,be=Ht.classNames,fe=Ht.styles,pe=bt.useState(ve||ce),he=(0,ot.Z)(pe,2),Ce=he[0],de=he[1];return bt.useEffect(function(){(ce||ve)&&de(!0)},[ce,ve]),Ce?bt.createElement("div",{ref:oe,className:vt()("".concat(se,"-content"),(0,xt.Z)((0,xt.Z)({},"".concat(se,"-content-active"),ve),"".concat(se,"-content-inactive"),!ve),Pe),style:Yt,role:Se},bt.createElement("div",{className:vt()("".concat(se,"-content-box"),be==null?void 0:be.body),style:fe==null?void 0:fe.body},ne)):null});tt.displayName="PanelContent";var at=tt,it=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],lt=bt.forwardRef(function(Ht,oe){var se=Ht.showArrow,ce=se===void 0?!0:se,Pe=Ht.headerClass,Yt=Ht.isActive,ne=Ht.onItemClick,ve=Ht.forceRender,Se=Ht.className,be=Ht.classNames,fe=be===void 0?{}:be,pe=Ht.styles,he=pe===void 0?{}:pe,Ce=Ht.prefixCls,de=Ht.collapsible,ye=Ht.accordion,Ne=Ht.panelKey,xe=Ht.extra,re=Ht.header,Kt=Ht.expandIcon,wt=Ht.openMotion,Lt=Ht.destroyInactivePanel,Xt=Ht.children,ee=(0,St.Z)(Ht,it),It=de==="disabled",Rt=xe!=null&&typeof xe!="boolean",Vt=(0,xt.Z)((0,xt.Z)((0,xt.Z)({onClick:function(){ne==null||ne(Ne)},onKeyDown:function(Ze){(Ze.key==="Enter"||Ze.keyCode===z.Z.ENTER||Ze.which===z.Z.ENTER)&&(ne==null||ne(Ne))},role:ye?"tab":"button"},"aria-expanded",Yt),"aria-disabled",It),"tabIndex",It?-1:0),$t=typeof Kt=="function"?Kt(Ht):bt.createElement("i",{className:"arrow"}),ue=$t&&bt.createElement("div",(0,ae.Z)({className:"".concat(Ce,"-expand-icon")},["header","icon"].includes(de)?Vt:{}),$t),ge=vt()("".concat(Ce,"-item"),(0,xt.Z)((0,xt.Z)({},"".concat(Ce,"-item-active"),Yt),"".concat(Ce,"-item-disabled"),It),Se),Me=vt()(Pe,"".concat(Ce,"-header"),(0,xt.Z)({},"".concat(Ce,"-collapsible-").concat(de),!!de),fe.header),Ae=(0,mt.Z)({className:Me,style:he.header},["header","icon"].includes(de)?{}:Vt);return bt.createElement("div",(0,ae.Z)({},ee,{ref:oe,className:ge}),bt.createElement("div",Ae,ce&&ue,bt.createElement("span",(0,ae.Z)({className:"".concat(Ce,"-header-text")},de==="header"?Vt:{}),re),Rt&&bt.createElement("div",{className:"".concat(Ce,"-extra")},xe)),bt.createElement(ft.default,(0,ae.Z)({visible:Yt,leavedClassName:"".concat(Ce,"-content-hidden")},wt,{forceRender:ve,removeOnLeave:Lt}),function(Be,Ze){var Ye=Be.className,Qe=Be.style;return bt.createElement(at,{ref:Ze,prefixCls:Ce,className:Ye,classNames:fe,style:Qe,styles:he,isActive:Yt,forceRender:ve,role:ye?"tabpanel":void 0},Xt)}))}),ut=lt,dt=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Pt=function(oe,se){var ce=se.prefixCls,Pe=se.accordion,Yt=se.collapsible,ne=se.destroyInactivePanel,ve=se.onItemClick,Se=se.activeKey,be=se.openMotion,fe=se.expandIcon;return oe.map(function(pe,he){var Ce=pe.children,de=pe.label,ye=pe.key,Ne=pe.collapsible,xe=pe.onItemClick,re=pe.destroyInactivePanel,Kt=(0,St.Z)(pe,dt),wt=String(ye!=null?ye:he),Lt=Ne!=null?Ne:Yt,Xt=re!=null?re:ne,ee=function(Vt){Lt!=="disabled"&&(ve(Vt),xe==null||xe(Vt))},It=!1;return Pe?It=Se[0]===wt:It=Se.indexOf(wt)>-1,bt.createElement(ut,(0,ae.Z)({},Kt,{prefixCls:ce,key:wt,panelKey:wt,isActive:It,accordion:Pe,openMotion:be,expandIcon:fe,header:de,collapsible:Lt,onItemClick:ee,destroyInactivePanel:Xt}),Ce)})},At=function(oe,se,ce){if(!oe)return null;var Pe=ce.prefixCls,Yt=ce.accordion,ne=ce.collapsible,ve=ce.destroyInactivePanel,Se=ce.onItemClick,be=ce.activeKey,fe=ce.openMotion,pe=ce.expandIcon,he=oe.key||String(se),Ce=oe.props,de=Ce.header,ye=Ce.headerClass,Ne=Ce.destroyInactivePanel,xe=Ce.collapsible,re=Ce.onItemClick,Kt=!1;Yt?Kt=be[0]===he:Kt=be.indexOf(he)>-1;var wt=xe!=null?xe:ne,Lt=function(It){wt!=="disabled"&&(Se(It),re==null||re(It))},Xt={key:he,panelKey:he,header:de,headerClass:ye,isActive:Kt,prefixCls:Pe,destroyInactivePanel:Ne!=null?Ne:ve,openMotion:fe,accordion:Yt,children:oe.props.children,onItemClick:Lt,expandIcon:pe,collapsible:wt};return typeof oe.type=="string"?oe:(Object.keys(Xt).forEach(function(ee){typeof Xt[ee]=="undefined"&&delete Xt[ee]}),bt.cloneElement(oe,Xt))};function Dt(Ht,oe,se){return Array.isArray(Ht)?Pt(Ht,se):(0,Tt.Z)(oe).map(function(ce,Pe){return At(ce,Pe,se)})}var Ft=Dt,Nt=le(26112);function jt(Ht){var oe=Ht;if(!Array.isArray(oe)){var se=(0,_t.Z)(oe);oe=se==="number"||se==="string"?[oe]:[]}return oe.map(function(ce){return String(ce)})}var Gt=bt.forwardRef(function(Ht,oe){var se=Ht.prefixCls,ce=se===void 0?"rc-collapse":se,Pe=Ht.destroyInactivePanel,Yt=Pe===void 0?!1:Pe,ne=Ht.style,ve=Ht.accordion,Se=Ht.className,be=Ht.children,fe=Ht.collapsible,pe=Ht.openMotion,he=Ht.expandIcon,Ce=Ht.activeKey,de=Ht.defaultActiveKey,ye=Ht.onChange,Ne=Ht.items,xe=vt()(ce,Se),re=(0,gt.Z)([],{value:Ce,onChange:function(Rt){return ye==null?void 0:ye(Rt)},defaultValue:de,postState:jt}),Kt=(0,ot.Z)(re,2),wt=Kt[0],Lt=Kt[1],Xt=function(Rt){return Lt(function(){if(ve)return wt[0]===Rt?[]:[Rt];var Vt=wt.indexOf(Rt),$t=Vt>-1;return $t?wt.filter(function(ue){return ue!==Rt}):[].concat((0,Re.Z)(wt),[Rt])})};(0,kt.ZP)(!be,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var ee=Ft(Ne,be,{prefixCls:ce,accordion:ve,openMotion:pe,expandIcon:he,collapsible:fe,destroyInactivePanel:Yt,onItemClick:Xt,activeKey:wt});return bt.createElement("div",(0,ae.Z)({ref:oe,className:xe,style:ne,role:ve?"tablist":void 0},(0,Nt.Z)(Ht,{aria:!0,data:!0})),ee)}),Wt=Object.assign(Gt,{Panel:ut}),Jt=Wt,Ut=Wt.Panel},66042:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return Jt}});var ae=le(20439),Re=le(50298),ot=le(43403),_t=le(34280),Bt=le(59301),vt=Bt.createContext(null),gt=Bt.createContext({}),kt=vt,bt=le(4635),St=le(14809),Tt=le(92310),mt=le.n(Tt),xt=le(77900),ft=le(10228),z=le(26112),tt=le(62646),at=le(8654),it=["prefixCls","className","containerRef"],lt=function(Ht){var oe=Ht.prefixCls,se=Ht.className,ce=Ht.containerRef,Pe=(0,tt.Z)(Ht,it),Yt=Bt.useContext(gt),ne=Yt.panel,ve=(0,at.x1)(ne,ce);return Bt.createElement("div",(0,St.Z)({className:mt()("".concat(oe,"-content"),se),role:"dialog",ref:ve},(0,z.Z)(Ht,{aria:!0}),{"aria-modal":"true"},Pe))},ut=lt,dt=le(48736);function Pt(Ut){return typeof Ut=="string"&&String(Number(Ut))===Ut?((0,dt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ut)):Ut}function At(Ut){warning(!("wrapperClassName"in Ut),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ut.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Dt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Ft(Ut,Ht){var oe,se,ce,Pe=Ut.prefixCls,Yt=Ut.open,ne=Ut.placement,ve=Ut.inline,Se=Ut.push,be=Ut.forceRender,fe=Ut.autoFocus,pe=Ut.keyboard,he=Ut.classNames,Ce=Ut.rootClassName,de=Ut.rootStyle,ye=Ut.zIndex,Ne=Ut.className,xe=Ut.id,re=Ut.style,Kt=Ut.motion,wt=Ut.width,Lt=Ut.height,Xt=Ut.children,ee=Ut.mask,It=Ut.maskClosable,Rt=Ut.maskMotion,Vt=Ut.maskClassName,$t=Ut.maskStyle,ue=Ut.afterOpenChange,ge=Ut.onClose,Me=Ut.onMouseEnter,Ae=Ut.onMouseOver,Be=Ut.onMouseLeave,Ze=Ut.onClick,Ye=Ut.onKeyDown,Qe=Ut.onKeyUp,He=Ut.styles,Ue=Ut.drawerRender,We=Bt.useRef(),Ve=Bt.useRef(),rn=Bt.useRef();Bt.useImperativeHandle(Ht,function(){return We.current});var an=function(Jn){var zn=Jn.keyCode,Wn=Jn.shiftKey;switch(zn){case ft.Z.TAB:{if(zn===ft.Z.TAB){if(!Wn&&document.activeElement===rn.current){var Kn;(Kn=Ve.current)===null||Kn===void 0||Kn.focus({preventScroll:!0})}else if(Wn&&document.activeElement===Ve.current){var ir;(ir=rn.current)===null||ir===void 0||ir.focus({preventScroll:!0})}}break}case ft.Z.ESC:{ge&&pe&&(Jn.stopPropagation(),ge(Jn));break}}};Bt.useEffect(function(){if(Yt&&fe){var jn;(jn=We.current)===null||jn===void 0||jn.focus({preventScroll:!0})}},[Yt]);var ln=Bt.useState(!1),Sn=(0,Re.Z)(ln,2),_n=Sn[0],Xn=Sn[1],Yn=Bt.useContext(kt),Er;typeof Se=="boolean"?Er=Se?{}:{distance:0}:Er=Se||{};var dr=(oe=(se=(ce=Er)===null||ce===void 0?void 0:ce.distance)!==null&&se!==void 0?se:Yn==null?void 0:Yn.pushDistance)!==null&&oe!==void 0?oe:180,Mr=Bt.useMemo(function(){return{pushDistance:dr,push:function(){Xn(!0)},pull:function(){Xn(!1)}}},[dr]);Bt.useEffect(function(){if(Yt){var jn;Yn==null||(jn=Yn.push)===null||jn===void 0||jn.call(Yn)}else{var Jn;Yn==null||(Jn=Yn.pull)===null||Jn===void 0||Jn.call(Yn)}},[Yt]),Bt.useEffect(function(){return function(){var jn;Yn==null||(jn=Yn.pull)===null||jn===void 0||jn.call(Yn)}},[]);var Tr=ee&&Bt.createElement(xt.default,(0,St.Z)({key:"mask"},Rt,{visible:Yt}),function(jn,Jn){var zn=jn.className,Wn=jn.style;return Bt.createElement("div",{className:mt()("".concat(Pe,"-mask"),zn,he==null?void 0:he.mask,Vt),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},Wn),$t),He==null?void 0:He.mask),onClick:It&&Yt?ge:void 0,ref:Jn})}),Or=typeof Kt=="function"?Kt(ne):Kt,Sr={};if(_n&&dr)switch(ne){case"top":Sr.transform="translateY(".concat(dr,"px)");break;case"bottom":Sr.transform="translateY(".concat(-dr,"px)");break;case"left":Sr.transform="translateX(".concat(dr,"px)");break;default:Sr.transform="translateX(".concat(-dr,"px)");break}ne==="left"||ne==="right"?Sr.width=Pt(wt):Sr.height=Pt(Lt);var hr={onMouseEnter:Me,onMouseOver:Ae,onMouseLeave:Be,onClick:Ze,onKeyDown:Ye,onKeyUp:Qe},zr=Bt.createElement(xt.default,(0,St.Z)({key:"panel"},Or,{visible:Yt,forceRender:be,onVisibleChanged:function(Jn){ue==null||ue(Jn)},removeOnLeave:!1,leavedClassName:"".concat(Pe,"-content-wrapper-hidden")}),function(jn,Jn){var zn=jn.className,Wn=jn.style,Kn=Bt.createElement(ut,(0,St.Z)({id:xe,containerRef:Jn,prefixCls:Pe,className:mt()(Ne,he==null?void 0:he.content),style:(0,ae.Z)((0,ae.Z)({},re),He==null?void 0:He.content)},(0,z.Z)(Ut,{aria:!0}),hr),Xt);return Bt.createElement("div",(0,St.Z)({className:mt()("".concat(Pe,"-content-wrapper"),he==null?void 0:he.wrapper,zn),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},Sr),Wn),He==null?void 0:He.wrapper)},(0,z.Z)(Ut,{data:!0})),Ue?Ue(Kn):Kn)}),qt=(0,ae.Z)({},de);return ye&&(qt.zIndex=ye),Bt.createElement(kt.Provider,{value:Mr},Bt.createElement("div",{className:mt()(Pe,"".concat(Pe,"-").concat(ne),Ce,(0,bt.Z)((0,bt.Z)({},"".concat(Pe,"-open"),Yt),"".concat(Pe,"-inline"),ve)),style:qt,tabIndex:-1,ref:We,onKeyDown:an},Tr,Bt.createElement("div",{tabIndex:0,ref:Ve,style:Dt,"aria-hidden":"true","data-sentinel":"start"}),zr,Bt.createElement("div",{tabIndex:0,ref:rn,style:Dt,"aria-hidden":"true","data-sentinel":"end"})))}var Nt=Bt.forwardRef(Ft),jt=Nt,Gt=function(Ht){var oe=Ht.open,se=oe===void 0?!1:oe,ce=Ht.prefixCls,Pe=ce===void 0?"rc-drawer":ce,Yt=Ht.placement,ne=Yt===void 0?"right":Yt,ve=Ht.autoFocus,Se=ve===void 0?!0:ve,be=Ht.keyboard,fe=be===void 0?!0:be,pe=Ht.width,he=pe===void 0?378:pe,Ce=Ht.mask,de=Ce===void 0?!0:Ce,ye=Ht.maskClosable,Ne=ye===void 0?!0:ye,xe=Ht.getContainer,re=Ht.forceRender,Kt=Ht.afterOpenChange,wt=Ht.destroyOnClose,Lt=Ht.onMouseEnter,Xt=Ht.onMouseOver,ee=Ht.onMouseLeave,It=Ht.onClick,Rt=Ht.onKeyDown,Vt=Ht.onKeyUp,$t=Ht.panelRef,ue=Bt.useState(!1),ge=(0,Re.Z)(ue,2),Me=ge[0],Ae=ge[1],Be=Bt.useState(!1),Ze=(0,Re.Z)(Be,2),Ye=Ze[0],Qe=Ze[1];(0,_t.Z)(function(){Qe(!0)},[]);var He=Ye?se:!1,Ue=Bt.useRef(),We=Bt.useRef();(0,_t.Z)(function(){He&&(We.current=document.activeElement)},[He]);var Ve=function(_n){var Xn;if(Ae(_n),Kt==null||Kt(_n),!_n&&We.current&&!((Xn=Ue.current)!==null&&Xn!==void 0&&Xn.contains(We.current))){var Yn;(Yn=We.current)===null||Yn===void 0||Yn.focus({preventScroll:!0})}},rn=Bt.useMemo(function(){return{panel:$t}},[$t]);if(!re&&!Me&&!He&&wt)return null;var an={onMouseEnter:Lt,onMouseOver:Xt,onMouseLeave:ee,onClick:It,onKeyDown:Rt,onKeyUp:Vt},ln=(0,ae.Z)((0,ae.Z)({},Ht),{},{open:He,prefixCls:Pe,placement:ne,autoFocus:Se,keyboard:fe,width:he,mask:de,maskClosable:Ne,inline:xe===!1,afterOpenChange:Ve,ref:Ue},an);return Bt.createElement(gt.Provider,{value:rn},Bt.createElement(ot.Z,{open:He||re||Me,autoDestroy:!1,getContainer:xe,autoLock:de&&(He||Me)},Bt.createElement(jt,ln)))},Wt=Gt,Jt=Wt},25930:function(dn,fn,le){"use strict";le.d(fn,{Cd:function(){return Gt}});var ae=le(14809),Re=le(20439),ot=le(62646),_t=le(59301),Bt=le(92310),vt=le.n(Bt),gt={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},kt=function(){var Ut=(0,_t.useRef)([]),Ht=(0,_t.useRef)(null);return(0,_t.useEffect)(function(){var oe=Date.now(),se=!1;Ut.current.forEach(function(ce){if(ce){se=!0;var Pe=ce.style;Pe.transitionDuration=".3s, .3s, .3s, .06s",Ht.current&&oe-Ht.current<100&&(Pe.transitionDuration="0s, 0s")}}),se&&(Ht.current=Date.now())}),Ut.current},bt=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],St=function(Ut){var Ht=(0,Re.Z)((0,Re.Z)({},gt),Ut),oe=Ht.className,se=Ht.percent,ce=Ht.prefixCls,Pe=Ht.strokeColor,Yt=Ht.strokeLinecap,ne=Ht.strokeWidth,ve=Ht.style,Se=Ht.trailColor,be=Ht.trailWidth,fe=Ht.transition,pe=(0,ot.Z)(Ht,bt);delete pe.gapPosition;var he=Array.isArray(se)?se:[se],Ce=Array.isArray(Pe)?Pe:[Pe],de=kt(),ye=ne/2,Ne=100-ne/2,xe="M ".concat(Yt==="round"?ye:0,",").concat(ye,`
|
|
L `).concat(Yt==="round"?Ne:100,",").concat(ye),re="0 0 100 ".concat(ne),Kt=0;return _t.createElement("svg",(0,ae.Z)({className:vt()("".concat(ce,"-line"),oe),viewBox:re,preserveAspectRatio:"none",style:ve},pe),_t.createElement("path",{className:"".concat(ce,"-line-trail"),d:xe,strokeLinecap:Yt,stroke:Se,strokeWidth:be||ne,fillOpacity:"0"}),he.map(function(wt,Lt){var Xt=1;switch(Yt){case"round":Xt=1-ne/100;break;case"square":Xt=1-ne/2/100;break;default:Xt=1;break}var ee={strokeDasharray:"".concat(wt*Xt,"px, 100px"),strokeDashoffset:"-".concat(Kt,"px"),transition:fe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},It=Ce[Lt]||Ce[Ce.length-1];return Kt+=wt,_t.createElement("path",{key:Lt,className:"".concat(ce,"-line-path"),d:xe,strokeLinecap:Yt,stroke:It,strokeWidth:ne,fillOpacity:"0",ref:function(Vt){de[Lt]=Vt},style:ee})}))},Tt=St,mt=le(93664),xt=le(50298),ft=le(47273),z=0,tt=(0,ft.Z)();function at(){var Jt;return tt?(Jt=z,z+=1):Jt="TEST_OR_SSR",Jt}var it=function(Jt){var Ut=_t.useState(),Ht=(0,xt.Z)(Ut,2),oe=Ht[0],se=Ht[1];return _t.useEffect(function(){se("rc_progress_".concat(at()))},[]),Jt||oe},lt=function(Ut){var Ht=Ut.bg,oe=Ut.children;return _t.createElement("div",{style:{width:"100%",height:"100%",background:Ht}},oe)};function ut(Jt,Ut){return Object.keys(Jt).map(function(Ht){var oe=parseFloat(Ht),se="".concat(Math.floor(oe*Ut),"%");return"".concat(Jt[Ht]," ").concat(se)})}var dt=_t.forwardRef(function(Jt,Ut){var Ht=Jt.prefixCls,oe=Jt.color,se=Jt.gradientId,ce=Jt.radius,Pe=Jt.style,Yt=Jt.ptg,ne=Jt.strokeLinecap,ve=Jt.strokeWidth,Se=Jt.size,be=Jt.gapDegree,fe=oe&&(0,mt.Z)(oe)==="object",pe=fe?"#FFF":void 0,he=Se/2,Ce=_t.createElement("circle",{className:"".concat(Ht,"-circle-path"),r:ce,cx:he,cy:he,stroke:pe,strokeLinecap:ne,strokeWidth:ve,opacity:Yt===0?0:1,style:Pe,ref:Ut});if(!fe)return Ce;var de="".concat(se,"-conic"),ye=be?"".concat(180+be/2,"deg"):"0deg",Ne=ut(oe,(360-be)/360),xe=ut(oe,1),re="conic-gradient(from ".concat(ye,", ").concat(Ne.join(", "),")"),Kt="linear-gradient(to ".concat(be?"bottom":"top",", ").concat(xe.join(", "),")");return _t.createElement(_t.Fragment,null,_t.createElement("mask",{id:de},Ce),_t.createElement("foreignObject",{x:0,y:0,width:Se,height:Se,mask:"url(#".concat(de,")")},_t.createElement(lt,{bg:Kt},_t.createElement(lt,{bg:re}))))}),Pt=dt,At=100,Dt=function(Ut,Ht,oe,se,ce,Pe,Yt,ne,ve,Se){var be=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,fe=oe/100*360*((360-Pe)/360),pe=Pe===0?0:{bottom:0,top:180,left:90,right:-90}[Yt],he=(100-se)/100*Ht;ve==="round"&&se!==100&&(he+=Se/2,he>=Ht&&(he=Ht-.01));var Ce=At/2;return{stroke:typeof ne=="string"?ne:void 0,strokeDasharray:"".concat(Ht,"px ").concat(Ut),strokeDashoffset:he+be,transform:"rotate(".concat(ce+fe+pe,"deg)"),transformOrigin:"".concat(Ce,"px ").concat(Ce,"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}},Ft=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Nt(Jt){var Ut=Jt!=null?Jt:[];return Array.isArray(Ut)?Ut:[Ut]}var jt=function(Ut){var Ht=(0,Re.Z)((0,Re.Z)({},gt),Ut),oe=Ht.id,se=Ht.prefixCls,ce=Ht.steps,Pe=Ht.strokeWidth,Yt=Ht.trailWidth,ne=Ht.gapDegree,ve=ne===void 0?0:ne,Se=Ht.gapPosition,be=Ht.trailColor,fe=Ht.strokeLinecap,pe=Ht.style,he=Ht.className,Ce=Ht.strokeColor,de=Ht.percent,ye=(0,ot.Z)(Ht,Ft),Ne=At/2,xe=it(oe),re="".concat(xe,"-gradient"),Kt=Ne-Pe/2,wt=Math.PI*2*Kt,Lt=ve>0?90+ve/2:-90,Xt=wt*((360-ve)/360),ee=(0,mt.Z)(ce)==="object"?ce:{count:ce,gap:2},It=ee.count,Rt=ee.gap,Vt=Nt(de),$t=Nt(Ce),ue=$t.find(function(Qe){return Qe&&(0,mt.Z)(Qe)==="object"}),ge=ue&&(0,mt.Z)(ue)==="object",Me=ge?"butt":fe,Ae=Dt(wt,Xt,0,100,Lt,ve,Se,be,Me,Pe),Be=kt(),Ze=function(){var He=0;return Vt.map(function(Ue,We){var Ve=$t[We]||$t[$t.length-1],rn=Dt(wt,Xt,He,Ue,Lt,ve,Se,Ve,Me,Pe);return He+=Ue,_t.createElement(Pt,{key:We,color:Ve,ptg:Ue,radius:Kt,prefixCls:se,gradientId:re,style:rn,strokeLinecap:Me,strokeWidth:Pe,gapDegree:ve,ref:function(ln){Be[We]=ln},size:At})}).reverse()},Ye=function(){var He=Math.round(It*(Vt[0]/100)),Ue=100/It,We=0;return new Array(It).fill(null).map(function(Ve,rn){var an=rn<=He-1?$t[0]:be,ln=an&&(0,mt.Z)(an)==="object"?"url(#".concat(re,")"):void 0,Sn=Dt(wt,Xt,We,Ue,Lt,ve,Se,an,"butt",Pe,Rt);return We+=(Xt-Sn.strokeDashoffset+Rt)*100/Xt,_t.createElement("circle",{key:rn,className:"".concat(se,"-circle-path"),r:Kt,cx:Ne,cy:Ne,stroke:ln,strokeWidth:Pe,opacity:1,style:Sn,ref:function(Xn){Be[rn]=Xn}})})};return _t.createElement("svg",(0,ae.Z)({className:vt()("".concat(se,"-circle"),he),viewBox:"0 0 ".concat(At," ").concat(At),style:pe,id:oe,role:"presentation"},ye),!It&&_t.createElement("circle",{className:"".concat(se,"-circle-trail"),r:Kt,cx:Ne,cy:Ne,stroke:be,strokeLinecap:Me,strokeWidth:Yt||Pe,style:Ae}),It?Ye():Ze())},Gt=jt,Wt={Line:Tt,Circle:Gt}},738:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return ut}});var ae=le(14809),Re=le(4635),ot=le(50298),_t=le(62646),Bt=le(92310),vt=le.n(Bt),gt=le(18929),kt=le(10228),bt=le(26112),St=le(59301);function Tt(dt,Pt){var At=dt.disabled,Dt=dt.prefixCls,Ft=dt.character,Nt=dt.characterRender,jt=dt.index,Gt=dt.count,Wt=dt.value,Jt=dt.allowHalf,Ut=dt.focused,Ht=dt.onHover,oe=dt.onClick,se=function(fe){Ht(fe,jt)},ce=function(fe){oe(fe,jt)},Pe=function(fe){fe.keyCode===kt.Z.ENTER&&oe(fe,jt)},Yt=jt+1,ne=new Set([Dt]);Wt===0&&jt===0&&Ut?ne.add("".concat(Dt,"-focused")):Jt&&Wt+.5>=Yt&&Wt<Yt?(ne.add("".concat(Dt,"-half")),ne.add("".concat(Dt,"-active")),Ut&&ne.add("".concat(Dt,"-focused"))):(Yt<=Wt?ne.add("".concat(Dt,"-full")):ne.add("".concat(Dt,"-zero")),Yt===Wt&&Ut&&ne.add("".concat(Dt,"-focused")));var ve=typeof Ft=="function"?Ft(dt):Ft,Se=St.createElement("li",{className:vt()(Array.from(ne)),ref:Pt},St.createElement("div",{onClick:At?null:ce,onKeyDown:At?null:Pe,onMouseMove:At?null:se,role:"radio","aria-checked":Wt>jt?"true":"false","aria-posinset":jt+1,"aria-setsize":Gt,tabIndex:At?-1:0},St.createElement("div",{className:"".concat(Dt,"-first")},ve),St.createElement("div",{className:"".concat(Dt,"-second")},ve)));return Nt&&(Se=Nt(Se,dt)),Se}var mt=St.forwardRef(Tt);function xt(){var dt=St.useRef({});function Pt(Dt){return dt.current[Dt]}function At(Dt){return function(Ft){dt.current[Dt]=Ft}}return[Pt,At]}function ft(dt){var Pt=dt.pageXOffset,At="scrollLeft";if(typeof Pt!="number"){var Dt=dt.document;Pt=Dt.documentElement[At],typeof Pt!="number"&&(Pt=Dt.body[At])}return Pt}function z(dt){var Pt,At,Dt=dt.ownerDocument,Ft=Dt.body,Nt=Dt&&Dt.documentElement,jt=dt.getBoundingClientRect();return Pt=jt.left,At=jt.top,Pt-=Nt.clientLeft||Ft.clientLeft||0,At-=Nt.clientTop||Ft.clientTop||0,{left:Pt,top:At}}function tt(dt){var Pt=z(dt),At=dt.ownerDocument,Dt=At.defaultView||At.parentWindow;return Pt.left+=ft(Dt),Pt.left}var at=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function it(dt,Pt){var At=dt.prefixCls,Dt=At===void 0?"rc-rate":At,Ft=dt.className,Nt=dt.defaultValue,jt=dt.value,Gt=dt.count,Wt=Gt===void 0?5:Gt,Jt=dt.allowHalf,Ut=Jt===void 0?!1:Jt,Ht=dt.allowClear,oe=Ht===void 0?!0:Ht,se=dt.keyboard,ce=se===void 0?!0:se,Pe=dt.character,Yt=Pe===void 0?"\u2605":Pe,ne=dt.characterRender,ve=dt.disabled,Se=dt.direction,be=Se===void 0?"ltr":Se,fe=dt.tabIndex,pe=fe===void 0?0:fe,he=dt.autoFocus,Ce=dt.onHoverChange,de=dt.onChange,ye=dt.onFocus,Ne=dt.onBlur,xe=dt.onKeyDown,re=dt.onMouseLeave,Kt=(0,_t.Z)(dt,at),wt=xt(),Lt=(0,ot.Z)(wt,2),Xt=Lt[0],ee=Lt[1],It=St.useRef(null),Rt=function(){if(!ve){var hr;(hr=It.current)===null||hr===void 0||hr.focus()}};St.useImperativeHandle(Pt,function(){return{focus:Rt,blur:function(){if(!ve){var hr;(hr=It.current)===null||hr===void 0||hr.blur()}}}});var Vt=(0,gt.Z)(Nt||0,{value:jt}),$t=(0,ot.Z)(Vt,2),ue=$t[0],ge=$t[1],Me=(0,gt.Z)(null),Ae=(0,ot.Z)(Me,2),Be=Ae[0],Ze=Ae[1],Ye=function(hr,zr){var qt=be==="rtl",jn=hr+1;if(Ut){var Jn=Xt(hr),zn=tt(Jn),Wn=Jn.clientWidth;(qt&&zr-zn>Wn/2||!qt&&zr-zn<Wn/2)&&(jn-=.5)}return jn},Qe=function(hr){ge(hr),de==null||de(hr)},He=St.useState(!1),Ue=(0,ot.Z)(He,2),We=Ue[0],Ve=Ue[1],rn=function(){Ve(!0),ye==null||ye()},an=function(){Ve(!1),Ne==null||Ne()},ln=St.useState(null),Sn=(0,ot.Z)(ln,2),_n=Sn[0],Xn=Sn[1],Yn=function(hr,zr){var qt=Ye(zr,hr.pageX);qt!==Be&&(Xn(qt),Ze(null)),Ce==null||Ce(qt)},Er=function(hr){ve||(Xn(null),Ze(null),Ce==null||Ce(void 0)),hr&&(re==null||re(hr))},dr=function(hr,zr){var qt=Ye(zr,hr.pageX),jn=!1;oe&&(jn=qt===ue),Er(),Qe(jn?0:qt),Ze(jn?qt:null)},Mr=function(hr){var zr=hr.keyCode,qt=be==="rtl",jn=Ut?.5:1;ce&&(zr===kt.Z.RIGHT&&ue<Wt&&!qt?(Qe(ue+jn),hr.preventDefault()):zr===kt.Z.LEFT&&ue>0&&!qt||zr===kt.Z.RIGHT&&ue>0&&qt?(Qe(ue-jn),hr.preventDefault()):zr===kt.Z.LEFT&&ue<Wt&&qt&&(Qe(ue+jn),hr.preventDefault())),xe==null||xe(hr)};St.useEffect(function(){he&&!ve&&Rt()},[]);var Tr=new Array(Wt).fill(0).map(function(Sr,hr){return St.createElement(mt,{ref:ee(hr),index:hr,count:Wt,disabled:ve,prefixCls:"".concat(Dt,"-star"),allowHalf:Ut,value:_n===null?ue:_n,onClick:dr,onHover:Yn,key:Sr||hr,character:Yt,characterRender:ne,focused:We})}),Or=vt()(Dt,Ft,(0,Re.Z)((0,Re.Z)({},"".concat(Dt,"-disabled"),ve),"".concat(Dt,"-rtl"),be==="rtl"));return St.createElement("ul",(0,ae.Z)({className:Or,onMouseLeave:Er,tabIndex:ve?-1:pe,onFocus:ve?null:rn,onBlur:ve?null:an,onKeyDown:ve?null:Mr,ref:It},(0,bt.Z)(Kt,{aria:!0,data:!0,attr:!0})),Tr)}var lt=St.forwardRef(it),ut=lt},6551:function(dn,fn,le){"use strict";le.d(fn,{ZP:function(){return gt}});var ae=le(50298),Re=le(59301),ot=le(47273),_t=0,Bt=(0,ot.Z)();function vt(){var kt;return Bt?(kt=_t,_t+=1):kt="TEST_OR_SSR",kt}function gt(kt){var bt=Re.useState(),St=(0,ae.Z)(bt,2),Tt=St[0],mt=St[1];return Re.useEffect(function(){mt("rc_select_".concat(vt()))},[]),kt||Tt}},37463:function(dn,fn,le){"use strict";le.d(fn,{Ac:function(){return Ve},Xo:function(){return an},Wx:function(){return Sn},ZP:function(){return Nn},lk:function(){return ut}});var ae=le(14809),Re=le(95190),ot=le(4635),_t=le(20439),Bt=le(50298),vt=le(62646),gt=le(93664),kt=le(18929),bt=le(48736),St=le(59301),Tt=le(92310),mt=le.n(Tt),xt=le(34280),ft=le(49658),z=le(8654),tt=function(Ke){var Ln=Ke.className,An=Ke.customizeIcon,en=Ke.customizeIconProps,Tn=Ke.children,kn=Ke.onMouseDown,On=Ke.onClick,er=typeof An=="function"?An(en):An;return St.createElement("span",{className:Ln,onMouseDown:function(Bn){Bn.preventDefault(),kn==null||kn(Bn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:On,"aria-hidden":!0},er!==void 0?er:St.createElement("span",{className:mt()(Ln.split(/\s+/).map(function(Fn){return"".concat(Fn,"-icon")}))},Tn))},at=tt,it=function(Ke,Ln,An,en,Tn){var kn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,On=arguments.length>6?arguments[6]:void 0,er=arguments.length>7?arguments[7]:void 0,Fn=St.useMemo(function(){if((0,gt.Z)(en)==="object")return en.clearIcon;if(Tn)return Tn},[en,Tn]),Bn=St.useMemo(function(){return!!(!kn&&en&&(An.length||On)&&!(er==="combobox"&&On===""))},[en,kn,An.length,On,er]);return{allowClear:Bn,clearIcon:St.createElement(at,{className:"".concat(Ke,"-clear"),onMouseDown:Ln,customizeIcon:Fn},"\xD7")}},lt=St.createContext(null);function ut(){return St.useContext(lt)}function dt(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ke=St.useState(!1),Ln=(0,Bt.Z)(Ke,2),An=Ln[0],en=Ln[1],Tn=St.useRef(null),kn=function(){window.clearTimeout(Tn.current)};St.useEffect(function(){return kn},[]);var On=function(Fn,Bn){kn(),Tn.current=window.setTimeout(function(){en(Fn),Bn&&Bn()},Oe)};return[An,On,kn]}function Pt(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ke=St.useRef(null),Ln=St.useRef(null);St.useEffect(function(){return function(){window.clearTimeout(Ln.current)}},[]);function An(en){(en||Ke.current===null)&&(Ke.current=en),window.clearTimeout(Ln.current),Ln.current=window.setTimeout(function(){Ke.current=null},Oe)}return[function(){return Ke.current},An]}function At(Oe,Ke,Ln,An){var en=St.useRef(null);en.current={open:Ke,triggerOpen:Ln,customizedTrigger:An},St.useEffect(function(){function Tn(kn){var On;if(!((On=en.current)!==null&&On!==void 0&&On.customizedTrigger)){var er=kn.target;er.shadowRoot&&kn.composed&&(er=kn.composedPath()[0]||er),en.current.open&&Oe().filter(function(Fn){return Fn}).every(function(Fn){return!Fn.contains(er)&&Fn!==er})&&en.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Tn),function(){return window.removeEventListener("mousedown",Tn)}},[])}var Dt=le(10228);function Ft(Oe){return Oe&&![Dt.Z.ESC,Dt.Z.SHIFT,Dt.Z.BACKSPACE,Dt.Z.TAB,Dt.Z.WIN_KEY,Dt.Z.ALT,Dt.Z.META,Dt.Z.WIN_KEY_RIGHT,Dt.Z.CTRL,Dt.Z.SEMICOLON,Dt.Z.EQUALS,Dt.Z.CAPS_LOCK,Dt.Z.CONTEXT_MENU,Dt.Z.F1,Dt.Z.F2,Dt.Z.F3,Dt.Z.F4,Dt.Z.F5,Dt.Z.F6,Dt.Z.F7,Dt.Z.F8,Dt.Z.F9,Dt.Z.F10,Dt.Z.F11,Dt.Z.F12].includes(Oe)}var Nt=le(26112),jt=le(11780);function Gt(Oe,Ke,Ln){var An=(0,_t.Z)((0,_t.Z)({},Oe),Ln?Ke:{});return Object.keys(Ke).forEach(function(en){var Tn=Ke[en];typeof Tn=="function"&&(An[en]=function(){for(var kn,On=arguments.length,er=new Array(On),Fn=0;Fn<On;Fn++)er[Fn]=arguments[Fn];return Tn.apply(void 0,er),(kn=Oe[en])===null||kn===void 0?void 0:kn.call.apply(kn,[Oe].concat(er))})}),An}var Wt=Gt,Jt=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ut=function(Ke,Ln){var An=Ke.prefixCls,en=Ke.id,Tn=Ke.inputElement,kn=Ke.autoFocus,On=Ke.autoComplete,er=Ke.editable,Fn=Ke.activeDescendantId,Bn=Ke.value,Un=Ke.open,cr=Ke.attrs,lr=(0,vt.Z)(Ke,Jt),yn=Tn||St.createElement("input",null),In=yn,Gr=In.ref,Yr=In.props;return(0,bt.Kp)(!("maxLength"in yn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),yn=St.cloneElement(yn,(0,_t.Z)((0,_t.Z)((0,_t.Z)({type:"search"},Wt(lr,Yr,!0)),{},{id:en,ref:(0,z.sQ)(Ln,Gr),autoComplete:On||"off",autoFocus:kn,className:mt()("".concat(An,"-selection-search-input"),Yr==null?void 0:Yr.className),role:"combobox","aria-expanded":Un||!1,"aria-haspopup":"listbox","aria-owns":"".concat(en,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(en,"_list"),"aria-activedescendant":Un?Fn:void 0},cr),{},{value:er?Bn:"",readOnly:!er,unselectable:er?null:"on",style:(0,_t.Z)((0,_t.Z)({},Yr.style),{},{opacity:er?null:0})})),yn},Ht=St.forwardRef(Ut),oe=Ht;function se(Oe){return Array.isArray(Oe)?Oe:Oe!==void 0?[Oe]:[]}var ce=typeof window!="undefined"&&window.document&&window.document.documentElement,Pe=ce;function Yt(Oe){return Oe!=null}function ne(Oe){return!Oe&&Oe!==0}function ve(Oe){return["string","number"].includes((0,gt.Z)(Oe))}function Se(Oe){var Ke=void 0;return Oe&&(ve(Oe.title)?Ke=Oe.title.toString():ve(Oe.label)&&(Ke=Oe.label.toString())),Ke}function be(Oe,Ke){Pe?St.useLayoutEffect(Oe,Ke):St.useEffect(Oe,Ke)}function fe(Oe){var Ke;return(Ke=Oe.key)!==null&&Ke!==void 0?Ke:Oe.value}var pe=function(Ke){Ke.preventDefault(),Ke.stopPropagation()},he=function(Ke){var Ln=Ke.id,An=Ke.prefixCls,en=Ke.values,Tn=Ke.open,kn=Ke.searchValue,On=Ke.autoClearSearchValue,er=Ke.inputRef,Fn=Ke.placeholder,Bn=Ke.disabled,Un=Ke.mode,cr=Ke.showSearch,lr=Ke.autoFocus,yn=Ke.autoComplete,In=Ke.activeDescendantId,Gr=Ke.tabIndex,Yr=Ke.removeIcon,fi=Ke.maxTagCount,tn=Ke.maxTagTextLength,tr=Ke.maxTagPlaceholder,gr=tr===void 0?function(Jr){return"+ ".concat(Jr.length," ...")}:tr,Hn=Ke.tagRender,Zr=Ke.onToggleOpen,Ir=Ke.onRemove,Hr=Ke.onInputChange,Qr=Ke.onInputPaste,ei=Ke.onInputKeyDown,hi=Ke.onInputMouseDown,mn=Ke.onInputCompositionStart,vi=Ke.onInputCompositionEnd,gn=Ke.onInputBlur,oi=St.useRef(null),Gi=(0,St.useState)(0),mi=(0,Bt.Z)(Gi,2),Bi=mi[0],ii=mi[1],Rr=(0,St.useState)(!1),wi=(0,Bt.Z)(Rr,2),Eo=wi[0],Oi=wi[1],$n="".concat(An,"-selection"),Le=Tn||Un==="multiple"&&On===!1||Un==="tags"?kn:"",Ti=Un==="tags"||Un==="multiple"&&On===!1||cr&&(Tn||Eo);be(function(){ii(oi.current.scrollWidth)},[Le]);var so=function(mr,Vr,yr,ur,kr){return St.createElement("span",{title:Se(mr),className:mt()("".concat($n,"-item"),(0,ot.Z)({},"".concat($n,"-item-disabled"),yr))},St.createElement("span",{className:"".concat($n,"-item-content")},Vr),ur&&St.createElement(at,{className:"".concat($n,"-item-remove"),onMouseDown:pe,onClick:kr,customizeIcon:Yr},"\xD7"))},Ji=function(mr,Vr,yr,ur,kr,Cn){var di=function(io){pe(io),Zr(!Tn)};return St.createElement("span",{onMouseDown:di},Hn({label:Vr,value:mr,disabled:yr,closable:ur,onClose:kr,isMaxTag:!!Cn}))},Zi=function(mr){var Vr=mr.disabled,yr=mr.label,ur=mr.value,kr=!Bn&&!Vr,Cn=yr;if(typeof tn=="number"&&(typeof yr=="string"||typeof yr=="number")){var di=String(Cn);di.length>tn&&(Cn="".concat(di.slice(0,tn),"..."))}var Ci=function(bi){bi&&bi.stopPropagation(),Ir(mr)};return typeof Hn=="function"?Ji(ur,Cn,Vr,kr,Ci):so(mr,Cn,Vr,kr,Ci)},pi=function(mr){if(!en.length)return null;var Vr=typeof gr=="function"?gr(mr):gr;return typeof Hn=="function"?Ji(void 0,Vr,!1,!1,void 0,!0):so({title:Vr},Vr,!1)},sr=St.createElement("div",{className:"".concat($n,"-search"),style:{width:Bi},onFocus:function(){Oi(!0)},onBlur:function(){Oi(!1)}},St.createElement(oe,{ref:er,open:Tn,prefixCls:An,id:Ln,inputElement:null,disabled:Bn,autoFocus:lr,autoComplete:yn,editable:Ti,activeDescendantId:In,value:Le,onKeyDown:ei,onMouseDown:hi,onChange:Hr,onPaste:Qr,onCompositionStart:mn,onCompositionEnd:vi,onBlur:gn,tabIndex:Gr,attrs:(0,Nt.Z)(Ke,!0)}),St.createElement("span",{ref:oi,className:"".concat($n,"-search-mirror"),"aria-hidden":!0},Le,"\xA0")),wr=St.createElement(jt.Z,{prefixCls:"".concat($n,"-overflow"),data:en,renderItem:Zi,renderRest:pi,suffix:sr,itemKey:fe,maxCount:fi});return St.createElement("span",{className:"".concat($n,"-wrap")},wr,!en.length&&!Le&&St.createElement("span",{className:"".concat($n,"-placeholder")},Fn))},Ce=he,de=function(Ke){var Ln=Ke.inputElement,An=Ke.prefixCls,en=Ke.id,Tn=Ke.inputRef,kn=Ke.disabled,On=Ke.autoFocus,er=Ke.autoComplete,Fn=Ke.activeDescendantId,Bn=Ke.mode,Un=Ke.open,cr=Ke.values,lr=Ke.placeholder,yn=Ke.tabIndex,In=Ke.showSearch,Gr=Ke.searchValue,Yr=Ke.activeValue,fi=Ke.maxLength,tn=Ke.onInputKeyDown,tr=Ke.onInputMouseDown,gr=Ke.onInputChange,Hn=Ke.onInputPaste,Zr=Ke.onInputCompositionStart,Ir=Ke.onInputCompositionEnd,Hr=Ke.onInputBlur,Qr=Ke.title,ei=St.useState(!1),hi=(0,Bt.Z)(ei,2),mn=hi[0],vi=hi[1],gn=Bn==="combobox",oi=gn||In,Gi=cr[0],mi=Gr||"";gn&&Yr&&!mn&&(mi=Yr),St.useEffect(function(){gn&&vi(!1)},[gn,Yr]);var Bi=Bn!=="combobox"&&!Un&&!In?!1:!!mi,ii=Qr===void 0?Se(Gi):Qr,Rr=St.useMemo(function(){return Gi?null:St.createElement("span",{className:"".concat(An,"-selection-placeholder"),style:Bi?{visibility:"hidden"}:void 0},lr)},[Gi,Bi,lr,An]);return St.createElement("span",{className:"".concat(An,"-selection-wrap")},St.createElement("span",{className:"".concat(An,"-selection-search")},St.createElement(oe,{ref:Tn,prefixCls:An,id:en,open:Un,inputElement:Ln,disabled:kn,autoFocus:On,autoComplete:er,editable:oi,activeDescendantId:Fn,value:mi,onKeyDown:tn,onMouseDown:tr,onChange:function(Eo){vi(!0),gr(Eo)},onPaste:Hn,onCompositionStart:Zr,onCompositionEnd:Ir,onBlur:Hr,tabIndex:yn,attrs:(0,Nt.Z)(Ke,!0),maxLength:gn?fi:void 0})),!gn&&Gi?St.createElement("span",{className:"".concat(An,"-selection-item"),title:ii,style:Bi?{visibility:"hidden"}:void 0},Gi.label):null,Rr)},ye=de,Ne=function(Ke,Ln){var An=(0,St.useRef)(null),en=(0,St.useRef)(!1),Tn=Ke.prefixCls,kn=Ke.open,On=Ke.mode,er=Ke.showSearch,Fn=Ke.tokenWithEnter,Bn=Ke.disabled,Un=Ke.prefix,cr=Ke.autoClearSearchValue,lr=Ke.onSearch,yn=Ke.onSearchSubmit,In=Ke.onToggleOpen,Gr=Ke.onInputKeyDown,Yr=Ke.onInputBlur,fi=Ke.domRef;St.useImperativeHandle(Ln,function(){return{focus:function(ii){An.current.focus(ii)},blur:function(){An.current.blur()}}});var tn=Pt(0),tr=(0,Bt.Z)(tn,2),gr=tr[0],Hn=tr[1],Zr=function(ii){var Rr=ii.which,wi=An.current instanceof HTMLTextAreaElement;!wi&&kn&&(Rr===Dt.Z.UP||Rr===Dt.Z.DOWN)&&ii.preventDefault(),Gr&&Gr(ii),Rr===Dt.Z.ENTER&&On==="tags"&&!en.current&&!kn&&(yn==null||yn(ii.target.value)),!(wi&&!kn&&~[Dt.Z.UP,Dt.Z.DOWN,Dt.Z.LEFT,Dt.Z.RIGHT].indexOf(Rr))&&Ft(Rr)&&In(!0)},Ir=function(){Hn(!0)},Hr=(0,St.useRef)(null),Qr=function(ii){lr(ii,!0,en.current)!==!1&&In(!0)},ei=function(){en.current=!0},hi=function(ii){en.current=!1,On!=="combobox"&&Qr(ii.target.value)},mn=function(ii){var Rr=ii.target.value;if(Fn&&Hr.current&&/[\r\n]/.test(Hr.current)){var wi=Hr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Rr=Rr.replace(wi,Hr.current)}Hr.current=null,Qr(Rr)},vi=function(ii){var Rr=ii.clipboardData,wi=Rr==null?void 0:Rr.getData("text");Hr.current=wi||""},gn=function(ii){var Rr=ii.target;if(Rr!==An.current){var wi=document.body.style.msTouchAction!==void 0;wi?setTimeout(function(){An.current.focus()}):An.current.focus()}},oi=function(ii){var Rr=gr();ii.target!==An.current&&!Rr&&!(On==="combobox"&&Bn)&&ii.preventDefault(),(On!=="combobox"&&(!er||!Rr)||!kn)&&(kn&&cr!==!1&&lr("",!0,!1),In())},Gi={inputRef:An,onInputKeyDown:Zr,onInputMouseDown:Ir,onInputChange:mn,onInputPaste:vi,onInputCompositionStart:ei,onInputCompositionEnd:hi,onInputBlur:Yr},mi=On==="multiple"||On==="tags"?St.createElement(Ce,(0,ae.Z)({},Ke,Gi)):St.createElement(ye,(0,ae.Z)({},Ke,Gi));return St.createElement("div",{ref:fi,className:"".concat(Tn,"-selector"),onClick:gn,onMouseDown:oi},Un&&St.createElement("div",{className:"".concat(Tn,"-prefix")},Un),mi)},xe=St.forwardRef(Ne),re=xe,Kt=le(65966),wt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Lt=function(Ke){var Ln=Ke===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Ln,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Ln,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Ln,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Ln,adjustY:1},htmlRegion:"scroll"}}},Xt=function(Ke,Ln){var An=Ke.prefixCls,en=Ke.disabled,Tn=Ke.visible,kn=Ke.children,On=Ke.popupElement,er=Ke.animation,Fn=Ke.transitionName,Bn=Ke.dropdownStyle,Un=Ke.dropdownClassName,cr=Ke.direction,lr=cr===void 0?"ltr":cr,yn=Ke.placement,In=Ke.builtinPlacements,Gr=Ke.dropdownMatchSelectWidth,Yr=Ke.dropdownRender,fi=Ke.dropdownAlign,tn=Ke.getPopupContainer,tr=Ke.empty,gr=Ke.getTriggerDOMNode,Hn=Ke.onPopupVisibleChange,Zr=Ke.onPopupMouseEnter,Ir=(0,vt.Z)(Ke,wt),Hr="".concat(An,"-dropdown"),Qr=On;Yr&&(Qr=Yr(On));var ei=St.useMemo(function(){return In||Lt(Gr)},[In,Gr]),hi=er?"".concat(Hr,"-").concat(er):Fn,mn=typeof Gr=="number",vi=St.useMemo(function(){return mn?null:Gr===!1?"minWidth":"width"},[Gr,mn]),gn=Bn;mn&&(gn=(0,_t.Z)((0,_t.Z)({},gn),{},{width:Gr}));var oi=St.useRef(null);return St.useImperativeHandle(Ln,function(){return{getPopupElement:function(){var mi;return(mi=oi.current)===null||mi===void 0?void 0:mi.popupElement}}}),St.createElement(Kt.Z,(0,ae.Z)({},Ir,{showAction:Hn?["click"]:[],hideAction:Hn?["click"]:[],popupPlacement:yn||(lr==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ei,prefixCls:Hr,popupTransitionName:hi,popup:St.createElement("div",{onMouseEnter:Zr},Qr),ref:oi,stretch:vi,popupAlign:fi,popupVisible:Tn,getPopupContainer:tn,popupClassName:mt()(Un,(0,ot.Z)({},"".concat(Hr,"-empty"),tr)),popupStyle:gn,getTriggerDOMNode:gr,onPopupVisibleChange:Hn}),kn)},ee=St.forwardRef(Xt),It=ee,Rt=le(21696);function Vt(Oe,Ke){var Ln=Oe.key,An;return"value"in Oe&&(An=Oe.value),Ln!=null?Ln:An!==void 0?An:"rc-index-key-".concat(Ke)}function $t(Oe){return typeof Oe!="undefined"&&!Number.isNaN(Oe)}function ue(Oe,Ke){var Ln=Oe||{},An=Ln.label,en=Ln.value,Tn=Ln.options,kn=Ln.groupLabel,On=An||(Ke?"children":"label");return{label:On,value:en||"value",options:Tn||"options",groupLabel:kn||On}}function ge(Oe){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ln=Ke.fieldNames,An=Ke.childrenAsData,en=[],Tn=ue(Ln,!1),kn=Tn.label,On=Tn.value,er=Tn.options,Fn=Tn.groupLabel;function Bn(Un,cr){Array.isArray(Un)&&Un.forEach(function(lr){if(cr||!(er in lr)){var yn=lr[On];en.push({key:Vt(lr,en.length),groupOption:cr,data:lr,label:lr[kn],value:yn})}else{var In=lr[Fn];In===void 0&&An&&(In=lr.label),en.push({key:Vt(lr,en.length),group:!0,data:lr,label:In}),Bn(lr[er],!0)}})}return Bn(Oe,!1),en}function Me(Oe){var Ke=(0,_t.Z)({},Oe);return"props"in Ke||Object.defineProperty(Ke,"props",{get:function(){return(0,bt.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ke}}),Ke}var Ae=function(Ke,Ln,An){if(!Ln||!Ln.length)return null;var en=!1,Tn=function On(er,Fn){var Bn=(0,Rt.Z)(Fn),Un=Bn[0],cr=Bn.slice(1);if(!Un)return[er];var lr=er.split(Un);return en=en||lr.length>1,lr.reduce(function(yn,In){return[].concat((0,Re.Z)(yn),(0,Re.Z)(On(In,cr)))},[]).filter(Boolean)},kn=Tn(Ke,Ln);return en?typeof An!="undefined"?kn.slice(0,An):kn:null},Be=St.createContext(null),Ze=Be;function Ye(Oe){var Ke=Oe.visible,Ln=Oe.values;if(!Ke)return null;var An=50;return St.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Ln.slice(0,An).map(function(en){var Tn=en.label,kn=en.value;return["number","string"].includes((0,gt.Z)(Tn))?Tn:kn}).join(", ")),Ln.length>An?", ...":null)}var Qe=["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"],He=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Ue=function(Ke){return Ke==="tags"||Ke==="multiple"},We=St.forwardRef(function(Oe,Ke){var Ln,An=Oe.id,en=Oe.prefixCls,Tn=Oe.className,kn=Oe.showSearch,On=Oe.tagRender,er=Oe.direction,Fn=Oe.omitDomProps,Bn=Oe.displayValues,Un=Oe.onDisplayValuesChange,cr=Oe.emptyOptions,lr=Oe.notFoundContent,yn=lr===void 0?"Not Found":lr,In=Oe.onClear,Gr=Oe.mode,Yr=Oe.disabled,fi=Oe.loading,tn=Oe.getInputElement,tr=Oe.getRawInputElement,gr=Oe.open,Hn=Oe.defaultOpen,Zr=Oe.onDropdownVisibleChange,Ir=Oe.activeValue,Hr=Oe.onActiveValueChange,Qr=Oe.activeDescendantId,ei=Oe.searchValue,hi=Oe.autoClearSearchValue,mn=Oe.onSearch,vi=Oe.onSearchSplit,gn=Oe.tokenSeparators,oi=Oe.allowClear,Gi=Oe.prefix,mi=Oe.suffixIcon,Bi=Oe.clearIcon,ii=Oe.OptionList,Rr=Oe.animation,wi=Oe.transitionName,Eo=Oe.dropdownStyle,Oi=Oe.dropdownClassName,$n=Oe.dropdownMatchSelectWidth,Le=Oe.dropdownRender,Ti=Oe.dropdownAlign,so=Oe.placement,Ji=Oe.builtinPlacements,Zi=Oe.getPopupContainer,pi=Oe.showAction,sr=pi===void 0?[]:pi,wr=Oe.onFocus,Jr=Oe.onBlur,mr=Oe.onKeyUp,Vr=Oe.onKeyDown,yr=Oe.onMouseDown,ur=(0,vt.Z)(Oe,Qe),kr=Ue(Gr),Cn=(kn!==void 0?kn:kr)||Gr==="combobox",di=(0,_t.Z)({},ur);He.forEach(function(Ui){delete di[Ui]}),Fn==null||Fn.forEach(function(Ui){delete di[Ui]});var Ci=St.useState(!1),io=(0,Bt.Z)(Ci,2),bi=io[0],lo=io[1];St.useEffect(function(){lo((0,ft.Z)())},[]);var xo=St.useRef(null),Bo=St.useRef(null),po=St.useRef(null),na=St.useRef(null),Ao=St.useRef(null),on=St.useRef(!1),ra=dt(),za=(0,Bt.Z)(ra,3),Ya=za[0],Hi=za[1],Js=za[2];St.useImperativeHandle(Ke,function(){var Ui,Ni;return{focus:(Ui=na.current)===null||Ui===void 0?void 0:Ui.focus,blur:(Ni=na.current)===null||Ni===void 0?void 0:Ni.blur,scrollTo:function(xr){var Jo;return(Jo=Ao.current)===null||Jo===void 0?void 0:Jo.scrollTo(xr)},nativeElement:xo.current||Bo.current}});var ls=St.useMemo(function(){var Ui;if(Gr!=="combobox")return ei;var Ni=(Ui=Bn[0])===null||Ui===void 0?void 0:Ui.value;return typeof Ni=="string"||typeof Ni=="number"?String(Ni):""},[ei,Gr,Bn]),Ml=Gr==="combobox"&&typeof tn=="function"&&tn()||null,Ai=typeof tr=="function"&&tr(),No=(0,z.x1)(Bo,Ai==null||(Ln=Ai.props)===null||Ln===void 0?void 0:Ln.ref),Ga=St.useState(!1),dl=(0,Bt.Z)(Ga,2),uu=dl[0],xs=dl[1];(0,xt.Z)(function(){xs(!0)},[]);var Br=(0,kt.Z)(!1,{defaultValue:Hn,value:gr}),Gl=(0,Bt.Z)(Br,2),hu=Gl[0],us=Gl[1],Xo=uu?hu:!1,Nu=!yn&&cr;(Yr||Nu&&Xo&&Gr==="combobox")&&(Xo=!1);var rr=Nu?!1:Xo,Ur=St.useCallback(function(Ui){var Ni=Ui!==void 0?Ui:!Xo;Yr||(us(Ni),Xo!==Ni&&(Zr==null||Zr(Ni)))},[Yr,Xo,us,Zr]),ni=St.useMemo(function(){return(gn||[]).some(function(Ui){return[`
|
|
`,`\r
|
|
`].includes(Ui)})},[gn]),ai=St.useContext(Ze)||{},gi=ai.maxCount,Vi=ai.rawValues,Dr=function(Ni,ja,xr){if(!(kr&&$t(gi)&&(Vi==null?void 0:Vi.size)>=gi)){var Jo=!0,Ge=Ni;Hr==null||Hr(null);var bn=Ae(Ni,gn,$t(gi)?gi-Vi.size:void 0),$s=xr?null:bn;return Gr!=="combobox"&&$s&&(Ge="",vi==null||vi($s),Ur(!1),Jo=!1),mn&&ls!==Ge&&mn(Ge,{source:ja?"typing":"effect"}),Jo}},ws=function(Ni){!Ni||!Ni.trim()||mn(Ni,{source:"submit"})};St.useEffect(function(){!Xo&&!kr&&Gr!=="combobox"&&Dr("",!1,!1)},[Xo]),St.useEffect(function(){hu&&Yr&&us(!1),Yr&&!on.current&&Hi(!1)},[Yr]);var ia=Pt(),Uo=(0,Bt.Z)(ia,2),oo=Uo[0],Ja=Uo[1],bs=St.useRef(!1),Aa=function(Ni){var ja=oo(),xr=Ni.key,Jo=xr==="Enter";if(Jo&&(Gr!=="combobox"&&Ni.preventDefault(),Xo||Ur(!0)),Ja(!!ls),xr==="Backspace"&&!ja&&kr&&!ls&&Bn.length){for(var Ge=(0,Re.Z)(Bn),bn=null,$s=Ge.length-1;$s>=0;$s-=1){var Wl=Ge[$s];if(!Wl.disabled){Ge.splice($s,1),bn=Wl;break}}bn&&Un(Ge,{type:"remove",values:[bn]})}for(var hs=arguments.length,Qa=new Array(hs>1?hs-1:0),gl=1;gl<hs;gl++)Qa[gl-1]=arguments[gl];if(Xo&&(!Jo||!bs.current)){var cu;Jo&&(bs.current=!0),(cu=Ao.current)===null||cu===void 0||cu.onKeyDown.apply(cu,[Ni].concat(Qa))}Vr==null||Vr.apply(void 0,[Ni].concat(Qa))},Ps=function(Ni){for(var ja=arguments.length,xr=new Array(ja>1?ja-1:0),Jo=1;Jo<ja;Jo++)xr[Jo-1]=arguments[Jo];if(Xo){var Ge;(Ge=Ao.current)===null||Ge===void 0||Ge.onKeyUp.apply(Ge,[Ni].concat(xr))}Ni.key==="Enter"&&(bs.current=!1),mr==null||mr.apply(void 0,[Ni].concat(xr))},Tl=function(Ni){var ja=Bn.filter(function(xr){return xr!==Ni});Un(ja,{type:"remove",values:[Ni]})},Qs=function(){bs.current=!1},ju=St.useRef(!1),Xc=function(){Hi(!0),Yr||(wr&&!ju.current&&wr.apply(void 0,arguments),sr.includes("focus")&&Ur(!0)),ju.current=!0},sc=function(){on.current=!0,Hi(!1,function(){ju.current=!1,on.current=!1,Ur(!1)}),!Yr&&(ls&&(Gr==="tags"?mn(ls,{source:"submit"}):Gr==="multiple"&&mn("",{source:"blur"})),Jr&&Jr.apply(void 0,arguments))},pl=[];St.useEffect(function(){return function(){pl.forEach(function(Ui){return clearTimeout(Ui)}),pl.splice(0,pl.length)}},[]);var Ul=function(Ni){var ja,xr=Ni.target,Jo=(ja=po.current)===null||ja===void 0?void 0:ja.getPopupElement();if(Jo&&Jo.contains(xr)){var Ge=setTimeout(function(){var hs=pl.indexOf(Ge);if(hs!==-1&&pl.splice(hs,1),Js(),!bi&&!Jo.contains(document.activeElement)){var Qa;(Qa=na.current)===null||Qa===void 0||Qa.focus()}});pl.push(Ge)}for(var bn=arguments.length,$s=new Array(bn>1?bn-1:0),Wl=1;Wl<bn;Wl++)$s[Wl-1]=arguments[Wl];yr==null||yr.apply(void 0,[Ni].concat($s))},Is=St.useState({}),lc=(0,Bt.Z)(Is,2),uc=lc[1];function Yc(){uc({})}var jo;Ai&&(jo=function(Ni){Ur(Ni)}),At(function(){var Ui;return[xo.current,(Ui=po.current)===null||Ui===void 0?void 0:Ui.getPopupElement()]},rr,Ur,!!Ai);var Wf=St.useMemo(function(){return(0,_t.Z)((0,_t.Z)({},Oe),{},{notFoundContent:yn,open:Xo,triggerOpen:rr,id:An,showSearch:Cn,multiple:kr,toggleOpen:Ur})},[Oe,yn,rr,Xo,An,Cn,kr,Ur]),hc=!!mi||fi,Ou;hc&&(Ou=St.createElement(at,{className:mt()("".concat(en,"-arrow"),(0,ot.Z)({},"".concat(en,"-arrow-loading"),fi)),customizeIcon:mi,customizeIconProps:{loading:fi,searchValue:ls,open:Xo,focused:Ya,showSearch:Cn}}));var Fu=function(){var Ni;In==null||In(),(Ni=na.current)===null||Ni===void 0||Ni.focus(),Un([],{type:"clear",values:Bn}),Dr("",!1,!1)},da=it(en,Fu,Bn,oi,Bi,Yr,ls,Gr),Na=da.allowClear,Yo=da.clearIcon,oa=St.createElement(ii,{ref:Ao}),cc=mt()(en,Tn,(0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)({},"".concat(en,"-focused"),Ya),"".concat(en,"-multiple"),kr),"".concat(en,"-single"),!kr),"".concat(en,"-allow-clear"),oi),"".concat(en,"-show-arrow"),hc),"".concat(en,"-disabled"),Yr),"".concat(en,"-loading"),fi),"".concat(en,"-open"),Xo),"".concat(en,"-customize-input"),Ml),"".concat(en,"-show-search"),Cn)),Du=St.createElement(It,{ref:po,disabled:Yr,prefixCls:en,visible:rr,popupElement:oa,animation:Rr,transitionName:wi,dropdownStyle:Eo,dropdownClassName:Oi,direction:er,dropdownMatchSelectWidth:$n,dropdownRender:Le,dropdownAlign:Ti,placement:so,builtinPlacements:Ji,getPopupContainer:Zi,empty:cr,getTriggerDOMNode:function(Ni){return Bo.current||Ni},onPopupVisibleChange:jo,onPopupMouseEnter:Yc},Ai?St.cloneElement(Ai,{ref:No}):St.createElement(re,(0,ae.Z)({},Oe,{domRef:Bo,prefixCls:en,inputElement:Ml,ref:na,id:An,prefix:Gi,showSearch:Cn,autoClearSearchValue:hi,mode:Gr,activeDescendantId:Qr,tagRender:On,values:Bn,open:Xo,onToggleOpen:Ur,activeValue:Ir,searchValue:ls,onSearch:Dr,onSearchSubmit:ws,onRemove:Tl,tokenWithEnter:ni,onInputBlur:Qs}))),mo;return Ai?mo=Du:mo=St.createElement("div",(0,ae.Z)({className:cc},di,{ref:xo,onMouseDown:Ul,onKeyDown:Aa,onKeyUp:Ps,onFocus:Xc,onBlur:sc}),St.createElement(Ye,{visible:Ya&&!Xo,values:Bn}),Du,Ou,Na&&Yo),St.createElement(lt.Provider,{value:Wf},mo)}),Ve=We,rn=function(){return null};rn.isSelectOptGroup=!0;var an=rn,ln=function(){return null};ln.isSelectOption=!0;var Sn=ln,_n=le(80547),Xn=le(2738),Yn=le(65283);function Er(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var dr=["disabled","title","children","style","className"];function Mr(Oe){return typeof Oe=="string"||typeof Oe=="number"}var Tr=function(Ke,Ln){var An=ut(),en=An.prefixCls,Tn=An.id,kn=An.open,On=An.multiple,er=An.mode,Fn=An.searchValue,Bn=An.toggleOpen,Un=An.notFoundContent,cr=An.onPopupScroll,lr=St.useContext(Ze),yn=lr.maxCount,In=lr.flattenOptions,Gr=lr.onActiveValue,Yr=lr.defaultActiveFirstOption,fi=lr.onSelect,tn=lr.menuItemSelectedIcon,tr=lr.rawValues,gr=lr.fieldNames,Hn=lr.virtual,Zr=lr.direction,Ir=lr.listHeight,Hr=lr.listItemHeight,Qr=lr.optionRender,ei="".concat(en,"-item"),hi=(0,_n.Z)(function(){return In},[kn,In],function(pi,sr){return sr[0]&&pi[1]!==sr[1]}),mn=St.useRef(null),vi=St.useMemo(function(){return On&&$t(yn)&&(tr==null?void 0:tr.size)>=yn},[On,yn,tr==null?void 0:tr.size]),gn=function(sr){sr.preventDefault()},oi=function(sr){var wr;(wr=mn.current)===null||wr===void 0||wr.scrollTo(typeof sr=="number"?{index:sr}:sr)},Gi=St.useCallback(function(pi){return er==="combobox"?!1:tr.has(pi)},[er,(0,Re.Z)(tr).toString(),tr.size]),mi=function(sr){for(var wr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Jr=hi.length,mr=0;mr<Jr;mr+=1){var Vr=(sr+mr*wr+Jr)%Jr,yr=hi[Vr]||{},ur=yr.group,kr=yr.data;if(!ur&&!(kr!=null&&kr.disabled)&&(Gi(kr.value)||!vi))return Vr}return-1},Bi=St.useState(function(){return mi(0)}),ii=(0,Bt.Z)(Bi,2),Rr=ii[0],wi=ii[1],Eo=function(sr){var wr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;wi(sr);var Jr={source:wr?"keyboard":"mouse"},mr=hi[sr];if(!mr){Gr(null,-1,Jr);return}Gr(mr.value,sr,Jr)};(0,St.useEffect)(function(){Eo(Yr!==!1?mi(0):-1)},[hi.length,Fn]);var Oi=St.useCallback(function(pi){return er==="combobox"?String(pi).toLowerCase()===Fn.toLowerCase():tr.has(pi)},[er,Fn,(0,Re.Z)(tr).toString(),tr.size]);(0,St.useEffect)(function(){var pi=setTimeout(function(){if(!On&&kn&&tr.size===1){var wr=Array.from(tr)[0],Jr=hi.findIndex(function(mr){var Vr=mr.data;return Fn?String(Vr.value).startsWith(Fn):Vr.value===wr});Jr!==-1&&(Eo(Jr),oi(Jr))}});if(kn){var sr;(sr=mn.current)===null||sr===void 0||sr.scrollTo(void 0)}return function(){return clearTimeout(pi)}},[kn,Fn]);var $n=function(sr){sr!==void 0&&fi(sr,{selected:!tr.has(sr)}),On||Bn(!1)};if(St.useImperativeHandle(Ln,function(){return{onKeyDown:function(sr){var wr=sr.which,Jr=sr.ctrlKey;switch(wr){case Dt.Z.N:case Dt.Z.P:case Dt.Z.UP:case Dt.Z.DOWN:{var mr=0;if(wr===Dt.Z.UP?mr=-1:wr===Dt.Z.DOWN?mr=1:Er()&&Jr&&(wr===Dt.Z.N?mr=1:wr===Dt.Z.P&&(mr=-1)),mr!==0){var Vr=mi(Rr+mr,mr);oi(Vr),Eo(Vr,!0)}break}case Dt.Z.TAB:case Dt.Z.ENTER:{var yr,ur=hi[Rr];ur&&!(ur!=null&&(yr=ur.data)!==null&&yr!==void 0&&yr.disabled)&&!vi?$n(ur.value):$n(void 0),kn&&sr.preventDefault();break}case Dt.Z.ESC:Bn(!1),kn&&sr.stopPropagation()}},onKeyUp:function(){},scrollTo:function(sr){oi(sr)}}}),hi.length===0)return St.createElement("div",{role:"listbox",id:"".concat(Tn,"_list"),className:"".concat(ei,"-empty"),onMouseDown:gn},Un);var Le=Object.keys(gr).map(function(pi){return gr[pi]}),Ti=function(sr){return sr.label};function so(pi,sr){var wr=pi.group;return{role:wr?"presentation":"option",id:"".concat(Tn,"_list_").concat(sr)}}var Ji=function(sr){var wr=hi[sr];if(!wr)return null;var Jr=wr.data||{},mr=Jr.value,Vr=wr.group,yr=(0,Nt.Z)(Jr,!0),ur=Ti(wr);return wr?St.createElement("div",(0,ae.Z)({"aria-label":typeof ur=="string"&&!Vr?ur:null},yr,{key:sr},so(wr,sr),{"aria-selected":Oi(mr)}),mr):null},Zi={role:"listbox",id:"".concat(Tn,"_list")};return St.createElement(St.Fragment,null,Hn&&St.createElement("div",(0,ae.Z)({},Zi,{style:{height:0,width:0,overflow:"hidden"}}),Ji(Rr-1),Ji(Rr),Ji(Rr+1)),St.createElement(Yn.Z,{itemKey:"key",ref:mn,data:hi,height:Ir,itemHeight:Hr,fullHeight:!1,onMouseDown:gn,onScroll:cr,virtual:Hn,direction:Zr,innerProps:Hn?null:Zi},function(pi,sr){var wr=pi.group,Jr=pi.groupOption,mr=pi.data,Vr=pi.label,yr=pi.value,ur=mr.key;if(wr){var kr,Cn=(kr=mr.title)!==null&&kr!==void 0?kr:Mr(Vr)?Vr.toString():void 0;return St.createElement("div",{className:mt()(ei,"".concat(ei,"-group"),mr.className),title:Cn},Vr!==void 0?Vr:ur)}var di=mr.disabled,Ci=mr.title,io=mr.children,bi=mr.style,lo=mr.className,xo=(0,vt.Z)(mr,dr),Bo=(0,Xn.Z)(xo,Le),po=Gi(yr),na=di||!po&&vi,Ao="".concat(ei,"-option"),on=mt()(ei,Ao,lo,(0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)({},"".concat(Ao,"-grouped"),Jr),"".concat(Ao,"-active"),Rr===sr&&!na),"".concat(Ao,"-disabled"),na),"".concat(Ao,"-selected"),po)),ra=Ti(pi),za=!tn||typeof tn=="function"||po,Ya=typeof ra=="number"?ra:ra||yr,Hi=Mr(Ya)?Ya.toString():void 0;return Ci!==void 0&&(Hi=Ci),St.createElement("div",(0,ae.Z)({},(0,Nt.Z)(Bo),Hn?{}:so(pi,sr),{"aria-selected":Oi(yr),className:on,title:Hi,onMouseMove:function(){Rr===sr||na||Eo(sr)},onClick:function(){na||$n(yr)},style:bi}),St.createElement("div",{className:"".concat(Ao,"-content")},typeof Qr=="function"?Qr(pi,{index:sr}):Ya),St.isValidElement(tn)||po,za&&St.createElement(at,{className:"".concat(ei,"-option-state"),customizeIcon:tn,customizeIconProps:{value:yr,disabled:na,isSelected:po}},po?"\u2713":null))}))},Or=St.forwardRef(Tr),Sr=Or,hr=function(Oe,Ke){var Ln=St.useRef({values:new Map,options:new Map}),An=St.useMemo(function(){var Tn=Ln.current,kn=Tn.values,On=Tn.options,er=Oe.map(function(Un){if(Un.label===void 0){var cr;return(0,_t.Z)((0,_t.Z)({},Un),{},{label:(cr=kn.get(Un.value))===null||cr===void 0?void 0:cr.label})}return Un}),Fn=new Map,Bn=new Map;return er.forEach(function(Un){Fn.set(Un.value,Un),Bn.set(Un.value,Ke.get(Un.value)||On.get(Un.value))}),Ln.current.values=Fn,Ln.current.options=Bn,er},[Oe,Ke]),en=St.useCallback(function(Tn){return Ke.get(Tn)||Ln.current.options.get(Tn)},[Ke]);return[An,en]};function zr(Oe,Ke){return se(Oe).join("").toUpperCase().includes(Ke)}var qt=function(Oe,Ke,Ln,An,en){return St.useMemo(function(){if(!Ln||An===!1)return Oe;var Tn=Ke.options,kn=Ke.label,On=Ke.value,er=[],Fn=typeof An=="function",Bn=Ln.toUpperCase(),Un=Fn?An:function(lr,yn){return en?zr(yn[en],Bn):yn[Tn]?zr(yn[kn!=="children"?kn:"label"],Bn):zr(yn[On],Bn)},cr=Fn?function(lr){return Me(lr)}:function(lr){return lr};return Oe.forEach(function(lr){if(lr[Tn]){var yn=Un(Ln,cr(lr));if(yn)er.push(lr);else{var In=lr[Tn].filter(function(Gr){return Un(Ln,cr(Gr))});In.length&&er.push((0,_t.Z)((0,_t.Z)({},lr),{},(0,ot.Z)({},Tn,In)))}return}Un(Ln,cr(lr))&&er.push(lr)}),er},[Oe,An,en,Ln,Ke])},jn=le(6551),Jn=le(11592),zn=["children","value"],Wn=["children"];function Kn(Oe){var Ke=Oe,Ln=Ke.key,An=Ke.props,en=An.children,Tn=An.value,kn=(0,vt.Z)(An,zn);return(0,_t.Z)({key:Ln,value:Tn!==void 0?Tn:Ln,children:en},kn)}function ir(Oe){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Jn.Z)(Oe).map(function(Ln,An){if(!St.isValidElement(Ln)||!Ln.type)return null;var en=Ln,Tn=en.type.isSelectOptGroup,kn=en.key,On=en.props,er=On.children,Fn=(0,vt.Z)(On,Wn);return Ke||!Tn?Kn(Ln):(0,_t.Z)((0,_t.Z)({key:"__RC_SELECT_GRP__".concat(kn===null?An:kn,"__"),label:kn},Fn),{},{options:ir(er)})}).filter(function(Ln){return Ln})}var Ar=function(Ke,Ln,An,en,Tn){return St.useMemo(function(){var kn=Ke,On=!Ke;On&&(kn=ir(Ln));var er=new Map,Fn=new Map,Bn=function(lr,yn,In){In&&typeof In=="string"&&lr.set(yn[In],yn)},Un=function cr(lr){for(var yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,In=0;In<lr.length;In+=1){var Gr=lr[In];!Gr[An.options]||yn?(er.set(Gr[An.value],Gr),Bn(Fn,Gr,An.label),Bn(Fn,Gr,en),Bn(Fn,Gr,Tn)):cr(Gr[An.options],!0)}};return Un(kn),{options:kn,valueOptions:er,labelOptions:Fn}},[Ke,Ln,An,en,Tn])},sn=Ar;function qe(Oe){var Ke=St.useRef();Ke.current=Oe;var Ln=St.useCallback(function(){return Ke.current.apply(Ke,arguments)},[]);return Ln}function $e(Oe){var Ke=Oe.mode,Ln=Oe.options,An=Oe.children,en=Oe.backfill,Tn=Oe.allowClear,kn=Oe.placeholder,On=Oe.getInputElement,er=Oe.showSearch,Fn=Oe.onSearch,Bn=Oe.defaultOpen,Un=Oe.autoFocus,cr=Oe.labelInValue,lr=Oe.value,yn=Oe.inputValue,In=Oe.optionLabelProp,Gr=isMultiple(Ke),Yr=er!==void 0?er:Gr||Ke==="combobox",fi=Ln||convertChildrenToData(An);if(warning(Ke!=="tags"||fi.every(function(Hn){return!Hn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ke==="tags"||Ke==="combobox"){var tn=fi.some(function(Hn){return Hn.options?Hn.options.some(function(Zr){return typeof("value"in Zr?Zr.value:Zr.key)=="number"}):typeof("value"in Hn?Hn.value:Hn.key)=="number"});warning(!tn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ke!=="combobox"||!In,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ke==="combobox"||!en,"`backfill` only works with `combobox` mode."),warning(Ke==="combobox"||!On,"`getInputElement` only work with `combobox` mode."),noteOnce(Ke!=="combobox"||!On||!Tn||!kn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Fn&&!Yr&&Ke!=="combobox"&&Ke!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Bn||Un,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),lr!=null){var tr=toArray(lr);warning(!cr||tr.every(function(Hn){return _typeof(Hn)==="object"&&("key"in Hn||"value"in Hn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Gr||Array.isArray(lr),"`value` should be array when `mode` is `multiple` or `tags`")}if(An){var gr=null;toNodeArray(An).some(function(Hn){if(!React.isValidElement(Hn)||!Hn.type)return!1;var Zr=Hn,Ir=Zr.type;if(Ir.isSelectOption)return!1;if(Ir.isSelectOptGroup){var Hr=toNodeArray(Hn.props.children).every(function(Qr){return!React.isValidElement(Qr)||!Hn.type||Qr.type.isSelectOption?!0:(gr=Qr.type,!1)});return!Hr}return gr=Ir,!0}),gr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(gr.displayName||gr.name||gr,"`.")),warning(yn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function un(Oe,Ke){if(Oe){var Ln=function An(en){for(var Tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,kn=0;kn<en.length;kn++){var On=en[kn];if(On[Ke==null?void 0:Ke.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Tn&&Array.isArray(On[Ke==null?void 0:Ke.options])&&An(On[Ke==null?void 0:Ke.options],!0))break}};Ln(Oe)}}var or=null,Qn=["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"],pr=["inputValue"];function xn(Oe){return!Oe||(0,gt.Z)(Oe)!=="object"}var Rn=St.forwardRef(function(Oe,Ke){var Ln=Oe.id,An=Oe.mode,en=Oe.prefixCls,Tn=en===void 0?"rc-select":en,kn=Oe.backfill,On=Oe.fieldNames,er=Oe.inputValue,Fn=Oe.searchValue,Bn=Oe.onSearch,Un=Oe.autoClearSearchValue,cr=Un===void 0?!0:Un,lr=Oe.onSelect,yn=Oe.onDeselect,In=Oe.dropdownMatchSelectWidth,Gr=In===void 0?!0:In,Yr=Oe.filterOption,fi=Oe.filterSort,tn=Oe.optionFilterProp,tr=Oe.optionLabelProp,gr=Oe.options,Hn=Oe.optionRender,Zr=Oe.children,Ir=Oe.defaultActiveFirstOption,Hr=Oe.menuItemSelectedIcon,Qr=Oe.virtual,ei=Oe.direction,hi=Oe.listHeight,mn=hi===void 0?200:hi,vi=Oe.listItemHeight,gn=vi===void 0?20:vi,oi=Oe.labelRender,Gi=Oe.value,mi=Oe.defaultValue,Bi=Oe.labelInValue,ii=Oe.onChange,Rr=Oe.maxCount,wi=(0,vt.Z)(Oe,Qn),Eo=(0,jn.ZP)(Ln),Oi=Ue(An),$n=!!(!gr&&Zr),Le=St.useMemo(function(){return Yr===void 0&&An==="combobox"?!1:Yr},[Yr,An]),Ti=St.useMemo(function(){return ue(On,$n)},[JSON.stringify(On),$n]),so=(0,kt.Z)("",{value:Fn!==void 0?Fn:er,postState:function(ni){return ni||""}}),Ji=(0,Bt.Z)(so,2),Zi=Ji[0],pi=Ji[1],sr=sn(gr,Zr,Ti,tn,tr),wr=sr.valueOptions,Jr=sr.labelOptions,mr=sr.options,Vr=St.useCallback(function(Ur){var ni=se(Ur);return ni.map(function(ai){var gi,Vi,Dr,ws,ia;if(xn(ai))gi=ai;else{var Uo;Dr=ai.key,Vi=ai.label,gi=(Uo=ai.value)!==null&&Uo!==void 0?Uo:Dr}var oo=wr.get(gi);if(oo){var Ja;if(Vi===void 0&&(Vi=oo==null?void 0:oo[tr||Ti.label]),Dr===void 0&&(Dr=(Ja=oo==null?void 0:oo.key)!==null&&Ja!==void 0?Ja:gi),ws=oo==null?void 0:oo.disabled,ia=oo==null?void 0:oo.title,0)var bs}return{label:Vi,value:gi,key:Dr,disabled:ws,title:ia}})},[Ti,tr,wr]),yr=(0,kt.Z)(mi,{value:Gi}),ur=(0,Bt.Z)(yr,2),kr=ur[0],Cn=ur[1],di=St.useMemo(function(){var Ur,ni=Oi&&kr===null?[]:kr,ai=Vr(ni);return An==="combobox"&&ne((Ur=ai[0])===null||Ur===void 0?void 0:Ur.value)?[]:ai},[kr,Vr,An,Oi]),Ci=hr(di,wr),io=(0,Bt.Z)(Ci,2),bi=io[0],lo=io[1],xo=St.useMemo(function(){if(!An&&bi.length===1){var Ur=bi[0];if(Ur.value===null&&(Ur.label===null||Ur.label===void 0))return[]}return bi.map(function(ni){var ai;return(0,_t.Z)((0,_t.Z)({},ni),{},{label:(ai=typeof oi=="function"?oi(ni):ni.label)!==null&&ai!==void 0?ai:ni.value})})},[An,bi,oi]),Bo=St.useMemo(function(){return new Set(bi.map(function(Ur){return Ur.value}))},[bi]);St.useEffect(function(){if(An==="combobox"){var Ur,ni=(Ur=bi[0])===null||Ur===void 0?void 0:Ur.value;pi(Yt(ni)?String(ni):"")}},[bi]);var po=qe(function(Ur,ni){var ai=ni!=null?ni:Ur;return(0,ot.Z)((0,ot.Z)({},Ti.value,Ur),Ti.label,ai)}),na=St.useMemo(function(){if(An!=="tags")return mr;var Ur=(0,Re.Z)(mr),ni=function(gi){return wr.has(gi)};return(0,Re.Z)(bi).sort(function(ai,gi){return ai.value<gi.value?-1:1}).forEach(function(ai){var gi=ai.value;ni(gi)||Ur.push(po(gi,ai.label))}),Ur},[po,mr,wr,bi,An]),Ao=qt(na,Ti,Zi,Le,tn),on=St.useMemo(function(){return An!=="tags"||!Zi||Ao.some(function(Ur){return Ur[tn||"value"]===Zi})||Ao.some(function(Ur){return Ur[Ti.value]===Zi})?Ao:[po(Zi)].concat((0,Re.Z)(Ao))},[po,tn,An,Ao,Zi,Ti]),ra=function Ur(ni){var ai=(0,Re.Z)(ni).sort(function(gi,Vi){return fi(gi,Vi,{searchValue:Zi})});return ai.map(function(gi){return Array.isArray(gi.options)?(0,_t.Z)((0,_t.Z)({},gi),{},{options:gi.options.length>0?Ur(gi.options):gi.options}):gi})},za=St.useMemo(function(){return fi?ra(on):on},[on,fi,Zi]),Ya=St.useMemo(function(){return ge(za,{fieldNames:Ti,childrenAsData:$n})},[za,Ti,$n]),Hi=function(ni){var ai=Vr(ni);if(Cn(ai),ii&&(ai.length!==bi.length||ai.some(function(Dr,ws){var ia;return((ia=bi[ws])===null||ia===void 0?void 0:ia.value)!==(Dr==null?void 0:Dr.value)}))){var gi=Bi?ai:ai.map(function(Dr){return Dr.value}),Vi=ai.map(function(Dr){return Me(lo(Dr.value))});ii(Oi?gi:gi[0],Oi?Vi:Vi[0])}},Js=St.useState(null),ls=(0,Bt.Z)(Js,2),Ml=ls[0],Ai=ls[1],No=St.useState(0),Ga=(0,Bt.Z)(No,2),dl=Ga[0],uu=Ga[1],xs=Ir!==void 0?Ir:An!=="combobox",Br=St.useCallback(function(Ur,ni){var ai=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},gi=ai.source,Vi=gi===void 0?"keyboard":gi;uu(ni),kn&&An==="combobox"&&Ur!==null&&Vi==="keyboard"&&Ai(String(Ur))},[kn,An]),Gl=function(ni,ai,gi){var Vi=function(){var Tl,Qs=lo(ni);return[Bi?{label:Qs==null?void 0:Qs[Ti.label],value:ni,key:(Tl=Qs==null?void 0:Qs.key)!==null&&Tl!==void 0?Tl:ni}:ni,Me(Qs)]};if(ai&&lr){var Dr=Vi(),ws=(0,Bt.Z)(Dr,2),ia=ws[0],Uo=ws[1];lr(ia,Uo)}else if(!ai&&yn&&gi!=="clear"){var oo=Vi(),Ja=(0,Bt.Z)(oo,2),bs=Ja[0],Aa=Ja[1];yn(bs,Aa)}},hu=qe(function(Ur,ni){var ai,gi=Oi?ni.selected:!0;gi?ai=Oi?[].concat((0,Re.Z)(bi),[Ur]):[Ur]:ai=bi.filter(function(Vi){return Vi.value!==Ur}),Hi(ai),Gl(Ur,gi),An==="combobox"?Ai(""):(!Ue||cr)&&(pi(""),Ai(""))}),us=function(ni,ai){Hi(ni);var gi=ai.type,Vi=ai.values;(gi==="remove"||gi==="clear")&&Vi.forEach(function(Dr){Gl(Dr.value,!1,gi)})},Xo=function(ni,ai){if(pi(ni),Ai(null),ai.source==="submit"){var gi=(ni||"").trim();if(gi){var Vi=Array.from(new Set([].concat((0,Re.Z)(Bo),[gi])));Hi(Vi),Gl(gi,!0),pi("")}return}ai.source!=="blur"&&(An==="combobox"&&Hi(ni),Bn==null||Bn(ni))},Nu=function(ni){var ai=ni;An!=="tags"&&(ai=ni.map(function(Vi){var Dr=Jr.get(Vi);return Dr==null?void 0:Dr.value}).filter(function(Vi){return Vi!==void 0}));var gi=Array.from(new Set([].concat((0,Re.Z)(Bo),(0,Re.Z)(ai))));Hi(gi),gi.forEach(function(Vi){Gl(Vi,!0)})},rr=St.useMemo(function(){var Ur=Qr!==!1&&Gr!==!1;return(0,_t.Z)((0,_t.Z)({},sr),{},{flattenOptions:Ya,onActiveValue:Br,defaultActiveFirstOption:xs,onSelect:hu,menuItemSelectedIcon:Hr,rawValues:Bo,fieldNames:Ti,virtual:Ur,direction:ei,listHeight:mn,listItemHeight:gn,childrenAsData:$n,maxCount:Rr,optionRender:Hn})},[Rr,sr,Ya,Br,xs,hu,Hr,Bo,Ti,Qr,Gr,ei,mn,gn,$n,Hn]);return St.createElement(Ze.Provider,{value:rr},St.createElement(Ve,(0,ae.Z)({},wi,{id:Eo,prefixCls:Tn,ref:Ke,omitDomProps:pr,mode:An,displayValues:xo,onDisplayValuesChange:us,direction:ei,searchValue:Zi,onSearch:Xo,autoClearSearchValue:cr,onSearchSplit:Nu,dropdownMatchSelectWidth:Gr,OptionList:Sr,emptyOptions:!Ya.length,activeValue:Ml,activeDescendantId:"".concat(Eo,"_list_").concat(dl)})))}),vr=Rn;vr.Option=Sn,vr.OptGroup=an;var Nr=vr,Nn=Nr},63158:function(dn,fn,le){"use strict";var ae=le(14809),Re=le(4635),ot=le(50298),_t=le(62646),Bt=le(59301),vt=le(92310),gt=le.n(vt),kt=le(18929),bt=le(10228),St=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Tt=Bt.forwardRef(function(mt,xt){var ft,z=mt.prefixCls,tt=z===void 0?"rc-switch":z,at=mt.className,it=mt.checked,lt=mt.defaultChecked,ut=mt.disabled,dt=mt.loadingIcon,Pt=mt.checkedChildren,At=mt.unCheckedChildren,Dt=mt.onClick,Ft=mt.onChange,Nt=mt.onKeyDown,jt=(0,_t.Z)(mt,St),Gt=(0,kt.Z)(!1,{value:it,defaultValue:lt}),Wt=(0,ot.Z)(Gt,2),Jt=Wt[0],Ut=Wt[1];function Ht(Pe,Yt){var ne=Jt;return ut||(ne=Pe,Ut(ne),Ft==null||Ft(ne,Yt)),ne}function oe(Pe){Pe.which===bt.Z.LEFT?Ht(!1,Pe):Pe.which===bt.Z.RIGHT&&Ht(!0,Pe),Nt==null||Nt(Pe)}function se(Pe){var Yt=Ht(!Jt,Pe);Dt==null||Dt(Yt,Pe)}var ce=gt()(tt,at,(ft={},(0,Re.Z)(ft,"".concat(tt,"-checked"),Jt),(0,Re.Z)(ft,"".concat(tt,"-disabled"),ut),ft));return Bt.createElement("button",(0,ae.Z)({},jt,{type:"button",role:"switch","aria-checked":Jt,disabled:ut,className:ce,ref:xt,onKeyDown:oe,onClick:se}),dt,Bt.createElement("span",{className:"".concat(tt,"-inner")},Bt.createElement("span",{className:"".concat(tt,"-inner-checked")},Pt),Bt.createElement("span",{className:"".concat(tt,"-inner-unchecked")},At)))});Tt.displayName="Switch",fn.Z=Tt},22711:function(dn,fn,le){"use strict";le.r(fn),le.d(fn,{ResizableTextArea:function(){return Wt},default:function(){return oe}});var ae=le(14809),Re=le(4635),ot=le(20439),_t=le(95190),Bt=le(50298),vt=le(62646),gt=le(92310),kt=le.n(gt),bt=le(36901),St=le(66003),Tt=le(30292),mt=le(18929),xt=le(59301),ft=le(93664),z=le(29301),tt=le(34280),at=le(16089),it=`
|
|
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;
|
|
`,lt=["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"],ut={},dt;function Pt(se){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pe=se.getAttribute("id")||se.getAttribute("data-reactid")||se.getAttribute("name");if(ce&&ut[Pe])return ut[Pe];var Yt=window.getComputedStyle(se),ne=Yt.getPropertyValue("box-sizing")||Yt.getPropertyValue("-moz-box-sizing")||Yt.getPropertyValue("-webkit-box-sizing"),ve=parseFloat(Yt.getPropertyValue("padding-bottom"))+parseFloat(Yt.getPropertyValue("padding-top")),Se=parseFloat(Yt.getPropertyValue("border-bottom-width"))+parseFloat(Yt.getPropertyValue("border-top-width")),be=lt.map(function(pe){return"".concat(pe,":").concat(Yt.getPropertyValue(pe))}).join(";"),fe={sizingStyle:be,paddingSize:ve,borderSize:Se,boxSizing:ne};return ce&&Pe&&(ut[Pe]=fe),fe}function At(se){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Yt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;dt||(dt=document.createElement("textarea"),dt.setAttribute("tab-index","-1"),dt.setAttribute("aria-hidden","true"),dt.setAttribute("name","hiddenTextarea"),document.body.appendChild(dt)),se.getAttribute("wrap")?dt.setAttribute("wrap",se.getAttribute("wrap")):dt.removeAttribute("wrap");var ne=Pt(se,ce),ve=ne.paddingSize,Se=ne.borderSize,be=ne.boxSizing,fe=ne.sizingStyle;dt.setAttribute("style","".concat(fe,";").concat(it)),dt.value=se.value||se.placeholder||"";var pe=void 0,he=void 0,Ce,de=dt.scrollHeight;if(be==="border-box"?de+=Se:be==="content-box"&&(de-=ve),Pe!==null||Yt!==null){dt.value=" ";var ye=dt.scrollHeight-ve;Pe!==null&&(pe=ye*Pe,be==="border-box"&&(pe=pe+ve+Se),de=Math.max(pe,de)),Yt!==null&&(he=ye*Yt,be==="border-box"&&(he=he+ve+Se),Ce=de>he?"":"hidden",de=Math.min(he,de))}var Ne={height:de,overflowY:Ce,resize:"none"};return pe&&(Ne.minHeight=pe),he&&(Ne.maxHeight=he),Ne}var Dt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ft=0,Nt=1,jt=2,Gt=xt.forwardRef(function(se,ce){var Pe=se,Yt=Pe.prefixCls,ne=Pe.defaultValue,ve=Pe.value,Se=Pe.autoSize,be=Pe.onResize,fe=Pe.className,pe=Pe.style,he=Pe.disabled,Ce=Pe.onChange,de=Pe.onInternalAutoSize,ye=(0,vt.Z)(Pe,Dt),Ne=(0,mt.Z)(ne,{value:ve,postState:function(Sn){return Sn!=null?Sn:""}}),xe=(0,Bt.Z)(Ne,2),re=xe[0],Kt=xe[1],wt=function(Sn){Kt(Sn.target.value),Ce==null||Ce(Sn)},Lt=xt.useRef();xt.useImperativeHandle(ce,function(){return{textArea:Lt.current}});var Xt=xt.useMemo(function(){return Se&&(0,ft.Z)(Se)==="object"?[Se.minRows,Se.maxRows]:[]},[Se]),ee=(0,Bt.Z)(Xt,2),It=ee[0],Rt=ee[1],Vt=!!Se,$t=function(){try{if(document.activeElement===Lt.current){var Sn=Lt.current,_n=Sn.selectionStart,Xn=Sn.selectionEnd,Yn=Sn.scrollTop;Lt.current.setSelectionRange(_n,Xn),Lt.current.scrollTop=Yn}}catch(Er){}},ue=xt.useState(jt),ge=(0,Bt.Z)(ue,2),Me=ge[0],Ae=ge[1],Be=xt.useState(),Ze=(0,Bt.Z)(Be,2),Ye=Ze[0],Qe=Ze[1],He=function(){Ae(Ft)};(0,tt.Z)(function(){Vt&&He()},[ve,It,Rt,Vt]),(0,tt.Z)(function(){if(Me===Ft)Ae(Nt);else if(Me===Nt){var ln=At(Lt.current,!1,It,Rt);Ae(jt),Qe(ln)}else $t()},[Me]);var Ue=xt.useRef(),We=function(){at.Z.cancel(Ue.current)},Ve=function(Sn){Me===jt&&(be==null||be(Sn),Se&&(We(),Ue.current=(0,at.Z)(function(){He()})))};xt.useEffect(function(){return We},[]);var rn=Vt?Ye:null,an=(0,ot.Z)((0,ot.Z)({},pe),rn);return(Me===Ft||Me===Nt)&&(an.overflowY="hidden",an.overflowX="hidden"),xt.createElement(z.Z,{onResize:Ve,disabled:!(Se||be)},xt.createElement("textarea",(0,ae.Z)({},ye,{ref:Lt,style:an,className:kt()(Yt,fe,(0,Re.Z)({},"".concat(Yt,"-disabled"),he)),disabled:he,value:re,onChange:wt})))}),Wt=Gt,Jt=["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"],Ut=xt.forwardRef(function(se,ce){var Pe,Yt=se.defaultValue,ne=se.value,ve=se.onFocus,Se=se.onBlur,be=se.onChange,fe=se.allowClear,pe=se.maxLength,he=se.onCompositionStart,Ce=se.onCompositionEnd,de=se.suffix,ye=se.prefixCls,Ne=ye===void 0?"rc-textarea":ye,xe=se.showCount,re=se.count,Kt=se.className,wt=se.style,Lt=se.disabled,Xt=se.hidden,ee=se.classNames,It=se.styles,Rt=se.onResize,Vt=se.onClear,$t=se.onPressEnter,ue=se.readOnly,ge=se.autoSize,Me=se.onKeyDown,Ae=(0,vt.Z)(se,Jt),Be=(0,mt.Z)(Yt,{value:ne,defaultValue:Yt}),Ze=(0,Bt.Z)(Be,2),Ye=Ze[0],Qe=Ze[1],He=Ye==null?"":String(Ye),Ue=xt.useState(!1),We=(0,Bt.Z)(Ue,2),Ve=We[0],rn=We[1],an=xt.useRef(!1),ln=xt.useState(null),Sn=(0,Bt.Z)(ln,2),_n=Sn[0],Xn=Sn[1],Yn=(0,xt.useRef)(null),Er=(0,xt.useRef)(null),dr=function(){var vr;return(vr=Er.current)===null||vr===void 0?void 0:vr.textArea},Mr=function(){dr().focus()};(0,xt.useImperativeHandle)(ce,function(){var Rn;return{resizableTextArea:Er.current,focus:Mr,blur:function(){dr().blur()},nativeElement:((Rn=Yn.current)===null||Rn===void 0?void 0:Rn.nativeElement)||dr()}}),(0,xt.useEffect)(function(){rn(function(Rn){return!Lt&&Rn})},[Lt]);var Tr=xt.useState(null),Or=(0,Bt.Z)(Tr,2),Sr=Or[0],hr=Or[1];xt.useEffect(function(){if(Sr){var Rn;(Rn=dr()).setSelectionRange.apply(Rn,(0,_t.Z)(Sr))}},[Sr]);var zr=(0,St.Z)(re,xe),qt=(Pe=zr.max)!==null&&Pe!==void 0?Pe:pe,jn=Number(qt)>0,Jn=zr.strategy(He),zn=!!qt&&Jn>qt,Wn=function(vr,Nr){var Nn=Nr;!an.current&&zr.exceedFormatter&&zr.max&&zr.strategy(Nr)>zr.max&&(Nn=zr.exceedFormatter(Nr,{max:zr.max}),Nr!==Nn&&hr([dr().selectionStart||0,dr().selectionEnd||0])),Qe(Nn),(0,Tt.rJ)(vr.currentTarget,vr,be,Nn)},Kn=function(vr){an.current=!0,he==null||he(vr)},ir=function(vr){an.current=!1,Wn(vr,vr.currentTarget.value),Ce==null||Ce(vr)},Ar=function(vr){Wn(vr,vr.target.value)},sn=function(vr){vr.key==="Enter"&&$t&&$t(vr),Me==null||Me(vr)},qe=function(vr){rn(!0),ve==null||ve(vr)},$e=function(vr){rn(!1),Se==null||Se(vr)},un=function(vr){Qe(""),Mr(),(0,Tt.rJ)(dr(),vr,be)},or=de,Qn;zr.show&&(zr.showFormatter?Qn=zr.showFormatter({value:He,count:Jn,maxLength:qt}):Qn="".concat(Jn).concat(jn?" / ".concat(qt):""),or=xt.createElement(xt.Fragment,null,or,xt.createElement("span",{className:kt()("".concat(Ne,"-data-count"),ee==null?void 0:ee.count),style:It==null?void 0:It.count},Qn)));var pr=function(vr){var Nr;Rt==null||Rt(vr),(Nr=dr())!==null&&Nr!==void 0&&Nr.style.height&&Xn(!0)},xn=!ge&&!xe&&!fe;return xt.createElement(bt.BaseInput,{ref:Yn,value:He,allowClear:fe,handleReset:un,suffix:or,prefixCls:Ne,classNames:(0,ot.Z)((0,ot.Z)({},ee),{},{affixWrapper:kt()(ee==null?void 0:ee.affixWrapper,(0,Re.Z)((0,Re.Z)({},"".concat(Ne,"-show-count"),xe),"".concat(Ne,"-textarea-allow-clear"),fe))}),disabled:Lt,focused:Ve,className:kt()(Kt,zn&&"".concat(Ne,"-out-of-range")),style:(0,ot.Z)((0,ot.Z)({},wt),_n&&!xn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Qn=="string"?Qn:void 0}},hidden:Xt,readOnly:ue,onClear:Vt},xt.createElement(Wt,(0,ae.Z)({},Ae,{autoSize:ge,maxLength:pe,onKeyDown:sn,onChange:Ar,onFocus:qe,onBlur:$e,onCompositionStart:Kn,onCompositionEnd:ir,className:kt()(ee==null?void 0:ee.textarea),style:(0,ot.Z)((0,ot.Z)({},It==null?void 0:It.textarea),{},{resize:wt==null?void 0:wt.resize}),disabled:Lt,prefixCls:Ne,onResize:pr,ref:Er,readOnly:ue})))}),Ht=Ut,oe=Ht},639:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return ut}});var ae=le(14809),Re=le(4635),ot=le(20439),_t=le(50298),Bt=le(62646),vt=le(59301),gt=le(92310),kt=le.n(gt),bt=le(26112),St=le(30699),Tt=function(Pt){for(var At=Pt.prefixCls,Dt=Pt.level,Ft=Pt.isStart,Nt=Pt.isEnd,jt="".concat(At,"-indent-unit"),Gt=[],Wt=0;Wt<Dt;Wt+=1)Gt.push(vt.createElement("span",{key:Wt,className:kt()(jt,(0,Re.Z)((0,Re.Z)({},"".concat(jt,"-start"),Ft[Wt]),"".concat(jt,"-end"),Nt[Wt]))}));return vt.createElement("span",{"aria-hidden":"true",className:"".concat(At,"-indent")},Gt)},mt=vt.memo(Tt),xt=le(65065),ft=le(34061),z=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],tt="open",at="close",it="---",lt=function(Pt){var At,Dt,Ft,Nt=Pt.eventKey,jt=Pt.className,Gt=Pt.style,Wt=Pt.dragOver,Jt=Pt.dragOverGapTop,Ut=Pt.dragOverGapBottom,Ht=Pt.isLeaf,oe=Pt.isStart,se=Pt.isEnd,ce=Pt.expanded,Pe=Pt.selected,Yt=Pt.checked,ne=Pt.halfChecked,ve=Pt.loading,Se=Pt.domRef,be=Pt.active,fe=Pt.data,pe=Pt.onMouseMove,he=Pt.selectable,Ce=(0,Bt.Z)(Pt,z),de=vt.useContext(St.k),ye=vt.useContext(St.y),Ne=vt.useRef(null),xe=vt.useState(!1),re=(0,_t.Z)(xe,2),Kt=re[0],wt=re[1],Lt=!!(de.disabled||Pt.disabled||(At=ye.nodeDisabled)!==null&&At!==void 0&&At.call(ye,fe)),Xt=vt.useMemo(function(){return!de.checkable||Pt.checkable===!1?!1:de.checkable},[de.checkable,Pt.checkable]),ee=function(Jn){Lt||de.onNodeSelect(Jn,(0,ft.F)(Pt))},It=function(Jn){Lt||!Xt||Pt.disableCheckbox||de.onNodeCheck(Jn,(0,ft.F)(Pt),!Yt)},Rt=vt.useMemo(function(){return typeof he=="boolean"?he:de.selectable},[he,de.selectable]),Vt=function(Jn){de.onNodeClick(Jn,(0,ft.F)(Pt)),Rt?ee(Jn):It(Jn)},$t=function(Jn){de.onNodeDoubleClick(Jn,(0,ft.F)(Pt))},ue=function(Jn){de.onNodeMouseEnter(Jn,(0,ft.F)(Pt))},ge=function(Jn){de.onNodeMouseLeave(Jn,(0,ft.F)(Pt))},Me=function(Jn){de.onNodeContextMenu(Jn,(0,ft.F)(Pt))},Ae=vt.useMemo(function(){return!!(de.draggable&&(!de.draggable.nodeDraggable||de.draggable.nodeDraggable(fe)))},[de.draggable,fe]),Be=function(Jn){Jn.stopPropagation(),wt(!0),de.onNodeDragStart(Jn,Pt);try{Jn.dataTransfer.setData("text/plain","")}catch(zn){}},Ze=function(Jn){Jn.preventDefault(),Jn.stopPropagation(),de.onNodeDragEnter(Jn,Pt)},Ye=function(Jn){Jn.preventDefault(),Jn.stopPropagation(),de.onNodeDragOver(Jn,Pt)},Qe=function(Jn){Jn.stopPropagation(),de.onNodeDragLeave(Jn,Pt)},He=function(Jn){Jn.stopPropagation(),wt(!1),de.onNodeDragEnd(Jn,Pt)},Ue=function(Jn){Jn.preventDefault(),Jn.stopPropagation(),wt(!1),de.onNodeDrop(Jn,Pt)},We=function(Jn){ve||de.onNodeExpand(Jn,(0,ft.F)(Pt))},Ve=vt.useMemo(function(){var jn=(0,xt.Z)(de.keyEntities,Nt)||{},Jn=jn.children;return!!(Jn||[]).length},[de.keyEntities,Nt]),rn=vt.useMemo(function(){return Ht===!1?!1:Ht||!de.loadData&&!Ve||de.loadData&&Pt.loaded&&!Ve},[Ht,de.loadData,Ve,Pt.loaded]);vt.useEffect(function(){ve||typeof de.loadData=="function"&&ce&&!rn&&!Pt.loaded&&de.onNodeLoad((0,ft.F)(Pt))},[ve,de.loadData,de.onNodeLoad,ce,rn,Pt]);var an=vt.useMemo(function(){var jn;return(jn=de.draggable)!==null&&jn!==void 0&&jn.icon?vt.createElement("span",{className:"".concat(de.prefixCls,"-draggable-icon")},de.draggable.icon):null},[de.draggable]),ln=function(Jn){var zn=Pt.switcherIcon||de.switcherIcon;return typeof zn=="function"?zn((0,ot.Z)((0,ot.Z)({},Pt),{},{isLeaf:Jn})):zn},Sn=function(){if(rn){var Jn=ln(!0);return Jn!==!1?vt.createElement("span",{className:kt()("".concat(de.prefixCls,"-switcher"),"".concat(de.prefixCls,"-switcher-noop"))},Jn):null}var zn=ln(!1);return zn!==!1?vt.createElement("span",{onClick:We,className:kt()("".concat(de.prefixCls,"-switcher"),"".concat(de.prefixCls,"-switcher_").concat(ce?tt:at))},zn):null},_n=vt.useMemo(function(){if(!Xt)return null;var jn=typeof Xt!="boolean"?Xt:null;return vt.createElement("span",{className:kt()("".concat(de.prefixCls,"-checkbox"),(0,Re.Z)((0,Re.Z)((0,Re.Z)({},"".concat(de.prefixCls,"-checkbox-checked"),Yt),"".concat(de.prefixCls,"-checkbox-indeterminate"),!Yt&&ne),"".concat(de.prefixCls,"-checkbox-disabled"),Lt||Pt.disableCheckbox)),onClick:It,role:"checkbox","aria-checked":ne?"mixed":Yt,"aria-disabled":Lt||Pt.disableCheckbox,"aria-label":"Select ".concat(typeof Pt.title=="string"?Pt.title:"tree node")},jn)},[Xt,Yt,ne,Lt,Pt.disableCheckbox,Pt.title]),Xn=vt.useMemo(function(){return rn?null:ce?tt:at},[rn,ce]),Yn=vt.useMemo(function(){return vt.createElement("span",{className:kt()("".concat(de.prefixCls,"-iconEle"),"".concat(de.prefixCls,"-icon__").concat(Xn||"docu"),(0,Re.Z)({},"".concat(de.prefixCls,"-icon_loading"),ve))})},[de.prefixCls,Xn,ve]),Er=vt.useMemo(function(){var jn=!!de.draggable,Jn=!Pt.disabled&&jn&&de.dragOverNodeKey===Nt;return Jn?de.dropIndicatorRender({dropPosition:de.dropPosition,dropLevelOffset:de.dropLevelOffset,indent:de.indent,prefixCls:de.prefixCls,direction:de.direction}):null},[de.dropPosition,de.dropLevelOffset,de.indent,de.prefixCls,de.direction,de.draggable,de.dragOverNodeKey,de.dropIndicatorRender]),dr=vt.useMemo(function(){var jn=Pt.title,Jn=jn===void 0?it:jn,zn="".concat(de.prefixCls,"-node-content-wrapper"),Wn;if(de.showIcon){var Kn=Pt.icon||de.icon;Wn=Kn?vt.createElement("span",{className:kt()("".concat(de.prefixCls,"-iconEle"),"".concat(de.prefixCls,"-icon__customize"))},typeof Kn=="function"?Kn(Pt):Kn):Yn}else de.loadData&&ve&&(Wn=Yn);var ir;return typeof Jn=="function"?ir=Jn(fe):de.titleRender?ir=de.titleRender(fe):ir=Jn,vt.createElement("span",{ref:Ne,title:typeof Jn=="string"?Jn:"",className:kt()(zn,"".concat(zn,"-").concat(Xn||"normal"),(0,Re.Z)({},"".concat(de.prefixCls,"-node-selected"),!Lt&&(Pe||Kt))),onMouseEnter:ue,onMouseLeave:ge,onContextMenu:Me,onClick:Vt,onDoubleClick:$t},Wn,vt.createElement("span",{className:"".concat(de.prefixCls,"-title")},ir),Er)},[de.prefixCls,de.showIcon,Pt,de.icon,Yn,de.titleRender,fe,Xn,ue,ge,Me,Vt,$t]),Mr=(0,bt.Z)(Ce,{aria:!0,data:!0}),Tr=(0,xt.Z)(de.keyEntities,Nt)||{},Or=Tr.level,Sr=se[se.length-1],hr=!Lt&&Ae,zr=de.draggingNodeKey===Nt,qt=he!==void 0?{"aria-selected":!!he}:void 0;return vt.createElement("div",(0,ae.Z)({ref:Se,role:"treeitem","aria-expanded":Ht?void 0:ce,className:kt()(jt,"".concat(de.prefixCls,"-treenode"),(Ft={},(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)(Ft,"".concat(de.prefixCls,"-treenode-disabled"),Lt),"".concat(de.prefixCls,"-treenode-switcher-").concat(ce?"open":"close"),!Ht),"".concat(de.prefixCls,"-treenode-checkbox-checked"),Yt),"".concat(de.prefixCls,"-treenode-checkbox-indeterminate"),ne),"".concat(de.prefixCls,"-treenode-selected"),Pe),"".concat(de.prefixCls,"-treenode-loading"),ve),"".concat(de.prefixCls,"-treenode-active"),be),"".concat(de.prefixCls,"-treenode-leaf-last"),Sr),"".concat(de.prefixCls,"-treenode-draggable"),Ae),"dragging",zr),(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)(Ft,"drop-target",de.dropTargetKey===Nt),"drop-container",de.dropContainerKey===Nt),"drag-over",!Lt&&Wt),"drag-over-gap-top",!Lt&&Jt),"drag-over-gap-bottom",!Lt&&Ut),"filter-node",(Dt=de.filterTreeNode)===null||Dt===void 0?void 0:Dt.call(de,(0,ft.F)(Pt))),"".concat(de.prefixCls,"-treenode-leaf"),rn))),style:Gt,draggable:hr,onDragStart:hr?Be:void 0,onDragEnter:Ae?Ze:void 0,onDragOver:Ae?Ye:void 0,onDragLeave:Ae?Qe:void 0,onDrop:Ae?Ue:void 0,onDragEnd:Ae?He:void 0,onMouseMove:pe},qt,Mr),vt.createElement(mt,{prefixCls:de.prefixCls,level:Or,isStart:oe,isEnd:se}),an,Sn(),_n,dr)};lt.isTreeNode=1;var ut=lt},30699:function(dn,fn,le){"use strict";le.d(fn,{k:function(){return Re},y:function(){return ot}});var ae=le(59301),Re=ae.createContext(null),ot=ae.createContext({})},29530:function(dn,fn,le){"use strict";le.d(fn,{OF:function(){return Nt.Z},y6:function(){return at.y},ZP:function(){return Lt}});var ae=le(14809),Re=le(93664),ot=le(20439),_t=le(95190),Bt=le(99153),vt=le(84851),gt=le(13028),kt=le(19257),bt=le(93046),St=le(4635),Tt=le(92310),mt=le.n(Tt),xt=le(10228),ft=le(26112),z=le(48736),tt=le(59301),at=le(30699),it=function(ee){var It=ee.dropPosition,Rt=ee.dropLevelOffset,Vt=ee.indent,$t={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(It){case-1:$t.top=0,$t.left=-Rt*Vt;break;case 1:$t.bottom=0,$t.left=-Rt*Vt;break;case 0:$t.bottom=0,$t.left=Vt;break}return tt.createElement("div",{style:$t})},lt=it;function ut(Xt){if(Xt==null)throw new TypeError("Cannot destructure "+Xt)}var dt=le(50298),Pt=le(62646),At=le(34280),Dt=le(65283),Ft=le(77900),Nt=le(639);function jt(Xt,ee){var It=tt.useState(!1),Rt=(0,dt.Z)(It,2),Vt=Rt[0],$t=Rt[1];(0,At.Z)(function(){if(Vt)return Xt(),function(){ee()}},[Vt]),(0,At.Z)(function(){return $t(!0),function(){$t(!1)}},[])}var Gt=jt,Wt=le(34061),Jt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ut=tt.forwardRef(function(Xt,ee){var It=Xt.className,Rt=Xt.style,Vt=Xt.motion,$t=Xt.motionNodes,ue=Xt.motionType,ge=Xt.onMotionStart,Me=Xt.onMotionEnd,Ae=Xt.active,Be=Xt.treeNodeRequiredProps,Ze=(0,Pt.Z)(Xt,Jt),Ye=tt.useState(!0),Qe=(0,dt.Z)(Ye,2),He=Qe[0],Ue=Qe[1],We=tt.useContext(at.k),Ve=We.prefixCls,rn=$t&&ue!=="hide";(0,At.Z)(function(){$t&&rn!==He&&Ue(rn)},[$t]);var an=function(){$t&&ge()},ln=tt.useRef(!1),Sn=function(){$t&&!ln.current&&(ln.current=!0,Me())};Gt(an,Sn);var _n=function(Yn){rn===Yn&&Sn()};return $t?tt.createElement(Ft.default,(0,ae.Z)({ref:ee,visible:He},Vt,{motionAppear:ue==="show",onVisibleChanged:_n}),function(Xn,Yn){var Er=Xn.className,dr=Xn.style;return tt.createElement("div",{ref:Yn,className:mt()("".concat(Ve,"-treenode-motion"),Er),style:dr},$t.map(function(Mr){var Tr=Object.assign({},(ut(Mr.data),Mr.data)),Or=Mr.title,Sr=Mr.key,hr=Mr.isStart,zr=Mr.isEnd;delete Tr.children;var qt=(0,Wt.H8)(Sr,Be);return tt.createElement(Nt.Z,(0,ae.Z)({},Tr,qt,{title:Or,active:Ae,data:Mr.data,key:Sr,isStart:hr,isEnd:zr}))}))}):tt.createElement(Nt.Z,(0,ae.Z)({domRef:ee,className:It,style:Rt},Ze,{active:Ae}))}),Ht=Ut;function oe(){var Xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],It=Xt.length,Rt=ee.length;if(Math.abs(It-Rt)!==1)return{add:!1,key:null};function Vt($t,ue){var ge=new Map;$t.forEach(function(Ae){ge.set(Ae,!0)});var Me=ue.filter(function(Ae){return!ge.has(Ae)});return Me.length===1?Me[0]:null}return It<Rt?{add:!0,key:Vt(Xt,ee)}:{add:!1,key:Vt(ee,Xt)}}function se(Xt,ee,It){var Rt=Xt.findIndex(function(ge){return ge.key===It}),Vt=Xt[Rt+1],$t=ee.findIndex(function(ge){return ge.key===It});if(Vt){var ue=ee.findIndex(function(ge){return ge.key===Vt.key});return ee.slice($t+1,ue)}return ee.slice($t+1)}var ce=["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"],Pe={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Yt=function(){},ne="RC_TREE_MOTION_".concat(Math.random()),ve={key:ne},Se={key:ne,level:0,index:0,pos:"0",node:ve,nodes:[ve]},be={parent:null,children:[],pos:Se.pos,data:ve,title:null,key:ne,isStart:[],isEnd:[]};function fe(Xt,ee,It,Rt){return ee===!1||!It?Xt:Xt.slice(0,Math.ceil(It/Rt)+1)}function pe(Xt){var ee=Xt.key,It=Xt.pos;return(0,Wt.km)(ee,It)}function he(Xt){for(var ee=String(Xt.data.key),It=Xt;It.parent;)It=It.parent,ee="".concat(It.data.key," > ").concat(ee);return ee}var Ce=tt.forwardRef(function(Xt,ee){var It=Xt.prefixCls,Rt=Xt.data,Vt=Xt.selectable,$t=Xt.checkable,ue=Xt.expandedKeys,ge=Xt.selectedKeys,Me=Xt.checkedKeys,Ae=Xt.loadedKeys,Be=Xt.loadingKeys,Ze=Xt.halfCheckedKeys,Ye=Xt.keyEntities,Qe=Xt.disabled,He=Xt.dragging,Ue=Xt.dragOverNodeKey,We=Xt.dropPosition,Ve=Xt.motion,rn=Xt.height,an=Xt.itemHeight,ln=Xt.virtual,Sn=Xt.scrollWidth,_n=Xt.focusable,Xn=Xt.activeItem,Yn=Xt.focused,Er=Xt.tabIndex,dr=Xt.onKeyDown,Mr=Xt.onFocus,Tr=Xt.onBlur,Or=Xt.onActiveChange,Sr=Xt.onListChangeStart,hr=Xt.onListChangeEnd,zr=(0,Pt.Z)(Xt,ce),qt=tt.useRef(null),jn=tt.useRef(null);tt.useImperativeHandle(ee,function(){return{scrollTo:function(On){qt.current.scrollTo(On)},getIndentWidth:function(){return jn.current.offsetWidth}}});var Jn=tt.useState(ue),zn=(0,dt.Z)(Jn,2),Wn=zn[0],Kn=zn[1],ir=tt.useState(Rt),Ar=(0,dt.Z)(ir,2),sn=Ar[0],qe=Ar[1],$e=tt.useState(Rt),un=(0,dt.Z)($e,2),or=un[0],Qn=un[1],pr=tt.useState([]),xn=(0,dt.Z)(pr,2),Rn=xn[0],vr=xn[1],Nr=tt.useState(null),Nn=(0,dt.Z)(Nr,2),Oe=Nn[0],Ke=Nn[1],Ln=tt.useRef(Rt);Ln.current=Rt;function An(){var kn=Ln.current;qe(kn),Qn(kn),vr([]),Ke(null),hr()}(0,At.Z)(function(){Kn(ue);var kn=oe(Wn,ue);if(kn.key!==null)if(kn.add){var On=sn.findIndex(function(lr){var yn=lr.key;return yn===kn.key}),er=fe(se(sn,Rt,kn.key),ln,rn,an),Fn=sn.slice();Fn.splice(On+1,0,be),Qn(Fn),vr(er),Ke("show")}else{var Bn=Rt.findIndex(function(lr){var yn=lr.key;return yn===kn.key}),Un=fe(se(Rt,sn,kn.key),ln,rn,an),cr=Rt.slice();cr.splice(Bn+1,0,be),Qn(cr),vr(Un),Ke("hide")}else sn!==Rt&&(qe(Rt),Qn(Rt))},[ue,Rt]),tt.useEffect(function(){He||An()},[He]);var en=Ve?or:Rt,Tn={expandedKeys:ue,selectedKeys:ge,loadedKeys:Ae,loadingKeys:Be,checkedKeys:Me,halfCheckedKeys:Ze,dragOverNodeKey:Ue,dropPosition:We,keyEntities:Ye};return tt.createElement(tt.Fragment,null,Yn&&Xn&&tt.createElement("span",{style:Pe,"aria-live":"assertive"},he(Xn)),tt.createElement("div",null,tt.createElement("input",{style:Pe,disabled:_n===!1||Qe,tabIndex:_n!==!1?Er:null,onKeyDown:dr,onFocus:Mr,onBlur:Tr,value:"",onChange:Yt,"aria-label":"for screen reader"})),tt.createElement("div",{className:"".concat(It,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},tt.createElement("div",{className:"".concat(It,"-indent")},tt.createElement("div",{ref:jn,className:"".concat(It,"-indent-unit")}))),tt.createElement(Dt.Z,(0,ae.Z)({},zr,{data:en,itemKey:pe,height:rn,fullHeight:!1,virtual:ln,itemHeight:an,scrollWidth:Sn,prefixCls:"".concat(It,"-list"),ref:qt,role:"tree",onVisibleChange:function(On){On.every(function(er){return pe(er)!==ne})&&An()}}),function(kn){var On=kn.pos,er=Object.assign({},(ut(kn.data),kn.data)),Fn=kn.title,Bn=kn.key,Un=kn.isStart,cr=kn.isEnd,lr=(0,Wt.km)(Bn,On);delete er.key,delete er.children;var yn=(0,Wt.H8)(lr,Tn);return tt.createElement(Ht,(0,ae.Z)({},er,yn,{title:Fn,active:!!Xn&&Bn===Xn.key,pos:On,data:kn.data,isStart:Un,isEnd:cr,motion:Ve,motionNodes:Bn===ne?Rn:null,motionType:Oe,onMotionStart:Sr,onMotionEnd:An,treeNodeRequiredProps:Tn,onMouseMove:function(){Or(null)}}))}))}),de=Ce,ye=le(82661),Ne=le(34643),xe=le(65065),re=10,Kt=function(Xt){(0,kt.Z)(It,Xt);var ee=(0,bt.Z)(It);function It(){var Rt;(0,Bt.Z)(this,It);for(var Vt=arguments.length,$t=new Array(Vt),ue=0;ue<Vt;ue++)$t[ue]=arguments[ue];return Rt=ee.call.apply(ee,[this].concat($t)),(0,St.Z)((0,gt.Z)(Rt),"destroyed",!1),(0,St.Z)((0,gt.Z)(Rt),"delayedDragEnterLogic",void 0),(0,St.Z)((0,gt.Z)(Rt),"loadingRetryTimes",{}),(0,St.Z)((0,gt.Z)(Rt),"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,Wt.w$)()}),(0,St.Z)((0,gt.Z)(Rt),"dragStartMousePosition",null),(0,St.Z)((0,gt.Z)(Rt),"dragNodeProps",null),(0,St.Z)((0,gt.Z)(Rt),"currentMouseOverDroppableNodeKey",null),(0,St.Z)((0,gt.Z)(Rt),"listRef",tt.createRef()),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragStart",function(ge,Me){var Ae=Rt.state,Be=Ae.expandedKeys,Ze=Ae.keyEntities,Ye=Rt.props.onDragStart,Qe=Me.eventKey;Rt.dragNodeProps=Me,Rt.dragStartMousePosition={x:ge.clientX,y:ge.clientY};var He=(0,ye._5)(Be,Qe);Rt.setState({draggingNodeKey:Qe,dragChildrenKeys:(0,ye.wA)(Qe,Ze),indent:Rt.listRef.current.getIndentWidth()}),Rt.setExpandedKeys(He),window.addEventListener("dragend",Rt.onWindowDragEnd),Ye==null||Ye({event:ge,node:(0,Wt.F)(Me)})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragEnter",function(ge,Me){var Ae=Rt.state,Be=Ae.expandedKeys,Ze=Ae.keyEntities,Ye=Ae.dragChildrenKeys,Qe=Ae.flattenNodes,He=Ae.indent,Ue=Rt.props,We=Ue.onDragEnter,Ve=Ue.onExpand,rn=Ue.allowDrop,an=Ue.direction,ln=Me.pos,Sn=Me.eventKey;if(Rt.currentMouseOverDroppableNodeKey!==Sn&&(Rt.currentMouseOverDroppableNodeKey=Sn),!Rt.dragNodeProps){Rt.resetDragState();return}var _n=(0,ye.OM)(ge,Rt.dragNodeProps,Me,He,Rt.dragStartMousePosition,rn,Qe,Ze,Be,an),Xn=_n.dropPosition,Yn=_n.dropLevelOffset,Er=_n.dropTargetKey,dr=_n.dropContainerKey,Mr=_n.dropTargetPos,Tr=_n.dropAllowed,Or=_n.dragOverNodeKey;if(Ye.includes(Er)||!Tr){Rt.resetDragState();return}if(Rt.delayedDragEnterLogic||(Rt.delayedDragEnterLogic={}),Object.keys(Rt.delayedDragEnterLogic).forEach(function(Sr){clearTimeout(Rt.delayedDragEnterLogic[Sr])}),Rt.dragNodeProps.eventKey!==Me.eventKey&&(ge.persist(),Rt.delayedDragEnterLogic[ln]=window.setTimeout(function(){if(Rt.state.draggingNodeKey!==null){var Sr=(0,_t.Z)(Be),hr=(0,xe.Z)(Ze,Me.eventKey);hr&&(hr.children||[]).length&&(Sr=(0,ye.L0)(Be,Me.eventKey)),Rt.props.hasOwnProperty("expandedKeys")||Rt.setExpandedKeys(Sr),Ve==null||Ve(Sr,{node:(0,Wt.F)(Me),expanded:!0,nativeEvent:ge.nativeEvent})}},800)),Rt.dragNodeProps.eventKey===Er&&Yn===0){Rt.resetDragState();return}Rt.setState({dragOverNodeKey:Or,dropPosition:Xn,dropLevelOffset:Yn,dropTargetKey:Er,dropContainerKey:dr,dropTargetPos:Mr,dropAllowed:Tr}),We==null||We({event:ge,node:(0,Wt.F)(Me),expandedKeys:Be})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragOver",function(ge,Me){var Ae=Rt.state,Be=Ae.dragChildrenKeys,Ze=Ae.flattenNodes,Ye=Ae.keyEntities,Qe=Ae.expandedKeys,He=Ae.indent,Ue=Rt.props,We=Ue.onDragOver,Ve=Ue.allowDrop,rn=Ue.direction;if(Rt.dragNodeProps){var an=(0,ye.OM)(ge,Rt.dragNodeProps,Me,He,Rt.dragStartMousePosition,Ve,Ze,Ye,Qe,rn),ln=an.dropPosition,Sn=an.dropLevelOffset,_n=an.dropTargetKey,Xn=an.dropContainerKey,Yn=an.dropTargetPos,Er=an.dropAllowed,dr=an.dragOverNodeKey;Be.includes(_n)||!Er||(Rt.dragNodeProps.eventKey===_n&&Sn===0?Rt.state.dropPosition===null&&Rt.state.dropLevelOffset===null&&Rt.state.dropTargetKey===null&&Rt.state.dropContainerKey===null&&Rt.state.dropTargetPos===null&&Rt.state.dropAllowed===!1&&Rt.state.dragOverNodeKey===null||Rt.resetDragState():ln===Rt.state.dropPosition&&Sn===Rt.state.dropLevelOffset&&_n===Rt.state.dropTargetKey&&Xn===Rt.state.dropContainerKey&&Yn===Rt.state.dropTargetPos&&Er===Rt.state.dropAllowed&&dr===Rt.state.dragOverNodeKey||Rt.setState({dropPosition:ln,dropLevelOffset:Sn,dropTargetKey:_n,dropContainerKey:Xn,dropTargetPos:Yn,dropAllowed:Er,dragOverNodeKey:dr}),We==null||We({event:ge,node:(0,Wt.F)(Me)}))}}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragLeave",function(ge,Me){Rt.currentMouseOverDroppableNodeKey===Me.eventKey&&!ge.currentTarget.contains(ge.relatedTarget)&&(Rt.resetDragState(),Rt.currentMouseOverDroppableNodeKey=null);var Ae=Rt.props.onDragLeave;Ae==null||Ae({event:ge,node:(0,Wt.F)(Me)})}),(0,St.Z)((0,gt.Z)(Rt),"onWindowDragEnd",function(ge){Rt.onNodeDragEnd(ge,null,!0),window.removeEventListener("dragend",Rt.onWindowDragEnd)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragEnd",function(ge,Me){var Ae=Rt.props.onDragEnd;Rt.setState({dragOverNodeKey:null}),Rt.cleanDragState(),Ae==null||Ae({event:ge,node:(0,Wt.F)(Me)}),Rt.dragNodeProps=null,window.removeEventListener("dragend",Rt.onWindowDragEnd)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDrop",function(ge,Me){var Ae,Be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ze=Rt.state,Ye=Ze.dragChildrenKeys,Qe=Ze.dropPosition,He=Ze.dropTargetKey,Ue=Ze.dropTargetPos,We=Ze.dropAllowed;if(We){var Ve=Rt.props.onDrop;if(Rt.setState({dragOverNodeKey:null}),Rt.cleanDragState(),He!==null){var rn=(0,ot.Z)((0,ot.Z)({},(0,Wt.H8)(He,Rt.getTreeNodeRequiredProps())),{},{active:((Ae=Rt.getActiveItem())===null||Ae===void 0?void 0:Ae.key)===He,data:(0,xe.Z)(Rt.state.keyEntities,He).node}),an=Ye.includes(He);(0,z.ZP)(!an,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var ln=(0,ye.yx)(Ue),Sn={event:ge,node:(0,Wt.F)(rn),dragNode:Rt.dragNodeProps?(0,Wt.F)(Rt.dragNodeProps):null,dragNodesKeys:[Rt.dragNodeProps.eventKey].concat(Ye),dropToGap:Qe!==0,dropPosition:Qe+Number(ln[ln.length-1])};Be||Ve==null||Ve(Sn),Rt.dragNodeProps=null}}}),(0,St.Z)((0,gt.Z)(Rt),"cleanDragState",function(){var ge=Rt.state.draggingNodeKey;ge!==null&&Rt.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Rt.dragStartMousePosition=null,Rt.currentMouseOverDroppableNodeKey=null}),(0,St.Z)((0,gt.Z)(Rt),"triggerExpandActionExpand",function(ge,Me){var Ae=Rt.state,Be=Ae.expandedKeys,Ze=Ae.flattenNodes,Ye=Me.expanded,Qe=Me.key,He=Me.isLeaf;if(!(He||ge.shiftKey||ge.metaKey||ge.ctrlKey)){var Ue=Ze.filter(function(Ve){return Ve.key===Qe})[0],We=(0,Wt.F)((0,ot.Z)((0,ot.Z)({},(0,Wt.H8)(Qe,Rt.getTreeNodeRequiredProps())),{},{data:Ue.data}));Rt.setExpandedKeys(Ye?(0,ye._5)(Be,Qe):(0,ye.L0)(Be,Qe)),Rt.onNodeExpand(ge,We)}}),(0,St.Z)((0,gt.Z)(Rt),"onNodeClick",function(ge,Me){var Ae=Rt.props,Be=Ae.onClick,Ze=Ae.expandAction;Ze==="click"&&Rt.triggerExpandActionExpand(ge,Me),Be==null||Be(ge,Me)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDoubleClick",function(ge,Me){var Ae=Rt.props,Be=Ae.onDoubleClick,Ze=Ae.expandAction;Ze==="doubleClick"&&Rt.triggerExpandActionExpand(ge,Me),Be==null||Be(ge,Me)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeSelect",function(ge,Me){var Ae=Rt.state.selectedKeys,Be=Rt.state,Ze=Be.keyEntities,Ye=Be.fieldNames,Qe=Rt.props,He=Qe.onSelect,Ue=Qe.multiple,We=Me.selected,Ve=Me[Ye.key],rn=!We;rn?Ue?Ae=(0,ye.L0)(Ae,Ve):Ae=[Ve]:Ae=(0,ye._5)(Ae,Ve);var an=Ae.map(function(ln){var Sn=(0,xe.Z)(Ze,ln);return Sn?Sn.node:null}).filter(Boolean);Rt.setUncontrolledState({selectedKeys:Ae}),He==null||He(Ae,{event:"select",selected:rn,node:Me,selectedNodes:an,nativeEvent:ge.nativeEvent})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeCheck",function(ge,Me,Ae){var Be=Rt.state,Ze=Be.keyEntities,Ye=Be.checkedKeys,Qe=Be.halfCheckedKeys,He=Rt.props,Ue=He.checkStrictly,We=He.onCheck,Ve=Me.key,rn,an={event:"check",node:Me,checked:Ae,nativeEvent:ge.nativeEvent};if(Ue){var ln=Ae?(0,ye.L0)(Ye,Ve):(0,ye._5)(Ye,Ve),Sn=(0,ye._5)(Qe,Ve);rn={checked:ln,halfChecked:Sn},an.checkedNodes=ln.map(function(Mr){return(0,xe.Z)(Ze,Mr)}).filter(Boolean).map(function(Mr){return Mr.node}),Rt.setUncontrolledState({checkedKeys:ln})}else{var _n=(0,Ne.S)([].concat((0,_t.Z)(Ye),[Ve]),!0,Ze),Xn=_n.checkedKeys,Yn=_n.halfCheckedKeys;if(!Ae){var Er=new Set(Xn);Er.delete(Ve);var dr=(0,Ne.S)(Array.from(Er),{checked:!1,halfCheckedKeys:Yn},Ze);Xn=dr.checkedKeys,Yn=dr.halfCheckedKeys}rn=Xn,an.checkedNodes=[],an.checkedNodesPositions=[],an.halfCheckedKeys=Yn,Xn.forEach(function(Mr){var Tr=(0,xe.Z)(Ze,Mr);if(Tr){var Or=Tr.node,Sr=Tr.pos;an.checkedNodes.push(Or),an.checkedNodesPositions.push({node:Or,pos:Sr})}}),Rt.setUncontrolledState({checkedKeys:Xn},!1,{halfCheckedKeys:Yn})}We==null||We(rn,an)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeLoad",function(ge){var Me,Ae=ge.key,Be=Rt.state.keyEntities,Ze=(0,xe.Z)(Be,Ae);if(!(Ze!=null&&(Me=Ze.children)!==null&&Me!==void 0&&Me.length)){var Ye=new Promise(function(Qe,He){Rt.setState(function(Ue){var We=Ue.loadedKeys,Ve=We===void 0?[]:We,rn=Ue.loadingKeys,an=rn===void 0?[]:rn,ln=Rt.props,Sn=ln.loadData,_n=ln.onLoad;if(!Sn||Ve.includes(Ae)||an.includes(Ae))return null;var Xn=Sn(ge);return Xn.then(function(){var Yn=Rt.state.loadedKeys,Er=(0,ye.L0)(Yn,Ae);_n==null||_n(Er,{event:"load",node:ge}),Rt.setUncontrolledState({loadedKeys:Er}),Rt.setState(function(dr){return{loadingKeys:(0,ye._5)(dr.loadingKeys,Ae)}}),Qe()}).catch(function(Yn){if(Rt.setState(function(dr){return{loadingKeys:(0,ye._5)(dr.loadingKeys,Ae)}}),Rt.loadingRetryTimes[Ae]=(Rt.loadingRetryTimes[Ae]||0)+1,Rt.loadingRetryTimes[Ae]>=re){var Er=Rt.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Rt.setUncontrolledState({loadedKeys:(0,ye.L0)(Er,Ae)}),Qe()}He(Yn)}),{loadingKeys:(0,ye.L0)(an,Ae)}})});return Ye.catch(function(){}),Ye}}),(0,St.Z)((0,gt.Z)(Rt),"onNodeMouseEnter",function(ge,Me){var Ae=Rt.props.onMouseEnter;Ae==null||Ae({event:ge,node:Me})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeMouseLeave",function(ge,Me){var Ae=Rt.props.onMouseLeave;Ae==null||Ae({event:ge,node:Me})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeContextMenu",function(ge,Me){var Ae=Rt.props.onRightClick;Ae&&(ge.preventDefault(),Ae({event:ge,node:Me}))}),(0,St.Z)((0,gt.Z)(Rt),"onFocus",function(){var ge=Rt.props.onFocus;Rt.setState({focused:!0});for(var Me=arguments.length,Ae=new Array(Me),Be=0;Be<Me;Be++)Ae[Be]=arguments[Be];ge==null||ge.apply(void 0,Ae)}),(0,St.Z)((0,gt.Z)(Rt),"onBlur",function(){var ge=Rt.props.onBlur;Rt.setState({focused:!1}),Rt.onActiveChange(null);for(var Me=arguments.length,Ae=new Array(Me),Be=0;Be<Me;Be++)Ae[Be]=arguments[Be];ge==null||ge.apply(void 0,Ae)}),(0,St.Z)((0,gt.Z)(Rt),"getTreeNodeRequiredProps",function(){var ge=Rt.state,Me=ge.expandedKeys,Ae=ge.selectedKeys,Be=ge.loadedKeys,Ze=ge.loadingKeys,Ye=ge.checkedKeys,Qe=ge.halfCheckedKeys,He=ge.dragOverNodeKey,Ue=ge.dropPosition,We=ge.keyEntities;return{expandedKeys:Me||[],selectedKeys:Ae||[],loadedKeys:Be||[],loadingKeys:Ze||[],checkedKeys:Ye||[],halfCheckedKeys:Qe||[],dragOverNodeKey:He,dropPosition:Ue,keyEntities:We}}),(0,St.Z)((0,gt.Z)(Rt),"setExpandedKeys",function(ge){var Me=Rt.state,Ae=Me.treeData,Be=Me.fieldNames,Ze=(0,Wt.oH)(Ae,ge,Be);Rt.setUncontrolledState({expandedKeys:ge,flattenNodes:Ze},!0)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeExpand",function(ge,Me){var Ae=Rt.state.expandedKeys,Be=Rt.state,Ze=Be.listChanging,Ye=Be.fieldNames,Qe=Rt.props,He=Qe.onExpand,Ue=Qe.loadData,We=Me.expanded,Ve=Me[Ye.key];if(!Ze){var rn=Ae.includes(Ve),an=!We;if((0,z.ZP)(We&&rn||!We&&!rn,"Expand state not sync with index check"),Ae=an?(0,ye.L0)(Ae,Ve):(0,ye._5)(Ae,Ve),Rt.setExpandedKeys(Ae),He==null||He(Ae,{node:Me,expanded:an,nativeEvent:ge.nativeEvent}),an&&Ue){var ln=Rt.onNodeLoad(Me);ln&&ln.then(function(){var Sn=(0,Wt.oH)(Rt.state.treeData,Ae,Ye);Rt.setUncontrolledState({flattenNodes:Sn})}).catch(function(){var Sn=Rt.state.expandedKeys,_n=(0,ye._5)(Sn,Ve);Rt.setExpandedKeys(_n)})}}}),(0,St.Z)((0,gt.Z)(Rt),"onListChangeStart",function(){Rt.setUncontrolledState({listChanging:!0})}),(0,St.Z)((0,gt.Z)(Rt),"onListChangeEnd",function(){setTimeout(function(){Rt.setUncontrolledState({listChanging:!1})})}),(0,St.Z)((0,gt.Z)(Rt),"onActiveChange",function(ge){var Me=Rt.state.activeKey,Ae=Rt.props,Be=Ae.onActiveChange,Ze=Ae.itemScrollOffset,Ye=Ze===void 0?0:Ze;Me!==ge&&(Rt.setState({activeKey:ge}),ge!==null&&Rt.scrollTo({key:ge,offset:Ye}),Be==null||Be(ge))}),(0,St.Z)((0,gt.Z)(Rt),"getActiveItem",function(){var ge=Rt.state,Me=ge.activeKey,Ae=ge.flattenNodes;return Me===null?null:Ae.find(function(Be){var Ze=Be.key;return Ze===Me})||null}),(0,St.Z)((0,gt.Z)(Rt),"offsetActiveKey",function(ge){var Me=Rt.state,Ae=Me.flattenNodes,Be=Me.activeKey,Ze=Ae.findIndex(function(He){var Ue=He.key;return Ue===Be});Ze===-1&&ge<0&&(Ze=Ae.length),Ze=(Ze+ge+Ae.length)%Ae.length;var Ye=Ae[Ze];if(Ye){var Qe=Ye.key;Rt.onActiveChange(Qe)}else Rt.onActiveChange(null)}),(0,St.Z)((0,gt.Z)(Rt),"onKeyDown",function(ge){var Me=Rt.state,Ae=Me.activeKey,Be=Me.expandedKeys,Ze=Me.checkedKeys,Ye=Me.fieldNames,Qe=Rt.props,He=Qe.onKeyDown,Ue=Qe.checkable,We=Qe.selectable;switch(ge.which){case xt.Z.UP:{Rt.offsetActiveKey(-1),ge.preventDefault();break}case xt.Z.DOWN:{Rt.offsetActiveKey(1),ge.preventDefault();break}}var Ve=Rt.getActiveItem();if(Ve&&Ve.data){var rn=Rt.getTreeNodeRequiredProps(),an=Ve.data.isLeaf===!1||!!(Ve.data[Ye.children]||[]).length,ln=(0,Wt.F)((0,ot.Z)((0,ot.Z)({},(0,Wt.H8)(Ae,rn)),{},{data:Ve.data,active:!0}));switch(ge.which){case xt.Z.LEFT:{an&&Be.includes(Ae)?Rt.onNodeExpand({},ln):Ve.parent&&Rt.onActiveChange(Ve.parent.key),ge.preventDefault();break}case xt.Z.RIGHT:{an&&!Be.includes(Ae)?Rt.onNodeExpand({},ln):Ve.children&&Ve.children.length&&Rt.onActiveChange(Ve.children[0].key),ge.preventDefault();break}case xt.Z.ENTER:case xt.Z.SPACE:{Ue&&!ln.disabled&&ln.checkable!==!1&&!ln.disableCheckbox?Rt.onNodeCheck({},ln,!Ze.includes(Ae)):!Ue&&We&&!ln.disabled&&ln.selectable!==!1&&Rt.onNodeSelect({},ln);break}}}He==null||He(ge)}),(0,St.Z)((0,gt.Z)(Rt),"setUncontrolledState",function(ge){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Rt.destroyed){var Be=!1,Ze=!0,Ye={};Object.keys(ge).forEach(function(Qe){if(Rt.props.hasOwnProperty(Qe)){Ze=!1;return}Be=!0,Ye[Qe]=ge[Qe]}),Be&&(!Me||Ze)&&Rt.setState((0,ot.Z)((0,ot.Z)({},Ye),Ae))}}),(0,St.Z)((0,gt.Z)(Rt),"scrollTo",function(ge){Rt.listRef.current.scrollTo(ge)}),Rt}return(0,vt.Z)(It,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Vt=this.props,$t=Vt.activeKey,ue=Vt.itemScrollOffset,ge=ue===void 0?0:ue;$t!==void 0&&$t!==this.state.activeKey&&(this.setState({activeKey:$t}),$t!==null&&this.scrollTo({key:$t,offset:ge}))}},{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 Vt=this.state,$t=Vt.focused,ue=Vt.flattenNodes,ge=Vt.keyEntities,Me=Vt.draggingNodeKey,Ae=Vt.activeKey,Be=Vt.dropLevelOffset,Ze=Vt.dropContainerKey,Ye=Vt.dropTargetKey,Qe=Vt.dropPosition,He=Vt.dragOverNodeKey,Ue=Vt.indent,We=this.props,Ve=We.prefixCls,rn=We.className,an=We.style,ln=We.showLine,Sn=We.focusable,_n=We.tabIndex,Xn=_n===void 0?0:_n,Yn=We.selectable,Er=We.showIcon,dr=We.icon,Mr=We.switcherIcon,Tr=We.draggable,Or=We.checkable,Sr=We.checkStrictly,hr=We.disabled,zr=We.motion,qt=We.loadData,jn=We.filterTreeNode,Jn=We.height,zn=We.itemHeight,Wn=We.scrollWidth,Kn=We.virtual,ir=We.titleRender,Ar=We.dropIndicatorRender,sn=We.onContextMenu,qe=We.onScroll,$e=We.direction,un=We.rootClassName,or=We.rootStyle,Qn=(0,ft.Z)(this.props,{aria:!0,data:!0}),pr;Tr&&((0,Re.Z)(Tr)==="object"?pr=Tr:typeof Tr=="function"?pr={nodeDraggable:Tr}:pr={});var xn={prefixCls:Ve,selectable:Yn,showIcon:Er,icon:dr,switcherIcon:Mr,draggable:pr,draggingNodeKey:Me,checkable:Or,checkStrictly:Sr,disabled:hr,keyEntities:ge,dropLevelOffset:Be,dropContainerKey:Ze,dropTargetKey:Ye,dropPosition:Qe,dragOverNodeKey:He,indent:Ue,direction:$e,dropIndicatorRender:Ar,loadData:qt,filterTreeNode:jn,titleRender:ir,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 tt.createElement(at.k.Provider,{value:xn},tt.createElement("div",{className:mt()(Ve,rn,un,(0,St.Z)((0,St.Z)((0,St.Z)({},"".concat(Ve,"-show-line"),ln),"".concat(Ve,"-focused"),$t),"".concat(Ve,"-active-focused"),Ae!==null)),style:or},tt.createElement(de,(0,ae.Z)({ref:this.listRef,prefixCls:Ve,style:an,data:ue,disabled:hr,selectable:Yn,checkable:!!Or,motion:zr,dragging:Me!==null,height:Jn,itemHeight:zn,virtual:Kn,focusable:Sn,focused:$t,tabIndex:Xn,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:sn,onScroll:qe,scrollWidth:Wn},this.getTreeNodeRequiredProps(),Qn))))}}],[{key:"getDerivedStateFromProps",value:function(Vt,$t){var ue=$t.prevProps,ge={prevProps:Vt};function Me(Xn){return!ue&&Vt.hasOwnProperty(Xn)||ue&&ue[Xn]!==Vt[Xn]}var Ae,Be=$t.fieldNames;if(Me("fieldNames")&&(Be=(0,Wt.w$)(Vt.fieldNames),ge.fieldNames=Be),Me("treeData")?Ae=Vt.treeData:Me("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Ae=(0,Wt.zn)(Vt.children)),Ae){ge.treeData=Ae;var Ze=(0,Wt.I8)(Ae,{fieldNames:Be});ge.keyEntities=(0,ot.Z)((0,St.Z)({},ne,Se),Ze.keyEntities)}var Ye=ge.keyEntities||$t.keyEntities;if(Me("expandedKeys")||ue&&Me("autoExpandParent"))ge.expandedKeys=Vt.autoExpandParent||!ue&&Vt.defaultExpandParent?(0,ye.r7)(Vt.expandedKeys,Ye):Vt.expandedKeys;else if(!ue&&Vt.defaultExpandAll){var Qe=(0,ot.Z)({},Ye);delete Qe[ne];var He=[];Object.keys(Qe).forEach(function(Xn){var Yn=Qe[Xn];Yn.children&&Yn.children.length&&He.push(Yn.key)}),ge.expandedKeys=He}else!ue&&Vt.defaultExpandedKeys&&(ge.expandedKeys=Vt.autoExpandParent||Vt.defaultExpandParent?(0,ye.r7)(Vt.defaultExpandedKeys,Ye):Vt.defaultExpandedKeys);if(ge.expandedKeys||delete ge.expandedKeys,Ae||ge.expandedKeys){var Ue=(0,Wt.oH)(Ae||$t.treeData,ge.expandedKeys||$t.expandedKeys,Be);ge.flattenNodes=Ue}if(Vt.selectable&&(Me("selectedKeys")?ge.selectedKeys=(0,ye.BT)(Vt.selectedKeys,Vt):!ue&&Vt.defaultSelectedKeys&&(ge.selectedKeys=(0,ye.BT)(Vt.defaultSelectedKeys,Vt))),Vt.checkable){var We;if(Me("checkedKeys")?We=(0,ye.E6)(Vt.checkedKeys)||{}:!ue&&Vt.defaultCheckedKeys?We=(0,ye.E6)(Vt.defaultCheckedKeys)||{}:Ae&&(We=(0,ye.E6)(Vt.checkedKeys)||{checkedKeys:$t.checkedKeys,halfCheckedKeys:$t.halfCheckedKeys}),We){var Ve=We,rn=Ve.checkedKeys,an=rn===void 0?[]:rn,ln=Ve.halfCheckedKeys,Sn=ln===void 0?[]:ln;if(!Vt.checkStrictly){var _n=(0,Ne.S)(an,!0,Ye);an=_n.checkedKeys,Sn=_n.halfCheckedKeys}ge.checkedKeys=an,ge.halfCheckedKeys=Sn}}return Me("loadedKeys")&&(ge.loadedKeys=Vt.loadedKeys),ge}}]),It}(tt.Component);(0,St.Z)(Kt,"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:lt,allowDrop:function(){return!0},expandAction:!1}),(0,St.Z)(Kt,"TreeNode",Nt.Z);var wt=Kt,Lt=wt},82661:function(dn,fn,le){"use strict";le.d(fn,{BT:function(){return tt},E6:function(){return lt},L0:function(){return St},OM:function(){return z},_5:function(){return bt},r7:function(){return ut},wA:function(){return mt},yx:function(){return Tt}});var ae=le(95190),Re=le(93664),ot=le(48736),_t=le(59301),Bt=le(639),vt=le(65065),gt=le(34061),kt=null;function bt(dt,Pt){if(!dt)return[];var At=dt.slice(),Dt=At.indexOf(Pt);return Dt>=0&&At.splice(Dt,1),At}function St(dt,Pt){var At=(dt||[]).slice();return At.indexOf(Pt)===-1&&At.push(Pt),At}function Tt(dt){return dt.split("-")}function mt(dt,Pt){var At=[],Dt=(0,vt.Z)(Pt,dt);function Ft(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Nt.forEach(function(jt){var Gt=jt.key,Wt=jt.children;At.push(Gt),Ft(Wt)})}return Ft(Dt.children),At}function xt(dt){if(dt.parent){var Pt=Tt(dt.pos);return Number(Pt[Pt.length-1])===dt.parent.children.length-1}return!1}function ft(dt){var Pt=Tt(dt.pos);return Number(Pt[Pt.length-1])===0}function z(dt,Pt,At,Dt,Ft,Nt,jt,Gt,Wt,Jt){var Ut,Ht=dt.clientX,oe=dt.clientY,se=dt.target.getBoundingClientRect(),ce=se.top,Pe=se.height,Yt=(Jt==="rtl"?-1:1)*(((Ft==null?void 0:Ft.x)||0)-Ht),ne=(Yt-12)/Dt,ve=Wt.filter(function(Lt){var Xt;return(Xt=Gt[Lt])===null||Xt===void 0||(Xt=Xt.children)===null||Xt===void 0?void 0:Xt.length}),Se=(0,vt.Z)(Gt,At.eventKey);if(oe<ce+Pe/2){var be=jt.findIndex(function(Lt){return Lt.key===Se.key}),fe=be<=0?0:be-1,pe=jt[fe].key;Se=(0,vt.Z)(Gt,pe)}var he=Se.key,Ce=Se,de=Se.key,ye=0,Ne=0;if(!ve.includes(he))for(var xe=0;xe<ne&&xt(Se);xe+=1)Se=Se.parent,Ne+=1;var re=Pt.data,Kt=Se.node,wt=!0;return ft(Se)&&Se.level===0&&oe<ce+Pe/2&&Nt({dragNode:re,dropNode:Kt,dropPosition:-1})&&Se.key===At.eventKey?ye=-1:(Ce.children||[]).length&&ve.includes(de)?Nt({dragNode:re,dropNode:Kt,dropPosition:0})?ye=0:wt=!1:Ne===0?ne>-1.5?Nt({dragNode:re,dropNode:Kt,dropPosition:1})?ye=1:wt=!1:Nt({dragNode:re,dropNode:Kt,dropPosition:0})?ye=0:Nt({dragNode:re,dropNode:Kt,dropPosition:1})?ye=1:wt=!1:Nt({dragNode:re,dropNode:Kt,dropPosition:1})?ye=1:wt=!1,{dropPosition:ye,dropLevelOffset:Ne,dropTargetKey:Se.key,dropTargetPos:Se.pos,dragOverNodeKey:de,dropContainerKey:ye===0?null:((Ut=Se.parent)===null||Ut===void 0?void 0:Ut.key)||null,dropAllowed:wt}}function tt(dt,Pt){if(dt){var At=Pt.multiple;return At?dt.slice():dt.length?[dt[0]]:dt}}var at=function(Pt){return Pt};function it(dt,Pt){if(!dt)return[];var At=Pt||{},Dt=At.processProps,Ft=Dt===void 0?at:Dt,Nt=Array.isArray(dt)?dt:[dt];return Nt.map(function(jt){var Gt=jt.children,Wt=_objectWithoutProperties(jt,kt),Jt=it(Gt,Pt);return React.createElement(TreeNode,_extends({key:Wt.key},Ft(Wt)),Jt)})}function lt(dt){if(!dt)return null;var Pt;if(Array.isArray(dt))Pt={checkedKeys:dt,halfCheckedKeys:void 0};else if((0,Re.Z)(dt)==="object")Pt={checkedKeys:dt.checked||void 0,halfCheckedKeys:dt.halfChecked||void 0};else return(0,ot.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Pt}function ut(dt,Pt){var At=new Set;function Dt(Ft){if(!At.has(Ft)){var Nt=(0,vt.Z)(Pt,Ft);if(Nt){At.add(Ft);var jt=Nt.parent,Gt=Nt.node;Gt.disabled||jt&&Dt(jt.key)}}}return(dt||[]).forEach(function(Ft){Dt(Ft)}),(0,ae.Z)(At)}},34643:function(dn,fn,le){"use strict";le.d(fn,{S:function(){return gt}});var ae=le(48736),Re=le(65065);function ot(kt,bt){var St=new Set;return kt.forEach(function(Tt){bt.has(Tt)||St.add(Tt)}),St}function _t(kt){var bt=kt||{},St=bt.disabled,Tt=bt.disableCheckbox,mt=bt.checkable;return!!(St||Tt)||mt===!1}function Bt(kt,bt,St,Tt){for(var mt=new Set(kt),xt=new Set,ft=0;ft<=St;ft+=1){var z=bt.get(ft)||new Set;z.forEach(function(lt){var ut=lt.key,dt=lt.node,Pt=lt.children,At=Pt===void 0?[]:Pt;mt.has(ut)&&!Tt(dt)&&At.filter(function(Dt){return!Tt(Dt.node)}).forEach(function(Dt){mt.add(Dt.key)})})}for(var tt=new Set,at=St;at>=0;at-=1){var it=bt.get(at)||new Set;it.forEach(function(lt){var ut=lt.parent,dt=lt.node;if(!(Tt(dt)||!lt.parent||tt.has(lt.parent.key))){if(Tt(lt.parent.node)){tt.add(ut.key);return}var Pt=!0,At=!1;(ut.children||[]).filter(function(Dt){return!Tt(Dt.node)}).forEach(function(Dt){var Ft=Dt.key,Nt=mt.has(Ft);Pt&&!Nt&&(Pt=!1),!At&&(Nt||xt.has(Ft))&&(At=!0)}),Pt&&mt.add(ut.key),At&&xt.add(ut.key),tt.add(ut.key)}})}return{checkedKeys:Array.from(mt),halfCheckedKeys:Array.from(ot(xt,mt))}}function vt(kt,bt,St,Tt,mt){for(var xt=new Set(kt),ft=new Set(bt),z=0;z<=Tt;z+=1){var tt=St.get(z)||new Set;tt.forEach(function(ut){var dt=ut.key,Pt=ut.node,At=ut.children,Dt=At===void 0?[]:At;!xt.has(dt)&&!ft.has(dt)&&!mt(Pt)&&Dt.filter(function(Ft){return!mt(Ft.node)}).forEach(function(Ft){xt.delete(Ft.key)})})}ft=new Set;for(var at=new Set,it=Tt;it>=0;it-=1){var lt=St.get(it)||new Set;lt.forEach(function(ut){var dt=ut.parent,Pt=ut.node;if(!(mt(Pt)||!ut.parent||at.has(ut.parent.key))){if(mt(ut.parent.node)){at.add(dt.key);return}var At=!0,Dt=!1;(dt.children||[]).filter(function(Ft){return!mt(Ft.node)}).forEach(function(Ft){var Nt=Ft.key,jt=xt.has(Nt);At&&!jt&&(At=!1),!Dt&&(jt||ft.has(Nt))&&(Dt=!0)}),At||xt.delete(dt.key),Dt&&ft.add(dt.key),at.add(dt.key)}})}return{checkedKeys:Array.from(xt),halfCheckedKeys:Array.from(ot(ft,xt))}}function gt(kt,bt,St,Tt){var mt=[],xt;Tt?xt=Tt:xt=_t;var ft=new Set(kt.filter(function(it){var lt=!!(0,Re.Z)(St,it);return lt||mt.push(it),lt})),z=new Map,tt=0;Object.keys(St).forEach(function(it){var lt=St[it],ut=lt.level,dt=z.get(ut);dt||(dt=new Set,z.set(ut,dt)),dt.add(lt),tt=Math.max(tt,ut)}),(0,ae.ZP)(!mt.length,"Tree missing follow keys: ".concat(mt.slice(0,100).map(function(it){return"'".concat(it,"'")}).join(", ")));var at;return bt===!0?at=Bt(ft,z,tt,xt):at=vt(ft,bt.halfCheckedKeys,z,tt,xt),at}},65065:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return ae}});function ae(Re,ot){return Re[ot]}},34061:function(dn,fn,le){"use strict";le.d(fn,{F:function(){return ut},H8:function(){return lt},I8:function(){return it},km:function(){return mt},oH:function(){return tt},w$:function(){return xt},zn:function(){return z}});var ae=le(93664),Re=le(95190),ot=le(20439),_t=le(62646),Bt=le(11592),vt=le(2738),gt=le(48736),kt=le(65065),bt=["children"];function St(dt,Pt){return"".concat(dt,"-").concat(Pt)}function Tt(dt){return dt&&dt.type&&dt.type.isTreeNode}function mt(dt,Pt){return dt!=null?dt:Pt}function xt(dt){var Pt=dt||{},At=Pt.title,Dt=Pt._title,Ft=Pt.key,Nt=Pt.children,jt=At||"title";return{title:jt,_title:Dt||[jt],key:Ft||"key",children:Nt||"children"}}function ft(dt,Pt){var At=new Map;function Dt(Ft){var Nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Ft||[]).forEach(function(jt){var Gt=jt[Pt.key],Wt=jt[Pt.children];warning(Gt!=null,"Tree node must have a certain key: [".concat(Nt).concat(Gt,"]"));var Jt=String(Gt);warning(!At.has(Jt)||Gt===null||Gt===void 0,"Same 'key' exist in the Tree: ".concat(Jt)),At.set(Jt,!0),Dt(Wt,"".concat(Nt).concat(Jt," > "))})}Dt(dt)}function z(dt){function Pt(At){var Dt=(0,Bt.Z)(At);return Dt.map(function(Ft){if(!Tt(Ft))return(0,gt.ZP)(!Ft,"Tree/TreeNode can only accept TreeNode as children."),null;var Nt=Ft.key,jt=Ft.props,Gt=jt.children,Wt=(0,_t.Z)(jt,bt),Jt=(0,ot.Z)({key:Nt},Wt),Ut=Pt(Gt);return Ut.length&&(Jt.children=Ut),Jt}).filter(function(Ft){return Ft})}return Pt(dt)}function tt(dt,Pt,At){var Dt=xt(At),Ft=Dt._title,Nt=Dt.key,jt=Dt.children,Gt=new Set(Pt===!0?[]:Pt),Wt=[];function Jt(Ut){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ut.map(function(oe,se){for(var ce=St(Ht?Ht.pos:"0",se),Pe=mt(oe[Nt],ce),Yt,ne=0;ne<Ft.length;ne+=1){var ve=Ft[ne];if(oe[ve]!==void 0){Yt=oe[ve];break}}var Se=Object.assign((0,vt.Z)(oe,[].concat((0,Re.Z)(Ft),[Nt,jt])),{title:Yt,key:Pe,parent:Ht,pos:ce,children:null,data:oe,isStart:[].concat((0,Re.Z)(Ht?Ht.isStart:[]),[se===0]),isEnd:[].concat((0,Re.Z)(Ht?Ht.isEnd:[]),[se===Ut.length-1])});return Wt.push(Se),Pt===!0||Gt.has(Pe)?Se.children=Jt(oe[jt]||[],Se):Se.children=[],Se})}return Jt(dt),Wt}function at(dt,Pt,At){var Dt={};(0,ae.Z)(At)==="object"?Dt=At:Dt={externalGetKey:At},Dt=Dt||{};var Ft=Dt,Nt=Ft.childrenPropName,jt=Ft.externalGetKey,Gt=Ft.fieldNames,Wt=xt(Gt),Jt=Wt.key,Ut=Wt.children,Ht=Nt||Ut,oe;jt?typeof jt=="string"?oe=function(Pe){return Pe[jt]}:typeof jt=="function"&&(oe=function(Pe){return jt(Pe)}):oe=function(Pe,Yt){return mt(Pe[Jt],Yt)};function se(ce,Pe,Yt,ne){var ve=ce?ce[Ht]:dt,Se=ce?St(Yt.pos,Pe):"0",be=ce?[].concat((0,Re.Z)(ne),[ce]):[];if(ce){var fe=oe(ce,Se),pe={node:ce,index:Pe,pos:Se,key:fe,parentPos:Yt.node?Yt.pos:null,level:Yt.level+1,nodes:be};Pt(pe)}ve&&ve.forEach(function(he,Ce){se(he,Ce,{node:ce,pos:Se,level:Yt?Yt.level+1:-1},be)})}se(null)}function it(dt){var Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},At=Pt.initWrapper,Dt=Pt.processEntity,Ft=Pt.onProcessFinished,Nt=Pt.externalGetKey,jt=Pt.childrenPropName,Gt=Pt.fieldNames,Wt=arguments.length>2?arguments[2]:void 0,Jt=Nt||Wt,Ut={},Ht={},oe={posEntities:Ut,keyEntities:Ht};return At&&(oe=At(oe)||oe),at(dt,function(se){var ce=se.node,Pe=se.index,Yt=se.pos,ne=se.key,ve=se.parentPos,Se=se.level,be=se.nodes,fe={node:ce,nodes:be,index:Pe,key:ne,pos:Yt,level:Se},pe=mt(ne,Yt);Ut[Yt]=fe,Ht[pe]=fe,fe.parent=Ut[ve],fe.parent&&(fe.parent.children=fe.parent.children||[],fe.parent.children.push(fe)),Dt&&Dt(fe,oe)},{externalGetKey:Jt,childrenPropName:jt,fieldNames:Gt}),Ft&&Ft(oe),oe}function lt(dt,Pt){var At=Pt.expandedKeys,Dt=Pt.selectedKeys,Ft=Pt.loadedKeys,Nt=Pt.loadingKeys,jt=Pt.checkedKeys,Gt=Pt.halfCheckedKeys,Wt=Pt.dragOverNodeKey,Jt=Pt.dropPosition,Ut=Pt.keyEntities,Ht=(0,kt.Z)(Ut,dt),oe={eventKey:dt,expanded:At.indexOf(dt)!==-1,selected:Dt.indexOf(dt)!==-1,loaded:Ft.indexOf(dt)!==-1,loading:Nt.indexOf(dt)!==-1,checked:jt.indexOf(dt)!==-1,halfChecked:Gt.indexOf(dt)!==-1,pos:String(Ht?Ht.pos:""),dragOver:Wt===dt&&Jt===0,dragOverGapTop:Wt===dt&&Jt===-1,dragOverGapBottom:Wt===dt&&Jt===1};return oe}function ut(dt){var Pt=dt.data,At=dt.expanded,Dt=dt.selected,Ft=dt.checked,Nt=dt.loaded,jt=dt.loading,Gt=dt.halfChecked,Wt=dt.dragOver,Jt=dt.dragOverGapTop,Ut=dt.dragOverGapBottom,Ht=dt.pos,oe=dt.active,se=dt.eventKey,ce=(0,ot.Z)((0,ot.Z)({},Pt),{},{expanded:At,selected:Dt,checked:Ft,loaded:Nt,loading:jt,halfChecked:Gt,dragOver:Wt,dragOverGapTop:Jt,dragOverGapBottom:Ut,pos:Ht,active:oe,key:se});return"props"in ce||Object.defineProperty(ce,"props",{get:function(){return(0,gt.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),dt}}),ce}},90472:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return se}});var ae=le(14809),Re=le(99153),ot=le(84851),_t=le(13028),Bt=le(19257),vt=le(93046),gt=le(4635),kt=le(59301),bt=le(20439),St=le(62646),Tt=le(93664),mt=le(70539),xt=le(95764),ft=le(95190),z=le(92310),tt=le.n(z),at=le(26112),it=le(48736),lt=function(ce,Pe){if(ce&&Pe){var Yt=Array.isArray(Pe)?Pe:Pe.split(","),ne=ce.name||"",ve=ce.type||"",Se=ve.replace(/\/.*$/,"");return Yt.some(function(be){var fe=be.trim();if(/^\*(\/\*)?$/.test(be))return!0;if(fe.charAt(0)==="."){var pe=ne.toLowerCase(),he=fe.toLowerCase(),Ce=[he];return(he===".jpg"||he===".jpeg")&&(Ce=[".jpg",".jpeg"]),Ce.some(function(de){return pe.endsWith(de)})}return/\/\*$/.test(fe)?Se===fe.replace(/\/.*$/,""):ve===fe?!0:/^\w+$/.test(fe)?((0,it.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(fe,"'.Skip for check.")),!0):!1})}return!0};function ut(ce,Pe){var Yt="cannot ".concat(ce.method," ").concat(ce.action," ").concat(Pe.status,"'"),ne=new Error(Yt);return ne.status=Pe.status,ne.method=ce.method,ne.url=ce.action,ne}function dt(ce){var Pe=ce.responseText||ce.response;if(!Pe)return Pe;try{return JSON.parse(Pe)}catch(Yt){return Pe}}function Pt(ce){var Pe=new XMLHttpRequest;ce.onProgress&&Pe.upload&&(Pe.upload.onprogress=function(Se){Se.total>0&&(Se.percent=Se.loaded/Se.total*100),ce.onProgress(Se)});var Yt=new FormData;ce.data&&Object.keys(ce.data).forEach(function(ve){var Se=ce.data[ve];if(Array.isArray(Se)){Se.forEach(function(be){Yt.append("".concat(ve,"[]"),be)});return}Yt.append(ve,Se)}),ce.file instanceof Blob?Yt.append(ce.filename,ce.file,ce.file.name):Yt.append(ce.filename,ce.file),Pe.onerror=function(Se){ce.onError(Se)},Pe.onload=function(){return Pe.status<200||Pe.status>=300?ce.onError(ut(ce,Pe),dt(Pe)):ce.onSuccess(dt(Pe),Pe)},Pe.open(ce.method,ce.action,!0),ce.withCredentials&&"withCredentials"in Pe&&(Pe.withCredentials=!0);var ne=ce.headers||{};return ne["X-Requested-With"]!==null&&Pe.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ne).forEach(function(ve){ne[ve]!==null&&Pe.setRequestHeader(ve,ne[ve])}),Pe.send(Yt),{abort:function(){Pe.abort()}}}var At=function(){var ce=(0,xt.Z)((0,mt.Z)().mark(function Pe(Yt,ne){var ve,Se,be,fe,pe,he,Ce,de;return(0,mt.Z)().wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:he=function(){return he=(0,xt.Z)((0,mt.Z)().mark(function re(Kt){return(0,mt.Z)().wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return Lt.abrupt("return",new Promise(function(Xt){Kt.file(function(ee){ne(ee)?(Kt.fullPath&&!ee.webkitRelativePath&&(Object.defineProperties(ee,{webkitRelativePath:{writable:!0}}),ee.webkitRelativePath=Kt.fullPath.replace(/^\//,""),Object.defineProperties(ee,{webkitRelativePath:{writable:!1}})),Xt(ee)):Xt(null)})}));case 1:case"end":return Lt.stop()}},re)})),he.apply(this,arguments)},pe=function(re){return he.apply(this,arguments)},fe=function(){return fe=(0,xt.Z)((0,mt.Z)().mark(function re(Kt){var wt,Lt,Xt,ee,It;return(0,mt.Z)().wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:wt=Kt.createReader(),Lt=[];case 2:return Vt.next=5,new Promise(function($t){wt.readEntries($t,function(){return $t([])})});case 5:if(Xt=Vt.sent,ee=Xt.length,ee){Vt.next=9;break}return Vt.abrupt("break",12);case 9:for(It=0;It<ee;It++)Lt.push(Xt[It]);Vt.next=2;break;case 12:return Vt.abrupt("return",Lt);case 13:case"end":return Vt.stop()}},re)})),fe.apply(this,arguments)},be=function(re){return fe.apply(this,arguments)},ve=[],Se=[],Yt.forEach(function(xe){return Se.push(xe.webkitGetAsEntry())}),Ce=function(){var xe=(0,xt.Z)((0,mt.Z)().mark(function re(Kt,wt){var Lt,Xt;return(0,mt.Z)().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:if(Kt){It.next=2;break}return It.abrupt("return");case 2:if(Kt.path=wt||"",!Kt.isFile){It.next=10;break}return It.next=6,pe(Kt);case 6:Lt=It.sent,Lt&&ve.push(Lt),It.next=15;break;case 10:if(!Kt.isDirectory){It.next=15;break}return It.next=13,be(Kt);case 13:Xt=It.sent,Se.push.apply(Se,(0,ft.Z)(Xt));case 15:case"end":return It.stop()}},re)}));return function(Kt,wt){return xe.apply(this,arguments)}}(),de=0;case 9:if(!(de<Se.length)){Ne.next=15;break}return Ne.next=12,Ce(Se[de]);case 12:de++,Ne.next=9;break;case 15:return Ne.abrupt("return",ve);case 16:case"end":return Ne.stop()}},Pe)}));return function(Yt,ne){return ce.apply(this,arguments)}}(),Dt=At,Ft=+new Date,Nt=0;function jt(){return"rc-upload-".concat(Ft,"-").concat(++Nt)}var Gt=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Wt=function(ce){(0,Bt.Z)(Yt,ce);var Pe=(0,vt.Z)(Yt);function Yt(){var ne;(0,Re.Z)(this,Yt);for(var ve=arguments.length,Se=new Array(ve),be=0;be<ve;be++)Se[be]=arguments[be];return ne=Pe.call.apply(Pe,[this].concat(Se)),(0,gt.Z)((0,_t.Z)(ne),"state",{uid:jt()}),(0,gt.Z)((0,_t.Z)(ne),"reqs",{}),(0,gt.Z)((0,_t.Z)(ne),"fileInput",void 0),(0,gt.Z)((0,_t.Z)(ne),"_isMounted",void 0),(0,gt.Z)((0,_t.Z)(ne),"onChange",function(fe){var pe=ne.props,he=pe.accept,Ce=pe.directory,de=fe.target.files,ye=(0,ft.Z)(de).filter(function(Ne){return!Ce||lt(Ne,he)});ne.uploadFiles(ye),ne.reset()}),(0,gt.Z)((0,_t.Z)(ne),"onClick",function(fe){var pe=ne.fileInput;if(pe){var he=fe.target,Ce=ne.props.onClick;if(he&&he.tagName==="BUTTON"){var de=pe.parentNode;de.focus(),he.blur()}pe.click(),Ce&&Ce(fe)}}),(0,gt.Z)((0,_t.Z)(ne),"onKeyDown",function(fe){fe.key==="Enter"&&ne.onClick(fe)}),(0,gt.Z)((0,_t.Z)(ne),"onFileDrop",function(){var fe=(0,xt.Z)((0,mt.Z)().mark(function pe(he){var Ce,de,ye;return(0,mt.Z)().wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:if(Ce=ne.props.multiple,he.preventDefault(),he.type!=="dragover"){xe.next=4;break}return xe.abrupt("return");case 4:if(!ne.props.directory){xe.next=11;break}return xe.next=7,Dt(Array.prototype.slice.call(he.dataTransfer.items),function(re){return lt(re,ne.props.accept)});case 7:de=xe.sent,ne.uploadFiles(de),xe.next=14;break;case 11:ye=(0,ft.Z)(he.dataTransfer.files).filter(function(re){return lt(re,ne.props.accept)}),Ce===!1&&(ye=ye.slice(0,1)),ne.uploadFiles(ye);case 14:case"end":return xe.stop()}},pe)}));return function(pe){return fe.apply(this,arguments)}}()),(0,gt.Z)((0,_t.Z)(ne),"uploadFiles",function(fe){var pe=(0,ft.Z)(fe),he=pe.map(function(Ce){return Ce.uid=jt(),ne.processFile(Ce,pe)});Promise.all(he).then(function(Ce){var de=ne.props.onBatchStart;de==null||de(Ce.map(function(ye){var Ne=ye.origin,xe=ye.parsedFile;return{file:Ne,parsedFile:xe}})),Ce.filter(function(ye){return ye.parsedFile!==null}).forEach(function(ye){ne.post(ye)})})}),(0,gt.Z)((0,_t.Z)(ne),"processFile",function(){var fe=(0,xt.Z)((0,mt.Z)().mark(function pe(he,Ce){var de,ye,Ne,xe,re,Kt,wt,Lt,Xt;return(0,mt.Z)().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:if(de=ne.props.beforeUpload,ye=he,!de){It.next=14;break}return It.prev=3,It.next=6,de(he,Ce);case 6:ye=It.sent,It.next=12;break;case 9:It.prev=9,It.t0=It.catch(3),ye=!1;case 12:if(ye!==!1){It.next=14;break}return It.abrupt("return",{origin:he,parsedFile:null,action:null,data:null});case 14:if(Ne=ne.props.action,typeof Ne!="function"){It.next=21;break}return It.next=18,Ne(he);case 18:xe=It.sent,It.next=22;break;case 21:xe=Ne;case 22:if(re=ne.props.data,typeof re!="function"){It.next=29;break}return It.next=26,re(he);case 26:Kt=It.sent,It.next=30;break;case 29:Kt=re;case 30:return wt=((0,Tt.Z)(ye)==="object"||typeof ye=="string")&&ye?ye:he,wt instanceof File?Lt=wt:Lt=new File([wt],he.name,{type:he.type}),Xt=Lt,Xt.uid=he.uid,It.abrupt("return",{origin:he,data:Kt,parsedFile:Xt,action:xe});case 35:case"end":return It.stop()}},pe,null,[[3,9]])}));return function(pe,he){return fe.apply(this,arguments)}}()),(0,gt.Z)((0,_t.Z)(ne),"saveFileInput",function(fe){ne.fileInput=fe}),ne}return(0,ot.Z)(Yt,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(ve){var Se=this,be=ve.data,fe=ve.origin,pe=ve.action,he=ve.parsedFile;if(this._isMounted){var Ce=this.props,de=Ce.onStart,ye=Ce.customRequest,Ne=Ce.name,xe=Ce.headers,re=Ce.withCredentials,Kt=Ce.method,wt=fe.uid,Lt=ye||Pt,Xt={action:pe,filename:Ne,data:be,file:he,headers:xe,withCredentials:re,method:Kt||"post",onProgress:function(It){var Rt=Se.props.onProgress;Rt==null||Rt(It,he)},onSuccess:function(It,Rt){var Vt=Se.props.onSuccess;Vt==null||Vt(It,he,Rt),delete Se.reqs[wt]},onError:function(It,Rt){var Vt=Se.props.onError;Vt==null||Vt(It,Rt,he),delete Se.reqs[wt]}};de(fe),this.reqs[wt]=Lt(Xt)}}},{key:"reset",value:function(){this.setState({uid:jt()})}},{key:"abort",value:function(ve){var Se=this.reqs;if(ve){var be=ve.uid?ve.uid:ve;Se[be]&&Se[be].abort&&Se[be].abort(),delete Se[be]}else Object.keys(Se).forEach(function(fe){Se[fe]&&Se[fe].abort&&Se[fe].abort(),delete Se[fe]})}},{key:"render",value:function(){var ve=this.props,Se=ve.component,be=ve.prefixCls,fe=ve.className,pe=ve.classNames,he=pe===void 0?{}:pe,Ce=ve.disabled,de=ve.id,ye=ve.name,Ne=ve.style,xe=ve.styles,re=xe===void 0?{}:xe,Kt=ve.multiple,wt=ve.accept,Lt=ve.capture,Xt=ve.children,ee=ve.directory,It=ve.openFileDialogOnClick,Rt=ve.onMouseEnter,Vt=ve.onMouseLeave,$t=ve.hasControlInside,ue=(0,St.Z)(ve,Gt),ge=tt()((0,gt.Z)((0,gt.Z)((0,gt.Z)({},be,!0),"".concat(be,"-disabled"),Ce),fe,fe)),Me=ee?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Ae=Ce?{}:{onClick:It?this.onClick:function(){},onKeyDown:It?this.onKeyDown:function(){},onMouseEnter:Rt,onMouseLeave:Vt,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:$t?void 0:"0"};return kt.createElement(Se,(0,ae.Z)({},Ae,{className:ge,role:$t?void 0:"button",style:Ne}),kt.createElement("input",(0,ae.Z)({},(0,at.Z)(ue,{aria:!0,data:!0}),{id:de,name:ye,disabled:Ce,type:"file",ref:this.saveFileInput,onClick:function(Ze){return Ze.stopPropagation()},key:this.state.uid,style:(0,bt.Z)({display:"none"},re.input),className:he.input,accept:wt},Me,{multiple:Kt,onChange:this.onChange},Lt!=null?{capture:Lt}:{})),Xt)}}]),Yt}(kt.Component),Jt=Wt;function Ut(){}var Ht=function(ce){(0,Bt.Z)(Yt,ce);var Pe=(0,vt.Z)(Yt);function Yt(){var ne;(0,Re.Z)(this,Yt);for(var ve=arguments.length,Se=new Array(ve),be=0;be<ve;be++)Se[be]=arguments[be];return ne=Pe.call.apply(Pe,[this].concat(Se)),(0,gt.Z)((0,_t.Z)(ne),"uploader",void 0),(0,gt.Z)((0,_t.Z)(ne),"saveUploader",function(fe){ne.uploader=fe}),ne}return(0,ot.Z)(Yt,[{key:"abort",value:function(ve){this.uploader.abort(ve)}},{key:"render",value:function(){return kt.createElement(Jt,(0,ae.Z)({},this.props,{ref:this.saveUploader}))}}]),Yt}(kt.Component);(0,gt.Z)(Ht,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ut,onError:Ut,onSuccess:Ut,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var oe=Ht,se=oe},65283:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return re}});var ae=le(14809),Re=le(93664),ot=le(20439),_t=le(4635),Bt=le(50298),vt=le(62646),gt=le(92310),kt=le.n(gt),bt=le(29301),St=le(70425),Tt=le(34280),mt=le(59301),xt=le(4676),ft=mt.forwardRef(function(Kt,wt){var Lt=Kt.height,Xt=Kt.offsetY,ee=Kt.offsetX,It=Kt.children,Rt=Kt.prefixCls,Vt=Kt.onInnerResize,$t=Kt.innerProps,ue=Kt.rtl,ge=Kt.extra,Me={},Ae={display:"flex",flexDirection:"column"};return Xt!==void 0&&(Me={height:Lt,position:"relative",overflow:"hidden"},Ae=(0,ot.Z)((0,ot.Z)({},Ae),{},(0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)({transform:"translateY(".concat(Xt,"px)")},ue?"marginRight":"marginLeft",-ee),"position","absolute"),"left",0),"right",0),"top",0))),mt.createElement("div",{style:Me},mt.createElement(bt.Z,{onResize:function(Ze){var Ye=Ze.offsetHeight;Ye&&Vt&&Vt()}},mt.createElement("div",(0,ae.Z)({style:Ae,className:kt()((0,_t.Z)({},"".concat(Rt,"-holder-inner"),Rt)),ref:wt},$t),It,ge)))});ft.displayName="Filler";var z=ft;function tt(Kt){var wt=Kt.children,Lt=Kt.setRef,Xt=mt.useCallback(function(ee){Lt(ee)},[]);return mt.cloneElement(wt,{ref:Xt})}function at(Kt,wt,Lt,Xt,ee,It,Rt,Vt){var $t=Vt.getKey;return Kt.slice(wt,Lt+1).map(function(ue,ge){var Me=wt+ge,Ae=Rt(ue,Me,{style:{width:Xt},offsetX:ee}),Be=$t(ue);return mt.createElement(tt,{key:Be,setRef:function(Ye){return It(ue,Ye)}},Ae)})}function it(Kt,wt,Lt,Xt){var ee=Lt-Kt,It=wt-Lt,Rt=Math.min(ee,It)*2;if(Xt<=Rt){var Vt=Math.floor(Xt/2);return Xt%2?Lt+Vt+1:Lt-Vt}return ee>It?Lt-(Xt-It):Lt+(Xt-ee)}function lt(Kt,wt,Lt){var Xt=Kt.length,ee=wt.length,It,Rt;if(Xt===0&&ee===0)return null;Xt<ee?(It=Kt,Rt=wt):(It=wt,Rt=Kt);var Vt={__EMPTY_ITEM__:!0};function $t(Ze){return Ze!==void 0?Lt(Ze):Vt}for(var ue=null,ge=Math.abs(Xt-ee)!==1,Me=0;Me<Rt.length;Me+=1){var Ae=$t(It[Me]),Be=$t(Rt[Me]);if(Ae!==Be){ue=Me,ge=ge||Ae!==$t(Rt[Me+1]);break}}return ue===null?null:{index:ue,multiple:ge}}function ut(Kt,wt,Lt){var Xt=mt.useState(Kt),ee=(0,Bt.Z)(Xt,2),It=ee[0],Rt=ee[1],Vt=mt.useState(null),$t=(0,Bt.Z)(Vt,2),ue=$t[0],ge=$t[1];return mt.useEffect(function(){var Me=lt(It||[],Kt||[],wt);(Me==null?void 0:Me.index)!==void 0&&(Lt==null||Lt(Me.index),ge(Kt[Me.index])),Rt(Kt)},[Kt]),[ue]}var dt=le(16089),Pt=(typeof navigator=="undefined"?"undefined":(0,Re.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),At=Pt,Dt=function(Kt,wt,Lt,Xt){var ee=(0,mt.useRef)(!1),It=(0,mt.useRef)(null);function Rt(){clearTimeout(It.current),ee.current=!0,It.current=setTimeout(function(){ee.current=!1},50)}var Vt=(0,mt.useRef)({top:Kt,bottom:wt,left:Lt,right:Xt});return Vt.current.top=Kt,Vt.current.bottom=wt,Vt.current.left=Lt,Vt.current.right=Xt,function($t,ue){var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Me=$t?ue<0&&Vt.current.left||ue>0&&Vt.current.right:ue<0&&Vt.current.top||ue>0&&Vt.current.bottom;return ge&&Me?(clearTimeout(It.current),ee.current=!1):(!Me||ee.current)&&Rt(),!ee.current&&Me}};function Ft(Kt,wt,Lt,Xt,ee,It,Rt){var Vt=(0,mt.useRef)(0),$t=(0,mt.useRef)(null),ue=(0,mt.useRef)(null),ge=(0,mt.useRef)(!1),Me=Dt(wt,Lt,Xt,ee);function Ae(Ue,We){if(dt.Z.cancel($t.current),!Me(!1,We)){var Ve=Ue;if(!Ve._virtualHandled)Ve._virtualHandled=!0;else return;Vt.current+=We,ue.current=We,At||Ve.preventDefault(),$t.current=(0,dt.Z)(function(){var rn=ge.current?10:1;Rt(Vt.current*rn,!1),Vt.current=0})}}function Be(Ue,We){Rt(We,!0),At||Ue.preventDefault()}var Ze=(0,mt.useRef)(null),Ye=(0,mt.useRef)(null);function Qe(Ue){if(Kt){dt.Z.cancel(Ye.current),Ye.current=(0,dt.Z)(function(){Ze.current=null},2);var We=Ue.deltaX,Ve=Ue.deltaY,rn=Ue.shiftKey,an=We,ln=Ve;(Ze.current==="sx"||!Ze.current&&rn&&Ve&&!We)&&(an=Ve,ln=0,Ze.current="sx");var Sn=Math.abs(an),_n=Math.abs(ln);Ze.current===null&&(Ze.current=It&&Sn>_n?"x":"y"),Ze.current==="y"?Ae(Ue,ln):Be(Ue,an)}}function He(Ue){Kt&&(ge.current=Ue.detail===ue.current)}return[Qe,He]}function Nt(Kt,wt,Lt,Xt){var ee=mt.useMemo(function(){return[new Map,[]]},[Kt,Lt.id,Xt]),It=(0,Bt.Z)(ee,2),Rt=It[0],Vt=It[1],$t=function(ge){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ge,Ae=Rt.get(ge),Be=Rt.get(Me);if(Ae===void 0||Be===void 0)for(var Ze=Kt.length,Ye=Vt.length;Ye<Ze;Ye+=1){var Qe,He=Kt[Ye],Ue=wt(He);Rt.set(Ue,Ye);var We=(Qe=Lt.get(Ue))!==null&&Qe!==void 0?Qe:Xt;if(Vt[Ye]=(Vt[Ye-1]||0)+We,Ue===ge&&(Ae=Ye),Ue===Me&&(Be=Ye),Ae!==void 0&&Be!==void 0)break}return{top:Vt[Ae-1]||0,bottom:Vt[Be]}};return $t}var jt=le(99153),Gt=le(84851),Wt=function(){function Kt(){(0,jt.Z)(this,Kt),(0,_t.Z)(this,"maps",void 0),(0,_t.Z)(this,"id",0),(0,_t.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Gt.Z)(Kt,[{key:"set",value:function(Lt,Xt){this.diffRecords.set(Lt,this.maps[Lt]),this.maps[Lt]=Xt,this.id+=1}},{key:"get",value:function(Lt){return this.maps[Lt]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Kt}(),Jt=Wt;function Ut(Kt){var wt=parseFloat(Kt);return isNaN(wt)?0:wt}function Ht(Kt,wt,Lt){var Xt=mt.useState(0),ee=(0,Bt.Z)(Xt,2),It=ee[0],Rt=ee[1],Vt=(0,mt.useRef)(new Map),$t=(0,mt.useRef)(new Jt),ue=(0,mt.useRef)(0);function ge(){ue.current+=1}function Me(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ge();var Ze=function(){var He=!1;Vt.current.forEach(function(Ue,We){if(Ue&&Ue.offsetParent){var Ve=Ue.offsetHeight,rn=getComputedStyle(Ue),an=rn.marginTop,ln=rn.marginBottom,Sn=Ut(an),_n=Ut(ln),Xn=Ve+Sn+_n;$t.current.get(We)!==Xn&&($t.current.set(We,Xn),He=!0)}}),He&&Rt(function(Ue){return Ue+1})};if(Be)Ze();else{ue.current+=1;var Ye=ue.current;Promise.resolve().then(function(){Ye===ue.current&&Ze()})}}function Ae(Be,Ze){var Ye=Kt(Be),Qe=Vt.current.get(Ye);Ze?(Vt.current.set(Ye,Ze),Me()):Vt.current.delete(Ye),!Qe!=!Ze&&(Ze?wt==null||wt(Be):Lt==null||Lt(Be))}return(0,mt.useEffect)(function(){return ge},[]),[Ae,Me,$t.current,It]}var oe=14/15;function se(Kt,wt,Lt){var Xt=(0,mt.useRef)(!1),ee=(0,mt.useRef)(0),It=(0,mt.useRef)(0),Rt=(0,mt.useRef)(null),Vt=(0,mt.useRef)(null),$t,ue=function(Be){if(Xt.current){var Ze=Math.ceil(Be.touches[0].pageX),Ye=Math.ceil(Be.touches[0].pageY),Qe=ee.current-Ze,He=It.current-Ye,Ue=Math.abs(Qe)>Math.abs(He);Ue?ee.current=Ze:It.current=Ye;var We=Lt(Ue,Ue?Qe:He,!1,Be);We&&Be.preventDefault(),clearInterval(Vt.current),We&&(Vt.current=setInterval(function(){Ue?Qe*=oe:He*=oe;var Ve=Math.floor(Ue?Qe:He);(!Lt(Ue,Ve,!0)||Math.abs(Ve)<=.1)&&clearInterval(Vt.current)},16))}},ge=function(){Xt.current=!1,$t()},Me=function(Be){$t(),Be.touches.length===1&&!Xt.current&&(Xt.current=!0,ee.current=Math.ceil(Be.touches[0].pageX),It.current=Math.ceil(Be.touches[0].pageY),Rt.current=Be.target,Rt.current.addEventListener("touchmove",ue,{passive:!1}),Rt.current.addEventListener("touchend",ge,{passive:!0}))};$t=function(){Rt.current&&(Rt.current.removeEventListener("touchmove",ue),Rt.current.removeEventListener("touchend",ge))},(0,Tt.Z)(function(){return Kt&&wt.current.addEventListener("touchstart",Me,{passive:!0}),function(){var Ae;(Ae=wt.current)===null||Ae===void 0||Ae.removeEventListener("touchstart",Me),$t(),clearInterval(Vt.current)}},[Kt])}function ce(Kt){return Math.floor(Math.pow(Kt,.5))}function Pe(Kt,wt){var Lt="touches"in Kt?Kt.touches[0]:Kt;return Lt[wt?"pageX":"pageY"]-window[wt?"scrollX":"scrollY"]}function Yt(Kt,wt,Lt){mt.useEffect(function(){var Xt=wt.current;if(Kt&&Xt){var ee=!1,It,Rt,Vt=function(){dt.Z.cancel(It)},$t=function Ae(){Vt(),It=(0,dt.Z)(function(){Lt(Rt),Ae()})},ue=function(Be){if(!(Be.target.draggable||Be.button!==0)){var Ze=Be;Ze._virtualHandled||(Ze._virtualHandled=!0,ee=!0)}},ge=function(){ee=!1,Vt()},Me=function(Be){if(ee){var Ze=Pe(Be,!1),Ye=Xt.getBoundingClientRect(),Qe=Ye.top,He=Ye.bottom;if(Ze<=Qe){var Ue=Qe-Ze;Rt=-ce(Ue),$t()}else if(Ze>=He){var We=Ze-He;Rt=ce(We),$t()}else Vt()}};return Xt.addEventListener("mousedown",ue),Xt.ownerDocument.addEventListener("mouseup",ge),Xt.ownerDocument.addEventListener("mousemove",Me),function(){Xt.removeEventListener("mousedown",ue),Xt.ownerDocument.removeEventListener("mouseup",ge),Xt.ownerDocument.removeEventListener("mousemove",Me),Vt()}}},[Kt])}var ne=10;function ve(Kt,wt,Lt,Xt,ee,It,Rt,Vt){var $t=mt.useRef(),ue=mt.useState(null),ge=(0,Bt.Z)(ue,2),Me=ge[0],Ae=ge[1];return(0,Tt.Z)(function(){if(Me&&Me.times<ne){if(!Kt.current){Ae(function(zr){return(0,ot.Z)({},zr)});return}It();var Be=Me.targetAlign,Ze=Me.originAlign,Ye=Me.index,Qe=Me.offset,He=Kt.current.clientHeight,Ue=!1,We=Be,Ve=null;if(He){for(var rn=Be||Ze,an=0,ln=0,Sn=0,_n=Math.min(wt.length-1,Ye),Xn=0;Xn<=_n;Xn+=1){var Yn=ee(wt[Xn]);ln=an;var Er=Lt.get(Yn);Sn=ln+(Er===void 0?Xt:Er),an=Sn}for(var dr=rn==="top"?Qe:He-Qe,Mr=_n;Mr>=0;Mr-=1){var Tr=ee(wt[Mr]),Or=Lt.get(Tr);if(Or===void 0){Ue=!0;break}if(dr-=Or,dr<=0)break}switch(rn){case"top":Ve=ln-Qe;break;case"bottom":Ve=Sn-He+Qe;break;default:{var Sr=Kt.current.scrollTop,hr=Sr+He;ln<Sr?We="top":Sn>hr&&(We="bottom")}}Ve!==null&&Rt(Ve),Ve!==Me.lastTop&&(Ue=!0)}Ue&&Ae((0,ot.Z)((0,ot.Z)({},Me),{},{times:Me.times+1,targetAlign:We,lastTop:Ve}))}},[Me,Kt.current]),function(Be){if(Be==null){Vt();return}if(dt.Z.cancel($t.current),typeof Be=="number")Rt(Be);else if(Be&&(0,Re.Z)(Be)==="object"){var Ze,Ye=Be.align;"index"in Be?Ze=Be.index:Ze=wt.findIndex(function(Ue){return ee(Ue)===Be.key});var Qe=Be.offset,He=Qe===void 0?0:Qe;Ae({times:0,index:Ze,offset:He,originAlign:Ye})}}}var Se=mt.forwardRef(function(Kt,wt){var Lt=Kt.prefixCls,Xt=Kt.rtl,ee=Kt.scrollOffset,It=Kt.scrollRange,Rt=Kt.onStartMove,Vt=Kt.onStopMove,$t=Kt.onScroll,ue=Kt.horizontal,ge=Kt.spinSize,Me=Kt.containerSize,Ae=Kt.style,Be=Kt.thumbStyle,Ze=Kt.showScrollBar,Ye=mt.useState(!1),Qe=(0,Bt.Z)(Ye,2),He=Qe[0],Ue=Qe[1],We=mt.useState(null),Ve=(0,Bt.Z)(We,2),rn=Ve[0],an=Ve[1],ln=mt.useState(null),Sn=(0,Bt.Z)(ln,2),_n=Sn[0],Xn=Sn[1],Yn=!Xt,Er=mt.useRef(),dr=mt.useRef(),Mr=mt.useState(Ze),Tr=(0,Bt.Z)(Mr,2),Or=Tr[0],Sr=Tr[1],hr=mt.useRef(),zr=function(){Ze===!0||Ze===!1||(clearTimeout(hr.current),Sr(!0),hr.current=setTimeout(function(){Sr(!1)},3e3))},qt=It-Me||0,jn=Me-ge||0,Jn=mt.useMemo(function(){if(ee===0||qt===0)return 0;var un=ee/qt;return un*jn},[ee,qt,jn]),zn=function(or){or.stopPropagation(),or.preventDefault()},Wn=mt.useRef({top:Jn,dragging:He,pageY:rn,startTop:_n});Wn.current={top:Jn,dragging:He,pageY:rn,startTop:_n};var Kn=function(or){Ue(!0),an(Pe(or,ue)),Xn(Wn.current.top),Rt(),or.stopPropagation(),or.preventDefault()};mt.useEffect(function(){var un=function(xn){xn.preventDefault()},or=Er.current,Qn=dr.current;return or.addEventListener("touchstart",un,{passive:!1}),Qn.addEventListener("touchstart",Kn,{passive:!1}),function(){or.removeEventListener("touchstart",un),Qn.removeEventListener("touchstart",Kn)}},[]);var ir=mt.useRef();ir.current=qt;var Ar=mt.useRef();Ar.current=jn,mt.useEffect(function(){if(He){var un,or=function(xn){var Rn=Wn.current,vr=Rn.dragging,Nr=Rn.pageY,Nn=Rn.startTop;dt.Z.cancel(un);var Oe=Er.current.getBoundingClientRect(),Ke=Me/(ue?Oe.width:Oe.height);if(vr){var Ln=(Pe(xn,ue)-Nr)*Ke,An=Nn;!Yn&&ue?An-=Ln:An+=Ln;var en=ir.current,Tn=Ar.current,kn=Tn?An/Tn:0,On=Math.ceil(kn*en);On=Math.max(On,0),On=Math.min(On,en),un=(0,dt.Z)(function(){$t(On,ue)})}},Qn=function(){Ue(!1),Vt()};return window.addEventListener("mousemove",or,{passive:!0}),window.addEventListener("touchmove",or,{passive:!0}),window.addEventListener("mouseup",Qn,{passive:!0}),window.addEventListener("touchend",Qn,{passive:!0}),function(){window.removeEventListener("mousemove",or),window.removeEventListener("touchmove",or),window.removeEventListener("mouseup",Qn),window.removeEventListener("touchend",Qn),dt.Z.cancel(un)}}},[He]),mt.useEffect(function(){return zr(),function(){clearTimeout(hr.current)}},[ee]),mt.useImperativeHandle(wt,function(){return{delayHidden:zr}});var sn="".concat(Lt,"-scrollbar"),qe={position:"absolute",visibility:Or?null:"hidden"},$e={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ue?(qe.height=8,qe.left=0,qe.right=0,qe.bottom=0,$e.height="100%",$e.width=ge,Yn?$e.left=Jn:$e.right=Jn):(qe.width=8,qe.top=0,qe.bottom=0,Yn?qe.right=0:qe.left=0,$e.width="100%",$e.height=ge,$e.top=Jn),mt.createElement("div",{ref:Er,className:kt()(sn,(0,_t.Z)((0,_t.Z)((0,_t.Z)({},"".concat(sn,"-horizontal"),ue),"".concat(sn,"-vertical"),!ue),"".concat(sn,"-visible"),Or)),style:(0,ot.Z)((0,ot.Z)({},qe),Ae),onMouseDown:zn,onMouseMove:zr},mt.createElement("div",{ref:dr,className:kt()("".concat(sn,"-thumb"),(0,_t.Z)({},"".concat(sn,"-thumb-moving"),He)),style:(0,ot.Z)((0,ot.Z)({},$e),Be),onMouseDown:Kn}))}),be=Se,fe=20;function pe(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Lt=Kt/wt*Kt;return isNaN(Lt)&&(Lt=0),Lt=Math.max(Lt,fe),Math.floor(Lt)}var he=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Ce=[],de={overflowY:"auto",overflowAnchor:"none"};function ye(Kt,wt){var Lt=Kt.prefixCls,Xt=Lt===void 0?"rc-virtual-list":Lt,ee=Kt.className,It=Kt.height,Rt=Kt.itemHeight,Vt=Kt.fullHeight,$t=Vt===void 0?!0:Vt,ue=Kt.style,ge=Kt.data,Me=Kt.children,Ae=Kt.itemKey,Be=Kt.virtual,Ze=Kt.direction,Ye=Kt.scrollWidth,Qe=Kt.component,He=Qe===void 0?"div":Qe,Ue=Kt.onScroll,We=Kt.onVirtualScroll,Ve=Kt.onVisibleChange,rn=Kt.innerProps,an=Kt.extraRender,ln=Kt.styles,Sn=Kt.showScrollBar,_n=Sn===void 0?"optional":Sn,Xn=(0,vt.Z)(Kt,he),Yn=mt.useCallback(function(sr){return typeof Ae=="function"?Ae(sr):sr==null?void 0:sr[Ae]},[Ae]),Er=Ht(Yn,null,null),dr=(0,Bt.Z)(Er,4),Mr=dr[0],Tr=dr[1],Or=dr[2],Sr=dr[3],hr=!!(Be!==!1&&It&&Rt),zr=mt.useMemo(function(){return Object.values(Or.maps).reduce(function(sr,wr){return sr+wr},0)},[Or.id,Or.maps]),qt=hr&&ge&&(Math.max(Rt*ge.length,zr)>It||!!Ye),jn=Ze==="rtl",Jn=kt()(Xt,(0,_t.Z)({},"".concat(Xt,"-rtl"),jn),ee),zn=ge||Ce,Wn=(0,mt.useRef)(),Kn=(0,mt.useRef)(),ir=(0,mt.useRef)(),Ar=(0,mt.useState)(0),sn=(0,Bt.Z)(Ar,2),qe=sn[0],$e=sn[1],un=(0,mt.useState)(0),or=(0,Bt.Z)(un,2),Qn=or[0],pr=or[1],xn=(0,mt.useState)(!1),Rn=(0,Bt.Z)(xn,2),vr=Rn[0],Nr=Rn[1],Nn=function(){Nr(!0)},Oe=function(){Nr(!1)},Ke={getKey:Yn};function Ln(sr){$e(function(wr){var Jr;typeof sr=="function"?Jr=sr(wr):Jr=sr;var mr=Ir(Jr);return Wn.current.scrollTop=mr,mr})}var An=(0,mt.useRef)({start:0,end:zn.length}),en=(0,mt.useRef)(),Tn=ut(zn,Yn),kn=(0,Bt.Z)(Tn,1),On=kn[0];en.current=On;var er=mt.useMemo(function(){if(!hr)return{scrollHeight:void 0,start:0,end:zn.length-1,offset:void 0};if(!qt){var sr;return{scrollHeight:((sr=Kn.current)===null||sr===void 0?void 0:sr.offsetHeight)||0,start:0,end:zn.length-1,offset:void 0}}for(var wr=0,Jr,mr,Vr,yr=zn.length,ur=0;ur<yr;ur+=1){var kr=zn[ur],Cn=Yn(kr),di=Or.get(Cn),Ci=wr+(di===void 0?Rt:di);Ci>=qe&&Jr===void 0&&(Jr=ur,mr=wr),Ci>qe+It&&Vr===void 0&&(Vr=ur),wr=Ci}return Jr===void 0&&(Jr=0,mr=0,Vr=Math.ceil(It/Rt)),Vr===void 0&&(Vr=zn.length-1),Vr=Math.min(Vr+1,zn.length-1),{scrollHeight:wr,start:Jr,end:Vr,offset:mr}},[qt,hr,qe,zn,Sr,It]),Fn=er.scrollHeight,Bn=er.start,Un=er.end,cr=er.offset;An.current.start=Bn,An.current.end=Un,mt.useLayoutEffect(function(){var sr=Or.getRecord();if(sr.size===1){var wr=Array.from(sr.keys())[0],Jr=sr.get(wr),mr=zn[Bn];if(mr&&Jr===void 0){var Vr=Yn(mr);if(Vr===wr){var yr=Or.get(wr),ur=yr-Rt;Ln(function(kr){return kr+ur})}}}Or.resetRecord()},[Fn]);var lr=mt.useState({width:0,height:It}),yn=(0,Bt.Z)(lr,2),In=yn[0],Gr=yn[1],Yr=function(wr){Gr({width:wr.offsetWidth,height:wr.offsetHeight})},fi=(0,mt.useRef)(),tn=(0,mt.useRef)(),tr=mt.useMemo(function(){return pe(In.width,Ye)},[In.width,Ye]),gr=mt.useMemo(function(){return pe(In.height,Fn)},[In.height,Fn]),Hn=Fn-It,Zr=(0,mt.useRef)(Hn);Zr.current=Hn;function Ir(sr){var wr=sr;return Number.isNaN(Zr.current)||(wr=Math.min(wr,Zr.current)),wr=Math.max(wr,0),wr}var Hr=qe<=0,Qr=qe>=Hn,ei=Qn<=0,hi=Qn>=Ye,mn=Dt(Hr,Qr,ei,hi),vi=function(){return{x:jn?-Qn:Qn,y:qe}},gn=(0,mt.useRef)(vi()),oi=(0,St.zX)(function(sr){if(We){var wr=(0,ot.Z)((0,ot.Z)({},vi()),sr);(gn.current.x!==wr.x||gn.current.y!==wr.y)&&(We(wr),gn.current=wr)}});function Gi(sr,wr){var Jr=sr;wr?((0,xt.flushSync)(function(){pr(Jr)}),oi()):Ln(Jr)}function mi(sr){var wr=sr.currentTarget.scrollTop;wr!==qe&&Ln(wr),Ue==null||Ue(sr),oi()}var Bi=function(wr){var Jr=wr,mr=Ye?Ye-In.width:0;return Jr=Math.max(Jr,0),Jr=Math.min(Jr,mr),Jr},ii=(0,St.zX)(function(sr,wr){wr?((0,xt.flushSync)(function(){pr(function(Jr){var mr=Jr+(jn?-sr:sr);return Bi(mr)})}),oi()):Ln(function(Jr){var mr=Jr+sr;return mr})}),Rr=Ft(hr,Hr,Qr,ei,hi,!!Ye,ii),wi=(0,Bt.Z)(Rr,2),Eo=wi[0],Oi=wi[1];se(hr,Wn,function(sr,wr,Jr,mr){var Vr=mr;return mn(sr,wr,Jr)?!1:!Vr||!Vr._virtualHandled?(Vr&&(Vr._virtualHandled=!0),Eo({preventDefault:function(){},deltaX:sr?wr:0,deltaY:sr?0:wr}),!0):!1}),Yt(qt,Wn,function(sr){Ln(function(wr){return wr+sr})}),(0,Tt.Z)(function(){function sr(Jr){var mr=Hr&&Jr.detail<0,Vr=Qr&&Jr.detail>0;hr&&!mr&&!Vr&&Jr.preventDefault()}var wr=Wn.current;return wr.addEventListener("wheel",Eo,{passive:!1}),wr.addEventListener("DOMMouseScroll",Oi,{passive:!0}),wr.addEventListener("MozMousePixelScroll",sr,{passive:!1}),function(){wr.removeEventListener("wheel",Eo),wr.removeEventListener("DOMMouseScroll",Oi),wr.removeEventListener("MozMousePixelScroll",sr)}},[hr,Hr,Qr]),(0,Tt.Z)(function(){if(Ye){var sr=Bi(Qn);pr(sr),oi({x:sr})}},[In.width,Ye]);var $n=function(){var wr,Jr;(wr=fi.current)===null||wr===void 0||wr.delayHidden(),(Jr=tn.current)===null||Jr===void 0||Jr.delayHidden()},Le=ve(Wn,zn,Or,Rt,Yn,function(){return Tr(!0)},Ln,$n);mt.useImperativeHandle(wt,function(){return{nativeElement:ir.current,getScrollInfo:vi,scrollTo:function(wr){function Jr(mr){return mr&&(0,Re.Z)(mr)==="object"&&("left"in mr||"top"in mr)}Jr(wr)?(wr.left!==void 0&&pr(Bi(wr.left)),Le(wr.top)):Le(wr)}}}),(0,Tt.Z)(function(){if(Ve){var sr=zn.slice(Bn,Un+1);Ve(sr,zn)}},[Bn,Un,zn]);var Ti=Nt(zn,Yn,Or,Rt),so=an==null?void 0:an({start:Bn,end:Un,virtual:qt,offsetX:Qn,offsetY:cr,rtl:jn,getSize:Ti}),Ji=at(zn,Bn,Un,Ye,Qn,Mr,Me,Ke),Zi=null;It&&(Zi=(0,ot.Z)((0,_t.Z)({},$t?"height":"maxHeight",It),de),hr&&(Zi.overflowY="hidden",Ye&&(Zi.overflowX="hidden"),vr&&(Zi.pointerEvents="none")));var pi={};return jn&&(pi.dir="rtl"),mt.createElement("div",(0,ae.Z)({ref:ir,style:(0,ot.Z)((0,ot.Z)({},ue),{},{position:"relative"}),className:Jn},pi,Xn),mt.createElement(bt.Z,{onResize:Yr},mt.createElement(He,{className:"".concat(Xt,"-holder"),style:Zi,ref:Wn,onScroll:mi,onMouseEnter:$n},mt.createElement(z,{prefixCls:Xt,height:Fn,offsetX:Qn,offsetY:cr,scrollWidth:Ye,onInnerResize:Tr,ref:Kn,innerProps:rn,rtl:jn,extra:so},Ji))),qt&&Fn>It&&mt.createElement(be,{ref:fi,prefixCls:Xt,scrollOffset:qe,scrollRange:Fn,rtl:jn,onScroll:Gi,onStartMove:Nn,onStopMove:Oe,spinSize:gr,containerSize:In.height,style:ln==null?void 0:ln.verticalScrollBar,thumbStyle:ln==null?void 0:ln.verticalScrollBarThumb,showScrollBar:_n}),qt&&Ye>In.width&&mt.createElement(be,{ref:tn,prefixCls:Xt,scrollOffset:Qn,scrollRange:Ye,rtl:jn,onScroll:Gi,onStartMove:Nn,onStopMove:Oe,spinSize:tr,containerSize:In.width,horizontal:!0,style:ln==null?void 0:ln.horizontalScrollBar,thumbStyle:ln==null?void 0:ln.horizontalScrollBarThumb,showScrollBar:_n}))}var Ne=mt.forwardRef(ye);Ne.displayName="List";var xe=Ne,re=xe},7062:function(dn,fn,le){var ae=le(19637),Re=le(97573),ot=[le(96627)];dn.exports=ae.createStore(Re,ot)},96627:function(dn,fn,le){dn.exports=ae;function ae(){return le(42424),{}}},42424:function(){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(dn){return dn<10?"0"+dn:dn}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(dn){return rx_escapable.lastIndex=0,rx_escapable.test(dn)?'"'+dn.replace(rx_escapable,function(fn){var le=meta[fn];return typeof le=="string"?le:"\\u"+("0000"+fn.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+dn+'"'}function str(dn,fn){var le,ae,Re,ot,_t=gap,Bt,vt=fn[dn];switch(vt&&typeof vt=="object"&&typeof vt.toJSON=="function"&&(vt=vt.toJSON(dn)),typeof rep=="function"&&(vt=rep.call(fn,dn,vt)),typeof vt){case"string":return quote(vt);case"number":return isFinite(vt)?String(vt):"null";case"boolean":case"null":return String(vt);case"object":if(!vt)return"null";if(gap+=indent,Bt=[],Object.prototype.toString.apply(vt)==="[object Array]"){for(ot=vt.length,le=0;le<ot;le+=1)Bt[le]=str(le,vt)||"null";return Re=Bt.length===0?"[]":gap?`[
|
|
`+gap+Bt.join(`,
|
|
`+gap)+`
|
|
`+_t+"]":"["+Bt.join(",")+"]",gap=_t,Re}if(rep&&typeof rep=="object")for(ot=rep.length,le=0;le<ot;le+=1)typeof rep[le]=="string"&&(ae=rep[le],Re=str(ae,vt),Re&&Bt.push(quote(ae)+(gap?": ":":")+Re));else for(ae in vt)Object.prototype.hasOwnProperty.call(vt,ae)&&(Re=str(ae,vt),Re&&Bt.push(quote(ae)+(gap?": ":":")+Re));return Re=Bt.length===0?"{}":gap?`{
|
|
`+gap+Bt.join(`,
|
|
`+gap)+`
|
|
`+_t+"}":"{"+Bt.join(",")+"}",gap=_t,Re}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(dn,fn,le){var ae;if(gap="",indent="",typeof le=="number")for(ae=0;ae<le;ae+=1)indent+=" ";else typeof le=="string"&&(indent=le);if(rep=fn,fn&&typeof fn!="function"&&(typeof fn!="object"||typeof fn.length!="number"))throw new Error("JSON.stringify");return str("",{"":dn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(dn,fn){var le,ae,Re=dn[fn];if(Re&&typeof Re=="object")for(le in Re)Object.prototype.hasOwnProperty.call(Re,le)&&(ae=walk(Re,le),ae!==void 0?Re[le]=ae:delete Re[le]);return reviver.call(dn,fn,Re)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(dn){return"\\u"+("0000"+dn.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},19637:function(dn,fn,le){var ae=le(67039),Re=ae.slice,ot=ae.pluck,_t=ae.each,Bt=ae.bind,vt=ae.create,gt=ae.isList,kt=ae.isFunction,bt=ae.isObject;dn.exports={createStore:mt};var St={version:"2.0.12",enabled:!1,get:function(xt,ft){var z=this.storage.read(this._namespacePrefix+xt);return this._deserialize(z,ft)},set:function(xt,ft){return ft===void 0?this.remove(xt):(this.storage.write(this._namespacePrefix+xt,this._serialize(ft)),ft)},remove:function(xt){this.storage.remove(this._namespacePrefix+xt)},each:function(xt){var ft=this;this.storage.each(function(z,tt){xt.call(ft,ft._deserialize(z),(tt||"").replace(ft._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(xt){return this._namespacePrefix=="__storejs_"+xt+"_"},createStore:function(){return mt.apply(this,arguments)},addPlugin:function(xt){this._addPlugin(xt)},namespace:function(xt){return mt(this.storage,this.plugins,xt)}};function Tt(){var xt=typeof console=="undefined"?null:console;if(xt){var ft=xt.warn?xt.warn:xt.log;ft.apply(xt,arguments)}}function mt(xt,ft,z){z||(z=""),xt&&!gt(xt)&&(xt=[xt]),ft&&!gt(ft)&&(ft=[ft]);var tt=z?"__storejs_"+z+"_":"",at=z?new RegExp("^"+tt):null,it=/^[a-zA-Z0-9_\-]*$/;if(!it.test(z))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var lt={_namespacePrefix:tt,_namespaceRegexp:at,_testStorage:function(dt){try{var Pt="__storejs__test__";dt.write(Pt,Pt);var At=dt.read(Pt)===Pt;return dt.remove(Pt),At}catch(Dt){return!1}},_assignPluginFnProp:function(dt,Pt){var At=this[Pt];this[Pt]=function(){var Ft=Re(arguments,0),Nt=this;function jt(){if(At)return _t(arguments,function(Wt,Jt){Ft[Jt]=Wt}),At.apply(Nt,Ft)}var Gt=[jt].concat(Ft);return dt.apply(Nt,Gt)}},_serialize:function(dt){return JSON.stringify(dt)},_deserialize:function(dt,Pt){if(!dt)return Pt;var At="";try{At=JSON.parse(dt)}catch(Dt){At=dt}return At!==void 0?At:Pt},_addStorage:function(dt){this.enabled||this._testStorage(dt)&&(this.storage=dt,this.enabled=!0)},_addPlugin:function(dt){var Pt=this;if(gt(dt)){_t(dt,function(Ft){Pt._addPlugin(Ft)});return}var At=ot(this.plugins,function(Ft){return dt===Ft});if(!At){if(this.plugins.push(dt),!kt(dt))throw new Error("Plugins must be function values that return objects");var Dt=dt.call(this);if(!bt(Dt))throw new Error("Plugins must return an object of function properties");_t(Dt,function(Ft,Nt){if(!kt(Ft))throw new Error("Bad plugin property: "+Nt+" from plugin "+dt.name+". Plugins should only return functions.");Pt._assignPluginFnProp(Ft,Nt)})}},addStorage:function(dt){Tt("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(dt)}},ut=vt(lt,St,{plugins:[]});return ut.raw={},_t(ut,function(dt,Pt){kt(dt)&&(ut.raw[Pt]=Bt(ut,dt))}),_t(xt,function(dt){ut._addStorage(dt)}),_t(ft,function(dt){ut._addPlugin(dt)}),ut}},67039:function(dn,fn,le){var ae=Bt(),Re=vt(),ot=gt(),_t=typeof window!="undefined"?window:le.g;dn.exports={assign:ae,create:Re,trim:ot,bind:kt,slice:bt,each:St,map:Tt,pluck:mt,isList:xt,isFunction:ft,isObject:z,Global:_t};function Bt(){return Object.assign?Object.assign:function(at,it,lt,ut){for(var dt=1;dt<arguments.length;dt++)St(Object(arguments[dt]),function(Pt,At){at[At]=Pt});return at}}function vt(){if(Object.create)return function(it,lt,ut,dt){var Pt=bt(arguments,1);return ae.apply(this,[Object.create(it)].concat(Pt))};{let at=function(){};var tt=at;return function(lt,ut,dt,Pt){var At=bt(arguments,1);return at.prototype=lt,ae.apply(this,[new at].concat(At))}}}function gt(){return String.prototype.trim?function(at){return String.prototype.trim.call(at)}:function(at){return at.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function kt(tt,at){return function(){return at.apply(tt,Array.prototype.slice.call(arguments,0))}}function bt(tt,at){return Array.prototype.slice.call(tt,at||0)}function St(tt,at){mt(tt,function(it,lt){return at(it,lt),!1})}function Tt(tt,at){var it=xt(tt)?[]:{};return mt(tt,function(lt,ut){return it[ut]=at(lt,ut),!1}),it}function mt(tt,at){if(xt(tt)){for(var it=0;it<tt.length;it++)if(at(tt[it],it))return tt[it]}else for(var lt in tt)if(tt.hasOwnProperty(lt)&&at(tt[lt],lt))return tt[lt]}function xt(tt){return tt!=null&&typeof tt!="function"&&typeof tt.length=="number"}function ft(tt){return tt&&{}.toString.call(tt)==="[object Function]"}function z(tt){return tt&&{}.toString.call(tt)==="[object Object]"}},97573:function(dn,fn,le){dn.exports=[le(52496),le(16436),le(76673),le(35701),le(65578),le(65300)]},35701:function(dn,fn,le){var ae=le(67039),Re=ae.Global,ot=ae.trim;dn.exports={name:"cookieStorage",read:Bt,write:gt,each:vt,remove:kt,clearAll:bt};var _t=Re.document;function Bt(Tt){if(!Tt||!St(Tt))return null;var mt="(?:^|.*;\\s*)"+escape(Tt).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(_t.cookie.replace(new RegExp(mt),"$1"))}function vt(Tt){for(var mt=_t.cookie.split(/; ?/g),xt=mt.length-1;xt>=0;xt--)if(ot(mt[xt])){var ft=mt[xt].split("="),z=unescape(ft[0]),tt=unescape(ft[1]);Tt(tt,z)}}function gt(Tt,mt){Tt&&(_t.cookie=escape(Tt)+"="+escape(mt)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function kt(Tt){!Tt||!St(Tt)||(_t.cookie=escape(Tt)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function bt(){vt(function(Tt,mt){kt(mt)})}function St(Tt){return new RegExp("(?:^|;\\s*)"+escape(Tt).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(_t.cookie)}},52496:function(dn,fn,le){var ae=le(67039),Re=ae.Global;dn.exports={name:"localStorage",read:_t,write:Bt,each:vt,remove:gt,clearAll:kt};function ot(){return Re.localStorage}function _t(bt){return ot().getItem(bt)}function Bt(bt,St){return ot().setItem(bt,St)}function vt(bt){for(var St=ot().length-1;St>=0;St--){var Tt=ot().key(St);bt(_t(Tt),Tt)}}function gt(bt){return ot().removeItem(bt)}function kt(){return ot().clear()}},65300:function(dn){dn.exports={name:"memoryStorage",read:le,write:ae,each:Re,remove:ot,clearAll:_t};var fn={};function le(Bt){return fn[Bt]}function ae(Bt,vt){fn[Bt]=vt}function Re(Bt){for(var vt in fn)fn.hasOwnProperty(vt)&&Bt(fn[vt],vt)}function ot(Bt){delete fn[Bt]}function _t(Bt){fn={}}},16436:function(dn,fn,le){var ae=le(67039),Re=ae.Global;dn.exports={name:"oldFF-globalStorage",read:_t,write:Bt,each:vt,remove:gt,clearAll:kt};var ot=Re.globalStorage;function _t(bt){return ot[bt]}function Bt(bt,St){ot[bt]=St}function vt(bt){for(var St=ot.length-1;St>=0;St--){var Tt=ot.key(St);bt(ot[Tt],Tt)}}function gt(bt){return ot.removeItem(bt)}function kt(){vt(function(bt,St){delete ot[bt]})}},76673:function(dn,fn,le){var ae=le(67039),Re=ae.Global;dn.exports={name:"oldIE-userDataStorage",write:gt,read:kt,each:bt,remove:St,clearAll:Tt};var ot="storejs",_t=Re.document,Bt=ft(),vt=(Re.navigator?Re.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function gt(z,tt){if(!vt){var at=xt(z);Bt(function(it){it.setAttribute(at,tt),it.save(ot)})}}function kt(z){if(!vt){var tt=xt(z),at=null;return Bt(function(it){at=it.getAttribute(tt)}),at}}function bt(z){Bt(function(tt){for(var at=tt.XMLDocument.documentElement.attributes,it=at.length-1;it>=0;it--){var lt=at[it];z(tt.getAttribute(lt.name),lt.name)}})}function St(z){var tt=xt(z);Bt(function(at){at.removeAttribute(tt),at.save(ot)})}function Tt(){Bt(function(z){var tt=z.XMLDocument.documentElement.attributes;z.load(ot);for(var at=tt.length-1;at>=0;at--)z.removeAttribute(tt[at].name);z.save(ot)})}var mt=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function xt(z){return z.replace(/^\d/,"___$&").replace(mt,"___")}function ft(){if(!_t||!_t.documentElement||!_t.documentElement.addBehavior)return null;var z="script",tt,at,it;try{at=new ActiveXObject("htmlfile"),at.open(),at.write("<"+z+">document.w=window</"+z+'><iframe src="/favicon.ico"></iframe>'),at.close(),tt=at.w.frames[0].document,it=tt.createElement("div")}catch(lt){it=_t.createElement("div"),tt=_t.body}return function(lt){var ut=[].slice.call(arguments,0);ut.unshift(it),tt.appendChild(it),it.addBehavior("#default#userData"),it.load(ot),lt.apply(this,ut),tt.removeChild(it)}}},65578:function(dn,fn,le){var ae=le(67039),Re=ae.Global;dn.exports={name:"sessionStorage",read:_t,write:Bt,each:vt,remove:gt,clearAll:kt};function ot(){return Re.sessionStorage}function _t(bt){return ot().getItem(bt)}function Bt(bt,St){return ot().setItem(bt,St)}function vt(bt){for(var St=ot().length-1;St>=0;St--){var Tt=ot().key(St);bt(_t(Tt),Tt)}}function gt(bt){return ot().removeItem(bt)}function kt(){return ot().clear()}},93314:function(dn){"use strict";dn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},96908:function(dn){"use strict";dn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6ufS1soxaW1Si0KBaFVWy2ittqqdQ9xpYq4tLgVFWUThYQlJIEkkJXs63u333lzL+/mrfeF9/KSeM/35Xv3zZw5c+bM/83MOTN3ouGQY4EuZAGtC+niqOJYAAeQDgi6lAU0fUayHqCR5gJXEriS/T6TICkZNOMzIN/gFx7/8vvLiFxDtpfP4G2Xb5Ej6SaPKddav6mPtb5g9e/PF9nSvmTVlpD1S36Sr63WOj1ukD/d+PR+b1NpAekmj5Gve8Dd5lc2ivK4G2lzV4K7Eo/8eSrQ3ZW424rw6J/ST1utTb2jtkuhLAplwgDS7BDj09txdgFqgsjCbwVOKMCYAPH+IAzABIDf8qPYz+OygMus0+8HFQDmYDpaypj1mp+m/qKbgMoKQO+zxwIyCzhNPhOIQQFrAas/uK3l5dlt/SEY9bbn0ZsrS1obynfXNJQXFTeUbPugua5utQZrM7PZHgU2EsIaHJAJUcWp1JYFklKgVx/fX0oqpPSBgw6BASOh/xAlxgC+u6WJqh0bqdi2nrb66gI0sjQXL2W8xHpb9XUykwPITjZ43KuTpcnBw2HA4TBwFBw81Dt66+42aoq2U7FjAw0Ve8R52KxpLB6v86KWjTvuetmswAGkTUN1W7aDBsHIieiHjkVDlhpuavbkU7ThE9wtjQLMbTosyFzGc5pGoD/RyQ13ANnJBk9YdSm9YVg6+tB0NC2ZtqZ6dn/1P+rKirwqaRqrknVuSM9mZ8J0FD2CetmJ1MipO74WkPXn0VOg72CvY1ZRuJU9uRvQPW4ZLes0jdszlvG3+CoRWroDyERZPtH1Dk1HH56B5vHQWFvJzrUf42lrUaMlPJ4BMxOxtnQAmWhgJLL+3gPQR5+E1qsPDdXl5G9YjUdipIreGpzGFUOfpb4zVXQA2ZnW7op1paSiH30qWlIqdVWlFGz6Al1ipmqkXH0wnD0ym8bOUt0BZGdZuivXk9IH/ajJaK4Uasr3UJizUQX/Fb2WOZ7LtfniosefHEDG38bdo4bUvuijJqG5XFQU5VOSv22/3hr8NTObWzqjIQ4gO8PK3aWO3v3RR57gHR13blpHQ121FZTTM7N5Od5NcQAZbwt3N/mDjvDu8jQ11rHj6/XoskevqKxXMuOPfZHyeDbJAWQ8rdsdZct2zYjj0VJS2bu7gLLiXdZRMiszmx/Hs1kOIONp3e4qO60/+rBx6O5WdmzeRHOTz8lO0pg2fhkr4tU0B5Dxsmx3lytTd99B1FZVUZC31dqanMzxTNDmsz9gGcumOoCMpTV7kixXEvrwCV4HZ1vuZlqamqytu2VCNn+NR3MdQMbDqj1Epj5wBFqfgVSU7qWkWB3CENKgEhibme39jCklBpCysf/H3aohrY1w64CYNqrLCJOziRJg1hN+qqtjJklJQx88xrudmJuzBY+cVveBcmlmNr/qmODQpRIHyPuKlVYtjXBL/1i3K7HyDh4Gp94IU2+Ee0+A+pgPJJ3WPn3QEWgpvSkpKaaiosJabxsuJk7IYksslXEAGUtrmrIW5sHAkerb7UO6NSBJ6wcDhnvXkFu354HlDK8GKzOzOS+WJnQAGUtrmrIW5atXCHoCIDXwDDwSlyuJvIICGhran7OIdRjIAaQDyIgW0PsNRkvtR2l5OaXlAcuPmIaBuh4gp1wP/QYrI338ODRUBRpM0+Cc36p0OVT6nwd9PIcdAydcqr7nroL8NXDi5TBmKoyepPgL16n0dS+3dzgGjoaTjY0If7n+Wow+GdK/p1Jr9sC+Ihg1SX0X3Xob6+K3F0FLg0r/egUUbWovSRy8SdNh5PEw4jho2Ae71sOuDbDhVaWvP1nbWLIZvvo3TLwQvjtDvdQlaf+eB2Uxeuu1V2/oP4yGhnryCn3etqmWS+PmjGUsiYhsGwxdD5C/WwsjJirV7xkX3KjyPvZSY+poqoXbBvqaetzF8HPjDMAbc2HIWDjlp8FNsfldePIaH+iTU2FxIRxkyHvgu5D3afCyM5dDprF8emuBN4jM6TPDm/zZG+HTf/l4xpwG1z/nXaMFpYIv4fHpUGVEJEwmaxu/eBFyP4Br/t5exMPnwZb3bUDADouGPmiU9+3FnLxC3BZvW0rHMgzUswEpI5O8Q9LaDAVroHgzDE2H0SdB6kGqJyryYdFJ0GicbLnsfjjLOGn1yT/ghRmBPSajmgBXLg+Qwwd3j4WzboXTDV4J95jkPZxghH2e+xl89ozKEVDdlKVu8RAq/lqNikm91Eg++GiVXlsGD52tRr1ggCz+BgaPAXk/20oxBSTo/YagJfdiV8lequuMEd9SnwYxCQP1bECKwerK4ZELQUYbk2RbbNZbMOQYlbJyMSy/Wz3LdDjvG/XcWAN3Hg6t7XYp4IxZ8CNjmSCj7NJp7cEQyamRH8m8zT7H54WZ8MkTPhlyO4ZM+xcvUGkb3oDHLw8OSDP1m3fgw0ehtlSBWUb2ysL2eh3It7T+iMddVV1LUVnQMFZMwkA9H5CPXQqb3gzsChlVBBSyHm2uh7ljFHiFbn4Pjj1DPT/1U5Bp0Uq/XQ1HnKxSnrgC1r8aHSAvnAfn3aXKfPYsPHN9cKiYywIJrC+a5Ft/WqfsSDIOBITWsnJjRr/DaG1pIbewJKjUWISBejYgZTqeOzZ0l9zyPhxzusp/7BLY9JZ6FifjhhfUc85/YckPfDKsI6iMRnNGq3t+rBRphJyzBuQgrNBD34etHwTXcfLVcN3TKu/d++H136lnKyDlx3TXkcGdv1iB0ZTT7zDv0/aiMppaWoNKP9AwUM8G5Fdvwt8MjzuY+ab/Bc40dr+yfw2rDEdRRgMBlXSArAFl9KwyzgVaR7f3HoDX5gRKjgTIh6rV2lZow+uBSwJTojhX489R32QUltHYH5A7P4P7T4s19ILLk2k7JY3SqhpK99WFqvOAwkA9G5Af/R1emhW6s865HS5ZpPJXLYXsW328Fy+EH9yhvi+/B1YafH/YCoceqdLnZUBpu6NZKj0cICVgLvnRkoSCFk8OBOSXy+DJq6OV1jH+5F6Q1p/G5mZ2lAQJxxlSDyQMFHtATpgGR56iVNvyHmz7KLDxstcrXqpQUx3cdoiPJ5ZhnzUvwNPXhjb+tLth2lyV/86f4I3f+3jF8Zmfq+6SLNsB96TDUVPgNx8qHmnXg2cFlx0OkDIyPrhPrV2FJNbqe8MvtK4S3go2Zcv6Vta5nUGicp9B3vuBcooraXMHfxHxQMJAsQfkRQvg3DuVeazeq9Vgo06EOz9XKXu3wvwMX651fbXgeCgxPF5reQlgLzSCvuHikOJpSiwxFF3zBEy5TuU+exN8aqzXTP5fvgkZxvrxz2fC5CvhtJ+p3KevgzXPRw9IKWHd6w41yoYDmH8csrMAKTql9vWGqoqr6qisaw6pZUfDQLEH5Hd+Atc+qRRdmw3/vCpQaStPzn9gybk+nl+8BhMvUN+XXgCb3wksf+1T8J1rVHo4QMoux7xxwcMfElwXUJt7zg+cDnmr29clux+/MDxoGW0zzlVBc9lNmTMy9Nov0hpy1goY/31Vl3/Ix6rB8ZfACT9UKRJe+vw59ZxIQMq0nZJGbUMzBRVhL7XoUBgo9oCUoPMdxu6GBKQXTIByy4VaKWnwm4/VVpnQf5fAy7/2dcP0B+FMY90XbMo9fCLM+UJNpZEAKflfZqndGH8SZ0acGiEJSC82wjhWPokH3pvnA62ZJ/G+rJsDZZop1nWmePni7VvpuIvg56+oFNlynJ8JzX5OgswCd63zbUH+5Xuw/ePEA1KWGvIOt9vNlr21eDyhz3p2JAwUe0CKyWavhHRjfVVXoUAni38x8ik/geHGFC33yMgIZu2wcWfDr972dZ/slnz+PNTuhaNPhUvuVd6vSeFGSPGQBbjrXoH3/gxl22BIOpz0I593LXIevQi+ttRpBc/5c+ECI2hupt8rMcGvQgPSGk6SsFHO+2rPXLxyk2a8DrLeFirdrtaHEryXy0ZlmTD5Kt9uzTcrVXDfpESOkKKD7G3rOruqmqhuCv9qjcvF+RlZhDBuoAnjA0iJ1ckoaR4wCNV1794HrxsBYivPze/CsWcGLyUgWz5XAVMoHCAFiEInXhZcloBkxQKQvehQJFP6wh2+Lb78L+C+KaH5JUeWE7Ks8KdZaeqqZaFDRsCMN3z79qEk7t4IMjo21XQdQLpSvP8QoKaxlcJ9odeRorCmsSVjHBPtvhQWH0CKJtKRVz3mO4BgNXhFgQrHyC8/GMmhUNlTPvWG9rnVJarcphX2DleIByrOxxVL1Mhsxv5EqkyVWbNh4/Lw4JLc2e/4TvbI3raM2pFo6k1wxkwYPNa3z2wFpJSXeOf5v1d751bdJE/WqfJDkeWBf+A90SOkTNtJvdA9bWwpa8ET4RWNaMJA8QOk2WF9DlEHGmS6FhDszVX7rXao76EwdJy6yF2OjJXLieUIFKqzpPMlHCWjdsFadWTMDglQFhVAnwFqi/HOEYHrPTtywvFIBx96FAzPVODbk6PW3XbCQQdad0fLiz11D7urW9nXHP4eqmjCQPEHZEcb3NFysR49JMxz5SNKm9VPgZzYcQjE4ZOzKy1u8qtt3Jmv8fCEZcyOZDoHkJEsNHcjDBuvuO6bCvlG/DRSuW9Dvly74tHZUumOOG3LUWo7L4U5gAwHHHGsxMESkvOKC40DEd8GsEXRxqI6D1VNka+P1ODtzGzOD7t66XGX3sdyypaguATHhbJvg1UPR9FN3x7WxjbYsc/ezSqRwkA9b4QclqE8aiEJeH/5UseQITs5F81X/+tQSPa6g73f0zHpPaqUhMa3VrppDRMkNxscKQzU8wDZo7q6+zSmtFGntN6GcwOECwM5gOw+fd6lNW31QG6lADLytTHhwkAOILt0N3cv5XZWe6gXZNqhEGEgB5B2jOfw2LLAvmad3bX2pu1QYSAHkLZM7TDZsYD4NDn2YpJeccHCQA4g7Vja4bFtgeJ6D5WNNqdtcXD8TgM5gLRtaofRjgWa3LC9yl5M0jtK+p0GcgBpx8oOT1QWyKt209Aa2ds2hbpczM7Iwrvr4AAyKlM7zHYsEKVz0+5uIAeQdizs8Ni2gIyL8icxSbeNnZv9go0wkANI26Z2GKOxwJ56D+VRODdmGMgBZDRWdnhtW6C6WWeX/Zjk/jDQ/wHkSLPJ/mcrgQAAAABJRU5ErkJggg=="},57177:function(dn){"use strict";dn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDdrx3HxWnnEnz1eevhOf/79HpNdrAs6wrQr9VvtiMc+/kc0HSan9Nrq8Uzt9hquuZjv8kPev26r8x16X5VPYDHDYT7Vy/L8vo94d7P8u5mcV+w+1U34GEZ7a+5Tg/vV31tbrmu36ff23JcB9VdBo9a5v2rekq14/1wN30GNXGzctPKKgf7eExVKUGBpJsSEkgWYPMHXEuH0sHlB5iW8jrAtE6sd9AW8GidVD9mR/fvxDrAzJ3Yp/ObAGL3srC1XweJnf0awHUQWgGJ52i3P+D9OyOP/QHSAjYT8Lwd3gRGH3Bp5dza34D7LUDsD04vmPzuN9cZGkSAF3xm4JttNoFWdasNlRVNta4SV21l6YHakvyPGurrNivA12kZ2B1TdLSisvAA1QrF8hbpAUsP8EWVkAwkdgMSugHxiUB8EpDcC+g1AOjeG+BciSBWPXA3NaA8Pxel+7LRXF+bCwXpShxeTX0V33ZED0tAdcRW+X+2iaN3j35Ar/7iX/e+XnCpbg9cZfkozctBrauci/9tioIlKSpeUTLg7iguk4DqKC0h7bD2QPJBQP/hUHsNhsIVv+qBq7QI+7O2w93USGDtUoEFaavxoqJ4x7Z2FQmodnW/rDxsD3Ba2PcwqL0PhaLEobmxAXnZmaiuKPOqUBRsSlBx06gM7AlbZxQKSkBFwalSZRQ9kJAEDD4GSD7Yyz6WFu5HQV4uVI+Ho1W1ouCe1NV4OooWBFUtAdVenpf1ts0DfQ6F2mcoOMurq6nCnp2Z8DAMwNEKWJEKTG+PtZUEVNuaVd7dnh5I6gF1wFFQEpJQW+1CTtYueBgeEPLuwGRcNWQVamJpogRULL0t63LeA/GJUAeNhBKXgOpqF3Kzs6Ey3iVGqs29gQnDMlDnfMXWGiWgYuVpWU/0PBCfBHXQ0VCUeLgqK7B3b67I4BDyZloKrlTmQ6AsyiIBFWUHS/Ux8kBCMtT+w70MYGlJMfILCloqVoDH0jIwMxaWSEDFwsuyjth4IKk71D7DGKzCnj05qK0zZnoKMDUtA69F2xAJqGh7WOqPrQeYvtSjL+rr65C1JxeqMfUrTkpAyrGvoCSaBklARdO7UnfsPaAAat/DocTFo7C4FMWlIvBLUYD0tAz8KppGSUBF07tSd/t4ILE71N5DoHrcyMrJQ0NjY4sd8QompazGumgZJgEVLc9Kve3rgZ79gW49UVVdg9wDhWZbMtNSMEaZDxEFdlgkoBx2qFTXQTygxHnz/gAPdu3NR2Njk9mwmWMy8Fg0LJWAioZXpU7DA/0OB479hTguyQZ2/Sdm3lF79IWS2B2llVXILylvqVcBuLAamZbh/euotA+geg0E/ponHqSpDrizj6MP1WGU8WM671eq7fhVweTFwIQ/Cpe8PRfY8NfYuue4y4BbNbb6y1eA534Tu/rjEqEeNAAejxs7cgvg4VfGmijA8rQM3Oa0Me0HqKUHxLM01gEzD3b6udpXX+9DgNNvBs64GVh0PFDj+Isw/Oe7fAlw3t2i/NoHgPVLwr/XiZLtCShGpHr29zJ++aWVKHX5pPU1Iw5jx6RjuxOP2QLUsPaUcLJG6uII1ZUBtTAb6McAI4B7BktAtdcIRf/zM/vkg9HY3IydeQxBGbMFBVifloELnezecoRy0pu6rsU5QJ/DJKDogXYeoWiCp2c/7mWF7MJy1Nb7kBNwmkaXgJKAioYHDJ0dAFBqt55Q4ruhyFWDooqArzkcpdE7HqBOuxE4aKBokE9WALUGO9PSStxc4Px7xWFzI/DhI0YDDjoGOP5ycbxjE5CzBRh/JTDiDGD4CaL83m/E+W9e8yUM+g0HTtIC6f56/bvd8JOAURp75SoAKvYDh58gStG27tq68L3FQGOtOP/TOmD/j76aOP09YSowbBww9DigtgLY9y2w7zvguzeEvf5ifsb8bcAPbwNjLwF+Pg3oPQTgubfnAcW7ASfXUAOOBH52PTB0nKiHn6UXZwFFu4DPVwEFFssRK0BRz7gpwn/0U+7XQM6XwFfpYrsxpyUhEUjqhdqGJmQXVgRoj1NwR+pqLHOi2o4HqD99DQwdK55t7mjRKfyF++4t1xIf66uAu/oZJcwNuGYOMHgkcKoNs7TtfWDltQZoOd9eshfoqel76OdA9mfWfp6+FkjTpt/vLhA79Jw1PXibrLoZ+OwFo8yIM4EbXwT6MF5iIblfASumAuUaI6oX8e+kOz4Crn3GV8HjFwLbP3AOUJfMBybO9m7eYCnuJmDjQ4L4MIu/rR8+Bty2zvCxuezuT4AVVwHVxU70bR8dao8+XsY1c38F3Ca2j4WcpNG7NqA4MiT1AJoagNwtwIFtwJBRwPATvVF0r5TmAItPBOoqxfEVDwLnapn+n/4DeHlaYONyVCHw4hPErqoPjATOvRM4Syvr3RVWE2/jaQvhF38HfP4vcYEd7ZZ0sWsu5cBPYlTiW58j6cCjxfmqYuDRCWLU0cXcSQ9sBQaOEPvcmcVJQF08F7joz4b2sr3iRcOX2eHjxT9dVl4HfPWqta0cnRmX4r58WZ8CRbsD24Mvj8UnOE7kqN16eT/t2FdWjcrawFHfKRq9awOKzVpdAjxxCcC3vS79jwBmvCs2+6CQStbfrJxOzdsqzte5gFmHAU31vp317BnAL7VpJke55ZN8r4ciJQjyedsM4uLl6cCnzxo6uDcdp42XLRDnvlsDrLjSupPqZ7duAD5+EqgqEmBkh2fHb+uUjy+eJXliI0rK6/f6TrF5ji+TK5aK65wCzh1lbyvb48nJQM4XRpkBRwHT3gIOGS3Obfw78OYsX5+29YgvnLgklNc0YH+FNgX31ekIjd71AfXU5cCP7wQ2B9/q7NScwjTUAHNGCPBR7tgIHHu2+D8DkQxImuXezcARJ4kzz14FfPuG7/VQgLpkHnDh/eIerj3+daN1d9GnlQwM862tr7/MI1QoHW0FFNdLE+8ToQ6uFTlFtpJFe4C+Q8WVmb2NdaO/rS/cCHyxyro95m4Ve9ozNsn24MvBKeHW10nd0dTsxo5C663TnaDRuzagOJ2bM9K+SWZ+ABxzlrj+1GTgx3fF/0kS3PSy+H/mv4FlFxg6zCMYG3z28MCFdChAzd4CDDte6Hz0PGDnR9Y2nvxr4IbnxbX3HwTe+pP4v7mT8mVw/5HW5A3LthVQ4XboO94Hjj1HlF403hr8ZfsEULQ9HwJUz1gHpJwnTj89RZAtTgpHW9WD3cU1qG+y/iK+rTR61wbUD+8AT2uMn1XDTH0YOEfLPsn4I7BJI3q43zZBcdAgsUZiJyjfJzSYRxcuwt+cHag5FKAerRRrO8p3bwVOKXWNJEdSzhdHHAU5GvoDas/nwINn2nc7JwHF2NrxUwCydP2PFEQMiRzulcdjfV1Ke2iXv61b14vpt52Y169v3Ad88LCTcBJ2KvEoqmpAUbUFeypqaxON3rUB9Z9ngFdn2DfK+fcAzHWjbFoOZNxplL1sIXDBfeJ47VxgvVbuLztFh6LMSwWKdgbqDwYodkpej1RIpS85ObCTfrUaWPnr6AKKDNlVy4DxUwURE0rsABWqPZhzOEXLNfz4KSD99lA1RXbd+1NCiahrdCOrzH4jpLbQ6M4Daswk4MhTxYNu32idXcxcN7JklPpq4K6+hmOcpM23vAw8f7290yc9AEyaI65v+BuwxsRkkbiYv0PM6fWF9lGnAXd/LMoza/qRc611BwMUR6ZHKgz6mbE2uymQWTsZNaspX6iE07aOUInJwO0bgKNPM9qL8bHCXUBVoRhdmxuAibOMaawdoL54EXjht/btYR791y0E3pkfGWBClSbjH0c21IPM4no0e6yTlttCozsPqEsXCOdSzOyZ+WFJs87SWJ7CncD8VOOqeX2xYByQrzFu5vsZgF2oxaeCxaHIdDGWZCfXPgucdoO4uuoW4DNtvaKX/8M7QKq2fvr7OcDJVwNn/k5cff4GYMtLkQOKd5hz/exGuWCdI5Lsg7YCimzj5EXCmrzvBYXP4LO/zPrcCGzbASrYS4j6rvuHCBxT7MiLUKAJdZ3Teag44GpCWZ39j3a0lkZ3HlCnXAdcv1I81tcZwD+vCXxEc5nMD4FlE40yv38TGHuxOF5+MbBtQ+D91z8HnKKxTcEAxSyDeaMFfewvDA4TlHrO3UNnAdmbfUsx++D3GoPH0S51oghIskPNHma/9gm1hjIvvv0pc7MF4yaLNQuF9Dzf8JRYAop0NmcdlGeuBL5fE+hL/qbT0gJjOmgHKLbHn48CXD5f0Ap9bA/67eDB4njp6SKbxWnRfjmzqr4ZuZVBszJaRaM7DygGTe/TsgsYUF0wBigx/SACpxB3fyJSbSj/Xga8pn2vw+OpjwDnaOseqynbYWOB2V+KqRglGKB4neksVlQvyQiSEhQGVJdoNLi5ARkPWpRtgE6/xnhP+h32TW1eZ5FlJNtoluMuBW59XZxhytL8NKCh2rcMR+H7vzFSmB7+BcBMAkosAWWegvPlyJekv5hBx2t2gOK1/64EXro1UMeEu4ApfxPnmYa0VJti2nu59Vfi4r27y24vaYYnyLdqraHRnQcUH/P29cAobX1RXSpAw8U7O8mp1wGHalM8bu7OEcTc4UZPAG57z3AWsxW+eEnM148+XUw/yL7pEgxQZOgIvG9eF8HC4l3A4FHAib802D3qefJS4CdTneamumgOcLFfOs0ixoR+sG9QMx1P2j3zA5EzSFZQF3MnZMYA10cMPvOzbU4zT77GyJbwZ8daCyjq58sjHPlhrfDJb1aKNqMU7gBemgZk/VdkeHCtfPliY82s6w0GKJYhkULSgdN5Zq4wTKGzrbzOGQtnLtES9gmPB/uqPKhsCL6hbFwcLkpNh03nCDQwOoBirIajlJ4gaueY95cCb2kBTnMZc0zD/16CZO0cY14fDFAEEmX8FdYWsJOvWwAwF89OOCVcmGWkCIXz9uR0lNNSf5mRLH6rlsIg6LQ1Rt6iXf1ct3B0qncZJVoLqEg6qM5sWrUlM0hIruiM386PBdj09aUdoLZtFOSGTq8HtK1bZKywX0RVvL/cBlejir2u4D9+qCjYnjoaY8Pd1CU6gKIz2BGvecpIIDU7qDRX0Nl881oJf7WOMYnTb/K9Wpkv7vtxXXjJsWTASB6Q8uVbVo/9UCunWqRlv18buunIcumZ5czt46gZSs64BTh7OjBwpJFnZwYU7+cCmTlyzB0028ZrXKcR6Jxe+mdgxxJQtOWIU4CrHzdYPP3Z2Y7fvi5GV+b7MXmWYgcopi0xiM2g+aARvh7kfhP0LUf0GAk5vu2l7qDTPpoSCY0ePUDpTunRVwzrnO6xE/NNFm5KCXcBHTJaLFT5yQWdHkrsOhs7L6co+ucCTKMJR9jRF+cCjMUwK2HW0MD1Tjh6gpVh+hPz2Q5NE+ApyBTrznDo9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},81378:function(dn){"use strict";dn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQeuFsCr/gh45wmsbXHzsPrcvAfAfV6yn18FjgN8YmUInKiAd4TMJObUlNQj42wWutq7SNtXA9zrIVC88nts7Bgsq+AB8GDZiUEyDrm/BAFj5PBLUAASniNnpeSgvLCSjZADl8dBev8ubD41GIbsAfBg2IVBOAaSnUNnK6GM5DlyQ5UKmSlZ6GjvJBiT5epdGRSP7MRGzbUcvgfA13L1h0DfPtFyBE9VMKuMVqNH2rl0NNapBG78vQ98b9+B2xuu1VQ8AL5WKz+E+pV6cQiaqoAyXAp9tx5pyZfQUNdoBDEKAG5VEhJzrsWUPAC+Fqs+RPsMnOgF3xg5dBod0i9eRmM9D2IAFYB03m5sKRnoqXkAPNArPsT7CxingE+UFDqdHpfSMtHYYJIecn2hnL8DG+sGcooeAA/kav9M+gpIkEMZJYdBq0PqxXS0NDcLMvEFKRTzB1Kx8wD4ZwKqgZ6G/2g5vCPlaGttR+rFZMaRiSSQvLILW58YqPF4ADxQK/1z64cDs05IlByqqiqRX5gvKHV6gLspCYknB2LKHgAPxCr/TPuQ+XAImOQFzsDh0pVLUDcJ5jWUSaGcuBMbW9099WsOYDKYU8Qbi5zqshnZ6e41uGrtSxScU3NQhErR1UBhae4hstkaBiiWzDtSykSJri4NLmYmQ6s1dfz6bmx7xD0z7Gn1mgN4bX48CyapP9eBI/NLXZ5v3JYAzHlnOGvnyMJSqNO7TG36xMjYe41KB22r+GGR+nC48aNIVrb4780o2+OYkYTOVWLRnijk/JcKee+qoVHzMqE5zXlvOGLW+0MRIsXBGUVouuweJ9bys7HwjpJBldaJk2vcH/brP9aLRb1V11aisLzAKEpwWimks3Zic4bLm2qngUED4K5GHWpOttuda+U3bSj83ya7ZeLvCcD1f+HBd3hOMVQXeQDL/DhsVI1l71MerUXOm/zjzhYRV1lfmsC+Sn28FtmviZcV6t/wUSRGbQ5g/575RRWKPuE1c3Ma8+sgXPcmf7gynqvH5d3OO7DkARIowigzwDEtPxcLryApmrK7cGqtYwB31evQ3Wx94Bz3xJcgOThwrBd0Wj1Ssi6gW8sfTA44swuJ8zje9ewWGjQAdmZ2OW+rkPIwRfeJ09UAsH+CHGuuxLNOzj9Yjfz37R8axTAp1hWPBnmsOuu02BtXCL3Ges8IhOvLRkPmI0FjSie+ud55u//YB4Iw+w0e/Febkh+qQe47apea9Y2VQeYrQXlNGcpqeubFQfKrJGz9wKXG7VQeNADuqNKi6FNrrmU+9rqfOlDxtf3HudMAfkuFmPV+iN0QgMyXG6BK6xE1gqYpsDI5jnX9071VKHYwrklPhWDa88NY+csvNiDj2XrRJZ/7fgRG3xfIvv8qrgAdFc4Jq4MdwHQoCcQkA6fmXIBOz8v4HNAog2zcc9gsviguoNutAKZHsdRHYnd4y76LgU+UHKr0TvxwFx+y54iIu7WX9Ww8SwGS8/mp8YkBmPNuBHv/7fwSHph6A0jBshQhVqbGIWiKAgUfqnFue42p22HzvHHzyZHs/+83VKB8r/ihoRQjkuMp6IVShvYlFGLyjlCEzVXanIZXiJS5Y4laizSij+78/2lisrRA8kAJCz53RKO2BLL+ic5tr0btaftiGZXrrNGhu6n/IoQwJt+RMrbOJTVFqG4030vJX3dj632Oxt6f790K4CWHohF5s29/xmW3DoH98Oyex9TY3wRh9mvij1f15S4cWVBiBWCBW2vb9fhqZIFpEyNv9sGSQzFsDCdWlqHqqDgIiIsv+DyKlS39/xac3lSJpd9EI+Im1+Z9+YUGZPyHbaYVMlOB0DneNtdo5J3+GL7Ih31HcraYtYPmXPSx/SdeXzeORAifETJ0dnYivTgFBoMgRpEMLF24G5tP97VNR+WHJIBL97TgtBm37i+AJV4c1hbEsywEc8XOHJRHl5Si7rTtBASZLwfi4n7xXmydT60rR8XBNkx/IQwhM3s4cMgsJVOqCDT1Z5xLZij6W7MowMxFFkcbLPZ9R7UWX8XwFoOrSd4jOUilMuRWZkHdZq78cpdliJ5xtZNFBwTAxAW+u7nMap1uOhbDTEo1p9qR8oh95Ywe9YJp68fESpT8oyc9K+x6JUas8GPtB09TIGoV/55Eg45qHTprtSj8qMmmFWLKs6GY8scwNOdqcGBSEas3KjEAN3xotGRcV9xLPjafBJnFEv4tyPTRsZtKUfu9NUBJTApf6NOrD1dAYw7gikOt0Hc7r+SHTFcys6W7AOwVLIFXoBQ16iqU1BdaTvOJ3dj2iitzt6w7IADuqNHiq2jr0357xWgow2UoP9CK8/9eDZ8YOXxjZPAZaXyNkcN7uBRHF5dh7gcRGH1vIHQaA/ZE5ovKjk4rcUYzmt9oOW7L5i0Ox28tQ/Xxdkz+YyimPhvGPvsyPA8albV8GLXaF4u+iu61nqIAPhGD8Pk+aM7R4MBk/pC4QuYA3juqAJo+yK/XvRUOkpPdBWB6qpHuo9F0I73sgsU0uTYZFOShc93gb2x5wAD89YQiDLteyUBKDgVSZGI3+bOUb0e0L6EAEx8PRfQaP6gyOnFytbhts68Apr5vOT0SYXO9Uba3BT9sqMSNn0QiblMAOuu12BNpffDIbLYqLY4dPnMSA/CKlFgET1UyRdVcdnc0b7HvB7MIQWP2jiJlk8OVqgy0a6wU4H27sW1df+d+zTjwiRXlTF60R6TFd1Rq0VbSjbYyLdpLu9FW2s2UoxG3+qK1RIumzC67GnN/AEwmqmlJw5D3ngppO+pBjgCSYet+bGfc35IW7olih4mIQK4M44EsBuC1hfHswDYkd+LECuv2zNunC0wcORXMAaxR060nzsNB6ith9mp3cWAaiVewFBQnUaEqRVVzudXgOEjWJGHrAedHLV5ywDjw/rGFWF86Gu2lWrSV8cCM3xbIjPoElB+3VjHw0gbaIsHlXPyPZvyUWCU6I0sAtxV3Y/QvApH332pRTxx56TgJZwLOBtUYyP0kKPhrE87dX92rL6k3hzvrEtiTgwBZ+HGTybsmBuCN6jHMyO8M0eElU5w9MgfwF2F5fTKBCXZodwKY3MoE4rauVmTX2vQkF4dCOfFqpOcPGIBtycArLsQieLoS3a16ZL/WaFOWkyo4hN3gjejVPMdLe7oOWa+YUlms9tkcwAR2Uuh0HXrsH1folCuZYgjWF4/m+9pRh6w/Wfe1+EAUgiYp8M0NJezJILiubQGYAmvu7hjnDHZZmeY8DQ5MtC8nmwOY5Gq6b81Z8o6UMYuIOwFM3gvv4TLGjDJqkqHVWcd8SICXdmHbU86OW6zcNQWwI/OX5aAJ6IdnFqO1yPZNR8RJJz8dhomPhfSqShz/4NQipwAcscwHSw/zNuDv76hA+X5rJwYFDJFtmQKFzA+MLQCbx1VUHmlD9bE2m3sx/qFg5tBRZ3bh0PRipzlwfwHgVgADkAdL2F1zZc1FqG/v/RQzjrmbg9e0JGy60t85UD23AniZUfsmj9P+sdZchTRWAgxxMb943jtli7Tt5HnrRsnnLWg4T/cS9KaEXwZi5EZ/pulLjB45KkHyYe7bauS8pWIXdDgTzDPrtXCM+00w62BPTD46q+2HPToCcNQqXyzay1srLM1/5rNYkRyL4GlKNKZ24pu59mMkzDnwoZnF0DQ5H5o546VhzH3ubgBLlRLI/Tk0dzQjX51pc185cCeTkLhk0AL4ttxR8BvlxdyZx5bwygu5Q8l1KRDJpxTk0pKnYU4Aoti7/EEu1/Zyba/YB3Kn2nJ5Lvh8BAtTtKRvbyxBwwUe8M5Go60rjudd2xmdODzLcbCNIwBPfT4Mk5/iXbv2QihXpsUxsaTuTAeOLrRvZTIHcOmXLcy06CyRJYgcL+4GMF1XJQ+RsvvWLjcmQ0fXadogCbh7diHxY2fHb1nOrRz4rtYxTNkp+byZhQ7OejUc4Yt9cHBKEVryeDFAUM7MvWurMuIQOEGB6hNtOH4Lr8WS6eq23HhUHm5F+tP1vcSIcb8NwqQdoaDNNHQD437Lc1BnwinZ3b7G8xS+0BvLvuNjILLfaETqY44TbB0BeOmRaEQs8WXOhs8CckUDzVdfHoWAcV6oOtYGstjYo8FuRhPGToyJ4lRKW4rQ2NUTa2I+N7o8UAq/cTuxvl/hcG4DMGUd3FHNx9ReebWRKV7ktiVtPPcdFZIf4j1vzgJ4WlIYJj0RCl0nKWRFzGIhELl0dZ383bt9MaORy3j6i8NwfHk5yFohgI3abS3U4OCMYuja7XM3ewCmw3Fn3RjQfWP15ztwZJ44Z70tLx5+cXKTLdpZAP90TxW0rc4H4ox9MAgRS33dzoFp/BTYQ0p4i6YZha1Z9qb03m5s+3V/uLDbAEw3uaxM4e2+KY/VIucNFWb+aRjGPxzCrA57YwuY2coZAFMg9205o9j9tln/2Yi0p8Q5oxiAzZUpciuTB45kZqLkR2qgvtSFZcd47isQZVc4cnHbA/DIDf6Y/7cRrDlH1hMyMZKFoOj/mnDmvt5KD3FmWk+BYtb5IXYjHzx/9pdVIB3BWRqzPYgF+5B+cP6BHq6ozuhinsKrSSRGyPwl7B7izJZU6ETynDhAL4X0hp3Ycr6v/bsNwObKy+m7K9njnUxUxIVJO039Qy2yX1c5BeDrP4xAfGIgU1b2jym06doVJi4GYOK0ltYJqlN9vA2Xkhow+9VwZtKjCKqa4+0smozeH1taJhrMQ/XtAfjmUyMx7EY+auzriYUmscnWJt1Zn8BiCLLfVCH10d5xIRMeDcaMl8L7urd9Kn/xyVpc+bPjzJM+NUpc2FsCCQeUdRRA1S3OeDjg4lQor9uIjc5rpO60Qlz39nCM+RUf6GKuTC3aH4WoFX4sFpZEgbV5fE6cmAx8OanBJJemP1uHzBfFbcCWgBJkYP8xcqzJ4uMdiAiYFBif+VIjU/JINhfk5rz31YzDr8kZxTxsZJc9NKNYNFlTDMAhsxRYfpZ/AjnjQt7UOZYd7LRn6pD1cu85DmUAc3L6SQgJ2rXNKOiwK0ZQbu9Du7Dtzb4cErdwYDLe316eAJKDyQa7L77HsxS9zg8Lv4hC7Q/tOL25EreejrULYJKdKZWGLBDkzeuLTGquxJFiSMmHJZ+1IOvlBjRl8Y9LYTz0XrAXU8KneQaEvYMjBmDzWGjhCSS2MaSg3lHJ6wskEhR+ZB2nS8qQJUUs8wVF01Ecx8Wn6pD9qu3DPeU53hJCQVXkkcx/X42uut6MTswD2hcwiZUlzxz9NkduZxq6DeJiCgeu2RsY/zTsuFotOnELgEes9MXifbzt0zLFhsBNFgaSOYmckYFJGfIf44XmbMcy2vTdYSzwh+jgtCITUClIvTmvmylrAo1Y7osFX45glhLiyidXlZuC16nPVem8ZYBk9q8nFNq0CdsCsLmVwBnuO/EPIZj+Ap+SRFkkDeesbd3CmAkMI1b4ghwfw+bxMjwRJcSeWF1u/aTggDlvDwc5X8htT0Q28eK/tzD7OMm+7ibBNl+tKUO9zn7WDQd8loRtm5wdk1sALERz0SBI9qOYh/GP8KYtSxKi0djPTxnjWsnBwXEcA5Wt5Ehq48y91UyuJgpf5I15n4xgSiEBjoiSK/dEFYgGukTe4ouFe3rAe+GBGuT/pXfyprkcbysugvqxBDB9tvRIDBMHaPxkEqv+js/oGLbAGzNfCYeuXQ9dFz9fUlDDjNkVFAdB4ZZkUbEkGi/FKUet9mNxGgK1FGhw8ck6u2lPVJZMWgRicvpQZJwJ+KfaWYZ2OeUaOq8LOosvVo7iTCgxuVuvQW53msO6UnC3PI/Eow4LuksGnvnncIz/XTDqz3bgyIJSZqqypUA5M0CxMj9urWTiABFpuhvqE/iFMpKjDGaSUZedGMnuM7jwYA3yP7CdeXzT0RgMX+xjU7myBWAy7y0+EA3/0V649Hw9Lu3qSZ2nQKA7ahLYD6pYEkXiHVtSivqztrmv5RqSKzv/AzX70/fxN4ToYFL0XdBk3rJBThvy/rnzMhT62TNyahTpMtFhsO1OF9aEfsYgHKFTfoeVDh8PbuHANJCJj4ewC0QIGOQgEMvh6i+IKw609hIpxv8+mAWp0O0+ZftanLo0hOKRyUYrBl4aG5mvKOWo6ojtRY+72x+z3+Lz8egOhrofOxhXpUd8+h+tc9oS7g9EAF0EYvwJLNJc6n/qQOW3bb0SVS3XhTyYK5LjUL6vlUXJNSaLixlOrSnHZ55MeSaU5fE1pjrEilPNOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},16722:function(dn,fn,le){"use strict";le.d(fn,{Z:function(){return kt}});const ae=bt=>typeof bt=="object"&&bt!=null&&bt.nodeType===1,Re=(bt,St)=>(!St||bt!=="hidden")&&bt!=="visible"&&bt!=="clip",ot=(bt,St)=>{if(bt.clientHeight<bt.scrollHeight||bt.clientWidth<bt.scrollWidth){const Tt=getComputedStyle(bt,null);return Re(Tt.overflowY,St)||Re(Tt.overflowX,St)||(mt=>{const xt=(ft=>{if(!ft.ownerDocument||!ft.ownerDocument.defaultView)return null;try{return ft.ownerDocument.defaultView.frameElement}catch(z){return null}})(mt);return!!xt&&(xt.clientHeight<mt.scrollHeight||xt.clientWidth<mt.scrollWidth)})(bt)}return!1},_t=(bt,St,Tt,mt,xt,ft,z,tt)=>ft<bt&&z>St||ft>bt&&z<St?0:ft<=bt&&tt<=Tt||z>=St&&tt>=Tt?ft-bt-mt:z>St&&tt<Tt||ft<bt&&tt>Tt?z-St+xt:0,Bt=bt=>{const St=bt.parentElement;return St==null?bt.getRootNode().host||null:St},vt=(bt,St)=>{var Tt,mt,xt,ft;if(typeof document=="undefined")return[];const{scrollMode:z,block:tt,inline:at,boundary:it,skipOverflowHiddenElements:lt}=St,ut=typeof it=="function"?it:be=>be!==it;if(!ae(bt))throw new TypeError("Invalid target");const dt=document.scrollingElement||document.documentElement,Pt=[];let At=bt;for(;ae(At)&&ut(At);){if(At=Bt(At),At===dt){Pt.push(At);break}At!=null&&At===document.body&&ot(At)&&!ot(document.documentElement)||At!=null&&ot(At,lt)&&Pt.push(At)}const Dt=(mt=(Tt=window.visualViewport)==null?void 0:Tt.width)!=null?mt:innerWidth,Ft=(ft=(xt=window.visualViewport)==null?void 0:xt.height)!=null?ft:innerHeight,{scrollX:Nt,scrollY:jt}=window,{height:Gt,width:Wt,top:Jt,right:Ut,bottom:Ht,left:oe}=bt.getBoundingClientRect(),{top:se,right:ce,bottom:Pe,left:Yt}=(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}})(bt);let ne=tt==="start"||tt==="nearest"?Jt-se:tt==="end"?Ht+Pe:Jt+Gt/2-se+Pe,ve=at==="center"?oe+Wt/2-Yt+ce:at==="end"?Ut+ce:oe-Yt;const Se=[];for(let be=0;be<Pt.length;be++){const fe=Pt[be],{height:pe,width:he,top:Ce,right:de,bottom:ye,left:Ne}=fe.getBoundingClientRect();if(z==="if-needed"&&Jt>=0&&oe>=0&&Ht<=Ft&&Ut<=Dt&&(fe===dt&&!ot(fe)||Jt>=Ce&&Ht<=ye&&oe>=Ne&&Ut<=de))return Se;const xe=getComputedStyle(fe),re=parseInt(xe.borderLeftWidth,10),Kt=parseInt(xe.borderTopWidth,10),wt=parseInt(xe.borderRightWidth,10),Lt=parseInt(xe.borderBottomWidth,10);let Xt=0,ee=0;const It="offsetWidth"in fe?fe.offsetWidth-fe.clientWidth-re-wt:0,Rt="offsetHeight"in fe?fe.offsetHeight-fe.clientHeight-Kt-Lt:0,Vt="offsetWidth"in fe?fe.offsetWidth===0?0:he/fe.offsetWidth:0,$t="offsetHeight"in fe?fe.offsetHeight===0?0:pe/fe.offsetHeight:0;if(dt===fe)Xt=tt==="start"?ne:tt==="end"?ne-Ft:tt==="nearest"?_t(jt,jt+Ft,Ft,Kt,Lt,jt+ne,jt+ne+Gt,Gt):ne-Ft/2,ee=at==="start"?ve:at==="center"?ve-Dt/2:at==="end"?ve-Dt:_t(Nt,Nt+Dt,Dt,re,wt,Nt+ve,Nt+ve+Wt,Wt),Xt=Math.max(0,Xt+jt),ee=Math.max(0,ee+Nt);else{Xt=tt==="start"?ne-Ce-Kt:tt==="end"?ne-ye+Lt+Rt:tt==="nearest"?_t(Ce,ye,pe,Kt,Lt+Rt,ne,ne+Gt,Gt):ne-(Ce+pe/2)+Rt/2,ee=at==="start"?ve-Ne-re:at==="center"?ve-(Ne+he/2)+It/2:at==="end"?ve-de+wt+It:_t(Ne,de,he,re,wt+It,ve,ve+Wt,Wt);const{scrollLeft:ue,scrollTop:ge}=fe;Xt=$t===0?0:Math.max(0,Math.min(ge+Xt/$t,fe.scrollHeight-pe/$t+Rt)),ee=Vt===0?0:Math.max(0,Math.min(ue+ee/Vt,fe.scrollWidth-he/Vt+It)),ne+=ge-Xt,ve+=ue-ee}Se.push({el:fe,top:Xt,left:ee})}return Se},gt=bt=>bt===!1?{block:"end",inline:"nearest"}:(St=>St===Object(St)&&Object.keys(St).length!==0)(bt)?bt:{block:"start",inline:"nearest"};function kt(bt,St){if(!bt.isConnected||!(xt=>{let ft=xt;for(;ft&&ft.parentNode;){if(ft.parentNode===document)return!0;ft=ft.parentNode instanceof ShadowRoot?ft.parentNode.host:ft.parentNode}return!1})(bt))return;const Tt=(xt=>{const ft=window.getComputedStyle(xt);return{top:parseFloat(ft.scrollMarginTop)||0,right:parseFloat(ft.scrollMarginRight)||0,bottom:parseFloat(ft.scrollMarginBottom)||0,left:parseFloat(ft.scrollMarginLeft)||0}})(bt);if((xt=>typeof xt=="object"&&typeof xt.behavior=="function")(St))return St.behavior(vt(bt,St));const mt=typeof St=="boolean"||St==null?void 0:St.behavior;for(const{el:xt,top:ft,left:z}of vt(bt,gt(St))){const tt=ft-Tt.top+Tt.bottom,at=z-Tt.left+Tt.right;xt.scroll({top:tt,left:at,behavior:mt})}}}}]);
|